Interface IScalableTargetProps
Properties for a scalable target.
Namespace: Amazon.CDK.AWS.ApplicationAutoScaling
Assembly: Amazon.CDK.Lib.dll
Syntax (csharp)
public interface IScalableTargetProps
Syntax (vb)
Public Interface IScalableTargetProps
Remarks
ExampleMetadata: infused
Examples
var shardsScalableTarget = new ScalableTarget(this, "ElastiCacheRedisShardsScalableTarget", new ScalableTargetProps {
ServiceNamespace = ServiceNamespace.ELASTICACHE,
ScalableDimension = "elasticache:replication-group:NodeGroups",
MinCapacity = 2,
MaxCapacity = 10,
ResourceId = "replication-group/main-cluster"
});
shardsScalableTarget.ScaleToTrackMetric("ElastiCacheRedisShardsCPUUtilization", new BasicTargetTrackingScalingPolicyProps {
TargetValue = 20,
PredefinedMetric = PredefinedMetric.ELASTICACHE_PRIMARY_ENGINE_CPU_UTILIZATION
});
Synopsis
Properties
MaxCapacity | The maximum value that Application Auto Scaling can use to scale a target during a scaling activity. |
MinCapacity | The minimum value that Application Auto Scaling can use to scale a target during a scaling activity. |
ResourceId | The resource identifier to associate with this scalable target. |
Role | Role that allows Application Auto Scaling to modify your scalable target. |
ScalableDimension | The scalable dimension that's associated with the scalable target. |
ServiceNamespace | The namespace of the AWS service that provides the resource or custom-resource for a resource provided by your own application or service. |
Properties
MaxCapacity
The maximum value that Application Auto Scaling can use to scale a target during a scaling activity.
double MaxCapacity { get; }
Property Value
System.Double
MinCapacity
The minimum value that Application Auto Scaling can use to scale a target during a scaling activity.
double MinCapacity { get; }
Property Value
System.Double
ResourceId
The resource identifier to associate with this scalable target.
string ResourceId { get; }
Property Value
System.String
Remarks
This string consists of the resource type and unique identifier.
Example value: service/ecsStack-MyECSCluster-AB12CDE3F4GH/ecsStack-MyECSService-AB12CDE3F4GH
See: https://docs.aws.amazon.com/autoscaling/application/APIReference/API_RegisterScalableTarget.html
Role
Role that allows Application Auto Scaling to modify your scalable target.
virtual IRole Role { get; }
Property Value
Remarks
Default: A role is automatically created
ScalableDimension
The scalable dimension that's associated with the scalable target.
string ScalableDimension { get; }
Property Value
System.String
Remarks
Specify the service namespace, resource type, and scaling property.
Example value: ecs:service:DesiredCount
See: https://docs.aws.amazon.com/autoscaling/application/APIReference/API_ScalingPolicy.html
ServiceNamespace
The namespace of the AWS service that provides the resource or custom-resource for a resource provided by your own application or service.
ServiceNamespace ServiceNamespace { get; }
Property Value
Remarks
For valid AWS service namespace values, see the RegisterScalableTarget action in the Application Auto Scaling API Reference.
See: https://docs.aws.amazon.com/autoscaling/application/APIReference/API_RegisterScalableTarget.html