Skip to main content

instances

Overview

Nameinstances
TypeResource
Idgoogle.sqladmin.instances

Fields

NameDatatypeDescription
namestringName of the Cloud SQL instance. This does not include the project ID.
pscServiceAttachmentLinkstringOutput only. The link to service attachment of PSC instance.
createTimestringOutput only. The time when the instance was created in RFC 3339 format, for example 2012-11-15T16:19:00.094Z.
databaseInstalledVersionstringOutput only. Stores the current database version running on the instance including minor version such as MYSQL_8_0_18.
ipv6AddressstringThe IPv6 address assigned to the instance. (Deprecated) This property was applicable only to First Generation instances.
kindstringThis is always sql#instance.
diskEncryptionStatusobjectDisk encryption status for an instance.
rootPasswordstringInitial root password. Use only on creation. You must set root passwords before you can connect to PostgreSQL instances.
diskEncryptionConfigurationobjectDisk encryption configuration for an instance.
dnsNamestringOutput only. The dns name of the instance.
currentDiskSizestringThe 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.
selfLinkstringThe URI of this resource.
scheduledMaintenanceobjectAny scheduled maintenance for this instance.
maintenanceVersionstringThe current software version on the instance.
gceZonestringThe 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.
maxDiskSizestringThe maximum disk size of the instance in bytes.
backendTypestringThe 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.
etagstringThis field is deprecated and will be removed from a future version of the API. Use the settings.settingsVersion field instead.
availableMaintenanceVersionsarrayOutput only. List all maintenance versions applicable on the instance
databaseVersionstringThe database engine type and version. The databaseVersion field cannot be changed after instance creation.
serviceAccountEmailAddressstringThe service account email address assigned to the instance.\This property is read-only.
projectstringThe project ID of the project containing the Cloud SQL instance. The Google apps domain is prefixed if applicable.
settingsobjectDatabase instance settings.
statestringThe current serving state of the Cloud SQL instance.
suspensionReasonarrayIf the instance state is SUSPENDED, the reason for the suspension.
replicaConfigurationobjectRead-replica configuration for connecting to the primary instance.
failoverReplicaobjectThe name and status of the failover replica.
connectionNamestringConnection name of the Cloud SQL instance used in connection strings.
onPremisesConfigurationobjectOn-premises instance configuration.
regionstringThe 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.
replicaNamesarrayThe replicas of the instance.
serverCaCertobjectSslCerts Resource
masterInstanceNamestringThe name of the instance which will act as primary in the replication setup.
ipAddressesarrayThe assigned IP addresses for the instance.
secondaryGceZonestringThe 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.
outOfDiskReportobjectThis message wraps up the information written by out-of-disk detection job.
satisfiesPzsbooleanThe status indicating if instance satisfiesPzs. Reserved for future use.
instanceTypestringThe instance type.

Methods

NameAccessible byRequired ParamsDescription
getSELECTinstance, projectRetrieves a resource containing information about a Cloud SQL instance.
listSELECTprojectLists instances under a given project.
insertINSERTprojectCreates a new Cloud SQL instance.
deleteDELETEinstance, projectDeletes a Cloud SQL instance.
_listEXECprojectLists instances under a given project.
cloneEXECinstance, projectCreates a Cloud SQL instance as a clone of the source instance. Using this operation might cause your instance to restart.
demote_masterEXECinstance, projectDemotes the stand-alone instance to be a Cloud SQL read replica for an external database server.
exportEXECinstance, projectExports data from a Cloud SQL instance to a Cloud Storage bucket as a SQL dump or CSV file.
failoverEXECinstance, projectInitiates a manual failover of a high availability (HA) primary instance to a standby instance, which becomes the primary instance. Users are then rerouted to the new primary. For more information, see the Overview of high availability page in the Cloud SQL documentation. If using Legacy HA (MySQL only), this causes the instance to failover to its failover replica instance.
importEXECinstance, projectImports data into a Cloud SQL instance from a SQL dump or CSV file in Cloud Storage.
patchEXECinstance, projectPartially updates settings of a Cloud SQL instance by merging the request with the current configuration. This method supports patch semantics.
perform_disk_shrinkEXECinstance, projectPerform Disk Shrink on primary instance.
promote_replicaEXECinstance, projectPromotes the read replica instance to be a stand-alone Cloud SQL instance. Using this operation might cause your instance to restart.
reencryptEXECinstance, projectReencrypt CMEK instance with latest key version.
reschedule_maintenanceEXECinstance, projectReschedules the maintenance on the given instance.
reset_replica_sizeEXECinstance, projectReset Replica Size to primary instance disk size.
reset_ssl_configEXECinstance, projectDeletes all client certificates and generates a new server SSL certificate for the instance.
restartEXECinstance, projectRestarts a Cloud SQL instance.
restore_backupEXECinstance, projectRestores a backup of a Cloud SQL instance. Using this operation might cause your instance to restart.
rotate_server_caEXECinstance, projectRotates the server certificate to one signed by the Certificate Authority (CA) version previously added with the addServerCA method.
start_external_syncEXECinstance, projectStart External primary instance migration.
start_replicaEXECinstance, projectStarts the replication in the read replica instance.
stop_replicaEXECinstance, projectStops the replication in the read replica instance.
truncate_logEXECinstance, projectTruncate MySQL general and slow query log tables MySQL only.
updateEXECinstance, projectUpdates settings of a Cloud SQL instance. Using this operation might cause your instance to restart.
verify_external_sync_settingsEXECinstance, projectVerify External primary instance external sync settings.