Modifies the configuration of a customer gateway by calling the ModifyCustomerGatewayAttribute operation.
Operation description
-
When you call the ModifyCustomerGatewayAttribute operation, if the AuthKey parameter is not empty, this operation is asynchronous. The system returns the customer gateway information first, but the configuration has not been modified yet because the modification task is still running in the background. You can call DescribeVpnGateway to query the modification status of the customer gateway configuration:
If the VPN gateway instance is in the updating state, the customer gateway configuration is being modified.
If the VPN gateway instance is in the active state, the customer gateway configuration has been modified.
-
When you call the ModifyCustomerGatewayAttribute operation, if the AuthKey parameter is empty, this operation is synchronous.
-
The ModifyCustomerGatewayAttribute operation does not support concurrent modifications to the configuration of the same customer gateway.
Try it now
Test
RAM authorization
|
Action |
Access level |
Resource type |
Condition key |
Dependent action |
|
vpc:ModifyCustomerGatewayAttribute |
update |
*CustomerGateway
|
None | None |
Request parameters
|
Parameter |
Type |
Required |
Description |
Example |
| RegionId |
string |
Yes |
The region ID of the customer gateway. You can call the DescribeRegions operation to query region IDs. |
cn-shanghai |
| ClientToken |
string |
No |
The client token that is used to ensure the idempotence of the request. You can use the client to generate the token, but you must make sure that the token is unique among different requests. The ClientToken value can contain only ASCII characters. Note
If you do not specify this parameter, the system automatically uses the RequestId of the API request as the ClientToken. The RequestId may differ for each API request. |
02fb3da4-130e-11e9-8e44**** |
| CustomerGatewayId |
string |
Yes |
The instance ID of the customer gateway. |
cgw-bp1pvpl9r9adju6l5**** |
| Name |
string |
No |
The name of the customer gateway. The name must be 1 to 100 characters in length and cannot start with |
nametest |
| Description |
string |
No |
The description of the customer gateway. The description must be 1 to 100 characters in length and cannot start with |
desctest |
| AuthKey |
string |
No |
The authentication key of the BGP route routing protocol for the on-premises data center gateway device. The key must be 1 to 64 characters in length and can contain only ASCII characters. It cannot contain spaces, Chinese characters, or half-width question marks (?). |
AuthKey**** |
Response elements
|
Element |
Type |
Description |
Example |
|
object |
The response parameters. |
||
| RequestId |
string |
The request ID. |
8AA5CE21-2E6A-4530-BDF5-F055849476E6 |
| IpAddress |
string |
The public IP address of the on-premises data center gateway device. |
139.32.XX.XX |
| Description |
string |
The description of the customer gateway. |
desctest |
| CustomerGatewayId |
string |
The instance ID of the customer gateway. |
cgw-bp1pvpl9r9adju6l5**** |
| CreateTime |
integer |
The timestamp when the customer gateway was created. |
1492747187000 |
| Name |
string |
The name of the customer gateway. |
nametest |
| ResourceGroupId |
string |
The ID of the resource group to which the customer gateway belongs. You can call the ListResourceGroups operation to query resource group information. |
rg-acfmzs372yg**** |
Examples
Success response
JSON format
{
"RequestId": "8AA5CE21-2E6A-4530-BDF5-F055849476E6",
"IpAddress": "139.32.XX.XX",
"Description": "desctest",
"CustomerGatewayId": "cgw-bp1pvpl9r9adju6l5****",
"CreateTime": 1492747187000,
"Name": "nametest",
"ResourceGroupId": "rg-acfmzs372yg****"
}
Error codes
|
HTTP status code |
Error code |
Error message |
Description |
|---|---|---|---|
| 400 | InvalidName | The name is not valid | |
| 400 | InvalidDescription | The description is not valid | |
| 400 | OperationDenied.MissingAsn | The autonomous system number of the customer gateway is mandatory when BGP authentication key is specified. | The autonomous system number of the customer gateway is mandatory when BGP authentication key is specified. |
| 400 | InvalidAuthkey.Malformed | The specified BGP authentication key (%s) is malformed. | The BGP authentication key is invalid. |
| 400 | OperationDenied.VpnFinancialLocked | The associated VPN gateway is financially locked. You cannot update the attributes of the customer gateway. | The associated VPN gateway is financially locked. You cannot update the attributes of the customer gateway. |
| 400 | OperationDenied.VpnConfiguring | The associated VPN gateway is being configured. You cannot update the attributes of the customer gateway. | The associated VPN gateway is being configured. You cannot update the attributes of the customer gateway. |
| 403 | Forbbiden.SubUser | User not authorized to operate on the specified resource as your account is created by another user. | |
| 403 | Forbidden | User not authorized to operate on the specified resource. | You do not have the permissions to manage the specified resource. Apply for the permissions and try again. |
| 404 | InvalidCustomerGatewayInstanceId.NotFound | The specified customer gateway instance id does not exist. | The specified customer gateway does not exist. Check whether the ID of the customer gateway is correct. |
See Error Codes for a complete list.
Release notes
See Release Notes for a complete list.