/*
* 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-plans-2018-01-06.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.AutoScalingPlans.Model
{
///
/// Describes a target tracking configuration to use with AWS Auto Scaling. Used with
/// ScalingInstruction and ScalingPolicy.
///
public partial class TargetTrackingConfiguration
{
private CustomizedScalingMetricSpecification _customizedScalingMetricSpecification;
private bool? _disableScaleIn;
private int? _estimatedInstanceWarmup;
private PredefinedScalingMetricSpecification _predefinedScalingMetricSpecification;
private int? _scaleInCooldown;
private int? _scaleOutCooldown;
private double? _targetValue;
///
/// Gets and sets the property CustomizedScalingMetricSpecification.
///
/// A customized metric. You can specify either a predefined metric or a customized metric.
///
///
///
public CustomizedScalingMetricSpecification 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 DisableScaleIn.
///
/// Indicates whether scale in by the target tracking scaling policy is disabled. If the
/// value is true
, scale in is disabled and the target tracking scaling policy
/// doesn't remove capacity from the scalable resource. Otherwise, scale in is enabled
/// and the target tracking scaling policy can remove capacity from the scalable resource.
///
///
///
///
/// The default value is false
.
///
///
public bool DisableScaleIn
{
get { return this._disableScaleIn.GetValueOrDefault(); }
set { this._disableScaleIn = value; }
}
// Check to see if DisableScaleIn property is set
internal bool IsSetDisableScaleIn()
{
return this._disableScaleIn.HasValue;
}
///
/// Gets and sets the property EstimatedInstanceWarmup.
///
/// The estimated time, in seconds, until a newly launched instance can contribute to
/// the CloudWatch metrics. This value is used only if the resource is an Auto Scaling
/// group.
///
///
public int EstimatedInstanceWarmup
{
get { return this._estimatedInstanceWarmup.GetValueOrDefault(); }
set { this._estimatedInstanceWarmup = value; }
}
// Check to see if EstimatedInstanceWarmup property is set
internal bool IsSetEstimatedInstanceWarmup()
{
return this._estimatedInstanceWarmup.HasValue;
}
///
/// Gets and sets the property PredefinedScalingMetricSpecification.
///
/// A predefined metric. You can specify either a predefined metric or a customized metric.
///
///
public PredefinedScalingMetricSpecification 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 ScaleInCooldown.
///
/// The amount of time, in seconds, after a scale-in activity completes before another
/// scale-in activity can start. This property is not used if the scalable resource is
/// an Auto Scaling group.
///
///
///
/// With the scale-in cooldown period, the intention is to scale in conservatively
/// to protect your application’s availability, so scale-in activities are blocked until
/// the cooldown period has expired. However, if another alarm triggers a scale-out activity
/// during the scale-in cooldown period, Auto Scaling scales out the target immediately.
/// In this case, the scale-in cooldown period stops and doesn't complete.
///
///
public int ScaleInCooldown
{
get { return this._scaleInCooldown.GetValueOrDefault(); }
set { this._scaleInCooldown = value; }
}
// Check to see if ScaleInCooldown property is set
internal bool IsSetScaleInCooldown()
{
return this._scaleInCooldown.HasValue;
}
///
/// Gets and sets the property ScaleOutCooldown.
///
/// The amount of time, in seconds, to wait for a previous scale-out activity to take
/// effect. This property is not used if the scalable resource is an Auto Scaling group.
///
///
///
/// With the scale-out cooldown period, the intention is to continuously (but not
/// excessively) scale out. After Auto Scaling successfully scales out using a target
/// tracking scaling policy, it starts to calculate the cooldown time. The scaling policy
/// won't increase the desired capacity again unless either a larger scale out is triggered
/// or the cooldown period ends.
///
///
public int ScaleOutCooldown
{
get { return this._scaleOutCooldown.GetValueOrDefault(); }
set { this._scaleOutCooldown = value; }
}
// Check to see if ScaleOutCooldown property is set
internal bool IsSetScaleOutCooldown()
{
return this._scaleOutCooldown.HasValue;
}
///
/// Gets and sets the property TargetValue.
///
/// The target value for the metric. Although this property accepts numbers of type Double,
/// it won't accept values that are either too small or too large. Values must be in the
/// range of -2^360 to 2^360.
///
///
[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;
}
}
}