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:

NameDatatypeDescription
namestringOutput only. The server-assigned name.
actionDetailsarrayOutput only. Events that should occur after the job has completed.
createTimestring (google-datetime)Output only. Time when the job was created.
endTimestring (google-datetime)Output only. Time when the job finished.
errorsarrayOutput only. A stream of errors encountered running the job.
inspectDetailsobjectResults from inspecting a data source. (id: GooglePrivacyDlpV2InspectDataSourceDetails)
jobTriggerNamestringOutput only. If created by a job trigger, the resource name of the trigger that instantiated the job.
lastModifiedstring (google-datetime)Output only. Time when the job was last modified by the system.
riskDetailsobjectResults from analyzing risk of a data source. (id: GooglePrivacyDlpV2AnalyzeDataSourceRiskDetails)
startTimestring (google-datetime)Output only. Time when the job started.
statestringOutput only. State of a job. (JOB_STATE_UNSPECIFIED, PENDING, RUNNING, DONE, CANCELED, FAILED, ACTIVE)
typestringThe type of job. (DLP_JOB_TYPE_UNSPECIFIED, INSPECT_JOB, RISK_ANALYSIS_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://docs.cloud.google.com/sensitive-data-protection/docs/inspecting-storage and https://docs.cloud.google.com/sensitive-data-protection/docs/compute-risk-analysis to learn more.
organizations_locations_dlp_jobs_listselectorganizationsId, locationsIdfilter, locationId, orderBy, pageSize, pageToken, typeLists DlpJobs that match the specified filter in the request. See https://docs.cloud.google.com/sensitive-data-protection/docs/inspecting-storage and https://docs.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://docs.cloud.google.com/sensitive-data-protection/docs/inspecting-storage and https://docs.cloud.google.com/sensitive-data-protection/docs/compute-risk-analysis to learn more.
projects_locations_dlp_jobs_listselectprojectsId, locationsIdfilter, locationId, orderBy, pageSize, pageToken, typeLists DlpJobs that match the specified filter in the request. See https://docs.cloud.google.com/sensitive-data-protection/docs/inspecting-storage and https://docs.cloud.google.com/sensitive-data-protection/docs/compute-risk-analysis to learn more.
projects_dlp_jobs_listselectprojectsIdfilter, locationId, orderBy, pageSize, pageToken, typeLists DlpJobs that match the specified filter in the request. See https://docs.cloud.google.com/sensitive-data-protection/docs/inspecting-storage and https://docs.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://docs.cloud.google.com/sensitive-data-protection/docs/inspecting-storage and https://docs.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://docs.cloud.google.com/sensitive-data-protection/docs/inspecting-storage and https://docs.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://docs.cloud.google.com/sensitive-data-protection/docs/inspecting-storage and https://docs.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://docs.cloud.google.com/sensitive-data-protection/docs/inspecting-storage and https://docs.cloud.google.com/sensitive-data-protection/docs/compute-risk-analysis to learn more.
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://docs.cloud.google.com/sensitive-data-protection/docs/inspecting-storage and https://docs.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://docs.cloud.google.com/sensitive-data-protection/docs/inspecting-storage and https://docs.cloud.google.com/sensitive-data-protection/docs/compute-risk-analysis to learn more.
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_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.

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://docs.cloud.google.com/sensitive-data-protection/docs/inspecting-storage and https://docs.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://docs.cloud.google.com/sensitive-data-protection/docs/inspecting-storage and https://docs.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__jobId,
data__locationId,
data__riskJob,
projectsId,
locationsId
)
SELECT
'{{ inspectJob }}',
'{{ jobId }}',
'{{ locationId }}',
'{{ riskJob }}',
'{{ 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://docs.cloud.google.com/sensitive-data-protection/docs/inspecting-storage and https://docs.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://docs.cloud.google.com/sensitive-data-protection/docs/inspecting-storage and https://docs.cloud.google.com/sensitive-data-protection/docs/compute-risk-analysis to learn more.

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