Queries customer gateways.

Debugging

OpenAPI Explorer automatically calculates the signature value. For your convenience, we recommend that you call this operation in OpenAPI Explorer. OpenAPI Explorer dynamically generates the sample code of the operation for different SDKs.

Request parameters

Parameter Type Required Example Description
Action String Yes DescribeCustomerGateways

The operation that you want to perform. Set the value to DescribeCustomerGateways.

RegionId String Yes cn-shanghai

The region ID of the customer gateway.

You can call the DescribeRegions operation to query the most recent region list.

CustomerGatewayId String No cgw-bp1pvpl9r9adju6l5****

The ID of the customer gateway.

Note If you do not specify a customer gateway ID, the system queries all customer gateways in the current region by default.
PageNumber Integer No 1

The number of the page to return. Default value: 1.

PageSize Integer No 10

The number of entries to return on each page. Maximum value: 50. Default value: 10.

Tag.N.Key String No TagKey

The tag key. The tag key cannot be an empty string.

It can be at most 64 characters in length, and cannot contain http:// or https://. It cannot start with aliyun or acs:.

You can specify at most 20 tag keys in each call.

Tag.N.Value String No TagValue

The tag value.

The tag value can be an empty string and cannot exceed 128 characters in length. It cannot start with aliyun or acs:, and cannot contain http:// or https://.

Each tag key corresponds to one tag value. You can specify at most 20 tag values in each call.

Response parameters

Parameter Type Example Description
PageSize Integer 10

The number of entries returned per page.

RequestId String E82612A9-CB90-4D7E-B394-1DB7F6509B29

The ID of the request.

PageNumber Integer 1

The number of the returned page.

TotalCount Integer 1

The number of entries returned.

CustomerGateways Array of CustomerGateway

The list of customer gateways.

CustomerGateway
IpAddress String 139.32.XX.XX

The public IP address of the gateway device in the data center.

Asn Long 65530

The autonomous system number (ASN) of the gateway device in the data center.

Description String desctest

The description of the customer gateway.

CustomerGatewayId String cgw-bp1pvpl9r9adju6l5****

The ID of the customer gateway.

CreateTime Long 1492747187000

The timestamp generated when the customer gateway was created. Unit: milliseconds.

This value is a UNIX timestamp representing the number of milliseconds that have elapsed since the epoch time January 1, 1970, 00:00:00 UTC.

Name String nametest

The name of the customer gateway.

AuthKey String AuthKey****

The authentication key of the BGP routing protocol for the gateway device in the data center.

Tags Array of Tag

The list of tags added to the customer gateway.

Tag
Key String TagKey

The tag key.

Value String TagValue

The tag value.

Examples

Sample requests

http(s)://[Endpoint]/?Action=DescribeCustomerGateways
&RegionId=cn-shanghai
&CustomerGatewayId=cgw-bp1pvpl9r9adju6l5****
&PageNumber=1
&PageSize=10
&Tag=[{"Key":"TagKey","Value":"TagValue"}]
&Common request parameters

Sample success responses

XML format

HTTP/1.1 200 OK
Content-Type:application/xml

<DescribeCustomerGatewaysResponse>
    <PageSize>10</PageSize>
    <RequestId>E82612A9-CB90-4D7E-B394-1DB7F6509B29</RequestId>
    <PageNumber>1</PageNumber>
    <TotalCount>1</TotalCount>
    <CustomerGateways>
        <IpAddress>139.32.XX.XX</IpAddress>
        <Asn>65530</Asn>
        <Description>desctest</Description>
        <CustomerGatewayId>cgw-bp1pvpl9r9adju6l5****</CustomerGatewayId>
        <CreateTime>1492747187000</CreateTime>
        <Name>nametest</Name>
        <AuthKey>AuthKey****</AuthKey>
        <Tags>
            <Key>TagKey</Key>
            <Value>TagValue</Value>
        </Tags>
    </CustomerGateways>
</DescribeCustomerGatewaysResponse>

JSON format

HTTP/1.1 200 OK
Content-Type:application/json

{
  "PageSize" : 10,
  "RequestId" : "E82612A9-CB90-4D7E-B394-1DB7F6509B29",
  "PageNumber" : 1,
  "TotalCount" : 1,
  "CustomerGateways" : [ {
    "IpAddress" : "139.32.XX.XX",
    "Asn" : 65530,
    "Description" : "desctest",
    "CustomerGatewayId" : "cgw-bp1pvpl9r9adju6l5****",
    "CreateTime" : 1492747187000,
    "Name" : "nametest",
    "AuthKey" : "AuthKey****",
    "Tags" : [ {
      "Key" : "TagKey",
      "Value" : "TagValue"
    } ]
  } ]
}

Error codes

HttpCode Error code Error message Description
400 Forbidden.TagKey.Duplicated The specified tag key already exists. The error message returned because the tag key already exists.
400 SizeLimitExceeded.TagNum The maximum number of tags is exceeded. The error message returned because the number of tags exceeds 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. The error message returned because you are unauthorized to perform this operation on the specified resource. Acquire the required permissions and try again.
403 Forbidden User not authorized to operate on the specified resource. The error message returned because you do not have permissions to perform the operation on the specified resource. Acquire the required permissions and try again.

For a list of error codes, see Service error codes.