ipam_policies
Creates, updates, deletes, gets or lists an ipam_policies resource.
Overview
| Name | ipam_policies |
| Type | Resource |
| Id | aws.ec2.ipam_policies |
Fields
The following fields are returned by SELECT queries:
- describe_ipam_policies
| Name | Datatype | Description |
|---|---|---|
ipam_id | string | The ID of the IPAM this policy belongs to. |
ipam_policy_arn | string | The Amazon Resource Name (ARN) of the IPAM policy. |
ipam_policy_id | string | The ID of the IPAM policy. |
ipam_policy_region | string | The Region of the IPAM policy. |
owner_id | string | The account ID that owns the IPAM policy. |
state | string | The state of the IPAM policy. |
state_message | string | A message about the state of the IPAM policy. |
tags | string | The tags assigned to the IPAM policy. |
Methods
The following methods are available for this resource:
| Name | Accessible by | Required Params | Optional Params | Description |
|---|---|---|---|---|
describe_ipam_policies | select | region | DryRun, Filter, MaxResults, NextToken, IpamPolicyId | Describes one or more IPAM policies. An IPAM policy is a set of rules that define how public IPv4 addresses from IPAM pools are allocated to Amazon Web Services resources. Each rule maps an Amazon Web Services service to IPAM pools that the service will use to get IP addresses. A single policy can have multiple rules and be applied to multiple Amazon Web Services Regions. If the IPAM pool run out of addresses then the services fallback to Amazon-provided IP addresses. A policy can be applied to an individual Amazon Web Services account or an entity within Amazon Web Services Organizations. |
create_ipam_policy | insert | IpamId, region | DryRun, TagSpecification, ClientToken | Creates an IPAM policy. An IPAM policy is a set of rules that define how public IPv4 addresses from IPAM pools are allocated to Amazon Web Services resources. Each rule maps an Amazon Web Services service to IPAM pools that the service will use to get IP addresses. A single policy can have multiple rules and be applied to multiple Amazon Web Services Regions. If the IPAM pool run out of addresses then the services fallback to Amazon-provided IP addresses. A policy can be applied to an individual Amazon Web Services account or an entity within Amazon Web Services Organizations. For more information, see Define public IPv4 allocation strategy with IPAM policies in the Amazon VPC IPAM User Guide. |
delete_ipam_policy | delete | IpamPolicyId, region | DryRun | Deletes an IPAM policy. An IPAM policy is a set of rules that define how public IPv4 addresses from IPAM pools are allocated to Amazon Web Services resources. Each rule maps an Amazon Web Services service to IPAM pools that the service will use to get IP addresses. A single policy can have multiple rules and be applied to multiple Amazon Web Services Regions. If the IPAM pool run out of addresses then the services fallback to Amazon-provided IP addresses. A policy can be applied to an individual Amazon Web Services account or an entity within Amazon Web Services Organizations. |
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 |
|---|---|---|
IpamId | string | The ID of the IPAM for which you're creating the policy. |
IpamPolicyId | string | The ID of the IPAM policy to delete. |
region | string | AWS region (default: us-east-1) |
ClientToken | string | A unique, case-sensitive identifier to ensure the idempotency of the request. |
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 IPAM policy description. |
IpamPolicyId | array | The IDs of the IPAM policies to describe. |
MaxResults | integer | The maximum number of results to return in a single call. |
NextToken | string | The token for the next page of results. |
TagSpecification | array | The tags to assign to the IPAM policy. |
SELECT examples
- describe_ipam_policies
Describes one or more IPAM policies. An IPAM policy is a set of rules that define how public IPv4 addresses from IPAM pools are allocated to Amazon Web Services resources. Each rule maps an Amazon Web Services service to IPAM pools that the service will use to get IP addresses. A single policy can have multiple rules and be applied to multiple Amazon Web Services Regions. If the IPAM pool run out of addresses then the services fallback to Amazon-provided IP addresses. A policy can be applied to an individual Amazon Web Services account or an entity within Amazon Web Services Organizations.
SELECT
ipam_id,
ipam_policy_arn,
ipam_policy_id,
ipam_policy_region,
owner_id,
state,
state_message,
tags
FROM aws.ec2.ipam_policies
WHERE region = '{{ region }}' -- required
AND DryRun = '{{ DryRun }}'
AND Filter = '{{ Filter }}'
AND MaxResults = '{{ MaxResults }}'
AND NextToken = '{{ NextToken }}'
AND IpamPolicyId = '{{ IpamPolicyId }}'
;
INSERT examples
- create_ipam_policy
- Manifest
Creates an IPAM policy. An IPAM policy is a set of rules that define how public IPv4 addresses from IPAM pools are allocated to Amazon Web Services resources. Each rule maps an Amazon Web Services service to IPAM pools that the service will use to get IP addresses. A single policy can have multiple rules and be applied to multiple Amazon Web Services Regions. If the IPAM pool run out of addresses then the services fallback to Amazon-provided IP addresses. A policy can be applied to an individual Amazon Web Services account or an entity within Amazon Web Services Organizations. For more information, see Define public IPv4 allocation strategy with IPAM policies in the Amazon VPC IPAM User Guide.
INSERT INTO aws.ec2.ipam_policies (
IpamId,
region,
DryRun,
TagSpecification,
ClientToken
)
SELECT
'{{ IpamId }}',
'{{ region }}',
'{{ DryRun }}',
'{{ TagSpecification }}',
'{{ ClientToken }}'
RETURNING
ipam_id,
ipam_policy_arn,
ipam_policy_id,
ipam_policy_region,
owner_id,
state,
state_message,
tags
;
# Description fields are for documentation purposes
- name: ipam_policies
props:
- name: IpamId
value: "{{ IpamId }}"
description: Required parameter for the ipam_policies resource.
- name: region
value: "{{ region }}"
description: Required parameter for the ipam_policies 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 tags to assign to the IPAM policy.
description: The tags to assign to the IPAM policy.
- name: ClientToken
value: "{{ ClientToken }}"
description: A unique, case-sensitive identifier to ensure the idempotency of the request.
description: A unique, case-sensitive identifier to ensure the idempotency of the request.
DELETE examples
- delete_ipam_policy
Deletes an IPAM policy. An IPAM policy is a set of rules that define how public IPv4 addresses from IPAM pools are allocated to Amazon Web Services resources. Each rule maps an Amazon Web Services service to IPAM pools that the service will use to get IP addresses. A single policy can have multiple rules and be applied to multiple Amazon Web Services Regions. If the IPAM pool run out of addresses then the services fallback to Amazon-provided IP addresses. A policy can be applied to an individual Amazon Web Services account or an entity within Amazon Web Services Organizations.
DELETE FROM aws.ec2.ipam_policies
WHERE IpamPolicyId = '{{ IpamPolicyId }}' --required
AND region = '{{ region }}' --required
AND DryRun = '{{ DryRun }}'
;