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

NameDatatypeDescription
namestringUnique resource name for the triggeredJob, assigned by the service when the triggeredJob is created, for example projects/dlp-test-project/jobTriggers/53234423.
descriptionstringUser provided description (max 256 chars)
createTimestringOutput only. The creation timestamp of a triggeredJob.
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.
inspectJobobjectControls what and how to inspect for findings.
lastRunTimestringOutput 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.
updateTimestringOutput only. The last update timestamp of a triggeredJob.

Methods

NameAccessible byRequired ParamsDescription
organizations_locations_job_triggers_getSELECTjobTriggersId, locationsId, organizationsIdGets a job trigger. See https://cloud.google.com/sensitive-data-protection/docs/creating-job-triggers to learn more.
organizations_locations_job_triggers_listSELECTlocationsId, organizationsIdLists job triggers. See https://cloud.google.com/sensitive-data-protection/docs/creating-job-triggers to learn more.
projects_job_triggers_getSELECTjobTriggersId, projectsIdGets a job trigger. See https://cloud.google.com/sensitive-data-protection/docs/creating-job-triggers to learn more.
projects_job_triggers_listSELECTprojectsIdLists job triggers. See https://cloud.google.com/sensitive-data-protection/docs/creating-job-triggers to learn more.
projects_locations_job_triggers_getSELECTjobTriggersId, locationsId, projectsIdGets a job trigger. See https://cloud.google.com/sensitive-data-protection/docs/creating-job-triggers to learn more.
projects_locations_job_triggers_listSELECTlocationsId, projectsIdLists job triggers. See https://cloud.google.com/sensitive-data-protection/docs/creating-job-triggers to learn more.
organizations_locations_job_triggers_createINSERTlocationsId, organizationsIdCreates 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_createINSERTlocationsId, projectsIdCreates 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_deleteDELETEjobTriggersId, locationsId, organizationsIdDeletes a job trigger. See https://cloud.google.com/sensitive-data-protection/docs/creating-job-triggers to learn more.
projects_job_triggers_deleteDELETEjobTriggersId, projectsIdDeletes a job trigger. See https://cloud.google.com/sensitive-data-protection/docs/creating-job-triggers to learn more.
projects_locations_job_triggers_deleteDELETEjobTriggersId, locationsId, projectsIdDeletes a job trigger. See https://cloud.google.com/sensitive-data-protection/docs/creating-job-triggers to learn more.
organizations_locations_job_triggers_patchUPDATEjobTriggersId, locationsId, organizationsIdUpdates a job trigger. See https://cloud.google.com/sensitive-data-protection/docs/creating-job-triggers to learn more.
projects_job_triggers_patchUPDATEjobTriggersId, projectsIdUpdates a job trigger. See https://cloud.google.com/sensitive-data-protection/docs/creating-job-triggers to learn more.
projects_locations_job_triggers_patchUPDATEjobTriggersId, locationsId, projectsIdUpdates a job trigger. See https://cloud.google.com/sensitive-data-protection/docs/creating-job-triggers to learn more.
projects_job_triggers_activateEXECjobTriggersId, projectsIdActivate a job trigger. Causes the immediate execute of a trigger instead of waiting on the trigger event to occur.
projects_locations_job_triggers_activateEXECjobTriggersId, locationsId, projectsIdActivate a job trigger. Causes the immediate execute of a trigger instead of waiting on the trigger event to occur.
projects_locations_job_triggers_hybrid_inspectEXECjobTriggersId, locationsId, projectsIdInspect hybrid content and store findings to a trigger. The inspection will be processed asynchronously. To review the findings monitor the jobs within the trigger.

SELECT examples

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

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

INSERT example

Use the following StackQL query and manifest file to create a new job_triggers resource.

/*+ create */
INSERT INTO google.dlp.job_triggers (
projectsId,
triggerId,
locationId,
jobTrigger
)
SELECT
'{{ projectsId }}',
'{{ triggerId }}',
'{{ locationId }}',
'{{ jobTrigger }}'
;

UPDATE example

Updates a job_triggers resource.

/*+ update */
UPDATE google.dlp.job_triggers
SET
jobTrigger = '{{ jobTrigger }}',
updateMask = '{{ updateMask }}'
WHERE
jobTriggersId = '{{ jobTriggersId }}'
AND projectsId = '{{ projectsId }}';

DELETE example

Deletes the specified job_triggers resource.

/*+ delete */
DELETE FROM google.dlp.job_triggers
WHERE jobTriggersId = '{{ jobTriggersId }}'
AND projectsId = '{{ projectsId }}';