Modifies the name and description of a VPN Gateway.

Debug

By using API Explorer, you can easily debug APIs, automatically generate SDK code examples, and quickly search for APIs.

Request parameters

Parameter Type Required? Example value Description
Action String Yes ModifyVpnGatewayAttribute

The name of this action. Value:

ModifyVpnGatewayAttribute

RegionId String Yes cn-shanghai The ID of the region to which the VPN Gateway belongs.

To query the region ID, call DescribeRegions.

VpnGatewayId String Yes vpn-bp1q8bgx4xnkm2ogj0fiu

The ID of the VPN Gateway.

ClientToken String No 02fb3da4-130e-11e9-8e44-0016e04115b

A client token used to guarantee the idempotence of requests. 

This parameter value is generated by the client and must be unique. It must be 1 to 64 ASCII characters in length.

Description String No vpn Gateway

The description of the VPN Gateway.

The description must be 2 to 256 characters in length. It must start with a letter, but cannot start with http:// or https://.

Name String No myvpn

The name of the VPN Gateway.

The name must be between 2 and 128 characters in length. It can contain letters, numbers, periods (.), underscores (_), or hyphens (-). The name must start with a letter. It cannot start with http:// or https://.

Response parameters

Parameter Type Example value Description
VpnGatewayId String vpn-bp1q8bgx4xnkm2ogj0fiu

The ID of the VPN Gateway.

VpcId String vpc-bp1ub1yt9cvakoelj1y9

The ID of the VPC to which the VPN Gateway belongs.

VSwitchId String vsw-bp1y9ovl1cu9ou4tvma0l

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 at which the VPN Gateway was created.

EndTime Long 1495382400000

The time at which the VPN Gateway is to expire.

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 business status of the VPN Gateway.

IntranetIp String 172.16.104.xxx

The public IP address of the VPN Gateway.

RequestId String 54B48E3D-DF70-471B-AA93-08E683A1B457

The ID of the request.

Examples

Request example


https://vpc.aliyuncs.com/?Action=ModifyVpnGatewayAttribute
&RegionId=cn-shanghai
&VpnGatewayId=vpn-bp1q8bgx4xnkm2ogj0fiu
&<CommonParameters>
Response example
  • XML format

    <ModifyVpnGatewayAttributeResponse>
      <Name>aaa</Name>
      <Status>active</Status>
      <VpnGatewayId>vpn-bp1q8bgx4xnkm2ogj0fiu</VpnGatewayId>
      <BusinessStatus>Normal</BusinessStatus>
      <Spec>5M</Spec>
      <CreateTime>1492753580000</CreateTime>
      <IntranetIp>172.16.104.xxx</IntranetIp>
      <RequestId>54B48E3D-DF70-471B-AA93-08E683A1B457</RequestId>
      <InternetIp>116.62.69.xxx</InternetIp>
      <EndTime>1495382400000</EndTime>
      <VSwitchId>vsw-bp1y9ovl1cu9ou4tvma0l</VSwitchId>
      <VpcId>vpc-bp1ub1yt9cvakoelj1y9c</VpcId>
    </ModifyVpnGatewayAttributeResponse>
    
  • JSON format

    {
    	"Name":"aaa",
    	"Status":"active",
    	"VpnGatewayId":"vpn-bp1q8bgx4xnkm2ogj0fiu",
    	"Spec":"5M",
    	"BusinessStatus":"Normal",
    	"RequestId":"BA56EAF8-E3A9-4BE6-8511-8F03512153E2",
    	"IntranetIp":"172.16.104.xxx",
    	"CreateTime":1492753580000,
    	"InternetIp":"116.62.69.xxx",
    	"EndTime":1495382400000,
    	"VSwitchId":"vsw-bp1y9ovl1cu9ou4tvma0l",
    	"VpcId":"vpc-bp1ub1yt9cvakoelj1y9c"
    }

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. You are not authorized to operate on this resource.
403 Forbidden User not authorized to operate on the specified resource. You are not authorized to operate on this resource. For more information, open a ticket.
404 InvalidVpnGatewayInstanceId.NotFound The specified vpn gateway instance id does not exist. The specified VPN Gateway does not exist.
400 InvalidName The name is not valid The name format is invalid.
400 InvalidDescription The description is not valid The description format is invalid.

See common error codes