SslCerts: insert

Requires authorization

Creates an SSL certificate and returns it along with the private key and server certificate authority.

For First Generation instances, the new certificate does not take effect until the instance is restarted.

Request

HTTP request

POST https://www.googleapis.com/sql/v1beta4/projects/project/instances/instance/sslCerts

Parameters

Parameter name Value Description
Path parameters
instance string Cloud SQL instance ID. This does not include the project ID.
project string Project ID of the project to which the newly created Cloud SQL instances should belong.

Authorization

This request requires authorization with at least one of the following scopes (read more about authentication and authorization).

Scope
https://www.googleapis.com/auth/sqlservice.admin
https://www.googleapis.com/auth/cloud-platform

Request body

In the request body, supply data with the following structure:

{
  "commonName": string
}
Property name Value Description Notes
commonName string User supplied name. Must be a distinct name from the other certificates for this instance.

Response

If successful, this method returns a response body with the following structure:

{
  "kind": "sql#sslCertsInsert",
  "serverCaCert": sslCerts Resource,
  "clientCert": {
    "certInfo": sslCerts Resource,
    "certPrivateKey": string
  },
  "operation": operations Resource
}
Property name Value Description Notes
kind string This is always sql#sslCertsInsert.
serverCaCert nested object The server Certificate Authority's certificate. If this is missing you can force a new one to be generated by calling resetSslConfig method on instances resource.
clientCert nested object The new client certificate and private key.
clientCert.certInfo nested object The public information about the cert.
clientCert.certPrivateKey string The private key for the client cert, in pem format. Keep private in order to protect your security.
operation nested object The operation to track the ssl certs insert request.

Send feedback about...

Cloud SQL for MySQL