#[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,
pub psc_auto_dns_enabled: Option<bool>,
pub psc_write_endpoint_dns_enabled: Option<bool>,
/* 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
psc_auto_dns_enabled: Option<bool>Optional. Indicates whether PSC DNS automation is enabled for this instance. When enabled, Cloud SQL provisions a universal DNS record across all networks configured with Private Service Connect (PSC) auto-connections. This will default to true for new instances when Private Service Connect is enabled.
psc_write_endpoint_dns_enabled: Option<bool>Optional. Indicates whether PSC write endpoint DNS automation is enabled
for this instance. When enabled, Cloud SQL provisions a universal global
DNS record across all networks configured with Private Service Connect
(PSC) auto-connections that always points to the cluster primary instance.
This feature is only supported for Enterprise Plus edition.
This will default to true for new Enterprise Plus instances when
psc_auto_dns_enabled is enabled.
Implementations§
Source§impl PscConfig
impl PscConfig
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");Sourcepub fn set_psc_auto_dns_enabled<T>(self, v: T) -> Self
pub fn set_psc_auto_dns_enabled<T>(self, v: T) -> Self
Sets the value of psc_auto_dns_enabled.
§Example
let x = PscConfig::new().set_psc_auto_dns_enabled(true);Sourcepub fn set_or_clear_psc_auto_dns_enabled<T>(self, v: Option<T>) -> Self
pub fn set_or_clear_psc_auto_dns_enabled<T>(self, v: Option<T>) -> Self
Sets or clears the value of psc_auto_dns_enabled.
§Example
let x = PscConfig::new().set_or_clear_psc_auto_dns_enabled(Some(false));
let x = PscConfig::new().set_or_clear_psc_auto_dns_enabled(None::<bool>);Sourcepub fn set_psc_write_endpoint_dns_enabled<T>(self, v: T) -> Self
pub fn set_psc_write_endpoint_dns_enabled<T>(self, v: T) -> Self
Sets the value of psc_write_endpoint_dns_enabled.
§Example
let x = PscConfig::new().set_psc_write_endpoint_dns_enabled(true);Sourcepub fn set_or_clear_psc_write_endpoint_dns_enabled<T>(
self,
v: Option<T>,
) -> Self
pub fn set_or_clear_psc_write_endpoint_dns_enabled<T>( self, v: Option<T>, ) -> Self
Sets or clears the value of psc_write_endpoint_dns_enabled.
§Example
let x = PscConfig::new().set_or_clear_psc_write_endpoint_dns_enabled(Some(false));
let x = PscConfig::new().set_or_clear_psc_write_endpoint_dns_enabled(None::<bool>);