Queries information about customer gateways.
Try it now
Test
RAM authorization
|
Action |
Access level |
Resource type |
Condition key |
Dependent action |
|
vpc:DescribeCustomerGateways |
list |
CustomerGateway
CustomerGateway
|
None | None |
Request parameters
|
Parameter |
Type |
Required |
Description |
Example |
| RegionId |
string |
Yes |
The region ID of the customer gateway. You can call DescribeRegions to query region IDs. |
cn-shanghai |
| CustomerGatewayId |
string |
No |
The instance ID of the customer gateway. Note
If you do not specify the instance ID of a customer gateway, the system queries information about all customer gateways in the current region by default. |
cgw-bp1pvpl9r9adju6l5**** |
| PageNumber |
integer |
No |
The page number of the list. Default value: 1. |
1 |
| PageSize |
integer |
No |
The number of entries per page in a paged query. Maximum value: 50. Default value: 10. |
10 |
| Tag |
array<object> |
No |
The list of tags bound to the customer gateway. |
|
|
object |
No |
The tag information. |
||
| Key |
string |
No |
The tag key. If you specify this parameter, the value cannot be an empty string. The tag key can be up to 64 characters in length and cannot start with You can specify up to 20 tag keys at a time. |
TagKey |
| Value |
string |
No |
The tag value. The tag value can be up to 128 characters in length and can be an empty string. It cannot start with Each tag key corresponds to one tag value. You can specify up to 20 tag values at a time. |
TagValue |
| ResourceGroupId |
string |
No |
The ID of the resource group to which the customer gateway belongs. You can call ListResourceGroups to query resource group IDs. |
rg-acfmzs372yg**** |
Response elements
|
Element |
Type |
Description |
Example |
|
object |
The response parameters. |
||
| PageSize |
integer |
The number of entries per page in a paging query. |
10 |
| RequestId |
string |
The request ID. |
E82612A9-CB90-4D7E-B394-1DB7F6509B29 |
| PageNumber |
integer |
The page number of the list. |
1 |
| TotalCount |
integer |
The total number of entries in the list. |
1 |
| CustomerGateways |
object |
||
| CustomerGateway |
array<object> |
The list of customer gateways. |
|
|
array<object> |
The information about the customer gateway. |
||
| IpAddress |
string |
The IP address of the gateway device in the data center. |
139.32.XX.XX |
| Asn |
integer |
The autonomous system number (ASN) of the gateway device in the data center. |
65530 |
| Description |
string |
The description of the customer gateway. |
desctest |
| CustomerGatewayId |
string |
The customer gateway ID. |
cgw-bp1pvpl9r9adju6l5**** |
| CreateTime |
integer |
The time when the customer gateway was created. Unit: millisecond. This value is a UNIX timestamp representing the number of milliseconds that have elapsed since January 1, 1970, 00:00:00 UTC. |
1492747187000 |
| Name |
string |
The name of the customer gateway. |
nametest |
| AuthKey |
string |
The authentication key that is used to connect to the gateway device in the data center by using Border Gateway Protocol (BGP). |
AuthKey**** |
| Tags |
object |
||
| Tag |
array<object> |
The tags that are added to the customer gateway. |
|
|
object |
|||
| Key |
string |
The key of the tag. |
TagKey |
| Value |
string |
The value of the tag. |
TagValue |
| ResourceGroupId |
string |
The ID of the resource group to which the customer gateway belongs. You can call the ListResourceGroups operation to query resource groups. |
rg-acfmzs372yg**** |
Examples
Success response
JSON format
{
"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****"
}
]
}
}
Error codes
|
HTTP status code |
Error code |
Error message |
Description |
|---|---|---|---|
| 400 | Forbidden.TagKey.Duplicated | The specified tag key already exists. | The tag resources are duplicate. |
| 400 | SizeLimitExceeded.TagNum | The maximum number of tags is exceeded. | The number of tags has reached the upper limit. |
| 400 | InvalidParameter.TagValue | The specified parameter TagValue is invalid. | The error message returned because the specified tag value is invalid. |
| 400 | InvalidParameter.TagKey | The specified parameter TagKey is invalid. | The error message returned because the specified tag key is invalid. |
| 400 | Duplicated.TagKey | The specified parameter TagKey is duplicated. | The error message returned because the specified tag key already exists. |
| 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. | You do not have the permissions to manage the specified resource. Apply for the permissions and try again. |
See Error Codes for a complete list.
Release notes
See Release Notes for a complete list.