blob: 438b0a2094b376237c298909c52ef52fb1e08062 [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
Bu Sun Kim715bd7f2019-06-14 16:50:42 -070075<h1><a href="sqladmin_v1beta4.html">Cloud SQL Admin API</a> . <a href="sqladmin_v1beta4.backupRuns.html">backupRuns</a></h1>
Craig Citroe633be12015-03-02 13:40:36 -080076<h2>Instance Methods</h2>
77<p class="toc_element">
Dan O'Mearadd494642020-05-01 07:42:23 -070078 <code><a href="#delete">delete(project, instance, id, x__xgafv=None)</a></code></p>
Takashi Matsuo06694102015-09-11 13:55:40 -070079<p class="firstline">Deletes the backup taken by a backup run.</p>
80<p class="toc_element">
Dan O'Mearadd494642020-05-01 07:42:23 -070081 <code><a href="#get">get(project, instance, id, x__xgafv=None)</a></code></p>
Craig Citroe633be12015-03-02 13:40:36 -080082<p class="firstline">Retrieves a resource containing information about a backup run.</p>
83<p class="toc_element">
Dan O'Mearadd494642020-05-01 07:42:23 -070084 <code><a href="#insert">insert(project, instance, body=None, x__xgafv=None)</a></code></p>
85<p class="firstline">Creates a new backup run on demand. This method is applicable only to</p>
Jon Wayne Parrott7d5badb2016-08-16 12:44:29 -070086<p class="toc_element">
Dan O'Mearadd494642020-05-01 07:42:23 -070087 <code><a href="#list">list(project, instance, maxResults=None, pageToken=None, x__xgafv=None)</a></code></p>
88<p class="firstline">Lists all backup runs associated with a given instance and configuration in</p>
Craig Citroe633be12015-03-02 13:40:36 -080089<p class="toc_element">
90 <code><a href="#list_next">list_next(previous_request, previous_response)</a></code></p>
91<p class="firstline">Retrieves the next page of results.</p>
92<h3>Method Details</h3>
93<div class="method">
Dan O'Mearadd494642020-05-01 07:42:23 -070094 <code class="details" id="delete">delete(project, instance, id, x__xgafv=None)</code>
Takashi Matsuo06694102015-09-11 13:55:40 -070095 <pre>Deletes the backup taken by a backup run.
96
97Args:
98 project: string, Project ID of the project that contains the instance. (required)
99 instance: string, Cloud SQL instance ID. This does not include the project ID. (required)
Dan O'Mearadd494642020-05-01 07:42:23 -0700100 id: string, The ID of the Backup Run to delete. To find a Backup Run ID, use the &lt;a
101href="/sql/docs/db_path/admin-api/rest/v1beta4/backupRuns/list"&gt;list&lt;/a&gt;
102method. (required)
103 x__xgafv: string, V1 error format.
104 Allowed values
105 1 - v1 error format
106 2 - v2 error format
Takashi Matsuo06694102015-09-11 13:55:40 -0700107
108Returns:
109 An object of the form:
110
Dan O'Mearadd494642020-05-01 07:42:23 -0700111 { # An Operation resource.&amp;nbsp;For successful operations that return an
112 # Operation resource, only the fields relevant to the operation are populated
113 # in the resource.
114 "status": "A String", # The status of an operation. Valid values are &lt;code&gt;PENDING&lt;/code&gt;,
115 # &lt;code&gt;RUNNING&lt;/code&gt;, &lt;code&gt;DONE&lt;/code&gt;,
116 # &lt;code&gt;SQL_OPERATION_STATUS_UNSPECIFIED&lt;/code&gt;.
Takashi Matsuo06694102015-09-11 13:55:40 -0700117 "importContext": { # Database instance import context. # The context for import operation, if applicable.
Dan O'Mearadd494642020-05-01 07:42:23 -0700118 "bakImportOptions": { # Import parameters specific to SQL Server .BAK files
119 "encryptionOptions": {
120 "pvkPath": "A String", # Path to the Certificate Private Key (.pvk) in Cloud Storage, in the
121 # form &lt;code&gt;gs://bucketName/fileName&lt;/code&gt;. The instance must have
122 # write permissions to the bucket and read access to the file.
123 "certPath": "A String", # Path to the Certificate (.cer) in Cloud Storage, in the form
124 # &lt;code&gt;gs://bucketName/fileName&lt;/code&gt;. The instance must have
125 # write permissions to the bucket and read access to the file.
126 "pvkPassword": "A String", # Password that encrypts the private key
127 },
128 },
129 "kind": "A String", # This is always &lt;code&gt;sql#importContext&lt;/code&gt;.
130 "database": "A String", # The target database for the import. If &lt;code&gt;fileType&lt;/code&gt; is
131 # &lt;code&gt;SQL&lt;/code&gt;, this field is required only if the import file does not
132 # specify a database, and is overridden by any database specification in the
133 # import file. If &lt;code&gt;fileType&lt;/code&gt; is &lt;code&gt;CSV&lt;/code&gt;, one database
134 # must be specified.
135 "fileType": "A String", # The file type for the specified uri. &lt;br&gt;&lt;code&gt;SQL&lt;/code&gt;: The file
136 # contains SQL statements. &lt;br&gt;&lt;code&gt;CSV&lt;/code&gt;: The file contains CSV data.
137 "uri": "A String", # Path to the import file in Cloud Storage, in the form
138 # &lt;code&gt;gs:
139 # //bucketName/fileName&lt;/code&gt;. Compressed gzip files (.gz) are supported
140 # // when &lt;code&gt;fileType&lt;/code&gt; is &lt;code&gt;SQL&lt;/code&gt;. The instance must have
141 # // write permissions to the bucket and read access to the file.
Bu Sun Kim715bd7f2019-06-14 16:50:42 -0700142 "importUser": "A String", # The PostgreSQL user for this import operation. PostgreSQL instances only.
Takashi Matsuo06694102015-09-11 13:55:40 -0700143 "csvImportOptions": { # Options for importing data as CSV.
144 "table": "A String", # The table to which CSV data is imported.
Dan O'Mearadd494642020-05-01 07:42:23 -0700145 "columns": [ # The columns to which CSV data is imported. If not specified, all columns
146 # of the database table are loaded with CSV data.
Takashi Matsuo06694102015-09-11 13:55:40 -0700147 "A String",
148 ],
149 },
150 },
Dan O'Mearadd494642020-05-01 07:42:23 -0700151 "kind": "A String", # This is always &lt;code&gt;sql#operation&lt;/code&gt;.
152 "targetProject": "A String", # The project ID of the target instance related to this operation.
153 "name": "A String", # An identifier that uniquely identifies the operation. You can use this
154 # identifier to retrieve the Operations resource that has information about
155 # the operation.
Takashi Matsuo06694102015-09-11 13:55:40 -0700156 "exportContext": { # Database instance export context. # The context for export operation, if applicable.
Dan O'Mearadd494642020-05-01 07:42:23 -0700157 "kind": "A String", # This is always &lt;code&gt;sql#exportContext&lt;/code&gt;.
158 "fileType": "A String", # The file type for the specified uri. &lt;br&gt;&lt;code&gt;SQL&lt;/code&gt;: The file
159 # contains SQL statements. &lt;br&gt;&lt;code&gt;CSV&lt;/code&gt;: The file contains CSV data.
160 "uri": "A String", # The path to the file in Google Cloud Storage where the export will be
161 # stored. The URI is in the form &lt;code&gt;gs:
162 # //bucketName/fileName&lt;/code&gt;. If the file already exists, the requests
163 # // succeeds, but the operation fails. If &lt;code&gt;fileType&lt;/code&gt; is
164 # // &lt;code&gt;SQL&lt;/code&gt; and the filename ends with .gz, the contents are
165 # // compressed.
Takashi Matsuo06694102015-09-11 13:55:40 -0700166 "csvExportOptions": { # Options for exporting data as CSV.
167 "selectQuery": "A String", # The select query used to extract the data.
168 },
Dan O'Mearadd494642020-05-01 07:42:23 -0700169 "databases": [ # Databases to be exported. &lt;br /&gt; &lt;b&gt;MySQL instances:&lt;/b&gt; If
170 # &lt;code&gt;fileType&lt;/code&gt; is &lt;code&gt;SQL&lt;/code&gt; and no database is specified, all
171 # databases are exported, except for the &lt;code&gt;mysql&lt;/code&gt; system database.
172 # If &lt;code&gt;fileType&lt;/code&gt; is &lt;code&gt;CSV&lt;/code&gt;, you can specify one database,
173 # either by using this property or by using the
174 # &lt;code&gt;csvExportOptions.selectQuery&lt;/code&gt; property, which takes precedence
175 # over this property. &lt;br /&gt; &lt;b&gt;PostgreSQL instances:&lt;/b&gt; You must specify
176 # one database to be exported. If &lt;code&gt;fileType&lt;/code&gt; is &lt;code&gt;CSV&lt;/code&gt;,
177 # this database must match the one specified in the
178 # &lt;code&gt;csvExportOptions.selectQuery&lt;/code&gt; property.
Takashi Matsuo06694102015-09-11 13:55:40 -0700179 "A String",
180 ],
181 "sqlExportOptions": { # Options for exporting data as SQL statements.
Dan O'Mearadd494642020-05-01 07:42:23 -0700182 "tables": [ # Tables to export, or that were exported, from the specified database. If
183 # you specify tables, specify one and only one database. For PostgreSQL
184 # instances, you can specify only one table.
Takashi Matsuo06694102015-09-11 13:55:40 -0700185 "A String",
186 ],
Bu Sun Kim715bd7f2019-06-14 16:50:42 -0700187 "mysqlExportOptions": { # Options for exporting from MySQL.
Dan O'Mearadd494642020-05-01 07:42:23 -0700188 "masterData": 42, # Option to include SQL statement required to set up replication.
189 # If set to &lt;code&gt;1&lt;/code&gt;, the dump file includes
190 # a CHANGE MASTER TO statement with the binary log coordinates.
191 # If set to &lt;code&gt;2&lt;/code&gt;, the CHANGE MASTER TO statement is written as
192 # a SQL comment, and has no effect.
193 # All other values are ignored.
Bu Sun Kim715bd7f2019-06-14 16:50:42 -0700194 },
Jon Wayne Parrott36e41bc2016-02-19 16:02:29 -0800195 "schemaOnly": True or False, # Export only schemas.
Takashi Matsuo06694102015-09-11 13:55:40 -0700196 },
197 },
Dan O'Mearadd494642020-05-01 07:42:23 -0700198 "insertTime": "A String", # The time this operation was enqueued in UTC timezone in &lt;a
199 # href="https://tools.ietf.org/html/rfc3339"&gt;RFC 3339&lt;/a&gt; format, for example
200 # &lt;code&gt;2012-11-15T16:19:00.094Z&lt;/code&gt;.
Takashi Matsuo06694102015-09-11 13:55:40 -0700201 "targetId": "A String", # Name of the database instance related to this operation.
Dan O'Mearadd494642020-05-01 07:42:23 -0700202 "operationType": "A String", # The type of the operation. Valid values are &lt;code&gt;CREATE&lt;/code&gt;,
203 # &lt;code&gt;DELETE&lt;/code&gt;, &lt;code&gt;UPDATE&lt;/code&gt;, &lt;code&gt;RESTART&lt;/code&gt;,
204 # &lt;code&gt;IMPORT&lt;/code&gt;, &lt;code&gt;EXPORT&lt;/code&gt;, &lt;code&gt;BACKUP_VOLUME&lt;/code&gt;,
205 # &lt;code&gt;RESTORE_VOLUME&lt;/code&gt;, &lt;code&gt;CREATE_USER&lt;/code&gt;,
206 # &lt;code&gt;DELETE_USER&lt;/code&gt;, &lt;code&gt;CREATE_DATABASE&lt;/code&gt;,
207 # &lt;code&gt;DELETE_DATABASE&lt;/code&gt; .
208 "user": "A String", # The email address of the user who initiated this operation.
209 "startTime": "A String", # The time this operation actually started in UTC timezone in &lt;a
210 # href="https://tools.ietf.org/html/rfc3339"&gt;RFC 3339&lt;/a&gt; format, for example
211 # &lt;code&gt;2012-11-15T16:19:00.094Z&lt;/code&gt;.
212 "error": { # Database instance operation errors list wrapper. # If errors occurred during processing of this operation, this field will be
213 # populated.
214 "kind": "A String", # This is always &lt;code&gt;sql#operationErrors&lt;/code&gt;.
Takashi Matsuo06694102015-09-11 13:55:40 -0700215 "errors": [ # The list of errors encountered while processing this operation.
216 { # Database instance operation error.
Dan O'Mearadd494642020-05-01 07:42:23 -0700217 "kind": "A String", # This is always &lt;code&gt;sql#operationError&lt;/code&gt;.
Takashi Matsuo06694102015-09-11 13:55:40 -0700218 "code": "A String", # Identifies the specific error that occurred.
219 "message": "A String", # Additional information about the error encountered.
220 },
221 ],
222 },
Dan O'Mearadd494642020-05-01 07:42:23 -0700223 "endTime": "A String", # The time this operation finished in UTC timezone in &lt;a
224 # href="https://tools.ietf.org/html/rfc3339"&gt;RFC 3339&lt;/a&gt; format, for example
225 # &lt;code&gt;2012-11-15T16:19:00.094Z&lt;/code&gt;.
Takashi Matsuo06694102015-09-11 13:55:40 -0700226 "selfLink": "A String", # The URI of this resource.
Dan O'Mearadd494642020-05-01 07:42:23 -0700227 "targetLink": "A String",
Takashi Matsuo06694102015-09-11 13:55:40 -0700228 }</pre>
229</div>
230
231<div class="method">
Dan O'Mearadd494642020-05-01 07:42:23 -0700232 <code class="details" id="get">get(project, instance, id, x__xgafv=None)</code>
Craig Citroe633be12015-03-02 13:40:36 -0800233 <pre>Retrieves a resource containing information about a backup run.
234
235Args:
236 project: string, Project ID of the project that contains the instance. (required)
237 instance: string, Cloud SQL instance ID. This does not include the project ID. (required)
238 id: string, The ID of this Backup Run. (required)
Dan O'Mearadd494642020-05-01 07:42:23 -0700239 x__xgafv: string, V1 error format.
240 Allowed values
241 1 - v1 error format
242 2 - v2 error format
Craig Citroe633be12015-03-02 13:40:36 -0800243
244Returns:
245 An object of the form:
246
Bu Sun Kim715bd7f2019-06-14 16:50:42 -0700247 { # A BackupRun resource.
Jon Wayne Parrott7d5badb2016-08-16 12:44:29 -0700248 "status": "A String", # The status of this run.
Dan O'Mearadd494642020-05-01 07:42:23 -0700249 "diskEncryptionConfiguration": { # Disk encryption configuration for an instance. # Encryption configuration specific to a backup.
250 # Applies only to Second Generation instances.
251 "kind": "A String", # This is always &lt;code&gt;sql#diskEncryptionConfiguration&lt;/code&gt;.
252 "kmsKeyName": "A String", # Resource name of KMS key for disk encryption
253 },
254 "kind": "A String", # This is always &lt;code&gt;sql#backupRun&lt;/code&gt;.
Jon Wayne Parrott7d5badb2016-08-16 12:44:29 -0700255 "description": "A String", # The description of this run, only applicable to on-demand backups.
Dan O'Mearadd494642020-05-01 07:42:23 -0700256 "windowStartTime": "A String", # The start time of the backup window during which this the backup was
257 # attempted in &lt;a href="https://tools.ietf.org/html/rfc3339"&gt;RFC 3339&lt;/a&gt;
258 # format, for example &lt;code&gt;2012-11-15T16:19:00.094Z&lt;/code&gt;.
259 "diskEncryptionStatus": { # Disk encryption status for an instance. # Encryption status specific to a backup.
260 # Applies only to Second Generation instances.
261 "kmsKeyVersionName": "A String", # KMS key version used to encrypt the Cloud SQL instance resource
262 "kind": "A String", # This is always &lt;code&gt;sql#diskEncryptionStatus&lt;/code&gt;.
263 },
264 "id": "A String", # The identifier for this backup run. Unique only for a specific Cloud SQL
265 # instance.
Jon Wayne Parrott7d5badb2016-08-16 12:44:29 -0700266 "instance": "A String", # Name of the database instance.
Dan O'Mearadd494642020-05-01 07:42:23 -0700267 "location": "A String", # Location of the backups.
268 "startTime": "A String", # The time the backup operation actually started in UTC timezone in &lt;a
269 # href="https://tools.ietf.org/html/rfc3339"&gt;RFC 3339&lt;/a&gt; format, for example
270 # &lt;code&gt;2012-11-15T16:19:00.094Z&lt;/code&gt;.
271 "error": { # Database instance operation error. # Information about why the backup operation failed. This is only present if
272 # the run has the FAILED status.
273 "kind": "A String", # This is always &lt;code&gt;sql#operationError&lt;/code&gt;.
Jon Wayne Parrott7d5badb2016-08-16 12:44:29 -0700274 "code": "A String", # Identifies the specific error that occurred.
275 "message": "A String", # Additional information about the error encountered.
276 },
Dan O'Mearadd494642020-05-01 07:42:23 -0700277 "endTime": "A String", # The time the backup operation completed in UTC timezone in &lt;a
278 # href="https://tools.ietf.org/html/rfc3339"&gt;RFC 3339&lt;/a&gt; format, for example
279 # &lt;code&gt;2012-11-15T16:19:00.094Z&lt;/code&gt;.
Jon Wayne Parrott7d5badb2016-08-16 12:44:29 -0700280 "type": "A String", # The type of this run; can be either "AUTOMATED" or "ON_DEMAND".
Dan O'Mearadd494642020-05-01 07:42:23 -0700281 "enqueuedTime": "A String", # The time the run was enqueued in UTC timezone in &lt;a
282 # href="https://tools.ietf.org/html/rfc3339"&gt;RFC 3339&lt;/a&gt; format, for example
283 # &lt;code&gt;2012-11-15T16:19:00.094Z&lt;/code&gt;.
Jon Wayne Parrott7d5badb2016-08-16 12:44:29 -0700284 "selfLink": "A String", # The URI of this resource.
285 }</pre>
286</div>
287
288<div class="method">
Dan O'Mearadd494642020-05-01 07:42:23 -0700289 <code class="details" id="insert">insert(project, instance, body=None, x__xgafv=None)</code>
290 <pre>Creates a new backup run on demand. This method is applicable only to
291Second Generation instances.
Jon Wayne Parrott7d5badb2016-08-16 12:44:29 -0700292
293Args:
294 project: string, Project ID of the project that contains the instance. (required)
295 instance: string, Cloud SQL instance ID. This does not include the project ID. (required)
Dan O'Mearadd494642020-05-01 07:42:23 -0700296 body: object, The request body.
Jon Wayne Parrott7d5badb2016-08-16 12:44:29 -0700297 The object takes the form of:
298
Bu Sun Kim715bd7f2019-06-14 16:50:42 -0700299{ # A BackupRun resource.
Craig Citroe633be12015-03-02 13:40:36 -0800300 "status": "A String", # The status of this run.
Dan O'Mearadd494642020-05-01 07:42:23 -0700301 "diskEncryptionConfiguration": { # Disk encryption configuration for an instance. # Encryption configuration specific to a backup.
302 # Applies only to Second Generation instances.
303 "kind": "A String", # This is always &lt;code&gt;sql#diskEncryptionConfiguration&lt;/code&gt;.
304 "kmsKeyName": "A String", # Resource name of KMS key for disk encryption
305 },
306 "kind": "A String", # This is always &lt;code&gt;sql#backupRun&lt;/code&gt;.
Jon Wayne Parrott7d5badb2016-08-16 12:44:29 -0700307 "description": "A String", # The description of this run, only applicable to on-demand backups.
Dan O'Mearadd494642020-05-01 07:42:23 -0700308 "windowStartTime": "A String", # The start time of the backup window during which this the backup was
309 # attempted in &lt;a href="https://tools.ietf.org/html/rfc3339"&gt;RFC 3339&lt;/a&gt;
310 # format, for example &lt;code&gt;2012-11-15T16:19:00.094Z&lt;/code&gt;.
311 "diskEncryptionStatus": { # Disk encryption status for an instance. # Encryption status specific to a backup.
312 # Applies only to Second Generation instances.
313 "kmsKeyVersionName": "A String", # KMS key version used to encrypt the Cloud SQL instance resource
314 "kind": "A String", # This is always &lt;code&gt;sql#diskEncryptionStatus&lt;/code&gt;.
315 },
316 "id": "A String", # The identifier for this backup run. Unique only for a specific Cloud SQL
317 # instance.
Craig Citroe633be12015-03-02 13:40:36 -0800318 "instance": "A String", # Name of the database instance.
Dan O'Mearadd494642020-05-01 07:42:23 -0700319 "location": "A String", # Location of the backups.
320 "startTime": "A String", # The time the backup operation actually started in UTC timezone in &lt;a
321 # href="https://tools.ietf.org/html/rfc3339"&gt;RFC 3339&lt;/a&gt; format, for example
322 # &lt;code&gt;2012-11-15T16:19:00.094Z&lt;/code&gt;.
323 "error": { # Database instance operation error. # Information about why the backup operation failed. This is only present if
324 # the run has the FAILED status.
325 "kind": "A String", # This is always &lt;code&gt;sql#operationError&lt;/code&gt;.
Craig Citroe633be12015-03-02 13:40:36 -0800326 "code": "A String", # Identifies the specific error that occurred.
327 "message": "A String", # Additional information about the error encountered.
328 },
Dan O'Mearadd494642020-05-01 07:42:23 -0700329 "endTime": "A String", # The time the backup operation completed in UTC timezone in &lt;a
330 # href="https://tools.ietf.org/html/rfc3339"&gt;RFC 3339&lt;/a&gt; format, for example
331 # &lt;code&gt;2012-11-15T16:19:00.094Z&lt;/code&gt;.
Jon Wayne Parrott7d5badb2016-08-16 12:44:29 -0700332 "type": "A String", # The type of this run; can be either "AUTOMATED" or "ON_DEMAND".
Dan O'Mearadd494642020-05-01 07:42:23 -0700333 "enqueuedTime": "A String", # The time the run was enqueued in UTC timezone in &lt;a
334 # href="https://tools.ietf.org/html/rfc3339"&gt;RFC 3339&lt;/a&gt; format, for example
335 # &lt;code&gt;2012-11-15T16:19:00.094Z&lt;/code&gt;.
Craig Citroe633be12015-03-02 13:40:36 -0800336 "selfLink": "A String", # The URI of this resource.
Jon Wayne Parrott7d5badb2016-08-16 12:44:29 -0700337 }
338
Dan O'Mearadd494642020-05-01 07:42:23 -0700339 x__xgafv: string, V1 error format.
340 Allowed values
341 1 - v1 error format
342 2 - v2 error format
Jon Wayne Parrott7d5badb2016-08-16 12:44:29 -0700343
344Returns:
345 An object of the form:
346
Dan O'Mearadd494642020-05-01 07:42:23 -0700347 { # An Operation resource.&amp;nbsp;For successful operations that return an
348 # Operation resource, only the fields relevant to the operation are populated
349 # in the resource.
350 "status": "A String", # The status of an operation. Valid values are &lt;code&gt;PENDING&lt;/code&gt;,
351 # &lt;code&gt;RUNNING&lt;/code&gt;, &lt;code&gt;DONE&lt;/code&gt;,
352 # &lt;code&gt;SQL_OPERATION_STATUS_UNSPECIFIED&lt;/code&gt;.
Jon Wayne Parrott7d5badb2016-08-16 12:44:29 -0700353 "importContext": { # Database instance import context. # The context for import operation, if applicable.
Dan O'Mearadd494642020-05-01 07:42:23 -0700354 "bakImportOptions": { # Import parameters specific to SQL Server .BAK files
355 "encryptionOptions": {
356 "pvkPath": "A String", # Path to the Certificate Private Key (.pvk) in Cloud Storage, in the
357 # form &lt;code&gt;gs://bucketName/fileName&lt;/code&gt;. The instance must have
358 # write permissions to the bucket and read access to the file.
359 "certPath": "A String", # Path to the Certificate (.cer) in Cloud Storage, in the form
360 # &lt;code&gt;gs://bucketName/fileName&lt;/code&gt;. The instance must have
361 # write permissions to the bucket and read access to the file.
362 "pvkPassword": "A String", # Password that encrypts the private key
363 },
364 },
365 "kind": "A String", # This is always &lt;code&gt;sql#importContext&lt;/code&gt;.
366 "database": "A String", # The target database for the import. If &lt;code&gt;fileType&lt;/code&gt; is
367 # &lt;code&gt;SQL&lt;/code&gt;, this field is required only if the import file does not
368 # specify a database, and is overridden by any database specification in the
369 # import file. If &lt;code&gt;fileType&lt;/code&gt; is &lt;code&gt;CSV&lt;/code&gt;, one database
370 # must be specified.
371 "fileType": "A String", # The file type for the specified uri. &lt;br&gt;&lt;code&gt;SQL&lt;/code&gt;: The file
372 # contains SQL statements. &lt;br&gt;&lt;code&gt;CSV&lt;/code&gt;: The file contains CSV data.
373 "uri": "A String", # Path to the import file in Cloud Storage, in the form
374 # &lt;code&gt;gs:
375 # //bucketName/fileName&lt;/code&gt;. Compressed gzip files (.gz) are supported
376 # // when &lt;code&gt;fileType&lt;/code&gt; is &lt;code&gt;SQL&lt;/code&gt;. The instance must have
377 # // write permissions to the bucket and read access to the file.
Bu Sun Kim715bd7f2019-06-14 16:50:42 -0700378 "importUser": "A String", # The PostgreSQL user for this import operation. PostgreSQL instances only.
Jon Wayne Parrott7d5badb2016-08-16 12:44:29 -0700379 "csvImportOptions": { # Options for importing data as CSV.
380 "table": "A String", # The table to which CSV data is imported.
Dan O'Mearadd494642020-05-01 07:42:23 -0700381 "columns": [ # The columns to which CSV data is imported. If not specified, all columns
382 # of the database table are loaded with CSV data.
Jon Wayne Parrott7d5badb2016-08-16 12:44:29 -0700383 "A String",
384 ],
385 },
386 },
Dan O'Mearadd494642020-05-01 07:42:23 -0700387 "kind": "A String", # This is always &lt;code&gt;sql#operation&lt;/code&gt;.
388 "targetProject": "A String", # The project ID of the target instance related to this operation.
389 "name": "A String", # An identifier that uniquely identifies the operation. You can use this
390 # identifier to retrieve the Operations resource that has information about
391 # the operation.
Jon Wayne Parrott7d5badb2016-08-16 12:44:29 -0700392 "exportContext": { # Database instance export context. # The context for export operation, if applicable.
Dan O'Mearadd494642020-05-01 07:42:23 -0700393 "kind": "A String", # This is always &lt;code&gt;sql#exportContext&lt;/code&gt;.
394 "fileType": "A String", # The file type for the specified uri. &lt;br&gt;&lt;code&gt;SQL&lt;/code&gt;: The file
395 # contains SQL statements. &lt;br&gt;&lt;code&gt;CSV&lt;/code&gt;: The file contains CSV data.
396 "uri": "A String", # The path to the file in Google Cloud Storage where the export will be
397 # stored. The URI is in the form &lt;code&gt;gs:
398 # //bucketName/fileName&lt;/code&gt;. If the file already exists, the requests
399 # // succeeds, but the operation fails. If &lt;code&gt;fileType&lt;/code&gt; is
400 # // &lt;code&gt;SQL&lt;/code&gt; and the filename ends with .gz, the contents are
401 # // compressed.
Jon Wayne Parrott7d5badb2016-08-16 12:44:29 -0700402 "csvExportOptions": { # Options for exporting data as CSV.
403 "selectQuery": "A String", # The select query used to extract the data.
404 },
Dan O'Mearadd494642020-05-01 07:42:23 -0700405 "databases": [ # Databases to be exported. &lt;br /&gt; &lt;b&gt;MySQL instances:&lt;/b&gt; If
406 # &lt;code&gt;fileType&lt;/code&gt; is &lt;code&gt;SQL&lt;/code&gt; and no database is specified, all
407 # databases are exported, except for the &lt;code&gt;mysql&lt;/code&gt; system database.
408 # If &lt;code&gt;fileType&lt;/code&gt; is &lt;code&gt;CSV&lt;/code&gt;, you can specify one database,
409 # either by using this property or by using the
410 # &lt;code&gt;csvExportOptions.selectQuery&lt;/code&gt; property, which takes precedence
411 # over this property. &lt;br /&gt; &lt;b&gt;PostgreSQL instances:&lt;/b&gt; You must specify
412 # one database to be exported. If &lt;code&gt;fileType&lt;/code&gt; is &lt;code&gt;CSV&lt;/code&gt;,
413 # this database must match the one specified in the
414 # &lt;code&gt;csvExportOptions.selectQuery&lt;/code&gt; property.
Jon Wayne Parrott7d5badb2016-08-16 12:44:29 -0700415 "A String",
416 ],
417 "sqlExportOptions": { # Options for exporting data as SQL statements.
Dan O'Mearadd494642020-05-01 07:42:23 -0700418 "tables": [ # Tables to export, or that were exported, from the specified database. If
419 # you specify tables, specify one and only one database. For PostgreSQL
420 # instances, you can specify only one table.
Jon Wayne Parrott7d5badb2016-08-16 12:44:29 -0700421 "A String",
422 ],
Bu Sun Kim715bd7f2019-06-14 16:50:42 -0700423 "mysqlExportOptions": { # Options for exporting from MySQL.
Dan O'Mearadd494642020-05-01 07:42:23 -0700424 "masterData": 42, # Option to include SQL statement required to set up replication.
425 # If set to &lt;code&gt;1&lt;/code&gt;, the dump file includes
426 # a CHANGE MASTER TO statement with the binary log coordinates.
427 # If set to &lt;code&gt;2&lt;/code&gt;, the CHANGE MASTER TO statement is written as
428 # a SQL comment, and has no effect.
429 # All other values are ignored.
Bu Sun Kim715bd7f2019-06-14 16:50:42 -0700430 },
Jon Wayne Parrott7d5badb2016-08-16 12:44:29 -0700431 "schemaOnly": True or False, # Export only schemas.
432 },
433 },
Dan O'Mearadd494642020-05-01 07:42:23 -0700434 "insertTime": "A String", # The time this operation was enqueued in UTC timezone in &lt;a
435 # href="https://tools.ietf.org/html/rfc3339"&gt;RFC 3339&lt;/a&gt; format, for example
436 # &lt;code&gt;2012-11-15T16:19:00.094Z&lt;/code&gt;.
Jon Wayne Parrott7d5badb2016-08-16 12:44:29 -0700437 "targetId": "A String", # Name of the database instance related to this operation.
Dan O'Mearadd494642020-05-01 07:42:23 -0700438 "operationType": "A String", # The type of the operation. Valid values are &lt;code&gt;CREATE&lt;/code&gt;,
439 # &lt;code&gt;DELETE&lt;/code&gt;, &lt;code&gt;UPDATE&lt;/code&gt;, &lt;code&gt;RESTART&lt;/code&gt;,
440 # &lt;code&gt;IMPORT&lt;/code&gt;, &lt;code&gt;EXPORT&lt;/code&gt;, &lt;code&gt;BACKUP_VOLUME&lt;/code&gt;,
441 # &lt;code&gt;RESTORE_VOLUME&lt;/code&gt;, &lt;code&gt;CREATE_USER&lt;/code&gt;,
442 # &lt;code&gt;DELETE_USER&lt;/code&gt;, &lt;code&gt;CREATE_DATABASE&lt;/code&gt;,
443 # &lt;code&gt;DELETE_DATABASE&lt;/code&gt; .
444 "user": "A String", # The email address of the user who initiated this operation.
445 "startTime": "A String", # The time this operation actually started in UTC timezone in &lt;a
446 # href="https://tools.ietf.org/html/rfc3339"&gt;RFC 3339&lt;/a&gt; format, for example
447 # &lt;code&gt;2012-11-15T16:19:00.094Z&lt;/code&gt;.
448 "error": { # Database instance operation errors list wrapper. # If errors occurred during processing of this operation, this field will be
449 # populated.
450 "kind": "A String", # This is always &lt;code&gt;sql#operationErrors&lt;/code&gt;.
Jon Wayne Parrott7d5badb2016-08-16 12:44:29 -0700451 "errors": [ # The list of errors encountered while processing this operation.
452 { # Database instance operation error.
Dan O'Mearadd494642020-05-01 07:42:23 -0700453 "kind": "A String", # This is always &lt;code&gt;sql#operationError&lt;/code&gt;.
Jon Wayne Parrott7d5badb2016-08-16 12:44:29 -0700454 "code": "A String", # Identifies the specific error that occurred.
455 "message": "A String", # Additional information about the error encountered.
456 },
457 ],
458 },
Dan O'Mearadd494642020-05-01 07:42:23 -0700459 "endTime": "A String", # The time this operation finished in UTC timezone in &lt;a
460 # href="https://tools.ietf.org/html/rfc3339"&gt;RFC 3339&lt;/a&gt; format, for example
461 # &lt;code&gt;2012-11-15T16:19:00.094Z&lt;/code&gt;.
Jon Wayne Parrott7d5badb2016-08-16 12:44:29 -0700462 "selfLink": "A String", # The URI of this resource.
Dan O'Mearadd494642020-05-01 07:42:23 -0700463 "targetLink": "A String",
Craig Citroe633be12015-03-02 13:40:36 -0800464 }</pre>
465</div>
466
467<div class="method">
Dan O'Mearadd494642020-05-01 07:42:23 -0700468 <code class="details" id="list">list(project, instance, maxResults=None, pageToken=None, x__xgafv=None)</code>
469 <pre>Lists all backup runs associated with a given instance and configuration in
470the reverse chronological order of the backup initiation time.
Craig Citroe633be12015-03-02 13:40:36 -0800471
472Args:
473 project: string, Project ID of the project that contains the instance. (required)
474 instance: string, Cloud SQL instance ID. This does not include the project ID. (required)
475 maxResults: integer, Maximum number of backup runs per response.
Dan O'Mearadd494642020-05-01 07:42:23 -0700476 pageToken: string, A previously-returned page token representing part of the larger set of
477results to view.
478 x__xgafv: string, V1 error format.
479 Allowed values
480 1 - v1 error format
481 2 - v2 error format
Craig Citroe633be12015-03-02 13:40:36 -0800482
483Returns:
484 An object of the form:
485
486 { # Backup run list results.
Dan O'Mearadd494642020-05-01 07:42:23 -0700487 "nextPageToken": "A String", # The continuation token, used to page through large result sets. Provide
488 # this value in a subsequent request to return the next page of results.
Craig Citroe633be12015-03-02 13:40:36 -0800489 "items": [ # A list of backup runs in reverse chronological order of the enqueued time.
Bu Sun Kim715bd7f2019-06-14 16:50:42 -0700490 { # A BackupRun resource.
Jon Wayne Parrott7d5badb2016-08-16 12:44:29 -0700491 "status": "A String", # The status of this run.
Dan O'Mearadd494642020-05-01 07:42:23 -0700492 "diskEncryptionConfiguration": { # Disk encryption configuration for an instance. # Encryption configuration specific to a backup.
493 # Applies only to Second Generation instances.
494 "kind": "A String", # This is always &lt;code&gt;sql#diskEncryptionConfiguration&lt;/code&gt;.
495 "kmsKeyName": "A String", # Resource name of KMS key for disk encryption
496 },
497 "kind": "A String", # This is always &lt;code&gt;sql#backupRun&lt;/code&gt;.
Jon Wayne Parrott7d5badb2016-08-16 12:44:29 -0700498 "description": "A String", # The description of this run, only applicable to on-demand backups.
Dan O'Mearadd494642020-05-01 07:42:23 -0700499 "windowStartTime": "A String", # The start time of the backup window during which this the backup was
500 # attempted in &lt;a href="https://tools.ietf.org/html/rfc3339"&gt;RFC 3339&lt;/a&gt;
501 # format, for example &lt;code&gt;2012-11-15T16:19:00.094Z&lt;/code&gt;.
502 "diskEncryptionStatus": { # Disk encryption status for an instance. # Encryption status specific to a backup.
503 # Applies only to Second Generation instances.
504 "kmsKeyVersionName": "A String", # KMS key version used to encrypt the Cloud SQL instance resource
505 "kind": "A String", # This is always &lt;code&gt;sql#diskEncryptionStatus&lt;/code&gt;.
506 },
507 "id": "A String", # The identifier for this backup run. Unique only for a specific Cloud SQL
508 # instance.
Jon Wayne Parrott7d5badb2016-08-16 12:44:29 -0700509 "instance": "A String", # Name of the database instance.
Dan O'Mearadd494642020-05-01 07:42:23 -0700510 "location": "A String", # Location of the backups.
511 "startTime": "A String", # The time the backup operation actually started in UTC timezone in &lt;a
512 # href="https://tools.ietf.org/html/rfc3339"&gt;RFC 3339&lt;/a&gt; format, for example
513 # &lt;code&gt;2012-11-15T16:19:00.094Z&lt;/code&gt;.
514 "error": { # Database instance operation error. # Information about why the backup operation failed. This is only present if
515 # the run has the FAILED status.
516 "kind": "A String", # This is always &lt;code&gt;sql#operationError&lt;/code&gt;.
Jon Wayne Parrott7d5badb2016-08-16 12:44:29 -0700517 "code": "A String", # Identifies the specific error that occurred.
518 "message": "A String", # Additional information about the error encountered.
519 },
Dan O'Mearadd494642020-05-01 07:42:23 -0700520 "endTime": "A String", # The time the backup operation completed in UTC timezone in &lt;a
521 # href="https://tools.ietf.org/html/rfc3339"&gt;RFC 3339&lt;/a&gt; format, for example
522 # &lt;code&gt;2012-11-15T16:19:00.094Z&lt;/code&gt;.
Jon Wayne Parrott7d5badb2016-08-16 12:44:29 -0700523 "type": "A String", # The type of this run; can be either "AUTOMATED" or "ON_DEMAND".
Dan O'Mearadd494642020-05-01 07:42:23 -0700524 "enqueuedTime": "A String", # The time the run was enqueued in UTC timezone in &lt;a
525 # href="https://tools.ietf.org/html/rfc3339"&gt;RFC 3339&lt;/a&gt; format, for example
526 # &lt;code&gt;2012-11-15T16:19:00.094Z&lt;/code&gt;.
Jon Wayne Parrott7d5badb2016-08-16 12:44:29 -0700527 "selfLink": "A String", # The URI of this resource.
Craig Citroe633be12015-03-02 13:40:36 -0800528 },
Craig Citroe633be12015-03-02 13:40:36 -0800529 ],
Dan O'Mearadd494642020-05-01 07:42:23 -0700530 "kind": "A String", # This is always &lt;code&gt;sql#backupRunsList&lt;/code&gt;.
Craig Citroe633be12015-03-02 13:40:36 -0800531 }</pre>
532</div>
533
534<div class="method">
535 <code class="details" id="list_next">list_next(previous_request, previous_response)</code>
536 <pre>Retrieves the next page of results.
537
538Args:
539 previous_request: The request for the previous page. (required)
540 previous_response: The response from the request for the previous page. (required)
541
542Returns:
543 A request object that you can call 'execute()' on to request the next
544 page. Returns None if there are no more items in the collection.
545 </pre>
546</div>
547
548</body></html>