2017/10/03 - Amazon Elastic Compute Cloud - 2 updated api methods
Changes This release includes service updates to AWS VPN.
{'Options': {'TunnelOptions': [{'PreSharedKey': 'string', 'TunnelInsideCidr': 'string'}]}}Response
{'VpnConnection': {'Category': 'string'}}
Creates a VPN connection between an existing virtual private gateway and a VPN customer gateway. The only supported connection type is ipsec.1 .
The response includes information that you need to give to your network administrator to configure your customer gateway.
Warning
We strongly recommend that you use HTTPS when calling this operation because the response contains sensitive cryptographic information for configuring your customer gateway.
If you decide to shut down your VPN connection for any reason and later create a new VPN connection, you must reconfigure your customer gateway with the new information returned from this call.
This is an idempotent operation. If you perform the operation more than once, Amazon EC2 doesn't return an error.
For more information, see AWS Managed VPN Connections in the Amazon Virtual Private Cloud User Guide .
See also: AWS API Documentation
Request Syntax
client.create_vpn_connection( CustomerGatewayId='string', Type='string', VpnGatewayId='string', DryRun=True|False, Options={ 'StaticRoutesOnly': True|False, 'TunnelOptions': [ { 'TunnelInsideCidr': 'string', 'PreSharedKey': 'string' }, ] } )
string
[REQUIRED]
The ID of the customer gateway.
string
[REQUIRED]
The type of VPN connection (ipsec.1 ).
string
[REQUIRED]
The ID of the virtual private gateway.
boolean
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 .
dict
The options for the VPN connection.
StaticRoutesOnly (boolean) --
Indicate whether the VPN connection uses static routes only. If you are creating a VPN connection for a device that does not support BGP, you must specify true .
Default: false
TunnelOptions (list) --
The tunnel options for the VPN connection.
(dict) --
The tunnel options for a VPN connection.
TunnelInsideCidr (string) --
The range of inside IP addresses for the tunnel. Any specified CIDR blocks must be unique across all VPN connections that use the same virtual private gateway.
Constraints: A size /30 CIDR block from the 169.254.0.0/16 range. The following CIDR blocks are reserved and cannot be used:
169.254.0.0/30
169.254.1.0/30
169.254.2.0/30
169.254.3.0/30
169.254.4.0/30
169.254.5.0/30
169.254.169.252/30
PreSharedKey (string) --
The pre-shared key (PSK) to establish initial authentication between the virtual private gateway and customer gateway.
Constraints: Allowed characters are alphanumeric characters and ._. Must be between 8 and 64 characters in length and cannot start with zero (0).
dict
Response Syntax
{ 'VpnConnection': { 'CustomerGatewayConfiguration': 'string', 'CustomerGatewayId': 'string', 'Category': 'string', 'State': 'pending'|'available'|'deleting'|'deleted', 'Type': 'ipsec.1', 'VpnConnectionId': 'string', 'VpnGatewayId': 'string', 'Options': { 'StaticRoutesOnly': True|False }, 'Routes': [ { 'DestinationCidrBlock': 'string', 'Source': 'Static', 'State': 'pending'|'available'|'deleting'|'deleted' }, ], 'Tags': [ { 'Key': 'string', 'Value': 'string' }, ], 'VgwTelemetry': [ { 'AcceptedRouteCount': 123, 'LastStatusChange': datetime(2015, 1, 1), 'OutsideIpAddress': 'string', 'Status': 'UP'|'DOWN', 'StatusMessage': 'string' }, ] } }
Response Structure
(dict) --
Contains the output of CreateVpnConnection.
VpnConnection (dict) --
Information about the VPN connection.
CustomerGatewayConfiguration (string) --
The configuration information for the VPN connection's customer gateway (in the native XML format). This element is always present in the CreateVpnConnection response; however, it's present in the DescribeVpnConnections response only if the VPN connection is in the pending or available state.
CustomerGatewayId (string) --
The ID of the customer gateway at your end of the VPN connection.
Category (string) --
The category of the VPN connection. A value of VPN indicates an AWS VPN connection. A value of VPN-Classic indicates an AWS Classic VPN connection. For more information, see AWS Managed VPN Categories in the Amazon Virtual Private Cloud User Guide .
State (string) --
The current state of the VPN connection.
Type (string) --
The type of VPN connection.
VpnConnectionId (string) --
The ID of the VPN connection.
VpnGatewayId (string) --
The ID of the virtual private gateway at the AWS side of the VPN connection.
Options (dict) --
The VPN connection options.
StaticRoutesOnly (boolean) --
Indicates whether the VPN connection uses static routes only. Static routes must be used for devices that don't support BGP.
Routes (list) --
The static routes associated with the VPN connection.
(dict) --
Describes a static route for a VPN connection.
DestinationCidrBlock (string) --
The CIDR block associated with the local subnet of the customer data center.
Source (string) --
Indicates how the routes were provided.
State (string) --
The current state of the static route.
Tags (list) --
Any tags assigned to the VPN connection.
(dict) --
Describes a tag.
Key (string) --
The key of the tag.
Constraints: Tag keys are case-sensitive and accept a maximum of 127 Unicode characters. May not begin with aws:
Value (string) --
The value of the tag.
Constraints: Tag values are case-sensitive and accept a maximum of 255 Unicode characters.
VgwTelemetry (list) --
Information about the VPN tunnel.
(dict) --
Describes telemetry for a VPN tunnel.
AcceptedRouteCount (integer) --
The number of accepted routes.
LastStatusChange (datetime) --
The date and time of the last change in status.
OutsideIpAddress (string) --
The Internet-routable IP address of the virtual private gateway's outside interface.
Status (string) --
The status of the VPN tunnel.
StatusMessage (string) --
If an error occurs, a description of the error.
{'VpnConnections': {'Category': 'string'}}
Describes one or more of your VPN connections.
For more information about VPN connections, see Adding a Hardware Virtual Private Gateway to Your VPC in the Amazon Virtual Private Cloud User Guide .
See also: AWS API Documentation
Request Syntax
client.describe_vpn_connections( Filters=[ { 'Name': 'string', 'Values': [ 'string', ] }, ], VpnConnectionIds=[ 'string', ], DryRun=True|False )
list
One or more filters.
customer-gateway-configuration - The configuration information for the customer gateway.
customer-gateway-id - The ID of a customer gateway associated with the VPN connection.
state - The state of the VPN connection (pending | available | deleting | deleted ).
option.static-routes-only - Indicates whether the connection has static routes only. Used for devices that do not support Border Gateway Protocol (BGP).
route.destination-cidr-block - The destination CIDR block. This corresponds to the subnet used in a customer data center.
bgp-asn - The BGP Autonomous System Number (ASN) associated with a BGP device.
tag :key =*value* - The key/value combination of a tag assigned to the resource. Specify the key of the tag in the filter name and the value of the tag in the filter value. For example, for the tag Purpose=X, specify tag:Purpose for the filter name and X for the filter value.
tag-key - The key of a tag assigned to the resource. This filter is independent of the tag-value filter. For example, if you use both the filter "tag-key=Purpose" and the filter "tag-value=X", you get any resources assigned both the tag key Purpose (regardless of what the tag's value is), and the tag value X (regardless of what the tag's key is). If you want to list only resources where Purpose is X, see the tag :key =*value* filter.
tag-value - The value of a tag assigned to the resource. This filter is independent of the tag-key filter.
type - The type of VPN connection. Currently the only supported type is ipsec.1 .
vpn-connection-id - The ID of the VPN connection.
vpn-gateway-id - The ID of a virtual private gateway associated with the VPN connection.
(dict) --
A filter name and value pair that is used to return a more specific list of results. Filters can be used to match a set of resources by various criteria, such as tags, attributes, or IDs.
Name (string) --
The name of the filter. Filter names are case-sensitive.
Values (list) --
One or more filter values. Filter values are case-sensitive.
(string) --
list
One or more VPN connection IDs.
Default: Describes your VPN connections.
(string) --
boolean
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 .
dict
Response Syntax
{ 'VpnConnections': [ { 'CustomerGatewayConfiguration': 'string', 'CustomerGatewayId': 'string', 'Category': 'string', 'State': 'pending'|'available'|'deleting'|'deleted', 'Type': 'ipsec.1', 'VpnConnectionId': 'string', 'VpnGatewayId': 'string', 'Options': { 'StaticRoutesOnly': True|False }, 'Routes': [ { 'DestinationCidrBlock': 'string', 'Source': 'Static', 'State': 'pending'|'available'|'deleting'|'deleted' }, ], 'Tags': [ { 'Key': 'string', 'Value': 'string' }, ], 'VgwTelemetry': [ { 'AcceptedRouteCount': 123, 'LastStatusChange': datetime(2015, 1, 1), 'OutsideIpAddress': 'string', 'Status': 'UP'|'DOWN', 'StatusMessage': 'string' }, ] }, ] }
Response Structure
(dict) --
Contains the output of DescribeVpnConnections.
VpnConnections (list) --
Information about one or more VPN connections.
(dict) --
Describes a VPN connection.
CustomerGatewayConfiguration (string) --
The configuration information for the VPN connection's customer gateway (in the native XML format). This element is always present in the CreateVpnConnection response; however, it's present in the DescribeVpnConnections response only if the VPN connection is in the pending or available state.
CustomerGatewayId (string) --
The ID of the customer gateway at your end of the VPN connection.
Category (string) --
The category of the VPN connection. A value of VPN indicates an AWS VPN connection. A value of VPN-Classic indicates an AWS Classic VPN connection. For more information, see AWS Managed VPN Categories in the Amazon Virtual Private Cloud User Guide .
State (string) --
The current state of the VPN connection.
Type (string) --
The type of VPN connection.
VpnConnectionId (string) --
The ID of the VPN connection.
VpnGatewayId (string) --
The ID of the virtual private gateway at the AWS side of the VPN connection.
Options (dict) --
The VPN connection options.
StaticRoutesOnly (boolean) --
Indicates whether the VPN connection uses static routes only. Static routes must be used for devices that don't support BGP.
Routes (list) --
The static routes associated with the VPN connection.
(dict) --
Describes a static route for a VPN connection.
DestinationCidrBlock (string) --
The CIDR block associated with the local subnet of the customer data center.
Source (string) --
Indicates how the routes were provided.
State (string) --
The current state of the static route.
Tags (list) --
Any tags assigned to the VPN connection.
(dict) --
Describes a tag.
Key (string) --
The key of the tag.
Constraints: Tag keys are case-sensitive and accept a maximum of 127 Unicode characters. May not begin with aws:
Value (string) --
The value of the tag.
Constraints: Tag values are case-sensitive and accept a maximum of 255 Unicode characters.
VgwTelemetry (list) --
Information about the VPN tunnel.
(dict) --
Describes telemetry for a VPN tunnel.
AcceptedRouteCount (integer) --
The number of accepted routes.
LastStatusChange (datetime) --
The date and time of the last change in status.
OutsideIpAddress (string) --
The Internet-routable IP address of the virtual private gateway's outside interface.
Status (string) --
The status of the VPN tunnel.
StatusMessage (string) --
If an error occurs, a description of the error.