Struct google_api_proto::google::cloud::policytroubleshooter::v1::BindingExplanation
source · pub struct BindingExplanation {
pub access: i32,
pub role: String,
pub role_permission: i32,
pub role_permission_relevance: i32,
pub memberships: BTreeMap<String, AnnotatedMembership>,
pub relevance: i32,
pub condition: Option<Expr>,
}
Expand description
Details about how a binding in a policy affects a principal’s ability to use a permission.
Fields§
§access: i32
Required. Indicates whether this binding provides the specified permission to the specified principal for the specified resource.
This field does not indicate whether the principal actually has the
permission for the resource. There might be another binding that overrides
this binding. To determine whether the principal actually has the
permission, use the access
field in the
[TroubleshootIamPolicyResponse][IamChecker.TroubleshootIamPolicyResponse].
role: String
The role that this binding grants. For example,
roles/compute.serviceAgent
.
For a complete list of predefined IAM roles, as well as the permissions in each role, see https://cloud.google.com/iam/help/roles/reference.
role_permission: i32
Indicates whether the role granted by this binding contains the specified permission.
role_permission_relevance: i32
The relevance of the permission’s existence, or nonexistence, in the role to the overall determination for the entire policy.
memberships: BTreeMap<String, AnnotatedMembership>
Indicates whether each principal in the binding includes the principal specified in the request, either directly or indirectly. Each key identifies a principal in the binding, and each value indicates whether the principal in the binding includes the principal in the request.
For example, suppose that a binding includes the following principals:
user:alice@example.com
group:product-eng@example.com
You want to troubleshoot access for user:bob@example.com
. This user is a
principal of the group group:product-eng@example.com
.
For the first principal in the binding, the key is
user:alice@example.com
, and the membership
field in the value is set to
MEMBERSHIP_NOT_INCLUDED
.
For the second principal in the binding, the key is
group:product-eng@example.com
, and the membership
field in the value is
set to MEMBERSHIP_INCLUDED
.
relevance: i32
The relevance of this binding to the overall determination for the entire policy.
condition: Option<Expr>
A condition expression that prevents this binding from granting access
unless the expression evaluates to true
.
To learn about IAM Conditions, see https://cloud.google.com/iam/help/conditions/overview.
Implementations§
source§impl BindingExplanation
impl BindingExplanation
sourcepub fn access(&self) -> AccessState
pub fn access(&self) -> AccessState
Returns the enum value of access
, or the default if the field is set to an invalid enum value.
sourcepub fn set_access(&mut self, value: AccessState)
pub fn set_access(&mut self, value: AccessState)
Sets access
to the provided enum value.
sourcepub fn role_permission(&self) -> RolePermission
pub fn role_permission(&self) -> RolePermission
Returns the enum value of role_permission
, or the default if the field is set to an invalid enum value.
sourcepub fn set_role_permission(&mut self, value: RolePermission)
pub fn set_role_permission(&mut self, value: RolePermission)
Sets role_permission
to the provided enum value.
sourcepub fn role_permission_relevance(&self) -> HeuristicRelevance
pub fn role_permission_relevance(&self) -> HeuristicRelevance
Returns the enum value of role_permission_relevance
, or the default if the field is set to an invalid enum value.
sourcepub fn set_role_permission_relevance(&mut self, value: HeuristicRelevance)
pub fn set_role_permission_relevance(&mut self, value: HeuristicRelevance)
Sets role_permission_relevance
to the provided enum value.
sourcepub fn relevance(&self) -> HeuristicRelevance
pub fn relevance(&self) -> HeuristicRelevance
Returns the enum value of relevance
, or the default if the field is set to an invalid enum value.
sourcepub fn set_relevance(&mut self, value: HeuristicRelevance)
pub fn set_relevance(&mut self, value: HeuristicRelevance)
Sets relevance
to the provided enum value.
Trait Implementations§
source§impl Clone for BindingExplanation
impl Clone for BindingExplanation
source§fn clone(&self) -> BindingExplanation
fn clone(&self) -> BindingExplanation
1.0.0 · source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
source
. Read moresource§impl Debug for BindingExplanation
impl Debug for BindingExplanation
source§impl Default for BindingExplanation
impl Default for BindingExplanation
source§impl Message for BindingExplanation
impl Message for BindingExplanation
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 BindingExplanation
impl PartialEq for BindingExplanation
source§fn eq(&self, other: &BindingExplanation) -> bool
fn eq(&self, other: &BindingExplanation) -> bool
self
and other
values to be equal, and is used
by ==
.impl StructuralPartialEq for BindingExplanation
Auto Trait Implementations§
impl Freeze for BindingExplanation
impl RefUnwindSafe for BindingExplanation
impl Send for BindingExplanation
impl Sync for BindingExplanation
impl Unpin for BindingExplanation
impl UnwindSafe for BindingExplanation
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