/* * 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 autoscaling-2011-01-01.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.AutoScaling.Model { /// /// This structure specifies the metrics and target utilization settings for a predictive /// scaling policy. /// /// /// /// You must specify either a metric pair, or a load metric and a scaling metric individually. /// Specifying a metric pair instead of individual metrics provides a simpler way to configure /// metrics for a scaling policy. You choose the metric pair, and the policy automatically /// knows the correct sum and average statistics to use for the load metric and the scaling /// metric. /// /// /// /// Example /// /// /// /// For information about using custom metrics with predictive scaling, see Advanced /// predictive scaling policy configurations using custom metrics in the Amazon /// EC2 Auto Scaling User Guide. /// /// public partial class PredictiveScalingMetricSpecification { private PredictiveScalingCustomizedCapacityMetric _customizedCapacityMetricSpecification; private PredictiveScalingCustomizedLoadMetric _customizedLoadMetricSpecification; private PredictiveScalingCustomizedScalingMetric _customizedScalingMetricSpecification; private PredictiveScalingPredefinedLoadMetric _predefinedLoadMetricSpecification; private PredictiveScalingPredefinedMetricPair _predefinedMetricPairSpecification; private PredictiveScalingPredefinedScalingMetric _predefinedScalingMetricSpecification; private double? _targetValue; /// /// Gets and sets the property CustomizedCapacityMetricSpecification. /// /// The customized capacity metric specification. /// /// public PredictiveScalingCustomizedCapacityMetric CustomizedCapacityMetricSpecification { get { return this._customizedCapacityMetricSpecification; } set { this._customizedCapacityMetricSpecification = value; } } // Check to see if CustomizedCapacityMetricSpecification property is set internal bool IsSetCustomizedCapacityMetricSpecification() { return this._customizedCapacityMetricSpecification != null; } /// /// Gets and sets the property CustomizedLoadMetricSpecification. /// /// The customized load metric specification. /// /// public PredictiveScalingCustomizedLoadMetric CustomizedLoadMetricSpecification { get { return this._customizedLoadMetricSpecification; } set { this._customizedLoadMetricSpecification = value; } } // Check to see if CustomizedLoadMetricSpecification property is set internal bool IsSetCustomizedLoadMetricSpecification() { return this._customizedLoadMetricSpecification != null; } /// /// Gets and sets the property CustomizedScalingMetricSpecification. /// /// The customized scaling metric specification. /// /// public PredictiveScalingCustomizedScalingMetric CustomizedScalingMetricSpecification { get { return this._customizedScalingMetricSpecification; } set { this._customizedScalingMetricSpecification = value; } } // Check to see if CustomizedScalingMetricSpecification property is set internal bool IsSetCustomizedScalingMetricSpecification() { return this._customizedScalingMetricSpecification != null; } /// /// Gets and sets the property PredefinedLoadMetricSpecification. /// /// The predefined load metric specification. /// /// public PredictiveScalingPredefinedLoadMetric PredefinedLoadMetricSpecification { get { return this._predefinedLoadMetricSpecification; } set { this._predefinedLoadMetricSpecification = value; } } // Check to see if PredefinedLoadMetricSpecification property is set internal bool IsSetPredefinedLoadMetricSpecification() { return this._predefinedLoadMetricSpecification != null; } /// /// Gets and sets the property PredefinedMetricPairSpecification. /// /// The predefined metric pair specification from which Amazon EC2 Auto Scaling determines /// the appropriate scaling metric and load metric to use. /// /// public PredictiveScalingPredefinedMetricPair PredefinedMetricPairSpecification { get { return this._predefinedMetricPairSpecification; } set { this._predefinedMetricPairSpecification = value; } } // Check to see if PredefinedMetricPairSpecification property is set internal bool IsSetPredefinedMetricPairSpecification() { return this._predefinedMetricPairSpecification != null; } /// /// Gets and sets the property PredefinedScalingMetricSpecification. /// /// The predefined scaling metric specification. /// /// public PredictiveScalingPredefinedScalingMetric PredefinedScalingMetricSpecification { get { return this._predefinedScalingMetricSpecification; } set { this._predefinedScalingMetricSpecification = value; } } // Check to see if PredefinedScalingMetricSpecification property is set internal bool IsSetPredefinedScalingMetricSpecification() { return this._predefinedScalingMetricSpecification != null; } /// /// Gets and sets the property TargetValue. /// /// Specifies the target utilization. /// /// /// /// Some metrics are based on a count instead of a percentage, such as the request count /// for an Application Load Balancer or the number of messages in an SQS queue. If the /// scaling policy specifies one of these metrics, specify the target utilization as the /// optimal average request or message count per instance during any one-minute interval. /// /// /// /// [AWSProperty(Required=true)] public double TargetValue { get { return this._targetValue.GetValueOrDefault(); } set { this._targetValue = value; } } // Check to see if TargetValue property is set internal bool IsSetTargetValue() { return this._targetValue.HasValue; } } }