Reference documentation and code samples for the Cloud Data Loss Prevention (DLP) V2 API class Google::Cloud::Dlp::V2::ContentPolicy.
A policy to apply to content based on its inspection findings.
Inherits
- Object
Extended By
- Google::Protobuf::MessageExts::ClassMethods
Includes
- Google::Protobuf::MessageExts
Methods
#create_time
def create_time() -> ::Google::Protobuf::Timestamp
Returns
- (::Google::Protobuf::Timestamp) — Output only. The creation timestamp of a contentPolicy; output-only field.
#default_action
def default_action() -> ::Google::Cloud::Dlp::V2::ContentPolicy::PolicyAction
Returns
- (::Google::Cloud::Dlp::V2::ContentPolicy::PolicyAction) — Action to take if the content is scanned and no rules match. Defaults to returning an ALLOW verdict if not set.
#default_action=
def default_action=(value) -> ::Google::Cloud::Dlp::V2::ContentPolicy::PolicyAction
Parameter
- value (::Google::Cloud::Dlp::V2::ContentPolicy::PolicyAction) — Action to take if the content is scanned and no rules match. Defaults to returning an ALLOW verdict if not set.
Returns
- (::Google::Cloud::Dlp::V2::ContentPolicy::PolicyAction) — Action to take if the content is scanned and no rules match. Defaults to returning an ALLOW verdict if not set.
#display_name
def display_name() -> ::String
Returns
- (::String) — Optional. Display name (max 63 chars)
#display_name=
def display_name=(value) -> ::String
Parameter
- value (::String) — Optional. Display name (max 63 chars)
Returns
- (::String) — Optional. Display name (max 63 chars)
#errors
def errors() -> ::Array<::Google::Cloud::Dlp::V2::Error>
Returns
- (::Array<::Google::Cloud::Dlp::V2::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.
#failed_to_scan_supported_file_type
def failed_to_scan_supported_file_type() -> ::Google::Cloud::Dlp::V2::ContentPolicy::PolicyAction
Returns
- (::Google::Cloud::Dlp::V2::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.
#failed_to_scan_supported_file_type=
def failed_to_scan_supported_file_type=(value) -> ::Google::Cloud::Dlp::V2::ContentPolicy::PolicyAction
Parameter
- value (::Google::Cloud::Dlp::V2::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.
Returns
- (::Google::Cloud::Dlp::V2::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.
#input_too_large
def input_too_large() -> ::Google::Cloud::Dlp::V2::ContentPolicy::PolicyAction
Returns
- (::Google::Cloud::Dlp::V2::ContentPolicy::PolicyAction) — Optional. Action to take if the content is a supported file type but is too large to be scanned.
#input_too_large=
def input_too_large=(value) -> ::Google::Cloud::Dlp::V2::ContentPolicy::PolicyAction
Parameter
- value (::Google::Cloud::Dlp::V2::ContentPolicy::PolicyAction) — Optional. Action to take if the content is a supported file type but is too large to be scanned.
Returns
- (::Google::Cloud::Dlp::V2::ContentPolicy::PolicyAction) — Optional. Action to take if the content is a supported file type but is too large to be scanned.
#inspect_config
def inspect_config() -> ::Google::Cloud::Dlp::V2::InspectConfig
Returns
- (::Google::Cloud::Dlp::V2::InspectConfig) — Optional. InspectConfig to use to produce findings.
#inspect_config=
def inspect_config=(value) -> ::Google::Cloud::Dlp::V2::InspectConfig
Parameter
- value (::Google::Cloud::Dlp::V2::InspectConfig) — Optional. InspectConfig to use to produce findings.
Returns
- (::Google::Cloud::Dlp::V2::InspectConfig) — Optional. InspectConfig to use to produce findings.
#logging_configs
def logging_configs() -> ::Array<::Google::Cloud::Dlp::V2::ContentPolicy::LoggingConfig>
Returns
- (::Array<::Google::Cloud::Dlp::V2::ContentPolicy::LoggingConfig>) — Optional. Log the actions taken by the content policy to external systems.
#logging_configs=
def logging_configs=(value) -> ::Array<::Google::Cloud::Dlp::V2::ContentPolicy::LoggingConfig>
Parameter
- value (::Array<::Google::Cloud::Dlp::V2::ContentPolicy::LoggingConfig>) — Optional. Log the actions taken by the content policy to external systems.
Returns
- (::Array<::Google::Cloud::Dlp::V2::ContentPolicy::LoggingConfig>) — Optional. Log the actions taken by the content policy to external systems.
#name
def name() -> ::String
Returns
- (::String) — Output only. Resource name of the policy.
#rules
def rules() -> ::Array<::Google::Cloud::Dlp::V2::ContentPolicy::PolicyRule>
Returns
- (::Array<::Google::Cloud::Dlp::V2::ContentPolicy::PolicyRule>) — Required. Policies to apply, based on the findings returned by inspection. The first rule to match applies.
#rules=
def rules=(value) -> ::Array<::Google::Cloud::Dlp::V2::ContentPolicy::PolicyRule>
Parameter
- value (::Array<::Google::Cloud::Dlp::V2::ContentPolicy::PolicyRule>) — Required. Policies to apply, based on the findings returned by inspection. The first rule to match applies.
Returns
- (::Array<::Google::Cloud::Dlp::V2::ContentPolicy::PolicyRule>) — Required. Policies to apply, based on the findings returned by inspection. The first rule to match applies.
#unsupported_file_type
def unsupported_file_type() -> ::Google::Cloud::Dlp::V2::ContentPolicy::PolicyAction
Returns
- (::Google::Cloud::Dlp::V2::ContentPolicy::PolicyAction) — Optional. Action to take if the content is an unsupported file type.
#unsupported_file_type=
def unsupported_file_type=(value) -> ::Google::Cloud::Dlp::V2::ContentPolicy::PolicyAction
Parameter
- value (::Google::Cloud::Dlp::V2::ContentPolicy::PolicyAction) — Optional. Action to take if the content is an unsupported file type.
Returns
- (::Google::Cloud::Dlp::V2::ContentPolicy::PolicyAction) — Optional. Action to take if the content is an unsupported file type.
#update_time
def update_time() -> ::Google::Protobuf::Timestamp
Returns
- (::Google::Protobuf::Timestamp) — Output only. The last update timestamp of a contentPolicy; output-only field.