Cloud Data Loss Prevention (DLP) V2 API - Class Google::Cloud::Dlp::V2::FieldTransformation (v1.7.0)

Reference documentation and code samples for the Cloud Data Loss Prevention (DLP) V2 API class Google::Cloud::Dlp::V2::FieldTransformation.

The transformation to apply to the field.

Inherits

  • Object

Extended By

  • Google::Protobuf::MessageExts::ClassMethods

Includes

  • Google::Protobuf::MessageExts

Methods

#condition

def condition() -> ::Google::Cloud::Dlp::V2::RecordCondition
Returns
  • (::Google::Cloud::Dlp::V2::RecordCondition) —

    Only apply the transformation if the condition evaluates to true for the given RecordCondition. The conditions are allowed to reference fields that are not used in the actual transformation.

    Example Use Cases:

    • Apply a different bucket transformation to an age column if the zip code column for the same record is within a specific range.
    • Redact a field if the date of birth field is greater than 85.

#condition=

def condition=(value) -> ::Google::Cloud::Dlp::V2::RecordCondition
Parameter
  • value (::Google::Cloud::Dlp::V2::RecordCondition) —

    Only apply the transformation if the condition evaluates to true for the given RecordCondition. The conditions are allowed to reference fields that are not used in the actual transformation.

    Example Use Cases:

    • Apply a different bucket transformation to an age column if the zip code column for the same record is within a specific range.
    • Redact a field if the date of birth field is greater than 85.
Returns
  • (::Google::Cloud::Dlp::V2::RecordCondition) —

    Only apply the transformation if the condition evaluates to true for the given RecordCondition. The conditions are allowed to reference fields that are not used in the actual transformation.

    Example Use Cases:

    • Apply a different bucket transformation to an age column if the zip code column for the same record is within a specific range.
    • Redact a field if the date of birth field is greater than 85.

#fields

def fields() -> ::Array<::Google::Cloud::Dlp::V2::FieldId>
Returns
  • (::Array<::Google::Cloud::Dlp::V2::FieldId>) — Required. Input field(s) to apply the transformation to. When you have columns that reference their position within a list, omit the index from the FieldId. FieldId name matching ignores the index. For example, instead of "contact.nums[0].type", use "contact.nums.type".

#fields=

def fields=(value) -> ::Array<::Google::Cloud::Dlp::V2::FieldId>
Parameter
  • value (::Array<::Google::Cloud::Dlp::V2::FieldId>) — Required. Input field(s) to apply the transformation to. When you have columns that reference their position within a list, omit the index from the FieldId. FieldId name matching ignores the index. For example, instead of "contact.nums[0].type", use "contact.nums.type".
Returns
  • (::Array<::Google::Cloud::Dlp::V2::FieldId>) — Required. Input field(s) to apply the transformation to. When you have columns that reference their position within a list, omit the index from the FieldId. FieldId name matching ignores the index. For example, instead of "contact.nums[0].type", use "contact.nums.type".

#info_type_transformations

def info_type_transformations() -> ::Google::Cloud::Dlp::V2::InfoTypeTransformations
Returns
  • (::Google::Cloud::Dlp::V2::InfoTypeTransformations) — Treat the contents of the field as free text, and selectively transform content that matches an InfoType.

    Note: The following fields are mutually exclusive: info_type_transformations, primitive_transformation. If a field in that set is populated, all other fields in the set will automatically be cleared.

#info_type_transformations=

def info_type_transformations=(value) -> ::Google::Cloud::Dlp::V2::InfoTypeTransformations
Parameter
  • value (::Google::Cloud::Dlp::V2::InfoTypeTransformations) — Treat the contents of the field as free text, and selectively transform content that matches an InfoType.

    Note: The following fields are mutually exclusive: info_type_transformations, primitive_transformation. If a field in that set is populated, all other fields in the set will automatically be cleared.

Returns
  • (::Google::Cloud::Dlp::V2::InfoTypeTransformations) — Treat the contents of the field as free text, and selectively transform content that matches an InfoType.

    Note: The following fields are mutually exclusive: info_type_transformations, primitive_transformation. If a field in that set is populated, all other fields in the set will automatically be cleared.

#primitive_transformation

def primitive_transformation() -> ::Google::Cloud::Dlp::V2::PrimitiveTransformation
Returns
  • (::Google::Cloud::Dlp::V2::PrimitiveTransformation) — Apply the transformation to the entire field.

    Note: The following fields are mutually exclusive: primitive_transformation, info_type_transformations. If a field in that set is populated, all other fields in the set will automatically be cleared.

#primitive_transformation=

def primitive_transformation=(value) -> ::Google::Cloud::Dlp::V2::PrimitiveTransformation
Parameter
  • value (::Google::Cloud::Dlp::V2::PrimitiveTransformation) — Apply the transformation to the entire field.

    Note: The following fields are mutually exclusive: primitive_transformation, info_type_transformations. If a field in that set is populated, all other fields in the set will automatically be cleared.

Returns
  • (::Google::Cloud::Dlp::V2::PrimitiveTransformation) — Apply the transformation to the entire field.

    Note: The following fields are mutually exclusive: primitive_transformation, info_type_transformations. If a field in that set is populated, all other fields in the set will automatically be cleared.