Show / Hide Table of Contents

Class CfnScalingPolicyPropsMixin.CustomizedMetricSpecificationProperty

Contains customized metric specification information for a target tracking scaling policy for Application Auto Scaling.

Inheritance
object
CfnScalingPolicyPropsMixin.CustomizedMetricSpecificationProperty
Implements
CfnScalingPolicyPropsMixin.ICustomizedMetricSpecificationProperty
Inherited Members
object.GetType()
object.MemberwiseClone()
object.ToString()
object.Equals(object)
object.Equals(object, object)
object.ReferenceEquals(object, object)
object.GetHashCode()
Namespace: Amazon.CDK.CfnPropertyMixins.AWS.ApplicationAutoScaling
Assembly: Amazon.CDK.CfnPropertyMixins.dll
Syntax (csharp)
public class CfnScalingPolicyPropsMixin.CustomizedMetricSpecificationProperty : CfnScalingPolicyPropsMixin.ICustomizedMetricSpecificationProperty
Syntax (vb)
Public Class CfnScalingPolicyPropsMixin.CustomizedMetricSpecificationProperty Implements CfnScalingPolicyPropsMixin.ICustomizedMetricSpecificationProperty
Remarks

For information about the available metrics for a service, see AWS services that publish CloudWatch metrics in the Amazon CloudWatch User Guide .

To create your customized metric specification:

    For an example of how creating new metrics can be useful, see Scaling based on Amazon SQS in the Amazon EC2 Auto Scaling User Guide . This topic mentions Auto Scaling groups, but the same scenario for Amazon SQS can apply to the target tracking scaling policies that you create for a Spot Fleet by using Application Auto Scaling.

    For more information about the CloudWatch terminology below, see Amazon CloudWatch concepts .

    CustomizedMetricSpecification is a property of the AWS::ApplicationAutoScaling::ScalingPolicy TargetTrackingScalingPolicyConfiguration property type.

    See: http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-properties-applicationautoscaling-scalingpolicy-customizedmetricspecification.html

    ExampleMetadata: fixture=_generated

    Examples
    // The code below shows an example of how to instantiate this type.
                 // The values are placeholders you should change.
                 using Amazon.CDK.CfnPropertyMixins.AWS.ApplicationAutoScaling;
    
                 var customizedMetricSpecificationProperty = new CustomizedMetricSpecificationProperty {
                     Dimensions = new [] { new MetricDimensionProperty {
                         Name = "name",
                         Value = "value"
                     } },
                     MetricName = "metricName",
                     Metrics = new [] { new TargetTrackingMetricDataQueryProperty {
                         Expression = "expression",
                         Id = "id",
                         Label = "label",
                         MetricStat = new TargetTrackingMetricStatProperty {
                             Metric = new TargetTrackingMetricProperty {
                                 Dimensions = new [] { new TargetTrackingMetricDimensionProperty {
                                     Name = "name",
                                     Value = "value"
                                 } },
                                 MetricName = "metricName",
                                 Namespace = "namespace"
                             },
                             Stat = "stat",
                             Unit = "unit"
                         },
                         ReturnData = false
                     } },
                     Namespace = "namespace",
                     Statistic = "statistic",
                     Unit = "unit"
                 };

    Synopsis

    Constructors

    CustomizedMetricSpecificationProperty()

    Contains customized metric specification information for a target tracking scaling policy for Application Auto Scaling.

    Properties

    Dimensions

    The dimensions of the metric.

    MetricName

    The name of the metric.

    Metrics

    The metrics to include in the target tracking scaling policy, as a metric data query.

    Namespace

    The namespace of the metric.

    Statistic

    The statistic of the metric.

    Unit

    The unit of the metric.

    Constructors

    CustomizedMetricSpecificationProperty()

    Contains customized metric specification information for a target tracking scaling policy for Application Auto Scaling.

    public CustomizedMetricSpecificationProperty()
    Remarks

    For information about the available metrics for a service, see AWS services that publish CloudWatch metrics in the Amazon CloudWatch User Guide .

    To create your customized metric specification:

      For an example of how creating new metrics can be useful, see Scaling based on Amazon SQS in the Amazon EC2 Auto Scaling User Guide . This topic mentions Auto Scaling groups, but the same scenario for Amazon SQS can apply to the target tracking scaling policies that you create for a Spot Fleet by using Application Auto Scaling.

      For more information about the CloudWatch terminology below, see Amazon CloudWatch concepts .

      CustomizedMetricSpecification is a property of the AWS::ApplicationAutoScaling::ScalingPolicy TargetTrackingScalingPolicyConfiguration property type.

      See: http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-properties-applicationautoscaling-scalingpolicy-customizedmetricspecification.html

      ExampleMetadata: fixture=_generated

      Examples
      // The code below shows an example of how to instantiate this type.
                   // The values are placeholders you should change.
                   using Amazon.CDK.CfnPropertyMixins.AWS.ApplicationAutoScaling;
      
                   var customizedMetricSpecificationProperty = new CustomizedMetricSpecificationProperty {
                       Dimensions = new [] { new MetricDimensionProperty {
                           Name = "name",
                           Value = "value"
                       } },
                       MetricName = "metricName",
                       Metrics = new [] { new TargetTrackingMetricDataQueryProperty {
                           Expression = "expression",
                           Id = "id",
                           Label = "label",
                           MetricStat = new TargetTrackingMetricStatProperty {
                               Metric = new TargetTrackingMetricProperty {
                                   Dimensions = new [] { new TargetTrackingMetricDimensionProperty {
                                       Name = "name",
                                       Value = "value"
                                   } },
                                   MetricName = "metricName",
                                   Namespace = "namespace"
                               },
                               Stat = "stat",
                               Unit = "unit"
                           },
                           ReturnData = false
                       } },
                       Namespace = "namespace",
                       Statistic = "statistic",
                       Unit = "unit"
                   };

      Properties

      Dimensions

      The dimensions of the metric.

      public object? Dimensions { get; set; }
      Property Value

      object

      Remarks

      Conditional: If you published your metric with dimensions, you must specify the same dimensions in your scaling policy.

      See: http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-properties-applicationautoscaling-scalingpolicy-customizedmetricspecification.html#cfn-applicationautoscaling-scalingpolicy-customizedmetricspecification-dimensions

      Type union: either IResolvable or (either IResolvable or CfnScalingPolicyPropsMixin.IMetricDimensionProperty)[]

      MetricName

      The name of the metric.

      public string? MetricName { get; set; }
      Property Value

      string

      Remarks

      To get the exact metric name, namespace, and dimensions, inspect the Metric object that's returned by a call to ListMetrics .

      See: http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-properties-applicationautoscaling-scalingpolicy-customizedmetricspecification.html#cfn-applicationautoscaling-scalingpolicy-customizedmetricspecification-metricname

      Metrics

      The metrics to include in the target tracking scaling policy, as a metric data query.

      public object? Metrics { get; set; }
      Property Value

      object

      Remarks

      This can include both raw metric and metric math expressions.

      See: http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-properties-applicationautoscaling-scalingpolicy-customizedmetricspecification.html#cfn-applicationautoscaling-scalingpolicy-customizedmetricspecification-metrics

      Type union: either IResolvable or (either IResolvable or CfnScalingPolicyPropsMixin.ITargetTrackingMetricDataQueryProperty)[]

      Namespace

      The namespace of the metric.

      public string? Namespace { get; set; }
      Property Value

      string

      Remarks

      See: http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-properties-applicationautoscaling-scalingpolicy-customizedmetricspecification.html#cfn-applicationautoscaling-scalingpolicy-customizedmetricspecification-namespace

      Statistic

      The statistic of the metric.

      public string? Statistic { get; set; }
      Property Value

      string

      Remarks

      See: http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-properties-applicationautoscaling-scalingpolicy-customizedmetricspecification.html#cfn-applicationautoscaling-scalingpolicy-customizedmetricspecification-statistic

      Unit

      The unit of the metric.

      public string? Unit { get; set; }
      Property Value

      string

      Remarks

      For a complete list of the units that CloudWatch supports, see the MetricDatum data type in the Amazon CloudWatch API Reference .

      See: http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-properties-applicationautoscaling-scalingpolicy-customizedmetricspecification.html#cfn-applicationautoscaling-scalingpolicy-customizedmetricspecification-unit

      Implements

      CfnScalingPolicyPropsMixin.ICustomizedMetricSpecificationProperty
      Back to top Generated by DocFX