{
  "$schema": "https://json-schema.org/draft/2020-12/schema",
  "$id": "https://artifacts.apis.io/amazon-cloud-wan/json-schema/amazon-cloud-wan-update-attachment-nat-configuration-request-schema.json",
  "title": "UpdateAttachmentNatConfigurationRequest",
  "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/UpdateAttachmentNatConfigurationRequest",
  "type": "object",
  "properties": {
    "AttachmentId": {
      "type": "string",
      "description": "The ID of the attachment to update the NAT configuration for."
    },
    "NatGatewaySupport": {
      "type": "string",
      "enum": [
        "ENABLE",
        "DISABLE"
      ],
      "description": "Specifies whether to enable or disable NAT gateway support on the attachment. When you disable NAT gateway support, the attachment keeps its NAT rules but doesn't apply them. To enable NAT gateway support, the attachment must have at least one NAT rule, either specified in this request or already configured on the attachment. If you omit this parameter, NAT gateway support is unchanged."
    },
    "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. If you omit this parameter, the current value is unchanged."
    },
    "NatGatewayRules": {
      "type": "array",
      "items": {
        "$ref": "#/$defs/NatRuleRequest"
      },
      "description": "The complete set of NAT rules for the attachment, up to 50 rules. The rules that you specify replace the existing rules of the attachment, matched by rule number. Existing rules that aren't included in the request are deleted. To delete all NAT rules, specify an empty list. You can delete all NAT rules only when NAT gateway support is disabled, or when you disable it in the same request. If you omit this parameter, the existing rules are unchanged."
    },
    "ClientToken": {
      "type": "string",
      "description": "The client token associated with the request."
    }
  },
  "required": [
    "AttachmentId"
  ],
  "$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"
      ]
    }
  }
}