2017/08/29 - Amazon Elastic Compute Cloud - 8 updated api methods
Changes Update ec2 client to latest version
{'VpcPeeringConnection': {'AccepterVpcInfo': {'CidrBlockSet': [{'CidrBlock': 'string'}]}, 'RequesterVpcInfo': {'CidrBlockSet': [{'CidrBlock': 'string'}]}}}
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.
See also: AWS API Documentation
Request Syntax
client.accept_vpc_peering_connection( DryRun=True|False, VpcPeeringConnectionId='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.
string
The ID of the VPC peering connection.
dict
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' }, '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' }, '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) --
Contains the output of AcceptVpcPeeringConnection.
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 AWS account ID of the VPC owner.
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) --
Indicates whether a local ClassicLink connection can communicate with the peer VPC over the VPC peering connection.
AllowEgressFromLocalVpcToRemoteClassicLink (boolean) --
Indicates whether a local VPC can communicate with a ClassicLink connection in the peer VPC over the VPC peering connection.
VpcId (string) --
The ID of the VPC.
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 AWS account ID of the VPC owner.
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) --
Indicates whether a local ClassicLink connection can communicate with the peer VPC over the VPC peering connection.
AllowEgressFromLocalVpcToRemoteClassicLink (boolean) --
Indicates whether a local VPC can communicate with a ClassicLink connection in the peer VPC over the VPC peering connection.
VpcId (string) --
The ID of the VPC.
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 255 Unicode characters.
VpcPeeringConnectionId (string) --
The ID of the VPC peering connection.
{'CidrBlock': 'string'}Response
{'CidrBlockAssociation': {'AssociationId': 'string', 'CidrBlock': 'string', 'CidrBlockState': {'State': 'associating | ' 'associated | ' 'disassociating | ' 'disassociated | failing ' '| failed', 'StatusMessage': 'string'}}}
Associates a CIDR block with your VPC. You can associate a secondary IPv4 CIDR block, or you can associate an Amazon-provided IPv6 CIDR block. The IPv6 CIDR block size is fixed at /56.
For more information about associating CIDR blocks with your VPC and applicable restrictions, see VPC and Subnet Sizing in the Amazon Virtual Private Cloud User Guide.
See also: AWS API Documentation
Request Syntax
client.associate_vpc_cidr_block( AmazonProvidedIpv6CidrBlock=True|False, CidrBlock='string', VpcId='string' )
boolean
Requests an Amazon-provided IPv6 CIDR block with a /56 prefix length for the VPC. You cannot specify the range of IPv6 addresses, or the size of the CIDR block.
string
An IPv4 CIDR block to associate with the VPC.
string
[REQUIRED]
The ID of the VPC.
dict
Response Syntax
{ 'Ipv6CidrBlockAssociation': { 'AssociationId': 'string', 'Ipv6CidrBlock': 'string', 'Ipv6CidrBlockState': { 'State': 'associating'|'associated'|'disassociating'|'disassociated'|'failing'|'failed', 'StatusMessage': 'string' } }, 'CidrBlockAssociation': { 'AssociationId': 'string', 'CidrBlock': 'string', 'CidrBlockState': { 'State': 'associating'|'associated'|'disassociating'|'disassociated'|'failing'|'failed', 'StatusMessage': 'string' } }, 'VpcId': 'string' }
Response Structure
(dict) --
Ipv6CidrBlockAssociation (dict) --
Information about the IPv6 CIDR block association.
AssociationId (string) --
The association ID for the IPv6 CIDR block.
Ipv6CidrBlock (string) --
The IPv6 CIDR block.
Ipv6CidrBlockState (dict) --
Information about the state of the CIDR block.
State (string) --
The state of the CIDR block.
StatusMessage (string) --
A message about the status of the CIDR block, if applicable.
CidrBlockAssociation (dict) --
Information about the IPv4 CIDR block association.
AssociationId (string) --
The association ID for the IPv4 CIDR block.
CidrBlock (string) --
The IPv4 CIDR block.
CidrBlockState (dict) --
Information about the state of the CIDR block.
State (string) --
The state of the CIDR block.
StatusMessage (string) --
A message about the status of the CIDR block, if applicable.
VpcId (string) --
The ID of the VPC.
{'Vpc': {'CidrBlockAssociationSet': [{'AssociationId': 'string', 'CidrBlock': 'string', 'CidrBlockState': {'State': 'associating ' '| ' 'associated ' '| ' 'disassociating ' '| ' 'disassociated ' '| failing | ' 'failed', 'StatusMessage': 'string'}}]}}
Creates a default VPC with a size /16 IPv4 CIDR block and a default subnet in each Availability Zone. For more information about the components of a default VPC, see Default VPC and Default Subnets in the Amazon Virtual Private Cloud User Guide. You cannot specify the components of the default VPC yourself.
You can create a default VPC if you deleted your previous default VPC. You cannot have more than one default VPC per region.
If your account supports EC2-Classic, you cannot use this action to create a default VPC in a region that supports EC2-Classic. If you want a default VPC in a region that supports EC2-Classic, see "I really want a default VPC for my existing EC2 account. Is that possible?" in the Default VPCs FAQ.
See also: AWS API Documentation
Request Syntax
client.create_default_vpc( DryRun=True|False )
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
{ 'Vpc': { 'CidrBlock': 'string', 'DhcpOptionsId': 'string', 'State': 'pending'|'available', 'VpcId': 'string', 'InstanceTenancy': 'default'|'dedicated'|'host', 'Ipv6CidrBlockAssociationSet': [ { 'AssociationId': 'string', 'Ipv6CidrBlock': 'string', 'Ipv6CidrBlockState': { 'State': 'associating'|'associated'|'disassociating'|'disassociated'|'failing'|'failed', 'StatusMessage': 'string' } }, ], 'CidrBlockAssociationSet': [ { 'AssociationId': 'string', 'CidrBlock': 'string', 'CidrBlockState': { 'State': 'associating'|'associated'|'disassociating'|'disassociated'|'failing'|'failed', 'StatusMessage': 'string' } }, ], 'IsDefault': True|False, 'Tags': [ { 'Key': 'string', 'Value': 'string' }, ] } }
Response Structure
(dict) --
Contains the output of CreateDefaultVpc.
Vpc (dict) --
Information about the VPC.
CidrBlock (string) --
The primary IPv4 CIDR block for the VPC.
DhcpOptionsId (string) --
The ID of the set of DHCP options you've associated with the VPC (or default if the default options are associated with the VPC).
State (string) --
The current state of the VPC.
VpcId (string) --
The ID of the VPC.
InstanceTenancy (string) --
The allowed tenancy of instances launched into the VPC.
Ipv6CidrBlockAssociationSet (list) --
Information about the IPv6 CIDR blocks associated with the VPC.
(dict) --
Describes an IPv6 CIDR block associated with a VPC.
AssociationId (string) --
The association ID for the IPv6 CIDR block.
Ipv6CidrBlock (string) --
The IPv6 CIDR block.
Ipv6CidrBlockState (dict) --
Information about the state of the CIDR block.
State (string) --
The state of the CIDR block.
StatusMessage (string) --
A message about the status of the CIDR block, if applicable.
CidrBlockAssociationSet (list) --
Information about the IPv4 CIDR blocks associated with the VPC.
(dict) --
Describes an IPv4 CIDR block associated with a VPC.
AssociationId (string) --
The association ID for the IPv4 CIDR block.
CidrBlock (string) --
The IPv4 CIDR block.
CidrBlockState (dict) --
Information about the state of the CIDR block.
State (string) --
The state of the CIDR block.
StatusMessage (string) --
A message about the status of the CIDR block, if applicable.
IsDefault (boolean) --
Indicates whether the VPC is the default VPC.
Tags (list) --
Any tags assigned to the VPC.
(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.
{'Vpc': {'CidrBlockAssociationSet': [{'AssociationId': 'string', 'CidrBlock': 'string', 'CidrBlockState': {'State': 'associating ' '| ' 'associated ' '| ' 'disassociating ' '| ' 'disassociated ' '| failing | ' 'failed', 'StatusMessage': 'string'}}]}}
Creates a VPC with the specified IPv4 CIDR block. The smallest VPC you can create uses a /28 netmask (16 IPv4 addresses), and the largest uses a /16 netmask (65,536 IPv4 addresses). To help you decide how big to make your VPC, see Your VPC and Subnets in the Amazon Virtual Private Cloud User Guide.
You can optionally request an Amazon-provided IPv6 CIDR block for the VPC. The IPv6 CIDR block uses a /56 prefix length, and is allocated from Amazon's pool of IPv6 addresses. You cannot choose the IPv6 range for your VPC.
By default, each instance you launch in the VPC has the default DHCP options, which includes only a default DNS server that we provide (AmazonProvidedDNS). For more information about DHCP options, see DHCP Options Sets in the Amazon Virtual Private Cloud User Guide.
You can specify the instance tenancy value for the VPC when you create it. You can't change this value for the VPC after you create it. For more information, see Dedicated Instances in the Amazon Elastic Compute Cloud User Guide.
See also: AWS API Documentation
Request Syntax
client.create_vpc( CidrBlock='string', AmazonProvidedIpv6CidrBlock=True|False, DryRun=True|False, InstanceTenancy='default'|'dedicated'|'host' )
string
[REQUIRED]
The IPv4 network range for the VPC, in CIDR notation. For example, 10.0.0.0/16.
boolean
Requests an Amazon-provided IPv6 CIDR block with a /56 prefix length for the VPC. You cannot specify the range of IP addresses, or the size of the CIDR block.
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.
string
The tenancy options for instances launched into the VPC. For default, instances are launched with shared tenancy by default. You can launch instances with any tenancy into a shared tenancy VPC. For dedicated, instances are launched as dedicated tenancy instances by default. You can only launch instances with a tenancy of dedicated or host into a dedicated tenancy VPC.
Important: The host value cannot be used with this parameter. Use the default or dedicated values only.
Default: default
dict
Response Syntax
{ 'Vpc': { 'CidrBlock': 'string', 'DhcpOptionsId': 'string', 'State': 'pending'|'available', 'VpcId': 'string', 'InstanceTenancy': 'default'|'dedicated'|'host', 'Ipv6CidrBlockAssociationSet': [ { 'AssociationId': 'string', 'Ipv6CidrBlock': 'string', 'Ipv6CidrBlockState': { 'State': 'associating'|'associated'|'disassociating'|'disassociated'|'failing'|'failed', 'StatusMessage': 'string' } }, ], 'CidrBlockAssociationSet': [ { 'AssociationId': 'string', 'CidrBlock': 'string', 'CidrBlockState': { 'State': 'associating'|'associated'|'disassociating'|'disassociated'|'failing'|'failed', 'StatusMessage': 'string' } }, ], 'IsDefault': True|False, 'Tags': [ { 'Key': 'string', 'Value': 'string' }, ] } }
Response Structure
(dict) --
Contains the output of CreateVpc.
Vpc (dict) --
Information about the VPC.
CidrBlock (string) --
The primary IPv4 CIDR block for the VPC.
DhcpOptionsId (string) --
The ID of the set of DHCP options you've associated with the VPC (or default if the default options are associated with the VPC).
State (string) --
The current state of the VPC.
VpcId (string) --
The ID of the VPC.
InstanceTenancy (string) --
The allowed tenancy of instances launched into the VPC.
Ipv6CidrBlockAssociationSet (list) --
Information about the IPv6 CIDR blocks associated with the VPC.
(dict) --
Describes an IPv6 CIDR block associated with a VPC.
AssociationId (string) --
The association ID for the IPv6 CIDR block.
Ipv6CidrBlock (string) --
The IPv6 CIDR block.
Ipv6CidrBlockState (dict) --
Information about the state of the CIDR block.
State (string) --
The state of the CIDR block.
StatusMessage (string) --
A message about the status of the CIDR block, if applicable.
CidrBlockAssociationSet (list) --
Information about the IPv4 CIDR blocks associated with the VPC.
(dict) --
Describes an IPv4 CIDR block associated with a VPC.
AssociationId (string) --
The association ID for the IPv4 CIDR block.
CidrBlock (string) --
The IPv4 CIDR block.
CidrBlockState (dict) --
Information about the state of the CIDR block.
State (string) --
The state of the CIDR block.
StatusMessage (string) --
A message about the status of the CIDR block, if applicable.
IsDefault (boolean) --
Indicates whether the VPC is the default VPC.
Tags (list) --
Any tags assigned to the VPC.
(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.
{'VpcPeeringConnection': {'AccepterVpcInfo': {'CidrBlockSet': [{'CidrBlock': 'string'}]}, 'RequesterVpcInfo': {'CidrBlockSet': [{'CidrBlock': 'string'}]}}}
Requests a VPC peering connection between two VPCs: a requester VPC that you own and a peer VPC with which to create the connection. The peer VPC can belong to another AWS account. The requester VPC and peer VPC cannot have overlapping CIDR blocks.
The owner of the peer VPC must accept the peering request to activate the peering connection. The VPC peering connection request expires after 7 days, after which it cannot be accepted or rejected.
If you try to create a VPC peering connection between VPCs that have overlapping CIDR blocks, the VPC peering connection status goes to failed.
See also: AWS API Documentation
Request Syntax
client.create_vpc_peering_connection( DryRun=True|False, PeerOwnerId='string', PeerVpcId='string', VpcId='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.
string
The AWS account ID of the owner of the peer VPC.
Default: Your AWS account ID
string
The ID of the VPC with which you are creating the VPC peering connection.
string
The ID of the requester VPC.
dict
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' }, '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' }, '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) --
Contains the output of CreateVpcPeeringConnection.
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 AWS account ID of the VPC owner.
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) --
Indicates whether a local ClassicLink connection can communicate with the peer VPC over the VPC peering connection.
AllowEgressFromLocalVpcToRemoteClassicLink (boolean) --
Indicates whether a local VPC can communicate with a ClassicLink connection in the peer VPC over the VPC peering connection.
VpcId (string) --
The ID of the VPC.
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 AWS account ID of the VPC owner.
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) --
Indicates whether a local ClassicLink connection can communicate with the peer VPC over the VPC peering connection.
AllowEgressFromLocalVpcToRemoteClassicLink (boolean) --
Indicates whether a local VPC can communicate with a ClassicLink connection in the peer VPC over the VPC peering connection.
VpcId (string) --
The ID of the VPC.
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 255 Unicode characters.
VpcPeeringConnectionId (string) --
The ID of the VPC peering connection.
{'VpcPeeringConnections': {'AccepterVpcInfo': {'CidrBlockSet': [{'CidrBlock': 'string'}]}, 'RequesterVpcInfo': {'CidrBlockSet': [{'CidrBlock': 'string'}]}}}
Describes one or more of your VPC peering connections.
See also: AWS API Documentation
Request Syntax
client.describe_vpc_peering_connections( Filters=[ { 'Name': 'string', 'Values': [ 'string', ] }, ], DryRun=True|False, VpcPeeringConnectionIds=[ 'string', ] )
list
One or more filters.
accepter-vpc-info.cidr-block - The IPv4 CIDR block of the peer VPC.
accepter-vpc-info.owner-id - The AWS account ID of the owner of the peer VPC.
accepter-vpc-info.vpc-id - The ID of the peer VPC.
expiration-time - The expiration date and time for the VPC peering connection.
requester-vpc-info.cidr-block - The IPv4 CIDR block of the requester's VPC.
requester-vpc-info.owner-id - The AWS account ID of the owner of the requester VPC.
requester-vpc-info.vpc-id - The ID of the requester VPC.
status-code - The status of the VPC peering connection ( pending-acceptance | failed | expired | provisioning | active | deleted | rejected).
status-message - A message that provides more information about the status of the VPC peering connection, if applicable.
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.
vpc-peering-connection-id - The ID of the VPC peering 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) --
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.
list
One or more VPC peering connection IDs.
Default: Describes all your VPC peering connections.
(string) --
dict
Response Syntax
{ 'VpcPeeringConnections': [ { 'AccepterVpcInfo': { 'CidrBlock': 'string', 'Ipv6CidrBlockSet': [ { 'Ipv6CidrBlock': 'string' }, ], 'CidrBlockSet': [ { 'CidrBlock': 'string' }, ], 'OwnerId': 'string', 'PeeringOptions': { 'AllowDnsResolutionFromRemoteVpc': True|False, 'AllowEgressFromLocalClassicLinkToRemoteVpc': True|False, 'AllowEgressFromLocalVpcToRemoteClassicLink': True|False }, 'VpcId': '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' }, '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) --
Contains the output of DescribeVpcPeeringConnections.
VpcPeeringConnections (list) --
Information about the VPC peering connections.
(dict) --
Describes a 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 AWS account ID of the VPC owner.
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) --
Indicates whether a local ClassicLink connection can communicate with the peer VPC over the VPC peering connection.
AllowEgressFromLocalVpcToRemoteClassicLink (boolean) --
Indicates whether a local VPC can communicate with a ClassicLink connection in the peer VPC over the VPC peering connection.
VpcId (string) --
The ID of the VPC.
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 AWS account ID of the VPC owner.
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) --
Indicates whether a local ClassicLink connection can communicate with the peer VPC over the VPC peering connection.
AllowEgressFromLocalVpcToRemoteClassicLink (boolean) --
Indicates whether a local VPC can communicate with a ClassicLink connection in the peer VPC over the VPC peering connection.
VpcId (string) --
The ID of the VPC.
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 255 Unicode characters.
VpcPeeringConnectionId (string) --
The ID of the VPC peering connection.
{'Vpcs': {'CidrBlockAssociationSet': [{'AssociationId': 'string', 'CidrBlock': 'string', 'CidrBlockState': {'State': 'associating ' '| ' 'associated ' '| ' 'disassociating ' '| ' 'disassociated ' '| failing ' '| failed', 'StatusMessage': 'string'}}]}}
Describes one or more of your VPCs.
See also: AWS API Documentation
Request Syntax
client.describe_vpcs( Filters=[ { 'Name': 'string', 'Values': [ 'string', ] }, ], VpcIds=[ 'string', ], DryRun=True|False )
list
One or more filters.
cidr - The primary IPv4 CIDR block of the VPC. The CIDR block you specify must exactly match the VPC's CIDR block for information to be returned for the VPC. Must contain the slash followed by one or two digits (for example, /28).
cidr-block-association.cidr-block - An IPv4 CIDR block associated with the VPC.
cidr-block-association.association-id - The association ID for an IPv4 CIDR block associated with the VPC.
cidr-block-association.state - The state of an IPv4 CIDR block associated with the VPC.
dhcp-options-id - The ID of a set of DHCP options.
ipv6-cidr-block-association.ipv6-cidr-block - An IPv6 CIDR block associated with the VPC.
ipv6-cidr-block-association.association-id - The association ID for an IPv6 CIDR block associated with the VPC.
ipv6-cidr-block-association.state - The state of an IPv6 CIDR block associated with the VPC.
isDefault - Indicates whether the VPC is the default VPC.
state - The state of the VPC ( pending | available).
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.
vpc-id - The ID of the VPC.
(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 VPC IDs.
Default: Describes all your VPCs.
(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
{ 'Vpcs': [ { 'CidrBlock': 'string', 'DhcpOptionsId': 'string', 'State': 'pending'|'available', 'VpcId': 'string', 'InstanceTenancy': 'default'|'dedicated'|'host', 'Ipv6CidrBlockAssociationSet': [ { 'AssociationId': 'string', 'Ipv6CidrBlock': 'string', 'Ipv6CidrBlockState': { 'State': 'associating'|'associated'|'disassociating'|'disassociated'|'failing'|'failed', 'StatusMessage': 'string' } }, ], 'CidrBlockAssociationSet': [ { 'AssociationId': 'string', 'CidrBlock': 'string', 'CidrBlockState': { 'State': 'associating'|'associated'|'disassociating'|'disassociated'|'failing'|'failed', 'StatusMessage': 'string' } }, ], 'IsDefault': True|False, 'Tags': [ { 'Key': 'string', 'Value': 'string' }, ] }, ] }
Response Structure
(dict) --
Contains the output of DescribeVpcs.
Vpcs (list) --
Information about one or more VPCs.
(dict) --
Describes a VPC.
CidrBlock (string) --
The primary IPv4 CIDR block for the VPC.
DhcpOptionsId (string) --
The ID of the set of DHCP options you've associated with the VPC (or default if the default options are associated with the VPC).
State (string) --
The current state of the VPC.
VpcId (string) --
The ID of the VPC.
InstanceTenancy (string) --
The allowed tenancy of instances launched into the VPC.
Ipv6CidrBlockAssociationSet (list) --
Information about the IPv6 CIDR blocks associated with the VPC.
(dict) --
Describes an IPv6 CIDR block associated with a VPC.
AssociationId (string) --
The association ID for the IPv6 CIDR block.
Ipv6CidrBlock (string) --
The IPv6 CIDR block.
Ipv6CidrBlockState (dict) --
Information about the state of the CIDR block.
State (string) --
The state of the CIDR block.
StatusMessage (string) --
A message about the status of the CIDR block, if applicable.
CidrBlockAssociationSet (list) --
Information about the IPv4 CIDR blocks associated with the VPC.
(dict) --
Describes an IPv4 CIDR block associated with a VPC.
AssociationId (string) --
The association ID for the IPv4 CIDR block.
CidrBlock (string) --
The IPv4 CIDR block.
CidrBlockState (dict) --
Information about the state of the CIDR block.
State (string) --
The state of the CIDR block.
StatusMessage (string) --
A message about the status of the CIDR block, if applicable.
IsDefault (boolean) --
Indicates whether the VPC is the default VPC.
Tags (list) --
Any tags assigned to the VPC.
(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.
{'CidrBlockAssociation': {'AssociationId': 'string', 'CidrBlock': 'string', 'CidrBlockState': {'State': 'associating | ' 'associated | ' 'disassociating | ' 'disassociated | failing ' '| failed', 'StatusMessage': 'string'}}}
Disassociates a CIDR block from a VPC. To disassociate the CIDR block, you must specify its association ID. You can get the association ID by using DescribeVpcs. You must detach or delete all gateways and resources that are associated with the CIDR block before you can disassociate it.
You cannot disassociate the CIDR block with which you originally created the VPC (the primary CIDR block).
See also: AWS API Documentation
Request Syntax
client.disassociate_vpc_cidr_block( AssociationId='string' )
string
[REQUIRED]
The association ID for the CIDR block.
dict
Response Syntax
{ 'Ipv6CidrBlockAssociation': { 'AssociationId': 'string', 'Ipv6CidrBlock': 'string', 'Ipv6CidrBlockState': { 'State': 'associating'|'associated'|'disassociating'|'disassociated'|'failing'|'failed', 'StatusMessage': 'string' } }, 'CidrBlockAssociation': { 'AssociationId': 'string', 'CidrBlock': 'string', 'CidrBlockState': { 'State': 'associating'|'associated'|'disassociating'|'disassociated'|'failing'|'failed', 'StatusMessage': 'string' } }, 'VpcId': 'string' }
Response Structure
(dict) --
Ipv6CidrBlockAssociation (dict) --
Information about the IPv6 CIDR block association.
AssociationId (string) --
The association ID for the IPv6 CIDR block.
Ipv6CidrBlock (string) --
The IPv6 CIDR block.
Ipv6CidrBlockState (dict) --
Information about the state of the CIDR block.
State (string) --
The state of the CIDR block.
StatusMessage (string) --
A message about the status of the CIDR block, if applicable.
CidrBlockAssociation (dict) --
Information about the IPv4 CIDR block association.
AssociationId (string) --
The association ID for the IPv4 CIDR block.
CidrBlock (string) --
The IPv4 CIDR block.
CidrBlockState (dict) --
Information about the state of the CIDR block.
State (string) --
The state of the CIDR block.
StatusMessage (string) --
A message about the status of the CIDR block, if applicable.
VpcId (string) --
The ID of the VPC.