Show / Hide Table of Contents

Interface IAutoScalingGroupProps

Properties of a Fleet.

Inherited Members
ICommonAutoScalingGroupProps.AllowAllOutbound
ICommonAutoScalingGroupProps.AssociatePublicIpAddress
ICommonAutoScalingGroupProps.AutoScalingGroupName
ICommonAutoScalingGroupProps.BlockDevices
ICommonAutoScalingGroupProps.Cooldown
ICommonAutoScalingGroupProps.DesiredCapacity
ICommonAutoScalingGroupProps.GroupMetrics
ICommonAutoScalingGroupProps.HealthCheck
ICommonAutoScalingGroupProps.IgnoreUnmodifiedSizeProperties
ICommonAutoScalingGroupProps.InstanceMonitoring
ICommonAutoScalingGroupProps.KeyName
ICommonAutoScalingGroupProps.MaxCapacity
ICommonAutoScalingGroupProps.MaxInstanceLifetime
ICommonAutoScalingGroupProps.MinCapacity
ICommonAutoScalingGroupProps.NewInstancesProtectedFromScaleIn
ICommonAutoScalingGroupProps.Notifications
ICommonAutoScalingGroupProps.NotificationsTopic
ICommonAutoScalingGroupProps.ReplacingUpdateMinSuccessfulInstancesPercent
ICommonAutoScalingGroupProps.ResourceSignalCount
ICommonAutoScalingGroupProps.ResourceSignalTimeout
ICommonAutoScalingGroupProps.RollingUpdateConfiguration
ICommonAutoScalingGroupProps.Signals
ICommonAutoScalingGroupProps.SpotPrice
ICommonAutoScalingGroupProps.TerminationPolicies
ICommonAutoScalingGroupProps.UpdatePolicy
ICommonAutoScalingGroupProps.UpdateType
ICommonAutoScalingGroupProps.VpcSubnets
Namespace: Amazon.CDK.AWS.AutoScaling
Assembly: Amazon.CDK.AWS.AutoScaling.dll
Syntax (csharp)
public interface IAutoScalingGroupProps : ICommonAutoScalingGroupProps
Syntax (vb)
Public Interface IAutoScalingGroupProps
    Inherits ICommonAutoScalingGroupProps
Remarks

ExampleMetadata: infused

Examples
Vpc vpc;


var mySecurityGroup = new SecurityGroup(this, "SecurityGroup", new SecurityGroupProps { Vpc = vpc });
new AutoScalingGroup(this, "ASG", new AutoScalingGroupProps {
    Vpc = vpc,
    InstanceType = InstanceType.Of(InstanceClass.BURSTABLE2, InstanceSize.MICRO),
    MachineImage = new AmazonLinuxImage(),
    SecurityGroup = mySecurityGroup
});

Synopsis

Properties

Init

Apply the given CloudFormation Init configuration to the instances in the AutoScalingGroup at startup.

InitOptions

Use the given options for applying CloudFormation Init.

InstanceType

Type of instance to launch.

LaunchTemplate

Launch template to use.

MachineImage

AMI to launch.

MixedInstancesPolicy

Mixed Instances Policy to use.

RequireImdsv2

Whether IMDSv2 should be required on launched instances.

Role

An IAM role to associate with the instance profile assigned to this Auto Scaling Group.

SecurityGroup

Security group to launch the instances in.

UserData

Specific UserData to use.

Vpc

VPC to launch these instances in.

Properties

Init

Apply the given CloudFormation Init configuration to the instances in the AutoScalingGroup at startup.

virtual CloudFormationInit Init { get; }
Property Value

CloudFormationInit

Remarks

If you specify init, you must also specify signals to configure the number of instances to wait for and the timeout for waiting for the init process.

Default: - no CloudFormation init

InitOptions

Use the given options for applying CloudFormation Init.

virtual IApplyCloudFormationInitOptions InitOptions { get; }
Property Value

IApplyCloudFormationInitOptions

Remarks

Describes the configsets to use and the timeout to wait

Default: - default options

InstanceType

Type of instance to launch.

virtual InstanceType InstanceType { get; }
Property Value

InstanceType

Remarks

launchTemplate must not be specified when this property is specified.

Default: - Do not provide any instance type

LaunchTemplate

Launch template to use.

virtual ILaunchTemplate LaunchTemplate { get; }
Property Value

ILaunchTemplate

Remarks

Launch configuration related settings and MixedInstancesPolicy must not be specified when a launch template is specified.

Default: - Do not provide any launch template

MachineImage

AMI to launch.

virtual IMachineImage MachineImage { get; }
Property Value

IMachineImage

Remarks

launchTemplate must not be specified when this property is specified.

Default: - Do not provide any machine image

MixedInstancesPolicy

Mixed Instances Policy to use.

virtual IMixedInstancesPolicy MixedInstancesPolicy { get; }
Property Value

IMixedInstancesPolicy

Remarks

Launch configuration related settings and Launch Template must not be specified when a MixedInstancesPolicy is specified.

Default: - Do not provide any MixedInstancesPolicy

RequireImdsv2

Whether IMDSv2 should be required on launched instances.

virtual Nullable<bool> RequireImdsv2 { get; }
Property Value

System.Nullable<System.Boolean>

Remarks

Default: false

Role

An IAM role to associate with the instance profile assigned to this Auto Scaling Group.

virtual IRole Role { get; }
Property Value

IRole

Remarks

The role must be assumable by the service principal ec2.amazonaws.com:

launchTemplate must not be specified when this property is specified.

Default: A role will automatically be created, it can be accessed via the role property

Examples
var role = new Role(this, "MyRole", new RoleProps {
    AssumedBy = new ServicePrincipal("ec2.amazonaws.com")
});

SecurityGroup

Security group to launch the instances in.

virtual ISecurityGroup SecurityGroup { get; }
Property Value

ISecurityGroup

Remarks

launchTemplate must not be specified when this property is specified.

Default: - A SecurityGroup will be created if none is specified.

UserData

Specific UserData to use.

virtual UserData UserData { get; }
Property Value

UserData

Remarks

The UserData may still be mutated after creation.

launchTemplate must not be specified when this property is specified.

Default: - A UserData object appropriate for the MachineImage's Operating System is created.

Vpc

VPC to launch these instances in.

IVpc Vpc { get; }
Property Value

IVpc

Back to top Generated by DocFX