Method: projects.dlpJobs.create

Creates a new job to inspect storage or calculate risk metrics. See https://cloud.google.com/dlp/docs/inspecting-storage and https://cloud.google.com/dlp/docs/compute-risk-analysis to learn more.

When no InfoTypes or CustomInfoTypes are specified in inspect jobs, the system will automatically choose what detectors to run. By default this may be all types, but may change over time as detectors are updated.

HTTP request

POST https://dlp.googleapis.com/v2/{parent=projects/*}/dlpJobs

The URL uses gRPC Transcoding syntax.

Path parameters

Parameters
parent

string

The parent resource name, for example projects/my-project-id.

Authorization requires the following Google IAM permission on the specified resource parent:

  • dlp.jobs.create

Request body

The request body contains data with the following structure:

JSON representation
{
  "jobId": string,

  // Union field job can be only one of the following:
  "inspectJob": {
    object(InspectJobConfig)
  },
  "riskJob": {
    object(RiskAnalysisJobConfig)
  }
  // End of list of possible types for union field job.
}
Fields
jobId

string

The job id can contain uppercase and lowercase letters, numbers, and hyphens; that is, it must match the regular expression: [a-zA-Z\\d-]+. The maximum length is 100 characters. Can be empty to allow the system to generate one.

Union field job. The configuration details for the specific type of job to run. job can be only one of the following:
inspectJob

object(InspectJobConfig)

riskJob

object(RiskAnalysisJobConfig)

Response body

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

Authorization Scopes

Requires the following OAuth scope:

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

For more information, see the Authentication Overview.

RiskAnalysisJobConfig

Configuration for a risk analysis job. See https://cloud.google.com/dlp/docs/concepts-risk-analysis to learn more.

JSON representation
{
  "privacyMetric": {
    object(PrivacyMetric)
  },
  "sourceTable": {
    object(BigQueryTable)
  },
  "actions": [
    {
      object(Action)
    }
  ]
}
Fields
privacyMetric

object(PrivacyMetric)

Privacy metric to compute.

sourceTable

object(BigQueryTable)

Input dataset to compute metrics over.

actions[]

object(Action)

Actions to execute at the completion of the job. Are executed in the order provided.

Try it!

Was this page helpful? Let us know how we did:

Send feedback about...

Data Loss Prevention API