Skip to content

BatchSchedulingPolicy

Bases: DuploResourceV3

Manage AWS Batch Scheduling Policies

Run batch jobs as a managed service on AWS infrastructure.

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

Commands

apply

Apply a BatchSchedulingPolicy

Create or Update a BatchSchedulingPolicy resource with Duplocloud cli.

CLI Usage

duploctl batch_scheduling_policy apply -f 'batchschedulingpolicy.yaml'
Contents of the batchschedulingpolicy.yaml file
FairsharePolicy:
  ShareDecaySeconds: 10
  ComputeReservation: 1
  ShareDistribution:
  - ShareIdentifier: SomeIdentifier
    WeightFactor: 0.1
Name: duploctl
Tags:
  Key: Value

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 BatchSchedulingPolicy resource.

CLI Usage

duploctl batch_scheduling_policy create -f 'batchschedulingpolicy.yaml'
Contents of the batchschedulingpolicy.yaml file
FairsharePolicy:
  ShareDecaySeconds: 10
  ComputeReservation: 1
  ShareDistribution:
  - ShareIdentifier: SomeIdentifier
    WeightFactor: 0.1
Name: duploctl
Tags:
  Key: Value

One liner example
echo """
FairsharePolicy:
  ShareDecaySeconds: 10
  ComputeReservation: 1
  ShareDistribution:
  - ShareIdentifier: SomeIdentifier
    WeightFactor: 0.1
Name: duploctl
Tags:
  Key: Value
""" | duploctl batch_scheduling_policy create -f -

Returns:

Name Type Description
message dict

Success message.

Raises:

Type Description
DuploError

If the resource could not be created.

Parameters:

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

delete

Delete a BatchSchedulingPolicy resource by name.

cli usage
duploctl batch_scheduling_policy 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

find

Find BatchSchedulingPolicy resources by name.

cli usage
duploctl batch_scheduling_policy find <name>

Returns:

Name Type Description
resource dict

The BatchSchedulingPolicy object.

Raises:

Type Description
DuploError

If the {{kind}} could not be found.

Parameters:

name positional
The resource name
str

list

Retrieve a List of BatchSchedulingPolicy resources

cli usage
duploctl batch_scheduling_policy list

Returns:

Name Type Description
list list

A list of BatchSchedulingPolicy.

update

Update a Batch Scheduling Policy.

The DuploCloud backend expects PUT to the collection endpoint with the resource identified by the body, not by the URL path.

CLI Usage
duploctl batch_scheduling_policy update <name>

Returns:

Name Type Description
resource dict

The updated scheduling policy.

Raises:

Type Description
DuploError

If the scheduling policy could not be updated.

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