--- # generated by https://github.com/hashicorp/terraform-plugin-docs page_title: "awscc_s3_storage_lens Resource - terraform-provider-awscc" subcategory: "" description: |- The AWS::S3::StorageLens resource is an Amazon S3 resource type that you can use to create Storage Lens configurations. --- # awscc_s3_storage_lens (Resource) The AWS::S3::StorageLens resource is an Amazon S3 resource type that you can use to create Storage Lens configurations. ## Schema ### Required - `storage_lens_configuration` (Attributes) Specifies the details of Amazon S3 Storage Lens configuration. (see [below for nested schema](#nestedatt--storage_lens_configuration)) ### Optional - `tags` (Attributes Set) A set of tags (key-value pairs) for this Amazon S3 Storage Lens configuration. (see [below for nested schema](#nestedatt--tags)) ### Read-Only - `id` (String) Uniquely identifies the resource. ### Nested Schema for `storage_lens_configuration` Required: - `account_level` (Attributes) Account-level metrics configurations. (see [below for nested schema](#nestedatt--storage_lens_configuration--account_level)) - `aws_org` (Attributes) The AWS Organizations ARN to use in the Amazon S3 Storage Lens configuration. (see [below for nested schema](#nestedatt--storage_lens_configuration--aws_org)) - `data_export` (Attributes) Specifies how Amazon S3 Storage Lens metrics should be exported. (see [below for nested schema](#nestedatt--storage_lens_configuration--data_export)) - `exclude` (Attributes) S3 buckets and Regions to include/exclude in the Amazon S3 Storage Lens configuration. (see [below for nested schema](#nestedatt--storage_lens_configuration--exclude)) - `id` (String) The ID that identifies the Amazon S3 Storage Lens configuration. - `include` (Attributes) S3 buckets and Regions to include/exclude in the Amazon S3 Storage Lens configuration. (see [below for nested schema](#nestedatt--storage_lens_configuration--include)) - `is_enabled` (Boolean) Specifies whether the Amazon S3 Storage Lens configuration is enabled or disabled. - `storage_lens_arn` (String) The ARN for the Amazon S3 Storage Lens configuration. ### Nested Schema for `storage_lens_configuration.account_level` Required: - `activity_metrics` (Attributes) Enables activity metrics. (see [below for nested schema](#nestedatt--storage_lens_configuration--account_level--activity_metrics)) - `bucket_level` (Attributes) Bucket-level metrics configurations. (see [below for nested schema](#nestedatt--storage_lens_configuration--account_level--bucket_level)) ### Nested Schema for `storage_lens_configuration.account_level.activity_metrics` Required: - `is_enabled` (Boolean) Specifies whether activity metrics are enabled or disabled. ### Nested Schema for `storage_lens_configuration.account_level.bucket_level` Required: - `activity_metrics` (Attributes) Enables activity metrics. (see [below for nested schema](#nestedatt--storage_lens_configuration--account_level--bucket_level--activity_metrics)) - `prefix_level` (Attributes) Prefix-level metrics configurations. (see [below for nested schema](#nestedatt--storage_lens_configuration--account_level--bucket_level--prefix_level)) ### Nested Schema for `storage_lens_configuration.account_level.bucket_level.prefix_level` Required: - `is_enabled` (Boolean) Specifies whether activity metrics are enabled or disabled. ### Nested Schema for `storage_lens_configuration.account_level.bucket_level.prefix_level` Required: - `storage_metrics` (Attributes) (see [below for nested schema](#nestedatt--storage_lens_configuration--account_level--bucket_level--prefix_level--storage_metrics)) ### Nested Schema for `storage_lens_configuration.account_level.bucket_level.prefix_level.storage_metrics` Required: - `is_enabled` (Boolean) Specifies whether prefix-level storage metrics are enabled or disabled. - `selection_criteria` (Attributes) Selection criteria for prefix-level metrics. (see [below for nested schema](#nestedatt--storage_lens_configuration--account_level--bucket_level--prefix_level--storage_metrics--selection_criteria)) ### Nested Schema for `storage_lens_configuration.account_level.bucket_level.prefix_level.storage_metrics.selection_criteria` Required: - `delimiter` (String) Delimiter to divide S3 key into hierarchy of prefixes. - `max_depth` (Number) Max depth of prefixes of S3 key that Amazon S3 Storage Lens will analyze. - `min_storage_bytes_percentage` (Number) The minimum storage bytes threshold for the prefixes to be included in the analysis. ### Nested Schema for `storage_lens_configuration.aws_org` Required: - `arn` (String) The Amazon Resource Name (ARN) of the specified resource. ### Nested Schema for `storage_lens_configuration.data_export` Required: - `cloudwatch_metrics` (Attributes) CloudWatch metrics settings for the Amazon S3 Storage Lens metrics export. (see [below for nested schema](#nestedatt--storage_lens_configuration--data_export--cloudwatch_metrics)) - `s3_bucket_destination` (Attributes) S3 bucket destination settings for the Amazon S3 Storage Lens metrics export. (see [below for nested schema](#nestedatt--storage_lens_configuration--data_export--s3_bucket_destination)) ### Nested Schema for `storage_lens_configuration.data_export.cloudwatch_metrics` Required: - `is_enabled` (Boolean) Specifies whether CloudWatch metrics are enabled or disabled. ### Nested Schema for `storage_lens_configuration.data_export.s3_bucket_destination` Required: - `account_id` (String) The AWS account ID that owns the destination S3 bucket. - `arn` (String) The ARN of the bucket to which Amazon S3 Storage Lens exports will be placed. - `encryption` (Attributes) Configures the server-side encryption for Amazon S3 Storage Lens report files with either S3-managed keys (SSE-S3) or KMS-managed keys (SSE-KMS). (see [below for nested schema](#nestedatt--storage_lens_configuration--data_export--s3_bucket_destination--encryption)) - `format` (String) Specifies the file format to use when exporting Amazon S3 Storage Lens metrics export. - `output_schema_version` (String) The version of the output schema to use when exporting Amazon S3 Storage Lens metrics. - `prefix` (String) The prefix to use for Amazon S3 Storage Lens export. ### Nested Schema for `storage_lens_configuration.data_export.s3_bucket_destination.prefix` Required: - `ssekms` (Attributes) AWS KMS server-side encryption. (see [below for nested schema](#nestedatt--storage_lens_configuration--data_export--s3_bucket_destination--prefix--ssekms)) - `sses3` (Map of String) S3 default server-side encryption. ### Nested Schema for `storage_lens_configuration.data_export.s3_bucket_destination.prefix.ssekms` Required: - `key_id` (String) The ARN of the KMS key to use for encryption. ### Nested Schema for `storage_lens_configuration.exclude` Required: - `buckets` (Set of String) - `regions` (Set of String) ### Nested Schema for `storage_lens_configuration.include` Required: - `buckets` (Set of String) - `regions` (Set of String) ### Nested Schema for `tags` Optional: - `key` (String) - `value` (String) ## Import Import is supported using the following syntax: ```shell $ terraform import awscc_s3_storage_lens.example ```