Modifies the name and description of a customer 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 ModifyCustomerGatewayAttribute

The name of this action. Value:

ModifyCustomerGatewayAttribute

CustomerGatewayId String Yes vpn-bp1q8bgx4xnkm2ogj0fiu

The ID of the region to which the customer gateway belongs.

RegionId String Yes cn-shanghai

The region to which the customer gateway belongs.

To query the region ID, call DescribeRegions.

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 test

The description of the customer gateway.

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

Name String No test

The name of the customer gateway.

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

Response parameters

Parameter Type Example value Description
CustomerGatewayId String cgw-bp1pvpl9r9adju6l5nxck

The ID of the customer gateway.

Name String test

The name of the customer gateway.

Description String test

The description of the customer gateway.

IpAddress String 139.196.32.167

The IP address of the customer gateway.

CreateTime Long 1492747187000

The time at which the customer gatway was created.

RequestId String E61293C8-AF07-4E87-A272-542680038F93

The ID of the request.

Examples

Request example


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

    <ModifyCustomerGatewayAttributeResponse>
      <CustomerGatewayId>cgw-bp1pvpl9r9adju6l5nxck</CustomerGatewayId>
      <RequestId>E61293C8-AF07-4E87-A272-542680038F93</RequestId>
      <CreateTime>1492747187000</CreateTime>
      <IpAddress>139.196.32.167</IpAddress>
    </ModifyCustomerGatewayAttributeResponse>
    
  • JSON format

    {
    	"CustomerGatewayId":"cgw-bp1pvpl9r9adju6l5nxck",
    	"CreateTime":1492747187000,
    	"RequestId":"8AA5CE21-2E6A-4530-BDF5-F055849476E6",
    	"IpAddress":"139.196.32.167"
    }

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. Please apply for the permission and try again.
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 InvalidCustomerGatewayInstanceId.NotFound The specified customer gateway instance id does not exist. The specified instance 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