2024/07/10 - Amazon Elastic Compute Cloud - 6 updated api methods
Changes Add parameters to enable provisioning IPAM BYOIPv4 space at a Local Zone Network Border Group level
{'NetworkBorderGroup': 'string'}
Creates a public IPv4 address pool. A public IPv4 pool is an EC2 IP address pool required for the public IPv4 CIDRs that you own and bring to Amazon Web Services to manage with IPAM. IPv6 addresses you bring to Amazon Web Services, however, use IPAM pools only. To monitor the status of pool creation, use DescribePublicIpv4Pools.
See also: AWS API Documentation
Request Syntax
client.create_public_ipv4_pool( DryRun=True|False, TagSpecifications=[ { 'ResourceType': 'capacity-reservation'|'client-vpn-endpoint'|'customer-gateway'|'carrier-gateway'|'coip-pool'|'dedicated-host'|'dhcp-options'|'egress-only-internet-gateway'|'elastic-ip'|'elastic-gpu'|'export-image-task'|'export-instance-task'|'fleet'|'fpga-image'|'host-reservation'|'image'|'import-image-task'|'import-snapshot-task'|'instance'|'instance-event-window'|'internet-gateway'|'ipam'|'ipam-pool'|'ipam-scope'|'ipv4pool-ec2'|'ipv6pool-ec2'|'key-pair'|'launch-template'|'local-gateway'|'local-gateway-route-table'|'local-gateway-virtual-interface'|'local-gateway-virtual-interface-group'|'local-gateway-route-table-vpc-association'|'local-gateway-route-table-virtual-interface-group-association'|'natgateway'|'network-acl'|'network-interface'|'network-insights-analysis'|'network-insights-path'|'network-insights-access-scope'|'network-insights-access-scope-analysis'|'placement-group'|'prefix-list'|'replace-root-volume-task'|'reserved-instances'|'route-table'|'security-group'|'security-group-rule'|'snapshot'|'spot-fleet-request'|'spot-instances-request'|'subnet'|'subnet-cidr-reservation'|'traffic-mirror-filter'|'traffic-mirror-session'|'traffic-mirror-target'|'transit-gateway'|'transit-gateway-attachment'|'transit-gateway-connect-peer'|'transit-gateway-multicast-domain'|'transit-gateway-policy-table'|'transit-gateway-route-table'|'transit-gateway-route-table-announcement'|'volume'|'vpc'|'vpc-endpoint'|'vpc-endpoint-connection'|'vpc-endpoint-service'|'vpc-endpoint-service-permission'|'vpc-peering-connection'|'vpn-connection'|'vpn-gateway'|'vpc-flow-log'|'capacity-reservation-fleet'|'traffic-mirror-filter-rule'|'vpc-endpoint-connection-device-type'|'verified-access-instance'|'verified-access-group'|'verified-access-endpoint'|'verified-access-policy'|'verified-access-trust-provider'|'vpn-connection-device-type'|'vpc-block-public-access-exclusion'|'vpc-encryption-control'|'ipam-resource-discovery'|'ipam-resource-discovery-association'|'instance-connect-endpoint', 'Tags': [ { 'Key': 'string', 'Value': 'string' }, ] }, ], NetworkBorderGroup='string' )
boolean
A check for 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
The key/value combination of a tag assigned to the resource. Use the tag key in the filter name and the tag value as the filter value. For example, to find all resources that have a tag with the key Owner and the value TeamA , specify tag:Owner for the filter name and TeamA for the filter value.
(dict) --
The tags to apply to a resource when the resource is being created. When you specify a tag, you must specify the resource type to tag, otherwise the request will fail.
Note
The Valid Values lists all the resource types that can be tagged. However, the action you're using might not support tagging all of these resource types. If you try to tag a resource type that is unsupported for the action you're using, you'll get an error.
ResourceType (string) --
The type of resource to tag on creation.
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 256 Unicode characters.
string
The Availability Zone (AZ) or Local Zone (LZ) network border group that the resource that the IP address is assigned to is in. Defaults to an AZ network border group. For more information on available Local Zones, see Local Zone availability in the Amazon EC2 User Guide .
dict
Response Syntax
{ 'PoolId': 'string' }
Response Structure
(dict) --
PoolId (string) --
The ID of the public IPv4 pool.
{'NetworkBorderGroup': 'string'}
Delete a public IPv4 pool. A public IPv4 pool is an EC2 IP address pool required for the public IPv4 CIDRs that you own and bring to Amazon Web Services to manage with IPAM. IPv6 addresses you bring to Amazon Web Services, however, use IPAM pools only.
See also: AWS API Documentation
Request Syntax
client.delete_public_ipv4_pool( DryRun=True|False, PoolId='string', NetworkBorderGroup='string' )
boolean
A check for 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 public IPv4 pool you want to delete.
string
The Availability Zone (AZ) or Local Zone (LZ) network border group that the resource that the IP address is assigned to is in. Defaults to an AZ network border group. For more information on available Local Zones, see Local Zone availability in the Amazon EC2 User Guide .
dict
Response Syntax
{ 'ReturnValue': True|False }
Response Structure
(dict) --
ReturnValue (boolean) --
Information about the result of deleting the public IPv4 pool.
{'IpamDiscoveredResourceCidrs': {'AvailabilityZoneId': 'string', 'NetworkInterfaceAttachmentStatus': 'available ' '| ' 'in-use'}}
Returns the resource CIDRs that are monitored as part of a resource discovery. A discovered resource is a resource CIDR monitored under a resource discovery. The following resources can be discovered: VPCs, Public IPv4 pools, VPC subnets, and Elastic IP addresses.
See also: AWS API Documentation
Request Syntax
client.get_ipam_discovered_resource_cidrs( DryRun=True|False, IpamResourceDiscoveryId='string', ResourceRegion='string', Filters=[ { 'Name': 'string', 'Values': [ 'string', ] }, ], NextToken='string', MaxResults=123 )
boolean
A check for 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 resource discovery ID.
string
[REQUIRED]
A resource Region.
list
Filters.
(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.
If you specify multiple filters, the filters are joined with an AND , and the request returns only results that match all of the specified filters.
Name (string) --
The name of the filter. Filter names are case-sensitive.
Values (list) --
The filter values. Filter values are case-sensitive. If you specify multiple values for a filter, the values are joined with an OR , and the request returns all results that match any of the specified values.
(string) --
string
Specify the pagination token from a previous request to retrieve the next page of results.
integer
The maximum number of discovered resource CIDRs to return in one page of results.
dict
Response Syntax
{ 'IpamDiscoveredResourceCidrs': [ { 'IpamResourceDiscoveryId': 'string', 'ResourceRegion': 'string', 'ResourceId': 'string', 'ResourceOwnerId': 'string', 'ResourceCidr': 'string', 'ResourceType': 'vpc'|'subnet'|'eip'|'public-ipv4-pool'|'ipv6-pool'|'eni', 'ResourceTags': [ { 'Key': 'string', 'Value': 'string' }, ], 'IpUsage': 123.0, 'VpcId': 'string', 'NetworkInterfaceAttachmentStatus': 'available'|'in-use', 'SampleTime': datetime(2015, 1, 1), 'AvailabilityZoneId': 'string' }, ], 'NextToken': 'string' }
Response Structure
(dict) --
IpamDiscoveredResourceCidrs (list) --
Discovered resource CIDRs.
(dict) --
An IPAM discovered resource CIDR. A discovered resource is a resource CIDR monitored under a resource discovery. The following resources can be discovered: VPCs, Public IPv4 pools, VPC subnets, and Elastic IP addresses. The discovered resource CIDR is the IP address range in CIDR notation that is associated with the resource.
IpamResourceDiscoveryId (string) --
The resource discovery ID.
ResourceRegion (string) --
The resource Region.
ResourceId (string) --
The resource ID.
ResourceOwnerId (string) --
The resource owner ID.
ResourceCidr (string) --
The resource CIDR.
ResourceType (string) --
The resource type.
ResourceTags (list) --
The resource tags.
(dict) --
The key/value combination of a tag assigned to the resource. Use the tag key in the filter name and the tag value as the filter value. For example, to find all resources that have a tag with the key Owner and the value TeamA , specify tag:Owner for the filter name and TeamA for the filter value.
Key (string) --
The key of a tag assigned to the resource. Use this filter to find all resources assigned a tag with a specific key, regardless of the tag value.
Value (string) --
The value of the tag.
IpUsage (float) --
The percentage of IP address space in use. To convert the decimal to a percentage, multiply the decimal by 100. Note the following:
For resources that are VPCs, this is the percentage of IP address space in the VPC that's taken up by subnet CIDRs.
For resources that are subnets, if the subnet has an IPv4 CIDR provisioned to it, this is the percentage of IPv4 address space in the subnet that's in use. If the subnet has an IPv6 CIDR provisioned to it, the percentage of IPv6 address space in use is not represented. The percentage of IPv6 address space in use cannot currently be calculated.
For resources that are public IPv4 pools, this is the percentage of IP address space in the pool that's been allocated to Elastic IP addresses (EIPs).
VpcId (string) --
The VPC ID.
NetworkInterfaceAttachmentStatus (string) --
For elastic IP addresses, this is the status of an attached network interface.
SampleTime (datetime) --
The last successful resource discovery time.
AvailabilityZoneId (string) --
The Availability Zone ID.
NextToken (string) --
Specify the pagination token from a previous request to retrieve the next page of results.
{'IpamResourceCidrs': {'AvailabilityZoneId': 'string'}}
Returns resource CIDRs managed by IPAM in a given scope. If an IPAM is associated with more than one resource discovery, the resource CIDRs across all of the resource discoveries is returned. A resource discovery is an IPAM component that enables IPAM to manage and monitor resources that belong to the owning account.
See also: AWS API Documentation
Request Syntax
client.get_ipam_resource_cidrs( DryRun=True|False, Filters=[ { 'Name': 'string', 'Values': [ 'string', ] }, ], MaxResults=123, NextToken='string', IpamScopeId='string', IpamPoolId='string', ResourceId='string', ResourceType='vpc'|'subnet'|'eip'|'public-ipv4-pool'|'ipv6-pool'|'eni', ResourceTag={ 'Key': 'string', 'Value': 'string' }, ResourceOwner='string' )
boolean
A check for 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 for the request. For more information about filtering, see Filtering CLI output.
(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.
If you specify multiple filters, the filters are joined with an AND , and the request returns only results that match all of the specified filters.
Name (string) --
The name of the filter. Filter names are case-sensitive.
Values (list) --
The filter values. Filter values are case-sensitive. If you specify multiple values for a filter, the values are joined with an OR , and the request returns all results that match any of the specified values.
(string) --
integer
The maximum number of results to return in the request.
string
The token for the next page of results.
string
[REQUIRED]
The ID of the scope that the resource is in.
string
The ID of the IPAM pool that the resource is in.
string
The ID of the resource.
string
The resource type.
dict
The resource tag.
Key (string) --
The key of a tag assigned to the resource. Use this filter to find all resources assigned a tag with a specific key, regardless of the tag value.
Value (string) --
The value for the tag.
string
The ID of the Amazon Web Services account that owns the resource.
dict
Response Syntax
{ 'NextToken': 'string', 'IpamResourceCidrs': [ { 'IpamId': 'string', 'IpamScopeId': 'string', 'IpamPoolId': 'string', 'ResourceRegion': 'string', 'ResourceOwnerId': 'string', 'ResourceId': 'string', 'ResourceName': 'string', 'ResourceCidr': 'string', 'ResourceType': 'vpc'|'subnet'|'eip'|'public-ipv4-pool'|'ipv6-pool'|'eni', 'ResourceTags': [ { 'Key': 'string', 'Value': 'string' }, ], 'IpUsage': 123.0, 'ComplianceStatus': 'compliant'|'noncompliant'|'unmanaged'|'ignored', 'ManagementState': 'managed'|'unmanaged'|'ignored', 'OverlapStatus': 'overlapping'|'nonoverlapping'|'ignored', 'VpcId': 'string', 'AvailabilityZoneId': '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.
IpamResourceCidrs (list) --
The resource CIDRs.
(dict) --
The CIDR for an IPAM resource.
IpamId (string) --
The IPAM ID for an IPAM resource.
IpamScopeId (string) --
The scope ID for an IPAM resource.
IpamPoolId (string) --
The pool ID for an IPAM resource.
ResourceRegion (string) --
The Amazon Web Services Region for an IPAM resource.
ResourceOwnerId (string) --
The Amazon Web Services account number of the owner of an IPAM resource.
ResourceId (string) --
The ID of an IPAM resource.
ResourceName (string) --
The name of an IPAM resource.
ResourceCidr (string) --
The CIDR for an IPAM resource.
ResourceType (string) --
The type of IPAM resource.
ResourceTags (list) --
The tags for an IPAM resource.
(dict) --
The key/value combination of a tag assigned to the resource. Use the tag key in the filter name and the tag value as the filter value. For example, to find all resources that have a tag with the key Owner and the value TeamA , specify tag:Owner for the filter name and TeamA for the filter value.
Key (string) --
The key of a tag assigned to the resource. Use this filter to find all resources assigned a tag with a specific key, regardless of the tag value.
Value (string) --
The value of the tag.
IpUsage (float) --
The percentage of IP address space in use. To convert the decimal to a percentage, multiply the decimal by 100. Note the following:
For resources that are VPCs, this is the percentage of IP address space in the VPC that's taken up by subnet CIDRs.
For resources that are subnets, if the subnet has an IPv4 CIDR provisioned to it, this is the percentage of IPv4 address space in the subnet that's in use. If the subnet has an IPv6 CIDR provisioned to it, the percentage of IPv6 address space in use is not represented. The percentage of IPv6 address space in use cannot currently be calculated.
For resources that are public IPv4 pools, this is the percentage of IP address space in the pool that's been allocated to Elastic IP addresses (EIPs).
ComplianceStatus (string) --
The compliance status of the IPAM resource. For more information on compliance statuses, see Monitor CIDR usage by resource in the Amazon VPC IPAM User Guide .
ManagementState (string) --
The management state of the resource. For more information about management states, see Monitor CIDR usage by resource in the Amazon VPC IPAM User Guide .
OverlapStatus (string) --
The overlap status of an IPAM resource. The overlap status tells you if the CIDR for a resource overlaps with another CIDR in the scope. For more information on overlap statuses, see Monitor CIDR usage by resource in the Amazon VPC IPAM User Guide .
VpcId (string) --
The ID of a VPC.
AvailabilityZoneId (string) --
The Availability Zone ID.
{'IpamResourceCidr': {'AvailabilityZoneId': 'string'}}
Modify a resource CIDR. You can use this action to transfer resource CIDRs between scopes and ignore resource CIDRs that you do not want to manage. If set to false, the resource will not be tracked for overlap, it cannot be auto-imported into a pool, and it will be removed from any pool it has an allocation in.
For more information, see Move resource CIDRs between scopes and Change the monitoring state of resource CIDRs in the Amazon VPC IPAM User Guide .
See also: AWS API Documentation
Request Syntax
client.modify_ipam_resource_cidr( DryRun=True|False, ResourceId='string', ResourceCidr='string', ResourceRegion='string', CurrentIpamScopeId='string', DestinationIpamScopeId='string', Monitored=True|False )
boolean
A check for 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 resource you want to modify.
string
[REQUIRED]
The CIDR of the resource you want to modify.
string
[REQUIRED]
The Amazon Web Services Region of the resource you want to modify.
string
[REQUIRED]
The ID of the current scope that the resource CIDR is in.
string
The ID of the scope you want to transfer the resource CIDR to.
boolean
[REQUIRED]
Determines if the resource is monitored by IPAM. If a resource is monitored, the resource is discovered by IPAM and you can view details about the resource’s CIDR.
dict
Response Syntax
{ 'IpamResourceCidr': { 'IpamId': 'string', 'IpamScopeId': 'string', 'IpamPoolId': 'string', 'ResourceRegion': 'string', 'ResourceOwnerId': 'string', 'ResourceId': 'string', 'ResourceName': 'string', 'ResourceCidr': 'string', 'ResourceType': 'vpc'|'subnet'|'eip'|'public-ipv4-pool'|'ipv6-pool'|'eni', 'ResourceTags': [ { 'Key': 'string', 'Value': 'string' }, ], 'IpUsage': 123.0, 'ComplianceStatus': 'compliant'|'noncompliant'|'unmanaged'|'ignored', 'ManagementState': 'managed'|'unmanaged'|'ignored', 'OverlapStatus': 'overlapping'|'nonoverlapping'|'ignored', 'VpcId': 'string', 'AvailabilityZoneId': 'string' } }
Response Structure
(dict) --
IpamResourceCidr (dict) --
The CIDR of the resource.
IpamId (string) --
The IPAM ID for an IPAM resource.
IpamScopeId (string) --
The scope ID for an IPAM resource.
IpamPoolId (string) --
The pool ID for an IPAM resource.
ResourceRegion (string) --
The Amazon Web Services Region for an IPAM resource.
ResourceOwnerId (string) --
The Amazon Web Services account number of the owner of an IPAM resource.
ResourceId (string) --
The ID of an IPAM resource.
ResourceName (string) --
The name of an IPAM resource.
ResourceCidr (string) --
The CIDR for an IPAM resource.
ResourceType (string) --
The type of IPAM resource.
ResourceTags (list) --
The tags for an IPAM resource.
(dict) --
The key/value combination of a tag assigned to the resource. Use the tag key in the filter name and the tag value as the filter value. For example, to find all resources that have a tag with the key Owner and the value TeamA , specify tag:Owner for the filter name and TeamA for the filter value.
Key (string) --
The key of a tag assigned to the resource. Use this filter to find all resources assigned a tag with a specific key, regardless of the tag value.
Value (string) --
The value of the tag.
IpUsage (float) --
The percentage of IP address space in use. To convert the decimal to a percentage, multiply the decimal by 100. Note the following:
For resources that are VPCs, this is the percentage of IP address space in the VPC that's taken up by subnet CIDRs.
For resources that are subnets, if the subnet has an IPv4 CIDR provisioned to it, this is the percentage of IPv4 address space in the subnet that's in use. If the subnet has an IPv6 CIDR provisioned to it, the percentage of IPv6 address space in use is not represented. The percentage of IPv6 address space in use cannot currently be calculated.
For resources that are public IPv4 pools, this is the percentage of IP address space in the pool that's been allocated to Elastic IP addresses (EIPs).
ComplianceStatus (string) --
The compliance status of the IPAM resource. For more information on compliance statuses, see Monitor CIDR usage by resource in the Amazon VPC IPAM User Guide .
ManagementState (string) --
The management state of the resource. For more information about management states, see Monitor CIDR usage by resource in the Amazon VPC IPAM User Guide .
OverlapStatus (string) --
The overlap status of an IPAM resource. The overlap status tells you if the CIDR for a resource overlaps with another CIDR in the scope. For more information on overlap statuses, see Monitor CIDR usage by resource in the Amazon VPC IPAM User Guide .
VpcId (string) --
The ID of a VPC.
AvailabilityZoneId (string) --
The Availability Zone ID.
{'NetworkBorderGroup': 'string'}
Provision a CIDR to a public IPv4 pool.
For more information about IPAM, see What is IPAM? in the Amazon VPC IPAM User Guide .
See also: AWS API Documentation
Request Syntax
client.provision_public_ipv4_pool_cidr( DryRun=True|False, IpamPoolId='string', PoolId='string', NetmaskLength=123, NetworkBorderGroup='string' )
boolean
A check for 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 IPAM pool you would like to use to allocate this CIDR.
string
[REQUIRED]
The ID of the public IPv4 pool you would like to use for this CIDR.
integer
[REQUIRED]
The netmask length of the CIDR you would like to allocate to the public IPv4 pool.
string
The Availability Zone (AZ) or Local Zone (LZ) network border group that the resource that the IP address is assigned to is in. Defaults to an AZ network border group. For more information on available Local Zones, see Local Zone availability in the Amazon EC2 User Guide .
dict
Response Syntax
{ 'PoolId': 'string', 'PoolAddressRange': { 'FirstAddress': 'string', 'LastAddress': 'string', 'AddressCount': 123, 'AvailableAddressCount': 123 } }
Response Structure
(dict) --
PoolId (string) --
The ID of the pool that you want to provision the CIDR to.
PoolAddressRange (dict) --
Information about the address range of the public IPv4 pool.
FirstAddress (string) --
The first IP address in the range.
LastAddress (string) --
The last IP address in the range.
AddressCount (integer) --
The number of addresses in the range.
AvailableAddressCount (integer) --
The number of available addresses in the range.