blob: 58e35a27ed03478352e12e27f9b4e963cff37cf2 [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">
78 <code><a href="#delete">delete(project, instance, sha1Fingerprint)</a></code></p>
79<p class="firstline">Deletes the SSL certificate. The change will not take effect until the instance is restarted.</p>
80<p class="toc_element">
81 <code><a href="#get">get(project, instance, sha1Fingerprint)</a></code></p>
82<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>
83<p class="toc_element">
84 <code><a href="#insert">insert(project, instance, body)</a></code></p>
85<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>
86<p class="toc_element">
87 <code><a href="#list">list(project, instance)</a></code></p>
88<p class="firstline">Lists all of the current SSL certificates for the instance.</p>
89<h3>Method Details</h3>
90<div class="method">
91 <code class="details" id="delete">delete(project, instance, sha1Fingerprint)</code>
92 <pre>Deletes the SSL certificate. The change will not take effect until the instance is restarted.
93
94Args:
95 project: string, Project ID of the project that contains the instance to be deleted. (required)
96 instance: string, Cloud SQL instance ID. This does not include the project ID. (required)
97 sha1Fingerprint: string, Sha1 FingerPrint. (required)
98
99Returns:
100 An object of the form:
101
102 { # 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.
103 "status": "A String", # The status of an operation. Valid values are PENDING, RUNNING, DONE, UNKNOWN.
104 "importContext": { # Database instance import context. # The context for import operation, if applicable.
105 "fileType": "A String", # The file type for the specified uri.
106 # SQL: The file contains SQL statements.
107 # CSV: The file contains CSV data.
108 "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.
109 "kind": "sql#importContext", # This is always sql#importContext.
110 "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.
111 "csvImportOptions": { # Options for importing data as CSV.
112 "table": "A String", # The table to which CSV data is imported.
113 "columns": [ # The columns to which CSV data is imported. If not specified, all columns of the database table are loaded with CSV data.
114 "A String",
115 ],
116 },
117 },
Nathaniel Manista4f877e52015-06-15 16:44:50 +0000118 "kind": "sql#operation", # This is always sql#operation.
Craig Citroe633be12015-03-02 13:40:36 -0800119 "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.
120 "exportContext": { # Database instance export context. # The context for export operation, if applicable.
121 "kind": "sql#exportContext", # This is always sql#exportContext.
122 "fileType": "A String", # The file type for the specified uri.
123 # SQL: The file contains SQL statements.
124 # CSV: The file contains CSV data.
125 "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.
126 "csvExportOptions": { # Options for exporting data as CSV.
127 "selectQuery": "A String", # The select query used to extract the data.
128 },
129 "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.
130 "A String",
131 ],
132 "sqlExportOptions": { # Options for exporting data as SQL statements.
133 "tables": [ # Tables to export, or that were exported, from the specified database. If you specify tables, specify one and only one database.
134 "A String",
135 ],
136 },
137 },
138 "startTime": "A String", # The time this operation actually started in UTC timezone in RFC 3339 format, for example 2012-11-15T16:19:00.094Z.
139 "targetProject": "A String", # The project ID of the target instance related to this operation.
140 "targetId": "A String", # Name of the database instance related to this operation.
Nathaniel Manista4f877e52015-06-15 16:44:50 +0000141 "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 -0800142 "targetLink": "A String", # The URI of the instance related to the operation.
143 "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 +0000144 "error": { # Database instance operation errors list wrapper. # If errors occurred during processing of this operation, this field will be populated.
145 "kind": "sql#operationErrors", # This is always sql#operationErrors.
Craig Citroe633be12015-03-02 13:40:36 -0800146 "errors": [ # The list of errors encountered while processing this operation.
147 { # Database instance operation error.
148 "kind": "sql#operationError", # This is always sql#operationError.
149 "code": "A String", # Identifies the specific error that occurred.
150 "message": "A String", # Additional information about the error encountered.
151 },
152 ],
153 },
154 "endTime": "A String", # The time this operation finished in UTC timezone in RFC 3339 format, for example 2012-11-15T16:19:00.094Z.
155 "selfLink": "A String", # The URI of this resource.
156 "user": "A String", # The email address of the user who initiated this operation.
157 }</pre>
158</div>
159
160<div class="method">
161 <code class="details" id="get">get(project, instance, sha1Fingerprint)</code>
162 <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.
163
164Args:
165 project: string, Project ID of the project that contains the instance. (required)
166 instance: string, Cloud SQL instance ID. This does not include the project ID. (required)
167 sha1Fingerprint: string, Sha1 FingerPrint. (required)
168
169Returns:
170 An object of the form:
171
172 { # SslCerts Resource
173 "certSerialNumber": "A String", # Serial number, as extracted from the certificate.
174 "kind": "sql#sslCert", # This is always sql#sslCert.
175 "sha1Fingerprint": "A String", # Sha1 Fingerprint.
176 "commonName": "A String", # User supplied name. Constrained to [a-zA-Z.-_ ]+.
177 "instance": "A String", # Name of the database instance.
178 "cert": "A String", # PEM representation.
179 "expirationTime": "A String", # The time when the certificate expires in RFC 3339 format, for example 2012-11-15T16:19:00.094Z.
180 "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 +0000181 "selfLink": "A String", # The URI of this resource.
Craig Citroe633be12015-03-02 13:40:36 -0800182 }</pre>
183</div>
184
185<div class="method">
186 <code class="details" id="insert">insert(project, instance, body)</code>
187 <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.
188
189Args:
190 project: string, Project ID of the project to which the newly created Cloud SQL instances should belong. (required)
191 instance: string, Cloud SQL instance ID. This does not include the project ID. (required)
192 body: object, The request body. (required)
193 The object takes the form of:
194
195{ # SslCerts insert request.
196 "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.
197 }
198
199
200Returns:
201 An object of the form:
202
203 { # SslCert insert response.
204 "kind": "sql#sslCertsInsert", # This is always sql#sslCertsInsert.
205 "clientCert": { # SslCertDetail. # The new client certificate and private key. The new certificate will not work until the instance is restarted.
206 "certPrivateKey": "A String", # The private key for the client cert, in pem format. Keep private in order to protect your security.
207 "certInfo": { # SslCerts Resource # The public information about the cert.
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 },
218 },
219 "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.
220 "certSerialNumber": "A String", # Serial number, as extracted from the certificate.
221 "kind": "sql#sslCert", # This is always sql#sslCert.
222 "sha1Fingerprint": "A String", # Sha1 Fingerprint.
223 "commonName": "A String", # User supplied name. Constrained to [a-zA-Z.-_ ]+.
224 "instance": "A String", # Name of the database instance.
225 "cert": "A String", # PEM representation.
226 "expirationTime": "A String", # The time when the certificate expires in RFC 3339 format, for example 2012-11-15T16:19:00.094Z.
227 "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 +0000228 "selfLink": "A String", # The URI of this resource.
Craig Citroe633be12015-03-02 13:40:36 -0800229 },
230 }</pre>
231</div>
232
233<div class="method">
234 <code class="details" id="list">list(project, instance)</code>
235 <pre>Lists all of the current SSL certificates for the instance.
236
237Args:
238 project: string, Project ID of the project for which to list Cloud SQL instances. (required)
239 instance: string, Cloud SQL instance ID. This does not include the project ID. (required)
240
241Returns:
242 An object of the form:
243
244 { # SslCerts list response.
245 "items": [ # List of client certificates for the instance.
246 { # SslCerts Resource
247 "certSerialNumber": "A String", # Serial number, as extracted from the certificate.
248 "kind": "sql#sslCert", # This is always sql#sslCert.
249 "sha1Fingerprint": "A String", # Sha1 Fingerprint.
250 "commonName": "A String", # User supplied name. Constrained to [a-zA-Z.-_ ]+.
251 "instance": "A String", # Name of the database instance.
252 "cert": "A String", # PEM representation.
253 "expirationTime": "A String", # The time when the certificate expires in RFC 3339 format, for example 2012-11-15T16:19:00.094Z.
254 "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 +0000255 "selfLink": "A String", # The URI of this resource.
Craig Citroe633be12015-03-02 13:40:36 -0800256 },
257 ],
258 "kind": "sql#sslCertsList", # This is always sql#sslCertsList.
259 }</pre>
260</div>
261
262</body></html>