Class RegisterJobDefinitionRequest
- java.lang.Object
-
- software.amazon.awssdk.core.SdkRequest
-
- software.amazon.awssdk.awscore.AwsRequest
-
- software.amazon.awssdk.services.batch.model.BatchRequest
-
- software.amazon.awssdk.services.batch.model.RegisterJobDefinitionRequest
-
- All Implemented Interfaces:
SdkPojo
,ToCopyableBuilder<RegisterJobDefinitionRequest.Builder,RegisterJobDefinitionRequest>
@Generated("software.amazon.awssdk:codegen") public final class RegisterJobDefinitionRequest extends BatchRequest implements ToCopyableBuilder<RegisterJobDefinitionRequest.Builder,RegisterJobDefinitionRequest>
Contains the parameters for
RegisterJobDefinition
.
-
-
Nested Class Summary
Nested Classes Modifier and Type Class Description static interface
RegisterJobDefinitionRequest.Builder
-
Method Summary
All Methods Static Methods Instance Methods Concrete Methods Modifier and Type Method Description static RegisterJobDefinitionRequest.Builder
builder()
ContainerProperties
containerProperties()
An object with properties specific to Amazon ECS-based single-node container-based jobs.EcsProperties
ecsProperties()
An object with properties that are specific to Amazon ECS-based jobs.EksProperties
eksProperties()
An object with properties that are specific to Amazon EKS-based jobs.boolean
equals(Object obj)
boolean
equalsBySdkFields(Object obj)
<T> Optional<T>
getValueForField(String fieldName, Class<T> clazz)
int
hashCode()
boolean
hasParameters()
For responses, this returns true if the service returned a value for the Parameters property.boolean
hasPlatformCapabilities()
For responses, this returns true if the service returned a value for the PlatformCapabilities property.boolean
hasTags()
For responses, this returns true if the service returned a value for the Tags property.String
jobDefinitionName()
The name of the job definition to register.NodeProperties
nodeProperties()
An object with properties specific to multi-node parallel jobs.Map<String,String>
parameters()
Default parameter substitution placeholders to set in the job definition.List<PlatformCapability>
platformCapabilities()
The platform capabilities required by the job definition.List<String>
platformCapabilitiesAsStrings()
The platform capabilities required by the job definition.Boolean
propagateTags()
Specifies whether to propagate the tags from the job or job definition to the corresponding Amazon ECS task.RetryStrategy
retryStrategy()
The retry strategy to use for failed jobs that are submitted with this job definition.Integer
schedulingPriority()
The scheduling priority for jobs that are submitted with this job definition.Map<String,SdkField<?>>
sdkFieldNameToField()
List<SdkField<?>>
sdkFields()
static Class<? extends RegisterJobDefinitionRequest.Builder>
serializableBuilderClass()
Map<String,String>
tags()
The tags that you apply to the job definition to help you categorize and organize your resources.JobTimeout
timeout()
The timeout configuration for jobs that are submitted with this job definition, after which Batch terminates your jobs if they have not finished.RegisterJobDefinitionRequest.Builder
toBuilder()
String
toString()
Returns a string representation of this object.JobDefinitionType
type()
The type of job definition.String
typeAsString()
The type of job definition.-
Methods inherited from class software.amazon.awssdk.awscore.AwsRequest
overrideConfiguration
-
Methods inherited from class java.lang.Object
clone, finalize, getClass, notify, notifyAll, wait, wait, wait
-
Methods inherited from interface software.amazon.awssdk.utils.builder.ToCopyableBuilder
copy
-
-
-
-
Method Detail
-
jobDefinitionName
public final String jobDefinitionName()
The name of the job definition to register. It can be up to 128 letters long. It can contain uppercase and lowercase letters, numbers, hyphens (-), and underscores (_).
- Returns:
- The name of the job definition to register. It can be up to 128 letters long. It can contain uppercase and lowercase letters, numbers, hyphens (-), and underscores (_).
-
type
public final JobDefinitionType type()
The type of job definition. For more information about multi-node parallel jobs, see Creating a multi-node parallel job definition in the 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 service returns an enum value that is not available in the current SDK version,
type
will returnJobDefinitionType.UNKNOWN_TO_SDK_VERSION
. The raw value returned by the service is available fromtypeAsString()
.- Returns:
- The type of job definition. For more information about multi-node parallel jobs, see Creating a multi-node
parallel job definition in the 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. -
- See Also:
JobDefinitionType
-
-
typeAsString
public final String typeAsString()
The type of job definition. For more information about multi-node parallel jobs, see Creating a multi-node parallel job definition in the 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 service returns an enum value that is not available in the current SDK version,
type
will returnJobDefinitionType.UNKNOWN_TO_SDK_VERSION
. The raw value returned by the service is available fromtypeAsString()
.- Returns:
- The type of job definition. For more information about multi-node parallel jobs, see Creating a multi-node
parallel job definition in the 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. -
- See Also:
JobDefinitionType
-
-
hasParameters
public final boolean hasParameters()
For responses, this returns true if the service returned a value for the Parameters property. This DOES NOT check that the value is non-empty (for which, you should check theisEmpty()
method on the property). This is useful because the SDK will never return a null collection or map, but you may need to differentiate between the service returning nothing (or null) and the service returning an empty collection or map. For requests, this returns true if a value for the property was specified in the request builder, and false if a value was not specified.
-
parameters
public final Map<String,String> parameters()
Default parameter substitution placeholders to set in the job definition. Parameters are specified as a key-value pair mapping. Parameters in a
SubmitJob
request override any corresponding parameter defaults from the job definition.Attempts to modify the collection returned by this method will result in an UnsupportedOperationException.
This method will never return null. If you would like to know whether the service returned this field (so that you can differentiate between null and empty), you can use the
hasParameters()
method.- Returns:
- Default parameter substitution placeholders to set in the job definition. Parameters are specified as a
key-value pair mapping. Parameters in a
SubmitJob
request override any corresponding parameter defaults from the job definition.
-
schedulingPriority
public final Integer schedulingPriority()
The scheduling priority for jobs that are submitted with this 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.
The minimum supported value is 0 and the maximum supported value is 9999.
- Returns:
- The scheduling priority for jobs that are submitted with this 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.
The minimum supported value is 0 and the maximum supported value is 9999.
-
containerProperties
public final ContainerProperties containerProperties()
An object with properties specific to Amazon ECS-based single-node container-based jobs. If the job definition's
type
parameter iscontainer
, then you must specify eithercontainerProperties
ornodeProperties
. This must not be specified for Amazon EKS-based job definitions.If the job runs on Fargate resources, then you must not specify
nodeProperties
; use onlycontainerProperties
.- Returns:
- An object with properties specific to Amazon ECS-based single-node container-based jobs. If the job
definition's
type
parameter iscontainer
, then you must specify eithercontainerProperties
ornodeProperties
. This must not be specified for Amazon EKS-based job definitions.If the job runs on Fargate resources, then you must not specify
nodeProperties
; use onlycontainerProperties
.
-
nodeProperties
public final NodeProperties nodeProperties()
An object with properties specific to multi-node parallel jobs. If you specify node properties for a job, it becomes a multi-node parallel job. For more information, see Multi-node Parallel Jobs in the Batch User Guide.
If the job runs on Fargate resources, then you must not specify
nodeProperties
; usecontainerProperties
instead.If the job runs on Amazon EKS resources, then you must not specify
nodeProperties
.- Returns:
- An object with properties specific to multi-node parallel jobs. If you specify node properties for a job,
it becomes a multi-node parallel job. For more information, see Multi-node
Parallel Jobs in the Batch User Guide.
If the job runs on Fargate resources, then you must not specify
nodeProperties
; usecontainerProperties
instead.If the job runs on Amazon EKS resources, then you must not specify
nodeProperties
.
-
retryStrategy
public final RetryStrategy retryStrategy()
The retry strategy to use for failed jobs that are submitted with this job definition. Any retry strategy that's specified during a SubmitJob operation overrides the retry strategy defined here. If a job is terminated due to a timeout, it isn't retried.
- Returns:
- The retry strategy to use for failed jobs that are submitted with this job definition. Any retry strategy that's specified during a SubmitJob operation overrides the retry strategy defined here. If a job is terminated due to a timeout, it isn't retried.
-
propagateTags
public final Boolean 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 are not propagated. Tags can only be propagated to the tasks during task creation. 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 the
FAILED
state.If the job runs on Amazon EKS resources, then you must not specify
propagateTags
.- Returns:
- 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 are not propagated. Tags can only be propagated to the tasks
during task creation. 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 the
FAILED
state.If the job runs on Amazon EKS resources, then you must not specify
propagateTags
.
-
timeout
public final JobTimeout timeout()
The timeout configuration for jobs that are submitted with this job definition, after which Batch terminates your jobs if they have not finished. If a job is terminated due to a timeout, it isn't retried. The minimum value for the timeout is 60 seconds. Any timeout configuration that's specified during a SubmitJob operation overrides the timeout configuration defined here. For more information, see Job Timeouts in the Batch User Guide.
- Returns:
- The timeout configuration for jobs that are submitted with this job definition, after which Batch terminates your jobs if they have not finished. If a job is terminated due to a timeout, it isn't retried. The minimum value for the timeout is 60 seconds. Any timeout configuration that's specified during a SubmitJob operation overrides the timeout configuration defined here. For more information, see Job Timeouts in the Batch User Guide.
-
hasTags
public final boolean hasTags()
For responses, this returns true if the service returned a value for the Tags property. This DOES NOT check that the value is non-empty (for which, you should check theisEmpty()
method on the property). This is useful because the SDK will never return a null collection or map, but you may need to differentiate between the service returning nothing (or null) and the service returning an empty collection or map. For requests, this returns true if a value for the property was specified in the request builder, and false if a value was not specified.
-
tags
public final Map<String,String> tags()
The tags that you apply to the job definition to help you categorize and organize your resources. Each tag consists of a key and an optional value. For more information, see Tagging Amazon Web Services Resources in Batch User Guide.
Attempts to modify the collection returned by this method will result in an UnsupportedOperationException.
This method will never return null. If you would like to know whether the service returned this field (so that you can differentiate between null and empty), you can use the
hasTags()
method.- Returns:
- The tags that you apply to the job definition to help you categorize and organize your resources. Each tag consists of a key and an optional value. For more information, see Tagging Amazon Web Services Resources in Batch User Guide.
-
platformCapabilities
public final List<PlatformCapability> platformCapabilities()
The platform capabilities required by the job definition. If no value is specified, it defaults to
EC2
. To run the job on Fargate resources, specifyFARGATE
.If the job runs on Amazon EKS resources, then you must not specify
platformCapabilities
.Attempts to modify the collection returned by this method will result in an UnsupportedOperationException.
This method will never return null. If you would like to know whether the service returned this field (so that you can differentiate between null and empty), you can use the
hasPlatformCapabilities()
method.- Returns:
- The platform capabilities required by the job definition. If no value is specified, it defaults to
EC2
. To run the job on Fargate resources, specifyFARGATE
.If the job runs on Amazon EKS resources, then you must not specify
platformCapabilities
.
-
hasPlatformCapabilities
public final boolean hasPlatformCapabilities()
For responses, this returns true if the service returned a value for the PlatformCapabilities property. This DOES NOT check that the value is non-empty (for which, you should check theisEmpty()
method on the property). This is useful because the SDK will never return a null collection or map, but you may need to differentiate between the service returning nothing (or null) and the service returning an empty collection or map. For requests, this returns true if a value for the property was specified in the request builder, and false if a value was not specified.
-
platformCapabilitiesAsStrings
public final List<String> platformCapabilitiesAsStrings()
The platform capabilities required by the job definition. If no value is specified, it defaults to
EC2
. To run the job on Fargate resources, specifyFARGATE
.If the job runs on Amazon EKS resources, then you must not specify
platformCapabilities
.Attempts to modify the collection returned by this method will result in an UnsupportedOperationException.
This method will never return null. If you would like to know whether the service returned this field (so that you can differentiate between null and empty), you can use the
hasPlatformCapabilities()
method.- Returns:
- The platform capabilities required by the job definition. If no value is specified, it defaults to
EC2
. To run the job on Fargate resources, specifyFARGATE
.If the job runs on Amazon EKS resources, then you must not specify
platformCapabilities
.
-
eksProperties
public final EksProperties eksProperties()
An object with properties that are specific to Amazon EKS-based jobs. This must not be specified for Amazon ECS based job definitions.
- Returns:
- An object with properties that are specific to Amazon EKS-based jobs. This must not be specified for Amazon ECS based job definitions.
-
ecsProperties
public final EcsProperties ecsProperties()
An object with properties that are specific to Amazon ECS-based jobs. This must not be specified for Amazon EKS-based job definitions.
- Returns:
- An object with properties that are specific to Amazon ECS-based jobs. This must not be specified for Amazon EKS-based job definitions.
-
toBuilder
public RegisterJobDefinitionRequest.Builder toBuilder()
- Specified by:
toBuilder
in interfaceToCopyableBuilder<RegisterJobDefinitionRequest.Builder,RegisterJobDefinitionRequest>
- Specified by:
toBuilder
in classBatchRequest
-
builder
public static RegisterJobDefinitionRequest.Builder builder()
-
serializableBuilderClass
public static Class<? extends RegisterJobDefinitionRequest.Builder> serializableBuilderClass()
-
hashCode
public final int hashCode()
- Overrides:
hashCode
in classAwsRequest
-
equals
public final boolean equals(Object obj)
- Overrides:
equals
in classAwsRequest
-
equalsBySdkFields
public final boolean equalsBySdkFields(Object obj)
- Specified by:
equalsBySdkFields
in interfaceSdkPojo
-
toString
public final String toString()
Returns a string representation of this object. This is useful for testing and debugging. Sensitive data will be redacted from this string using a placeholder value.
-
getValueForField
public final <T> Optional<T> getValueForField(String fieldName, Class<T> clazz)
- Overrides:
getValueForField
in classSdkRequest
-
sdkFieldNameToField
public final Map<String,SdkField<?>> sdkFieldNameToField()
- Specified by:
sdkFieldNameToField
in interfaceSdkPojo
-
-