Cloud Data Loss Prevention (Cloud DLP) is now a part of Sensitive Data Protection. The API name remains the same: Cloud Data Loss Prevention API (DLP API). For information about the services that make up Sensitive Data Protection, see Sensitive Data Protection overview.
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.
Projects scope, no location specified (defaults to global): projects/{projectId}
The following example parent string specifies a parent project with the identifier example-project, and specifies the europe-west3 location for processing data:
Authorization requires the following 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,"locationId": 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.
locationId
string
Deprecated. This field has no effect.
Union field job. The configuration details for the specific type of job to run. job can be only one of the following:
[[["Easy to understand","easyToUnderstand","thumb-up"],["Solved my problem","solvedMyProblem","thumb-up"],["Other","otherUp","thumb-up"]],[["Hard to understand","hardToUnderstand","thumb-down"],["Incorrect information or sample code","incorrectInformationOrSampleCode","thumb-down"],["Missing the information/samples I need","missingTheInformationSamplesINeed","thumb-down"],["Other","otherDown","thumb-down"]],["Last updated 2025-07-18 UTC."],[],[],null,["# Method: projects.dlpJobs.create\n\n- [HTTP request](#body.HTTP_TEMPLATE)\n- [Path parameters](#body.PATH_PARAMETERS)\n- [Request body](#body.request_body)\n - [JSON representation](#body.request_body.SCHEMA_REPRESENTATION)\n- [Response body](#body.response_body)\n- [Authorization scopes](#body.aspect)\n- [Try it!](#try-it)\n\nCreates a new job to inspect storage or calculate risk metrics. See \u003chttps://cloud.google.com/sensitive-data-protection/docs/inspecting-storage\u003e and \u003chttps://cloud.google.com/sensitive-data-protection/docs/compute-risk-analysis\u003e to learn more.\n\nWhen 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.\n\n### HTTP request\n\nChoose a location: \nglobal africa-south1 asia-east1 asia-east2 asia-northeast1 asia-northeast2 asia-northeast3 asia-south1 asia-south2 asia-southeast1 asia-southeast2 australia-southeast1 australia-southeast2 europe-central2 europe-north1 europe-north2 europe-southwest1 europe-west1 europe-west10 europe-west12 europe-west2 europe-west3 europe-west4 europe-west6 europe-west8 europe-west9 me-central1 me-central2 me-west1 northamerica-northeast1 northamerica-northeast2 northamerica-south1 southamerica-east1 southamerica-west1 us-central1 us-central2 us-east1 us-east4 us-east5 us-south1 us-west1 us-west2 us-west3 us-west4 us-west8 us eu \n\n\u003cbr /\u003e\n\nThe URLs use [gRPC Transcoding](https://google.aip.dev/127) syntax.\n\n### Path parameters\n\n### Request body\n\nThe request body contains data with the following structure:\n\n### Response body\n\nIf successful, the response body contains a newly created instance of [DlpJob](/sensitive-data-protection/docs/reference/rest/v2/projects.dlpJobs#DlpJob).\n\n### Authorization scopes\n\nRequires the following OAuth scope:\n\n- `https://www.googleapis.com/auth/cloud-platform`\n\nFor more information, see the [Authentication Overview](/docs/authentication#authorization-gcp)."]]