@Generated(value="jsii-pacmak/1.67.0 (build 2c027f5)", date="2022-09-19T20:26:36.722Z") @Stability(value=Stable) public interface AutoScalingGroupProps extends software.amazon.jsii.JsiiSerializable, CommonAutoScalingGroupProps
Example:
Vpc vpc;
InstanceType instanceType;
IMachineImage machineImage;
AutoScalingGroup.Builder.create(this, "ASG")
.vpc(vpc)
.instanceType(instanceType)
.machineImage(machineImage)
// ...
.init(CloudFormationInit.fromElements(InitFile.fromString("/etc/my_instance", "This got written during instance startup")))
.signals(Signals.waitForAll(SignalsOptions.builder()
.timeout(Duration.minutes(10))
.build()))
.build();
| Modifier and Type | Interface and Description |
|---|---|
static class |
AutoScalingGroupProps.Builder
A builder for
AutoScalingGroupProps |
static class |
AutoScalingGroupProps.Jsii$Proxy
An implementation for
AutoScalingGroupProps |
| Modifier and Type | Method and Description |
|---|---|
static AutoScalingGroupProps.Builder |
builder() |
default CloudFormationInit |
getInit()
Apply the given CloudFormation Init configuration to the instances in the AutoScalingGroup at startup.
|
default ApplyCloudFormationInitOptions |
getInitOptions()
Use the given options for applying CloudFormation Init.
|
default InstanceType |
getInstanceType()
Type of instance to launch.
|
default ILaunchTemplate |
getLaunchTemplate()
Launch template to use.
|
default IMachineImage |
getMachineImage()
AMI to launch.
|
default MixedInstancesPolicy |
getMixedInstancesPolicy()
Mixed Instances Policy to use.
|
default Boolean |
getRequireImdsv2()
Whether IMDSv2 should be required on launched instances.
|
default IRole |
getRole()
An IAM role to associate with the instance profile assigned to this Auto Scaling Group.
|
default ISecurityGroup |
getSecurityGroup()
Security group to launch the instances in.
|
default UserData |
getUserData()
Specific UserData to use.
|
IVpc |
getVpc()
VPC to launch these instances in.
|
getAllowAllOutbound, getAssociatePublicIpAddress, getAutoScalingGroupName, getBlockDevices, getCooldown, getDesiredCapacity, getGroupMetrics, getHealthCheck, getIgnoreUnmodifiedSizeProperties, getInstanceMonitoring, getKeyName, getMaxCapacity, getMaxInstanceLifetime, getMinCapacity, getNewInstancesProtectedFromScaleIn, getNotifications, getSignals, getSpotPrice, getTerminationPolicies, getUpdatePolicy, getVpcSubnets@Stability(value=Stable) @NotNull IVpc getVpc()
@Stability(value=Stable) @Nullable default CloudFormationInit getInit()
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
@Stability(value=Stable) @Nullable default ApplyCloudFormationInitOptions getInitOptions()
Describes the configsets to use and the timeout to wait
Default: - default options
@Stability(value=Stable) @Nullable default InstanceType getInstanceType()
launchTemplate and mixedInstancesPolicy must not be specified when this property is specified
Default: - Do not provide any instance type
@Stability(value=Stable) @Nullable default ILaunchTemplate getLaunchTemplate()
Launch configuration related settings and MixedInstancesPolicy must not be specified when a launch template is specified.
Default: - Do not provide any launch template
@Stability(value=Stable) @Nullable default IMachineImage getMachineImage()
launchTemplate and mixedInstancesPolicy must not be specified when this property is specified
Default: - Do not provide any machine image
@Stability(value=Stable) @Nullable default MixedInstancesPolicy getMixedInstancesPolicy()
Launch configuration related settings and Launch Template must not be specified when a MixedInstancesPolicy is specified.
Default: - Do not provide any MixedInstancesPolicy
@Stability(value=Stable) @Nullable default Boolean getRequireImdsv2()
Default: false
@Stability(value=Stable) @Nullable default IRole getRole()
The role must be assumable by the service principal ec2.amazonaws.com:
launchTemplate and mixedInstancesPolicy must not be specified when this property is specified
Default: A role will automatically be created, it can be accessed via the `role` property
Example:
Role role = Role.Builder.create(this, "MyRole")
.assumedBy(new ServicePrincipal("ec2.amazonaws.com"))
.build();
@Stability(value=Stable) @Nullable default ISecurityGroup getSecurityGroup()
launchTemplate and mixedInstancesPolicy must not be specified when this property is specified
Default: - A SecurityGroup will be created if none is specified.
@Stability(value=Stable) @Nullable default UserData getUserData()
The UserData may still be mutated after creation.
launchTemplate and mixedInstancesPolicy must not be specified when this property is specified
Default: - A UserData object appropriate for the MachineImage's Operating System is created.
@Stability(value=Stable) static AutoScalingGroupProps.Builder builder()
builder in interface CommonAutoScalingGroupPropsAutoScalingGroupProps.Builder of AutoScalingGroupPropsCopyright © 2022. All rights reserved.