CloudSqlSettings

Struct CloudSqlSettings 

Source
#[non_exhaustive]
pub struct CloudSqlSettings {
Show 19 fields pub database_version: SqlDatabaseVersion, pub user_labels: HashMap<String, String>, pub tier: String, pub storage_auto_resize_limit: Option<Int64Value>, pub activation_policy: SqlActivationPolicy, pub ip_config: Option<SqlIpConfig>, pub auto_storage_increase: Option<BoolValue>, pub database_flags: HashMap<String, String>, pub data_disk_type: SqlDataDiskType, pub data_disk_size_gb: Option<Int64Value>, pub zone: String, pub secondary_zone: String, pub source_id: String, pub root_password: String, pub root_password_set: bool, pub collation: String, pub cmek_key_name: String, pub availability_type: SqlAvailabilityType, pub edition: Edition, /* private fields */
}
Expand description

Settings for creating a Cloud SQL database instance.

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.
§database_version: SqlDatabaseVersion

The database engine type and version.

§user_labels: HashMap<String, String>

The resource labels for a Cloud SQL instance to use to annotate any related underlying resources such as Compute Engine VMs. An object containing a list of “key”: “value” pairs.

Example: { "name": "wrench", "mass": "18kg", "count": "3" }.

§tier: String

The tier (or machine type) for this instance, for example: db-n1-standard-1 (MySQL instances) or db-custom-1-3840 (PostgreSQL instances). For more information, see Cloud SQL Instance Settings.

§storage_auto_resize_limit: Option<Int64Value>

The maximum size to which storage capacity can be automatically increased. The default value is 0, which specifies that there is no limit.

§activation_policy: SqlActivationPolicy

The activation policy specifies when the instance is activated; it is applicable only when the instance state is ‘RUNNABLE’. Valid values:

‘ALWAYS’: The instance is on, and remains so even in the absence of connection requests.

NEVER: The instance is off; it is not activated, even if a connection request arrives.

§ip_config: Option<SqlIpConfig>

The settings for IP Management. This allows to enable or disable the instance IP and manage which external networks can connect to the instance. The IPv4 address cannot be disabled.

§auto_storage_increase: Option<BoolValue>

[default: ON] If you enable this setting, Cloud SQL checks your available storage every 30 seconds. If the available storage falls below a threshold size, Cloud SQL automatically adds additional storage capacity. If the available storage repeatedly falls below the threshold size, Cloud SQL continues to add storage until it reaches the maximum of 30 TB.

§database_flags: HashMap<String, String>

The database flags passed to the Cloud SQL instance at startup. An object containing a list of “key”: value pairs. Example: { “name”: “wrench”, “mass”: “1.3kg”, “count”: “3” }.

§data_disk_type: SqlDataDiskType

The type of storage: PD_SSD (default) or PD_HDD.

§data_disk_size_gb: Option<Int64Value>

The storage capacity available to the database, in GB. The minimum (and default) size is 10GB.

§zone: String

The Google Cloud Platform zone where your Cloud SQL database instance is located.

§secondary_zone: String

Optional. The Google Cloud Platform zone where the failover Cloud SQL database instance is located. Used when the Cloud SQL database availability type is REGIONAL (i.e. multiple zones / highly available).

§source_id: String

The Database Migration Service source connection profile ID, in the format: projects/my_project_name/locations/us-central1/connectionProfiles/connection_profile_ID

§root_password: String

Input only. Initial root password.

§root_password_set: bool

Output only. Indicates If this connection profile root password is stored.

§collation: String

The Cloud SQL default instance level collation.

§cmek_key_name: String

The KMS key name used for the csql instance.

§availability_type: SqlAvailabilityType

Optional. Availability type. Potential values:

  • ZONAL: The instance serves data from only one zone. Outages in that zone affect data availability.
  • REGIONAL: The instance can serve data from more than one zone in a region (it is highly available).
§edition: Edition

Optional. The edition of the given Cloud SQL instance.

Implementations§

Source§

impl CloudSqlSettings

Source

pub fn new() -> Self

Source

pub fn set_database_version<T: Into<SqlDatabaseVersion>>(self, v: T) -> Self

Sets the value of database_version.

Source

pub fn set_user_labels<T, K, V>(self, v: T) -> Self
where T: IntoIterator<Item = (K, V)>, K: Into<String>, V: Into<String>,

Sets the value of user_labels.

Source

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

Sets the value of tier.

Source

pub fn set_storage_auto_resize_limit<T>(self, v: T) -> Self
where T: Into<Int64Value>,

Sets the value of storage_auto_resize_limit.

Source

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

Sets or clears the value of storage_auto_resize_limit.

Source

pub fn set_activation_policy<T: Into<SqlActivationPolicy>>(self, v: T) -> Self

Sets the value of activation_policy.

Source

pub fn set_ip_config<T>(self, v: T) -> Self
where T: Into<SqlIpConfig>,

Sets the value of ip_config.

Source

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

Sets or clears the value of ip_config.

Source

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

Sets the value of auto_storage_increase.

Source

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

Sets or clears the value of auto_storage_increase.

Source

pub fn set_database_flags<T, K, V>(self, v: T) -> Self
where T: IntoIterator<Item = (K, V)>, K: Into<String>, V: Into<String>,

Sets the value of database_flags.

Source

pub fn set_data_disk_type<T: Into<SqlDataDiskType>>(self, v: T) -> Self

Sets the value of data_disk_type.

Source

pub fn set_data_disk_size_gb<T>(self, v: T) -> Self
where T: Into<Int64Value>,

Sets the value of data_disk_size_gb.

Source

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

Sets or clears the value of data_disk_size_gb.

Source

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

Sets the value of zone.

Source

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

Sets the value of secondary_zone.

Source

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

Sets the value of source_id.

Source

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

Sets the value of root_password.

Source

pub fn set_root_password_set<T: Into<bool>>(self, v: T) -> Self

Sets the value of root_password_set.

Source

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

Sets the value of collation.

Source

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

Sets the value of cmek_key_name.

Source

pub fn set_availability_type<T: Into<SqlAvailabilityType>>(self, v: T) -> Self

Sets the value of availability_type.

Source

pub fn set_edition<T: Into<Edition>>(self, v: T) -> Self

Sets the value of edition.

Trait Implementations§

Source§

impl Clone for CloudSqlSettings

Source§

fn clone(&self) -> CloudSqlSettings

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 CloudSqlSettings

Source§

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

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

impl Default for CloudSqlSettings

Source§

fn default() -> CloudSqlSettings

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

impl Message for CloudSqlSettings

Source§

fn typename() -> &'static str

The typename of this message.
Source§

impl PartialEq for CloudSqlSettings

Source§

fn eq(&self, other: &CloudSqlSettings) -> 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 CloudSqlSettings

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>,