| « PreviousNext » | |
![]() ![]() | Did this page help you? Yes | No | Tell us about it... |
Detaches an Internet gateway from a VPC, disabling connectivity between the Internet and the VPC. The VPC must not contain any running instances with Elastic IP addresses.
InternetGatewayIdThe ID of the Internet gateway.
Type: String
Default: None
Required: Yes
VpcIdThe ID of the VPC.
Type: String
Default: None
Required: Yes
The following elements are returned in a
DetachInternetGatewayResponse element.
requestIdThe ID of the request.
Type: xsd:string
returnReturns true if the request succeeds. Otherwise,
returns an error.
Type: xsd:boolean
The example detaches the Internet gateway with ID igw-eaad4883 from the VPC with ID vpc-11ad4878.
https://ec2.amazonaws.com/?Action=DetachInternetGateway &InternetGatewayId=igw-eaad4883 &VpcId=vpc-11ad4878 &AUTHPARAMS
<DetachInternetGatewayResponse xmlns="http://ec2.amazonaws.com/doc/2013-02-01/"> <requestId>59dbff89-35bd-4eac-99ed-be587EXAMPLE</requestId> <return>true</return> </DetachInternetGatewayResponse>