Class AutoScalingOptions
Properties for enabling Lambda autoscaling.
Inheritance
System.Object
AutoScalingOptions
Implements
Namespace: Amazon.CDK.AWS.Lambda
Assembly: Amazon.CDK.Lib.dll
Syntax (csharp)
public class AutoScalingOptions : Object, IAutoScalingOptions
Syntax (vb)
Public Class AutoScalingOptions
Inherits Object
Implements IAutoScalingOptions
Remarks
ExampleMetadata: infused
Examples
using Amazon.CDK.AWS.AutoScaling;
Function fn;
var alias = fn.AddAlias("prod");
// Create AutoScaling target
var as = alias.AddAutoScaling(new AutoScalingOptions { MaxCapacity = 50 });
// Configure Target Tracking
as.ScaleOnUtilization(new UtilizationScalingOptions {
UtilizationTarget = 0.5
});
// Configure Scheduled Scaling
as.ScaleOnSchedule("ScaleUpInTheMorning", new ScalingSchedule {
Schedule = Schedule.Cron(new CronOptions { Hour = "8", Minute = "0" }),
MinCapacity = 20
});
Synopsis
Constructors
AutoScalingOptions() |
Properties
MaxCapacity | Maximum capacity to scale to. |
MinCapacity | Minimum capacity to scale to. |
Constructors
AutoScalingOptions()
public AutoScalingOptions()
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