#[non_exhaustive]pub struct PrivateConfig {
pub is_private: bool,
pub ca_pool: String,
pub http_service_attachment: String,
pub ssh_service_attachment: String,
pub psc_allowed_projects: Vec<String>,
pub custom_host_config: Option<CustomHostConfig>,
/* private fields */
}Expand description
PrivateConfig includes settings for private instance.
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.is_private: boolRequired. Immutable. Indicate if it’s private instance.
ca_pool: StringOptional. Immutable. CA pool resource, resource must in the format of
projects/{project}/locations/{location}/caPools/{ca_pool}.
http_service_attachment: StringOutput only. Service Attachment for HTTP, resource is in the format of
projects/{project}/regions/{region}/serviceAttachments/{service_attachment}.
ssh_service_attachment: StringOutput only. Service Attachment for SSH, resource is in the format of
projects/{project}/regions/{region}/serviceAttachments/{service_attachment}.
psc_allowed_projects: Vec<String>Optional. Additional allowed projects for setting up PSC connections. Instance host project is automatically allowed and does not need to be included in this list.
custom_host_config: Option<CustomHostConfig>Optional. Custom host config for the instance.
Implementations§
Source§impl PrivateConfig
impl PrivateConfig
pub fn new() -> Self
Sourcepub fn set_is_private<T: Into<bool>>(self, v: T) -> Self
pub fn set_is_private<T: Into<bool>>(self, v: T) -> Self
Sourcepub fn set_ca_pool<T: Into<String>>(self, v: T) -> Self
pub fn set_ca_pool<T: Into<String>>(self, v: T) -> Self
Sourcepub fn set_http_service_attachment<T: Into<String>>(self, v: T) -> Self
pub fn set_http_service_attachment<T: Into<String>>(self, v: T) -> Self
Sets the value of http_service_attachment.
§Example
let x = PrivateConfig::new().set_http_service_attachment("example");Sourcepub fn set_ssh_service_attachment<T: Into<String>>(self, v: T) -> Self
pub fn set_ssh_service_attachment<T: Into<String>>(self, v: T) -> Self
Sets the value of ssh_service_attachment.
§Example
let x = PrivateConfig::new().set_ssh_service_attachment("example");Sourcepub fn set_psc_allowed_projects<T, V>(self, v: T) -> Self
pub fn set_psc_allowed_projects<T, V>(self, v: T) -> Self
Sets the value of psc_allowed_projects.
§Example
let x = PrivateConfig::new().set_psc_allowed_projects(["a", "b", "c"]);Sourcepub fn set_custom_host_config<T>(self, v: T) -> Selfwhere
T: Into<CustomHostConfig>,
pub fn set_custom_host_config<T>(self, v: T) -> Selfwhere
T: Into<CustomHostConfig>,
Sets the value of custom_host_config.
§Example
use google_cloud_securesourcemanager_v1::model::instance::private_config::CustomHostConfig;
let x = PrivateConfig::new().set_custom_host_config(CustomHostConfig::default()/* use setters */);Sourcepub fn set_or_clear_custom_host_config<T>(self, v: Option<T>) -> Selfwhere
T: Into<CustomHostConfig>,
pub fn set_or_clear_custom_host_config<T>(self, v: Option<T>) -> Selfwhere
T: Into<CustomHostConfig>,
Sets or clears the value of custom_host_config.
§Example
use google_cloud_securesourcemanager_v1::model::instance::private_config::CustomHostConfig;
let x = PrivateConfig::new().set_or_clear_custom_host_config(Some(CustomHostConfig::default()/* use setters */));
let x = PrivateConfig::new().set_or_clear_custom_host_config(None::<CustomHostConfig>);Trait Implementations§
Source§impl Clone for PrivateConfig
impl Clone for PrivateConfig
Source§fn clone(&self) -> PrivateConfig
fn clone(&self) -> PrivateConfig
1.0.0 · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
source. Read more