class CfnLaunchConfigurationPropsMixin
| Language | Type name |
|---|---|
.NET | Amazon.CDK.Mixins.Preview.AWS.AutoScaling.Mixins.CfnLaunchConfigurationPropsMixin |
Go | github.com/aws/aws-cdk-go/awscdkmixinspreview/v2/awsautoscaling/mixins#CfnLaunchConfigurationPropsMixin |
Java | software.amazon.awscdk.mixins.preview.services.autoscaling.mixins.CfnLaunchConfigurationPropsMixin |
Python | aws_cdk.mixins_preview.aws_autoscaling.mixins.CfnLaunchConfigurationPropsMixin |
TypeScript | @aws-cdk/mixins-preview » aws_autoscaling » mixins » CfnLaunchConfigurationPropsMixin |
Implements
IMixin
Extends
Mixin
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 { mixins } from '@aws-cdk/mixins-preview';
import { mixins as autoscaling_mixins } from '@aws-cdk/mixins-preview/aws-autoscaling';
const cfnLaunchConfigurationPropsMixin = new autoscaling_mixins.CfnLaunchConfigurationPropsMixin({
associatePublicIpAddress: false,
blockDeviceMappings: [{
deviceName: 'deviceName',
ebs: {
deleteOnTermination: false,
encrypted: false,
iops: 123,
snapshotId: 'snapshotId',
throughput: 123,
volumeSize: 123,
volumeType: 'volumeType',
},
noDevice: false,
virtualName: 'virtualName',
}],
classicLinkVpcId: 'classicLinkVpcId',
classicLinkVpcSecurityGroups: ['classicLinkVpcSecurityGroups'],
ebsOptimized: false,
iamInstanceProfile: 'iamInstanceProfile',
imageId: 'imageId',
instanceId: 'instanceId',
instanceMonitoring: false,
instanceType: 'instanceType',
kernelId: 'kernelId',
keyName: 'keyName',
launchConfigurationName: 'launchConfigurationName',
metadataOptions: {
httpEndpoint: 'httpEndpoint',
httpPutResponseHopLimit: 123,
httpTokens: 'httpTokens',
},
placementTenancy: 'placementTenancy',
ramDiskId: 'ramDiskId',
securityGroups: ['securityGroups'],
spotPrice: 'spotPrice',
userData: 'userData',
}, /* all optional props */ {
strategy: mixins.PropertyMergeStrategy.OVERRIDE,
});
Initializer
new CfnLaunchConfigurationPropsMixin(props: CfnLaunchConfigurationMixinProps, options?: CfnPropertyMixinOptions)
Parameters
- props
Cfn— L1 properties to apply.Launch Configuration Mixin Props - options
Cfn— Mixin options.Property Mixin Options
Create a mixin to apply properties to AWS::AutoScaling::LaunchConfiguration.
Properties
| Name | Type | Description |
|---|---|---|
| props | Cfn | |
| strategy | Property | |
| static CFN_PROPERTY_KEYS | string[] |
props
Type:
Cfn
strategy
Type:
Property
static CFN_PROPERTY_KEYS
Type:
string[]
Methods
| Name | Description |
|---|---|
| apply | Apply the mixin properties to the construct. |
| supports(construct) | Check if this mixin supports the given construct. |
applyTo(construct)
public applyTo(construct: IConstruct): IConstruct
Parameters
- construct
IConstruct
Returns
Apply the mixin properties to the construct.
supports(construct)
public supports(construct: IConstruct): boolean
Parameters
- construct
IConstruct
Returns
boolean
Check if this mixin supports the given construct.

.NET
Go
Java
Python
TypeScript