aws_sdk_costexplorer/client/update_anomaly_subscription.rs
// Code generated by software.amazon.smithy.rust.codegen.smithy-rs. DO NOT EDIT.
impl super::Client {
/// Constructs a fluent builder for the [`UpdateAnomalySubscription`](crate::operation::update_anomaly_subscription::builders::UpdateAnomalySubscriptionFluentBuilder) operation.
///
/// - The fluent builder is configurable:
/// - [`subscription_arn(impl Into<String>)`](crate::operation::update_anomaly_subscription::builders::UpdateAnomalySubscriptionFluentBuilder::subscription_arn) / [`set_subscription_arn(Option<String>)`](crate::operation::update_anomaly_subscription::builders::UpdateAnomalySubscriptionFluentBuilder::set_subscription_arn):<br>required: **true**<br><p>A cost anomaly subscription Amazon Resource Name (ARN).</p><br>
/// - [`threshold(f64)`](crate::operation::update_anomaly_subscription::builders::UpdateAnomalySubscriptionFluentBuilder::threshold) / [`set_threshold(Option<f64>)`](crate::operation::update_anomaly_subscription::builders::UpdateAnomalySubscriptionFluentBuilder::set_threshold):<br>required: **false**<br><p>(deprecated)</p> <p>The update to the threshold value for receiving notifications.</p> <p>This field has been deprecated. To update a threshold, use ThresholdExpression. Continued use of Threshold will be treated as shorthand syntax for a ThresholdExpression.</p> <p>You can specify either Threshold or ThresholdExpression, but not both.</p><br>
/// - [`frequency(AnomalySubscriptionFrequency)`](crate::operation::update_anomaly_subscription::builders::UpdateAnomalySubscriptionFluentBuilder::frequency) / [`set_frequency(Option<AnomalySubscriptionFrequency>)`](crate::operation::update_anomaly_subscription::builders::UpdateAnomalySubscriptionFluentBuilder::set_frequency):<br>required: **false**<br><p>The update to the frequency value that subscribers receive notifications.</p><br>
/// - [`monitor_arn_list(impl Into<String>)`](crate::operation::update_anomaly_subscription::builders::UpdateAnomalySubscriptionFluentBuilder::monitor_arn_list) / [`set_monitor_arn_list(Option<Vec::<String>>)`](crate::operation::update_anomaly_subscription::builders::UpdateAnomalySubscriptionFluentBuilder::set_monitor_arn_list):<br>required: **false**<br><p>A list of cost anomaly monitor ARNs.</p><br>
/// - [`subscribers(Subscriber)`](crate::operation::update_anomaly_subscription::builders::UpdateAnomalySubscriptionFluentBuilder::subscribers) / [`set_subscribers(Option<Vec::<Subscriber>>)`](crate::operation::update_anomaly_subscription::builders::UpdateAnomalySubscriptionFluentBuilder::set_subscribers):<br>required: **false**<br><p>The update to the subscriber list.</p><br>
/// - [`subscription_name(impl Into<String>)`](crate::operation::update_anomaly_subscription::builders::UpdateAnomalySubscriptionFluentBuilder::subscription_name) / [`set_subscription_name(Option<String>)`](crate::operation::update_anomaly_subscription::builders::UpdateAnomalySubscriptionFluentBuilder::set_subscription_name):<br>required: **false**<br><p>The new name of the subscription.</p><br>
/// - [`threshold_expression(Expression)`](crate::operation::update_anomaly_subscription::builders::UpdateAnomalySubscriptionFluentBuilder::threshold_expression) / [`set_threshold_expression(Option<Expression>)`](crate::operation::update_anomaly_subscription::builders::UpdateAnomalySubscriptionFluentBuilder::set_threshold_expression):<br>required: **false**<br><p>The update to the <a href="https://docs.aws.amazon.com/aws-cost-management/latest/APIReference/API_Expression.html">Expression</a> object used to specify the anomalies that you want to generate alerts for. This supports dimensions and nested expressions. The supported dimensions are <code>ANOMALY_TOTAL_IMPACT_ABSOLUTE</code> and <code>ANOMALY_TOTAL_IMPACT_PERCENTAGE</code>, corresponding to an anomaly’s TotalImpact and TotalImpactPercentage, respectively (see <a href="https://docs.aws.amazon.com/aws-cost-management/latest/APIReference/API_Impact.html">Impact</a> for more details). The supported nested expression types are <code>AND</code> and <code>OR</code>. The match option <code>GREATER_THAN_OR_EQUAL</code> is required. Values must be numbers between 0 and 10,000,000,000 in string format.</p> <p>You can specify either Threshold or ThresholdExpression, but not both.</p> <p>The following are examples of valid ThresholdExpressions:</p> <ul> <li> <p>Absolute threshold: <code>{ "Dimensions": { "Key": "ANOMALY_TOTAL_IMPACT_ABSOLUTE", "MatchOptions": \[ "GREATER_THAN_OR_EQUAL" \], "Values": \[ "100" \] } }</code></p></li> <li> <p>Percentage threshold: <code>{ "Dimensions": { "Key": "ANOMALY_TOTAL_IMPACT_PERCENTAGE", "MatchOptions": \[ "GREATER_THAN_OR_EQUAL" \], "Values": \[ "100" \] } }</code></p></li> <li> <p><code>AND</code> two thresholds together: <code>{ "And": \[ { "Dimensions": { "Key": "ANOMALY_TOTAL_IMPACT_ABSOLUTE", "MatchOptions": \[ "GREATER_THAN_OR_EQUAL" \], "Values": \[ "100" \] } }, { "Dimensions": { "Key": "ANOMALY_TOTAL_IMPACT_PERCENTAGE", "MatchOptions": \[ "GREATER_THAN_OR_EQUAL" \], "Values": \[ "100" \] } } \] }</code></p></li> <li> <p><code>OR</code> two thresholds together: <code>{ "Or": \[ { "Dimensions": { "Key": "ANOMALY_TOTAL_IMPACT_ABSOLUTE", "MatchOptions": \[ "GREATER_THAN_OR_EQUAL" \], "Values": \[ "100" \] } }, { "Dimensions": { "Key": "ANOMALY_TOTAL_IMPACT_PERCENTAGE", "MatchOptions": \[ "GREATER_THAN_OR_EQUAL" \], "Values": \[ "100" \] } } \] }</code></p></li> </ul><br>
/// - On success, responds with [`UpdateAnomalySubscriptionOutput`](crate::operation::update_anomaly_subscription::UpdateAnomalySubscriptionOutput) with field(s):
/// - [`subscription_arn(String)`](crate::operation::update_anomaly_subscription::UpdateAnomalySubscriptionOutput::subscription_arn): <p>A cost anomaly subscription ARN.</p>
/// - On failure, responds with [`SdkError<UpdateAnomalySubscriptionError>`](crate::operation::update_anomaly_subscription::UpdateAnomalySubscriptionError)
pub fn update_anomaly_subscription(&self) -> crate::operation::update_anomaly_subscription::builders::UpdateAnomalySubscriptionFluentBuilder {
crate::operation::update_anomaly_subscription::builders::UpdateAnomalySubscriptionFluentBuilder::new(self.handle.clone())
}
}