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:

NameDatatypeDescription
namestringOutput only. Unique 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. (STATUS_UNSPECIFIED, HEALTHY, PAUSED, CANCELLED)
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
organizations_locations_job_triggers_getselectorganizationsId, locationsId, jobTriggersIdGets a job trigger. See https://docs.cloud.google.com/sensitive-data-protection/docs/creating-job-triggers to learn more.
projects_locations_job_triggers_getselectprojectsId, locationsId, jobTriggersIdGets a job trigger. See https://docs.cloud.google.com/sensitive-data-protection/docs/creating-job-triggers to learn more.
organizations_locations_job_triggers_listselectorganizationsId, locationsIdfilter, locationId, orderBy, pageSize, pageToken, typeLists job triggers. See https://docs.cloud.google.com/sensitive-data-protection/docs/creating-job-triggers to learn more.
projects_job_triggers_getselectprojectsId, jobTriggersIdGets a job trigger. See https://docs.cloud.google.com/sensitive-data-protection/docs/creating-job-triggers to learn more.
projects_locations_job_triggers_listselectprojectsId, locationsIdfilter, locationId, orderBy, pageSize, pageToken, typeLists job triggers. See https://docs.cloud.google.com/sensitive-data-protection/docs/creating-job-triggers to learn more.
projects_job_triggers_listselectprojectsIdfilter, locationId, orderBy, pageSize, pageToken, typeLists job triggers. See https://docs.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://docs.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://docs.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://docs.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://docs.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://docs.cloud.google.com/sensitive-data-protection/docs/creating-job-triggers to learn more.
projects_job_triggers_patchupdateprojectsId, jobTriggersIdUpdates a job trigger. See https://docs.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://docs.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://docs.cloud.google.com/sensitive-data-protection/docs/creating-job-triggers to learn more.
projects_job_triggers_deletedeleteprojectsId, jobTriggersIdDeletes a job trigger. See https://docs.cloud.google.com/sensitive-data-protection/docs/creating-job-triggers to learn more.
projects_job_triggers_activateexecprojectsId, jobTriggersIdActivate a job trigger. Causes the immediate execute of a trigger instead of waiting on the trigger event to occur.
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_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.

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://docs.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 organizationsId = '{{ organizationsId }}' -- 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://docs.cloud.google.com/sensitive-data-protection/docs/creating-job-triggers to learn more.

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

UPDATE examples​

Updates a job trigger. See https://docs.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
organizationsId = '{{ organizationsId }}' --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://docs.cloud.google.com/sensitive-data-protection/docs/creating-job-triggers to learn more.

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

Lifecycle Methods​

Activate a job trigger. Causes the immediate execute of a trigger instead of waiting on the trigger event to occur.

EXEC google.dlp.job_triggers.projects_job_triggers_activate
@projectsId='{{ projectsId }}' --required,
@jobTriggersId='{{ jobTriggersId }}' --required
;