Skip to main content

ipam_pools

Creates, updates, deletes or gets an ipam_pool resource or lists ipam_pools in a region

Overview

Nameipam_pools
TypeResource
DescriptionResource Schema of AWS::EC2::IPAMPool Type
Idawscc.ec2.ipam_pools

Fields

NameDatatypeDescription
ipam_pool_idstringId of the IPAM Pool.
address_familystringThe address family of the address space in this pool. Either IPv4 or IPv6.
allocation_min_netmask_lengthintegerThe minimum allowed netmask length for allocations made from this pool.
allocation_default_netmask_lengthintegerThe default netmask length for allocations made from this pool. This value is used when the netmask length of an allocation isn't specified.
allocation_max_netmask_lengthintegerThe maximum allowed netmask length for allocations made from this pool.
allocation_resource_tagsarrayWhen specified, an allocation will not be allowed unless a resource has a matching set of tags.
arnstringThe Amazon Resource Name (ARN) of the IPAM Pool.
auto_importbooleanDetermines what to do if IPAM discovers resources that haven't been assigned an allocation. If set to true, an allocation will be made automatically.
aws_servicestringLimits which service in Amazon Web Services that the pool can be used in.
descriptionstring
ipam_scope_idstringThe Id of the scope this pool is a part of.
ipam_scope_arnstringThe Amazon Resource Name (ARN) of the scope this pool is a part of.
ipam_scope_typestringDetermines whether this scope contains publicly routable space or space for a private network
ipam_arnstringThe Amazon Resource Name (ARN) of the IPAM this pool is a part of.
localestringThe region of this pool. If not set, this will default to "None" which will disable non-custom allocations. If the locale has been specified for the source pool, this value must match.
pool_depthintegerThe depth of this pool in the source pool hierarchy.
provisioned_cidrsarrayA list of cidrs representing the address space available for allocation in this pool.
public_ip_sourcestringThe IP address source for pools in the public scope. Only used for provisioning IP address CIDRs to pools in the public scope. Default is `byoip`.
publicly_advertisablebooleanDetermines whether or not address space from this pool is publicly advertised. Must be set if and only if the pool is IPv6.
source_ipam_pool_idstringThe Id of this pool's source. If set, all space provisioned in this pool must be free space provisioned in the parent pool.
source_resourceobjectThe resource associated with this pool's space. Depending on the ResourceType, setting a SourceResource changes which space can be provisioned in this pool and which types of resources can receive allocations
statestringThe state of this pool. This can be one of the following values: "create-in-progress", "create-complete", "modify-in-progress", "modify-complete", "delete-in-progress", or "delete-complete"
state_messagestringAn explanation of how the pool arrived at it current state.
tagsarrayAn array of key-value pairs to apply to this resource.
regionstringAWS region.

For more information, see AWS::EC2::IPAMPool.

Methods

NameResourceAccessible byRequired Params
create_resourceipam_poolsINSERTIpamScopeId, AddressFamily, region
delete_resourceipam_poolsDELETEIdentifier, region
update_resourceipam_poolsUPDATEIdentifier, PatchDocument, region
list_resourcesipam_pools_list_onlySELECTregion
get_resourceipam_poolsSELECTIdentifier, region

SELECT examples

Gets all properties from an individual ipam_pool.

SELECT
region,
ipam_pool_id,
address_family,
allocation_min_netmask_length,
allocation_default_netmask_length,
allocation_max_netmask_length,
allocation_resource_tags,
arn,
auto_import,
aws_service,
description,
ipam_scope_id,
ipam_scope_arn,
ipam_scope_type,
ipam_arn,
locale,
pool_depth,
provisioned_cidrs,
public_ip_source,
publicly_advertisable,
source_ipam_pool_id,
source_resource,
state,
state_message,
tags
FROM awscc.ec2.ipam_pools
WHERE
region = 'us-east-1' AND
Identifier = '{{ ipam_pool_id }}';

INSERT example

Use the following StackQL query and manifest file to create a new ipam_pool resource, using stack-deploy.

/*+ create */
INSERT INTO awscc.ec2.ipam_pools (
AddressFamily,
IpamScopeId,
region
)
SELECT
'{{ address_family }}',
'{{ ipam_scope_id }}',
'{{ region }}';

UPDATE example

Use the following StackQL query and manifest file to update a ipam_pool resource, using stack-deploy.

/*+ update */
UPDATE awscc.ec2.ipam_pools
SET PatchDocument = string('{{ {
"AllocationMinNetmaskLength": allocation_min_netmask_length,
"AllocationDefaultNetmaskLength": allocation_default_netmask_length,
"AllocationMaxNetmaskLength": allocation_max_netmask_length,
"AllocationResourceTags": allocation_resource_tags,
"AutoImport": auto_import,
"Description": description,
"ProvisionedCidrs": provisioned_cidrs,
"Tags": tags
} | generate_patch_document }}')
WHERE
region = '{{ region }}' AND
Identifier = '{{ ipam_pool_id }}';

DELETE example

/*+ delete */
DELETE FROM awscc.ec2.ipam_pools
WHERE
Identifier = '{{ ipam_pool_id }}' AND
region = 'us-east-1';

Permissions

To operate on the ipam_pools resource, the following permissions are required:

ec2:CreateIpamPool,
ec2:DescribeIpamPools,
ec2:ProvisionIpamPoolCidr,
ec2:GetIpamPoolCidrs,
ec2:CreateTags