Class CfnEC2Fleet.FleetLaunchTemplateSpecificationRequestProperty.Builder
java.lang.Object
software.amazon.awscdk.services.ec2.CfnEC2Fleet.FleetLaunchTemplateSpecificationRequestProperty.Builder
- All Implemented Interfaces:
software.amazon.jsii.Builder<CfnEC2Fleet.FleetLaunchTemplateSpecificationRequestProperty>
- Enclosing interface:
CfnEC2Fleet.FleetLaunchTemplateSpecificationRequestProperty
@Stability(Stable)
public static final class CfnEC2Fleet.FleetLaunchTemplateSpecificationRequestProperty.Builder
extends Object
implements software.amazon.jsii.Builder<CfnEC2Fleet.FleetLaunchTemplateSpecificationRequestProperty>
-
Constructor Summary
-
Method Summary
Modifier and TypeMethodDescriptionbuild()
Builds the configured instance.launchTemplateId
(String launchTemplateId) launchTemplateName
(String launchTemplateName) Sets the value ofCfnEC2Fleet.FleetLaunchTemplateSpecificationRequestProperty.getVersion()
-
Constructor Details
-
Builder
public Builder()
-
-
Method Details
-
version
@Stability(Stable) public CfnEC2Fleet.FleetLaunchTemplateSpecificationRequestProperty.Builder version(String version) Sets the value ofCfnEC2Fleet.FleetLaunchTemplateSpecificationRequestProperty.getVersion()
- Parameters:
version
- The launch template version number,$Latest
, or$Default
. You must specify a value, otherwise the request fails. This parameter is required. If the value is$Latest
, Amazon EC2 uses the latest version of the launch template.If the value is
$Default
, Amazon EC2 uses the default version of the launch template.- Returns:
this
-
launchTemplateId
@Stability(Stable) public CfnEC2Fleet.FleetLaunchTemplateSpecificationRequestProperty.Builder launchTemplateId(String launchTemplateId) - Parameters:
launchTemplateId
- The ID of the launch template. You must specify theLaunchTemplateId
or theLaunchTemplateName
, but not both.- Returns:
this
-
launchTemplateName
@Stability(Stable) public CfnEC2Fleet.FleetLaunchTemplateSpecificationRequestProperty.Builder launchTemplateName(String launchTemplateName) Sets the value ofCfnEC2Fleet.FleetLaunchTemplateSpecificationRequestProperty.getLaunchTemplateName()
- Parameters:
launchTemplateName
- The name of the launch template. You must specify theLaunchTemplateName
or theLaunchTemplateId
, but not both.- Returns:
this
-
build
Builds the configured instance.- Specified by:
build
in interfacesoftware.amazon.jsii.Builder<CfnEC2Fleet.FleetLaunchTemplateSpecificationRequestProperty>
- Returns:
- a new instance of
CfnEC2Fleet.FleetLaunchTemplateSpecificationRequestProperty
- Throws:
NullPointerException
- if any required attribute was not provided
-