accept
(**kwargs)Accept a VPC peering connection request. To accept a request, the VPC peering connection must be in the pending-acceptance
state, 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 = vpc_peering_connection.accept(
DryRun=True|False,
)
DryRunOperation
. Otherwise, it is UnauthorizedOperation
.{
'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
Information about the VPC peering connection.
Information about the accepter VPC. CIDR block information is only returned when describing an active VPC peering connection.
The IPv4 CIDR block for the VPC.
The IPv6 CIDR block for the VPC.
Describes an IPv6 CIDR block.
The IPv6 CIDR block.
Information about the IPv4 CIDR blocks for the VPC.
Describes an IPv4 CIDR block.
The IPv4 CIDR block.
The ID of the Amazon Web Services account that owns the VPC.
Information about the VPC peering connection options for the accepter or requester VPC.
Indicates whether a local VPC can resolve public DNS hostnames to private IP addresses when queried from instances in a peer VPC.
Indicates whether a local ClassicLink connection can communicate with the peer VPC over the VPC peering connection.
Indicates whether a local VPC can communicate with a ClassicLink connection in the peer VPC over the VPC peering connection.
The ID of the VPC.
The Region in which the VPC is located.
The time that an unaccepted VPC peering connection will expire.
Information about the requester VPC. CIDR block information is only returned when describing an active VPC peering connection.
The IPv4 CIDR block for the VPC.
The IPv6 CIDR block for the VPC.
Describes an IPv6 CIDR block.
The IPv6 CIDR block.
Information about the IPv4 CIDR blocks for the VPC.
Describes an IPv4 CIDR block.
The IPv4 CIDR block.
The ID of the Amazon Web Services account that owns the VPC.
Information about the VPC peering connection options for the accepter or requester VPC.
Indicates whether a local VPC can resolve public DNS hostnames to private IP addresses when queried from instances in a peer VPC.
Indicates whether a local ClassicLink connection can communicate with the peer VPC over the VPC peering connection.
Indicates whether a local VPC can communicate with a ClassicLink connection in the peer VPC over the VPC peering connection.
The ID of the VPC.
The Region in which the VPC is located.
The status of the VPC peering connection.
The status of the VPC peering connection.
A message that provides more information about the status, if applicable.
Any tags assigned to the resource.
Describes a tag.
The key of the tag.
Constraints: Tag keys are case-sensitive and accept a maximum of 127 Unicode characters. May not begin with aws:
.
The value of the tag.
Constraints: Tag values are case-sensitive and accept a maximum of 256 Unicode characters.
The ID of the VPC peering connection.