s3_metrics_configuration
Manage s3 bucket metrics configuration in AWS
Collection: community.aws
Full Name: community.aws.s3_metrics_configuration
Synopsis
Manage s3 bucket metrics configuration in AWS
Parameters
| Name | Type | Required | Default | Description |
|---|---|---|---|---|
| access_key | str | |||
| aws_ca_bundle | path | |||
| aws_config | dict | |||
| bucket_name | str | yes | ||
| debug_botocore_endpoint_logs | bool | false | ||
| endpoint_url | str | |||
| filter_prefix | str | |||
| filter_tags | dict | map[] | ||
| id | str | yes | ||
| profile | str | |||
| region | str | |||
| secret_key | str | |||
| session_token | str | |||
| state | str | present | ||
| validate_certs | bool | true |
Example
yaml
- name: Create a metrics configuration that enables metrics for an entire bucket
community.aws.s3_metrics_configuration:
bucket_name: my-bucket
id: EntireBucket
state: present
- name: Put a metrics configuration that enables metrics for objects starting with a prefix
community.aws.s3_metrics_configuration:
bucket_name: my-bucket
id: Assets
filter_prefix: assets
state: present
- name: Put a metrics configuration that enables metrics for objects with specific tag
community.aws.s3_metrics_configuration:
bucket_name: my-bucket
id: Assets
filter_tag:
kind: asset
state: present
- name: Put a metrics configuration that enables metrics for objects that start with a particular prefix and have specific tags applied
community.aws.s3_metrics_configuration:
bucket_name: my-bucket
id: ImportantBlueDocuments
filter_prefix: documents
filter_tags:
priority: high
class: blue
state: present
- name: Delete metrics configuration
community.aws.s3_metrics_configuration:
bucket_name: my-bucket
id: EntireBucket
state: absent