dlp_jobs
Creates, updates, deletes, gets or lists a dlp_jobs resource.
Overview
| Name | dlp_jobs |
| Type | Resource |
| Id | google.dlp.dlp_jobs |
Fields
The following fields are returned by SELECT queries:
- projects_locations_dlp_jobs_get
- projects_dlp_jobs_get
- projects_locations_dlp_jobs_list
- organizations_locations_dlp_jobs_list
- projects_dlp_jobs_list
| Name | Datatype | Description |
|---|---|---|
name | string | Output only. The server-assigned name. |
actionDetails | array | Output only. Events that should occur after the job has completed. |
createTime | string (google-datetime) | Output only. Time when the job was created. |
endTime | string (google-datetime) | Output only. Time when the job finished. |
errors | array | Output only. A stream of errors encountered running the job. |
inspectDetails | object | Results from inspecting a data source. (id: GooglePrivacyDlpV2InspectDataSourceDetails) |
jobTriggerName | string | Output only. If created by a job trigger, the resource name of the trigger that instantiated the job. |
lastModified | string (google-datetime) | Output only. Time when the job was last modified by the system. |
riskDetails | object | Results from analyzing risk of a data source. (id: GooglePrivacyDlpV2AnalyzeDataSourceRiskDetails) |
startTime | string (google-datetime) | Output only. Time when the job started. |
state | string | Output only. State of a job. (JOB_STATE_UNSPECIFIED, PENDING, RUNNING, DONE, CANCELED, FAILED, ACTIVE) |
type | string | The type of job. (DLP_JOB_TYPE_UNSPECIFIED, INSPECT_JOB, RISK_ANALYSIS_JOB) |
| Name | Datatype | Description |
|---|---|---|
name | string | Output only. The server-assigned name. |
actionDetails | array | Output only. Events that should occur after the job has completed. |
createTime | string (google-datetime) | Output only. Time when the job was created. |
endTime | string (google-datetime) | Output only. Time when the job finished. |
errors | array | Output only. A stream of errors encountered running the job. |
inspectDetails | object | Results from inspecting a data source. (id: GooglePrivacyDlpV2InspectDataSourceDetails) |
jobTriggerName | string | Output only. If created by a job trigger, the resource name of the trigger that instantiated the job. |
lastModified | string (google-datetime) | Output only. Time when the job was last modified by the system. |
riskDetails | object | Results from analyzing risk of a data source. (id: GooglePrivacyDlpV2AnalyzeDataSourceRiskDetails) |
startTime | string (google-datetime) | Output only. Time when the job started. |
state | string | Output only. State of a job. (JOB_STATE_UNSPECIFIED, PENDING, RUNNING, DONE, CANCELED, FAILED, ACTIVE) |
type | string | The type of job. (DLP_JOB_TYPE_UNSPECIFIED, INSPECT_JOB, RISK_ANALYSIS_JOB) |
| Name | Datatype | Description |
|---|---|---|
name | string | Output only. The server-assigned name. |
actionDetails | array | Output only. Events that should occur after the job has completed. |
createTime | string (google-datetime) | Output only. Time when the job was created. |
endTime | string (google-datetime) | Output only. Time when the job finished. |
errors | array | Output only. A stream of errors encountered running the job. |
inspectDetails | object | Results from inspecting a data source. (id: GooglePrivacyDlpV2InspectDataSourceDetails) |
jobTriggerName | string | Output only. If created by a job trigger, the resource name of the trigger that instantiated the job. |
lastModified | string (google-datetime) | Output only. Time when the job was last modified by the system. |
riskDetails | object | Results from analyzing risk of a data source. (id: GooglePrivacyDlpV2AnalyzeDataSourceRiskDetails) |
startTime | string (google-datetime) | Output only. Time when the job started. |
state | string | Output only. State of a job. (JOB_STATE_UNSPECIFIED, PENDING, RUNNING, DONE, CANCELED, FAILED, ACTIVE) |
type | string | The type of job. (DLP_JOB_TYPE_UNSPECIFIED, INSPECT_JOB, RISK_ANALYSIS_JOB) |
| Name | Datatype | Description |
|---|---|---|
name | string | Output only. The server-assigned name. |
actionDetails | array | Output only. Events that should occur after the job has completed. |
createTime | string (google-datetime) | Output only. Time when the job was created. |
endTime | string (google-datetime) | Output only. Time when the job finished. |
errors | array | Output only. A stream of errors encountered running the job. |
inspectDetails | object | Results from inspecting a data source. (id: GooglePrivacyDlpV2InspectDataSourceDetails) |
jobTriggerName | string | Output only. If created by a job trigger, the resource name of the trigger that instantiated the job. |
lastModified | string (google-datetime) | Output only. Time when the job was last modified by the system. |
riskDetails | object | Results from analyzing risk of a data source. (id: GooglePrivacyDlpV2AnalyzeDataSourceRiskDetails) |
startTime | string (google-datetime) | Output only. Time when the job started. |
state | string | Output only. State of a job. (JOB_STATE_UNSPECIFIED, PENDING, RUNNING, DONE, CANCELED, FAILED, ACTIVE) |
type | string | The type of job. (DLP_JOB_TYPE_UNSPECIFIED, INSPECT_JOB, RISK_ANALYSIS_JOB) |
| Name | Datatype | Description |
|---|---|---|
name | string | Output only. The server-assigned name. |
actionDetails | array | Output only. Events that should occur after the job has completed. |
createTime | string (google-datetime) | Output only. Time when the job was created. |
endTime | string (google-datetime) | Output only. Time when the job finished. |
errors | array | Output only. A stream of errors encountered running the job. |
inspectDetails | object | Results from inspecting a data source. (id: GooglePrivacyDlpV2InspectDataSourceDetails) |
jobTriggerName | string | Output only. If created by a job trigger, the resource name of the trigger that instantiated the job. |
lastModified | string (google-datetime) | Output only. Time when the job was last modified by the system. |
riskDetails | object | Results from analyzing risk of a data source. (id: GooglePrivacyDlpV2AnalyzeDataSourceRiskDetails) |
startTime | string (google-datetime) | Output only. Time when the job started. |
state | string | Output only. State of a job. (JOB_STATE_UNSPECIFIED, PENDING, RUNNING, DONE, CANCELED, FAILED, ACTIVE) |
type | string | The type of job. (DLP_JOB_TYPE_UNSPECIFIED, INSPECT_JOB, RISK_ANALYSIS_JOB) |
Methods
The following methods are available for this resource:
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.
| Name | Datatype | Description |
|---|---|---|
dlpJobsId | string | |
locationsId | string | |
organizationsId | string | |
projectsId | string | |
filter | string | |
locationId | string | |
orderBy | string | |
pageSize | integer (int32) | |
pageToken | string | |
type | string |
SELECT examples
- projects_locations_dlp_jobs_get
- projects_dlp_jobs_get
- projects_locations_dlp_jobs_list
- organizations_locations_dlp_jobs_list
- projects_dlp_jobs_list
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
;
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 dlpJobsId = '{{ dlpJobsId }}' -- required
;
Lists 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.
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 filter = '{{ filter }}'
AND pageToken = '{{ pageToken }}'
AND pageSize = '{{ pageSize }}'
AND locationId = '{{ locationId }}'
AND orderBy = '{{ orderBy }}'
AND type = '{{ type }}'
;
Lists 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.
SELECT
name,
actionDetails,
createTime,
endTime,
errors,
inspectDetails,
jobTriggerName,
lastModified,
riskDetails,
startTime,
state,
type
FROM google.dlp.dlp_jobs
WHERE organizationsId = '{{ organizationsId }}' -- required
AND locationsId = '{{ locationsId }}' -- required
AND filter = '{{ filter }}'
AND pageToken = '{{ pageToken }}'
AND orderBy = '{{ orderBy }}'
AND type = '{{ type }}'
AND pageSize = '{{ pageSize }}'
AND locationId = '{{ locationId }}'
;
Lists 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.
SELECT
name,
actionDetails,
createTime,
endTime,
errors,
inspectDetails,
jobTriggerName,
lastModified,
riskDetails,
startTime,
state,
type
FROM google.dlp.dlp_jobs
WHERE projectsId = '{{ projectsId }}' -- required
AND filter = '{{ filter }}'
AND pageToken = '{{ pageToken }}'
AND locationId = '{{ locationId }}'
AND pageSize = '{{ pageSize }}'
AND type = '{{ type }}'
AND orderBy = '{{ orderBy }}'
;
INSERT examples
- projects_locations_dlp_jobs_create
- projects_dlp_jobs_create
- Manifest
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__locationId,
data__jobId,
data__riskJob,
projectsId,
locationsId
)
SELECT
'{{ inspectJob }}',
'{{ locationId }}',
'{{ jobId }}',
'{{ riskJob }}',
'{{ projectsId }}',
'{{ locationsId }}'
RETURNING
name,
actionDetails,
createTime,
endTime,
errors,
inspectDetails,
jobTriggerName,
lastModified,
riskDetails,
startTime,
state,
type
;
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__locationId,
data__jobId,
data__riskJob,
projectsId
)
SELECT
'{{ inspectJob }}',
'{{ locationId }}',
'{{ jobId }}',
'{{ riskJob }}',
'{{ projectsId }}'
RETURNING
name,
actionDetails,
createTime,
endTime,
errors,
inspectDetails,
jobTriggerName,
lastModified,
riskDetails,
startTime,
state,
type
;
# Description fields are for documentation purposes
- name: dlp_jobs
props:
- name: projectsId
value: "{{ projectsId }}"
description: Required parameter for the dlp_jobs resource.
- name: locationsId
value: "{{ locationsId }}"
description: Required parameter for the dlp_jobs resource.
- name: inspectJob
description: |
An inspection job scans a storage repository for InfoTypes.
value:
inspectTemplateName: "{{ inspectTemplateName }}"
actions:
- publishToStackdriver: "{{ publishToStackdriver }}"
publishSummaryToCscc: "{{ publishSummaryToCscc }}"
publishFindingsToCloudDataCatalog: "{{ publishFindingsToCloudDataCatalog }}"
saveFindings:
outputConfig:
storagePath:
path: "{{ path }}"
outputSchema: "{{ outputSchema }}"
table:
projectId: "{{ projectId }}"
datasetId: "{{ datasetId }}"
tableId: "{{ tableId }}"
pubSub:
topic: "{{ topic }}"
publishFindingsToDataplexCatalog: "{{ publishFindingsToDataplexCatalog }}"
deidentify:
fileTypesToTransform:
- "{{ fileTypesToTransform }}"
cloudStorageOutput: "{{ cloudStorageOutput }}"
transformationConfig:
deidentifyTemplate: "{{ deidentifyTemplate }}"
imageRedactTemplate: "{{ imageRedactTemplate }}"
structuredDeidentifyTemplate: "{{ structuredDeidentifyTemplate }}"
transformationDetailsStorageConfig:
table:
projectId: "{{ projectId }}"
datasetId: "{{ datasetId }}"
tableId: "{{ tableId }}"
jobNotificationEmails: "{{ jobNotificationEmails }}"
storageConfig:
bigQueryOptions:
tableReference:
projectId: "{{ projectId }}"
datasetId: "{{ datasetId }}"
tableId: "{{ tableId }}"
identifyingFields:
- name: "{{ name }}"
excludedFields:
- name: "{{ name }}"
rowsLimit: "{{ rowsLimit }}"
rowsLimitPercent: {{ rowsLimitPercent }}
sampleMethod: "{{ sampleMethod }}"
includedFields:
- name: "{{ name }}"
datastoreOptions:
partitionId:
projectId: "{{ projectId }}"
namespaceId: "{{ namespaceId }}"
kind:
name: "{{ name }}"
cloudStorageOptions:
bytesLimitPerFilePercent: {{ bytesLimitPerFilePercent }}
bytesLimitPerFile: "{{ bytesLimitPerFile }}"
fileTypes:
- "{{ fileTypes }}"
fileSet:
regexFileSet:
excludeRegex: "{{ excludeRegex }}"
bucketName: "{{ bucketName }}"
includeRegex: "{{ includeRegex }}"
url: "{{ url }}"
filesLimitPercent: {{ filesLimitPercent }}
sampleMethod: "{{ sampleMethod }}"
timespanConfig:
enableAutoPopulationOfTimespanConfig: {{ enableAutoPopulationOfTimespanConfig }}
startTime: "{{ startTime }}"
timestampField:
name: "{{ name }}"
endTime: "{{ endTime }}"
hybridOptions:
labels: "{{ labels }}"
requiredFindingLabelKeys:
- "{{ requiredFindingLabelKeys }}"
tableOptions:
identifyingFields:
- name: "{{ name }}"
description: "{{ description }}"
inspectConfig:
minLikelihoodPerInfoType:
- infoType:
name: "{{ name }}"
version: "{{ version }}"
sensitivityScore:
score: "{{ score }}"
minLikelihood: "{{ minLikelihood }}"
infoTypes:
- name: "{{ name }}"
version: "{{ version }}"
sensitivityScore:
score: "{{ score }}"
contentOptions:
- "{{ contentOptions }}"
minLikelihood: "{{ minLikelihood }}"
excludeInfoTypes: {{ excludeInfoTypes }}
customInfoTypes:
- likelihood: "{{ likelihood }}"
exclusionType: "{{ exclusionType }}"
surrogateType: "{{ surrogateType }}"
sensitivityScore:
score: "{{ score }}"
storedType:
name: "{{ name }}"
createTime: "{{ createTime }}"
metadataKeyValueExpression:
valueRegex: "{{ valueRegex }}"
keyRegex: "{{ keyRegex }}"
fileLabelInfoType:
sensitivityLabel:
guid: "{{ guid }}"
googleDriveLabel:
labelFieldsToMatch: "{{ labelFieldsToMatch }}"
labelId: "{{ labelId }}"
detectionRules: "{{ detectionRules }}"
infoType:
name: "{{ name }}"
version: "{{ version }}"
sensitivityScore:
score: "{{ score }}"
regex:
pattern: "{{ pattern }}"
groupIndexes:
- {{ groupIndexes }}
dictionary:
wordList:
words: "{{ words }}"
cloudStoragePath:
path: "{{ path }}"
limits:
maxFindingsPerInfoType:
- maxFindings: {{ maxFindings }}
infoType:
name: "{{ name }}"
version: "{{ version }}"
sensitivityScore: "{{ sensitivityScore }}"
maxFindingsPerRequest: {{ maxFindingsPerRequest }}
maxFindingsPerItem: {{ maxFindingsPerItem }}
ruleSet:
- rules: "{{ rules }}"
infoTypes: "{{ infoTypes }}"
includeQuote: {{ includeQuote }}
- name: locationId
value: "{{ locationId }}"
description: |
Deprecated. This field has no effect.
- name: jobId
value: "{{ jobId }}"
description: |
The job id can contain uppercase and lowercase letters, numbers, and hyphens; that is, it must match the regular expression: `[a-zA-Zd-_]+`. The maximum length is 100 characters. Can be empty to allow the system to generate one.
- name: riskJob
description: |
A risk analysis job calculates re-identification risk metrics for a BigQuery table.
value:
actions:
- publishToStackdriver: "{{ publishToStackdriver }}"
publishSummaryToCscc: "{{ publishSummaryToCscc }}"
publishFindingsToCloudDataCatalog: "{{ publishFindingsToCloudDataCatalog }}"
saveFindings:
outputConfig:
storagePath:
path: "{{ path }}"
outputSchema: "{{ outputSchema }}"
table:
projectId: "{{ projectId }}"
datasetId: "{{ datasetId }}"
tableId: "{{ tableId }}"
pubSub:
topic: "{{ topic }}"
publishFindingsToDataplexCatalog: "{{ publishFindingsToDataplexCatalog }}"
deidentify:
fileTypesToTransform:
- "{{ fileTypesToTransform }}"
cloudStorageOutput: "{{ cloudStorageOutput }}"
transformationConfig:
deidentifyTemplate: "{{ deidentifyTemplate }}"
imageRedactTemplate: "{{ imageRedactTemplate }}"
structuredDeidentifyTemplate: "{{ structuredDeidentifyTemplate }}"
transformationDetailsStorageConfig:
table:
projectId: "{{ projectId }}"
datasetId: "{{ datasetId }}"
tableId: "{{ tableId }}"
jobNotificationEmails: "{{ jobNotificationEmails }}"
privacyMetric:
lDiversityConfig:
sensitiveAttribute:
name: "{{ name }}"
quasiIds:
- name: "{{ name }}"
kMapEstimationConfig:
auxiliaryTables:
- quasiIds: "{{ quasiIds }}"
relativeFrequency:
name: "{{ name }}"
table:
projectId: "{{ projectId }}"
datasetId: "{{ datasetId }}"
tableId: "{{ tableId }}"
quasiIds:
- field:
name: "{{ name }}"
infoType:
name: "{{ name }}"
version: "{{ version }}"
sensitivityScore: "{{ sensitivityScore }}"
customTag: "{{ customTag }}"
inferred: "{{ inferred }}"
regionCode: "{{ regionCode }}"
kAnonymityConfig:
entityId:
field:
name: "{{ name }}"
quasiIds:
- name: "{{ name }}"
deltaPresenceEstimationConfig:
auxiliaryTables:
- quasiIds: "{{ quasiIds }}"
relativeFrequency:
name: "{{ name }}"
table:
projectId: "{{ projectId }}"
datasetId: "{{ datasetId }}"
tableId: "{{ tableId }}"
quasiIds:
- infoType:
name: "{{ name }}"
version: "{{ version }}"
sensitivityScore: "{{ sensitivityScore }}"
customTag: "{{ customTag }}"
inferred: "{{ inferred }}"
field:
name: "{{ name }}"
regionCode: "{{ regionCode }}"
numericalStatsConfig:
field:
name: "{{ name }}"
categoricalStatsConfig:
field:
name: "{{ name }}"
sourceTable:
projectId: "{{ projectId }}"
datasetId: "{{ datasetId }}"
tableId: "{{ tableId }}"
DELETE examples
- projects_locations_dlp_jobs_delete
- projects_dlp_jobs_delete
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
;
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 dlpJobsId = '{{ dlpJobsId }}' --required
;
Lifecycle Methods
- projects_dlp_jobs_cancel
- projects_locations_dlp_jobs_hybrid_inspect
- projects_locations_dlp_jobs_finish
- projects_locations_dlp_jobs_cancel
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
;
Inspect hybrid content and store findings to a job. To review the findings, inspect the job. Inspection will occur asynchronously.
EXEC google.dlp.dlp_jobs.projects_locations_dlp_jobs_hybrid_inspect
@projectsId='{{ projectsId }}' --required,
@locationsId='{{ locationsId }}' --required,
@dlpJobsId='{{ dlpJobsId }}' --required
@@json=
'{
"hybridItem": "{{ hybridItem }}"
}'
;
Finish a running hybrid DlpJob. Triggers the finalization steps and running of any enabled actions that have not yet run.
EXEC google.dlp.dlp_jobs.projects_locations_dlp_jobs_finish
@projectsId='{{ projectsId }}' --required,
@locationsId='{{ locationsId }}' --required,
@dlpJobsId='{{ dlpJobsId }}' --required
;
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_locations_dlp_jobs_cancel
@projectsId='{{ projectsId }}' --required,
@locationsId='{{ locationsId }}' --required,
@dlpJobsId='{{ dlpJobsId }}' --required
;