Show / Hide Table of Contents

Interface IEnableScalingProps

Properties for enabling Application Auto Scaling.

Namespace: Amazon.CDK.AWS.ApplicationAutoScaling
Assembly: Amazon.CDK.Lib.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")
                },
                MinHealthyPercent = 100
            });

            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

double

Remarks

ExampleMetadata: infused

MinCapacity

Minimum capacity to scale to.

double? MinCapacity { get; }
Property Value

double?

Remarks

Default: 1

Back to top Generated by DocFX