Add an SNAT entry in an SNAT table.
Each SNAT entry consists of SourceVSwitchId and SnatIp. After an SNAT entry is added, ECS instances under the specified VSwitch can access the Internet using the public IP (SnatIp).
Note the following before creating an SNAT entry:
The VSwitch in the SNAT entry must meet the following requirements:
The VSwitch must belong to the same VPC as the NAT gateway.
The SNAT entry cannot be added if there is any HaVip instance under the VSwitch.
Each VSwitch can belong to only one SNAT entry.
The public IP (SnatIp) in the SNAT entry must meet the following requirements:
If your account has a NAT bandwidth package before 23:59, January 26, 2018, SnatIp must be a public IP address in the NAT bandwidth package of the NAT gateway.
An EIP cannot be used in a DNAT entry and an SNAT entry at the same time, but can be used by multiple SNAT entries.
If your account does not have a NAT bandwidth package before 23:59, January 26, 2018, SnatIp must be an EIP bound to the NAT gateway. For more information, see Bind EIPs.
The action to perform.
The region of the NAT gateway.
You can obtain the region ID by calling the DescribeRegions API.
|SnatTableId||String||Yes||The ID of the SNAT table.|
|SourceVSwitchId||String||Yes||The ID of the VSwitch.|
The CIDR block of the VSwitch, such as 10.1.1.0/24.
Note: This parameter and the
The public IP address.
Separate multiple EIPs by commas, such as
|RequestId||String||The ID of the request.|
|SnatEntryId||String||The ID of the SNAT entry.|
See VPC API Error Center.