#[non_exhaustive]pub struct AuthorizationPolicy {
pub name: String,
pub description: String,
pub create_time: Option<Timestamp>,
pub update_time: Option<Timestamp>,
pub labels: HashMap<String, String>,
pub action: Action,
pub rules: Vec<Rule>,
/* private fields */
}Expand description
AuthorizationPolicy is a resource that specifies how a server should authorize incoming connections. This resource in itself does not change the configuration unless it’s attached to a target https proxy or endpoint config selector resource.
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: StringRequired. Name of the AuthorizationPolicy resource. It matches pattern
projects/{project}/locations/{location}/authorizationPolicies/<authorization_policy>.
description: StringOptional. Free-text description of the resource.
create_time: Option<Timestamp>Output only. The timestamp when the resource was created.
update_time: Option<Timestamp>Output only. The timestamp when the resource was updated.
labels: HashMap<String, String>Optional. Set of label tags associated with the AuthorizationPolicy resource.
action: ActionRequired. The action to take when a rule match is found. Possible values are “ALLOW” or “DENY”.
rules: Vec<Rule>Optional. List of rules to match. Note that at least one of the rules must match in
order for the action specified in the ‘action’ field to be taken. A rule is
a match if there is a matching source and destination. If left blank, the
action specified in the action field will be applied on every request.
Implementations§
Source§impl AuthorizationPolicy
impl AuthorizationPolicy
pub fn new() -> Self
Sourcepub fn set_description<T: Into<String>>(self, v: T) -> Self
pub fn set_description<T: Into<String>>(self, v: T) -> Self
Sets the value of description.
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.
Sourcepub fn set_labels<T, K, V>(self, v: T) -> Self
pub fn set_labels<T, K, V>(self, v: T) -> Self
Sets the value of labels.
Sourcepub fn set_action<T: Into<Action>>(self, v: T) -> Self
pub fn set_action<T: Into<Action>>(self, v: T) -> Self
Sets the value of action.
Trait Implementations§
Source§impl Clone for AuthorizationPolicy
impl Clone for AuthorizationPolicy
Source§fn clone(&self) -> AuthorizationPolicy
fn clone(&self) -> AuthorizationPolicy
1.0.0 · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
source. Read more