Struct DatabaseInstance

Source
#[non_exhaustive]
pub struct DatabaseInstance {
Show 46 fields pub kind: String, pub state: SqlInstanceState, pub database_version: SqlDatabaseVersion, pub settings: Option<Settings>, pub etag: String, pub failover_replica: Option<SqlFailoverReplica>, pub master_instance_name: String, pub replica_names: Vec<String>, pub max_disk_size: Option<Int64Value>, pub current_disk_size: Option<Int64Value>, pub ip_addresses: Vec<IpMapping>, pub server_ca_cert: Option<SslCert>, pub instance_type: SqlInstanceType, pub project: String, pub ipv6_address: String, pub service_account_email_address: String, pub on_premises_configuration: Option<OnPremisesConfiguration>, pub replica_configuration: Option<ReplicaConfiguration>, pub backend_type: SqlBackendType, pub self_link: String, pub suspension_reason: Vec<SqlSuspensionReason>, pub connection_name: String, pub name: String, pub region: String, pub gce_zone: String, pub secondary_gce_zone: String, pub disk_encryption_configuration: Option<DiskEncryptionConfiguration>, pub disk_encryption_status: Option<DiskEncryptionStatus>, pub root_password: String, pub scheduled_maintenance: Option<SqlScheduledMaintenance>, pub satisfies_pzs: Option<BoolValue>, pub database_installed_version: String, pub out_of_disk_report: Option<SqlOutOfDiskReport>, pub create_time: Option<Timestamp>, pub available_maintenance_versions: Vec<String>, pub maintenance_version: String, pub upgradable_database_versions: Vec<AvailableDatabaseVersion>, pub sql_network_architecture: Option<SqlNetworkArchitecture>, pub psc_service_attachment_link: Option<String>, pub dns_name: Option<String>, pub primary_dns_name: Option<String>, pub write_endpoint: Option<String>, pub replication_cluster: Option<ReplicationCluster>, pub gemini_config: Option<GeminiInstanceConfig>, pub satisfies_pzi: Option<BoolValue>, pub switch_transaction_logs_to_cloud_storage_enabled: Option<BoolValue>, /* private fields */
}
Expand description

A Cloud SQL instance resource.

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.
§kind: String

This is always sql#instance.

§state: SqlInstanceState

The current serving state of the Cloud SQL instance.

§database_version: SqlDatabaseVersion

The database engine type and version. The databaseVersion field cannot be changed after instance creation.

§settings: Option<Settings>

The user settings.

§etag: String

This field is deprecated and will be removed from a future version of the API. Use the settings.settingsVersion field instead.

§failover_replica: Option<SqlFailoverReplica>

The name and status of the failover replica.

§master_instance_name: String

The name of the instance which will act as primary in the replication setup.

§replica_names: Vec<String>

The replicas of the instance.

§max_disk_size: Option<Int64Value>
👎Deprecated

The maximum disk size of the instance in bytes.

§current_disk_size: Option<Int64Value>
👎Deprecated

The current disk usage of the instance in bytes. This property has been deprecated. Use the “cloudsql.googleapis.com/database/disk/bytes_used” metric in Cloud Monitoring API instead. Please see this announcement for details.

§ip_addresses: Vec<IpMapping>

The assigned IP addresses for the instance.

§server_ca_cert: Option<SslCert>

SSL configuration.

§instance_type: SqlInstanceType

The instance type.

§project: String

The project ID of the project containing the Cloud SQL instance. The Google apps domain is prefixed if applicable.

§ipv6_address: String
👎Deprecated

The IPv6 address assigned to the instance. (Deprecated) This property was applicable only to First Generation instances.

§service_account_email_address: String

The service account email address assigned to the instance.\This property is read-only.

§on_premises_configuration: Option<OnPremisesConfiguration>

Configuration specific to on-premises instances.

§replica_configuration: Option<ReplicaConfiguration>

Configuration specific to failover replicas and read replicas.

§backend_type: SqlBackendType

The backend type. SECOND_GEN: Cloud SQL database instance. EXTERNAL: A database server that is not managed by Google.

This property is read-only; use the tier property in the settings object to determine the database type.

§self_link: String

The URI of this resource.

§suspension_reason: Vec<SqlSuspensionReason>

If the instance state is SUSPENDED, the reason for the suspension.

§connection_name: String

Connection name of the Cloud SQL instance used in connection strings.

§name: String

Name of the Cloud SQL instance. This does not include the project ID.

§region: String

The geographical region of the Cloud SQL instance.

It can be one of the regions where Cloud SQL operates:

For example, asia-east1, europe-west1, and us-central1. The default value is us-central1.

§gce_zone: String

The Compute Engine zone that the instance is currently serving from. This value could be different from the zone that was specified when the instance was created if the instance has failed over to its secondary zone. WARNING: Changing this might restart the instance.

§secondary_gce_zone: String

The Compute Engine zone that the failover instance is currently serving from for a regional instance. This value could be different from the zone that was specified when the instance was created if the instance has failed over to its secondary/failover zone.

§disk_encryption_configuration: Option<DiskEncryptionConfiguration>

Disk encryption configuration specific to an instance.

§disk_encryption_status: Option<DiskEncryptionStatus>

Disk encryption status specific to an instance.

§root_password: String

Initial root password. Use only on creation. You must set root passwords before you can connect to PostgreSQL instances.

§scheduled_maintenance: Option<SqlScheduledMaintenance>

The start time of any upcoming scheduled maintenance for this instance.

§satisfies_pzs: Option<BoolValue>

This status indicates whether the instance satisfies PZS.

The status is reserved for future use.

§database_installed_version: String

Output only. Stores the current database version running on the instance including minor version such as MYSQL_8_0_18.

§out_of_disk_report: Option<SqlOutOfDiskReport>

This field represents the report generated by the proactive database wellness job for OutOfDisk issues.

  • Writers:
  • the proactive database wellness job for OOD.
  • Readers:
  • the proactive database wellness job
§create_time: Option<Timestamp>

Output only. The time when the instance was created in RFC 3339 format, for example 2012-11-15T16:19:00.094Z.

§available_maintenance_versions: Vec<String>

Output only. List all maintenance versions applicable on the instance

§maintenance_version: String

The current software version on the instance.

§upgradable_database_versions: Vec<AvailableDatabaseVersion>

Output only. All database versions that are available for upgrade.

§sql_network_architecture: Option<SqlNetworkArchitecture>§psc_service_attachment_link: Option<String>

Output only. The link to service attachment of PSC instance.

§dns_name: Option<String>

Output only. The dns name of the instance.

§primary_dns_name: Option<String>
👎Deprecated

Output only. DEPRECATED: please use write_endpoint instead.

§write_endpoint: Option<String>

Output only. The dns name of the primary instance in a replication group.

§replication_cluster: Option<ReplicationCluster>

Optional. A primary instance and disaster recovery (DR) replica pair. A DR replica is a cross-region replica that you designate for failover in the event that the primary instance experiences regional failure. Only applicable to MySQL.

§gemini_config: Option<GeminiInstanceConfig>

Gemini instance configuration.

§satisfies_pzi: Option<BoolValue>

Output only. This status indicates whether the instance satisfies PZI.

The status is reserved for future use.

§switch_transaction_logs_to_cloud_storage_enabled: Option<BoolValue>

Input only. Whether Cloud SQL is enabled to switch storing point-in-time recovery log files from a data disk to Cloud Storage.

Implementations§

Source§

impl DatabaseInstance

Source

pub fn new() -> Self

Source

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

Sets the value of kind.

Source

pub fn set_state<T: Into<SqlInstanceState>>(self, v: T) -> Self

Sets the value of state.

Source

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

Sets the value of database_version.

Source

pub fn set_settings<T>(self, v: T) -> Self
where T: Into<Settings>,

Sets the value of settings.

Source

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

Sets or clears the value of settings.

Source

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

Sets the value of etag.

Source

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

Sets the value of failover_replica.

Source

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

Sets or clears the value of failover_replica.

Source

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

Sets the value of master_instance_name.

Source

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

Sets the value of replica_names.

Source

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

👎Deprecated

Sets the value of max_disk_size.

Source

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

👎Deprecated

Sets or clears the value of max_disk_size.

Source

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

👎Deprecated

Sets the value of current_disk_size.

Source

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

👎Deprecated

Sets or clears the value of current_disk_size.

Source

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

Sets the value of ip_addresses.

Source

pub fn set_server_ca_cert<T>(self, v: T) -> Self
where T: Into<SslCert>,

Sets the value of server_ca_cert.

Source

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

Sets or clears the value of server_ca_cert.

Source

pub fn set_instance_type<T: Into<SqlInstanceType>>(self, v: T) -> Self

Sets the value of instance_type.

Source

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

Sets the value of project.

Source

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

👎Deprecated

Sets the value of ipv6_address.

Source

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

Sets the value of service_account_email_address.

Source

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

Sets the value of on_premises_configuration.

Source

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

Sets or clears the value of on_premises_configuration.

Source

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

Sets the value of replica_configuration.

Source

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

Sets or clears the value of replica_configuration.

Source

pub fn set_backend_type<T: Into<SqlBackendType>>(self, v: T) -> Self

Sets the value of backend_type.

Sets the value of self_link.

Source

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

Sets the value of suspension_reason.

Source

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

Sets the value of connection_name.

Source

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

Sets the value of name.

Source

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

Sets the value of region.

Source

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

Sets the value of gce_zone.

Source

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

Sets the value of secondary_gce_zone.

Source

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

Sets the value of disk_encryption_configuration.

Source

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

Sets or clears the value of disk_encryption_configuration.

Source

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

Sets the value of disk_encryption_status.

Source

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

Sets or clears the value of disk_encryption_status.

Source

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

Sets the value of root_password.

Source

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

Sets the value of scheduled_maintenance.

Source

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

Sets or clears the value of scheduled_maintenance.

Source

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

Sets the value of satisfies_pzs.

Source

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

Sets or clears the value of satisfies_pzs.

Source

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

Sets the value of database_installed_version.

Source

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

Sets the value of out_of_disk_report.

Source

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

Sets or clears the value of out_of_disk_report.

Source

pub fn set_create_time<T>(self, v: T) -> Self
where T: Into<Timestamp>,

Sets the value of create_time.

Source

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

Sets or clears the value of create_time.

Source

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

Sets the value of available_maintenance_versions.

Source

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

Sets the value of maintenance_version.

Source

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

Sets the value of upgradable_database_versions.

Source

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

Sets the value of sql_network_architecture.

Source

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

Sets or clears the value of sql_network_architecture.

Sets the value of psc_service_attachment_link.

Sets or clears the value of psc_service_attachment_link.

Source

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

Sets the value of dns_name.

Source

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

Sets or clears the value of dns_name.

Source

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

👎Deprecated

Sets the value of primary_dns_name.

Source

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

👎Deprecated

Sets or clears the value of primary_dns_name.

Source

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

Sets the value of write_endpoint.

Source

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

Sets or clears the value of write_endpoint.

Source

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

Sets the value of replication_cluster.

Source

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

Sets or clears the value of replication_cluster.

Source

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

Sets the value of gemini_config.

Source

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

Sets or clears the value of gemini_config.

Source

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

Sets the value of satisfies_pzi.

Source

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

Sets or clears the value of satisfies_pzi.

Source

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

Source

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

Trait Implementations§

Source§

impl Clone for DatabaseInstance

Source§

fn clone(&self) -> DatabaseInstance

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 DatabaseInstance

Source§

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

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

impl Default for DatabaseInstance

Source§

fn default() -> DatabaseInstance

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

impl Message for DatabaseInstance

Source§

fn typename() -> &'static str

The typename of this message.
Source§

impl PartialEq for DatabaseInstance

Source§

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

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,