Create a customer gateway.

Request parameters

Name Type Required Description
Action String Yes

The action to perform. Valid value:

CreateCustomerGateway

RegionId String Yes

The region of the customer gateway.

You can obtain the region ID by calling the DescribeRegions API.

IpAddress  String Yes

The IP address of the customer gateway.

Name String No

The name of the customer gateway.

The name can contain from 2 to 128 characters including a-z, A-Z, 0-9, underlines, and hyphens. The name must start with an English letter, but cannot start with http://  or https://.

Description String No

The description of the customer gateway.

The description can contain from 2 to 256 characters. The description must start with English letters, but cannot start with http:// or https://.

Response parameters

Name Type Description
RequestId String The ID of the request.
CustomerGatewayId String The ID of the customer gateway.
IpAddress String The IP address of the customer gateway.
Name String The name of the customer gateway.
Description String The description of the customer gateway.
CreateTime Long The time when the customer gateway was created.

Examples

Request example

https://vpc.aliyuncs.com/?Action=CreateCustomerGateway
&RegionID=cn-beijing
&IpAddress=100.1.1.2
&<CommonParameters>
Response example
  • XML format

    <? xml version="1.0" encoding="UTF-8" ? >
    <CreateCustomerGatewayResponse>
        <CustomerGatewayId>cgw-bp1aw0a5nfff03xp1pcqc</CustomerGatewayId>
        <RequestId>185E81B1-3916-4667-B48F-C52409B33F2B</RequestId>
        <CreateTime>1493363486000</CreateTime>
        <IpAddress>100.1.1.2</IpAddress>
    </CreateCustomerGatewayResponse>
    
  • JSON format

    {
        "CustomerGatewayId":"cgw-bp1jrawp82av6bws9h2ut",
        "CreateTime":1493363599000,
        "RequestId":"D32B3C26-6C6C-4988-93E9-D2A6444CE6AE",
        "IpAddress":"100.1.1.2"
    }