pub struct DatabaseInstance {
Show 43 fields pub kind: String, pub state: i32, pub database_version: i32, 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<i64>, pub current_disk_size: Option<i64>, pub ip_addresses: Vec<IpMapping>, pub server_ca_cert: Option<SslCert>, pub instance_type: i32, 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: i32, pub self_link: String, pub suspension_reason: Vec<i32>, 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<bool>, 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 sql_network_architecture: Option<i32>, 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>,
}
Expand description

A Cloud SQL instance resource.

Fields§

§kind: String

This is always sql#instance.

§state: i32

The current serving state of the Cloud SQL instance.

§database_version: i32

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<i64>
👎Deprecated

The maximum disk size of the instance in bytes.

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

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

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

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

The status indicating if instance satisfiesPzs. 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.

§sql_network_architecture: Option<i32>

The SQL network architecture for the instance.

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

The pair of a primary instance and disaster recovery (DR) replica. A DR replica is a cross-region replica that you designate for failover in the event that the primary instance has regional failure.

§gemini_config: Option<GeminiInstanceConfig>

Gemini instance configuration.

Implementations§

source§

impl DatabaseInstance

source

pub fn state(&self) -> SqlInstanceState

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

source

pub fn set_state(&mut self, value: SqlInstanceState)

Sets state to the provided enum value.

source

pub fn database_version(&self) -> SqlDatabaseVersion

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

source

pub fn set_database_version(&mut self, value: SqlDatabaseVersion)

Sets database_version to the provided enum value.

source

pub fn instance_type(&self) -> SqlInstanceType

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

source

pub fn set_instance_type(&mut self, value: SqlInstanceType)

Sets instance_type to the provided enum value.

source

pub fn backend_type(&self) -> SqlBackendType

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

source

pub fn set_backend_type(&mut self, value: SqlBackendType)

Sets backend_type to the provided enum value.

source

pub fn suspension_reason( &self ) -> FilterMap<Cloned<Iter<'_, i32>>, fn(_: i32) -> Option<SqlSuspensionReason>>

Returns an iterator which yields the valid enum values contained in suspension_reason.

source

pub fn push_suspension_reason(&mut self, value: SqlSuspensionReason)

Appends the provided enum value to suspension_reason.

source

pub fn sql_network_architecture(&self) -> SqlNetworkArchitecture

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

source

pub fn set_sql_network_architecture(&mut self, value: SqlNetworkArchitecture)

Sets sql_network_architecture to the provided enum value.

Returns the value of psc_service_attachment_link, or the default value if psc_service_attachment_link is unset.

source

pub fn dns_name(&self) -> &str

Returns the value of dns_name, or the default value if dns_name is unset.

source

pub fn primary_dns_name(&self) -> &str

Returns the value of primary_dns_name, or the default value if primary_dns_name is unset.

source

pub fn write_endpoint(&self) -> &str

Returns the value of write_endpoint, or the default value if write_endpoint is unset.

Trait Implementations§

source§

impl Clone for DatabaseInstance

source§

fn clone(&self) -> DatabaseInstance

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 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() -> Self

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

impl Message for DatabaseInstance

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 DatabaseInstance

source§

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