Queries customer gateways.

Debug

By using API Explorer, you can easily debug APIs, automatically generate SDK code examples, and quickly search for APIs.

Request parameters

Parameter Type Required? Example value Description
Action String Yes DescribeCustomerGateways

The name of this action. Value:

DescribeCustomerGateways

RegionId String Yes cn-shanghai

The ID of the region to which the customer gateway belongs.

To query the region ID, call DescribeRegions.

CustomerGatewayId String No vpn-bp1q8bgx4xnkm2ogj0fiu

The ID of the customer gateway.

PageNumber Integer No 1

The number of pages to return. Default value: 1.

PageSize Integer No 10

The number of rows per page. Maximum value: 50. Default value: 10.

Response parameters

Parameter Type Example value Description
CustomerGateways N/A N/A

A list of customer gateways.

 └CustomerGatewayId String cgw-bp1pvpl9r9adju6l5nxck

The ID of the customer gateway.

 └Name String test

The name of the customer gateway.

 └Description String test

The description of the customer gateway.

 └IpAddress String 139.196.32.xxx

The IP address of the customer gateway.

 └CreateTime Long 1492747187000

The time at which the customer gateway was created.

TotalCount Integer 1

The number of queried entries.

PageNumber Integer 1

The current page number.

PageSize Integer 10

The number of entries per page.

RequestId String 5BE01CD7-5A50-472D-AC14-CA181C5C03BE

The ID of the request.

Examples

Request example


https://vpc.aliyuncs.com/?Action=DescribeCustomerGateways
&RegionId=cn-shanghai
&<CommonParameters>
Response example
  • XML format

    <DescribeCustomerGatewaysResponse>
      <PageNumber>1</PageNumber>
      <TotalCount>1</TotalCount>
      <PageSize>10</PageSize>
      <RequestId>5BE01CD7-5A50-472D-AC14-CA181C5C03BE</RequestId>
      <CustomerGateways>
        <CustomerGateway>
          <Name>test</Name>
          <CustomerGatewayId>cgw-bp1pvpl9r9adju6l5nxck</CustomerGatewayId>
          <CreateTime>1492747187000</CreateTime>
          <IpAddress>139.196.32.xxx</IpAddress>
        </CustomerGateway>
      </CustomerGateways>
    </DescribeCustomerGatewaysResponse>
    
  • JSON format

    {
    	"PageNumber":1,
    	"TotalCount":1,
    	"PageSize":10,
    	"RequestId":"E82612A9-CB90-4D7E-B394-1DB7F6509B29",
    	"CustomerGateways":{
    		"CustomerGateway":[
    			{
    				"CustomerGatewayId":"cgw-bp1pvpl9r9adju6l5nxck",
    				"Name":"test",
    				"CreateTime":1492747187000,
    				"IpAddress":"139.196.32.xxx"
    			}
    		]
    	}
    }

Error codes

HTTP status code 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. You are not authorized to operate on this resource. Please apply for the permission and try again.
403 Forbidden User not authorized to operate on the specified resource. You are not authorized to operate on this resource. For more information, open a ticket.

See common error codes