Skip to main content

job_triggers

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

Overview

Namejob_triggers
TypeResource
Idgoogle.dlp.job_triggers

Fields

The following fields are returned by SELECT queries:

Successful response

NameDatatypeDescription
namestringUnique resource name for the triggeredJob, assigned by the service when the triggeredJob is created, for example projects/dlp-test-project/jobTriggers/53234423.
createTimestring (google-datetime)Output only. The creation timestamp of a triggeredJob.
descriptionstringUser provided description (max 256 chars)
displayNamestringDisplay name (max 100 chars)
errorsarrayOutput only. A stream of errors encountered when the trigger was activated. Repeated errors may result in the JobTrigger automatically being paused. Will return the last 100 errors. Whenever the JobTrigger is modified this list will be cleared.
inspectJobobjectFor inspect jobs, a snapshot of the configuration. (id: GooglePrivacyDlpV2InspectJobConfig)
lastRunTimestring (google-datetime)Output only. The timestamp of the last time this trigger executed.
statusstringRequired. A status for this trigger.
triggersarrayA list of triggers which will be OR'ed together. Only one in the list needs to trigger for a job to be started. The list may contain only a single Schedule trigger and must have at least one object.
updateTimestring (google-datetime)Output only. The last update timestamp of a triggeredJob.

Methods

The following methods are available for this resource:

NameAccessible byRequired ParamsOptional ParamsDescription
projects_locations_job_triggers_getselectprojectsId, locationsId, jobTriggersIdGets a job trigger. See https://cloud.google.com/sensitive-data-protection/docs/creating-job-triggers to learn more.
organizations_locations_job_triggers_getselectorganizationsId, locationsId, jobTriggersIdGets a job trigger. See https://cloud.google.com/sensitive-data-protection/docs/creating-job-triggers to learn more.
projects_locations_job_triggers_listselectprojectsId, locationsIdpageToken, pageSize, orderBy, filter, type, locationIdLists job triggers. See https://cloud.google.com/sensitive-data-protection/docs/creating-job-triggers to learn more.
projects_job_triggers_getselectprojectsId, jobTriggersIdGets a job trigger. See https://cloud.google.com/sensitive-data-protection/docs/creating-job-triggers to learn more.
organizations_locations_job_triggers_listselectorganizationsId, locationsIdpageToken, pageSize, orderBy, filter, type, locationIdLists job triggers. See https://cloud.google.com/sensitive-data-protection/docs/creating-job-triggers to learn more.
projects_job_triggers_listselectprojectsIdpageToken, pageSize, orderBy, filter, type, locationIdLists job triggers. See https://cloud.google.com/sensitive-data-protection/docs/creating-job-triggers to learn more.
projects_locations_job_triggers_createinsertprojectsId, locationsIdCreates a job trigger to run DLP actions such as scanning storage for sensitive information on a set schedule. See https://cloud.google.com/sensitive-data-protection/docs/creating-job-triggers to learn more.
organizations_locations_job_triggers_createinsertorganizationsId, locationsIdCreates a job trigger to run DLP actions such as scanning storage for sensitive information on a set schedule. See https://cloud.google.com/sensitive-data-protection/docs/creating-job-triggers to learn more.
projects_job_triggers_createinsertprojectsIdCreates a job trigger to run DLP actions such as scanning storage for sensitive information on a set schedule. See https://cloud.google.com/sensitive-data-protection/docs/creating-job-triggers to learn more.
projects_locations_job_triggers_patchupdateprojectsId, locationsId, jobTriggersIdUpdates a job trigger. See https://cloud.google.com/sensitive-data-protection/docs/creating-job-triggers to learn more.
organizations_locations_job_triggers_patchupdateorganizationsId, locationsId, jobTriggersIdUpdates a job trigger. See https://cloud.google.com/sensitive-data-protection/docs/creating-job-triggers to learn more.
projects_job_triggers_patchupdateprojectsId, jobTriggersIdUpdates a job trigger. See https://cloud.google.com/sensitive-data-protection/docs/creating-job-triggers to learn more.
projects_locations_job_triggers_deletedeleteprojectsId, locationsId, jobTriggersIdDeletes a job trigger. See https://cloud.google.com/sensitive-data-protection/docs/creating-job-triggers to learn more.
organizations_locations_job_triggers_deletedeleteorganizationsId, locationsId, jobTriggersIdDeletes a job trigger. See https://cloud.google.com/sensitive-data-protection/docs/creating-job-triggers to learn more.
projects_job_triggers_deletedeleteprojectsId, jobTriggersIdDeletes a job trigger. See https://cloud.google.com/sensitive-data-protection/docs/creating-job-triggers to learn more.
projects_locations_job_triggers_hybrid_inspectexecprojectsId, locationsId, jobTriggersIdInspect hybrid content and store findings to a trigger. The inspection will be processed asynchronously. To review the findings monitor the jobs within the trigger.
projects_locations_job_triggers_activateexecprojectsId, locationsId, jobTriggersIdActivate a job trigger. Causes the immediate execute of a trigger instead of waiting on the trigger event to occur.
projects_job_triggers_activateexecprojectsId, jobTriggersIdActivate a job trigger. Causes the immediate execute of a trigger instead of waiting on the trigger event to occur.

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
jobTriggersIdstring
locationsIdstring
organizationsIdstring
projectsIdstring
filterstring
locationIdstring
orderBystring
pageSizeinteger (int32)
pageTokenstring
typestring

SELECT examples

Gets a job trigger. See https://cloud.google.com/sensitive-data-protection/docs/creating-job-triggers to learn more.

SELECT
name,
createTime,
description,
displayName,
errors,
inspectJob,
lastRunTime,
status,
triggers,
updateTime
FROM google.dlp.job_triggers
WHERE projectsId = '{{ projectsId }}' -- required
AND locationsId = '{{ locationsId }}' -- required
AND jobTriggersId = '{{ jobTriggersId }}' -- required;

INSERT examples

Creates a job trigger to run DLP actions such as scanning storage for sensitive information on a set schedule. See https://cloud.google.com/sensitive-data-protection/docs/creating-job-triggers to learn more.

INSERT INTO google.dlp.job_triggers (
data__jobTrigger,
data__triggerId,
data__locationId,
projectsId,
locationsId
)
SELECT
'{{ jobTrigger }}',
'{{ triggerId }}',
'{{ locationId }}',
'{{ projectsId }}',
'{{ locationsId }}'
RETURNING
name,
createTime,
description,
displayName,
errors,
inspectJob,
lastRunTime,
status,
triggers,
updateTime
;

UPDATE examples

Updates a job trigger. See https://cloud.google.com/sensitive-data-protection/docs/creating-job-triggers to learn more.

UPDATE google.dlp.job_triggers
SET
data__jobTrigger = '{{ jobTrigger }}',
data__updateMask = '{{ updateMask }}'
WHERE
projectsId = '{{ projectsId }}' --required
AND locationsId = '{{ locationsId }}' --required
AND jobTriggersId = '{{ jobTriggersId }}' --required
RETURNING
name,
createTime,
description,
displayName,
errors,
inspectJob,
lastRunTime,
status,
triggers,
updateTime;

DELETE examples

Deletes a job trigger. See https://cloud.google.com/sensitive-data-protection/docs/creating-job-triggers to learn more.

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

Lifecycle Methods

Inspect hybrid content and store findings to a trigger. The inspection will be processed asynchronously. To review the findings monitor the jobs within the trigger.

EXEC google.dlp.job_triggers.projects_locations_job_triggers_hybrid_inspect 
@projectsId='{{ projectsId }}' --required,
@locationsId='{{ locationsId }}' --required,
@jobTriggersId='{{ jobTriggersId }}' --required
@@json=
'{
"hybridItem": "{{ hybridItem }}"
}';