Class CfnLaunchConfigurationPropsMixin
- All Implemented Interfaces:
software.amazon.jsii.JsiiSerializable,software.constructs.IMixin
AWS::AutoScaling::LaunchConfiguration resource specifies the launch configuration that can be used by an Auto Scaling group to configure Amazon EC2 instances.
When you update the launch configuration for an Auto Scaling group, CloudFormation deletes that resource and creates a new launch configuration with the updated properties and a new name. Existing instances are not affected. To update existing instances when you update the AWS::AutoScaling::LaunchConfiguration resource, you can specify an UpdatePolicy attribute for the group. You can find sample update policies for rolling updates in Configure Amazon EC2 Auto Scaling resources .
Amazon EC2 Auto Scaling configures instances launched as part of an Auto Scaling group using either a launch template or a launch configuration. We strongly recommend that you do not use launch configurations. For more information, see Launch configurations in the Amazon EC2 Auto Scaling User Guide .
For help migrating from launch configurations to launch templates, see Migrate AWS CloudFormation stacks from launch configurations to launch templates in the Amazon EC2 Auto Scaling User Guide .
Example:
// The code below shows an example of how to instantiate this type.
// The values are placeholders you should change.
import software.amazon.awscdk.cfnpropertymixins.services.autoscaling.*;
import software.amazon.awscdk.*;
IMergeStrategy mergeStrategy;
CfnLaunchConfigurationPropsMixin cfnLaunchConfigurationPropsMixin = CfnLaunchConfigurationPropsMixin.Builder.create(CfnLaunchConfigurationMixinProps.builder()
.associatePublicIpAddress(false)
.blockDeviceMappings(List.of(BlockDeviceMappingProperty.builder()
.deviceName("deviceName")
.ebs(BlockDeviceProperty.builder()
.deleteOnTermination(false)
.encrypted(false)
.iops(123)
.snapshotId("snapshotId")
.throughput(123)
.volumeSize(123)
.volumeType("volumeType")
.build())
.noDevice(false)
.virtualName("virtualName")
.build()))
.classicLinkVpcId("classicLinkVpcId")
.classicLinkVpcSecurityGroups(List.of("classicLinkVpcSecurityGroups"))
.ebsOptimized(false)
.iamInstanceProfile("iamInstanceProfile")
.imageId("imageId")
.instanceId("instanceId")
.instanceMonitoring(false)
.instanceType("instanceType")
.kernelId("kernelId")
.keyName("keyName")
.launchConfigurationName("launchConfigurationName")
.metadataOptions(MetadataOptionsProperty.builder()
.httpEndpoint("httpEndpoint")
.httpPutResponseHopLimit(123)
.httpTokens("httpTokens")
.build())
.placementTenancy("placementTenancy")
.ramDiskId("ramDiskId")
.securityGroups(List.of("securityGroups"))
.spotPrice("spotPrice")
.userData("userData")
.build())
.strategy(mergeStrategy)
.build();
- See Also:
-
Nested Class Summary
Nested ClassesModifier and TypeClassDescriptionstatic interfaceBlockDeviceMappingspecifies a block device mapping for theBlockDeviceMappingsproperty of the AWS::AutoScaling::LaunchConfiguration resource.static interfaceBlockDeviceis a property of theEBSproperty of the AWS::AutoScaling::LaunchConfiguration BlockDeviceMapping property type that describes an Amazon EBS volume.static final classA fluent builder forCfnLaunchConfigurationPropsMixin.static interfaceMetadataOptionsis a property of AWS::AutoScaling::LaunchConfiguration that describes metadata options for the instances.Nested classes/interfaces inherited from class software.amazon.jsii.JsiiObject
software.amazon.jsii.JsiiObject.InitializationModeNested classes/interfaces inherited from interface software.constructs.IMixin
software.constructs.IMixin.Jsii$Default, software.constructs.IMixin.Jsii$Proxy -
Field Summary
Fields -
Constructor Summary
ConstructorsModifierConstructorDescriptionCreate a mixin to apply properties toAWS::AutoScaling::LaunchConfiguration.CfnLaunchConfigurationPropsMixin(CfnLaunchConfigurationMixinProps props, CfnPropertyMixinOptions options) Create a mixin to apply properties toAWS::AutoScaling::LaunchConfiguration.protectedCfnLaunchConfigurationPropsMixin(software.amazon.jsii.JsiiObject.InitializationMode initializationMode) protectedCfnLaunchConfigurationPropsMixin(software.amazon.jsii.JsiiObjectRef objRef) -
Method Summary
Modifier and TypeMethodDescriptionvoidapplyTo(software.constructs.IConstruct construct) Apply the mixin properties to the construct.protected CfnLaunchConfigurationMixinPropsgetProps()protected IMergeStrategysupports(software.constructs.IConstruct construct) Check if this mixin supports the given construct.Methods inherited from class software.amazon.jsii.JsiiObject
jsiiAsyncCall, jsiiAsyncCall, jsiiCall, jsiiCall, jsiiGet, jsiiGet, jsiiSet, jsiiStaticCall, jsiiStaticCall, jsiiStaticGet, jsiiStaticGet, jsiiStaticSet, jsiiStaticSetMethods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, waitMethods inherited from interface software.amazon.jsii.JsiiSerializable
$jsii$toJson
-
Field Details
-
CFN_PROPERTY_KEYS
-
-
Constructor Details
-
CfnLaunchConfigurationPropsMixin
protected CfnLaunchConfigurationPropsMixin(software.amazon.jsii.JsiiObjectRef objRef) -
CfnLaunchConfigurationPropsMixin
protected CfnLaunchConfigurationPropsMixin(software.amazon.jsii.JsiiObject.InitializationMode initializationMode) -
CfnLaunchConfigurationPropsMixin
@Stability(Stable) public CfnLaunchConfigurationPropsMixin(@NotNull CfnLaunchConfigurationMixinProps props, @Nullable CfnPropertyMixinOptions options) Create a mixin to apply properties toAWS::AutoScaling::LaunchConfiguration.- Parameters:
props- L1 properties to apply. This parameter is required.options- Mixin options.
-
CfnLaunchConfigurationPropsMixin
@Stability(Stable) public CfnLaunchConfigurationPropsMixin(@NotNull CfnLaunchConfigurationMixinProps props) Create a mixin to apply properties toAWS::AutoScaling::LaunchConfiguration.- Parameters:
props- L1 properties to apply. This parameter is required.
-
-
Method Details
-
applyTo
@Stability(Stable) public void applyTo(@NotNull software.constructs.IConstruct construct) Apply the mixin properties to the construct. -
supports
@Stability(Stable) @NotNull public Boolean supports(@NotNull software.constructs.IConstruct construct) Check if this mixin supports the given construct. -
getProps
-
getStrategy
-