You can call this operation to query source network address translation (SNAT) entries associated with a Smart Access Gateway (SAG) instance.

Debugging

OpenAPI Explorer automatically calculates the signature value. For your convenience, we recommend that you call this operation in OpenAPI Explorer. OpenAPI Explorer dynamically generates the sample code of the operation for different SDKs.

Request parameters

Parameter Type Required Example Description
Action String No DescribeSnatEntries

The operation that you want to perform.

Set the value to DescribeSnatEntries.

RegionId String Yes cn-hangzhou

The ID of the region where the SAG instance is deployed.

SmartAGId String Yes sag-whfn************

The ID of the SAG instance.

PageNumber Integer No 1

The number of the page to return. Default value: 1.

PageSize Integer No 2

The number of entries to return on each page. Default value: 10. Maximum value: 50.

Response parameters

Parameter Type Example Description
RequestId String 674BC3B2-5828-41D5-830E-148EE6CF86C2

The ID of the request.

TotalCount Integer 12

The total number of SNAT entries.

PageNumber Integer 12

The page number of the returned page.

PageSize Integer 5

The number of entries returned per page.

SnatEntries Array

The information about the SNAT entries.

InstanceId String snat-sl7kb9cpgfds*****

The ID of the SNAT entry.

CidrBlock String 192.169.10.0/24

The destination CIDR block.

SnatIp String 10.10.**. **

The public IP address.

CreateTime Long 1523604565000

The time when the SNAT entry was created.

Examples

Sample requests

http(s)://[Endpoint]/? Action=DescribeSnatEntries
&RegionId=cn-hangzhou
&SmartAGId=sag-whfn************
&<Common request parameters>

Sample success responses

XML format

<DescribeSnatEntriesResponse>
      <PageNumber>1</PageNumber>
	  <PageSize>10</PageSize>
	  <RequestId>674BC3B2-5828-41D5-830E-148EE6CF86C2</RequestId>
	  <SnatEntries>
		    <SnatEntry>
			      <CidrBlock>192.169.10.0/24</CidrBlock>
			      <CreateTime>1523604565000</CreateTime>
			      <InstanceId>snat-sl7kb9cpgfdsjr****</InstanceId>
			      <SnatIp>10.10.10.3</SnatIp>
		    </SnatEntry>
		    <SnatEntry>
			      <CidrBlock>10.0.0.0/8</CidrBlock>
			      <CreateTime>1523604565000</CreateTime>
			      <InstanceId>snat-m2obgkt5ya****</InstanceId>
			      <SnatIp>192.168.3.0</SnatIp>
		    </SnatEntry>
	  </SnatEntries>
	  <TotalCount>2</TotalCount>
    </DescribeSnatEntriesResponse>

JSON format

{
"PageNumber":1,
"PageSize":10,
"RequestId":"674BC3B2-5828-41D5-830E-148EE6CF86C2",
"SnatEntries":{
"SnatEntry":[
{
"CidrBlock":"192.169.10.0/24",
"CreateTime":"1523604565000",
"InstanceId":"snat-sl7kb9cpgfdsjr****",
"SnatIp":"10.10.10.3"
},
{
"CidrBlock":"10.0.0.0/8",
"CreateTime":"1523604565000",
"InstanceId":"snat-m2obgkt5ya1puz****",
"SnatIp":"192.168.3.0"
}
]
},
"TotalCount":2
}

Error codes

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