Class JobDetail
- All Implemented Interfaces:
Serializable
,SdkPojo
,ToCopyableBuilder<JobDetail.Builder,
JobDetail>
An object that represents an Batch job.
- See Also:
-
Nested Class Summary
Nested Classes -
Method Summary
Modifier and TypeMethodDescriptionfinal ArrayPropertiesDetail
The array properties of the job, if it's an array job.final List
<AttemptDetail> attempts()
A list of job attempts that are associated with this job.static JobDetail.Builder
builder()
final ContainerDetail
An object that represents the details for the container that's associated with the job.final Long
The Unix timestamp (in milliseconds) for when the job was created.final List
<JobDependency> A list of job IDs that this job depends on.final List
<EksAttemptDetail> A list of job attempts that are associated with this job.final EksPropertiesDetail
An object with various properties that are specific to Amazon EKS based jobs.final boolean
final boolean
equalsBySdkFields
(Object obj) Indicates whether some other object is "equal to" this one by SDK fields.final <T> Optional
<T> getValueForField
(String fieldName, Class<T> clazz) final boolean
For responses, this returns true if the service returned a value for the Attempts property.final boolean
For responses, this returns true if the service returned a value for the DependsOn property.final boolean
For responses, this returns true if the service returned a value for the EksAttempts property.final int
hashCode()
final boolean
For responses, this returns true if the service returned a value for the Parameters property.final boolean
For responses, this returns true if the service returned a value for the PlatformCapabilities property.final boolean
hasTags()
For responses, this returns true if the service returned a value for the Tags property.final Boolean
Indicates whether the job is canceled.final Boolean
Indicates whether the job is terminated.final String
jobArn()
The Amazon Resource Name (ARN) of the job.final String
The Amazon Resource Name (ARN) of the job definition that this job uses.final String
jobId()
The job ID.final String
jobName()
The job name.final String
jobQueue()
The Amazon Resource Name (ARN) of the job queue that the job is associated with.final NodeDetails
An object that represents the details of a node that's associated with a multi-node parallel job.final NodeProperties
An object that represents the node properties of a multi-node parallel job.Additional parameters that are passed to the job that replace parameter substitution placeholders or override any corresponding parameter defaults from the job definition.final List
<PlatformCapability> The platform capabilities required by the job definition.The platform capabilities required by the job definition.final Boolean
Specifies whether to propagate the tags from the job or job definition to the corresponding Amazon ECS task.final RetryStrategy
The retry strategy to use for this job if an attempt fails.final Integer
The scheduling policy of the job definition.static Class
<? extends JobDetail.Builder> final String
The share identifier for the job.final Long
The Unix timestamp (in milliseconds) for when the job was started.final JobStatus
status()
The current status for the job.final String
The current status for the job.final String
A short, human-readable string to provide more details for the current status of the job.final Long
The Unix timestamp (in milliseconds) for when the job was stopped.tags()
The tags that are applied to the job.final JobTimeout
timeout()
The timeout configuration for the job.Take this object and create a builder that contains all of the current property values of this object.final String
toString()
Returns a string representation of this object.Methods inherited from interface software.amazon.awssdk.utils.builder.ToCopyableBuilder
copy
-
Method Details
-
jobArn
The Amazon Resource Name (ARN) of the job.
- Returns:
- The Amazon Resource Name (ARN) of the job.
-
jobName
The job name.
- Returns:
- The job name.
-
jobId
The job ID.
- Returns:
- The job ID.
-
jobQueue
The Amazon Resource Name (ARN) of the job queue that the job is associated with.
- Returns:
- The Amazon Resource Name (ARN) of the job queue that the job is associated with.
-
status
The current status for the job.
If your jobs don't progress to
STARTING
, see Jobs stuck in RUNNABLE status in the troubleshooting section of the Batch User Guide.If the service returns an enum value that is not available in the current SDK version,
status
will returnJobStatus.UNKNOWN_TO_SDK_VERSION
. The raw value returned by the service is available fromstatusAsString()
.- Returns:
- The current status for the job.
If your jobs don't progress to
STARTING
, see Jobs stuck in RUNNABLE status in the troubleshooting section of the Batch User Guide. - See Also:
-
statusAsString
The current status for the job.
If your jobs don't progress to
STARTING
, see Jobs stuck in RUNNABLE status in the troubleshooting section of the Batch User Guide.If the service returns an enum value that is not available in the current SDK version,
status
will returnJobStatus.UNKNOWN_TO_SDK_VERSION
. The raw value returned by the service is available fromstatusAsString()
.- Returns:
- The current status for the job.
If your jobs don't progress to
STARTING
, see Jobs stuck in RUNNABLE status in the troubleshooting section of the Batch User Guide. - See Also:
-
schedulingPriority
The scheduling policy 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:
- The scheduling policy 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.
-
hasAttempts
public final boolean hasAttempts()For responses, this returns true if the service returned a value for the Attempts 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. -
attempts
A list of job attempts that are associated with this job.
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
hasAttempts()
method.- Returns:
- A list of job attempts that are associated with this job.
-
statusReason
A short, human-readable string to provide more details for the current status of the job.
- Returns:
- A short, human-readable string to provide more details for the current status of the job.
-
createdAt
The Unix timestamp (in milliseconds) for when the job was created. For non-array jobs and parent array jobs, this is when the job entered the
SUBMITTED
state. This is specifically at the time SubmitJob was called. For array child jobs, this is when the child job was spawned by its parent and entered thePENDING
state.- Returns:
- The Unix timestamp (in milliseconds) for when the job was created. For non-array jobs and parent array
jobs, this is when the job entered the
SUBMITTED
state. This is specifically at the time SubmitJob was called. For array child jobs, this is when the child job was spawned by its parent and entered thePENDING
state.
-
retryStrategy
The retry strategy to use for this job if an attempt fails.
- Returns:
- The retry strategy to use for this job if an attempt fails.
-
startedAt
The Unix timestamp (in milliseconds) for when the job was started. More specifically, it's when the job transitioned from the
STARTING
state to theRUNNING
state. This parameter isn't provided for child jobs of array jobs or multi-node parallel jobs.- Returns:
- The Unix timestamp (in milliseconds) for when the job was started. More specifically, it's when the job
transitioned from the
STARTING
state to theRUNNING
state. This parameter isn't provided for child jobs of array jobs or multi-node parallel jobs.
-
stoppedAt
The Unix timestamp (in milliseconds) for when the job was stopped. More specifically, it's when the job transitioned from the
RUNNING
state to a terminal state, such asSUCCEEDED
orFAILED
.- Returns:
- The Unix timestamp (in milliseconds) for when the job was stopped. More specifically, it's when the job
transitioned from the
RUNNING
state to a terminal state, such asSUCCEEDED
orFAILED
.
-
hasDependsOn
public final boolean hasDependsOn()For responses, this returns true if the service returned a value for the DependsOn 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. -
dependsOn
A list of job IDs that this job depends on.
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
hasDependsOn()
method.- Returns:
- A list of job IDs that this job depends on.
-
jobDefinition
The Amazon Resource Name (ARN) of the job definition that this job uses.
- Returns:
- The Amazon Resource Name (ARN) of the job definition that this job uses.
-
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
Additional parameters that are passed to the job that replace parameter substitution placeholders or 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:
- Additional parameters that are passed to the job that replace parameter substitution placeholders or override any corresponding parameter defaults from the job definition.
-
container
An object that represents the details for the container that's associated with the job.
- Returns:
- An object that represents the details for the container that's associated with the job.
-
nodeDetails
An object that represents the details of a node that's associated with a multi-node parallel job.
- Returns:
- An object that represents the details of a node that's associated with a multi-node parallel job.
-
nodeProperties
An object that represents the node properties of a multi-node parallel job.
This isn't applicable to jobs that are running on Fargate resources.
- Returns:
- An object that represents the node properties of a multi-node parallel job.
This isn't applicable to jobs that are running on Fargate resources.
-
arrayProperties
The array properties of the job, if it's an array job.
- Returns:
- The array properties of the job, if it's an array job.
-
timeout
The timeout configuration for the job.
- Returns:
- The timeout configuration for the job.
-
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
The tags that are applied to the job.
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 are applied to the job.
-
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 the
FAILED
state.- 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 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 the
FAILED
state.
-
platformCapabilities
The platform capabilities required by the job definition. If no value is specified, it defaults to
EC2
. Jobs run on Fargate resources specifyFARGATE
.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
. Jobs run on Fargate resources specifyFARGATE
.
-
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
The platform capabilities required by the job definition. If no value is specified, it defaults to
EC2
. Jobs run on Fargate resources specifyFARGATE
.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
. Jobs run on Fargate resources specifyFARGATE
.
-
eksProperties
An object with various properties that are specific to Amazon EKS based jobs. Only one of
container
,eksProperties
, ornodeDetails
is specified.- Returns:
- An object with various properties that are specific to Amazon EKS based jobs. Only one of
container
,eksProperties
, ornodeDetails
is specified.
-
hasEksAttempts
public final boolean hasEksAttempts()For responses, this returns true if the service returned a value for the EksAttempts 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. -
eksAttempts
A list of job attempts that are associated with this job.
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
hasEksAttempts()
method.- Returns:
- A list of job attempts that are associated with this job.
-
isCancelled
Indicates whether the job is canceled.
- Returns:
- Indicates whether the job is canceled.
-
isTerminated
Indicates whether the job is terminated.
- Returns:
- Indicates whether the job is terminated.
-
toBuilder
Description copied from interface:ToCopyableBuilder
Take this object and create a builder that contains all of the current property values of this object.- Specified by:
toBuilder
in interfaceToCopyableBuilder<JobDetail.Builder,
JobDetail> - Returns:
- a builder for type T
-
builder
-
serializableBuilderClass
-
hashCode
public final int hashCode() -
equals
-
equalsBySdkFields
Description copied from interface:SdkPojo
Indicates whether some other object is "equal to" this one by SDK fields. An SDK field is a modeled, non-inherited field in anSdkPojo
class, and is generated based on a service model.If an
SdkPojo
class does not have any inherited fields,equalsBySdkFields
andequals
are essentially the same.- Specified by:
equalsBySdkFields
in interfaceSdkPojo
- Parameters:
obj
- the object to be compared with- Returns:
- true if the other object equals to this object by sdk fields, false otherwise.
-
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
-
sdkFields
-