Google Cloud SQL Cloud Sql Connect API
The Cloud Sql Connect API from Google Cloud SQL — 3 operation(s) for cloud sql connect.
The Cloud Sql Connect API from Google Cloud SQL — 3 operation(s) for cloud sql connect.
Every API here is available over the APIs.io API and to AI agents over MCP.
One button, every client — Claude, Cursor, VS Code and the rest.
https://apis.io/mcp
find_apisBrowse and filter every API in the catalog.get_api_artifactsOne API's artifacts, grouped by type.get_openapiThe primary OpenAPI for this API.find_similar_apisAPIs that look like this one.apis_io_searchSTART HERE — APIs, providers and tags for one query, each with its total.resolveTurn a domain, URL or GitHub org into the provider it belongs to.find_cohortsEvery scored population of providers in the catalog.curl "https://apis.io/api/v1/apis/google-cloud-sql:google-cloud-sql-connect-api"
curl "https://apis.io/api/v1/apis?limit=25"
Calls without X-API-Key need no key. Calls with it need a paid plan — get a key.
Free tier, no form to fill in. Signing in shares your email address with us — we store it to create your key and to recognise you if you sign in with another provider. By signing up you are subscribing to the APIs.io and API Evangelist newsletters — you can unsubscribe from any issue. See our Privacy Policy and Terms.
A second provider on the same verified email joins the account you already have.
openapi: 3.2.0
info:
title: Cloud SQL Admin Connect API
version: v1
description: Generated from Google's published Discovery document for Cloud SQL Admin API (sqladmin v1, revision 20261107). 3 operation(s).
contact:
name: Google
url: https://developers.google.com/
termsOfService: https://developers.google.com/terms
servers:
- url: https://sqladmin.googleapis.com
tags:
- name: Connect
paths:
/v1/projects/{project}/instances/{instance}/connectSettings:
get:
operationId: sql.connect.get
summary: Get connect
description: Retrieves connect settings about a Cloud SQL instance.
parameters:
- name: project
in: path
required: true
description: Project ID of the project that contains the instance.
schema:
type: string
- name: instance
in: path
required: true
description: Cloud SQL instance ID. This does not include the project ID.
schema:
type: string
- name: readTime
in: query
required: false
description: Optional. Optional snapshot read timestamp to trade freshness for performance.
schema:
format: google-datetime
type: string
responses:
'200':
description: Successful response
content:
application/json:
schema:
$ref: '#/components/schemas/ConnectSettings'
4XX:
content:
application/json:
schema:
$ref: '#/components/schemas/GoogleRpcError'
description: 'Client error (google.rpc.Status: INVALID_ARGUMENT, PERMISSION_DENIED, NOT_FOUND ...)'
default:
content:
application/json:
schema:
$ref: '#/components/schemas/GoogleRpcError'
description: Error response (google.rpc.Status)
security:
- oauth2:
- https://www.googleapis.com/auth/cloud-platform
- https://www.googleapis.com/auth/sqlservice.admin
- apiKey: []
tags:
- Connect
/v1/locations/{location}/dns/{dnsName}:resolveConnectSettings:
get:
operationId: sql.connect.resolve
summary: Resolve connect
description: Retrieves connect settings about a Cloud SQL instance using the instance DNS name.
parameters:
- name: location
in: path
required: true
description: Required. The region of the instance.
schema:
type: string
- name: dnsName
in: path
required: true
description: Required. Cloud SQL instance ID. This does not include the project ID.
schema:
type: string
responses:
'200':
description: Successful response
content:
application/json:
schema:
$ref: '#/components/schemas/ConnectSettings'
4XX:
content:
application/json:
schema:
$ref: '#/components/schemas/GoogleRpcError'
description: 'Client error (google.rpc.Status: INVALID_ARGUMENT, PERMISSION_DENIED, NOT_FOUND ...)'
default:
content:
application/json:
schema:
$ref: '#/components/schemas/GoogleRpcError'
description: Error response (google.rpc.Status)
security:
- oauth2:
- https://www.googleapis.com/auth/cloud-platform
- https://www.googleapis.com/auth/sqlservice.admin
- apiKey: []
tags:
- Connect
/v1/projects/{project}/instances/{instance}:generateEphemeralCert:
post:
operationId: sql.connect.generateEphemeral
summary: Generate ephemeral cert connect
description: Generates a short-lived X509 certificate containing the provided public key and signed by a private key specific to the target instance. Users may use the certificate to authenticate as themselves when connecting to the database.
parameters:
- name: project
in: path
required: true
description: Project ID of the project that contains the instance.
schema:
type: string
- name: instance
in: path
required: true
description: Cloud SQL instance ID. This does not include the project ID.
schema:
type: string
requestBody:
required: true
content:
application/json:
schema:
$ref: '#/components/schemas/GenerateEphemeralCertRequest'
responses:
'200':
description: Successful response
content:
application/json:
schema:
$ref: '#/components/schemas/GenerateEphemeralCertResponse'
4XX:
content:
application/json:
schema:
$ref: '#/components/schemas/GoogleRpcError'
description: 'Client error (google.rpc.Status: INVALID_ARGUMENT, PERMISSION_DENIED, NOT_FOUND ...)'
default:
content:
application/json:
schema:
$ref: '#/components/schemas/GoogleRpcError'
description: Error response (google.rpc.Status)
security:
- oauth2:
- https://www.googleapis.com/auth/cloud-platform
- https://www.googleapis.com/auth/sqlservice.admin
- apiKey: []
tags:
- Connect
components:
schemas:
GenerateEphemeralCertRequest:
type: object
description: Ephemeral certificate creation request.
properties:
access_token:
description: Optional. Access token to include in the signed certificate.
type: string
readTime:
format: google-datetime
type: string
description: Optional. Optional snapshot read timestamp to trade freshness for performance.
validDuration:
description: Optional. If set, it will contain the cert valid duration.
type: string
format: google-duration
public_key:
type: string
description: PEM encoded public key to include in the signed certificate.
GoogleRpcError:
type: object
description: The error envelope every Google API returns.
properties:
error:
type: object
properties:
code:
type: integer
message:
type: string
status:
type: string
details:
type: array
items:
type: object
ConnectSettings:
type: object
properties:
ipAddresses:
description: The assigned IP addresses for the instance.
type: array
items:
$ref: '#/components/schemas/IpMapping'
backendType:
enum:
- SQL_BACKEND_TYPE_UNSPECIFIED
- FIRST_GEN
- SECOND_GEN
- EXTERNAL
type: string
description: '`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.'
serverCaMode:
enum:
- CA_MODE_UNSPECIFIED
- GOOGLE_MANAGED_INTERNAL_CA
- GOOGLE_MANAGED_CAS_CA
- CUSTOMER_MANAGED_CAS_CA
description: Specify what type of CA is used for the server certificate.
type: string
nodes:
readOnly: true
type: array
items:
$ref: '#/components/schemas/ConnectPoolNodeConfig'
description: Output only. Entries containing information about each read pool node of the read pool.
customSubjectAlternativeNames:
items:
type: string
description: Custom subject alternative names for the server certificate.
type: array
kind:
type: string
description: This is always `sql#connectSettings`.
mdxProtocolSupport:
readOnly: true
type: array
description: Optional. Output only. mdx_protocol_support controls how the client uses metadata exchange when connecting to the instance. The values in the list representing parts of the MDX protocol that are supported by this instance. When the list is empty, the instance does not support MDX, so the client must not send an MDX request. The default is empty.
items:
type: string
enum:
- MDX_PROTOCOL_SUPPORT_UNSPECIFIED
- CLIENT_PROTOCOL_TYPE
pscEnabled:
type: boolean
description: Whether PSC connectivity is enabled for this instance.
dnsName:
type: string
description: The dns name of the instance.
databaseVersion:
enum:
- SQL_DATABASE_VERSION_UNSPECIFIED
- MYSQL_5_1
- MYSQL_5_5
- MYSQL_5_6
- MYSQL_5_7
- MYSQL_8_0
- MYSQL_8_0_18
- MYSQL_8_0_26
- MYSQL_8_0_27
- MYSQL_8_0_28
- MYSQL_8_0_29
- MYSQL_8_0_30
- MYSQL_8_0_31
- MYSQL_8_0_32
- MYSQL_8_0_33
- MYSQL_8_0_34
- MYSQL_8_0_35
- MYSQL_8_0_36
- MYSQL_8_0_37
- MYSQL_8_0_39
- MYSQL_8_0_40
- MYSQL_8_0_41
- MYSQL_8_0_42
- MYSQL_8_0_43
- MYSQL_8_0_44
- MYSQL_8_0_45
- MYSQL_8_0_46
- MYSQL_8_4
- MYSQL_9_7
- SQLSERVER_2017_STANDARD
- SQLSERVER_2017_ENTERPRISE
- SQLSERVER_2017_EXPRESS
- SQLSERVER_2017_WEB
- POSTGRES_9_6
- POSTGRES_10
- POSTGRES_11
- POSTGRES_12
- POSTGRES_13
- POSTGRES_14
- POSTGRES_15
- POSTGRES_16
- POSTGRES_17
- POSTGRES_18
- POSTGRES_19
- POSTGRES_20
- SQLSERVER_2019_STANDARD
- SQLSERVER_2019_ENTERPRISE
- SQLSERVER_2019_EXPRESS
- SQLSERVER_2019_WEB
- SQLSERVER_2022_STANDARD
- SQLSERVER_2022_ENTERPRISE
- SQLSERVER_2022_EXPRESS
- SQLSERVER_2022_WEB
- SQLSERVER_2025_STANDARD
- SQLSERVER_2025_ENTERPRISE
- SQLSERVER_2025_EXPRESS
description: 'The database engine type and version. The `databaseVersion` field cannot be changed after instance creation. MySQL instances: `MYSQL_8_0`, `MYSQL_5_7` (default), or `MYSQL_5_6`. PostgreSQL instances: `POSTGRES_9_6`, `POSTGRES_10`, `POSTGRES_11`, `POSTGRES_12` (default), `POSTGRES_13`, or `POSTGRES_14`. SQL Server instances: `SQLSERVER_2017_STANDARD` (default), `SQLSERVER_2017_ENTERPRISE`, `SQLSERVER_2017_EXPRESS`, `SQLSERVER_2017_WEB`, `SQLSERVER_2019_STANDARD`, `SQLSERVER_2019_ENTERPRISE`, `SQLSERVER_2019_EXPRESS`, or `SQLSERVER_2019_WEB`.'
type: string
serverCaCert:
$ref: '#/components/schemas/SslCert'
description: SSL configuration.
connectionName:
description: Optional. Output only. Connection name of the Cloud SQL instance used in connection strings, in the format project:region:instance.
readOnly: true
type: string
nodeCount:
description: The number of read pool nodes in a read pool.
type: integer
format: int32
region:
description: The cloud region for the instance. For example, `us-central1`, `europe-west1`. The region cannot be changed after instance creation.
type: string
dnsNames:
type: array
items:
$ref: '#/components/schemas/DnsNameMapping'
readOnly: true
description: Output only. The list of DNS names used by this instance.
description: Connect settings retrieval response.
ConnectPoolNodeConfig:
type: object
description: Details of a single read pool node of a read pool.
properties:
dnsNames:
description: Output only. The list of DNS names used by this read pool node.
readOnly: true
type: array
items:
$ref: '#/components/schemas/DnsNameMapping'
dnsName:
description: Output only. The DNS name of the read pool node.
readOnly: true
type: string
ipAddresses:
type: array
readOnly: true
items:
$ref: '#/components/schemas/IpMapping'
description: Output only. Mappings containing IP addresses that can be used to connect to the read pool node.
name:
type: string
readOnly: true
description: Output only. The name of the read pool node. Doesn't include the project ID.
IpMapping:
type: object
description: Database instance IP mapping
properties:
timeToRetire:
format: google-datetime
description: The due time for this IP to be retired in [RFC 3339](https://tools.ietf.org/html/rfc3339) format, for example `2012-11-15T16:19:00.094Z`. This field is only available when the IP is scheduled to be retired.
type: string
type:
enum:
- SQL_IP_ADDRESS_TYPE_UNSPECIFIED
- PRIMARY
- OUTGOING
- PRIVATE
- MIGRATED_1ST_GEN
description: The type of this IP address. A `PRIMARY` address is a public address that can accept incoming connections. A `PRIVATE` address is a private address that can accept incoming connections. An `OUTGOING` address is the source address of connections originating from the instance, if supported.
type: string
ipAddress:
type: string
description: The IP address assigned.
SslCert:
type: object
properties:
createTime:
format: google-datetime
type: string
description: The time when the certificate was created in [RFC 3339](https://tools.ietf.org/html/rfc3339) format, for example `2012-11-15T16:19:00.094Z`
sha1Fingerprint:
type: string
description: Sha1 Fingerprint.
expirationTime:
type: string
description: The time when the certificate expires in [RFC 3339](https://tools.ietf.org/html/rfc3339) format, for example `2012-11-15T16:19:00.094Z`.
format: google-datetime
selfLink:
type: string
description: The URI of this resource.
commonName:
type: string
description: User supplied name. Constrained to [a-zA-Z.-_ ]+.
instance:
type: string
description: Name of the database instance.
certSerialNumber:
description: Serial number, as extracted from the certificate.
type: string
kind:
type: string
description: This is always `sql#sslCert`.
cert:
description: PEM representation.
type: string
description: SslCerts Resource
DnsNameMapping:
properties:
dnsScope:
readOnly: true
description: Output only. The scope that the DNS name applies to.
type: string
enum:
- DNS_SCOPE_UNSPECIFIED
- INSTANCE
- CLUSTER
recordManager:
enum:
- RECORD_MANAGER_UNSPECIFIED
- CUSTOMER
- CLOUD_SQL_AUTOMATION
type: string
readOnly: true
description: Output only. The manager for this DNS record.
connectionType:
description: Output only. The connection type of the DNS name.
type: string
enum:
- CONNECTION_TYPE_UNSPECIFIED
- PUBLIC
- PRIVATE_SERVICES_ACCESS
- PRIVATE_SERVICE_CONNECT
readOnly: true
name:
readOnly: true
type: string
description: Output only. The DNS name.
type: object
description: DNS metadata.
GenerateEphemeralCertResponse:
properties:
ephemeralCert:
$ref: '#/components/schemas/SslCert'
description: Generated cert
description: Ephemeral certificate creation request.
type: object
securitySchemes:
apiKey:
type: apiKey
in: query
name: key
description: API key; accepted by methods that do not need user data.
oauth2:
type: oauth2
flows:
authorizationCode:
authorizationUrl: https://accounts.google.com/o/oauth2/auth
tokenUrl: https://oauth2.googleapis.com/token
scopes:
https://www.googleapis.com/auth/cloud-platform: See, edit, configure, and delete your Google Cloud data and see the email address for your Google Account.
https://www.googleapis.com/auth/sqlservice.admin: Manage your Google SQL Service instances
externalDocs:
url: https://cloud.google.com/sql/docs
x-provenance:
method: harvested
publisher: Google
source: https://sqladmin.googleapis.com/$discovery/rest?version=v1
note: converted by discovery-to-openapi.py from Google's Discovery document (revision 20261107)