update_anomaly_subscription
async
¶
update_anomaly_subscription(
subscription_arn: GenericString,
*,
config_overrides: Optional[AsyncCostExplorerClientConfig] = None,
threshold: Optional[NullableNonNegativeDouble] = None,
frequency: Optional[AnomalySubscriptionFrequency] = None,
monitor_arn_list: Optional[MonitorArnList] = None,
subscribers: Optional[Subscribers] = None,
subscription_name: Optional[GenericString] = None,
threshold_expression: Optional[Expression] = None,
) -> UpdateAnomalySubscriptionResponse
Updates an existing cost anomaly subscription. Specify the fields that you want to update. Omitted fields are unchanged.
The JSON below describes the generic construct for each type. See Request Parameters for possible values as they apply to AnomalySubscription.
Parameters:
-
subscription_arn(GenericString) –A cost anomaly subscription Amazon Resource Name (ARN).
-
threshold(Optional[NullableNonNegativeDouble], default:None) –(deprecated)
The update to the threshold value for receiving notifications.
This field has been deprecated. To update a threshold, use ThresholdExpression. Continued use of Threshold will be treated as shorthand syntax for a ThresholdExpression.
You can specify either Threshold or ThresholdExpression, but not both.
-
frequency(Optional[AnomalySubscriptionFrequency], default:None) –The update to the frequency value that subscribers receive notifications.
-
monitor_arn_list(Optional[MonitorArnList], default:None) –A list of cost anomaly monitor ARNs.
-
subscribers(Optional[Subscribers], default:None) –The update to the subscriber list.
-
subscription_name(Optional[GenericString], default:None) –The new name of the subscription.
-
threshold_expression(Optional[Expression], default:None) –The update to the Expression object used to specify the anomalies that you want to generate alerts for. This supports dimensions and nested expressions. The supported dimensions are
ANOMALY_TOTAL_IMPACT_ABSOLUTEandANOMALY_TOTAL_IMPACT_PERCENTAGE, corresponding to an anomaly’s TotalImpact and TotalImpactPercentage, respectively (see Impact for more details). The supported nested expression types areANDandOR. The match optionGREATER_THAN_OR_EQUALis required. Values must be numbers between 0 and 10,000,000,000 in string format.You can specify either Threshold or ThresholdExpression, but not both.
The following are examples of valid ThresholdExpressions:
-
Absolute threshold:
{ "Dimensions": { "Key": "ANOMALY_TOTAL_IMPACT_ABSOLUTE", "MatchOptions": [ "GREATER_THAN_OR_EQUAL" ], "Values": [ "100" ] } } -
Percentage threshold:
{ "Dimensions": { "Key": "ANOMALY_TOTAL_IMPACT_PERCENTAGE", "MatchOptions": [ "GREATER_THAN_OR_EQUAL" ], "Values": [ "100" ] } } -
ANDtwo thresholds together:{ "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" ] } } ] } -
ORtwo thresholds together:{ "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" ] } } ] }
-
Raises:
-
LimitExceededException–You made too many calls in a short period of time. Try again later.
-
UnknownMonitorException–The cost anomaly monitor does not exist for the account.
-
UnknownSubscriptionException–The cost anomaly subscription does not exist for the account.
-
UnknownServiceError–The service returned an error code this client does not model.
Source code in docs_src/capo_cost_explorer/_services/async_cost_explorer.py
3715 3716 3717 3718 3719 3720 3721 3722 3723 3724 3725 3726 3727 3728 3729 3730 3731 3732 3733 3734 3735 3736 3737 3738 3739 3740 3741 3742 3743 3744 3745 3746 3747 3748 3749 3750 3751 3752 3753 3754 3755 3756 3757 3758 3759 3760 3761 3762 3763 3764 3765 3766 3767 3768 3769 3770 3771 3772 3773 3774 3775 3776 3777 3778 3779 3780 3781 3782 3783 3784 3785 3786 3787 3788 3789 3790 3791 3792 3793 3794 3795 3796 3797 | |