{
  "$schema": "https://json-schema.org/draft/2020-12/schema",
  "$id": "https://artifacts.apis.io/amazon-cloud-wan/json-schema/amazon-cloud-wan-create-direct-connect-gateway-attachment-request-schema.json",
  "title": "CreateDirectConnectGatewayAttachmentRequest",
  "x-generated": "2026-11-11",
  "x-method": "derived",
  "x-generator": "derive-json-schema.py",
  "x-source": "openapi/amazon-cloud-wan-direct-connect-gateway-attachments-api-openapi.yml#/components/schemas/CreateDirectConnectGatewayAttachmentRequest",
  "type": "object",
  "properties": {
    "CoreNetworkId": {
      "type": "string",
      "description": "The ID of the Cloud WAN core network that the Direct Connect gateway attachment should be attached to."
    },
    "DirectConnectGatewayArn": {
      "type": "string",
      "description": "The ARN of the Direct Connect gateway attachment."
    },
    "RoutingPolicyLabel": {
      "type": "string",
      "description": "The routing policy label to apply to the Direct Connect Gateway attachment for traffic routing decisions."
    },
    "EdgeLocations": {
      "type": "array",
      "items": {
        "type": "string"
      },
      "description": "One or more core network edge locations that the Direct Connect gateway attachment is associated with."
    },
    "NatGatewaySupport": {
      "type": "string",
      "enum": [
        "ENABLE",
        "DISABLE"
      ],
      "description": "Specifies whether to enable NAT gateway support on the Direct Connect gateway attachment. To enable NAT gateway support, you must also specify at least one NAT rule. If you don't specify a value, NAT gateway support is disabled. Only the core network owner can configure NAT on an attachment."
    },
    "NatSystemRouteSupport": {
      "type": "boolean",
      "description": "Specifies whether the core network installs system routes for the NAT CIDR blocks of the attachment's NAT rules. System routes have a route type of SYSTEM. NAT is applied to traffic whether or not this option is enabled. The default is true."
    },
    "NatGatewayRules": {
      "type": "array",
      "items": {
        "$ref": "#/$defs/NatRuleRequest"
      },
      "description": "The NAT rules for the Direct Connect gateway attachment, up to 50 rules."
    },
    "Tags": {
      "type": "array",
      "items": {
        "$ref": "#/$defs/Tag"
      },
      "description": "The key value tags to apply to the Direct Connect gateway attachment during creation."
    },
    "ClientToken": {
      "type": "string",
      "description": "client token"
    }
  },
  "required": [
    "CoreNetworkId",
    "DirectConnectGatewayArn",
    "EdgeLocations"
  ],
  "$defs": {
    "NatRuleRequest": {
      "type": "object",
      "properties": {
        "RuleNumber": {
          "type": "integer",
          "description": "The rule number, from 1 to 32766. Each rule number must be unique for the attachment."
        },
        "MatchSourceCidr": {
          "type": "string",
          "description": "The IPv4 CIDR block to match against the source address of traffic from the attachment. The CIDR block can't overlap with the multicast range (224.0.0.0/4)."
        },
        "NatCidr": {
          "type": "string",
          "description": "The IPv4 CIDR block to translate matching source addresses to. The prefix length must be the same as the prefix length of MatchSourceCidr. The CIDR block must be within a private (RFC 1918) or shared address space (RFC 6598) range. The CIDR blocks of the NAT rules of an attachment can't overlap with each other."
        }
      },
      "required": [
        "RuleNumber",
        "MatchSourceCidr",
        "NatCidr"
      ]
    },
    "Tag": {
      "type": "object",
      "properties": {
        "Key": {
          "type": "string",
          "description": "The tag key. Constraints: Maximum length of 128 characters."
        },
        "Value": {
          "type": "string",
          "description": "The tag value. Constraints: Maximum length of 256 characters."
        }
      }
    }
  }
}