Skip to content

BatchCompute

Bases: DuploResourceV3

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

Commands

apply

Apply a BatchCompute

Create or Update a BatchCompute resource with Duplocloud cli.

CLI Usage

duploctl batchcompute apply -f 'batchcompute.yaml'
Contents of the batchcompute.yaml file
ComputeEnvironmentName: duploctl
ComputeResources:
  InstanceTypes:
  - optimal
  AllocationStrategy: BEST_FIT
  Type: EC2
  MaxvCpus: 256
  MinvCpus: 1
  DesiredvCpus: 1
  BidPercentage: 100

Returns:

Name Type Description
message dict

Success message.

Parameters:

--file, -f, --cli-input
A file to read the input from
FileType('r') action: YamlAction
--patches, --add, --remove, --copy, --replace, --test, --move
The json patch to apply
str action: JsonPatchAction

create

Create a Batch Compute Environment.

Creates a new Batch Compute Environment with the specified configuration.

Basic CLI Use
duploctl batch_compute create -f batch_compute.yaml

Returns:

Name Type Description
dict dict

The created Batch Compute Environment object.

Parameters:

--file, -f, --cli-input
A file to read the input from
FileType('r') action: YamlAction

delete

Delete a BatchCompute resource by name.

cli usage
duploctl batchcompute delete <name>

Returns:

Name Type Description
message dict

A success message.

Raises:

Type Description
DuploError

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

Parameters:

name positional
The resource name
str

disable

Disable a Batch Compute Environment.

cli usage
duploctl batch_compute delete <name>

Returns:

Name Type Description
message dict

A success message.

Raises:

Type Description
DuploError

If the Batch Compute Environment could not be found or deleted.

Parameters:

name positional
The resource name
str

find

Find a Single Batch Compute Environment by name.

cli usage
duploctl batch_compute find <name>

Returns:

Name Type Description
resource dict

The Batch Compute Environment object.

Parameters:

name positional
The resource name
str

list

Retrieve a List of BatchCompute resources

cli usage
duploctl batchcompute list

Returns:

Name Type Description
list list

A list of BatchCompute.

update

Update a V3 resource by name.

Returns:

Name Type Description
message

Success message.

Raises:

Type Description
DuploError

If the resource could not be created.

Parameters:

name positional
The resource name
str
--file, -f, --cli-input
A file to read the input from
FileType('r') action: YamlAction
--patches, --add, --remove, --copy, --replace, --test, --move
The json patch to apply
str action: JsonPatchAction

Methods

name_from_body