调用ModifyCustomerGatewayAttribute接口修改用户网关的配置。
接口说明
-
调用 ModifyCustomerGatewayAttribute 接口时,如果参数 AuthKey 不为空时,该接口为异步接口,即系统先返回用户网关的信息,但该用户网关的配置尚未修改成功,系统后台的修改任务仍在进行。您可以调用 DescribeVpnGateway 查询用户网关的配置的修改状态:
当 VPN 网关实例处于 updating 状态时,表示用户网关的配置正在修改中。
当 VPN 网关实例处于 active 状态时,表示用户网关的配置修改成功。
-
调用 ModifyCustomerGatewayAttribute 接口时,如果参数 AuthKey 为空时,该接口为同步接口。
-
ModifyCustomerGatewayAttribute 接口不支持并发修改同一个用户网关的配置。
调试
您可以在OpenAPI Explorer中直接运行该接口,免去您计算签名的困扰。运行成功后,OpenAPI Explorer可以自动生成SDK代码示例。
调试
授权信息
|
操作 |
访问级别 |
资源类型 |
条件关键字 |
关联操作 |
|
vpc:ModifyCustomerGatewayAttribute |
update |
*CustomerGateway
|
无 | 无 |
请求参数
|
名称 |
类型 |
必填 |
描述 |
示例值 |
| RegionId |
string |
是 |
用户网关所属的地域 ID。 您可以通过调用 DescribeRegions 接口获取地域 ID。 |
cn-shanghai |
| ClientToken |
string |
否 |
客户端 Token,用于保证请求的幂等性。 从您的客户端生成一个参数值,确保不同请求间该参数值唯一。ClientToken 只支持 ASCII 字符。 说明
若您未指定,则系统自动使用 API 请求的 RequestId 作为 ClientToken 标识。每次 API 请求的 RequestId 可能不一样。 |
02fb3da4-130e-11e9-8e44**** |
| CustomerGatewayId |
string |
是 |
用户网关的实例 ID。 |
cgw-bp1pvpl9r9adju6l5**** |
| Name |
string |
否 |
用户网关的名称。 名称长度为 1~100 个字符,不能以 |
nametest |
| Description |
string |
否 |
用户网关的描述信息。 描述信息长度为 1~100 个字符,不能以 |
desctest |
| AuthKey |
string |
否 |
本地数据中心网关设备 BGP 路由协议的认证密钥。 密钥长度为 1~64 个字符,只支持 ASCII 字符,不支持空格、中文和半角问号(?)。 |
AuthKey**** |
返回参数
|
名称 |
类型 |
描述 |
示例值 |
|
object |
返回结果。 |
||
| RequestId |
string |
请求 ID。 |
8AA5CE21-2E6A-4530-BDF5-F055849476E6 |
| IpAddress |
string |
本地数据中心网关设备的公网 IP 地址。 |
139.32.XX.XX |
| Description |
string |
用户网关的描述信息。 |
desctest |
| CustomerGatewayId |
string |
用户网关的实例 ID。 |
cgw-bp1pvpl9r9adju6l5**** |
| CreateTime |
integer |
创建用户网关的时间戳。 |
1492747187000 |
| Name |
string |
用户网关的名称。 |
nametest |
| ResourceGroupId |
string |
用户网关所属的资源组 ID。 您可以调用 ListResourceGroups 接口查询资源组信息。 |
rg-acfmzs372yg**** |
示例
正常返回示例
JSON格式
{
"RequestId": "8AA5CE21-2E6A-4530-BDF5-F055849476E6",
"IpAddress": "139.32.XX.XX",
"Description": "desctest",
"CustomerGatewayId": "cgw-bp1pvpl9r9adju6l5****",
"CreateTime": 1492747187000,
"Name": "nametest",
"ResourceGroupId": "rg-acfmzs372yg****"
}
错误码
|
HTTP status code |
错误码 |
错误信息 |
描述 |
|---|---|---|---|
| 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. | 当指定了用户网关的BGP验证密钥时,必须指定自治系统号。 |
| 400 | InvalidAuthkey.Malformed | The specified BGP authentication key (%s) is malformed. | 该BGP认证密钥不合法。 |
| 400 | OperationDenied.VpnFinancialLocked | The associated VPN gateway is financially locked. You cannot update the attributes of the customer gateway. | 关联的VPN网关已经欠费锁定,无法修改用户网关的相关配置。 |
| 400 | OperationDenied.VpnConfiguring | The associated VPN gateway is being configured. You cannot update the attributes of the customer gateway. | 关联的VPN网关正在配置中,无法修改用户网关的相关配置。 |
| 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. | 您没有权限操作指定资源,请申请权限后再操作。 |
| 404 | InvalidCustomerGatewayInstanceId.NotFound | The specified customer gateway instance id does not exist. | 指定的用户网关实例不存在,请您检查用户网关实例ID是否正确。 |
访问错误中心查看更多错误码。
变更历史
更多信息,参考变更详情。