Menu
Amazon Elastic Compute Cloud
API Reference (API Version 2016-11-15)

CreateVpnGateway

Creates a virtual private gateway. A virtual private gateway is the endpoint on the VPC side of your VPN connection. You can create a virtual private gateway before creating the VPC itself.

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

Request Parameters

The following parameters are for this specific action. For more information about required and optional parameters that are common to all actions, see Common Query Parameters.

AvailabilityZone

The Availability Zone for the virtual private gateway.

Type: String

Required: No

DryRun

Checks whether you have the required permissions for the action, without actually making the request, and provides an error response. If you have the required permissions, the error response is DryRunOperation. Otherwise, it is UnauthorizedOperation.

Type: Boolean

Required: No

Type

The type of VPN connection this virtual private gateway supports.

Type: String

Valid Values: ipsec.1

Required: Yes

Response Elements

The following elements are returned by the service.

requestId

The ID of the request.

Type: String

vpnGateway

Information about the virtual private gateway.

Type: VpnGateway object

Errors

For information about the errors that are common to all actions, see Common Errors.

Example

Example

This example creates a virtual private gateway.

Sample Request

Copy
https://ec2.amazonaws.com/?Action=CreateVpnGateway &Type=ipsec.1 &AUTHPARAMS

Sample Response

Copy
<CreateVpnGatewayResponse xmlns="http://ec2.amazonaws.com/doc/2016-11-15/"> <requestId>7a62c49f-347e-4fc4-9331-6e8eEXAMPLE</requestId> <vpnGateway> <vpnGatewayId>vgw-8db04f81</vpnGatewayId> <state>pending</state> <type>ipsec.1</type> <availabilityZone>us-east-1a</availabilityZone> <attachments/> <tagSet/> </vpnGateway> </CreateVpnGatewayResponse>

See Also

For more information about using this API in one of the language-specific AWS SDKs, see the following: