- [Resource: DlpJob](https://docs.cloud.google.com/sensitive-data-protection/docs/reference/rest/v2/projects.locations.dlpJobs#DlpJob)
  - [JSON representation](https://docs.cloud.google.com/sensitive-data-protection/docs/reference/rest/v2/projects.locations.dlpJobs#DlpJob.SCHEMA_REPRESENTATION)
- [Methods](https://docs.cloud.google.com/sensitive-data-protection/docs/reference/rest/v2/projects.locations.dlpJobs#METHODS_SUMMARY)

## Resource: DlpJob

Combines all of the information about a DLP job.

| JSON representation |
|---|
| ``` { "name": string, "type": enum (`https://docs.cloud.google.com/sensitive-data-protection/docs/reference/rest/v2/projects.dlpJobs#DlpJob.DlpJobType`), "state": enum (`https://docs.cloud.google.com/sensitive-data-protection/docs/reference/rest/v2/projects.dlpJobs#DlpJob.JobState`), "createTime": string, "startTime": string, "endTime": string, "lastModified": string, "jobTriggerName": string, "errors": [ { object (`https://docs.cloud.google.com/sensitive-data-protection/docs/reference/rest/v2/Error`) } ], "actionDetails": [ { object (`https://docs.cloud.google.com/sensitive-data-protection/docs/reference/rest/v2/projects.dlpJobs#DlpJob.ActionDetails`) } ], // The following is a list of mutually exclusive fields. At most one of the // fields will be set in a response: "riskDetails": { object (`https://docs.cloud.google.com/sensitive-data-protection/docs/reference/rest/v2/projects.dlpJobs#DlpJob.AnalyzeDataSourceRiskDetails`) }, "inspectDetails": { object (`https://docs.cloud.google.com/sensitive-data-protection/docs/reference/rest/v2/projects.dlpJobs#DlpJob.InspectDataSourceDetails`) } // End of mutually exclusive fields. } ``` |

| Fields ||
|---|---|
| `name` | `string` Output only. The server-assigned name. |
| `type` | ``enum (`https://docs.cloud.google.com/sensitive-data-protection/docs/reference/rest/v2/projects.dlpJobs#DlpJob.DlpJobType`)`` The type of job. |
| `state` | ``enum (`https://docs.cloud.google.com/sensitive-data-protection/docs/reference/rest/v2/projects.dlpJobs#DlpJob.JobState`)`` Output only. State of a job. |
| `createTime` | ``string (`https://protobuf.dev/reference/protobuf/google.protobuf#timestamp` format)`` Output only. Time when the job was created. Uses RFC 3339, where generated output will always be Z-normalized and use 0, 3, 6 or 9 fractional digits. Offsets other than "Z" are also accepted. Examples: `"2014-10-02T15:01:23Z"`, `"2014-10-02T15:01:23.045123456Z"` or `"2014-10-02T15:01:23+05:30"`. |
| `startTime` | ``string (`https://protobuf.dev/reference/protobuf/google.protobuf#timestamp` format)`` Output only. Time when the job started. Uses RFC 3339, where generated output will always be Z-normalized and use 0, 3, 6 or 9 fractional digits. Offsets other than "Z" are also accepted. Examples: `"2014-10-02T15:01:23Z"`, `"2014-10-02T15:01:23.045123456Z"` or `"2014-10-02T15:01:23+05:30"`. |
| `endTime` | ``string (`https://protobuf.dev/reference/protobuf/google.protobuf#timestamp` format)`` Output only. Time when the job finished. Uses RFC 3339, where generated output will always be Z-normalized and use 0, 3, 6 or 9 fractional digits. Offsets other than "Z" are also accepted. Examples: `"2014-10-02T15:01:23Z"`, `"2014-10-02T15:01:23.045123456Z"` or `"2014-10-02T15:01:23+05:30"`. |
| `lastModified` | ``string (`https://protobuf.dev/reference/protobuf/google.protobuf#timestamp` format)`` Output only. Time when the job was last modified by the system. Uses RFC 3339, where generated output will always be Z-normalized and use 0, 3, 6 or 9 fractional digits. Offsets other than "Z" are also accepted. Examples: `"2014-10-02T15:01:23Z"`, `"2014-10-02T15:01:23.045123456Z"` or `"2014-10-02T15:01:23+05:30"`. |
| `jobTriggerName` | `string` Output only. If created by a job trigger, the resource name of the trigger that instantiated the job. |
| `errors[]` | ``object (`https://docs.cloud.google.com/sensitive-data-protection/docs/reference/rest/v2/Error`)`` Output only. A stream of errors encountered running the job. |
| `actionDetails[]` | ``object (`https://docs.cloud.google.com/sensitive-data-protection/docs/reference/rest/v2/projects.dlpJobs#DlpJob.ActionDetails`)`` Output only. Events that should occur after the job has completed. |
| Job details. The following is a list of mutually exclusive fields. At most one of the fields will be set in a response: ||
| `riskDetails` | ``object (`https://docs.cloud.google.com/sensitive-data-protection/docs/reference/rest/v2/projects.dlpJobs#DlpJob.AnalyzeDataSourceRiskDetails`)`` Results from analyzing risk of a data source. |
| `inspectDetails` | ``object (`https://docs.cloud.google.com/sensitive-data-protection/docs/reference/rest/v2/projects.dlpJobs#DlpJob.InspectDataSourceDetails`)`` Results from inspecting a data source. |
| End of mutually exclusive fields. ||

| ## Methods ||
|---|---|
| ### `https://docs.cloud.google.com/sensitive-data-protection/docs/reference/rest/v2/projects.locations.dlpJobs/cancel` | Starts asynchronous cancellation on a long-running DlpJob. |
| ### `https://docs.cloud.google.com/sensitive-data-protection/docs/reference/rest/v2/projects.locations.dlpJobs/create` | Creates a new job to inspect storage or calculate risk metrics. |
| ### `https://docs.cloud.google.com/sensitive-data-protection/docs/reference/rest/v2/projects.locations.dlpJobs/delete` | Deletes a long-running DlpJob. |
| ### `https://docs.cloud.google.com/sensitive-data-protection/docs/reference/rest/v2/projects.locations.dlpJobs/finish` | Finish a running hybrid DlpJob. |
| ### `https://docs.cloud.google.com/sensitive-data-protection/docs/reference/rest/v2/projects.locations.dlpJobs/get` | Gets the latest state of a long-running DlpJob. |
| ### `https://docs.cloud.google.com/sensitive-data-protection/docs/reference/rest/v2/projects.locations.dlpJobs/hybridInspect` | Inspect hybrid content and store findings to a job. |
| ### `https://docs.cloud.google.com/sensitive-data-protection/docs/reference/rest/v2/projects.locations.dlpJobs/list` | Lists DlpJobs that match the specified filter in the request. |