evaluations
Creates, updates, deletes, gets or lists an evaluations resource.
Overview
| Name | evaluations |
| Type | Resource |
| Id | google.workloadmanager.evaluations |
Fields
The following fields are returned by SELECT queries:
- get
- list
| Name | Datatype | Description |
|---|---|---|
name | string | Name of resource that has the form projects/{project_id}/locations/{location_id}/evaluations/{evaluation_id}. |
bigQueryDestination | object | Optional. The BigQuery destination for detailed evaluation results. If this field is specified, the results of each evaluation execution are exported to BigQuery. (id: BigQueryDestination) |
createTime | string (google-datetime) | Output only. [Output only] Create time stamp. |
customRulesBucket | string | The Cloud Storage bucket name for custom rules. |
description | string | Description of the Evaluation. |
evaluationType | string | Evaluation type. (EVALUATION_TYPE_UNSPECIFIED, SAP, SQL_SERVER, OTHER) |
kmsKey | string | Optional. 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. |
labels | object | Labels as key value pairs. |
resourceFilter | object | Resource filter for an evaluation defining the scope of resources to be evaluated. (id: ResourceFilter) |
resourceStatus | object | Output only. [Output only] The current lifecycle state of the evaluation resource. (id: ResourceStatus) |
ruleNames | array | The names of the rules used for this evaluation. |
schedule | string | Crontab 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 |
updateTime | string (google-datetime) | Output only. [Output only] Update time stamp. |
| Name | Datatype | Description |
|---|---|---|
name | string | Name of resource that has the form projects/{project_id}/locations/{location_id}/evaluations/{evaluation_id}. |
bigQueryDestination | object | Optional. The BigQuery destination for detailed evaluation results. If this field is specified, the results of each evaluation execution are exported to BigQuery. (id: BigQueryDestination) |
createTime | string (google-datetime) | Output only. [Output only] Create time stamp. |
customRulesBucket | string | The Cloud Storage bucket name for custom rules. |
description | string | Description of the Evaluation. |
evaluationType | string | Evaluation type. (EVALUATION_TYPE_UNSPECIFIED, SAP, SQL_SERVER, OTHER) |
kmsKey | string | Optional. 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. |
labels | object | Labels as key value pairs. |
resourceFilter | object | Resource filter for an evaluation defining the scope of resources to be evaluated. (id: ResourceFilter) |
resourceStatus | object | Output only. [Output only] The current lifecycle state of the evaluation resource. (id: ResourceStatus) |
ruleNames | array | The names of the rules used for this evaluation. |
schedule | string | Crontab 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 |
updateTime | string (google-datetime) | Output only. [Output only] Update time stamp. |
Methods
The following methods are available for this resource:
| Name | Accessible by | Required Params | Optional Params | Description |
|---|---|---|---|---|
get | select | projectsId, locationsId, evaluationsId | Gets details of a single Evaluation. | |
list | select | projectsId, locationsId | filter, pageSize, orderBy, pageToken | Lists Evaluations in a given project and location. |
create | insert | projectsId, locationsId | requestId, evaluationId | Creates a new Evaluation in a given project and location. |
patch | update | projectsId, locationsId, evaluationsId | requestId, updateMask | Updates the parameters of a single Evaluation. |
delete | delete | projectsId, locationsId, evaluationsId | force, requestId | Deletes 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.
| Name | Datatype | Description |
|---|---|---|
evaluationsId | string | |
locationsId | string | |
projectsId | string | |
evaluationId | string | |
filter | string | |
force | boolean | |
orderBy | string | |
pageSize | integer (int32) | |
pageToken | string | |
requestId | string | |
updateMask | string (google-fieldmask) |
SELECT examples
- get
- list
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
;
Lists Evaluations in a given project and location.
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 filter = '{{ filter }}'
AND pageSize = '{{ pageSize }}'
AND orderBy = '{{ orderBy }}'
AND pageToken = '{{ pageToken }}'
;
INSERT examples
- create
- Manifest
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
;
# Description fields are for documentation purposes
- name: evaluations
props:
- name: projectsId
value: "{{ projectsId }}"
description: Required parameter for the evaluations resource.
- name: locationsId
value: "{{ locationsId }}"
description: Required parameter for the evaluations resource.
- name: resourceFilter
description: |
Resource filter for an evaluation defining the scope of resources to be evaluated.
value:
resourceIdPatterns:
- "{{ resourceIdPatterns }}"
gceInstanceFilter:
serviceAccounts:
- "{{ serviceAccounts }}"
scopes:
- "{{ scopes }}"
inclusionLabels: "{{ inclusionLabels }}"
- name: labels
value: "{{ labels }}"
description: |
Labels as key value pairs.
- name: schedule
value: "{{ schedule }}"
description: |
Crontab 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
- name: customRulesBucket
value: "{{ customRulesBucket }}"
description: |
The Cloud Storage bucket name for custom rules.
- name: description
value: "{{ description }}"
description: |
Description of the Evaluation.
- name: name
value: "{{ name }}"
description: |
Name of resource that has the form `projects/{project_id}/locations/{location_id}/evaluations/{evaluation_id}`.
- name: bigQueryDestination
description: |
Optional. The BigQuery destination for detailed evaluation results. If this field is specified, the results of each evaluation execution are exported to BigQuery.
value:
destinationDataset: "{{ destinationDataset }}"
createNewResultsTable: {{ createNewResultsTable }}
- name: kmsKey
value: "{{ kmsKey }}"
description: |
Optional. 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.
- name: evaluationType
value: "{{ evaluationType }}"
description: |
Evaluation type.
valid_values: ['EVALUATION_TYPE_UNSPECIFIED', 'SAP', 'SQL_SERVER', 'OTHER']
- name: ruleNames
value:
- "{{ ruleNames }}"
description: |
The names of the rules used for this evaluation.
- name: requestId
value: "{{ requestId }}"
- name: evaluationId
value: "{{ evaluationId }}"
UPDATE examples
- patch
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
- delete
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 }}'
;