BigQueryAuditMetadata

BigQueryAuditMetaData is exposed as part of the new AuditData.metadata messages.

JSON representation
{

  // Union field event can be only one of the following:
  "jobInsertion": {
    object (BigQueryAuditMetadata.JobInsertion)
  },
  "jobChange": {
    object (BigQueryAuditMetadata.JobChange)
  },
  "datasetCreation": {
    object (BigQueryAuditMetadata.DatasetCreation)
  },
  "datasetChange": {
    object (BigQueryAuditMetadata.DatasetChange)
  },
  "datasetDeletion": {
    object (BigQueryAuditMetadata.DatasetDeletion)
  },
  "tableCreation": {
    object (BigQueryAuditMetadata.TableCreation)
  },
  "tableChange": {
    object (BigQueryAuditMetadata.TableChange)
  },
  "tableDeletion": {
    object (BigQueryAuditMetadata.TableDeletion)
  },
  "tableDataRead": {
    object (BigQueryAuditMetadata.TableDataRead)
  },
  "tableDataChange": {
    object (BigQueryAuditMetadata.TableDataChange)
  },
  "modelDeletion": {
    object (BigQueryAuditMetadata.ModelDeletion)
  },
  "modelCreation": {
    object (BigQueryAuditMetadata.ModelCreation)
  },
  "modelMetadataChange": {
    object (BigQueryAuditMetadata.ModelMetadataChange)
  },
  "modelDataChange": {
    object (BigQueryAuditMetadata.ModelDataChange)
  },
  "modelDataRead": {
    object (BigQueryAuditMetadata.ModelDataRead)
  },
  "routineCreation": {
    object (BigQueryAuditMetadata.RoutineCreation)
  },
  "routineChange": {
    object (BigQueryAuditMetadata.RoutineChange)
  },
  "routineDeletion": {
    object (BigQueryAuditMetadata.RoutineDeletion)
  },
  "rowAccessPolicyCreation": {
    object (BigQueryAuditMetadata.RowAccessPolicyCreation)
  },
  "rowAccessPolicyChange": {
    object (BigQueryAuditMetadata.RowAccessPolicyChange)
  },
  "rowAccessPolicyDeletion": {
    object (BigQueryAuditMetadata.RowAccessPolicyDeletion)
  }
  // End of list of possible types for union field event.
}
Fields
Union field event. BigQuery event information. event can be only one of the following:
jobInsertion

object (BigQueryAuditMetadata.JobInsertion)

Job insertion event.

jobChange

object (BigQueryAuditMetadata.JobChange)

Job state change event.

datasetCreation

object (BigQueryAuditMetadata.DatasetCreation)

Dataset creation event.

datasetChange

object (BigQueryAuditMetadata.DatasetChange)

Dataset change event.

datasetDeletion

object (BigQueryAuditMetadata.DatasetDeletion)

Dataset deletion event.

tableCreation

object (BigQueryAuditMetadata.TableCreation)

Table creation event.

tableChange

object (BigQueryAuditMetadata.TableChange)

Table metadata change event.

tableDeletion

object (BigQueryAuditMetadata.TableDeletion)

Table deletion event.

tableDataRead

object (BigQueryAuditMetadata.TableDataRead)

Table data read event.

tableDataChange

object (BigQueryAuditMetadata.TableDataChange)

Table data change event.

modelDeletion

object (BigQueryAuditMetadata.ModelDeletion)

Model deletion event.

modelCreation

object (BigQueryAuditMetadata.ModelCreation)

Model creation event.

modelMetadataChange

object (BigQueryAuditMetadata.ModelMetadataChange)

Model metadata change event.

modelDataChange

object (BigQueryAuditMetadata.ModelDataChange)

Model data change event.

modelDataRead

object (BigQueryAuditMetadata.ModelDataRead)

Model data read event.

routineCreation

object (BigQueryAuditMetadata.RoutineCreation)

Routine creation event.

routineChange

object (BigQueryAuditMetadata.RoutineChange)

Routine change event.

routineDeletion

object (BigQueryAuditMetadata.RoutineDeletion)

Routine deletion event.

rowAccessPolicyCreation

object (BigQueryAuditMetadata.RowAccessPolicyCreation)

Row access policy create event.

rowAccessPolicyChange

object (BigQueryAuditMetadata.RowAccessPolicyChange)

Row access policy change event.

rowAccessPolicyDeletion

object (BigQueryAuditMetadata.RowAccessPolicyDeletion)

Row access policy deletion event.

BigQueryAuditMetadata.JobInsertion

Job insertion event.

JSON representation
{
  "job": {
    object (BigQueryAuditMetadata.Job)
  },
  "reason": enum (BigQueryAuditMetadata.JobInsertion.Reason)
}
Fields
job

object (BigQueryAuditMetadata.Job)

Job metadata.

reason

enum (BigQueryAuditMetadata.JobInsertion.Reason)

Describes how the job was inserted.

BigQueryAuditMetadata.Job

BigQuery job.

JSON representation
{
  "jobName": string,
  "jobConfig": {
    object (BigQueryAuditMetadata.JobConfig)
  },
  "jobStatus": {
    object (BigQueryAuditMetadata.JobStatus)
  },
  "jobStats": {
    object (BigQueryAuditMetadata.JobStats)
  }
}
Fields
jobName

string

Job URI.

Format: projects/<projectId>/jobs/<jobId>.

jobConfig

object (BigQueryAuditMetadata.JobConfig)

Job configuration.

jobStatus

object (BigQueryAuditMetadata.JobStatus)

Job status.

jobStats

object (BigQueryAuditMetadata.JobStats)

Job statistics.

BigQueryAuditMetadata.JobConfig

Job configuration. See the Jobs API resource for more details on individual fields.

JSON representation
{
  "type": enum (BigQueryAuditMetadata.JobConfig.Type),
  "labels": {
    string: string,
    ...
  },

  // Union field config can be only one of the following:
  "queryConfig": {
    object (BigQueryAuditMetadata.JobConfig.Query)
  },
  "loadConfig": {
    object (BigQueryAuditMetadata.JobConfig.Load)
  },
  "extractConfig": {
    object (BigQueryAuditMetadata.JobConfig.Extract)
  },
  "tableCopyConfig": {
    object (BigQueryAuditMetadata.JobConfig.TableCopy)
  }
  // End of list of possible types for union field config.
}
Fields
type

enum (BigQueryAuditMetadata.JobConfig.Type)

Job type.

labels

map (key: string, value: string)

Labels provided for the job.

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

Union field config. Job configuration information. config can be only one of the following:
queryConfig

object (BigQueryAuditMetadata.JobConfig.Query)

Query job information.

loadConfig

object (BigQueryAuditMetadata.JobConfig.Load)

Load job information.

extractConfig

object (BigQueryAuditMetadata.JobConfig.Extract)

Extract job information.

tableCopyConfig

object (BigQueryAuditMetadata.JobConfig.TableCopy)

TableCopy job information.

BigQueryAuditMetadata.JobConfig.Query

Query job configuration.

JSON representation
{
  "query": string,
  "queryTruncated": boolean,
  "destinationTable": string,
  "createDisposition": enum (BigQueryAuditMetadata.CreateDisposition),
  "writeDisposition": enum (BigQueryAuditMetadata.WriteDisposition),
  "defaultDataset": string,
  "tableDefinitions": [
    {
      object (BigQueryAuditMetadata.TableDefinition)
    }
  ],
  "priority": enum (BigQueryAuditMetadata.JobConfig.Query.Priority),
  "destinationTableEncryption": {
    object (BigQueryAuditMetadata.EncryptionInfo)
  },
  "statementType": enum (BigQueryAuditMetadata.QueryStatementType)
}
Fields
query

string

The SQL query to run. Truncated if exceeds 50K.

queryTruncated

boolean

True if the query field was truncated.

destinationTable

string

The destination table for the query results.

createDisposition

enum (BigQueryAuditMetadata.CreateDisposition)

Destination table create disposition.

writeDisposition

enum (BigQueryAuditMetadata.WriteDisposition)

Destination table write disposition.

defaultDataset

string

Default dataset for the query.

tableDefinitions[]

object (BigQueryAuditMetadata.TableDefinition)

External data sources used in the query.

priority

enum (BigQueryAuditMetadata.JobConfig.Query.Priority)

Priority given to the query.

destinationTableEncryption

object (BigQueryAuditMetadata.EncryptionInfo)

Result table encryption information. Set when non-default encryption is used.

statementType

enum (BigQueryAuditMetadata.QueryStatementType)

Type of the query.

BigQueryAuditMetadata.TableDefinition

Definition of an external data source used in a query.

JSON representation
{
  "name": string,
  "sourceUris": [
    string
  ]
}
Fields
name

string

Name of the table, used in queries.

sourceUris[]

string

URIs for the data.

BigQueryAuditMetadata.EncryptionInfo

Encryption properties for a table or a job

JSON representation
{
  "kmsKeyName": string
}
Fields
kmsKeyName

string

Cloud kms key identifier.

Format: projects/<projectId>/locations/<location>/keyRings/<key_ring_name>/cryptoKeys/<key_name>

BigQueryAuditMetadata.JobConfig.Load

Load job configuration.

JSON representation
{
  "sourceUris": [
    string
  ],
  "sourceUrisTruncated": boolean,
  "schemaJson": string,
  "schemaJsonTruncated": boolean,
  "destinationTable": string,
  "createDisposition": enum (BigQueryAuditMetadata.CreateDisposition),
  "writeDisposition": enum (BigQueryAuditMetadata.WriteDisposition),
  "destinationTableEncryption": {
    object (BigQueryAuditMetadata.EncryptionInfo)
  }
}
Fields
sourceUris[]

string

URIs for the data to be imported. Entire list is truncated if exceeds 40K.

sourceUrisTruncated

boolean

True if the source_URIs field was truncated.

schemaJson

string

The table schema in JSON format. Entire field is truncated if exceeds 40K.

schemaJsonTruncated

boolean

True if the schemaJson field was truncated.

destinationTable

string

The destination table for the import.

createDisposition

enum (BigQueryAuditMetadata.CreateDisposition)

Destination table create disposition.

writeDisposition

enum (BigQueryAuditMetadata.WriteDisposition)

Destination table write disposition.

destinationTableEncryption

object (BigQueryAuditMetadata.EncryptionInfo)

Result table encryption information. Set when non-default encryption is used.

BigQueryAuditMetadata.JobConfig.Extract

Extract job configuration.

JSON representation
{
  "destinationUris": [
    string
  ],
  "destinationUrisTruncated": boolean,

  // Union field source can be only one of the following:
  "sourceTable": string,
  "sourceModel": string
  // End of list of possible types for union field source.
}
Fields
destinationUris[]

string

URIs where extracted data should be written. Entire list is truncated if exceeds 50K.

destinationUrisTruncated

boolean

True if the destination_URIs field was truncated.

Union field source.

source can be only one of the following:

sourceTable

string

The source table.

sourceModel

string

The source model.

BigQueryAuditMetadata.JobConfig.TableCopy

Table copy job configuration.

JSON representation
{
  "sourceTables": [
    string
  ],
  "sourceTablesTruncated": boolean,
  "destinationTable": string,
  "createDisposition": enum (BigQueryAuditMetadata.CreateDisposition),
  "writeDisposition": enum (BigQueryAuditMetadata.WriteDisposition),
  "destinationTableEncryption": {
    object (BigQueryAuditMetadata.EncryptionInfo)
  },
  "operationType": enum (BigQueryAuditMetadata.OperationType),
  "destinationExpirationTime": string
}
Fields
sourceTables[]

string

Source tables. Entire list is truncated if exceeds 50K.

sourceTablesTruncated

boolean

True if the sourceTables field was truncated.

destinationTable

string

Destination table.

createDisposition

enum (BigQueryAuditMetadata.CreateDisposition)

Destination table create disposition.

writeDisposition

enum (BigQueryAuditMetadata.WriteDisposition)

Destination table write disposition.

destinationTableEncryption

object (BigQueryAuditMetadata.EncryptionInfo)

Result table encryption information. Set when non-default encryption is used.

operationType

enum (BigQueryAuditMetadata.OperationType)

Supported operation types in the table copy job.

destinationExpirationTime

string (Timestamp format)

Expiration time set on the destination table. Expired tables will be deleted and their storage reclaimed.

A timestamp in RFC3339 UTC "Zulu" format, with nanosecond resolution and up to nine fractional digits. Examples: "2014-10-02T15:01:23Z" and "2014-10-02T15:01:23.045123456Z".

BigQueryAuditMetadata.JobStatus

Status of a job.

JSON representation
{
  "jobState": enum (BigQueryAuditMetadata.JobState),
  "errorResult": {
    object (Status)
  },
  "errors": [
    {
      object (Status)
    }
  ]
}
Fields
jobState

enum (BigQueryAuditMetadata.JobState)

State of the job.

errorResult

object (Status)

Job error, if the job failed.

errors[]

object (Status)

Errors encountered during the running of the job. Does not necessarily mean that the job has completed or was unsuccessful.

BigQueryAuditMetadata.JobStats

Job statistics.

JSON representation
{
  "createTime": string,
  "startTime": string,
  "endTime": string,
  "totalSlotMs": string,
  "reservationUsage": [
    {
      object (BigQueryAuditMetadata.JobStats.ReservationResourceUsage)
    }
  ],
  "parentJobName": string,

  // Union field extended can be only one of the following:
  "queryStats": {
    object (BigQueryAuditMetadata.JobStats.Query)
  },
  "loadStats": {
    object (BigQueryAuditMetadata.JobStats.Load)
  },
  "extractStats": {
    object (BigQueryAuditMetadata.JobStats.Extract)
  }
  // End of list of possible types for union field extended.
}
Fields
createTime

string (Timestamp format)

Job creation time.

A timestamp in RFC3339 UTC "Zulu" format, with nanosecond resolution and up to nine fractional digits. Examples: "2014-10-02T15:01:23Z" and "2014-10-02T15:01:23.045123456Z".

startTime

string (Timestamp format)

Job execution start time.

A timestamp in RFC3339 UTC "Zulu" format, with nanosecond resolution and up to nine fractional digits. Examples: "2014-10-02T15:01:23Z" and "2014-10-02T15:01:23.045123456Z".

endTime

string (Timestamp format)

Job completion time.

A timestamp in RFC3339 UTC "Zulu" format, with nanosecond resolution and up to nine fractional digits. Examples: "2014-10-02T15:01:23Z" and "2014-10-02T15:01:23.045123456Z".

totalSlotMs

string (int64 format)

The total number of slot-ms consumed by the query job.

reservationUsage[]

object (BigQueryAuditMetadata.JobStats.ReservationResourceUsage)

Reservation usage attributed from each tier of a reservation hierarchy.

parentJobName

string

Parent job name. Only present for child jobs.

Union field extended. Statistics specific to the job type. extended can be only one of the following:
queryStats

object (BigQueryAuditMetadata.JobStats.Query)

Query job statistics.

loadStats

object (BigQueryAuditMetadata.JobStats.Load)

Load job statistics.

extractStats

object (BigQueryAuditMetadata.JobStats.Extract)

Extract job statistics.

BigQueryAuditMetadata.JobStats.Query

Query job statistics.

JSON representation
{
  "totalProcessedBytes": string,
  "totalBilledBytes": string,
  "billingTier": integer,
  "referencedTables": [
    string
  ],
  "referencedViews": [
    string
  ],
  "referencedRoutines": [
    string
  ],
  "outputRowCount": string,
  "cacheHit": boolean
}
Fields
totalProcessedBytes

string (int64 format)

Total bytes processed by the query job.

totalBilledBytes

string (int64 format)

Total bytes billed by the query job.

billingTier

integer

The tier assigned by the CPU-based billing.

referencedTables[]

string

Tables accessed by the query job.

referencedViews[]

string

Views accessed by the query job.

referencedRoutines[]

string

Routines accessed by the query job.

outputRowCount

string (int64 format)

Number of output rows produced by the query job.

cacheHit

boolean

True if the query job results were read from the query cache.

BigQueryAuditMetadata.JobStats.Load

Load job statistics.

JSON representation
{
  "totalOutputBytes": string
}
Fields
totalOutputBytes

string (int64 format)

Total bytes loaded by the import job.

BigQueryAuditMetadata.JobStats.Extract

Extract job statistics.

JSON representation
{
  "totalInputBytes": string
}
Fields
totalInputBytes

string (int64 format)

Total bytes exported by the extract job.

BigQueryAuditMetadata.JobStats.ReservationResourceUsage

Job resource usage breakdown by reservation.

JSON representation
{
  "name": string,
  "slotMs": string
}
Fields
name

string

Reservation name or "unreserved" for on-demand resources usage.

slotMs

string (int64 format)

Total slot milliseconds used by the reservation for a particular job.

BigQueryAuditMetadata.JobChange

Job state change event.

JSON representation
{
  "before": enum (BigQueryAuditMetadata.JobState),
  "after": enum (BigQueryAuditMetadata.JobState),
  "job": {
    object (BigQueryAuditMetadata.Job)
  }
}
Fields
before

enum (BigQueryAuditMetadata.JobState)

Job state before the job state change.

after

enum (BigQueryAuditMetadata.JobState)

Job state after the job state change.

job

object (BigQueryAuditMetadata.Job)

Job metadata.

BigQueryAuditMetadata.DatasetCreation

Dataset creation event.

JSON representation
{
  "dataset": {
    object (BigQueryAuditMetadata.Dataset)
  },
  "reason": enum (BigQueryAuditMetadata.DatasetCreation.Reason),
  "jobName": string
}
Fields
dataset

object (BigQueryAuditMetadata.Dataset)

Dataset metadata.

reason

enum (BigQueryAuditMetadata.DatasetCreation.Reason)

Describes how the dataset was created.

jobName

string

The URI of the job that created the dataset. Present if the reason is QUERY.

Format: projects/<projectId>/jobs/<jobId>.

BigQueryAuditMetadata.Dataset

BigQuery dataset.

JSON representation
{
  "datasetName": string,
  "datasetInfo": {
    object (BigQueryAuditMetadata.EntityInfo)
  },
  "createTime": string,
  "updateTime": string,
  "acl": {
    object (BigQueryAuditMetadata.BigQueryAcl)
  },
  "defaultTableExpireDuration": string,
  "defaultEncryption": {
    object (BigQueryAuditMetadata.EncryptionInfo)
  }
}
Fields
datasetName

string

Dataset URI.

Format: projects/<projectId>/datasets/<datasetId>.

datasetInfo

object (BigQueryAuditMetadata.EntityInfo)

User-provided metadata for the dataset.

createTime

string (Timestamp format)

Dataset creation time.

A timestamp in RFC3339 UTC "Zulu" format, with nanosecond resolution and up to nine fractional digits. Examples: "2014-10-02T15:01:23Z" and "2014-10-02T15:01:23.045123456Z".

updateTime

string (Timestamp format)

Dataset metadata last update time.

A timestamp in RFC3339 UTC "Zulu" format, with nanosecond resolution and up to nine fractional digits. Examples: "2014-10-02T15:01:23Z" and "2014-10-02T15:01:23.045123456Z".

acl

object (BigQueryAuditMetadata.BigQueryAcl)

The access control list for the dataset.

defaultTableExpireDuration

string (Duration format)

Default expiration time for tables in the dataset.

A duration in seconds with up to nine fractional digits, terminated by 's'. Example: "3.5s".

defaultEncryption

object (BigQueryAuditMetadata.EncryptionInfo)

Default encryption for tables in the dataset.

BigQueryAuditMetadata.EntityInfo

User-provided metadata for an entity, for e.g. dataset, table or model.

JSON representation
{
  "friendlyName": string,
  "description": string,
  "labels": {
    string: string,
    ...
  }
}
Fields
friendlyName

string

A short name for the entity.

description

string

A long description for the entity.

labels

map (key: string, value: string)

Labels provided for the entity.

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

BigQueryAuditMetadata.BigQueryAcl

An access control list.

JSON representation
{
  "policy": {
    object (Policy)
  },
  "authorizedViews": [
    string
  ]
}
Fields
policy

object (Policy)

IAM policy for the resource.

authorizedViews[]

string

List of authorized views for a dataset.

Format: projects/<projectId>/datasets/<datasetId>/tables/<view_id>.

BigQueryAuditMetadata.DatasetChange

Dataset change event.

JSON representation
{
  "dataset": {
    object (BigQueryAuditMetadata.Dataset)
  },
  "reason": enum (BigQueryAuditMetadata.DatasetChange.Reason),
  "jobName": string
}
Fields
dataset

object (BigQueryAuditMetadata.Dataset)

Dataset metadata after the change.

reason

enum (BigQueryAuditMetadata.DatasetChange.Reason)

Describes how the dataset was changed.

jobName

string

The URI of the job that updated the dataset. Present if the reason is QUERY.

Format: projects/<projectId>/jobs/<jobId>.

BigQueryAuditMetadata.DatasetDeletion

Dataset deletion event.

JSON representation
{
  "reason": enum (BigQueryAuditMetadata.DatasetDeletion.Reason),
  "jobName": string
}
Fields
reason

enum (BigQueryAuditMetadata.DatasetDeletion.Reason)

Describes how the dataset was deleted.

jobName

string

The URI of the job that deleted the dataset. Present if the reason is QUERY.

Format: projects/<projectId>/jobs/<jobId>.

BigQueryAuditMetadata.TableCreation

Table creation event.

JSON representation
{
  "table": {
    object (BigQueryAuditMetadata.Table)
  },
  "reason": enum (BigQueryAuditMetadata.TableCreation.Reason),
  "jobName": string
}
Fields
table

object (BigQueryAuditMetadata.Table)

Table metadata.

reason

enum (BigQueryAuditMetadata.TableCreation.Reason)

Describes how the table was created.

jobName

string

The URI of the job that created a table. Present if the reason is JOB or QUERY.

Format: projects/<projectId>/jobs/<jobId>.

BigQueryAuditMetadata.Table

BigQuery table.

JSON representation
{
  "tableName": string,
  "tableInfo": {
    object (BigQueryAuditMetadata.EntityInfo)
  },
  "schemaJson": string,
  "schemaJsonTruncated": boolean,
  "view": {
    object (BigQueryAuditMetadata.TableViewDefinition)
  },
  "expireTime": string,
  "createTime": string,
  "updateTime": string,
  "truncateTime": string,
  "encryption": {
    object (BigQueryAuditMetadata.EncryptionInfo)
  }
}
Fields
tableName

string

Table URI.

Format: projects/<projectId>/datasets/<datasetId>/tables/<tableId>.

tableInfo

object (BigQueryAuditMetadata.EntityInfo)

User-provided metadata for the table.

schemaJson

string

A JSON representation of the table's schema. Entire field is truncated if exceeds 40K.

schemaJsonTruncated

boolean

True if the schemaJson field was truncated.

view

object (BigQueryAuditMetadata.TableViewDefinition)

View metadata. Only present for views.

expireTime

string (Timestamp format)

Table expiration time.

A timestamp in RFC3339 UTC "Zulu" format, with nanosecond resolution and up to nine fractional digits. Examples: "2014-10-02T15:01:23Z" and "2014-10-02T15:01:23.045123456Z".

createTime

string (Timestamp format)

The table creation time.

A timestamp in RFC3339 UTC "Zulu" format, with nanosecond resolution and up to nine fractional digits. Examples: "2014-10-02T15:01:23Z" and "2014-10-02T15:01:23.045123456Z".

updateTime

string (Timestamp format)

The last time metadata update time.

A timestamp in RFC3339 UTC "Zulu" format, with nanosecond resolution and up to nine fractional digits. Examples: "2014-10-02T15:01:23Z" and "2014-10-02T15:01:23.045123456Z".

truncateTime

string (Timestamp format)

The last table truncation time.

A timestamp in RFC3339 UTC "Zulu" format, with nanosecond resolution and up to nine fractional digits. Examples: "2014-10-02T15:01:23Z" and "2014-10-02T15:01:23.045123456Z".

encryption

object (BigQueryAuditMetadata.EncryptionInfo)

Table encryption information. Set when non-default encryption is used.

BigQueryAuditMetadata.TableViewDefinition

View definition.

JSON representation
{
  "query": string,
  "queryTruncated": boolean
}
Fields
query

string

SQL query defining the view. Truncated if exceeds 40K.

queryTruncated

boolean

True if the schemaJson field was truncated.

BigQueryAuditMetadata.TableChange

Table metadata change event.

JSON representation
{
  "table": {
    object (BigQueryAuditMetadata.Table)
  },
  "truncated": boolean,
  "reason": enum (BigQueryAuditMetadata.TableChange.Reason),
  "jobName": string
}
Fields
table

object (BigQueryAuditMetadata.Table)

Updated table metadata.

truncated

boolean

True if the table was truncated.

reason

enum (BigQueryAuditMetadata.TableChange.Reason)

Describes how the table metadata was changed.

jobName

string

The URI of the job that changed a table. Present if the reason is JOB or QUERY.

Format: projects/<projectId>/jobs/<jobId>.

BigQueryAuditMetadata.TableDeletion

Table deletion event.

JSON representation
{
  "reason": enum (BigQueryAuditMetadata.TableDeletion.Reason),
  "jobName": string
}
Fields
reason

enum (BigQueryAuditMetadata.TableDeletion.Reason)

Describes how table was deleted.

jobName

string

The URI of the job that deleted a table. Present if the reason is QUERY.

Format: projects/<projectId>/jobs/<jobId>.

BigQueryAuditMetadata.TableDataRead

Table data read event.

JSON representation
{
  "fields": [
    string
  ],
  "fieldsTruncated": boolean,
  "policyTags": [
    string
  ],
  "policyTagsTruncated": boolean,
  "reason": enum (BigQueryAuditMetadata.TableDataRead.Reason),
  "jobName": string,
  "sessionName": string
}
Fields
fields[]

string

List of the accessed fields. Entire list is truncated if the record size exceeds 100K.

fieldsTruncated

boolean

True if the fields list was truncated.

policyTags[]

string

List of the referenced policy tags. That is, policy tags attached to the accessed fields or their ancestors. Policy tag resource name is a string of the format: projects/<projectId>/locations/<locationId>/taxonomies/<taxonomyId>/policyTags/<policy_tag_id>

policyTagsTruncated

boolean

True if the policy tag list was truncated. At most 100 policy tags can be saved.

reason

enum (BigQueryAuditMetadata.TableDataRead.Reason)

Describes how the table data was read.

jobName

string

The URI of the job that read a table. Present if the reason is JOB but can be reducted for privacy reasons.

Format: projects/<projectId>/jobs/<jobId>.

sessionName

string

The URI of the read session that read a table. Present if the reason is CREATE_READ_SESSION.

Format: projects/<projectId>/locations/<location>/sessions/<session_id>.

BigQueryAuditMetadata.TableDataChange

Table data change event.

JSON representation
{
  "deletedRowsCount": string,
  "insertedRowsCount": string,
  "truncated": boolean,
  "reason": enum (BigQueryAuditMetadata.TableDataChange.Reason),
  "jobName": string,
  "streamName": string
}
Fields
deletedRowsCount

string (int64 format)

Number of deleted rows.

insertedRowsCount

string (int64 format)

Number of inserted rows.

truncated

boolean

True if the table was truncated.

reason

enum (BigQueryAuditMetadata.TableDataChange.Reason)

Describes how the table data was changed.

jobName

string

The URI of the job that changed a table.

Format: projects/<projectId>/jobs/<jobId>.

streamName

string

If written from WRITE_API, the name of the stream.

Format: projects/<projectId>/datasets/<datasetId>/tables/<tableId>/streams/<stream_id>

BigQueryAuditMetadata.ModelDeletion

Model deletion event.

JSON representation
{
  "reason": enum (BigQueryAuditMetadata.ModelDeletion.Reason),
  "jobName": string
}
Fields
reason

enum (BigQueryAuditMetadata.ModelDeletion.Reason)

Describes how the model was deleted.

jobName

string

The URI of the job that deleted a model. Present if the reason is QUERY.

Format: projects/<projectId>/jobs/<jobId>.

BigQueryAuditMetadata.ModelCreation

Model creation event.

JSON representation
{
  "model": {
    object (BigQueryAuditMetadata.Model)
  },
  "reason": enum (BigQueryAuditMetadata.ModelCreation.Reason),
  "jobName": string
}
Fields
model

object (BigQueryAuditMetadata.Model)

Model metadata.

reason

enum (BigQueryAuditMetadata.ModelCreation.Reason)

Describes how the model was created.

jobName

string

The URI of the job that created the model.

Format: projects/<projectId>/jobs/<jobId>.

BigQueryAuditMetadata.Model

Trained BigQuery ML model.

JSON representation
{
  "modelName": string,
  "modelInfo": {
    object (BigQueryAuditMetadata.EntityInfo)
  },
  "expireTime": string,
  "createTime": string,
  "updateTime": string,
  "encryption": {
    object (BigQueryAuditMetadata.EncryptionInfo)
  }
}
Fields
modelName

string

Model URI.

Format: projects/<projectId>/datasets/<datasetId>/models/<model_id>.

modelInfo

object (BigQueryAuditMetadata.EntityInfo)

User-provided metadata for the model.

expireTime

string (Timestamp format)

Model expiration time.

A timestamp in RFC3339 UTC "Zulu" format, with nanosecond resolution and up to nine fractional digits. Examples: "2014-10-02T15:01:23Z" and "2014-10-02T15:01:23.045123456Z".

createTime

string (Timestamp format)

Model creation time.

A timestamp in RFC3339 UTC "Zulu" format, with nanosecond resolution and up to nine fractional digits. Examples: "2014-10-02T15:01:23Z" and "2014-10-02T15:01:23.045123456Z".

updateTime

string (Timestamp format)

Model last update time.

A timestamp in RFC3339 UTC "Zulu" format, with nanosecond resolution and up to nine fractional digits. Examples: "2014-10-02T15:01:23Z" and "2014-10-02T15:01:23.045123456Z".

encryption

object (BigQueryAuditMetadata.EncryptionInfo)

Model encryption information. Set when non-default encryption is used.

BigQueryAuditMetadata.ModelMetadataChange

Model metadata change event.

JSON representation
{
  "model": {
    object (BigQueryAuditMetadata.Model)
  },
  "reason": enum (BigQueryAuditMetadata.ModelMetadataChange.Reason),
  "jobName": string
}
Fields
model

object (BigQueryAuditMetadata.Model)

Updated model.

reason

enum (BigQueryAuditMetadata.ModelMetadataChange.Reason)

Describes how the model metadata was changed.

jobName

string

The URI of the job that changed the model metadata. Present if and only if the reason is QUERY.

Format: projects/<projectId>/jobs/<jobId>.

BigQueryAuditMetadata.ModelDataChange

Model data change event.

JSON representation
{
  "reason": enum (BigQueryAuditMetadata.ModelDataChange.Reason),
  "jobName": string
}
Fields
reason

enum (BigQueryAuditMetadata.ModelDataChange.Reason)

Describes how the model data was changed.

jobName

string

The URI of the job that changed the model data.

Format: projects/<projectId>/jobs/<jobId>.

BigQueryAuditMetadata.ModelDataRead

Model data read event.

JSON representation
{
  "reason": enum (BigQueryAuditMetadata.ModelDataRead.Reason),
  "jobName": string
}
Fields
reason

enum (BigQueryAuditMetadata.ModelDataRead.Reason)

Describes how the model data was read.

jobName

string

The URI of the job that read the model data.

Format: projects/<projectId>/jobs/<jobId>.

BigQueryAuditMetadata.RoutineCreation

Routine creation event.

JSON representation
{
  "routine": {
    object (BigQueryAuditMetadata.Routine)
  },
  "reason": enum (BigQueryAuditMetadata.RoutineCreation.Reason),
  "jobName": string
}
Fields
routine

object (BigQueryAuditMetadata.Routine)

Created routine.

reason

enum (BigQueryAuditMetadata.RoutineCreation.Reason)

Describes how the routine was created.

jobName

string

The URI of the job that created the routine.

Format: projects/<projectId>/jobs/<jobId>.

BigQueryAuditMetadata.Routine

User Defined Function (UDF) or Stored Procedure.

JSON representation
{
  "routineName": string,
  "createTime": string,
  "updateTime": string
}
Fields
routineName

string

Routine URI.

Format: projects/<projectId>/datasets/<datasetId>/routines/<routine_id>.

createTime

string (Timestamp format)

Routine creation time.

A timestamp in RFC3339 UTC "Zulu" format, with nanosecond resolution and up to nine fractional digits. Examples: "2014-10-02T15:01:23Z" and "2014-10-02T15:01:23.045123456Z".

updateTime

string (Timestamp format)

Routine last update time.

A timestamp in RFC3339 UTC "Zulu" format, with nanosecond resolution and up to nine fractional digits. Examples: "2014-10-02T15:01:23Z" and "2014-10-02T15:01:23.045123456Z".

BigQueryAuditMetadata.RoutineChange

Routine change event.

JSON representation
{
  "routine": {
    object (BigQueryAuditMetadata.Routine)
  },
  "reason": enum (BigQueryAuditMetadata.RoutineChange.Reason),
  "jobName": string
}
Fields
routine

object (BigQueryAuditMetadata.Routine)

Updated routine.

reason

enum (BigQueryAuditMetadata.RoutineChange.Reason)

Describes how the routine was updated.

jobName

string

The URI of the job that updated the routine.

Format: projects/<projectId>/jobs/<jobId>.

BigQueryAuditMetadata.RoutineDeletion

Routine deletion event.

JSON representation
{
  "routine": {
    object (BigQueryAuditMetadata.Routine)
  },
  "reason": enum (BigQueryAuditMetadata.RoutineDeletion.Reason),
  "jobName": string
}
Fields
routine

object (BigQueryAuditMetadata.Routine)

Deleted routine.

reason

enum (BigQueryAuditMetadata.RoutineDeletion.Reason)

Describes how the routine was deleted.

jobName

string

The URI of the job that deleted the routine. Present if the reason is QUERY.

Format: projects/<projectId>/jobs/<jobId>.

BigQueryAuditMetadata.RowAccessPolicyCreation

Row access policy creation event.

JSON representation
{
  "rowAccessPolicy": {
    object (BigQueryAuditMetadata.RowAccessPolicy)
  },
  "jobName": string
}
Fields
rowAccessPolicy

object (BigQueryAuditMetadata.RowAccessPolicy)

The row access policy created by this event.

jobName

string

The URI of the job that created this row access policy.

Format: projects/<projectId>/jobs/<jobId>.

BigQueryAuditMetadata.RowAccessPolicy

BigQuery row access policy.

JSON representation
{
  "rowAccessPolicyName": string
}
Fields
rowAccessPolicyName

string

Row access policy URI.

Format: projects/<projectId>/datasets/<datasetId>/tables/<tableId>/rowAccessPolicies/<row_access_policy_id>

BigQueryAuditMetadata.RowAccessPolicyChange

Row access policy change event.

JSON representation
{
  "rowAccessPolicy": {
    object (BigQueryAuditMetadata.RowAccessPolicy)
  },
  "jobName": string
}
Fields
rowAccessPolicy

object (BigQueryAuditMetadata.RowAccessPolicy)

The row access policy that was changed by this event.

jobName

string

The URI of the job that created this row access policy.

Format: projects/<projectId>/jobs/<jobId>.

BigQueryAuditMetadata.RowAccessPolicyDeletion

Row access policy deletion event.

JSON representation
{
  "rowAccessPolicies": [
    {
      object (BigQueryAuditMetadata.RowAccessPolicy)
    }
  ],
  "jobName": string,
  "allRowAccessPoliciesDropped": boolean
}
Fields
rowAccessPolicies[]

object (BigQueryAuditMetadata.RowAccessPolicy)

The row access policies that were deleted. At present, only populated when a single policy is dropped.

jobName

string

The job that deleted these row access policies.

Format: projects/<projectId>/jobs/<jobId>.

allRowAccessPoliciesDropped

boolean

This field is set to true when a DROP ALL command has been executed, thus removing all row access policies on the table.