pub struct PutAnomalyDetector { /* private fields */ }Expand description
Fluent builder constructing a request to PutAnomalyDetector.
Creates an anomaly detection model for a CloudWatch metric. You can use the model to display a band of expected normal values when the metric is graphed.
For more information, see CloudWatch Anomaly Detection.
Implementations
sourceimpl PutAnomalyDetector
impl PutAnomalyDetector
sourcepub async fn send(
self
) -> Result<PutAnomalyDetectorOutput, SdkError<PutAnomalyDetectorError>>
pub async fn send(
self
) -> Result<PutAnomalyDetectorOutput, SdkError<PutAnomalyDetectorError>>
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.
sourcepub fn namespace(self, input: impl Into<String>) -> Self
pub fn namespace(self, input: impl Into<String>) -> Self
The namespace of the metric to create the anomaly detection model for.
sourcepub fn set_namespace(self, input: Option<String>) -> Self
pub fn set_namespace(self, input: Option<String>) -> Self
The namespace of the metric to create the anomaly detection model for.
sourcepub fn metric_name(self, input: impl Into<String>) -> Self
pub fn metric_name(self, input: impl Into<String>) -> Self
The name of the metric to create the anomaly detection model for.
sourcepub fn set_metric_name(self, input: Option<String>) -> Self
pub fn set_metric_name(self, input: Option<String>) -> Self
The name of the metric to create the anomaly detection model for.
sourcepub fn dimensions(self, input: Dimension) -> Self
pub fn dimensions(self, input: Dimension) -> Self
Appends an item to Dimensions.
To override the contents of this collection use set_dimensions.
The metric dimensions to create the anomaly detection model for.
sourcepub fn set_dimensions(self, input: Option<Vec<Dimension>>) -> Self
pub fn set_dimensions(self, input: Option<Vec<Dimension>>) -> Self
The metric dimensions to create the anomaly detection model for.
sourcepub fn stat(self, input: impl Into<String>) -> Self
pub fn stat(self, input: impl Into<String>) -> Self
The statistic to use for the metric and the anomaly detection model.
sourcepub fn set_stat(self, input: Option<String>) -> Self
pub fn set_stat(self, input: Option<String>) -> Self
The statistic to use for the metric and the anomaly detection model.
sourcepub fn configuration(self, input: AnomalyDetectorConfiguration) -> Self
pub fn configuration(self, input: AnomalyDetectorConfiguration) -> Self
The configuration specifies details about how the anomaly detection model is to be trained, including time ranges to exclude when training and updating the model. You can specify as many as 10 time ranges.
The configuration can also include the time zone to use for the metric.
sourcepub fn set_configuration(
self,
input: Option<AnomalyDetectorConfiguration>
) -> Self
pub fn set_configuration(
self,
input: Option<AnomalyDetectorConfiguration>
) -> Self
The configuration specifies details about how the anomaly detection model is to be trained, including time ranges to exclude when training and updating the model. You can specify as many as 10 time ranges.
The configuration can also include the time zone to use for the metric.
sourcepub fn single_metric_anomaly_detector(
self,
input: SingleMetricAnomalyDetector
) -> Self
pub fn single_metric_anomaly_detector(
self,
input: SingleMetricAnomalyDetector
) -> Self
A single metric anomaly detector to be created.
When using SingleMetricAnomalyDetector, you cannot include the following parameters in the same operation:
-
Dimensions -
MetricName -
Namespace -
Stat -
the
MetricMatchAnomalyDetectorparameters ofPutAnomalyDetectorInput
Instead, specify the single metric anomaly detector attributes as part of the property SingleMetricAnomalyDetector.
sourcepub fn set_single_metric_anomaly_detector(
self,
input: Option<SingleMetricAnomalyDetector>
) -> Self
pub fn set_single_metric_anomaly_detector(
self,
input: Option<SingleMetricAnomalyDetector>
) -> Self
A single metric anomaly detector to be created.
When using SingleMetricAnomalyDetector, you cannot include the following parameters in the same operation:
-
Dimensions -
MetricName -
Namespace -
Stat -
the
MetricMatchAnomalyDetectorparameters ofPutAnomalyDetectorInput
Instead, specify the single metric anomaly detector attributes as part of the property SingleMetricAnomalyDetector.
sourcepub fn metric_math_anomaly_detector(
self,
input: MetricMathAnomalyDetector
) -> Self
pub fn metric_math_anomaly_detector(
self,
input: MetricMathAnomalyDetector
) -> Self
The metric math anomaly detector to be created.
When using MetricMathAnomalyDetector, you cannot include the following parameters in the same operation:
-
Dimensions -
MetricName -
Namespace -
Stat -
the
SingleMetricAnomalyDetectorparameters ofPutAnomalyDetectorInput
Instead, specify the metric math anomaly detector attributes as part of the property MetricMathAnomalyDetector.
sourcepub fn set_metric_math_anomaly_detector(
self,
input: Option<MetricMathAnomalyDetector>
) -> Self
pub fn set_metric_math_anomaly_detector(
self,
input: Option<MetricMathAnomalyDetector>
) -> Self
The metric math anomaly detector to be created.
When using MetricMathAnomalyDetector, you cannot include the following parameters in the same operation:
-
Dimensions -
MetricName -
Namespace -
Stat -
the
SingleMetricAnomalyDetectorparameters ofPutAnomalyDetectorInput
Instead, specify the metric math anomaly detector attributes as part of the property MetricMathAnomalyDetector.
Trait Implementations
sourceimpl Clone for PutAnomalyDetector
impl Clone for PutAnomalyDetector
sourcefn clone(&self) -> PutAnomalyDetector
fn clone(&self) -> PutAnomalyDetector
Returns a copy of the value. Read more
1.0.0 · sourcefn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
Performs copy-assignment from source. Read more
Auto Trait Implementations
impl !RefUnwindSafe for PutAnomalyDetector
impl Send for PutAnomalyDetector
impl Sync for PutAnomalyDetector
impl Unpin for PutAnomalyDetector
impl !UnwindSafe for PutAnomalyDetector
Blanket Implementations
sourceimpl<T> BorrowMut<T> for T where
T: ?Sized,
impl<T> BorrowMut<T> for T where
T: ?Sized,
const: unstable · sourcefn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
Mutably borrows from an owned value. Read more
sourceimpl<T> Instrument for T
impl<T> Instrument for T
sourcefn instrument(self, span: Span) -> Instrumented<Self>
fn instrument(self, span: Span) -> Instrumented<Self>
sourcefn in_current_span(self) -> Instrumented<Self>
fn in_current_span(self) -> Instrumented<Self>
sourceimpl<T> WithSubscriber for T
impl<T> WithSubscriber for T
sourcefn with_subscriber<S>(self, subscriber: S) -> WithDispatch<Self> where
S: Into<Dispatch>,
fn with_subscriber<S>(self, subscriber: S) -> WithDispatch<Self> where
S: Into<Dispatch>,
Attaches the provided Subscriber to this type, returning a
WithDispatch wrapper. Read more
sourcefn with_current_subscriber(self) -> WithDispatch<Self>
fn with_current_subscriber(self) -> WithDispatch<Self>
Attaches the current default Subscriber to this type, returning a
WithDispatch wrapper. Read more