Domain name for API request: vpc.intl.tencentcloudapi.com.
This API is used to query NAT gateways.
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: DescribeNatGateways. |
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 | The unified ID of the NAT gateways, such as nat-123xx454 . |
Filters.N | No | Array of Filter | Filters. NatGatewayIds and Filters cannot be specified at the same time.nat-123xx454 .vpc-123xx454 .test_nat .test-key . |
Offset | No | Integer | Offset. Default value: 0. |
Limit | No | Integer | Number of returned results. Default value: 20. Maximum value: 100. |
Parameter Name | Type | Description |
---|---|---|
NatGatewaySet | Array of NatGateway | NAT gateway object array. |
TotalCount | Integer | The number of eligible NAT gateway objects. |
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 Filters
to query the NAT gateway information.
https://vpc.intl.tencentcloudapi.com/?Action=DescribeNatGateways
&Filters.0.Name=vpc-id
&Filters.0.Values.0=vpc-0yi4hekt
&Offset=0
&Limit=10
&<Common request parameters>
{
"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",
"TagSet": [
{
"Key": "test-key",
"Value": "test-value3"
}
],
"SecurityGroupSet": [],
"ExclusiveGatewayBandwidth": 1,
"IsExclusive": true,
"SubnetId": "sub-er88uji9",
"DirectConnectGatewayIds": [],
"SourceIpTranslationNatRuleSet": []
},
{
"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",
"TagSet": [
{
"Key": "test-key",
"Value": "test-value4"
}
],
"SecurityGroupSet": [],
"ExclusiveGatewayBandwidth": 1,
"IsExclusive": true,
"SubnetId": "sub-er88uji9",
"DirectConnectGatewayIds": [],
"SourceIpTranslationNatRuleSet": []
}
],
"TotalCount": 2,
"RequestId": "a3964872-e2f5-4180-8607-0b49ec8e0109"
}
}
This example shows you how to use NatGatewayIds
to query the NAT gateway information.
https://vpc.intl.tencentcloudapi.com/?Action=DescribeNatGateways
&NatGatewayIds.0=nat-3isn9hr0
&NatGatewayIds.1=nat-mxkohguo
&Offset=0
&Limit=10
&<common request parameters>
{
"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,
"SecurityGroupSet": [],
"ExclusiveGatewayBandwidth": 1,
"IsExclusive": true,
"SubnetId": "sub-er88uji9",
"DirectConnectGatewayIds": [],
"SourceIpTranslationNatRuleSet": [],
"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",
"TagSet": [
{
"Key": "test-key",
"Value": "test-value1"
}
]
},
{
"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",
"TagSet": [
{
"Key": "test-key",
"Value": "test-value2"
}
],
"SecurityGroupSet": [],
"ExclusiveGatewayBandwidth": 1,
"IsExclusive": true,
"SubnetId": "sub-er88uji9",
"DirectConnectGatewayIds": [],
"SourceIpTranslationNatRuleSet": []
}
],
"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 |
---|---|
InternalError.ModuleError | Internal module error |
InvalidParameter.Coexist | The parameters cannot be specified at the same time. |
InvalidParameter.FilterInvalidKey | The specified filter condition does not exist. |
InvalidParameter.FilterNotDict | The specified filter condition should be a key-value pair. |
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. |
InvalidParameterValue.TooLong | Invalid parameter value. The parameter value is too long. |
ResourceNotFound | The resource does not exist. |
UnsupportedOperation | Unsupported operation. |
UnsupportedOperation.ActionNotFound | The port does not exist. |
本页内容是否解决了您的问题?