Note:
This is a legacy API which has been hidden and will no longer be updated. We recommend using the new VPC API 3.0 which is standardized and faster.
This API (AddUserGw) is used to create customer gateway.
Domain for API request: vpc.api.qcloud.com
The following request parameter list only provides API request parameters. Common request parameters need to be added when the API is called. For more information, refer to Common Request Parameters. The Action field for this API is AddUserGw.
Parameter Name | Required | Type | Description |
---|---|---|---|
userGwName | Yes | String | Customer gateway name, up to 60 characters, must be unique under the same developer account. |
userGwAddr | Yes | String | Public IP of the customer gateway. For example: 183.30.0.1. |
Parameter Name | Type | Description |
---|---|---|
code | Int | Error code, 0: Succeeded, other values: Failed. |
message | String | Error message. |
userGwId | String | Customer gateway ID assigned by the system. For example: cgw-e098slul |
The following list only provides the business logic error codes for this API. For additional common error codes, refer to VPC Error Codes.
Error code | Description |
---|---|
InvalidUserGwName | Invalid customer gateway name. It should be within 60 characters. |
InvalidUserGw.InUse | Customer gateway public IP already in use. The customer gateway public IP must be unique under the same account. |
UserGwLimitExceeded | Reached the upper limit of requested customer gateways for the specific region. Please contact customer service for more resources. For more information, see VPC Service Limits. |
Input
https://domain/v2/index.php?Action=AddUserGw &<Common request parameters> &userGwName=ddtest &userGwAddr=183.30.0.1
Output
{
"code" : 0,
"message" : "ok",
"userGwId" : "cgw-e098slul"
}
Was this page helpful?