文档

ModifyCustomerGatewayAttribute - 修改用户网关的名称和描述信息

更新时间:

调用ModifyCustomerGatewayAttribute接口修改用户网关的配置。

接口说明

  • 调用 ModifyCustomerGatewayAttribute 接口时,如果参数 AuthKey 不为空时,该接口为异步接口,即系统先返回用户网关的信息,但该用户网关的配置尚未修改成功,系统后台的修改任务仍在进行。您可以调用 DescribeVpnGateway 查询用户网关的配置的修改状态:

    • 当 VPN 网关实例处于 updating 状态时,表示用户网关的配置正在修改中。
    • 当 VPN 网关实例处于 active 状态时,表示用户网关的配置修改成功。
  • 调用 ModifyCustomerGatewayAttribute 接口时,如果参数 AuthKey 为空时,该接口为同步接口。

  • ModifyCustomerGatewayAttribute 接口不支持并发修改同一个用户网关的配置。

调试

您可以在OpenAPI Explorer中直接运行该接口,免去您计算签名的困扰。运行成功后,OpenAPI Explorer可以自动生成SDK代码示例。

授权信息

当前API暂无授权信息透出。

请求参数

名称类型必填描述示例值
RegionIdstring

用户网关所属的地域 ID。

您可以通过调用 DescribeRegions 接口获取地域 ID。

cn-shanghai
ClientTokenstring

客户端 Token,用于保证请求的幂等性。

从您的客户端生成一个参数值,确保不同请求间该参数值唯一。ClientToken 只支持 ASCII 字符。

说明 若您未指定,则系统自动使用 API 请求的 RequestId 作为 ClientToken 标识。每次 API 请求的 RequestId 可能不一样。
02fb3da4-130e-11e9-8e44****
CustomerGatewayIdstring

用户网关的实例 ID。

cgw-bp1pvpl9r9adju6l5****
Namestring

用户网关的名称。

名称长度为 1~100 个字符,不能以http://https://开头。

nametest
Descriptionstring

用户网关的描述信息。

描述信息长度为 1~100 个字符,不能以http://https://开头。

desctest
AuthKeystring

本地数据中心网关设备 BGP 路由协议的认证密钥。

密钥长度为 1~64 个字符,只支持 ASCII 字符,不支持空格、中文和半角问号(?)。

AuthKey****

返回参数

名称类型描述示例值
object

返回结果。

RequestIdstring

请求 ID。

8AA5CE21-2E6A-4530-BDF5-F055849476E6
IpAddressstring

本地数据中心网关设备的公网 IP 地址。

139.32.XX.XX
Descriptionstring

用户网关的描述信息。

desctest
CustomerGatewayIdstring

用户网关的实例 ID。

cgw-bp1pvpl9r9adju6l5****
CreateTimelong

创建用户网关的时间戳。

1492747187000
Namestring

用户网关的名称。

nametest
ResourceGroupIdstring

用户网关所属的资源组 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错误码错误信息描述
400InvalidNameThe name is not valid该名称格式不合法。
400InvalidDescriptionThe description is not valid描述格式不合法。
400OperationDenied.MissingAsnThe autonomous system number of the customer gateway is mandatory when BGP authentication key is specified.当指定了用户网关的BGP验证密钥时,必须指定自治系统号。
400InvalidAuthkey.MalformedThe specified BGP authentication key (%s) is malformed.该BGP认证密钥不合法。
400OperationDenied.VpnFinancialLockedThe associated VPN gateway is financially locked. You cannot update the attributes of the customer gateway.关联的VPN网关已经欠费锁定,无法修改用户网关的相关配置。
400OperationDenied.VpnConfiguringThe associated VPN gateway is being configured. You cannot update the attributes of the customer gateway.关联的VPN网关正在配置中,无法修改用户网关的相关配置。
403Forbbiden.SubUserUser not authorized to operate on the specified resource as your account is created by another user.您没有权限操作该资源,请您申请操作权限后再试。
403ForbiddenUser not authorized to operate on the specified resource.您没有权限操作指定资源,请申请权限后再操作。
404InvalidCustomerGatewayInstanceId.NotFoundThe specified customer gateway instance id does not exist.指定的用户网关实例不存在,请您检查用户网关实例ID是否正确。

访问错误中心查看更多错误码。

变更历史

变更时间变更内容概要操作
2023-10-19OpenAPI 描述信息更新、OpenAPI 去除了 deprecated 标记、OpenAPI 错误码发生变更、OpenAPI 返回结构发生变更查看变更详情