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 Digg

AttachVpnGateway

Description

Attaches a VPN gateway to a VPC. For more information, go to Adding an IPsec Hardware VPN Gateway to Your VPC in the Amazon Virtual Private Cloud User Guide.

Request Parameters

NameDescriptionRequired

VpnGatewayId

The ID of the VPN gateway to attach to the VPC.

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 an AttachVpnGatewayResponse structure.

NameDescription

requestId

The ID of the request.

Type: xsd:string

attachment

Information about the attachment.

Type: AttachmentType

Examples

Example Request

This example attaches the VPN gateway with ID vgw-8db04f81 to the VPC with ID vpc-1a2b3c4d.

https://ec2.amazonaws.com/?Action=AttachVpnGateway
&VpnGatewayId=vgw-8db04f81
&VpcId=vpc-1a2b3c4d
&AUTHPARAMS

Example Response

<AttachVpnGatewayResponse xmlns="http://ec2.amazonaws.com/doc/2011-01-01/">
   <requestId>7a62c49f-347e-4fc4-9331-6e8eEXAMPLE</requestId>
   <attachment>
      <vpcId>vpc-1a2b3c4d</vpcId>
      <state>attaching</state>
   </attachment>
</AttachVpnGatewayResponse>