Class UtilizationScalingOptions
Options for enabling Lambda utilization tracking.
Inheritance
Namespace: Amazon.CDK.AWS.Lambda
Assembly: Amazon.CDK.Lib.dll
Syntax (csharp)
public class UtilizationScalingOptions : Object, IUtilizationScalingOptions, IBaseTargetTrackingProps
Syntax (vb)
Public Class UtilizationScalingOptions
Inherits Object
Implements IUtilizationScalingOptions, IBaseTargetTrackingProps
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
UtilizationScalingOptions() |
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. |
UtilizationTarget | Utilization target for the attribute. |
Constructors
UtilizationScalingOptions()
public UtilizationScalingOptions()
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
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
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
UtilizationTarget
Utilization target for the attribute.
public double UtilizationTarget { get; set; }
Property Value
System.Double
Remarks
For example, .5 indicates that 50 percent of allocated provisioned concurrency is in use.