#[non_exhaustive]pub struct PscConfig {
pub psc_enabled: Option<bool>,
pub allowed_consumer_projects: Vec<String>,
pub psc_auto_connections: Vec<PscAutoConnectionConfig>,
pub network_attachment_uri: String,
/* private fields */
}Expand description
PSC settings for a Cloud SQL 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.psc_enabled: Option<bool>Whether PSC connectivity is enabled for this instance.
allowed_consumer_projects: Vec<String>Optional. The list of consumer projects that are allow-listed for PSC connections to this instance. This instance can be connected to with PSC from any network in these projects.
Each consumer project in this list may be represented by a project number (numeric) or by a project id (alphanumeric).
psc_auto_connections: Vec<PscAutoConnectionConfig>Optional. The list of settings for requested Private Service Connect consumer endpoints that can be used to connect to this Cloud SQL instance.
network_attachment_uri: StringOptional. The network attachment of the consumer network that the Private Service Connect enabled Cloud SQL instance is authorized to connect via PSC interface. format: projects/PROJECT/regions/REGION/networkAttachments/ID
Implementations§
Source§impl PscConfig
impl PscConfig
pub fn new() -> Self
Sourcepub fn set_psc_enabled<T>(self, v: T) -> Self
pub fn set_psc_enabled<T>(self, v: T) -> Self
Sourcepub fn set_or_clear_psc_enabled<T>(self, v: Option<T>) -> Self
pub fn set_or_clear_psc_enabled<T>(self, v: Option<T>) -> Self
Sets or clears the value of psc_enabled.
§Example
let x = PscConfig::new().set_or_clear_psc_enabled(Some(false));
let x = PscConfig::new().set_or_clear_psc_enabled(None::<bool>);Sourcepub fn set_allowed_consumer_projects<T, V>(self, v: T) -> Self
pub fn set_allowed_consumer_projects<T, V>(self, v: T) -> Self
Sets the value of allowed_consumer_projects.
§Example
let x = PscConfig::new().set_allowed_consumer_projects(["a", "b", "c"]);Sourcepub fn set_psc_auto_connections<T, V>(self, v: T) -> Self
pub fn set_psc_auto_connections<T, V>(self, v: T) -> Self
Sets the value of psc_auto_connections.
§Example
use google_cloud_sql_v1::model::PscAutoConnectionConfig;
let x = PscConfig::new()
.set_psc_auto_connections([
PscAutoConnectionConfig::default()/* use setters */,
PscAutoConnectionConfig::default()/* use (different) setters */,
]);Sourcepub fn set_network_attachment_uri<T: Into<String>>(self, v: T) -> Self
pub fn set_network_attachment_uri<T: Into<String>>(self, v: T) -> Self
Sets the value of network_attachment_uri.
§Example
let x = PscConfig::new().set_network_attachment_uri("example");