Skip to main content

workflow_instances

Creates, updates, deletes, gets or lists a workflow_instances resource.

Overview

Nameworkflow_instances
TypeResource
Iddatadog.software_delivery.workflow_instances

Fields

The following fields are returned by SELECT queries:

NameDatatypeDescription
attributesobjectThe attributes of the instance response data.

Methods

The following methods are available for this resource:

NameAccessible byRequired ParamsOptional ParamsDescription
get_workflow_instanceselectworkflow_id, instance_idGet 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_instancesselectworkflow_idpage[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_instanceinsertworkflow_idExecute 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_instanceexecworkflow_id, instance_idCancels 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.

NameDatatypeDescription
instance_idstringThe ID of the workflow instance.
sitestringThe 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_idstringThe 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 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
;

INSERT examples

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
;

Lifecycle Methods

EXEC variables use wire (API) names.

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
;