You can call this operation to modify the name and description of a VPN gateway.
Debugging
Request parameters
Parameter | Type | Required | Example | Description |
---|---|---|---|---|
Action | String | Yes | ModifyVpnGatewayAttribute |
The operation that you want to perform. Set the value to ModifyVpnGatewayAttribute. |
RegionId | String | Yes | cn-shanghai |
The region ID of the VPN gateway. You can call the DescribeRegions operation to query the region ID. |
VpnGatewayId | String | Yes | vpn-bp1q8bgx4xnkm2ogj**** |
The ID of the VPN gateway. |
ClientToken | String | No | 02fb3da4-130e-11e9-8e44-0016e04115b |
The client token that is used to ensure the idempotence of the request. The value of this parameter is generated by a client. The value must be unique among different requests and must be 1 to 64 ASCII characters in length. |
Name | String | No | myvpn |
The name of the VPN gateway. The name must be 2 to 128 characters in length and start with a letter or Chinese
character. It can contain letters, Chinese characters, digits, periods (.), underscores
(_), and hyphens (-). The name cannot start with |
Description | String | No | VPN gateway |
The description of the VPN gateway. The description must be 2 to 256 characters in length and start with a letter or Chinese
character. It cannot start with |
AutoPropagate | Boolean | No | true |
Specifies whether to automatically propagate BGP routes to the VPC. Valid values:
|
Response parameters
Parameter | Type | Example | Description |
---|---|---|---|
VpnGatewayId | String | vpn-bp1q8bgx4xnkm2ogj**** |
The ID of the VPN gateway. |
VpcId | String | vpc-bp1ub1yt9cvakoel**** |
The ID of the VPC to which the VPN gateway belongs. |
VSwitchId | String | vsw-bp1y9ovl1cu9ou4tv**** |
The ID of the VSwitch to which the VPN gateway belongs. |
InternetIp | String | 116.62.69.xxx |
The public IP address of the VPN gateway. |
CreateTime | Long | 1492753580000 |
The time when the VPN gateway was created. |
EndTime | Long | 1495382400000 |
The time when the VPN gateway expires. |
Spec | String | 5M |
The specification of the VPN gateway. |
Name | String | test |
The name of the VPN gateway. |
Description | String | test |
The description of the VPN gateway. |
Status | String | active |
The status of the VPN gateway. |
BusinessStatus | String | Normal |
The payment status of the VPN gateway. |
AutoPropagate | Boolean | true |
Indicates whether BGP routes are automatically propagated to the VPC.
|
EnableBgp | Boolean | true |
The BGP status of the VPN gateway.
|
IntranetIp | String | 172.16.104.xxx |
The private IP address of the VPN gateway. |
RequestId | String | 54B48E3D-DF70-471B-AA93-08E683A1B457 |
The ID of the request. |
Examples
Sample requests
https://vpc.aliyuncs.com/?Action=ModifyVpnGatewayAttribute
&RegionId=cn-shanghai
&VpnGatewayId=vpn-bp1q8bgx4xnkm2ogj****
&<Common request parameter>
Sample success response
XML
format
<ModifyVpnGatewayAttributeResponse>
<EnableBgp>true</EnableBgp>
<RequestId>CA5C51BD-EF81-44FF-8311-5AC81ADECC9D</RequestId>
<EndTime>1592236800000</EndTime>
<VSwitchId>vsw-gw8m2k04wt3onzehf****</VSwitchId>
<CreateTime>1589526435000</CreateTime>
<AutoPropagate>true</AutoPropagate>
<IntranetIp>10.0.0.251</IntranetIp>
<Name>VPN11</Name>
<VpcId>vpc-gw82wgx7a8fakx4co****</VpcId>
<InternetIp>8.xx.xx.192</InternetIp>
<VpnGatewayId>vpn-gw8bvv722zwjht7ia****</VpnGatewayId>
<Spec>5M</Spec>
</ModifyVpnGatewayAttributeResponse>
JSON
format
{
"EnableBgp": true,
"RequestId": "CA5C51BD-EF81-44FF-8311-5AC81ADECC9D",
"EndTime": 1592236800000,
"VSwitchId": "vsw-gw8m2k04wt3onzehf****",
"CreateTime": 1589526435000,
"AutoPropagate": true,
"IntranetIp": "10.0.0.251",
"Name": "VPN11",
"VpcId": "vpc-gw82wgx7a8fakx4co****",
"InternetIp": "8.xx.xx.192",
"VpnGatewayId": "vpn-gw8bvv722zwjht7ia****",
"Spec": "5M"
}
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. | The error message returned because you are not authorized to perform this operation on the specified resource. You can apply for the permission and try again. |
403 | Forbidden | User not authorized to operate on the specified resource. | The error message returned because you are not authorized to perform this operation on the specified resource. To require the permission, submit a ticket. |
404 | InvalidVpnGatewayInstanceId.NotFound | The specified vpn gateway instance id does not exist. | The error message returned because the specified VPN connection does not exist. You can check whether the configuration of the VPN connection is valid. |
400 | InvalidName | The name is not valid | The error message returned because the format of the specified name parameter is invalid. |
400 | InvalidDescription | The description is not valid | The error message returned because the format of the specified description parameter is invalid. |
For a list of error codes, visit the API Error Center.