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
Idawscc.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.

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

Methods

NameResourceAccessible byRequired Params
create_resourceipam_scopesINSERTIpamId, region
delete_resourceipam_scopesDELETEIdentifier, region
update_resourceipam_scopesUPDATEIdentifier, PatchDocument, region
list_resourcesipam_scopes_list_onlySELECTregion
get_resourceipam_scopesSELECTIdentifier, region

SELECT examples

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 awscc.ec2.ipam_scopes
WHERE
region = '{{ region }}' AND
Identifier = '{{ ipam_scope_id }}';

INSERT example

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

/*+ create */
INSERT INTO awscc.ec2.ipam_scopes (
IpamId,
region
)
SELECT
'{{ ipam_id }}',
'{{ region }}'
RETURNING
ErrorCode,
EventTime,
Identifier,
Operation,
OperationStatus,
RequestToken,
ResourceModel,
RetryAfter,
StatusMessage,
TypeName
;

UPDATE example

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

/*+ update */
UPDATE awscc.ec2.ipam_scopes
SET PatchDocument = string('{{ {
"Description": description,
"Tags": tags
} | generate_patch_document }}')
WHERE
region = '{{ region }}' AND
Identifier = '{{ ipam_scope_id }}'
RETURNING
ErrorCode,
EventTime,
Identifier,
Operation,
OperationStatus,
RequestToken,
ResourceModel,
RetryAfter,
StatusMessage,
TypeName
;

DELETE example

/*+ delete */
DELETE FROM awscc.ec2.ipam_scopes
WHERE
Identifier = '{{ ipam_scope_id }}' AND
region = '{{ region }}'
RETURNING
ErrorCode,
EventTime,
Identifier,
Operation,
OperationStatus,
RequestToken,
ResourceModel,
RetryAfter,
StatusMessage,
TypeName
;

Additional Parameters

Mutable resources in the Cloud Control provider support additional optional parameters which can be supplied with INSERT, UPDATE, or DELETE operations. These include:

ParameterDescription
ClientToken
A unique identifier to ensure the idempotency of the resource request.This allows the provider to accurately distinguish between retries and new requests.
A client token is valid for 36 hours once used.
After that, a resource request with the same client token is treated as a new request.
If you do not specify a client token, one is generated for inclusion in the request.
RoleArn
The ARN of the IAM role used to perform this resource operation.The role specified must have the permissions required for this operation.
If you do not specify a role, a temporary session is created using your AWS user credentials.
TypeVersionId
For private resource types, the type version to use in this resource operation.If you do not specify a resource version, the default version is used.

Permissions

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

ec2:CreateIpamScope,
ec2:DescribeIpamScopes,
ec2:CreateTags