ArgoWorkflow
Bases: DuploResource
Resource for creating and managing Argo Workflow resources in DuploCloud.
This resource provides commands to interact with Argo Workflows via the DuploCloud proxy. It handles the two-step authentication: first obtaining an Argo token from Duplo, then using that token to communicate with the Argo Workflow API.
namespace
property
Get the Kubernetes namespace for the current tenant using system prefix.
info
This is not a cli command. It's used internally.
tenant
property
Get the current tenant.
info
This is not a cli command. It's used internally.
tenant_id
property
Get the current tenant ID.
info
This is not a cli command. It's used internally.
auth
Get Argo Authentication Info
Retrieve the Argo Workflow authentication token and admin status for the current tenant.
Basic CLI Use
```bash duploctl argo_wf auth
if response.status_code == 204 or not response.content: return {} return response.json()
Returns: dict: Authentication info with Token, IsAdmin, TenantId, ExpiresAt
create_template
Create Workflow Template
Create a new workflow template.
Basic CLI Use
Contents of thetemplate.yaml file
Parameters:
| Name | Type | Description | Default |
|---|---|---|---|
body
|
BODY
|
The workflow template specification. |
required |
Returns:
| Name | Type | Description |
|---|---|---|
dict |
dict
|
The created workflow template object. |
delete_template
Delete Workflow Template
Delete a workflow template by name.
Parameters:
| Name | Type | Description | Default |
|---|---|---|---|
name
|
NAME
|
The name of the workflow template to delete. |
required |
Returns:
| Name | Type | Description |
|---|---|---|
dict |
dict
|
Deletion confirmation. |
delete_workflow
Delete Workflow
Delete a workflow by name.
Parameters:
| Name | Type | Description | Default |
|---|---|---|---|
name
|
NAME
|
The name of the workflow to delete. |
required |
Returns:
| Name | Type | Description |
|---|---|---|
dict |
dict
|
Deletion confirmation. |
get_template
Get Workflow Template
Retrieve a specific workflow template by name.
Parameters:
| Name | Type | Description | Default |
|---|---|---|---|
name
|
NAME
|
The name of the workflow template. |
required |
Returns:
| Name | Type | Description |
|---|---|---|
dict |
dict
|
The workflow template object. |
get_workflow
Get Workflow
Retrieve a specific workflow by name.
Parameters:
| Name | Type | Description | Default |
|---|---|---|---|
name
|
NAME
|
The name of the workflow. |
required |
Returns:
| Name | Type | Description |
|---|---|---|
dict |
dict
|
The workflow object. |
list_templates
list_workflows
submit
Submit Workflow
Submit a new workflow from a workflow spec.
Basic CLI Use
Contents of theworkflow.yaml file
Parameters:
| Name | Type | Description | Default |
|---|---|---|---|
body
|
BODY
|
The workflow specification. |
required |
Returns:
| Name | Type | Description |
|---|---|---|
dict |
dict
|
The created workflow object. |
wait
Wait for Resource
Waits for a the given wait_check callable to complete successfully. If the global wait_timeout is set on the DuploClient, it will override the timeout parameter so that a user can always choose their own timeout for waiting operations. The timeout param for other functions is just a default value for that particular resource operation.
Parameters:
| Name | Type | Description | Default |
|---|---|---|---|
wait_check
|
callable
|
A callable function to check if the resource is ready. |
required |
timeout
|
int
|
The maximum time to wait in seconds. Default is 3600 seconds (1 hour). |
3600
|
poll
|
int
|
The polling interval in seconds. Default is 10 seconds. |
10
|