Reference documentation and code samples for the Cloud SQL Admin V1 API class Google::Cloud::Sql::V1::DatabaseInstance.
A Cloud SQL instance resource.
Inherits
- Object
Extended By
- Google::Protobuf::MessageExts::ClassMethods
Includes
- Google::Protobuf::MessageExts
Methods
#available_maintenance_versions
def available_maintenance_versions() -> ::Array<::String>- (::Array<::String>) — Output only. List all maintenance versions applicable on the instance
#backend_type
def backend_type() -> ::Google::Cloud::Sql::V1::SqlBackendType-
(::Google::Cloud::Sql::V1::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
tierproperty in thesettingsobject to determine the database type.
#backend_type=
def backend_type=(value) -> ::Google::Cloud::Sql::V1::SqlBackendType-
value (::Google::Cloud::Sql::V1::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
tierproperty in thesettingsobject to determine the database type.
-
(::Google::Cloud::Sql::V1::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
tierproperty in thesettingsobject to determine the database type.
#connection_name
def connection_name() -> ::String- (::String) — Connection name of the Cloud SQL instance used in connection strings.
#connection_name=
def connection_name=(value) -> ::String- value (::String) — Connection name of the Cloud SQL instance used in connection strings.
- (::String) — Connection name of the Cloud SQL instance used in connection strings.
#create_time
def create_time() -> ::Google::Protobuf::Timestamp-
(::Google::Protobuf::Timestamp) — Output only. The time when the instance was created in
RFC 3339 format, for example
2012-11-15T16:19:00.094Z.
#current_disk_size
def current_disk_size() -> ::Google::Protobuf::Int64Value- (::Google::Protobuf::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.
#current_disk_size=
def current_disk_size=(value) -> ::Google::Protobuf::Int64Value- value (::Google::Protobuf::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.
- (::Google::Protobuf::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.
#database_installed_version
def database_installed_version() -> ::String-
(::String) — Output only. Stores the current database version running on the instance
including minor version such as
MYSQL_8_0_18.
#database_version
def database_version() -> ::Google::Cloud::Sql::V1::SqlDatabaseVersion-
(::Google::Cloud::Sql::V1::SqlDatabaseVersion) — The database engine type and version. The
databaseVersionfield cannot be changed after instance creation.
#database_version=
def database_version=(value) -> ::Google::Cloud::Sql::V1::SqlDatabaseVersion-
value (::Google::Cloud::Sql::V1::SqlDatabaseVersion) — The database engine type and version. The
databaseVersionfield cannot be changed after instance creation.
-
(::Google::Cloud::Sql::V1::SqlDatabaseVersion) — The database engine type and version. The
databaseVersionfield cannot be changed after instance creation.
#disk_encryption_configuration
def disk_encryption_configuration() -> ::Google::Cloud::Sql::V1::DiskEncryptionConfiguration- (::Google::Cloud::Sql::V1::DiskEncryptionConfiguration) — Disk encryption configuration specific to an instance.
#disk_encryption_configuration=
def disk_encryption_configuration=(value) -> ::Google::Cloud::Sql::V1::DiskEncryptionConfiguration- value (::Google::Cloud::Sql::V1::DiskEncryptionConfiguration) — Disk encryption configuration specific to an instance.
- (::Google::Cloud::Sql::V1::DiskEncryptionConfiguration) — Disk encryption configuration specific to an instance.
#disk_encryption_status
def disk_encryption_status() -> ::Google::Cloud::Sql::V1::DiskEncryptionStatus- (::Google::Cloud::Sql::V1::DiskEncryptionStatus) — Disk encryption status specific to an instance.
#disk_encryption_status=
def disk_encryption_status=(value) -> ::Google::Cloud::Sql::V1::DiskEncryptionStatus- value (::Google::Cloud::Sql::V1::DiskEncryptionStatus) — Disk encryption status specific to an instance.
- (::Google::Cloud::Sql::V1::DiskEncryptionStatus) — Disk encryption status specific to an instance.
#dns_name
def dns_name() -> ::String- (::String) — Output only. The dns name of the instance.
#dns_names
def dns_names() -> ::Array<::Google::Cloud::Sql::V1::DnsNameMapping>- (::Array<::Google::Cloud::Sql::V1::DnsNameMapping>) — Output only. The list of DNS names used by this instance.
#etag
def etag() -> ::String-
(::String) — This field is deprecated and will be removed from a future version of the
API. Use the
settings.settingsVersionfield instead.
#etag=
def etag=(value) -> ::String-
value (::String) — This field is deprecated and will be removed from a future version of the
API. Use the
settings.settingsVersionfield instead.
-
(::String) — This field is deprecated and will be removed from a future version of the
API. Use the
settings.settingsVersionfield instead.
#failover_replica
def failover_replica() -> ::Google::Cloud::Sql::V1::DatabaseInstance::SqlFailoverReplica- (::Google::Cloud::Sql::V1::DatabaseInstance::SqlFailoverReplica) — The name and status of the failover replica.
#failover_replica=
def failover_replica=(value) -> ::Google::Cloud::Sql::V1::DatabaseInstance::SqlFailoverReplica- value (::Google::Cloud::Sql::V1::DatabaseInstance::SqlFailoverReplica) — The name and status of the failover replica.
- (::Google::Cloud::Sql::V1::DatabaseInstance::SqlFailoverReplica) — The name and status of the failover replica.
#gce_zone
def gce_zone() -> ::String- (::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.
#gce_zone=
def gce_zone=(value) -> ::String- value (::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.
- (::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.
#gemini_config
def gemini_config() -> ::Google::Cloud::Sql::V1::GeminiInstanceConfig- (::Google::Cloud::Sql::V1::GeminiInstanceConfig) — Gemini instance configuration.
#gemini_config=
def gemini_config=(value) -> ::Google::Cloud::Sql::V1::GeminiInstanceConfig- value (::Google::Cloud::Sql::V1::GeminiInstanceConfig) — Gemini instance configuration.
- (::Google::Cloud::Sql::V1::GeminiInstanceConfig) — Gemini instance configuration.
#include_replicas_for_major_version_upgrade
def include_replicas_for_major_version_upgrade() -> ::Google::Protobuf::BoolValue- (::Google::Protobuf::BoolValue) — Input only. Determines whether an in-place major version upgrade of replicas happens when an in-place major version upgrade of a primary instance is initiated.
#include_replicas_for_major_version_upgrade=
def include_replicas_for_major_version_upgrade=(value) -> ::Google::Protobuf::BoolValue- value (::Google::Protobuf::BoolValue) — Input only. Determines whether an in-place major version upgrade of replicas happens when an in-place major version upgrade of a primary instance is initiated.
- (::Google::Protobuf::BoolValue) — Input only. Determines whether an in-place major version upgrade of replicas happens when an in-place major version upgrade of a primary instance is initiated.
#instance_type
def instance_type() -> ::Google::Cloud::Sql::V1::SqlInstanceType- (::Google::Cloud::Sql::V1::SqlInstanceType) — The instance type.
#instance_type=
def instance_type=(value) -> ::Google::Cloud::Sql::V1::SqlInstanceType- value (::Google::Cloud::Sql::V1::SqlInstanceType) — The instance type.
- (::Google::Cloud::Sql::V1::SqlInstanceType) — The instance type.
#ip_addresses
def ip_addresses() -> ::Array<::Google::Cloud::Sql::V1::IpMapping>- (::Array<::Google::Cloud::Sql::V1::IpMapping>) — The assigned IP addresses for the instance.
#ip_addresses=
def ip_addresses=(value) -> ::Array<::Google::Cloud::Sql::V1::IpMapping>- value (::Array<::Google::Cloud::Sql::V1::IpMapping>) — The assigned IP addresses for the instance.
- (::Array<::Google::Cloud::Sql::V1::IpMapping>) — The assigned IP addresses for the instance.
#ipv6_address
def ipv6_address() -> ::String- (::String) — The IPv6 address assigned to the instance. (Deprecated) This property was applicable only to First Generation instances.
#ipv6_address=
def ipv6_address=(value) -> ::String- value (::String) — The IPv6 address assigned to the instance. (Deprecated) This property was applicable only to First Generation instances.
- (::String) — The IPv6 address assigned to the instance. (Deprecated) This property was applicable only to First Generation instances.
#kind
def kind() -> ::String-
(::String) — This is always
sql#instance.
#kind=
def kind=(value) -> ::String-
value (::String) — This is always
sql#instance.
-
(::String) — This is always
sql#instance.
#maintenance_version
def maintenance_version() -> ::String- (::String) — The current software version on the instance.
#maintenance_version=
def maintenance_version=(value) -> ::String- value (::String) — The current software version on the instance.
- (::String) — The current software version on the instance.
#master_instance_name
def master_instance_name() -> ::String- (::String) — The name of the instance which will act as primary in the replication setup.
#master_instance_name=
def master_instance_name=(value) -> ::String- value (::String) — The name of the instance which will act as primary in the replication setup.
- (::String) — The name of the instance which will act as primary in the replication setup.
#max_disk_size
def max_disk_size() -> ::Google::Protobuf::Int64Value- (::Google::Protobuf::Int64Value) — The maximum disk size of the instance in bytes.
#max_disk_size=
def max_disk_size=(value) -> ::Google::Protobuf::Int64Value- value (::Google::Protobuf::Int64Value) — The maximum disk size of the instance in bytes.
- (::Google::Protobuf::Int64Value) — The maximum disk size of the instance in bytes.
#name
def name() -> ::String- (::String) — Name of the Cloud SQL instance. This does not include the project ID.
#name=
def name=(value) -> ::String- value (::String) — Name of the Cloud SQL instance. This does not include the project ID.
- (::String) — Name of the Cloud SQL instance. This does not include the project ID.
#node_count
def node_count() -> ::Integer- (::Integer) — The number of read pool nodes in a read pool.
#node_count=
def node_count=(value) -> ::Integer- value (::Integer) — The number of read pool nodes in a read pool.
- (::Integer) — The number of read pool nodes in a read pool.
#nodes
def nodes() -> ::Array<::Google::Cloud::Sql::V1::DatabaseInstance::PoolNodeConfig>- (::Array<::Google::Cloud::Sql::V1::DatabaseInstance::PoolNodeConfig>) — Output only. Entries containing information about each read pool node of the read pool.
#on_premises_configuration
def on_premises_configuration() -> ::Google::Cloud::Sql::V1::OnPremisesConfiguration- (::Google::Cloud::Sql::V1::OnPremisesConfiguration) — Configuration specific to on-premises instances.
#on_premises_configuration=
def on_premises_configuration=(value) -> ::Google::Cloud::Sql::V1::OnPremisesConfiguration- value (::Google::Cloud::Sql::V1::OnPremisesConfiguration) — Configuration specific to on-premises instances.
- (::Google::Cloud::Sql::V1::OnPremisesConfiguration) — Configuration specific to on-premises instances.
#out_of_disk_report
def out_of_disk_report() -> ::Google::Cloud::Sql::V1::DatabaseInstance::SqlOutOfDiskReport-
(::Google::Cloud::Sql::V1::DatabaseInstance::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
- Writers:
#out_of_disk_report=
def out_of_disk_report=(value) -> ::Google::Cloud::Sql::V1::DatabaseInstance::SqlOutOfDiskReport-
value (::Google::Cloud::Sql::V1::DatabaseInstance::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
- Writers:
-
(::Google::Cloud::Sql::V1::DatabaseInstance::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
- Writers:
#primary_dns_name
def primary_dns_name() -> ::String- (::String) — Output only. DEPRECATED: please use write_endpoint instead.
#project
def project() -> ::String- (::String) — The project ID of the project containing the Cloud SQL instance. The Google apps domain is prefixed if applicable.
#project=
def project=(value) -> ::String- value (::String) — The project ID of the project containing the Cloud SQL instance. The Google apps domain is prefixed if applicable.
- (::String) — The project ID of the project containing the Cloud SQL instance. The Google apps domain is prefixed if applicable.
#psc_service_attachment_link
def psc_service_attachment_link() -> ::String- (::String) — Output only. The link to service attachment of PSC instance.
#region
def region() -> ::String-
(::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, andus-central1. The default value isus-central1.
#region=
def region=(value) -> ::String-
value (::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, andus-central1. The default value isus-central1.
-
(::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, andus-central1. The default value isus-central1.
#replica_configuration
def replica_configuration() -> ::Google::Cloud::Sql::V1::ReplicaConfiguration- (::Google::Cloud::Sql::V1::ReplicaConfiguration) — Configuration specific to failover replicas and read replicas.
#replica_configuration=
def replica_configuration=(value) -> ::Google::Cloud::Sql::V1::ReplicaConfiguration- value (::Google::Cloud::Sql::V1::ReplicaConfiguration) — Configuration specific to failover replicas and read replicas.
- (::Google::Cloud::Sql::V1::ReplicaConfiguration) — Configuration specific to failover replicas and read replicas.
#replica_names
def replica_names() -> ::Array<::String>- (::Array<::String>) — The replicas of the instance.
#replica_names=
def replica_names=(value) -> ::Array<::String>- value (::Array<::String>) — The replicas of the instance.
- (::Array<::String>) — The replicas of the instance.
#replication_cluster
def replication_cluster() -> ::Google::Cloud::Sql::V1::ReplicationCluster- (::Google::Cloud::Sql::V1::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. Applicable to MySQL and PostgreSQL.
#replication_cluster=
def replication_cluster=(value) -> ::Google::Cloud::Sql::V1::ReplicationCluster- value (::Google::Cloud::Sql::V1::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. Applicable to MySQL and PostgreSQL.
- (::Google::Cloud::Sql::V1::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. Applicable to MySQL and PostgreSQL.
#root_password
def root_password() -> ::String- (::String) — Initial root password. Use only on creation. You must set root passwords before you can connect to PostgreSQL instances.
#root_password=
def root_password=(value) -> ::String- value (::String) — Initial root password. Use only on creation. You must set root passwords before you can connect to PostgreSQL instances.
- (::String) — Initial root password. Use only on creation. You must set root passwords before you can connect to PostgreSQL instances.
#satisfies_pzi
def satisfies_pzi() -> ::Google::Protobuf::BoolValue-
(::Google::Protobuf::BoolValue) — Output only. This status indicates whether the instance satisfies PZI.
The status is reserved for future use.
#satisfies_pzs
def satisfies_pzs() -> ::Google::Protobuf::BoolValue-
(::Google::Protobuf::BoolValue) — This status indicates whether the instance satisfies PZS.
The status is reserved for future use.
#satisfies_pzs=
def satisfies_pzs=(value) -> ::Google::Protobuf::BoolValue-
value (::Google::Protobuf::BoolValue) — This status indicates whether the instance satisfies PZS.
The status is reserved for future use.
-
(::Google::Protobuf::BoolValue) — This status indicates whether the instance satisfies PZS.
The status is reserved for future use.
#scheduled_maintenance
def scheduled_maintenance() -> ::Google::Cloud::Sql::V1::DatabaseInstance::SqlScheduledMaintenance- (::Google::Cloud::Sql::V1::DatabaseInstance::SqlScheduledMaintenance) — The start time of any upcoming scheduled maintenance for this instance.
#scheduled_maintenance=
def scheduled_maintenance=(value) -> ::Google::Cloud::Sql::V1::DatabaseInstance::SqlScheduledMaintenance- value (::Google::Cloud::Sql::V1::DatabaseInstance::SqlScheduledMaintenance) — The start time of any upcoming scheduled maintenance for this instance.
- (::Google::Cloud::Sql::V1::DatabaseInstance::SqlScheduledMaintenance) — The start time of any upcoming scheduled maintenance for this instance.
#secondary_gce_zone
def secondary_gce_zone() -> ::String- (::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.
#secondary_gce_zone=
def secondary_gce_zone=(value) -> ::String- value (::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.
- (::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.
#self_link
def self_link() -> ::String- (::String) — The URI of this resource.
#self_link=
def self_link=(value) -> ::String- value (::String) — The URI of this resource.
- (::String) — The URI of this resource.
#server_ca_cert
def server_ca_cert() -> ::Google::Cloud::Sql::V1::SslCert- (::Google::Cloud::Sql::V1::SslCert) — SSL configuration.
#server_ca_cert=
def server_ca_cert=(value) -> ::Google::Cloud::Sql::V1::SslCert- value (::Google::Cloud::Sql::V1::SslCert) — SSL configuration.
- (::Google::Cloud::Sql::V1::SslCert) — SSL configuration.
#service_account_email_address
def service_account_email_address() -> ::String- (::String) — The service account email address assigned to the instance.\This property is read-only.
#service_account_email_address=
def service_account_email_address=(value) -> ::String- value (::String) — The service account email address assigned to the instance.\This property is read-only.
- (::String) — The service account email address assigned to the instance.\This property is read-only.
#settings
def settings() -> ::Google::Cloud::Sql::V1::Settings- (::Google::Cloud::Sql::V1::Settings) — The user settings.
#settings=
def settings=(value) -> ::Google::Cloud::Sql::V1::Settings- value (::Google::Cloud::Sql::V1::Settings) — The user settings.
- (::Google::Cloud::Sql::V1::Settings) — The user settings.
#sql_network_architecture
def sql_network_architecture() -> ::Google::Cloud::Sql::V1::DatabaseInstance::SqlNetworkArchitecture#sql_network_architecture=
def sql_network_architecture=(value) -> ::Google::Cloud::Sql::V1::DatabaseInstance::SqlNetworkArchitecture#state
def state() -> ::Google::Cloud::Sql::V1::DatabaseInstance::SqlInstanceState- (::Google::Cloud::Sql::V1::DatabaseInstance::SqlInstanceState) — The current serving state of the Cloud SQL instance.
#state=
def state=(value) -> ::Google::Cloud::Sql::V1::DatabaseInstance::SqlInstanceState- value (::Google::Cloud::Sql::V1::DatabaseInstance::SqlInstanceState) — The current serving state of the Cloud SQL instance.
- (::Google::Cloud::Sql::V1::DatabaseInstance::SqlInstanceState) — The current serving state of the Cloud SQL instance.
#suspension_reason
def suspension_reason() -> ::Array<::Google::Cloud::Sql::V1::SqlSuspensionReason>- (::Array<::Google::Cloud::Sql::V1::SqlSuspensionReason>) — If the instance state is SUSPENDED, the reason for the suspension.
#suspension_reason=
def suspension_reason=(value) -> ::Array<::Google::Cloud::Sql::V1::SqlSuspensionReason>- value (::Array<::Google::Cloud::Sql::V1::SqlSuspensionReason>) — If the instance state is SUSPENDED, the reason for the suspension.
- (::Array<::Google::Cloud::Sql::V1::SqlSuspensionReason>) — If the instance state is SUSPENDED, the reason for the suspension.
#switch_transaction_logs_to_cloud_storage_enabled
def switch_transaction_logs_to_cloud_storage_enabled() -> ::Google::Protobuf::BoolValue- (::Google::Protobuf::BoolValue) — Input only. Whether Cloud SQL is enabled to switch storing point-in-time recovery log files from a data disk to Cloud Storage.
#switch_transaction_logs_to_cloud_storage_enabled=
def switch_transaction_logs_to_cloud_storage_enabled=(value) -> ::Google::Protobuf::BoolValue- value (::Google::Protobuf::BoolValue) — Input only. Whether Cloud SQL is enabled to switch storing point-in-time recovery log files from a data disk to Cloud Storage.
- (::Google::Protobuf::BoolValue) — Input only. Whether Cloud SQL is enabled to switch storing point-in-time recovery log files from a data disk to Cloud Storage.
#tags
def tags() -> ::Google::Protobuf::Map{::String => ::String}-
(::Google::Protobuf::Map{::String => ::String}) — Optional. Input only. Immutable. Tag keys and tag values that are bound to
this instance. You must represent each item in the map as:
"<tag-key-namespaced-name>" : "<tag-value-short-name>".For example, a single resource can have the following tags:
"123/environment": "production", "123/costCenter": "marketing",For more information on tag creation and management, see https://cloud.google.com/resource-manager/docs/tags/tags-overview.
#tags=
def tags=(value) -> ::Google::Protobuf::Map{::String => ::String}-
value (::Google::Protobuf::Map{::String => ::String}) — Optional. Input only. Immutable. Tag keys and tag values that are bound to
this instance. You must represent each item in the map as:
"<tag-key-namespaced-name>" : "<tag-value-short-name>".For example, a single resource can have the following tags:
"123/environment": "production", "123/costCenter": "marketing",For more information on tag creation and management, see https://cloud.google.com/resource-manager/docs/tags/tags-overview.
-
(::Google::Protobuf::Map{::String => ::String}) — Optional. Input only. Immutable. Tag keys and tag values that are bound to
this instance. You must represent each item in the map as:
"<tag-key-namespaced-name>" : "<tag-value-short-name>".For example, a single resource can have the following tags:
"123/environment": "production", "123/costCenter": "marketing",For more information on tag creation and management, see https://cloud.google.com/resource-manager/docs/tags/tags-overview.
#upgradable_database_versions
def upgradable_database_versions() -> ::Array<::Google::Cloud::Sql::V1::AvailableDatabaseVersion>- (::Array<::Google::Cloud::Sql::V1::AvailableDatabaseVersion>) — Output only. All database versions that are available for upgrade.
#write_endpoint
def write_endpoint() -> ::String- (::String) — Output only. The dns name of the primary instance in a replication group.