#[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
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>
The maximum disk size of the instance in bytes.
current_disk_size: Option<Int64Value>
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
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>
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
impl DatabaseInstance
pub fn new() -> Self
Sourcepub fn set_state<T: Into<SqlInstanceState>>(self, v: T) -> Self
pub fn set_state<T: Into<SqlInstanceState>>(self, v: T) -> Self
Sets the value of state.
Sourcepub fn set_database_version<T: Into<SqlDatabaseVersion>>(self, v: T) -> Self
pub fn set_database_version<T: Into<SqlDatabaseVersion>>(self, v: T) -> Self
Sets the value of database_version.
Sourcepub fn set_settings<T>(self, v: T) -> Self
pub fn set_settings<T>(self, v: T) -> Self
Sets the value of settings.
Sourcepub fn set_or_clear_settings<T>(self, v: Option<T>) -> Self
pub fn set_or_clear_settings<T>(self, v: Option<T>) -> Self
Sets or clears the value of settings.
Sourcepub fn set_failover_replica<T>(self, v: T) -> Selfwhere
T: Into<SqlFailoverReplica>,
pub fn set_failover_replica<T>(self, v: T) -> Selfwhere
T: Into<SqlFailoverReplica>,
Sets the value of failover_replica.
Sourcepub fn set_or_clear_failover_replica<T>(self, v: Option<T>) -> Selfwhere
T: Into<SqlFailoverReplica>,
pub fn set_or_clear_failover_replica<T>(self, v: Option<T>) -> Selfwhere
T: Into<SqlFailoverReplica>,
Sets or clears the value of failover_replica.
Sourcepub fn set_master_instance_name<T: Into<String>>(self, v: T) -> Self
pub fn set_master_instance_name<T: Into<String>>(self, v: T) -> Self
Sets the value of master_instance_name.
Sourcepub fn set_replica_names<T, V>(self, v: T) -> Self
pub fn set_replica_names<T, V>(self, v: T) -> Self
Sets the value of replica_names.
Sourcepub fn set_max_disk_size<T>(self, v: T) -> Selfwhere
T: Into<Int64Value>,
👎Deprecated
pub fn set_max_disk_size<T>(self, v: T) -> Selfwhere
T: Into<Int64Value>,
Sets the value of max_disk_size.
Sourcepub fn set_or_clear_max_disk_size<T>(self, v: Option<T>) -> Selfwhere
T: Into<Int64Value>,
👎Deprecated
pub fn set_or_clear_max_disk_size<T>(self, v: Option<T>) -> Selfwhere
T: Into<Int64Value>,
Sets or clears the value of max_disk_size.
Sourcepub fn set_current_disk_size<T>(self, v: T) -> Selfwhere
T: Into<Int64Value>,
👎Deprecated
pub fn set_current_disk_size<T>(self, v: T) -> Selfwhere
T: Into<Int64Value>,
Sets the value of current_disk_size.
Sourcepub fn set_or_clear_current_disk_size<T>(self, v: Option<T>) -> Selfwhere
T: Into<Int64Value>,
👎Deprecated
pub fn set_or_clear_current_disk_size<T>(self, v: Option<T>) -> Selfwhere
T: Into<Int64Value>,
Sets or clears the value of current_disk_size.
Sourcepub fn set_ip_addresses<T, V>(self, v: T) -> Self
pub fn set_ip_addresses<T, V>(self, v: T) -> Self
Sets the value of ip_addresses.
Sourcepub fn set_server_ca_cert<T>(self, v: T) -> Self
pub fn set_server_ca_cert<T>(self, v: T) -> Self
Sets the value of server_ca_cert.
Sourcepub fn set_or_clear_server_ca_cert<T>(self, v: Option<T>) -> Self
pub fn set_or_clear_server_ca_cert<T>(self, v: Option<T>) -> Self
Sets or clears the value of server_ca_cert.
Sourcepub fn set_instance_type<T: Into<SqlInstanceType>>(self, v: T) -> Self
pub fn set_instance_type<T: Into<SqlInstanceType>>(self, v: T) -> Self
Sets the value of instance_type.
Sourcepub fn set_project<T: Into<String>>(self, v: T) -> Self
pub fn set_project<T: Into<String>>(self, v: T) -> Self
Sets the value of project.
Sourcepub fn set_ipv6_address<T: Into<String>>(self, v: T) -> Self
👎Deprecated
pub fn set_ipv6_address<T: Into<String>>(self, v: T) -> Self
Sets the value of ipv6_address.
Sourcepub fn set_service_account_email_address<T: Into<String>>(self, v: T) -> Self
pub fn set_service_account_email_address<T: Into<String>>(self, v: T) -> Self
Sets the value of service_account_email_address.
Sourcepub fn set_on_premises_configuration<T>(self, v: T) -> Selfwhere
T: Into<OnPremisesConfiguration>,
pub fn set_on_premises_configuration<T>(self, v: T) -> Selfwhere
T: Into<OnPremisesConfiguration>,
Sets the value of on_premises_configuration.
Sourcepub fn set_or_clear_on_premises_configuration<T>(self, v: Option<T>) -> Selfwhere
T: Into<OnPremisesConfiguration>,
pub fn set_or_clear_on_premises_configuration<T>(self, v: Option<T>) -> Selfwhere
T: Into<OnPremisesConfiguration>,
Sets or clears the value of on_premises_configuration.
Sourcepub fn set_replica_configuration<T>(self, v: T) -> Selfwhere
T: Into<ReplicaConfiguration>,
pub fn set_replica_configuration<T>(self, v: T) -> Selfwhere
T: Into<ReplicaConfiguration>,
Sets the value of replica_configuration.
Sourcepub fn set_or_clear_replica_configuration<T>(self, v: Option<T>) -> Selfwhere
T: Into<ReplicaConfiguration>,
pub fn set_or_clear_replica_configuration<T>(self, v: Option<T>) -> Selfwhere
T: Into<ReplicaConfiguration>,
Sets or clears the value of replica_configuration.
Sourcepub fn set_backend_type<T: Into<SqlBackendType>>(self, v: T) -> Self
pub fn set_backend_type<T: Into<SqlBackendType>>(self, v: T) -> Self
Sets the value of backend_type.
Sourcepub fn set_self_link<T: Into<String>>(self, v: T) -> Self
pub fn set_self_link<T: Into<String>>(self, v: T) -> Self
Sets the value of self_link.
Sourcepub fn set_suspension_reason<T, V>(self, v: T) -> Self
pub fn set_suspension_reason<T, V>(self, v: T) -> Self
Sets the value of suspension_reason.
Sourcepub fn set_connection_name<T: Into<String>>(self, v: T) -> Self
pub fn set_connection_name<T: Into<String>>(self, v: T) -> Self
Sets the value of connection_name.
Sourcepub fn set_region<T: Into<String>>(self, v: T) -> Self
pub fn set_region<T: Into<String>>(self, v: T) -> Self
Sets the value of region.
Sourcepub fn set_gce_zone<T: Into<String>>(self, v: T) -> Self
pub fn set_gce_zone<T: Into<String>>(self, v: T) -> Self
Sets the value of gce_zone.
Sourcepub fn set_secondary_gce_zone<T: Into<String>>(self, v: T) -> Self
pub fn set_secondary_gce_zone<T: Into<String>>(self, v: T) -> Self
Sets the value of secondary_gce_zone.
Sourcepub fn set_disk_encryption_configuration<T>(self, v: T) -> Selfwhere
T: Into<DiskEncryptionConfiguration>,
pub fn set_disk_encryption_configuration<T>(self, v: T) -> Selfwhere
T: Into<DiskEncryptionConfiguration>,
Sets the value of disk_encryption_configuration.
Sourcepub fn set_or_clear_disk_encryption_configuration<T>(self, v: Option<T>) -> Selfwhere
T: Into<DiskEncryptionConfiguration>,
pub fn set_or_clear_disk_encryption_configuration<T>(self, v: Option<T>) -> Selfwhere
T: Into<DiskEncryptionConfiguration>,
Sets or clears the value of disk_encryption_configuration.
Sourcepub fn set_disk_encryption_status<T>(self, v: T) -> Selfwhere
T: Into<DiskEncryptionStatus>,
pub fn set_disk_encryption_status<T>(self, v: T) -> Selfwhere
T: Into<DiskEncryptionStatus>,
Sets the value of disk_encryption_status.
Sourcepub fn set_or_clear_disk_encryption_status<T>(self, v: Option<T>) -> Selfwhere
T: Into<DiskEncryptionStatus>,
pub fn set_or_clear_disk_encryption_status<T>(self, v: Option<T>) -> Selfwhere
T: Into<DiskEncryptionStatus>,
Sets or clears the value of disk_encryption_status.
Sourcepub fn set_root_password<T: Into<String>>(self, v: T) -> Self
pub fn set_root_password<T: Into<String>>(self, v: T) -> Self
Sets the value of root_password.
Sourcepub fn set_scheduled_maintenance<T>(self, v: T) -> Selfwhere
T: Into<SqlScheduledMaintenance>,
pub fn set_scheduled_maintenance<T>(self, v: T) -> Selfwhere
T: Into<SqlScheduledMaintenance>,
Sets the value of scheduled_maintenance.
Sourcepub fn set_or_clear_scheduled_maintenance<T>(self, v: Option<T>) -> Selfwhere
T: Into<SqlScheduledMaintenance>,
pub fn set_or_clear_scheduled_maintenance<T>(self, v: Option<T>) -> Selfwhere
T: Into<SqlScheduledMaintenance>,
Sets or clears the value of scheduled_maintenance.
Sourcepub fn set_satisfies_pzs<T>(self, v: T) -> Self
pub fn set_satisfies_pzs<T>(self, v: T) -> Self
Sets the value of satisfies_pzs.
Sourcepub fn set_or_clear_satisfies_pzs<T>(self, v: Option<T>) -> Self
pub fn set_or_clear_satisfies_pzs<T>(self, v: Option<T>) -> Self
Sets or clears the value of satisfies_pzs.
Sourcepub fn set_database_installed_version<T: Into<String>>(self, v: T) -> Self
pub fn set_database_installed_version<T: Into<String>>(self, v: T) -> Self
Sets the value of database_installed_version.
Sourcepub fn set_out_of_disk_report<T>(self, v: T) -> Selfwhere
T: Into<SqlOutOfDiskReport>,
pub fn set_out_of_disk_report<T>(self, v: T) -> Selfwhere
T: Into<SqlOutOfDiskReport>,
Sets the value of out_of_disk_report.
Sourcepub fn set_or_clear_out_of_disk_report<T>(self, v: Option<T>) -> Selfwhere
T: Into<SqlOutOfDiskReport>,
pub fn set_or_clear_out_of_disk_report<T>(self, v: Option<T>) -> Selfwhere
T: Into<SqlOutOfDiskReport>,
Sets or clears the value of out_of_disk_report.
Sourcepub fn set_create_time<T>(self, v: T) -> Self
pub fn set_create_time<T>(self, v: T) -> Self
Sets the value of create_time.
Sourcepub fn set_or_clear_create_time<T>(self, v: Option<T>) -> Self
pub fn set_or_clear_create_time<T>(self, v: Option<T>) -> Self
Sets or clears the value of create_time.
Sourcepub fn set_available_maintenance_versions<T, V>(self, v: T) -> Self
pub fn set_available_maintenance_versions<T, V>(self, v: T) -> Self
Sets the value of available_maintenance_versions.
Sourcepub fn set_maintenance_version<T: Into<String>>(self, v: T) -> Self
pub fn set_maintenance_version<T: Into<String>>(self, v: T) -> Self
Sets the value of maintenance_version.
Sourcepub fn set_upgradable_database_versions<T, V>(self, v: T) -> Self
pub fn set_upgradable_database_versions<T, V>(self, v: T) -> Self
Sets the value of upgradable_database_versions.
Sourcepub fn set_sql_network_architecture<T>(self, v: T) -> Selfwhere
T: Into<SqlNetworkArchitecture>,
pub fn set_sql_network_architecture<T>(self, v: T) -> Selfwhere
T: Into<SqlNetworkArchitecture>,
Sets the value of sql_network_architecture.
Sourcepub fn set_or_clear_sql_network_architecture<T>(self, v: Option<T>) -> Selfwhere
T: Into<SqlNetworkArchitecture>,
pub fn set_or_clear_sql_network_architecture<T>(self, v: Option<T>) -> Selfwhere
T: Into<SqlNetworkArchitecture>,
Sets or clears the value of sql_network_architecture.
Sourcepub fn set_psc_service_attachment_link<T>(self, v: T) -> Self
pub fn set_psc_service_attachment_link<T>(self, v: T) -> Self
Sets the value of psc_service_attachment_link.
Sourcepub fn set_or_clear_psc_service_attachment_link<T>(self, v: Option<T>) -> Self
pub fn set_or_clear_psc_service_attachment_link<T>(self, v: Option<T>) -> Self
Sets or clears the value of psc_service_attachment_link.
Sourcepub fn set_dns_name<T>(self, v: T) -> Self
pub fn set_dns_name<T>(self, v: T) -> Self
Sets the value of dns_name.
Sourcepub fn set_or_clear_dns_name<T>(self, v: Option<T>) -> Self
pub fn set_or_clear_dns_name<T>(self, v: Option<T>) -> Self
Sets or clears the value of dns_name.
Sourcepub fn set_primary_dns_name<T>(self, v: T) -> Self
👎Deprecated
pub fn set_primary_dns_name<T>(self, v: T) -> Self
Sets the value of primary_dns_name.
Sourcepub fn set_or_clear_primary_dns_name<T>(self, v: Option<T>) -> Self
👎Deprecated
pub fn set_or_clear_primary_dns_name<T>(self, v: Option<T>) -> Self
Sets or clears the value of primary_dns_name.
Sourcepub fn set_write_endpoint<T>(self, v: T) -> Self
pub fn set_write_endpoint<T>(self, v: T) -> Self
Sets the value of write_endpoint.
Sourcepub fn set_or_clear_write_endpoint<T>(self, v: Option<T>) -> Self
pub fn set_or_clear_write_endpoint<T>(self, v: Option<T>) -> Self
Sets or clears the value of write_endpoint.
Sourcepub fn set_replication_cluster<T>(self, v: T) -> Selfwhere
T: Into<ReplicationCluster>,
pub fn set_replication_cluster<T>(self, v: T) -> Selfwhere
T: Into<ReplicationCluster>,
Sets the value of replication_cluster.
Sourcepub fn set_or_clear_replication_cluster<T>(self, v: Option<T>) -> Selfwhere
T: Into<ReplicationCluster>,
pub fn set_or_clear_replication_cluster<T>(self, v: Option<T>) -> Selfwhere
T: Into<ReplicationCluster>,
Sets or clears the value of replication_cluster.
Sourcepub fn set_gemini_config<T>(self, v: T) -> Selfwhere
T: Into<GeminiInstanceConfig>,
pub fn set_gemini_config<T>(self, v: T) -> Selfwhere
T: Into<GeminiInstanceConfig>,
Sets the value of gemini_config.
Sourcepub fn set_or_clear_gemini_config<T>(self, v: Option<T>) -> Selfwhere
T: Into<GeminiInstanceConfig>,
pub fn set_or_clear_gemini_config<T>(self, v: Option<T>) -> Selfwhere
T: Into<GeminiInstanceConfig>,
Sets or clears the value of gemini_config.
Sourcepub fn set_satisfies_pzi<T>(self, v: T) -> Self
pub fn set_satisfies_pzi<T>(self, v: T) -> Self
Sets the value of satisfies_pzi.
Sourcepub fn set_or_clear_satisfies_pzi<T>(self, v: Option<T>) -> Self
pub fn set_or_clear_satisfies_pzi<T>(self, v: Option<T>) -> Self
Sets or clears the value of satisfies_pzi.
Sourcepub fn set_switch_transaction_logs_to_cloud_storage_enabled<T>(
self,
v: T,
) -> Self
pub fn set_switch_transaction_logs_to_cloud_storage_enabled<T>( self, v: T, ) -> Self
Sets the value of switch_transaction_logs_to_cloud_storage_enabled.
Sourcepub fn set_or_clear_switch_transaction_logs_to_cloud_storage_enabled<T>(
self,
v: Option<T>,
) -> Self
pub fn set_or_clear_switch_transaction_logs_to_cloud_storage_enabled<T>( self, v: Option<T>, ) -> Self
Sets or clears the value of switch_transaction_logs_to_cloud_storage_enabled.
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 more