storage_lens_groups
Creates, updates, deletes or gets a storage_lens_group resource or lists storage_lens_groups in a region
Overview
| Name | storage_lens_groups |
| Type | Resource |
| Description | The AWS::S3::StorageLensGroup resource is an Amazon S3 resource type that you can use to create Storage Lens Group. |
| Id | awscc.s3.storage_lens_groups |
Fields
- get (all properties)
- list (identifiers only)
| Name | Datatype | Description |
|---|---|---|
name | string | The name that identifies the Amazon S3 Storage Lens Group. |
filter | object | Sets the Storage Lens Group filter. |
storage_lens_group_arn | string | The ARN for the Amazon S3 Storage Lens Group. |
tags | array | A set of tags (key-value pairs) for this Amazon S3 Storage Lens Group. |
region | string | AWS region. |
| Name | Datatype | Description |
|---|---|---|
name | string | The name that identifies the Amazon S3 Storage Lens Group. |
region | string | AWS region. |
For more information, see AWS::S3::StorageLensGroup.
Methods
| Name | Resource | Accessible by | Required Params |
|---|---|---|---|
create_resource | storage_lens_groups | INSERT | Name, Filter, region |
delete_resource | storage_lens_groups | DELETE | Identifier, region |
update_resource | storage_lens_groups | UPDATE | Identifier, PatchDocument, region |
list_resources | storage_lens_groups_list_only | SELECT | region |
get_resource | storage_lens_groups | SELECT | Identifier, region |
SELECT examples
- get (all properties)
- list (identifiers only)
Gets all properties from an individual storage_lens_group.
SELECT
region,
name,
filter,
storage_lens_group_arn,
tags
FROM awscc.s3.storage_lens_groups
WHERE
region = 'us-east-1' AND
Identifier = '{{ name }}';
Lists all storage_lens_groups in a region.
SELECT
region,
name
FROM awscc.s3.storage_lens_groups_list_only
WHERE
region = 'us-east-1';
INSERT example
Use the following StackQL query and manifest file to create a new storage_lens_group resource, using stack-deploy.
- Required Properties
- All Properties
- Manifest
/*+ create */
INSERT INTO awscc.s3.storage_lens_groups (
Name,
Filter,
region
)
SELECT
'{{ name }}',
'{{ filter }}',
'{{ region }}';
/*+ create */
INSERT INTO awscc.s3.storage_lens_groups (
Name,
Filter,
Tags,
region
)
SELECT
'{{ name }}',
'{{ filter }}',
'{{ tags }}',
'{{ region }}';
version: 1
name: stack name
description: stack description
providers:
- aws
globals:
- name: region
value: '{{ vars.AWS_REGION }}'
resources:
- name: storage_lens_group
props:
- name: name
value: '{{ name }}'
- name: filter
value:
match_any_prefix:
- '{{ match_any_prefix[0] }}'
match_any_suffix:
- '{{ match_any_suffix[0] }}'
match_any_tag:
- key: '{{ key }}'
value: '{{ value }}'
match_object_size:
bytes_greater_than: '{{ bytes_greater_than }}'
bytes_less_than: '{{ bytes_less_than }}'
match_object_age:
days_greater_than: '{{ days_greater_than }}'
days_less_than: '{{ days_less_than }}'
and:
match_any_prefix: null
match_any_suffix: null
match_any_tag: null
match_object_size: null
match_object_age: null
or:
match_any_prefix: null
match_any_suffix: null
match_any_tag: null
match_object_size: null
match_object_age: null
- name: tags
value:
- null
UPDATE example
Use the following StackQL query and manifest file to update a storage_lens_group resource, using stack-deploy.
/*+ update */
UPDATE awscc.s3.storage_lens_groups
SET PatchDocument = string('{{ {
"Filter": filter,
"Tags": tags
} | generate_patch_document }}')
WHERE
region = '{{ region }}' AND
Identifier = '{{ name }}';
DELETE example
/*+ delete */
DELETE FROM awscc.s3.storage_lens_groups
WHERE
Identifier = '{{ name }}' AND
region = 'us-east-1';
Permissions
To operate on the storage_lens_groups resource, the following permissions are required:
- Create
- Read
- Update
- Delete
- List
s3:CreateStorageLensGroup,
s3:GetStorageLensGroup,
s3:TagResource,
s3:ListTagsForResource
s3:GetStorageLensGroup,
s3:ListTagsForResource
s3:GetStorageLensGroup,
s3:UpdateStorageLensGroup,
s3:TagResource,
s3:UntagResource,
s3:ListTagsForResource
s3:DeleteStorageLensGroup
s3:ListStorageLensGroups