ipams
Creates, updates, deletes or gets an ipam
resource or lists ipams
in a region
Overview
Name | ipams |
Type | Resource |
Description | Resource Schema of AWS::EC2::IPAM Type |
Id | aws.ec2.ipams |
Fields
Name | Datatype | Description |
---|---|---|
ipam_id | string | Id of the IPAM. |
arn | string | The Amazon Resource Name (ARN) of the IPAM. |
default_resource_discovery_id | string | The Id of the default resource discovery, created with this IPAM. |
default_resource_discovery_association_id | string | The Id of the default association to the default resource discovery, created with this IPAM. |
resource_discovery_association_count | integer | The count of resource discoveries associated with this IPAM. |
description | string | |
public_default_scope_id | string | The Id of the default scope for publicly routable IP space, created with this IPAM. |
private_default_scope_id | string | The Id of the default scope for publicly routable IP space, created with this IPAM. |
scope_count | integer | The number of scopes that currently exist in this IPAM. |
operating_regions | array | The regions IPAM is enabled for. Allows pools to be created in these regions, as well as enabling monitoring |
tier | string | The tier of the IPAM. |
tags | array | An array of key-value pairs to apply to this resource. |
region | string | AWS region. |
Methods
Name | Accessible by | Required Params |
---|---|---|
create_resource | INSERT | , region |
delete_resource | DELETE | data__Identifier, region |
update_resource | UPDATE | data__Identifier, data__PatchDocument, region |
list_resources | SELECT | region |
get_resource | SELECT | data__Identifier, region |
SELECT
examples
Gets all ipams
in a region.
SELECT
region,
ipam_id,
arn,
default_resource_discovery_id,
default_resource_discovery_association_id,
resource_discovery_association_count,
description,
public_default_scope_id,
private_default_scope_id,
scope_count,
operating_regions,
tier,
tags
FROM aws.ec2.ipams
WHERE region = 'us-east-1';
Gets all properties from an individual ipam
.
SELECT
region,
ipam_id,
arn,
default_resource_discovery_id,
default_resource_discovery_association_id,
resource_discovery_association_count,
description,
public_default_scope_id,
private_default_scope_id,
scope_count,
operating_regions,
tier,
tags
FROM aws.ec2.ipams
WHERE region = 'us-east-1' AND data__Identifier = '<IpamId>';
INSERT
example
Use the following StackQL query and manifest file to create a new ipam
resource, using stack-deploy
.
- Required Properties
- All Properties
- Manifest
/*+ create */
INSERT INTO aws.ec2.ipams (
,
region
)
SELECT
'{{ }}',
'{{ region }}';
/*+ create */
INSERT INTO aws.ec2.ipams (
Description,
OperatingRegions,
Tier,
Tags,
region
)
SELECT
'{{ Description }}',
'{{ OperatingRegions }}',
'{{ Tier }}',
'{{ Tags }}',
'{{ region }}';
version: 1
name: stack name
description: stack description
providers:
- aws
globals:
- name: region
value: '{{ vars.AWS_REGION }}'
resources:
- name: ipam
props:
- name: Description
value: '{{ Description }}'
- name: OperatingRegions
value:
- RegionName: '{{ RegionName }}'
- name: Tier
value: '{{ Tier }}'
- name: Tags
value:
- Key: '{{ Key }}'
Value: '{{ Value }}'
DELETE
example
/*+ delete */
DELETE FROM aws.ec2.ipams
WHERE data__Identifier = '<IpamId>'
AND region = 'us-east-1';
Permissions
To operate on the ipams
resource, the following permissions are required:
Create
ec2:CreateIpam,
iam:CreateServiceLinkedRole,
ec2:CreateTags,
ec2:DescribeIpams
Read
ec2:DescribeIpams
Update
ec2:ModifyIpam,
ec2:CreateTags,
ec2:DeleteTags,
ec2:DescribeIpams
Delete
ec2:DeleteIpam,
ec2:DeleteTags,
ec2:DescribeIpams
List
ec2:DescribeIpams