pub struct Policy {
pub name: String,
pub uid: String,
pub kind: String,
pub display_name: String,
pub annotations: BTreeMap<String, String>,
pub etag: String,
pub create_time: Option<Timestamp>,
pub update_time: Option<Timestamp>,
pub delete_time: Option<Timestamp>,
pub rules: Vec<PolicyRule>,
}
Expand description
Data for an IAM policy.
Fields§
§name: String
Immutable. The resource name of the Policy
, which must be unique. Format:
policies/{attachment_point}/denypolicies/{policy_id}
The attachment point is identified by its URL-encoded full resource name,
which means that the forward-slash character, /
, must be written as
%2F
. For example,
policies/cloudresourcemanager.googleapis.com%2Fprojects%2Fmy-project/denypolicies/my-deny-policy
.
For organizations and folders, use the numeric ID in the full resource name. For projects, requests can use the alphanumeric or the numeric ID. Responses always contain the numeric ID.
uid: String
Immutable. The globally unique ID of the Policy
. Assigned automatically when the
Policy
is created.
kind: String
Output only. The kind of the Policy
. Always contains the value DenyPolicy
.
display_name: String
A user-specified description of the Policy
. This value can be up to 63
characters.
annotations: BTreeMap<String, String>
A key-value map to store arbitrary metadata for the Policy
. Keys
can be up to 63 characters. Values can be up to 255 characters.
etag: String
An opaque tag that identifies the current version of the Policy
. IAM uses
this value to help manage concurrent updates, so they do not cause one
update to be overwritten by another.
If this field is present in a [CreatePolicy][] request, the value is ignored.
create_time: Option<Timestamp>
Output only. The time when the Policy
was created.
update_time: Option<Timestamp>
Output only. The time when the Policy
was last updated.
delete_time: Option<Timestamp>
Output only. The time when the Policy
was deleted. Empty if the policy is not deleted.
rules: Vec<PolicyRule>
A list of rules that specify the behavior of the Policy
. All of the rules
should be of the kind
specified in the Policy
.
Trait Implementations§
source§impl Message for Policy
impl Message for Policy
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 Policy
impl PartialEq for Policy
impl StructuralPartialEq for Policy
Auto Trait Implementations§
impl Freeze for Policy
impl RefUnwindSafe for Policy
impl Send for Policy
impl Sync for Policy
impl Unpin for Policy
impl UnwindSafe for Policy
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