DeleteVpc 操作を呼び出して、仮想プライベートクラウド (VPC) を削除します。
操作説明
この操作を呼び出して VPC を削除する際、以下の点に注意してください:
-
VPC を削除する前に、vSwitch、クラウドプロダクトインスタンス、高可用性仮想 IP アドレス (HAVIP) など、VPC 内のすべてのリソースをリリースまたは移行する必要があります。
-
Available 状態の VPC のみ削除できます。
-
DeleteVpc 操作は非同期です。リクエストが送信されると、リクエスト ID が返されますが、VPC はすぐには削除されません。削除タスクはバックグラウンドで続行されます。 DescribeVpcAttribute 操作を呼び出して、VPC の削除ステータスをクエリできます:
VPC が Deleting 状態の場合、VPC は削除中です。
指定された VPC が見つからない場合、VPC は削除されています。
-
DeleteVpc 操作は、同じ VPC の同時削除をサポートしていません。
今すぐお試しください
テスト
RAM 認証
|
アクション |
アクセスレベル |
リソースタイプ |
条件キー |
依存アクション |
|
vpc:DeleteVpc |
delete |
*VPC
|
|
なし |
リクエストパラメーター
|
パラメーター |
型 |
必須 / 任意 |
説明 |
例 |
| VpcId |
string |
必須 |
削除する VPC の ID。 |
vpc-bp1m7v25emi1h5mtc**** |
| RegionId |
string |
任意 |
削除する VPC のリージョン ID。 DescribeRegions 操作を呼び出して、リージョン ID をクエリできます。 |
cn-hangzhou |
| ForceDelete |
boolean |
任意 |
VPC を強制的に削除するかどうかを指定します。有効な値:
VPC を強制的に削除できるのは、VPC 内に以下のリソースが存在する場合のみです:
|
false |
| DryRun |
boolean |
任意 |
ドライランを実行するかどうかを指定します。有効な値:
|
false |
| ClientToken |
string |
任意 |
リクエストのべき等性を確保するために使用されるクライアントトークン。 クライアントを使用してトークンを生成できますが、異なるリクエスト間でトークンが一意であることを確認する必要があります。ClientToken の値には ASCII 文字のみを含めることができます。 説明
このパラメーターを指定しない場合、システムは API リクエストの RequestId を ClientToken として使用します。RequestId は API リクエストごとに異なる場合があります。 |
123e4567-e89b-12d3-a456-426655440000 |
レスポンスフィールド
|
フィールド |
型 |
説明 |
例 |
|
object |
リクエスト ID。 |
||
| RequestId |
string |
リクエスト ID。 |
0ED8D006-F706-4D23-88ED-E11ED28DCAC0 |
例
成功レスポンス
JSONJSON
{
"RequestId": "0ED8D006-F706-4D23-88ED-E11ED28DCAC0"
}
エラーコード
|
HTTP ステータスコード |
エラーコード |
エラーメッセージ |
説明 |
|---|---|---|---|
| 400 | IncorrectStatus.VpcDhcpStatus | The DhcpOptionsSet status of vpc does not support this operation. | |
| 400 | DependencyViolation.GatewayEndpoint | The VPC contains endpoints and cannot be deleted. | |
| 400 | IncorrectVpcStatus | Current VPC status does not support this operation. | |
| 400 | DependencyViolation.RouteEntry | Specified object has dependent resources | 依存関係があるカスタマイズルーティングルールが存在するため、VPC を削除できませんでした。 |
| 400 | DependencyViolation.Instance | Specified object has dependent resources | |
| 400 | DependencyViolation.VSwitch | Specified object has dependent resources | 依存関係がある VSwitch が存在するため、VPC を削除できませんでした。 |
| 400 | DependencyViolation.RouteInterface | Specified object has dependent route interface . | |
| 400 | DependencyViolation.Tunnel | Specified object has dependent tunnel. | |
| 400 | DependencyViolation.NatGateway | Specified object has dependent resources NatGateway. | VPC には NATGateway があるため、削除できません。VPC 内の NATGateway を削除してから、VPC を削除してください。 |
| 400 | DependencyViolation.RouterInterface | Specified object has dependent resources RouterInterface. | |
| 400 | DependencyViolation.SecurityGroup | Specified object has dependent resources SecurityGroup. | |
| 400 | Forbidden.VpcNotFound | Specified VPC can not found. | 指定された VPC は存在しません。 |
| 400 | Forbbiden | Active custom route in vpc. | |
| 400 | TaskConflict | The eip operate too frequent, TaskConflict. | |
| 400 | InvalidAction | The VPC has been connected to the classic network ECS. Please cancel the connection before proceeding. | |
| 400 | IncorrectStatus.cbnStatus | Current CBN status does not support this operation. | |
| 400 | DependencyViolation.RouteTable | Specified object has dependent custom routeTable. | |
| 400 | DependencyViolation.NetworkAcl | Specified object has dependent resources network acl. | |
| 400 | DependencyViolation.ClassicLinkInstance | Specified object has active classicLink instance. | |
| 400 | System.ServiceBusy | System is busy, please try later. | |
| 400 | DependencyViolation.DhcpOptionsSet | The VPC cannot be deleted when it is associated with dhcpOptionsSet. | |
| 400 | InvalidRegionId.NotFound | The specified region is not found. | |
| 400 | DependencyViolation.CustomRouteTable | CustomRouteTable already exists. | |
| 400 | DependencyViolation.Ipv4Gateway | The VPC cannot be deleted when it has ipv4Gateway. | |
| 400 | DependencyViolation.GatewayRouteTable | Specified object has dependent resources gatewayRouteTable. | |
| 400 | OperationDenied.VpcPeerExists | The operation is not allowed because the VpcPeer exists. | |
| 400 | DependencyViolation.AppAccess | Specified object has dependent resources app access. | |
| 400 | DependencyViolation.OppositeRouterInterface | Failed to delete the VPC because it has peer router interfaces. | |
| 400 | DependencyViolation.TransitRouter | Specified object has attached to Transit Router. | |
| 400 | DependencyViolation.Ipv6Gateway | The VPC contains IPv6Gateway and cannot be deleted. | |
| 400 | DependencyViolation.CloudServiceResource | The VPC contains CloudServiceResource and cannot be deleted. | |
| 400 | IncorrectStatus.VpcDnsHostnameStatus | The DnsHostname status of vpc does not support this operation. | |
| 400 | OperationDenied.AttachedToECR | The operation is not allowed because the VPC is attached to ECR %s. | |
| 500 | InternalError | The request processing has failed due to some unknown error. | |
| 403 | OperationDenied | The operation is not supported in this status. | |
| 404 | InvalidVpcId.NotFound | Specified VPC does not exist. |
完全なリストについては、「エラーコード」をご参照ください。
変更履歴
完全なリストについては、「変更履歴」をご参照ください。