Queries information about a NAT gateway.
Operation description
You can call this operation to query information about a specified Internet NAT gateway or Virtual Private Cloud (VPC) NAT gateway. In this topic, "NAT gateway" refers to both gateway types.
Debugging
Authorization information
The following table shows the authorization information corresponding to the API. The authorization information can be used in the Action
policy element to grant a RAM user or RAM role the permissions to call this API operation. Description:
- Operation: the value that you can use in the Action element to specify the operation on a resource.
- Access level: the access level of each operation. The levels are read, write, and list.
- Resource type: the type of the resource on which you can authorize the RAM user or the RAM role to perform the operation. Take note of the following items:
- The required resource types are displayed in bold characters.
- If the permissions cannot be granted at the resource level,
All Resources
is used in the Resource type column of the operation.
- Condition Key: the condition key that is defined by the cloud service.
- Associated operation: other operations that the RAM user or the RAM role must have permissions to perform to complete the operation. To complete the operation, the RAM user or the RAM role must have the permissions to perform the associated operations.
Operation | Access level | Resource type | Condition key | Associated operation |
---|---|---|---|---|
vpc:GetNatGatewayAttribute | get |
|
| none |
Request parameters
Parameter | Type | Required | Description | Example |
---|---|---|---|---|
RegionId | string | Yes | The ID of the region where the NAT gateway is deployed. You can call the DescribeRegions operation to query the most recent region list. | cn-qingdao |
NatGatewayId | string | Yes | The ID of the NAT gateway. | ngw-bp1b0lic8uz4r6vf2**** |
Response parameters
Examples
Sample success responses
JSON
format
{
"VpcId": "vpc-bp15zckdt37pq72z****",
"CreationTime": "2021-12-08T12:20:20Z",
"Status": "Available",
"NatType": "Enhanced",
"NetworkType": "internet",
"RegionId": "cn-qingdao",
"EcsMetricEnabled": true,
"RequestId": "4EC47282-1B74-4534-BD0E-403F3EE64CAF",
"Description": "NAT",
"ExpiredTime": "2021-12-26T12:20:20Z",
"ResourceGroupId": "rg-bp67acfmxazb4ph****",
"NatGatewayId": "ngw-bp1047e2d4z7kf2ki****",
"BusinessStatus": "Normal",
"Name": "abc",
"ForwardTable": {
"ForwardTableId": "ftb-uf6gj3mhsg94qsqst****",
"ForwardEntryCount": 1
},
"SnatTable": {
"SnatEntryCount": 1,
"SnatTableId": "stb-SnatTableIds****"
},
"FullNatTable": {
"FullNatEntryCount": 1,
"FullNatTableId": "fulltb-gw88z7hhlv43rmb26****"
},
"BillingConfig": {
"InternetChargeType": "PayBySpec",
"AutoPay": "false",
"Spec": "Small",
"InstanceChargeType": "PostPaid"
},
"PrivateInfo": {
"MaxBandwidth": 5120,
"VswitchId": "vsw-bp1s2laxhdf9ayjbo***",
"PrivateIpAddress": "192.168.XX.XX",
"IzNo": "cn-qingdao-b",
"EniInstanceId": "eni-bp1cmgtoaka8vfyg****"
},
"DeletionProtectionInfo": {
"Enabled": true
},
"IpList": [
{
"UsingStatus": "idle",
"IpAddress": "116.33.XX.XX",
"AllocationId": "eip-bp13e9i2qst4g6jzi****"
}
],
"PrivateLinkEnabled": true,
"PrivateLinkMode": "FullNat"
}
Error codes
HTTP status code | Error code | Error message | Description |
---|---|---|---|
404 | InvalidRegionId.NotFound | The specified RegionId does not exist in our records. | The specified region ID does not exist. |
For a list of error codes, visit the Service error codes.
Change history
Change time | Summary of changes | Operation |
---|---|---|
2024-05-07 | API Description Update. The Error code has changed. The response structure of the API has changed | View Change Details |
2023-03-01 | The Error code has changed | View Change Details |