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:

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, orderBy, filterLists Evaluations in a given project and location.
createinsertprojectsId, locationsIdevaluationId, requestIdCreates a new Evaluation in a given project and location.
patchupdateprojectsId, locationsId, evaluationsIdrequestId, updateMaskUpdates the parameters of a single Evaluation.
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
updateMaskstring (google-fieldmask)

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__kmsKey,
data__schedule,
data__ruleNames,
data__resourceFilter,
data__labels,
data__bigQueryDestination,
data__description,
data__name,
data__customRulesBucket,
data__evaluationType,
projectsId,
locationsId,
evaluationId,
requestId
)
SELECT
'{{ kmsKey }}',
'{{ schedule }}',
'{{ ruleNames }}',
'{{ resourceFilter }}',
'{{ labels }}',
'{{ bigQueryDestination }}',
'{{ description }}',
'{{ name }}',
'{{ customRulesBucket }}',
'{{ evaluationType }}',
'{{ projectsId }}',
'{{ locationsId }}',
'{{ evaluationId }}',
'{{ requestId }}'
RETURNING
name,
done,
error,
metadata,
response
;

UPDATE examples

Updates the parameters of a single Evaluation.

UPDATE google.workloadmanager.evaluations
SET
data__kmsKey = '{{ kmsKey }}',
data__schedule = '{{ schedule }}',
data__ruleNames = '{{ ruleNames }}',
data__resourceFilter = '{{ resourceFilter }}',
data__labels = '{{ labels }}',
data__bigQueryDestination = '{{ bigQueryDestination }}',
data__description = '{{ description }}',
data__name = '{{ name }}',
data__customRulesBucket = '{{ customRulesBucket }}',
data__evaluationType = '{{ evaluationType }}'
WHERE
projectsId = '{{ projectsId }}' --required
AND locationsId = '{{ locationsId }}' --required
AND evaluationsId = '{{ evaluationsId }}' --required
AND requestId = '{{ requestId}}'
AND updateMask = '{{ updateMask}}'
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 }}'
;