- Resource: ContentPolicy
- PolicyRule
- PolicyCondition
- InfoTypeCondition
- InfoTypes
- ContentPolicyVerdict
- PolicyAction
- LoggingConfig
- LogToBigQuery
- Methods
Resource: ContentPolicy
A policy to apply to content based on its inspection findings.
| JSON representation |
|---|
{ "name": string, "createTime": string, "updateTime": string, "displayName": string, "inspectTemplate": { object ( |
| Fields | |
|---|---|
name |
Output only. Resource name of the policy. |
createTime |
Output only. The creation timestamp of a contentPolicy; output-only field. Uses RFC 3339, where generated output will always be Z-normalized and use 0, 3, 6 or 9 fractional digits. Offsets other than "Z" are also accepted. Examples: |
updateTime |
Output only. The last update timestamp of a contentPolicy; output-only field. Uses RFC 3339, where generated output will always be Z-normalized and use 0, 3, 6 or 9 fractional digits. Offsets other than "Z" are also accepted. Examples: |
displayName |
Optional. Display name (max 63 chars) |
inspectTemplate |
Optional. InspectTemplate to use to produce findings. Deprecated: use inspectConfig instead. |
inspectConfig |
Optional. InspectConfig to use to produce findings. |
rules[] |
Required. Policies to apply, based on the findings returned by inspection. The first rule to match applies. |
unsupportedFileType |
Optional. Action to take if the content is an unsupported file type. |
inputTooLarge |
Optional. Action to take if the content is a supported file type but is too large to be scanned. |
failedToScanSupportedFileType |
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. |
defaultAction |
Action to take if the content is scanned and no rules match. Defaults to returning an ALLOW verdict if not set. |
loggingConfigs[] |
Optional. Log the actions taken by the content policy to external systems. |
errors[] |
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. |
PolicyRule
A single policy rule. The first rule to match from the list above controls the result.
| JSON representation |
|---|
{ "conditions": [ { object ( |
| Fields | |
|---|---|
conditions[] |
Optional. Conditions that must match for this rule to apply. All conditions must match ( |
action |
Required. Action to take if this rule applies. |
Union field deprecated_action. Action to take if this rule applies. Deprecated: Use action instead. deprecated_action can be only one of the following: |
|
returnVerdict |
If set, the verdict will be returned to the user. Deprecated: Use |
PolicyCondition
A condition that must match for this rule to apply.
| JSON representation |
|---|
{ // Union field |
| Fields | |
|---|---|
Union field condition. A condition. condition can be only one of the following: |
|
infoTypeCondition |
A condition based on info types. |
InfoTypeCondition
A info type based condition.
| JSON representation |
|---|
{ // Union field |
| Fields | |
|---|---|
Union field info_type_condition. A condition based on info types. info_type_condition can be only one of the following: |
|
infoTypes |
match any of these info types. |
anyInfoType |
match any info types. |
InfoTypes
Info types to match.
| JSON representation |
|---|
{ "infoTypeNames": [ string ] } |
| Fields | |
|---|---|
infoTypeNames[] |
Required. A list of info types to match. |
ContentPolicyVerdict
Possible results of applying a content policy. This may expand to include additional result types in the future.
| Enums | |
|---|---|
CONTENT_POLICY_VERDICT_UNSPECIFIED |
Not used. |
ALLOW |
The policy allows the provided content to be used. |
BLOCK |
The policy prevents the provided content from being used. This should result in a blocked file upload, exclusion from training dataset, or other similar block action. (specific action will depend on the caller). |
PolicyAction
A possible action to take when applying a content policy.
| JSON representation |
|---|
{ // Union field |
| Fields | |
|---|---|
Union field
|
|
returnVerdict |
Optional. If set, the verdict will be returned to the user. |
LoggingConfig
A single logging configuration.
| JSON representation |
|---|
{ // Union field |
| Fields | |
|---|---|
Union field destination. The destination for the action logs. destination can be only one of the following: |
|
logToBigQuery |
Optional. Log the actions taken to a BigQuery table. |
LogToBigQuery
Configuration for logging content policy actions to BigQuery.
| JSON representation |
|---|
{ "projectId": string, "datasetId": string, "tableId": string } |
| Fields | |
|---|---|
projectId |
Required. The ID of the project containing the BigQuery table to write to. |
datasetId |
Required. The ID of the dataset containing the BigQuery table to write to. |
tableId |
Required. The ID of the BigQuery table to write to. |
Methods |
|
|---|---|
|
Create a ContentPolicy. |
|
Delete a ContentPolicy. |
|
Get a ContentPolicy. |
|
Lists ContentPolicies in a parent. |
|
Update a ContentPolicy. |