Please note that the contents of this offline web site may be out of date. To access the most recent documentation visit the online version .
Note that links that point to online resources are green in color and will open in a new window.
We would love it if you could give us feedback about this material by filling this form (You have to be online to fill it)



SslCerts: insert

Requires authorization

Creates an SSL certificate and returns the certificate, the associated private key, and the server certificate authority. Try it now .

Download the private key to a safe location. The response from the insert method is the only time you have access to the private key.
The new certificate will not be usable until the instance is restarted.

Request

HTTP request

POST https://www.googleapis.com/sql/v1beta3/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 the following scope ( read more about authentication and authorization ).

Scope
https://www.googleapis.com/auth/sqlservice.admin

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. New certificates will not be usable until the instance is restarted.

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
  }
}
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. The new certificate will not work until the instance is restarted.
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.

Try it!

Use the APIs Explorer below to call this method on live data and see the response.

Authentication required

You need to be signed in with Google+ to do that.

Signing you in...

Google Developers needs your permission to do that.