Class CfnInstance.LaunchTemplateSpecificationProperty.Builder
java.lang.Object
software.amazon.awscdk.services.ec2.CfnInstance.LaunchTemplateSpecificationProperty.Builder
- All Implemented Interfaces:
software.amazon.jsii.Builder<CfnInstance.LaunchTemplateSpecificationProperty>
- Enclosing interface:
- CfnInstance.LaunchTemplateSpecificationProperty
@Stability(Stable)
public static final class CfnInstance.LaunchTemplateSpecificationProperty.Builder
extends Object
implements software.amazon.jsii.Builder<CfnInstance.LaunchTemplateSpecificationProperty>
A builder for
CfnInstance.LaunchTemplateSpecificationProperty-
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionbuild()Builds the configured instance.launchTemplateId(String launchTemplateId) Sets the value ofCfnInstance.LaunchTemplateSpecificationProperty.getLaunchTemplateId()launchTemplateName(String launchTemplateName) Sets the value ofCfnInstance.LaunchTemplateSpecificationProperty.getLaunchTemplateName()Sets the value ofCfnInstance.LaunchTemplateSpecificationProperty.getVersion()
-
Constructor Details
-
Builder
public Builder()
-
-
Method Details
-
version
@Stability(Stable) public CfnInstance.LaunchTemplateSpecificationProperty.Builder version(String version) Sets the value ofCfnInstance.LaunchTemplateSpecificationProperty.getVersion()- Parameters:
version- The version number of the launch template. This parameter is required. Specifying$Latestor$Defaultfor the template version number is not supported. However, you can specifyLatestVersionNumberorDefaultVersionNumberusing theFn::GetAttintrinsic function. For more information, see Fn::GetAtt .- Returns:
this
-
launchTemplateId
@Stability(Stable) public CfnInstance.LaunchTemplateSpecificationProperty.Builder launchTemplateId(String launchTemplateId) Sets the value ofCfnInstance.LaunchTemplateSpecificationProperty.getLaunchTemplateId()- Parameters:
launchTemplateId- The ID of the launch template. You must specify theLaunchTemplateIdor theLaunchTemplateName, but not both.- Returns:
this
-
launchTemplateName
@Stability(Stable) public CfnInstance.LaunchTemplateSpecificationProperty.Builder launchTemplateName(String launchTemplateName) Sets the value ofCfnInstance.LaunchTemplateSpecificationProperty.getLaunchTemplateName()- Parameters:
launchTemplateName- The name of the launch template. You must specify theLaunchTemplateNameor theLaunchTemplateId, but not both.- Returns:
this
-
build
Builds the configured instance.- Specified by:
buildin interfacesoftware.amazon.jsii.Builder<CfnInstance.LaunchTemplateSpecificationProperty>- Returns:
- a new instance of
CfnInstance.LaunchTemplateSpecificationProperty - Throws:
NullPointerException- if any required attribute was not provided
-