Class CfnInstancePropsMixin.LaunchTemplateSpecificationProperty.Builder
java.lang.Object
software.amazon.awscdk.cfnpropertymixins.services.ec2.CfnInstancePropsMixin.LaunchTemplateSpecificationProperty.Builder
- All Implemented Interfaces:
software.amazon.jsii.Builder<CfnInstancePropsMixin.LaunchTemplateSpecificationProperty>
- Enclosing interface:
CfnInstancePropsMixin.LaunchTemplateSpecificationProperty
@Stability(Stable)
public static final class CfnInstancePropsMixin.LaunchTemplateSpecificationProperty.Builder
extends Object
implements software.amazon.jsii.Builder<CfnInstancePropsMixin.LaunchTemplateSpecificationProperty>
-
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionbuild()Builds the configured instance.launchTemplateId(String launchTemplateId) launchTemplateId(ILaunchTemplateRef launchTemplateId) launchTemplateName(String launchTemplateName) Sets the value ofCfnInstancePropsMixin.LaunchTemplateSpecificationProperty.getVersion()
-
Constructor Details
-
Builder
public Builder()
-
-
Method Details
-
launchTemplateId
@Stability(Stable) public CfnInstancePropsMixin.LaunchTemplateSpecificationProperty.Builder launchTemplateId(String launchTemplateId) - Parameters:
launchTemplateId- The ID of the launch template. You must specify either the launch template ID or the launch template name, but not both.- Returns:
this
-
launchTemplateId
@Stability(Stable) public CfnInstancePropsMixin.LaunchTemplateSpecificationProperty.Builder launchTemplateId(ILaunchTemplateRef launchTemplateId) - Parameters:
launchTemplateId- The ID of the launch template. You must specify either the launch template ID or the launch template name, but not both.- Returns:
this
-
launchTemplateName
@Stability(Stable) public CfnInstancePropsMixin.LaunchTemplateSpecificationProperty.Builder launchTemplateName(String launchTemplateName) - Parameters:
launchTemplateName- The name of the launch template. You must specify either the launch template ID or the launch template name, but not both.- Returns:
this
-
version
@Stability(Stable) public CfnInstancePropsMixin.LaunchTemplateSpecificationProperty.Builder version(String version) Sets the value ofCfnInstancePropsMixin.LaunchTemplateSpecificationProperty.getVersion()- Parameters:
version- The version number of the launch template. You must specify this property. To specify the default version of the template, use theFn::GetAttintrinsic function to retrieve theDefaultVersionNumberattribute of the launch template. To specify the latest version of the template, useFn::GetAttto retrieve theLatestVersionNumberattribute. For more information, see AWS::EC2:LaunchTemplate return values for Fn::GetAtt .- Returns:
this
-
build
Builds the configured instance.- Specified by:
buildin interfacesoftware.amazon.jsii.Builder<CfnInstancePropsMixin.LaunchTemplateSpecificationProperty>- Returns:
- a new instance of
CfnInstancePropsMixin.LaunchTemplateSpecificationProperty - Throws:
NullPointerException- if any required attribute was not provided
-