class Google::Apis::DlpV2::GooglePrivacyDlpV2FileSet
Set of files to scan.
Attributes
Message representing a set of files in a Cloud Storage bucket. Regular expressions are used to allow fine-grained control over which files in the bucket to include. Included files are those that match at least one item in ` include_regex` and do not match any items in `exclude_regex`. Note that a file that matches items from both lists will not be included. For a match to occur, the entire file path (i.e., everything in the url after the bucket name) must match the regular expression. For example, given the input “bucket_name: “mybucket”, include_regex: [“directory1/.*”], exclude_regex: [“directory1/ excluded.*”]“: * `gs://mybucket/directory1/myfile` will be included * `gs:// mybucket/directory1/directory2/myfile` will be included (`.*` matches across `/ `) * `gs://mybucket/directory0/directory1/myfile` will not be included (the full path doesn't match any items in `include_regex`) * `gs://mybucket/ directory1/excludedfile` will not be included (the path matches an item in ` exclude_regex`) If `include_regex` is left empty, it will match all files by default (this is equivalent to setting `include_regex: [“.*”]`). Some other common use cases: * “bucket_name: “mybucket”, exclude_regex: [“.*.pdf”]“ will include all files in `mybucket` except for .pdf files * “bucket_name: “ mybucket”, include_regex: [“directory/+”]“ will include all files directly under `gs://mybucket/directory/`, without matching across `/` Corresponds to the JSON property `regexFileSet` @return [Google::Apis::DlpV2::GooglePrivacyDlpV2CloudStorageRegexFileSet]
The Cloud Storage url of the file(s) to scan, in the format `gs:///`. Trailing wildcard in the path is allowed. If the url ends in a trailing slash, the bucket or directory represented by the url will be scanned non-recursively ( content in sub-directories will not be scanned). This means that `gs:// mybucket/` is equivalent to `gs://mybucket/*`, and `gs://mybucket/directory/` is equivalent to `gs://mybucket/directory/*`. Exactly one of `url` or ` regex_file_set
` must be set. Corresponds to the JSON property `url` @return [String]
Public Class Methods
# File lib/google/apis/dlp_v2/classes.rb, line 2423 def initialize(**args) update!(**args) end
Public Instance Methods
Update properties of this object
# File lib/google/apis/dlp_v2/classes.rb, line 2428 def update!(**args) @regex_file_set = args[:regex_file_set] if args.key?(:regex_file_set) @url = args[:url] if args.key?(:url) end