Table of Contents

Interface CfnScalingPolicy.ITargetTrackingConfigurationProperty

Namespace
Amazon.CDK.AWS.AutoScaling
Assembly
Amazon.CDK.AWS.AutoScaling.dll

TargetTrackingConfiguration is a property of the AWS::AutoScaling::ScalingPolicy resource that specifies a target tracking scaling policy configuration for Amazon EC2 Auto Scaling.

public interface CfnScalingPolicy.ITargetTrackingConfigurationProperty

Examples

// The code below shows an example of how to instantiate this type.
             // The values are placeholders you should change.
             using Amazon.CDK.AWS.AutoScaling;

             var targetTrackingConfigurationProperty = new TargetTrackingConfigurationProperty {
                 TargetValue = 123,

                 // the properties below are optional
                 CustomizedMetricSpecification = new CustomizedMetricSpecificationProperty {
                     MetricName = "metricName",
                     Namespace = "namespace",
                     Statistic = "statistic",

                     // the properties below are optional
                     Dimensions = new [] { new MetricDimensionProperty {
                         Name = "name",
                         Value = "value"
                     } },
                     Unit = "unit"
                 },
                 DisableScaleIn = false,
                 PredefinedMetricSpecification = new PredefinedMetricSpecificationProperty {
                     PredefinedMetricType = "predefinedMetricType",

                     // the properties below are optional
                     ResourceLabel = "resourceLabel"
                 }
             };

Remarks

For more information about scaling policies, see Dynamic scaling in the Amazon EC2 Auto Scaling User Guide .

Link: http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-properties-autoscaling-scalingpolicy-targettrackingconfiguration.html

ExampleMetadata: fixture=_generated

Properties

CustomizedMetricSpecification

A customized metric.

object? CustomizedMetricSpecification { get; }

Property Value

object

Remarks

DisableScaleIn

Indicates whether scaling in by the target tracking scaling policy is disabled.

object? DisableScaleIn { get; }

Property Value

object

Remarks

If scaling in is disabled, the target tracking scaling policy doesn't remove instances from the Auto Scaling group. Otherwise, the target tracking scaling policy can remove instances from the Auto Scaling group. The default is false .

Link: http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-properties-autoscaling-scalingpolicy-targettrackingconfiguration.html#cfn-autoscaling-scalingpolicy-targettrackingconfiguration-disablescalein

PredefinedMetricSpecification

A predefined metric.

object? PredefinedMetricSpecification { get; }

Property Value

object

Remarks

TargetValue

The target value for the metric.

double TargetValue { get; }

Property Value

double

Remarks

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.

Link: http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-properties-autoscaling-scalingpolicy-targettrackingconfiguration.html#cfn-autoscaling-scalingpolicy-targettrackingconfiguration-targetvalue