pub struct Settings {
Show 33 fields pub settings_version: Option<i64>, pub authorized_gae_applications: Vec<String>, pub tier: String, pub kind: String, pub user_labels: BTreeMap<String, String>, pub availability_type: i32, pub pricing_plan: i32, pub replication_type: i32, pub storage_auto_resize_limit: Option<i64>, pub activation_policy: i32, pub ip_configuration: Option<IpConfiguration>, pub storage_auto_resize: Option<bool>, pub location_preference: Option<LocationPreference>, pub database_flags: Vec<DatabaseFlags>, pub data_disk_type: i32, pub maintenance_window: Option<MaintenanceWindow>, pub backup_configuration: Option<BackupConfiguration>, pub database_replication_enabled: Option<bool>, pub crash_safe_replication_enabled: Option<bool>, pub data_disk_size_gb: Option<i64>, 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: i32, pub connector_enforcement: i32, pub deletion_protection_enabled: Option<bool>, pub time_zone: String, pub advanced_machine_features: Option<AdvancedMachineFeatures>, pub data_cache_config: Option<DataCacheConfig>, pub enable_google_ml_integration: Option<bool>,
}
Expand description

Database instance settings.

Fields§

§settings_version: Option<i64>

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: BTreeMap<String, String>

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

§availability_type: i32

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: i32

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: i32
👎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<i64>

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: i32

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

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: i32

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

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

§crash_safe_replication_enabled: Option<bool>
👎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<i64>

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: i32

Optional. The edition of the instance.

§connector_enforcement: i32

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

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 advance machine configuration for the instance relevant only for SQL Server.

§data_cache_config: Option<DataCacheConfig>

Configuration for data cache.

§enable_google_ml_integration: Option<bool>

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.

Implementations§

source§

impl Settings

source

pub fn availability_type(&self) -> SqlAvailabilityType

Returns the enum value of availability_type, or the default if the field is set to an invalid enum value.

source

pub fn set_availability_type(&mut self, value: SqlAvailabilityType)

Sets availability_type to the provided enum value.

source

pub fn pricing_plan(&self) -> SqlPricingPlan

Returns the enum value of pricing_plan, or the default if the field is set to an invalid enum value.

source

pub fn set_pricing_plan(&mut self, value: SqlPricingPlan)

Sets pricing_plan to the provided enum value.

source

pub fn replication_type(&self) -> SqlReplicationType

Returns the enum value of replication_type, or the default if the field is set to an invalid enum value.

source

pub fn set_replication_type(&mut self, value: SqlReplicationType)

Sets replication_type to the provided enum value.

source

pub fn activation_policy(&self) -> SqlActivationPolicy

Returns the enum value of activation_policy, or the default if the field is set to an invalid enum value.

source

pub fn set_activation_policy(&mut self, value: SqlActivationPolicy)

Sets activation_policy to the provided enum value.

source

pub fn data_disk_type(&self) -> SqlDataDiskType

Returns the enum value of data_disk_type, or the default if the field is set to an invalid enum value.

source

pub fn set_data_disk_type(&mut self, value: SqlDataDiskType)

Sets data_disk_type to the provided enum value.

source

pub fn connector_enforcement(&self) -> ConnectorEnforcement

Returns the enum value of connector_enforcement, or the default if the field is set to an invalid enum value.

source

pub fn set_connector_enforcement(&mut self, value: ConnectorEnforcement)

Sets connector_enforcement to the provided enum value.

source

pub fn edition(&self) -> Edition

Returns the enum value of edition, or the default if the field is set to an invalid enum value.

source

pub fn set_edition(&mut self, value: Edition)

Sets edition to the provided enum value.

Trait Implementations§

source§

impl Clone for Settings

source§

fn clone(&self) -> Settings

Returns a copy 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() -> Self

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

impl Message for Settings

source§

fn encoded_len(&self) -> usize

Returns the encoded length of the message without a length delimiter.
source§

fn clear(&mut self)

Clears the message, resetting all fields to their default.
source§

fn encode<B>(&self, buf: &mut B) -> Result<(), EncodeError>
where B: BufMut, Self: Sized,

Encodes the message to a buffer. Read more
source§

fn encode_to_vec(&self) -> Vec<u8>
where Self: Sized,

Encodes the message to a newly allocated buffer.
source§

fn encode_length_delimited<B>(&self, buf: &mut B) -> Result<(), EncodeError>
where B: BufMut, Self: Sized,

Encodes the message with a length-delimiter to a buffer. Read more
source§

fn encode_length_delimited_to_vec(&self) -> Vec<u8>
where Self: Sized,

Encodes the message with a length-delimiter to a newly allocated buffer.
source§

fn decode<B>(buf: B) -> Result<Self, DecodeError>
where B: Buf, Self: Default,

Decodes an instance of the message from a buffer. Read more
source§

fn decode_length_delimited<B>(buf: B) -> Result<Self, DecodeError>
where B: Buf, Self: Default,

Decodes a length-delimited instance of the message from the buffer.
source§

fn merge<B>(&mut self, buf: B) -> Result<(), DecodeError>
where B: Buf, Self: Sized,

Decodes an instance of the message from a buffer, and merges it into self. Read more
source§

fn merge_length_delimited<B>(&mut self, buf: B) -> Result<(), DecodeError>
where B: Buf, Self: Sized,

Decodes a length-delimited instance of the message from buffer, and merges it into self.
source§

impl PartialEq for Settings

source§

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

This method tests for self and other values to be equal, and is used by ==.
1.0.0 · source§

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

This method 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> From<T> for T

source§

fn from(t: T) -> T

Returns the argument unchanged.

§

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

§

fn from_ref(input: &T) -> T

Converts to this type from a reference to the input type.
§

impl<T> Instrument for T

§

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

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

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> IntoRequest<T> for T

source§

fn into_request(self) -> Request<T>

Wrap the input message T in a tonic::Request
source§

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

§

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

§

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

§

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.
§

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

§

fn vzip(self) -> V

§

impl<T> WithSubscriber for T

§

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
§

fn with_current_subscriber(self) -> WithDispatch<Self>

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