Skip to main content

public_ipv4_pools

Creates, updates, deletes, gets or lists a public_ipv4_pools resource.

Overview

Namepublic_ipv4_pools
TypeResource
Idaws.ec2.public_ipv4_pools

Fields

The following fields are returned by SELECT queries:

NameDatatypeDescription
descriptionstringA description of the address pool.
network_border_groupstringThe name of the location from which the address pool is advertised. A network border group is a unique set of Availability Zones or Local Zones from where Amazon Web Services advertises public IP addresses.
pool_address_rangesstringThe address ranges.
pool_idstringThe ID of the address pool.
tagsstringAny tags for the address pool.
total_address_countintegerThe total number of addresses.
total_available_address_countintegerThe total number of available addresses.

Methods

The following methods are available for this resource:

NameAccessible byRequired ParamsOptional ParamsDescription
describe_public_ipv4_poolsselectregionPoolId, NextToken, MaxResults, FilterDescribes the specified IPv4 address pools.
create_public_ipv4_poolinsertregionDryRun, TagSpecification, NetworkBorderGroupCreates 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.
provision_public_ipv4_pool_cidrupdateIpamPoolId, PoolId, NetmaskLength, regionDryRun, NetworkBorderGroupProvision a CIDR to a public IPv4 pool. For more information about IPAM, see What is IPAM? in the Amazon VPC IPAM User Guide.
deprovision_public_ipv4_pool_cidrupdatePoolId, regionDryRun, CidrDeprovision a CIDR from a public IPv4 pool.
delete_public_ipv4_pooldeletePoolId, regionDryRun, NetworkBorderGroupDelete 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.

Parameters

Parameters can be passed in the WHERE clause of a query. Check the Methods section to see which parameters are required or optional for each operation.

NameDatatypeDescription
IpamPoolIdstringThe ID of the IPAM pool you would like to use to allocate this CIDR.
NetmaskLengthintegerThe netmask length of the CIDR you would like to allocate to the public IPv4 pool. The least specific netmask length you can define is 24.
PoolIdstringThe ID of the public IPv4 pool you want to delete.
regionstringAWS region (default: us-east-1)
CidrstringThe CIDR you want to deprovision from the pool.
DryRunbooleanA 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.
FilterarrayOne or more filters. tag:<key> - 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. tag-key - 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.
MaxResultsintegerThe maximum number of results to return with a single call. To retrieve the remaining results, make another call with the returned nextToken value.
NetworkBorderGroupstringThe 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.
NextTokenstringThe token for the next page of results.
PoolIdarrayThe IDs of the address pools.
TagSpecificationarrayThe 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.

SELECT examples

Describes the specified IPv4 address pools.

SELECT
description,
network_border_group,
pool_address_ranges,
pool_id,
tags,
total_address_count,
total_available_address_count
FROM aws.ec2.public_ipv4_pools
WHERE region = '{{ region }}' -- required
AND PoolId = '{{ PoolId }}'
AND NextToken = '{{ NextToken }}'
AND MaxResults = '{{ MaxResults }}'
AND Filter = '{{ Filter }}'
;

INSERT examples

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.

INSERT INTO aws.ec2.public_ipv4_pools (
region,
DryRun,
TagSpecification,
NetworkBorderGroup
)
SELECT
'{{ region }}',
'{{ DryRun }}',
'{{ TagSpecification }}',
'{{ NetworkBorderGroup }}'
RETURNING
pool_id
;

UPDATE examples

Provision a CIDR to a public IPv4 pool. For more information about IPAM, see What is IPAM? in the Amazon VPC IPAM User Guide.

UPDATE aws.ec2.public_ipv4_pools
SET
-- No updatable properties
WHERE
IpamPoolId = '{{ IpamPoolId }}' --required
AND PoolId = '{{ PoolId }}' --required
AND NetmaskLength = '{{ NetmaskLength }}' --required
AND region = '{{ region }}' --required
AND DryRun = {{ DryRun}}
AND NetworkBorderGroup = '{{ NetworkBorderGroup}}'
RETURNING
pool_address_range,
pool_id;

DELETE examples

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.

DELETE FROM aws.ec2.public_ipv4_pools
WHERE PoolId = '{{ PoolId }}' --required
AND region = '{{ region }}' --required
AND DryRun = '{{ DryRun }}'
AND NetworkBorderGroup = '{{ NetworkBorderGroup }}'
;