Skip to main content

ipam_scopes

Creates, updates, deletes or gets an ipam_scope resource or lists ipam_scopes in a region

Overview

Nameipam_scopes
TypeResource
DescriptionResource Schema of AWS::EC2::IPAMScope Type
Idaws.ec2.ipam_scopes

Fields

NameDatatypeDescription
ipam_scope_idstringId of the IPAM scope.
arnstringThe Amazon Resource Name (ARN) of the IPAM scope.
ipam_idstringThe Id of the IPAM this scope is a part of.
ipam_arnstringThe Amazon Resource Name (ARN) of the IPAM this scope is a part of.
ipam_scope_typestringDetermines whether this scope contains publicly routable space or space for a private network
is_defaultbooleanIs this one of the default scopes created with the IPAM.
descriptionstring
pool_countintegerThe number of pools that currently exist in this scope.
tagsarrayAn array of key-value pairs to apply to this resource.
regionstringAWS region.

Methods

NameAccessible byRequired Params
create_resourceINSERTIpamId, region
delete_resourceDELETEdata__Identifier, region
update_resourceUPDATEdata__Identifier, data__PatchDocument, region
list_resourcesSELECTregion
get_resourceSELECTdata__Identifier, region

SELECT examples

Gets all ipam_scopes in a region.

SELECT
region,
ipam_scope_id,
arn,
ipam_id,
ipam_arn,
ipam_scope_type,
is_default,
description,
pool_count,
tags
FROM aws.ec2.ipam_scopes
WHERE region = 'us-east-1';

Gets all properties from an individual ipam_scope.

SELECT
region,
ipam_scope_id,
arn,
ipam_id,
ipam_arn,
ipam_scope_type,
is_default,
description,
pool_count,
tags
FROM aws.ec2.ipam_scopes
WHERE region = 'us-east-1' AND data__Identifier = '<IpamScopeId>';

INSERT example

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

/*+ create */
INSERT INTO aws.ec2.ipam_scopes (
IpamId,
region
)
SELECT
'{{ IpamId }}',
'{{ region }}';

DELETE example

/*+ delete */
DELETE FROM aws.ec2.ipam_scopes
WHERE data__Identifier = '<IpamScopeId>'
AND region = 'us-east-1';

Permissions

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

Create

ec2:CreateIpamScope,
ec2:DescribeIpamScopes,
ec2:CreateTags

Read

ec2:DescribeIpamScopes

Update

ec2:ModifyIpamScope,
ec2:DescribeIpamScopes,
ec2:CreateTags,
ec2:DeleteTags

Delete

ec2:DeleteIpamScope,
ec2:DescribeIpamScopes,
ec2:DeleteTags

List

ec2:DescribeIpamScopes