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: i32,
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>,
}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.
id: Option<String>Server-assigned unique identifier for the policy.
on_securable_type: StringThe type of securable the policy is defined on.
Supported values: catalogs, schemas, tables.
on_securable_fullname: StringThe fully qualified name of the securable the policy is defined on.
policy_type: i32The kind of enforcement this policy applies.
to_principals: Vec<String>The principals the policy applies to. Empty means “all principals”.
except_principals: Vec<String>The principals explicitly excluded from the policy, even if matched by to_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.
match_columns: Vec<MatchColumn>The columns referenced by the row-filter or column-mask function, and the aliases they are bound to.
comment: Option<String>User-provided free-form text description of the policy.
created_at: Option<i64>Time at which this policy was created, in epoch milliseconds.
updated_at: Option<i64>Time at which this policy was last updated, in epoch milliseconds.
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
Sourcepub fn policy_type(&self) -> PolicyType
pub fn policy_type(&self) -> PolicyType
Returns the enum value of policy_type, or the default if the field is set to an invalid enum value.
Sourcepub fn set_policy_type(&mut self, value: PolicyType)
pub fn set_policy_type(&mut self, value: PolicyType)
Sets policy_type to the provided enum value.
Sourcepub fn when_condition(&self) -> &str
pub fn when_condition(&self) -> &str
Returns the value of when_condition, or the default value if when_condition is unset.
Sourcepub fn comment(&self) -> &str
pub fn comment(&self) -> &str
Returns the value of comment, or the default value if comment is unset.
Sourcepub fn created_at(&self) -> i64
pub fn created_at(&self) -> i64
Returns the value of created_at, or the default value if created_at is unset.
Sourcepub fn updated_at(&self) -> i64
pub fn updated_at(&self) -> i64
Returns the value of updated_at, or the default value if updated_at is unset.
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
§impl<'de> Deserialize<'de> for PolicyInfo
impl<'de> Deserialize<'de> for PolicyInfo
§fn deserialize<D>(deserializer: D) -> Result<Self, D::Error>where
D: Deserializer<'de>,
fn deserialize<D>(deserializer: D) -> Result<Self, D::Error>where
D: Deserializer<'de>,
Source§impl From<PolicyInfo> for Resource
impl From<PolicyInfo> for Resource
Source§fn from(v: PolicyInfo) -> Self
fn from(v: PolicyInfo) -> Self
Source§impl Message for PolicyInfo
impl Message for PolicyInfo
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.