blob: 36d24dc19070e381053872e8b17e2dac72869a91 [file] [log] [blame]
Craig Citroe633be12015-03-02 13:40:36 -08001<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">
Takashi Matsuo06694102015-09-11 13:55:40 -070078 <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">
Craig Citroe633be12015-03-02 13:40:36 -080081 <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">
Takashi Matsuo06694102015-09-11 13:55:40 -070094 <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">
Craig Citroe633be12015-03-02 13:40:36 -0800125 <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 "fileType": "A String", # The file type for the specified uri.
140 # SQL: The file contains SQL statements.
141 # CSV: The file contains CSV data.
142 "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.
143 "kind": "sql#importContext", # This is always sql#importContext.
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 "csvImportOptions": { # Options for importing data as CSV.
146 "table": "A String", # The table to which CSV data is imported.
147 "columns": [ # The columns to which CSV data is imported. If not specified, all columns of the database table are loaded with CSV data.
148 "A String",
149 ],
150 },
151 },
Nathaniel Manista4f877e52015-06-15 16:44:50 +0000152 "kind": "sql#operation", # This is always sql#operation.
Craig Citroe633be12015-03-02 13:40:36 -0800153 "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.
154 "exportContext": { # Database instance export context. # The context for export operation, if applicable.
155 "kind": "sql#exportContext", # This is always sql#exportContext.
156 "fileType": "A String", # The file type for the specified uri.
157 # SQL: The file contains SQL statements.
158 # CSV: The file contains CSV data.
159 "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.
160 "csvExportOptions": { # Options for exporting data as CSV.
161 "selectQuery": "A String", # The select query used to extract the data.
162 },
163 "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.
164 "A String",
165 ],
166 "sqlExportOptions": { # Options for exporting data as SQL statements.
167 "tables": [ # Tables to export, or that were exported, from the specified database. If you specify tables, specify one and only one database.
168 "A String",
169 ],
Takashi Matsuo06694102015-09-11 13:55:40 -0700170 "schemaOnly": True or False, # Export only schema.
Craig Citroe633be12015-03-02 13:40:36 -0800171 },
172 },
173 "startTime": "A String", # The time this operation actually started in UTC timezone in RFC 3339 format, for example 2012-11-15T16:19:00.094Z.
174 "targetProject": "A String", # The project ID of the target instance related to this operation.
175 "targetId": "A String", # Name of the database instance related to this operation.
Nathaniel Manista4f877e52015-06-15 16:44:50 +0000176 "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 .
Craig Citroe633be12015-03-02 13:40:36 -0800177 "targetLink": "A String", # The URI of the instance related to the operation.
178 "insertTime": "A String", # The time this operation was enqueued in UTC timezone in RFC 3339 format, for example 2012-11-15T16:19:00.094Z.
Nathaniel Manista4f877e52015-06-15 16:44:50 +0000179 "error": { # Database instance operation errors list wrapper. # If errors occurred during processing of this operation, this field will be populated.
180 "kind": "sql#operationErrors", # This is always sql#operationErrors.
Craig Citroe633be12015-03-02 13:40:36 -0800181 "errors": [ # The list of errors encountered while processing this operation.
182 { # Database instance operation error.
183 "kind": "sql#operationError", # This is always sql#operationError.
184 "code": "A String", # Identifies the specific error that occurred.
185 "message": "A String", # Additional information about the error encountered.
186 },
187 ],
188 },
189 "endTime": "A String", # The time this operation finished in UTC timezone in RFC 3339 format, for example 2012-11-15T16:19:00.094Z.
190 "selfLink": "A String", # The URI of this resource.
191 "user": "A String", # The email address of the user who initiated this operation.
192 }</pre>
193</div>
194
195<div class="method">
196 <code class="details" id="get">get(project, instance, sha1Fingerprint)</code>
197 <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.
198
199Args:
200 project: string, Project ID of the project that contains the instance. (required)
201 instance: string, Cloud SQL instance ID. This does not include the project ID. (required)
202 sha1Fingerprint: string, Sha1 FingerPrint. (required)
203
204Returns:
205 An object of the form:
206
207 { # SslCerts Resource
208 "certSerialNumber": "A String", # Serial number, as extracted from the certificate.
209 "kind": "sql#sslCert", # This is always sql#sslCert.
210 "sha1Fingerprint": "A String", # Sha1 Fingerprint.
211 "commonName": "A String", # User supplied name. Constrained to [a-zA-Z.-_ ]+.
212 "instance": "A String", # Name of the database instance.
213 "cert": "A String", # PEM representation.
214 "expirationTime": "A String", # The time when the certificate expires in RFC 3339 format, for example 2012-11-15T16:19:00.094Z.
215 "createTime": "A String", # The time when the certificate was created in RFC 3339 format, for example 2012-11-15T16:19:00.094Z
Nathaniel Manista4f877e52015-06-15 16:44:50 +0000216 "selfLink": "A String", # The URI of this resource.
Craig Citroe633be12015-03-02 13:40:36 -0800217 }</pre>
218</div>
219
220<div class="method">
221 <code class="details" id="insert">insert(project, instance, body)</code>
222 <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.
223
224Args:
225 project: string, Project ID of the project to which the newly created Cloud SQL instances should belong. (required)
226 instance: string, Cloud SQL instance ID. This does not include the project ID. (required)
227 body: object, The request body. (required)
228 The object takes the form of:
229
230{ # SslCerts insert request.
231 "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.
232 }
233
234
235Returns:
236 An object of the form:
237
238 { # SslCert insert response.
239 "kind": "sql#sslCertsInsert", # This is always sql#sslCertsInsert.
240 "clientCert": { # SslCertDetail. # The new client certificate and private key. The new certificate will not work until the instance is restarted.
241 "certPrivateKey": "A String", # The private key for the client cert, in pem format. Keep private in order to protect your security.
242 "certInfo": { # SslCerts Resource # The public information about the cert.
243 "certSerialNumber": "A String", # Serial number, as extracted from the certificate.
244 "kind": "sql#sslCert", # This is always sql#sslCert.
245 "sha1Fingerprint": "A String", # Sha1 Fingerprint.
246 "commonName": "A String", # User supplied name. Constrained to [a-zA-Z.-_ ]+.
247 "instance": "A String", # Name of the database instance.
248 "cert": "A String", # PEM representation.
249 "expirationTime": "A String", # The time when the certificate expires in RFC 3339 format, for example 2012-11-15T16:19:00.094Z.
250 "createTime": "A String", # The time when the certificate was created in RFC 3339 format, for example 2012-11-15T16:19:00.094Z
Nathaniel Manista4f877e52015-06-15 16:44:50 +0000251 "selfLink": "A String", # The URI of this resource.
Craig Citroe633be12015-03-02 13:40:36 -0800252 },
253 },
254 "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.
255 "certSerialNumber": "A String", # Serial number, as extracted from the certificate.
256 "kind": "sql#sslCert", # This is always sql#sslCert.
257 "sha1Fingerprint": "A String", # Sha1 Fingerprint.
258 "commonName": "A String", # User supplied name. Constrained to [a-zA-Z.-_ ]+.
259 "instance": "A String", # Name of the database instance.
260 "cert": "A String", # PEM representation.
261 "expirationTime": "A String", # The time when the certificate expires in RFC 3339 format, for example 2012-11-15T16:19:00.094Z.
262 "createTime": "A String", # The time when the certificate was created in RFC 3339 format, for example 2012-11-15T16:19:00.094Z
Nathaniel Manista4f877e52015-06-15 16:44:50 +0000263 "selfLink": "A String", # The URI of this resource.
Craig Citroe633be12015-03-02 13:40:36 -0800264 },
265 }</pre>
266</div>
267
268<div class="method">
269 <code class="details" id="list">list(project, instance)</code>
270 <pre>Lists all of the current SSL certificates for the instance.
271
272Args:
273 project: string, Project ID of the project for which to list Cloud SQL instances. (required)
274 instance: string, Cloud SQL instance ID. This does not include the project ID. (required)
275
276Returns:
277 An object of the form:
278
279 { # SslCerts list response.
280 "items": [ # List of client certificates for the instance.
281 { # SslCerts Resource
282 "certSerialNumber": "A String", # Serial number, as extracted from the certificate.
283 "kind": "sql#sslCert", # This is always sql#sslCert.
284 "sha1Fingerprint": "A String", # Sha1 Fingerprint.
285 "commonName": "A String", # User supplied name. Constrained to [a-zA-Z.-_ ]+.
286 "instance": "A String", # Name of the database instance.
287 "cert": "A String", # PEM representation.
288 "expirationTime": "A String", # The time when the certificate expires in RFC 3339 format, for example 2012-11-15T16:19:00.094Z.
289 "createTime": "A String", # The time when the certificate was created in RFC 3339 format, for example 2012-11-15T16:19:00.094Z
Nathaniel Manista4f877e52015-06-15 16:44:50 +0000290 "selfLink": "A String", # The URI of this resource.
Craig Citroe633be12015-03-02 13:40:36 -0800291 },
292 ],
293 "kind": "sql#sslCertsList", # This is always sql#sslCertsList.
294 }</pre>
295</div>
296
297</body></html>