Class CfnStorageLensGroup

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

@Generated(value="jsii-pacmak/1.98.0 (build 00b106d)", date="2024-05-08T21:35:13.233Z") @Stability(Stable) public class CfnStorageLensGroup extends CfnResource implements IInspectable, ITaggableV2
The AWS::S3::StorageLensGroup resource creates an S3 Storage Lens group.

A Storage Lens group is a custom grouping of objects that include filters for prefixes, suffixes, object tags, object size, or object age. You can create an S3 Storage Lens group that includes a single filter or multiple filter conditions. To specify multiple filter conditions, you use AND or OR logical operators. For more information about S3 Storage Lens groups, see Working with S3 Storage Lens groups .

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.*;
 CfnStorageLensGroup cfnStorageLensGroup = CfnStorageLensGroup.Builder.create(this, "MyCfnStorageLensGroup")
         .filter(FilterProperty.builder()
                 .and(AndProperty.builder()
                         .matchAnyPrefix(List.of("matchAnyPrefix"))
                         .matchAnySuffix(List.of("matchAnySuffix"))
                         .matchAnyTag(List.of(CfnTag.builder()
                                 .key("key")
                                 .value("value")
                                 .build()))
                         .matchObjectAge(MatchObjectAgeProperty.builder()
                                 .daysGreaterThan(123)
                                 .daysLessThan(123)
                                 .build())
                         .matchObjectSize(MatchObjectSizeProperty.builder()
                                 .bytesGreaterThan(123)
                                 .bytesLessThan(123)
                                 .build())
                         .build())
                 .matchAnyPrefix(List.of("matchAnyPrefix"))
                 .matchAnySuffix(List.of("matchAnySuffix"))
                 .matchAnyTag(List.of(CfnTag.builder()
                         .key("key")
                         .value("value")
                         .build()))
                 .matchObjectAge(MatchObjectAgeProperty.builder()
                         .daysGreaterThan(123)
                         .daysLessThan(123)
                         .build())
                 .matchObjectSize(MatchObjectSizeProperty.builder()
                         .bytesGreaterThan(123)
                         .bytesLessThan(123)
                         .build())
                 .or(OrProperty.builder()
                         .matchAnyPrefix(List.of("matchAnyPrefix"))
                         .matchAnySuffix(List.of("matchAnySuffix"))
                         .matchAnyTag(List.of(CfnTag.builder()
                                 .key("key")
                                 .value("value")
                                 .build()))
                         .matchObjectAge(MatchObjectAgeProperty.builder()
                                 .daysGreaterThan(123)
                                 .daysLessThan(123)
                                 .build())
                         .matchObjectSize(MatchObjectSizeProperty.builder()
                                 .bytesGreaterThan(123)
                                 .bytesLessThan(123)
                                 .build())
                         .build())
                 .build())
         .name("name")
         // 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

    • CfnStorageLensGroup

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

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

      @Stability(Stable) public CfnStorageLensGroup(@NotNull software.constructs.Construct scope, @NotNull String id, @NotNull CfnStorageLensGroupProps 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.
    • getAttrStorageLensGroupArn

      @Stability(Stable) @NotNull public String getAttrStorageLensGroupArn()
      The ARN for the Amazon S3 Storage Lens Group.
    • getCdkTagManager

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

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

      @Stability(Stable) @NotNull public Object getFilter()
      This property contains the criteria for the Storage Lens group data that is displayed.
    • setFilter

      @Stability(Stable) public void setFilter(@NotNull IResolvable value)
      This property contains the criteria for the Storage Lens group data that is displayed.
    • setFilter

      @Stability(Stable) public void setFilter(@NotNull CfnStorageLensGroup.FilterProperty value)
      This property contains the criteria for the Storage Lens group data that is displayed.
    • getName

      @Stability(Stable) @NotNull public String getName()
      This property contains the Storage Lens group name.
    • setName

      @Stability(Stable) public void setName(@NotNull String value)
      This property contains the Storage Lens group name.
    • getTags

      @Stability(Stable) @Nullable public List<CfnTag> getTags()
      This property contains the AWS resource tags that you're adding to your Storage Lens group.
    • setTags

      @Stability(Stable) public void setTags(@Nullable List<CfnTag> value)
      This property contains the AWS resource tags that you're adding to your Storage Lens group.