{
  "$schema": "https://json-schema.org/draft/2020-12/schema",
  "$id": "https://artifacts.apis.io/amazon-ecs/json-schema/amazon-ecs-create-gateway-request-schema.json",
  "title": "CreateGatewayRequest",
  "x-generated": "2026-11-11",
  "x-method": "derived",
  "x-generator": "derive-json-schema.py",
  "x-source": "openapi/amazon-ecs-gateway-api-openapi.yml#/components/schemas/CreateGatewayRequest",
  "type": "object",
  "properties": {
    "name": {
      "type": "string",
      "description": "The name for the gateway. The name must be unique within your account and can be up to 255 characters."
    },
    "infrastructureRoleArn": {
      "type": "string",
      "description": "The Amazon Resource Name (ARN) of the IAM role that the gateway assumes to create and manage infrastructure on your behalf."
    },
    "clientToken": {
      "type": "string",
      "description": "A unique, case-sensitive identifier that you provide to ensure that the operation completes no more than one time. If this token matches a previous request, the service ignores the request, but does not return an error."
    },
    "deletionProtection": {
      "type": "boolean",
      "description": "Specifies whether to enable deletion protection for the gateway. When enabled, the gateway can't be deleted, and the gateway propagates this setting to the load balancers it manages. The default is true."
    },
    "configuration": {
      "$ref": "#/$defs/GatewayConfiguration"
    },
    "tags": {
      "type": "array",
      "items": {
        "$ref": "#/$defs/Tag"
      },
      "description": "The metadata that you apply to the gateway to help you categorize and organize it. Each tag consists of a key and an optional value. Depending on propagateTags, these tags can be applied to the infrastructure the gateway manages."
    },
    "propagateTags": {
      "type": "string",
      "enum": [
        "NONE",
        "GATEWAY"
      ],
      "description": "Specifies whether to propagate the tags from the gateway to the infrastructure that the gateway manages. The default is GATEWAY."
    }
  },
  "required": [
    "name",
    "infrastructureRoleArn",
    "configuration"
  ],
  "$defs": {
    "GatewayAlbTestTrafficRules": {
      "type": "object",
      "properties": {
        "header": {
          "$ref": "#/$defs/GatewayTestTrafficHeader"
        }
      }
    },
    "GatewayConfiguration": {
      "type": "object",
      "properties": {
        "hostSharedAlb": {
          "$ref": "#/$defs/HostSharedAlbConfiguration"
        }
      },
      "description": "Exactly one member is set."
    },
    "GatewayElbAccessLogConfiguration": {
      "type": "object",
      "properties": {
        "destination": {
          "$ref": "#/$defs/GatewayElbAccessLogDestination"
        }
      }
    },
    "GatewayElbAccessLogDestination": {
      "type": "object",
      "properties": {
        "s3": {
          "$ref": "#/$defs/GatewayElbAccessLogS3Destination"
        }
      },
      "description": "Exactly one member is set."
    },
    "GatewayElbAccessLogS3Destination": {
      "type": "object",
      "properties": {
        "bucket": {
          "type": "string",
          "description": "The name of the Amazon S3 bucket where access logs are delivered."
        },
        "prefix": {
          "type": "string",
          "description": "The object key prefix for the access logs in the Amazon S3 bucket."
        }
      },
      "required": [
        "bucket"
      ]
    },
    "GatewayElbNetworkConfiguration": {
      "type": "object",
      "properties": {
        "inboundSecurityGroup": {
          "type": "string",
          "description": "The ID of a security group that you provide to control inbound traffic to the load balancers that the gateway manages. When you specify a security group, the gateway doesn't create inbound rules on the security group it manages."
        },
        "subnets": {
          "type": "array",
          "items": {
            "type": "string"
          },
          "description": "The subnets for the load balancers that the gateway manages. The default is the subnets in the default VPC."
        },
        "ipAddressType": {
          "type": "string",
          "enum": [
            "ipv4",
            "dualstack",
            "dualstack-without-public-ipv4"
          ],
          "description": "The IP address type for the load balancers that the gateway manages. The default is dualstack."
        }
      }
    },
    "GatewayTestTrafficHeader": {
      "type": "object",
      "properties": {
        "name": {
          "type": "string",
          "description": "The name of the header to match for test traffic routing."
        },
        "values": {
          "type": "array",
          "items": {
            "type": "string"
          },
          "description": "The header values to match for test traffic routing."
        }
      },
      "required": [
        "name",
        "values"
      ]
    },
    "HostSharedAlbConfiguration": {
      "type": "object",
      "properties": {
        "networkConfiguration": {
          "$ref": "#/$defs/GatewayElbNetworkConfiguration"
        },
        "scheme": {
          "type": "string",
          "enum": [
            "internet-facing",
            "internal"
          ],
          "description": "Specifies whether the load balancers the gateway manages are internet-facing or internal. The default is internet-facing."
        },
        "webACLArn": {
          "type": "string",
          "description": "The Amazon Resource Name (ARN) of the WAF web ACL to associate with the load balancers that the gateway manages."
        },
        "accessLogs": {
          "$ref": "#/$defs/GatewayElbAccessLogConfiguration"
        },
        "port": {
          "type": "integer",
          "description": "The port that the load balancer listener uses is 443. The gateway supports only HTTPS at port 443."
        },
        "protocol": {
          "type": "string",
          "enum": [
            "HTTP",
            "HTTPS"
          ],
          "description": "The protocol for the load balancer listener is HTTPS. No other protocol is supported."
        },
        "maxAlbCount": {
          "type": "integer",
          "description": "The maximum number of Application Load Balancers that the gateway manages. The default is 10."
        },
        "httpDesync": {
          "type": "string",
          "enum": [
            "monitor",
            "defensive",
            "strictest"
          ],
          "description": "The desync mitigation mode for the load balancers that the gateway manages, which determines how the load balancers handle requests that might pose a security risk. The default is defensive."
        },
        "testTrafficRules": {
          "$ref": "#/$defs/GatewayAlbTestTrafficRules"
        }
      }
    },
    "Tag": {
      "type": "object",
      "properties": {
        "key": {
          "type": "string",
          "description": "One part of a key-value pair that make up a tag. A key is a general label that acts like a category for more specific tag values."
        },
        "value": {
          "type": "string",
          "description": "The optional part of a key-value pair that make up a tag. A value acts as a descriptor within a tag category (key)."
        }
      }
    }
  }
}