| « PreviousNext » | |
![]() ![]() | Did this page help you? Yes | No | Tell us about it... |
Attaches an Internet gateway to a VPC, enabling connectivity between the Internet and the VPC. For more information about your VPC and Internet gateway, see the Amazon Virtual Private Cloud User Guide.
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 an
AttachInternetGatewayResponse element.
requestIdThe ID of the request.
Type: xsd:string
returnReturns true if the request succeeds. Otherwise, returns an error.
Type: xsd:boolean
The example attaches the Internet gateway with ID igw-eaad4883 to the VPC with ID vpc-11ad4878.
https://ec2.amazonaws.com/?Action=AttachInternetGateway &InternetGatewayId=igw-eaad4883 &VpcId=vpc-11ad4878 &AUTHPARAMS
<AttachInternetGatewayResponse xmlns="http://ec2.amazonaws.com/doc/2013-02-01/"> <requestId>59dbff89-35bd-4eac-99ed-be587EXAMPLE</requestId> <return>true</return> </AttachInternetGatewayResponse>