調用DescribeCustomerGateways介面查詢使用者閘道的資訊。
調試
您可以在OpenAPI Explorer中直接運行該介面,免去您計算簽名的困擾。運行成功後,OpenAPI Explorer可以自動產生SDK程式碼範例。
調試
授權資訊
|
操作 |
存取層級 |
資源類型 |
條件關鍵字 |
關聯操作 |
|
vpc:DescribeCustomerGateways |
list |
CustomerGateway
CustomerGateway
|
無 | 無 |
請求參數
|
名稱 |
類型 |
必填 |
描述 |
樣本值 |
| RegionId |
string |
是 |
使用者閘道所屬的地域 ID。 您可以透過調用 DescribeRegions 介面取得地域 ID。 |
cn-shanghai |
| CustomerGatewayId |
string |
否 |
使用者閘道的執行個體 ID。 說明
如果您不指定使用者閘道的執行個體 ID,則系統預設查詢目前地域下所有使用者閘道的資訊。 |
cgw-bp1pvpl9r9adju6l5**** |
| PageNumber |
integer |
否 |
清單的頁碼。預設值:1。 |
1 |
| PageSize |
integer |
否 |
分頁查詢時每頁的項目數。最大值:50。預設值:10。 |
10 |
| Tag |
array<object> |
否 |
使用者閘道繫結的標籤清單。 |
|
|
object |
否 |
標籤資訊。 |
||
| Key |
string |
否 |
標籤鍵。一旦輸入該值,則不允許為空字串。 最多支援 64 個字元,不能以 一次最多支援輸入 20 個標籤鍵。 |
TagKey |
| Value |
string |
否 |
標籤值。 標籤值最多支援 128 個字元,可以為空字串,不能以 一個標籤鍵對應一個標籤值。一次最多支援輸入 20 個標籤值。 |
TagValue |
| ResourceGroupId |
string |
否 |
使用者閘道所屬的資源群組 ID。 您可以調用 ListResourceGroups 介面查詢資源群組 ID。 |
rg-acfmzs372yg**** |
返回參數
|
名稱 |
類型 |
描述 |
樣本值 |
|
object |
傳回結果。 |
||
| PageSize |
integer |
分頁查詢時每頁的項目數。 |
10 |
| RequestId |
string |
請求 ID。 |
E82612A9-CB90-4D7E-B394-1DB7F6509B29 |
| PageNumber |
integer |
清單的頁碼。 |
1 |
| TotalCount |
integer |
清單項目數。 |
1 |
| CustomerGateways |
object |
||
| CustomerGateway |
array<object> |
使用者閘道資訊清單。 |
|
|
array<object> |
使用者閘道的資訊。 |
||
| IpAddress |
string |
本機資料中心網關裝置的 IP 位址。 |
139.32.XX.XX |
| Asn |
integer |
本機資料中心網關裝置的自治系統號。 |
65530 |
| Description |
string |
使用者網關的描述資訊。 |
desctest |
| CustomerGatewayId |
string |
使用者網關的執行個體 ID。 |
cgw-bp1pvpl9r9adju6l5**** |
| CreateTime |
integer |
建立使用者網關的時間戳記。單位:毫秒。 時間戳記的格式採用 Unix 時間戳記,表示從格林威治時間 1970 年 01 月 01 日 00 時 00 分 00 秒至建立使用者網關時的總時間長度。 |
1492747187000 |
| Name |
string |
使用者網關的名稱。 |
nametest |
| AuthKey |
string |
本機資料中心網關裝置 BGP 路由協議的認證密鑰。 |
AuthKey**** |
| Tags |
object |
||
| Tag |
array<object> |
使用者網關綁定的標籤列表。 |
|
|
object |
標籤資訊。 |
||
| Key |
string |
標籤鍵。 |
TagKey |
| Value |
string |
標籤值。 |
TagValue |
| ResourceGroupId |
string |
使用者網關所屬的資源群組 ID。 您可以調用 ListResourceGroups 介面查詢資源群組資訊。 |
rg-acfmzs372yg**** |
樣本
正常返回樣本
JSON格式
{
"PageSize": 10,
"RequestId": "E82612A9-CB90-4D7E-B394-1DB7F6509B29",
"PageNumber": 1,
"TotalCount": 1,
"CustomerGateways": {
"CustomerGateway": [
{
"IpAddress": "139.32.XX.XX",
"Asn": 65530,
"Description": "desctest",
"CustomerGatewayId": "cgw-bp1pvpl9r9adju6l5****",
"CreateTime": 1492747187000,
"Name": "nametest",
"AuthKey": "AuthKey****",
"Tags": {
"Tag": [
{
"Key": "TagKey",
"Value": "TagValue"
}
]
},
"ResourceGroupId": "rg-acfmzs372yg****"
}
]
}
}
錯誤碼
|
HTTP status code |
錯誤碼 |
錯誤資訊 |
描述 |
|---|---|---|---|
| 400 | Forbidden.TagKey.Duplicated | The specified tag key already exists. | |
| 400 | SizeLimitExceeded.TagNum | The maximum number of tags is exceeded. | |
| 400 | InvalidParameter.TagValue | The specified parameter TagValue is invalid. | |
| 400 | InvalidParameter.TagKey | The specified parameter TagKey is invalid. | |
| 400 | Duplicated.TagKey | The specified parameter TagKey is duplicated. | |
| 403 | Forbbiden.SubUser | User not authorized to operate on the specified resource as your account is created by another user. | |
| 403 | Forbidden | User not authorized to operate on the specified resource. |
訪問錯誤中心查看更多錯誤碼。
變更歷史
更多資訊,參考變更詳情。