- HTTP request
 - Path parameters
 - Request body
 - Response body
 - Authorization scopes
 - IAM Permissions
 - Try it!
 
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/v2/{parent=projects/*/locations/*}/dataPolicies
The URL uses gRPC Transcoding syntax.
Path parameters
| Parameters | |
|---|---|
parent | 
                
                   
 Required. Resource name of the project that the data policy will belong to. The format is   | 
              
Request body
The request body contains data with the following structure:
| JSON representation | 
|---|
{
  "dataPolicyId": string,
  "dataPolicy": {
    object ( | 
                
| Fields | |
|---|---|
dataPolicyId | 
                  
                     
 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 | 
                  
                     
 Required. The data policy to create. The   | 
                
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/bigqueryhttps://www.googleapis.com/auth/cloud-platform
For more information, see the Authentication Overview.
IAM Permissions
Requires the following IAM permission on the routine resource:
bigquery.routines.get
Requires the following IAM permission on the parent resource:
bigquery.dataPolicies.create
For more information, see the IAM documentation.