View information about your Cloud SQL instance

This page describes how to view information about a Google Cloud Console instance.

View instance summary information

You can view summary information about your Cloud SQL instances in the Google Cloud Console, or by using the gcloud command-line tool, or the API.

Console

  1. In the Google Cloud Console, go to the Cloud SQL Instances page.

    Go to Cloud SQL Instances

  2. To see the current instance state, hold the pointer over the status icon to the left of an instance name.
  3. Click the instance name to open its Overview page.

gcloud

gcloud sql instances describe INSTANCE_NAME

REST v1

Before using any of the request data, make the following replacements:

  • project-id: The project ID
  • instance-id: The instance ID

HTTP method and URL:

GET https://sqladmin.googleapis.com/v1/projects/project-id/instances/instance-id

To send your request, expand one of these options:

You should receive a JSON response similar to the following:

{
  "kind": "sql#instance",
  "state": "RUNNABLE",
  "databaseVersion": "POSTGRES_13",
  "settings": {
    "authorizedGaeApplications": [],
    "tier": "db-f1-micro",
    "kind": "sql#settings",
    "pricingPlan": "PER_USE",
    "replicationType": "SYNCHRONOUS",
    "activationPolicy": "ALWAYS",
    "ipConfiguration": {
      "authorizedNetworks": [],
      "ipv4Enabled": true
    },
    "locationPreference": {
      "zone": "asia-east1-a",
      "kind": "sql#locationPreference"
    },
    "SqlScheduledMaintenance":{
      "startTime": "2021-10-02T15:01:23Z",
      "canDefer": true,
      "canReschedule": true,
      "scheduleDeadlineTime": "2021-10-02T15:01:23Z"
    },
    "dataDiskType": "PD_SSD",
    "backupConfiguration": {
      "startTime": "08:00",
      "kind": "sql#backupConfiguration",
      "enabled": true,
      "binaryLogEnabled": true
    },
    "settingsVersion": "13",
    "storageAutoResizeLimit": "0",
    "storageAutoResize": true,
    "dataDiskSizeGb": "10"
  },
  "etag": "etag-id",
  "ipAddresses": [
    {
      "type": "PRIMARY",
      "ipAddress": "10.0.0.1"
    }
  ],
  "serverCaCert": {
    "kind": "sql#sslCert",
    "certSerialNumber": "0",
    "cert": "certificate-id",
    "commonName": "C=US,O=Google\\, Inc,CN=Google Cloud SQL Server CA,dnQualifier=dn-qualifier-id",
    "sha1Fingerprint": "sha-id",
    "instance": "instance-id",
    "createTime": "2019-06-28T22:46:35.052Z",
    "expirationTime": "2029-06-25T22:47:35.052Z"
  },
  "instanceType": "CLOUD_SQL_INSTANCE",
  "project": "project-id",
  "serviceAccountEmailAddress": "service-acct-id@gcp-sa-cloud-sql.iam.gserviceaccount.com",
  "backendType": "SECOND_GEN",
  "selfLink": "https://sqladmin.googleapis.com/v1/projects/project-id/instances/instance-id",
  "connectionName": "project-id:region:instance-id",
  "name": "instance-id",
  "region": "asia-east1",
  "gceZone": "asia-east1-a"
}

REST v1beta4

Before using any of the request data, make the following replacements:

  • project-id: The project ID
  • instance-id: The instance ID

HTTP method and URL:

GET https://sqladmin.googleapis.com/sql/v1beta4/projects/project-id/instances/instance-id

To send your request, expand one of these options:

You should receive a JSON response similar to the following:

{
  "kind": "sql#instance",
  "state": "RUNNABLE",
  "databaseVersion": "POSTGRES_13",
  "settings": {
    "authorizedGaeApplications": [],
    "tier": "db-f1-micro",
    "kind": "sql#settings",
    "pricingPlan": "PER_USE",
    "replicationType": "SYNCHRONOUS",
    "activationPolicy": "ALWAYS",
    "ipConfiguration": {
      "authorizedNetworks": [],
      "ipv4Enabled": true
    },
    "locationPreference": {
      "zone": "asia-east1-a",
      "kind": "sql#locationPreference"
    },
    "SqlScheduledMaintenance":{
      "startTime": "2021-10-02T15:01:23Z",
      "canDefer": true,
      "canReschedule": true,
      "scheduleDeadlineTime": "2021-10-02T15:01:23Z"
    },
    "dataDiskType": "PD_SSD",
    "backupConfiguration": {
      "startTime": "08:00",
      "kind": "sql#backupConfiguration",
      "enabled": true,
      "binaryLogEnabled": true
    },
    "settingsVersion": "13",
    "storageAutoResizeLimit": "0",
    "storageAutoResize": true,
    "dataDiskSizeGb": "10"
  },
  "etag": "etag-id",
  "ipAddresses": [
    {
      "type": "PRIMARY",
      "ipAddress": "10.0.0.1"
    }
  ],
  "serverCaCert": {
    "kind": "sql#sslCert",
    "certSerialNumber": "0",
    "cert": "certificate-id",
    "commonName": "C=US,O=Google\\, Inc,CN=Google Cloud SQL Server CA,dnQualifier=dn-qualifier-id",
    "sha1Fingerprint": "sha-id",
    "instance": "instance-id",
    "createTime": "2019-06-28T22:46:35.052Z",
    "expirationTime": "2029-06-25T22:47:35.052Z"
  },
  "instanceType": "CLOUD_SQL_INSTANCE",
  "project": "project-id",
  "serviceAccountEmailAddress": "service-acct-id@gcp-sa-cloud-sql.iam.gserviceaccount.com",
  "backendType": "SECOND_GEN",
  "selfLink": "https://sqladmin.googleapis.com/sql/v1beta4/projects/project-id/instances/instance-id",
  "connectionName": "project-id:region:instance-id",
  "name": "instance-id",
  "region": "asia-east1",
  "gceZone": "asia-east1-a"
}
To see how the underlying REST API request is constructed for this task, see the APIs Explorer on the instances:get page.

Metrics

This section provides usage charts of key instance metrics that you can use to monitor your instances. When working with metric data, keep the following facts in mind:

  • A data point for a metric is an aggregate over all databases hosted by the instance.
  • Data is reported in local time.
  • Rendered charts do not refresh automatically; to see new data, you must refresh the page.
  • There is a delay of a few minutes between when metric data is recorded and the time it is displayed in the usage charts.

For more information about the metrics shown in the chart, see Monitoring Cloud SQL instances.

For a complete list of Cloud SQL metrics provided by Cloud Monitoring, see the Cloud SQL metrics list.

For more information about using Cloud Monitoring with Google Cloud, see the Cloud Monitoring documentation.

Connect to this instance

In the Connect to this instance section, you can find your instance's IP addresses, VPC network, and connection name.

To open a terminal and connect to your instance, click Connect using Cloud Shell.

To open a related tutorial in the right pane, click Connect from a Compute Engine VM instance.

To go to Connection options, click See all connection methods.

For more information about connecting to an instance, see Connecting overview.

Service account

This section shows the instance's service account email address.

For more information, see the IAM service accounts documentation.

Configuration

This section shows current configuration settings of the instance.

To change configuration settings, click Edit configuration.

For more information about editing the instance configuration, see editing an instance.

Operations and logs

This section lists recent instance operations, such as creating backups.

To see recent operations, click View all operations.

To see logging information, click View PostgreSQL Error Logs.

For more information about the Operations and the Logs Explorer pages, see Cloud SQL logging.

For generic information about logging, see Viewing logs and Exporting logs.

Maintenance

This section shows the current maintenance update settings and schedule.

To change preferences, click Edit maintenance preferences.

To change notification settings, click Edit notification preferences.

For more information about maintenance in Cloud SQL, see Maintenance overview.

What's next