Interface ICfnScalingPolicyProps
Properties for defining a CfnScalingPolicy
.
Namespace: Amazon.CDK.AWS.ApplicationAutoScaling
Assembly: Amazon.CDK.Lib.dll
Syntax (csharp)
public interface ICfnScalingPolicyProps
Syntax (vb)
Public Interface ICfnScalingPolicyProps
Remarks
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.ApplicationAutoScaling;
var cfnScalingPolicyProps = new CfnScalingPolicyProps {
PolicyName = "policyName",
PolicyType = "policyType",
// the properties below are optional
ResourceId = "resourceId",
ScalableDimension = "scalableDimension",
ScalingTargetId = "scalingTargetId",
ServiceNamespace = "serviceNamespace",
StepScalingPolicyConfiguration = new StepScalingPolicyConfigurationProperty {
AdjustmentType = "adjustmentType",
Cooldown = 123,
MetricAggregationType = "metricAggregationType",
MinAdjustmentMagnitude = 123,
StepAdjustments = new [] { new StepAdjustmentProperty {
ScalingAdjustment = 123,
// the properties below are optional
MetricIntervalLowerBound = 123,
MetricIntervalUpperBound = 123
} }
},
TargetTrackingScalingPolicyConfiguration = new TargetTrackingScalingPolicyConfigurationProperty {
TargetValue = 123,
// the properties below are optional
CustomizedMetricSpecification = 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"
},
DisableScaleIn = false,
PredefinedMetricSpecification = new PredefinedMetricSpecificationProperty {
PredefinedMetricType = "predefinedMetricType",
// the properties below are optional
ResourceLabel = "resourceLabel"
},
ScaleInCooldown = 123,
ScaleOutCooldown = 123
}
};
Synopsis
Properties
PolicyName | The name of the scaling policy. |
PolicyType | The scaling policy type. |
ResourceId | The identifier of the resource associated with the scaling policy. |
ScalableDimension | The scalable dimension. This string consists of the service namespace, resource type, and scaling property. |
ScalingTargetId | The CloudFormation-generated ID of an Application Auto Scaling scalable target. |
ServiceNamespace | The namespace of the AWS service that provides the resource, or a |
StepScalingPolicyConfiguration | A step scaling policy. |
TargetTrackingScalingPolicyConfiguration | A target tracking scaling policy. |
Properties
PolicyName
The name of the scaling policy.
string PolicyName { get; }
Property Value
System.String
Remarks
Updates to the name of a target tracking scaling policy are not supported, unless you also update the metric used for scaling. To change only a target tracking scaling policy's name, first delete the policy by removing the existing AWS::ApplicationAutoScaling::ScalingPolicy
resource from the template and updating the stack. Then, recreate the resource with the same settings and a different name.
PolicyType
The scaling policy type.
string PolicyType { get; }
Property Value
System.String
Remarks
The following policy types are supported:
TargetTrackingScaling
—Not supported for Amazon EMR
StepScaling
—Not supported for DynamoDB, Amazon Comprehend, Lambda, Amazon Keyspaces, Amazon MSK, Amazon ElastiCache, or Neptune.
ResourceId
The identifier of the resource associated with the scaling policy.
virtual string ResourceId { get; }
Property Value
System.String
Remarks
This string consists of the resource type and unique identifier.
ScalableDimension
The scalable dimension. This string consists of the service namespace, resource type, and scaling property.
virtual string ScalableDimension { get; }
Property Value
System.String
Remarks
ScalingTargetId
The CloudFormation-generated ID of an Application Auto Scaling scalable target.
virtual string ScalingTargetId { get; }
Property Value
System.String
Remarks
For more information about the ID, see the Return Value section of the AWS::ApplicationAutoScaling::ScalableTarget
resource.
You must specify either the ScalingTargetId
property, or the ResourceId
, ScalableDimension
, and ServiceNamespace
properties, but not both.
ServiceNamespace
The namespace of the AWS service that provides the resource, or a custom-resource
.
virtual string ServiceNamespace { get; }
Property Value
System.String
Remarks
StepScalingPolicyConfiguration
A step scaling policy.
virtual object StepScalingPolicyConfiguration { get; }
Property Value
System.Object
Remarks
TargetTrackingScalingPolicyConfiguration
A target tracking scaling policy.
virtual object TargetTrackingScalingPolicyConfiguration { get; }
Property Value
System.Object