Queries SNAT entries.

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

ParameterTypeRequiredExampleDescription
ActionStringYesDescribeSnatTableEntries

The operation that you want to perform. Set the value to DescribeSnatTableEntries.

NatGatewayIdStringYesnat-5tawjw5j7sgd2deujxuk0****

The ID of the NAT gateway.

SnatEntryIdStringNosnat-5tfjp36fsrb36zs36faj0****

The ID of the SNAT entry.

SnatIpStringNo58.XXXX.XXX.29

The elastic IP address (EIP) specified in the SNAT entry.

SourceCIDRStringNo10.1.0.50/32

The source CIDR block specified in the SNAT entry.

SnatEntryNameStringNotest0

The name of the SNAT entry.

PageNumberIntegerNo1

The page number of the returned page. Pages start from page 1.

Default value: 1.

PageSizeIntegerNo10

The number of entries to return on each page. Maximum value: 100.

Default value: 10.

Response parameters

ParameterTypeExampleDescription
RequestIdString473469C7-AA6F-4DC5-B3DB-A3DC0DE3C83E

The ID of the request.

PageNumberInteger1

The page number of the returned page.

TotalCountInteger7

The number of SNAT entries that are returned.

PageSizeInteger10

The number of entries to return on each page.

SnatTableEntriesArray of SnatTableEntry

The details of the SNAT entries.

NatGatewayIdStringnat-5t7nh1cfm6kxiszlttr38****

The ID of the NAT gateway.

SnatEntryIdStringsnat-5tfjp3537mi6iokl59g5c****

The ID of the SNAT entry.

SnatIpString120.XXX.XXX.71

The elastic IP address (EIP) specified in the SNAT entry.

SourceCIDRString10.0.0.13/32

The source CIDR block specified in the SNAT entry.

SnatEntryNameStringtest0

The name of the SNAT entry.

StatusStringAvailable

The status of the DNAT entry. Valid values:

  • Pending: being created or modified.
  • Available
  • Deleting

Examples

Sample requests

http(s)://ens.aliyuncs.com/?Action=DescribeSnatTableEntries
&NatGatewayId=nat-5tawjw5j7sgd2deujxuk0****
&SnatEntryId=snat-5tfjp36fsrb36zs36faj0****
&SnatIp=58.XXXX.XXX.29
&SourceCIDR=10.1.0.50/32
&SnatEntryName=test0
&PageNumber=1
&PageSize=10
&Common request parameters

Sample success responses

XML format

HTTP/1.1 200 OK
Content-Type:application/xml

<DescribeSnatTableEntriesResponse>
    <RequestId>473469C7-AA6F-4DC5-B3DB-A3DC0DE3C83E</RequestId>
    <PageNumber>1</PageNumber>
    <TotalCount>7</TotalCount>
    <PageSize>10</PageSize>
    <SnatTableEntries>
        <NatGatewayId>nat-5t7nh1cfm6kxiszlttr38****</NatGatewayId>
        <SnatEntryId>snat-5tfjp3537mi6iokl59g5c****</SnatEntryId>
        <SnatIp>120.XXX.XXX.71</SnatIp>
        <SourceCIDR>10.0.0.13/32</SourceCIDR>
        <SnatEntryName>test0</SnatEntryName>
        <Status>Available</Status>
    </SnatTableEntries>
</DescribeSnatTableEntriesResponse>

JSON format

HTTP/1.1 200 OK
Content-Type:application/json

{
  "RequestId" : "473469C7-AA6F-4DC5-B3DB-A3DC0DE3C83E",
  "PageNumber" : 1,
  "TotalCount" : 7,
  "PageSize" : 10,
  "SnatTableEntries" : [ {
    "NatGatewayId" : "nat-5t7nh1cfm6kxiszlttr38****",
    "SnatEntryId" : "snat-5tfjp3537mi6iokl59g5c****",
    "SnatIp" : "120.XXX.XXX.71",
    "SourceCIDR" : "10.0.0.13/32",
    "SnatEntryName" : "test0",
    "Status" : "Available"
  } ]
}

Error codes

HTTP status codeError codeError messageDescription
400Invalid%sThe specified parameter %s is invalid.The error message returned because the parameter value is invalid.
400Missing%sYou must specify the parameter %s.The error message returned because the parameter is not specified.
400NoPermissionPermission denied.The error message returned because you do not have the required permissions. Ask the administrator to grant you the permissions.

For a list of error codes, see Service error codes.