Examples:
Example: To register a job definition
resp = client.register_job_definition({
type: "container",
container_properties: {
command: [
"sleep",
"10",
],
image: "busybox",
memory: 128,
vcpus: 1,
},
job_definition_name: "sleep10",
})
{
job_definition_arn: "arn:aws:batch:us-east-1:012345678910:job-definition/sleep10:1",
job_definition_name: "sleep10",
revision: 1,
}
Example: RegisterJobDefinition with tags
resp = client.register_job_definition({
type: "container",
container_properties: {
command: [
"sleep",
"30",
],
image: "busybox",
memory: 128,
vcpus: 1,
},
job_definition_name: "sleep30",
tags: {
"Department" => "Engineering",
"User" => "JaneDoe",
},
})
{
job_definition_arn: "arn:aws:batch:us-east-1:012345678910:job-definition/sleep30:1",
job_definition_name: "sleep30",
revision: 1,
}
Request syntax with placeholder values
resp = client.register_job_definition({
job_definition_name: "String", type: "container", 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, name: "String", soft_limit: 1, },
],
user: "String",
instance_type: "String",
resource_requirements: [
{
value: "String", type: "GPU", },
],
linux_parameters: {
devices: [
{
host_path: "String", container_path: "String",
permissions: ["READ"], },
],
init_process_enabled: false,
shared_memory_size: 1,
tmpfs: [
{
container_path: "String", size: 1, mount_options: ["String"],
},
],
max_swap: 1,
swappiness: 1,
},
log_configuration: {
log_driver: "json-file", options: {
"String" => "String",
},
secret_options: [
{
name: "String", value_from: "String", },
],
},
secrets: [
{
name: "String", value_from: "String", },
],
},
node_properties: {
num_nodes: 1, main_node: 1, node_range_properties: [ {
target_nodes: "String", 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, name: "String", soft_limit: 1, },
],
user: "String",
instance_type: "String",
resource_requirements: [
{
value: "String", type: "GPU", },
],
linux_parameters: {
devices: [
{
host_path: "String", container_path: "String",
permissions: ["READ"], },
],
init_process_enabled: false,
shared_memory_size: 1,
tmpfs: [
{
container_path: "String", size: 1, mount_options: ["String"],
},
],
max_swap: 1,
swappiness: 1,
},
log_configuration: {
log_driver: "json-file", options: {
"String" => "String",
},
secret_options: [
{
name: "String", value_from: "String", },
],
},
secrets: [
{
name: "String", value_from: "String", },
],
},
},
],
},
retry_strategy: {
attempts: 1,
evaluate_on_exit: [
{
on_status_reason: "String",
on_reason: "String",
on_exit_code: "String",
action: "RETRY", },
],
},
timeout: {
attempt_duration_seconds: 1,
},
tags: {
"TagKey" => "TagValue",
},
})
Response structure
resp.job_definition_name resp.job_definition_arn resp.revision
RetroSearch is an open source project built by @garambo | Open a GitHub Issue
Search and Browse the WWW like it's 1997 | Search results from DuckDuckGo
HTML:
3.2
| Encoding:
UTF-8
| Version:
0.7.4