Amazon Elastic Compute Cloud
API Reference (API Version 2013-02-01)
« PreviousNext »
View the PDF for this guide.Go to the AWS Discussion Forum for this product.Did this page help you?  Yes | No |  Tell us about it...

AttachVpnGateway

Description

Attaches a virtual private gateway to a VPC. For more information, see Adding a Hardware Virtual Private Gateway to Your VPC in the Amazon Virtual Private Cloud User Guide.

Request Parameters

VpnGatewayId

The ID of the virtual private gateway.

Type: String

Default: None

Required: Yes

VpcId

The ID of the VPC.

Type: String

Default: None

Required: Yes

Response Elements

The following elements are returned in an AttachVpnGatewayResponse element.

requestId

The ID of the request.

Type: xsd:string

attachment

Information about the attachment.

Type: AttachmentType

Examples

Example Request

This example attaches the virtual private 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/2013-02-01/">
   <requestId>7a62c49f-347e-4fc4-9331-6e8eEXAMPLE</requestId>
   <attachment>
      <vpcId>vpc-1a2b3c4d</vpcId>
      <state>attaching</state>
   </attachment>
</AttachVpnGatewayResponse>