Skip to main content

storage_lens_configurations

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

Overview

Namestorage_lens_configurations
TypeResource
Idaws.s3control.storage_lens_configurations

Fields

The following fields are returned by SELECT queries:

NameDatatypeDescription
account_levelstringA container for all the account-level configurations of your S3 Storage Lens configuration.
aws_orgstringA container for the Amazon Web Services organization for this S3 Storage Lens configuration.
data_exportstringA container to specify the properties of your S3 Storage Lens metrics export including, the destination, schema and format.
excludestringA container for what is excluded in this configuration. This container can only be valid if there is no Include container submitted, and it's not empty.
expanded_prefixes_data_exportstringA container that configures your S3 Storage Lens expanded prefixes metrics report.
idstringA container for the Amazon S3 Storage Lens configuration ID.
includestringA container for what is included in this configuration. This container can only be valid if there is no Exclude container submitted, and it's not empty.
is_enabledbooleanA container for whether the S3 Storage Lens configuration is enabled.
prefix_delimiterstringA container for all prefix delimiters that are used for object keys in this S3 Storage Lens configuration. The prefix delimiters determine how S3 Storage Lens counts prefix depth, by separating the hierarchical levels in object keys. If either a prefix delimiter or existing delimiter is undefined, Amazon S3 uses the delimiter that’s defined. If both the prefix delimiter and existing delimiter are undefined, S3 uses / as the default delimiter. When custom delimiters are used, both the prefix delimiter and existing delimiter must specify the same special character. Otherwise, your request results in an error.
storage_lens_arnstringThe Amazon Resource Name (ARN) of the S3 Storage Lens configuration. This property is read-only and follows the following format: arn:aws:s3:us-east-1:example-account-id:storage-lens/your-dashboard-name

Methods

The following methods are available for this resource:

NameAccessible byRequired ParamsOptional ParamsDescription
get_storage_lens_configurationselectstoragelensid, x-amz-account-id, regionThis operation is not supported by directory buckets. Gets the Amazon S3 Storage Lens configuration. For more information, see Assessing your storage activity and usage with Amazon S3 Storage Lens in the Amazon S3 User Guide. For a complete list of S3 Storage Lens metrics, see S3 Storage Lens metrics glossary in the Amazon S3 User Guide. To use this action, you must have permission to perform the s3:GetStorageLensConfiguration action. For more information, see Setting permissions to use Amazon S3 Storage Lens in the Amazon S3 User Guide.
list_storage_lens_configurationsselectx-amz-account-id, regionnextTokenThis operation is not supported by directory buckets. Gets a list of Amazon S3 Storage Lens configurations. For more information about S3 Storage Lens, see Assessing your storage activity and usage with Amazon S3 Storage Lens in the Amazon S3 User Guide. To use this action, you must have permission to perform the s3:ListStorageLensConfigurations action. For more information, see Setting permissions to use Amazon S3 Storage Lens in the Amazon S3 User Guide.
put_storage_lens_configurationreplacestoragelensid, x-amz-account-id, region, StorageLensConfigurationThis operation is not supported by directory buckets. Puts an Amazon S3 Storage Lens configuration. For more information about S3 Storage Lens, see Working with Amazon S3 Storage Lens in the Amazon S3 User Guide. For a complete list of S3 Storage Lens metrics, see S3 Storage Lens metrics glossary in the Amazon S3 User Guide. To use this action, you must have permission to perform the s3:PutStorageLensConfiguration action. For more information, see Setting permissions to use Amazon S3 Storage Lens in the Amazon S3 User Guide.
delete_storage_lens_configurationdeletestoragelensid, x-amz-account-id, regionThis operation is not supported by directory buckets. Deletes the Amazon S3 Storage Lens configuration. For more information about S3 Storage Lens, see Assessing your storage activity and usage with Amazon S3 Storage Lens in the Amazon S3 User Guide. To use this action, you must have permission to perform the s3:DeleteStorageLensConfiguration action. For more information, see Setting permissions to use Amazon S3 Storage Lens in the Amazon S3 User Guide.

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
regionstringAWS region (default: us-east-1)
storagelensidstringThe ID of the S3 Storage Lens configuration.
x-amz-account-idstringThe account ID of the requester.
nextTokenstringA pagination token to request the next page of results.

SELECT examples

This operation is not supported by directory buckets. Gets the Amazon S3 Storage Lens configuration. For more information, see Assessing your storage activity and usage with Amazon S3 Storage Lens in the Amazon S3 User Guide. For a complete list of S3 Storage Lens metrics, see S3 Storage Lens metrics glossary in the Amazon S3 User Guide. To use this action, you must have permission to perform the s3:GetStorageLensConfiguration action. For more information, see Setting permissions to use Amazon S3 Storage Lens in the Amazon S3 User Guide.

SELECT
account_level,
aws_org,
data_export,
exclude,
expanded_prefixes_data_export,
id,
include,
is_enabled,
prefix_delimiter,
storage_lens_arn
FROM aws.s3control.storage_lens_configurations
WHERE storagelensid = '{{ storagelensid }}' -- required
AND `x-amz-account-id` = '{{ x-amz-account-id }}' -- required
AND region = '{{ region }}' -- required
;

REPLACE examples

This operation is not supported by directory buckets. Puts an Amazon S3 Storage Lens configuration. For more information about S3 Storage Lens, see Working with Amazon S3 Storage Lens in the Amazon S3 User Guide. For a complete list of S3 Storage Lens metrics, see S3 Storage Lens metrics glossary in the Amazon S3 User Guide. To use this action, you must have permission to perform the s3:PutStorageLensConfiguration action. For more information, see Setting permissions to use Amazon S3 Storage Lens in the Amazon S3 User Guide.

REPLACE aws.s3control.storage_lens_configurations
SET
StorageLensConfiguration = '{{ StorageLensConfiguration }}',
Tags = '{{ Tags }}'
WHERE
storagelensid = '{{ storagelensid }}' --required
AND `x-amz-account-id` = '{{ x-amz-account-id }}' --required
AND region = '{{ region }}' --required
AND StorageLensConfiguration = '{{ StorageLensConfiguration }}' --required;

DELETE examples

This operation is not supported by directory buckets. Deletes the Amazon S3 Storage Lens configuration. For more information about S3 Storage Lens, see Assessing your storage activity and usage with Amazon S3 Storage Lens in the Amazon S3 User Guide. To use this action, you must have permission to perform the s3:DeleteStorageLensConfiguration action. For more information, see Setting permissions to use Amazon S3 Storage Lens in the Amazon S3 User Guide.

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