Class 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.

  • Method Details

    • 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, or eksProperties.

      • If the value is multinode, then nodeProperties 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 return JobDefinitionType.UNKNOWN_TO_SDK_VERSION. The raw value returned by the service is available from typeAsString().

      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, or eksProperties.

      • If the value is multinode, then nodeProperties is required.

      If the job is run on Fargate resources, then multinode isn't supported.

      See Also:
    • 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, or eksProperties.

      • If the value is multinode, then nodeProperties 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 return JobDefinitionType.UNKNOWN_TO_SDK_VERSION. The raw value returned by the service is available from typeAsString().

      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, or eksProperties.

      • If the value is multinode, then nodeProperties 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 the isEmpty() 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 is container, then you must specify either containerProperties or nodeProperties. 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 only containerProperties.

      Returns:
      An object with properties specific to Amazon ECS-based single-node container-based jobs. If the job definition's type parameter is container, then you must specify either containerProperties or nodeProperties. 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 only containerProperties.

    • 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; use containerProperties 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; use containerProperties 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 the isEmpty() 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, specify FARGATE.

      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, specify FARGATE.

      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 the isEmpty() 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, specify FARGATE.

      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, specify FARGATE.

      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

      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 interface ToCopyableBuilder<RegisterJobDefinitionRequest.Builder,RegisterJobDefinitionRequest>
      Specified by:
      toBuilder in class BatchRequest
      Returns:
      a builder for type T
    • builder

      public static RegisterJobDefinitionRequest.Builder builder()
    • serializableBuilderClass

      public static Class<? extends RegisterJobDefinitionRequest.Builder> serializableBuilderClass()
    • hashCode

      public final int hashCode()
      Overrides:
      hashCode in class AwsRequest
    • equals

      public final boolean equals(Object obj)
      Overrides:
      equals in class AwsRequest
    • equalsBySdkFields

      public final boolean equalsBySdkFields(Object obj)
      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 an SdkPojo class, and is generated based on a service model.

      If an SdkPojo class does not have any inherited fields, equalsBySdkFields and equals are essentially the same.

      Specified by:
      equalsBySdkFields in interface SdkPojo
      Parameters:
      obj - the object to be compared with
      Returns:
      true if the other object equals to this object by sdk fields, false otherwise.
    • 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.
      Overrides:
      toString in class Object
    • getValueForField

      public final <T> Optional<T> getValueForField(String fieldName, Class<T> clazz)
      Description copied from class: SdkRequest
      Used to retrieve the value of a field from any class that extends SdkRequest. 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, the SdkRequest.getValueForField(String, Class) method will again be available.
      Overrides:
      getValueForField in class SdkRequest
      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

      public final List<SdkField<?>> sdkFields()
      Specified by:
      sdkFields in interface SdkPojo
      Returns:
      List of SdkField in this POJO. May be empty list but should never be null.