Class RegisterJobDefinitionRequest
- All Implemented Interfaces:
SdkPojo
,ToCopyableBuilder<RegisterJobDefinitionRequest.Builder,
RegisterJobDefinitionRequest>
Contains the parameters for RegisterJobDefinition
.
-
Nested Class Summary
-
Method Summary
Modifier and TypeMethodDescriptionbuilder()
final ContainerProperties
An object with properties specific to Amazon ECS-based single-node container-based jobs.final EcsProperties
An object with properties that are specific to Amazon ECS-based jobs.final EksProperties
An object with 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) Used to retrieve the value of a field from any class that extendsSdkRequest
.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 String
The name of the job definition to register.final NodeProperties
An object with properties specific to multi-node parallel jobs.Default parameter substitution placeholders to set in 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 failed jobs that are submitted with this job definition.final Integer
The scheduling priority for jobs that are submitted with this job definition.static Class
<? extends RegisterJobDefinitionRequest.Builder> tags()
The tags that you apply to the job definition to help you categorize and organize your resources.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.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.final JobDefinitionType
type()
The type of job definition.final String
The type of job definition.Methods inherited from class software.amazon.awssdk.awscore.AwsRequest
overrideConfiguration
Methods inherited from interface software.amazon.awssdk.utils.builder.ToCopyableBuilder
copy
-
Method Details
-
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
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:
-
-
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:
-
-
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
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
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
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
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
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
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
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
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
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
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
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
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
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<RegisterJobDefinitionRequest.Builder,
RegisterJobDefinitionRequest> - Specified by:
toBuilder
in classBatchRequest
- Returns:
- a builder for type T
-
builder
-
serializableBuilderClass
-
hashCode
public final int hashCode()- Overrides:
hashCode
in classAwsRequest
-
equals
- Overrides:
equals
in classAwsRequest
-
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
Description copied from class:SdkRequest
Used to retrieve the value of a field from any class that extendsSdkRequest
. The field name specified should match the member name from the corresponding service-2.json model specified in the codegen-resources folder for a given service. The class specifies what class to cast the returned value to. If the returned value is also a modeled class, theSdkRequest.getValueForField(String, Class)
method will again be available.- Overrides:
getValueForField
in classSdkRequest
- Parameters:
fieldName
- The name of the member to be retrieved.clazz
- The class to cast the returned object to.- Returns:
- Optional containing the casted return value
-
sdkFields
-