Expand description
Provides a S3 bucket metrics configuration resource.
This resource cannot be used with S3 directory buckets.
§Example Usage
§Add metrics configuration for entire S3 bucket
resources:
example:
type: aws:s3:BucketV2
properties:
bucket: example
example-entire-bucket:
type: aws:s3:BucketMetric
properties:
bucket: ${example.id}
name: EntireBucket
§Add metrics configuration with S3 object filter
resources:
example:
type: aws:s3:BucketV2
properties:
bucket: example
example-filtered:
type: aws:s3:BucketMetric
properties:
bucket: ${example.id}
name: ImportantBlueDocuments
filter:
prefix: documents/
tags:
priority: high
class: blue
§Add metrics configuration with S3 object filter for S3 Access Point
resources:
example:
type: aws:s3:BucketV2
properties:
bucket: example
example-access-point:
type: aws:s3:AccessPoint
properties:
bucket: ${example.id}
name: example-access-point
example-filtered:
type: aws:s3:BucketMetric
properties:
bucket: ${example.id}
name: ImportantBlueDocuments
filter:
accessPoint: ${["example-access-point"].arn}
tags:
priority: high
class: blue
§Import
Using pulumi import
, import S3 bucket metric configurations using bucket:metric
. For example:
$ pulumi import aws:s3/bucketMetric:BucketMetric my-bucket-entire-bucket my-bucket:EntireBucket
Structs§
- Use builder syntax to set the inputs and finish with
build_struct()
.
Functions§
- Registers a new resource with the given unique name and arguments