ALIYUN::VPC::NatGateway is used to create a NAT gateway.
Syntax
{
"Type": "ALIYUN::VPC::NatGateway",
"Properties": {
"Description": String,
"NatGatewayName": String,
"InstanceChargeType": String,
"PricingCycle": String,
"VSwitchId": String,
"Duration": Number,
"DeletionProtection": Boolean,
"InternetChargeType": String,
"AutoPay": Boolean,
"NatType": String,
"DeletionForce": Boolean,
"VpcId": String,
"Tags": List,
"NetworkType": String,
"EipBindMode": String,
"IcmpReplyEnabled": Boolean,
"SecurityProtectionEnabled": Boolean
}
}
Properties
Property | Type | Required | Editable | Description | Constraint |
Description | String | No | No | The description of the NAT gateway. | The description must be 2 to 256 characters in length, and cannot start with |
NatGatewayName | String | No | No | The name of the NAT gateway. | The name must be 2 to 128 characters in length. The name must start with a letter and cannot start with If you leave this property empty, the gateway ID is used as the gateway name. |
InstanceChargeType | String | No | No | The billing method of the NAT gateway. | Valid values:
|
PricingCycle | String | No | No | The unit of the subscription duration. | Valid values:
You must specify this property when InstanceChargeType is set to PrePaid. |
VSwitchId | String | Yes | No | The vSwitch ID of the NAT gateway. | When you create an enhanced NAT gateway, you must specify a vSwitch for the NAT gateway. Then, the system assigns an idle private IP address from the vSwitch to the NAT gateway.
You can call the ListEnhanhcedNatGatewayAvailableZones operation to query the zones that support enhanced NAT gateways and call the DescribeVSwitches to query the number of idle private IP addresses in a vSwitch. |
Duration | Number | No | No | The subscription duration. |
You must specify this property when InstanceChargeType is set to PrePaid. |
DeletionProtection | Boolean | No | Yes | Specifies whether to enable the deletion protection feature. | Valid values:
|
InternetChargeType | String | No | No | The metering method of the NAT gateway. | Set the value to PayByLcu. A value of PayByLcu specifies the pay-by-CU metering method. |
AutoPay | Boolean | No | No | Specifies whether to enable the automatic payment feature. | Valid values:
You must specify this property when InstanceChargeType is set to PrePaid. |
NatType | String | No | No | The type of the NAT gateway. | Set the value to Enhanced. A value of Enhanced specifies an enhanced NAT gateway. |
DeletionForce | Boolean | No | No | Specifies whether to forcefully delete the NAT gateway. | Valid values:
|
VpcId | String | Yes | No | The ID of the virtual private cloud (VPC) in which you want to create the NAT gateway. | If you want to create a standard NAT gateway in a VPC, make sure that the route table of the VPC does not contain a route entry whose destination CIDR block is set to 0.0.0.0/0. If a route entry whose destination CIDR block is set to 0.0.0.0/0 exists, you must delete the route entry before you create the standard NAT gateway. Note The preceding limit does not apply when you create an enhanced NAT gateway in a VPC. |
NetworkType | String | No | No | The network type of the NAT gateway. | Valid values:
|
Tags | List | No | Yes | The tags of the NAT gateway. | You can add up to 20 tags. For more information, see Tags syntax and Tags properties. |
EipBindMode | String | No | No | The mode in which you want to associate the NAT gateway with an elastic IP address (EIP). | Valid values:
|
IcmpReplyEnabled | Boolean | No | No | Specifies whether to enable the Internet Control Message Protocol (ICMP) non-retrieval feature. | Valid values:
|
SecurityProtectionEnabled | Boolean | No | No | Specifies whether to enable the firewall feature. | Valid values:
|
Tags syntax
"Tags": [
{
"Key": String,
"Value": String
}
]
Tags properties
Property | Type | Required | Editable | Description | Constraint |
Key | String | Yes | No | The tag key. | The tag key must be 1 to 64 characters in length, and cannot contain |
Value | String | No | No | The tag value. | The tag value can be up to 128 characters in length, and cannot contain |
Return values
Fn::GetAtt
NatGatewayId: the ID of the NAT gateway.
SNatTableId: the ID of the SNAT entry.
ForwardTableId: the ID of the DNAT entry.