public_ipv4_pools
Creates, updates, deletes, gets or lists a public_ipv4_pools resource.
Overview
| Name | public_ipv4_pools |
| Type | Resource |
| Id | aws.ec2.public_ipv4_pools |
Fields
The following fields are returned by SELECT queries:
- describe_public_ipv4_pools
| Name | Datatype | Description |
|---|---|---|
description | string | A description of the address pool. |
network_border_group | string | The 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_ranges | string | The address ranges. |
pool_id | string | The ID of the address pool. |
tags | string | Any tags for the address pool. |
total_address_count | integer | The total number of addresses. |
total_available_address_count | integer | The total number of available addresses. |
Methods
The following methods are available for this resource:
| Name | Accessible by | Required Params | Optional Params | Description |
|---|---|---|---|---|
describe_public_ipv4_pools | select | region | PoolId, NextToken, MaxResults, Filter | Describes the specified IPv4 address pools. |
create_public_ipv4_pool | insert | region | DryRun, TagSpecification, NetworkBorderGroup | 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. |
provision_public_ipv4_pool_cidr | update | IpamPoolId, PoolId, NetmaskLength, region | DryRun, NetworkBorderGroup | Provision 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_cidr | update | PoolId, region | DryRun, Cidr | Deprovision a CIDR from a public IPv4 pool. |
delete_public_ipv4_pool | delete | PoolId, region | DryRun, NetworkBorderGroup | 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. |
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.
| Name | Datatype | Description |
|---|---|---|
IpamPoolId | string | The ID of the IPAM pool you would like to use to allocate this CIDR. |
NetmaskLength | integer | The 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. |
PoolId | string | The ID of the public IPv4 pool you want to delete. |
region | string | AWS region (default: us-east-1) |
Cidr | string | The CIDR you want to deprovision from the pool. |
DryRun | 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. |
Filter | array | One 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. |
MaxResults | 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. |
NetworkBorderGroup | 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. |
NextToken | string | The token for the next page of results. |
PoolId | array | The IDs of the address pools. |
TagSpecification | array | 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. |
SELECT examples
- describe_public_ipv4_pools
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
- create_public_ipv4_pool
- Manifest
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
;
# Description fields are for documentation purposes
- name: public_ipv4_pools
props:
- name: region
value: "{{ region }}"
description: Required parameter for the public_ipv4_pools resource.
- name: DryRun
value: {{ DryRun }}
description: 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.
description: 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.
- name: TagSpecification
value: "{{ TagSpecification }}"
description: 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.
description: 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.
- name: NetworkBorderGroup
value: "{{ NetworkBorderGroup }}"
description: 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.
description: 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.
UPDATE examples
- provision_public_ipv4_pool_cidr
- deprovision_public_ipv4_pool_cidr
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;
Deprovision a CIDR from a public IPv4 pool.
UPDATE aws.ec2.public_ipv4_pools
SET
-- No updatable properties
WHERE
PoolId = '{{ PoolId }}' --required
AND region = '{{ region }}' --required
AND DryRun = {{ DryRun}}
AND Cidr = '{{ Cidr}}'
RETURNING
deprovisioned_addresses,
pool_id;
DELETE examples
- delete_public_ipv4_pool
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 }}'
;