Skip to main content

ipams

Creates, updates, deletes or gets an ipam resource or lists ipams in a region

Overview

Nameipams
TypeResource
DescriptionResource Schema of AWS::EC2::IPAM Type
Idawscc.ec2.ipams

Fields

NameDatatypeDescription
ipam_idstringId of the IPAM.
arnstringThe Amazon Resource Name (ARN) of the IPAM.
default_resource_discovery_idstringThe Id of the default resource discovery, created with this IPAM.
default_resource_discovery_association_idstringThe Id of the default association to the default resource discovery, created with this IPAM.
resource_discovery_association_countintegerThe count of resource discoveries associated with this IPAM.
descriptionstring
public_default_scope_idstringThe Id of the default scope for publicly routable IP space, created with this IPAM.
private_default_scope_idstringThe Id of the default scope for publicly routable IP space, created with this IPAM.
scope_countintegerThe number of scopes that currently exist in this IPAM.
operating_regionsarrayThe regions IPAM is enabled for. Allows pools to be created in these regions, as well as enabling monitoring
tierstringThe tier of the IPAM.
enable_private_guabooleanEnable provisioning of GUA space in private pools.
metered_accountstringA metered account is an account that is charged for active IP addresses managed in IPAM
default_resource_discovery_organizational_unit_exclusionsarrayA set of organizational unit (OU) exclusions for the default resource discovery, created with this IPAM.
tagsarrayAn array of key-value pairs to apply to this resource.
regionstringAWS region.

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

Methods

NameResourceAccessible byRequired Params
create_resourceipamsINSERT, region
delete_resourceipamsDELETEIdentifier, region
update_resourceipamsUPDATEIdentifier, PatchDocument, region
list_resourcesipams_list_onlySELECTregion
get_resourceipamsSELECTIdentifier, region

SELECT examples

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,
enable_private_gua,
metered_account,
default_resource_discovery_organizational_unit_exclusions,
tags
FROM awscc.ec2.ipams
WHERE
region = 'us-east-1' AND
Identifier = '{{ ipam_id }}';

INSERT example

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

/*+ create */
INSERT INTO awscc.ec2.ipams (
,
region
)
SELECT
'{{ }}',
'{{ region }}';

UPDATE example

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

/*+ update */
UPDATE awscc.ec2.ipams
SET PatchDocument = string('{{ {
"Description": description,
"OperatingRegions": operating_regions,
"Tier": tier,
"EnablePrivateGua": enable_private_gua,
"MeteredAccount": metered_account,
"DefaultResourceDiscoveryOrganizationalUnitExclusions": default_resource_discovery_organizational_unit_exclusions,
"Tags": tags
} | generate_patch_document }}')
WHERE
region = '{{ region }}' AND
Identifier = '{{ ipam_id }}';

DELETE example

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

Permissions

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

ec2:CreateIpam,
iam:CreateServiceLinkedRole,
ec2:CreateTags,
ec2:DescribeIpams,
ec2:DescribeIpamResourceDiscoveries,
ec2:ModifyIpamResourceDiscovery