CfnStorageLens

class aws_cdk.aws_s3.CfnStorageLens(scope, id, *, storage_lens_configuration, tags=None)

Bases: aws_cdk.core.CfnResource

A CloudFormation AWS::S3::StorageLens.

The AWS::S3::StorageLens resource creates an instance of an Amazon S3 Storage Lens configuration.

CloudformationResource

AWS::S3::StorageLens

Link

http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-resource-s3-storagelens.html

ExampleMetadata

fixture=_generated

Example:

# The code below shows an example of how to instantiate this type.
# The values are placeholders you should change.
import aws_cdk.aws_s3 as s3

# encryption: Any

cfn_storage_lens = s3.CfnStorageLens(self, "MyCfnStorageLens",
    storage_lens_configuration=s3.CfnStorageLens.StorageLensConfigurationProperty(
        account_level=s3.CfnStorageLens.AccountLevelProperty(
            bucket_level=s3.CfnStorageLens.BucketLevelProperty(
                activity_metrics=s3.CfnStorageLens.ActivityMetricsProperty(
                    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
            )
        ),
        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=encryption,
                prefix="prefix"
            )
        ),
        exclude=s3.CfnStorageLens.BucketsAndRegionsProperty(
            buckets=["buckets"],
            regions=["regions"]
        ),
        include=s3.CfnStorageLens.BucketsAndRegionsProperty(
            buckets=["buckets"],
            regions=["regions"]
        ),
        storage_lens_arn="storageLensArn"
    ),

    # the properties below are optional
    tags=[CfnTag(
        key="key",
        value="value"
    )]
)

Create a new AWS::S3::StorageLens.

Parameters
  • scope (Construct) –

    • scope in which this resource is defined.

  • id (str) –

    • scoped id of the resource.

  • storage_lens_configuration (Union[IResolvable, StorageLensConfigurationProperty, Dict[str, Any]]) – This resource contains the details Amazon S3 Storage Lens configuration.

  • tags (Optional[Sequence[Union[CfnTag, Dict[str, Any]]]]) – A set of tags (key–value pairs) to associate with the Storage Lens configuration.

Methods

add_deletion_override(path)

Syntactic sugar for addOverride(path, undefined).

Parameters

path (str) – The path of the value to delete.

Return type

None

add_depends_on(target)

Indicates that this resource depends on another resource and cannot be provisioned unless the other resource has been successfully provisioned.

This can be used for resources across stacks (or nested stack) boundaries and the dependency will automatically be transferred to the relevant scope.

Parameters

target (CfnResource) –

Return type

None

add_metadata(key, value)

Add a value to the CloudFormation Resource Metadata.

Parameters
  • key (str) –

  • value (Any) –

See

https://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/metadata-section-structure.html

Note that this is a different set of metadata from CDK node metadata; this metadata ends up in the stack template under the resource, whereas CDK node metadata ends up in the Cloud Assembly.

Return type

None

add_override(path, value)

Adds an override to the synthesized CloudFormation resource.

To add a property override, either use addPropertyOverride or prefix path with “Properties.” (i.e. Properties.TopicName).

If the override is nested, separate each nested level using a dot (.) in the path parameter. If there is an array as part of the nesting, specify the index in the path.

To include a literal . in the property name, prefix with a \. In most programming languages you will need to write this as "\\." because the \ itself will need to be escaped.

For example:

cfn_resource.add_override("Properties.GlobalSecondaryIndexes.0.Projection.NonKeyAttributes", ["myattribute"])
cfn_resource.add_override("Properties.GlobalSecondaryIndexes.1.ProjectionType", "INCLUDE")

would add the overrides Example:

"Properties": {
   "GlobalSecondaryIndexes": [
     {
       "Projection": {
         "NonKeyAttributes": [ "myattribute" ]
         ...
       }
       ...
     },
     {
       "ProjectionType": "INCLUDE"
       ...
     },
   ]
   ...
}

The value argument to addOverride will not be processed or translated in any way. Pass raw JSON values in here with the correct capitalization for CloudFormation. If you pass CDK classes or structs, they will be rendered with lowercased key names, and CloudFormation will reject the template.

Parameters
  • path (str) –

    • The path of the property, you can use dot notation to override values in complex types. Any intermdediate keys will be created as needed.

  • value (Any) –

    • The value. Could be primitive or complex.

Return type

None

add_property_deletion_override(property_path)

Adds an override that deletes the value of a property from the resource definition.

Parameters

property_path (str) – The path to the property.

Return type

None

add_property_override(property_path, value)

Adds an override to a resource property.

Syntactic sugar for addOverride("Properties.<...>", value).

Parameters
  • property_path (str) – The path of the property.

  • value (Any) – The value.

Return type

None

apply_removal_policy(policy=None, *, apply_to_update_replace_policy=None, default=None)

Sets the deletion policy of the resource based on the removal policy specified.

The Removal Policy controls what happens to this resource when it stops being managed by CloudFormation, either because you’ve removed it from the CDK application or because you’ve made a change that requires the resource to be replaced.

The resource can be deleted (RemovalPolicy.DESTROY), or left in your AWS account for data recovery and cleanup later (RemovalPolicy.RETAIN).

Parameters
  • policy (Optional[RemovalPolicy]) –

  • apply_to_update_replace_policy (Optional[bool]) – Apply the same deletion policy to the resource’s “UpdateReplacePolicy”. Default: true

  • default (Optional[RemovalPolicy]) – The default policy to apply in case the removal policy is not defined. Default: - Default value is resource specific. To determine the default value for a resoure, please consult that specific resource’s documentation.

Return type

None

get_att(attribute_name)

Returns a token for an runtime attribute of this resource.

Ideally, use generated attribute accessors (e.g. resource.arn), but this can be used for future compatibility in case there is no generated attribute.

Parameters

attribute_name (str) – The name of the attribute.

Return type

Reference

get_metadata(key)

Retrieve a value value from the CloudFormation Resource Metadata.

Parameters

key (str) –

See

https://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/metadata-section-structure.html

Note that this is a different set of metadata from CDK node metadata; this metadata ends up in the stack template under the resource, whereas CDK node metadata ends up in the Cloud Assembly.

Return type

Any

inspect(inspector)

Examines the CloudFormation resource and discloses attributes.

Parameters

inspector (TreeInspector) –

  • tree inspector to collect and process attributes.

Return type

None

override_logical_id(new_logical_id)

Overrides the auto-generated logical ID with a specific ID.

Parameters

new_logical_id (str) – The new logical ID to use for this stack element.

Return type

None

to_string()

Returns a string representation of this construct.

Return type

str

Returns

a string representation of this resource

Attributes

CFN_RESOURCE_TYPE_NAME = 'AWS::S3::StorageLens'
attr_storage_lens_configuration_storage_lens_arn

This property contains the details of the ARN of the S3 Storage Lens configuration.

This property is read-only.

CloudformationAttribute

StorageLensConfiguration.StorageLensArn

Return type

str

cfn_options

Options for this resource, such as condition, update policy etc.

Return type

ICfnResourceOptions

cfn_resource_type

AWS resource type.

Return type

str

creation_stack

return:

the stack trace of the point where this Resource was created from, sourced from the +metadata+ entry typed +aws:cdk:logicalId+, and with the bottom-most node +internal+ entries filtered.

Return type

List[str]

logical_id

The logical ID for this CloudFormation stack element.

The logical ID of the element is calculated from the path of the resource node in the construct tree.

To override this value, use overrideLogicalId(newLogicalId).

Return type

str

Returns

the logical ID as a stringified token. This value will only get resolved during synthesis.

node

The construct tree node associated with this construct.

Return type

ConstructNode

ref

Return a string that will be resolved to a CloudFormation { Ref } for this element.

If, by any chance, the intrinsic reference of a resource is not a string, you could coerce it to an IResolvable through Lazy.any({ produce: resource.ref }).

Return type

str

stack

The stack in which this element is defined.

CfnElements must be defined within a stack scope (directly or indirectly).

Return type

Stack

storage_lens_configuration

This resource contains the details Amazon S3 Storage Lens configuration.

Link

http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-resource-s3-storagelens.html#cfn-s3-storagelens-storagelensconfiguration

Return type

Union[IResolvable, StorageLensConfigurationProperty]

tags

A set of tags (key–value pairs) to associate with the Storage Lens configuration.

Link

http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-resource-s3-storagelens.html#cfn-s3-storagelens-tags

Return type

TagManager

Static Methods

classmethod is_cfn_element(x)

Returns true if a construct is a stack element (i.e. part of the synthesized cloudformation template).

Uses duck-typing instead of instanceof to allow stack elements from different versions of this library to be included in the same stack.

Parameters

x (Any) –

Return type

bool

Returns

The construct as a stack element or undefined if it is not a stack element.

classmethod is_cfn_resource(construct)

Check whether the given construct is a CfnResource.

Parameters

construct (IConstruct) –

Return type

bool

classmethod is_construct(x)

Return whether the given object is a Construct.

Parameters

x (Any) –

Return type

bool

AccountLevelProperty

class CfnStorageLens.AccountLevelProperty(*, bucket_level, activity_metrics=None)

Bases: object

This resource contains the details of the account-level metrics for Amazon S3 Storage Lens.

Parameters
  • bucket_level (Union[IResolvable, BucketLevelProperty, Dict[str, Any]]) – This property contains the details of the account-level bucket-level configurations for Amazon S3 Storage Lens.

  • activity_metrics (Union[IResolvable, ActivityMetricsProperty, Dict[str, Any], None]) – This property contains the details of the account-level activity metrics for Amazon S3 Storage Lens.

Link

http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-properties-s3-storagelens-accountlevel.html

ExampleMetadata

fixture=_generated

Example:

# The code below shows an example of how to instantiate this type.
# The values are placeholders you should change.
import aws_cdk.aws_s3 as s3

account_level_property = s3.CfnStorageLens.AccountLevelProperty(
    bucket_level=s3.CfnStorageLens.BucketLevelProperty(
        activity_metrics=s3.CfnStorageLens.ActivityMetricsProperty(
            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
    )
)

Attributes

activity_metrics

This property contains the details of the account-level activity metrics for Amazon S3 Storage Lens.

Link

http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-properties-s3-storagelens-accountlevel.html#cfn-s3-storagelens-accountlevel-activitymetrics

Return type

Union[IResolvable, ActivityMetricsProperty, None]

bucket_level

This property contains the details of the account-level bucket-level configurations for Amazon S3 Storage Lens.

Link

http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-properties-s3-storagelens-accountlevel.html#cfn-s3-storagelens-accountlevel-bucketlevel

Return type

Union[IResolvable, BucketLevelProperty]

ActivityMetricsProperty

class CfnStorageLens.ActivityMetricsProperty(*, is_enabled=None)

Bases: object

This resource contains the details of the activity metrics for Amazon S3 Storage Lens.

Parameters

is_enabled (Union[bool, IResolvable, None]) – A property that indicates whether the activity metrics is enabled.

Link

http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-properties-s3-storagelens-activitymetrics.html

ExampleMetadata

fixture=_generated

Example:

# The code below shows an example of how to instantiate this type.
# The values are placeholders you should change.
import aws_cdk.aws_s3 as s3

activity_metrics_property = s3.CfnStorageLens.ActivityMetricsProperty(
    is_enabled=False
)

Attributes

is_enabled

A property that indicates whether the activity metrics is enabled.

Link

http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-properties-s3-storagelens-activitymetrics.html#cfn-s3-storagelens-activitymetrics-isenabled

Return type

Union[bool, IResolvable, None]

AwsOrgProperty

class CfnStorageLens.AwsOrgProperty(*, arn)

Bases: object

This resource contains the details of the AWS Organization for Amazon S3 Storage Lens.

Parameters

arn (str) – This resource contains the ARN of the AWS Organization.

Link

http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-properties-s3-storagelens-awsorg.html

ExampleMetadata

fixture=_generated

Example:

# The code below shows an example of how to instantiate this type.
# The values are placeholders you should change.
import aws_cdk.aws_s3 as s3

aws_org_property = s3.CfnStorageLens.AwsOrgProperty(
    arn="arn"
)

Attributes

arn

This resource contains the ARN of the AWS Organization.

Link

http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-properties-s3-storagelens-awsorg.html#cfn-s3-storagelens-awsorg-arn

Return type

str

BucketLevelProperty

class CfnStorageLens.BucketLevelProperty(*, activity_metrics=None, prefix_level=None)

Bases: object

A property for the bucket-level storage metrics for Amazon S3 Storage Lens.

Parameters
  • activity_metrics (Union[IResolvable, ActivityMetricsProperty, Dict[str, Any], None]) – A property for the bucket-level activity metrics for Amazon S3 Storage Lens.

  • prefix_level (Union[IResolvable, PrefixLevelProperty, Dict[str, Any], None]) – A property for the bucket-level prefix-level storage metrics for S3 Storage Lens.

Link

http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-properties-s3-storagelens-bucketlevel.html

ExampleMetadata

fixture=_generated

Example:

# The code below shows an example of how to instantiate this type.
# The values are placeholders you should change.
import aws_cdk.aws_s3 as s3

bucket_level_property = s3.CfnStorageLens.BucketLevelProperty(
    activity_metrics=s3.CfnStorageLens.ActivityMetricsProperty(
        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
            )
        )
    )
)

Attributes

activity_metrics

A property for the bucket-level activity metrics for Amazon S3 Storage Lens.

Link

http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-properties-s3-storagelens-bucketlevel.html#cfn-s3-storagelens-bucketlevel-activitymetrics

Return type

Union[IResolvable, ActivityMetricsProperty, None]

prefix_level

A property for the bucket-level prefix-level storage metrics for S3 Storage Lens.

Link

http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-properties-s3-storagelens-bucketlevel.html#cfn-s3-storagelens-bucketlevel-prefixlevel

Return type

Union[IResolvable, PrefixLevelProperty, None]

BucketsAndRegionsProperty

class CfnStorageLens.BucketsAndRegionsProperty(*, buckets=None, regions=None)

Bases: object

This resource contains the details of the buckets and Regions for the Amazon S3 Storage Lens configuration.

Parameters
  • buckets (Optional[Sequence[str]]) – This property contains the details of the buckets for the Amazon S3 Storage Lens configuration. This should be the bucket Amazon Resource Name(ARN). For valid values, see Buckets ARN format here in the Amazon S3 API Reference .

  • regions (Optional[Sequence[str]]) – This property contains the details of the Regions for the S3 Storage Lens configuration.

Link

http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-properties-s3-storagelens-bucketsandregions.html

ExampleMetadata

fixture=_generated

Example:

# The code below shows an example of how to instantiate this type.
# The values are placeholders you should change.
import aws_cdk.aws_s3 as s3

buckets_and_regions_property = s3.CfnStorageLens.BucketsAndRegionsProperty(
    buckets=["buckets"],
    regions=["regions"]
)

Attributes

buckets

This property contains the details of the buckets for the Amazon S3 Storage Lens configuration.

This should be the bucket Amazon Resource Name(ARN). For valid values, see Buckets ARN format here in the Amazon S3 API Reference .

Link

http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-properties-s3-storagelens-bucketsandregions.html#cfn-s3-storagelens-bucketsandregions-buckets

Return type

Optional[List[str]]

regions

This property contains the details of the Regions for the S3 Storage Lens configuration.

Link

http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-properties-s3-storagelens-bucketsandregions.html#cfn-s3-storagelens-bucketsandregions-regions

Return type

Optional[List[str]]

CloudWatchMetricsProperty

class CfnStorageLens.CloudWatchMetricsProperty(*, is_enabled)

Bases: object

This resource enables the Amazon CloudWatch publishing option for S3 Storage Lens metrics.

For more information, see Monitor S3 Storage Lens metrics in CloudWatch in the Amazon S3 User Guide .

Parameters

is_enabled (Union[bool, IResolvable]) – This property identifies whether the CloudWatch publishing option for S3 Storage Lens is enabled.

Link

http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-properties-s3-storagelens-cloudwatchmetrics.html

ExampleMetadata

fixture=_generated

Example:

# The code below shows an example of how to instantiate this type.
# The values are placeholders you should change.
import aws_cdk.aws_s3 as s3

cloud_watch_metrics_property = s3.CfnStorageLens.CloudWatchMetricsProperty(
    is_enabled=False
)

Attributes

is_enabled

This property identifies whether the CloudWatch publishing option for S3 Storage Lens is enabled.

Link

http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-properties-s3-storagelens-cloudwatchmetrics.html#cfn-s3-storagelens-cloudwatchmetrics-isenabled

Return type

Union[bool, IResolvable]

DataExportProperty

class CfnStorageLens.DataExportProperty(*, cloud_watch_metrics=None, s3_bucket_destination=None)

Bases: object

This resource contains the details of the Amazon S3 Storage Lens metrics export.

Parameters
  • cloud_watch_metrics (Union[IResolvable, CloudWatchMetricsProperty, Dict[str, Any], None]) – This property enables the Amazon CloudWatch publishing option for S3 Storage Lens metrics.

  • s3_bucket_destination (Union[IResolvable, S3BucketDestinationProperty, Dict[str, Any], None]) – This property contains the details of the bucket where the S3 Storage Lens metrics export will be placed.

Link

http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-properties-s3-storagelens-dataexport.html

ExampleMetadata

fixture=_generated

Example:

# The code below shows an example of how to instantiate this type.
# The values are placeholders you should change.
import aws_cdk.aws_s3 as s3

# encryption: Any

data_export_property = 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=encryption,
        prefix="prefix"
    )
)

Attributes

cloud_watch_metrics

This property enables the Amazon CloudWatch publishing option for S3 Storage Lens metrics.

Link

http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-properties-s3-storagelens-dataexport.html#cfn-s3-storagelens-dataexport-cloudwatchmetrics

Return type

Union[IResolvable, CloudWatchMetricsProperty, None]

s3_bucket_destination

This property contains the details of the bucket where the S3 Storage Lens metrics export will be placed.

Link

http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-properties-s3-storagelens-dataexport.html#cfn-s3-storagelens-dataexport-s3bucketdestination

Return type

Union[IResolvable, S3BucketDestinationProperty, None]

PrefixLevelProperty

class CfnStorageLens.PrefixLevelProperty(*, storage_metrics)

Bases: object

This resource contains the details of the prefix-level of the Amazon S3 Storage Lens.

Parameters

storage_metrics (Union[IResolvable, PrefixLevelStorageMetricsProperty, Dict[str, Any]]) – A property for the prefix-level storage metrics for Amazon S3 Storage Lens.

Link

http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-properties-s3-storagelens-prefixlevel.html

ExampleMetadata

fixture=_generated

Example:

# The code below shows an example of how to instantiate this type.
# The values are placeholders you should change.
import aws_cdk.aws_s3 as s3

prefix_level_property = 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
        )
    )
)

Attributes

storage_metrics

A property for the prefix-level storage metrics for Amazon S3 Storage Lens.

Link

http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-properties-s3-storagelens-prefixlevel.html#cfn-s3-storagelens-prefixlevel-storagemetrics

Return type

Union[IResolvable, PrefixLevelStorageMetricsProperty]

PrefixLevelStorageMetricsProperty

class CfnStorageLens.PrefixLevelStorageMetricsProperty(*, is_enabled=None, selection_criteria=None)

Bases: object

This resource contains the details of the prefix-level storage metrics for Amazon S3 Storage Lens.

Parameters
  • is_enabled (Union[bool, IResolvable, None]) – This property identifies whether the details of the prefix-level storage metrics for S3 Storage Lens are enabled.

  • selection_criteria (Union[IResolvable, SelectionCriteriaProperty, Dict[str, Any], None]) – This property identifies whether the details of the prefix-level storage metrics for S3 Storage Lens are enabled.

Link

http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-properties-s3-storagelens-prefixlevelstoragemetrics.html

ExampleMetadata

fixture=_generated

Example:

# The code below shows an example of how to instantiate this type.
# The values are placeholders you should change.
import aws_cdk.aws_s3 as s3

prefix_level_storage_metrics_property = s3.CfnStorageLens.PrefixLevelStorageMetricsProperty(
    is_enabled=False,
    selection_criteria=s3.CfnStorageLens.SelectionCriteriaProperty(
        delimiter="delimiter",
        max_depth=123,
        min_storage_bytes_percentage=123
    )
)

Attributes

is_enabled

This property identifies whether the details of the prefix-level storage metrics for S3 Storage Lens are enabled.

Link

http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-properties-s3-storagelens-prefixlevelstoragemetrics.html#cfn-s3-storagelens-prefixlevelstoragemetrics-isenabled

Return type

Union[bool, IResolvable, None]

selection_criteria

This property identifies whether the details of the prefix-level storage metrics for S3 Storage Lens are enabled.

Link

http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-properties-s3-storagelens-prefixlevelstoragemetrics.html#cfn-s3-storagelens-prefixlevelstoragemetrics-selectioncriteria

Return type

Union[IResolvable, SelectionCriteriaProperty, None]

S3BucketDestinationProperty

class CfnStorageLens.S3BucketDestinationProperty(*, account_id, arn, format, output_schema_version, encryption=None, prefix=None)

Bases: object

This resource contains the details of the bucket where the Amazon S3 Storage Lens metrics export will be placed.

Parameters
  • account_id (str) – This property contains the details of the AWS account ID of the S3 Storage Lens export bucket destination.

  • arn (str) – This property contains the details of the ARN of the bucket destination of the S3 Storage Lens export.

  • format (str) – This property contains the details of the format of the S3 Storage Lens export bucket destination.

  • output_schema_version (str) – This property contains the details of the output schema version of the S3 Storage Lens export bucket destination.

  • encryption (Optional[Any]) – This property contains the details of the encryption of the bucket destination of the Amazon S3 Storage Lens metrics export.

  • prefix (Optional[str]) – This property contains the details of the prefix of the bucket destination of the S3 Storage Lens export .

Link

http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-properties-s3-storagelens-s3bucketdestination.html

ExampleMetadata

fixture=_generated

Example:

# The code below shows an example of how to instantiate this type.
# The values are placeholders you should change.
import aws_cdk.aws_s3 as s3

# encryption: Any

s3_bucket_destination_property = s3.CfnStorageLens.S3BucketDestinationProperty(
    account_id="accountId",
    arn="arn",
    format="format",
    output_schema_version="outputSchemaVersion",

    # the properties below are optional
    encryption=encryption,
    prefix="prefix"
)

Attributes

account_id

This property contains the details of the AWS account ID of the S3 Storage Lens export bucket destination.

Link

http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-properties-s3-storagelens-s3bucketdestination.html#cfn-s3-storagelens-s3bucketdestination-accountid

Return type

str

arn

This property contains the details of the ARN of the bucket destination of the S3 Storage Lens export.

Link

http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-properties-s3-storagelens-s3bucketdestination.html#cfn-s3-storagelens-s3bucketdestination-arn

Return type

str

encryption

This property contains the details of the encryption of the bucket destination of the Amazon S3 Storage Lens metrics export.

Link

http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-properties-s3-storagelens-s3bucketdestination.html#cfn-s3-storagelens-s3bucketdestination-encryption

Return type

Any

format

This property contains the details of the format of the S3 Storage Lens export bucket destination.

Link

http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-properties-s3-storagelens-s3bucketdestination.html#cfn-s3-storagelens-s3bucketdestination-format

Return type

str

output_schema_version

This property contains the details of the output schema version of the S3 Storage Lens export bucket destination.

Link

http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-properties-s3-storagelens-s3bucketdestination.html#cfn-s3-storagelens-s3bucketdestination-outputschemaversion

Return type

str

prefix

This property contains the details of the prefix of the bucket destination of the S3 Storage Lens export .

Link

http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-properties-s3-storagelens-s3bucketdestination.html#cfn-s3-storagelens-s3bucketdestination-prefix

Return type

Optional[str]

SelectionCriteriaProperty

class CfnStorageLens.SelectionCriteriaProperty(*, delimiter=None, max_depth=None, min_storage_bytes_percentage=None)

Bases: object

This resource contains the details of the Amazon S3 Storage Lens selection criteria.

Parameters
  • delimiter (Optional[str]) – This property contains the details of the S3 Storage Lens delimiter being used.

  • max_depth (Union[int, float, None]) – This property contains the details of the max depth that S3 Storage Lens will collect metrics up to.

  • min_storage_bytes_percentage (Union[int, float, None]) – This property contains the details of the minimum storage bytes percentage threshold that S3 Storage Lens will collect metrics up to.

Link

http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-properties-s3-storagelens-selectioncriteria.html

ExampleMetadata

fixture=_generated

Example:

# The code below shows an example of how to instantiate this type.
# The values are placeholders you should change.
import aws_cdk.aws_s3 as s3

selection_criteria_property = s3.CfnStorageLens.SelectionCriteriaProperty(
    delimiter="delimiter",
    max_depth=123,
    min_storage_bytes_percentage=123
)

Attributes

delimiter

This property contains the details of the S3 Storage Lens delimiter being used.

Link

http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-properties-s3-storagelens-selectioncriteria.html#cfn-s3-storagelens-selectioncriteria-delimiter

Return type

Optional[str]

max_depth

This property contains the details of the max depth that S3 Storage Lens will collect metrics up to.

Link

http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-properties-s3-storagelens-selectioncriteria.html#cfn-s3-storagelens-selectioncriteria-maxdepth

Return type

Union[int, float, None]

min_storage_bytes_percentage

This property contains the details of the minimum storage bytes percentage threshold that S3 Storage Lens will collect metrics up to.

Link

http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-properties-s3-storagelens-selectioncriteria.html#cfn-s3-storagelens-selectioncriteria-minstoragebytespercentage

Return type

Union[int, float, None]

StorageLensConfigurationProperty

class CfnStorageLens.StorageLensConfigurationProperty(*, account_level, id, is_enabled, aws_org=None, data_export=None, exclude=None, include=None, storage_lens_arn=None)

Bases: object

This is the property of the Amazon S3 Storage Lens configuration.

Parameters
  • account_level (Union[IResolvable, AccountLevelProperty, Dict[str, Any]]) – This property contains the details of the account-level metrics for Amazon S3 Storage Lens configuration.

  • id (str) – This property contains the details of the ID of the S3 Storage Lens configuration.

  • is_enabled (Union[bool, IResolvable]) – This property contains the details of whether the Amazon S3 Storage Lens configuration is enabled.

  • aws_org (Union[IResolvable, AwsOrgProperty, Dict[str, Any], None]) – This property contains the details of the AWS Organization for the S3 Storage Lens configuration.

  • data_export (Union[IResolvable, DataExportProperty, Dict[str, Any], None]) – This property contains the details of this S3 Storage Lens configuration’s metrics export.

  • exclude (Union[IResolvable, BucketsAndRegionsProperty, Dict[str, Any], None]) – This property contains the details of the bucket and or Regions excluded for Amazon S3 Storage Lens configuration.

  • include (Union[IResolvable, BucketsAndRegionsProperty, Dict[str, Any], None]) – This property contains the details of the bucket and or Regions included for Amazon S3 Storage Lens configuration.

  • storage_lens_arn (Optional[str]) – This property contains the details of the ARN of the S3 Storage Lens configuration. This property is read-only.

Link

http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-properties-s3-storagelens-storagelensconfiguration.html

ExampleMetadata

fixture=_generated

Example:

# The code below shows an example of how to instantiate this type.
# The values are placeholders you should change.
import aws_cdk.aws_s3 as s3

# encryption: Any

storage_lens_configuration_property = s3.CfnStorageLens.StorageLensConfigurationProperty(
    account_level=s3.CfnStorageLens.AccountLevelProperty(
        bucket_level=s3.CfnStorageLens.BucketLevelProperty(
            activity_metrics=s3.CfnStorageLens.ActivityMetricsProperty(
                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
        )
    ),
    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=encryption,
            prefix="prefix"
        )
    ),
    exclude=s3.CfnStorageLens.BucketsAndRegionsProperty(
        buckets=["buckets"],
        regions=["regions"]
    ),
    include=s3.CfnStorageLens.BucketsAndRegionsProperty(
        buckets=["buckets"],
        regions=["regions"]
    ),
    storage_lens_arn="storageLensArn"
)

Attributes

account_level

This property contains the details of the account-level metrics for Amazon S3 Storage Lens configuration.

Link

http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-properties-s3-storagelens-storagelensconfiguration.html#cfn-s3-storagelens-storagelensconfiguration-accountlevel

Return type

Union[IResolvable, AccountLevelProperty]

aws_org

This property contains the details of the AWS Organization for the S3 Storage Lens configuration.

Link

http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-properties-s3-storagelens-storagelensconfiguration.html#cfn-s3-storagelens-storagelensconfiguration-awsorg

Return type

Union[IResolvable, AwsOrgProperty, None]

data_export

This property contains the details of this S3 Storage Lens configuration’s metrics export.

Link

http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-properties-s3-storagelens-storagelensconfiguration.html#cfn-s3-storagelens-storagelensconfiguration-dataexport

Return type

Union[IResolvable, DataExportProperty, None]

exclude

This property contains the details of the bucket and or Regions excluded for Amazon S3 Storage Lens configuration.

Link

http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-properties-s3-storagelens-storagelensconfiguration.html#cfn-s3-storagelens-storagelensconfiguration-exclude

Return type

Union[IResolvable, BucketsAndRegionsProperty, None]

id

This property contains the details of the ID of the S3 Storage Lens configuration.

Link

http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-properties-s3-storagelens-storagelensconfiguration.html#cfn-s3-storagelens-storagelensconfiguration-id

Return type

str

include

This property contains the details of the bucket and or Regions included for Amazon S3 Storage Lens configuration.

Link

http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-properties-s3-storagelens-storagelensconfiguration.html#cfn-s3-storagelens-storagelensconfiguration-include

Return type

Union[IResolvable, BucketsAndRegionsProperty, None]

is_enabled

This property contains the details of whether the Amazon S3 Storage Lens configuration is enabled.

Link

http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-properties-s3-storagelens-storagelensconfiguration.html#cfn-s3-storagelens-storagelensconfiguration-isenabled

Return type

Union[bool, IResolvable]

storage_lens_arn

This property contains the details of the ARN of the S3 Storage Lens configuration.

This property is read-only.

Link

http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-properties-s3-storagelens-storagelensconfiguration.html#cfn-s3-storagelens-storagelensconfiguration-storagelensarn

Return type

Optional[str]