EC2 / Client / accept_vpc_peering_connection
accept_vpc_peering_connection#
- EC2.Client.accept_vpc_peering_connection(**kwargs)#
- Accept a VPC peering connection request. To accept a request, the VPC peering connection must be in the - pending-acceptancestate, and you must be the owner of the peer VPC. Use DescribeVpcPeeringConnections to view your outstanding VPC peering connection requests.- For an inter-Region VPC peering connection request, you must accept the VPC peering connection in the Region of the accepter VPC. - See also: AWS API Documentation - Request Syntax- response = client.accept_vpc_peering_connection( DryRun=True|False, VpcPeeringConnectionId='string' ) - Parameters:
- 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 is- UnauthorizedOperation.
- VpcPeeringConnectionId (string) – - [REQUIRED] - The ID of the VPC peering connection. You must specify this parameter in the request. 
 
- Return type:
- dict 
- Returns:
- Response Syntax- { 'VpcPeeringConnection': { 'AccepterVpcInfo': { 'CidrBlock': 'string', 'Ipv6CidrBlockSet': [ { 'Ipv6CidrBlock': 'string' }, ], 'CidrBlockSet': [ { 'CidrBlock': 'string' }, ], 'OwnerId': 'string', 'PeeringOptions': { 'AllowDnsResolutionFromRemoteVpc': True|False, 'AllowEgressFromLocalClassicLinkToRemoteVpc': True|False, 'AllowEgressFromLocalVpcToRemoteClassicLink': True|False }, 'VpcId': 'string', 'Region': 'string' }, 'ExpirationTime': datetime(2015, 1, 1), 'RequesterVpcInfo': { 'CidrBlock': 'string', 'Ipv6CidrBlockSet': [ { 'Ipv6CidrBlock': 'string' }, ], 'CidrBlockSet': [ { 'CidrBlock': 'string' }, ], 'OwnerId': 'string', 'PeeringOptions': { 'AllowDnsResolutionFromRemoteVpc': True|False, 'AllowEgressFromLocalClassicLinkToRemoteVpc': True|False, 'AllowEgressFromLocalVpcToRemoteClassicLink': True|False }, 'VpcId': 'string', 'Region': 'string' }, 'Status': { 'Code': 'initiating-request'|'pending-acceptance'|'active'|'deleted'|'rejected'|'failed'|'expired'|'provisioning'|'deleting', 'Message': 'string' }, 'Tags': [ { 'Key': 'string', 'Value': 'string' }, ], 'VpcPeeringConnectionId': 'string' } } - Response Structure- (dict) – - VpcPeeringConnection (dict) – - Information about the VPC peering connection. - AccepterVpcInfo (dict) – - Information about the accepter VPC. CIDR block information is only returned when describing an active VPC peering connection. - CidrBlock (string) – - The IPv4 CIDR block for the VPC. 
- Ipv6CidrBlockSet (list) – - The IPv6 CIDR block for the VPC. - (dict) – - Describes an IPv6 CIDR block. - Ipv6CidrBlock (string) – - The IPv6 CIDR block. 
 
 
- CidrBlockSet (list) – - Information about the IPv4 CIDR blocks for the VPC. - (dict) – - Describes an IPv4 CIDR block. - CidrBlock (string) – - The IPv4 CIDR block. 
 
 
- OwnerId (string) – - The ID of the Amazon Web Services account that owns the VPC. 
- PeeringOptions (dict) – - Information about the VPC peering connection options for the accepter or requester VPC. - AllowDnsResolutionFromRemoteVpc (boolean) – - Indicates whether a local VPC can resolve public DNS hostnames to private IP addresses when queried from instances in a peer VPC. 
- AllowEgressFromLocalClassicLinkToRemoteVpc (boolean) – - Deprecated. 
- AllowEgressFromLocalVpcToRemoteClassicLink (boolean) – - Deprecated. 
 
- VpcId (string) – - The ID of the VPC. 
- Region (string) – - The Region in which the VPC is located. 
 
- ExpirationTime (datetime) – - The time that an unaccepted VPC peering connection will expire. 
- RequesterVpcInfo (dict) – - Information about the requester VPC. CIDR block information is only returned when describing an active VPC peering connection. - CidrBlock (string) – - The IPv4 CIDR block for the VPC. 
- Ipv6CidrBlockSet (list) – - The IPv6 CIDR block for the VPC. - (dict) – - Describes an IPv6 CIDR block. - Ipv6CidrBlock (string) – - The IPv6 CIDR block. 
 
 
- CidrBlockSet (list) – - Information about the IPv4 CIDR blocks for the VPC. - (dict) – - Describes an IPv4 CIDR block. - CidrBlock (string) – - The IPv4 CIDR block. 
 
 
- OwnerId (string) – - The ID of the Amazon Web Services account that owns the VPC. 
- PeeringOptions (dict) – - Information about the VPC peering connection options for the accepter or requester VPC. - AllowDnsResolutionFromRemoteVpc (boolean) – - Indicates whether a local VPC can resolve public DNS hostnames to private IP addresses when queried from instances in a peer VPC. 
- AllowEgressFromLocalClassicLinkToRemoteVpc (boolean) – - Deprecated. 
- AllowEgressFromLocalVpcToRemoteClassicLink (boolean) – - Deprecated. 
 
- VpcId (string) – - The ID of the VPC. 
- Region (string) – - The Region in which the VPC is located. 
 
- Status (dict) – - The status of the VPC peering connection. - Code (string) – - The status of the VPC peering connection. 
- Message (string) – - A message that provides more information about the status, if applicable. 
 
- Tags (list) – - Any tags assigned to the resource. - (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 256 Unicode characters. 
 
 
- VpcPeeringConnectionId (string) – - The ID of the VPC peering connection.