Domain name for API request: vpc.tencentcloudapi.com.
This API (DescribeNatGatewayDestinationIpPortTranslationNatRules) is used to query the array of objects of the port forwarding rules for a NAT gateway.
A maximum of 100 requests can be initiated per second for this API.
Note: This API supports Finance regions. If the common parameter Region is a Finance region, a domain name with the Finance region needs to be specified, for example: vpc.ap-shanghai-fsi.tencentcloudapi.com
The following request parameter list only provides API request parameters and some common parameters. For the complete common parameter list, see Common Request Parameters.
Parameter Name | Required | Type | Description |
---|---|---|---|
Action | Yes | String | Common parameter. The value used for this API: DescribeNatGatewayDestinationIpPortTranslationNatRules. |
Version | Yes | String | Common parameter. The value used for this API: 2017-03-12. |
Region | Yes | String | Common parameter. For more information, please see the list of regions supported by the product. |
NatGatewayIds.N | No | Array of String | NAT gateway ID. |
Filters.N | No | Array of Filter | Filter conditions:NatGatewayIds and Filters cannot be specified at the same time.nat-0yi4hekt .vpc-0yi4hekt .139.199.232.238 .10.0.0.1 . |
Offset | No | Integer | Offset. The default value is 0. |
Limit | No | Integer | Number of values to be returned. The default value is 20. Maximum is 100. |
Parameter Name | Type | Description |
---|---|---|
NatGatewayDestinationIpPortTranslationNatRuleSet | Array of NatGatewayDestinationIpPortTranslationNatRule | The object array of port forwarding rules for the NAT gateway. |
TotalCount | Integer | The number of object arrays of NAT port forwarding rules meeting the conditions. |
RequestId | String | The unique request ID, which is returned for each request. RequestId is required for locating a problem. |
This example shows you how to use the Filter array to pull a NAT gateway’s port forwarding rules.
https://vpc.tencentcloudapi.com/?Action=DescribeNatGatewayDestinationIpPortTranslationNatRules
&Filters.0.Name=vpc-id
&Filters.0.Values.0=vpc-0yi4hekt
&<Common request parameter>
{
"Response": {
"TotalCount": 2,
"NatGatewayDestinationIpPortTranslationNatRuleSet": [
{
"IpProtocol": "TCP",
"PublicIpAddress": "139.199.232.238",
"PublicPort": 8989,
"PrivateIpAddress": "10.80.80.41",
"PrivatePort": 8989,
"Description": "test_dnapt",
"CreatedTime": "2019-05-04 13:42:11",
"NatGatewayId": "nat-3isn9hr0",
"VpcId": "vpc-0yi4hekt"
},
{
"IpProtocol": "UDP",
"PublicIpAddress": "139.199.232.238",
"PublicPort": 8989,
"PrivateIpAddress": "10.80.80.41",
"PrivatePort": 8989,
"Description": "test_dnapt",
"CreatedTime": "2019-05-04 13:20:20",
"NatGatewayId": "nat-3isn9hr0",
"VpcId": "vpc-0yi4hekt"
}
],
"RequestId": "eb203971-a7a0-45c1-9c72-36ad86688590"
}
}
This example shows you how to use the NatGatewayId array to pull the NAT gateway’s port forwarding rules.
https://vpc.tencentcloudapi.com/?Action=DescribeNatGatewayDestinationIpPortTranslationNatRules
&NatGatewayIds.0=nat-3isn9hr0
&Offset=0
&Limit=10
&<Common request parameter>
{
"Response": {
"TotalCount": 2,
"NatGatewayDestinationIpPortTranslationNatRuleSet": [
{
"IpProtocol": "TCP",
"PublicIpAddress": "139.199.232.238",
"PublicPort": 8989,
"PrivateIpAddress": "10.80.80.41",
"PrivatePort": 8989,
"Description": "test_dnapt",
"CreatedTime": "2019-05-04 13:09:25",
"NatGatewayId": "nat-3isn9hr0",
"VpcId": "vpc-0yi4hekt"
},
{
"IpProtocol": "UDP",
"PublicIpAddress": "139.199.232.238",
"PublicPort": 8989,
"PrivateIpAddress": "10.80.80.41",
"PrivatePort": 8989,
"Description": "test_dnapt",
"CreatedTime": "2019-05-04 13:20:20",
"NatGatewayId": "nat-3isn9hr0",
"VpcId": "vpc-0yi4hekt"
}
],
"RequestId": "9b751ec3-d10a-4138-bdd9-fa5564684e60"
}
}
TencentCloud API 3.0 integrates SDKs that support various programming languages to make it easier for you to call APIs.
The following only lists the error codes related to the API business logic. For other error codes, see Common Error Codes.
Error Code | Description |
---|---|
InternalServerError | Internal error. |
InvalidAddressId.NotFound | The specified EIP does not exist. |
InvalidParameter | A parameter error occurred. |
InvalidParameter.Coexist | The parameters cannot be specified at the same time. |
InvalidParameterValue | Incorrect parameter value. |
InvalidParameterValue.Duplicate | The input parameter already exists. |
InvalidParameterValue.LimitExceeded | The parameter value exceeds the limit. |
InvalidParameterValue.Malformed | Invalid input parameter format. |
UnauthorizedOperation | Unauthorized operation. |
Was this page helpful?