Class: Google::Apis::DlpV2::GooglePrivacyDlpV2FileSet

Inherits:
Object
  • Object
show all
Includes:
Core::Hashable, Core::JsonObjectSupport
Defined in:
lib/google/apis/dlp_v2/classes.rb,
lib/google/apis/dlp_v2/representations.rb,
lib/google/apis/dlp_v2/representations.rb

Overview

Set of files to scan.

Instance Attribute Summary collapse

Instance Method Summary collapse

Constructor Details

#initialize(**args) ⇒ GooglePrivacyDlpV2FileSet

Returns a new instance of GooglePrivacyDlpV2FileSet.



4437
4438
4439
# File 'lib/google/apis/dlp_v2/classes.rb', line 4437

def initialize(**args)
   update!(**args)
end

Instance Attribute Details

#regex_file_setGoogle::Apis::DlpV2::GooglePrivacyDlpV2CloudStorageRegexFileSet

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



4424
4425
4426
# File 'lib/google/apis/dlp_v2/classes.rb', line 4424

def regex_file_set
  @regex_file_set
end

#urlString

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

Returns:

  • (String)


4435
4436
4437
# File 'lib/google/apis/dlp_v2/classes.rb', line 4435

def url
  @url
end

Instance Method Details

#update!(**args) ⇒ Object

Update properties of this object



4442
4443
4444
4445
# File 'lib/google/apis/dlp_v2/classes.rb', line 4442

def update!(**args)
  @regex_file_set = args[:regex_file_set] if args.key?(:regex_file_set)
  @url = args[:url] if args.key?(:url)
end