Class: Google::Apis::DlpV2::GooglePrivacyDlpV2FileSet
- Inherits:
-
Object
- Object
- Google::Apis::DlpV2::GooglePrivacyDlpV2FileSet
- Includes:
- Core::Hashable, Core::JsonObjectSupport
- Defined in:
- generated/google/apis/dlp_v2/classes.rb,
generated/google/apis/dlp_v2/representations.rb,
generated/google/apis/dlp_v2/representations.rb
Overview
Set of files to scan.
Instance Attribute Summary collapse
-
#regex_file_set ⇒ Google::Apis::DlpV2::GooglePrivacyDlpV2CloudStorageRegexFileSet
Message representing a set of files in a Cloud Storage bucket.
-
#url ⇒ String
The Cloud Storage url of the file(s) to scan, in the format
gs://<bucket>/<path>
.
Instance Method Summary collapse
-
#initialize(**args) ⇒ GooglePrivacyDlpV2FileSet
constructor
A new instance of GooglePrivacyDlpV2FileSet.
-
#update!(**args) ⇒ Object
Update properties of this object.
Methods included from Core::JsonObjectSupport
Methods included from Core::Hashable
Constructor Details
#initialize(**args) ⇒ GooglePrivacyDlpV2FileSet
Returns a new instance of GooglePrivacyDlpV2FileSet
2316 2317 2318 |
# File 'generated/google/apis/dlp_v2/classes.rb', line 2316 def initialize(**args) update!(**args) end |
Instance Attribute Details
#regex_file_set ⇒ Google::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 includedgs://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 ininclude_regex
)gs://mybucket/directory1/excludedfile
will not be included (the path matches an item inexclude_regex
) Ifinclude_regex
is left empty, it will match all files by default (this is equivalent to settinginclude_regex: [".*"]
). Some other common use cases:bucket_name: "mybucket", exclude_regex: [".*\.pdf"]
will include all files inmybucket
except for .pdf filesbucket_name: "mybucket", include_regex: ["directory/[^/]+"]
will include all files directly undergs://mybucket/directory/
, without matching across/
Corresponds to the JSON propertyregexFileSet
2302 2303 2304 |
# File 'generated/google/apis/dlp_v2/classes.rb', line 2302 def regex_file_set @regex_file_set end |
#url ⇒ String
The Cloud Storage url of the file(s) to scan, in the format
gs://<bucket>/<path>
. 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
2314 2315 2316 |
# File 'generated/google/apis/dlp_v2/classes.rb', line 2314 def url @url end |
Instance Method Details
#update!(**args) ⇒ Object
Update properties of this object
2321 2322 2323 2324 |
# File 'generated/google/apis/dlp_v2/classes.rb', line 2321 def update!(**args) @regex_file_set = args[:regex_file_set] if args.key?(:regex_file_set) @url = args[:url] if args.key?(:url) end |