Class CfnComputeEnvironment.LaunchTemplateSpecificationProperty.Builder
- All Implemented Interfaces:
software.amazon.jsii.Builder<CfnComputeEnvironment.LaunchTemplateSpecificationProperty>
- Enclosing interface:
CfnComputeEnvironment.LaunchTemplateSpecificationProperty
-
Constructor Summary
-
Method Summary
Modifier and TypeMethodDescriptionbuild()
Builds the configured instance.launchTemplateId
(String launchTemplateId) launchTemplateName
(String launchTemplateName) Sets the value ofCfnComputeEnvironment.LaunchTemplateSpecificationProperty.getOverrides()
overrides
(IResolvable overrides) Sets the value ofCfnComputeEnvironment.LaunchTemplateSpecificationProperty.getOverrides()
Sets the value ofCfnComputeEnvironment.LaunchTemplateSpecificationProperty.getVersion()
-
Constructor Details
-
Builder
public Builder()
-
-
Method Details
-
launchTemplateId
@Stability(Stable) public CfnComputeEnvironment.LaunchTemplateSpecificationProperty.Builder launchTemplateId(String launchTemplateId) - Parameters:
launchTemplateId
- The ID of the launch template.- Returns:
this
-
launchTemplateName
@Stability(Stable) public CfnComputeEnvironment.LaunchTemplateSpecificationProperty.Builder launchTemplateName(String launchTemplateName) - Parameters:
launchTemplateName
- The name of the launch template.- Returns:
this
-
overrides
@Stability(Stable) public CfnComputeEnvironment.LaunchTemplateSpecificationProperty.Builder overrides(IResolvable overrides) Sets the value ofCfnComputeEnvironment.LaunchTemplateSpecificationProperty.getOverrides()
- Parameters:
overrides
- A launch template to use in place of the default launch template. You must specify either the launch template ID or launch template name in the request, but not both.You can specify up to ten (10) launch template overrides that are associated to unique instance types or families for each compute environment.
To unset all override templates for a compute environment, you can pass an empty array to the UpdateComputeEnvironment.overrides parameter, or not include the
overrides
parameter when submitting theUpdateComputeEnvironment
API operation.- Returns:
this
-
overrides
@Stability(Stable) public CfnComputeEnvironment.LaunchTemplateSpecificationProperty.Builder overrides(List<? extends Object> overrides) Sets the value ofCfnComputeEnvironment.LaunchTemplateSpecificationProperty.getOverrides()
- Parameters:
overrides
- A launch template to use in place of the default launch template. You must specify either the launch template ID or launch template name in the request, but not both.You can specify up to ten (10) launch template overrides that are associated to unique instance types or families for each compute environment.
To unset all override templates for a compute environment, you can pass an empty array to the UpdateComputeEnvironment.overrides parameter, or not include the
overrides
parameter when submitting theUpdateComputeEnvironment
API operation.- Returns:
this
-
version
@Stability(Stable) public CfnComputeEnvironment.LaunchTemplateSpecificationProperty.Builder version(String version) Sets the value ofCfnComputeEnvironment.LaunchTemplateSpecificationProperty.getVersion()
- Parameters:
version
- The version number of the launch template,$Default
, or$Latest
. If the value is$Default
, the default version of the launch template is used. If the value is$Latest
, the latest version of the launch template is used.If the AMI ID that's used in a compute environment is from the launch template, the AMI isn't changed when the compute environment is updated. It's only changed if the
updateToLatestImageVersion
parameter for the compute environment is set totrue
. During an infrastructure update, if either$Default
or$Latest
is specified, AWS Batch re-evaluates the launch template version, and it might use a different version of the launch template. This is the case even if the launch template isn't specified in the update. When updating a compute environment, changing the launch template requires an infrastructure update of the compute environment. For more information, see Updating compute environments in the AWS Batch User Guide .Default:
$Default
Latest:
$Latest
- Returns:
this
-
build
Builds the configured instance.- Specified by:
build
in interfacesoftware.amazon.jsii.Builder<CfnComputeEnvironment.LaunchTemplateSpecificationProperty>
- Returns:
- a new instance of
CfnComputeEnvironment.LaunchTemplateSpecificationProperty
- Throws:
NullPointerException
- if any required attribute was not provided
-