Method: projects.locations.dataPolicies.create

Creates a new data policy under a project with the given dataPolicyId (used as the display name), and data policy type.

HTTP request

POST https://bigquerydatapolicy.googleapis.com/v2beta1/{parent=projects/*/locations/*}/dataPolicies

The URL uses gRPC Transcoding syntax.

Path parameters

Parameters
parent

string

Required. Resource name of the project that the data policy will belong to. The format is projects/{projectNumber}/locations/{locationId}.

Request body

The request body contains data with the following structure:

JSON representation
{
  "dataPolicyId": string,
  "dataPolicy": {
    object (DataPolicy)
  }
}
Fields
dataPolicyId

string

Required. User-assigned (human readable) ID of the data policy that needs to be unique within a project. Used as {dataPolicyId} in part of the resource name.

dataPolicy

object (DataPolicy)

Required. The data policy to create. The name field does not need to be provided for the data policy creation.

Response body

If successful, the response body contains a newly created instance of DataPolicy.

Authorization scopes

Requires one of the following OAuth scopes:

  • https://www.googleapis.com/auth/bigquery
  • https://www.googleapis.com/auth/cloud-platform

For more information, see the Authentication Overview.

IAM Permissions

Requires the following IAM permission on the parent resource:

  • bigquery.dataPolicies.create

For more information, see the IAM documentation.