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. Default value: 10. Valid values: 1 to 50.

Response parameters

Parameter Type Example Description
CustomerGateways Array of CustomerGateway

The list of customer gateways.

CustomerGateway
CustomerGatewayId String cgw-bp1pvpl9r9adju6l5****

The ID of the customer gateway.

Name String nametest

The name of the customer gateway.

Description String desctest

The description of the customer gateway.

IpAddress String 139.XX.XX.32

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

CreateTime Long 1492747187000

The timestamp generated when the customer gateway was created.

Asn Long 65530

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

AuthKey String AuthKey****

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

TotalCount Integer 1

The total number of entries returned.

PageNumber Integer 1

The page number of the returned page.

PageSize Integer 10

The number of entries returned per page.

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

The ID of the request.

Examples

Sample requests

http(s)://[Endpoint]/?Action=DescribeCustomerGateways
&RegionId=cn-shanghai
&<Common request parameters>

Sample success responses

XML format

<DescribeCustomerGatewaysResponse>
  <PageNumber>1</PageNumber>
  <TotalCount>1</TotalCount>
  <PageSize>10</PageSize>
  <RequestId>E82612A9-CB90-4D7E-B394-1DB7F6509B29</RequestId>
  <CustomerGateways>
        <CustomerGateway>
              <Name>nametest</Name>
              <CustomerGatewayId>cgw-bp1pvpl9r9adju6l5****</CustomerGatewayId>
              <CreateTime>1492747187000</CreateTime>
              <AuthKey>AuthKey****</AuthKey>
              <IpAddress>139.XX.XX.32</IpAddress>
              <Asn>65530</Asn>
        </CustomerGateway>
  </CustomerGateways>
</DescribeCustomerGatewaysResponse>

JSON format

{
    "PageNumber": 1,
    "TotalCount": 1,
    "PageSize": 10,
    "RequestId": "E82612A9-CB90-4D7E-B394-1DB7F6509B29",
    "CustomerGateways": {
        "CustomerGateway": [
            {
                "Name": "nametest",
                "CustomerGatewayId": "cgw-bp1pvpl9r9adju6l5****",
                "CreateTime": 1492747187000,
                "AuthKey": "AuthKey****",
                "IpAddress": "139.XX.XX.32",
                "Asn": 65530
            }
        ]
    }
}

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. You can 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. To acquire the required permissions, submit a ticket.

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