Class CfnJobDefinitionProps.Builder
java.lang.Object
software.amazon.awscdk.services.batch.CfnJobDefinitionProps.Builder
- All Implemented Interfaces:
software.amazon.jsii.Builder<CfnJobDefinitionProps>
- Enclosing interface:
CfnJobDefinitionProps
@Stability(Stable)
public static final class CfnJobDefinitionProps.Builder
extends Object
implements software.amazon.jsii.Builder<CfnJobDefinitionProps>
A builder for
CfnJobDefinitionProps
-
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionbuild()
Builds the configured instance.containerProperties
(IResolvable containerProperties) Sets the value ofCfnJobDefinitionProps.getContainerProperties()
containerProperties
(CfnJobDefinition.ContainerPropertiesProperty containerProperties) Sets the value ofCfnJobDefinitionProps.getContainerProperties()
ecsProperties
(IResolvable ecsProperties) Sets the value ofCfnJobDefinitionProps.getEcsProperties()
ecsProperties
(CfnJobDefinition.EcsPropertiesProperty ecsProperties) Sets the value ofCfnJobDefinitionProps.getEcsProperties()
eksProperties
(IResolvable eksProperties) Sets the value ofCfnJobDefinitionProps.getEksProperties()
eksProperties
(CfnJobDefinition.EksPropertiesProperty eksProperties) Sets the value ofCfnJobDefinitionProps.getEksProperties()
jobDefinitionName
(String jobDefinitionName) Sets the value ofCfnJobDefinitionProps.getJobDefinitionName()
nodeProperties
(IResolvable nodeProperties) Sets the value ofCfnJobDefinitionProps.getNodeProperties()
nodeProperties
(CfnJobDefinition.NodePropertiesProperty nodeProperties) Sets the value ofCfnJobDefinitionProps.getNodeProperties()
parameters
(Object parameters) Sets the value ofCfnJobDefinitionProps.getParameters()
platformCapabilities
(List<String> platformCapabilities) Sets the value ofCfnJobDefinitionProps.getPlatformCapabilities()
propagateTags
(Boolean propagateTags) Sets the value ofCfnJobDefinitionProps.getPropagateTags()
propagateTags
(IResolvable propagateTags) Sets the value ofCfnJobDefinitionProps.getPropagateTags()
retryStrategy
(IResolvable retryStrategy) Sets the value ofCfnJobDefinitionProps.getRetryStrategy()
retryStrategy
(CfnJobDefinition.RetryStrategyProperty retryStrategy) Sets the value ofCfnJobDefinitionProps.getRetryStrategy()
schedulingPriority
(Number schedulingPriority) Sets the value ofCfnJobDefinitionProps.getSchedulingPriority()
Sets the value ofCfnJobDefinitionProps.getTags()
timeout
(IResolvable timeout) Sets the value ofCfnJobDefinitionProps.getTimeout()
timeout
(CfnJobDefinition.TimeoutProperty timeout) Sets the value ofCfnJobDefinitionProps.getTimeout()
Sets the value ofCfnJobDefinitionProps.getType()
-
Constructor Details
-
Builder
public Builder()
-
-
Method Details
-
type
Sets the value ofCfnJobDefinitionProps.getType()
- Parameters:
type
- The type of job definition. This parameter is required. For more information about multi-node parallel jobs, see Creating a multi-node parallel job definition in the AWS Batch User Guide .- If the value is
container
, then one of the following is required:containerProperties
,ecsProperties
, oreksProperties
. - If the value is
multinode
, thennodeProperties
is required.
If the job is run on Fargate resources, then
multinode
isn't supported.- If the value is
- Returns:
this
-
containerProperties
@Stability(Stable) public CfnJobDefinitionProps.Builder containerProperties(IResolvable containerProperties) Sets the value ofCfnJobDefinitionProps.getContainerProperties()
- Parameters:
containerProperties
- An object with properties specific to Amazon ECS-based jobs. WhencontainerProperties
is used in the job definition, it can't be used in addition toeksProperties
,ecsProperties
, ornodeProperties
.- Returns:
this
-
containerProperties
@Stability(Stable) public CfnJobDefinitionProps.Builder containerProperties(CfnJobDefinition.ContainerPropertiesProperty containerProperties) Sets the value ofCfnJobDefinitionProps.getContainerProperties()
- Parameters:
containerProperties
- An object with properties specific to Amazon ECS-based jobs. WhencontainerProperties
is used in the job definition, it can't be used in addition toeksProperties
,ecsProperties
, ornodeProperties
.- Returns:
this
-
ecsProperties
Sets the value ofCfnJobDefinitionProps.getEcsProperties()
- Parameters:
ecsProperties
- An object that contains the properties for the Amazon ECS resources of a job.WhenecsProperties
is used in the job definition, it can't be used in addition tocontainerProperties
,eksProperties
, ornodeProperties
.- Returns:
this
-
ecsProperties
@Stability(Stable) public CfnJobDefinitionProps.Builder ecsProperties(CfnJobDefinition.EcsPropertiesProperty ecsProperties) Sets the value ofCfnJobDefinitionProps.getEcsProperties()
- Parameters:
ecsProperties
- An object that contains the properties for the Amazon ECS resources of a job.WhenecsProperties
is used in the job definition, it can't be used in addition tocontainerProperties
,eksProperties
, ornodeProperties
.- Returns:
this
-
eksProperties
Sets the value ofCfnJobDefinitionProps.getEksProperties()
- Parameters:
eksProperties
- An object with properties that are specific to Amazon EKS-based jobs. WheneksProperties
is used in the job definition, it can't be used in addition tocontainerProperties
,ecsProperties
, ornodeProperties
.- Returns:
this
-
eksProperties
@Stability(Stable) public CfnJobDefinitionProps.Builder eksProperties(CfnJobDefinition.EksPropertiesProperty eksProperties) Sets the value ofCfnJobDefinitionProps.getEksProperties()
- Parameters:
eksProperties
- An object with properties that are specific to Amazon EKS-based jobs. WheneksProperties
is used in the job definition, it can't be used in addition tocontainerProperties
,ecsProperties
, ornodeProperties
.- Returns:
this
-
jobDefinitionName
Sets the value ofCfnJobDefinitionProps.getJobDefinitionName()
- Parameters:
jobDefinitionName
- The name of the job definition.- Returns:
this
-
nodeProperties
Sets the value ofCfnJobDefinitionProps.getNodeProperties()
- Parameters:
nodeProperties
- An object with properties that are specific to multi-node parallel jobs. WhennodeProperties
is used in the job definition, it can't be used in addition tocontainerProperties
,ecsProperties
, oreksProperties
.If the job runs on Fargate resources, don't specify
nodeProperties
. UsecontainerProperties
instead.- Returns:
this
-
nodeProperties
@Stability(Stable) public CfnJobDefinitionProps.Builder nodeProperties(CfnJobDefinition.NodePropertiesProperty nodeProperties) Sets the value ofCfnJobDefinitionProps.getNodeProperties()
- Parameters:
nodeProperties
- An object with properties that are specific to multi-node parallel jobs. WhennodeProperties
is used in the job definition, it can't be used in addition tocontainerProperties
,ecsProperties
, oreksProperties
.If the job runs on Fargate resources, don't specify
nodeProperties
. UsecontainerProperties
instead.- Returns:
this
-
parameters
Sets the value ofCfnJobDefinitionProps.getParameters()
- Parameters:
parameters
- Default parameters or parameter substitution placeholders that are set in the job definition. Parameters are specified as a key-value pair mapping. Parameters in aSubmitJob
request override any corresponding parameter defaults from the job definition. For more information about specifying parameters, see Job definition parameters in the AWS Batch User Guide .- Returns:
this
-
platformCapabilities
@Stability(Stable) public CfnJobDefinitionProps.Builder platformCapabilities(List<String> platformCapabilities) Sets the value ofCfnJobDefinitionProps.getPlatformCapabilities()
- Parameters:
platformCapabilities
- The platform capabilities required by the job definition. If no value is specified, it defaults toEC2
. Jobs run on Fargate resources specifyFARGATE
.- Returns:
this
-
propagateTags
Sets the value ofCfnJobDefinitionProps.getPropagateTags()
- Parameters:
propagateTags
- Specifies whether to propagate the tags from the job or job definition to the corresponding Amazon ECS task. If no value is specified, the tags aren't propagated. Tags can only be propagated to the tasks when the tasks are created. For tags with the same name, job tags are given priority over job definitions tags. If the total number of combined tags from the job and job definition is over 50, the job is moved to theFAILED
state.- Returns:
this
-
propagateTags
Sets the value ofCfnJobDefinitionProps.getPropagateTags()
- Parameters:
propagateTags
- Specifies whether to propagate the tags from the job or job definition to the corresponding Amazon ECS task. If no value is specified, the tags aren't propagated. Tags can only be propagated to the tasks when the tasks are created. For tags with the same name, job tags are given priority over job definitions tags. If the total number of combined tags from the job and job definition is over 50, the job is moved to theFAILED
state.- Returns:
this
-
retryStrategy
Sets the value ofCfnJobDefinitionProps.getRetryStrategy()
- Parameters:
retryStrategy
- The retry strategy to use for failed jobs that are submitted with this job definition.- Returns:
this
-
retryStrategy
@Stability(Stable) public CfnJobDefinitionProps.Builder retryStrategy(CfnJobDefinition.RetryStrategyProperty retryStrategy) Sets the value ofCfnJobDefinitionProps.getRetryStrategy()
- Parameters:
retryStrategy
- The retry strategy to use for failed jobs that are submitted with this job definition.- Returns:
this
-
schedulingPriority
@Stability(Stable) public CfnJobDefinitionProps.Builder schedulingPriority(Number schedulingPriority) Sets the value ofCfnJobDefinitionProps.getSchedulingPriority()
- Parameters:
schedulingPriority
- The scheduling priority of the job definition. This only affects jobs in job queues with a fair share policy. Jobs with a higher scheduling priority are scheduled before jobs with a lower scheduling priority.- Returns:
this
-
tags
Sets the value ofCfnJobDefinitionProps.getTags()
- Parameters:
tags
- The tags that are applied to the job definition.- Returns:
this
-
timeout
Sets the value ofCfnJobDefinitionProps.getTimeout()
- Parameters:
timeout
- The timeout time for jobs that are submitted with this job definition. After the amount of time you specify passes, AWS Batch terminates your jobs if they aren't finished.- Returns:
this
-
timeout
@Stability(Stable) public CfnJobDefinitionProps.Builder timeout(CfnJobDefinition.TimeoutProperty timeout) Sets the value ofCfnJobDefinitionProps.getTimeout()
- Parameters:
timeout
- The timeout time for jobs that are submitted with this job definition. After the amount of time you specify passes, AWS Batch terminates your jobs if they aren't finished.- Returns:
this
-
build
Builds the configured instance.- Specified by:
build
in interfacesoftware.amazon.jsii.Builder<CfnJobDefinitionProps>
- Returns:
- a new instance of
CfnJobDefinitionProps
- Throws:
NullPointerException
- if any required attribute was not provided
-