Modify VPN Gateway

Last updated: 2017-08-10 15:08:11

1. API Description

This API (ModifyVpnGw) is used to modify the attributes of VPN gateway.
Domain for API request: vpc.api.qcloud.com

2. Input Parameters

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.

Parameter Name Required Type Description
vpcId Yes String VPC ID, which can be vpcId or unVpcId. unVpcId is recommended. For example: vpc-amhnnao5. You can query this through API DescribeVpcEx.
vpnGwId Yes String VPN gateway ID to be modified, which can be vpnGwId or unVpnGwId. unVpnGwId is recommended. For example: vpngw-dystbrkv. It can be queried via the API DescribeVpnGw.
vpnGwName No String The new gateway name. It can contain up to 60 characters.
isAutoRenewals No Int Indicate whether auto renewal is enabled. 0 indicates that the instance is not automatically renewed; 1 indicates that the instance is automatically renewed.

3. Output Parameters

Parameter Name Type Description
code Int Error code, 0: Succeeded, other values: Failed.
message String Error message.

4. Error Codes

The following error code list only provides the business logic error codes for this API. For additional common error codes, refer to VPC Error Codes.

Error code Description
InvalidVpc.NotFound Invalid VPC. VPC resource does not exist. Please verify that the resource information you entered is correct. You can query the VPC via the API DescribeVpcEx.
InvalidVpnGw.NotFound Invalid VPN gateway. VPN gateway resource does not exist. Please verify that the resource information you entered is correct. You can query the VPN gateway via the API DescribeVpnGw.
InvalidVpnGwState Invalid VPN gateway status
InvalidVpnGwName Invalid VPN gateway name. It can contain up to 60 characters.

5. Example

Input

  https://vpc.api.qcloud.com/v2/index.php?Action=ModifyVpnGw
  &<Common request parameters>
  &vpcId=vpc-amhnnao5
  &vpnGwId=vpngw-dystbrkv
  &vpnGwName=test-9910
  &isAutoRenewals=0

Output


{
    "code": 0,
    "message": ""
}