Cloud SQL Admin V1 API - Class Google::Cloud::Sql::V1::DatabaseInstance (v0.1.0)

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>
Returns
  • (::Array<::String>) — Output only. List all maintenance versions applicable on the instance

#backend_type

def backend_type() -> ::Google::Cloud::Sql::V1::SqlBackendType
Returns
  • (::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 tier property in the settings object to determine the database type.

#backend_type=

def backend_type=(value) -> ::Google::Cloud::Sql::V1::SqlBackendType
Parameter
  • 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 tier property in the settings object to determine the database type.

Returns
  • (::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 tier property in the settings object to determine the database type.

#connection_name

def connection_name() -> ::String
Returns
  • (::String) — Connection name of the Cloud SQL instance used in connection strings.

#connection_name=

def connection_name=(value) -> ::String
Parameter
  • value (::String) — Connection name of the Cloud SQL instance used in connection strings.
Returns
  • (::String) — Connection name of the Cloud SQL instance used in connection strings.

#create_time

def create_time() -> ::Google::Protobuf::Timestamp
Returns

#current_disk_size

def current_disk_size() -> ::Google::Protobuf::Int64Value
Returns
  • (::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
Parameter
  • 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.
Returns
  • (::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
Returns
  • (::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
Returns

#database_version=

def database_version=(value) -> ::Google::Cloud::Sql::V1::SqlDatabaseVersion
Parameter
Returns

#disk_encryption_configuration

def disk_encryption_configuration() -> ::Google::Cloud::Sql::V1::DiskEncryptionConfiguration
Returns

#disk_encryption_configuration=

def disk_encryption_configuration=(value) -> ::Google::Cloud::Sql::V1::DiskEncryptionConfiguration
Parameter
Returns

#disk_encryption_status

def disk_encryption_status() -> ::Google::Cloud::Sql::V1::DiskEncryptionStatus
Returns

#disk_encryption_status=

def disk_encryption_status=(value) -> ::Google::Cloud::Sql::V1::DiskEncryptionStatus
Parameter
Returns

#dns_name

def dns_name() -> ::String
Returns
  • (::String) — Output only. The dns name of the instance.

#dns_names

def dns_names() -> ::Array<::Google::Cloud::Sql::V1::DnsNameMapping>
Returns

#etag

def etag() -> ::String
Returns
  • (::String) — This field is deprecated and will be removed from a future version of the API. Use the settings.settingsVersion field instead.

#etag=

def etag=(value) -> ::String
Parameter
  • value (::String) — This field is deprecated and will be removed from a future version of the API. Use the settings.settingsVersion field instead.
Returns
  • (::String) — This field is deprecated and will be removed from a future version of the API. Use the settings.settingsVersion field instead.

#failover_replica

def failover_replica() -> ::Google::Cloud::Sql::V1::DatabaseInstance::SqlFailoverReplica
Returns

#failover_replica=

def failover_replica=(value) -> ::Google::Cloud::Sql::V1::DatabaseInstance::SqlFailoverReplica
Parameter
Returns

#gce_zone

def gce_zone() -> ::String
Returns
  • (::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
Parameter
  • 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.
Returns
  • (::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
Returns

#gemini_config=

def gemini_config=(value) -> ::Google::Cloud::Sql::V1::GeminiInstanceConfig
Parameter
Returns

#include_replicas_for_major_version_upgrade

def include_replicas_for_major_version_upgrade() -> ::Google::Protobuf::BoolValue
Returns
  • (::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
Parameter
  • 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.
Returns
  • (::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
Returns

#instance_type=

def instance_type=(value) -> ::Google::Cloud::Sql::V1::SqlInstanceType
Parameter
Returns

#ip_addresses

def ip_addresses() -> ::Array<::Google::Cloud::Sql::V1::IpMapping>
Returns

#ip_addresses=

def ip_addresses=(value) -> ::Array<::Google::Cloud::Sql::V1::IpMapping>
Parameter
Returns

#ipv6_address

def ipv6_address() -> ::String
Returns
  • (::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
Parameter
  • value (::String) — The IPv6 address assigned to the instance. (Deprecated) This property was applicable only to First Generation instances.
Returns
  • (::String) — The IPv6 address assigned to the instance. (Deprecated) This property was applicable only to First Generation instances.

#kind

def kind() -> ::String
Returns
  • (::String) — This is always sql#instance.

#kind=

def kind=(value) -> ::String
Parameter
  • value (::String) — This is always sql#instance.
Returns
  • (::String) — This is always sql#instance.

#maintenance_version

def maintenance_version() -> ::String
Returns
  • (::String) — The current software version on the instance.

#maintenance_version=

def maintenance_version=(value) -> ::String
Parameter
  • value (::String) — The current software version on the instance.
Returns
  • (::String) — The current software version on the instance.

#master_instance_name

def master_instance_name() -> ::String
Returns
  • (::String) — The name of the instance which will act as primary in the replication setup.

#master_instance_name=

def master_instance_name=(value) -> ::String
Parameter
  • value (::String) — The name of the instance which will act as primary in the replication setup.
Returns
  • (::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
Returns

#max_disk_size=

def max_disk_size=(value) -> ::Google::Protobuf::Int64Value
Parameter
Returns

#name

def name() -> ::String
Returns
  • (::String) — Name of the Cloud SQL instance. This does not include the project ID.

#name=

def name=(value) -> ::String
Parameter
  • value (::String) — Name of the Cloud SQL instance. This does not include the project ID.
Returns
  • (::String) — Name of the Cloud SQL instance. This does not include the project ID.

#node_count

def node_count() -> ::Integer
Returns
  • (::Integer) — The number of read pool nodes in a read pool.

#node_count=

def node_count=(value) -> ::Integer
Parameter
  • value (::Integer) — The number of read pool nodes in a read pool.
Returns
  • (::Integer) — The number of read pool nodes in a read pool.

#nodes

def nodes() -> ::Array<::Google::Cloud::Sql::V1::DatabaseInstance::PoolNodeConfig>
Returns

#on_premises_configuration

def on_premises_configuration() -> ::Google::Cloud::Sql::V1::OnPremisesConfiguration
Returns

#on_premises_configuration=

def on_premises_configuration=(value) -> ::Google::Cloud::Sql::V1::OnPremisesConfiguration
Parameter
Returns

#out_of_disk_report

def out_of_disk_report() -> ::Google::Cloud::Sql::V1::DatabaseInstance::SqlOutOfDiskReport
Returns

#out_of_disk_report=

def out_of_disk_report=(value) -> ::Google::Cloud::Sql::V1::DatabaseInstance::SqlOutOfDiskReport
Parameter
Returns

#primary_dns_name

def primary_dns_name() -> ::String
Returns
  • (::String) — Output only. DEPRECATED: please use write_endpoint instead.

#project

def project() -> ::String
Returns
  • (::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
Parameter
  • value (::String) — The project ID of the project containing the Cloud SQL instance. The Google apps domain is prefixed if applicable.
Returns
  • (::String) — The project ID of the project containing the Cloud SQL instance. The Google apps domain is prefixed if applicable.
def psc_service_attachment_link() -> ::String
Returns
  • (::String) — Output only. The link to service attachment of PSC instance.

#region

def region() -> ::String
Returns
  • (::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.

#region=

def region=(value) -> ::String
Parameter
  • 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, and us-central1. The default value is us-central1.

Returns
  • (::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.

#replica_configuration

def replica_configuration() -> ::Google::Cloud::Sql::V1::ReplicaConfiguration
Returns

#replica_configuration=

def replica_configuration=(value) -> ::Google::Cloud::Sql::V1::ReplicaConfiguration
Parameter
Returns

#replica_names

def replica_names() -> ::Array<::String>
Returns
  • (::Array<::String>) — The replicas of the instance.

#replica_names=

def replica_names=(value) -> ::Array<::String>
Parameter
  • value (::Array<::String>) — The replicas of the instance.
Returns
  • (::Array<::String>) — The replicas of the instance.

#replication_cluster

def replication_cluster() -> ::Google::Cloud::Sql::V1::ReplicationCluster
Returns
  • (::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
Parameter
  • 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.
Returns
  • (::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
Returns
  • (::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
Parameter
  • value (::String) — Initial root password. Use only on creation. You must set root passwords before you can connect to PostgreSQL instances.
Returns
  • (::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
Returns
  • (::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
Returns

#satisfies_pzs=

def satisfies_pzs=(value) -> ::Google::Protobuf::BoolValue
Parameter
Returns

#scheduled_maintenance

def scheduled_maintenance() -> ::Google::Cloud::Sql::V1::DatabaseInstance::SqlScheduledMaintenance
Returns

#scheduled_maintenance=

def scheduled_maintenance=(value) -> ::Google::Cloud::Sql::V1::DatabaseInstance::SqlScheduledMaintenance
Parameter
Returns

#secondary_gce_zone

def secondary_gce_zone() -> ::String
Returns
  • (::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
Parameter
  • 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.
Returns
  • (::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.
def self_link() -> ::String
Returns
  • (::String) — The URI of this resource.
def self_link=(value) -> ::String
Parameter
  • value (::String) — The URI of this resource.
Returns
  • (::String) — The URI of this resource.

#server_ca_cert

def server_ca_cert() -> ::Google::Cloud::Sql::V1::SslCert
Returns

#server_ca_cert=

def server_ca_cert=(value) -> ::Google::Cloud::Sql::V1::SslCert
Parameter
Returns

#service_account_email_address

def service_account_email_address() -> ::String
Returns
  • (::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
Parameter
  • value (::String) — The service account email address assigned to the instance.\This property is read-only.
Returns
  • (::String) — The service account email address assigned to the instance.\This property is read-only.

#settings

def settings() -> ::Google::Cloud::Sql::V1::Settings
Returns

#settings=

def settings=(value) -> ::Google::Cloud::Sql::V1::Settings
Parameter
Returns

#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
Returns

#state=

def state=(value) -> ::Google::Cloud::Sql::V1::DatabaseInstance::SqlInstanceState
Parameter
Returns

#suspension_reason

def suspension_reason() -> ::Array<::Google::Cloud::Sql::V1::SqlSuspensionReason>
Returns

#suspension_reason=

def suspension_reason=(value) -> ::Array<::Google::Cloud::Sql::V1::SqlSuspensionReason>
Parameter
Returns

#switch_transaction_logs_to_cloud_storage_enabled

def switch_transaction_logs_to_cloud_storage_enabled() -> ::Google::Protobuf::BoolValue
Returns
  • (::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
Parameter
  • 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.
Returns
  • (::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}
Returns
  • (::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}
Parameter
  • 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.

Returns
  • (::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>
Returns

#write_endpoint

def write_endpoint() -> ::String
Returns
  • (::String) — Output only. The dns name of the primary instance in a replication group.