Domain name for API request: vpc.tencentcloudapi.com.
This API (DescribeNatGateways) is used to query NAT gateways.
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: DescribeNatGateways. |
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 | The unified ID of the NAT gateways, such as nat-123xx454 . |
Filters.N | No | Array of Filter | Filter condition. NatGatewayIds and Filters cannot be specified at the same time.nat-123xx454 .vpc-123xx454 .test_nat .test-key . |
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 |
---|---|---|
NatGatewaySet | Array of NatGateway | NAT gateway object array. |
TotalCount | Integer | The number of NAT gateway object sets 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 Filters to query the NAT gateway information.
https://vpc.tencentcloudapi.com/?Action=DescribeNatGateways
&Filters.0.Name=vpc-id
&Filters.0.Values.0=vpc-0yi4hekt
&Offset=0
&Limit=10
&<Common request parameter>
{
"Response": {
"NatGatewaySet": [
{
"NatGatewayId": "nat-3isn9hr0",
"NatGatewayName": "test",
"VpcId": "vpc-0yi4hekt",
"CreatedTime": "2017-09-20 20:28:24",
"State": "AVAILABLE",
"NetworkState": "RUNNING",
"InternetMaxBandwidthOut": 100,
"MaxConcurrentConnection": 1000000,
"PublicIpAddressSet": [
{
"AddressId": "eip-7qcdm91q",
"PublicIpAddress": "139.199.232.238",
"IsBlocked": false
}
],
"DestinationIpPortTranslationNatRuleSet": [
{
"IpProtocol": "TCP",
"PublicIpAddress": "139.199.232.238",
"PublicPort": 8586,
"PrivateIpAddress": "10.80.80.41",
"PrivatePort": 8989,
"Description": "test_modify"
},
{
"IpProtocol": "UDP",
"PublicIpAddress": "139.199.232.238",
"PublicPort": 8989,
"PrivateIpAddress": "10.80.80.41",
"PrivatePort": 8989,
"Description": "test_dnapt"
}
],
"Zone": "ap-guangzhou-1"
},
{
"NatGatewayId": "nat-7xh58vea",
"NatGatewayName": "test_create",
"VpcId": "vpc-0yi4hekt",
"CreatedTime": "2019-05-04 15:01:11",
"State": "PENDING",
"NetworkState": "RUNNING",
"InternetMaxBandwidthOut": 100,
"MaxConcurrentConnection": 1000000,
"PublicIpAddressSet": [],
"DestinationIpPortTranslationNatRuleSet": [],
"Zone": "ap-guangzhou-2"
}
],
"TotalCount": 2,
"RequestId": "a3964872-e2f5-4180-8607-0b49ec8e0109"
}
}
This example shows you how to use NatGatewayIds to query the NAT gateway information.
https://vpc.tencentcloudapi.com/?Action=DescribeNatGateways
&NatGatewayIds.0=nat-3isn9hr0
&NatGatewayIds.1=nat-mxkohguo
&Offset=0
&Limit=10
&<Common request parameter>
{
"Response": {
"NatGatewaySet": [
{
"NatGatewayId": "nat-3isn9hr0",
"NatGatewayName": "test",
"VpcId": "vpc-0yi4hekt",
"CreatedTime": "2017-09-20 20:28:24",
"State": "AVAILABLE",
"NetworkState": "RUNNING",
"InternetMaxBandwidthOut": 100,
"MaxConcurrentConnection": 1000000,
"PublicIpAddressSet": [
{
"AddressId": "eip-7qcdm91q",
"PublicIpAddress": "139.199.232.238",
"IsBlocked": false
}
],
"DestinationIpPortTranslationNatRuleSet": [
{
"IpProtocol": "TCP",
"PublicIpAddress": "139.199.232.238",
"PublicPort": 8586,
"PrivateIpAddress": "10.80.80.41",
"PrivatePort": 8989,
"Description": "test_modify"
},
{
"IpProtocol": "UDP",
"PublicIpAddress": "139.199.232.238",
"PublicPort": 8989,
"PrivateIpAddress": "10.80.80.41",
"PrivatePort": 8989,
"Description": "test_dnapt"
}
],
"Zone": "ap-guangzhou-1"
},
{
"NatGatewayId": "nat-mxkohguo",
"NatGatewayName": "aaaaaa",
"VpcId": "vpc-m7sihqw5",
"CreatedTime": "2018-07-25 11:37:29",
"State": "PENDING",
"NetworkState": "UNAVAILABLE",
"InternetMaxBandwidthOut": 100,
"MaxConcurrentConnection": 1000000,
"PublicIpAddressSet": [],
"DestinationIpPortTranslationNatRuleSet": [
"Zone": "ap-guangzhou-1"
}
],
"TotalCount": 2,
"RequestId": "fed7e087-083f-49e4-8754-17fb130828e0"
}
}
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 |
---|---|
InvalidParameterValue.Malformed | Invalid input parameter format. |
InvalidParameterValue.TooLong | Invalid parameter value. The parameter value is too long. |
Was this page helpful?