{
  "$schema": "https://json-schema.org/draft/2020-12/schema",
  "$id": "https://artifacts.apis.io/amazon-cloud-wan/json-schema/amazon-cloud-wan-create-connect-attachment-request-schema.json",
  "title": "CreateConnectAttachmentRequest",
  "x-generated": "2026-11-11",
  "x-method": "derived",
  "x-generator": "derive-json-schema.py",
  "x-source": "openapi/amazon-cloud-wan-operations-api-openapi.yml#/components/schemas/CreateConnectAttachmentRequest",
  "type": "object",
  "properties": {
    "CoreNetworkId": {
      "type": "string",
      "description": "The ID of a core network where you want to create the attachment."
    },
    "EdgeLocation": {
      "type": "string",
      "description": "The Region where the edge is located."
    },
    "TransportAttachmentId": {
      "type": "string",
      "description": "The ID of the attachment between the two connections."
    },
    "RoutingPolicyLabel": {
      "type": "string",
      "description": "The routing policy label to apply to the Connect attachment for traffic routing decisions."
    },
    "NatGatewaySupport": {
      "type": "string",
      "enum": [
        "ENABLE",
        "DISABLE"
      ],
      "description": "Specifies whether to enable NAT gateway support on the Connect attachment. NAT is supported only on Connect attachments that use the GRE tunnel protocol. Tunnel-less Connect attachments aren't supported. 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."
    },
    "NatGatewayRules": {
      "type": "array",
      "items": {
        "$ref": "#/$defs/NatRuleRequest"
      },
      "description": "The NAT rules for the Connect attachment, up to 50 rules."
    },
    "Options": {
      "$ref": "#/$defs/ConnectAttachmentOptions"
    },
    "Tags": {
      "type": "array",
      "items": {
        "$ref": "#/$defs/Tag"
      },
      "description": "The list of key-value tags associated with the request."
    },
    "ClientToken": {
      "type": "string",
      "description": "The client token associated with the request."
    }
  },
  "required": [
    "CoreNetworkId",
    "EdgeLocation",
    "TransportAttachmentId",
    "Options"
  ],
  "$defs": {
    "ConnectAttachmentOptions": {
      "type": "object",
      "properties": {
        "Protocol": {
          "type": "string",
          "enum": [
            "GRE",
            "NO_ENCAP"
          ],
          "description": "The protocol used for the attachment connection."
        }
      }
    },
    "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."
        }
      }
    }
  }
}