Skip to main content

evaluations

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

Overview

Nameevaluations
TypeResource
Idgoogle.workloadmanager.evaluations

Fields

The following fields are returned by SELECT queries:

Successful response

NameDatatypeDescription
namestringname of resource names have the form 'projects/{project_id}/locations/{location_id}/evaluations/{evaluation_id}'
bigQueryDestinationobjectOptional. BigQuery destination (id: BigQueryDestination)
createTimestring (google-datetime)Output only. [Output only] Create time stamp
customRulesBucketstringThe Cloud Storage bucket name for custom rules.
descriptionstringDescription of the Evaluation
evaluationTypestringEvaluation type
kmsKeystringOptional. Immutable. Customer-managed encryption key name, in the format projects//locations//keyRings//cryptoKeys/.
labelsobjectLabels as key value pairs
resourceFilterobjectannotations as key value pairs (id: ResourceFilter)
resourceStatusobjectOutput only. [Output only] The updated rule ids if exist. (id: ResourceStatus)
ruleNamesarraythe name of the rule
ruleVersionsarrayOutput only. [Output only] The updated rule ids if exist.
schedulestringcrontab format schedule for scheduled evaluation, currently only support the following schedule: "0 */1 * * *", "0 */6 * * *", "0 */12 * * *", "0 0 */1 * *", "0 0 */7 * *",
updateTimestring (google-datetime)Output only. [Output only] Update time stamp

Methods

The following methods are available for this resource:

NameAccessible byRequired ParamsOptional ParamsDescription
getselectprojectsId, locationsId, evaluationsIdGets details of a single Evaluation.
listselectprojectsId, locationsIdpageSize, pageToken, filter, orderByLists Evaluations in a given project and location.
createinsertprojectsId, locationsIdevaluationId, requestIdCreates a new Evaluation in a given project and location.
deletedeleteprojectsId, locationsId, evaluationsIdrequestId, forceDeletes a single Evaluation.

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

SELECT examples

Gets details of a single Evaluation.

SELECT
name,
bigQueryDestination,
createTime,
customRulesBucket,
description,
evaluationType,
kmsKey,
labels,
resourceFilter,
resourceStatus,
ruleNames,
ruleVersions,
schedule,
updateTime
FROM google.workloadmanager.evaluations
WHERE projectsId = '{{ projectsId }}' -- required
AND locationsId = '{{ locationsId }}' -- required
AND evaluationsId = '{{ evaluationsId }}' -- required;

INSERT examples

Creates a new Evaluation in a given project and location.

INSERT INTO google.workloadmanager.evaluations (
data__name,
data__description,
data__resourceFilter,
data__ruleNames,
data__labels,
data__schedule,
data__customRulesBucket,
data__evaluationType,
data__bigQueryDestination,
data__kmsKey,
projectsId,
locationsId,
evaluationId,
requestId
)
SELECT
'{{ name }}',
'{{ description }}',
'{{ resourceFilter }}',
'{{ ruleNames }}',
'{{ labels }}',
'{{ schedule }}',
'{{ customRulesBucket }}',
'{{ evaluationType }}',
'{{ bigQueryDestination }}',
'{{ kmsKey }}',
'{{ projectsId }}',
'{{ locationsId }}',
'{{ evaluationId }}',
'{{ requestId }}'
RETURNING
name,
done,
error,
metadata,
response
;

DELETE examples

Deletes a single Evaluation.

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