Skip to content

googleDataLossPreventionDeidentifyTemplate

Allows creation of templates to de-identify content.

To get more information about DeidentifyTemplate, see:

Example Usage - Dlp Deidentify Template Basic

/*Provider bindings are generated by running cdktf get.
See https://cdk.tf/provider-generation for more details.*/
import * as google from "./.gen/providers/google";
/*The following providers are missing schema information and might need manual adjustments to synthesize correctly: google.
For a more precise conversion please use the --provider flag in convert.*/
new google.dataLossPreventionDeidentifyTemplate.DataLossPreventionDeidentifyTemplate(
  this,
  "basic",
  {
    deidentify_config: [
      {
        info_type_transformations: [
          {
            transformations: [
              {
                info_types: [
                  {
                    name: "FIRST_NAME",
                  },
                ],
                primitive_transformation: [
                  {
                    replace_with_info_type_config: true,
                  },
                ],
              },
              {
                info_types: [
                  {
                    name: "PHONE_NUMBER",
                  },
                  {
                    name: "AGE",
                  },
                ],
                primitive_transformation: [
                  {
                    replace_config: [
                      {
                        new_value: [
                          {
                            integer_value: 9,
                          },
                        ],
                      },
                    ],
                  },
                ],
              },
              {
                info_types: [
                  {
                    name: "EMAIL_ADDRESS",
                  },
                  {
                    name: "LAST_NAME",
                  },
                ],
                primitive_transformation: [
                  {
                    character_mask_config: [
                      {
                        characters_to_ignore: [
                          {
                            common_characters_to_ignore: "PUNCTUATION",
                          },
                        ],
                        masking_character: "X",
                        number_to_mask: 4,
                        reverse_order: true,
                      },
                    ],
                  },
                ],
              },
              {
                info_types: [
                  {
                    name: "DATE_OF_BIRTH",
                  },
                ],
                primitive_transformation: [
                  {
                    replace_config: [
                      {
                        new_value: [
                          {
                            date_value: [
                              {
                                day: 1,
                                month: 1,
                                year: 2020,
                              },
                            ],
                          },
                        ],
                      },
                    ],
                  },
                ],
              },
              {
                info_types: [
                  {
                    name: "CREDIT_CARD_NUMBER",
                  },
                ],
                primitive_transformation: [
                  {
                    crypto_deterministic_config: [
                      {
                        context: [
                          {
                            name: "sometweak",
                          },
                        ],
                        crypto_key: [
                          {
                            transient: [
                              {
                                name: "beep",
                              },
                            ],
                          },
                        ],
                        surrogate_info_type: [
                          {
                            name: "abc",
                          },
                        ],
                      },
                    ],
                  },
                ],
              },
            ],
          },
        ],
      },
    ],
    description: "Description",
    display_name: "Displayname",
    parent: "projects/my-project-name",
  }
);

Argument Reference

The following arguments are supported:

  • deidentifyConfig - (Required) Configuration of the deidentify template Structure is documented below.

  • parent - (Required) The parent of the template in any of the following formats:

    • projects/{{project}}
    • projects/{{project}}/locations/{{location}}
    • organizations/{{organizationId}}
    • organizations/{{organizationId}}/locations/{{location}}

The deidentifyConfig block supports:

  • infoTypeTransformations - (Optional) Treat the dataset as free-form text and apply the same free text transformation everywhere Structure is documented below.

  • recordTransformations - (Optional) Treat the dataset as structured. Transformations can be applied to specific locations within structured datasets, such as transforming a column within a table. Structure is documented below.

The infoTypeTransformations block supports:

  • transformations - (Required) Transformation for each infoType. Cannot specify more than one for a given infoType. Structure is documented below.

The transformations block supports:

  • infoTypes - (Optional) InfoTypes to apply the transformation to. Leaving this empty will apply the transformation to apply to all findings that correspond to infoTypes that were requested in InspectConfig. Structure is documented below.

  • primitiveTransformation - (Required) Primitive transformation to apply to the infoType. The primitiveTransformation block must only contain one argument, corresponding to the type of transformation. Structure is documented below.

The infoTypes block supports:

  • name - (Required) Name of the information type.

The primitiveTransformation block supports:

  • replaceConfig - (Optional) Replace each input value with a given value. Structure is documented below.

  • replaceWithInfoTypeConfig - (Optional) Replace each matching finding with the name of the info type.

  • characterMaskConfig - (Optional) Partially mask a string by replacing a given number of characters with a fixed character. Masking can start from the beginning or end of the string. Structure is documented below.

  • cryptoDeterministicConfig - (Optional) Pseudonymization method that generates deterministic encryption for the given input. Outputs a base64 encoded representation of the encrypted output. Uses AES-SIV based on the RFC https://tools.ietf.org/html/rfc5297. Structure is documented below.

  • cryptoReplaceFfxFpeConfig - (Optional) Replaces an identifier with a surrogate using Format Preserving Encryption (FPE) with the FFX mode of operation; however when used in the contentReidentify API method, it serves the opposite function by reversing the surrogate back into the original identifier. The identifier must be encoded as ASCII. For a given crypto key and context, the same identifier will be replaced with the same surrogate. Identifiers must be at least two characters long. In the case that the identifier is the empty string, it will be skipped. See https://cloud.google.com/dlp/docs/pseudonymization to learn more. Note: We recommend using CryptoDeterministicConfig for all use cases which do not require preserving the input alphabet space and size, plus warrant referential integrity. Structure is documented below.

The replaceConfig block supports:

  • newValue - (Required) Replace each input value with a given value. The newValue block must only contain one argument. For example when replacing the contents of a string-type field, only stringValue should be set. Structure is documented below.

The newValue block supports:

  • integerValue - (Optional) An integer value.

  • floatValue - (Optional) A float value.

  • stringValue - (Optional) A string value.

  • booleanValue - (Optional) A boolean value.

  • timestampValue - (Optional) A timestamp in RFC3339 UTC "Zulu" format, with nanosecond resolution and up to nine fractional digits. Examples: "2014-10-02T15:01:23Z" and "2014-10-02T15:01:23.045123456Z".

  • timeValue - (Optional) Represents a time of day. Structure is documented below.

  • dateValue - (Optional) Represents a whole or partial calendar date. Structure is documented below.

  • dayOfWeekValue - (Optional) Represents a day of the week. Possible values are monday, tuesday, wednesday, thursday, friday, saturday, and sunday.

The timeValue block supports:

  • hours - (Optional) Hours of day in 24 hour format. Should be from 0 to 23.

  • minutes - (Optional) Minutes of hour of day. Must be from 0 to 59.

  • seconds - (Optional) Seconds of minutes of the time. Must normally be from 0 to 59.

  • nanos - (Optional) Fractions of seconds in nanoseconds. Must be from 0 to 999,999,999.

The dateValue block supports:

  • year - (Optional) Year of date. Must be from 1 to 9999, or 0 if specifying a date without a year.

  • month - (Optional) Month of year. Must be from 1 to 12, or 0 if specifying a year without a month and day.

  • day - (Optional) Day of month. Must be from 1 to 31 and valid for the year and month, or 0 if specifying a year by itself or a year and month where the day is not significant.

The characterMaskConfig block supports:

  • maskingCharacter - (Optional) Character to use to mask the sensitive values—for example, * for an alphabetic string such as a name, or 0 for a numeric string such as ZIP code or credit card number. This string must have a length of 1. If not supplied, this value defaults to * for strings, and 0 for digits.

  • numberToMask - (Optional) Number of characters to mask. If not set, all matching chars will be masked. Skipped characters do not count towards this tally.

  • reverseOrder - (Optional) Mask characters in reverse order. For example, if masking_character is 0, number_to_mask is 14, and reverse_order is false, then the input string 1234567890123456 is masked as 000000000000003456.

  • charactersToIgnore - (Optional) Characters to skip when doing de-identification of a value. These will be left alone and skipped. Structure is documented below.

The charactersToIgnore block supports:

  • charactersToSkip - (Optional) Characters to not transform when masking.

  • commonCharactersToIgnore - (Optional) Common characters to not transform when masking. Useful to avoid removing punctuation. Possible values are numeric, alphaUpperCase, alphaLowerCase, punctuation, and whitespace.

The cryptoDeterministicConfig block supports:

  • cryptoKey - (Optional) The key used by the encryption function. Structure is documented below.

  • surrogateInfoType - (Optional) The custom info type to annotate the surrogate with. This annotation will be applied to the surrogate by prefixing it with the name of the custom info type followed by the number of characters comprising the surrogate. The following scheme defines the format: {info type name}({surrogate character count}):{surrogate} For example, if the name of custom info type is 'MY_TOKEN_INFO_TYPE' and the surrogate is 'abc', the full replacement value will be: 'MY_TOKEN_INFO_TYPE(3):abc' This annotation identifies the surrogate when inspecting content using the custom info type 'Surrogate'. This facilitates reversal of the surrogate when it occurs in free text. Note: For record transformations where the entire cell in a table is being transformed, surrogates are not mandatory. Surrogates are used to denote the location of the token and are necessary for re-identification in free form text. In order for inspection to work properly, the name of this info type must not occur naturally anywhere in your data; otherwise, inspection may either

    • reverse a surrogate that does not correspond to an actual identifier
    • be unable to parse the surrogate and result in an error Therefore, choose your custom info type name carefully after considering what your data looks like. One way to select a name that has a high chance of yielding reliable detection is to include one or more unicode characters that are highly improbable to exist in your data. For example, assuming your data is entered from a regular ASCII keyboard, the symbol with the hex code point 29DD might be used like so: ⧝MY_TOKEN_TYPE. Structure is documented below.
  • context - (Optional) A context may be used for higher security and maintaining referential integrity such that the same identifier in two different contexts will be given a distinct surrogate. The context is appended to plaintext value being encrypted. On decryption the provided context is validated against the value used during encryption. If a context was provided during encryption, same context must be provided during decryption as well. If the context is not set, plaintext would be used as is for encryption. If the context is set but:

    1. there is no record present when transforming a given value or
    2. the field is not present when transforming a given value, plaintext would be used as is for encryption. Note that case (1) is expected when an infoTypeTransformation is applied to both structured and non-structured contentItems. Structure is documented below.

The cryptoKey block supports:

  • transient - (Optional) Transient crypto key. Use this to have a random data crypto key generated. It will be discarded after the request finishes. Structure is documented below.

  • unwrapped - (Optional) Unwrapped crypto key. Using raw keys is prone to security risks due to accidentally leaking the key. Choose another type of key if possible. Structure is documented below.

  • kmsWrapped - (Optional) KMS wrapped key. Include to use an existing data crypto key wrapped by KMS. The wrapped key must be a 128-, 192-, or 256-bit key. Authorization requires the following IAM permissions when sending a request to perform a crypto transformation using a KMS-wrapped crypto key: dlp.kms.encrypt For more information, see Creating a wrapped key. Note: When you use Cloud KMS for cryptographic operations, charges apply. Structure is documented below.

The transient block supports:

  • name - (Required) Name of the key. This is an arbitrary string used to differentiate different keys. A unique key is generated per name: two separate transientCryptoKey protos share the same generated key if their names are the same. When the data crypto key is generated, this name is not used in any way (repeating the api call will result in a different key being generated).

The unwrapped block supports:

  • key - (Required) A 128/192/256 bit key. A base64-encoded string.

The kmsWrapped block supports:

  • wrappedKey - (Required) The wrapped data crypto key. A base64-encoded string.

  • cryptoKeyName - (Required) The resource name of the KMS CryptoKey to use for unwrapping.

The surrogateInfoType block supports:

  • name - (Optional) Name of the information type. Either a name of your choosing when creating a CustomInfoType, or one of the names listed at https://cloud.google.com/dlp/docs/infotypes-reference when specifying a built-in type. When sending Cloud DLP results to Data Catalog, infoType names should conform to the pattern [aZaZ09$_]{1,64}.

  • version - (Optional) Optional version name for this InfoType.

The context block supports:

  • name - (Optional) Name describing the field.

The cryptoReplaceFfxFpeConfig block supports:

  • cryptoKey - (Optional) The key used by the encryption algorithm. Structure is documented below.

  • context - (Optional) The 'tweak', a context may be used for higher security since the same identifier in two different contexts won't be given the same surrogate. If the context is not set, a default tweak will be used. If the context is set but:

    1. there is no record present when transforming a given value or
    2. the field is not present when transforming a given value, a default tweak will be used. Note that case (1) is expected when an infoTypeTransformation is applied to both structured and non-structured contentItems. Currently, the referenced field may be of value type integer or string. The tweak is constructed as a sequence of bytes in big endian byte order such that:
    3. a 64 bit integer is encoded followed by a single byte of value 1
    4. a string is encoded in UTF-8 format followed by a single byte of value 2 Structure is documented below.
  • surrogateInfoType - (Optional) The custom infoType to annotate the surrogate with. This annotation will be applied to the surrogate by prefixing it with the name of the custom infoType followed by the number of characters comprising the surrogate. The following scheme defines the format: info_type_name(surrogate_character_count):surrogate For example, if the name of custom infoType is 'MY_TOKEN_INFO_TYPE' and the surrogate is 'abc', the full replacement value will be: 'MY_TOKEN_INFO_TYPE(3):abc' This annotation identifies the surrogate when inspecting content using the custom infoType surrogateType. This facilitates reversal of the surrogate when it occurs in free text. In order for inspection to work properly, the name of this infoType must not occur naturally anywhere in your data; otherwise, inspection may find a surrogate that does not correspond to an actual identifier. Therefore, choose your custom infoType name carefully after considering what your data looks like. One way to select a name that has a high chance of yielding reliable detection is to include one or more unicode characters that are highly improbable to exist in your data. For example, assuming your data is entered from a regular ASCII keyboard, the symbol with the hex code point 29DD might be used like so: ⧝MY_TOKEN_TYPE Structure is documented below.

  • commonAlphabet - (Optional) Common alphabets. Possible values are ffxCommonNativeAlphabetUnspecified, numeric, hexadecimal, upperCaseAlphaNumeric, and alphaNumeric.

  • customAlphabet - (Optional) This is supported by mapping these to the alphanumeric characters that the FFX mode natively supports. This happens before/after encryption/decryption. Each character listed must appear only once. Number of characters must be in the range [2, 95]. This must be encoded as ASCII. The order of characters does not matter. The full list of allowed characters is: 0123456789AbcdefghijklmnopqrstuvwxyZabcdefghijklmnopqrstuvwxyz ~`!@#$%^&*()_-+={[}]|:;"'<,>.?/

  • radix - (Optional) The native way to select the alphabet. Must be in the range [2, 95].

The cryptoKey block supports:

  • transient - (Optional) Transient crypto key. Use this to have a random data crypto key generated. It will be discarded after the request finishes. Structure is documented below.

  • unwrapped - (Optional) Unwrapped crypto key. Using raw keys is prone to security risks due to accidentally leaking the key. Choose another type of key if possible. Structure is documented below.

  • kmsWrapped - (Optional) KMS wrapped key. Include to use an existing data crypto key wrapped by KMS. The wrapped key must be a 128-, 192-, or 256-bit key. Authorization requires the following IAM permissions when sending a request to perform a crypto transformation using a KMS-wrapped crypto key: dlp.kms.encrypt For more information, see Creating a wrapped key. Note: When you use Cloud KMS for cryptographic operations, charges apply. Structure is documented below.

The transient block supports:

  • name - (Required) Name of the key. This is an arbitrary string used to differentiate different keys. A unique key is generated per name: two separate transientCryptoKey protos share the same generated key if their names are the same. When the data crypto key is generated, this name is not used in any way (repeating the api call will result in a different key being generated).

The unwrapped block supports:

  • key - (Required) A 128/192/256 bit key. A base64-encoded string.

The kmsWrapped block supports:

  • wrappedKey - (Required) The wrapped data crypto key. A base64-encoded string.

  • cryptoKeyName - (Required) The resource name of the KMS CryptoKey to use for unwrapping.

The context block supports:

  • name - (Optional) Name describing the field.

The surrogateInfoType block supports:

  • name - (Optional) Name of the information type. Either a name of your choosing when creating a CustomInfoType, or one of the names listed at https://cloud.google.com/dlp/docs/infotypes-reference when specifying a built-in type. When sending Cloud DLP results to Data Catalog, infoType names should conform to the pattern [aZaZ09$_]{1,64}.

  • version - (Optional) Optional version name for this InfoType.

The recordTransformations block supports:

  • fieldTransformations - (Optional) Transform the record by applying various field transformations. Structure is documented below.

  • recordSuppressions - (Optional) Configuration defining which records get suppressed entirely. Records that match any suppression rule are omitted from the output. Structure is documented below.

The fieldTransformations block supports:

  • fields - (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". Structure is documented below.

  • condition - (Optional) 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. Structure is documented below.
  • primitiveTransformation - (Required) Apply the transformation to the entire field. The primitiveTransformation block must only contain one argument, corresponding to the type of transformation. Structure is documented below.

The fields block supports:

  • name - (Optional) Name describing the field.

The condition block supports:

The expressions block supports:

  • logicalOperator - (Optional) The operator to apply to the result of conditions. Default and currently only supported value is AND Default value is and. Possible values are and.

  • conditions - (Optional) Conditions to apply to the expression. Structure is documented below.

The conditions block supports:

  • conditions - (Optional) A collection of conditions. Structure is documented below.

The conditions block supports:

  • field - (Required) Field within the record this condition is evaluated against. Structure is documented below.

  • operator - (Required) Operator used to compare the field or infoType to the value. Possible values are equalTo, notEqualTo, greaterThan, lessThan, greaterThanOrEquals, lessThanOrEquals, and exists.

  • value - (Optional) Value to compare against. The value block must only contain one argument. For example when a condition is evaluated against a string-type field, only stringValue should be set. This argument is mandatory, except for conditions using the exists operator. Structure is documented below.

The field block supports:

  • name - (Optional) Name describing the field.

The value block supports:

  • integerValue - (Optional) An integer value (int64 format)

  • floatValue - (Optional) A float value.

  • stringValue - (Optional) A string value.

  • booleanValue - (Optional) A boolean value.

  • timestampValue - (Optional) A timestamp in RFC3339 UTC "Zulu" format, with nanosecond resolution and up to nine fractional digits. Examples: "2014-10-02T15:01:23Z" and "2014-10-02T15:01:23.045123456Z".

  • timeValue - (Optional) Represents a time of day. Structure is documented below.

  • dateValue - (Optional) Represents a whole or partial calendar date. Structure is documented below.

  • dayOfWeekValue - (Optional) Represents a day of the week. Possible values are monday, tuesday, wednesday, thursday, friday, saturday, and sunday.

The timeValue block supports:

  • hours - (Optional) Hours of day in 24 hour format. Should be from 0 to 23. An API may choose to allow the value "24:00:00" for scenarios like business closing time.

  • minutes - (Optional) Minutes of hour of day. Must be from 0 to 59.

  • seconds - (Optional) Seconds of minutes of the time. Must normally be from 0 to 59. An API may allow the value 60 if it allows leap-seconds.

  • nanos - (Optional) Fractions of seconds in nanoseconds. Must be from 0 to 999,999,999.

The dateValue block supports:

  • year - (Optional) Year of the date. Must be from 1 to 9999, or 0 to specify a date without a year.

  • month - (Optional) Month of a year. Must be from 1 to 12, or 0 to specify a year without a month and day.

  • day - (Optional) Day of a month. Must be from 1 to 31 and valid for the year and month, or 0 to specify a year by itself or a year and month where the day isn't significant.

The primitiveTransformation block supports:

  • replaceConfig - (Optional) Replace with a specified value. Structure is documented below.

  • redactConfig - (Optional) Redact a given value. For example, if used with an InfoTypeTransformation transforming PHONE_NUMBER, and input 'My phone number is 206-555-0123', the output would be 'My phone number is '.

  • characterMaskConfig - (Optional) Partially mask a string by replacing a given number of characters with a fixed character. Masking can start from the beginning or end of the string. This can be used on data of any type (numbers, longs, and so on) and when de-identifying structured data we'll attempt to preserve the original data's type. (This allows you to take a long like 123 and modify it to a string like **3). Structure is documented below.

  • cryptoReplaceFfxFpeConfig - (Optional) Replaces an identifier with a surrogate using Format Preserving Encryption (FPE) with the FFX mode of operation; however when used in the contentReidentify API method, it serves the opposite function by reversing the surrogate back into the original identifier. The identifier must be encoded as ASCII. For a given crypto key and context, the same identifier will be replaced with the same surrogate. Identifiers must be at least two characters long. In the case that the identifier is the empty string, it will be skipped. See https://cloud.google.com/dlp/docs/pseudonymization to learn more. Note: We recommend using CryptoDeterministicConfig for all use cases which do not require preserving the input alphabet space and size, plus warrant referential integrity. Structure is documented below.

  • fixedSizeBucketingConfig - (Optional) Buckets values based on fixed size ranges. The Bucketing transformation can provide all of this functionality, but requires more configuration. This message is provided as a convenience to the user for simple bucketing strategies. The transformed value will be a hyphenated string of {lower_bound}-{upper_bound}. For example, if lower_bound = 10 and upper_bound = 20, all values that are within this bucket will be replaced with "10-20". This can be used on data of type: double, long. If the bound Value type differs from the type of data being transformed, we will first attempt converting the type of the data to be transformed to match the type of the bound before comparing. See https://cloud.google.com/dlp/docs/concepts-bucketing to learn more. Structure is documented below.

  • bucketingConfig - (Optional) Generalization function that buckets values based on ranges. The ranges and replacement values are dynamically provided by the user for custom behavior, such as 1-30 -> LOW 31-65 -> MEDIUM 66-100 -> HIGH This can be used on data of type: number, long, string, timestamp. If the provided value type differs from the type of data being transformed, we will first attempt converting the type of the data to be transformed to match the type of the bound before comparing. See https://cloud.google.com/dlp/docs/concepts-bucketing to learn more. Structure is documented below.

  • timePartConfig - (Optional) For use with Date, Timestamp, and TimeOfDay, extract or preserve a portion of the value. Structure is documented below.

  • cryptoHashConfig - (Optional) Pseudonymization method that generates surrogates via cryptographic hashing. Uses SHA-256. The key size must be either 32 or 64 bytes. Outputs a base64 encoded representation of the hashed output (for example, L7k0BHmF1ha5U3NfGykjro4xWi1MPVQPjhMAZbSV9mM=). Currently, only string and integer values can be hashed. See https://cloud.google.com/dlp/docs/pseudonymization to learn more. Structure is documented below.

  • dateShiftConfig - (Optional) Shifts dates by random number of days, with option to be consistent for the same context. See https://cloud.google.com/dlp/docs/concepts-date-shifting to learn more. Structure is documented below.

  • cryptoDeterministicConfig - (Optional) Pseudonymization method that generates deterministic encryption for the given input. Outputs a base64 encoded representation of the encrypted output. Uses AES-SIV based on the RFC https://tools.ietf.org/html/rfc5297. Structure is documented below.

  • replaceDictionaryConfig - (Optional) Replace with a value randomly drawn (with replacement) from a dictionary. Structure is documented below.

The replaceConfig block supports:

  • newValue - (Required) Replace each input value with a given value. The newValue block must only contain one argument. For example when replacing the contents of a string-type field, only stringValue should be set. Structure is documented below.

The newValue block supports:

  • integerValue - (Optional) An integer value (int64 format)

  • floatValue - (Optional) A float value.

  • stringValue - (Optional) A string value.

  • booleanValue - (Optional) A boolean value.

  • timestampValue - (Optional) A timestamp in RFC3339 UTC "Zulu" format, with nanosecond resolution and up to nine fractional digits. Examples: "2014-10-02T15:01:23Z" and "2014-10-02T15:01:23.045123456Z".

  • timeValue - (Optional) Represents a time of day. Structure is documented below.

  • dateValue - (Optional) Represents a whole or partial calendar date. Structure is documented below.

  • dayOfWeekValue - (Optional) Represents a day of the week. Possible values are monday, tuesday, wednesday, thursday, friday, saturday, and sunday.

The timeValue block supports:

  • hours - (Optional) Hours of day in 24 hour format. Should be from 0 to 23. An API may choose to allow the value "24:00:00" for scenarios like business closing time.

  • minutes - (Optional) Minutes of hour of day. Must be from 0 to 59.

  • seconds - (Optional) Seconds of minutes of the time. Must normally be from 0 to 59. An API may allow the value 60 if it allows leap-seconds.

  • nanos - (Optional) Fractions of seconds in nanoseconds. Must be from 0 to 999,999,999.

The dateValue block supports:

  • year - (Optional) Year of the date. Must be from 1 to 9999, or 0 to specify a date without a year.

  • month - (Optional) Month of a year. Must be from 1 to 12, or 0 to specify a year without a month and day.

  • day - (Optional) Day of a month. Must be from 1 to 31 and valid for the year and month, or 0 to specify a year by itself or a year and month where the day isn't significant.

The characterMaskConfig block supports:

  • maskingCharacter - (Optional) Character to use to mask the sensitive values—for example, * for an alphabetic string such as a name, or 0 for a numeric string such as ZIP code or credit card number. This string must have a length of 1. If not supplied, this value defaults to * for strings, and 0 for digits.

  • numberToMask - (Optional) Number of characters to mask. If not set, all matching chars will be masked. Skipped characters do not count towards this tally. If number_to_mask is negative, this denotes inverse masking. Cloud DLP masks all but a number of characters. For example, suppose you have the following values:

    • maskingCharacter is *
    • numberToMask is -4
    • reverseOrder is false
    • charactersToIgnore includes -
    • Input string is 1234-5678-9012-3456 The resulting de-identified string is *---3456. Cloud DLP masks all but the last four characters. If reverseOrder is true, all but the first four characters are masked as 1234---*.
  • reverseOrder - (Optional) Mask characters in reverse order. For example, if masking_character is 0, number_to_mask is 14, and reverse_order is false, then the input string 1234567890123456 is masked as 000000000000003456.

  • charactersToIgnore - (Optional) Characters to skip when doing de-identification of a value. These will be left alone and skipped. Structure is documented below.

The charactersToIgnore block supports:

  • charactersToSkip - (Optional) Characters to not transform when masking.

  • commonCharactersToIgnore - (Optional) Common characters to not transform when masking. Useful to avoid removing punctuation. Possible values are numeric, alphaUpperCase, alphaLowerCase, punctuation, and whitespace.

The cryptoReplaceFfxFpeConfig block supports:

  • cryptoKey - (Optional) The key used by the encryption algorithm. Structure is documented below.

  • context - (Optional) The 'tweak', a context may be used for higher security since the same identifier in two different contexts won't be given the same surrogate. If the context is not set, a default tweak will be used. If the context is set but:

    1. there is no record present when transforming a given value or
    2. the field is not present when transforming a given value, a default tweak will be used. Note that case (1) is expected when an infoTypeTransformation is applied to both structured and non-structured contentItems. Currently, the referenced field may be of value type integer or string. The tweak is constructed as a sequence of bytes in big endian byte order such that:
    3. a 64 bit integer is encoded followed by a single byte of value 1
    4. a string is encoded in UTF-8 format followed by a single byte of value 2 Structure is documented below.
  • surrogateInfoType - (Optional) The custom infoType to annotate the surrogate with. This annotation will be applied to the surrogate by prefixing it with the name of the custom infoType followed by the number of characters comprising the surrogate. The following scheme defines the format: info_type_name(surrogate_character_count):surrogate For example, if the name of custom infoType is 'MY_TOKEN_INFO_TYPE' and the surrogate is 'abc', the full replacement value will be: 'MY_TOKEN_INFO_TYPE(3):abc' This annotation identifies the surrogate when inspecting content using the custom infoType surrogateType. This facilitates reversal of the surrogate when it occurs in free text. In order for inspection to work properly, the name of this infoType must not occur naturally anywhere in your data; otherwise, inspection may find a surrogate that does not correspond to an actual identifier. Therefore, choose your custom infoType name carefully after considering what your data looks like. One way to select a name that has a high chance of yielding reliable detection is to include one or more unicode characters that are highly improbable to exist in your data. For example, assuming your data is entered from a regular ASCII keyboard, the symbol with the hex code point 29DD might be used like so: ⧝MY_TOKEN_TYPE Structure is documented below.

  • commonAlphabet - (Optional) Common alphabets. Possible values are ffxCommonNativeAlphabetUnspecified, numeric, hexadecimal, upperCaseAlphaNumeric, and alphaNumeric.

  • customAlphabet - (Optional) This is supported by mapping these to the alphanumeric characters that the FFX mode natively supports. This happens before/after encryption/decryption. Each character listed must appear only once. Number of characters must be in the range [2, 95]. This must be encoded as ASCII. The order of characters does not matter. The full list of allowed characters is: 0123456789AbcdefghijklmnopqrstuvwxyZabcdefghijklmnopqrstuvwxyz ~`!@#$%^&*()_-+={[}]|:;"'<,>.?/

  • radix - (Optional) The native way to select the alphabet. Must be in the range [2, 95].

The cryptoKey block supports:

  • transient - (Optional) Transient crypto key. Use this to have a random data crypto key generated. It will be discarded after the request finishes. Structure is documented below.

  • unwrapped - (Optional) Unwrapped crypto key. Using raw keys is prone to security risks due to accidentally leaking the key. Choose another type of key if possible. Structure is documented below.

  • kmsWrapped - (Optional) KMS wrapped key. Include to use an existing data crypto key wrapped by KMS. The wrapped key must be a 128-, 192-, or 256-bit key. Authorization requires the following IAM permissions when sending a request to perform a crypto transformation using a KMS-wrapped crypto key: dlp.kms.encrypt For more information, see Creating a wrapped key. Note: When you use Cloud KMS for cryptographic operations, charges apply. Structure is documented below.

The transient block supports:

  • name - (Required) Name of the key. This is an arbitrary string used to differentiate different keys. A unique key is generated per name: two separate transientCryptoKey protos share the same generated key if their names are the same. When the data crypto key is generated, this name is not used in any way (repeating the api call will result in a different key being generated).

The unwrapped block supports:

  • key - (Required) A 128/192/256 bit key. A base64-encoded string.

The kmsWrapped block supports:

  • wrappedKey - (Required) The wrapped data crypto key. A base64-encoded string.

  • cryptoKeyName - (Required) The resource name of the KMS CryptoKey to use for unwrapping.

The context block supports:

  • name - (Optional) Name describing the field.

The surrogateInfoType block supports:

  • name - (Optional) Name of the information type. Either a name of your choosing when creating a CustomInfoType, or one of the names listed at https://cloud.google.com/dlp/docs/infotypes-reference when specifying a built-in type. When sending Cloud DLP results to Data Catalog, infoType names should conform to the pattern [aZaZ09$_]{1,64}.

  • version - (Optional) Optional version name for this InfoType.

The fixedSizeBucketingConfig block supports:

  • lowerBound - (Required) Lower bound value of buckets. All values less than lower_bound are grouped together into a single bucket; for example if lower_bound = 10, then all values less than 10 are replaced with the value "-10". The lowerBound block must only contain one argument. See the fixedSizeBucketingConfig block description for more information about choosing a data type. Structure is documented below.

  • upperBound - (Required) Upper bound value of buckets. All values greater than upper_bound are grouped together into a single bucket; for example if upper_bound = 89, then all values greater than 89 are replaced with the value "89+". The upperBound block must only contain one argument. See the fixedSizeBucketingConfig block description for more information about choosing a data type. Structure is documented below.

  • bucketSize - (Required) Size of each bucket (except for minimum and maximum buckets). So if lower_bound = 10, upper_bound = 89, and bucketSize = 10, then the following buckets would be used: -10, 10-20, 20-30, 30-40, 40-50, 50-60, 60-70, 70-80, 80-89, 89+. Precision up to 2 decimals works.

The lowerBound block supports:

  • integerValue - (Optional) An integer value (int64 format)

  • floatValue - (Optional) A float value.

  • stringValue - (Optional) A string value.

  • booleanValue - (Optional) A boolean value.

  • timestampValue - (Optional) A timestamp in RFC3339 UTC "Zulu" format, with nanosecond resolution and up to nine fractional digits. Examples: "2014-10-02T15:01:23Z" and "2014-10-02T15:01:23.045123456Z".

  • timeValue - (Optional) Represents a time of day. Structure is documented below.

  • dateValue - (Optional) Represents a whole or partial calendar date. Structure is documented below.

  • dayOfWeekValue - (Optional) Represents a day of the week. Possible values are monday, tuesday, wednesday, thursday, friday, saturday, and sunday.

The timeValue block supports:

  • hours - (Optional) Hours of day in 24 hour format. Should be from 0 to 23. An API may choose to allow the value "24:00:00" for scenarios like business closing time.

  • minutes - (Optional) Minutes of hour of day. Must be from 0 to 59.

  • seconds - (Optional) Seconds of minutes of the time. Must normally be from 0 to 59. An API may allow the value 60 if it allows leap-seconds.

  • nanos - (Optional) Fractions of seconds in nanoseconds. Must be from 0 to 999,999,999.

The dateValue block supports:

  • year - (Optional) Year of the date. Must be from 1 to 9999, or 0 to specify a date without a year.

  • month - (Optional) Month of a year. Must be from 1 to 12, or 0 to specify a year without a month and day.

  • day - (Optional) Day of a month. Must be from 1 to 31 and valid for the year and month, or 0 to specify a year by itself or a year and month where the day isn't significant.

The upperBound block supports:

  • integerValue - (Optional) An integer value (int64 format)

  • floatValue - (Optional) A float value.

  • stringValue - (Optional) A string value.

  • booleanValue - (Optional) A boolean value.

  • timestampValue - (Optional) A timestamp in RFC3339 UTC "Zulu" format, with nanosecond resolution and up to nine fractional digits. Examples: "2014-10-02T15:01:23Z" and "2014-10-02T15:01:23.045123456Z".

  • timeValue - (Optional) Represents a time of day. Structure is documented below.

  • dateValue - (Optional) Represents a whole or partial calendar date. Structure is documented below.

  • dayOfWeekValue - (Optional) Represents a day of the week. Possible values are monday, tuesday, wednesday, thursday, friday, saturday, and sunday.

The timeValue block supports:

  • hours - (Optional) Hours of day in 24 hour format. Should be from 0 to 23. An API may choose to allow the value "24:00:00" for scenarios like business closing time.

  • minutes - (Optional) Minutes of hour of day. Must be from 0 to 59.

  • seconds - (Optional) Seconds of minutes of the time. Must normally be from 0 to 59. An API may allow the value 60 if it allows leap-seconds.

  • nanos - (Optional) Fractions of seconds in nanoseconds. Must be from 0 to 999,999,999.

The dateValue block supports:

  • year - (Optional) Year of the date. Must be from 1 to 9999, or 0 to specify a date without a year.

  • month - (Optional) Month of a year. Must be from 1 to 12, or 0 to specify a year without a month and day.

  • day - (Optional) Day of a month. Must be from 1 to 31 and valid for the year and month, or 0 to specify a year by itself or a year and month where the day isn't significant.

The bucketingConfig block supports:

  • buckets - (Optional) Set of buckets. Ranges must be non-overlapping. Bucket is represented as a range, along with replacement values. Structure is documented below.

The buckets block supports:

  • min - (Optional) Lower bound of the range, inclusive. Type should be the same as max if used. The min block must only contain one argument. See the bucketingConfig block description for more information about choosing a data type. Structure is documented below.

  • max - (Optional) Upper bound of the range, exclusive; type must match min. The max block must only contain one argument. See the bucketingConfig block description for more information about choosing a data type. Structure is documented below.

  • replacementValue - (Required) Replacement value for this bucket. The replacementValue block must only contain one argument. Structure is documented below.

The min block supports:

  • integerValue - (Optional) An integer value (int64 format)

  • floatValue - (Optional) A float value.

  • stringValue - (Optional) A string value.

  • booleanValue - (Optional) A boolean value.

  • timestampValue - (Optional) A timestamp in RFC3339 UTC "Zulu" format, with nanosecond resolution and up to nine fractional digits. Examples: "2014-10-02T15:01:23Z" and "2014-10-02T15:01:23.045123456Z".

  • timeValue - (Optional) Represents a time of day. Structure is documented below.

  • dateValue - (Optional) Represents a whole or partial calendar date. Structure is documented below.

  • dayOfWeekValue - (Optional) Represents a day of the week. Possible values are monday, tuesday, wednesday, thursday, friday, saturday, and sunday.

The timeValue block supports:

  • hours - (Optional) Hours of day in 24 hour format. Should be from 0 to 23. An API may choose to allow the value "24:00:00" for scenarios like business closing time.

  • minutes - (Optional) Minutes of hour of day. Must be from 0 to 59.

  • seconds - (Optional) Seconds of minutes of the time. Must normally be from 0 to 59. An API may allow the value 60 if it allows leap-seconds.

  • nanos - (Optional) Fractions of seconds in nanoseconds. Must be from 0 to 999,999,999.

The dateValue block supports:

  • year - (Optional) Year of the date. Must be from 1 to 9999, or 0 to specify a date without a year.

  • month - (Optional) Month of a year. Must be from 1 to 12, or 0 to specify a year without a month and day.

  • day - (Optional) Day of a month. Must be from 1 to 31 and valid for the year and month, or 0 to specify a year by itself or a year and month where the day isn't significant.

The max block supports:

  • integerValue - (Optional) An integer value (int64 format)

  • floatValue - (Optional) A float value.

  • stringValue - (Optional) A string value.

  • booleanValue - (Optional) A boolean value.

  • timestampValue - (Optional) A timestamp in RFC3339 UTC "Zulu" format, with nanosecond resolution and up to nine fractional digits. Examples: "2014-10-02T15:01:23Z" and "2014-10-02T15:01:23.045123456Z".

  • timeValue - (Optional) Represents a time of day. Structure is documented below.

  • dateValue - (Optional) Represents a whole or partial calendar date. Structure is documented below.

  • dayOfWeekValue - (Optional) Represents a day of the week. Possible values are monday, tuesday, wednesday, thursday, friday, saturday, and sunday.

The timeValue block supports:

  • hours - (Optional) Hours of day in 24 hour format. Should be from 0 to 23. An API may choose to allow the value "24:00:00" for scenarios like business closing time.

  • minutes - (Optional) Minutes of hour of day. Must be from 0 to 59.

  • seconds - (Optional) Seconds of minutes of the time. Must normally be from 0 to 59. An API may allow the value 60 if it allows leap-seconds.

  • nanos - (Optional) Fractions of seconds in nanoseconds. Must be from 0 to 999,999,999.

The dateValue block supports:

  • year - (Optional) Year of the date. Must be from 1 to 9999, or 0 to specify a date without a year.

  • month - (Optional) Month of a year. Must be from 1 to 12, or 0 to specify a year without a month and day.

  • day - (Optional) Day of a month. Must be from 1 to 31 and valid for the year and month, or 0 to specify a year by itself or a year and month where the day isn't significant.

The replacementValue block supports:

  • integerValue - (Optional) An integer value (int64 format)

  • floatValue - (Optional) A float value.

  • stringValue - (Optional) A string value.

  • booleanValue - (Optional) A boolean value.

  • timestampValue - (Optional) A timestamp in RFC3339 UTC "Zulu" format, with nanosecond resolution and up to nine fractional digits. Examples: "2014-10-02T15:01:23Z" and "2014-10-02T15:01:23.045123456Z".

  • timeValue - (Optional) Represents a time of day. Structure is documented below.

  • dateValue - (Optional) Represents a whole or partial calendar date. Structure is documented below.

  • dayOfWeekValue - (Optional) Represents a day of the week. Possible values are monday, tuesday, wednesday, thursday, friday, saturday, and sunday.

The timeValue block supports:

  • hours - (Optional) Hours of day in 24 hour format. Should be from 0 to 23. An API may choose to allow the value "24:00:00" for scenarios like business closing time.

  • minutes - (Optional) Minutes of hour of day. Must be from 0 to 59.

  • seconds - (Optional) Seconds of minutes of the time. Must normally be from 0 to 59. An API may allow the value 60 if it allows leap-seconds.

  • nanos - (Optional) Fractions of seconds in nanoseconds. Must be from 0 to 999,999,999.

The dateValue block supports:

  • year - (Optional) Year of the date. Must be from 1 to 9999, or 0 to specify a date without a year.

  • month - (Optional) Month of a year. Must be from 1 to 12, or 0 to specify a year without a month and day.

  • day - (Optional) Day of a month. Must be from 1 to 31 and valid for the year and month, or 0 to specify a year by itself or a year and month where the day isn't significant.

The timePartConfig block supports:

  • partToExtract - (Optional) The part of the time to keep. Possible values are year, month, dayOfMonth, dayOfWeek, weekOfYear, and hourOfDay.

The cryptoHashConfig block supports:

  • cryptoKey - (Optional) The key used by the encryption function. Structure is documented below.

The cryptoKey block supports:

  • transient - (Optional) Transient crypto key. Use this to have a random data crypto key generated. It will be discarded after the request finishes. Structure is documented below.

  • unwrapped - (Optional) Unwrapped crypto key. Using raw keys is prone to security risks due to accidentally leaking the key. Choose another type of key if possible. Structure is documented below.

  • kmsWrapped - (Optional) KMS wrapped key. Include to use an existing data crypto key wrapped by KMS. The wrapped key must be a 128-, 192-, or 256-bit key. Authorization requires the following IAM permissions when sending a request to perform a crypto transformation using a KMS-wrapped crypto key: dlp.kms.encrypt For more information, see Creating a wrapped key. Note: When you use Cloud KMS for cryptographic operations, charges apply. Structure is documented below.

The transient block supports:

  • name - (Required) Name of the key. This is an arbitrary string used to differentiate different keys. A unique key is generated per name: two separate transientCryptoKey protos share the same generated key if their names are the same. When the data crypto key is generated, this name is not used in any way (repeating the api call will result in a different key being generated).

The unwrapped block supports:

  • key - (Required) A 128/192/256 bit key. A base64-encoded string.

The kmsWrapped block supports:

  • wrappedKey - (Required) The wrapped data crypto key. A base64-encoded string.

  • cryptoKeyName - (Required) The resource name of the KMS CryptoKey to use for unwrapping.

The dateShiftConfig block supports:

  • upperBoundDays - (Required) Range of shift in days. Actual shift will be selected at random within this range (inclusive ends). Negative means shift to earlier in time. Must not be more than 365250 days (1000 years) each direction. For example, 3 means shift date to at most 3 days into the future.

  • lowerBoundDays - (Required) For example, -5 means shift date to at most 5 days back in the past.

  • context - (Optional) Points to the field that contains the context, for example, an entity id. If set, must also set cryptoKey. If set, shift will be consistent for the given context. Structure is documented below.

  • cryptoKey - (Optional) Causes the shift to be computed based on this key and the context. This results in the same shift for the same context and cryptoKey. If set, must also set context. Can only be applied to table items. Structure is documented below.

The context block supports:

  • name - (Optional) Name describing the field.

The cryptoKey block supports:

  • transient - (Optional) Transient crypto key. Use this to have a random data crypto key generated. It will be discarded after the request finishes. Structure is documented below.

  • unwrapped - (Optional) Unwrapped crypto key. Using raw keys is prone to security risks due to accidentally leaking the key. Choose another type of key if possible. Structure is documented below.

  • kmsWrapped - (Optional) KMS wrapped key. Include to use an existing data crypto key wrapped by KMS. The wrapped key must be a 128-, 192-, or 256-bit key. Authorization requires the following IAM permissions when sending a request to perform a crypto transformation using a KMS-wrapped crypto key: dlp.kms.encrypt For more information, see Creating a wrapped key. Note: When you use Cloud KMS for cryptographic operations, charges apply. Structure is documented below.

The transient block supports:

  • name - (Required) Name of the key. This is an arbitrary string used to differentiate different keys. A unique key is generated per name: two separate transientCryptoKey protos share the same generated key if their names are the same. When the data crypto key is generated, this name is not used in any way (repeating the api call will result in a different key being generated).

The unwrapped block supports:

  • key - (Required) A 128/192/256 bit key. A base64-encoded string.

The kmsWrapped block supports:

  • wrappedKey - (Required) The wrapped data crypto key. A base64-encoded string.

  • cryptoKeyName - (Required) The resource name of the KMS CryptoKey to use for unwrapping.

The cryptoDeterministicConfig block supports:

  • cryptoKey - (Optional) The key used by the encryption function. For deterministic encryption using AES-SIV, the provided key is internally expanded to 64 bytes prior to use. Structure is documented below.

  • surrogateInfoType - (Optional) The custom info type to annotate the surrogate with. This annotation will be applied to the surrogate by prefixing it with the name of the custom info type followed by the number of characters comprising the surrogate. The following scheme defines the format: {info type name}({surrogate character count}):{surrogate} For example, if the name of custom info type is 'MY_TOKEN_INFO_TYPE' and the surrogate is 'abc', the full replacement value will be: 'MY_TOKEN_INFO_TYPE(3):abc' This annotation identifies the surrogate when inspecting content using the custom info type 'Surrogate'. This facilitates reversal of the surrogate when it occurs in free text. Note: For record transformations where the entire cell in a table is being transformed, surrogates are not mandatory. Surrogates are used to denote the location of the token and are necessary for re-identification in free form text. In order for inspection to work properly, the name of this info type must not occur naturally anywhere in your data; otherwise, inspection may either

    • reverse a surrogate that does not correspond to an actual identifier
    • be unable to parse the surrogate and result in an error Therefore, choose your custom info type name carefully after considering what your data looks like. One way to select a name that has a high chance of yielding reliable detection is to include one or more unicode characters that are highly improbable to exist in your data. For example, assuming your data is entered from a regular ASCII keyboard, the symbol with the hex code point 29DD might be used like so: ⧝MY_TOKEN_TYPE. Structure is documented below.
  • context - (Optional) A context may be used for higher security and maintaining referential integrity such that the same identifier in two different contexts will be given a distinct surrogate. The context is appended to plaintext value being encrypted. On decryption the provided context is validated against the value used during encryption. If a context was provided during encryption, same context must be provided during decryption as well. If the context is not set, plaintext would be used as is for encryption. If the context is set but:

    1. there is no record present when transforming a given value or
    2. the field is not present when transforming a given value, plaintext would be used as is for encryption. Note that case (1) is expected when an InfoTypeTransformation is applied to both structured and unstructured ContentItems. Structure is documented below.

The cryptoKey block supports:

  • transient - (Optional) Transient crypto key. Use this to have a random data crypto key generated. It will be discarded after the request finishes. Structure is documented below.

  • unwrapped - (Optional) Unwrapped crypto key. Using raw keys is prone to security risks due to accidentally leaking the key. Choose another type of key if possible. Structure is documented below.

  • kmsWrapped - (Optional) KMS wrapped key. Include to use an existing data crypto key wrapped by KMS. The wrapped key must be a 128-, 192-, or 256-bit key. Authorization requires the following IAM permissions when sending a request to perform a crypto transformation using a KMS-wrapped crypto key: dlp.kms.encrypt For more information, see Creating a wrapped key. Note: When you use Cloud KMS for cryptographic operations, charges apply. Structure is documented below.

The transient block supports:

  • name - (Required) Name of the key. This is an arbitrary string used to differentiate different keys. A unique key is generated per name: two separate transientCryptoKey protos share the same generated key if their names are the same. When the data crypto key is generated, this name is not used in any way (repeating the api call will result in a different key being generated).

The unwrapped block supports:

  • key - (Required) A 128/192/256 bit key. A base64-encoded string.

The kmsWrapped block supports:

  • wrappedKey - (Required) The wrapped data crypto key. A base64-encoded string.

  • cryptoKeyName - (Required) The resource name of the KMS CryptoKey to use for unwrapping.

The surrogateInfoType block supports:

  • name - (Optional) Name of the information type. Either a name of your choosing when creating a CustomInfoType, or one of the names listed at https://cloud.google.com/dlp/docs/infotypes-reference when specifying a built-in type. When sending Cloud DLP results to Data Catalog, infoType names should conform to the pattern [aZaZ09$_]{1,64}.

  • version - (Optional) Optional version name for this InfoType.

The context block supports:

  • name - (Optional) Name describing the field.

The replaceDictionaryConfig block supports:

  • wordList - (Optional) A list of words to select from for random replacement. The limits page contains details about the size limits of dictionaries. Structure is documented below.

The wordList block supports:

  • words - (Required) Words or phrases defining the dictionary. The dictionary must contain at least one phrase and every phrase must contain at least 2 characters that are letters or digits.

The recordSuppressions block supports:

  • condition - (Optional) A condition that when it evaluates to true will result in the record being evaluated to be suppressed from the transformed content. Structure is documented below.

The condition block supports:

  • expressions - (Optional) An expression, consisting of an operator and conditions. Structure is documented below.

The expressions block supports:

  • logicalOperator - (Optional) The operator to apply to the result of conditions. Default and currently only supported value is AND. Default value is and. Possible values are and.

  • conditions - (Optional) Conditions to apply to the expression. Structure is documented below.

The conditions block supports:

  • conditions - (Optional) A collection of conditions. Structure is documented below.

The conditions block supports:

  • field - (Required) Field within the record this condition is evaluated against. Structure is documented below.

  • operator - (Required) Operator used to compare the field or infoType to the value. Possible values are equalTo, notEqualTo, greaterThan, lessThan, greaterThanOrEquals, lessThanOrEquals, and exists.

  • value - (Optional) Value to compare against. [Mandatory, except for EXISTS tests.] Structure is documented below.

The field block supports:

  • name - (Optional) Name describing the field.

The value block supports:

  • integerValue - (Optional) An integer value (int64 format)

  • floatValue - (Optional) A float value.

  • stringValue - (Optional) A string value.

  • booleanValue - (Optional) A boolean value.

  • timestampValue - (Optional) A timestamp in RFC3339 UTC "Zulu" format, with nanosecond resolution and up to nine fractional digits. Examples: "2014-10-02T15:01:23Z" and "2014-10-02T15:01:23.045123456Z".

  • timeValue - (Optional) Represents a time of day. Structure is documented below.

  • dateValue - (Optional) Represents a whole or partial calendar date. Structure is documented below.

  • dayOfWeekValue - (Optional) Represents a day of the week. Possible values are monday, tuesday, wednesday, thursday, friday, saturday, and sunday.

The timeValue block supports:

  • hours - (Optional) Hours of day in 24 hour format. Should be from 0 to 23. An API may choose to allow the value "24:00:00" for scenarios like business closing time.

  • minutes - (Optional) Minutes of hour of day. Must be from 0 to 59.

  • seconds - (Optional) Seconds of minutes of the time. Must normally be from 0 to 59. An API may allow the value 60 if it allows leap-seconds.

  • nanos - (Optional) Fractions of seconds in nanoseconds. Must be from 0 to 999,999,999.

The dateValue block supports:

  • year - (Optional) Year of the date. Must be from 1 to 9999, or 0 to specify a date without a year.

  • month - (Optional) Month of a year. Must be from 1 to 12, or 0 to specify a year without a month and day.

  • day - (Optional) Day of a month. Must be from 1 to 31 and valid for the year and month, or 0 to specify a year by itself or a year and month where the day isn't significant.


  • description - (Optional) A description of the template.

  • displayName - (Optional) User set display name of the template.

Attributes Reference

In addition to the arguments listed above, the following computed attributes are exported:

  • id - an identifier for the resource with format {{parent}}/deidentifyTemplates/{{name}}

  • name - The resource name of the template. Set by the server.

Timeouts

This resource provides the following Timeouts configuration options:

  • create - Default is 20 minutes.
  • update - Default is 20 minutes.
  • delete - Default is 20 minutes.

Import

DeidentifyTemplate can be imported using any of these accepted formats:

$ terraform import google_data_loss_prevention_deidentify_template.default {{parent}}/deidentifyTemplates/{{name}}
$ terraform import google_data_loss_prevention_deidentify_template.default {{parent}}/{{name}}