Queries one or more SNAT entries in a SNAT table.

Debug

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

Request parameters

Parameter Type Required? Example value Description
Action String Yes DescribeSnatTableEntries

The name of this action.

Value: DescribeSnatTableEntries

RegionId String Yes cn-hangzhou

The ID of the region to which the NAT Gateway belongs.

To query the region ID, call DescribeRegions.

SnatTableId String Yes stb-8vbczigrhop8x5u3twlhd

The ID of the SNAT table.

PageNumber Integer No 1

The page number. Default value: 1

PageSize Integer No 10

The number of entries per page in the case of a paged query result. Maximum value: 50. Default value: 10

SnatEntryId String No snat-8vbae8uqh7rjpk7d2kuwt

The ID of the SNAT entry.

SnatEntryName String No SnatEntry-1

The name of the SNAT entry. The name must be 2 to 128 characters in length. It must start with a letter, but cannot start with http:// or https://.

SnatIp String No 116.62.222.28

The public IP address of the SNAT entry.

SourceCIDR String No 116.62.222.28/33

The source CIDR block of the SNAT entry.

SourceVSwitchId String No vsw-3xbxxxxx

The ID of the VSwitch that accesses the Internet through the SNAT function.

Response parameters

Parameter Type Example value Description
SnatTableEntries

The details of the SNAT entry.

SnatEntryId String snat-kmd6nv8fy

The ID of the SNAT entry.

SnatEntryName String SnatEntry-1

The name of the SNAT entry.

SnatIp String 116.62.222.28

The public IP address of the SNAT entry.

SnatTableId String stb-gz3r3odaw

The ID of the SNAT table to which the SNAT entry belongs.

SourceCIDR String 116.62.222.28/33

The source CIDR block of the SNAT entry.

SourceVSwitchId String vsw-3xbxxxxx

The ID of the VSwitch that accesses the Internet through the SNAT function.

Status String Pending

The status of the SNAT entry.

TotalCount Integer 1

The total number of SNAT entries.

PageNumber Integer 1

The current page number.

PageSize Integer 5

The number of entries per page.

RequestId String 6D7E89B1-1C5B-412B-8585-4908E222EED5

The ID of the request.

Examples

Request example


https://vpc.aliyuncs.com/?Action=DescribeSnatTableEntries
&RegionId=cn-hangzhou
&SnatTableId=stb-8vbczigrhop8x5u3twlhd
&<CommonParameters>

Response example

XML format

<DescribeSnatTableEntriesResponse>	
	  <PageNumber>1</PageNumber>
	  <PageSize>10</PageSize>
	  <RequestId>6D7E89B1-1C5B-412B-8585-4908E222EED5</RequestId>
	  <SnatTableEntries>
		    <SnatTableEntry>
			      <SnatEntryId>snat-kmd6nv8fy</SnatEntryId>
			      <SnatIp>139.xxx.xx.40</SnatIp>
			      <SnatTableId>stb-gz3r3odaw</SnatTableId>
			      <SourceCIDR>192.168.1.0/24</SourceCIDR>
			      <SourceVSwitchId>vsw-yrv0xxxxx</SourceVSwitchId>
			      <Status>Available</Status>
		    </SnatTableEntry>
		    <SnatTableEntry>
			      <SnatEntryId>snat-bs5bezbme</SnatEntryId>
			      <SnatIp>139.xxx.xx.40</SnatIp>
			      <SnatTableId>stb-gz3r3odaw</SnatTableId>
			      <SourceCIDR>192.168.3.0/24</SourceCIDR>
			      <SourceVSwitchId>vsw-3xbxxxxx</SourceVSwitchId>
			      <Status>Available</Status>
		    </SnatTableEntry>
	  </SnatTableEntries>
</DescribeSnatTableEntriesResponse>

JSON format

{
	"SnatTableEntries":{
		"SnatTableEntry":[
			{
				"Status":"Available",
				"SourceCIDR":"192.168.1.0/24",
				"SnatTableId":"stb-gz3r3odaw",
				"SnatIp":"139.xxx.xx.40",
				"SnatEntryId":"snat-kmd6nv8fy",
				"SourceVSwitchId":"vsw-yrv0xxxxx"
			},
			{
				"Status":"Available",
				"SourceCIDR":"192.168.3.0/24",
				"SnatTableId":"stb-gz3r3odaw",
				"SnatIp":"139.xxx.xx.40",
				"SnatEntryId":"snat-bs5bezbme",
				"SourceVSwitchId":"vsw-3xbxxxxx"
			}
		]
	},
	"PageNumber":1,
	"PageSize":10,
	"RequestId":"6D7E89B1-1C5B-412B-8585-4908E222EED5"
}

Errors

HTTP status code Error code Error message Description
404 InvalidRegionId.NotFound The specified RegionId does not exist in our records. The specified region ID does not exist.
404 InvalidSnatTableId.NotFound Specified SNAT table does not exist. The specified SNAT table does not exist.

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