ipam_allocations
Used to retrieve a list of ipam_allocations
in a region or to create or delete a ipam_allocations
resource, use ipam_allocation
to read or update an individual resource.
Overview
Name | ipam_allocations |
Type | Resource |
Description | Resource Schema of AWS::EC2::IPAMAllocation Type |
Id | aws.ec2.ipam_allocations |
Fields
Name | Datatype | Description |
---|---|---|
ipam_pool_id | string | Id of the IPAM Pool. |
ipam_pool_allocation_id | string | Id of the allocation. |
cidr | undefined | |
region | string | AWS region. |
Methods
Name | Accessible by | Required Params |
---|---|---|
create_resource | INSERT | IpamPoolId, region |
delete_resource | DELETE | data__Identifier, region |
list_resource | SELECT | region |
SELECT
Example
SELECT
region,
ipam_pool_id,
ipam_pool_allocation_id,
cidr
FROM aws.ec2.ipam_allocations
WHERE region = 'us-east-1';
INSERT
Example
Use the following StackQL query and manifest file to create a new ipam_allocation
resource, using stack-deploy
.
- Required Properties
- All Properties
- Manifest
/*+ create */
INSERT INTO aws.ec2.ipam_allocations (
IpamPoolId,
region
)
SELECT
'{{ IpamPoolId }}',
'{{ region }}';
/*+ create */
INSERT INTO aws.ec2.ipam_allocations (
IpamPoolId,
Cidr,
NetmaskLength,
Description,
region
)
SELECT
'{{ IpamPoolId }}',
'{{ Cidr }}',
'{{ NetmaskLength }}',
'{{ Description }}',
'{{ region }}';
version: 1
name: stack name
description: stack description
providers:
- aws
globals:
- name: region
value: '{{ vars.AWS_REGION }}'
resources:
- name: ipam_allocation
props:
- name: IpamPoolId
value: '{{ IpamPoolId }}'
- name: Cidr
value: '{{ Cidr }}'
- name: NetmaskLength
value: '{{ NetmaskLength }}'
- name: Description
value: '{{ Description }}'
DELETE
Example
/*+ delete */
DELETE FROM aws.ec2.ipam_allocations
WHERE data__Identifier = '<IpamPoolId|IpamPoolAllocationId|Cidr>'
AND region = 'us-east-1';
Permissions
To operate on the ipam_allocations
resource, the following permissions are required:
Create
ec2:AllocateIpamPoolCidr,
ec2:GetIpamPoolAllocations
Delete
ec2:ReleaseIpamPoolAllocation
List
ec2:GetIpamPoolAllocations