Domain name for API request: vpc.intl.tencentcloudapi.com.
This API is used to query the array of objects of a NAT gateway's port forwarding rules.
A maximum of 100 requests can be initiated per second for this API.
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 Params. The value used for this API: DescribeNatGatewayDestinationIpPortTranslationNatRules. |
Version | Yes | String | Common Params. The value used for this API: 2017-03-12. |
Region | Yes | String | Common Params. 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 | Filters:NatGatewayIds and Filters cannot be specified at the same time.nat-gateway-id : The NAT gateway ID, such as nat-0yi4hekt .vpc-id : The VPC ID, such as vpc-0yi4hekt .public-ip-address : The EIP, such as 139.199.232.238 .public-port : The public network port.private-ip-address : The private IP, such as 10.0.0.1 .private-port . The private network port.description . The rule description. |
Offset | No | Integer | Offset. Default value: 0. |
Limit | No | Integer | Number of returned results. Default value: 20. Maximum value: 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 eligible object arrays of NAT port forwarding rules. |
RequestId | String | The unique request ID, generated by the server, will be returned for every request (if the request fails to reach the server for other reasons, the request will not obtain a RequestId). RequestId is required for locating a problem. |
This example shows you how to use the Filter
array to obtain the port forwarding rules of a NAT gateway.
https://vpc.intl.tencentcloudapi.com/?Action=DescribeNatGatewayDestinationIpPortTranslationNatRules
&Filters.0.Name=vpc-id
&Filters.0.Values.0=vpc-0yi4hekt
&<common request parameters>
{
"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 query the port forwarding rules by specifying NatGatewayId
.
https://vpc.intl.tencentcloudapi.com/?Action=DescribeNatGatewayDestinationIpPortTranslationNatRules
&NatGatewayIds.0=nat-3isn9hr0
&Offset=0
&Limit=10
&<common request parameters>
{
"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 | The parameter value is invalid. |
InvalidParameterValue.Duplicate | The input parameter already exists. |
InvalidParameterValue.LimitExceeded | The parameter value exceeds the limit. |
InvalidParameterValue.Malformed | Invalid input parameter format. |
InvalidParameterValue.Range | The parameter value is not in the specified range. |
UnauthorizedOperation | Unauthorized operation. |
문제 해결에 도움이 되었나요?