...

Text file src/github.com/GoogleCloudPlatform/k8s-config-connector/samples/resources/dlpjobtrigger/cloud-storage-job-trigger/dlp_v1beta1_dlpjobtrigger.yaml

Documentation: github.com/GoogleCloudPlatform/k8s-config-connector/samples/resources/dlpjobtrigger/cloud-storage-job-trigger

     1# Copyright 2022 Google LLC
     2#
     3# Licensed under the Apache License, Version 2.0 (the "License");
     4# you may not use this file except in compliance with the License.
     5# You may obtain a copy of the License at
     6#
     7#     http://www.apache.org/licenses/LICENSE-2.0
     8#
     9# Unless required by applicable law or agreed to in writing, software
    10# distributed under the License is distributed on an "AS IS" BASIS,
    11# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
    12# See the License for the specific language governing permissions and
    13# limitations under the License.
    14
    15apiVersion: dlp.cnrm.cloud.google.com/v1beta1
    16kind: DLPJobTrigger
    17metadata:
    18  name: dlpjobtrigger-sample-cloudstoragejobtrigger
    19spec:
    20  projectRef:
    21    # Replace "${PROJECT_ID?}" with your project ID
    22    external: "projects/${PROJECT_ID?}"
    23  location: "us-west2"
    24  description: "A sample job trigger using cloud storage"
    25  displayName: "sample-trigger"
    26  triggers:
    27  - schedule:
    28      recurrencePeriodDuration: "86400s"
    29  status: "HEALTHY"
    30  inspectJob:
    31    storageConfig:
    32      cloudStorageOptions:
    33        fileSet:
    34          # Replace "${DLP_TEST_BUCKET?}" with your storage bucket name
    35          url: "gs://${DLP_TEST_BUCKET?}/*"
    36        bytesLimitPerFile: 1
    37        fileTypes:
    38        - "BINARY_FILE"
    39        - "TEXT_FILE"
    40        sampleMethod: "TOP"
    41        filesLimitPercent: 50
    42      timespanConfig:
    43        startTime: "2017-01-15T01:30:15.010Z"
    44        endTime: "2018-01-15T01:30:15.010Z"
    45        timestampField:
    46          name: "sample-field"
    47        enableAutoPopulationOfTimespanConfig: true
    48    inspectConfig:
    49      infoTypes:
    50      - name: "AGE"
    51      minLikelihood: "UNLIKELY"
    52      limits:
    53        maxFindingsPerItem: 3
    54        maxFindingsPerRequest: 3
    55        maxFindingsPerInfoType:
    56        - infoType:
    57            name: "AGE"
    58            version: "1"
    59          maxFindings: 3
    60      includeQuote: true
    61      excludeInfoTypes: true
    62      customInfoTypes:
    63      - infoType:
    64          name: "PHONE_NUMBER"
    65          version: "1"
    66        likelihood: "LIKELY"
    67        detectionRules:
    68        - hotwordRule:
    69            hotwordRegex:
    70              pattern: "([1-3])([0-9]*)"
    71              groupIndexes:
    72              - 1
    73              - 2
    74            proximity:
    75              windowBefore: 3
    76              windowAfter: 3
    77            likelihoodAdjustment:
    78              fixedLikelihood: "VERY_LIKELY"
    79        - hotwordRule:
    80            likelihoodAdjustment:
    81              relativeLikelihood: -1
    82        exclusionType: "EXCLUSION_TYPE_EXCLUDE"
    83        dictionary:
    84          wordList:
    85            words:
    86            - "one"
    87            - "two"
    88      - dictionary:
    89          cloudStoragePath:
    90            # Replace "${DLP_TEST_BUCKET?}" with your storage bucket name
    91            path: "gs://${DLP_TEST_BUCKET?}/dictionary-1"
    92      - regex:
    93          pattern: "([a-e]+)([f-z]*)"
    94          groupIndexes:
    95          - 1
    96          - 2
    97      - storedType:
    98          nameRef:
    99            name: "dlpjobtrigger-dep-cloudstoragejobtrigger"
   100      ruleSet:
   101      - infoTypes:
   102        - name: "AGE"
   103          version: "1"
   104        rules:
   105        - hotwordRule:
   106            hotwordRegex:
   107              pattern: "([1-4])([0-9]*)"
   108              groupIndexes:
   109              - 1
   110              - 2
   111            proximity:
   112              windowBefore: 3
   113              windowAfter: 3
   114            likelihoodAdjustment:
   115              fixedLikelihood: "VERY_LIKELY"
   116        - hotwordRule:
   117            likelihoodAdjustment:
   118              relativeLikelihood: -1
   119        - exclusionRule:
   120            matchingType: "MATCHING_TYPE_FULL_MATCH"
   121            dictionary:
   122              wordList:
   123                words:
   124                - "one"
   125                - "two"
   126        - exclusionRule:
   127            dictionary:
   128              cloudStoragePath:
   129                # Replace "${DLP_TEST_BUCKET?}" with your storage bucket name
   130                path: "gs://${DLP_TEST_BUCKET?}/dictionary-2"
   131        - exclusionRule:
   132            regex:
   133              pattern: "([+-])([0-9]+)"
   134              groupIndexes:
   135              - 1
   136              - 2
   137        - exclusionRule:
   138            excludeInfoTypes:
   139              infoTypes:
   140              - name: "AGE"
   141                version: "1"
   142    inspectTemplateName: "fake"

View as plain text