Skip to main content

storage_lens_groups

Creates, updates, deletes, gets or lists a storage_lens_groups resource.

Overview

Namestorage_lens_groups
TypeResource
Idaws.s3control.storage_lens_groups

Fields

The following fields are returned by SELECT queries:

NameDatatypeDescription
filterstringSets the criteria for the Storage Lens group data that is displayed. For multiple filter conditions, the AND or OR logical operator is used.
namestringContains the name of the Storage Lens group.
storage_lens_group_arnstringContains the Amazon Resource Name (ARN) of the Storage Lens group. This property is read-only.

Methods

The following methods are available for this resource:

NameAccessible byRequired ParamsOptional ParamsDescription
get_storage_lens_groupselectname, x-amz-account-id, regionRetrieves the Storage Lens group configuration details. To use this operation, you must have the permission to perform the s3:GetStorageLensGroup action. For more information about the required Storage Lens Groups permissions, see Setting account permissions to use S3 Storage Lens groups. For information about Storage Lens groups errors, see List of Amazon S3 Storage Lens error codes.
list_storage_lens_groupsselectx-amz-account-id, regionnextTokenLists all the Storage Lens groups in the specified home Region. To use this operation, you must have the permission to perform the s3:ListStorageLensGroups action. For more information about the required Storage Lens Groups permissions, see Setting account permissions to use S3 Storage Lens groups. For information about Storage Lens groups errors, see List of Amazon S3 Storage Lens error codes.
create_storage_lens_groupinsertx-amz-account-id, region, StorageLensGroupCreates a new S3 Storage Lens group and associates it with the specified Amazon Web Services account ID. An S3 Storage Lens group is a custom grouping of objects based on prefix, suffix, object tags, object size, object age, or a combination of these filters. For each Storage Lens group that you’ve created, you can also optionally add Amazon Web Services resource tags. For more information about S3 Storage Lens groups, see Working with S3 Storage Lens groups. To use this operation, you must have the permission to perform the s3:CreateStorageLensGroup action. If you’re trying to create a Storage Lens group with Amazon Web Services resource tags, you must also have permission to perform the s3:TagResource action. For more information about the required Storage Lens Groups permissions, see Setting account permissions to use S3 Storage Lens groups. For information about Storage Lens groups errors, see List of Amazon S3 Storage Lens error codes.
update_storage_lens_groupupdatename, x-amz-account-id, region, StorageLensGroupUpdates the existing Storage Lens group. To use this operation, you must have the permission to perform the s3:UpdateStorageLensGroup action. For more information about the required Storage Lens Groups permissions, see Setting account permissions to use S3 Storage Lens groups. For information about Storage Lens groups errors, see List of Amazon S3 Storage Lens error codes.
delete_storage_lens_groupdeletename, x-amz-account-id, regionDeletes an existing S3 Storage Lens group. To use this operation, you must have the permission to perform the s3:DeleteStorageLensGroup action. For more information about the required Storage Lens Groups permissions, see Setting account permissions to use S3 Storage Lens groups. For information about Storage Lens groups errors, see List of Amazon S3 Storage Lens error codes.

Parameters

Parameters can be passed in the WHERE clause of a query. Check the Methods section to see which parameters are required or optional for each operation.

NameDatatypeDescription
namestringThe name of the Storage Lens group that you're trying to delete.
regionstringAWS region (default: us-east-1)
x-amz-account-idstringThe Amazon Web Services account ID used to create the Storage Lens group that you're trying to delete.
nextTokenstringThe token for the next set of results, or null if there are no more results.

SELECT examples

Retrieves the Storage Lens group configuration details. To use this operation, you must have the permission to perform the s3:GetStorageLensGroup action. For more information about the required Storage Lens Groups permissions, see Setting account permissions to use S3 Storage Lens groups. For information about Storage Lens groups errors, see List of Amazon S3 Storage Lens error codes.

SELECT
filter,
name,
storage_lens_group_arn
FROM aws.s3control.storage_lens_groups
WHERE name = '{{ name }}' -- required
AND `x-amz-account-id` = '{{ x-amz-account-id }}' -- required
AND region = '{{ region }}' -- required
;

INSERT examples

Creates a new S3 Storage Lens group and associates it with the specified Amazon Web Services account ID. An S3 Storage Lens group is a custom grouping of objects based on prefix, suffix, object tags, object size, object age, or a combination of these filters. For each Storage Lens group that you’ve created, you can also optionally add Amazon Web Services resource tags. For more information about S3 Storage Lens groups, see Working with S3 Storage Lens groups. To use this operation, you must have the permission to perform the s3:CreateStorageLensGroup action. If you’re trying to create a Storage Lens group with Amazon Web Services resource tags, you must also have permission to perform the s3:TagResource action. For more information about the required Storage Lens Groups permissions, see Setting account permissions to use S3 Storage Lens groups. For information about Storage Lens groups errors, see List of Amazon S3 Storage Lens error codes.

INSERT INTO aws.s3control.storage_lens_groups (
StorageLensGroup,
Tags,
`x-amz-account-id`,
region
)
SELECT
'{{ StorageLensGroup }}' /* required */,
'{{ Tags }}',
'{{ x-amz-account-id }}',
'{{ region }}'
;

UPDATE examples

Updates the existing Storage Lens group. To use this operation, you must have the permission to perform the s3:UpdateStorageLensGroup action. For more information about the required Storage Lens Groups permissions, see Setting account permissions to use S3 Storage Lens groups. For information about Storage Lens groups errors, see List of Amazon S3 Storage Lens error codes.

UPDATE aws.s3control.storage_lens_groups
SET
StorageLensGroup = '{{ StorageLensGroup }}'
WHERE
name = '{{ name }}' --required
AND `x-amz-account-id` = '{{ x-amz-account-id }}' --required
AND region = '{{ region }}' --required
AND StorageLensGroup = '{{ StorageLensGroup }}' --required;

DELETE examples

Deletes an existing S3 Storage Lens group. To use this operation, you must have the permission to perform the s3:DeleteStorageLensGroup action. For more information about the required Storage Lens Groups permissions, see Setting account permissions to use S3 Storage Lens groups. For information about Storage Lens groups errors, see List of Amazon S3 Storage Lens error codes.

DELETE FROM aws.s3control.storage_lens_groups
WHERE name = '{{ name }}' --required
AND `x-amz-account-id` = '{{ x-amz-account-id }}' --required
AND region = '{{ region }}' --required
;