REST Resource: projects.locations.evaluations.executions

Resource: Execution

Execution that represents a single run of an Evaluation.

JSON representation
{
  "name": string,
  "startTime": string,
  "endTime": string,
  "inventoryTime": string,
  "state": enum (State),
  "evaluationId": string,
  "labels": {
    string: string,
    ...
  },
  "runType": enum (Type),
  "ruleResults": [
    {
      object (RuleExecutionResult)
    }
  ],
  "externalDataSources": [
    {
      object (ExternalDataSources)
    }
  ],
  "notices": [
    {
      object (Notice)
    }
  ],
  "engine": enum (Engine),
  "resultSummary": {
    object (Summary)
  }
}
Fields
name

string

The name of execution resource. The format is projects/{project}/locations/{location}/evaluations/{evaluation}/executions/{execution}.

startTime

string (Timestamp format)

Output only. [Output only] Start time stamp.

Uses RFC 3339, where generated output will always be Z-normalized and use 0, 3, 6 or 9 fractional digits. Offsets other than "Z" are also accepted. Examples: "2014-10-02T15:01:23Z", "2014-10-02T15:01:23.045123456Z" or "2014-10-02T15:01:23+05:30".

endTime

string (Timestamp format)

Output only. [Output only] End time stamp.

Uses RFC 3339, where generated output will always be Z-normalized and use 0, 3, 6 or 9 fractional digits. Offsets other than "Z" are also accepted. Examples: "2014-10-02T15:01:23Z", "2014-10-02T15:01:23.045123456Z" or "2014-10-02T15:01:23+05:30".

inventoryTime

string (Timestamp format)

Output only. [Output only] Inventory time stamp.

Uses RFC 3339, where generated output will always be Z-normalized and use 0, 3, 6 or 9 fractional digits. Offsets other than "Z" are also accepted. Examples: "2014-10-02T15:01:23Z", "2014-10-02T15:01:23.045123456Z" or "2014-10-02T15:01:23+05:30".

state

enum (State)

Output only. [Output only] State.

evaluationId

string

Output only. [Output only] Evaluation ID.

labels

map (key: string, value: string)

Labels as key value pairs.

An object containing a list of "key": value pairs. Example: { "name": "wrench", "mass": "1.3kg", "count": "3" }.

runType

enum (Type)

Type which represents whether the execution executed directly by user or scheduled according to the Evaluation.schedule field.

ruleResults[]

object (RuleExecutionResult)

Output only. Execution result summary per rule.

externalDataSources[]

object (ExternalDataSources)

Optional. External data sources.

notices[]

object (Notice)

Output only. Additional information generated by the execution.

engine

enum (Engine)

Optional. Engine.

resultSummary

object (Summary)

Output only. [Output only] Result summary for the execution.

State

The possible states of an execution like RUNNING, SUCCEEDED, FAILED, etc.

Enums
STATE_UNSPECIFIED State of execution is unspecified.
RUNNING The execution is running in backend service.
SUCCEEDED The execution run succeeded.
FAILED The execution run failed.

Type

The type of execution, could be on demand execute or scheduled execute.

Enums
TYPE_UNSPECIFIED Type of execution is unspecified.
ONE_TIME Type of execution is one time.
SCHEDULED Type of execution is scheduled.

RuleExecutionResult

Execution result summary per rule.

JSON representation
{
  "rule": string,
  "state": enum (State),
  "message": string,
  "resultCount": string,
  "scannedResourceCount": string
}
Fields
rule

string

Rule name as plain text like sap-hana-configured.

state

enum (State)

Output only. The execution status.

message

string

Execution message, if any.

resultCount

string (int64 format)

Number of violations.

scannedResourceCount

string (int64 format)

Number of total scanned resources.

State

Possible states of a rule execution like SUCCESS, FAILURE, etc.

Enums
STATE_UNSPECIFIED Unknown state
STATE_SUCCESS Execution completed successfully
STATE_FAILURE Execution completed with failures
STATE_SKIPPED Execution was not executed

ExternalDataSources

External data sources for an execution.

JSON representation
{
  "name": string,
  "uri": string,
  "type": enum (Type),
  "assetType": string
}
Fields
name

string

Optional. Name of external data source. The name will be used inside the rego/sql to refer the external data.

uri

string

Required. URI of external data source. example of bq table {project_ID}.{dataset_ID}.{table_ID}.

type

enum (Type)

Required. Type of external data source.

assetType

string

Required. The asset type of the external data source. This can be a supported Cloud Asset Inventory asset type (see https://cloud.google.com/asset-inventory/docs/supported-asset-types) to override the default asset type, or it can be a custom type defined by the user.

Type

Possible types of external data sources like BigQuery table, etc.

Enums
TYPE_UNSPECIFIED Unknown type.
BIG_QUERY_TABLE BigQuery table.

Notice

Additional information generated by an execution.

JSON representation
{
  "message": string
}
Fields
message

string

Output only. Message of the notice.

Engine

The engine used for the execution.

Enums
ENGINE_UNSPECIFIED The original CG.
ENGINE_SCANNER SlimCG / Scanner.
V2 Evaluation Engine V2.

Summary

Execution summary.

JSON representation
{
  "failures": string,
  "newFailures": string,
  "newFixes": string
}
Fields
failures

string (int64 format)

Output only. Number of failures.

newFailures

string (int64 format)

Output only. Number of new failures compared to the previous execution.

newFixes

string (int64 format)

Output only. Number of new fixes compared to the previous execution.

Methods

delete

Deletes a single Execution.

get

Gets details of a single Execution.

list

Lists Executions in a given project and location.

run

Creates a new Execution in a given project and location.