Adds a SNAT entry to a Smart Access Gateway (SAG) instance.

Debug

Use OpenAPI Explorer to perform debug operations and generate SDK code examples.

Request parameters

Parameter Type Required? Example value Description 
CidrBlock String Yes 192.168.0.1/24

The destination CIDR block.

RegionId String Yes cn-hangzhou

The ID of the region to which the SAG instance belongs.

SmartAGId String Yes sag-hgke*************

The ID of the SAG instance.

SnatIp String Yes 10.0.**. **

The public IP address.

Action String No AddSnatEntry

The name of this action.

Value: AddSnatEntry

Response parameters

Parameter Type Example value Description 
InstanceId String snat-m2obgkt5ya1puz****

The ID of the SNAT entry.

RequestId String 56BF6C79-C77D-41A0-86DD-A4B156E784EA

The ID of the request.

Examples

Request example


http(s)://[Endpoint]/? Action=AddSnatEntry
&CidrBlock=192.168.0.1/24
&RegionId=cn-hangzhou
&SmartAGId=sag-hgke*************
&SnatIp=10.0. **. **
&<CommonParameters>

Response example

XML format

<AddSnatEntryResponse>
	  <InstanceId>snat-m2obgkt5ya1puz8qh1</InstanceId>
	  <RequestId>56BF6C79-C77D-41A0-86DD-A4B156E784EA</RequestId>
    </AddSnatEntryResponse>

JSON format

{
	"RequestId":"56BF6C79-C77D-41A0-86DD-A4B156E784EA",
	"InstanceId":"snat-m2obgkt5ya1puz8qh1"
}

Errors

HTTP status code Error code Error message Description
403 FeatureNotSupport The current edition of the smart access gateway does not support this feature. The version of the SAG device does not support this function.
400 SAG.InstanceNoFound The specified SAG instance does not exist. The specified SAG instance does not exist.
500 SmartAccessGatewayInArrears The specified Smart Access Gateway has expired. The specified SAG instance has expired and the service is stopped.
500 SmartAccessGatewayNotActivated The specified Smart Access Gateway has not been activated. The specified SAG instance is not activated yet.
400 SNAT.CidrConfigExist The specified SNAT CIDR block already exists. The specified SANT CIDR block is being used by another SNAT entry.
400 SNAT.AmountLimit The maximum number of SNAT entries is exceeded. The number of SNAT entries has reached the quota.
400 SNAT.SnatDnatIpConflict The SNAT destination IP address is the same as the DNAT IP address. The specified SNAT destination IP address is being used by a DNAT entry.
403 FeatureNotSupportForStandBySmartAG The current edition of the standby smart access gateway does not support this feature. The version of the standby SAG device does not support this function.
500 InternalError An error occurred while processing your request. The request failed due to an unknown error.

For a list of error codes, visit the API Error Center.