Reference documentation and code samples for the Data Loss Prevention V2 Client class ContentPolicy.
A policy to apply to content based on its inspection findings.
Generated from protobuf message google.privacy.dlp.v2.ContentPolicy
Namespace
Google \ Cloud \ Dlp \ V2Methods
__construct
Constructor.
| Parameters | |
|---|---|
| Name | Description |
data |
array
Optional. Data for populating the Message object. |
↳ name |
string
Output only. Resource name of the policy. |
↳ create_time |
Google\Protobuf\Timestamp
Output only. The creation timestamp of a contentPolicy; output-only field. |
↳ update_time |
Google\Protobuf\Timestamp
Output only. The last update timestamp of a contentPolicy; output-only field. |
↳ display_name |
string
Optional. Display name (max 63 chars) |
↳ inspect_config |
InspectConfig
Optional. InspectConfig to use to produce findings. |
↳ rules |
array<ContentPolicy\PolicyRule>
Required. Policies to apply, based on the findings returned by inspection. The first rule to match applies. |
↳ unsupported_file_type |
ContentPolicy\PolicyAction
Optional. Action to take if the content is an unsupported file type. |
↳ input_too_large |
ContentPolicy\PolicyAction
Optional. Action to take if the content is a supported file type but is too large to be scanned. |
↳ failed_to_scan_supported_file_type |
ContentPolicy\PolicyAction
Optional. Action to take if the content is a supported file type and size but fails to be scanned, for example because the file is encrypted or corrupted. |
↳ default_action |
ContentPolicy\PolicyAction
Action to take if the content is scanned and no rules match. Defaults to returning an ALLOW verdict if not set. |
↳ logging_configs |
array<ContentPolicy\LoggingConfig>
Optional. Log the actions taken by the content policy to external systems. |
↳ errors |
array<Error>
Output only. A stream of errors encountered when the policy was applied. Output only field. Will return the last 100 errors. Whenever the policy is modified this list will be cleared. |
getName
Output only. Resource name of the policy.
| Returns | |
|---|---|
| Type | Description |
string |
|
setName
Output only. Resource name of the policy.
| Parameter | |
|---|---|
| Name | Description |
var |
string
|
| Returns | |
|---|---|
| Type | Description |
$this |
|
getCreateTime
Output only. The creation timestamp of a contentPolicy; output-only field.
| Returns | |
|---|---|
| Type | Description |
Google\Protobuf\Timestamp|null |
|
hasCreateTime
clearCreateTime
setCreateTime
Output only. The creation timestamp of a contentPolicy; output-only field.
| Parameter | |
|---|---|
| Name | Description |
var |
Google\Protobuf\Timestamp
|
| Returns | |
|---|---|
| Type | Description |
$this |
|
getUpdateTime
Output only. The last update timestamp of a contentPolicy; output-only field.
| Returns | |
|---|---|
| Type | Description |
Google\Protobuf\Timestamp|null |
|
hasUpdateTime
clearUpdateTime
setUpdateTime
Output only. The last update timestamp of a contentPolicy; output-only field.
| Parameter | |
|---|---|
| Name | Description |
var |
Google\Protobuf\Timestamp
|
| Returns | |
|---|---|
| Type | Description |
$this |
|
getDisplayName
Optional. Display name (max 63 chars)
| Returns | |
|---|---|
| Type | Description |
string |
|
setDisplayName
Optional. Display name (max 63 chars)
| Parameter | |
|---|---|
| Name | Description |
var |
string
|
| Returns | |
|---|---|
| Type | Description |
$this |
|
getInspectConfig
Optional. InspectConfig to use to produce findings.
| Returns | |
|---|---|
| Type | Description |
InspectConfig|null |
|
hasInspectConfig
clearInspectConfig
setInspectConfig
Optional. InspectConfig to use to produce findings.
| Parameter | |
|---|---|
| Name | Description |
var |
InspectConfig
|
| Returns | |
|---|---|
| Type | Description |
$this |
|
getRules
Required. Policies to apply, based on the findings returned by inspection.
The first rule to match applies.
| Returns | |
|---|---|
| Type | Description |
Google\Protobuf\RepeatedField<ContentPolicy\PolicyRule> |
|
setRules
Required. Policies to apply, based on the findings returned by inspection.
The first rule to match applies.
| Parameter | |
|---|---|
| Name | Description |
var |
array<ContentPolicy\PolicyRule>
|
| Returns | |
|---|---|
| Type | Description |
$this |
|
getUnsupportedFileType
Optional. Action to take if the content is an unsupported file type.
| Returns | |
|---|---|
| Type | Description |
ContentPolicy\PolicyAction|null |
|
hasUnsupportedFileType
clearUnsupportedFileType
setUnsupportedFileType
Optional. Action to take if the content is an unsupported file type.
| Parameter | |
|---|---|
| Name | Description |
var |
ContentPolicy\PolicyAction
|
| Returns | |
|---|---|
| Type | Description |
$this |
|
getInputTooLarge
Optional. Action to take if the content is a supported file type but is too large to be scanned.
| Returns | |
|---|---|
| Type | Description |
ContentPolicy\PolicyAction|null |
|
hasInputTooLarge
clearInputTooLarge
setInputTooLarge
Optional. Action to take if the content is a supported file type but is too large to be scanned.
| Parameter | |
|---|---|
| Name | Description |
var |
ContentPolicy\PolicyAction
|
| Returns | |
|---|---|
| Type | Description |
$this |
|
getFailedToScanSupportedFileType
Optional. Action to take if the content is a supported file type and size but fails to be scanned, for example because the file is encrypted or corrupted.
| Returns | |
|---|---|
| Type | Description |
ContentPolicy\PolicyAction|null |
|
hasFailedToScanSupportedFileType
clearFailedToScanSupportedFileType
setFailedToScanSupportedFileType
Optional. Action to take if the content is a supported file type and size but fails to be scanned, for example because the file is encrypted or corrupted.
| Parameter | |
|---|---|
| Name | Description |
var |
ContentPolicy\PolicyAction
|
| Returns | |
|---|---|
| Type | Description |
$this |
|
getDefaultAction
Action to take if the content is scanned and no rules match.
Defaults to returning an ALLOW verdict if not set.
| Returns | |
|---|---|
| Type | Description |
ContentPolicy\PolicyAction|null |
|
hasDefaultAction
clearDefaultAction
setDefaultAction
Action to take if the content is scanned and no rules match.
Defaults to returning an ALLOW verdict if not set.
| Parameter | |
|---|---|
| Name | Description |
var |
ContentPolicy\PolicyAction
|
| Returns | |
|---|---|
| Type | Description |
$this |
|
getLoggingConfigs
Optional. Log the actions taken by the content policy to external systems.
| Returns | |
|---|---|
| Type | Description |
Google\Protobuf\RepeatedField<ContentPolicy\LoggingConfig> |
|
setLoggingConfigs
Optional. Log the actions taken by the content policy to external systems.
| Parameter | |
|---|---|
| Name | Description |
var |
array<ContentPolicy\LoggingConfig>
|
| Returns | |
|---|---|
| Type | Description |
$this |
|
getErrors
Output only. A stream of errors encountered when the policy was applied.
Output only field. Will return the last 100 errors. Whenever the policy is modified this list will be cleared.
| Returns | |
|---|---|
| Type | Description |
Google\Protobuf\RepeatedField<Error> |
|
setErrors
Output only. A stream of errors encountered when the policy was applied.
Output only field. Will return the last 100 errors. Whenever the policy is modified this list will be cleared.
| Parameter | |
|---|---|
| Name | Description |
var |
array<Error>
|
| Returns | |
|---|---|
| Type | Description |
$this |
|