#[non_exhaustive]pub struct ServerTlsPolicy {
pub name: String,
pub description: String,
pub create_time: Option<Timestamp>,
pub update_time: Option<Timestamp>,
pub labels: HashMap<String, String>,
pub allow_open: bool,
pub server_certificate: Option<CertificateProvider>,
pub mtls_policy: Option<MTLSPolicy>,
/* private fields */
}
Expand description
ServerTlsPolicy is a resource that specifies how a server should authenticate incoming requests. This resource itself does not affect configuration unless it is 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: String
Required. Name of the ServerTlsPolicy resource. It matches the pattern
projects/*/locations/{location}/serverTlsPolicies/{server_tls_policy}
description: String
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>
Set of label tags associated with the resource.
allow_open: bool
Determines if server allows plaintext connections. If set to true, server
allows plain text connections. By default, it is set to false. This setting
is not exclusive of other encryption modes. For example, if allow_open
and mtls_policy
are set, server allows both plain text and mTLS
connections. See documentation of other encryption modes to confirm
compatibility.
Consider using it if you wish to upgrade in place your deployment to TLS while having mixed TLS and non-TLS traffic reaching port :80.
server_certificate: Option<CertificateProvider>
Defines a mechanism to provision server identity (public and private keys).
Cannot be combined with allow_open
as a permissive mode that allows both
plain text and TLS is not supported.
mtls_policy: Option<MTLSPolicy>
Defines a mechanism to provision peer validation certificates for peer to
peer authentication (Mutual TLS - mTLS). If not specified, client
certificate will not be requested. The connection is treated as TLS and not
mTLS. If allow_open
and mtls_policy
are set, server allows both plain
text and mTLS connections.
Implementations§
Source§impl ServerTlsPolicy
impl ServerTlsPolicy
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_allow_open<T: Into<bool>>(self, v: T) -> Self
pub fn set_allow_open<T: Into<bool>>(self, v: T) -> Self
Sets the value of allow_open.
Sourcepub fn set_server_certificate<T>(self, v: T) -> Selfwhere
T: Into<CertificateProvider>,
pub fn set_server_certificate<T>(self, v: T) -> Selfwhere
T: Into<CertificateProvider>,
Sets the value of server_certificate.
Sourcepub fn set_or_clear_server_certificate<T>(self, v: Option<T>) -> Selfwhere
T: Into<CertificateProvider>,
pub fn set_or_clear_server_certificate<T>(self, v: Option<T>) -> Selfwhere
T: Into<CertificateProvider>,
Sets or clears the value of server_certificate.
Sourcepub fn set_mtls_policy<T>(self, v: T) -> Selfwhere
T: Into<MTLSPolicy>,
pub fn set_mtls_policy<T>(self, v: T) -> Selfwhere
T: Into<MTLSPolicy>,
Sets the value of mtls_policy.
Sourcepub fn set_or_clear_mtls_policy<T>(self, v: Option<T>) -> Selfwhere
T: Into<MTLSPolicy>,
pub fn set_or_clear_mtls_policy<T>(self, v: Option<T>) -> Selfwhere
T: Into<MTLSPolicy>,
Sets or clears the value of mtls_policy.
Trait Implementations§
Source§impl Clone for ServerTlsPolicy
impl Clone for ServerTlsPolicy
Source§fn clone(&self) -> ServerTlsPolicy
fn clone(&self) -> ServerTlsPolicy
1.0.0 · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
source
. Read more