You are viewing documentation for version 3 of the AWS SDK for Ruby. Version 2 documentation can be found here.

Class: Aws::Batch::Types::RegisterJobDefinitionRequest

Inherits:
Struct
  • Object
show all
Defined in:
gems/aws-sdk-batch/lib/aws-sdk-batch/types.rb

Overview

Note:

When making an API call, you may pass RegisterJobDefinitionRequest data as a hash:

{
  job_definition_name: "String", # required
  type: "container", # required, accepts container, multinode
  parameters: {
    "String" => "String",
  },
  container_properties: {
    image: "String",
    vcpus: 1,
    memory: 1,
    command: ["String"],
    job_role_arn: "String",
    volumes: [
      {
        host: {
          source_path: "String",
        },
        name: "String",
      },
    ],
    environment: [
      {
        name: "String",
        value: "String",
      },
    ],
    mount_points: [
      {
        container_path: "String",
        read_only: false,
        source_volume: "String",
      },
    ],
    readonly_root_filesystem: false,
    privileged: false,
    ulimits: [
      {
        hard_limit: 1, # required
        name: "String", # required
        soft_limit: 1, # required
      },
    ],
    user: "String",
    instance_type: "String",
    resource_requirements: [
      {
        value: "String", # required
        type: "GPU", # required, accepts GPU
      },
    ],
    linux_parameters: {
      devices: [
        {
          host_path: "String", # required
          container_path: "String",
          permissions: ["READ"], # accepts READ, WRITE, MKNOD
        },
      ],
    },
  },
  node_properties: {
    num_nodes: 1, # required
    main_node: 1, # required
    node_range_properties: [ # required
      {
        target_nodes: "String", # required
        container: {
          image: "String",
          vcpus: 1,
          memory: 1,
          command: ["String"],
          job_role_arn: "String",
          volumes: [
            {
              host: {
                source_path: "String",
              },
              name: "String",
            },
          ],
          environment: [
            {
              name: "String",
              value: "String",
            },
          ],
          mount_points: [
            {
              container_path: "String",
              read_only: false,
              source_volume: "String",
            },
          ],
          readonly_root_filesystem: false,
          privileged: false,
          ulimits: [
            {
              hard_limit: 1, # required
              name: "String", # required
              soft_limit: 1, # required
            },
          ],
          user: "String",
          instance_type: "String",
          resource_requirements: [
            {
              value: "String", # required
              type: "GPU", # required, accepts GPU
            },
          ],
          linux_parameters: {
            devices: [
              {
                host_path: "String", # required
                container_path: "String",
                permissions: ["READ"], # accepts READ, WRITE, MKNOD
              },
            ],
          },
        },
      },
    ],
  },
  retry_strategy: {
    attempts: 1,
  },
  timeout: {
    attempt_duration_seconds: 1,
  },
}

Instance Attribute Summary collapse

Instance Attribute Details

#container_propertiesTypes::ContainerProperties

An object with various properties specific to single-node container-based jobs. If the job definition's type parameter is container, then you must specify either containerProperties or nodeProperties.



2712
2713
2714
2715
2716
2717
2718
2719
2720
2721
# File 'gems/aws-sdk-batch/lib/aws-sdk-batch/types.rb', line 2712

class RegisterJobDefinitionRequest < Struct.new(
  :job_definition_name,
  :type,
  :parameters,
  :container_properties,
  :node_properties,
  :retry_strategy,
  :timeout)
  include Aws::Structure
end

#job_definition_nameString

The name of the job definition to register. Up to 128 letters (uppercase and lowercase), numbers, hyphens, and underscores are allowed.

Returns:

  • (String)


2712
2713
2714
2715
2716
2717
2718
2719
2720
2721
# File 'gems/aws-sdk-batch/lib/aws-sdk-batch/types.rb', line 2712

class RegisterJobDefinitionRequest < Struct.new(
  :job_definition_name,
  :type,
  :parameters,
  :container_properties,
  :node_properties,
  :retry_strategy,
  :timeout)
  include Aws::Structure
end

#node_propertiesTypes::NodeProperties

An object with various 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 AWS Batch User Guide. If the job definition's type parameter is container, then you must specify either containerProperties or nodeProperties.



2712
2713
2714
2715
2716
2717
2718
2719
2720
2721
# File 'gems/aws-sdk-batch/lib/aws-sdk-batch/types.rb', line 2712

class RegisterJobDefinitionRequest < Struct.new(
  :job_definition_name,
  :type,
  :parameters,
  :container_properties,
  :node_properties,
  :retry_strategy,
  :timeout)
  include Aws::Structure
end

#parametersHash<String,String>

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.

Returns:

  • (Hash<String,String>)


2712
2713
2714
2715
2716
2717
2718
2719
2720
2721
# File 'gems/aws-sdk-batch/lib/aws-sdk-batch/types.rb', line 2712

class RegisterJobDefinitionRequest < Struct.new(
  :job_definition_name,
  :type,
  :parameters,
  :container_properties,
  :node_properties,
  :retry_strategy,
  :timeout)
  include Aws::Structure
end

#retry_strategyTypes::RetryStrategy

The retry strategy to use for failed jobs that are submitted with this job definition. Any retry strategy that is specified during a SubmitJob operation overrides the retry strategy defined here. If a job is terminated due to a timeout, it is not retried.



2712
2713
2714
2715
2716
2717
2718
2719
2720
2721
# File 'gems/aws-sdk-batch/lib/aws-sdk-batch/types.rb', line 2712

class RegisterJobDefinitionRequest < Struct.new(
  :job_definition_name,
  :type,
  :parameters,
  :container_properties,
  :node_properties,
  :retry_strategy,
  :timeout)
  include Aws::Structure
end

#timeoutTypes::JobTimeout

The timeout configuration for jobs that are submitted with this job definition, after which AWS Batch terminates your jobs if they have not finished. If a job is terminated due to a timeout, it is not retried. The minimum value for the timeout is 60 seconds. Any timeout configuration that is specified during a SubmitJob operation overrides the timeout configuration defined here. For more information, see Job Timeouts in the Amazon Elastic Container Service Developer Guide.

Returns:



2712
2713
2714
2715
2716
2717
2718
2719
2720
2721
# File 'gems/aws-sdk-batch/lib/aws-sdk-batch/types.rb', line 2712

class RegisterJobDefinitionRequest < Struct.new(
  :job_definition_name,
  :type,
  :parameters,
  :container_properties,
  :node_properties,
  :retry_strategy,
  :timeout)
  include Aws::Structure
end

#typeString

The type of job definition.

Returns:

  • (String)


2712
2713
2714
2715
2716
2717
2718
2719
2720
2721
# File 'gems/aws-sdk-batch/lib/aws-sdk-batch/types.rb', line 2712

class RegisterJobDefinitionRequest < Struct.new(
  :job_definition_name,
  :type,
  :parameters,
  :container_properties,
  :node_properties,
  :retry_strategy,
  :timeout)
  include Aws::Structure
end