建立使用者網關。

請求參數

名稱 類型 是否必須 描述
Action String

要執行的操作。 取值:

CreateCustomerGateway

RegionId String

使用者網關所在的地域。

您可以通過調用 DescribeRegions介面獲取地域ID。

IpAddress String

使用者網關的IP地址。

Name String

使用者網關的名稱。

長度為 2-128個字元,必須以字母或中文開頭,可包含數字,點號(.),底線(_)和短橫線(-)。但不能以http://https://開頭。

Description String

使用者網關的描述資訊。

長度為 2-256個字元,必須以字母或中文開頭,但不能以http://https://開頭。

返回參數

名稱 類型 描述
RequestId String 請求ID。
CustomerGatewayId String 使用者網關的ID。
IpAddress String 使用者網關的IP地址。
Name String 使用者網關的名稱。
Description String 使用者網關的描述資訊。
CreateTime Long 使用者網關的建立時間。

樣本

請求樣本

https://vpc.aliyuncs.com/?Action=CreateCustomerGateway
&RegionID=cn-beijing
&IpAddress=100.1.1.2
&<公共請求參數>
返回樣本
  • XML格式

    <?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格式

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