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 | aws.s3.storage_lens_groups |
Fields
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. |
Methods
Name | Accessible by | Required Params |
---|---|---|
create_resource | INSERT | Name, Filter, region |
delete_resource | DELETE | data__Identifier, region |
update_resource | UPDATE | data__Identifier, data__PatchDocument, region |
list_resources | SELECT | region |
get_resource | SELECT | data__Identifier, region |
SELECT
examples
Gets all storage_lens_groups
in a region.
SELECT
region,
name,
filter,
storage_lens_group_arn,
tags
FROM aws.s3.storage_lens_groups
WHERE region = 'us-east-1';
Gets all properties from an individual storage_lens_group
.
SELECT
region,
name,
filter,
storage_lens_group_arn,
tags
FROM aws.s3.storage_lens_groups
WHERE region = 'us-east-1' AND data__Identifier = '<Name>';
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 aws.s3.storage_lens_groups (
Name,
Filter,
region
)
SELECT
'{{ Name }}',
'{{ Filter }}',
'{{ region }}';
/*+ create */
INSERT INTO aws.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:
MatchAnyPrefix:
- '{{ MatchAnyPrefix[0] }}'
MatchAnySuffix:
- '{{ MatchAnySuffix[0] }}'
MatchAnyTag:
- Key: '{{ Key }}'
Value: '{{ Value }}'
MatchObjectSize:
BytesGreaterThan: '{{ BytesGreaterThan }}'
BytesLessThan: '{{ BytesLessThan }}'
MatchObjectAge:
DaysGreaterThan: '{{ DaysGreaterThan }}'
DaysLessThan: '{{ DaysLessThan }}'
And:
MatchAnyPrefix: null
MatchAnySuffix: null
MatchAnyTag: null
MatchObjectSize: null
MatchObjectAge: null
Or:
MatchAnyPrefix: null
MatchAnySuffix: null
MatchAnyTag: null
MatchObjectSize: null
MatchObjectAge: null
- name: Tags
value:
- null
DELETE
example
/*+ delete */
DELETE FROM aws.s3.storage_lens_groups
WHERE data__Identifier = '<Name>'
AND region = 'us-east-1';
Permissions
To operate on the storage_lens_groups
resource, the following permissions are required:
Create
s3:CreateStorageLensGroup,
s3:GetStorageLensGroup,
s3:TagResource,
s3:ListTagsForResource
Read
s3:GetStorageLensGroup,
s3:ListTagsForResource
Update
s3:GetStorageLensGroup,
s3:UpdateStorageLensGroup,
s3:TagResource,
s3:UntagResource,
s3:ListTagsForResource
Delete
s3:DeleteStorageLensGroup
List
s3:ListStorageLensGroups