BucketMetrics

class aws_cdk.aws_s3.BucketMetrics(*, id, prefix=None, tag_filters=None)

Bases: object

Specifies a metrics configuration for the CloudWatch request metrics from an Amazon S3 bucket.

Parameters:
  • id (str) – The ID used to identify the metrics configuration.

  • prefix (Optional[str]) – The prefix that an object must have to be included in the metrics results.

  • tag_filters (Optional[Mapping[str, Any]]) – Specifies a list of tag filters to use as a metrics configuration filter. The metrics configuration includes only objects that meet the filter’s criteria.

ExampleMetadata:

fixture=_generated

Example:

# 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

# tag_filters: Any

bucket_metrics = s3.BucketMetrics(
    id="id",

    # the properties below are optional
    prefix="prefix",
    tag_filters={
        "tag_filters_key": tag_filters
    }
)

Attributes

id

The ID used to identify the metrics configuration.

prefix

The prefix that an object must have to be included in the metrics results.

tag_filters

Specifies a list of tag filters to use as a metrics configuration filter.

The metrics configuration includes only objects that meet the filter’s criteria.