Class CfnLaunchConfigurationPropsMixin

java.lang.Object
software.amazon.jsii.JsiiObject
software.amazon.awscdk.Mixin
software.amazon.awscdk.cfnpropertymixins.services.autoscaling.CfnLaunchConfigurationPropsMixin
All Implemented Interfaces:
software.amazon.jsii.JsiiSerializable, software.constructs.IMixin

@Generated(value="jsii-pacmak/1.127.0 (build 2117ad5)", date="2026-03-11T13:19:56.168Z") @Stability(Stable) public class CfnLaunchConfigurationPropsMixin extends Mixin implements software.constructs.IMixin
The 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:
  • Field Details

    • CFN_PROPERTY_KEYS

      @Stability(Stable) protected static final List<String> 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 to AWS::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 to AWS::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.

      Specified by:
      applyTo in interface software.constructs.IMixin
      Specified by:
      applyTo in class Mixin
      Parameters:
      construct - This parameter is required.
    • supports

      @Stability(Stable) @NotNull public Boolean supports(@NotNull software.constructs.IConstruct construct)
      Check if this mixin supports the given construct.

      Specified by:
      supports in interface software.constructs.IMixin
      Overrides:
      supports in class Mixin
      Parameters:
      construct - This parameter is required.
    • getProps

      @Stability(Stable) @NotNull protected CfnLaunchConfigurationMixinProps getProps()
    • getStrategy

      @Stability(Stable) @NotNull protected IMergeStrategy getStrategy()