Struct DatabaseInstance

Source
pub struct DatabaseInstance {
Show 29 fields pub backend_type: Option<String>, pub connection_name: Option<String>, pub current_disk_size: Option<i64>, pub database_version: Option<String>, pub disk_encryption_configuration: Option<DiskEncryptionConfiguration>, pub disk_encryption_status: Option<DiskEncryptionStatus>, pub etag: Option<String>, pub failover_replica: Option<DatabaseInstanceFailoverReplica>, pub gce_zone: Option<String>, pub instance_type: Option<String>, pub ip_addresses: Option<Vec<IpMapping>>, pub ipv6_address: Option<String>, pub kind: Option<String>, pub master_instance_name: Option<String>, pub max_disk_size: Option<i64>, pub name: Option<String>, pub on_premises_configuration: Option<OnPremisesConfiguration>, pub project: Option<String>, pub region: Option<String>, pub replica_configuration: Option<ReplicaConfiguration>, pub replica_names: Option<Vec<String>>, pub root_password: Option<String>, pub scheduled_maintenance: Option<SqlScheduledMaintenance>, pub self_link: Option<String>, pub server_ca_cert: Option<SslCert>, pub service_account_email_address: Option<String>, pub settings: Option<Settings>, pub state: Option<String>, pub suspension_reason: Option<Vec<String>>,
}
Expand description

A Cloud SQL instance resource.

§Activities

This type is used in activities, which are methods you may call on this type or where this type is involved in. The list links the activity name, along with information about where it is used (one of request and response).

Fields§

§backend_type: Option<String>

FIRST_GEN: First Generation instance. MySQL only.
SECOND_GEN: Second Generation instance or PostgreSQL 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 and Second or First Generation.

§connection_name: Option<String>

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

§current_disk_size: Option<i64>

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

§database_version: Option<String>

The database engine type and version. The databaseVersion field can not be changed after instance creation. MySQL Second Generation instances: MYSQL_5_7 (default) or MYSQL_5_6. PostgreSQL instances: POSTGRES_9_6 (default) or POSTGRES_11 Beta MySQL First Generation instances: MYSQL_5_6 (default) or MYSQL_5_5

§disk_encryption_configuration: Option<DiskEncryptionConfiguration>

Disk encryption configuration specific to an instance. Applies only to Second Generation instances.

§disk_encryption_status: Option<DiskEncryptionStatus>

Disk encryption status specific to an instance. Applies only to Second Generation instances.

§etag: Option<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<DatabaseInstanceFailoverReplica>

The name and status of the failover replica. This property is applicable only to Second Generation instances.

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

§instance_type: Option<String>

The instance type. This can be one of the following.
CLOUD_SQL_INSTANCE: A Cloud SQL instance that is not replicating from a master.
ON_PREMISES_INSTANCE: An instance running on the customer’s premises.
READ_REPLICA_INSTANCE: A Cloud SQL instance configured as a read-replica.

§ip_addresses: Option<Vec<IpMapping>>

The assigned IP addresses for the instance.

§ipv6_address: Option<String>

The IPv6 address assigned to the instance. This property is applicable only to First Generation instances.

§kind: Option<String>

This is always sql#instance.

§master_instance_name: Option<String>

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

§max_disk_size: Option<i64>

The maximum disk size of the instance in bytes.

§name: Option<String>

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

§on_premises_configuration: Option<OnPremisesConfiguration>

Configuration specific to on-premises instances.

§project: Option<String>

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

§region: Option<String>

The geographical region. Can be us-central (FIRST_GEN instances only), us-central1 (SECOND_GEN instances only), asia-east1 or europe-west1. Defaults to us-central or us-central1 depending on the instance type (First Generation or Second Generation). The region can not be changed after instance creation.

§replica_configuration: Option<ReplicaConfiguration>

Configuration specific to failover replicas and read replicas.

§replica_names: Option<Vec<String>>

The replicas of the instance.

§root_password: Option<String>

Initial root password. Use only on creation.

§scheduled_maintenance: Option<SqlScheduledMaintenance>

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

§self_link: Option<String>

The URI of this resource.

§server_ca_cert: Option<SslCert>

SSL configuration.

§service_account_email_address: Option<String>

The service account email address assigned to the instance. This property is applicable only to Second Generation instances.

§settings: Option<Settings>

The user settings.

§state: Option<String>

The current serving state of the Cloud SQL instance. This can be one of the following.
RUNNABLE: The instance is running, or is ready to run when accessed.
SUSPENDED: The instance is not available, for example due to problems with billing.
PENDING_CREATE: The instance is being created.
MAINTENANCE: The instance is down for maintenance.
FAILED: The instance creation failed.
UNKNOWN_STATE: The state of the instance is unknown.

§suspension_reason: Option<Vec<String>>

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

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

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

impl<'de> Deserialize<'de> for DatabaseInstance

Source§

fn deserialize<__D>(__deserializer: __D) -> Result<Self, __D::Error>
where __D: Deserializer<'de>,

Deserialize this value from the given Serde deserializer. Read more
Source§

impl Serialize for DatabaseInstance

Source§

fn serialize<__S>(&self, __serializer: __S) -> Result<__S::Ok, __S::Error>
where __S: Serializer,

Serialize this value into the given Serde serializer. Read more
Source§

impl RequestValue for DatabaseInstance

Source§

impl ResponseResult 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> IntoEither for T

Source§

fn into_either(self, into_left: bool) -> Either<Self, Self>

Converts self into a Left variant of Either<Self, Self> if into_left is true. Converts self into a Right variant of Either<Self, Self> otherwise. Read more
Source§

fn into_either_with<F>(self, into_left: F) -> Either<Self, Self>
where F: FnOnce(&Self) -> bool,

Converts self into a Left variant of Either<Self, Self> if into_left(&self) returns true. Converts self into a Right variant of Either<Self, Self> otherwise. 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<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,