#[non_exhaustive]pub struct Policy {
pub name: String,
pub uid: String,
pub kind: String,
pub display_name: String,
pub annotations: HashMap<String, String>,
pub etag: String,
pub create_time: Option<Timestamp>,
pub update_time: Option<Timestamp>,
pub delete_time: Option<Timestamp>,
pub rules: Vec<PolicyRule>,
pub managing_authority: String,
}Expand description
Data for an IAM policy.
Fields (Non-exhaustive)§
This struct is marked as non-exhaustive
Struct { .. } syntax; cannot be matched against without a wildcard ..; and struct update syntax will not work.name: StringImmutable. 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: StringImmutable. The globally unique ID of the Policy. Assigned automatically when the
Policy is created.
kind: StringOutput only. The kind of the Policy. Always contains the value DenyPolicy.
display_name: StringA user-specified description of the Policy. This value can be up to 63
characters.
annotations: HashMap<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: StringAn 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.
Immutable. Specifies that this policy is managed by an authority and can only be modified by that authority. Usage is restricted.
Implementations§
Source§impl Policy
impl Policy
Sourcepub fn set_display_name<T: Into<String>>(self, v: T) -> Self
pub fn set_display_name<T: Into<String>>(self, v: T) -> Self
Sets the value of display_name.
Sourcepub fn set_create_time<T: Into<Option<Timestamp>>>(self, v: T) -> Self
pub fn set_create_time<T: Into<Option<Timestamp>>>(self, v: T) -> Self
Sets the value of create_time.
Sourcepub fn set_update_time<T: Into<Option<Timestamp>>>(self, v: T) -> Self
pub fn set_update_time<T: Into<Option<Timestamp>>>(self, v: T) -> Self
Sets the value of update_time.
Sourcepub fn set_delete_time<T: Into<Option<Timestamp>>>(self, v: T) -> Self
pub fn set_delete_time<T: Into<Option<Timestamp>>>(self, v: T) -> Self
Sets the value of delete_time.
Sets the value of managing_authority.
Sourcepub fn set_annotations<T, K, V>(self, v: T) -> Self
pub fn set_annotations<T, K, V>(self, v: T) -> Self
Sets the value of annotations.