Queries details of specified 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 ID of the region where the customer gateway is deployed.

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.

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 page 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 static 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.

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.

Examples

Sample requests

http(s)://[Endpoint]/?Action=DescribeCustomerGateways
&RegionId=cn-shanghai
&<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>
    </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****"
  } ]
}

Error codes

HttpCode Error code Error message Description
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. Apply for the required permissions and try again.
403 Forbidden User not authorized to operate on the specified resource. The error message returned because you are unauthorized to perform this operation on the specified resource. Apply for the required permissions and try again.

For a list of error codes, visit the API Error Center.