BatchDefinition
Bases: DuploTenantResourceV3
Manage AWS Batch Job Definition Resources
Manage batch Job Definitions as a resource in Duplo.
Read more docs here: https://docs.duplocloud.com/docs/overview/aws-services/batch
apply
Apply a BatchDefinition
Create or Update a BatchDefinition resource with Duplocloud cli.
CLI Usage
Contents of thebatchdefinition.yaml
file
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 Definition resource.
CLI Usage
Contents of thebatchdefinition.yaml
file
One liner example
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 Batch Job Definition by name.
Parameters:
Name | Type | Description | Default |
---|---|---|---|
name
|
NAME
|
The name of the Batch Job Definition to delete. |
required |
to_revision
|
TO_REVISION
|
The specific revision of the Batch Job Definition to delete. If negative it will walk back that number of revisions from whatever number is the highest revision. |
None
|
Returns:
Name | Type | Description |
---|---|---|
message |
dict
|
Success message. |
find
Find a Single Batch Job Definition by name.
Example
Find the previous revision to the latest. This is what you would use to do a rollback.
Example
Find the earliest revision of a job definition.
Parameters:
Name | Type | Description | Default |
---|---|---|---|
name
|
NAME
|
The name of the Batch Job Definition to find. |
required |
to_revision
|
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. The default is -1 which will return the latest. |
None
|
Returns:
Name | Type | Description |
---|---|---|
resource |
dict
|
The Batch Job Definition object. |
list
List all Batch Job Definitions.
Example
Retrieve all of the revision IDs for one job definition using JMESPATH query and output as yaml
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. |