调用DeleteCustomerGateway接口删除指定的用户网关。
接口说明
删除用户网关前,请确保用户网关未关联任何 IPsec 连接。删除 IPsec 连接,请参见 DeleteVpnAttachment 或 DeleteVpnConnection 。
调试
您可以在OpenAPI Explorer中直接运行该接口,免去您计算签名的困扰。运行成功后,OpenAPI Explorer可以自动生成SDK代码示例。
调试
授权信息
|
操作 |
访问级别 |
资源类型 |
条件关键字 |
关联操作 |
|
vpc:DeleteCustomerGateway |
delete |
*CustomerGateway
|
无 | 无 |
请求参数
|
名称 |
类型 |
必填 |
描述 |
示例值 |
| RegionId |
string |
是 |
用户网关所在的地域 ID。您可以通过调用 DescribeRegions 接口获取地域 ID。 |
cn-shanghai |
| ClientToken |
string |
否 |
客户端 Token,用于保证请求的幂等性。 由客户端生成该参数值,要保证在不同请求间唯一,最大值不超过 64 个 ASCII 字符。 说明
若您未指定,则系统自动使用 API 请求的 RequestId 作为 ClientToken 标识。每次 API 请求的 RequestId 不一样。 |
02fb3da4-130e-11e9-8e44-0016e04**** |
| CustomerGatewayId |
string |
是 |
用户网关的实例 ID。 |
cgw-bp1pvpl9r9adju6l5**** |
返回参数
|
名称 |
类型 |
描述 |
示例值 |
|
object |
|||
| RequestId |
string |
请求 ID。 |
606998F0-B94D-48FE-8316-ACA81BB230DA |
示例
正常返回示例
JSON格式
{
"RequestId": "606998F0-B94D-48FE-8316-ACA81BB230DA"
}
错误码
|
HTTP status code |
错误码 |
错误信息 |
描述 |
|---|---|---|---|
| 400 | DependencyViolation.VpnConnection | There are vpn connections on specified customer gateway not deleted. | 指定的用户网关上有 vpn 连接未删除。 |
| 400 | VpnGateway.task.conflict | The VPN is in the configuration state, please wait a while before operating. | 该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是否正确。 |
访问错误中心查看更多错误码。
变更历史
更多信息,参考变更详情。