pub struct CredentialAccessBoundaryGrant { /* private fields */ }Expand description
A typed, bound Google Cloud Storage Credential Access Boundary.
Use CredentialAccessBoundaryGrant::for_bucket for bucket-wide access or
CredentialAccessBoundaryGrant::for_object_prefix for a non-empty object
prefix. Prefix grants generate the CEL expression internally, including the
objectListPrefix check required for safely listing objects. Bucket and
prefix values are never normalized.
Additional rules can be added explicitly. Google evaluates CAB rules as a union and allows at most ten rules.
Implementations§
Source§impl CredentialAccessBoundaryGrant
impl CredentialAccessBoundaryGrant
Sourcepub fn for_bucket(
bucket: impl Into<String>,
permissions: CredentialAccessBoundaryPermissions,
) -> Self
pub fn for_bucket( bucket: impl Into<String>, permissions: CredentialAccessBoundaryPermissions, ) -> Self
Create a bucket-wide Credential Access Boundary.
Sourcepub fn for_object_prefix(
bucket: impl Into<String>,
object_prefix: impl Into<String>,
permissions: CredentialAccessBoundaryPermissions,
) -> Self
pub fn for_object_prefix( bucket: impl Into<String>, object_prefix: impl Into<String>, permissions: CredentialAccessBoundaryPermissions, ) -> Self
Create a Credential Access Boundary for a non-empty object prefix.
Prefix matching preserves the exact Unicode string. For directory-like
semantics, include the trailing / explicitly.
Sourcepub fn with_bucket_rule(
self,
bucket: impl Into<String>,
permissions: CredentialAccessBoundaryPermissions,
) -> Self
pub fn with_bucket_rule( self, bucket: impl Into<String>, permissions: CredentialAccessBoundaryPermissions, ) -> Self
Add another bucket-wide rule.
All rules are evaluated as a union.
Sourcepub fn with_object_prefix_rule(
self,
bucket: impl Into<String>,
object_prefix: impl Into<String>,
permissions: CredentialAccessBoundaryPermissions,
) -> Self
pub fn with_object_prefix_rule( self, bucket: impl Into<String>, object_prefix: impl Into<String>, permissions: CredentialAccessBoundaryPermissions, ) -> Self
Add another non-empty object-prefix rule.
All rules are evaluated as a union.
Trait Implementations§
Source§impl Clone for CredentialAccessBoundaryGrant
impl Clone for CredentialAccessBoundaryGrant
Source§fn clone(&self) -> CredentialAccessBoundaryGrant
fn clone(&self) -> CredentialAccessBoundaryGrant
1.0.0 (const: unstable) · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
source. Read more