Skip to content
v2.277.0

Experimental

@aws-cdk/aws-imagebuilder-alpha is an experimental (alpha) package: its API may change in any release, without a major version bump.

LaunchTemplateConfiguration Struct ​

The launch template to apply the distributed AMI to.

Example ​

ts
// The code below shows an example of how to instantiate this type.
// The values are placeholders you should change.
import * as imagebuilder_alpha from '@aws-cdk/aws-imagebuilder-alpha';
import { aws_ec2 as ec2 } from 'aws-cdk-lib';

declare const launchTemplate: ec2.LaunchTemplate;
const launchTemplateConfiguration: imagebuilder_alpha.LaunchTemplateConfiguration = {
  launchTemplate: launchTemplate,

  // the properties below are optional
  accountId: 'accountId',
  setDefaultVersion: false,
};
python
# The code below shows an example of how to instantiate this type.
# The values are placeholders you should change.
import aws_cdk.aws_imagebuilder_alpha as imagebuilder_alpha
from aws_cdk import aws_ec2 as ec2

# launch_template: ec2.LaunchTemplate

launch_template_configuration = imagebuilder_alpha.LaunchTemplateConfiguration(
    launch_template=launch_template,

    # the properties below are optional
    account_id="accountId",
    set_default_version=False
)
java
// The code below shows an example of how to instantiate this type.
// The values are placeholders you should change.
import software.amazon.awscdk.services.imagebuilder.alpha.*;
import software.amazon.awscdk.services.ec2.*;

LaunchTemplate launchTemplate;

LaunchTemplateConfiguration launchTemplateConfiguration = LaunchTemplateConfiguration.builder()
        .launchTemplate(launchTemplate)

        // the properties below are optional
        .accountId("accountId")
        .setDefaultVersion(false)
        .build();
csharp
// Install: dotnet add package Amazon.CDK.AWS.ImageBuilder.Alpha
// The code below shows an example of how to instantiate this type.
// The values are placeholders you should change.
using Amazon.CDK.AWS.ImageBuilder.Alpha;
using Amazon.CDK.AWS.EC2;

LaunchTemplate launchTemplate;

var launchTemplateConfiguration = new LaunchTemplateConfiguration {
    LaunchTemplate = launchTemplate,

    // the properties below are optional
    AccountId = "accountId",
    SetDefaultVersion = false
};
go
// Install: go get github.com/aws/aws-cdk-go/awsimagebuilderalpha/v2
// The code below shows an example of how to instantiate this type.
// The values are placeholders you should change.
import imagebuilder_alpha "github.com/aws/aws-cdk-go/awsimagebuilderalpha"
import "github.com/aws/aws-cdk-go/awscdk"

var launchTemplate LaunchTemplate

launchTemplateConfiguration := &LaunchTemplateConfiguration{
	LaunchTemplate: launchTemplate,

	// the properties below are optional
	AccountId: jsii.String("accountId"),
	SetDefaultVersion: jsii.Boolean(false),
}

Properties ​

accountIdoptionalstringaccount_idoptionalstraccountIdoptionalStringAccountIdoptionalstringAccountIdoptional*string#
The AWS account ID that owns the launch template.

Default: The current account is used

launchTemplateILaunchTemplatelaunch_templateILaunchTemplatelaunchTemplateILaunchTemplateLaunchTemplateILaunchTemplateLaunchTemplateILaunchTemplaterequired#
The launch template to apply the distributed AMI to.

A new launch template version will be created for the provided launch template with the distributed AMI applied.

Note: The launch template should expose a launchTemplateId. Templates imported by name only are not supported.

setDefaultVersionoptionalbooleanset_default_versionoptionalboolsetDefaultVersionoptionalBooleanSetDefaultVersionoptionalboolSetDefaultVersionoptional*bool= false#
Whether to set the new launch template version that is created as the default launch template version.

After creation of the launch template version containing the distributed AMI, it will be automatically set as the default version for the launch template.