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",
    execution_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
        },
      ],
      init_process_enabled: false,
      shared_memory_size: 1,
      tmpfs: [
        {
          container_path: "String", # required
          size: 1, # required
          mount_options: ["String"],
        },
      ],
      max_swap: 1,
      swappiness: 1,
    },
    log_configuration: {
      log_driver: "json-file", # required, accepts json-file, syslog, journald, gelf, fluentd, awslogs, splunk
      options: {
        "String" => "String",
      },
      secret_options: [
        {
          name: "String", # required
          value_from: "String", # required
        },
      ],
    },
    secrets: [
      {
        name: "String", # required
        value_from: "String", # required
      },
    ],
  },
  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",
          execution_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
              },
            ],
            init_process_enabled: false,
            shared_memory_size: 1,
            tmpfs: [
              {
                container_path: "String", # required
                size: 1, # required
                mount_options: ["String"],
              },
            ],
            max_swap: 1,
            swappiness: 1,
          },
          log_configuration: {
            log_driver: "json-file", # required, accepts json-file, syslog, journald, gelf, fluentd, awslogs, splunk
            options: {
              "String" => "String",
            },
            secret_options: [
              {
                name: "String", # required
                value_from: "String", # required
              },
            ],
          },
          secrets: [
            {
              name: "String", # required
              value_from: "String", # required
            },
          ],
        },
      },
    ],
  },
  retry_strategy: {
    attempts: 1,
  },
  timeout: {
    attempt_duration_seconds: 1,
  },
}

Constant Summary collapse

SENSITIVE =
[]

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.



3269
3270
3271
3272
3273
3274
3275
3276
3277
3278
3279
# File 'gems/aws-sdk-batch/lib/aws-sdk-batch/types.rb', line 3269

class RegisterJobDefinitionRequest < Struct.new(
  :job_definition_name,
  :type,
  :parameters,
  :container_properties,
  :node_properties,
  :retry_strategy,
  :timeout)
  SENSITIVE = []
  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)


3269
3270
3271
3272
3273
3274
3275
3276
3277
3278
3279
# File 'gems/aws-sdk-batch/lib/aws-sdk-batch/types.rb', line 3269

class RegisterJobDefinitionRequest < Struct.new(
  :job_definition_name,
  :type,
  :parameters,
  :container_properties,
  :node_properties,
  :retry_strategy,
  :timeout)
  SENSITIVE = []
  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.



3269
3270
3271
3272
3273
3274
3275
3276
3277
3278
3279
# File 'gems/aws-sdk-batch/lib/aws-sdk-batch/types.rb', line 3269

class RegisterJobDefinitionRequest < Struct.new(
  :job_definition_name,
  :type,
  :parameters,
  :container_properties,
  :node_properties,
  :retry_strategy,
  :timeout)
  SENSITIVE = []
  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>)


3269
3270
3271
3272
3273
3274
3275
3276
3277
3278
3279
# File 'gems/aws-sdk-batch/lib/aws-sdk-batch/types.rb', line 3269

class RegisterJobDefinitionRequest < Struct.new(
  :job_definition_name,
  :type,
  :parameters,
  :container_properties,
  :node_properties,
  :retry_strategy,
  :timeout)
  SENSITIVE = []
  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.



3269
3270
3271
3272
3273
3274
3275
3276
3277
3278
3279
# File 'gems/aws-sdk-batch/lib/aws-sdk-batch/types.rb', line 3269

class RegisterJobDefinitionRequest < Struct.new(
  :job_definition_name,
  :type,
  :parameters,
  :container_properties,
  :node_properties,
  :retry_strategy,
  :timeout)
  SENSITIVE = []
  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:



3269
3270
3271
3272
3273
3274
3275
3276
3277
3278
3279
# File 'gems/aws-sdk-batch/lib/aws-sdk-batch/types.rb', line 3269

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

#typeString

The type of job definition.

Returns:

  • (String)


3269
3270
3271
3272
3273
3274
3275
3276
3277
3278
3279
# File 'gems/aws-sdk-batch/lib/aws-sdk-batch/types.rb', line 3269

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