Table of Contents

Class CfnScalingPolicy.PredictiveScalingMetricSpecificationProperty

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

A structure that specifies a metric specification for the MetricSpecifications property of the AWS::AutoScaling::ScalingPolicy PredictiveScalingConfiguration property type.

public class CfnScalingPolicy.PredictiveScalingMetricSpecificationProperty : CfnScalingPolicy.IPredictiveScalingMetricSpecificationProperty
Inheritance
CfnScalingPolicy.PredictiveScalingMetricSpecificationProperty
Implements
Inherited Members

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 predictiveScalingMetricSpecificationProperty = new PredictiveScalingMetricSpecificationProperty {
                 TargetValue = 123,

                 // the properties below are optional
                 CustomizedCapacityMetricSpecification = new PredictiveScalingCustomizedCapacityMetricProperty {
                     MetricDataQueries = new [] { new MetricDataQueryProperty {
                         Id = "id",

                         // the properties below are optional
                         Expression = "expression",
                         Label = "label",
                         MetricStat = new MetricStatProperty {
                             Metric = new MetricProperty {
                                 MetricName = "metricName",
                                 Namespace = "namespace",

                                 // the properties below are optional
                                 Dimensions = new [] { new MetricDimensionProperty {
                                     Name = "name",
                                     Value = "value"
                                 } }
                             },
                             Stat = "stat",

                             // the properties below are optional
                             Unit = "unit"
                         },
                         ReturnData = false
                     } }
                 },
                 CustomizedLoadMetricSpecification = new PredictiveScalingCustomizedLoadMetricProperty {
                     MetricDataQueries = new [] { new MetricDataQueryProperty {
                         Id = "id",

                         // the properties below are optional
                         Expression = "expression",
                         Label = "label",
                         MetricStat = new MetricStatProperty {
                             Metric = new MetricProperty {
                                 MetricName = "metricName",
                                 Namespace = "namespace",

                                 // the properties below are optional
                                 Dimensions = new [] { new MetricDimensionProperty {
                                     Name = "name",
                                     Value = "value"
                                 } }
                             },
                             Stat = "stat",

                             // the properties below are optional
                             Unit = "unit"
                         },
                         ReturnData = false
                     } }
                 },
                 CustomizedScalingMetricSpecification = new PredictiveScalingCustomizedScalingMetricProperty {
                     MetricDataQueries = new [] { new MetricDataQueryProperty {
                         Id = "id",

                         // the properties below are optional
                         Expression = "expression",
                         Label = "label",
                         MetricStat = new MetricStatProperty {
                             Metric = new MetricProperty {
                                 MetricName = "metricName",
                                 Namespace = "namespace",

                                 // the properties below are optional
                                 Dimensions = new [] { new MetricDimensionProperty {
                                     Name = "name",
                                     Value = "value"
                                 } }
                             },
                             Stat = "stat",

                             // the properties below are optional
                             Unit = "unit"
                         },
                         ReturnData = false
                     } }
                 },
                 PredefinedLoadMetricSpecification = new PredictiveScalingPredefinedLoadMetricProperty {
                     PredefinedMetricType = "predefinedMetricType",

                     // the properties below are optional
                     ResourceLabel = "resourceLabel"
                 },
                 PredefinedMetricPairSpecification = new PredictiveScalingPredefinedMetricPairProperty {
                     PredefinedMetricType = "predefinedMetricType",

                     // the properties below are optional
                     ResourceLabel = "resourceLabel"
                 },
                 PredefinedScalingMetricSpecification = new PredictiveScalingPredefinedScalingMetricProperty {
                     PredefinedMetricType = "predefinedMetricType",

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

Remarks

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 .

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

    ExampleMetadata: fixture=_generated

    Constructors

    PredictiveScalingMetricSpecificationProperty()

    public PredictiveScalingMetricSpecificationProperty()

    Properties

    CustomizedCapacityMetricSpecification

    The customized capacity metric specification.

    public object? CustomizedCapacityMetricSpecification { get; set; }

    Property Value

    object

    Remarks

    CustomizedLoadMetricSpecification

    The customized load metric specification.

    public object? CustomizedLoadMetricSpecification { get; set; }

    Property Value

    object

    Remarks

    CustomizedScalingMetricSpecification

    The customized scaling metric specification.

    public object? CustomizedScalingMetricSpecification { get; set; }

    Property Value

    object

    Remarks

    PredefinedLoadMetricSpecification

    The predefined load metric specification.

    public object? PredefinedLoadMetricSpecification { get; set; }

    Property Value

    object

    Remarks

    PredefinedMetricPairSpecification

    The predefined metric pair specification from which Amazon EC2 Auto Scaling determines the appropriate scaling metric and load metric to use.

    public object? PredefinedMetricPairSpecification { get; set; }

    Property Value

    object

    Remarks

    PredefinedScalingMetricSpecification

    The predefined scaling metric specification.

    public object? PredefinedScalingMetricSpecification { get; set; }

    Property Value

    object

    Remarks

    TargetValue

    Specifies the target utilization.

    public double TargetValue { get; set; }

    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-predictivescalingmetricspecification.html#cfn-autoscaling-scalingpolicy-predictivescalingmetricspecification-targetvalue