Struct IpConfiguration

Source
#[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
Non-exhaustive structs could have additional fields added in future. Therefore, non-exhaustive structs cannot be constructed in external crates using the traditional 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.

§authorized_networks: Vec<AclEntry>

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 and require_ssl=false
  • ssl_mode=ENCRYPTED_ONLY and require_ssl=false
  • ssl_mode=TRUSTED_CLIENT_CERTIFICATE_REQUIRED and require_ssl=true

For SQL Server:

  • ssl_mode=ALLOW_UNENCRYPTED_AND_ENCRYPTED and require_ssl=false
  • ssl_mode=ENCRYPTED_ONLY and require_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

Source

pub fn new() -> Self

Source

pub fn set_ipv4_enabled<T>(self, v: T) -> Self
where T: Into<BoolValue>,

Sets the value of ipv4_enabled.

Source

pub fn set_or_clear_ipv4_enabled<T>(self, v: Option<T>) -> Self
where T: Into<BoolValue>,

Sets or clears the value of ipv4_enabled.

Source

pub fn set_private_network<T: Into<String>>(self, v: T) -> Self

Sets the value of private_network.

Source

pub fn set_require_ssl<T>(self, v: T) -> Self
where T: Into<BoolValue>,

Sets the value of require_ssl.

Source

pub fn set_or_clear_require_ssl<T>(self, v: Option<T>) -> Self
where T: Into<BoolValue>,

Sets or clears the value of require_ssl.

Source

pub fn set_authorized_networks<T, V>(self, v: T) -> Self
where T: IntoIterator<Item = V>, V: Into<AclEntry>,

Sets the value of authorized_networks.

Source

pub fn set_allocated_ip_range<T: Into<String>>(self, v: T) -> Self

Sets the value of allocated_ip_range.

Source

pub fn set_enable_private_path_for_google_cloud_services<T>(self, v: T) -> Self
where T: Into<BoolValue>,

Source

pub fn set_or_clear_enable_private_path_for_google_cloud_services<T>( self, v: Option<T>, ) -> Self
where T: Into<BoolValue>,

Sets or clears the value of enable_private_path_for_google_cloud_services.

Source

pub fn set_ssl_mode<T: Into<SslMode>>(self, v: T) -> Self

Sets the value of ssl_mode.

Source

pub fn set_psc_config<T>(self, v: T) -> Self
where T: Into<PscConfig>,

Sets the value of psc_config.

Source

pub fn set_or_clear_psc_config<T>(self, v: Option<T>) -> Self
where T: Into<PscConfig>,

Sets or clears the value of psc_config.

Source

pub fn set_server_ca_mode<T>(self, v: T) -> Self
where T: Into<CaMode>,

Sets the value of server_ca_mode.

Source

pub fn set_or_clear_server_ca_mode<T>(self, v: Option<T>) -> Self
where T: Into<CaMode>,

Sets or clears the value of server_ca_mode.

Trait Implementations§

Source§

impl Clone for IpConfiguration

Source§

fn clone(&self) -> IpConfiguration

Returns a duplicate of the value. Read more
1.0.0 · Source§

fn clone_from(&mut self, source: &Self)

Performs copy-assignment from source. Read more
Source§

impl Debug for IpConfiguration

Source§

fn fmt(&self, f: &mut Formatter<'_>) -> Result

Formats the value using the given formatter. Read more
Source§

impl Default for IpConfiguration

Source§

fn default() -> IpConfiguration

Returns the “default value” for a type. Read more
Source§

impl Message for IpConfiguration

Source§

fn typename() -> &'static str

The typename of this message.
Source§

impl PartialEq for IpConfiguration

Source§

fn eq(&self, other: &IpConfiguration) -> bool

Tests for self and other values to be equal, and is used by ==.
1.0.0 · Source§

fn ne(&self, other: &Rhs) -> bool

Tests for !=. The default implementation is almost always sufficient, and should not be overridden without very good reason.
Source§

impl StructuralPartialEq for IpConfiguration

Auto Trait Implementations§

Blanket Implementations§

Source§

impl<T> Any for T
where T: 'static + ?Sized,

Source§

fn type_id(&self) -> TypeId

Gets the TypeId of self. Read more
Source§

impl<T> Borrow<T> for T
where T: ?Sized,

Source§

fn borrow(&self) -> &T

Immutably borrows from an owned value. Read more
Source§

impl<T> BorrowMut<T> for T
where T: ?Sized,

Source§

fn borrow_mut(&mut self) -> &mut T

Mutably borrows from an owned value. Read more
Source§

impl<T> CloneToUninit for T
where T: Clone,

Source§

unsafe fn clone_to_uninit(&self, dest: *mut u8)

🔬This is a nightly-only experimental API. (clone_to_uninit)
Performs copy-assignment from self to dest. Read more
Source§

impl<T> From<T> for T

Source§

fn from(t: T) -> T

Returns the argument unchanged.

Source§

impl<T> Instrument for T

Source§

fn instrument(self, span: Span) -> Instrumented<Self>

Instruments this type with the provided Span, returning an Instrumented wrapper. Read more
Source§

fn in_current_span(self) -> Instrumented<Self>

Instruments this type with the current Span, returning an Instrumented wrapper. Read more
Source§

impl<T, U> Into<U> for T
where U: From<T>,

Source§

fn into(self) -> U

Calls U::from(self).

That is, this conversion is whatever the implementation of From<T> for U chooses to do.

Source§

impl<T> PolicyExt for T
where T: ?Sized,

Source§

fn and<P, B, E>(self, other: P) -> And<T, P>
where T: Policy<B, E>, P: Policy<B, E>,

Create a new Policy that returns Action::Follow only if self and other return Action::Follow. Read more
Source§

fn or<P, B, E>(self, other: P) -> Or<T, P>
where T: Policy<B, E>, P: Policy<B, E>,

Create a new Policy that returns Action::Follow if either self or other returns Action::Follow. Read more
Source§

impl<T> ToOwned for T
where T: Clone,

Source§

type Owned = T

The resulting type after obtaining ownership.
Source§

fn to_owned(&self) -> T

Creates owned data from borrowed data, usually by cloning. Read more
Source§

fn clone_into(&self, target: &mut T)

Uses borrowed data to replace owned data, usually by cloning. Read more
Source§

impl<T, U> TryFrom<U> for T
where U: Into<T>,

Source§

type Error = Infallible

The type returned in the event of a conversion error.
Source§

fn try_from(value: U) -> Result<T, <T as TryFrom<U>>::Error>

Performs the conversion.
Source§

impl<T, U> TryInto<U> for T
where U: TryFrom<T>,

Source§

type Error = <U as TryFrom<T>>::Error

The type returned in the event of a conversion error.
Source§

fn try_into(self) -> Result<U, <U as TryFrom<T>>::Error>

Performs the conversion.
Source§

impl<V, T> VZip<V> for T
where V: MultiLane<T>,

Source§

fn vzip(self) -> V

Source§

impl<T> WithSubscriber for T

Source§

fn with_subscriber<S>(self, subscriber: S) -> WithDispatch<Self>
where S: Into<Dispatch>,

Attaches the provided Subscriber to this type, returning a WithDispatch wrapper. Read more
Source§

fn with_current_subscriber(self) -> WithDispatch<Self>

Attaches the current default Subscriber to this type, returning a WithDispatch wrapper. Read more
Source§

impl<T> DeserializeOwned for T
where T: for<'de> Deserialize<'de>,

Source§

impl<T> ErasedDestructor for T
where T: 'static,