EC2 / Client / attach_vpn_gateway
attach_vpn_gateway#
- EC2.Client.attach_vpn_gateway(**kwargs)#
Attaches a virtual private gateway to a VPC. You can attach one virtual private gateway to one VPC at a time.
For more information, see Amazon Web Services Site-to-Site VPN in the Amazon Web Services Site-to-Site VPN User Guide.
See also: AWS API Documentation
Request Syntax
response = client.attach_vpn_gateway( VpcId='string', VpnGatewayId='string', DryRun=True|False )
- Parameters:
VpcId (string) –
[REQUIRED]
The ID of the VPC.
VpnGatewayId (string) –
[REQUIRED]
The ID of the virtual private gateway.
DryRun (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 isUnauthorizedOperation
.
- Return type:
dict
- Returns:
Response Syntax
{ 'VpcAttachment': { 'State': 'attaching'|'attached'|'detaching'|'detached', 'VpcId': 'string' } }
Response Structure
(dict) –
Contains the output of AttachVpnGateway.
VpcAttachment (dict) –
Information about the attachment.
State (string) –
The current state of the attachment.
VpcId (string) –
The ID of the VPC.