Show / Hide Table of Contents

Class EnableScalingProps

Properties for enabling Application Auto Scaling.

Inheritance
System.Object
EnableScalingProps
Implements
IEnableScalingProps
Namespace: Amazon.CDK.AWS.ApplicationAutoScaling
Assembly: Amazon.CDK.AWS.ApplicationAutoScaling.dll
Syntax (csharp)
public class EnableScalingProps : Object, IEnableScalingProps
Syntax (vb)
Public Class EnableScalingProps
    Inherits Object
    Implements 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

Constructors

EnableScalingProps()

Properties

MaxCapacity

Maximum capacity to scale to.

MinCapacity

Minimum capacity to scale to.

Constructors

EnableScalingProps()

public EnableScalingProps()

Properties

MaxCapacity

Maximum capacity to scale to.

public double MaxCapacity { get; set; }
Property Value

System.Double

MinCapacity

Minimum capacity to scale to.

public Nullable<double> MinCapacity { get; set; }
Property Value

System.Nullable<System.Double>

Remarks

Default: 1

Implements

IEnableScalingProps
Back to top Generated by DocFX