调用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. | 指定的参数TagValue不合规范。 |
| 400 | InvalidParameter.TagKey | The specified parameter TagKey is invalid. | 指定的参数TagKey不合规范。 |
| 400 | Duplicated.TagKey | The specified parameter TagKey is duplicated. | 指定的参数TagKey重复。 |
| 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. | 您没有权限操作指定资源,请申请权限后再操作。 |
访问错误中心查看更多错误码。
变更历史
更多信息,参考变更详情。