AuditData

BigQuery request and response messages for audit log. Note: Table.schema has been deprecated in favor of Table.schemaJson. Table.schema may continue to be present in your logs during this transition.

JSON representation
{
  "jobCompletedEvent": {
    object (JobCompletedEvent)
  },
  "tableDataReadEvents": [
    {
      object (TableDataReadEvent)
    }
  ],

  // Union field request can be only one of the following:
  "tableInsertRequest": {
    object (TableInsertRequest)
  },
  "tableUpdateRequest": {
    object (TableUpdateRequest)
  },
  "datasetListRequest": {
    object (DatasetListRequest)
  },
  "datasetInsertRequest": {
    object (DatasetInsertRequest)
  },
  "datasetUpdateRequest": {
    object (DatasetUpdateRequest)
  },
  "jobInsertRequest": {
    object (JobInsertRequest)
  },
  "jobQueryRequest": {
    object (JobQueryRequest)
  },
  "jobGetQueryResultsRequest": {
    object (JobGetQueryResultsRequest)
  },
  "tableDataListRequest": {
    object (TableDataListRequest)
  },
  "setIamPolicyRequest": {
    object (SetIamPolicyRequest)
  }
  // End of list of possible types for union field request.

  // Union field response can be only one of the following:
  "tableInsertResponse": {
    object (TableInsertResponse)
  },
  "tableUpdateResponse": {
    object (TableUpdateResponse)
  },
  "datasetInsertResponse": {
    object (DatasetInsertResponse)
  },
  "datasetUpdateResponse": {
    object (DatasetUpdateResponse)
  },
  "jobInsertResponse": {
    object (JobInsertResponse)
  },
  "jobQueryResponse": {
    object (JobQueryResponse)
  },
  "jobGetQueryResultsResponse": {
    object (JobGetQueryResultsResponse)
  },
  "jobQueryDoneResponse": {
    object (JobQueryDoneResponse)
  },
  "policyResponse": {
    object (Policy)
  }
  // End of list of possible types for union field response.
}
Fields
jobCompletedEvent

object (JobCompletedEvent)

A job completion event.

tableDataReadEvents[]

object (TableDataReadEvent)

Information about the table access events.

Union field request. Request data for each BigQuery method. request can be only one of the following:
tableInsertRequest

object (TableInsertRequest)

Table insert request.

tableUpdateRequest

object (TableUpdateRequest)

Table update request.

datasetListRequest

object (DatasetListRequest)

Dataset list request.

datasetInsertRequest

object (DatasetInsertRequest)

Dataset insert request.

datasetUpdateRequest

object (DatasetUpdateRequest)

Dataset update request.

jobInsertRequest

object (JobInsertRequest)

Job insert request.

jobQueryRequest

object (JobQueryRequest)

Job query request.

jobGetQueryResultsRequest

object (JobGetQueryResultsRequest)

Job get query results request.

tableDataListRequest

object (TableDataListRequest)

Table data-list request.

setIamPolicyRequest

object (SetIamPolicyRequest)

Iam policy request.

Union field response. Response data for each BigQuery method. response can be only one of the following:
tableInsertResponse

object (TableInsertResponse)

Table insert response.

tableUpdateResponse

object (TableUpdateResponse)

Table update response.

datasetInsertResponse

object (DatasetInsertResponse)

Dataset insert response.

datasetUpdateResponse

object (DatasetUpdateResponse)

Dataset update response.

jobInsertResponse

object (JobInsertResponse)

Job insert response.

jobQueryResponse

object (JobQueryResponse)

Job query response.

jobGetQueryResultsResponse

object (JobGetQueryResultsResponse)

Job get query results response.

jobQueryDoneResponse

object (JobQueryDoneResponse)

Deprecated: Job query-done response. Use this information for usage analysis.

policyResponse

object (Policy)

Iam Policy.

TableInsertRequest

Table insert request.

JSON representation
{
  "resource": {
    object (Table)
  }
}
Fields
resource

object (Table)

The new table.

Table

Describes a BigQuery table. See the Table API resource for more details on individual fields. Note: Table.schema has been deprecated in favor of Table.schemaJson. Table.schema may continue to be present in your logs during this transition.

JSON representation
{
  "tableName": {
    object (TableName)
  },
  "info": {
    object (TableInfo)
  },
  "schemaJson": string,
  "view": {
    object (TableViewDefinition)
  },
  "expireTime": string,
  "createTime": string,
  "truncateTime": string,
  "updateTime": string,
  "encryption": {
    object (EncryptionInfo)
  }
}
Fields
tableName

object (TableName)

The name of the table.

info

object (TableInfo)

User-provided metadata for the table.

schemaJson

string

A JSON representation of the table's schema.

view

object (TableViewDefinition)

If present, this is a virtual table defined by a SQL query.

expireTime

string (Timestamp format)

The expiration date for the table, after which the table is deleted and the storage reclaimed. If not present, the table persists indefinitely.

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 time the table was created.

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 time the table was last truncated by an operation with a writeDisposition of WRITE_TRUNCATE.

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 time the table was last modified.

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 (EncryptionInfo)

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

TableName

The fully-qualified name for a table.

JSON representation
{
  "projectId": string,
  "datasetId": string,
  "tableId": string
}
Fields
projectId

string

The project ID.

datasetId

string

The dataset ID within the project.

tableId

string

The table ID of the table within the dataset.

TableInfo

User-provided metadata for a table.

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

string

A short name for the table, such as"Analytics Data - Jan 2011".

description

string

A long description, perhaps several paragraphs, describing the table contents in detail.

labels

map (key: string, value: string)

Labels provided for the table.

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

TableViewDefinition

Describes a virtual table defined by a SQL query.

JSON representation
{
  "query": string
}
Fields
query

string

SQL query defining the view.

EncryptionInfo

Describes encryption properties for a table or a job

JSON representation
{
  "kmsKeyName": string
}
Fields
kmsKeyName

string

unique identifier for cloud kms key

TableUpdateRequest

Table update request.

JSON representation
{
  "resource": {
    object (Table)
  }
}
Fields
resource

object (Table)

The table to be updated.

DatasetListRequest

Dataset list request.

JSON representation
{
  "listAll": boolean
}
Fields
listAll

boolean

Whether to list all datasets, including hidden ones.

DatasetInsertRequest

Dataset insert request.

JSON representation
{
  "resource": {
    object (Dataset)
  }
}
Fields
resource

object (Dataset)

The dataset to be inserted.

Dataset

BigQuery dataset information. See the Dataset API resource for more details on individual fields.

JSON representation
{
  "datasetName": {
    object (DatasetName)
  },
  "info": {
    object (DatasetInfo)
  },
  "createTime": string,
  "updateTime": string,
  "acl": {
    object (BigQueryAcl)
  },
  "defaultTableExpireDuration": string
}
Fields
datasetName

object (DatasetName)

The name of the dataset.

info

object (DatasetInfo)

User-provided metadata for the dataset.

createTime

string (Timestamp format)

The time the dataset was created.

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 time the dataset was last modified.

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 (BigQueryAcl)

The access control list for the dataset.

defaultTableExpireDuration

string (Duration format)

If this field is present, each table that does not specify an expiration time is assigned an expiration time by adding this duration to the table's createTime. If this field is empty, there is no default table expiration time.

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

DatasetName

The fully-qualified name for a dataset.

JSON representation
{
  "projectId": string,
  "datasetId": string
}
Fields
projectId

string

The project ID.

datasetId

string

The dataset ID within the project.

DatasetInfo

User-provided metadata for a dataset.

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

string

A short name for the dataset, such as"Analytics Data 2011".

description

string

A long description, perhaps several paragraphs, describing the dataset contents in detail.

labels

map (key: string, value: string)

Labels provided for the dataset.

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

BigQueryAcl

An access control list.

JSON representation
{
  "entries": [
    {
      object (Entry)
    }
  ]
}
Fields
entries[]

object (Entry)

Access control entry list.

Entry

Access control entry.

JSON representation
{
  "role": string,
  "groupEmail": string,
  "userEmail": string,
  "domain": string,
  "specialGroup": string,
  "viewName": {
    object (TableName)
  }
}
Fields
role

string

The granted role, which can be READER, WRITER, or OWNER.

groupEmail

string

Grants access to a group identified by an email address.

userEmail

string

Grants access to a user identified by an email address.

domain

string

Grants access to all members of a domain.

specialGroup

string

Grants access to special groups. Valid groups are PROJECT_OWNERS, PROJECT_READERS, PROJECT_WRITERS and ALL_AUTHENTICATED_USERS.

viewName

object (TableName)

Grants access to a BigQuery View.

DatasetUpdateRequest

Dataset update request.

JSON representation
{
  "resource": {
    object (Dataset)
  }
}
Fields
resource

object (Dataset)

The dataset to be updated.

JobInsertRequest

Job insert request.

JSON representation
{
  "resource": {
    object (Job)
  }
}
Fields
resource

object (Job)

Job insert request.

Job

Describes a job.

JSON representation
{
  "jobName": {
    object (JobName)
  },
  "jobConfiguration": {
    object (JobConfiguration)
  },
  "jobStatus": {
    object (JobStatus)
  },
  "jobStatistics": {
    object (JobStatistics)
  }
}
Fields
jobName

object (JobName)

Job name.

jobConfiguration

object (JobConfiguration)

Job configuration.

jobStatus

object (JobStatus)

Job status.

jobStatistics

object (JobStatistics)

Job statistics.

JobName

The fully-qualified name for a job.

JSON representation
{
  "projectId": string,
  "jobId": string,
  "location": string
}
Fields
projectId

string

The project ID.

jobId

string

The job ID within the project.

location

string

The job location.

JobConfiguration

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

JSON representation
{
  "dryRun": boolean,
  "labels": {
    string: string,
    ...
  },

  // Union field configuration can be only one of the following:
  "query": {
    object (Query)
  },
  "load": {
    object (Load)
  },
  "extract": {
    object (Extract)
  },
  "tableCopy": {
    object (TableCopy)
  }
  // End of list of possible types for union field configuration.
}
Fields
dryRun

boolean

If true, don't actually run the job. Just check that it would run.

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 configuration. Job configuration information. configuration can be only one of the following:
query

object (Query)

Query job information.

load

object (Load)

Load job information.

extract

object (Extract)

Extract job information.

tableCopy

object (TableCopy)

TableCopy job information.

Query

Describes a query job, which executes a SQL-like query.

JSON representation
{
  "query": string,
  "destinationTable": {
    object (TableName)
  },
  "createDisposition": string,
  "writeDisposition": string,
  "defaultDataset": {
    object (DatasetName)
  },
  "tableDefinitions": [
    {
      object (TableDefinition)
    }
  ],
  "queryPriority": string,
  "destinationTableEncryption": {
    object (EncryptionInfo)
  },
  "statementType": string
}
Fields
query

string

The SQL query to run.

destinationTable

object (TableName)

The table where results are written.

createDisposition

string

Describes when a job is allowed to create a table: CREATE_IF_NEEDED, CREATE_NEVER.

writeDisposition

string

Describes how writes affect existing tables: WRITE_TRUNCATE, WRITE_APPEND, WRITE_EMPTY.

defaultDataset

object (DatasetName)

If a table name is specified without a dataset in a query, this dataset will be added to table name.

tableDefinitions[]

object (TableDefinition)

Describes data sources outside BigQuery, if needed.

queryPriority

string

Describes the priority given to the query: QUERY_INTERACTIVE or QUERY_BATCH.

destinationTableEncryption

object (EncryptionInfo)

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

statementType

string

Type of the statement (e.g. SELECT, INSERT, CREATE_TABLE, CREATE_MODEL..)

TableDefinition

Describes 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

Google Cloud Storage URIs for the data to be imported.

Load

Describes a load job, which loads data from an external source via the import pipeline.

JSON representation
{
  "sourceUris": [
    string
  ],
  "schemaJson": string,
  "destinationTable": {
    object (TableName)
  },
  "createDisposition": string,
  "writeDisposition": string,
  "destinationTableEncryption": {
    object (EncryptionInfo)
  }
}
Fields
sourceUris[]

string

URIs for the data to be imported. Only Google Cloud Storage URIs are supported.

schemaJson

string

The table schema in JSON format representation of a TableSchema.

destinationTable

object (TableName)

The table where the imported data is written.

createDisposition

string

Describes when a job is allowed to create a table: CREATE_IF_NEEDED, CREATE_NEVER.

writeDisposition

string

Describes how writes affect existing tables: WRITE_TRUNCATE, WRITE_APPEND, WRITE_EMPTY.

destinationTableEncryption

object (EncryptionInfo)

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

Extract

Describes an extract job, which exports data to an external source via the export pipeline.

JSON representation
{
  "destinationUris": [
    string
  ],
  "sourceTable": {
    object (TableName)
  }
}
Fields
destinationUris[]

string

Google Cloud Storage URIs where extracted data should be written.

sourceTable

object (TableName)

The source table.

TableCopy

Describes a copy job, which copies an existing table to another table.

JSON representation
{
  "sourceTables": [
    {
      object (TableName)
    }
  ],
  "destinationTable": {
    object (TableName)
  },
  "createDisposition": string,
  "writeDisposition": string,
  "destinationTableEncryption": {
    object (EncryptionInfo)
  }
}
Fields
sourceTables[]

object (TableName)

Source tables.

destinationTable

object (TableName)

Destination table.

createDisposition

string

Describes when a job is allowed to create a table: CREATE_IF_NEEDED, CREATE_NEVER.

writeDisposition

string

Describes how writes affect existing tables: WRITE_TRUNCATE, WRITE_APPEND, WRITE_EMPTY.

destinationTableEncryption

object (EncryptionInfo)

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

JobStatus

Running state of a job.

JSON representation
{
  "state": string,
  "error": {
    object (Status)
  },
  "additionalErrors": [
    {
      object (Status)
    }
  ]
}
Fields
state

string

State of a job: PENDING, RUNNING, or DONE.

error

object (Status)

If the job did not complete successfully, this field describes why.

additionalErrors[]

object (Status)

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

Status

The Status type defines a logical error model that is suitable for different programming environments, including REST APIs and RPC APIs. It is used by gRPC. Each Status message contains three pieces of data: error code, error message, and error details.

You can find out more about this error model and how to work with it in the API Design Guide.

JSON representation
{
  "code": integer,
  "message": string,
  "details": [
    {
      "@type": string,
      field1: ...,
      ...
    }
  ]
}
Fields
code

integer

The status code, which should be an enum value of google.rpc.Code.

message

string

A developer-facing error message, which should be in English. Any user-facing error message should be localized and sent in the google.rpc.Status.details field, or localized by the client.

details[]

object

A list of messages that carry the error details. There is a common set of message types for APIs to use.

An object containing fields of an arbitrary type. An additional field "@type" contains a URI identifying the type. Example: { "id": 1234, "@type": "types.example.com/standard/id" }.

JobStatistics

Job statistics that may change after a job starts.

JSON representation
{
  "createTime": string,
  "startTime": string,
  "endTime": string,
  "totalProcessedBytes": string,
  "totalBilledBytes": string,
  "billingTier": integer,
  "totalSlotMs": string,
  "reservationUsage": [
    {
      object (ReservationResourceUsage)
    }
  ],
  "referencedTables": [
    {
      object (TableName)
    }
  ],
  "totalTablesProcessed": integer,
  "referencedViews": [
    {
      object (TableName)
    }
  ],
  "totalViewsProcessed": integer,
  "queryOutputRowCount": string,
  "totalLoadOutputBytes": string
}
Fields
createTime

string (Timestamp format)

Time when the job was created.

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)

Time when the job started.

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)

Time when the job ended.

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".

totalProcessedBytes

string (int64 format)

Total bytes processed for a job.

totalBilledBytes

string (int64 format)

Processed bytes, adjusted by the job's CPU usage.

billingTier

integer

The tier assigned by CPU-based billing.

totalSlotMs

string (int64 format)

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

reservationUsage[]
(deprecated)

object (ReservationResourceUsage)

Deprecated as of 12/15/2022.

referencedTables[]

object (TableName)

The first N tables accessed by the query job. Older queries that reference a large number of tables may not have all of their tables in this list. You can use the totalTablesProcessed count to know how many total tables were read in the query. For new queries, there is currently no limit.

totalTablesProcessed

integer

Total number of unique tables referenced in the query.

referencedViews[]

object (TableName)

The first N views accessed by the query job. Older queries that reference a large number of views may not have all of their views in this list. You can use the totalTablesProcessed count to know how many total tables were read in the query. For new queries, there is currently no limit.

totalViewsProcessed

integer

Total number of unique views referenced in the query.

queryOutputRowCount

string (int64 format)

Number of output rows produced by the query job.

totalLoadOutputBytes

string (int64 format)

Total bytes loaded for an import job.

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.

JobQueryRequest

Job query request.

JSON representation
{
  "query": string,
  "maxResults": integer,
  "defaultDataset": {
    object (DatasetName)
  },
  "projectId": string,
  "dryRun": boolean
}
Fields
query

string

The query.

maxResults

integer (uint32 format)

The maximum number of results.

defaultDataset

object (DatasetName)

The default dataset for tables that do not have a dataset specified.

projectId

string

Project that the query should be charged to.

dryRun

boolean

If true, don't actually run the job. Just check that it would run.

JobGetQueryResultsRequest

Job getQueryResults request.

JSON representation
{
  "maxResults": integer,
  "startRow": string
}
Fields
maxResults

integer (uint32 format)

Maximum number of results to return.

startRow

string

Zero-based row number at which to start.

TableDataListRequest

Table data-list request.

JSON representation
{
  "startRow": string,
  "maxResults": integer
}
Fields
startRow

string

Starting row offset.

maxResults

integer (uint32 format)

Maximum number of results to return.

SetIamPolicyRequest

Request message for SetIamPolicy method.

JSON representation
{
  "resource": string,
  "policy": {
    object (Policy)
  },
  "updateMask": string
}
Fields
resource

string

REQUIRED: The resource for which the policy is being specified. See Resource names for the appropriate value for this field.

policy

object (Policy)

REQUIRED: The complete policy to be applied to the resource. The size of the policy is limited to a few 10s of KB. An empty policy is a valid policy but certain Google Cloud services (such as Projects) might reject them.

updateMask

string (FieldMask format)

OPTIONAL: A FieldMask specifying which fields of the policy to modify. Only the fields in the mask will be modified. If no mask is provided, the following default mask is used:

paths: "bindings, etag"

This is a comma-separated list of fully qualified names of fields. Example: "user.displayName,photo".

Policy

An Identity and Access Management (IAM) policy, which specifies access controls for Google Cloud resources.

A Policy is a collection of bindings. A binding binds one or more members, or principals, to a single role. Principals can be user accounts, service accounts, Google groups, and domains (such as G Suite). A role is a named list of permissions; each role can be an IAM predefined role or a user-created custom role.

For some types of Google Cloud resources, a binding can also specify a condition, which is a logical expression that allows access to a resource only if the expression evaluates to true. A condition can add constraints based on attributes of the request, the resource, or both. To learn which resources support conditions in their IAM policies, see the IAM documentation.

JSON example:

    {
      "bindings": [
        {
          "role": "roles/resourcemanager.organizationAdmin",
          "members": [
            "user:mike@example.com",
            "group:admins@example.com",
            "domain:google.com",
            "serviceAccount:my-project-id@appspot.gserviceaccount.com"
          ]
        },
        {
          "role": "roles/resourcemanager.organizationViewer",
          "members": [
            "user:eve@example.com"
          ],
          "condition": {
            "title": "expirable access",
            "description": "Does not grant access after Sep 2020",
            "expression": "request.time < timestamp('2020-10-01T00:00:00.000Z')",
          }
        }
      ],
      "etag": "BwWWja0YfJA=",
      "version": 3
    }

YAML example:

    bindings:
    - members:
      - user:mike@example.com
      - group:admins@example.com
      - domain:google.com
      - serviceAccount:my-project-id@appspot.gserviceaccount.com
      role: roles/resourcemanager.organizationAdmin
    - members:
      - user:eve@example.com
      role: roles/resourcemanager.organizationViewer
      condition:
        title: expirable access
        description: Does not grant access after Sep 2020
        expression: request.time < timestamp('2020-10-01T00:00:00.000Z')
    etag: BwWWja0YfJA=
    version: 3

For a description of IAM and its features, see the IAM documentation.

JSON representation
{
  "version": integer,
  "bindings": [
    {
      object (Binding)
    }
  ],
  "auditConfigs": [
    {
      object (AuditConfig)
    }
  ],
  "etag": string
}
Fields
version

integer

Specifies the format of the policy.

Valid values are 0, 1, and 3. Requests that specify an invalid value are rejected.

Any operation that affects conditional role bindings must specify version 3. This requirement applies to the following operations:

  • Getting a policy that includes a conditional role binding
  • Adding a conditional role binding to a policy
  • Changing a conditional role binding in a policy
  • Removing any role binding, with or without a condition, from a policy that includes conditions

Important: If you use IAM Conditions, you must include the etag field whenever you call setIamPolicy. If you omit this field, then IAM allows you to overwrite a version 3 policy with a version 1 policy, and all of the conditions in the version 3 policy are lost.

If a policy does not include any conditions, operations on that policy may specify any valid version or leave the field unset.

To learn which resources support conditions in their IAM policies, see the IAM documentation.

bindings[]

object (Binding)

Associates a list of members, or principals, with a role. Optionally, may specify a condition that determines how and when the bindings are applied. Each of the bindings must contain at least one principal.

The bindings in a Policy can refer to up to 1,500 principals; up to 250 of these principals can be Google groups. Each occurrence of a principal counts towards these limits. For example, if the bindings grant 50 different roles to user:alice@example.com, and not to any other principal, then you can add another 1,450 principals to the bindings in the Policy.

auditConfigs[]

object (AuditConfig)

Specifies cloud audit logging configuration for this policy.

etag

string (bytes format)

etag is used for optimistic concurrency control as a way to help prevent simultaneous updates of a policy from overwriting each other. It is strongly suggested that systems make use of the etag in the read-modify-write cycle to perform policy updates in order to avoid race conditions: An etag is returned in the response to getIamPolicy, and systems are expected to put that etag in the request to setIamPolicy to ensure that their change will be applied to the same version of the policy.

Important: If you use IAM Conditions, you must include the etag field whenever you call setIamPolicy. If you omit this field, then IAM allows you to overwrite a version 3 policy with a version 1 policy, and all of the conditions in the version 3 policy are lost.

A base64-encoded string.

Binding

Associates members, or principals, with a role.

JSON representation
{
  "role": string,
  "members": [
    string
  ],
  "condition": {
    object (Expr)
  }
}
Fields
role

string

Role that is assigned to the list of members, or principals. For example, roles/viewer, roles/editor, or roles/owner.

members[]

string

Specifies the principals requesting access for a Google Cloud resource. members can have the following values:

  • allUsers: A special identifier that represents anyone who is on the internet; with or without a Google account.

  • allAuthenticatedUsers: A special identifier that represents anyone who is authenticated with a Google account or a service account. Does not include identities that come from external identity providers (IdPs) through identity federation.

  • user:{emailid}: An email address that represents a specific Google account. For example, alice@example.com .

  • serviceAccount:{emailid}: An email address that represents a Google service account. For example, my-other-app@appspot.gserviceaccount.com.

  • serviceAccount:{projectid}.svc.id.goog[{namespace}/{kubernetes-sa}]: An identifier for a Kubernetes service account. For example, my-project.svc.id.goog[my-namespace/my-kubernetes-sa].

  • group:{emailid}: An email address that represents a Google group. For example, admins@example.com.

  • domain:{domain}: The G Suite domain (primary) that represents all the users of that domain. For example, google.com or example.com.
  • deleted:user:{emailid}?uid={uniqueid}: An email address (plus unique identifier) representing a user that has been recently deleted. For example, alice@example.com?uid=123456789012345678901. If the user is recovered, this value reverts to user:{emailid} and the recovered user retains the role in the binding.

  • deleted:serviceAccount:{emailid}?uid={uniqueid}: An email address (plus unique identifier) representing a service account that has been recently deleted. For example, my-other-app@appspot.gserviceaccount.com?uid=123456789012345678901. If the service account is undeleted, this value reverts to serviceAccount:{emailid} and the undeleted service account retains the role in the binding.

  • deleted:group:{emailid}?uid={uniqueid}: An email address (plus unique identifier) representing a Google group that has been recently deleted. For example, admins@example.com?uid=123456789012345678901. If the group is recovered, this value reverts to group:{emailid} and the recovered group retains the role in the binding.

condition

object (Expr)

The condition that is associated with this binding.

If the condition evaluates to true, then this binding applies to the current request.

If the condition evaluates to false, then this binding does not apply to the current request. However, a different role binding might grant the same role to one or more of the principals in this binding.

To learn which resources support conditions in their IAM policies, see the IAM documentation.

Expr

Represents a textual expression in the Common Expression Language (CEL) syntax. CEL is a C-like expression language. The syntax and semantics of CEL are documented at https://github.com/google/cel-spec.

Example (Comparison):

title: "Summary size limit"
description: "Determines if a summary is less than 100 chars"
expression: "document.summary.size() < 100"

Example (Equality):

title: "Requestor is owner"
description: "Determines if requestor is the document owner"
expression: "document.owner == request.auth.claims.email"

Example (Logic):

title: "Public documents"
description: "Determine whether the document should be publicly visible"
expression: "document.type != 'private' && document.type != 'internal'"

Example (Data Manipulation):

title: "Notification string"
description: "Create a notification string with a timestamp."
expression: "'New message received at ' + string(document.create_time)"

The exact variables and functions that may be referenced within an expression are determined by the service that evaluates it. See the service documentation for additional information.

JSON representation
{
  "expression": string,
  "title": string,
  "description": string,
  "location": string
}
Fields
expression

string

Textual representation of an expression in Common Expression Language syntax.

title

string

Optional. Title for the expression, i.e. a short string describing its purpose. This can be used e.g. in UIs which allow to enter the expression.

description

string

Optional. Description of the expression. This is a longer text which describes the expression, e.g. when hovered over it in a UI.

location

string

Optional. String indicating the location of the expression for error reporting, e.g. a file name and a position in the file.

AuditConfig

Specifies the audit configuration for a service. The configuration determines which permission types are logged, and what identities, if any, are exempted from logging. An AuditConfig must have one or more AuditLogConfigs.

If there are AuditConfigs for both allServices and a specific service, the union of the two AuditConfigs is used for that service: the log_types specified in each AuditConfig are enabled, and the exemptedMembers in each AuditLogConfig are exempted.

Example Policy with multiple AuditConfigs:

{
  "auditConfigs": [
    {
      "service": "allServices",
      "auditLogConfigs": [
        {
          "logType": "DATA_READ",
          "exemptedMembers": [
            "user:jose@example.com"
          ]
        },
        {
          "logType": "DATA_WRITE"
        },
        {
          "logType": "ADMIN_READ"
        }
      ]
    },
    {
      "service": "sampleservice.googleapis.com",
      "auditLogConfigs": [
        {
          "logType": "DATA_READ"
        },
        {
          "logType": "DATA_WRITE",
          "exemptedMembers": [
            "user:aliya@example.com"
          ]
        }
      ]
    }
  ]
}

For sampleservice, this policy enables DATA_READ, DATA_WRITE and ADMIN_READ logging. It also exempts jose@example.com from DATA_READ logging, and aliya@example.com from DATA_WRITE logging.

JSON representation
{
  "service": string,
  "auditLogConfigs": [
    {
      object (AuditLogConfig)
    }
  ]
}
Fields
service

string

Specifies a service that will be enabled for audit logging. For example, storage.googleapis.com, cloudsql.googleapis.com. allServices is a special value that covers all services.

auditLogConfigs[]

object (AuditLogConfig)

The configuration for logging of each type of permission.

AuditLogConfig

Provides the configuration for logging a type of permissions. Example:

{
  "auditLogConfigs": [
    {
      "logType": "DATA_READ",
      "exemptedMembers": [
        "user:jose@example.com"
      ]
    },
    {
      "logType": "DATA_WRITE"
    }
  ]
}

This enables 'DATA_READ' and 'DATA_WRITE' logging, while exempting jose@example.com from DATA_READ logging.

JSON representation
{
  "logType": enum (LogType),
  "exemptedMembers": [
    string
  ]
}
Fields
logType

enum (LogType)

The log type that this config enables.

exemptedMembers[]

string

Specifies the identities that do not cause logging for this type of permission. Follows the same format of Binding.members.

TableInsertResponse

Table insert response.

JSON representation
{
  "resource": {
    object (Table)
  }
}
Fields
resource

object (Table)

Final state of the inserted table.

TableUpdateResponse

Table update response.

JSON representation
{
  "resource": {
    object (Table)
  }
}
Fields
resource

object (Table)

Final state of the updated table.

DatasetInsertResponse

Dataset insert response.

JSON representation
{
  "resource": {
    object (Dataset)
  }
}
Fields
resource

object (Dataset)

Final state of the inserted dataset.

DatasetUpdateResponse

Dataset update response.

JSON representation
{
  "resource": {
    object (Dataset)
  }
}
Fields
resource

object (Dataset)

Final state of the updated dataset.

JobInsertResponse

Job insert response.

JSON representation
{
  "resource": {
    object (Job)
  }
}
Fields
resource

object (Job)

Job insert response.

JobQueryResponse

Job query response.

JSON representation
{
  "totalResults": string,
  "job": {
    object (Job)
  }
}
Fields
totalResults

string

The total number of rows in the full query result set.

job

object (Job)

Information about the queried job.

JobGetQueryResultsResponse

Job getQueryResults response.

JSON representation
{
  "totalResults": string,
  "job": {
    object (Job)
  }
}
Fields
totalResults

string

Total number of results in query results.

job

object (Job)

The job that was created to run the query. It completed if job.status.state is DONE. It failed if job.status.errorResult is also present.

JobQueryDoneResponse

Job getQueryDone response.

JSON representation
{
  "job": {
    object (Job)
  }
}
Fields
job

object (Job)

The job and status information. The job completed if job.status.state is DONE.

JobCompletedEvent

Query job completed event.

JSON representation
{
  "eventName": string,
  "job": {
    object (Job)
  }
}
Fields
eventName

string

Name of the event.

job

object (Job)

Job information.

TableDataReadEvent

Table data read event. Only present for tables, not views, and is only included in the log record for the project that owns the table.

JSON representation
{
  "tableName": {
    object (TableName)
  },
  "referencedFields": [
    string
  ]
}
Fields
tableName

object (TableName)

Name of the accessed table.

referencedFields[]

string

A list of referenced fields. This information is not included by default. To enable this in the logs, please contact BigQuery support or open a bug in the BigQuery issue tracker.