/*
* Copyright Amazon.com, Inc. or its affiliates. All Rights Reserved.
*
* Licensed under the Apache License, Version 2.0 (the "License").
* You may not use this file except in compliance with the License.
* A copy of the License is located at
*
* http://aws.amazon.com/apache2.0
*
* or in the "license" file accompanying this file. This file is distributed
* on an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either
* express or implied. See the License for the specific language governing
* permissions and limitations under the License.
*/
/*
* Do not modify this file. This file is generated from the ce-2017-10-25.normal.json service model.
*/
using System;
using System.Collections.Generic;
using System.Xml.Serialization;
using System.Text;
using System.IO;
using System.Net;
using Amazon.Runtime;
using Amazon.Runtime.Internal;
namespace Amazon.CostExplorer.Model
{
///
/// Container for the parameters to the UpdateAnomalySubscription operation.
/// 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
.
///
///
///
public partial class UpdateAnomalySubscriptionRequest : AmazonCostExplorerRequest
{
private AnomalySubscriptionFrequency _frequency;
private List _monitorArnList = new List();
private List _subscribers = new List();
private string _subscriptionArn;
private string _subscriptionName;
private double? _threshold;
private Expression _thresholdExpression;
///
/// Gets and sets the property Frequency.
///
/// The update to the frequency value that subscribers receive notifications.
///
///
public AnomalySubscriptionFrequency Frequency
{
get { return this._frequency; }
set { this._frequency = value; }
}
// Check to see if Frequency property is set
internal bool IsSetFrequency()
{
return this._frequency != null;
}
///
/// Gets and sets the property MonitorArnList.
///
/// A list of cost anomaly monitor ARNs.
///
///
public List MonitorArnList
{
get { return this._monitorArnList; }
set { this._monitorArnList = value; }
}
// Check to see if MonitorArnList property is set
internal bool IsSetMonitorArnList()
{
return this._monitorArnList != null && this._monitorArnList.Count > 0;
}
///
/// Gets and sets the property Subscribers.
///
/// The update to the subscriber list.
///
///
public List Subscribers
{
get { return this._subscribers; }
set { this._subscribers = value; }
}
// Check to see if Subscribers property is set
internal bool IsSetSubscribers()
{
return this._subscribers != null && this._subscribers.Count > 0;
}
///
/// Gets and sets the property SubscriptionArn.
///
/// A cost anomaly subscription Amazon Resource Name (ARN).
///
///
[AWSProperty(Required=true, Min=0, Max=1024)]
public string SubscriptionArn
{
get { return this._subscriptionArn; }
set { this._subscriptionArn = value; }
}
// Check to see if SubscriptionArn property is set
internal bool IsSetSubscriptionArn()
{
return this._subscriptionArn != null;
}
///
/// Gets and sets the property SubscriptionName.
///
/// The new name of the subscription.
///
///
[AWSProperty(Min=0, Max=1024)]
public string SubscriptionName
{
get { return this._subscriptionName; }
set { this._subscriptionName = value; }
}
// Check to see if SubscriptionName property is set
internal bool IsSetSubscriptionName()
{
return this._subscriptionName != null;
}
///
/// Gets and sets the property Threshold.
///
/// (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.
///
///
[Obsolete("Threshold has been deprecated in favor of ThresholdExpression")]
[AWSProperty(Min=0)]
public double Threshold
{
get { return this._threshold.GetValueOrDefault(); }
set { this._threshold = value; }
}
// Check to see if Threshold property is set
internal bool IsSetThreshold()
{
return this._threshold.HasValue;
}
///
/// Gets and sets the property ThresholdExpression.
///
/// 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_ABSOLUTE
/// and ANOMALY_TOTAL_IMPACT_PERCENTAGE
, corresponding to an anomaly’s TotalImpact
/// and TotalImpactPercentage, respectively (see Impact
/// for more details). The supported nested expression types are AND
and
/// OR
. The match option GREATER_THAN_OR_EQUAL
is 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" ] } }
///
/// -
///
///
AND
two 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" ] } } ] }
///
/// -
///
///
OR
two 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" ] } } ] }
///
///
///
public Expression ThresholdExpression
{
get { return this._thresholdExpression; }
set { this._thresholdExpression = value; }
}
// Check to see if ThresholdExpression property is set
internal bool IsSetThresholdExpression()
{
return this._thresholdExpression != null;
}
}
}