调用DeleteVpnGateway接口删除指定的VPN网关。
接口说明
无法删除已有 IPsec 连接的 VPN 网关。
调试
您可以在OpenAPI Explorer中直接运行该接口,免去您计算签名的困扰。运行成功后,OpenAPI Explorer可以自动生成SDK代码示例。
调试
授权信息
|
操作 |
访问级别 |
资源类型 |
条件关键字 |
关联操作 |
|
vpc:DeleteVpnGateway |
delete |
*VpnGateway
|
无 | 无 |
请求参数
|
名称 |
类型 |
必填 |
描述 |
示例值 |
| RegionId |
string |
是 |
VPN 网关实例所在的地域 ID。 您可以通过调用 DescribeRegions 接口获取地域 ID。 |
cn-hangzhou |
| ClientToken |
string |
否 |
客户端 Token,用于保证请求的幂等性。 由客户端生成该参数值,要保证在不同请求间唯一,最大值不超过 64 个 ASCII 字符。 说明
若您未指定,则系统自动使用 API 请求的 RequestId 作为 ClientToken 标识。每次 API 请求的 RequestId 可能不一样。 |
02fb3da4-130e-11e9-8e44-0016e04115b |
| VpnGatewayId |
string |
是 |
VPN 网关实例的 ID。 |
vpn-bp1q8bgx4xnkm2ogj**** |
返回参数
|
名称 |
类型 |
描述 |
示例值 |
|
object |
|||
| RequestId |
string |
请求 ID。 |
>0ED8D006-F706-4D23-88ED-E11ED28DCAC0 |
示例
正常返回示例
JSON格式
{
"RequestId": ">0ED8D006-F706-4D23-88ED-E11ED28DCAC0"
}
异常返回示例
JSON格式
{
"RequestId": "0ED8D006-F706-4D23-88ED-E11ED28DCAC0"
}
错误码
|
HTTP status code |
错误码 |
错误信息 |
描述 |
|---|---|---|---|
| 400 | DependencyViolation.VpnConnection | There are vpn connections on specified customer gateway not deleted. | 指定的用户网关上有 vpn 连接未删除。 |
| 400 | DependencyViolation.SslVpnServer | There is SSL VPN server on specified vpn gateway not deleted. | 指定的 vpn 网关上有 SSL VPN 服务端未删除。 |
| 400 | VpnGateway.Configuring | The specified service is configuring. | |
| 400 | DependencyViolation.GreTunnel | There is Gre tunnel on specified vpn gateway not deleted. | 指定的 vpn 网关上有 Gre 隧道未删除。 |
| 400 | InternalError | The request processing has failed due to some unknown error, exception or failure. | |
| 400 | TaskConflict | The eip operate too frequent, TaskConflict. | 操作过于频繁,任务冲突。 |
| 400 | InvalidVpnGatewayInstanceId.NotFound | The specified vpn gateway instance id does not exist. | 指定的 VPN 网关不存在,请您检查 VPN 网关是否正确。 |
| 400 | DependencyViolation.IpsecServer | the resource cannot be deleted because the resource has an ipsec server dependency. | 该资源无法被删除,因为该资源下有ipsec 服务端依赖。 |
| 403 | Forbidden.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. | 您没有权限操作指定资源,请申请权限后再操作。 |
| 403 | ForbiddenRelease | Forbidden to release a prepaid instance within validity period | |
| 404 | InvalidVpnGatewayInstanceId.NotFound | The specified vpn gateway instance id does not exist. |
访问错误中心查看更多错误码。
变更历史
更多信息,参考变更详情。