Data Loss Prevention V2 Client - Class JobTrigger (1.11.0)

Reference documentation and code samples for the Data Loss Prevention V2 Client class JobTrigger.

Contains a configuration to make dlp api calls on a repeating basis.

See https://cloud.google.com/dlp/docs/concepts-job-triggers to learn more.

Generated from protobuf message google.privacy.dlp.v2.JobTrigger

Namespace

Google \ Cloud \ Dlp \ V2

Methods

__construct

Constructor.

Parameters
NameDescription
data array

Optional. Data for populating the Message object.

↳ name string

Unique resource name for the triggeredJob, assigned by the service when the triggeredJob is created, for example projects/dlp-test-project/jobTriggers/53234423.

↳ display_name string

Display name (max 100 chars)

↳ description string

User provided description (max 256 chars)

↳ inspect_job Google\Cloud\Dlp\V2\InspectJobConfig

For inspect jobs, a snapshot of the configuration.

↳ triggers array<Google\Cloud\Dlp\V2\JobTrigger\Trigger>

A 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.

↳ errors array<Google\Cloud\Dlp\V2\Error>

Output 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.

↳ create_time Google\Protobuf\Timestamp

Output only. The creation timestamp of a triggeredJob.

↳ update_time Google\Protobuf\Timestamp

Output only. The last update timestamp of a triggeredJob.

↳ last_run_time Google\Protobuf\Timestamp

Output only. The timestamp of the last time this trigger executed.

↳ status int

Required. A status for this trigger.

getName

Unique resource name for the triggeredJob, assigned by the service when the triggeredJob is created, for example projects/dlp-test-project/jobTriggers/53234423.

Returns
TypeDescription
string

setName

Unique resource name for the triggeredJob, assigned by the service when the triggeredJob is created, for example projects/dlp-test-project/jobTriggers/53234423.

Parameter
NameDescription
var string
Returns
TypeDescription
$this

getDisplayName

Display name (max 100 chars)

Returns
TypeDescription
string

setDisplayName

Display name (max 100 chars)

Parameter
NameDescription
var string
Returns
TypeDescription
$this

getDescription

User provided description (max 256 chars)

Returns
TypeDescription
string

setDescription

User provided description (max 256 chars)

Parameter
NameDescription
var string
Returns
TypeDescription
$this

getInspectJob

For inspect jobs, a snapshot of the configuration.

Returns
TypeDescription
Google\Cloud\Dlp\V2\InspectJobConfig|null

hasInspectJob

setInspectJob

For inspect jobs, a snapshot of the configuration.

Parameter
NameDescription
var Google\Cloud\Dlp\V2\InspectJobConfig
Returns
TypeDescription
$this

getTriggers

A 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.

Returns
TypeDescription
Google\Protobuf\Internal\RepeatedField

setTriggers

A 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.

Parameter
NameDescription
var array<Google\Cloud\Dlp\V2\JobTrigger\Trigger>
Returns
TypeDescription
$this

getErrors

Output 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.

Returns
TypeDescription
Google\Protobuf\Internal\RepeatedField

setErrors

Output 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.

Parameter
NameDescription
var array<Google\Cloud\Dlp\V2\Error>
Returns
TypeDescription
$this

getCreateTime

Output only. The creation timestamp of a triggeredJob.

Returns
TypeDescription
Google\Protobuf\Timestamp|null

hasCreateTime

clearCreateTime

setCreateTime

Output only. The creation timestamp of a triggeredJob.

Parameter
NameDescription
var Google\Protobuf\Timestamp
Returns
TypeDescription
$this

getUpdateTime

Output only. The last update timestamp of a triggeredJob.

Returns
TypeDescription
Google\Protobuf\Timestamp|null

hasUpdateTime

clearUpdateTime

setUpdateTime

Output only. The last update timestamp of a triggeredJob.

Parameter
NameDescription
var Google\Protobuf\Timestamp
Returns
TypeDescription
$this

getLastRunTime

Output only. The timestamp of the last time this trigger executed.

Returns
TypeDescription
Google\Protobuf\Timestamp|null

hasLastRunTime

clearLastRunTime

setLastRunTime

Output only. The timestamp of the last time this trigger executed.

Parameter
NameDescription
var Google\Protobuf\Timestamp
Returns
TypeDescription
$this

getStatus

Required. A status for this trigger.

Returns
TypeDescription
int

setStatus

Required. A status for this trigger.

Parameter
NameDescription
var int
Returns
TypeDescription
$this

getJob

Returns
TypeDescription
string