Class CfnStorageLens

java.lang.Object
software.amazon.jsii.JsiiObject
software.constructs.Construct
All Implemented Interfaces:
IInspectable, ITaggable, software.amazon.jsii.JsiiSerializable, software.constructs.IConstruct, software.constructs.IDependable

@Generated(value="jsii-pacmak/1.103.1 (build bef2dea)", date="2024-10-11T15:56:05.363Z") @Stability(Stable) public class CfnStorageLens extends CfnResource implements IInspectable, ITaggable
The AWS::S3::StorageLens resource creates an Amazon S3 Storage Lens configuration.

Example:

 // 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;
 CfnStorageLens cfnStorageLens = CfnStorageLens.Builder.create(this, "MyCfnStorageLens")
         .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())
                                 .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())
                         .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())
                         .build())
                 .exclude(BucketsAndRegionsProperty.builder()
                         .buckets(List.of("buckets"))
                         .regions(List.of("regions"))
                         .build())
                 .include(BucketsAndRegionsProperty.builder()
                         .buckets(List.of("buckets"))
                         .regions(List.of("regions"))
                         .build())
                 .storageLensArn("storageLensArn")
                 .build())
         // the properties below are optional
         .tags(List.of(CfnTag.builder()
                 .key("key")
                 .value("value")
                 .build()))
         .build();
 

See Also:
  • Field Details

    • CFN_RESOURCE_TYPE_NAME

      @Stability(Stable) public static final String CFN_RESOURCE_TYPE_NAME
      The CloudFormation resource type name for this resource class.
  • Constructor Details

    • CfnStorageLens

      protected CfnStorageLens(software.amazon.jsii.JsiiObjectRef objRef)
    • CfnStorageLens

      protected CfnStorageLens(software.amazon.jsii.JsiiObject.InitializationMode initializationMode)
    • CfnStorageLens

      @Stability(Stable) public CfnStorageLens(@NotNull software.constructs.Construct scope, @NotNull String id, @NotNull CfnStorageLensProps props)
      Parameters:
      scope - Scope in which this resource is defined. This parameter is required.
      id - Construct identifier for this resource (unique in its scope). This parameter is required.
      props - Resource properties. This parameter is required.
  • Method Details

    • inspect

      @Stability(Stable) public void inspect(@NotNull TreeInspector inspector)
      Examines the CloudFormation resource and discloses attributes.

      Specified by:
      inspect in interface IInspectable
      Parameters:
      inspector - tree inspector to collect and process attributes. This parameter is required.
    • renderProperties

      @Stability(Stable) @NotNull protected Map<String,Object> renderProperties(@NotNull Map<String,Object> props)
      Overrides:
      renderProperties in class CfnResource
      Parameters:
      props - This parameter is required.
    • getAttrStorageLensConfigurationStorageLensArn

      @Stability(Stable) @NotNull public String getAttrStorageLensConfigurationStorageLensArn()
      This property contains the details of the ARN of the S3 Storage Lens configuration.

      This property is read-only.

    • getCfnProperties

      @Stability(Stable) @NotNull protected Map<String,Object> getCfnProperties()
      Overrides:
      getCfnProperties in class CfnResource
    • getTags

      @Stability(Stable) @NotNull public TagManager getTags()
      Tag Manager which manages the tags for this resource.
      Specified by:
      getTags in interface ITaggable
    • getStorageLensConfiguration

      @Stability(Stable) @NotNull public Object getStorageLensConfiguration()
      This resource contains the details Amazon S3 Storage Lens configuration.
    • setStorageLensConfiguration

      @Stability(Stable) public void setStorageLensConfiguration(@NotNull IResolvable value)
      This resource contains the details Amazon S3 Storage Lens configuration.
    • setStorageLensConfiguration

      @Stability(Stable) public void setStorageLensConfiguration(@NotNull CfnStorageLens.StorageLensConfigurationProperty value)
      This resource contains the details Amazon S3 Storage Lens configuration.
    • getTagsRaw

      @Stability(Stable) @Nullable public List<CfnTag> getTagsRaw()
      A set of tags (key–value pairs) to associate with the Storage Lens configuration.
    • setTagsRaw

      @Stability(Stable) public void setTagsRaw(@Nullable List<CfnTag> value)
      A set of tags (key–value pairs) to associate with the Storage Lens configuration.