• Home
  • Line#
  • Scopes#
  • Navigate#
  • Raw
  • Download
1<html><body>
2<style>
3
4body, h1, h2, h3, div, span, p, pre, a {
5  margin: 0;
6  padding: 0;
7  border: 0;
8  font-weight: inherit;
9  font-style: inherit;
10  font-size: 100%;
11  font-family: inherit;
12  vertical-align: baseline;
13}
14
15body {
16  font-size: 13px;
17  padding: 1em;
18}
19
20h1 {
21  font-size: 26px;
22  margin-bottom: 1em;
23}
24
25h2 {
26  font-size: 24px;
27  margin-bottom: 1em;
28}
29
30h3 {
31  font-size: 20px;
32  margin-bottom: 1em;
33  margin-top: 1em;
34}
35
36pre, code {
37  line-height: 1.5;
38  font-family: Monaco, 'DejaVu Sans Mono', 'Bitstream Vera Sans Mono', 'Lucida Console', monospace;
39}
40
41pre {
42  margin-top: 0.5em;
43}
44
45h1, h2, h3, p {
46  font-family: Arial, sans serif;
47}
48
49h1, h2, h3 {
50  border-bottom: solid #CCC 1px;
51}
52
53.toc_element {
54  margin-top: 0.5em;
55}
56
57.firstline {
58  margin-left: 2 em;
59}
60
61.method  {
62  margin-top: 1em;
63  border: solid 1px #CCC;
64  padding: 1em;
65  background: #EEE;
66}
67
68.details {
69  font-weight: bold;
70  font-size: 14px;
71}
72
73</style>
74
75<h1><a href="sqladmin_v1beta4.html">Cloud SQL Administration API</a> . <a href="sqladmin_v1beta4.sslCerts.html">sslCerts</a></h1>
76<h2>Instance Methods</h2>
77<p class="toc_element">
78  <code><a href="#createEphemeral">createEphemeral(project, instance, body)</a></code></p>
79<p class="firstline">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.</p>
80<p class="toc_element">
81  <code><a href="#delete">delete(project, instance, sha1Fingerprint)</a></code></p>
82<p class="firstline">Deletes the SSL certificate. The change will not take effect until the instance is restarted.</p>
83<p class="toc_element">
84  <code><a href="#get">get(project, instance, sha1Fingerprint)</a></code></p>
85<p class="firstline">Retrieves a particular SSL certificate. Does not include the private key (required for usage). The private key must be saved from the response to initial creation.</p>
86<p class="toc_element">
87  <code><a href="#insert">insert(project, instance, body)</a></code></p>
88<p class="firstline">Creates an SSL certificate and returns it along with the private key and server certificate authority. The new certificate will not be usable until the instance is restarted.</p>
89<p class="toc_element">
90  <code><a href="#list">list(project, instance)</a></code></p>
91<p class="firstline">Lists all of the current SSL certificates for the instance.</p>
92<h3>Method Details</h3>
93<div class="method">
94    <code class="details" id="createEphemeral">createEphemeral(project, instance, body)</code>
95  <pre>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.
96
97Args:
98  project: string, Project ID of the Cloud SQL project. (required)
99  instance: string, Cloud SQL instance ID. This does not include the project ID. (required)
100  body: object, The request body. (required)
101    The object takes the form of:
102
103{ # SslCerts create ephemeral certificate request.
104    "public_key": "A String", # PEM encoded public key to include in the signed certificate.
105  }
106
107
108Returns:
109  An object of the form:
110
111    { # SslCerts Resource
112    "certSerialNumber": "A String", # Serial number, as extracted from the certificate.
113    "kind": "sql#sslCert", # This is always sql#sslCert.
114    "sha1Fingerprint": "A String", # Sha1 Fingerprint.
115    "commonName": "A String", # User supplied name. Constrained to [a-zA-Z.-_ ]+.
116    "instance": "A String", # Name of the database instance.
117    "cert": "A String", # PEM representation.
118    "expirationTime": "A String", # The time when the certificate expires in RFC 3339 format, for example 2012-11-15T16:19:00.094Z.
119    "createTime": "A String", # The time when the certificate was created in RFC 3339 format, for example 2012-11-15T16:19:00.094Z
120    "selfLink": "A String", # The URI of this resource.
121  }</pre>
122</div>
123
124<div class="method">
125    <code class="details" id="delete">delete(project, instance, sha1Fingerprint)</code>
126  <pre>Deletes the SSL certificate. The change will not take effect until the instance is restarted.
127
128Args:
129  project: string, Project ID of the project that contains the instance to be deleted. (required)
130  instance: string, Cloud SQL instance ID. This does not include the project ID. (required)
131  sha1Fingerprint: string, Sha1 FingerPrint. (required)
132
133Returns:
134  An object of the form:
135
136    { # An Operations resource contains information about database instance operations such as create, delete, and restart. Operations resources are created in response to operations that were initiated; you never create them directly.
137    "status": "A String", # The status of an operation. Valid values are PENDING, RUNNING, DONE, UNKNOWN.
138    "importContext": { # Database instance import context. # The context for import operation, if applicable.
139      "kind": "sql#importContext", # This is always sql#importContext.
140      "database": "A String", # The database (for example, guestbook) to which the import is made. If fileType is SQL and no database is specified, it is assumed that the database is specified in the file to be imported. If fileType is CSV, it must be specified.
141      "fileType": "A String", # The file type for the specified uri.
142          # SQL: The file contains SQL statements.
143          # CSV: The file contains CSV data.
144      "uri": "A String", # A path to the file in Google Cloud Storage from which the import is made. The URI is in the form gs://bucketName/fileName. Compressed gzip files (.gz) are supported when fileType is SQL.
145      "importUser": "A String", # The PostgreSQL user to use for this import operation. Defaults to cloudsqlsuperuser. Does not apply to MySQL instances.
146      "csvImportOptions": { # Options for importing data as CSV.
147        "table": "A String", # The table to which CSV data is imported.
148        "columns": [ # The columns to which CSV data is imported. If not specified, all columns of the database table are loaded with CSV data.
149          "A String",
150        ],
151      },
152    },
153    "kind": "sql#operation", # This is always sql#operation.
154    "name": "A String", # An identifier that uniquely identifies the operation. You can use this identifier to retrieve the Operations resource that has information about the operation.
155    "exportContext": { # Database instance export context. # The context for export operation, if applicable.
156      "kind": "sql#exportContext", # This is always sql#exportContext.
157      "fileType": "A String", # The file type for the specified uri.
158          # SQL: The file contains SQL statements.
159          # CSV: The file contains CSV data.
160      "uri": "A String", # The path to the file in Google Cloud Storage where the export will be stored. The URI is in the form gs://bucketName/fileName. If the file already exists, the operation fails. If fileType is SQL and the filename ends with .gz, the contents are compressed.
161      "csvExportOptions": { # Options for exporting data as CSV.
162        "selectQuery": "A String", # The select query used to extract the data.
163      },
164      "databases": [ # Databases (for example, guestbook) from which the export is made. If fileType is SQL and no database is specified, all databases are exported. If fileType is CSV, you can optionally specify at most one database to export. If csvExportOptions.selectQuery also specifies the database, this field will be ignored.
165        "A String",
166      ],
167      "sqlExportOptions": { # Options for exporting data as SQL statements.
168        "tables": [ # Tables to export, or that were exported, from the specified database. If you specify tables, specify one and only one database.
169          "A String",
170        ],
171        "schemaOnly": True or False, # Export only schemas.
172      },
173    },
174    "startTime": "A String", # The time this operation actually started in UTC timezone in RFC 3339 format, for example 2012-11-15T16:19:00.094Z.
175    "targetProject": "A String", # The project ID of the target instance related to this operation.
176    "targetId": "A String", # Name of the database instance related to this operation.
177    "operationType": "A String", # The type of the operation. Valid values are CREATE, DELETE, UPDATE, RESTART, IMPORT, EXPORT, BACKUP_VOLUME, RESTORE_VOLUME, CREATE_USER, DELETE_USER, CREATE_DATABASE, DELETE_DATABASE .
178    "targetLink": "A String",
179    "insertTime": "A String", # The time this operation was enqueued in UTC timezone in RFC 3339 format, for example 2012-11-15T16:19:00.094Z.
180    "error": { # Database instance operation errors list wrapper. # If errors occurred during processing of this operation, this field will be populated.
181      "kind": "sql#operationErrors", # This is always sql#operationErrors.
182      "errors": [ # The list of errors encountered while processing this operation.
183        { # Database instance operation error.
184          "kind": "sql#operationError", # This is always sql#operationError.
185          "code": "A String", # Identifies the specific error that occurred.
186          "message": "A String", # Additional information about the error encountered.
187        },
188      ],
189    },
190    "endTime": "A String", # The time this operation finished in UTC timezone in RFC 3339 format, for example 2012-11-15T16:19:00.094Z.
191    "selfLink": "A String", # The URI of this resource.
192    "user": "A String", # The email address of the user who initiated this operation.
193  }</pre>
194</div>
195
196<div class="method">
197    <code class="details" id="get">get(project, instance, sha1Fingerprint)</code>
198  <pre>Retrieves a particular SSL certificate. Does not include the private key (required for usage). The private key must be saved from the response to initial creation.
199
200Args:
201  project: string, Project ID of the project that contains the instance. (required)
202  instance: string, Cloud SQL instance ID. This does not include the project ID. (required)
203  sha1Fingerprint: string, Sha1 FingerPrint. (required)
204
205Returns:
206  An object of the form:
207
208    { # SslCerts Resource
209    "certSerialNumber": "A String", # Serial number, as extracted from the certificate.
210    "kind": "sql#sslCert", # This is always sql#sslCert.
211    "sha1Fingerprint": "A String", # Sha1 Fingerprint.
212    "commonName": "A String", # User supplied name. Constrained to [a-zA-Z.-_ ]+.
213    "instance": "A String", # Name of the database instance.
214    "cert": "A String", # PEM representation.
215    "expirationTime": "A String", # The time when the certificate expires in RFC 3339 format, for example 2012-11-15T16:19:00.094Z.
216    "createTime": "A String", # The time when the certificate was created in RFC 3339 format, for example 2012-11-15T16:19:00.094Z
217    "selfLink": "A String", # The URI of this resource.
218  }</pre>
219</div>
220
221<div class="method">
222    <code class="details" id="insert">insert(project, instance, body)</code>
223  <pre>Creates an SSL certificate and returns it along with the private key and server certificate authority. The new certificate will not be usable until the instance is restarted.
224
225Args:
226  project: string, Project ID of the project to which the newly created Cloud SQL instances should belong. (required)
227  instance: string, Cloud SQL instance ID. This does not include the project ID. (required)
228  body: object, The request body. (required)
229    The object takes the form of:
230
231{ # SslCerts insert request.
232    "commonName": "A 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.
233  }
234
235
236Returns:
237  An object of the form:
238
239    { # SslCert insert response.
240    "kind": "sql#sslCertsInsert", # This is always sql#sslCertsInsert.
241    "clientCert": { # SslCertDetail. # The new client certificate and private key. The new certificate will not work until the instance is restarted for First Generation instances.
242      "certPrivateKey": "A String", # The private key for the client cert, in pem format. Keep private in order to protect your security.
243      "certInfo": { # SslCerts Resource # The public information about the cert.
244        "certSerialNumber": "A String", # Serial number, as extracted from the certificate.
245        "kind": "sql#sslCert", # This is always sql#sslCert.
246        "sha1Fingerprint": "A String", # Sha1 Fingerprint.
247        "commonName": "A String", # User supplied name. Constrained to [a-zA-Z.-_ ]+.
248        "instance": "A String", # Name of the database instance.
249        "cert": "A String", # PEM representation.
250        "expirationTime": "A String", # The time when the certificate expires in RFC 3339 format, for example 2012-11-15T16:19:00.094Z.
251        "createTime": "A String", # The time when the certificate was created in RFC 3339 format, for example 2012-11-15T16:19:00.094Z
252        "selfLink": "A String", # The URI of this resource.
253      },
254    },
255    "operation": { # An Operations resource contains information about database instance operations such as create, delete, and restart. Operations resources are created in response to operations that were initiated; you never create them directly. # The operation to track the ssl certs insert request.
256      "status": "A String", # The status of an operation. Valid values are PENDING, RUNNING, DONE, UNKNOWN.
257      "importContext": { # Database instance import context. # The context for import operation, if applicable.
258        "kind": "sql#importContext", # This is always sql#importContext.
259        "database": "A String", # The database (for example, guestbook) to which the import is made. If fileType is SQL and no database is specified, it is assumed that the database is specified in the file to be imported. If fileType is CSV, it must be specified.
260        "fileType": "A String", # The file type for the specified uri.
261            # SQL: The file contains SQL statements.
262            # CSV: The file contains CSV data.
263        "uri": "A String", # A path to the file in Google Cloud Storage from which the import is made. The URI is in the form gs://bucketName/fileName. Compressed gzip files (.gz) are supported when fileType is SQL.
264        "importUser": "A String", # The PostgreSQL user to use for this import operation. Defaults to cloudsqlsuperuser. Does not apply to MySQL instances.
265        "csvImportOptions": { # Options for importing data as CSV.
266          "table": "A String", # The table to which CSV data is imported.
267          "columns": [ # The columns to which CSV data is imported. If not specified, all columns of the database table are loaded with CSV data.
268            "A String",
269          ],
270        },
271      },
272      "kind": "sql#operation", # This is always sql#operation.
273      "name": "A String", # An identifier that uniquely identifies the operation. You can use this identifier to retrieve the Operations resource that has information about the operation.
274      "exportContext": { # Database instance export context. # The context for export operation, if applicable.
275        "kind": "sql#exportContext", # This is always sql#exportContext.
276        "fileType": "A String", # The file type for the specified uri.
277            # SQL: The file contains SQL statements.
278            # CSV: The file contains CSV data.
279        "uri": "A String", # The path to the file in Google Cloud Storage where the export will be stored. The URI is in the form gs://bucketName/fileName. If the file already exists, the operation fails. If fileType is SQL and the filename ends with .gz, the contents are compressed.
280        "csvExportOptions": { # Options for exporting data as CSV.
281          "selectQuery": "A String", # The select query used to extract the data.
282        },
283        "databases": [ # Databases (for example, guestbook) from which the export is made. If fileType is SQL and no database is specified, all databases are exported. If fileType is CSV, you can optionally specify at most one database to export. If csvExportOptions.selectQuery also specifies the database, this field will be ignored.
284          "A String",
285        ],
286        "sqlExportOptions": { # Options for exporting data as SQL statements.
287          "tables": [ # Tables to export, or that were exported, from the specified database. If you specify tables, specify one and only one database.
288            "A String",
289          ],
290          "schemaOnly": True or False, # Export only schemas.
291        },
292      },
293      "startTime": "A String", # The time this operation actually started in UTC timezone in RFC 3339 format, for example 2012-11-15T16:19:00.094Z.
294      "targetProject": "A String", # The project ID of the target instance related to this operation.
295      "targetId": "A String", # Name of the database instance related to this operation.
296      "operationType": "A String", # The type of the operation. Valid values are CREATE, DELETE, UPDATE, RESTART, IMPORT, EXPORT, BACKUP_VOLUME, RESTORE_VOLUME, CREATE_USER, DELETE_USER, CREATE_DATABASE, DELETE_DATABASE .
297      "targetLink": "A String",
298      "insertTime": "A String", # The time this operation was enqueued in UTC timezone in RFC 3339 format, for example 2012-11-15T16:19:00.094Z.
299      "error": { # Database instance operation errors list wrapper. # If errors occurred during processing of this operation, this field will be populated.
300        "kind": "sql#operationErrors", # This is always sql#operationErrors.
301        "errors": [ # The list of errors encountered while processing this operation.
302          { # Database instance operation error.
303            "kind": "sql#operationError", # This is always sql#operationError.
304            "code": "A String", # Identifies the specific error that occurred.
305            "message": "A String", # Additional information about the error encountered.
306          },
307        ],
308      },
309      "endTime": "A String", # The time this operation finished in UTC timezone in RFC 3339 format, for example 2012-11-15T16:19:00.094Z.
310      "selfLink": "A String", # The URI of this resource.
311      "user": "A String", # The email address of the user who initiated this operation.
312    },
313    "serverCaCert": { # SslCerts Resource # 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.
314      "certSerialNumber": "A String", # Serial number, as extracted from the certificate.
315      "kind": "sql#sslCert", # This is always sql#sslCert.
316      "sha1Fingerprint": "A String", # Sha1 Fingerprint.
317      "commonName": "A String", # User supplied name. Constrained to [a-zA-Z.-_ ]+.
318      "instance": "A String", # Name of the database instance.
319      "cert": "A String", # PEM representation.
320      "expirationTime": "A String", # The time when the certificate expires in RFC 3339 format, for example 2012-11-15T16:19:00.094Z.
321      "createTime": "A String", # The time when the certificate was created in RFC 3339 format, for example 2012-11-15T16:19:00.094Z
322      "selfLink": "A String", # The URI of this resource.
323    },
324  }</pre>
325</div>
326
327<div class="method">
328    <code class="details" id="list">list(project, instance)</code>
329  <pre>Lists all of the current SSL certificates for the instance.
330
331Args:
332  project: string, Project ID of the project for which to list Cloud SQL instances. (required)
333  instance: string, Cloud SQL instance ID. This does not include the project ID. (required)
334
335Returns:
336  An object of the form:
337
338    { # SslCerts list response.
339    "items": [ # List of client certificates for the instance.
340      { # SslCerts Resource
341        "certSerialNumber": "A String", # Serial number, as extracted from the certificate.
342        "kind": "sql#sslCert", # This is always sql#sslCert.
343        "sha1Fingerprint": "A String", # Sha1 Fingerprint.
344        "commonName": "A String", # User supplied name. Constrained to [a-zA-Z.-_ ]+.
345        "instance": "A String", # Name of the database instance.
346        "cert": "A String", # PEM representation.
347        "expirationTime": "A String", # The time when the certificate expires in RFC 3339 format, for example 2012-11-15T16:19:00.094Z.
348        "createTime": "A String", # The time when the certificate was created in RFC 3339 format, for example 2012-11-15T16:19:00.094Z
349        "selfLink": "A String", # The URI of this resource.
350      },
351    ],
352    "kind": "sql#sslCertsList", # This is always sql#sslCertsList.
353  }</pre>
354</div>
355
356</body></html>