Struct google_api_proto::google::privacy::dlp::v2::CloudStorageRegexFileSet
source · pub struct CloudStorageRegexFileSet {
pub bucket_name: String,
pub include_regex: Vec<String>,
pub exclude_regex: Vec<String>,
}
Expand description
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
)
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 inmybucket
except for .pdf files{bucket_name: "mybucket", include_regex: \["directory/[^/\]+"]}
will include all files directly undergs://mybucket/directory/
, without matching across/
Fields§
§bucket_name: String
The name of a Cloud Storage bucket. Required.
include_regex: Vec<String>
A list of regular expressions matching file paths to include. All files in
the bucket that match at least one of these regular expressions will be
included in the set of files, except for those that also match an item in
exclude_regex
. Leaving this field empty will match all files by default
(this is equivalent to including .*
in the list).
Regular expressions use RE2 syntax; a guide can be found under the google/re2 repository on GitHub.
exclude_regex: Vec<String>
A list of regular expressions matching file paths to exclude. All files in the bucket that match at least one of these regular expressions will be excluded from the scan.
Regular expressions use RE2 syntax; a guide can be found under the google/re2 repository on GitHub.
Trait Implementations§
source§impl Clone for CloudStorageRegexFileSet
impl Clone for CloudStorageRegexFileSet
source§fn clone(&self) -> CloudStorageRegexFileSet
fn clone(&self) -> CloudStorageRegexFileSet
1.0.0 · source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
source
. Read moresource§impl Debug for CloudStorageRegexFileSet
impl Debug for CloudStorageRegexFileSet
source§impl Default for CloudStorageRegexFileSet
impl Default for CloudStorageRegexFileSet
source§impl Message for CloudStorageRegexFileSet
impl Message for CloudStorageRegexFileSet
source§fn encoded_len(&self) -> usize
fn encoded_len(&self) -> usize
source§fn encode(&self, buf: &mut impl BufMut) -> Result<(), EncodeError>where
Self: Sized,
fn encode(&self, buf: &mut impl BufMut) -> Result<(), EncodeError>where
Self: Sized,
source§fn encode_to_vec(&self) -> Vec<u8>where
Self: Sized,
fn encode_to_vec(&self) -> Vec<u8>where
Self: Sized,
source§fn encode_length_delimited(
&self,
buf: &mut impl BufMut,
) -> Result<(), EncodeError>where
Self: Sized,
fn encode_length_delimited(
&self,
buf: &mut impl BufMut,
) -> Result<(), EncodeError>where
Self: Sized,
source§fn encode_length_delimited_to_vec(&self) -> Vec<u8>where
Self: Sized,
fn encode_length_delimited_to_vec(&self) -> Vec<u8>where
Self: Sized,
source§fn decode(buf: impl Buf) -> Result<Self, DecodeError>where
Self: Default,
fn decode(buf: impl Buf) -> Result<Self, DecodeError>where
Self: Default,
source§fn decode_length_delimited(buf: impl Buf) -> Result<Self, DecodeError>where
Self: Default,
fn decode_length_delimited(buf: impl Buf) -> Result<Self, DecodeError>where
Self: Default,
source§fn merge(&mut self, buf: impl Buf) -> Result<(), DecodeError>where
Self: Sized,
fn merge(&mut self, buf: impl Buf) -> Result<(), DecodeError>where
Self: Sized,
self
. Read moresource§fn merge_length_delimited(&mut self, buf: impl Buf) -> Result<(), DecodeError>where
Self: Sized,
fn merge_length_delimited(&mut self, buf: impl Buf) -> Result<(), DecodeError>where
Self: Sized,
self
.source§impl PartialEq for CloudStorageRegexFileSet
impl PartialEq for CloudStorageRegexFileSet
source§fn eq(&self, other: &CloudStorageRegexFileSet) -> bool
fn eq(&self, other: &CloudStorageRegexFileSet) -> bool
self
and other
values to be equal, and is used
by ==
.impl StructuralPartialEq for CloudStorageRegexFileSet
Auto Trait Implementations§
impl Freeze for CloudStorageRegexFileSet
impl RefUnwindSafe for CloudStorageRegexFileSet
impl Send for CloudStorageRegexFileSet
impl Sync for CloudStorageRegexFileSet
impl Unpin for CloudStorageRegexFileSet
impl UnwindSafe for CloudStorageRegexFileSet
Blanket Implementations§
source§impl<T> BorrowMut<T> for Twhere
T: ?Sized,
impl<T> BorrowMut<T> for Twhere
T: ?Sized,
source§fn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
§impl<T> Instrument for T
impl<T> Instrument for T
§fn instrument(self, span: Span) -> Instrumented<Self>
fn instrument(self, span: Span) -> Instrumented<Self>
§fn in_current_span(self) -> Instrumented<Self>
fn in_current_span(self) -> Instrumented<Self>
source§impl<T> IntoRequest<T> for T
impl<T> IntoRequest<T> for T
source§fn into_request(self) -> Request<T>
fn into_request(self) -> Request<T>
T
in a tonic::Request