#[non_exhaustive]pub struct SslPolicy {Show 13 fields
pub creation_timestamp: Option<String>,
pub custom_features: Vec<String>,
pub description: Option<String>,
pub enabled_features: Vec<String>,
pub fingerprint: Option<Bytes>,
pub id: Option<u64>,
pub kind: Option<String>,
pub min_tls_version: Option<MinTlsVersion>,
pub name: Option<String>,
pub profile: Option<Profile>,
pub region: Option<String>,
pub self_link: Option<String>,
pub warnings: Vec<Warnings>,
/* private fields */
}region-ssl-policies or ssl-policies only.Expand description
Represents an SSL Policy resource.
Use SSL policies to control SSL features, such as versions and cipher suites, that are offered by Application Load Balancers and proxy Network Load Balancers. For more information, read SSL policies overview.
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.creation_timestamp: Option<String>Output only. [Output Only] Creation timestamp inRFC3339 text format.
custom_features: Vec<String>A list of features enabled when the selected profile is CUSTOM. The method returns the set of features that can be specified in this list. This field must be empty if the profile is notCUSTOM.
description: Option<String>An optional description of this resource. Provide this property when you create the resource.
enabled_features: Vec<String>Output only. [Output Only] The list of features enabled in the SSL policy.
fingerprint: Option<Bytes>Fingerprint of this resource. A hash of the contents stored in this object. This field is used in optimistic locking. This field will be ignored when inserting a SslPolicy. An up-to-date fingerprint must be provided in order to update the SslPolicy, otherwise the request will fail with error 412 conditionNotMet.
To see the latest fingerprint, make a get() request to retrieve an SslPolicy.
id: Option<u64>Output only. [Output Only] The unique identifier for the resource. This identifier is defined by the server.
kind: Option<String>Output only. [Output only] Type of the resource. Alwayscompute#sslPolicyfor SSL policies.
min_tls_version: Option<MinTlsVersion>The minimum version of SSL protocol that can be used by the clients to establish a connection with the load balancer. This can be one ofTLS_1_0, TLS_1_1, TLS_1_2,TLS_1_3. When set to TLS_1_3, the profile field must be set to RESTRICTED.
name: Option<String>Name of the resource. The name must be 1-63 characters long, and comply
with RFC1035. Specifically, the name must be 1-63 characters
long and match the regular expression
[a-z]([-a-z0-9]*[a-z0-9])? which means the first character
must be a lowercase letter, and all following characters must be a dash,
lowercase letter, or digit, except the last character, which cannot be a
dash.
profile: Option<Profile>Profile specifies the set of SSL features that can be used by the load balancer when negotiating SSL with clients. This can be one ofCOMPATIBLE, MODERN, RESTRICTED, orCUSTOM. If using CUSTOM, the set of SSL features to enable must be specified in the customFeatures field.
region: Option<String>Output only. [Output Only] URL of the region where the regional SSL policy resides. This field is not applicable to global SSL policies.
self_link: Option<String>Output only. [Output Only] Server-defined URL for the resource.
warnings: Vec<Warnings>Output only. [Output Only] If potential misconfigurations are detected for this SSL policy, this field will be populated with warning messages.
Implementations§
Source§impl SslPolicy
impl SslPolicy
pub fn new() -> Self
Sourcepub fn set_creation_timestamp<T>(self, v: T) -> Self
pub fn set_creation_timestamp<T>(self, v: T) -> Self
Sets the value of creation_timestamp.
§Example
let x = SslPolicy::new().set_creation_timestamp("example");Sourcepub fn set_or_clear_creation_timestamp<T>(self, v: Option<T>) -> Self
pub fn set_or_clear_creation_timestamp<T>(self, v: Option<T>) -> Self
Sets or clears the value of creation_timestamp.
§Example
let x = SslPolicy::new().set_or_clear_creation_timestamp(Some("example"));
let x = SslPolicy::new().set_or_clear_creation_timestamp(None::<String>);Sourcepub fn set_custom_features<T, V>(self, v: T) -> Self
pub fn set_custom_features<T, V>(self, v: T) -> Self
Sets the value of custom_features.
§Example
let x = SslPolicy::new().set_custom_features(["a", "b", "c"]);Sourcepub fn set_description<T>(self, v: T) -> Self
pub fn set_description<T>(self, v: T) -> Self
Sourcepub fn set_or_clear_description<T>(self, v: Option<T>) -> Self
pub fn set_or_clear_description<T>(self, v: Option<T>) -> Self
Sets or clears the value of description.
§Example
let x = SslPolicy::new().set_or_clear_description(Some("example"));
let x = SslPolicy::new().set_or_clear_description(None::<String>);Sourcepub fn set_enabled_features<T, V>(self, v: T) -> Self
pub fn set_enabled_features<T, V>(self, v: T) -> Self
Sets the value of enabled_features.
§Example
let x = SslPolicy::new().set_enabled_features(["a", "b", "c"]);Sourcepub fn set_fingerprint<T>(self, v: T) -> Self
pub fn set_fingerprint<T>(self, v: T) -> Self
Sets the value of fingerprint.
§Example
let x = SslPolicy::new().set_fingerprint(bytes::Bytes::from_static(b"example"));Sourcepub fn set_or_clear_fingerprint<T>(self, v: Option<T>) -> Self
pub fn set_or_clear_fingerprint<T>(self, v: Option<T>) -> Self
Sets or clears the value of fingerprint.
§Example
let x = SslPolicy::new().set_or_clear_fingerprint(Some(bytes::Bytes::from_static(b"example")));
let x = SslPolicy::new().set_or_clear_fingerprint(None::<bytes::Bytes>);Sourcepub fn set_or_clear_id<T>(self, v: Option<T>) -> Self
pub fn set_or_clear_id<T>(self, v: Option<T>) -> Self
Sourcepub fn set_or_clear_kind<T>(self, v: Option<T>) -> Self
pub fn set_or_clear_kind<T>(self, v: Option<T>) -> Self
Sourcepub fn set_min_tls_version<T>(self, v: T) -> Selfwhere
T: Into<MinTlsVersion>,
pub fn set_min_tls_version<T>(self, v: T) -> Selfwhere
T: Into<MinTlsVersion>,
Sets the value of min_tls_version.
§Example
use google_cloud_compute_v1::model::ssl_policy::MinTlsVersion;
let x0 = SslPolicy::new().set_min_tls_version(MinTlsVersion::Tls11);
let x1 = SslPolicy::new().set_min_tls_version(MinTlsVersion::Tls12);
let x2 = SslPolicy::new().set_min_tls_version(MinTlsVersion::Tls13);Sourcepub fn set_or_clear_min_tls_version<T>(self, v: Option<T>) -> Selfwhere
T: Into<MinTlsVersion>,
pub fn set_or_clear_min_tls_version<T>(self, v: Option<T>) -> Selfwhere
T: Into<MinTlsVersion>,
Sets or clears the value of min_tls_version.
§Example
use google_cloud_compute_v1::model::ssl_policy::MinTlsVersion;
let x0 = SslPolicy::new().set_or_clear_min_tls_version(Some(MinTlsVersion::Tls11));
let x1 = SslPolicy::new().set_or_clear_min_tls_version(Some(MinTlsVersion::Tls12));
let x2 = SslPolicy::new().set_or_clear_min_tls_version(Some(MinTlsVersion::Tls13));
let x_none = SslPolicy::new().set_or_clear_min_tls_version(None::<MinTlsVersion>);Sourcepub fn set_or_clear_name<T>(self, v: Option<T>) -> Self
pub fn set_or_clear_name<T>(self, v: Option<T>) -> Self
Sourcepub fn set_profile<T>(self, v: T) -> Self
pub fn set_profile<T>(self, v: T) -> Self
Sourcepub fn set_or_clear_profile<T>(self, v: Option<T>) -> Self
pub fn set_or_clear_profile<T>(self, v: Option<T>) -> Self
Sets or clears the value of profile.
§Example
use google_cloud_compute_v1::model::ssl_policy::Profile;
let x0 = SslPolicy::new().set_or_clear_profile(Some(Profile::Custom));
let x1 = SslPolicy::new().set_or_clear_profile(Some(Profile::Fips202205));
let x2 = SslPolicy::new().set_or_clear_profile(Some(Profile::Modern));
let x_none = SslPolicy::new().set_or_clear_profile(None::<Profile>);