Show / Hide Table of Contents

Class CfnScalingPolicy

The AWS::AutoScaling::ScalingPolicy resource specifies an Amazon EC2 Auto Scaling scaling policy so that the Auto Scaling group can scale the number of instances available for your application.

Inheritance
object
CfnElement
CfnRefElement
CfnResource
CfnScalingPolicy
Implements
IInspectable
Inherited Members
CfnResource.IsCfnResource(object)
CfnResource.AddDeletionOverride(string)
CfnResource.AddDependency(CfnResource)
CfnResource.AddDependsOn(CfnResource)
CfnResource.AddMetadata(string, object)
CfnResource.AddOverride(string, object)
CfnResource.AddPropertyDeletionOverride(string)
CfnResource.AddPropertyOverride(string, object)
CfnResource.ApplyRemovalPolicy(RemovalPolicy?, IRemovalPolicyOptions)
CfnResource.GetAtt(string, ResolutionTypeHint?)
CfnResource.GetMetadata(string)
CfnResource.ObtainDependencies()
CfnResource.ObtainResourceDependencies()
CfnResource.RemoveDependency(CfnResource)
CfnResource.ReplaceDependency(CfnResource, CfnResource)
CfnResource.ShouldSynthesize()
CfnResource.ToString()
CfnResource.ValidateProperties(object)
CfnResource.CfnOptions
CfnResource.CfnResourceType
CfnResource.UpdatedProperites
CfnResource.UpdatedProperties
CfnRefElement.Ref
CfnElement.IsCfnElement(object)
CfnElement.OverrideLogicalId(string)
CfnElement.CreationStack
CfnElement.LogicalId
CfnElement.Stack
Namespace: Amazon.CDK.AWS.AutoScaling
Assembly: Amazon.CDK.Lib.dll
Syntax (csharp)
public class CfnScalingPolicy : CfnResource, IInspectable
Syntax (vb)
Public Class CfnScalingPolicy Inherits CfnResource Implements IInspectable
Remarks

For more information about using scaling policies to scale your Auto Scaling group automatically, see Dynamic scaling and Predictive scaling in the Amazon EC2 Auto Scaling User Guide .

See: http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-resource-autoscaling-scalingpolicy.html

CloudformationResource: AWS::AutoScaling::ScalingPolicy

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.AWS.AutoScaling;

             var cfnScalingPolicy = new CfnScalingPolicy(this, "MyCfnScalingPolicy", new CfnScalingPolicyProps {
                 AutoScalingGroupName = "autoScalingGroupName",

                 // the properties below are optional
                 AdjustmentType = "adjustmentType",
                 Cooldown = "cooldown",
                 EstimatedInstanceWarmup = 123,
                 MetricAggregationType = "metricAggregationType",
                 MinAdjustmentMagnitude = 123,
                 PolicyType = "policyType",
                 PredictiveScalingConfiguration = new PredictiveScalingConfigurationProperty {
                     MetricSpecifications = new [] { 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"
                         }
                     } },

                     // the properties below are optional
                     MaxCapacityBreachBehavior = "maxCapacityBreachBehavior",
                     MaxCapacityBuffer = 123,
                     Mode = "mode",
                     SchedulingBufferTime = 123
                 },
                 ScalingAdjustment = 123,
                 StepAdjustments = new [] { new StepAdjustmentProperty {
                     ScalingAdjustment = 123,

                     // the properties below are optional
                     MetricIntervalLowerBound = 123,
                     MetricIntervalUpperBound = 123
                 } },
                 TargetTrackingConfiguration = new TargetTrackingConfigurationProperty {
                     TargetValue = 123,

                     // the properties below are optional
                     CustomizedMetricSpecification = new CustomizedMetricSpecificationProperty {
                         Dimensions = new [] { new MetricDimensionProperty {
                             Name = "name",
                             Value = "value"
                         } },
                         MetricName = "metricName",
                         Metrics = new [] { new TargetTrackingMetricDataQueryProperty {
                             Id = "id",

                             // the properties below are optional
                             Expression = "expression",
                             Label = "label",
                             MetricStat = new TargetTrackingMetricStatProperty {
                                 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
                                 Period = 123,
                                 Unit = "unit"
                             },
                             Period = 123,
                             ReturnData = false
                         } },
                         Namespace = "namespace",
                         Period = 123,
                         Statistic = "statistic",
                         Unit = "unit"
                     },
                     DisableScaleIn = false,
                     PredefinedMetricSpecification = new PredefinedMetricSpecificationProperty {
                         PredefinedMetricType = "predefinedMetricType",

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

Synopsis

Constructors

CfnScalingPolicy(Construct, string, ICfnScalingPolicyProps)

The AWS::AutoScaling::ScalingPolicy resource specifies an Amazon EC2 Auto Scaling scaling policy so that the Auto Scaling group can scale the number of instances available for your application.

Properties

AdjustmentType

Specifies how the scaling adjustment is interpreted (for example, an absolute number or a percentage).

AttrArn

Returns the ARN of a scaling policy.

AttrPolicyName

Returns the name of a scaling policy.

AutoScalingGroupName

The name of the Auto Scaling group.

CFN_RESOURCE_TYPE_NAME

The CloudFormation resource type name for this resource class.

CfnProperties

The AWS::AutoScaling::ScalingPolicy resource specifies an Amazon EC2 Auto Scaling scaling policy so that the Auto Scaling group can scale the number of instances available for your application.

Cooldown

A cooldown period, in seconds, that applies to a specific simple scaling policy.

EstimatedInstanceWarmup

Not needed if the default instance warmup is defined for the group..

MetricAggregationType

The aggregation type for the CloudWatch metrics.

MinAdjustmentMagnitude

The minimum value to scale by when the adjustment type is PercentChangeInCapacity .

PolicyType

One of the following policy types:.

PredictiveScalingConfiguration

A predictive scaling policy.

ScalingAdjustment

The amount by which to scale, based on the specified adjustment type.

StepAdjustments

A set of adjustments that enable you to scale based on the size of the alarm breach.

TargetTrackingConfiguration

A target tracking scaling policy.

Methods

Inspect(TreeInspector)

Examines the CloudFormation resource and discloses attributes.

RenderProperties(IDictionary<string, object>)

The AWS::AutoScaling::ScalingPolicy resource specifies an Amazon EC2 Auto Scaling scaling policy so that the Auto Scaling group can scale the number of instances available for your application.

Constructors

CfnScalingPolicy(Construct, string, ICfnScalingPolicyProps)

The AWS::AutoScaling::ScalingPolicy resource specifies an Amazon EC2 Auto Scaling scaling policy so that the Auto Scaling group can scale the number of instances available for your application.

public CfnScalingPolicy(Construct scope, string id, ICfnScalingPolicyProps props)
Parameters
scope Construct

Scope in which this resource is defined.

id string

Construct identifier for this resource (unique in its scope).

props ICfnScalingPolicyProps

Resource properties.

Remarks

For more information about using scaling policies to scale your Auto Scaling group automatically, see Dynamic scaling and Predictive scaling in the Amazon EC2 Auto Scaling User Guide .

See: http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-resource-autoscaling-scalingpolicy.html

CloudformationResource: AWS::AutoScaling::ScalingPolicy

ExampleMetadata: fixture=_generated

Properties

AdjustmentType

Specifies how the scaling adjustment is interpreted (for example, an absolute number or a percentage).

public virtual string? AdjustmentType { get; set; }
Property Value

string

Remarks

For more information about using scaling policies to scale your Auto Scaling group automatically, see Dynamic scaling and Predictive scaling in the Amazon EC2 Auto Scaling User Guide .

See: http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-resource-autoscaling-scalingpolicy.html

CloudformationResource: AWS::AutoScaling::ScalingPolicy

ExampleMetadata: fixture=_generated

AttrArn

Returns the ARN of a scaling policy.

public virtual string AttrArn { get; }
Property Value

string

Remarks

CloudformationAttribute: Arn

AttrPolicyName

Returns the name of a scaling policy.

public virtual string AttrPolicyName { get; }
Property Value

string

Remarks

CloudformationAttribute: PolicyName

AutoScalingGroupName

The name of the Auto Scaling group.

public virtual string AutoScalingGroupName { get; set; }
Property Value

string

Remarks

For more information about using scaling policies to scale your Auto Scaling group automatically, see Dynamic scaling and Predictive scaling in the Amazon EC2 Auto Scaling User Guide .

See: http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-resource-autoscaling-scalingpolicy.html

CloudformationResource: AWS::AutoScaling::ScalingPolicy

ExampleMetadata: fixture=_generated

CFN_RESOURCE_TYPE_NAME

The CloudFormation resource type name for this resource class.

public static string CFN_RESOURCE_TYPE_NAME { get; }
Property Value

string

Remarks

For more information about using scaling policies to scale your Auto Scaling group automatically, see Dynamic scaling and Predictive scaling in the Amazon EC2 Auto Scaling User Guide .

See: http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-resource-autoscaling-scalingpolicy.html

CloudformationResource: AWS::AutoScaling::ScalingPolicy

ExampleMetadata: fixture=_generated

CfnProperties

The AWS::AutoScaling::ScalingPolicy resource specifies an Amazon EC2 Auto Scaling scaling policy so that the Auto Scaling group can scale the number of instances available for your application.

protected override IDictionary<string, object> CfnProperties { get; }
Property Value

IDictionary<string, object>

Overrides
CfnResource.CfnProperties
Remarks

For more information about using scaling policies to scale your Auto Scaling group automatically, see Dynamic scaling and Predictive scaling in the Amazon EC2 Auto Scaling User Guide .

See: http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-resource-autoscaling-scalingpolicy.html

CloudformationResource: AWS::AutoScaling::ScalingPolicy

ExampleMetadata: fixture=_generated

Cooldown

A cooldown period, in seconds, that applies to a specific simple scaling policy.

public virtual string? Cooldown { get; set; }
Property Value

string

Remarks

For more information about using scaling policies to scale your Auto Scaling group automatically, see Dynamic scaling and Predictive scaling in the Amazon EC2 Auto Scaling User Guide .

See: http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-resource-autoscaling-scalingpolicy.html

CloudformationResource: AWS::AutoScaling::ScalingPolicy

ExampleMetadata: fixture=_generated

EstimatedInstanceWarmup

Not needed if the default instance warmup is defined for the group..

public virtual double? EstimatedInstanceWarmup { get; set; }
Property Value

double?

Remarks

For more information about using scaling policies to scale your Auto Scaling group automatically, see Dynamic scaling and Predictive scaling in the Amazon EC2 Auto Scaling User Guide .

See: http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-resource-autoscaling-scalingpolicy.html

CloudformationResource: AWS::AutoScaling::ScalingPolicy

ExampleMetadata: fixture=_generated

MetricAggregationType

The aggregation type for the CloudWatch metrics.

public virtual string? MetricAggregationType { get; set; }
Property Value

string

Remarks

For more information about using scaling policies to scale your Auto Scaling group automatically, see Dynamic scaling and Predictive scaling in the Amazon EC2 Auto Scaling User Guide .

See: http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-resource-autoscaling-scalingpolicy.html

CloudformationResource: AWS::AutoScaling::ScalingPolicy

ExampleMetadata: fixture=_generated

MinAdjustmentMagnitude

The minimum value to scale by when the adjustment type is PercentChangeInCapacity .

public virtual double? MinAdjustmentMagnitude { get; set; }
Property Value

double?

Remarks

For more information about using scaling policies to scale your Auto Scaling group automatically, see Dynamic scaling and Predictive scaling in the Amazon EC2 Auto Scaling User Guide .

See: http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-resource-autoscaling-scalingpolicy.html

CloudformationResource: AWS::AutoScaling::ScalingPolicy

ExampleMetadata: fixture=_generated

PolicyType

One of the following policy types:.

public virtual string? PolicyType { get; set; }
Property Value

string

Remarks

For more information about using scaling policies to scale your Auto Scaling group automatically, see Dynamic scaling and Predictive scaling in the Amazon EC2 Auto Scaling User Guide .

See: http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-resource-autoscaling-scalingpolicy.html

CloudformationResource: AWS::AutoScaling::ScalingPolicy

ExampleMetadata: fixture=_generated

PredictiveScalingConfiguration

A predictive scaling policy.

public virtual object? PredictiveScalingConfiguration { get; set; }
Property Value

object

Remarks

Provides support for predefined and custom metrics.

ScalingAdjustment

The amount by which to scale, based on the specified adjustment type.

public virtual double? ScalingAdjustment { get; set; }
Property Value

double?

Remarks

For more information about using scaling policies to scale your Auto Scaling group automatically, see Dynamic scaling and Predictive scaling in the Amazon EC2 Auto Scaling User Guide .

See: http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-resource-autoscaling-scalingpolicy.html

CloudformationResource: AWS::AutoScaling::ScalingPolicy

ExampleMetadata: fixture=_generated

StepAdjustments

A set of adjustments that enable you to scale based on the size of the alarm breach.

public virtual object? StepAdjustments { get; set; }
Property Value

object

Remarks

For more information about using scaling policies to scale your Auto Scaling group automatically, see Dynamic scaling and Predictive scaling in the Amazon EC2 Auto Scaling User Guide .

See: http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-resource-autoscaling-scalingpolicy.html

CloudformationResource: AWS::AutoScaling::ScalingPolicy

ExampleMetadata: fixture=_generated

TargetTrackingConfiguration

A target tracking scaling policy.

public virtual object? TargetTrackingConfiguration { get; set; }
Property Value

object

Remarks

Provides support for predefined or custom metrics.

Methods

Inspect(TreeInspector)

Examines the CloudFormation resource and discloses attributes.

public virtual void Inspect(TreeInspector inspector)
Parameters
inspector TreeInspector

tree inspector to collect and process attributes.

Remarks

For more information about using scaling policies to scale your Auto Scaling group automatically, see Dynamic scaling and Predictive scaling in the Amazon EC2 Auto Scaling User Guide .

See: http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-resource-autoscaling-scalingpolicy.html

CloudformationResource: AWS::AutoScaling::ScalingPolicy

ExampleMetadata: fixture=_generated

RenderProperties(IDictionary<string, object>)

The AWS::AutoScaling::ScalingPolicy resource specifies an Amazon EC2 Auto Scaling scaling policy so that the Auto Scaling group can scale the number of instances available for your application.

protected override IDictionary<string, object> RenderProperties(IDictionary<string, object> props)
Parameters
props IDictionary<string, object>
Returns

IDictionary<string, object>

Overrides
CfnResource.RenderProperties(IDictionary<string, object>)
Remarks

For more information about using scaling policies to scale your Auto Scaling group automatically, see Dynamic scaling and Predictive scaling in the Amazon EC2 Auto Scaling User Guide .

See: http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-resource-autoscaling-scalingpolicy.html

CloudformationResource: AWS::AutoScaling::ScalingPolicy

ExampleMetadata: fixture=_generated

Implements

IInspectable
Back to top Generated by DocFX