#[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
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.
§Example
let x = AuthorizationPolicy::new().set_description("example");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.
§Example
use wkt::Timestamp;
let x = AuthorizationPolicy::new().set_create_time(Timestamp::default()/* use setters */);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.
§Example
use wkt::Timestamp;
let x = AuthorizationPolicy::new().set_or_clear_create_time(Some(Timestamp::default()/* use setters */));
let x = AuthorizationPolicy::new().set_or_clear_create_time(None::<Timestamp>);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.
§Example
use wkt::Timestamp;
let x = AuthorizationPolicy::new().set_update_time(Timestamp::default()/* use setters */);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.
§Example
use wkt::Timestamp;
let x = AuthorizationPolicy::new().set_or_clear_update_time(Some(Timestamp::default()/* use setters */));
let x = AuthorizationPolicy::new().set_or_clear_update_time(None::<Timestamp>);Sourcepub fn set_labels<T, K, V>(self, v: T) -> Self
pub fn set_labels<T, K, V>(self, v: T) -> Self
Sourcepub fn set_action<T: Into<Action>>(self, v: T) -> Self
pub fn set_action<T: Into<Action>>(self, v: T) -> Self
Trait Implementations§
Source§impl Clone for AuthorizationPolicy
impl Clone for AuthorizationPolicy
Source§fn clone(&self) -> AuthorizationPolicy
fn clone(&self) -> AuthorizationPolicy
1.0.0 (const: unstable) · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
source. Read moreSource§impl Debug for AuthorizationPolicy
impl Debug for AuthorizationPolicy
Source§impl Default for AuthorizationPolicy
impl Default for AuthorizationPolicy
Source§fn default() -> AuthorizationPolicy
fn default() -> AuthorizationPolicy
Source§impl Message for AuthorizationPolicy
impl Message for AuthorizationPolicy
Source§impl PartialEq for AuthorizationPolicy
impl PartialEq for AuthorizationPolicy
impl StructuralPartialEq for AuthorizationPolicy
Auto Trait Implementations§
impl Freeze for AuthorizationPolicy
impl RefUnwindSafe for AuthorizationPolicy
impl Send for AuthorizationPolicy
impl Sync for AuthorizationPolicy
impl Unpin for AuthorizationPolicy
impl UnsafeUnpin for AuthorizationPolicy
impl UnwindSafe for AuthorizationPolicy
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<ST, DT> CastableFrom<ST, Initialized, Initialized> for DT
impl<ST, DT> CastableFrom<ST, Uninit, Uninit> for DT
Source§impl<T> CloneToUninit for Twhere
T: Clone,
impl<T> CloneToUninit for Twhere
T: Clone,
impl<T> DeserializeOwned for Twhere
T: for<'de> Deserialize<'de>,
Source§impl<T> FutureExt for T
impl<T> FutureExt for T
Source§fn with_context(self, otel_cx: Context) -> WithContext<Self>
fn with_context(self, otel_cx: Context) -> WithContext<Self>
Source§fn with_current_context(self) -> WithContext<Self>
fn with_current_context(self) -> WithContext<Self>
Source§impl<T> Instrument for T
impl<T> Instrument for T
Source§fn instrument(self, span: Span) -> Instrumented<Self>
fn instrument(self, span: Span) -> Instrumented<Self>
Source§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