Struct google_api_proto::google::cloud::sql::v1::DatabaseInstance
source · pub struct DatabaseInstance {Show 46 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 upgradable_database_versions: Vec<AvailableDatabaseVersion>,
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>,
pub satisfies_pzi: Option<bool>,
pub switch_transaction_logs_to_cloud_storage_enabled: Option<bool>,
}
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>
The maximum disk size of the instance in bytes.
current_disk_size: Option<i64>
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
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>
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<i32>
§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>
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<bool>
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<bool>
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
impl DatabaseInstance
sourcepub fn state(&self) -> SqlInstanceState
pub fn state(&self) -> SqlInstanceState
Returns the enum value of state
, or the default if the field is set to an invalid enum value.
sourcepub fn set_state(&mut self, value: SqlInstanceState)
pub fn set_state(&mut self, value: SqlInstanceState)
Sets state
to the provided enum value.
sourcepub fn database_version(&self) -> SqlDatabaseVersion
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.
sourcepub fn set_database_version(&mut self, value: SqlDatabaseVersion)
pub fn set_database_version(&mut self, value: SqlDatabaseVersion)
Sets database_version
to the provided enum value.
sourcepub fn instance_type(&self) -> SqlInstanceType
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.
sourcepub fn set_instance_type(&mut self, value: SqlInstanceType)
pub fn set_instance_type(&mut self, value: SqlInstanceType)
Sets instance_type
to the provided enum value.
sourcepub fn backend_type(&self) -> SqlBackendType
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.
sourcepub fn set_backend_type(&mut self, value: SqlBackendType)
pub fn set_backend_type(&mut self, value: SqlBackendType)
Sets backend_type
to the provided enum value.
sourcepub fn suspension_reason(
&self,
) -> FilterMap<Cloned<Iter<'_, i32>>, fn(_: i32) -> Option<SqlSuspensionReason>>
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
.
sourcepub fn push_suspension_reason(&mut self, value: SqlSuspensionReason)
pub fn push_suspension_reason(&mut self, value: SqlSuspensionReason)
Appends the provided enum value to suspension_reason
.
sourcepub fn sql_network_architecture(&self) -> SqlNetworkArchitecture
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.
sourcepub fn set_sql_network_architecture(&mut self, value: SqlNetworkArchitecture)
pub fn set_sql_network_architecture(&mut self, value: SqlNetworkArchitecture)
Sets sql_network_architecture
to the provided enum value.
sourcepub fn psc_service_attachment_link(&self) -> &str
pub fn psc_service_attachment_link(&self) -> &str
Returns the value of psc_service_attachment_link
, or the default value if psc_service_attachment_link
is unset.
sourcepub fn dns_name(&self) -> &str
pub fn dns_name(&self) -> &str
Returns the value of dns_name
, or the default value if dns_name
is unset.
sourcepub fn primary_dns_name(&self) -> &str
pub fn primary_dns_name(&self) -> &str
Returns the value of primary_dns_name
, or the default value if primary_dns_name
is unset.
sourcepub fn write_endpoint(&self) -> &str
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
impl Clone for DatabaseInstance
source§fn clone(&self) -> DatabaseInstance
fn clone(&self) -> DatabaseInstance
1.0.0 · source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
source
. Read moresource§impl Debug for DatabaseInstance
impl Debug for DatabaseInstance
source§impl Default for DatabaseInstance
impl Default for DatabaseInstance
source§impl Message for DatabaseInstance
impl Message for DatabaseInstance
source§fn encoded_len(&self) -> usize
fn encoded_len(&self) -> usize
source§fn encode(&self, buf: &mut impl BufMut) -> Result<(), EncodeError>where
Self: Sized,
fn encode(&self, buf: &mut impl BufMut) -> Result<(), EncodeError>where
Self: Sized,
source§fn encode_to_vec(&self) -> Vec<u8>where
Self: Sized,
fn encode_to_vec(&self) -> Vec<u8>where
Self: Sized,
source§fn encode_length_delimited(
&self,
buf: &mut impl BufMut,
) -> Result<(), EncodeError>where
Self: Sized,
fn encode_length_delimited(
&self,
buf: &mut impl BufMut,
) -> Result<(), EncodeError>where
Self: Sized,
source§fn encode_length_delimited_to_vec(&self) -> Vec<u8>where
Self: Sized,
fn encode_length_delimited_to_vec(&self) -> Vec<u8>where
Self: Sized,
source§fn decode(buf: impl Buf) -> Result<Self, DecodeError>where
Self: Default,
fn decode(buf: impl Buf) -> Result<Self, DecodeError>where
Self: Default,
source§fn decode_length_delimited(buf: impl Buf) -> Result<Self, DecodeError>where
Self: Default,
fn decode_length_delimited(buf: impl Buf) -> Result<Self, DecodeError>where
Self: Default,
source§fn merge(&mut self, buf: impl Buf) -> Result<(), DecodeError>where
Self: Sized,
fn merge(&mut self, buf: impl Buf) -> Result<(), DecodeError>where
Self: Sized,
self
. Read moresource§fn merge_length_delimited(&mut self, buf: impl Buf) -> Result<(), DecodeError>where
Self: Sized,
fn merge_length_delimited(&mut self, buf: impl Buf) -> Result<(), DecodeError>where
Self: Sized,
self
.source§impl PartialEq for DatabaseInstance
impl PartialEq for DatabaseInstance
source§fn eq(&self, other: &DatabaseInstance) -> bool
fn eq(&self, other: &DatabaseInstance) -> bool
self
and other
values to be equal, and is used
by ==
.impl StructuralPartialEq for DatabaseInstance
Auto Trait Implementations§
impl Freeze for DatabaseInstance
impl RefUnwindSafe for DatabaseInstance
impl Send for DatabaseInstance
impl Sync for DatabaseInstance
impl Unpin for DatabaseInstance
impl UnwindSafe for DatabaseInstance
Blanket Implementations§
source§impl<T> BorrowMut<T> for Twhere
T: ?Sized,
impl<T> BorrowMut<T> for Twhere
T: ?Sized,
source§fn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
§impl<T> Instrument for T
impl<T> Instrument for T
§fn instrument(self, span: Span) -> Instrumented<Self>
fn instrument(self, span: Span) -> Instrumented<Self>
§fn in_current_span(self) -> Instrumented<Self>
fn in_current_span(self) -> Instrumented<Self>
source§impl<T> IntoRequest<T> for T
impl<T> IntoRequest<T> for T
source§fn into_request(self) -> Request<T>
fn into_request(self) -> Request<T>
T
in a tonic::Request