pub struct Client { /* private fields */ }Expand description
Client for Amazon Lookout for Metrics
Client for invoking operations on Amazon Lookout for Metrics. Each operation on Amazon Lookout for Metrics is a method on this
this struct. .send() MUST be invoked on the generated operations to dispatch the request to the service.
§Constructing a Client
A Config is required to construct a client. For most use cases, the aws-config
crate should be used to automatically resolve this config using
aws_config::load_from_env(), since this will resolve an SdkConfig which can be shared
across multiple different AWS SDK clients. This config resolution process can be customized
by calling aws_config::from_env() instead, which returns a ConfigLoader that uses
the builder pattern to customize the default config.
In the simplest case, creating a client looks as follows:
let config = aws_config::load_from_env().await;
let client = aws_sdk_lookoutmetrics::Client::new(&config);Occasionally, SDKs may have additional service-specific values that can be set on the Config that
is absent from SdkConfig, or slightly different settings for a specific client may be desired.
The Builder struct implements From<&SdkConfig>, so setting these specific settings can be
done as follows:
let sdk_config = ::aws_config::load_from_env().await;
let config = aws_sdk_lookoutmetrics::config::Builder::from(&sdk_config)
.some_service_specific_setting("value")
.build();See the aws-config docs and Config for more information on customizing configuration.
Note: Client construction is expensive due to connection thread pool initialization, and should be done once at application start-up.
§Using the Client
A client has a function for every operation that can be performed by the service.
For example, the ActivateAnomalyDetector operation has
a Client::activate_anomaly_detector, function which returns a builder for that operation.
The fluent builder ultimately has a send() function that returns an async future that
returns a result, as illustrated below:
let result = client.activate_anomaly_detector()
.anomaly_detector_arn("example")
.send()
.await;The underlying HTTP requests that get made by this can be modified with the customize_operation
function on the fluent builder. See the customize module for more
information.
Implementations§
Source§impl Client
impl Client
Sourcepub fn activate_anomaly_detector(&self) -> ActivateAnomalyDetectorFluentBuilder
pub fn activate_anomaly_detector(&self) -> ActivateAnomalyDetectorFluentBuilder
Constructs a fluent builder for the ActivateAnomalyDetector operation.
- The fluent builder is configurable:
anomaly_detector_arn(impl Into<String>)/set_anomaly_detector_arn(Option<String>):
required: trueThe ARN of the anomaly detector.
- On success, responds with
ActivateAnomalyDetectorOutput - On failure, responds with
SdkError<ActivateAnomalyDetectorError>
Source§impl Client
impl Client
Sourcepub fn back_test_anomaly_detector(&self) -> BackTestAnomalyDetectorFluentBuilder
pub fn back_test_anomaly_detector(&self) -> BackTestAnomalyDetectorFluentBuilder
Constructs a fluent builder for the BackTestAnomalyDetector operation.
- The fluent builder is configurable:
anomaly_detector_arn(impl Into<String>)/set_anomaly_detector_arn(Option<String>):
required: trueThe Amazon Resource Name (ARN) of the anomaly detector.
- On success, responds with
BackTestAnomalyDetectorOutput - On failure, responds with
SdkError<BackTestAnomalyDetectorError>
Source§impl Client
impl Client
Sourcepub fn create_alert(&self) -> CreateAlertFluentBuilder
pub fn create_alert(&self) -> CreateAlertFluentBuilder
Constructs a fluent builder for the CreateAlert operation.
- The fluent builder is configurable:
alert_name(impl Into<String>)/set_alert_name(Option<String>):
required: trueThe name of the alert.
alert_sensitivity_threshold(i32)/set_alert_sensitivity_threshold(Option<i32>):
required: falseAn integer from 0 to 100 specifying the alert sensitivity threshold.
alert_description(impl Into<String>)/set_alert_description(Option<String>):
required: falseA description of the alert.
anomaly_detector_arn(impl Into<String>)/set_anomaly_detector_arn(Option<String>):
required: trueThe ARN of the detector to which the alert is attached.
action(Action)/set_action(Option<Action>):
required: trueAction that will be triggered when there is an alert.
tags(impl Into<String>, impl Into<String>)/set_tags(Option<HashMap::<String, String>>):
required: falseA list of tags to apply to the alert.
alert_filters(AlertFilters)/set_alert_filters(Option<AlertFilters>):
required: falseThe configuration of the alert filters, containing MetricList and DimensionFilterList.
- On success, responds with
CreateAlertOutputwith field(s):alert_arn(Option<String>):The ARN of the alert.
- On failure, responds with
SdkError<CreateAlertError>
Source§impl Client
impl Client
Sourcepub fn create_anomaly_detector(&self) -> CreateAnomalyDetectorFluentBuilder
pub fn create_anomaly_detector(&self) -> CreateAnomalyDetectorFluentBuilder
Constructs a fluent builder for the CreateAnomalyDetector operation.
- The fluent builder is configurable:
anomaly_detector_name(impl Into<String>)/set_anomaly_detector_name(Option<String>):
required: trueThe name of the detector.
anomaly_detector_description(impl Into<String>)/set_anomaly_detector_description(Option<String>):
required: falseA description of the detector.
anomaly_detector_config(AnomalyDetectorConfig)/set_anomaly_detector_config(Option<AnomalyDetectorConfig>):
required: trueContains information about the configuration of the anomaly detector.
kms_key_arn(impl Into<String>)/set_kms_key_arn(Option<String>):
required: falseThe ARN of the KMS key to use to encrypt your data.
tags(impl Into<String>, impl Into<String>)/set_tags(Option<HashMap::<String, String>>):
required: falseA list of tags to apply to the anomaly detector.
- On success, responds with
CreateAnomalyDetectorOutputwith field(s):anomaly_detector_arn(Option<String>):The ARN of the detector.
- On failure, responds with
SdkError<CreateAnomalyDetectorError>
Source§impl Client
impl Client
Sourcepub fn create_metric_set(&self) -> CreateMetricSetFluentBuilder
pub fn create_metric_set(&self) -> CreateMetricSetFluentBuilder
Constructs a fluent builder for the CreateMetricSet operation.
- The fluent builder is configurable:
anomaly_detector_arn(impl Into<String>)/set_anomaly_detector_arn(Option<String>):
required: trueThe ARN of the anomaly detector that will use the dataset.
metric_set_name(impl Into<String>)/set_metric_set_name(Option<String>):
required: trueThe name of the dataset.
metric_set_description(impl Into<String>)/set_metric_set_description(Option<String>):
required: falseA description of the dataset you are creating.
metric_list(Metric)/set_metric_list(Option<Vec::<Metric>>):
required: trueA list of metrics that the dataset will contain.
offset(i32)/set_offset(Option<i32>):
required: falseAfter an interval ends, the amount of seconds that the detector waits before importing data. Offset is only supported for S3, Redshift, Athena and datasources.
timestamp_column(TimestampColumn)/set_timestamp_column(Option<TimestampColumn>):
required: falseContains information about the column used for tracking time in your source data.
dimension_list(impl Into<String>)/set_dimension_list(Option<Vec::<String>>):
required: falseA list of the fields you want to treat as dimensions.
metric_set_frequency(Frequency)/set_metric_set_frequency(Option<Frequency>):
required: falseThe frequency with which the source data will be analyzed for anomalies.
metric_source(MetricSource)/set_metric_source(Option<MetricSource>):
required: trueContains information about how the source data should be interpreted.
timezone(impl Into<String>)/set_timezone(Option<String>):
required: falseThe time zone in which your source data was recorded.
tags(impl Into<String>, impl Into<String>)/set_tags(Option<HashMap::<String, String>>):
required: falseA list of tags to apply to the dataset.
dimension_filter_list(MetricSetDimensionFilter)/set_dimension_filter_list(Option<Vec::<MetricSetDimensionFilter>>):
required: falseA list of filters that specify which data is kept for anomaly detection.
- On success, responds with
CreateMetricSetOutputwith field(s):metric_set_arn(Option<String>):The ARN of the dataset.
- On failure, responds with
SdkError<CreateMetricSetError>
Source§impl Client
impl Client
Sourcepub fn deactivate_anomaly_detector(
&self,
) -> DeactivateAnomalyDetectorFluentBuilder
pub fn deactivate_anomaly_detector( &self, ) -> DeactivateAnomalyDetectorFluentBuilder
Constructs a fluent builder for the DeactivateAnomalyDetector operation.
- The fluent builder is configurable:
anomaly_detector_arn(impl Into<String>)/set_anomaly_detector_arn(Option<String>):
required: trueThe Amazon Resource Name (ARN) of the anomaly detector.
- On success, responds with
DeactivateAnomalyDetectorOutput - On failure, responds with
SdkError<DeactivateAnomalyDetectorError>
Source§impl Client
impl Client
Sourcepub fn delete_alert(&self) -> DeleteAlertFluentBuilder
pub fn delete_alert(&self) -> DeleteAlertFluentBuilder
Constructs a fluent builder for the DeleteAlert operation.
- The fluent builder is configurable:
alert_arn(impl Into<String>)/set_alert_arn(Option<String>):
required: trueThe ARN of the alert to delete.
- On success, responds with
DeleteAlertOutput - On failure, responds with
SdkError<DeleteAlertError>
Source§impl Client
impl Client
Sourcepub fn delete_anomaly_detector(&self) -> DeleteAnomalyDetectorFluentBuilder
pub fn delete_anomaly_detector(&self) -> DeleteAnomalyDetectorFluentBuilder
Constructs a fluent builder for the DeleteAnomalyDetector operation.
- The fluent builder is configurable:
anomaly_detector_arn(impl Into<String>)/set_anomaly_detector_arn(Option<String>):
required: trueThe ARN of the detector to delete.
- On success, responds with
DeleteAnomalyDetectorOutput - On failure, responds with
SdkError<DeleteAnomalyDetectorError>
Source§impl Client
impl Client
Sourcepub fn describe_alert(&self) -> DescribeAlertFluentBuilder
pub fn describe_alert(&self) -> DescribeAlertFluentBuilder
Constructs a fluent builder for the DescribeAlert operation.
- The fluent builder is configurable:
alert_arn(impl Into<String>)/set_alert_arn(Option<String>):
required: trueThe ARN of the alert to describe.
- On success, responds with
DescribeAlertOutputwith field(s):alert(Option<Alert>):Contains information about an alert.
- On failure, responds with
SdkError<DescribeAlertError>
Source§impl Client
impl Client
Sourcepub fn describe_anomaly_detection_executions(
&self,
) -> DescribeAnomalyDetectionExecutionsFluentBuilder
pub fn describe_anomaly_detection_executions( &self, ) -> DescribeAnomalyDetectionExecutionsFluentBuilder
Constructs a fluent builder for the DescribeAnomalyDetectionExecutions operation.
This operation supports pagination; See into_paginator().
- The fluent builder is configurable:
anomaly_detector_arn(impl Into<String>)/set_anomaly_detector_arn(Option<String>):
required: trueThe Amazon Resource Name (ARN) of the anomaly detector.
timestamp(impl Into<String>)/set_timestamp(Option<String>):
required: falseThe timestamp of the anomaly detection job.
max_results(i32)/set_max_results(Option<i32>):
required: falseThe number of items to return in the response.
next_token(impl Into<String>)/set_next_token(Option<String>):
required: falseSpecify the pagination token that’s returned by a previous request to retrieve the next page of results.
- On success, responds with
DescribeAnomalyDetectionExecutionsOutputwith field(s):execution_list(Option<Vec::<ExecutionStatus>>):A list of detection jobs.
next_token(Option<String>):The pagination token that’s included if more results are available.
- On failure, responds with
SdkError<DescribeAnomalyDetectionExecutionsError>
Source§impl Client
impl Client
Sourcepub fn describe_anomaly_detector(&self) -> DescribeAnomalyDetectorFluentBuilder
pub fn describe_anomaly_detector(&self) -> DescribeAnomalyDetectorFluentBuilder
Constructs a fluent builder for the DescribeAnomalyDetector operation.
- The fluent builder is configurable:
anomaly_detector_arn(impl Into<String>)/set_anomaly_detector_arn(Option<String>):
required: trueThe ARN of the detector to describe.
- On success, responds with
DescribeAnomalyDetectorOutputwith field(s):anomaly_detector_arn(Option<String>):The ARN of the detector.
anomaly_detector_name(Option<String>):The name of the detector.
anomaly_detector_description(Option<String>):A description of the detector.
anomaly_detector_config(Option<AnomalyDetectorConfigSummary>):Contains information about the detector’s configuration.
creation_time(Option<DateTime>):The time at which the detector was created.
last_modification_time(Option<DateTime>):The time at which the detector was last modified.
status(Option<AnomalyDetectorStatus>):The status of the detector.
failure_reason(Option<String>):The reason that the detector failed.
kms_key_arn(Option<String>):The ARN of the KMS key to use to encrypt your data.
failure_type(Option<AnomalyDetectorFailureType>):The process that caused the detector to fail.
- On failure, responds with
SdkError<DescribeAnomalyDetectorError>
Source§impl Client
impl Client
Sourcepub fn describe_metric_set(&self) -> DescribeMetricSetFluentBuilder
pub fn describe_metric_set(&self) -> DescribeMetricSetFluentBuilder
Constructs a fluent builder for the DescribeMetricSet operation.
- The fluent builder is configurable:
metric_set_arn(impl Into<String>)/set_metric_set_arn(Option<String>):
required: trueThe ARN of the dataset.
- On success, responds with
DescribeMetricSetOutputwith field(s):metric_set_arn(Option<String>):The ARN of the dataset.
anomaly_detector_arn(Option<String>):The ARN of the detector that contains the dataset.
metric_set_name(Option<String>):The name of the dataset.
metric_set_description(Option<String>):The dataset’s description.
creation_time(Option<DateTime>):The time at which the dataset was created.
last_modification_time(Option<DateTime>):The time at which the dataset was last modified.
offset(Option<i32>):After an interval ends, the amount of seconds that the detector waits before importing data. Offset is only supported for S3, Redshift, Athena and datasources.
metric_list(Option<Vec::<Metric>>):A list of the metrics defined by the dataset.
timestamp_column(Option<TimestampColumn>):Contains information about the column used for tracking time in your source data.
dimension_list(Option<Vec::<String>>):A list of the dimensions chosen for analysis.
metric_set_frequency(Option<Frequency>):The interval at which the data will be analyzed for anomalies.
timezone(Option<String>):The time zone in which the dataset’s data was recorded.
metric_source(Option<MetricSource>):Contains information about the dataset’s source data.
dimension_filter_list(Option<Vec::<MetricSetDimensionFilter>>):The dimensions and their values that were used to filter the dataset.
- On failure, responds with
SdkError<DescribeMetricSetError>
Source§impl Client
impl Client
Sourcepub fn detect_metric_set_config(&self) -> DetectMetricSetConfigFluentBuilder
pub fn detect_metric_set_config(&self) -> DetectMetricSetConfigFluentBuilder
Constructs a fluent builder for the DetectMetricSetConfig operation.
- The fluent builder is configurable:
anomaly_detector_arn(impl Into<String>)/set_anomaly_detector_arn(Option<String>):
required: trueAn anomaly detector ARN.
auto_detection_metric_source(AutoDetectionMetricSource)/set_auto_detection_metric_source(Option<AutoDetectionMetricSource>):
required: trueA data source.
- On success, responds with
DetectMetricSetConfigOutputwith field(s):detected_metric_set_config(Option<DetectedMetricSetConfig>):The inferred dataset configuration for the datasource.
- On failure, responds with
SdkError<DetectMetricSetConfigError>
Source§impl Client
impl Client
Sourcepub fn get_anomaly_group(&self) -> GetAnomalyGroupFluentBuilder
pub fn get_anomaly_group(&self) -> GetAnomalyGroupFluentBuilder
Constructs a fluent builder for the GetAnomalyGroup operation.
- The fluent builder is configurable:
anomaly_group_id(impl Into<String>)/set_anomaly_group_id(Option<String>):
required: trueThe ID of the anomaly group.
anomaly_detector_arn(impl Into<String>)/set_anomaly_detector_arn(Option<String>):
required: trueThe Amazon Resource Name (ARN) of the anomaly detector.
- On success, responds with
GetAnomalyGroupOutputwith field(s):anomaly_group(Option<AnomalyGroup>):Details about the anomaly group.
- On failure, responds with
SdkError<GetAnomalyGroupError>
Source§impl Client
impl Client
Sourcepub fn get_data_quality_metrics(&self) -> GetDataQualityMetricsFluentBuilder
pub fn get_data_quality_metrics(&self) -> GetDataQualityMetricsFluentBuilder
Constructs a fluent builder for the GetDataQualityMetrics operation.
- The fluent builder is configurable:
anomaly_detector_arn(impl Into<String>)/set_anomaly_detector_arn(Option<String>):
required: trueThe Amazon Resource Name (ARN) of the anomaly detector that you want to investigate.
metric_set_arn(impl Into<String>)/set_metric_set_arn(Option<String>):
required: falseThe Amazon Resource Name (ARN) of a specific data quality metric set.
- On success, responds with
GetDataQualityMetricsOutputwith field(s):anomaly_detector_data_quality_metric_list(Option<Vec::<AnomalyDetectorDataQualityMetric>>):A list of the data quality metrics for the
AnomalyDetectorArnthat you requested.
- On failure, responds with
SdkError<GetDataQualityMetricsError>
Source§impl Client
impl Client
Sourcepub fn get_feedback(&self) -> GetFeedbackFluentBuilder
pub fn get_feedback(&self) -> GetFeedbackFluentBuilder
Constructs a fluent builder for the GetFeedback operation.
This operation supports pagination; See into_paginator().
- The fluent builder is configurable:
anomaly_detector_arn(impl Into<String>)/set_anomaly_detector_arn(Option<String>):
required: trueThe Amazon Resource Name (ARN) of the anomaly detector.
anomaly_group_time_series_feedback(AnomalyGroupTimeSeries)/set_anomaly_group_time_series_feedback(Option<AnomalyGroupTimeSeries>):
required: trueThe anomalous metric and group ID.
max_results(i32)/set_max_results(Option<i32>):
required: falseThe maximum number of results to return.
next_token(impl Into<String>)/set_next_token(Option<String>):
required: falseSpecify the pagination token that’s returned by a previous request to retrieve the next page of results.
- On success, responds with
GetFeedbackOutputwith field(s):anomaly_group_time_series_feedback(Option<Vec::<TimeSeriesFeedback>>):Feedback for an anomalous metric.
next_token(Option<String>):The pagination token that’s included if more results are available.
- On failure, responds with
SdkError<GetFeedbackError>
Source§impl Client
impl Client
Sourcepub fn get_sample_data(&self) -> GetSampleDataFluentBuilder
pub fn get_sample_data(&self) -> GetSampleDataFluentBuilder
Constructs a fluent builder for the GetSampleData operation.
- The fluent builder is configurable:
s3_source_config(SampleDataS3SourceConfig)/set_s3_source_config(Option<SampleDataS3SourceConfig>):
required: falseA datasource bucket in Amazon S3.
- On success, responds with
GetSampleDataOutputwith field(s):header_values(Option<Vec::<String>>):A list of header labels for the records.
sample_rows(Option<Vec::<Vec::<String>>>):A list of records.
- On failure, responds with
SdkError<GetSampleDataError>
Source§impl Client
impl Client
Sourcepub fn list_alerts(&self) -> ListAlertsFluentBuilder
pub fn list_alerts(&self) -> ListAlertsFluentBuilder
Constructs a fluent builder for the ListAlerts operation.
This operation supports pagination; See into_paginator().
- The fluent builder is configurable:
anomaly_detector_arn(impl Into<String>)/set_anomaly_detector_arn(Option<String>):
required: falseThe ARN of the alert’s detector.
next_token(impl Into<String>)/set_next_token(Option<String>):
required: falseIf the result of the previous request is truncated, the response includes a
NextToken. To retrieve the next set of results, use the token in the next request. Tokens expire after 24 hours.max_results(i32)/set_max_results(Option<i32>):
required: falseThe maximum number of results that will be displayed by the request.
- On success, responds with
ListAlertsOutputwith field(s):alert_summary_list(Option<Vec::<AlertSummary>>):Contains information about an alert.
next_token(Option<String>):If the response is truncated, the service returns this token. To retrieve the next set of results, use this token in the next request.
- On failure, responds with
SdkError<ListAlertsError>
Source§impl Client
impl Client
Sourcepub fn list_anomaly_detectors(&self) -> ListAnomalyDetectorsFluentBuilder
pub fn list_anomaly_detectors(&self) -> ListAnomalyDetectorsFluentBuilder
Constructs a fluent builder for the ListAnomalyDetectors operation.
This operation supports pagination; See into_paginator().
- The fluent builder is configurable:
max_results(i32)/set_max_results(Option<i32>):
required: falseThe maximum number of results to return.
next_token(impl Into<String>)/set_next_token(Option<String>):
required: falseIf the result of the previous request was truncated, the response includes a
NextToken. To retrieve the next set of results, use the token in the next request. Tokens expire after 24 hours.
- On success, responds with
ListAnomalyDetectorsOutputwith field(s):anomaly_detector_summary_list(Option<Vec::<AnomalyDetectorSummary>>):A list of anomaly detectors in the account in the current region.
next_token(Option<String>):If the response is truncated, the service returns this token. To retrieve the next set of results, use the token in the next request.
- On failure, responds with
SdkError<ListAnomalyDetectorsError>
Source§impl Client
impl Client
Constructs a fluent builder for the ListAnomalyGroupRelatedMetrics operation.
This operation supports pagination; See into_paginator().
- The fluent builder is configurable:
anomaly_detector_arn(impl Into<String>)/set_anomaly_detector_arn(Option<String>):
required: trueThe Amazon Resource Name (ARN) of the anomaly detector.
anomaly_group_id(impl Into<String>)/set_anomaly_group_id(Option<String>):
required: trueThe ID of the anomaly group.
relationship_type_filter(RelationshipType)/set_relationship_type_filter(Option<RelationshipType>):
required: falseFilter for potential causes (
CAUSE_OF_INPUT_ANOMALY_GROUP) or downstream effects (EFFECT_OF_INPUT_ANOMALY_GROUP) of the anomaly group.max_results(i32)/set_max_results(Option<i32>):
required: falseThe maximum number of results to return.
next_token(impl Into<String>)/set_next_token(Option<String>):
required: falseSpecify the pagination token that’s returned by a previous request to retrieve the next page of results.
- On success, responds with
ListAnomalyGroupRelatedMetricsOutputwith field(s):inter_metric_impact_list(Option<Vec::<InterMetricImpactDetails>>):Aggregated details about the measures contributing to the anomaly group, and the measures potentially impacted by the anomaly group.
next_token(Option<String>):The pagination token that’s included if more results are available.
- On failure, responds with
SdkError<ListAnomalyGroupRelatedMetricsError>
Source§impl Client
impl Client
Sourcepub fn list_anomaly_group_summaries(
&self,
) -> ListAnomalyGroupSummariesFluentBuilder
pub fn list_anomaly_group_summaries( &self, ) -> ListAnomalyGroupSummariesFluentBuilder
Constructs a fluent builder for the ListAnomalyGroupSummaries operation.
This operation supports pagination; See into_paginator().
- The fluent builder is configurable:
anomaly_detector_arn(impl Into<String>)/set_anomaly_detector_arn(Option<String>):
required: trueThe Amazon Resource Name (ARN) of the anomaly detector.
sensitivity_threshold(i32)/set_sensitivity_threshold(Option<i32>):
required: trueThe minimum severity score for inclusion in the output.
max_results(i32)/set_max_results(Option<i32>):
required: falseThe maximum number of results to return.
next_token(impl Into<String>)/set_next_token(Option<String>):
required: falseSpecify the pagination token that’s returned by a previous request to retrieve the next page of results.
- On success, responds with
ListAnomalyGroupSummariesOutputwith field(s):anomaly_group_summary_list(Option<Vec::<AnomalyGroupSummary>>):A list of anomaly group summaries.
anomaly_group_statistics(Option<AnomalyGroupStatistics>):Aggregated details about the anomaly groups.
next_token(Option<String>):The pagination token that’s included if more results are available.
- On failure, responds with
SdkError<ListAnomalyGroupSummariesError>
Source§impl Client
impl Client
Sourcepub fn list_anomaly_group_time_series(
&self,
) -> ListAnomalyGroupTimeSeriesFluentBuilder
pub fn list_anomaly_group_time_series( &self, ) -> ListAnomalyGroupTimeSeriesFluentBuilder
Constructs a fluent builder for the ListAnomalyGroupTimeSeries operation.
This operation supports pagination; See into_paginator().
- The fluent builder is configurable:
anomaly_detector_arn(impl Into<String>)/set_anomaly_detector_arn(Option<String>):
required: trueThe Amazon Resource Name (ARN) of the anomaly detector.
anomaly_group_id(impl Into<String>)/set_anomaly_group_id(Option<String>):
required: trueThe ID of the anomaly group.
metric_name(impl Into<String>)/set_metric_name(Option<String>):
required: trueThe name of the measure field.
max_results(i32)/set_max_results(Option<i32>):
required: falseThe maximum number of results to return.
next_token(impl Into<String>)/set_next_token(Option<String>):
required: falseSpecify the pagination token that’s returned by a previous request to retrieve the next page of results.
- On success, responds with
ListAnomalyGroupTimeSeriesOutputwith field(s):anomaly_group_id(Option<String>):The ID of the anomaly group.
metric_name(Option<String>):The name of the measure field.
timestamp_list(Option<Vec::<String>>):Timestamps for the anomalous metrics.
next_token(Option<String>):The pagination token that’s included if more results are available.
time_series_list(Option<Vec::<TimeSeries>>):A list of anomalous metrics.
- On failure, responds with
SdkError<ListAnomalyGroupTimeSeriesError>
Source§impl Client
impl Client
Sourcepub fn list_metric_sets(&self) -> ListMetricSetsFluentBuilder
pub fn list_metric_sets(&self) -> ListMetricSetsFluentBuilder
Constructs a fluent builder for the ListMetricSets operation.
This operation supports pagination; See into_paginator().
- The fluent builder is configurable:
anomaly_detector_arn(impl Into<String>)/set_anomaly_detector_arn(Option<String>):
required: falseThe ARN of the anomaly detector containing the metrics sets to list.
max_results(i32)/set_max_results(Option<i32>):
required: falseThe maximum number of results to return.
next_token(impl Into<String>)/set_next_token(Option<String>):
required: falseIf the result of the previous request was truncated, the response includes a
NextToken. To retrieve the next set of results, use the token in the next request. Tokens expire after 24 hours.
- On success, responds with
ListMetricSetsOutputwith field(s):metric_set_summary_list(Option<Vec::<MetricSetSummary>>):A list of the datasets in the AWS Region, with configuration details for each.
next_token(Option<String>):If the response is truncated, the list call returns this token. To retrieve the next set of results, use the token in the next list request.
- On failure, responds with
SdkError<ListMetricSetsError>
Source§impl Client
impl Client
Constructs a fluent builder for the ListTagsForResource operation.
- The fluent builder is configurable:
resource_arn(impl Into<String>)/set_resource_arn(Option<String>):
required: trueThe resource’s Amazon Resource Name (ARN).
- On success, responds with
ListTagsForResourceOutputwith field(s):tags(Option<HashMap::<String, String>>):The resource’s tags.
- On failure, responds with
SdkError<ListTagsForResourceError>
Source§impl Client
impl Client
Sourcepub fn put_feedback(&self) -> PutFeedbackFluentBuilder
pub fn put_feedback(&self) -> PutFeedbackFluentBuilder
Constructs a fluent builder for the PutFeedback operation.
- The fluent builder is configurable:
anomaly_detector_arn(impl Into<String>)/set_anomaly_detector_arn(Option<String>):
required: trueThe Amazon Resource Name (ARN) of the anomaly detector.
anomaly_group_time_series_feedback(AnomalyGroupTimeSeriesFeedback)/set_anomaly_group_time_series_feedback(Option<AnomalyGroupTimeSeriesFeedback>):
required: trueFeedback for an anomalous metric.
- On success, responds with
PutFeedbackOutput - On failure, responds with
SdkError<PutFeedbackError>
Source§impl Client
impl Client
Sourcepub fn tag_resource(&self) -> TagResourceFluentBuilder
pub fn tag_resource(&self) -> TagResourceFluentBuilder
Constructs a fluent builder for the TagResource operation.
- The fluent builder is configurable:
resource_arn(impl Into<String>)/set_resource_arn(Option<String>):
required: trueThe resource’s Amazon Resource Name (ARN).
tags(impl Into<String>, impl Into<String>)/set_tags(Option<HashMap::<String, String>>):
required: trueTags to apply to the resource. Tag keys and values can contain letters, numbers, spaces, and the following symbols:
_.:/=+@-
- On success, responds with
TagResourceOutput - On failure, responds with
SdkError<TagResourceError>
Source§impl Client
impl Client
Sourcepub fn untag_resource(&self) -> UntagResourceFluentBuilder
pub fn untag_resource(&self) -> UntagResourceFluentBuilder
Constructs a fluent builder for the UntagResource operation.
- The fluent builder is configurable:
resource_arn(impl Into<String>)/set_resource_arn(Option<String>):
required: trueThe resource’s Amazon Resource Name (ARN).
tag_keys(impl Into<String>)/set_tag_keys(Option<Vec::<String>>):
required: trueKeys to remove from the resource’s tags.
- On success, responds with
UntagResourceOutput - On failure, responds with
SdkError<UntagResourceError>
Source§impl Client
impl Client
Sourcepub fn update_alert(&self) -> UpdateAlertFluentBuilder
pub fn update_alert(&self) -> UpdateAlertFluentBuilder
Constructs a fluent builder for the UpdateAlert operation.
- The fluent builder is configurable:
alert_arn(impl Into<String>)/set_alert_arn(Option<String>):
required: trueThe ARN of the alert to update.
alert_description(impl Into<String>)/set_alert_description(Option<String>):
required: falseA description of the alert.
alert_sensitivity_threshold(i32)/set_alert_sensitivity_threshold(Option<i32>):
required: falseAn integer from 0 to 100 specifying the alert sensitivity threshold.
action(Action)/set_action(Option<Action>):
required: falseAction that will be triggered when there is an alert.
alert_filters(AlertFilters)/set_alert_filters(Option<AlertFilters>):
required: falseThe configuration of the alert filters, containing MetricList and DimensionFilterList.
- On success, responds with
UpdateAlertOutputwith field(s):alert_arn(Option<String>):The ARN of the updated alert.
- On failure, responds with
SdkError<UpdateAlertError>
Source§impl Client
impl Client
Sourcepub fn update_anomaly_detector(&self) -> UpdateAnomalyDetectorFluentBuilder
pub fn update_anomaly_detector(&self) -> UpdateAnomalyDetectorFluentBuilder
Constructs a fluent builder for the UpdateAnomalyDetector operation.
- The fluent builder is configurable:
anomaly_detector_arn(impl Into<String>)/set_anomaly_detector_arn(Option<String>):
required: trueThe ARN of the detector to update.
kms_key_arn(impl Into<String>)/set_kms_key_arn(Option<String>):
required: falseThe Amazon Resource Name (ARN) of an AWS KMS encryption key.
anomaly_detector_description(impl Into<String>)/set_anomaly_detector_description(Option<String>):
required: falseThe updated detector description.
anomaly_detector_config(AnomalyDetectorConfig)/set_anomaly_detector_config(Option<AnomalyDetectorConfig>):
required: falseContains information about the configuration to which the detector will be updated.
- On success, responds with
UpdateAnomalyDetectorOutputwith field(s):anomaly_detector_arn(Option<String>):The ARN of the updated detector.
- On failure, responds with
SdkError<UpdateAnomalyDetectorError>
Source§impl Client
impl Client
Sourcepub fn update_metric_set(&self) -> UpdateMetricSetFluentBuilder
pub fn update_metric_set(&self) -> UpdateMetricSetFluentBuilder
Constructs a fluent builder for the UpdateMetricSet operation.
- The fluent builder is configurable:
metric_set_arn(impl Into<String>)/set_metric_set_arn(Option<String>):
required: trueThe ARN of the dataset to update.
metric_set_description(impl Into<String>)/set_metric_set_description(Option<String>):
required: falseThe dataset’s description.
metric_list(Metric)/set_metric_list(Option<Vec::<Metric>>):
required: falseThe metric list.
offset(i32)/set_offset(Option<i32>):
required: falseAfter an interval ends, the amount of seconds that the detector waits before importing data. Offset is only supported for S3, Redshift, Athena and datasources.
timestamp_column(TimestampColumn)/set_timestamp_column(Option<TimestampColumn>):
required: falseThe timestamp column.
dimension_list(impl Into<String>)/set_dimension_list(Option<Vec::<String>>):
required: falseThe dimension list.
metric_set_frequency(Frequency)/set_metric_set_frequency(Option<Frequency>):
required: falseThe dataset’s interval.
metric_source(MetricSource)/set_metric_source(Option<MetricSource>):
required: falseContains information about source data used to generate metrics.
dimension_filter_list(MetricSetDimensionFilter)/set_dimension_filter_list(Option<Vec::<MetricSetDimensionFilter>>):
required: falseDescribes a list of filters for choosing specific dimensions and specific values. Each filter consists of the dimension and one of its values that you want to include. When multiple dimensions or values are specified, the dimensions are joined with an AND operation and the values are joined with an OR operation.
- On success, responds with
UpdateMetricSetOutputwith field(s):metric_set_arn(Option<String>):The ARN of the dataset.
- On failure, responds with
SdkError<UpdateMetricSetError>
Source§impl Client
impl Client
Sourcepub fn from_conf(conf: Config) -> Self
pub fn from_conf(conf: Config) -> Self
Creates a new client from the service Config.
§Panics
This method will panic in the following cases:
- Retries or timeouts are enabled without a
sleep_implconfigured. - Identity caching is enabled without a
sleep_implandtime_sourceconfigured. - No
behavior_versionis provided.
The panic message for each of these will have instructions on how to resolve them.
Source§impl Client
impl Client
Sourcepub fn new(sdk_config: &SdkConfig) -> Self
pub fn new(sdk_config: &SdkConfig) -> Self
Creates a new client from an SDK Config.
§Panics
- This method will panic if the
sdk_configis missing an async sleep implementation. If you experience this panic, set thesleep_implon the Config passed into this function to fix it. - This method will panic if the
sdk_configis missing an HTTP connector. If you experience this panic, set thehttp_connectoron the Config passed into this function to fix it. - This method will panic if no
BehaviorVersionis provided. If you experience this panic, setbehavior_versionon the Config or enable thebehavior-version-latestCargo feature.
Trait Implementations§
Auto Trait Implementations§
impl Freeze for Client
impl !RefUnwindSafe for Client
impl Send for Client
impl Sync for Client
impl Unpin for Client
impl !UnwindSafe for Client
Blanket Implementations§
Source§impl<T> BorrowMut<T> for Twhere
T: ?Sized,
impl<T> BorrowMut<T> for Twhere
T: ?Sized,
Source§fn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
Source§impl<T> CloneToUninit for Twhere
T: Clone,
impl<T> CloneToUninit for Twhere
T: Clone,
Source§impl<T> Instrument for T
impl<T> Instrument for T
Source§fn instrument(self, span: Span) -> Instrumented<Self>
fn instrument(self, span: Span) -> Instrumented<Self>
Source§fn in_current_span(self) -> Instrumented<Self>
fn in_current_span(self) -> Instrumented<Self>
Source§impl<T> IntoEither for T
impl<T> IntoEither for T
Source§fn into_either(self, into_left: bool) -> Either<Self, Self>
fn into_either(self, into_left: bool) -> Either<Self, Self>
self into a Left variant of Either<Self, Self>
if into_left is true.
Converts self into a Right variant of Either<Self, Self>
otherwise. Read moreSource§fn into_either_with<F>(self, into_left: F) -> Either<Self, Self>
fn into_either_with<F>(self, into_left: F) -> Either<Self, Self>
self into a Left variant of Either<Self, Self>
if into_left(&self) returns true.
Converts self into a Right variant of Either<Self, Self>
otherwise. Read moreSource§impl<T> Paint for Twhere
T: ?Sized,
impl<T> Paint for Twhere
T: ?Sized,
Source§fn fg(&self, value: Color) -> Painted<&T>
fn fg(&self, value: Color) -> Painted<&T>
Returns a styled value derived from self with the foreground set to
value.
This method should be used rarely. Instead, prefer to use color-specific
builder methods like red() and
green(), which have the same functionality but are
pithier.
§Example
Set foreground color to white using fg():
use yansi::{Paint, Color};
painted.fg(Color::White);Set foreground color to white using white().
use yansi::Paint;
painted.white();Source§fn bright_black(&self) -> Painted<&T>
fn bright_black(&self) -> Painted<&T>
Source§fn bright_red(&self) -> Painted<&T>
fn bright_red(&self) -> Painted<&T>
Source§fn bright_green(&self) -> Painted<&T>
fn bright_green(&self) -> Painted<&T>
Source§fn bright_yellow(&self) -> Painted<&T>
fn bright_yellow(&self) -> Painted<&T>
Source§fn bright_blue(&self) -> Painted<&T>
fn bright_blue(&self) -> Painted<&T>
Source§fn bright_magenta(&self) -> Painted<&T>
fn bright_magenta(&self) -> Painted<&T>
Source§fn bright_cyan(&self) -> Painted<&T>
fn bright_cyan(&self) -> Painted<&T>
Source§fn bright_white(&self) -> Painted<&T>
fn bright_white(&self) -> Painted<&T>
Source§fn bg(&self, value: Color) -> Painted<&T>
fn bg(&self, value: Color) -> Painted<&T>
Returns a styled value derived from self with the background set to
value.
This method should be used rarely. Instead, prefer to use color-specific
builder methods like on_red() and
on_green(), which have the same functionality but
are pithier.
§Example
Set background color to red using fg():
use yansi::{Paint, Color};
painted.bg(Color::Red);Set background color to red using on_red().
use yansi::Paint;
painted.on_red();Source§fn on_primary(&self) -> Painted<&T>
fn on_primary(&self) -> Painted<&T>
Source§fn on_magenta(&self) -> Painted<&T>
fn on_magenta(&self) -> Painted<&T>
Source§fn on_bright_black(&self) -> Painted<&T>
fn on_bright_black(&self) -> Painted<&T>
Source§fn on_bright_red(&self) -> Painted<&T>
fn on_bright_red(&self) -> Painted<&T>
Source§fn on_bright_green(&self) -> Painted<&T>
fn on_bright_green(&self) -> Painted<&T>
Source§fn on_bright_yellow(&self) -> Painted<&T>
fn on_bright_yellow(&self) -> Painted<&T>
Source§fn on_bright_blue(&self) -> Painted<&T>
fn on_bright_blue(&self) -> Painted<&T>
Source§fn on_bright_magenta(&self) -> Painted<&T>
fn on_bright_magenta(&self) -> Painted<&T>
Source§fn on_bright_cyan(&self) -> Painted<&T>
fn on_bright_cyan(&self) -> Painted<&T>
Source§fn on_bright_white(&self) -> Painted<&T>
fn on_bright_white(&self) -> Painted<&T>
Source§fn attr(&self, value: Attribute) -> Painted<&T>
fn attr(&self, value: Attribute) -> Painted<&T>
Enables the styling Attribute value.
This method should be used rarely. Instead, prefer to use
attribute-specific builder methods like bold() and
underline(), which have the same functionality
but are pithier.
§Example
Make text bold using attr():
use yansi::{Paint, Attribute};
painted.attr(Attribute::Bold);Make text bold using using bold().
use yansi::Paint;
painted.bold();Source§fn rapid_blink(&self) -> Painted<&T>
fn rapid_blink(&self) -> Painted<&T>
Source§fn quirk(&self, value: Quirk) -> Painted<&T>
fn quirk(&self, value: Quirk) -> Painted<&T>
Enables the yansi Quirk value.
This method should be used rarely. Instead, prefer to use quirk-specific
builder methods like mask() and
wrap(), which have the same functionality but are
pithier.
§Example
Enable wrapping using .quirk():
use yansi::{Paint, Quirk};
painted.quirk(Quirk::Wrap);Enable wrapping using wrap().
use yansi::Paint;
painted.wrap();Source§fn clear(&self) -> Painted<&T>
👎Deprecated since 1.0.1: renamed to resetting() due to conflicts with Vec::clear().
The clear() method will be removed in a future release.
fn clear(&self) -> Painted<&T>
resetting() due to conflicts with Vec::clear().
The clear() method will be removed in a future release.Source§fn whenever(&self, value: Condition) -> Painted<&T>
fn whenever(&self, value: Condition) -> Painted<&T>
Conditionally enable styling based on whether the Condition value
applies. Replaces any previous condition.
See the crate level docs for more details.
§Example
Enable styling painted only when both stdout and stderr are TTYs:
use yansi::{Paint, Condition};
painted.red().on_yellow().whenever(Condition::STDOUTERR_ARE_TTY);