Interface IAutoScalingGroup
- Namespace
- Amazon.CDK.AWS.AutoScaling
- Assembly
- Amazon.CDK.AWS.AutoScaling.dll
An AutoScalingGroup.
public interface IAutoScalingGroup : IResource, IConstruct, IConstruct, IDependable, IGrantable
Properties
AutoScalingGroupArn
The arn of the AutoScalingGroup.
string AutoScalingGroupArn { get; }
Property Value
Remarks
Attribute: true
AutoScalingGroupName
The name of the AutoScalingGroup.
string AutoScalingGroupName { get; }
Property Value
Remarks
Attribute: true
OsType
The operating system family that the instances in this auto-scaling group belong to.
OperatingSystemType OsType { get; }
Property Value
- OperatingSystemType
Remarks
Is 'UNKNOWN' for imported ASGs.
Methods
AddLifecycleHook(string, IBasicLifecycleHookProps)
Send a message to either an SQS queue or SNS topic when instances launch or terminate.
LifecycleHook AddLifecycleHook(string id, IBasicLifecycleHookProps props)
Parameters
id
stringprops
IBasicLifecycleHookProps
Returns
AddUserData(params string[])
Add command to the startup script of fleet instances.
void AddUserData(params string[] commands)
Parameters
commands
string[]
Remarks
The command must be in the scripting language supported by the fleet's OS (i.e. Linux/Windows). Does nothing for imported ASGs.
AddWarmPool(IWarmPoolOptions?)
Add a pool of pre-initialized EC2 instances that sits alongside an Auto Scaling group.
WarmPool AddWarmPool(IWarmPoolOptions? options = null)
Parameters
options
IWarmPoolOptions
Returns
ScaleOnCpuUtilization(string, ICpuUtilizationScalingProps)
Scale out or in to achieve a target CPU utilization.
TargetTrackingScalingPolicy ScaleOnCpuUtilization(string id, ICpuUtilizationScalingProps props)
Parameters
id
stringprops
ICpuUtilizationScalingProps
Returns
ScaleOnIncomingBytes(string, INetworkUtilizationScalingProps)
Scale out or in to achieve a target network ingress rate.
TargetTrackingScalingPolicy ScaleOnIncomingBytes(string id, INetworkUtilizationScalingProps props)
Parameters
id
stringprops
INetworkUtilizationScalingProps
Returns
ScaleOnMetric(string, IBasicStepScalingPolicyProps)
Scale out or in, in response to a metric.
StepScalingPolicy ScaleOnMetric(string id, IBasicStepScalingPolicyProps props)
Parameters
id
stringprops
IBasicStepScalingPolicyProps
Returns
ScaleOnOutgoingBytes(string, INetworkUtilizationScalingProps)
Scale out or in to achieve a target network egress rate.
TargetTrackingScalingPolicy ScaleOnOutgoingBytes(string id, INetworkUtilizationScalingProps props)
Parameters
id
stringprops
INetworkUtilizationScalingProps
Returns
ScaleOnSchedule(string, IBasicScheduledActionProps)
Scale out or in based on time.
ScheduledAction ScaleOnSchedule(string id, IBasicScheduledActionProps props)
Parameters
id
stringprops
IBasicScheduledActionProps
Returns
ScaleToTrackMetric(string, IMetricTargetTrackingProps)
Scale out or in in order to keep a metric around a target value.
TargetTrackingScalingPolicy ScaleToTrackMetric(string id, IMetricTargetTrackingProps props)
Parameters
id
stringprops
IMetricTargetTrackingProps