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


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.


The Availability Zone for the virtual private gateway.

Type: String

Required: No


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


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.


The ID of the request.

Type: String


Information about the virtual private gateway.

Type: VpnGateway object


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



This example creates a virtual private gateway.

Sample Request

Copy &Type=ipsec.1 &AUTHPARAMS

Sample Response

<CreateVpnGatewayResponse xmlns=""> <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: