AssociateNatGatewayAddress#

Description#

Associates an Elastic IP address with a NAT gateway in the specified availability zone.

In each availability zone, only one Elastic IP address can be associated with a NAT gateway.

This operation is available only for NAT gateways that support manual Elastic IP address allocation mode.

Request Parameters#

  • AllocationId.N — The ID of the allocated Elastic IP address to associate with the NAT gateway.

    • Type: Array of strings

    • Required: Yes

    • Constraints: Only one ID can be specified

  • AvailabilityZone — The name of the availability zone to which the address is associated.

    • Type: String

    • Required: Yes, if AvailabilityZoneId is not supplied

    • Constraints: Cannot be used with the AvailabilityZoneId option

  • AvailabilityZoneId — The ID of the availability zone to which the address is associated.

    • Type: String

    • Required: Yes, if AvailabilityZone is not supplied

    • Constraints: Cannot be used with the AvailabilityZone option

  • NatGatewayId — The ID of the NAT gateway.

    • Type: String

    • Required: Yes

Response Elements#

  • natGatewayAddressSet — Information about the Elastic IP addresses of the NAT gateway.

  • natGatewayId — The ID of the NAT gateway.

    • Type: String

  • requestId — The request ID.

    • Type: String

Examples#

c2-ec2 AssociateNatGatewayAddress NatGatewayId <natgw_id> AvailabilityZone <az_name> AllocationId.1 <eipalloc_id>