2020/06/29 - Amazon Elastic Compute Cloud - 7 new3 updated api methods
Changes Update ec2 client to latest version
Gets information about the resources that are associated with the specified managed prefix list.
See also: AWS API Documentation
Request Syntax
client.get_managed_prefix_list_associations( DryRun=True|False, PrefixListId='string', MaxResults=123, NextToken='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
[REQUIRED]
The ID of the prefix list.
integer
The maximum number of results to return with a single call. To retrieve the remaining results, make another call with the returned nextToken value.
string
The token for the next page of results.
dict
Response Syntax
{ 'PrefixListAssociations': [ { 'ResourceId': 'string', 'ResourceOwner': 'string' }, ], 'NextToken': 'string' }
Response Structure
(dict) --
PrefixListAssociations (list) --
Information about the associations.
(dict) --
Describes the resource with which a prefix list is associated.
ResourceId (string) --
The ID of the resource.
ResourceOwner (string) --
The owner of the resource.
NextToken (string) --
The token to use to retrieve the next page of results. This value is null when there are no more results to return.
Modifies the specified managed prefix list.
Adding or removing entries in a prefix list creates a new version of the prefix list. Changing the name of the prefix list does not affect the version.
If you specify a current version number that does not match the true current version number, the request fails.
See also: AWS API Documentation
Request Syntax
client.modify_managed_prefix_list( DryRun=True|False, PrefixListId='string', CurrentVersion=123, PrefixListName='string', AddEntries=[ { 'Cidr': 'string', 'Description': 'string' }, ], RemoveEntries=[ { 'Cidr': '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
[REQUIRED]
The ID of the prefix list.
integer
The current version of the prefix list.
string
A name for the prefix list.
list
One or more entries to add to the prefix list.
(dict) --
An entry for a prefix list.
Cidr (string) -- [REQUIRED]
The CIDR block.
Description (string) --
A description for the entry.
Constraints: Up to 255 characters in length.
list
One or more entries to remove from the prefix list.
(dict) --
An entry for a prefix list.
Cidr (string) -- [REQUIRED]
The CIDR block.
dict
Response Syntax
{ 'PrefixList': { 'PrefixListId': 'string', 'AddressFamily': 'string', 'State': 'create-in-progress'|'create-complete'|'create-failed'|'modify-in-progress'|'modify-complete'|'modify-failed'|'restore-in-progress'|'restore-complete'|'restore-failed'|'delete-in-progress'|'delete-complete'|'delete-failed', 'StateMessage': 'string', 'PrefixListArn': 'string', 'PrefixListName': 'string', 'MaxEntries': 123, 'Version': 123, 'Tags': [ { 'Key': 'string', 'Value': 'string' }, ], 'OwnerId': 'string' } }
Response Structure
(dict) --
PrefixList (dict) --
Information about the prefix list.
PrefixListId (string) --
The ID of the prefix list.
AddressFamily (string) --
The IP address version.
State (string) --
The state of the prefix list.
StateMessage (string) --
The state message.
PrefixListArn (string) --
The Amazon Resource Name (ARN) for the prefix list.
PrefixListName (string) --
The name of the prefix list.
MaxEntries (integer) --
The maximum number of entries for the prefix list.
Version (integer) --
The version of the prefix list.
Tags (list) --
The tags for the prefix list.
(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.
OwnerId (string) --
The ID of the owner of the prefix list.
Gets information about the entries for a specified managed prefix list.
See also: AWS API Documentation
Request Syntax
client.get_managed_prefix_list_entries( DryRun=True|False, PrefixListId='string', TargetVersion=123, MaxResults=123, NextToken='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
[REQUIRED]
The ID of the prefix list.
integer
The version of the prefix list for which to return the entries. The default is the current version.
integer
The maximum number of results to return with a single call. To retrieve the remaining results, make another call with the returned nextToken value.
string
The token for the next page of results.
dict
Response Syntax
{ 'Entries': [ { 'Cidr': 'string', 'Description': 'string' }, ], 'NextToken': 'string' }
Response Structure
(dict) --
Entries (list) --
Information about the prefix list entries.
(dict) --
Describes a prefix list entry.
Cidr (string) --
The CIDR block.
Description (string) --
The description.
NextToken (string) --
The token to use to retrieve the next page of results. This value is null when there are no more results to return.
Restores the entries from a previous version of a managed prefix list to a new version of the prefix list.
See also: AWS API Documentation
Request Syntax
client.restore_managed_prefix_list_version( DryRun=True|False, PrefixListId='string', PreviousVersion=123, CurrentVersion=123 )
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
[REQUIRED]
The ID of the prefix list.
integer
[REQUIRED]
The version to restore.
integer
[REQUIRED]
The current version number for the prefix list.
dict
Response Syntax
{ 'PrefixList': { 'PrefixListId': 'string', 'AddressFamily': 'string', 'State': 'create-in-progress'|'create-complete'|'create-failed'|'modify-in-progress'|'modify-complete'|'modify-failed'|'restore-in-progress'|'restore-complete'|'restore-failed'|'delete-in-progress'|'delete-complete'|'delete-failed', 'StateMessage': 'string', 'PrefixListArn': 'string', 'PrefixListName': 'string', 'MaxEntries': 123, 'Version': 123, 'Tags': [ { 'Key': 'string', 'Value': 'string' }, ], 'OwnerId': 'string' } }
Response Structure
(dict) --
PrefixList (dict) --
Information about the prefix list.
PrefixListId (string) --
The ID of the prefix list.
AddressFamily (string) --
The IP address version.
State (string) --
The state of the prefix list.
StateMessage (string) --
The state message.
PrefixListArn (string) --
The Amazon Resource Name (ARN) for the prefix list.
PrefixListName (string) --
The name of the prefix list.
MaxEntries (integer) --
The maximum number of entries for the prefix list.
Version (integer) --
The version of the prefix list.
Tags (list) --
The tags for the prefix list.
(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.
OwnerId (string) --
The ID of the owner of the prefix list.
Describes your managed prefix lists and any AWS-managed prefix lists.
To view the entries for your prefix list, use GetManagedPrefixListEntries.
See also: AWS API Documentation
Request Syntax
client.describe_managed_prefix_lists( DryRun=True|False, Filters=[ { 'Name': 'string', 'Values': [ 'string', ] }, ], MaxResults=123, NextToken='string', PrefixListIds=[ '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 filters.
owner-id - The ID of the prefix list owner.
prefix-list-id - The ID of the prefix list.
prefix-list-name - The name of the prefix list.
(dict) --
A filter name and value pair that is used to return a more specific list of results from a describe operation. Filters can be used to match a set of resources by specific criteria, such as tags, attributes, or IDs. The filters supported by a describe operation are documented with the describe operation. For example:
DescribeAvailabilityZones
DescribeImages
DescribeInstances
DescribeKeyPairs
DescribeSecurityGroups
DescribeSnapshots
DescribeSubnets
DescribeTags
DescribeVolumes
DescribeVpcs
Name (string) --
The name of the filter. Filter names are case-sensitive.
Values (list) --
The filter values. Filter values are case-sensitive.
(string) --
integer
The maximum number of results to return with a single call. To retrieve the remaining results, make another call with the returned nextToken value.
string
The token for the next page of results.
list
One or more prefix list IDs.
(string) --
dict
Response Syntax
{ 'NextToken': 'string', 'PrefixLists': [ { 'PrefixListId': 'string', 'AddressFamily': 'string', 'State': 'create-in-progress'|'create-complete'|'create-failed'|'modify-in-progress'|'modify-complete'|'modify-failed'|'restore-in-progress'|'restore-complete'|'restore-failed'|'delete-in-progress'|'delete-complete'|'delete-failed', 'StateMessage': 'string', 'PrefixListArn': 'string', 'PrefixListName': 'string', 'MaxEntries': 123, 'Version': 123, 'Tags': [ { 'Key': 'string', 'Value': 'string' }, ], 'OwnerId': 'string' }, ] }
Response Structure
(dict) --
NextToken (string) --
The token to use to retrieve the next page of results. This value is null when there are no more results to return.
PrefixLists (list) --
Information about the prefix lists.
(dict) --
Describes a managed prefix list.
PrefixListId (string) --
The ID of the prefix list.
AddressFamily (string) --
The IP address version.
State (string) --
The state of the prefix list.
StateMessage (string) --
The state message.
PrefixListArn (string) --
The Amazon Resource Name (ARN) for the prefix list.
PrefixListName (string) --
The name of the prefix list.
MaxEntries (integer) --
The maximum number of entries for the prefix list.
Version (integer) --
The version of the prefix list.
Tags (list) --
The tags for the prefix list.
(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.
OwnerId (string) --
The ID of the owner of the prefix list.
Creates a managed prefix list. You can specify one or more entries for the prefix list. Each entry consists of a CIDR block and an optional description.
You must specify the maximum number of entries for the prefix list. The maximum number of entries cannot be changed later.
See also: AWS API Documentation
Request Syntax
client.create_managed_prefix_list( DryRun=True|False, PrefixListName='string', Entries=[ { 'Cidr': 'string', 'Description': 'string' }, ], MaxEntries=123, TagSpecifications=[ { 'ResourceType': 'client-vpn-endpoint'|'customer-gateway'|'dedicated-host'|'dhcp-options'|'elastic-ip'|'elastic-gpu'|'export-image-task'|'export-instance-task'|'fleet'|'fpga-image'|'host-reservation'|'image'|'import-image-task'|'import-snapshot-task'|'instance'|'internet-gateway'|'key-pair'|'launch-template'|'local-gateway-route-table-vpc-association'|'natgateway'|'network-acl'|'network-interface'|'placement-group'|'reserved-instances'|'route-table'|'security-group'|'snapshot'|'spot-fleet-request'|'spot-instances-request'|'subnet'|'traffic-mirror-filter'|'traffic-mirror-session'|'traffic-mirror-target'|'transit-gateway'|'transit-gateway-attachment'|'transit-gateway-multicast-domain'|'transit-gateway-route-table'|'volume'|'vpc'|'vpc-peering-connection'|'vpn-connection'|'vpn-gateway'|'vpc-flow-log', 'Tags': [ { 'Key': 'string', 'Value': 'string' }, ] }, ], AddressFamily='string', ClientToken='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
[REQUIRED]
A name for the prefix list.
Constraints: Up to 255 characters in length. The name cannot start with com.amazonaws.
list
One or more entries for the prefix list.
(dict) --
An entry for a prefix list.
Cidr (string) -- [REQUIRED]
The CIDR block.
Description (string) --
A description for the entry.
Constraints: Up to 255 characters in length.
integer
[REQUIRED]
The maximum number of entries for the prefix list.
list
The tags to apply to the prefix list during creation.
(dict) --
The tags to apply to a resource when the resource is being created.
ResourceType (string) --
The type of resource to tag. Currently, the resource types that support tagging on creation are: capacity-reservation | client-vpn-endpoint | dedicated-host | fleet | fpga-image | host-reservation | instance | ipv4pool-ec2 | ipv6pool-ec2 | key-pair | launch-template | natgateway | spot-fleet-request | placement-group | prefix-list | snapshot | traffic-mirror-filter | traffic-mirror-session | traffic-mirror-target | transit-gateway | transit-gateway-attachment | transit-gateway-route-table | vpc-endpoint (for interface and gateway endpoints) | vpc-endpoint-service (for AWS PrivateLink) | volume | vpc-flow-log.
To tag a resource after it has been created, see CreateTags.
Tags (list) --
The tags to apply 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.
string
[REQUIRED]
The IP address type.
Valid Values: IPv4 | IPv6
string
Unique, case-sensitive identifier you provide to ensure the idempotency of the request. For more information, see Ensuring Idempotency.
Constraints: Up to 255 UTF-8 characters in length.
This field is autopopulated if not provided.
dict
Response Syntax
{ 'PrefixList': { 'PrefixListId': 'string', 'AddressFamily': 'string', 'State': 'create-in-progress'|'create-complete'|'create-failed'|'modify-in-progress'|'modify-complete'|'modify-failed'|'restore-in-progress'|'restore-complete'|'restore-failed'|'delete-in-progress'|'delete-complete'|'delete-failed', 'StateMessage': 'string', 'PrefixListArn': 'string', 'PrefixListName': 'string', 'MaxEntries': 123, 'Version': 123, 'Tags': [ { 'Key': 'string', 'Value': 'string' }, ], 'OwnerId': 'string' } }
Response Structure
(dict) --
PrefixList (dict) --
Information about the prefix list.
PrefixListId (string) --
The ID of the prefix list.
AddressFamily (string) --
The IP address version.
State (string) --
The state of the prefix list.
StateMessage (string) --
The state message.
PrefixListArn (string) --
The Amazon Resource Name (ARN) for the prefix list.
PrefixListName (string) --
The name of the prefix list.
MaxEntries (integer) --
The maximum number of entries for the prefix list.
Version (integer) --
The version of the prefix list.
Tags (list) --
The tags for the prefix list.
(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.
OwnerId (string) --
The ID of the owner of the prefix list.
Deletes the specified managed prefix list. You must first remove all references to the prefix list in your resources.
See also: AWS API Documentation
Request Syntax
client.delete_managed_prefix_list( DryRun=True|False, PrefixListId='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
[REQUIRED]
The ID of the prefix list.
dict
Response Syntax
{ 'PrefixList': { 'PrefixListId': 'string', 'AddressFamily': 'string', 'State': 'create-in-progress'|'create-complete'|'create-failed'|'modify-in-progress'|'modify-complete'|'modify-failed'|'restore-in-progress'|'restore-complete'|'restore-failed'|'delete-in-progress'|'delete-complete'|'delete-failed', 'StateMessage': 'string', 'PrefixListArn': 'string', 'PrefixListName': 'string', 'MaxEntries': 123, 'Version': 123, 'Tags': [ { 'Key': 'string', 'Value': 'string' }, ], 'OwnerId': 'string' } }
Response Structure
(dict) --
PrefixList (dict) --
Information about the prefix list.
PrefixListId (string) --
The ID of the prefix list.
AddressFamily (string) --
The IP address version.
State (string) --
The state of the prefix list.
StateMessage (string) --
The state message.
PrefixListArn (string) --
The Amazon Resource Name (ARN) for the prefix list.
PrefixListName (string) --
The name of the prefix list.
MaxEntries (integer) --
The maximum number of entries for the prefix list.
Version (integer) --
The version of the prefix list.
Tags (list) --
The tags for the prefix list.
(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.
OwnerId (string) --
The ID of the owner of the prefix list.
{'DestinationPrefixListId': 'string'}
Creates a route in a route table within a VPC.
You must specify one of the following targets: internet gateway or virtual private gateway, NAT instance, NAT gateway, VPC peering connection, network interface, egress-only internet gateway, or transit gateway.
When determining how to route traffic, we use the route with the most specific match. For example, traffic is destined for the IPv4 address 192.0.2.3, and the route table includes the following two IPv4 routes:
192.0.2.0/24 (goes to some target A)
192.0.2.0/28 (goes to some target B)
Both routes apply to the traffic destined for 192.0.2.3. However, the second route in the list covers a smaller number of IP addresses and is therefore more specific, so we use that route to determine where to target the traffic.
For more information about route tables, see Route Tables in the Amazon Virtual Private Cloud User Guide.
See also: AWS API Documentation
Request Syntax
client.create_route( DestinationCidrBlock='string', DestinationIpv6CidrBlock='string', DestinationPrefixListId='string', DryRun=True|False, EgressOnlyInternetGatewayId='string', GatewayId='string', InstanceId='string', NatGatewayId='string', TransitGatewayId='string', LocalGatewayId='string', NetworkInterfaceId='string', RouteTableId='string', VpcPeeringConnectionId='string' )
string
The IPv4 CIDR address block used for the destination match. Routing decisions are based on the most specific match. We modify the specified CIDR block to its canonical form; for example, if you specify 100.68.0.18/18, we modify it to 100.68.0.0/18.
string
The IPv6 CIDR block used for the destination match. Routing decisions are based on the most specific match.
string
The ID of a prefix list used for the destination match.
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
[IPv6 traffic only] The ID of an egress-only internet gateway.
string
The ID of an internet gateway or virtual private gateway attached to your VPC.
string
The ID of a NAT instance in your VPC. The operation fails if you specify an instance ID unless exactly one network interface is attached.
string
[IPv4 traffic only] The ID of a NAT gateway.
string
The ID of a transit gateway.
string
The ID of the local gateway.
string
The ID of a network interface.
string
[REQUIRED]
The ID of the route table for the route.
string
The ID of a VPC peering connection.
dict
Response Syntax
{ 'Return': True|False }
Response Structure
(dict) --
Return (boolean) --
Returns true if the request succeeds; otherwise, it returns an error.
{'DestinationPrefixListId': 'string'}
Deletes the specified route from the specified route table.
See also: AWS API Documentation
Request Syntax
client.delete_route( DestinationCidrBlock='string', DestinationIpv6CidrBlock='string', DestinationPrefixListId='string', DryRun=True|False, RouteTableId='string' )
string
The IPv4 CIDR range for the route. The value you specify must match the CIDR for the route exactly.
string
The IPv6 CIDR range for the route. The value you specify must match the CIDR for the route exactly.
string
The ID of the prefix list for the route.
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
[REQUIRED]
The ID of the route table.
None
{'DestinationPrefixListId': 'string'}
Replaces an existing route within a route table in a VPC. You must provide only one of the following: internet gateway, virtual private gateway, NAT instance, NAT gateway, VPC peering connection, network interface, egress-only internet gateway, or transit gateway.
For more information, see Route Tables in the Amazon Virtual Private Cloud User Guide.
See also: AWS API Documentation
Request Syntax
client.replace_route( DestinationCidrBlock='string', DestinationIpv6CidrBlock='string', DestinationPrefixListId='string', DryRun=True|False, EgressOnlyInternetGatewayId='string', GatewayId='string', InstanceId='string', LocalTarget=True|False, NatGatewayId='string', TransitGatewayId='string', LocalGatewayId='string', NetworkInterfaceId='string', RouteTableId='string', VpcPeeringConnectionId='string' )
string
The IPv4 CIDR address block used for the destination match. The value that you provide must match the CIDR of an existing route in the table.
string
The IPv6 CIDR address block used for the destination match. The value that you provide must match the CIDR of an existing route in the table.
string
The ID of the prefix list for the route.
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
[IPv6 traffic only] The ID of an egress-only internet gateway.
string
The ID of an internet gateway or virtual private gateway.
string
The ID of a NAT instance in your VPC.
boolean
Specifies whether to reset the local route to its default target ( local).
string
[IPv4 traffic only] The ID of a NAT gateway.
string
The ID of a transit gateway.
string
The ID of the local gateway.
string
The ID of a network interface.
string
[REQUIRED]
The ID of the route table.
string
The ID of a VPC peering connection.
None