REST Resource: instances

  • PoolNodeConfig
  • Methods
  • 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)
        }
      ],
      "replicationCluster": {
        object (ReplicationCluster)
      },
      "satisfiesPzi": boolean,
      "nodes": [
        {
          object (PoolNodeConfig)
        }
      ],
      "dnsNames": [
        {
          object (DnsNameMapping)
        }
      ],
      "outOfDiskReport": {
        object (SqlOutOfDiskReport)
      },
      "sqlNetworkArchitecture": enum (SqlNetworkArchitecture),
      "pscServiceAttachmentLink": string,
      "dnsName": string,
      "primaryDnsName": string,
      "writeEndpoint": string,
      "geminiConfig": {
        object (GeminiInstanceConfig)
      },
      "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. Can be: * us-central (FIRST_GEN instances only) * us-central1 (SECOND_GEN instances only) * asia-east1 or europe-west1.

    Defaults to us-central or us-central1 depending on the instance type. The region cannot be changed after instance creation.

    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.

    A timestamp in RFC3339 UTC "Zulu" format, with nanosecond resolution and up to nine fractional digits. Examples: "2014-10-02T15:01:23Z" and "2014-10-02T15:01:23.045123456Z".

    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.

    replicationCluster

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

    satisfiesPzi

    boolean

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

    The status is reserved for future use.

    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)

    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.

    geminiConfig

    object (GeminiInstanceConfig)

    Gemini instance configuration.

    nodeCount

    integer

    The number of read pool nodes in a read pool.

    SqlInstanceState

    The current serving state of the database instance.

    Enums
    SQL_INSTANCE_STATE_UNSPECIFIED The state of the instance is unknown.
    RUNNABLE The instance is running, or has been stopped by owner.
    SUSPENDED The instance is not available, for example due to problems with billing.
    PENDING_DELETE The instance is being deleted.
    PENDING_CREATE The instance is being created.
    MAINTENANCE The instance is down for maintenance.
    FAILED The creation of the instance failed or a fatal error occurred during maintenance.
    ONLINE_MAINTENANCE

    Deprecated

    REPAIRING (Applicable to read pool nodes only.) The read pool node needs to be repaired. The database might be unavailable.

    Settings

    Database instance settings.

    JSON representation
    {
      "settingsVersion": string,
      "authorizedGaeApplications": [
        string
      ],
      "tier": string,
      "kind": string,
      "userLabels": {
        string: string,
        ...
      },
      "availabilityType": enum (SqlAvailabilityType),
      "pricingPlan": enum (SqlPricingPlan),
      "replicationType": enum (SqlReplicationType),
      "storageAutoResizeLimit": string,
      "activationPolicy": enum (SqlActivationPolicy),
      "ipConfiguration": {
        object (IpConfiguration)
      },
      "storageAutoResize": boolean,
      "locationPreference": {
        object (LocationPreference)
      },
      "databaseFlags": [
        {
          object (DatabaseFlags)
        }
      ],
      "dataDiskType": enum (SqlDataDiskType),
      "maintenanceWindow": {
        object (MaintenanceWindow)
      },
      "backupConfiguration": {
        object (BackupConfiguration)
      },
      "databaseReplicationEnabled": boolean,
      "crashSafeReplicationEnabled": boolean,
      "dataDiskSizeGb": string,
      "activeDirectoryConfig": {
        object (SqlActiveDirectoryConfig)
      },
      "collation": string,
      "denyMaintenancePeriods": [
        {
          object (DenyMaintenancePeriod)
        }
      ],
      "insightsConfig": {
        object (InsightsConfig)
      },
      "passwordValidationPolicy": {
        object (PasswordValidationPolicy)
      },
      "sqlServerAuditConfig": {
        object (SqlServerAuditConfig)
      },
      "edition": enum (Edition),
      "connectorEnforcement": enum (ConnectorEnforcement),
      "deletionProtectionEnabled": boolean,
      "timeZone": string,
      "enableDataplexIntegration": boolean
      "connectionPoolConfig": {
      }
    }
    Fields
    settingsVersion

    string (Int64Value format)

    The version of instance settings. This is a required field for update method to make sure concurrent updates are handled properly. During update, use the most recent settingsVersion value for this instance and do not try to update this value.

    authorizedGaeApplications[]
    (deprecated)

    string

    The App Engine app IDs that can access this instance. (Deprecated) Applied to First Generation instances only.

    tier

    string

    The tier (or machine type) for this instance, for example db-custom-1-3840. WARNING: Changing this restarts the instance.

    kind

    string

    This is always sql#settings.

    userLabels

    map (key: string, value: string)

    User-provided labels, represented as a dictionary where each label is a single key value pair.

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

    availabilityType

    enum (SqlAvailabilityType)

    Availability type. Potential values: * ZONAL: The instance serves data from only one zone. Outages in that zone affect data accessibility. * REGIONAL: The instance can serve data from more than one zone in a region (it is highly available)./

    For more information, see Overview of the High Availability Configuration.

    pricingPlan

    enum (SqlPricingPlan)

    The pricing plan for this instance. This can be either PER_USE or PACKAGE. Only PER_USE is supported for Second Generation instances.

    replicationType
    (deprecated)

    enum (SqlReplicationType)

    The type of replication this instance uses. This can be either ASYNCHRONOUS or SYNCHRONOUS. (Deprecated) This property was only applicable to First Generation instances.

    storageAutoResizeLimit

    string (Int64Value format)

    The maximum size to which storage capacity can be automatically increased. The default value is 0, which specifies that there is no limit.

    activationPolicy

    enum (SqlActivationPolicy)

    The activation policy specifies when the instance is activated; it is applicable only when the instance state is RUNNABLE. Valid values: * ALWAYS: The instance is on, and remains so even in the absence of connection requests. * NEVER: The instance is off; it is not activated, even if a connection request arrives.

    ipConfiguration

    object (IpConfiguration)

    The settings for IP Management. This allows to enable or disable the instance IP and manage which external networks can connect to the instance. The IPv4 address cannot be disabled for Second Generation instances.

    storageAutoResize

    boolean

    Configuration to increase storage size automatically. The default value is true.

    locationPreference

    object (LocationPreference)

    The location preference settings. This allows the instance to be located as near as possible to either an App Engine app or Compute Engine zone for better performance. App Engine co-location was only applicable to First Generation instances.

    databaseFlags[]

    object (DatabaseFlags)

    The database flags passed to the instance at startup.

    dataDiskType

    enum (SqlDataDiskType)

    The type of data disk: PD_SSD (default) or PD_HDD. Not used for First Generation instances.

    maintenanceWindow

    object (MaintenanceWindow)

    The maintenance window for this instance. This specifies when the instance can be restarted for maintenance purposes.

    backupConfiguration

    object (BackupConfiguration)

    The daily backup configuration for the instance.

    databaseReplicationEnabled

    boolean

    Configuration specific to read replica instances. Indicates whether replication is enabled or not. WARNING: Changing this restarts the instance.

    crashSafeReplicationEnabled
    (deprecated)

    boolean

    Configuration specific to read replica instances. Indicates whether database flags for crash-safe replication are enabled. This property was only applicable to First Generation instances.

    dataDiskSizeGb

    string (Int64Value format)

    The size of data disk, in GB. The data disk size minimum is 10GB.

    activeDirectoryConfig

    object (SqlActiveDirectoryConfig)

    Active Directory configuration, relevant only for Cloud SQL for SQL Server.

    collation

    string

    The name of server Instance collation.

    denyMaintenancePeriods[]

    object (DenyMaintenancePeriod)

    Deny maintenance periods

    insightsConfig

    object (