Print this pageEmail this pageGo to the ForumsView the PDFShare this page on TwitterShare this page on FacebookBookmark this page on DeliciousSubmit this page to RedditSubmit this page to DiggDid this page help you?  Yes  No   Tell us about it...

DetachInternetGateway

Description

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. For more information about your VPC and Internet gateway, go to the Amazon Virtual Private Cloud User Guide.

For more information about Amazon Virtual Private Cloud and Internet gateways, go to the Amazon Virtual Private Cloud User Guide.

Request Parameters

NameDescriptionRequired

InternetGatewayId

The ID of the Internet gateway to detach.

Type: String

Default: None

Yes

VpcId

The ID of the VPC.

Type: String

Default: None

Yes

Response Elements

The elements in the following table are wrapped in a DetachInternetGatewayResponse structure.

NameDescription

requestId

The ID of the request.

Type: String

return

Returns true if the request succeeds. Otherwise, returns an error.

Type: xsd:boolean

Examples

Example Request

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

Example Response

 <DetachInternetGatewayResponse xmlns="http://ec2.amazonaws.com/doc/2011-07-15/">
   <requestId>59dbff89-35bd-4eac-99ed-be587EXAMPLE</requestId> 
   <return>true</return>
</DetachInternetGatewayResponse>

Related Operations