Skip to main content

executions

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

Overview

Nameexecutions
TypeResource
Idgoogle.workflowexecutions.executions

Fields

NameDatatypeDescription
namestringOutput only. The resource name of the execution. Format: projects/{project}/locations/{location}/workflows/{workflow}/executions/{execution}
argumentstringInput parameters of the execution represented as a JSON string. The size limit is 32KB. Note: If you are using the REST API directly to run your workflow, you must escape any JSON string value of argument. Example: '{"argument":"{\"firstName\":\"FIRST\",\"lastName\":\"LAST\"}"}'
callLogLevelstringThe call logging level associated to this execution.
createTimestringOutput only. Marks the creation of the execution.
disableConcurrencyQuotaOverflowBufferingbooleanOptional. If set to true, the execution will not be backlogged when the concurrency quota is exhausted. The backlog execution starts when the concurrency quota becomes available.
durationstringOutput only. Measures the duration of the execution.
endTimestringOutput only. Marks the end of execution, successful or not.
errorobjectError describes why the execution was abnormally terminated.
executionHistoryLevelstringOptional. Describes the level of the execution history feature to apply to this execution. If not specified, the level of the execution history feature will be determined by its workflow's execution history level. If the value is different from its workflow's value, it will override the workflow's execution history level for this exeuction.
labelsobjectLabels associated with this execution. Labels can contain at most 64 entries. Keys and values can be no longer than 63 characters and can only contain lowercase letters, numeric characters, underscores, and dashes. Label keys must start with a letter. International characters are allowed. By default, labels are inherited from the workflow but are overridden by any labels associated with the execution.
resultstringOutput only. Output of the execution represented as a JSON string. The value can only be present if the execution's state is SUCCEEDED.
startTimestringOutput only. Marks the beginning of execution.
statestringOutput only. Current state of the execution.
stateErrorobjectDescribes an error related to the current state of the Execution resource.
statusobjectRepresents the current status of this execution.
workflowRevisionIdstringOutput only. Revision of the workflow this execution is using.

Methods

NameAccessible byRequired ParamsDescription
getSELECTexecutionsId, locationsId, projectsId, workflowsIdReturns an execution of the given name.
listSELECTlocationsId, projectsId, workflowsIdReturns a list of executions which belong to the workflow with the given name. The method returns executions of all workflow revisions. Returned executions are ordered by their start time (newest first).
createINSERTlocationsId, projectsId, workflowsIdCreates a new execution using the latest revision of the given workflow. For more information, see Execute a workflow.
cancelEXECexecutionsId, locationsId, projectsId, workflowsIdCancels an execution of the given name.
export_dataEXECexecutionsId, locationsId, projectsId, workflowsIdReturns all metadata stored about an execution, excluding most data that is already accessible using other API methods.

SELECT examples

Returns a list of executions which belong to the workflow with the given name. The method returns executions of all workflow revisions. Returned executions are ordered by their start time (newest first).

SELECT
name,
argument,
callLogLevel,
createTime,
disableConcurrencyQuotaOverflowBuffering,
duration,
endTime,
error,
executionHistoryLevel,
labels,
result,
startTime,
state,
stateError,
status,
workflowRevisionId
FROM google.workflowexecutions.executions
WHERE locationsId = '{{ locationsId }}'
AND projectsId = '{{ projectsId }}'
AND workflowsId = '{{ workflowsId }}';

INSERT example

Use the following StackQL query and manifest file to create a new executions resource.

/*+ create */
INSERT INTO google.workflowexecutions.executions (
locationsId,
projectsId,
workflowsId,
argument,
callLogLevel,
labels,
disableConcurrencyQuotaOverflowBuffering,
executionHistoryLevel
)
SELECT
'{{ locationsId }}',
'{{ projectsId }}',
'{{ workflowsId }}',
'{{ argument }}',
'{{ callLogLevel }}',
'{{ labels }}',
{{ disableConcurrencyQuotaOverflowBuffering }},
'{{ executionHistoryLevel }}'
;