workflow_instances
Creates, updates, deletes, gets or lists a workflow_instances resource.
Overview
| Name | workflow_instances |
| Type | Resource |
| Id | datadog.software_delivery.workflow_instances |
Fields
The following fields are returned by SELECT queries:
- get_workflow_instance
- list_workflow_instances
| Name | Datatype | Description |
|---|---|---|
attributes | object | The attributes of the instance response data. |
| Name | Datatype | Description |
|---|---|---|
id | string | The ID of the workflow instance |
Methods
The following methods are available for this resource:
| Name | Accessible by | Required Params | Optional Params | Description |
|---|---|---|---|---|
get_workflow_instance | select | workflow_id, instance_id | Get a specific execution of a given workflow. This API requires a [registered application key](https://docs.datadoghq.com/api/latest/action-connection/#register-a-new-app-key). Alternatively, you can configure these permissions [in the UI](https://docs.datadoghq.com/account_management/api-app-keys/#actions-api-access). | |
list_workflow_instances | select | workflow_id | page[size], page[number] | List all instances of a given workflow. This API requires a [registered application key](https://docs.datadoghq.com/api/latest/action-connection/#register-a-new-app-key). Alternatively, you can configure these permissions [in the UI](https://docs.datadoghq.com/account_management/api-app-keys/#actions-api-access). |
create_workflow_instance | insert | workflow_id | Execute the given workflow. This API requires a [registered application key](https://docs.datadoghq.com/api/latest/action-connection/#register-a-new-app-key). Alternatively, you can configure these permissions [in the UI](https://docs.datadoghq.com/account_management/api-app-keys/#actions-api-access). | |
cancel_workflow_instance | exec | workflow_id, instance_id | Cancels a specific execution of a given workflow. This API requires a [registered application key](https://docs.datadoghq.com/api/latest/action-connection/#register-a-new-app-key). Alternatively, you can configure these permissions [in the UI](https://docs.datadoghq.com/account_management/api-app-keys/#actions-api-access). |
Parameters
Parameters can be passed in the WHERE clause of a query. Check the Methods section to see which parameters are required or optional for each operation.
| Name | Datatype | Description |
|---|---|---|
instance_id | string | The ID of the workflow instance. |
site | string | The Datadog site (region) for your organization, for example datadoghq.com, us3.datadoghq.com, us5.datadoghq.com, ap1.datadoghq.com, ap2.datadoghq.com, datadoghq.eu, ddog-gov.com. Resolved from the DD_SITE environment variable when set. Optional: defaults to datadoghq.com, or the value of the DD_SITE environment variable when set; a WHERE value overrides both. |
workflow_id | string | The ID of the workflow. |
page[number] | integer (int64) | Specific page number to return. |
page[size] | integer (int64) | Number of items to return per page. The maximum allowed value is 100. |
SELECT examples
- get_workflow_instance
- list_workflow_instances
Get a specific execution of a given workflow. This API requires a registered application key. Alternatively, you can configure these permissions in the UI.
SELECT
attributes
FROM datadog.software_delivery.workflow_instances
WHERE workflow_id = '{{ workflow_id }}' -- required
AND instance_id = '{{ instance_id }}' -- required
;
List all instances of a given workflow. This API requires a registered application key. Alternatively, you can configure these permissions in the UI.
SELECT
id
FROM datadog.software_delivery.workflow_instances
WHERE workflow_id = '{{ workflow_id }}' -- required
AND page[size] = '{{ page[size] }}'
AND page[number] = '{{ page[number] }}'
;
INSERT examples
- create_workflow_instance
- Manifest
Execute the given workflow. This API requires a registered application key. Alternatively, you can configure these permissions in the UI.
INSERT INTO datadog.software_delivery.workflow_instances (
meta,
workflow_id
)
SELECT
'{{ meta }}',
'{{ workflow_id }}'
RETURNING
data
;
# Description fields are for documentation purposes
- name: workflow_instances
props:
- name: workflow_id
value: "{{ workflow_id }}"
description: Required parameter for the workflow_instances resource.
- name: meta
description: |
Additional information for creating a workflow instance.
value:
payload: "{{ payload }}"
Lifecycle Methods
EXEC variables use wire (API) names.
- cancel_workflow_instance
Cancels a specific execution of a given workflow. This API requires a registered application key. Alternatively, you can configure these permissions in the UI.
EXEC datadog.software_delivery.workflow_instances.cancel_workflow_instance
@workflow_id='{{ workflow_id }}' --required,
@instance_id='{{ instance_id }}' --required
;