pub struct PolicyInfo {Show 13 fields
pub name: String,
pub id: Option<String>,
pub on_securable_type: String,
pub on_securable_fullname: String,
pub policy_type: EnumValue<PolicyType>,
pub to_principals: Vec<String>,
pub except_principals: Vec<String>,
pub when_condition: Option<String>,
pub match_columns: Vec<MatchColumn>,
pub comment: Option<String>,
pub created_at: Option<i64>,
pub updated_at: Option<i64>,
pub function: Option<Function>,
/* private fields */
}Expand description
A row-filter or column-mask policy bound to principals and scoped to a securable.
Policies are read as whole documents; enforcement is performed by the query engine,
not by this service. when_condition is stored and returned opaque — this service does
not parse or evaluate it.
Fields§
§name: StringThe name of the policy. Unique within the securable it is defined on.
Field 1: name
id: Option<String>Server-assigned unique identifier for the policy.
Field 2: id
on_securable_type: StringThe type of securable the policy is defined on.
Supported values: catalogs, schemas, tables.
Field 3: on_securable_type
on_securable_fullname: StringThe fully qualified name of the securable the policy is defined on.
Field 4: on_securable_fullname
policy_type: EnumValue<PolicyType>The kind of enforcement this policy applies.
Field 5: policy_type
to_principals: Vec<String>The principals the policy applies to. Empty means “all principals”.
Field 6: to_principals
except_principals: Vec<String>The principals explicitly excluded from the policy, even if matched by to_principals.
Field 7: except_principals
when_condition: Option<String>An opaque condition expression, e.g. “hasTagValue(‘env’,‘prod’)”, evaluated by the query engine at enforcement time. Stored and returned as-is; not parsed server-side.
Field 8: when_condition
match_columns: Vec<MatchColumn>The columns referenced by the row-filter or column-mask function, and the aliases they are bound to.
Field 9: match_columns
comment: Option<String>User-provided free-form text description of the policy.
Field 12: comment
created_at: Option<i64>Time at which this policy was created, in epoch milliseconds.
Field 13: created_at
updated_at: Option<i64>Time at which this policy was last updated, in epoch milliseconds.
Field 14: updated_at
function: Option<Function>Implementations§
Source§impl PolicyInfo
impl PolicyInfo
Sourcepub fn qualified_name(&self) -> String
pub fn qualified_name(&self) -> String
Returns the fully-qualified dot-separated name computed from component fields.
Source§impl PolicyInfo
impl PolicyInfo
Source§impl PolicyInfo
impl PolicyInfo
Sourcepub fn with_id(self, value: impl Into<String>) -> Self
pub fn with_id(self, value: impl Into<String>) -> Self
Sets Self::id to Some(value), consuming and returning self.
Sourcepub fn with_when_condition(self, value: impl Into<String>) -> Self
pub fn with_when_condition(self, value: impl Into<String>) -> Self
Sets Self::when_condition to Some(value), consuming and returning self.
Sourcepub fn with_comment(self, value: impl Into<String>) -> Self
pub fn with_comment(self, value: impl Into<String>) -> Self
Sets Self::comment to Some(value), consuming and returning self.
Sourcepub fn with_created_at(self, value: i64) -> Self
pub fn with_created_at(self, value: i64) -> Self
Sets Self::created_at to Some(value), consuming and returning self.
Sourcepub fn with_updated_at(self, value: i64) -> Self
pub fn with_updated_at(self, value: i64) -> Self
Sets Self::updated_at to Some(value), consuming and returning self.
Trait Implementations§
Source§impl Clone for PolicyInfo
impl Clone for PolicyInfo
Source§fn clone(&self) -> PolicyInfo
fn clone(&self) -> PolicyInfo
1.0.0 (const: unstable) · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
source. Read moreSource§impl Debug for PolicyInfo
impl Debug for PolicyInfo
Source§impl Default for PolicyInfo
impl Default for PolicyInfo
Source§fn default() -> PolicyInfo
fn default() -> PolicyInfo
Source§impl DefaultInstance for PolicyInfo
impl DefaultInstance for PolicyInfo
Source§fn default_instance() -> &'static Self
fn default_instance() -> &'static Self
Source§impl<'de> Deserialize<'de> for PolicyInfo
impl<'de> Deserialize<'de> for PolicyInfo
Source§fn deserialize<D: Deserializer<'de>>(d: D) -> Result<Self, D::Error>
fn deserialize<D: Deserializer<'de>>(d: D) -> Result<Self, D::Error>
Source§impl ExtensionSet for PolicyInfo
impl ExtensionSet for PolicyInfo
Source§const PROTO_FQN: &'static str = "unitycatalog.policies.v1.PolicyInfo"
const PROTO_FQN: &'static str = "unitycatalog.policies.v1.PolicyInfo"
"google.protobuf.FieldOptions". Read moreSource§fn unknown_fields(&self) -> &UnknownFields
fn unknown_fields(&self) -> &UnknownFields
Source§fn unknown_fields_mut(&mut self) -> &mut UnknownFields
fn unknown_fields_mut(&mut self) -> &mut UnknownFields
Source§fn extension<C>(&self, ext: &Extension<C>) -> <C as ExtensionCodec>::Outputwhere
C: ExtensionCodec,
fn extension<C>(&self, ext: &Extension<C>) -> <C as ExtensionCodec>::Outputwhere
C: ExtensionCodec,
Source§fn set_extension<C>(
&mut self,
ext: &Extension<C>,
value: <C as ExtensionCodec>::Value,
)where
C: ExtensionCodec,
fn set_extension<C>(
&mut self,
ext: &Extension<C>,
value: <C as ExtensionCodec>::Value,
)where
C: ExtensionCodec,
Source§fn has_extension<C>(&self, ext: &Extension<C>) -> boolwhere
C: ExtensionCodec,
fn has_extension<C>(&self, ext: &Extension<C>) -> boolwhere
C: ExtensionCodec,
true if any record at the extension’s field number is present. Read moreSource§fn clear_extension<C>(&mut self, ext: &Extension<C>)where
C: ExtensionCodec,
fn clear_extension<C>(&mut self, ext: &Extension<C>)where
C: ExtensionCodec,
Source§fn extension_or_default<C>(
&self,
ext: &Extension<C>,
) -> <C as ExtensionCodec>::Valuewhere
C: ExtensionCodec<Output = Option<<C as ExtensionCodec>::Value>>,
<C as ExtensionCodec>::Value: Default,
fn extension_or_default<C>(
&self,
ext: &Extension<C>,
) -> <C as ExtensionCodec>::Valuewhere
C: ExtensionCodec<Output = Option<<C as ExtensionCodec>::Value>>,
<C as ExtensionCodec>::Value: Default,
[default = ...]
value if absent, or the type’s Default if no proto default was declared. Read moreSource§impl From<PolicyInfo> for Resource
impl From<PolicyInfo> for Resource
Source§fn from(v: PolicyInfo) -> Self
fn from(v: PolicyInfo) -> Self
Source§impl HasMessageView for PolicyInfo
impl HasMessageView for PolicyInfo
Source§type View<'a> = PolicyInfoView<'a>
type View<'a> = PolicyInfoView<'a>
Self, borrowing from a buffer with lifetime
'a.Source§type ViewHandle = PolicyInfoOwnedView
type ViewHandle = PolicyInfoOwnedView
'static owned-view handle for Self
(FooOwnedView).Source§fn decode_view_handle(bytes: Bytes) -> Result<Self::ViewHandle, DecodeError>
fn decode_view_handle(bytes: Bytes) -> Result<Self::ViewHandle, DecodeError>
Source§fn decode_view_handle_with_options(
bytes: Bytes,
opts: &DecodeOptions,
) -> Result<Self::ViewHandle, DecodeError>
fn decode_view_handle_with_options( bytes: Bytes, opts: &DecodeOptions, ) -> Result<Self::ViewHandle, DecodeError>
Source§impl Message for PolicyInfo
impl Message for PolicyInfo
Source§fn compute_size(&self, __cache: &mut SizeCache) -> u32
fn compute_size(&self, __cache: &mut SizeCache) -> u32
Returns the total encoded size in bytes.
The result is a u32; the protobuf specification requires all
messages to fit within 2 GiB (2,147,483,647 bytes), so a
compliant message will never overflow this type.
Source§fn write_to(&self, __cache: &mut SizeCache, buf: &mut impl BufMut)
fn write_to(&self, __cache: &mut SizeCache, buf: &mut impl BufMut)
cache (populated by a prior
compute_size call on the same cache). Read moreSource§fn merge_field(
&mut self,
tag: Tag,
buf: &mut impl Buf,
depth: u32,
) -> Result<(), DecodeError>
fn merge_field( &mut self, tag: Tag, buf: &mut impl Buf, depth: u32, ) -> Result<(), DecodeError>
buf. Read moreSource§fn encode(&self, buf: &mut impl BufMut)
fn encode(&self, buf: &mut impl BufMut)
Source§fn encode_with_cache(&self, cache: &mut SizeCache, buf: &mut impl BufMut)
fn encode_with_cache(&self, cache: &mut SizeCache, buf: &mut impl BufMut)
SizeCache, for
reuse across many encodes in a hot loop. Clears the cache first.Source§fn encoded_len(&self) -> u32
fn encoded_len(&self) -> u32
Source§fn encode_length_delimited(&self, buf: &mut impl BufMut)
fn encode_length_delimited(&self, buf: &mut impl BufMut)
Source§fn encode_to_bytes(&self) -> Bytes
fn encode_to_bytes(&self) -> Bytes
bytes::Bytes. Read moreSource§fn decode(buf: &mut impl Buf) -> Result<Self, DecodeError>where
Self: Sized,
fn decode(buf: &mut impl Buf) -> Result<Self, DecodeError>where
Self: Sized,
Source§fn decode_from_slice(data: &[u8]) -> Result<Self, DecodeError>where
Self: Sized,
fn decode_from_slice(data: &[u8]) -> Result<Self, DecodeError>where
Self: Sized,
Source§fn decode_length_delimited(buf: &mut impl Buf) -> Result<Self, DecodeError>where
Self: Sized,
fn decode_length_delimited(buf: &mut impl Buf) -> Result<Self, DecodeError>where
Self: Sized,
Source§fn merge_to_limit(
&mut self,
buf: &mut impl Buf,
depth: u32,
limit: usize,
) -> Result<(), DecodeError>
fn merge_to_limit( &mut self, buf: &mut impl Buf, depth: u32, limit: usize, ) -> Result<(), DecodeError>
Source§fn merge_group(
&mut self,
buf: &mut impl Buf,
depth: u32,
field_number: u32,
) -> Result<(), DecodeError>
fn merge_group( &mut self, buf: &mut impl Buf, depth: u32, field_number: u32, ) -> Result<(), DecodeError>
buf, reading fields until an
EndGroup tag with the given field_number is encountered. Read moreSource§fn merge(&mut self, buf: &mut impl Buf, depth: u32) -> Result<(), DecodeError>
fn merge(&mut self, buf: &mut impl Buf, depth: u32) -> Result<(), DecodeError>
Source§fn merge_from_slice(&mut self, data: &[u8]) -> Result<(), DecodeError>
fn merge_from_slice(&mut self, data: &[u8]) -> Result<(), DecodeError>
Source§fn merge_length_delimited(
&mut self,
buf: &mut impl Buf,
depth: u32,
) -> Result<(), DecodeError>
fn merge_length_delimited( &mut self, buf: &mut impl Buf, depth: u32, ) -> Result<(), DecodeError>
Source§impl MessageName for PolicyInfo
impl MessageName for PolicyInfo
Source§const PACKAGE: &'static str = "unitycatalog.policies.v1"
const PACKAGE: &'static str = "unitycatalog.policies.v1"
Source§const NAME: &'static str = "PolicyInfo"
const NAME: &'static str = "PolicyInfo"
. between nesting levels. Read more