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 that has the form projects/{project_id}/locations/{location_id}/evaluations/{evaluation_id}.
bigQueryDestinationobjectOptional. The BigQuery destination for detailed evaluation results. If this field is specified, the results of each evaluation execution are exported to BigQuery. (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. (EVALUATION_TYPE_UNSPECIFIED, SAP, SQL_SERVER, OTHER)
kmsKeystringOptional. Immutable. Customer-managed encryption key name, in the format projects//locations//keyRings//cryptoKeys/. The key will be used for CMEK encryption of the evaluation resource.
labelsobjectLabels as key value pairs.
resourceFilterobjectResource filter for an evaluation defining the scope of resources to be evaluated. (id: ResourceFilter)
resourceStatusobjectOutput only. [Output only] The current lifecycle state of the evaluation resource. (id: ResourceStatus)
ruleNamesarrayThe names of the rules used for this evaluation.
schedulestringCrontab format schedule for scheduled evaluation, currently only supports the following fixed schedules: * 0 */1 * * * # Hourly * 0 */6 * * * # Every 6 hours * 0 */12 * * * # Every 12 hours * 0 0 */1 * * # Daily * 0 0 */7 * * # Weekly * 0 0 */14 * * # Every 14 days * 0 0 1 */1 * # Monthly
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, locationsIdfilter, pageSize, orderBy, pageTokenLists Evaluations in a given project and location.
createinsertprojectsId, locationsIdrequestId, evaluationIdCreates a new Evaluation in a given project and location.
patchupdateprojectsId, locationsId, evaluationsIdrequestId, updateMaskUpdates the parameters of a single Evaluation.
deletedeleteprojectsId, locationsId, evaluationsIdforce, requestIdDeletes 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,
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__resourceFilter,
data__labels,
data__schedule,
data__customRulesBucket,
data__description,
data__name,
data__bigQueryDestination,
data__kmsKey,
data__evaluationType,
data__ruleNames,
projectsId,
locationsId,
requestId,
evaluationId
)
SELECT
'{{ resourceFilter }}',
'{{ labels }}',
'{{ schedule }}',
'{{ customRulesBucket }}',
'{{ description }}',
'{{ name }}',
'{{ bigQueryDestination }}',
'{{ kmsKey }}',
'{{ evaluationType }}',
'{{ ruleNames }}',
'{{ projectsId }}',
'{{ locationsId }}',
'{{ requestId }}',
'{{ evaluationId }}'
RETURNING
name,
done,
error,
metadata,
response
;

UPDATE examples

Updates the parameters of a single Evaluation.

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