Skip to main content

dlp_jobs

Creates, updates, deletes, gets or lists a dlp_jobs resource.

Overview

Namedlp_jobs
TypeResource
Idgoogle.dlp.dlp_jobs

Fields

The following fields are returned by SELECT queries:

Successful response

NameDatatypeDescription
namestringThe server-assigned name.
actionDetailsarrayEvents that should occur after the job has completed.
createTimestring (google-datetime)Time when the job was created.
endTimestring (google-datetime)Time when the job finished.
errorsarrayA stream of errors encountered running the job.
inspectDetailsobjectResults from inspecting a data source. (id: GooglePrivacyDlpV2InspectDataSourceDetails)
jobTriggerNamestringIf created by a job trigger, the resource name of the trigger that instantiated the job.
lastModifiedstring (google-datetime)Time when the job was last modified by the system.
riskDetailsobjectResults from analyzing risk of a data source. (id: GooglePrivacyDlpV2AnalyzeDataSourceRiskDetails)
startTimestring (google-datetime)Time when the job started.
statestringState of a job.
typestringThe type of job.

Methods

The following methods are available for this resource:

NameAccessible byRequired ParamsOptional ParamsDescription
projects_locations_dlp_jobs_getselectprojectsId, locationsId, dlpJobsIdGets the latest state of a long-running DlpJob. See https://cloud.google.com/sensitive-data-protection/docs/inspecting-storage and https://cloud.google.com/sensitive-data-protection/docs/compute-risk-analysis to learn more.
projects_locations_dlp_jobs_listselectprojectsId, locationsIdfilter, pageSize, pageToken, type, orderBy, locationIdLists DlpJobs that match the specified filter in the request. See https://cloud.google.com/sensitive-data-protection/docs/inspecting-storage and https://cloud.google.com/sensitive-data-protection/docs/compute-risk-analysis to learn more.
projects_dlp_jobs_getselectprojectsId, dlpJobsIdGets the latest state of a long-running DlpJob. See https://cloud.google.com/sensitive-data-protection/docs/inspecting-storage and https://cloud.google.com/sensitive-data-protection/docs/compute-risk-analysis to learn more.
organizations_locations_dlp_jobs_listselectorganizationsId, locationsIdfilter, pageSize, pageToken, type, orderBy, locationIdLists DlpJobs that match the specified filter in the request. See https://cloud.google.com/sensitive-data-protection/docs/inspecting-storage and https://cloud.google.com/sensitive-data-protection/docs/compute-risk-analysis to learn more.
projects_dlp_jobs_listselectprojectsIdfilter, pageSize, pageToken, type, orderBy, locationIdLists DlpJobs that match the specified filter in the request. See https://cloud.google.com/sensitive-data-protection/docs/inspecting-storage and https://cloud.google.com/sensitive-data-protection/docs/compute-risk-analysis to learn more.
projects_locations_dlp_jobs_createinsertprojectsId, locationsIdCreates a new job to inspect storage or calculate risk metrics. See https://cloud.google.com/sensitive-data-protection/docs/inspecting-storage and https://cloud.google.com/sensitive-data-protection/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.
projects_dlp_jobs_createinsertprojectsIdCreates a new job to inspect storage or calculate risk metrics. See https://cloud.google.com/sensitive-data-protection/docs/inspecting-storage and https://cloud.google.com/sensitive-data-protection/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.
projects_locations_dlp_jobs_deletedeleteprojectsId, locationsId, dlpJobsIdDeletes a long-running DlpJob. This method indicates that the client is no longer interested in the DlpJob result. The job will be canceled if possible. See https://cloud.google.com/sensitive-data-protection/docs/inspecting-storage and https://cloud.google.com/sensitive-data-protection/docs/compute-risk-analysis to learn more.
projects_dlp_jobs_deletedeleteprojectsId, dlpJobsIdDeletes a long-running DlpJob. This method indicates that the client is no longer interested in the DlpJob result. The job will be canceled if possible. See https://cloud.google.com/sensitive-data-protection/docs/inspecting-storage and https://cloud.google.com/sensitive-data-protection/docs/compute-risk-analysis to learn more.
projects_locations_dlp_jobs_cancelexecprojectsId, locationsId, dlpJobsIdStarts asynchronous cancellation on a long-running DlpJob. The server makes a best effort to cancel the DlpJob, but success is not guaranteed. See https://cloud.google.com/sensitive-data-protection/docs/inspecting-storage and https://cloud.google.com/sensitive-data-protection/docs/compute-risk-analysis to learn more.
projects_locations_dlp_jobs_hybrid_inspectexecprojectsId, locationsId, dlpJobsIdInspect hybrid content and store findings to a job. To review the findings, inspect the job. Inspection will occur asynchronously.
projects_locations_dlp_jobs_finishexecprojectsId, locationsId, dlpJobsIdFinish a running hybrid DlpJob. Triggers the finalization steps and running of any enabled actions that have not yet run.
projects_dlp_jobs_cancelexecprojectsId, dlpJobsIdStarts asynchronous cancellation on a long-running DlpJob. The server makes a best effort to cancel the DlpJob, but success is not guaranteed. See https://cloud.google.com/sensitive-data-protection/docs/inspecting-storage and https://cloud.google.com/sensitive-data-protection/docs/compute-risk-analysis to learn more.

Parameters

Parameters can be passed in the WHERE clause of a query. Check the Methods section to see which parameters are required or optional for each operation.

NameDatatypeDescription
dlpJobsIdstring
locationsIdstring
organizationsIdstring
projectsIdstring
filterstring
locationIdstring
orderBystring
pageSizeinteger (int32)
pageTokenstring
typestring

SELECT examples

Gets the latest state of a long-running DlpJob. See https://cloud.google.com/sensitive-data-protection/docs/inspecting-storage and https://cloud.google.com/sensitive-data-protection/docs/compute-risk-analysis to learn more.

SELECT
name,
actionDetails,
createTime,
endTime,
errors,
inspectDetails,
jobTriggerName,
lastModified,
riskDetails,
startTime,
state,
type
FROM google.dlp.dlp_jobs
WHERE projectsId = '{{ projectsId }}' -- required
AND locationsId = '{{ locationsId }}' -- required
AND dlpJobsId = '{{ dlpJobsId }}' -- required;

INSERT examples

Creates a new job to inspect storage or calculate risk metrics. See https://cloud.google.com/sensitive-data-protection/docs/inspecting-storage and https://cloud.google.com/sensitive-data-protection/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.

INSERT INTO google.dlp.dlp_jobs (
data__inspectJob,
data__riskJob,
data__jobId,
data__locationId,
projectsId,
locationsId
)
SELECT
'{{ inspectJob }}',
'{{ riskJob }}',
'{{ jobId }}',
'{{ locationId }}',
'{{ projectsId }}',
'{{ locationsId }}'
RETURNING
name,
actionDetails,
createTime,
endTime,
errors,
inspectDetails,
jobTriggerName,
lastModified,
riskDetails,
startTime,
state,
type
;

DELETE examples

Deletes a long-running DlpJob. This method indicates that the client is no longer interested in the DlpJob result. The job will be canceled if possible. See https://cloud.google.com/sensitive-data-protection/docs/inspecting-storage and https://cloud.google.com/sensitive-data-protection/docs/compute-risk-analysis to learn more.

DELETE FROM google.dlp.dlp_jobs
WHERE projectsId = '{{ projectsId }}' --required
AND locationsId = '{{ locationsId }}' --required
AND dlpJobsId = '{{ dlpJobsId }}' --required;

Lifecycle Methods

Starts asynchronous cancellation on a long-running DlpJob. The server makes a best effort to cancel the DlpJob, but success is not guaranteed. See https://cloud.google.com/sensitive-data-protection/docs/inspecting-storage and https://cloud.google.com/sensitive-data-protection/docs/compute-risk-analysis to learn more.

EXEC google.dlp.dlp_jobs.projects_locations_dlp_jobs_cancel 
@projectsId='{{ projectsId }}' --required,
@locationsId='{{ locationsId }}' --required,
@dlpJobsId='{{ dlpJobsId }}' --required;