Debian Codegraph @

docs/dyn/sqladmin_v1.sslCerts.html

raw
1 <html><body>
2 <style>
3
4 body, 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
15 body {
16 font-size: 13px;
17 padding: 1em;
18 }
19
20 h1 {
21 font-size: 26px;
22 margin-bottom: 1em;
23 }
24
25 h2 {
26 font-size: 24px;
27 margin-bottom: 1em;
28 }
29
30 h3 {
31 font-size: 20px;
32 margin-bottom: 1em;
33 margin-top: 1em;
34 }
35
36 pre, code {
37 line-height: 1.5;
38 font-family: Monaco, 'DejaVu Sans Mono', 'Bitstream Vera Sans Mono', 'Lucida Console', monospace;
39 }
40
41 pre {
42 margin-top: 0.5em;
43 }
44
45 h1, h2, h3, p {
46 font-family: Arial, sans serif;
47 }
48
49 h1, 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_v1.html">Cloud SQL Admin API</a> . <a href="sqladmin_v1.sslCerts.html">sslCerts</a></h1>
76 <h2>Instance Methods</h2>
77 <p class="toc_element">
78 <code><a href="#close">close()</a></code></p>
79 <p class="firstline">Close httplib2 connections.</p>
80 <p class="toc_element">
81 <code><a href="#createEphemeral">createEphemeral(project, instance, body=None, x__xgafv=None)</a></code></p>
82 <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>
83 <p class="toc_element">
84 <code><a href="#delete">delete(project, instance, sha1Fingerprint, x__xgafv=None)</a></code></p>
85 <p class="firstline">Deletes the SSL certificate. For First Generation instances, the certificate remains valid until the instance is restarted.</p>
86 <p class="toc_element">
87 <code><a href="#get">get(project, instance, sha1Fingerprint, x__xgafv=None)</a></code></p>
88 <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>
89 <p class="toc_element">
90 <code><a href="#insert">insert(project, instance, body=None, x__xgafv=None)</a></code></p>
91 <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>
92 <p class="toc_element">
93 <code><a href="#list">list(project, instance, x__xgafv=None)</a></code></p>
94 <p class="firstline">Lists all of the current SSL certificates for the instance.</p>
95 <h3>Method Details</h3>
96 <div class="method">
97 <code class="details" id="close">close()</code>
98 <pre>Close httplib2 connections.</pre>
99 </div>
100
101 <div class="method">
102 <code class="details" id="createEphemeral">createEphemeral(project, instance, body=None, x__xgafv=None)</code>
103 <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.
104
105 Args:
106 project: string, Project ID of the Cloud SQL project. (required)
107 instance: string, Cloud SQL instance ID. This does not include the project ID. (required)
108 body: object, The request body.
109 The object takes the form of:
110
111 { # SslCerts create ephemeral certificate request.
112 &quot;access_token&quot;: &quot;A String&quot;, # Access token to include in the signed certificate.
113 &quot;public_key&quot;: &quot;A String&quot;, # PEM encoded public key to include in the signed certificate.
114 }
115
116 x__xgafv: string, V1 error format.
117 Allowed values
118 1 - v1 error format
119 2 - v2 error format
120
121 Returns:
122 An object of the form:
123
124 { # SslCerts Resource
125 &quot;cert&quot;: &quot;A String&quot;, # PEM representation.
126 &quot;certSerialNumber&quot;: &quot;A String&quot;, # Serial number, as extracted from the certificate.
127 &quot;commonName&quot;: &quot;A String&quot;, # User supplied name. Constrained to [a-zA-Z.-_ ]+.
128 &quot;createTime&quot;: &quot;A String&quot;, # The time when the certificate was created in [RFC 3339](https://tools.ietf.org/html/rfc3339) format, for example `2012-11-15T16:19:00.094Z`
129 &quot;expirationTime&quot;: &quot;A String&quot;, # The time when the certificate expires in [RFC 3339](https://tools.ietf.org/html/rfc3339) format, for example `2012-11-15T16:19:00.094Z`.
130 &quot;instance&quot;: &quot;A String&quot;, # Name of the database instance.
131 &quot;kind&quot;: &quot;A String&quot;, # This is always `sql#sslCert`.
132 &quot;selfLink&quot;: &quot;A String&quot;, # The URI of this resource.
133 &quot;sha1Fingerprint&quot;: &quot;A String&quot;, # Sha1 Fingerprint.
134 }</pre>
135 </div>
136
137 <div class="method">
138 <code class="details" id="delete">delete(project, instance, sha1Fingerprint, x__xgafv=None)</code>
139 <pre>Deletes the SSL certificate. For First Generation instances, the certificate remains valid until the instance is restarted.
140
141 Args:
142 project: string, Project ID of the project that contains the instance. (required)
143 instance: string, Cloud SQL instance ID. This does not include the project ID. (required)
144 sha1Fingerprint: string, Sha1 FingerPrint. (required)
145 x__xgafv: string, V1 error format.
146 Allowed values
147 1 - v1 error format
148 2 - v2 error format
149
150 Returns:
151 An object of the form:
152
153 { # An Operation resource. For successful operations that return an Operation resource, only the fields relevant to the operation are populated in the resource.
154 &quot;acquireSsrsLeaseContext&quot;: { # Acquire SSRS lease context. # The context for acquire SSRS lease operation, if applicable.
155 &quot;duration&quot;: &quot;A String&quot;, # Lease duration needed for SSRS setup.
156 &quot;reportDatabase&quot;: &quot;A String&quot;, # The report database to be used for SSRS setup.
157 &quot;serviceLogin&quot;: &quot;A String&quot;, # The username to be used as the service login to connect to the report database for SSRS setup.
158 &quot;setupLogin&quot;: &quot;A String&quot;, # The username to be used as the setup login to connect to the database server for SSRS setup.
159 },
160 &quot;apiWarning&quot;: { # An Admin API warning message. # An Admin API warning message.
161 &quot;code&quot;: &quot;A String&quot;, # Code to uniquely identify the warning type.
162 &quot;message&quot;: &quot;A String&quot;, # The warning message.
163 &quot;region&quot;: &quot;A String&quot;, # The region name for REGION_UNREACHABLE warning.
164 },
165 &quot;backupContext&quot;: { # Backup context. # The context for backup operation, if applicable.
166 &quot;backupId&quot;: &quot;A String&quot;, # The identifier of the backup.
167 &quot;kind&quot;: &quot;A String&quot;, # This is always `sql#backupContext`.
168 &quot;name&quot;: &quot;A String&quot;, # The name of the backup. Format: projects/{project}/backups/{backup}
169 },
170 &quot;endTime&quot;: &quot;A String&quot;, # The time this operation finished in UTC timezone in [RFC 3339](https://tools.ietf.org/html/rfc3339) format, for example `2012-11-15T16:19:00.094Z`.
171 &quot;error&quot;: { # Database instance operation errors list wrapper. # If errors occurred during processing of this operation, this field will be populated.
172 &quot;errors&quot;: [ # The list of errors encountered while processing this operation.
173 { # Database instance operation error.
174 &quot;code&quot;: &quot;A String&quot;, # Identifies the specific error that occurred.
175 &quot;kind&quot;: &quot;A String&quot;, # This is always `sql#operationError`.
176 &quot;message&quot;: &quot;A String&quot;, # Additional information about the error encountered.
177 },
178 ],
179 &quot;kind&quot;: &quot;A String&quot;, # This is always `sql#operationErrors`.
180 },
181 &quot;exportContext&quot;: { # Database instance export context. # The context for export operation, if applicable.
182 &quot;bakExportOptions&quot;: { # Options for exporting BAK files (SQL Server-only)
183 &quot;bakType&quot;: &quot;A String&quot;, # Type of this bak file will be export, FULL or DIFF, SQL Server only
184 &quot;copyOnly&quot;: True or False, # Deprecated: copy_only is deprecated. Use differential_base instead
185 &quot;differentialBase&quot;: True or False, # Whether or not the backup can be used as a differential base copy_only backup can not be served as differential base
186 &quot;exportLogEndTime&quot;: &quot;A String&quot;, # Optional. The end timestamp when transaction log will be included in the export operation. [RFC 3339](https://tools.ietf.org/html/rfc3339) format (for example, `2023-10-01T16:19:00.094`) in UTC. When omitted, all available logs until current time will be included. Only applied to Cloud SQL for SQL Server.
187 &quot;exportLogStartTime&quot;: &quot;A String&quot;, # Optional. The begin timestamp when transaction log will be included in the export operation. [RFC 3339](https://tools.ietf.org/html/rfc3339) format (for example, `2023-10-01T16:19:00.094`) in UTC. When omitted, all available logs from the beginning of retention period will be included. Only applied to Cloud SQL for SQL Server.
188 &quot;stripeCount&quot;: 42, # Option for specifying how many stripes to use for the export. If blank, and the value of the striped field is true, the number of stripes is automatically chosen.
189 &quot;striped&quot;: True or False, # Whether or not the export should be striped.
190 },
191 &quot;csvExportOptions&quot;: { # Options for exporting data as CSV. `MySQL` and `PostgreSQL` instances only.
192 &quot;escapeCharacter&quot;: &quot;A String&quot;, # Specifies the character that should appear before a data character that needs to be escaped.
193 &quot;fieldsTerminatedBy&quot;: &quot;A String&quot;, # Specifies the character that separates columns within each row (line) of the file.
194 &quot;linesTerminatedBy&quot;: &quot;A String&quot;, # This is used to separate lines. If a line does not contain all fields, the rest of the columns are set to their default values.
195 &quot;quoteCharacter&quot;: &quot;A String&quot;, # Specifies the quoting character to be used when a data value is quoted.
196 &quot;selectQuery&quot;: &quot;A String&quot;, # The select query used to extract the data.
197 },
198 &quot;databases&quot;: [ # Databases to be exported. `MySQL instances:` If `fileType` is `SQL` and no database is specified, all databases are exported, except for the `mysql` system database. If `fileType` is `CSV`, you can specify one database, either by using this property or by using the `csvExportOptions.selectQuery` property, which takes precedence over this property. `PostgreSQL instances:` If you don&#x27;t specify a database by name, all user databases in the instance are exported. This excludes system databases and Cloud SQL databases used to manage internal operations. Exporting all user databases is only available for directory-formatted parallel export. If `fileType` is `CSV`, this database must match the one specified in the `csvExportOptions.selectQuery` property. `SQL Server instances:` You must specify one database to be exported, and the `fileType` must be `BAK`.
199 &quot;A String&quot;,
200 ],
201 &quot;fileType&quot;: &quot;A String&quot;, # The file type for the specified uri.
202 &quot;kind&quot;: &quot;A String&quot;, # This is always `sql#exportContext`.
203 &quot;offload&quot;: True or False, # Whether to perform a serverless export.
204 &quot;sqlExportOptions&quot;: { # Options for exporting data as SQL statements.
205 &quot;mysqlExportOptions&quot;: { # Options for exporting from MySQL.
206 &quot;masterData&quot;: 42, # Option to include SQL statement required to set up replication. If set to `1`, the dump file includes a CHANGE MASTER TO statement with the binary log coordinates, and --set-gtid-purged is set to ON. If set to `2`, the CHANGE MASTER TO statement is written as a SQL comment and has no effect. If set to any value other than `1`, --set-gtid-purged is set to OFF.
207 },
208 &quot;parallel&quot;: True or False, # Optional. Whether or not the export should be parallel.
209 &quot;postgresExportOptions&quot;: { # Options for exporting from a Cloud SQL for PostgreSQL instance.
210 &quot;clean&quot;: True or False, # Optional. Use this option to include DROP &lt;object&gt; SQL statements. Use these statements to delete database objects before running the import operation.
211 &quot;ifExists&quot;: True or False, # Optional. Option to include an IF EXISTS SQL statement with each DROP statement produced by clean.
212 },
213 &quot;schemaOnly&quot;: True or False, # Export only schemas.
214 &quot;tables&quot;: [ # Tables to export, or that were exported, from the specified database. If you specify tables, specify one and only one database. For PostgreSQL instances, you can specify only one table.
215 &quot;A String&quot;,
216 ],
217 &quot;threads&quot;: 42, # Optional. The number of threads to use for parallel export.
218 },
219 &quot;tdeExportOptions&quot;: { # Optional. Export parameters specific to SQL Server TDE certificates
220 &quot;certificatePath&quot;: &quot;A String&quot;, # Required. Path to the TDE certificate public key in the form gs://bucketName/fileName. The instance must have write access to the bucket. Applicable only for SQL Server instances.
221 &quot;name&quot;: &quot;A String&quot;, # Required. Certificate name. Applicable only for SQL Server instances.
222 &quot;privateKeyPassword&quot;: &quot;A String&quot;, # Required. Password that encrypts the private key.
223 &quot;privateKeyPath&quot;: &quot;A String&quot;, # Required. Path to the TDE certificate private key in the form gs://bucketName/fileName. The instance must have write access to the location. Applicable only for SQL Server instances.
224 },
225 &quot;uri&quot;: &quot;A String&quot;, # 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 request succeeds, but the operation fails. If `fileType` is `SQL` and the filename ends with .gz, the contents are compressed.
226 },
227 &quot;importContext&quot;: { # Database instance import context. # The context for import operation, if applicable.
228 &quot;bakImportOptions&quot;: { # Import parameters specific to SQL Server .BAK files
229 &quot;bakType&quot;: &quot;A String&quot;, # Type of the bak content, FULL or DIFF
230 &quot;encryptionOptions&quot;: {
231 &quot;certPath&quot;: &quot;A String&quot;, # Path to the Certificate (.cer) in Cloud Storage, in the form `gs://bucketName/fileName`. The instance must have write permissions to the bucket and read access to the file.
232 &quot;keepEncrypted&quot;: True or False, # Optional. Whether the imported file remains encrypted.
233 &quot;pvkPassword&quot;: &quot;A String&quot;, # Password that encrypts the private key
234 &quot;pvkPath&quot;: &quot;A String&quot;, # Path to the Certificate Private Key (.pvk) in Cloud Storage, in the form `gs://bucketName/fileName`. The instance must have write permissions to the bucket and read access to the file.
235 },
236 &quot;noRecovery&quot;: True or False, # Whether or not the backup importing will restore database with NORECOVERY option. Applies only to Cloud SQL for SQL Server.
237 &quot;recoveryOnly&quot;: True or False, # Whether or not the backup importing request will just bring database online without downloading Bak content only one of &quot;no_recovery&quot; and &quot;recovery_only&quot; can be true otherwise error will return. Applies only to Cloud SQL for SQL Server.
238 &quot;stopAt&quot;: &quot;A String&quot;, # Optional. The timestamp when the import should stop. This timestamp is in the [RFC 3339](https://tools.ietf.org/html/rfc3339) format (for example, `2023-10-01T16:19:00.094`). This field is equivalent to the STOPAT keyword and applies to Cloud SQL for SQL Server only.
239 &quot;stopAtMark&quot;: &quot;A String&quot;, # Optional. The marked transaction where the import should stop. This field is equivalent to the STOPATMARK keyword and applies to Cloud SQL for SQL Server only.
240 &quot;striped&quot;: True or False, # Whether or not the backup set being restored is striped. Applies only to Cloud SQL for SQL Server.
241 },
242 &quot;csvImportOptions&quot;: { # Options for importing data as CSV.
243 &quot;columns&quot;: [ # The columns to which CSV data is imported. If not specified, all columns of the database table are loaded with CSV data.
244 &quot;A String&quot;,
245 ],
246 &quot;escapeCharacter&quot;: &quot;A String&quot;, # Specifies the character that should appear before a data character that needs to be escaped.
247 &quot;fieldsTerminatedBy&quot;: &quot;A String&quot;, # Specifies the character that separates columns within each row (line) of the file.
248 &quot;linesTerminatedBy&quot;: &quot;A String&quot;, # This is used to separate lines. If a line does not contain all fields, the rest of the columns are set to their default values.
249 &quot;quoteCharacter&quot;: &quot;A String&quot;, # Specifies the quoting character to be used when a data value is quoted.
250 &quot;table&quot;: &quot;A String&quot;, # The table to which CSV data is imported.
251 },
252 &quot;database&quot;: &quot;A String&quot;, # The target database for the import. If `fileType` is `SQL`, this field is required only if the import file does not specify a database, and is overridden by any database specification in the import file. For entire instance parallel import operations, the database is overridden by the database name stored in subdirectory name. If `fileType` is `CSV`, one database must be specified.
253 &quot;fileType&quot;: &quot;A String&quot;, # The file type for the specified uri.\`SQL`: The file contains SQL statements. \`CSV`: The file contains CSV data.
254 &quot;importUser&quot;: &quot;A String&quot;, # The PostgreSQL user for this import operation. PostgreSQL instances only.
255 &quot;kind&quot;: &quot;A String&quot;, # This is always `sql#importContext`.
256 &quot;sqlImportOptions&quot;: { # Optional. Options for importing data from SQL statements.
257 &quot;parallel&quot;: True or False, # Optional. Whether or not the import should be parallel.
258 &quot;postgresImportOptions&quot;: { # Optional. Options for importing from a Cloud SQL for PostgreSQL instance.
259 &quot;clean&quot;: True or False, # Optional. The --clean flag for the pg_restore utility. This flag applies only if you enabled Cloud SQL to import files in parallel.
260 &quot;ifExists&quot;: True or False, # Optional. The --if-exists flag for the pg_restore utility. This flag applies only if you enabled Cloud SQL to import files in parallel.
261 },
262 &quot;threads&quot;: 42, # Optional. The number of threads to use for parallel import.
263 },
264 &quot;tdeImportOptions&quot;: { # Optional. Import parameters specific to SQL Server TDE certificates
265 &quot;certificatePath&quot;: &quot;A String&quot;, # Required. Path to the TDE certificate public key in the form gs://bucketName/fileName. The instance must have read access to the file. Applicable only for SQL Server instances.
266 &quot;name&quot;: &quot;A String&quot;, # Required. Certificate name. Applicable only for SQL Server instances.
267 &quot;privateKeyPassword&quot;: &quot;A String&quot;, # Required. Password that encrypts the private key.
268 &quot;privateKeyPath&quot;: &quot;A String&quot;, # Required. Path to the TDE certificate private key in the form gs://bucketName/fileName. The instance must have read access to the file. Applicable only for SQL Server instances.
269 },
270 &quot;uri&quot;: &quot;A String&quot;, # Path to the import file in Cloud Storage, in the form `gs://bucketName/fileName`. Compressed gzip files (.gz) are supported when `fileType` is `SQL`. The instance must have write permissions to the bucket and read access to the file.
271 },
272 &quot;insertTime&quot;: &quot;A String&quot;, # The time this operation was enqueued in UTC timezone in [RFC 3339](https://tools.ietf.org/html/rfc3339) format, for example `2012-11-15T16:19:00.094Z`.
273 &quot;kind&quot;: &quot;A String&quot;, # This is always `sql#operation`.
274 &quot;name&quot;: &quot;A String&quot;, # An identifier that uniquely identifies the operation. You can use this identifier to retrieve the Operations resource that has information about the operation.
275 &quot;operationType&quot;: &quot;A String&quot;, # 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`
276 &quot;preCheckMajorVersionUpgradeContext&quot;: { # Pre-check major version upgrade context. # This field is only populated when the operation_type is PRE_CHECK_MAJOR_VERSION_UPGRADE. The PreCheckMajorVersionUpgradeContext message itself contains the details for that pre-check, such as the target database version for the upgrade and the results of the check (including any warnings or errors found).
277 &quot;kind&quot;: &quot;A String&quot;, # Optional. This is always `sql#preCheckMajorVersionUpgradeContext`.
278 &quot;preCheckResponse&quot;: [ # Output only. The responses from the precheck operation.
279 { # Structured PreCheckResponse containing message, type, and required actions.
280 &quot;actionsRequired&quot;: [ # The actions that the user needs to take. Use repeated for multiple actions.
281 &quot;A String&quot;,
282 ],
283 &quot;message&quot;: &quot;A String&quot;, # The message to be displayed to the user.
284 &quot;messageType&quot;: &quot;A String&quot;, # The type of message whether it is an info, warning, or error.
285 },
286 ],
287 &quot;targetDatabaseVersion&quot;: &quot;A String&quot;, # Required. The target database version to upgrade to.
288 },
289 &quot;selfLink&quot;: &quot;A String&quot;, # The URI of this resource.
290 &quot;startTime&quot;: &quot;A String&quot;, # The time this operation actually started in UTC timezone in [RFC 3339](https://tools.ietf.org/html/rfc3339) format, for example `2012-11-15T16:19:00.094Z`.
291 &quot;status&quot;: &quot;A String&quot;, # The status of an operation.
292 &quot;subOperationType&quot;: { # The sub operation type based on the operation type. # Optional. The sub operation based on the operation type.
293 &quot;maintenanceType&quot;: &quot;A String&quot;, # The type of maintenance to be performed on the instance.
294 },
295 &quot;targetId&quot;: &quot;A String&quot;, # Name of the resource on which this operation runs.
296 &quot;targetLink&quot;: &quot;A String&quot;,
297 &quot;targetProject&quot;: &quot;A String&quot;, # The project ID of the target instance related to this operation.
298 &quot;user&quot;: &quot;A String&quot;, # The email address of the user who initiated this operation.
299 }</pre>
300 </div>
301
302 <div class="method">
303 <code class="details" id="get">get(project, instance, sha1Fingerprint, x__xgafv=None)</code>
304 <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.
305
306 Args:
307 project: string, Project ID of the project that contains the instance. (required)
308 instance: string, Cloud SQL instance ID. This does not include the project ID. (required)
309 sha1Fingerprint: string, Sha1 FingerPrint. (required)
310 x__xgafv: string, V1 error format.
311 Allowed values
312 1 - v1 error format
313 2 - v2 error format
314
315 Returns:
316 An object of the form:
317
318 { # SslCerts Resource
319 &quot;cert&quot;: &quot;A String&quot;, # PEM representation.
320 &quot;certSerialNumber&quot;: &quot;A String&quot;, # Serial number, as extracted from the certificate.
321 &quot;commonName&quot;: &quot;A String&quot;, # User supplied name. Constrained to [a-zA-Z.-_ ]+.
322 &quot;createTime&quot;: &quot;A String&quot;, # The time when the certificate was created in [RFC 3339](https://tools.ietf.org/html/rfc3339) format, for example `2012-11-15T16:19:00.094Z`
323 &quot;expirationTime&quot;: &quot;A String&quot;, # The time when the certificate expires in [RFC 3339](https://tools.ietf.org/html/rfc3339) format, for example `2012-11-15T16:19:00.094Z`.
324 &quot;instance&quot;: &quot;A String&quot;, # Name of the database instance.
325 &quot;kind&quot;: &quot;A String&quot;, # This is always `sql#sslCert`.
326 &quot;selfLink&quot;: &quot;A String&quot;, # The URI of this resource.
327 &quot;sha1Fingerprint&quot;: &quot;A String&quot;, # Sha1 Fingerprint.
328 }</pre>
329 </div>
330
331 <div class="method">
332 <code class="details" id="insert">insert(project, instance, body=None, x__xgafv=None)</code>
333 <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.
334
335 Args:
336 project: string, Project ID of the project that contains the instance. (required)
337 instance: string, Cloud SQL instance ID. This does not include the project ID. (required)
338 body: object, The request body.
339 The object takes the form of:
340
341 { # SslCerts insert request.
342 &quot;commonName&quot;: &quot;A String&quot;, # User supplied name. Must be a distinct name from the other certificates for this instance.
343 }
344
345 x__xgafv: string, V1 error format.
346 Allowed values
347 1 - v1 error format
348 2 - v2 error format
349
350 Returns:
351 An object of the form:
352
353 { # SslCert insert response.
354 &quot;clientCert&quot;: { # SslCertDetail. # The new client certificate and private key.
355 &quot;certInfo&quot;: { # SslCerts Resource # The public information about the cert.
356 &quot;cert&quot;: &quot;A String&quot;, # PEM representation.
357 &quot;certSerialNumber&quot;: &quot;A String&quot;, # Serial number, as extracted from the certificate.
358 &quot;commonName&quot;: &quot;A String&quot;, # User supplied name. Constrained to [a-zA-Z.-_ ]+.
359 &quot;createTime&quot;: &quot;A String&quot;, # The time when the certificate was created in [RFC 3339](https://tools.ietf.org/html/rfc3339) format, for example `2012-11-15T16:19:00.094Z`
360 &quot;expirationTime&quot;: &quot;A String&quot;, # The time when the certificate expires in [RFC 3339](https://tools.ietf.org/html/rfc3339) format, for example `2012-11-15T16:19:00.094Z`.
361 &quot;instance&quot;: &quot;A String&quot;, # Name of the database instance.
362 &quot;kind&quot;: &quot;A String&quot;, # This is always `sql#sslCert`.
363 &quot;selfLink&quot;: &quot;A String&quot;, # The URI of this resource.
364 &quot;sha1Fingerprint&quot;: &quot;A String&quot;, # Sha1 Fingerprint.
365 },
366 &quot;certPrivateKey&quot;: &quot;A String&quot;, # The private key for the client cert, in pem format. Keep private in order to protect your security.
367 },
368 &quot;kind&quot;: &quot;A String&quot;, # This is always `sql#sslCertsInsert`.
369 &quot;operation&quot;: { # An Operation resource. For successful operations that return an Operation resource, only the fields relevant to the operation are populated in the resource. # The operation to track the ssl certs insert request.
370 &quot;acquireSsrsLeaseContext&quot;: { # Acquire SSRS lease context. # The context for acquire SSRS lease operation, if applicable.
371 &quot;duration&quot;: &quot;A String&quot;, # Lease duration needed for SSRS setup.
372 &quot;reportDatabase&quot;: &quot;A String&quot;, # The report database to be used for SSRS setup.
373 &quot;serviceLogin&quot;: &quot;A String&quot;, # The username to be used as the service login to connect to the report database for SSRS setup.
374 &quot;setupLogin&quot;: &quot;A String&quot;, # The username to be used as the setup login to connect to the database server for SSRS setup.
375 },
376 &quot;apiWarning&quot;: { # An Admin API warning message. # An Admin API warning message.
377 &quot;code&quot;: &quot;A String&quot;, # Code to uniquely identify the warning type.
378 &quot;message&quot;: &quot;A String&quot;, # The warning message.
379 &quot;region&quot;: &quot;A String&quot;, # The region name for REGION_UNREACHABLE warning.
380 },
381 &quot;backupContext&quot;: { # Backup context. # The context for backup operation, if applicable.
382 &quot;backupId&quot;: &quot;A String&quot;, # The identifier of the backup.
383 &quot;kind&quot;: &quot;A String&quot;, # This is always `sql#backupContext`.
384 &quot;name&quot;: &quot;A String&quot;, # The name of the backup. Format: projects/{project}/backups/{backup}
385 },
386 &quot;endTime&quot;: &quot;A String&quot;, # The time this operation finished in UTC timezone in [RFC 3339](https://tools.ietf.org/html/rfc3339) format, for example `2012-11-15T16:19:00.094Z`.
387 &quot;error&quot;: { # Database instance operation errors list wrapper. # If errors occurred during processing of this operation, this field will be populated.
388 &quot;errors&quot;: [ # The list of errors encountered while processing this operation.
389 { # Database instance operation error.
390 &quot;code&quot;: &quot;A String&quot;, # Identifies the specific error that occurred.
391 &quot;kind&quot;: &quot;A String&quot;, # This is always `sql#operationError`.
392 &quot;message&quot;: &quot;A String&quot;, # Additional information about the error encountered.
393 },
394 ],
395 &quot;kind&quot;: &quot;A String&quot;, # This is always `sql#operationErrors`.
396 },
397 &quot;exportContext&quot;: { # Database instance export context. # The context for export operation, if applicable.
398 &quot;bakExportOptions&quot;: { # Options for exporting BAK files (SQL Server-only)
399 &quot;bakType&quot;: &quot;A String&quot;, # Type of this bak file will be export, FULL or DIFF, SQL Server only
400 &quot;copyOnly&quot;: True or False, # Deprecated: copy_only is deprecated. Use differential_base instead
401 &quot;differentialBase&quot;: True or False, # Whether or not the backup can be used as a differential base copy_only backup can not be served as differential base
402 &quot;exportLogEndTime&quot;: &quot;A String&quot;, # Optional. The end timestamp when transaction log will be included in the export operation. [RFC 3339](https://tools.ietf.org/html/rfc3339) format (for example, `2023-10-01T16:19:00.094`) in UTC. When omitted, all available logs until current time will be included. Only applied to Cloud SQL for SQL Server.
403 &quot;exportLogStartTime&quot;: &quot;A String&quot;, # Optional. The begin timestamp when transaction log will be included in the export operation. [RFC 3339](https://tools.ietf.org/html/rfc3339) format (for example, `2023-10-01T16:19:00.094`) in UTC. When omitted, all available logs from the beginning of retention period will be included. Only applied to Cloud SQL for SQL Server.
404 &quot;stripeCount&quot;: 42, # Option for specifying how many stripes to use for the export. If blank, and the value of the striped field is true, the number of stripes is automatically chosen.
405 &quot;striped&quot;: True or False, # Whether or not the export should be striped.
406 },
407 &quot;csvExportOptions&quot;: { # Options for exporting data as CSV. `MySQL` and `PostgreSQL` instances only.
408 &quot;escapeCharacter&quot;: &quot;A String&quot;, # Specifies the character that should appear before a data character that needs to be escaped.
409 &quot;fieldsTerminatedBy&quot;: &quot;A String&quot;, # Specifies the character that separates columns within each row (line) of the file.
410 &quot;linesTerminatedBy&quot;: &quot;A String&quot;, # This is used to separate lines. If a line does not contain all fields, the rest of the columns are set to their default values.
411 &quot;quoteCharacter&quot;: &quot;A String&quot;, # Specifies the quoting character to be used when a data value is quoted.
412 &quot;selectQuery&quot;: &quot;A String&quot;, # The select query used to extract the data.
413 },
414 &quot;databases&quot;: [ # Databases to be exported. `MySQL instances:` If `fileType` is `SQL` and no database is specified, all databases are exported, except for the `mysql` system database. If `fileType` is `CSV`, you can specify one database, either by using this property or by using the `csvExportOptions.selectQuery` property, which takes precedence over this property. `PostgreSQL instances:` If you don&#x27;t specify a database by name, all user databases in the instance are exported. This excludes system databases and Cloud SQL databases used to manage internal operations. Exporting all user databases is only available for directory-formatted parallel export. If `fileType` is `CSV`, this database must match the one specified in the `csvExportOptions.selectQuery` property. `SQL Server instances:` You must specify one database to be exported, and the `fileType` must be `BAK`.
415 &quot;A String&quot;,
416 ],
417 &quot;fileType&quot;: &quot;A String&quot;, # The file type for the specified uri.
418 &quot;kind&quot;: &quot;A String&quot;, # This is always `sql#exportContext`.
419 &quot;offload&quot;: True or False, # Whether to perform a serverless export.
420 &quot;sqlExportOptions&quot;: { # Options for exporting data as SQL statements.
421 &quot;mysqlExportOptions&quot;: { # Options for exporting from MySQL.
422 &quot;masterData&quot;: 42, # Option to include SQL statement required to set up replication. If set to `1`, the dump file includes a CHANGE MASTER TO statement with the binary log coordinates, and --set-gtid-purged is set to ON. If set to `2`, the CHANGE MASTER TO statement is written as a SQL comment and has no effect. If set to any value other than `1`, --set-gtid-purged is set to OFF.
423 },
424 &quot;parallel&quot;: True or False, # Optional. Whether or not the export should be parallel.
425 &quot;postgresExportOptions&quot;: { # Options for exporting from a Cloud SQL for PostgreSQL instance.
426 &quot;clean&quot;: True or False, # Optional. Use this option to include DROP &lt;object&gt; SQL statements. Use these statements to delete database objects before running the import operation.
427 &quot;ifExists&quot;: True or False, # Optional. Option to include an IF EXISTS SQL statement with each DROP statement produced by clean.
428 },
429 &quot;schemaOnly&quot;: True or False, # Export only schemas.
430 &quot;tables&quot;: [ # Tables to export, or that were exported, from the specified database. If you specify tables, specify one and only one database. For PostgreSQL instances, you can specify only one table.
431 &quot;A String&quot;,
432 ],
433 &quot;threads&quot;: 42, # Optional. The number of threads to use for parallel export.
434 },
435 &quot;tdeExportOptions&quot;: { # Optional. Export parameters specific to SQL Server TDE certificates
436 &quot;certificatePath&quot;: &quot;A String&quot;, # Required. Path to the TDE certificate public key in the form gs://bucketName/fileName. The instance must have write access to the bucket. Applicable only for SQL Server instances.
437 &quot;name&quot;: &quot;A String&quot;, # Required. Certificate name. Applicable only for SQL Server instances.
438 &quot;privateKeyPassword&quot;: &quot;A String&quot;, # Required. Password that encrypts the private key.
439 &quot;privateKeyPath&quot;: &quot;A String&quot;, # Required. Path to the TDE certificate private key in the form gs://bucketName/fileName. The instance must have write access to the location. Applicable only for SQL Server instances.
440 },
441 &quot;uri&quot;: &quot;A String&quot;, # 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 request succeeds, but the operation fails. If `fileType` is `SQL` and the filename ends with .gz, the contents are compressed.
442 },
443 &quot;importContext&quot;: { # Database instance import context. # The context for import operation, if applicable.
444 &quot;bakImportOptions&quot;: { # Import parameters specific to SQL Server .BAK files
445 &quot;bakType&quot;: &quot;A String&quot;, # Type of the bak content, FULL or DIFF
446 &quot;encryptionOptions&quot;: {
447 &quot;certPath&quot;: &quot;A String&quot;, # Path to the Certificate (.cer) in Cloud Storage, in the form `gs://bucketName/fileName`. The instance must have write permissions to the bucket and read access to the file.
448 &quot;keepEncrypted&quot;: True or False, # Optional. Whether the imported file remains encrypted.
449 &quot;pvkPassword&quot;: &quot;A String&quot;, # Password that encrypts the private key
450 &quot;pvkPath&quot;: &quot;A String&quot;, # Path to the Certificate Private Key (.pvk) in Cloud Storage, in the form `gs://bucketName/fileName`. The instance must have write permissions to the bucket and read access to the file.
451 },
452 &quot;noRecovery&quot;: True or False, # Whether or not the backup importing will restore database with NORECOVERY option. Applies only to Cloud SQL for SQL Server.
453 &quot;recoveryOnly&quot;: True or False, # Whether or not the backup importing request will just bring database online without downloading Bak content only one of &quot;no_recovery&quot; and &quot;recovery_only&quot; can be true otherwise error will return. Applies only to Cloud SQL for SQL Server.
454 &quot;stopAt&quot;: &quot;A String&quot;, # Optional. The timestamp when the import should stop. This timestamp is in the [RFC 3339](https://tools.ietf.org/html/rfc3339) format (for example, `2023-10-01T16:19:00.094`). This field is equivalent to the STOPAT keyword and applies to Cloud SQL for SQL Server only.
455 &quot;stopAtMark&quot;: &quot;A String&quot;, # Optional. The marked transaction where the import should stop. This field is equivalent to the STOPATMARK keyword and applies to Cloud SQL for SQL Server only.
456 &quot;striped&quot;: True or False, # Whether or not the backup set being restored is striped. Applies only to Cloud SQL for SQL Server.
457 },
458 &quot;csvImportOptions&quot;: { # Options for importing data as CSV.
459 &quot;columns&quot;: [ # The columns to which CSV data is imported. If not specified, all columns of the database table are loaded with CSV data.
460 &quot;A String&quot;,
461 ],
462 &quot;escapeCharacter&quot;: &quot;A String&quot;, # Specifies the character that should appear before a data character that needs to be escaped.
463 &quot;fieldsTerminatedBy&quot;: &quot;A String&quot;, # Specifies the character that separates columns within each row (line) of the file.
464 &quot;linesTerminatedBy&quot;: &quot;A String&quot;, # This is used to separate lines. If a line does not contain all fields, the rest of the columns are set to their default values.
465 &quot;quoteCharacter&quot;: &quot;A String&quot;, # Specifies the quoting character to be used when a data value is quoted.
466 &quot;table&quot;: &quot;A String&quot;, # The table to which CSV data is imported.
467 },
468 &quot;database&quot;: &quot;A String&quot;, # The target database for the import. If `fileType` is `SQL`, this field is required only if the import file does not specify a database, and is overridden by any database specification in the import file. For entire instance parallel import operations, the database is overridden by the database name stored in subdirectory name. If `fileType` is `CSV`, one database must be specified.
469 &quot;fileType&quot;: &quot;A String&quot;, # The file type for the specified uri.\`SQL`: The file contains SQL statements. \`CSV`: The file contains CSV data.
470 &quot;importUser&quot;: &quot;A String&quot;, # The PostgreSQL user for this import operation. PostgreSQL instances only.
471 &quot;kind&quot;: &quot;A String&quot;, # This is always `sql#importContext`.
472 &quot;sqlImportOptions&quot;: { # Optional. Options for importing data from SQL statements.
473 &quot;parallel&quot;: True or False, # Optional. Whether or not the import should be parallel.
474 &quot;postgresImportOptions&quot;: { # Optional. Options for importing from a Cloud SQL for PostgreSQL instance.
475 &quot;clean&quot;: True or False, # Optional. The --clean flag for the pg_restore utility. This flag applies only if you enabled Cloud SQL to import files in parallel.
476 &quot;ifExists&quot;: True or False, # Optional. The --if-exists flag for the pg_restore utility. This flag applies only if you enabled Cloud SQL to import files in parallel.
477 },
478 &quot;threads&quot;: 42, # Optional. The number of threads to use for parallel import.
479 },
480 &quot;tdeImportOptions&quot;: { # Optional. Import parameters specific to SQL Server TDE certificates
481 &quot;certificatePath&quot;: &quot;A String&quot;, # Required. Path to the TDE certificate public key in the form gs://bucketName/fileName. The instance must have read access to the file. Applicable only for SQL Server instances.
482 &quot;name&quot;: &quot;A String&quot;, # Required. Certificate name. Applicable only for SQL Server instances.
483 &quot;privateKeyPassword&quot;: &quot;A String&quot;, # Required. Password that encrypts the private key.
484 &quot;privateKeyPath&quot;: &quot;A String&quot;, # Required. Path to the TDE certificate private key in the form gs://bucketName/fileName. The instance must have read access to the file. Applicable only for SQL Server instances.
485 },
486 &quot;uri&quot;: &quot;A String&quot;, # Path to the import file in Cloud Storage, in the form `gs://bucketName/fileName`. Compressed gzip files (.gz) are supported when `fileType` is `SQL`. The instance must have write permissions to the bucket and read access to the file.
487 },
488 &quot;insertTime&quot;: &quot;A String&quot;, # The time this operation was enqueued in UTC timezone in [RFC 3339](https://tools.ietf.org/html/rfc3339) format, for example `2012-11-15T16:19:00.094Z`.
489 &quot;kind&quot;: &quot;A String&quot;, # This is always `sql#operation`.
490 &quot;name&quot;: &quot;A String&quot;, # An identifier that uniquely identifies the operation. You can use this identifier to retrieve the Operations resource that has information about the operation.
491 &quot;operationType&quot;: &quot;A String&quot;, # 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`
492 &quot;preCheckMajorVersionUpgradeContext&quot;: { # Pre-check major version upgrade context. # This field is only populated when the operation_type is PRE_CHECK_MAJOR_VERSION_UPGRADE. The PreCheckMajorVersionUpgradeContext message itself contains the details for that pre-check, such as the target database version for the upgrade and the results of the check (including any warnings or errors found).
493 &quot;kind&quot;: &quot;A String&quot;, # Optional. This is always `sql#preCheckMajorVersionUpgradeContext`.
494 &quot;preCheckResponse&quot;: [ # Output only. The responses from the precheck operation.
495 { # Structured PreCheckResponse containing message, type, and required actions.
496 &quot;actionsRequired&quot;: [ # The actions that the user needs to take. Use repeated for multiple actions.
497 &quot;A String&quot;,
498 ],
499 &quot;message&quot;: &quot;A String&quot;, # The message to be displayed to the user.
500 &quot;messageType&quot;: &quot;A String&quot;, # The type of message whether it is an info, warning, or error.
501 },
502 ],
503 &quot;targetDatabaseVersion&quot;: &quot;A String&quot;, # Required. The target database version to upgrade to.
504 },
505 &quot;selfLink&quot;: &quot;A String&quot;, # The URI of this resource.
506 &quot;startTime&quot;: &quot;A String&quot;, # The time this operation actually started in UTC timezone in [RFC 3339](https://tools.ietf.org/html/rfc3339) format, for example `2012-11-15T16:19:00.094Z`.
507 &quot;status&quot;: &quot;A String&quot;, # The status of an operation.
508 &quot;subOperationType&quot;: { # The sub operation type based on the operation type. # Optional. The sub operation based on the operation type.
509 &quot;maintenanceType&quot;: &quot;A String&quot;, # The type of maintenance to be performed on the instance.
510 },
511 &quot;targetId&quot;: &quot;A String&quot;, # Name of the resource on which this operation runs.
512 &quot;targetLink&quot;: &quot;A String&quot;,
513 &quot;targetProject&quot;: &quot;A String&quot;, # The project ID of the target instance related to this operation.
514 &quot;user&quot;: &quot;A String&quot;, # The email address of the user who initiated this operation.
515 },
516 &quot;serverCaCert&quot;: { # SslCerts Resource # The server Certificate Authority&#x27;s certificate. If this is missing you can force a new one to be generated by calling resetSslConfig method on instances resource.
517 &quot;cert&quot;: &quot;A String&quot;, # PEM representation.
518 &quot;certSerialNumber&quot;: &quot;A String&quot;, # Serial number, as extracted from the certificate.
519 &quot;commonName&quot;: &quot;A String&quot;, # User supplied name. Constrained to [a-zA-Z.-_ ]+.
520 &quot;createTime&quot;: &quot;A String&quot;, # The time when the certificate was created in [RFC 3339](https://tools.ietf.org/html/rfc3339) format, for example `2012-11-15T16:19:00.094Z`
521 &quot;expirationTime&quot;: &quot;A String&quot;, # The time when the certificate expires in [RFC 3339](https://tools.ietf.org/html/rfc3339) format, for example `2012-11-15T16:19:00.094Z`.
522 &quot;instance&quot;: &quot;A String&quot;, # Name of the database instance.
523 &quot;kind&quot;: &quot;A String&quot;, # This is always `sql#sslCert`.
524 &quot;selfLink&quot;: &quot;A String&quot;, # The URI of this resource.
525 &quot;sha1Fingerprint&quot;: &quot;A String&quot;, # Sha1 Fingerprint.
526 },
527 }</pre>
528 </div>
529
530 <div class="method">
531 <code class="details" id="list">list(project, instance, x__xgafv=None)</code>
532 <pre>Lists all of the current SSL certificates for the instance.
533
534 Args:
535 project: string, Project ID of the project that contains the instance. (required)
536 instance: string, Cloud SQL instance ID. This does not include the project ID. (required)
537 x__xgafv: string, V1 error format.
538 Allowed values
539 1 - v1 error format
540 2 - v2 error format
541
542 Returns:
543 An object of the form:
544
545 { # SslCerts list response.
546 &quot;items&quot;: [ # List of client certificates for the instance.
547 { # SslCerts Resource
548 &quot;cert&quot;: &quot;A String&quot;, # PEM representation.
549 &quot;certSerialNumber&quot;: &quot;A String&quot;, # Serial number, as extracted from the certificate.
550 &quot;commonName&quot;: &quot;A String&quot;, # User supplied name. Constrained to [a-zA-Z.-_ ]+.
551 &quot;createTime&quot;: &quot;A String&quot;, # The time when the certificate was created in [RFC 3339](https://tools.ietf.org/html/rfc3339) format, for example `2012-11-15T16:19:00.094Z`
552 &quot;expirationTime&quot;: &quot;A String&quot;, # The time when the certificate expires in [RFC 3339](https://tools.ietf.org/html/rfc3339) format, for example `2012-11-15T16:19:00.094Z`.
553 &quot;instance&quot;: &quot;A String&quot;, # Name of the database instance.
554 &quot;kind&quot;: &quot;A String&quot;, # This is always `sql#sslCert`.
555 &quot;selfLink&quot;: &quot;A String&quot;, # The URI of this resource.
556 &quot;sha1Fingerprint&quot;: &quot;A String&quot;, # Sha1 Fingerprint.
557 },
558 ],
559 &quot;kind&quot;: &quot;A String&quot;, # This is always `sql#sslCertsList`.
560 }</pre>
561 </div>
562
563 </body></html>