Detaches a VPN gateway from a VPC. You do this if you're planning to turn off the VPC and not use it anymore. You can confirm a VPN gateway has been completely detached from a VPC by describing the VPN gateway (any attachments to the VPN gateway are also described).
You must wait for the attachment's state to switch to detached before
you can delete the VPC or attach a different VPC to the VPN gateway.
For more information about Amazon Virtual Private Cloud and VPN gateways, go to Adding an IPsec Hardware VPN Gateway to Your VPC in the Amazon Virtual Private Cloud User Guide.
| Name | Description | Required |
|---|---|---|
|
|
The ID of the VPN gateway you want to detach from the VPC. Type: String Default: None |
Yes |
|
|
The ID of the VPC you want to detach the VPN gateway from. Type: String Default: None |
Yes |
The elements in the following table are wrapped in an
DetachVpnGatewayResponse structure.
| Name | Description |
|---|---|
|
|
The ID of the request. Type: xsd:string |
|
|
Returns true if the request succeeds. Otherwise, returns an error. Type: xsd:boolean |
This example detaches the VPN gateway with ID vgw-8db04f81 from the VPC with VPC ID vpc-1a2b3c4d.
https://ec2.amazonaws.com/?Action=DetachVpnGateway &VpnGatewayId=vgw-8db04f81 &VpcId=vpc-1a2b3c4d &AUTHPARAMS
<DetachVpnGatewayResponse xmlns="http://ec2.amazonaws.com/doc/2011-01-01/"> <requestId>7a62c49f-347e-4fc4-9331-6e8eEXAMPLE</requestId> <return>true</return> </DetachVpnGatewayResponse>