Class LaunchTemplateConfiguration.Builder
java.lang.Object
software.amazon.awscdk.services.imagebuilder.alpha.LaunchTemplateConfiguration.Builder
- All Implemented Interfaces:
software.amazon.jsii.Builder<LaunchTemplateConfiguration>
- Enclosing interface:
LaunchTemplateConfiguration
@Stability(Experimental)
public static final class LaunchTemplateConfiguration.Builder
extends Object
implements software.amazon.jsii.Builder<LaunchTemplateConfiguration>
A builder for
LaunchTemplateConfiguration-
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionSets the value ofLaunchTemplateConfiguration.getAccountId()build()Builds the configured instance.launchTemplate(ILaunchTemplate launchTemplate) Sets the value ofLaunchTemplateConfiguration.getLaunchTemplate()setDefaultVersion(Boolean setDefaultVersion) Sets the value ofLaunchTemplateConfiguration.getSetDefaultVersion()
-
Constructor Details
-
Builder
public Builder()
-
-
Method Details
-
launchTemplate
@Stability(Experimental) public LaunchTemplateConfiguration.Builder launchTemplate(ILaunchTemplate launchTemplate) Sets the value ofLaunchTemplateConfiguration.getLaunchTemplate()- Parameters:
launchTemplate- The launch template to apply the distributed AMI to. This parameter is required. 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.- Returns:
this
-
accountId
Sets the value ofLaunchTemplateConfiguration.getAccountId()- Parameters:
accountId- The AWS account ID that owns the launch template.- Returns:
this
-
setDefaultVersion
@Stability(Experimental) public LaunchTemplateConfiguration.Builder setDefaultVersion(Boolean setDefaultVersion) Sets the value ofLaunchTemplateConfiguration.getSetDefaultVersion()- Parameters:
setDefaultVersion- 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.- Returns:
this
-
build
Builds the configured instance.- Specified by:
buildin interfacesoftware.amazon.jsii.Builder<LaunchTemplateConfiguration>- Returns:
- a new instance of
LaunchTemplateConfiguration - Throws:
NullPointerException- if any required attribute was not provided
-