Skip to content

BatchJob

Bases: DuploTenantResourceV3

Manage AWS Batch Job Resources

Run batch jobs as a managed service on AWS infrastructure.

Read more docs here: https://docs.duplocloud.com/docs/overview/aws-services/batch

apply

Apply a BatchJob

Create or Update a BatchJob resource with Duplocloud cli.

CLI Usage

duploctl batchjob apply -f 'batchjob.yaml'
Contents of the batchjob.yaml file
shareIdentifier: SomeIdentifier
schedulingPriorityOverride: 3
JobName: duploctl-big
JobDefinition: duploctl
JobQueue: mublet
ContainerOverrides:
  Command:
  - echo
  - hiii
  Environment:
  - name: KEY1
    value: '123'

Parameters:

Name Type Description Default
body BODY

The resource to apply.

required
wait WAIT

Wait for the resource to be created.

False
patches PATCHES

The patches to apply to the resource.

None

Returns:

Name Type Description
message dict

Success message.

create

Create a Batch Job resource.

CLI Usage

duploctl batch_job create -f 'batchjob.yaml'
Contents of the batchjob.yaml file
shareIdentifier: SomeIdentifier
schedulingPriorityOverride: 3
JobName: duploctl-big
JobDefinition: duploctl
JobQueue: mublet
ContainerOverrides:
  Command:
  - echo
  - hiii
  Environment:
  - name: KEY1
    value: '123'

One liner example
echo """
shareIdentifier: SomeIdentifier
schedulingPriorityOverride: 3
JobName: duploctl-big
JobDefinition: duploctl
JobQueue: mublet
ContainerOverrides:
  Command:
  - echo
  - hiii
  Environment:
  - name: KEY1
    value: '123'
""" | duploctl batch_job create -f -

Parameters:

Name Type Description Default
body BODY

The resource to create.

required

Returns:

Name Type Description
message dict

Success message.

Raises:

Type Description
DuploError

If the resource could not be created.

delete

Delete a BatchJob resource by name.

cli usage
duploctl batchjob delete <name>

Parameters:

Name Type Description Default
name NAME

The name of the BatchJob resource to delete.

required

Returns:

Name Type Description
message dict

A success message.

Raises:

Type Description
DuploError

If the {{kind}} resource could not be found or deleted.

find

Find a Single Batch Job by name.

cli usage
duploctl batch_definition find <name> <queue_name>

Parameters:

Name Type Description Default
name NAME

The name of the Batch Job Definition to find.

None
queue_name

The name of the Batch Queue for this job.

required
to_revision

The specific revision of the Batch Job Definition to find. If negative it will walk back that number of revisions from whatever number is the highest revision.

required

Returns:

Name Type Description
resource dict

The Batch Job Definition object.

list

List all Batch Job Definitions.

Usage
duploctl batch_job list <queue_name>

Parameters:

Name Type Description Default
queue_name

The name of the Batch Queue for this list of jobs.

required
all ALL

If true, list all jobs in all queues.

False

Returns:

Name Type Description
list list

A list of Batch Job Definitions.

update

Update a V3 resource by name.

Parameters:

Name Type Description Default
name NAME

The name of the resource to update.

None
body BODY

The resource to update.

None
patches PATCHES

The patches to apply to the resource.

None

Returns:

Name Type Description
message

Success message.

Raises:

Type Description
DuploError

If the resource could not be created.