Skip to content

BatchSchedulingPolicy

Bases: DuploTenantResourceV3

Manage AWS Batch Scheduling Policies

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 BatchSchedulingPolicy

Create or Update a BatchSchedulingPolicy resource with Duplocloud cli.

CLI Usage

duploctl batchschedulingpolicy 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

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

CLI Usage

duploctl batchschedulingpolicy 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 batchschedulingpolicy create -f -

Parameters:

Name Type Description Default
body BODY

The resource to create.

required
wait

Wait for the resource to be created.

required
wait_check callable

A callable function to check if the resource

None

Returns:

Name Type Description
message dict

Success message.

Raises:

Type Description
DuploError

If the resource could not be created.

delete

Delete a BatchSchedulingPolicy resource by name.

cli usage
duploctl batchschedulingpolicy delete <name>

Parameters:

Name Type Description Default
name NAME

The name of the BatchSchedulingPolicy 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 BatchSchedulingPolicy resources by name.

cli usage
duploctl batchschedulingpolicy find <name>

Parameters:

Name Type Description Default
name NAME

The name of the BatchSchedulingPolicy resource to find.

required

Returns:

Name Type Description
resource dict

The BatchSchedulingPolicy object.

Raises:

Type Description
DuploError

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

list

Retrieve a List of BatchSchedulingPolicy resources

cli usage
duploctl batchschedulingpolicy list

Returns:

Name Type Description
list list

A list of BatchSchedulingPolicy.

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.