Skip to main content

executions

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

Overview​

Nameexecutions
TypeResource
Idgoogle.workloadmanager.executions

Fields​

The following fields are returned by SELECT queries:

NameDatatypeDescription
namestringThe name of execution resource. The format is projects/{project}/locations/{location}/evaluations/{evaluation}/executions/{execution}.
endTimestring (google-datetime)Output only. [Output only] End time stamp.
enginestringOptional. Engine. (ENGINE_UNSPECIFIED, ENGINE_SCANNER, V2)
evaluationIdstringOutput only. [Output only] Evaluation ID.
externalDataSourcesarrayOptional. External data sources.
inventoryTimestring (google-datetime)Output only. [Output only] Inventory time stamp.
labelsobjectLabels as key value pairs.
noticesarrayOutput only. Additional information generated by the execution.
resultSummaryobjectOutput only. [Output only] Result summary for the execution. (id: Summary)
ruleResultsarrayOutput only. Execution result summary per rule.
runTypestringType which represents whether the execution executed directly by user or scheduled according to the Evaluation.schedule field. (TYPE_UNSPECIFIED, ONE_TIME, SCHEDULED)
startTimestring (google-datetime)Output only. [Output only] Start time stamp.
statestringOutput only. [Output only] State. (STATE_UNSPECIFIED, RUNNING, SUCCEEDED, FAILED)

Methods​

The following methods are available for this resource:

NameAccessible byRequired ParamsOptional ParamsDescription
getselectprojectsId, locationsId, evaluationsId, executionsIdGets details of a single Execution.
listselectprojectsId, locationsId, evaluationsIdfilter, orderBy, pageSize, pageTokenLists Executions in a given project and location.
deletedeleteprojectsId, locationsId, evaluationsId, executionsIdrequestIdDeletes a single Execution.
runexecprojectsId, locationsId, evaluationsIdCreates a new Execution in a given project and location.

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
evaluationsIdstring
executionsIdstring
locationsIdstring
projectsIdstring
filterstring
orderBystring
pageSizeinteger (int32)
pageTokenstring
requestIdstring

SELECT examples​

Gets details of a single Execution.

SELECT
name,
endTime,
engine,
evaluationId,
externalDataSources,
inventoryTime,
labels,
notices,
resultSummary,
ruleResults,
runType,
startTime,
state
FROM google.workloadmanager.executions
WHERE projectsId = '{{ projectsId }}' -- required
AND locationsId = '{{ locationsId }}' -- required
AND evaluationsId = '{{ evaluationsId }}' -- required
AND executionsId = '{{ executionsId }}' -- required
;

DELETE examples​

Deletes a single Execution.

DELETE FROM google.workloadmanager.executions
WHERE projectsId = '{{ projectsId }}' --required
AND locationsId = '{{ locationsId }}' --required
AND evaluationsId = '{{ evaluationsId }}' --required
AND executionsId = '{{ executionsId }}' --required
AND requestId = '{{ requestId }}'
;

Lifecycle Methods​

Creates a new Execution in a given project and location.

EXEC google.workloadmanager.executions.run
@projectsId='{{ projectsId }}' --required,
@locationsId='{{ locationsId }}' --required,
@evaluationsId='{{ evaluationsId }}' --required
@@json=
'{
"execution": "{{ execution }}",
"executionId": "{{ executionId }}",
"requestId": "{{ requestId }}"
}'
;