storage_lens_configurations
Creates, updates, deletes, gets or lists a storage_lens_configurations resource.
Overview
| Name | storage_lens_configurations |
| Type | Resource |
| Id | aws.s3control.storage_lens_configurations |
Fields
The following fields are returned by SELECT queries:
- get_storage_lens_configuration
- list_storage_lens_configurations
| Name | Datatype | Description |
|---|---|---|
account_level | string | A container for all the account-level configurations of your S3 Storage Lens configuration. |
aws_org | string | A container for the Amazon Web Services organization for this S3 Storage Lens configuration. |
data_export | string | A container to specify the properties of your S3 Storage Lens metrics export including, the destination, schema and format. |
exclude | string | A 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_export | string | A container that configures your S3 Storage Lens expanded prefixes metrics report. |
id | string | A container for the Amazon S3 Storage Lens configuration ID. |
include | string | A 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_enabled | boolean | A container for whether the S3 Storage Lens configuration is enabled. |
prefix_delimiter | string | A 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_arn | string | The 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 |
| Name | Datatype | Description |
|---|---|---|
home_region | string | A container for the S3 Storage Lens home Region. Your metrics data is stored and retained in your designated S3 Storage Lens home Region. |
id | string | A container for the S3 Storage Lens configuration ID. |
is_enabled | boolean | A container for whether the S3 Storage Lens configuration is enabled. This property is required. |
storage_lens_arn | string | The ARN of the S3 Storage Lens configuration. This property is read-only. |
Methods
The following methods are available for this resource:
| Name | Accessible by | Required Params | Optional Params | Description |
|---|---|---|---|---|
get_storage_lens_configuration | select | storagelensid, x-amz-account-id, region | 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. | |
list_storage_lens_configurations | select | x-amz-account-id, region | nextToken | This 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_configuration | replace | storagelensid, x-amz-account-id, region, StorageLensConfiguration | 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. | |
delete_storage_lens_configuration | delete | storagelensid, x-amz-account-id, region | 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. |
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.
| Name | Datatype | Description |
|---|---|---|
region | string | AWS region (default: us-east-1) |
storagelensid | string | The ID of the S3 Storage Lens configuration. |
x-amz-account-id | string | The account ID of the requester. |
nextToken | string | A pagination token to request the next page of results. |
SELECT examples
- get_storage_lens_configuration
- list_storage_lens_configurations
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
;
This 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.
SELECT
home_region,
id,
is_enabled,
storage_lens_arn
FROM aws.s3control.storage_lens_configurations
WHERE `x-amz-account-id` = '{{ x-amz-account-id }}' -- required
AND region = '{{ region }}' -- required
AND nextToken = '{{ nextToken }}'
;
REPLACE examples
- put_storage_lens_configuration
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
- delete_storage_lens_configuration
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
;