{
  "$schema": "https://json-schema.org/draft/2020-12/schema",
  "$id": "https://artifacts.apis.io/amazon-network-firewall/json-schema/amazon-network-firewall-create-firewall-request-schema.json",
  "title": "CreateFirewallRequest",
  "x-generated": "2026-11-11",
  "x-method": "derived",
  "x-generator": "derive-json-schema.py",
  "x-source": "openapi/amazon-network-firewall-aws-network-firewall-api-openapi.yml#/components/schemas/CreateFirewallRequest",
  "type": "object",
  "properties": {
    "FirewallName": {
      "type": "string",
      "description": "The descriptive name of the firewall. You can't change the name of a firewall after you create it."
    },
    "FirewallPolicyArn": {
      "type": "string",
      "description": "The Amazon Resource Name (ARN) of the FirewallPolicy that you want to use for the firewall."
    },
    "VpcId": {
      "type": "string",
      "description": "The unique identifier of the VPC where Network Firewall should create the firewall. You can't change this setting after you create the firewall."
    },
    "SubnetMappings": {
      "type": "array",
      "items": {
        "$ref": "#/$defs/SubnetMapping"
      },
      "description": "The public subnets to use for your Network Firewall firewalls. Each subnet must belong to a different Availability Zone in the VPC. Network Firewall creates a firewall endpoint in each subnet."
    },
    "DeleteProtection": {
      "type": "boolean",
      "description": "A flag indicating whether it is possible to delete the firewall. A setting of TRUE indicates that the firewall is protected against deletion. Use this setting to protect against accidentally deleting a firewall that is in use. When you create a firewall, the operation initializes this flag to TRUE."
    },
    "SubnetChangeProtection": {
      "type": "boolean",
      "description": "A setting indicating whether the firewall is protected against changes to the subnet associations. Use this setting to protect against accidentally modifying the subnet associations for a firewall that is in use. When you create a firewall, the operation initializes this setting to TRUE."
    },
    "FirewallPolicyChangeProtection": {
      "type": "boolean",
      "description": "A setting indicating whether the firewall is protected against a change to the firewall policy association. Use this setting to protect against accidentally modifying the firewall policy for a firewall that is in use. When you create a firewall, the operation initializes this setting to TRUE."
    },
    "Description": {
      "type": "string",
      "description": "A description of the firewall."
    },
    "Tags": {
      "type": "array",
      "items": {
        "$ref": "#/$defs/Tag"
      },
      "description": "The key:value pairs to associate with the resource."
    },
    "EncryptionConfiguration": {
      "$ref": "#/$defs/EncryptionConfiguration"
    },
    "EnabledAnalysisTypes": {
      "type": "array",
      "items": {
        "type": "string",
        "enum": [
          "TLS_SNI",
          "HTTP_HOST"
        ]
      },
      "description": "An optional setting indicating the specific traffic analysis types to enable on the firewall."
    },
    "TransitGatewayId": {
      "type": "string",
      "description": "Required when creating a transit gateway-attached firewall. The unique identifier of the transit gateway to attach to this firewall. You can provide either a transit gateway from your account or one that has been shared with you through Resource Access Manager. After creating the firewall, you cannot change the transit gateway association. To use a different transit gateway, you must create a new firewall. For information about creating firewalls, see CreateFirewall. For specific guidance about transit gateway-attached firewalls, see Considerations for transit gateway-attached firewalls in the"
    },
    "AvailabilityZoneMappings": {
      "type": "array",
      "items": {
        "$ref": "#/$defs/AvailabilityZoneMapping"
      },
      "description": "Required. The Availability Zones where you want to create firewall endpoints for a transit gateway-attached firewall. You must specify at least one Availability Zone. Consider enabling the firewall in every Availability Zone where you have workloads to maintain Availability Zone isolation. You can modify Availability Zones later using AssociateAvailabilityZones or DisassociateAvailabilityZones, but this may briefly disrupt traffic. The AvailabilityZoneChangeProtection setting controls whether you can make these modifications."
    },
    "AvailabilityZoneChangeProtection": {
      "type": "boolean",
      "description": "Optional. A setting indicating whether the firewall is protected against changes to its Availability Zone configuration. When set to TRUE, you cannot add or remove Availability Zones without first disabling this protection using UpdateAvailabilityZoneChangeProtection. Default value: FALSE"
    },
    "NatGatewayMappings": {
      "type": "array",
      "items": {
        "$ref": "#/$defs/NatGatewayMapping"
      },
      "description": "The NAT gateways that the firewall uses to proxy traffic when NoSourcePreservation is TRUE. Network Firewall attaches the firewall to each NAT gateway that you specify, so that egress traffic is proxied through the NAT gateway."
    },
    "ProxySettings": {
      "$ref": "#/$defs/ProxySettings"
    },
    "NoSourcePreservation": {
      "type": "boolean",
      "description": "Optional. Indicates whether the firewall operates in proxy mode, in which the source IP address of the traffic is not preserved. When set to TRUE, the firewall proxies traffic through a NAT gateway and the traffic reaching the destination uses the NAT gateway's IP address as the source. When you set this to TRUE, you must specify NatGatewayMappings and VpcEndpoint instead of a top-level VpcId and SubnetMappings. You can't change this setting after you create the firewall. Default value: FALSE"
    },
    "VpcEndpoint": {
      "$ref": "#/$defs/VpcEndpoint"
    }
  },
  "required": [
    "FirewallName",
    "FirewallPolicyArn"
  ],
  "$defs": {
    "AvailabilityZoneMapping": {
      "type": "object",
      "properties": {
        "AvailabilityZone": {
          "type": "string",
          "description": "The ID of the Availability Zone where the firewall endpoint is located. For example, us-east-2a. The Availability Zone must be in the same Region as the transit gateway."
        }
      },
      "required": [
        "AvailabilityZone"
      ]
    },
    "EncryptionConfiguration": {
      "type": "object",
      "properties": {
        "KeyId": {
          "type": "string",
          "description": "The ID of the Amazon Web Services Key Management Service (KMS) customer managed key. You can use any of the key identifiers that KMS supports, unless you're using a key that's managed by another account. If you're using a key managed by another account, then specify the key ARN. For more information, see Key ID in the Amazon Web Services KMS Developer Guide."
        },
        "Type": {
          "type": "string",
          "enum": [
            "CUSTOMER_KMS",
            "AWS_OWNED_KMS_KEY"
          ],
          "description": "The type of Amazon Web Services KMS key to use for encryption of your Network Firewall resources."
        }
      },
      "required": [
        "Type"
      ]
    },
    "ListenerProperty": {
      "type": "object",
      "properties": {
        "Port": {
          "type": "integer",
          "description": "Port for processing traffic."
        },
        "Type": {
          "type": "string",
          "enum": [
            "HTTP",
            "HTTPS"
          ],
          "description": "Selection of HTTP or HTTPS traffic."
        }
      }
    },
    "NatGatewayMapping": {
      "type": "object",
      "properties": {
        "NatGatewayId": {
          "type": "string",
          "description": "A unique identifier for the NAT gateway to use with proxy resources."
        }
      },
      "required": [
        "NatGatewayId"
      ]
    },
    "ProxySettings": {
      "type": "object",
      "properties": {
        "ListenerProperties": {
          "type": "array",
          "items": {
            "$ref": "#/$defs/ListenerProperty"
          },
          "description": "Listener properties for HTTP and HTTPS traffic."
        }
      },
      "required": [
        "ListenerProperties"
      ]
    },
    "SubnetMapping": {
      "type": "object",
      "properties": {
        "SubnetId": {
          "type": "string",
          "description": "The unique identifier for the subnet."
        },
        "IPAddressType": {
          "type": "string",
          "enum": [
            "DUALSTACK",
            "IPV4",
            "IPV6"
          ],
          "description": "The subnet's IP address type. You can't change the IP address type after you create the subnet."
        }
      },
      "required": [
        "SubnetId"
      ]
    },
    "Tag": {
      "type": "object",
      "properties": {
        "Key": {
          "type": "string",
          "description": "The part of the key:value pair that defines a tag. You can use a tag key to describe a category of information, such as \"customer.\" Tag keys are case-sensitive."
        },
        "Value": {
          "type": "string",
          "description": "The part of the key:value pair that defines a tag. You can use a tag value to describe a specific value within a category, such as \"companyA\" or \"companyB.\" Tag values are case-sensitive."
        }
      },
      "required": [
        "Key",
        "Value"
      ]
    },
    "VpcEndpoint": {
      "type": "object",
      "properties": {
        "VpcId": {
          "type": "string",
          "description": "The unique identifier of the VPC where Network Firewall creates the proxy mode firewall endpoint."
        },
        "SubnetMappings": {
          "type": "array",
          "items": {
            "$ref": "#/$defs/SubnetMapping"
          },
          "description": "The subnets in which Network Firewall creates the firewall endpoint for a proxy mode firewall. Each subnet must belong to a different Availability Zone in the VPC."
        }
      },
      "required": [
        "VpcId",
        "SubnetMappings"
      ]
    }
  }
}