#[non_exhaustive]pub struct AccessPolicy {
pub name: String,
pub parent: String,
pub title: String,
pub scopes: Vec<String>,
pub create_time: Option<Timestamp>,
pub update_time: Option<Timestamp>,
pub etag: String,
/* private fields */
}Expand description
AccessPolicy is a container for AccessLevels (which define the necessary
attributes to use Google Cloud services) and ServicePerimeters (which
define regions of services able to freely pass data within a perimeter). An
access policy is globally visible within an organization, and the
restrictions it specifies apply to all projects within an organization.
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: StringOutput only. Resource name of the AccessPolicy. Format:
accessPolicies/{access_policy}
parent: StringRequired. The parent of this AccessPolicy in the Cloud Resource
Hierarchy. Currently immutable once created. Format:
organizations/{organization_id}
title: StringRequired. Human readable title. Does not affect behavior.
scopes: Vec<String>The scopes of a policy define which resources an ACM policy can restrict, and where ACM resources can be referenced. For example, a policy with scopes=[“folders/123”] has the following behavior:
- vpcsc perimeters can only restrict projects within folders/123
- access levels can only be referenced by resources within folders/123.
If empty, there are no limitations on which resources can be restricted by
an ACM policy, and there are no limitations on where ACM resources can be
referenced.
Only one policy can include a given scope (attempting to create a second
policy which includes “folders/123” will result in an error).
Currently, scopes cannot be modified after a policy is created.
Currently, policies can only have a single scope.
Format: list of
folders/{folder_number}orprojects/{project_number}
create_time: Option<Timestamp>Output only. Time the AccessPolicy was created in UTC.
update_time: Option<Timestamp>Output only. Time the AccessPolicy was updated in UTC.
etag: StringOutput only. An opaque identifier for the current version of the
AccessPolicy. This will always be a strongly validated etag, meaning that
two Access Polices will be identical if and only if their etags are
identical. Clients should not expect this to be in any specific format.
Implementations§
Source§impl AccessPolicy
impl AccessPolicy
pub fn new() -> Self
Sourcepub fn set_parent<T: Into<String>>(self, v: T) -> Self
pub fn set_parent<T: Into<String>>(self, v: T) -> Self
Sets the value of parent.
Sourcepub fn set_scopes<T, V>(self, v: T) -> Self
pub fn set_scopes<T, V>(self, v: T) -> Self
Sets the value of scopes.
Sourcepub fn set_create_time<T>(self, v: T) -> Self
pub fn set_create_time<T>(self, v: T) -> Self
Sets the value of create_time.
Sourcepub fn set_or_clear_create_time<T>(self, v: Option<T>) -> Self
pub fn set_or_clear_create_time<T>(self, v: Option<T>) -> Self
Sets or clears the value of create_time.
Sourcepub fn set_update_time<T>(self, v: T) -> Self
pub fn set_update_time<T>(self, v: T) -> Self
Sets the value of update_time.
Sourcepub fn set_or_clear_update_time<T>(self, v: Option<T>) -> Self
pub fn set_or_clear_update_time<T>(self, v: Option<T>) -> Self
Sets or clears the value of update_time.
Trait Implementations§
Source§impl Clone for AccessPolicy
impl Clone for AccessPolicy
Source§fn clone(&self) -> AccessPolicy
fn clone(&self) -> AccessPolicy
1.0.0 · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
source. Read more