REST Resource: instances

Resource: DatabaseInstance

A Cloud SQL instance resource.

JSON representation
{
  "kind": string,
  "state": enum (SqlInstanceState),
  "databaseVersion": enum (SqlDatabaseVersion),
  "settings": {
    object (Settings)
  },
  "etag": string,
  "failoverReplica": {
    "name": string,
    "available": boolean
  },
  "masterInstanceName": string,
  "replicaNames": [
    string
  ],
  "maxDiskSize": string,
  "currentDiskSize": string,
  "ipAddresses": [
    {
      object (IpMapping)
    }
  ],
  "serverCaCert": {
    object (SslCert)
  },
  "instanceType": enum (SqlInstanceType),
  "project": string,
  "ipv6Address": string,
  "serviceAccountEmailAddress": string,
  "onPremisesConfiguration": {
    object (OnPremisesConfiguration)
  },
  "replicaConfiguration": {
    object (ReplicaConfiguration)
  },
  "backendType": enum (SqlBackendType),
  "selfLink": string,
  "suspensionReason": [
    enum (SqlSuspensionReason)
  ],
  "connectionName": string,
  "name": string,
  "region": string,
  "gceZone": string,
  "secondaryGceZone": string,
  "diskEncryptionConfiguration": {
    object (DiskEncryptionConfiguration)
  },
  "diskEncryptionStatus": {
    object (DiskEncryptionStatus)
  },
  "rootPassword": string,
  "scheduledMaintenance": {
    object (SqlScheduledMaintenance)
  },
  "satisfiesPzs": boolean,
  "databaseInstalledVersion": string,
  "createTime": string,
  "availableMaintenanceVersions": [
    string
  ],
  "maintenanceVersion": string,
  "upgradableDatabaseVersions": [
    {
      object (AvailableDatabaseVersion)
    }
  ],
  "satisfiesPzi": boolean,
  "tags": {
    string: string,
    ...
  },
  "nodes": [
    {
      object (PoolNodeConfig)
    }
  ],
  "dnsNames": [
    {
      object (DnsNameMapping)
    }
  ],
  "outOfDiskReport": {
    object (SqlOutOfDiskReport)
  },
  "sqlNetworkArchitecture": enum (SqlNetworkArchitecture),
  "pscServiceAttachmentLink": string,
  "dnsName": string,
  "primaryDnsName": string,
  "writeEndpoint": string,
  "replicationCluster": {
    object (ReplicationCluster)
  },
  "geminiConfig": {
    object (GeminiInstanceConfig)
  },
  "switchTransactionLogsToCloudStorageEnabled": boolean,
  "includeReplicasForMajorVersionUpgrade": boolean,
  "nodeCount": integer
}
Fields
kind

string

This is always sql#instance.

state

enum (SqlInstanceState)

The current serving state of the Cloud SQL instance.

databaseVersion

enum (SqlDatabaseVersion)

The database engine type and version. The databaseVersion field cannot be changed after instance creation.

settings

object (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.

failoverReplica

object

The name and status of the failover replica.

failoverReplica.name

string

The name of the failover replica. If specified at instance creation, a failover replica is created for the instance. The name doesn't include the project ID.

failoverReplica.available

boolean

The availability status of the failover replica. A false status indicates that the failover replica is out of sync. The primary instance can only failover to the failover replica when the status is true.

masterInstanceName

string

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

replicaNames[]

string

The replicas of the instance.

maxDiskSize
(deprecated)

string (Int64Value format)

The maximum disk size of the instance in bytes.

currentDiskSize
(deprecated)

string (Int64Value format)

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.

ipAddresses[]

object (IpMapping)

The assigned IP addresses for the instance.

serverCaCert

object (SslCert)

SSL configuration.

instanceType

enum (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.

ipv6Address
(deprecated)

string

The IPv6 address assigned to the instance. (Deprecated) This property was applicable only to First Generation instances.

serviceAccountEmailAddress

string

The service account email address assigned to the instance. \This property is read-only.

onPremisesConfiguration

object (OnPremisesConfiguration)

Configuration specific to on-premises instances.

replicaConfiguration

object (ReplicaConfiguration)

Configuration specific to failover replicas and read replicas.

backendType

enum (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.

suspensionReason[]

enum (SqlSuspensionReason)

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

connectionName

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.

gceZone

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.

secondaryGceZone

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.

diskEncryptionConfiguration

object (DiskEncryptionConfiguration)

Disk encryption configuration specific to an instance.

diskEncryptionStatus

object (DiskEncryptionStatus)

Disk encryption status specific to an instance.

rootPassword

string

Initial root password. Use only on creation. You must set root passwords before you can connect to PostgreSQL instances.

scheduledMaintenance

object (SqlScheduledMaintenance)

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

satisfiesPzs

boolean

This status indicates whether the instance satisfies PZS.

The status is reserved for future use.

databaseInstalledVersion

string

Output only. Stores the current database version running on the instance including minor version such as MYSQL_8_0_18.

createTime

string (Timestamp format)

Output only. The time when the instance was created in RFC 3339 format, for example 2012-11-15T16:19:00.094Z.

Uses RFC 3339, where generated output will always be Z-normalized and use 0, 3, 6 or 9 fractional digits. Offsets other than "Z" are also accepted. Examples: "2014-10-02T15:01:23Z", "2014-10-02T15:01:23.045123456Z" or "2014-10-02T15:01:23+05:30".

availableMaintenanceVersions[]

string

Output only. instances.list all maintenance versions applicable on the instance

maintenanceVersion

string

The current software version on the instance.

upgradableDatabaseVersions[]

object (AvailableDatabaseVersion)

Output only. All database versions that are available for upgrade.

satisfiesPzi

boolean

Output only. This status indicates whether the instance satisfies PZI.

The status is reserved for future use.

tags

map (key: string, value: 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.

An object containing a list of "key": value pairs. Example: { "name": "wrench", "mass": "1.3kg", "count": "3" }.

nodes[]

object (PoolNodeConfig)

Output only. Entries containing information about each read pool node of the read pool.

dnsNames[]

object (DnsNameMapping)

Output only. The list of DNS names used by this instance.

outOfDiskReport

object (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

sqlNetworkArchitecture

enum (SqlNetworkArchitecture)

The SQL network architecture for the instance.

dnsName

string

Output only. The dns name of the instance.

primaryDnsName
(deprecated)

string

Output only. DEPRECATED: please use writeEndpoint instead.

writeEndpoint

string

Output only. The dns name of the primary instance in a replication group.

replicationCluster

object (ReplicationCluster)

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.

geminiConfig