Skip to content
v2.278.0

CfnStorageLensProps Struct ​

Properties for defining a CfnStorageLens.

Example ​

ts
// The code below shows an example of how to instantiate this type.
// The values are placeholders you should change.
import { aws_s3 as s3 } from 'aws-cdk-lib';

declare const sses3: any;
const cfnStorageLensProps: s3.CfnStorageLensProps = {
  storageLensConfiguration: {
    accountLevel: {
      bucketLevel: {
        activityMetrics: {
          isEnabled: false,
        },
        advancedCostOptimizationMetrics: {
          isEnabled: false,
        },
        advancedDataProtectionMetrics: {
          isEnabled: false,
        },
        advancedPerformanceMetrics: {
          isEnabled: false,
        },
        detailedStatusCodesMetrics: {
          isEnabled: false,
        },
        prefixLevel: {
          storageMetrics: {
            isEnabled: false,
            selectionCriteria: {
              delimiter: 'delimiter',
              maxDepth: 123,
              minStorageBytesPercentage: 123,
            },
          },
        },
      },

      // the properties below are optional
      activityMetrics: {
        isEnabled: false,
      },
      advancedCostOptimizationMetrics: {
        isEnabled: false,
      },
      advancedDataProtectionMetrics: {
        isEnabled: false,
      },
      advancedPerformanceMetrics: {
        isEnabled: false,
      },
      detailedStatusCodesMetrics: {
        isEnabled: false,
      },
      storageLensGroupLevel: {
        storageLensGroupSelectionCriteria: {
          exclude: ['exclude'],
          include: ['include'],
        },
      },
    },
    id: 'id',
    isEnabled: false,

    // the properties below are optional
    awsOrg: {
      arn: 'arn',
    },
    dataExport: {
      cloudWatchMetrics: {
        isEnabled: false,
      },
      s3BucketDestination: {
        accountId: 'accountId',
        arn: 'arn',
        format: 'format',
        outputSchemaVersion: 'outputSchemaVersion',

        // the properties below are optional
        encryption: {
          ssekms: {
            keyId: 'keyId',
          },
          sses3: sses3,
        },
        prefix: 'prefix',
      },
      storageLensTableDestination: {
        isEnabled: false,

        // the properties below are optional
        encryption: {
          ssekms: {
            keyId: 'keyId',
          },
          sses3: sses3,
        },
      },
    },
    exclude: {
      buckets: ['buckets'],
      regions: ['regions'],
    },
    expandedPrefixesDataExport: {
      s3BucketDestination: {
        accountId: 'accountId',
        arn: 'arn',
        format: 'format',
        outputSchemaVersion: 'outputSchemaVersion',

        // the properties below are optional
        encryption: {
          ssekms: {
            keyId: 'keyId',
          },
          sses3: sses3,
        },
        prefix: 'prefix',
      },
      storageLensTableDestination: {
        isEnabled: false,

        // the properties below are optional
        encryption: {
          ssekms: {
            keyId: 'keyId',
          },
          sses3: sses3,
        },
      },
    },
    include: {
      buckets: ['buckets'],
      regions: ['regions'],
    },
    prefixDelimiter: 'prefixDelimiter',
    storageLensArn: 'storageLensArn',
  },

  // the properties below are optional
  tags: [{
    key: 'key',
    value: 'value',
  }],
};
python
from aws_cdk import CfnTag
# The code below shows an example of how to instantiate this type.
# The values are placeholders you should change.
from aws_cdk import aws_s3 as s3

# sses3: Any

cfn_storage_lens_props = s3.CfnStorageLensProps(
    storage_lens_configuration=s3.CfnStorageLens.StorageLensConfigurationProperty(
        account_level=s3.CfnStorageLens.AccountLevelProperty(
            bucket_level=s3.CfnStorageLens.BucketLevelProperty(
                activity_metrics=s3.CfnStorageLens.ActivityMetricsProperty(
                    is_enabled=False
                ),
                advanced_cost_optimization_metrics=s3.CfnStorageLens.AdvancedCostOptimizationMetricsProperty(
                    is_enabled=False
                ),
                advanced_data_protection_metrics=s3.CfnStorageLens.AdvancedDataProtectionMetricsProperty(
                    is_enabled=False
                ),
                advanced_performance_metrics=s3.CfnStorageLens.AdvancedPerformanceMetricsProperty(
                    is_enabled=False
                ),
                detailed_status_codes_metrics=s3.CfnStorageLens.DetailedStatusCodesMetricsProperty(
                    is_enabled=False
                ),
                prefix_level=s3.CfnStorageLens.PrefixLevelProperty(
                    storage_metrics=s3.CfnStorageLens.PrefixLevelStorageMetricsProperty(
                        is_enabled=False,
                        selection_criteria=s3.CfnStorageLens.SelectionCriteriaProperty(
                            delimiter="delimiter",
                            max_depth=123,
                            min_storage_bytes_percentage=123
                        )
                    )
                )
            ),

            # the properties below are optional
            activity_metrics=s3.CfnStorageLens.ActivityMetricsProperty(
                is_enabled=False
            ),
            advanced_cost_optimization_metrics=s3.CfnStorageLens.AdvancedCostOptimizationMetricsProperty(
                is_enabled=False
            ),
            advanced_data_protection_metrics=s3.CfnStorageLens.AdvancedDataProtectionMetricsProperty(
                is_enabled=False
            ),
            advanced_performance_metrics=s3.CfnStorageLens.AdvancedPerformanceMetricsProperty(
                is_enabled=False
            ),
            detailed_status_codes_metrics=s3.CfnStorageLens.DetailedStatusCodesMetricsProperty(
                is_enabled=False
            ),
            storage_lens_group_level=s3.CfnStorageLens.StorageLensGroupLevelProperty(
                storage_lens_group_selection_criteria=s3.CfnStorageLens.StorageLensGroupSelectionCriteriaProperty(
                    exclude=["exclude"],
                    include=["include"]
                )
            )
        ),
        id="id",
        is_enabled=False,

        # the properties below are optional
        aws_org=s3.CfnStorageLens.AwsOrgProperty(
            arn="arn"
        ),
        data_export=s3.CfnStorageLens.DataExportProperty(
            cloud_watch_metrics=s3.CfnStorageLens.CloudWatchMetricsProperty(
                is_enabled=False
            ),
            s3_bucket_destination=s3.CfnStorageLens.S3BucketDestinationProperty(
                account_id="accountId",
                arn="arn",
                format="format",
                output_schema_version="outputSchemaVersion",

                # the properties below are optional
                encryption=s3.CfnStorageLens.EncryptionProperty(
                    ssekms=s3.CfnStorageLens.SSEKMSProperty(
                        key_id="keyId"
                    ),
                    sses3=sses3
                ),
                prefix="prefix"
            ),
            storage_lens_table_destination=s3.CfnStorageLens.StorageLensTableDestinationProperty(
                is_enabled=False,

                # the properties below are optional
                encryption=s3.CfnStorageLens.EncryptionProperty(
                    ssekms=s3.CfnStorageLens.SSEKMSProperty(
                        key_id="keyId"
                    ),
                    sses3=sses3
                )
            )
        ),
        exclude=s3.CfnStorageLens.BucketsAndRegionsProperty(
            buckets=["buckets"],
            regions=["regions"]
        ),
        expanded_prefixes_data_export=s3.CfnStorageLens.StorageLensExpandedPrefixesDataExportProperty(
            s3_bucket_destination=s3.CfnStorageLens.S3BucketDestinationProperty(
                account_id="accountId",
                arn="arn",
                format="format",
                output_schema_version="outputSchemaVersion",

                # the properties below are optional
                encryption=s3.CfnStorageLens.EncryptionProperty(
                    ssekms=s3.CfnStorageLens.SSEKMSProperty(
                        key_id="keyId"
                    ),
                    sses3=sses3
                ),
                prefix="prefix"
            ),
            storage_lens_table_destination=s3.CfnStorageLens.StorageLensTableDestinationProperty(
                is_enabled=False,

                # the properties below are optional
                encryption=s3.CfnStorageLens.EncryptionProperty(
                    ssekms=s3.CfnStorageLens.SSEKMSProperty(
                        key_id="keyId"
                    ),
                    sses3=sses3
                )
            )
        ),
        include=s3.CfnStorageLens.BucketsAndRegionsProperty(
            buckets=["buckets"],
            regions=["regions"]
        ),
        prefix_delimiter="prefixDelimiter",
        storage_lens_arn="storageLensArn"
    ),

    # the properties below are optional
    tags=[CfnTag(
        key="key",
        value="value"
    )]
)
java
// The code below shows an example of how to instantiate this type.
// The values are placeholders you should change.
import software.amazon.awscdk.services.s3.*;

Object sses3;

CfnStorageLensProps cfnStorageLensProps = CfnStorageLensProps.builder()
        .storageLensConfiguration(StorageLensConfigurationProperty.builder()
                .accountLevel(AccountLevelProperty.builder()
                        .bucketLevel(BucketLevelProperty.builder()
                                .activityMetrics(ActivityMetricsProperty.builder()
                                        .isEnabled(false)
                                        .build())
                                .advancedCostOptimizationMetrics(AdvancedCostOptimizationMetricsProperty.builder()
                                        .isEnabled(false)
                                        .build())
                                .advancedDataProtectionMetrics(AdvancedDataProtectionMetricsProperty.builder()
                                        .isEnabled(false)
                                        .build())
                                .advancedPerformanceMetrics(AdvancedPerformanceMetricsProperty.builder()
                                        .isEnabled(false)
                                        .build())
                                .detailedStatusCodesMetrics(DetailedStatusCodesMetricsProperty.builder()
                                        .isEnabled(false)
                                        .build())
                                .prefixLevel(PrefixLevelProperty.builder()
                                        .storageMetrics(PrefixLevelStorageMetricsProperty.builder()
                                                .isEnabled(false)
                                                .selectionCriteria(SelectionCriteriaProperty.builder()
                                                        .delimiter("delimiter")
                                                        .maxDepth(123)
                                                        .minStorageBytesPercentage(123)
                                                        .build())
                                                .build())
                                        .build())
                                .build())

                        // the properties below are optional
                        .activityMetrics(ActivityMetricsProperty.builder()
                                .isEnabled(false)
                                .build())
                        .advancedCostOptimizationMetrics(AdvancedCostOptimizationMetricsProperty.builder()
                                .isEnabled(false)
                                .build())
                        .advancedDataProtectionMetrics(AdvancedDataProtectionMetricsProperty.builder()
                                .isEnabled(false)
                                .build())
                        .advancedPerformanceMetrics(AdvancedPerformanceMetricsProperty.builder()
                                .isEnabled(false)
                                .build())
                        .detailedStatusCodesMetrics(DetailedStatusCodesMetricsProperty.builder()
                                .isEnabled(false)
                                .build())
                        .storageLensGroupLevel(StorageLensGroupLevelProperty.builder()
                                .storageLensGroupSelectionCriteria(StorageLensGroupSelectionCriteriaProperty.builder()
                                        .exclude(List.of("exclude"))
                                        .include(List.of("include"))
                                        .build())
                                .build())
                        .build())
                .id("id")
                .isEnabled(false)

                // the properties below are optional
                .awsOrg(AwsOrgProperty.builder()
                        .arn("arn")
                        .build())
                .dataExport(DataExportProperty.builder()
                        .cloudWatchMetrics(CloudWatchMetricsProperty.builder()
                                .isEnabled(false)
                                .build())
                        .s3BucketDestination(S3BucketDestinationProperty.builder()
                                .accountId("accountId")
                                .arn("arn")
                                .format("format")
                                .outputSchemaVersion("outputSchemaVersion")

                                // the properties below are optional
                                .encryption(EncryptionProperty.builder()
                                        .ssekms(SSEKMSProperty.builder()
                                                .keyId("keyId")
                                                .build())
                                        .sses3(sses3)
                                        .build())
                                .prefix("prefix")
                                .build())
                        .storageLensTableDestination(StorageLensTableDestinationProperty.builder()
                                .isEnabled(false)

                                // the properties below are optional
                                .encryption(EncryptionProperty.builder()
                                        .ssekms(SSEKMSProperty.builder()
                                                .keyId("keyId")
                                                .build())
                                        .sses3(sses3)
                                        .build())
                                .build())
                        .build())
                .exclude(BucketsAndRegionsProperty.builder()
                        .buckets(List.of("buckets"))
                        .regions(List.of("regions"))
                        .build())
                .expandedPrefixesDataExport(StorageLensExpandedPrefixesDataExportProperty.builder()
                        .s3BucketDestination(S3BucketDestinationProperty.builder()
                                .accountId("accountId")
                                .arn("arn")
                                .format("format")
                                .outputSchemaVersion("outputSchemaVersion")

                                // the properties below are optional
                                .encryption(EncryptionProperty.builder()
                                        .ssekms(SSEKMSProperty.builder()
                                                .keyId("keyId")
                                                .build())
                                        .sses3(sses3)
                                        .build())
                                .prefix("prefix")
                                .build())
                        .storageLensTableDestination(StorageLensTableDestinationProperty.builder()
                                .isEnabled(false)

                                // the properties below are optional
                                .encryption(EncryptionProperty.builder()
                                        .ssekms(SSEKMSProperty.builder()
                                                .keyId("keyId")
                                                .build())
                                        .sses3(sses3)
                                        .build())
                                .build())
                        .build())
                .include(BucketsAndRegionsProperty.builder()
                        .buckets(List.of("buckets"))
                        .regions(List.of("regions"))
                        .build())
                .prefixDelimiter("prefixDelimiter")
                .storageLensArn("storageLensArn")
                .build())

        // the properties below are optional
        .tags(List.of(CfnTag.builder()
                .key("key")
                .value("value")
                .build()))
        .build();
csharp
// Install: dotnet add package Amazon.CDK.Lib
// The code below shows an example of how to instantiate this type.
// The values are placeholders you should change.
using Amazon.CDK.AWS.S3;

var sses3;

var cfnStorageLensProps = new CfnStorageLensProps {
    StorageLensConfiguration = new StorageLensConfigurationProperty {
        AccountLevel = new AccountLevelProperty {
            BucketLevel = new BucketLevelProperty {
                ActivityMetrics = new ActivityMetricsProperty {
                    IsEnabled = false
                },
                AdvancedCostOptimizationMetrics = new AdvancedCostOptimizationMetricsProperty {
                    IsEnabled = false
                },
                AdvancedDataProtectionMetrics = new AdvancedDataProtectionMetricsProperty {
                    IsEnabled = false
                },
                AdvancedPerformanceMetrics = new AdvancedPerformanceMetricsProperty {
                    IsEnabled = false
                },
                DetailedStatusCodesMetrics = new DetailedStatusCodesMetricsProperty {
                    IsEnabled = false
                },
                PrefixLevel = new PrefixLevelProperty {
                    StorageMetrics = new PrefixLevelStorageMetricsProperty {
                        IsEnabled = false,
                        SelectionCriteria = new SelectionCriteriaProperty {
                            Delimiter = "delimiter",
                            MaxDepth = 123,
                            MinStorageBytesPercentage = 123
                        }
                    }
                }
            },

            // the properties below are optional
            ActivityMetrics = new ActivityMetricsProperty {
                IsEnabled = false
            },
            AdvancedCostOptimizationMetrics = new AdvancedCostOptimizationMetricsProperty {
                IsEnabled = false
            },
            AdvancedDataProtectionMetrics = new AdvancedDataProtectionMetricsProperty {
                IsEnabled = false
            },
            AdvancedPerformanceMetrics = new AdvancedPerformanceMetricsProperty {
                IsEnabled = false
            },
            DetailedStatusCodesMetrics = new DetailedStatusCodesMetricsProperty {
                IsEnabled = false
            },
            StorageLensGroupLevel = new StorageLensGroupLevelProperty {
                StorageLensGroupSelectionCriteria = new StorageLensGroupSelectionCriteriaProperty {
                    Exclude = new [] { "exclude" },
                    Include = new [] { "include" }
                }
            }
        },
        Id = "id",
        IsEnabled = false,

        // the properties below are optional
        AwsOrg = new AwsOrgProperty {
            Arn = "arn"
        },
        DataExport = new DataExportProperty {
            CloudWatchMetrics = new CloudWatchMetricsProperty {
                IsEnabled = false
            },
            S3BucketDestination = new S3BucketDestinationProperty {
                AccountId = "accountId",
                Arn = "arn",
                Format = "format",
                OutputSchemaVersion = "outputSchemaVersion",

                // the properties below are optional
                Encryption = new EncryptionProperty {
                    Ssekms = new SSEKMSProperty {
                        KeyId = "keyId"
                    },
                    Sses3 = sses3
                },
                Prefix = "prefix"
            },
            StorageLensTableDestination = new StorageLensTableDestinationProperty {
                IsEnabled = false,

                // the properties below are optional
                Encryption = new EncryptionProperty {
                    Ssekms = new SSEKMSProperty {
                        KeyId = "keyId"
                    },
                    Sses3 = sses3
                }
            }
        },
        Exclude = new BucketsAndRegionsProperty {
            Buckets = new [] { "buckets" },
            Regions = new [] { "regions" }
        },
        ExpandedPrefixesDataExport = new StorageLensExpandedPrefixesDataExportProperty {
            S3BucketDestination = new S3BucketDestinationProperty {
                AccountId = "accountId",
                Arn = "arn",
                Format = "format",
                OutputSchemaVersion = "outputSchemaVersion",

                // the properties below are optional
                Encryption = new EncryptionProperty {
                    Ssekms = new SSEKMSProperty {
                        KeyId = "keyId"
                    },
                    Sses3 = sses3
                },
                Prefix = "prefix"
            },
            StorageLensTableDestination = new StorageLensTableDestinationProperty {
                IsEnabled = false,

                // the properties below are optional
                Encryption = new EncryptionProperty {
                    Ssekms = new SSEKMSProperty {
                        KeyId = "keyId"
                    },
                    Sses3 = sses3
                }
            }
        },
        Include = new BucketsAndRegionsProperty {
            Buckets = new [] { "buckets" },
            Regions = new [] { "regions" }
        },
        PrefixDelimiter = "prefixDelimiter",
        StorageLensArn = "storageLensArn"
    },

    // the properties below are optional
    Tags = new [] { new CfnTag {
        Key = "key",
        Value = "value"
    } }
};
go
// Install: go get github.com/aws/aws-cdk-go/awscdk/v2
// The code below shows an example of how to instantiate this type.
// The values are placeholders you should change.
import "github.com/aws/aws-cdk-go/awscdk"

var sses3 interface{}

cfnStorageLensProps := &CfnStorageLensProps{
	StorageLensConfiguration: &StorageLensConfigurationProperty{
		AccountLevel: &AccountLevelProperty{
			BucketLevel: &BucketLevelProperty{
				ActivityMetrics: &ActivityMetricsProperty{
					IsEnabled: jsii.Boolean(false),
				},
				AdvancedCostOptimizationMetrics: &AdvancedCostOptimizationMetricsProperty{
					IsEnabled: jsii.Boolean(false),
				},
				AdvancedDataProtectionMetrics: &AdvancedDataProtectionMetricsProperty{
					IsEnabled: jsii.Boolean(false),
				},
				AdvancedPerformanceMetrics: &AdvancedPerformanceMetricsProperty{
					IsEnabled: jsii.Boolean(false),
				},
				DetailedStatusCodesMetrics: &DetailedStatusCodesMetricsProperty{
					IsEnabled: jsii.Boolean(false),
				},
				PrefixLevel: &PrefixLevelProperty{
					StorageMetrics: &PrefixLevelStorageMetricsProperty{
						IsEnabled: jsii.Boolean(false),
						SelectionCriteria: &SelectionCriteriaProperty{
							Delimiter: jsii.String("delimiter"),
							MaxDepth: jsii.Number(123),
							MinStorageBytesPercentage: jsii.Number(123),
						},
					},
				},
			},

			// the properties below are optional
			ActivityMetrics: &ActivityMetricsProperty{
				IsEnabled: jsii.Boolean(false),
			},
			AdvancedCostOptimizationMetrics: &AdvancedCostOptimizationMetricsProperty{
				IsEnabled: jsii.Boolean(false),
			},
			AdvancedDataProtectionMetrics: &AdvancedDataProtectionMetricsProperty{
				IsEnabled: jsii.Boolean(false),
			},
			AdvancedPerformanceMetrics: &AdvancedPerformanceMetricsProperty{
				IsEnabled: jsii.Boolean(false),
			},
			DetailedStatusCodesMetrics: &DetailedStatusCodesMetricsProperty{
				IsEnabled: jsii.Boolean(false),
			},
			StorageLensGroupLevel: &StorageLensGroupLevelProperty{
				StorageLensGroupSelectionCriteria: &StorageLensGroupSelectionCriteriaProperty{
					Exclude: []*string{
						jsii.String("exclude"),
					},
					Include: []*string{
						jsii.String("include"),
					},
				},
			},
		},
		Id: jsii.String("id"),
		IsEnabled: jsii.Boolean(false),

		// the properties below are optional
		AwsOrg: &AwsOrgProperty{
			Arn: jsii.String("arn"),
		},
		DataExport: &DataExportProperty{
			CloudWatchMetrics: &CloudWatchMetricsProperty{
				IsEnabled: jsii.Boolean(false),
			},
			S3BucketDestination: &S3BucketDestinationProperty{
				AccountId: jsii.String("accountId"),
				Arn: jsii.String("arn"),
				Format: jsii.String("format"),
				OutputSchemaVersion: jsii.String("outputSchemaVersion"),

				// the properties below are optional
				Encryption: &EncryptionProperty{
					Ssekms: &SSEKMSProperty{
						KeyId: jsii.String("keyId"),
					},
					Sses3: sses3,
				},
				Prefix: jsii.String("prefix"),
			},
			StorageLensTableDestination: &StorageLensTableDestinationProperty{
				IsEnabled: jsii.Boolean(false),

				// the properties below are optional
				Encryption: &EncryptionProperty{
					Ssekms: &SSEKMSProperty{
						KeyId: jsii.String("keyId"),
					},
					Sses3: sses3,
				},
			},
		},
		Exclude: &BucketsAndRegionsProperty{
			Buckets: []*string{
				jsii.String("buckets"),
			},
			Regions: []*string{
				jsii.String("regions"),
			},
		},
		ExpandedPrefixesDataExport: &StorageLensExpandedPrefixesDataExportProperty{
			S3BucketDestination: &S3BucketDestinationProperty{
				AccountId: jsii.String("accountId"),
				Arn: jsii.String("arn"),
				Format: jsii.String("format"),
				OutputSchemaVersion: jsii.String("outputSchemaVersion"),

				// the properties below are optional
				Encryption: &EncryptionProperty{
					Ssekms: &SSEKMSProperty{
						KeyId: jsii.String("keyId"),
					},
					Sses3: sses3,
				},
				Prefix: jsii.String("prefix"),
			},
			StorageLensTableDestination: &StorageLensTableDestinationProperty{
				IsEnabled: jsii.Boolean(false),

				// the properties below are optional
				Encryption: &EncryptionProperty{
					Ssekms: &SSEKMSProperty{
						KeyId: jsii.String("keyId"),
					},
					Sses3: sses3,
				},
			},
		},
		Include: &BucketsAndRegionsProperty{
			Buckets: []*string{
				jsii.String("buckets"),
			},
			Regions: []*string{
				jsii.String("regions"),
			},
		},
		PrefixDelimiter: jsii.String("prefixDelimiter"),
		StorageLensArn: jsii.String("storageLensArn"),
	},

	// the properties below are optional
	Tags: []CfnTag{
		&CfnTag{
			Key: jsii.String("key"),
			Value: jsii.String("value"),
		},
	},
}

Properties ​

storageLensConfigurationIResolvable | CfnStorageLens.StorageLensConfigurationPropertystorage_lens_configurationtyping.Union[IResolvable, StorageLensConfigurationProperty]storageLensConfigurationIResolvableStorageLensConfigurationIResolvableStorageLensConfigurationinterface{} required #
This resource contains the details Amazon S3 Storage Lens configuration.
tagsoptionalCfnTag[]tagsoptionaltyping.List[CfnTag]tagsoptionalList<CfnTag>TagsoptionalCfnTag[]Tagsoptional*[]CfnTag #
A set of tags (key–value pairs) to associate with the Storage Lens configuration.