ipam_pools
Creates, updates, deletes, gets or lists an ipam_pools resource.
Overview
| Name | ipam_pools |
| Type | Resource |
| Id | aws.ec2.ipam_pools |
Fields
The following fields are returned by SELECT queries:
- describe_ipam_pools
| Name | Datatype | Description |
|---|---|---|
address_family | string | The address family of the pool. |
allocation_default_netmask_length | integer | The default netmask length for allocations added to this pool. If, for example, the CIDR assigned to this pool is 10.0.0.0/8 and you enter 16 here, new allocations will default to 10.0.0.0/16. |
allocation_max_netmask_length | integer | The maximum netmask length possible for CIDR allocations in this IPAM pool to be compliant. The maximum netmask length must be greater than the minimum netmask length. Possible netmask lengths for IPv4 addresses are 0 - 32. Possible netmask lengths for IPv6 addresses are 0 - 128. |
allocation_min_netmask_length | integer | The minimum netmask length required for CIDR allocations in this IPAM pool to be compliant. The minimum netmask length must be less than the maximum netmask length. Possible netmask lengths for IPv4 addresses are 0 - 32. Possible netmask lengths for IPv6 addresses are 0 - 128. |
allocation_resource_tags | string | Tags that are required for resources that use CIDRs from this IPAM pool. Resources that do not have these tags will not be allowed to allocate space from the pool. If the resources have their tags changed after they have allocated space or if the allocation tagging requirements are changed on the pool, the resource may be marked as noncompliant. |
auto_import | boolean | If selected, IPAM will continuously look for resources within the CIDR range of this pool and automatically import them as allocations into your IPAM. The CIDRs that will be allocated for these resources must not already be allocated to other resources in order for the import to succeed. IPAM will import a CIDR regardless of its compliance with the pool's allocation rules, so a resource might be imported and subsequently marked as noncompliant. If IPAM discovers multiple CIDRs that overlap, IPAM will import the largest CIDR only. If IPAM discovers multiple CIDRs with matching CIDRs, IPAM will randomly import one of them only. A locale must be set on the pool for this feature to work. |
aws_service | string | Limits which service in Amazon Web Services that the pool can be used in. "ec2", for example, allows users to use space for Elastic IP addresses and VPCs. |
description | string | The description of the IPAM pool. |
ipam_arn | string | The ARN of the IPAM. |
ipam_pool_arn | string | The Amazon Resource Name (ARN) of the IPAM pool. |
ipam_pool_id | string | The ID of the IPAM pool. |
ipam_region | string | The Amazon Web Services Region of the IPAM pool. |
ipam_scope_arn | string | The ARN of the scope of the IPAM pool. |
ipam_scope_type | string | In IPAM, a scope is the highest-level container within IPAM. An IPAM contains two default scopes. Each scope represents the IP space for a single network. The private scope is intended for all private IP address space. The public scope is intended for all public IP address space. Scopes enable you to reuse IP addresses across multiple unconnected networks without causing IP address overlap or conflict. |
locale | string | The locale of the IPAM pool. The locale for the pool should be one of the following: An Amazon Web Services Region where you want this IPAM pool to be available for allocations. The network border group for an Amazon Web Services Local Zone where you want this IPAM pool to be available for allocations (supported Local Zones). This option is only available for IPAM IPv4 pools in the public scope. If you choose an Amazon Web Services Region for locale that has not been configured as an operating Region for the IPAM, you'll get an error. |
owner_id | string | The Amazon Web Services account ID of the owner of the IPAM pool. |
pool_depth | integer | The depth of pools in your IPAM pool. The pool depth quota is 10. For more information, see Quotas in IPAM in the Amazon VPC IPAM User Guide. |
public_ip_source | string | The 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. For more information, see Create IPv6 pools in the Amazon VPC IPAM User Guide. By default, you can add only one Amazon-provided IPv6 CIDR block to a top-level IPv6 pool. For information on increasing the default limit, see Quotas for your IPAM in the Amazon VPC IPAM User Guide. |
publicly_advertisable | boolean | Determines if a pool is publicly advertisable. This option is not available for pools with AddressFamily set to ipv4. |
source_ipam_pool_id | string | The ID of the source IPAM pool. You can use this option to create an IPAM pool within an existing source pool. |
source_resource | string | The resource used to provision CIDRs to a resource planning pool. |
state | string | The state of the IPAM pool. |
state_message | string | The state message. |
tags | string | 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. |
Methods
The following methods are available for this resource:
| Name | Accessible by | Required Params | Optional Params | Description |
|---|---|---|---|---|
describe_ipam_pools | select | region | DryRun, Filter, MaxResults, NextToken, IpamPoolId | Get information about your IPAM pools. |
create_ipam_pool | insert | IpamScopeId, AddressFamily, region | DryRun, Locale, SourceIpamPoolId, Description, AutoImport, PubliclyAdvertisable, AllocationMinNetmaskLength, AllocationMaxNetmaskLength, AllocationDefaultNetmaskLength, AllocationResourceTag, TagSpecification, ClientToken, AwsService, PublicIpSource, SourceResource | Create an IP address pool for Amazon VPC IP Address Manager (IPAM). In IPAM, a pool is a collection of contiguous IP addresses CIDRs. Pools enable you to organize your IP addresses according to your routing and security needs. For example, if you have separate routing and security needs for development and production applications, you can create a pool for each. For more information, see Create a top-level pool in the Amazon VPC IPAM User Guide. |
modify_ipam_pool | update | IpamPoolId, region | DryRun, Description, AutoImport, AllocationMinNetmaskLength, AllocationMaxNetmaskLength, AllocationDefaultNetmaskLength, ClearAllocationDefaultNetmaskLength, AddAllocationResourceTag, RemoveAllocationResourceTag | Modify the configurations of an IPAM pool. For more information, see Modify a pool in the Amazon VPC IPAM User Guide. |
delete_ipam_pool | delete | IpamPoolId, region | DryRun, Cascade | Delete an IPAM pool. You cannot delete an IPAM pool if there are allocations in it or CIDRs provisioned to it. To release allocations, see ReleaseIpamPoolAllocation. To deprovision pool CIDRs, see DeprovisionIpamPoolCidr. For more information, see Delete a pool in the Amazon VPC IPAM User Guide. |
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 |
|---|---|---|
AddressFamily | string | The IP protocol assigned to this IPAM pool. You must choose either IPv4 or IPv6 protocol for a pool. |
IpamPoolId | string | The ID of the pool to delete. |
IpamScopeId | string | The ID of the scope in which you would like to create the IPAM pool. |
region | string | AWS region (default: us-east-1) |
AddAllocationResourceTag | array | Add tag allocation rules to a pool. For more information about allocation rules, see Create a top-level pool in the Amazon VPC IPAM User Guide. |
AllocationDefaultNetmaskLength | integer | The default netmask length for allocations added to this pool. If, for example, the CIDR assigned to this pool is 10.0.0.0/8 and you enter 16 here, new allocations will default to 10.0.0.0/16. |
AllocationMaxNetmaskLength | integer | The maximum netmask length possible for CIDR allocations in this IPAM pool to be compliant. Possible netmask lengths for IPv4 addresses are 0 - 32. Possible netmask lengths for IPv6 addresses are 0 - 128.The maximum netmask length must be greater than the minimum netmask length. |
AllocationMinNetmaskLength | integer | The minimum netmask length required for CIDR allocations in this IPAM pool to be compliant. Possible netmask lengths for IPv4 addresses are 0 - 32. Possible netmask lengths for IPv6 addresses are 0 - 128. The minimum netmask length must be less than the maximum netmask length. |
AllocationResourceTag | array | Tags that are required for resources that use CIDRs from this IPAM pool. Resources that do not have these tags will not be allowed to allocate space from the pool. If the resources have their tags changed after they have allocated space or if the allocation tagging requirements are changed on the pool, the resource may be marked as noncompliant. |
AutoImport | boolean | If true, IPAM will continuously look for resources within the CIDR range of this pool and automatically import them as allocations into your IPAM. The CIDRs that will be allocated for these resources must not already be allocated to other resources in order for the import to succeed. IPAM will import a CIDR regardless of its compliance with the pool's allocation rules, so a resource might be imported and subsequently marked as noncompliant. If IPAM discovers multiple CIDRs that overlap, IPAM will import the largest CIDR only. If IPAM discovers multiple CIDRs with matching CIDRs, IPAM will randomly import one of them only. A locale must be set on the pool for this feature to work. |
AwsService | string | Limits which service in Amazon Web Services that the pool can be used in. "ec2", for example, allows users to use space for Elastic IP addresses and VPCs. |
Cascade | boolean | Enables you to quickly delete an IPAM pool and all resources within that pool, including provisioned CIDRs, allocations, and other pools. You can only use this option to delete pools in the private scope or pools in the public scope with a source resource. A source resource is a resource used to provision CIDRs to a resource planning pool. |
ClearAllocationDefaultNetmaskLength | boolean | Clear the default netmask length allocation rule for this pool. |
ClientToken | string | A unique, case-sensitive identifier that you provide to ensure the idempotency of the request. For more information, see Ensuring idempotency. |
Description | string | The description of the IPAM pool you want to modify. |
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 for the request. For more information about filtering, see Filtering CLI output. |
IpamPoolId | array | The IDs of the IPAM pools you would like information on. |
Locale | string | The locale for the pool should be one of the following: An Amazon Web Services Region where you want this IPAM pool to be available for allocations. The network border group for an Amazon Web Services Local Zone where you want this IPAM pool to be available for allocations (supported Local Zones). This option is only available for IPAM IPv4 pools in the public scope. Possible values: Any Amazon Web Services Region or supported Amazon Web Services Local Zone. Default is none and means any locale. |
MaxResults | integer | The maximum number of items to return for this request. To get the next page of items, make another request with the token returned in the output. For more information, see Pagination. |
NextToken | string | The token for the next page of results. |
PublicIpSource | string | The 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. For more information, see Create IPv6 pools in the Amazon VPC IPAM User Guide. By default, you can add only one Amazon-provided IPv6 CIDR block to a top-level IPv6 pool if PublicIpSource is amazon. For information on increasing the default limit, see Quotas for your IPAM in the Amazon VPC IPAM User Guide. |
PubliclyAdvertisable | boolean | Determines if the pool is publicly advertisable. The request can only contain PubliclyAdvertisable if AddressFamily is ipv6 and PublicIpSource is byoip. |
RemoveAllocationResourceTag | array | Remove tag allocation rules from a pool. |
SourceIpamPoolId | string | The ID of the source IPAM pool. Use this option to create a pool within an existing pool. Note that the CIDR you provision for the pool within the source pool must be available in the source pool's CIDR range. |
SourceResource | object | The resource used to provision CIDRs to a resource planning pool. |
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_ipam_pools
Get information about your IPAM pools.
SELECT
address_family,
allocation_default_netmask_length,
allocation_max_netmask_length,
allocation_min_netmask_length,
allocation_resource_tags,
auto_import,
aws_service,
description,
ipam_arn,
ipam_pool_arn,
ipam_pool_id,
ipam_region,
ipam_scope_arn,
ipam_scope_type,
locale,
owner_id,
pool_depth,
public_ip_source,
publicly_advertisable,
source_ipam_pool_id,
source_resource,
state,
state_message,
tags
FROM aws.ec2.ipam_pools
WHERE region = '{{ region }}' -- required
AND DryRun = '{{ DryRun }}'
AND Filter = '{{ Filter }}'
AND MaxResults = '{{ MaxResults }}'
AND NextToken = '{{ NextToken }}'
AND IpamPoolId = '{{ IpamPoolId }}'
;
INSERT examples
- create_ipam_pool
- Manifest
Create an IP address pool for Amazon VPC IP Address Manager (IPAM). In IPAM, a pool is a collection of contiguous IP addresses CIDRs. Pools enable you to organize your IP addresses according to your routing and security needs. For example, if you have separate routing and security needs for development and production applications, you can create a pool for each. For more information, see Create a top-level pool in the Amazon VPC IPAM User Guide.
INSERT INTO aws.ec2.ipam_pools (
IpamScopeId,
AddressFamily,
region,
DryRun,
Locale,
SourceIpamPoolId,
Description,
AutoImport,
PubliclyAdvertisable,
AllocationMinNetmaskLength,
AllocationMaxNetmaskLength,
AllocationDefaultNetmaskLength,
AllocationResourceTag,
TagSpecification,
ClientToken,
AwsService,
PublicIpSource,
SourceResource
)
SELECT
'{{ IpamScopeId }}',
'{{ AddressFamily }}',
'{{ region }}',
'{{ DryRun }}',
'{{ Locale }}',
'{{ SourceIpamPoolId }}',
'{{ Description }}',
'{{ AutoImport }}',
'{{ PubliclyAdvertisable }}',
'{{ AllocationMinNetmaskLength }}',
'{{ AllocationMaxNetmaskLength }}',
'{{ AllocationDefaultNetmaskLength }}',
'{{ AllocationResourceTag }}',
'{{ TagSpecification }}',
'{{ ClientToken }}',
'{{ AwsService }}',
'{{ PublicIpSource }}',
'{{ SourceResource }}'
RETURNING
address_family,
allocation_default_netmask_length,
allocation_max_netmask_length,
allocation_min_netmask_length,
allocation_resource_tags,
auto_import,
aws_service,
description,
ipam_arn,
ipam_pool_arn,
ipam_pool_id,
ipam_region,
ipam_scope_arn,
ipam_scope_type,
locale,
owner_id,
pool_depth,
public_ip_source,
publicly_advertisable,
source_ipam_pool_id,
source_resource,
state,
state_message,
tags
;
# Description fields are for documentation purposes
- name: ipam_pools
props:
- name: IpamScopeId
value: "{{ IpamScopeId }}"
description: Required parameter for the ipam_pools resource.
- name: AddressFamily
value: "{{ AddressFamily }}"
description: Required parameter for the ipam_pools resource.
- name: region
value: "{{ region }}"
description: Required parameter for the ipam_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: Locale
value: "{{ Locale }}"
description: The locale for the pool should be one of the following: An Amazon Web Services Region where you want this IPAM pool to be available for allocations. The network border group for an Amazon Web Services Local Zone where you want this IPAM pool to be available for allocations (supported Local Zones). This option is only available for IPAM IPv4 pools in the public scope. Possible values: Any Amazon Web Services Region or supported Amazon Web Services Local Zone. Default is none and means any locale.
description: The locale for the pool should be one of the following: An Amazon Web Services Region where you want this IPAM pool to be available for allocations. The network border group for an Amazon Web Services Local Zone where you want this IPAM pool to be available for allocations (supported Local Zones). This option is only available for IPAM IPv4 pools in the public scope. Possible values: Any Amazon Web Services Region or supported Amazon Web Services Local Zone. Default is none and means any locale.
- name: SourceIpamPoolId
value: "{{ SourceIpamPoolId }}"
description: The ID of the source IPAM pool. Use this option to create a pool within an existing pool. Note that the CIDR you provision for the pool within the source pool must be available in the source pool's CIDR range.
description: The ID of the source IPAM pool. Use this option to create a pool within an existing pool. Note that the CIDR you provision for the pool within the source pool must be available in the source pool's CIDR range.
- name: Description
value: "{{ Description }}"
description: A description for the IPAM pool.
description: A description for the IPAM pool.
- name: AutoImport
value: {{ AutoImport }}
description: If selected, IPAM will continuously look for resources within the CIDR range of this pool and automatically import them as allocations into your IPAM. The CIDRs that will be allocated for these resources must not already be allocated to other resources in order for the import to succeed. IPAM will import a CIDR regardless of its compliance with the pool's allocation rules, so a resource might be imported and subsequently marked as noncompliant. If IPAM discovers multiple CIDRs that overlap, IPAM will import the largest CIDR only. If IPAM discovers multiple CIDRs with matching CIDRs, IPAM will randomly import one of them only. A locale must be set on the pool for this feature to work.
description: If selected, IPAM will continuously look for resources within the CIDR range of this pool and automatically import them as allocations into your IPAM. The CIDRs that will be allocated for these resources must not already be allocated to other resources in order for the import to succeed. IPAM will import a CIDR regardless of its compliance with the pool's allocation rules, so a resource might be imported and subsequently marked as noncompliant. If IPAM discovers multiple CIDRs that overlap, IPAM will import the largest CIDR only. If IPAM discovers multiple CIDRs with matching CIDRs, IPAM will randomly import one of them only. A locale must be set on the pool for this feature to work.
- name: PubliclyAdvertisable
value: {{ PubliclyAdvertisable }}
description: Determines if the pool is publicly advertisable. The request can only contain PubliclyAdvertisable if AddressFamily is ipv6 and PublicIpSource is byoip.
description: Determines if the pool is publicly advertisable. The request can only contain PubliclyAdvertisable if AddressFamily is ipv6 and PublicIpSource is byoip.
- name: AllocationMinNetmaskLength
value: {{ AllocationMinNetmaskLength }}
description: The minimum netmask length required for CIDR allocations in this IPAM pool to be compliant. The minimum netmask length must be less than the maximum netmask length. Possible netmask lengths for IPv4 addresses are 0 - 32. Possible netmask lengths for IPv6 addresses are 0 - 128.
description: The minimum netmask length required for CIDR allocations in this IPAM pool to be compliant. The minimum netmask length must be less than the maximum netmask length. Possible netmask lengths for IPv4 addresses are 0 - 32. Possible netmask lengths for IPv6 addresses are 0 - 128.
- name: AllocationMaxNetmaskLength
value: {{ AllocationMaxNetmaskLength }}
description: The maximum netmask length possible for CIDR allocations in this IPAM pool to be compliant. The maximum netmask length must be greater than the minimum netmask length. Possible netmask lengths for IPv4 addresses are 0 - 32. Possible netmask lengths for IPv6 addresses are 0 - 128.
description: The maximum netmask length possible for CIDR allocations in this IPAM pool to be compliant. The maximum netmask length must be greater than the minimum netmask length. Possible netmask lengths for IPv4 addresses are 0 - 32. Possible netmask lengths for IPv6 addresses are 0 - 128.
- name: AllocationDefaultNetmaskLength
value: {{ AllocationDefaultNetmaskLength }}
description: The default netmask length for allocations added to this pool. If, for example, the CIDR assigned to this pool is 10.0.0.0/8 and you enter 16 here, new allocations will default to 10.0.0.0/16.
description: The default netmask length for allocations added to this pool. If, for example, the CIDR assigned to this pool is 10.0.0.0/8 and you enter 16 here, new allocations will default to 10.0.0.0/16.
- name: AllocationResourceTag
value: "{{ AllocationResourceTag }}"
description: Tags that are required for resources that use CIDRs from this IPAM pool. Resources that do not have these tags will not be allowed to allocate space from the pool. If the resources have their tags changed after they have allocated space or if the allocation tagging requirements are changed on the pool, the resource may be marked as noncompliant.
description: Tags that are required for resources that use CIDRs from this IPAM pool. Resources that do not have these tags will not be allowed to allocate space from the pool. If the resources have their tags changed after they have allocated space or if the allocation tagging requirements are changed on the pool, the resource may be marked as noncompliant.
- 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: ClientToken
value: "{{ ClientToken }}"
description: A unique, case-sensitive identifier that you provide to ensure the idempotency of the request. For more information, see Ensuring idempotency.
description: A unique, case-sensitive identifier that you provide to ensure the idempotency of the request. For more information, see Ensuring idempotency.
- name: AwsService
value: "{{ AwsService }}"
description: Limits which service in Amazon Web Services that the pool can be used in. "ec2", for example, allows users to use space for Elastic IP addresses and VPCs.
description: Limits which service in Amazon Web Services that the pool can be used in. "ec2", for example, allows users to use space for Elastic IP addresses and VPCs.
- name: PublicIpSource
value: "{{ PublicIpSource }}"
description: The 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. For more information, see Create IPv6 pools in the Amazon VPC IPAM User Guide. By default, you can add only one Amazon-provided IPv6 CIDR block to a top-level IPv6 pool if PublicIpSource is amazon. For information on increasing the default limit, see Quotas for your IPAM in the Amazon VPC IPAM User Guide.
description: The 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. For more information, see Create IPv6 pools in the Amazon VPC IPAM User Guide. By default, you can add only one Amazon-provided IPv6 CIDR block to a top-level IPv6 pool if PublicIpSource is amazon. For information on increasing the default limit, see Quotas for your IPAM in the Amazon VPC IPAM User Guide.
- name: SourceResource
value: "{{ SourceResource }}"
description: The resource used to provision CIDRs to a resource planning pool.
description: The resource used to provision CIDRs to a resource planning pool.
UPDATE examples
- modify_ipam_pool
Modify the configurations of an IPAM pool. For more information, see Modify a pool in the Amazon VPC IPAM User Guide.
UPDATE aws.ec2.ipam_pools
SET
-- No updatable properties
WHERE
IpamPoolId = '{{ IpamPoolId }}' --required
AND region = '{{ region }}' --required
AND DryRun = {{ DryRun}}
AND Description = '{{ Description}}'
AND AutoImport = {{ AutoImport}}
AND AllocationMinNetmaskLength = '{{ AllocationMinNetmaskLength}}'
AND AllocationMaxNetmaskLength = '{{ AllocationMaxNetmaskLength}}'
AND AllocationDefaultNetmaskLength = '{{ AllocationDefaultNetmaskLength}}'
AND ClearAllocationDefaultNetmaskLength = {{ ClearAllocationDefaultNetmaskLength}}
AND AddAllocationResourceTag = '{{ AddAllocationResourceTag}}'
AND RemoveAllocationResourceTag = '{{ RemoveAllocationResourceTag}}'
RETURNING
address_family,
allocation_default_netmask_length,
allocation_max_netmask_length,
allocation_min_netmask_length,
allocation_resource_tags,
auto_import,
aws_service,
description,
ipam_arn,
ipam_pool_arn,
ipam_pool_id,
ipam_region,
ipam_scope_arn,
ipam_scope_type,
locale,
owner_id,
pool_depth,
public_ip_source,
publicly_advertisable,
source_ipam_pool_id,
source_resource,
state,
state_message,
tags;
DELETE examples
- delete_ipam_pool
Delete an IPAM pool. You cannot delete an IPAM pool if there are allocations in it or CIDRs provisioned to it. To release allocations, see ReleaseIpamPoolAllocation. To deprovision pool CIDRs, see DeprovisionIpamPoolCidr. For more information, see Delete a pool in the Amazon VPC IPAM User Guide.
DELETE FROM aws.ec2.ipam_pools
WHERE IpamPoolId = '{{ IpamPoolId }}' --required
AND region = '{{ region }}' --required
AND DryRun = '{{ DryRun }}'
AND Cascade = '{{ Cascade }}'
;