呼叫 DescribeNatGateways 以列表形式查詢指定地域指定條件 NAT 閘道的詳細資訊。
介面說明
本介面支援查詢公網 NAT 閘道或 VPC NAT 閘道的詳細資訊,文中出現的「NAT 閘道」不做具體的區分。
調試
您可以在OpenAPI Explorer中直接運行該介面,免去您計算簽名的困擾。運行成功後,OpenAPI Explorer可以自動產生SDK程式碼範例。
調試
授權資訊
|
操作 |
存取層級 |
資源類型 |
條件關鍵字 |
關聯操作 |
|
vpc:DescribeNatGateways |
get |
NatGateway
NatGateway
|
無 | 無 |
請求參數
|
名稱 |
類型 |
必填 |
描述 |
樣本值 |
| RegionId |
string |
是 |
要查詢的 NAT 閘道所在的地域 ID。 您可以透過呼叫 DescribeRegions 介面取得地域 ID。 |
cn-hangzhou |
| NatGatewayId |
string |
否 |
要查詢的 NAT 閘道的 ID。 |
ngw-bp1uewa15k4iy5770**** |
| VpcId |
string |
否 |
要查詢的 NAT 閘道所屬 VPC 的 ID。 |
vpc-bp15zckdt37pq72z**** |
| Name |
string |
否 |
要查詢的 NAT 閘道的名稱。 名稱長度為 1~128 個字元,不能以 |
test |
| InstanceChargeType |
string |
否 |
要查詢的 NAT 閘道執行個體的付費模式,取值:PostPaid(按量付費)。。 |
PostPaid |
| Spec |
string |
否 |
|
中国站示例值:Small,国际站示例值:无需填写 |
| NatType |
string |
否 |
NAT 閘道的類型,取值:Enhanced,增強型。 |
Enhanced |
| ResourceGroupId |
string |
否 |
要查詢的 NAT 閘道所屬的資源群組 ID。 |
rg-bp67acfmxazb4ph**** |
| PageNumber |
integer |
否 |
列表的頁碼,預設值為 1。 |
10 |
| PageSize |
integer |
否 |
分頁查詢時每頁的行數,最大值為 50,預設值為 10。 |
1 |
| DryRun |
boolean |
否 |
是否只預檢此次請求,取值:
|
false |
| Status |
string |
否 |
要查詢的 NAT 閘道的狀態,取值:
|
Available |
| NetworkType |
string |
否 |
要查詢的 NAT 閘道的類型,取值:
|
internet |
| Tag |
array<object> |
否 |
標籤列表。 |
|
|
object |
否 |
標籤列表。 |
||
| Key |
string |
否 |
NAT 閘道執行個體的標籤鍵。最多支援輸入 20 個標籤鍵。 標籤鍵最多支援 128 個字元,不能以 |
KeyTest |
| Value |
string |
否 |
NAT 閘道執行個體的標籤值。最多支援輸入 20 個標籤值。 標籤值最多支援 128 個字元,不能以 |
valueTest |
| ZoneId |
string |
否 |
NAT 閘道所在的可用區 ID。 |
cn-hangzhou-b |
| AvailabilityMode |
string |
否 |
返回參數
|
名稱 |
類型 |
描述 |
樣本值 |
|
object |
每頁包含的條目數。 |
||
| PageSize |
integer |
每頁包含的條目數。 |
10 |
| RequestId |
string |
請求 ID。 |
4EC47282-1B74-4534-BD0E-403F3EE64CAF |
| PageNumber |
integer |
目前頁碼。 |
10 |
| TotalCount |
integer |
查詢的 NAT 閘道列表條目數。 |
1 |
| NatGateways |
object |
||
| NatGateway |
array<object> |
NAT 閘道的詳細資訊。 |
|
|
array<object> |
NAT 閘道的詳細資訊。 |
||
| Status |
string |
NAT Gateway 的狀態,取值:
|
Creating |
| CreationTime |
string |
NAT Gateway 的建立時間。 |
2021-06-08T12:20:20Z |
| VpcId |
string |
NAT Gateway 所屬的 VPC 的 ID。 |
vpc-bp15zckdt37pq72z**** |
| NatType |
string |
NAT Gateway 的類型,取值:Enhanced,增強型。 |
Enhanced |
| AutoPay |
boolean |
是否自動支付訂單。取值:
|
false |
| Spec |
string |
NAT Gateway 的規格,該參數傳回值為空白。 當 InternetChargeType 為 PayByLcu 時,傳回值為空白。 |
Small |
| DeletionProtection |
boolean |
是否開啟了刪除保護功能,取值:
|
true |
| NetworkType |
string |
NAT Gateway 的類型,取值:
|
internet |
| SecurityProtectionEnabled |
boolean |
是否開啟防火牆功能,取值:
|
false |
| InstanceChargeType |
string |
要查詢的 NAT Gateway 執行個體的付費模式,取值:PostPaid(隨用隨付)。 |
PostPaid |
| RegionId |
string |
NAT Gateway 的所在地區 ID。 |
cn-hangzhou |
| EcsMetricEnabled |
boolean |
是否開啟了網關流量監控功能,取值:
|
true |
| IcmpReplyEnabled |
boolean |
是否開啟 ICMP 代回。取值:
|
true |
| Description |
string |
NAT Gateway 的描述資訊。 |
NAT |
| ExpiredTime |
string |
NAT Gateway 的到期時間。 |
2021-08-26T16:00Z |
| ResourceGroupId |
string |
資源群組 ID。 |
rg-bp67acfmxazb4ph**** |
| NatGatewayId |
string |
NAT Gateway 的 ID。 |
ngw-bp1047e2d4z7kf2ki**** |
| InternetChargeType |
string |
NAT Gateway 的計費類型,取值:
|
PayByLcu |
| BusinessStatus |
string |
NAT Gateway 的業務狀態,取值:
|
Normal |
| Name |
string |
NAT Gateway 執行個體名稱。 |
abc |
| IpLists |
object |
||
| IpList |
array<object> |
公網 NAT Gateway 綁定的 EIP 列表。 |
|
|
object |
NAT Gateway 的 IP 資訊列表。 |
||
| UsingStatus |
string |
公網 NAT Gateway 執行個體綁定的 EIP 的關聯關係。取值:
|
UsedByForwardTable |
| IpAddress |
string |
NAT Gateway 綁定的 EIP 的 IP 位址。 |
116.62.XX.XX |
| SnatEntryEnabled |
boolean |
已經用於 DNAT 條目的 IP,是否還可用於 SNAT 條目,取值:
|
false |
| AllocationId |
string |
NAT Gateway 綁定的 EIP 的執行個體 ID。 |
eip-m5egzuvp3dgixen6**** |
| PrivateIpAddress |
string |
NAT Gateway 的私網 IP 位址。 |
192.168.XX.XX |
| ForwardTableIds |
object |
||
| ForwardTableId |
array |
NAT Gateway 的 DNAT 表 ID。 |
|
|
string |
DNAT 表 ID。 |
ftb-uf6gj3mhsg94qsqst**** |
|
| SnatTableIds |
object |
||
| SnatTableId |
array |
NAT Gateway 的 SNAT 表 ID。 |
|
|
string |
SNAT 表 ID。 |
stb-uf6dalcdu0krz423p**** |
|
| FullNatTableIds |
object |
||
| FullNatTableId |
array |
FULLNAT 表 ID。 |
|
|
string |
FULLNAT 表 ID。 |
fulltb-gw88z7hhlv43rmb26**** |
|
| NatGatewayPrivateInfo |
object |
增強型公網 NAT Gateway 的私網資訊。 說明
NatType 取值為 Normal 時,該列表中返回的參數均為空白值。 |
|
| VswitchId |
string |
NAT Gateway 所屬的交換器 ID。 |
vsw-bp1s2laxhdf9ayjbo**** |
| EniInstanceId |
string |
彈性網卡執行個體 ID。 |
eni-m5eg4ozy5st8q3q4**** |
| MaxBandwidth |
integer |
最大頻寬值,單位為 Mbps。 |
5120 |
| MaxSessionQuota |
integer |
NAT Gateway 的並發串連數。單位:個。 |
2000000 |
| MaxSessionEstablishRate |
integer |
NAT Gateway 的建立串連數。單位:個/秒。 |
100000 |
| PrivateIpAddress |
string |
私網 IP 位址。 |
192.168.XX.XX |
| IzNo |
string |
NAT Gateway 所屬的可用性區域。 |
cn-hangzhou-b |
| EniType |
string |
彈性網卡與 NAT Gateway 的繫結模式,取值:
|
indirect |
| PrivateLinkEnabled |
boolean |
是否支援私網串連,取值:
|
true |
| PrivateLinkMode |
string |
私網串連服務轉化模式,取值:
|
FullNat |
| EipBindMode |
string |
NAT Gateway 的 EIP 繫結模式,取值:
說明
NAT Gateway 的 EIP 繫結模式為 EIP 普通模式時,EIP 將佔用 NAT Gateway 所在交換器的一個私網 IP,請確保 NAT Gateway 所在交換器內私網 IP 位址充足,如果 NAT Gateway 所在的交換器沒有可用的空閑私網地址時,將無法綁定新的 EIP。NAT Gateway 的 EIP 繫結模式為 EIP 普通模式時,NAT Gateway 支援綁定的 EIP 數量上限為 50 個。 |
MULTI_BINDED |
| Tags |
object |
||
| Tag |
array<object> |
標籤列表。 |
|
|
object |
標籤列表。 |
||
| TagKey |
string |
執行個體的標籤鍵。 |
KeyTest |
| TagValue |
string |
執行個體的標籤值。 |
valueTest |
| EnableSessionLog |
string |
是否開啟會話日誌,取值:
|
true |
| AccessMode |
object |
反向訪問 VPC NAT Gateway 的訪問模式。 |
|
| ModeValue |
string |
訪問模式,取值:
|
route |
| TunnelType |
string |
隧道模式類型:
|
geneve |
| AvailabilityMode |
string |
||
| IpPrefixList |
object |
||
| IpPrefixList |
array<object> |
NAT IP 首碼位址區段列表。 |
|
|
object |
|||
| IpPrefix |
string |
NAT IP 首碼位址區段。 |
192.168.0.0/28 |
樣本
正常返回樣本
JSON格式
{
"PageSize": 10,
"RequestId": "4EC47282-1B74-4534-BD0E-403F3EE64CAF",
"PageNumber": 10,
"TotalCount": 1,
"NatGateways": {
"NatGateway": [
{
"Status": "Creating",
"CreationTime": "2021-06-08T12:20:20Z",
"VpcId": "vpc-bp15zckdt37pq72z****",
"NatType": "Enhanced",
"AutoPay": false,
"Spec": "Small",
"DeletionProtection": true,
"NetworkType": "internet",
"SecurityProtectionEnabled": false,
"InstanceChargeType": "PostPaid",
"RegionId": "cn-hangzhou",
"EcsMetricEnabled": true,
"IcmpReplyEnabled": true,
"Description": "NAT",
"ExpiredTime": "2021-08-26T16:00Z",
"ResourceGroupId": "rg-bp67acfmxazb4ph****",
"NatGatewayId": "ngw-bp1047e2d4z7kf2ki****",
"InternetChargeType": "PayByLcu",
"BusinessStatus": "Normal",
"Name": "abc",
"IpLists": {
"IpList": [
{
"UsingStatus": "UsedByForwardTable",
"IpAddress": "116.62.XX.XX",
"SnatEntryEnabled": false,
"AllocationId": "eip-m5egzuvp3dgixen6****",
"PrivateIpAddress": "192.168.XX.XX"
}
]
},
"ForwardTableIds": {
"ForwardTableId": [
"ftb-uf6gj3mhsg94qsqst****"
]
},
"SnatTableIds": {
"SnatTableId": [
"stb-uf6dalcdu0krz423p****"
]
},
"FullNatTableIds": {
"FullNatTableId": [
"fulltb-gw88z7hhlv43rmb26****"
]
},
"NatGatewayPrivateInfo": {
"VswitchId": "vsw-bp1s2laxhdf9ayjbo****",
"EniInstanceId": "eni-m5eg4ozy5st8q3q4****",
"MaxBandwidth": 5120,
"MaxSessionQuota": 2000000,
"MaxSessionEstablishRate": 100000,
"PrivateIpAddress": "192.168.XX.XX",
"IzNo": "cn-hangzhou-b",
"EniType": "indirect"
},
"PrivateLinkEnabled": true,
"PrivateLinkMode": "FullNat",
"EipBindMode": "MULTI_BINDED",
"Tags": {
"Tag": [
{
"TagKey": "KeyTest",
"TagValue": "valueTest"
}
]
},
"EnableSessionLog": "true",
"AccessMode": {
"ModeValue": "route",
"TunnelType": "geneve"
},
"AvailabilityMode": "",
"IpPrefixList": {
"IpPrefixList": [
{
"IpPrefix": "192.168.0.0/28"
}
]
}
}
]
}
}
錯誤碼
|
HTTP status code |
錯誤碼 |
錯誤資訊 |
描述 |
|---|---|---|---|
| 500 | InternalError | The request processing has failed due to some unknown error, exception or failure. | |
| 404 | InvalidRegionId.NotFound | The specified RegionId does not exist in our records. |
訪問錯誤中心查看更多錯誤碼。
變更歷史
更多資訊,參考變更詳情。