Class: Google::Cloud::Dlp::V2::CloudStorageRegexFileSet
- Inherits:
-
Object
- Object
- Google::Cloud::Dlp::V2::CloudStorageRegexFileSet
- Extended by:
- Protobuf::MessageExts::ClassMethods
- Includes:
- Protobuf::MessageExts
- Defined in:
- proto_docs/google/privacy/dlp/v2/storage.rb
Overview
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/myfilewill be includedgs://mybucket/directory1/directory2/myfilewill be included (.*matches across/)gs://mybucket/directory0/directory1/myfilewill not be included (the full path doesn't match any items ininclude_regex)gs://mybucket/directory1/excludedfilewill not be included (the path matches an item inexclude_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 inmybucketexcept for .pdf files{bucket_name: "mybucket", include_regex: ["directory/[^/]+"]}will include all files directly undergs://mybucket/directory/, without matching across/
Instance Attribute Summary collapse
-
#bucket_name ⇒ ::String
The name of a Cloud Storage bucket.
-
#exclude_regex ⇒ ::Array<::String>
A list of regular expressions matching file paths to exclude.
-
#include_regex ⇒ ::Array<::String>
A list of regular expressions matching file paths to include.
Instance Attribute Details
#bucket_name ⇒ ::String
407 408 409 410 |
# File 'proto_docs/google/privacy/dlp/v2/storage.rb', line 407 class CloudStorageRegexFileSet include ::Google::Protobuf::MessageExts extend ::Google::Protobuf::MessageExts::ClassMethods end |
#exclude_regex ⇒ ::Array<::String>
407 408 409 410 |
# File 'proto_docs/google/privacy/dlp/v2/storage.rb', line 407 class CloudStorageRegexFileSet include ::Google::Protobuf::MessageExts extend ::Google::Protobuf::MessageExts::ClassMethods end |
#include_regex ⇒ ::Array<::String>
407 408 409 410 |
# File 'proto_docs/google/privacy/dlp/v2/storage.rb', line 407 class CloudStorageRegexFileSet include ::Google::Protobuf::MessageExts extend ::Google::Protobuf::MessageExts::ClassMethods end |