Show / Hide Table of Contents

Interface IEnableScalingProps

Properties for enabling Application Auto Scaling.

Namespace: Amazon.CDK.AWS.ApplicationAutoScaling
Assembly: Amazon.CDK.AWS.ApplicationAutoScaling.dll
Syntax (csharp)
public interface IEnableScalingProps
Syntax (vb)
Public Interface IEnableScalingProps
Remarks

ExampleMetadata: infused

Examples
Cluster cluster;

var loadBalancedFargateService = new ApplicationLoadBalancedFargateService(this, "Service", new ApplicationLoadBalancedFargateServiceProps {
    Cluster = cluster,
    MemoryLimitMiB = 1024,
    DesiredCount = 1,
    Cpu = 512,
    TaskImageOptions = new ApplicationLoadBalancedTaskImageOptions {
        Image = ContainerImage.FromRegistry("amazon/amazon-ecs-sample")
    }
});

var scalableTarget = loadBalancedFargateService.Service.AutoScaleTaskCount(new EnableScalingProps {
    MinCapacity = 1,
    MaxCapacity = 20
});

scalableTarget.ScaleOnCpuUtilization("CpuScaling", new CpuUtilizationScalingProps {
    TargetUtilizationPercent = 50
});

scalableTarget.ScaleOnMemoryUtilization("MemoryScaling", new MemoryUtilizationScalingProps {
    TargetUtilizationPercent = 50
});

Synopsis

Properties

MaxCapacity

Maximum capacity to scale to.

MinCapacity

Minimum capacity to scale to.

Properties

MaxCapacity

Maximum capacity to scale to.

double MaxCapacity { get; }
Property Value

System.Double

MinCapacity

Minimum capacity to scale to.

virtual Nullable<double> MinCapacity { get; }
Property Value

System.Nullable<System.Double>

Remarks

Default: 1

Back to top Generated by DocFX