Interface IAutoScalingGroup
An AutoScalingGroup.
Inherited Members
Namespace: Amazon.CDK.AWS.AutoScaling
Assembly: Amazon.CDK.AWS.AutoScaling.dll
Syntax (csharp)
public interface IAutoScalingGroup : IResource, IConstruct, IDependable, IGrantable
Syntax (vb)
Public Interface IAutoScalingGroup
Inherits IResource, IConstruct, IConstruct, IDependable, IGrantable
Synopsis
Properties
AutoScalingGroupArn | The arn of the AutoScalingGroup. |
AutoScalingGroupName | The name of the AutoScalingGroup. |
OsType | The operating system family that the instances in this auto-scaling group belong to. |
Methods
AddLifecycleHook(String, IBasicLifecycleHookProps) | Send a message to either an SQS queue or SNS topic when instances launch or terminate. |
AddUserData(String[]) | Add command to the startup script of fleet instances. |
AddWarmPool(IWarmPoolOptions) | Add a pool of pre-initialized EC2 instances that sits alongside an Auto Scaling group. |
ScaleOnCpuUtilization(String, ICpuUtilizationScalingProps) | Scale out or in to achieve a target CPU utilization. |
ScaleOnIncomingBytes(String, INetworkUtilizationScalingProps) | Scale out or in to achieve a target network ingress rate. |
ScaleOnMetric(String, IBasicStepScalingPolicyProps) | Scale out or in, in response to a metric. |
ScaleOnOutgoingBytes(String, INetworkUtilizationScalingProps) | Scale out or in to achieve a target network egress rate. |
ScaleOnSchedule(String, IBasicScheduledActionProps) | Scale out or in based on time. |
ScaleToTrackMetric(String, IMetricTargetTrackingProps) | Scale out or in in order to keep a metric around a target value. |
Properties
AutoScalingGroupArn
The arn of the AutoScalingGroup.
string AutoScalingGroupArn { get; }
Property Value
System.String
Remarks
Attribute: true
AutoScalingGroupName
The name of the AutoScalingGroup.
string AutoScalingGroupName { get; }
Property Value
System.String
Remarks
Attribute: true
OsType
The operating system family that the instances in this auto-scaling group belong to.
OperatingSystemType OsType { get; }
Property Value
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 System.String
- props IBasicLifecycleHookProps
Returns
AddUserData(String[])
Add command to the startup script of fleet instances.
void AddUserData(params string[] commands)
Parameters
- commands System.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 System.String
- props ICpuUtilizationScalingProps
Returns
ScaleOnIncomingBytes(String, INetworkUtilizationScalingProps)
Scale out or in to achieve a target network ingress rate.
TargetTrackingScalingPolicy ScaleOnIncomingBytes(string id, INetworkUtilizationScalingProps props)
Parameters
- id System.String
- props INetworkUtilizationScalingProps
Returns
ScaleOnMetric(String, IBasicStepScalingPolicyProps)
Scale out or in, in response to a metric.
StepScalingPolicy ScaleOnMetric(string id, IBasicStepScalingPolicyProps props)
Parameters
- id System.String
- props IBasicStepScalingPolicyProps
Returns
ScaleOnOutgoingBytes(String, INetworkUtilizationScalingProps)
Scale out or in to achieve a target network egress rate.
TargetTrackingScalingPolicy ScaleOnOutgoingBytes(string id, INetworkUtilizationScalingProps props)
Parameters
- id System.String
- props INetworkUtilizationScalingProps
Returns
ScaleOnSchedule(String, IBasicScheduledActionProps)
Scale out or in based on time.
ScheduledAction ScaleOnSchedule(string id, IBasicScheduledActionProps props)
Parameters
- id System.String
- props 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 System.String
- props IMetricTargetTrackingProps
Returns