Skip to main content

evaluations

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

Overview

Nameevaluations
TypeResource
Idgoogle.workloadmanager.evaluations

Fields

NameDatatypeDescription
namestringname of resource names have the form 'projects/{project_id}/locations/{location_id}/evaluations/{evaluation_id}'
descriptionstringDescription of the Evaluation
bigQueryDestinationobjectMessage describing big query destination
createTimestringOutput only. [Output only] Create time stamp
customRulesBucketstringThe Cloud Storage bucket name for custom rules.
labelsobjectLabels as key value pairs
resourceFilterobjectMessage describing resource filters
resourceStatusobjectMessage describing resource status
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 * *",
updateTimestringOutput only. [Output only] Update time stamp

Methods

NameAccessible byRequired ParamsDescription
getSELECTevaluationsId, locationsId, projectsIdGets details of a single Evaluation.
listSELECTlocationsId, projectsIdLists Evaluations in a given project and location.
createINSERTlocationsId, projectsIdCreates a new Evaluation in a given project and location.
deleteDELETEevaluationsId, locationsId, projectsIdDeletes a single Evaluation.

SELECT examples

Lists Evaluations in a given project and location.

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

INSERT example

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

/*+ create */
INSERT INTO google.workloadmanager.evaluations (
locationsId,
projectsId,
name,
description,
resourceFilter,
ruleNames,
labels,
schedule,
customRulesBucket,
bigQueryDestination
)
SELECT
'{{ locationsId }}',
'{{ projectsId }}',
'{{ name }}',
'{{ description }}',
'{{ resourceFilter }}',
'{{ ruleNames }}',
'{{ labels }}',
'{{ schedule }}',
'{{ customRulesBucket }}',
'{{ bigQueryDestination }}'
;

DELETE example

Deletes the specified evaluations resource.

/*+ delete */
DELETE FROM google.workloadmanager.evaluations
WHERE evaluationsId = '{{ evaluationsId }}'
AND locationsId = '{{ locationsId }}'
AND projectsId = '{{ projectsId }}';