ipam_scopes
Creates, updates, deletes or gets an ipam_scope resource or lists ipam_scopes in a region
Overview
| Name | ipam_scopes |
| Type | Resource |
| Description | Resource Schema of AWS::EC2::IPAMScope Type |
| Id | awscc.ec2.ipam_scopes |
Fields
- get (all properties)
- list (identifiers only)
| Name | Datatype | Description |
|---|---|---|
ipam_scope_id | string | Id of the IPAM scope. |
arn | string | The Amazon Resource Name (ARN) of the IPAM scope. |
ipam_id | string | The Id of the IPAM this scope is a part of. |
ipam_arn | string | The Amazon Resource Name (ARN) of the IPAM this scope is a part of. |
ipam_scope_type | string | Determines whether this scope contains publicly routable space or space for a private network |
is_default | boolean | Is this one of the default scopes created with the IPAM. |
description | string | |
pool_count | integer | The number of pools that currently exist in this scope. |
tags | array | An array of key-value pairs to apply to this resource. |
region | string | AWS region. |
| Name | Datatype | Description |
|---|---|---|
ipam_scope_id | string | Id of the IPAM scope. |
region | string | AWS region. |
For more information, see AWS::EC2::IPAMScope.
Methods
| Name | Resource | Accessible by | Required Params |
|---|---|---|---|
create_resource | ipam_scopes | INSERT | IpamId, region |
delete_resource | ipam_scopes | DELETE | Identifier, region |
update_resource | ipam_scopes | UPDATE | Identifier, PatchDocument, region |
list_resources | ipam_scopes_list_only | SELECT | region |
get_resource | ipam_scopes | SELECT | Identifier, region |
SELECT examples
- get (all properties)
- list (identifiers only)
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 = 'us-east-1' AND
Identifier = '{{ ipam_scope_id }}';
Lists all ipam_scopes in a region.
SELECT
region,
ipam_scope_id
FROM awscc.ec2.ipam_scopes_list_only
WHERE
region = 'us-east-1';
INSERT example
Use the following StackQL query and manifest file to create a new ipam_scope resource, using stack-deploy.
- Required Properties
- All Properties
- Manifest
/*+ create */
INSERT INTO awscc.ec2.ipam_scopes (
IpamId,
region
)
SELECT
'{{ ipam_id }}',
'{{ region }}';
/*+ create */
INSERT INTO awscc.ec2.ipam_scopes (
IpamId,
Description,
Tags,
region
)
SELECT
'{{ ipam_id }}',
'{{ description }}',
'{{ tags }}',
'{{ region }}';
version: 1
name: stack name
description: stack description
providers:
- aws
globals:
- name: region
value: '{{ vars.AWS_REGION }}'
resources:
- name: ipam_scope
props:
- name: ipam_id
value: '{{ ipam_id }}'
- name: description
value: '{{ description }}'
- name: tags
value:
- key: '{{ key }}'
value: '{{ value }}'
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 }}';
DELETE example
/*+ delete */
DELETE FROM awscc.ec2.ipam_scopes
WHERE
Identifier = '{{ ipam_scope_id }}' AND
region = 'us-east-1';
Permissions
To operate on the ipam_scopes resource, the following permissions are required:
- Create
- Read
- Update
- Delete
- List
ec2:CreateIpamScope,
ec2:DescribeIpamScopes,
ec2:CreateTags
ec2:DescribeIpamScopes
ec2:ModifyIpamScope,
ec2:DescribeIpamScopes,
ec2:CreateTags,
ec2:DeleteTags
ec2:DeleteIpamScope,
ec2:DescribeIpamScopes,
ec2:DeleteTags
ec2:DescribeIpamScopes