Struct aws_sdk_cloudwatchlogs::client::fluent_builders::PutMetricFilter [−][src]
pub struct PutMetricFilter<C = DynConnector, M = AwsMiddleware, R = Standard> { /* fields omitted */ }
Expand description
Fluent builder constructing a request to PutMetricFilter
.
Creates or updates a metric filter and associates it with the specified log group. Metric filters allow you to configure rules to extract metric data from log events ingested through PutLogEvents.
The maximum number of metric filters that can be associated with a log group is 100.
When you create a metric filter, you can also optionally assign a unit and dimensions to the metric that is created.
Metrics extracted from log events are charged as custom metrics.
To prevent unexpected high charges, do not specify high-cardinality fields such as
IPAddress
or requestID
as dimensions. Each different value
found for
a dimension is treated as a separate metric and accrues charges as a separate custom metric.
To help prevent accidental high charges, Amazon disables a metric filter if it generates 1000 different name/value pairs for the dimensions that you have specified within a certain amount of time.
You can also set up a billing alarm to alert you if your charges are higher than expected. For more information, see Creating a Billing Alarm to Monitor Your Estimated Amazon Web Services Charges.
Implementations
impl<C, M, R> PutMetricFilter<C, M, R> where
C: SmithyConnector,
M: SmithyMiddleware<C>,
R: NewRequestPolicy,
impl<C, M, R> PutMetricFilter<C, M, R> where
C: SmithyConnector,
M: SmithyMiddleware<C>,
R: NewRequestPolicy,
pub async fn send(
self
) -> Result<PutMetricFilterOutput, SdkError<PutMetricFilterError>> where
R::Policy: SmithyRetryPolicy<PutMetricFilterInputOperationOutputAlias, PutMetricFilterOutput, PutMetricFilterError, PutMetricFilterInputOperationRetryAlias>,
pub async fn send(
self
) -> Result<PutMetricFilterOutput, SdkError<PutMetricFilterError>> where
R::Policy: SmithyRetryPolicy<PutMetricFilterInputOperationOutputAlias, PutMetricFilterOutput, PutMetricFilterError, PutMetricFilterInputOperationRetryAlias>,
Sends the request and returns the response.
If an error occurs, an SdkError
will be returned with additional details that
can be matched against.
By default, any retryable failures will be retried twice. Retry behavior is configurable with the RetryConfig, which can be set when configuring the client.
The name of the log group.
The name of the log group.
A name for the metric filter.
A name for the metric filter.
A filter pattern for extracting metric data out of ingested log events.
A filter pattern for extracting metric data out of ingested log events.
Appends an item to metricTransformations
.
To override the contents of this collection use set_metric_transformations
.
A collection of information that defines how metric data gets emitted.
A collection of information that defines how metric data gets emitted.
Trait Implementations
Auto Trait Implementations
impl<C = DynConnector, M = AwsMiddleware, R = Standard> !RefUnwindSafe for PutMetricFilter<C, M, R>
impl<C, M, R> Send for PutMetricFilter<C, M, R> where
C: Send + Sync,
M: Send + Sync,
R: Send + Sync,
impl<C, M, R> Sync for PutMetricFilter<C, M, R> where
C: Send + Sync,
M: Send + Sync,
R: Send + Sync,
impl<C, M, R> Unpin for PutMetricFilter<C, M, R>
impl<C = DynConnector, M = AwsMiddleware, R = Standard> !UnwindSafe for PutMetricFilter<C, M, R>
Blanket Implementations
Mutably borrows from an owned value. Read more
Attaches the provided Subscriber
to this type, returning a
WithDispatch
wrapper. Read more
Attaches the current default Subscriber
to this type, returning a
WithDispatch
wrapper. Read more