#[non_exhaustive]pub struct IpConfiguration {
pub ipv4_enabled: Option<BoolValue>,
pub private_network: String,
pub require_ssl: Option<BoolValue>,
pub authorized_networks: Vec<AclEntry>,
pub allocated_ip_range: String,
pub enable_private_path_for_google_cloud_services: Option<BoolValue>,
pub ssl_mode: SslMode,
pub psc_config: Option<PscConfig>,
pub server_ca_mode: Option<CaMode>,
/* private fields */
}
Expand description
IP Management configuration.
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.ipv4_enabled: Option<BoolValue>
Whether the instance is assigned a public IP address or not.
private_network: String
The resource link for the VPC network from which the Cloud SQL instance is
accessible for private IP. For example,
/projects/myProject/global/networks/default
. This setting can
be updated, but it cannot be removed after it is set.
require_ssl: Option<BoolValue>
Use ssl_mode
instead.
Whether SSL/TLS connections over IP are enforced.
If set to false, then allow both non-SSL/non-TLS and SSL/TLS connections.
For SSL/TLS connections, the client certificate won’t be verified. If
set to true, then only allow connections encrypted with SSL/TLS and with
valid client certificates. If you want to enforce SSL/TLS without enforcing
the requirement for valid client certificates, then use the ssl_mode
flag
instead of the require_ssl
flag.
The list of external networks that are allowed to connect to the instance
using the IP. In ‘CIDR’ notation, also known as ‘slash’ notation (for
example: 157.197.200.0/24
).
allocated_ip_range: String
The name of the allocated ip range for the private ip Cloud SQL instance.
For example: “google-managed-services-default”. If set, the instance ip
will be created in the allocated range. The range name must comply with
RFC 1035. Specifically, the name
must be 1-63 characters long and match the regular expression
[a-z]([-a-z0-9]*[a-z0-9])?.
enable_private_path_for_google_cloud_services: Option<BoolValue>
Controls connectivity to private IP instances from Google services, such as BigQuery.
ssl_mode: SslMode
Specify how SSL/TLS is enforced in database connections. If you must use
the require_ssl
flag for backward compatibility, then only the following
value pairs are valid:
For PostgreSQL and MySQL:
ssl_mode=ALLOW_UNENCRYPTED_AND_ENCRYPTED
andrequire_ssl=false
ssl_mode=ENCRYPTED_ONLY
andrequire_ssl=false
ssl_mode=TRUSTED_CLIENT_CERTIFICATE_REQUIRED
andrequire_ssl=true
For SQL Server:
ssl_mode=ALLOW_UNENCRYPTED_AND_ENCRYPTED
andrequire_ssl=false
ssl_mode=ENCRYPTED_ONLY
andrequire_ssl=true
The value of ssl_mode
has priority over the value of require_ssl
.
For example, for the pair ssl_mode=ENCRYPTED_ONLY
and
require_ssl=false
, ssl_mode=ENCRYPTED_ONLY
means accept only SSL
connections, while require_ssl=false
means accept both non-SSL
and SSL connections. In this case, MySQL and PostgreSQL databases respect
ssl_mode
and accepts only SSL connections.
psc_config: Option<PscConfig>
PSC settings for this instance.
server_ca_mode: Option<CaMode>
Specify what type of CA is used for the server certificate.
Implementations§
Source§impl IpConfiguration
impl IpConfiguration
pub fn new() -> Self
Sourcepub fn set_ipv4_enabled<T>(self, v: T) -> Self
pub fn set_ipv4_enabled<T>(self, v: T) -> Self
Sets the value of ipv4_enabled.
Sourcepub fn set_or_clear_ipv4_enabled<T>(self, v: Option<T>) -> Self
pub fn set_or_clear_ipv4_enabled<T>(self, v: Option<T>) -> Self
Sets or clears the value of ipv4_enabled.
Sourcepub fn set_private_network<T: Into<String>>(self, v: T) -> Self
pub fn set_private_network<T: Into<String>>(self, v: T) -> Self
Sets the value of private_network.
Sourcepub fn set_require_ssl<T>(self, v: T) -> Self
pub fn set_require_ssl<T>(self, v: T) -> Self
Sets the value of require_ssl.
Sourcepub fn set_or_clear_require_ssl<T>(self, v: Option<T>) -> Self
pub fn set_or_clear_require_ssl<T>(self, v: Option<T>) -> Self
Sets or clears the value of require_ssl.
Sets the value of authorized_networks.
Sourcepub fn set_allocated_ip_range<T: Into<String>>(self, v: T) -> Self
pub fn set_allocated_ip_range<T: Into<String>>(self, v: T) -> Self
Sets the value of allocated_ip_range.
Sourcepub fn set_enable_private_path_for_google_cloud_services<T>(self, v: T) -> Self
pub fn set_enable_private_path_for_google_cloud_services<T>(self, v: T) -> Self
Sets the value of enable_private_path_for_google_cloud_services.
Sourcepub fn set_or_clear_enable_private_path_for_google_cloud_services<T>(
self,
v: Option<T>,
) -> Self
pub fn set_or_clear_enable_private_path_for_google_cloud_services<T>( self, v: Option<T>, ) -> Self
Sets or clears the value of enable_private_path_for_google_cloud_services.
Sourcepub fn set_ssl_mode<T: Into<SslMode>>(self, v: T) -> Self
pub fn set_ssl_mode<T: Into<SslMode>>(self, v: T) -> Self
Sets the value of ssl_mode.
Sourcepub fn set_psc_config<T>(self, v: T) -> Self
pub fn set_psc_config<T>(self, v: T) -> Self
Sets the value of psc_config.
Sourcepub fn set_or_clear_psc_config<T>(self, v: Option<T>) -> Self
pub fn set_or_clear_psc_config<T>(self, v: Option<T>) -> Self
Sets or clears the value of psc_config.
Sourcepub fn set_server_ca_mode<T>(self, v: T) -> Self
pub fn set_server_ca_mode<T>(self, v: T) -> Self
Sets the value of server_ca_mode.
Sourcepub fn set_or_clear_server_ca_mode<T>(self, v: Option<T>) -> Self
pub fn set_or_clear_server_ca_mode<T>(self, v: Option<T>) -> Self
Sets or clears the value of server_ca_mode.
Trait Implementations§
Source§impl Clone for IpConfiguration
impl Clone for IpConfiguration
Source§fn clone(&self) -> IpConfiguration
fn clone(&self) -> IpConfiguration
1.0.0 · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
source
. Read more