Show / Hide Table of Contents

Class CpuUtilizationScalingProps

The properties for enabling scaling based on CPU utilization.

Inheritance
System.Object
CpuUtilizationScalingProps
Implements
ICpuUtilizationScalingProps
IBaseTargetTrackingProps
Namespace: Amazon.CDK.AWS.ECS
Assembly: Amazon.CDK.AWS.ECS.dll
Syntax (csharp)
public class CpuUtilizationScalingProps : Object, ICpuUtilizationScalingProps, IBaseTargetTrackingProps
Syntax (vb)
Public Class CpuUtilizationScalingProps
    Inherits Object
    Implements ICpuUtilizationScalingProps, IBaseTargetTrackingProps
Remarks

ExampleMetadata: infused

Examples
ApplicationTargetGroup target;
BaseService service;

var scaling = service.AutoScaleTaskCount(new EnableScalingProps { MaxCapacity = 10 });
scaling.ScaleOnCpuUtilization("CpuScaling", new CpuUtilizationScalingProps {
    TargetUtilizationPercent = 50
});

scaling.ScaleOnRequestCount("RequestScaling", new RequestCountScalingProps {
    RequestsPerTarget = 10000,
    TargetGroup = target
});

Synopsis

Constructors

CpuUtilizationScalingProps()

Properties

DisableScaleIn

Indicates whether scale in by the target tracking policy is disabled.

PolicyName

A name for the scaling policy.

ScaleInCooldown

Period after a scale in activity completes before another scale in activity can start.

ScaleOutCooldown

Period after a scale out activity completes before another scale out activity can start.

TargetUtilizationPercent

The target value for CPU utilization across all tasks in the service.

Constructors

CpuUtilizationScalingProps()

public CpuUtilizationScalingProps()

Properties

DisableScaleIn

Indicates whether scale in by the target tracking policy is disabled.

public Nullable<bool> DisableScaleIn { get; set; }
Property Value

System.Nullable<System.Boolean>

Remarks

If the value is true, scale in is disabled and the target tracking policy won't remove capacity from the scalable resource. Otherwise, scale in is enabled and the target tracking policy can remove capacity from the scalable resource.

Default: false

PolicyName

A name for the scaling policy.

public string PolicyName { get; set; }
Property Value

System.String

Remarks

Default: - Automatically generated name.

ScaleInCooldown

Period after a scale in activity completes before another scale in activity can start.

public Duration ScaleInCooldown { get; set; }
Property Value

Duration

Remarks

Default: Duration.seconds(300) for the following scalable targets: ECS services, Spot Fleet requests, EMR clusters, AppStream 2.0 fleets, Aurora DB clusters, Amazon SageMaker endpoint variants, Custom resources. For all other scalable targets, the default value is Duration.seconds(0): DynamoDB tables, DynamoDB global secondary indexes, Amazon Comprehend document classification endpoints, Lambda provisioned concurrency

ScaleOutCooldown

Period after a scale out activity completes before another scale out activity can start.

public Duration ScaleOutCooldown { get; set; }
Property Value

Duration

Remarks

Default: Duration.seconds(300) for the following scalable targets: ECS services, Spot Fleet requests, EMR clusters, AppStream 2.0 fleets, Aurora DB clusters, Amazon SageMaker endpoint variants, Custom resources. For all other scalable targets, the default value is Duration.seconds(0): DynamoDB tables, DynamoDB global secondary indexes, Amazon Comprehend document classification endpoints, Lambda provisioned concurrency

TargetUtilizationPercent

The target value for CPU utilization across all tasks in the service.

public double TargetUtilizationPercent { get; set; }
Property Value

System.Double

Implements

ICpuUtilizationScalingProps
IBaseTargetTrackingProps
Back to top Generated by DocFX