Struct Settings

Source
#[non_exhaustive]
pub struct Settings {
Show 34 fields pub settings_version: Option<Int64Value>, pub authorized_gae_applications: Vec<String>, pub tier: String, pub kind: String, pub user_labels: HashMap<String, String>, pub availability_type: SqlAvailabilityType, pub pricing_plan: SqlPricingPlan, pub replication_type: SqlReplicationType, pub storage_auto_resize_limit: Option<Int64Value>, pub activation_policy: SqlActivationPolicy, pub ip_configuration: Option<IpConfiguration>, pub storage_auto_resize: Option<BoolValue>, pub location_preference: Option<LocationPreference>, pub database_flags: Vec<DatabaseFlags>, pub data_disk_type: SqlDataDiskType, pub maintenance_window: Option<MaintenanceWindow>, pub backup_configuration: Option<BackupConfiguration>, pub database_replication_enabled: Option<BoolValue>, pub crash_safe_replication_enabled: Option<BoolValue>, pub data_disk_size_gb: Option<Int64Value>, pub active_directory_config: Option<SqlActiveDirectoryConfig>, pub collation: String, pub deny_maintenance_periods: Vec<DenyMaintenancePeriod>, pub insights_config: Option<InsightsConfig>, pub password_validation_policy: Option<PasswordValidationPolicy>, pub sql_server_audit_config: Option<SqlServerAuditConfig>, pub edition: Edition, pub connector_enforcement: ConnectorEnforcement, pub deletion_protection_enabled: Option<BoolValue>, pub time_zone: String, pub advanced_machine_features: Option<AdvancedMachineFeatures>, pub data_cache_config: Option<DataCacheConfig>, pub enable_google_ml_integration: Option<BoolValue>, pub enable_dataplex_integration: Option<BoolValue>, /* private fields */
}
Expand description

Database instance settings.

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.
§settings_version: Option<Int64Value>

The version of instance settings. This is a required field for update method to make sure concurrent updates are handled properly. During update, use the most recent settingsVersion value for this instance and do not try to update this value.

§authorized_gae_applications: Vec<String>
👎Deprecated

The App Engine app IDs that can access this instance. (Deprecated) Applied to First Generation instances only.

§tier: String

The tier (or machine type) for this instance, for example db-custom-1-3840. WARNING: Changing this restarts the instance.

§kind: String

This is always sql#settings.

§user_labels: HashMap<String, String>

User-provided labels, represented as a dictionary where each label is a single key value pair.

§availability_type: SqlAvailabilityType

Availability type. Potential values:

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

For more information, see Overview of the High Availability Configuration.

§pricing_plan: SqlPricingPlan

The pricing plan for this instance. This can be either PER_USE or PACKAGE. Only PER_USE is supported for Second Generation instances.

§replication_type: SqlReplicationType
👎Deprecated

The type of replication this instance uses. This can be either ASYNCHRONOUS or SYNCHRONOUS. (Deprecated) This property was only applicable to First Generation instances.

§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_configuration: Option<IpConfiguration>

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 for Second Generation instances.

§storage_auto_resize: Option<BoolValue>

Configuration to increase storage size automatically. The default value is true.

§location_preference: Option<LocationPreference>

The location preference settings. This allows the instance to be located as near as possible to either an App Engine app or Compute Engine zone for better performance. App Engine co-location was only applicable to First Generation instances.

§database_flags: Vec<DatabaseFlags>

The database flags passed to the instance at startup.

§data_disk_type: SqlDataDiskType

The type of data disk: PD_SSD (default) or PD_HDD. Not used for First Generation instances.

§maintenance_window: Option<MaintenanceWindow>

The maintenance window for this instance. This specifies when the instance can be restarted for maintenance purposes.

§backup_configuration: Option<BackupConfiguration>

The daily backup configuration for the instance.

§database_replication_enabled: Option<BoolValue>

Configuration specific to read replica instances. Indicates whether replication is enabled or not. WARNING: Changing this restarts the instance.

§crash_safe_replication_enabled: Option<BoolValue>
👎Deprecated

Configuration specific to read replica instances. Indicates whether database flags for crash-safe replication are enabled. This property was only applicable to First Generation instances.

§data_disk_size_gb: Option<Int64Value>

The size of data disk, in GB. The data disk size minimum is 10GB.

§active_directory_config: Option<SqlActiveDirectoryConfig>

Active Directory configuration, relevant only for Cloud SQL for SQL Server.

§collation: String

The name of server Instance collation.

§deny_maintenance_periods: Vec<DenyMaintenancePeriod>

Deny maintenance periods

§insights_config: Option<InsightsConfig>

Insights configuration, for now relevant only for Postgres.

§password_validation_policy: Option<PasswordValidationPolicy>

The local user password validation policy of the instance.

§sql_server_audit_config: Option<SqlServerAuditConfig>

SQL Server specific audit configuration.

§edition: Edition

Optional. The edition of the instance.

§connector_enforcement: ConnectorEnforcement

Specifies if connections must use Cloud SQL connectors. Option values include the following: NOT_REQUIRED (Cloud SQL instances can be connected without Cloud SQL Connectors) and REQUIRED (Only allow connections that use Cloud SQL Connectors).

Note that using REQUIRED disables all existing authorized networks. If this field is not specified when creating a new instance, NOT_REQUIRED is used. If this field is not specified when patching or updating an existing instance, it is left unchanged in the instance.

§deletion_protection_enabled: Option<BoolValue>

Configuration to protect against accidental instance deletion.

§time_zone: String

Server timezone, relevant only for Cloud SQL for SQL Server.

§advanced_machine_features: Option<AdvancedMachineFeatures>

Specifies advanced machine configuration for the instances relevant only for SQL Server.

§data_cache_config: Option<DataCacheConfig>

Configuration for data cache.

§enable_google_ml_integration: Option<BoolValue>

Optional. When this parameter is set to true, Cloud SQL instances can connect to Vertex AI to pass requests for real-time predictions and insights to the AI. The default value is false. This applies only to Cloud SQL for PostgreSQL instances.

§enable_dataplex_integration: Option<BoolValue>

Optional. By default, Cloud SQL instances have schema extraction disabled for Dataplex. When this parameter is set to true, schema extraction for Dataplex on Cloud SQL instances is activated.

Implementations§

Source§

impl Settings

Source

pub fn new() -> Self

Source

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

Sets the value of settings_version.

Source

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

Sets or clears the value of settings_version.

Source

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

👎Deprecated

Sets the value of authorized_gae_applications.

Source

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

Sets the value of tier.

Source

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

Sets the value of kind.

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_availability_type<T: Into<SqlAvailabilityType>>(self, v: T) -> Self

Sets the value of availability_type.

Source

pub fn set_pricing_plan<T: Into<SqlPricingPlan>>(self, v: T) -> Self

Sets the value of pricing_plan.

Source

pub fn set_replication_type<T: Into<SqlReplicationType>>(self, v: T) -> Self

👎Deprecated

Sets the value of replication_type.

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_configuration<T>(self, v: T) -> Self

Sets the value of ip_configuration.

Source

pub fn set_or_clear_ip_configuration<T>(self, v: Option<T>) -> Self

Sets or clears the value of ip_configuration.

Source

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

Sets the value of storage_auto_resize.

Source

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

Sets or clears the value of storage_auto_resize.

Source

pub fn set_location_preference<T>(self, v: T) -> Self

Sets the value of location_preference.

Source

pub fn set_or_clear_location_preference<T>(self, v: Option<T>) -> Self

Sets or clears the value of location_preference.

Source

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

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_maintenance_window<T>(self, v: T) -> Self

Sets the value of maintenance_window.

Source

pub fn set_or_clear_maintenance_window<T>(self, v: Option<T>) -> Self

Sets or clears the value of maintenance_window.

Source

pub fn set_backup_configuration<T>(self, v: T) -> Self

Sets the value of backup_configuration.

Source

pub fn set_or_clear_backup_configuration<T>(self, v: Option<T>) -> Self

Sets or clears the value of backup_configuration.

Source

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

Sets the value of database_replication_enabled.

Source

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

Sets or clears the value of database_replication_enabled.

Source

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

👎Deprecated

Sets the value of crash_safe_replication_enabled.

Source

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

👎Deprecated

Sets or clears the value of crash_safe_replication_enabled.

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_active_directory_config<T>(self, v: T) -> Self

Sets the value of active_directory_config.

Source

pub fn set_or_clear_active_directory_config<T>(self, v: Option<T>) -> Self

Sets or clears the value of active_directory_config.

Source

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

Sets the value of collation.

Source

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

Sets the value of deny_maintenance_periods.

Source

pub fn set_insights_config<T>(self, v: T) -> Self
where T: Into<InsightsConfig>,

Sets the value of insights_config.

Source

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

Sets or clears the value of insights_config.

Source

pub fn set_password_validation_policy<T>(self, v: T) -> Self

Sets the value of password_validation_policy.

Source

pub fn set_or_clear_password_validation_policy<T>(self, v: Option<T>) -> Self

Sets or clears the value of password_validation_policy.

Source

pub fn set_sql_server_audit_config<T>(self, v: T) -> Self

Sets the value of sql_server_audit_config.

Source

pub fn set_or_clear_sql_server_audit_config<T>(self, v: Option<T>) -> Self

Sets or clears the value of sql_server_audit_config.

Source

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

Sets the value of edition.

Source

pub fn set_connector_enforcement<T: Into<ConnectorEnforcement>>( self, v: T, ) -> Self

Sets the value of connector_enforcement.

Source

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

Sets the value of deletion_protection_enabled.

Source

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

Sets or clears the value of deletion_protection_enabled.

Source

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

Sets the value of time_zone.

Source

pub fn set_advanced_machine_features<T>(self, v: T) -> Self

Sets the value of advanced_machine_features.

Source

pub fn set_or_clear_advanced_machine_features<T>(self, v: Option<T>) -> Self

Sets or clears the value of advanced_machine_features.

Source

pub fn set_data_cache_config<T>(self, v: T) -> Self

Sets the value of data_cache_config.

Source

pub fn set_or_clear_data_cache_config<T>(self, v: Option<T>) -> Self

Sets or clears the value of data_cache_config.

Source

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

Sets the value of enable_google_ml_integration.

Source

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

Sets or clears the value of enable_google_ml_integration.

Source

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

Sets the value of enable_dataplex_integration.

Source

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

Sets or clears the value of enable_dataplex_integration.

Trait Implementations§

Source§

impl Clone for Settings

Source§

fn clone(&self) -> Settings

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 Settings

Source§

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

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

impl Default for Settings

Source§

fn default() -> Settings

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

impl Message for Settings

Source§

fn typename() -> &'static str

The typename of this message.
Source§

impl PartialEq for Settings

Source§

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

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,