blob: 2b54ab108178117c840c69f488773e1f35e1dc24 [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">
Dmitry Frenkel3e17f892020-10-06 16:46:05 -070078 <code><a href="#close">close()</a></code></p>
79<p class="firstline">Close httplib2 connections.</p>
80<p class="toc_element">
Dan O'Mearadd494642020-05-01 07:42:23 -070081 <code><a href="#delete">delete(project, instance, id, x__xgafv=None)</a></code></p>
Takashi Matsuo06694102015-09-11 13:55:40 -070082<p class="firstline">Deletes the backup taken by a backup run.</p>
83<p class="toc_element">
Dan O'Mearadd494642020-05-01 07:42:23 -070084 <code><a href="#get">get(project, instance, id, x__xgafv=None)</a></code></p>
Craig Citroe633be12015-03-02 13:40:36 -080085<p class="firstline">Retrieves a resource containing information about a backup run.</p>
86<p class="toc_element">
Dan O'Mearadd494642020-05-01 07:42:23 -070087 <code><a href="#insert">insert(project, instance, body=None, x__xgafv=None)</a></code></p>
yoshi-code-bota36e3b12021-07-27 00:20:26 -070088<p class="firstline">Creates a new backup run on demand.</p>
Jon Wayne Parrott7d5badb2016-08-16 12:44:29 -070089<p class="toc_element">
Yoshi Automation Bot0bf565c2020-12-09 08:56:03 -080090 <code><a href="#list">list(project, instance, maxResults=None, pageToken=None, x__xgafv=None)</a></code></p>
yoshi-code-bot1a4514d2021-07-13 00:20:24 -070091<p class="firstline">Lists all backup runs associated with the project or a given instance and configuration in the reverse chronological order of the backup initiation time.</p>
Craig Citroe633be12015-03-02 13:40:36 -080092<p class="toc_element">
93 <code><a href="#list_next">list_next(previous_request, previous_response)</a></code></p>
94<p class="firstline">Retrieves the next page of results.</p>
95<h3>Method Details</h3>
96<div class="method">
Dmitry Frenkel3e17f892020-10-06 16:46:05 -070097 <code class="details" id="close">close()</code>
98 <pre>Close httplib2 connections.</pre>
99</div>
100
101<div class="method">
Dan O'Mearadd494642020-05-01 07:42:23 -0700102 <code class="details" id="delete">delete(project, instance, id, x__xgafv=None)</code>
Takashi Matsuo06694102015-09-11 13:55:40 -0700103 <pre>Deletes the backup taken by a backup run.
104
105Args:
106 project: string, Project ID of the project that contains the instance. (required)
107 instance: string, Cloud SQL instance ID. This does not include the project ID. (required)
yoshi-code-bot1c9dcfd2021-10-12 00:20:31 -0700108 id: string, The ID of the backup run to delete. To find a backup run ID, use the [list](https://cloud.google.com/sql/docs/mysql/admin-api/rest/v1beta4/backupRuns/list) method. (required)
Dan O'Mearadd494642020-05-01 07:42:23 -0700109 x__xgafv: string, V1 error format.
110 Allowed values
111 1 - v1 error format
112 2 - v2 error format
Takashi Matsuo06694102015-09-11 13:55:40 -0700113
114Returns:
115 An object of the form:
116
yoshi-code-bota8b35b92021-03-31 13:33:30 -0700117 { # An Operation resource. For successful operations that return an Operation resource, only the fields relevant to the operation are populated in the resource.
yoshi-code-botb6dc1b92021-03-02 11:49:08 -0800118 &quot;backupContext&quot;: { # Backup context. # The context for backup operation, if applicable.
119 &quot;backupId&quot;: &quot;A String&quot;, # The identifier of the backup.
yoshi-code-bot312da312021-09-21 00:22:28 -0700120 &quot;kind&quot;: &quot;A String&quot;, # This is always **sql#backupContext**.
yoshi-code-botb6dc1b92021-03-02 11:49:08 -0800121 },
yoshi-code-bot312da312021-09-21 00:22:28 -0700122 &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**.
Yoshi Automation Botcc94ec82021-01-15 07:10:04 -0800123 &quot;error&quot;: { # Database instance operation errors list wrapper. # If errors occurred during processing of this operation, this field will be populated.
124 &quot;errors&quot;: [ # The list of errors encountered while processing this operation.
125 { # Database instance operation error.
126 &quot;code&quot;: &quot;A String&quot;, # Identifies the specific error that occurred.
yoshi-code-bot312da312021-09-21 00:22:28 -0700127 &quot;kind&quot;: &quot;A String&quot;, # This is always **sql#operationError**.
Yoshi Automation Botcc94ec82021-01-15 07:10:04 -0800128 &quot;message&quot;: &quot;A String&quot;, # Additional information about the error encountered.
129 },
130 ],
yoshi-code-bot312da312021-09-21 00:22:28 -0700131 &quot;kind&quot;: &quot;A String&quot;, # This is always **sql#operationErrors**.
Yoshi Automation Botcc94ec82021-01-15 07:10:04 -0800132 },
133 &quot;exportContext&quot;: { # Database instance export context. # The context for export operation, if applicable.
yoshi-code-bot312da312021-09-21 00:22:28 -0700134 &quot;csvExportOptions&quot;: { # Options for exporting data as CSV. **MySQL** and **PostgreSQL** instances only.
yoshi-code-bot2da5ed12021-09-07 00:20:27 -0700135 &quot;escapeCharacter&quot;: &quot;A String&quot;, # Specifies the character that should appear before a data character that needs to be escaped.
136 &quot;fieldsTerminatedBy&quot;: &quot;A String&quot;, # Specifies the character that separates columns within each row (line) of the file.
137 &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.
138 &quot;quoteCharacter&quot;: &quot;A String&quot;, # Specifies the quoting character to be used when a data value is quoted.
Yoshi Automation Botcc94ec82021-01-15 07:10:04 -0800139 &quot;selectQuery&quot;: &quot;A String&quot;, # The select query used to extract the data.
Yoshi Automation Bot0bf565c2020-12-09 08:56:03 -0800140 },
yoshi-code-bot312da312021-09-21 00:22:28 -0700141 &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:** You must specify one database to be exported. 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**.
Yoshi Automation Botcc94ec82021-01-15 07:10:04 -0800142 &quot;A String&quot;,
143 ],
yoshi-code-bot312da312021-09-21 00:22:28 -0700144 &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. * **BAK**: The file contains backup data for a SQL Server instance.
yoshi-code-bot1c9dcfd2021-10-12 00:20:31 -0700145 &quot;kind&quot;: &quot;A String&quot;, # This is always **sql#exportContext**.
Yoshi Automation Botcc94ec82021-01-15 07:10:04 -0800146 &quot;offload&quot;: True or False, # Option for export offload.
147 &quot;sqlExportOptions&quot;: { # Options for exporting data as SQL statements.
148 &quot;mysqlExportOptions&quot;: { # Options for exporting from MySQL.
yoshi-code-bot312da312021-09-21 00:22:28 -0700149 &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.
Yoshi Automation Bot0bf565c2020-12-09 08:56:03 -0800150 },
Yoshi Automation Botcc94ec82021-01-15 07:10:04 -0800151 &quot;schemaOnly&quot;: True or False, # Export only schemas.
152 &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.
Yoshi Automation Bot0bf565c2020-12-09 08:56:03 -0800153 &quot;A String&quot;,
154 ],
155 },
yoshi-code-bot312da312021-09-21 00:22:28 -0700156 &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.
Yoshi Automation Botcc94ec82021-01-15 07:10:04 -0800157 },
158 &quot;importContext&quot;: { # Database instance import context. # The context for import operation, if applicable.
159 &quot;bakImportOptions&quot;: { # Import parameters specific to SQL Server .BAK files
160 &quot;encryptionOptions&quot;: {
yoshi-code-bot312da312021-09-21 00:22:28 -0700161 &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.
Yoshi Automation Botcc94ec82021-01-15 07:10:04 -0800162 &quot;pvkPassword&quot;: &quot;A String&quot;, # Password that encrypts the private key
yoshi-code-bot1c9dcfd2021-10-12 00:20:31 -0700163 &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.
Yoshi Automation Botb6971b02020-11-26 17:16:03 -0800164 },
Yoshi Automation Bot0d561ef2020-11-25 07:50:41 -0800165 },
Yoshi Automation Botcc94ec82021-01-15 07:10:04 -0800166 &quot;csvImportOptions&quot;: { # Options for importing data as CSV.
167 &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.
168 &quot;A String&quot;,
169 ],
yoshi-code-bot2da5ed12021-09-07 00:20:27 -0700170 &quot;escapeCharacter&quot;: &quot;A String&quot;, # Specifies the character that should appear before a data character that needs to be escaped.
171 &quot;fieldsTerminatedBy&quot;: &quot;A String&quot;, # Specifies the character that separates columns within each row (line) of the file.
172 &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.
173 &quot;quoteCharacter&quot;: &quot;A String&quot;, # Specifies the quoting character to be used when a data value is quoted.
Yoshi Automation Botcc94ec82021-01-15 07:10:04 -0800174 &quot;table&quot;: &quot;A String&quot;, # The table to which CSV data is imported.
175 },
yoshi-code-bot312da312021-09-21 00:22:28 -0700176 &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. If **fileType** is **CSV**, one database must be specified.
177 &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. * **BAK**: The file contains backup data for a SQL Server instance.
Yoshi Automation Botcc94ec82021-01-15 07:10:04 -0800178 &quot;importUser&quot;: &quot;A String&quot;, # The PostgreSQL user for this import operation. PostgreSQL instances only.
yoshi-code-bot312da312021-09-21 00:22:28 -0700179 &quot;kind&quot;: &quot;A String&quot;, # This is always **sql#importContext**.
180 &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.
Yoshi Automation Botcc94ec82021-01-15 07:10:04 -0800181 },
yoshi-code-bot312da312021-09-21 00:22:28 -0700182 &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**.
183 &quot;kind&quot;: &quot;A String&quot;, # This is always **sql#operation**.
Yoshi Automation Botcc94ec82021-01-15 07:10:04 -0800184 &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.
yoshi-code-bot312da312021-09-21 00:22:28 -0700185 &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**
Yoshi Automation Botcc94ec82021-01-15 07:10:04 -0800186 &quot;selfLink&quot;: &quot;A String&quot;, # The URI of this resource.
yoshi-code-bot312da312021-09-21 00:22:28 -0700187 &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**.
188 &quot;status&quot;: &quot;A String&quot;, # The status of an operation. Valid values are: * **PENDING** * **RUNNING** * **DONE** * **SQL_OPERATION_STATUS_UNSPECIFIED**
Yoshi Automation Botcc94ec82021-01-15 07:10:04 -0800189 &quot;targetId&quot;: &quot;A String&quot;, # Name of the database instance related to this operation.
190 &quot;targetLink&quot;: &quot;A String&quot;,
191 &quot;targetProject&quot;: &quot;A String&quot;, # The project ID of the target instance related to this operation.
192 &quot;user&quot;: &quot;A String&quot;, # The email address of the user who initiated this operation.
193}</pre>
Takashi Matsuo06694102015-09-11 13:55:40 -0700194</div>
195
196<div class="method">
Dan O'Mearadd494642020-05-01 07:42:23 -0700197 <code class="details" id="get">get(project, instance, id, x__xgafv=None)</code>
Craig Citroe633be12015-03-02 13:40:36 -0800198 <pre>Retrieves a resource containing information about a backup run.
199
200Args:
201 project: string, Project ID of the project that contains the instance. (required)
202 instance: string, Cloud SQL instance ID. This does not include the project ID. (required)
yoshi-code-bota36e3b12021-07-27 00:20:26 -0700203 id: string, The ID of this backup run. (required)
Dan O'Mearadd494642020-05-01 07:42:23 -0700204 x__xgafv: string, V1 error format.
205 Allowed values
206 1 - v1 error format
207 2 - v2 error format
Craig Citroe633be12015-03-02 13:40:36 -0800208
209Returns:
210 An object of the form:
211
Bu Sun Kim715bd7f2019-06-14 16:50:42 -0700212 { # A BackupRun resource.
Yoshi Automation Botcc94ec82021-01-15 07:10:04 -0800213 &quot;backupKind&quot;: &quot;A String&quot;, # Specifies the kind of backup, PHYSICAL or DEFAULT_SNAPSHOT.
214 &quot;description&quot;: &quot;A String&quot;, # The description of this run, only applicable to on-demand backups.
yoshi-code-bota36e3b12021-07-27 00:20:26 -0700215 &quot;diskEncryptionConfiguration&quot;: { # Disk encryption configuration for an instance. # Encryption configuration specific to a backup.
yoshi-code-bot312da312021-09-21 00:22:28 -0700216 &quot;kind&quot;: &quot;A String&quot;, # This is always **sql#diskEncryptionConfiguration**.
Yoshi Automation Botcc94ec82021-01-15 07:10:04 -0800217 &quot;kmsKeyName&quot;: &quot;A String&quot;, # Resource name of KMS key for disk encryption
218 },
yoshi-code-bota36e3b12021-07-27 00:20:26 -0700219 &quot;diskEncryptionStatus&quot;: { # Disk encryption status for an instance. # Encryption status specific to a backup.
yoshi-code-bot312da312021-09-21 00:22:28 -0700220 &quot;kind&quot;: &quot;A String&quot;, # This is always **sql#diskEncryptionStatus**.
Yoshi Automation Botcc94ec82021-01-15 07:10:04 -0800221 &quot;kmsKeyVersionName&quot;: &quot;A String&quot;, # KMS key version used to encrypt the Cloud SQL instance resource
222 },
yoshi-code-bot312da312021-09-21 00:22:28 -0700223 &quot;endTime&quot;: &quot;A String&quot;, # The time the backup operation completed in UTC timezone in [RFC 3339](https://tools.ietf.org/html/rfc3339) format, for example **2012-11-15T16:19:00.094Z**.
224 &quot;enqueuedTime&quot;: &quot;A String&quot;, # The time the run was enqueued in UTC timezone in [RFC 3339](https://tools.ietf.org/html/rfc3339) format, for example **2012-11-15T16:19:00.094Z**.
Yoshi Automation Botcc94ec82021-01-15 07:10:04 -0800225 &quot;error&quot;: { # Database instance operation error. # Information about why the backup operation failed. This is only present if the run has the FAILED status.
226 &quot;code&quot;: &quot;A String&quot;, # Identifies the specific error that occurred.
yoshi-code-bot312da312021-09-21 00:22:28 -0700227 &quot;kind&quot;: &quot;A String&quot;, # This is always **sql#operationError**.
Yoshi Automation Botcc94ec82021-01-15 07:10:04 -0800228 &quot;message&quot;: &quot;A String&quot;, # Additional information about the error encountered.
229 },
230 &quot;id&quot;: &quot;A String&quot;, # The identifier for this backup run. Unique only for a specific Cloud SQL instance.
231 &quot;instance&quot;: &quot;A String&quot;, # Name of the database instance.
yoshi-code-bot1c9dcfd2021-10-12 00:20:31 -0700232 &quot;kind&quot;: &quot;A String&quot;, # This is always **sql#backupRun**.
Yoshi Automation Botcc94ec82021-01-15 07:10:04 -0800233 &quot;location&quot;: &quot;A String&quot;, # Location of the backups.
234 &quot;selfLink&quot;: &quot;A String&quot;, # The URI of this resource.
yoshi-code-bot312da312021-09-21 00:22:28 -0700235 &quot;startTime&quot;: &quot;A String&quot;, # The time the backup operation actually started in UTC timezone in [RFC 3339](https://tools.ietf.org/html/rfc3339) format, for example **2012-11-15T16:19:00.094Z**.
Yoshi Automation Botcc94ec82021-01-15 07:10:04 -0800236 &quot;status&quot;: &quot;A String&quot;, # The status of this run.
yoshi-code-botb6dc1b92021-03-02 11:49:08 -0800237 &quot;type&quot;: &quot;A String&quot;, # The type of this run; can be either &quot;AUTOMATED&quot; or &quot;ON_DEMAND&quot;. This field defaults to &quot;ON_DEMAND&quot; and is ignored, when specified for insert requests.
yoshi-code-bot312da312021-09-21 00:22:28 -0700238 &quot;windowStartTime&quot;: &quot;A String&quot;, # The start time of the backup window during which this the backup was attempted in [RFC 3339](https://tools.ietf.org/html/rfc3339) format, for example **2012-11-15T16:19:00.094Z**.
Yoshi Automation Botcc94ec82021-01-15 07:10:04 -0800239}</pre>
Bu Sun Kim4ed7d3f2020-05-27 12:20:54 -0700240</div>
241
242<div class="method">
243 <code class="details" id="insert">insert(project, instance, body=None, x__xgafv=None)</code>
yoshi-code-bota36e3b12021-07-27 00:20:26 -0700244 <pre>Creates a new backup run on demand.
Bu Sun Kim4ed7d3f2020-05-27 12:20:54 -0700245
246Args:
247 project: string, Project ID of the project that contains the instance. (required)
248 instance: string, Cloud SQL instance ID. This does not include the project ID. (required)
249 body: object, The request body.
250 The object takes the form of:
251
252{ # A BackupRun resource.
Yoshi Automation Botcc94ec82021-01-15 07:10:04 -0800253 &quot;backupKind&quot;: &quot;A String&quot;, # Specifies the kind of backup, PHYSICAL or DEFAULT_SNAPSHOT.
Yoshi Automation Bot0bf565c2020-12-09 08:56:03 -0800254 &quot;description&quot;: &quot;A String&quot;, # The description of this run, only applicable to on-demand backups.
yoshi-code-bota36e3b12021-07-27 00:20:26 -0700255 &quot;diskEncryptionConfiguration&quot;: { # Disk encryption configuration for an instance. # Encryption configuration specific to a backup.
yoshi-code-bot312da312021-09-21 00:22:28 -0700256 &quot;kind&quot;: &quot;A String&quot;, # This is always **sql#diskEncryptionConfiguration**.
Yoshi Automation Bot0bf565c2020-12-09 08:56:03 -0800257 &quot;kmsKeyName&quot;: &quot;A String&quot;, # Resource name of KMS key for disk encryption
258 },
yoshi-code-bota36e3b12021-07-27 00:20:26 -0700259 &quot;diskEncryptionStatus&quot;: { # Disk encryption status for an instance. # Encryption status specific to a backup.
yoshi-code-bot312da312021-09-21 00:22:28 -0700260 &quot;kind&quot;: &quot;A String&quot;, # This is always **sql#diskEncryptionStatus**.
Yoshi Automation Botcc94ec82021-01-15 07:10:04 -0800261 &quot;kmsKeyVersionName&quot;: &quot;A String&quot;, # KMS key version used to encrypt the Cloud SQL instance resource
Yoshi Automation Bot0bf565c2020-12-09 08:56:03 -0800262 },
yoshi-code-bot312da312021-09-21 00:22:28 -0700263 &quot;endTime&quot;: &quot;A String&quot;, # The time the backup operation completed in UTC timezone in [RFC 3339](https://tools.ietf.org/html/rfc3339) format, for example **2012-11-15T16:19:00.094Z**.
264 &quot;enqueuedTime&quot;: &quot;A String&quot;, # The time the run was enqueued in UTC timezone in [RFC 3339](https://tools.ietf.org/html/rfc3339) format, for example **2012-11-15T16:19:00.094Z**.
Yoshi Automation Bot0bf565c2020-12-09 08:56:03 -0800265 &quot;error&quot;: { # Database instance operation error. # Information about why the backup operation failed. This is only present if the run has the FAILED status.
266 &quot;code&quot;: &quot;A String&quot;, # Identifies the specific error that occurred.
yoshi-code-bot312da312021-09-21 00:22:28 -0700267 &quot;kind&quot;: &quot;A String&quot;, # This is always **sql#operationError**.
Yoshi Automation Bot0bf565c2020-12-09 08:56:03 -0800268 &quot;message&quot;: &quot;A String&quot;, # Additional information about the error encountered.
269 },
Yoshi Automation Botcc94ec82021-01-15 07:10:04 -0800270 &quot;id&quot;: &quot;A String&quot;, # The identifier for this backup run. Unique only for a specific Cloud SQL instance.
271 &quot;instance&quot;: &quot;A String&quot;, # Name of the database instance.
yoshi-code-bot1c9dcfd2021-10-12 00:20:31 -0700272 &quot;kind&quot;: &quot;A String&quot;, # This is always **sql#backupRun**.
Yoshi Automation Botcc94ec82021-01-15 07:10:04 -0800273 &quot;location&quot;: &quot;A String&quot;, # Location of the backups.
Yoshi Automation Bot0bf565c2020-12-09 08:56:03 -0800274 &quot;selfLink&quot;: &quot;A String&quot;, # The URI of this resource.
yoshi-code-bot312da312021-09-21 00:22:28 -0700275 &quot;startTime&quot;: &quot;A String&quot;, # The time the backup operation actually started in UTC timezone in [RFC 3339](https://tools.ietf.org/html/rfc3339) format, for example **2012-11-15T16:19:00.094Z**.
Yoshi Automation Botcc94ec82021-01-15 07:10:04 -0800276 &quot;status&quot;: &quot;A String&quot;, # The status of this run.
yoshi-code-botb6dc1b92021-03-02 11:49:08 -0800277 &quot;type&quot;: &quot;A String&quot;, # The type of this run; can be either &quot;AUTOMATED&quot; or &quot;ON_DEMAND&quot;. This field defaults to &quot;ON_DEMAND&quot; and is ignored, when specified for insert requests.
yoshi-code-bot312da312021-09-21 00:22:28 -0700278 &quot;windowStartTime&quot;: &quot;A String&quot;, # The start time of the backup window during which this the backup was attempted in [RFC 3339](https://tools.ietf.org/html/rfc3339) format, for example **2012-11-15T16:19:00.094Z**.
Yoshi Automation Bot0bf565c2020-12-09 08:56:03 -0800279}
Jon Wayne Parrott7d5badb2016-08-16 12:44:29 -0700280
Dan O'Mearadd494642020-05-01 07:42:23 -0700281 x__xgafv: string, V1 error format.
282 Allowed values
283 1 - v1 error format
284 2 - v2 error format
Jon Wayne Parrott7d5badb2016-08-16 12:44:29 -0700285
286Returns:
287 An object of the form:
288
yoshi-code-bota8b35b92021-03-31 13:33:30 -0700289 { # An Operation resource. For successful operations that return an Operation resource, only the fields relevant to the operation are populated in the resource.
yoshi-code-botb6dc1b92021-03-02 11:49:08 -0800290 &quot;backupContext&quot;: { # Backup context. # The context for backup operation, if applicable.
291 &quot;backupId&quot;: &quot;A String&quot;, # The identifier of the backup.
yoshi-code-bot312da312021-09-21 00:22:28 -0700292 &quot;kind&quot;: &quot;A String&quot;, # This is always **sql#backupContext**.
yoshi-code-botb6dc1b92021-03-02 11:49:08 -0800293 },
yoshi-code-bot312da312021-09-21 00:22:28 -0700294 &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**.
Yoshi Automation Botcc94ec82021-01-15 07:10:04 -0800295 &quot;error&quot;: { # Database instance operation errors list wrapper. # If errors occurred during processing of this operation, this field will be populated.
296 &quot;errors&quot;: [ # The list of errors encountered while processing this operation.
297 { # Database instance operation error.
298 &quot;code&quot;: &quot;A String&quot;, # Identifies the specific error that occurred.
yoshi-code-bot312da312021-09-21 00:22:28 -0700299 &quot;kind&quot;: &quot;A String&quot;, # This is always **sql#operationError**.
Yoshi Automation Botcc94ec82021-01-15 07:10:04 -0800300 &quot;message&quot;: &quot;A String&quot;, # Additional information about the error encountered.
301 },
302 ],
yoshi-code-bot312da312021-09-21 00:22:28 -0700303 &quot;kind&quot;: &quot;A String&quot;, # This is always **sql#operationErrors**.
Yoshi Automation Botcc94ec82021-01-15 07:10:04 -0800304 },
305 &quot;exportContext&quot;: { # Database instance export context. # The context for export operation, if applicable.
yoshi-code-bot312da312021-09-21 00:22:28 -0700306 &quot;csvExportOptions&quot;: { # Options for exporting data as CSV. **MySQL** and **PostgreSQL** instances only.
yoshi-code-bot2da5ed12021-09-07 00:20:27 -0700307 &quot;escapeCharacter&quot;: &quot;A String&quot;, # Specifies the character that should appear before a data character that needs to be escaped.
308 &quot;fieldsTerminatedBy&quot;: &quot;A String&quot;, # Specifies the character that separates columns within each row (line) of the file.
309 &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.
310 &quot;quoteCharacter&quot;: &quot;A String&quot;, # Specifies the quoting character to be used when a data value is quoted.
Yoshi Automation Botcc94ec82021-01-15 07:10:04 -0800311 &quot;selectQuery&quot;: &quot;A String&quot;, # The select query used to extract the data.
Yoshi Automation Bot0bf565c2020-12-09 08:56:03 -0800312 },
yoshi-code-bot312da312021-09-21 00:22:28 -0700313 &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:** You must specify one database to be exported. 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**.
Yoshi Automation Botcc94ec82021-01-15 07:10:04 -0800314 &quot;A String&quot;,
315 ],
yoshi-code-bot312da312021-09-21 00:22:28 -0700316 &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. * **BAK**: The file contains backup data for a SQL Server instance.
yoshi-code-bot1c9dcfd2021-10-12 00:20:31 -0700317 &quot;kind&quot;: &quot;A String&quot;, # This is always **sql#exportContext**.
Yoshi Automation Botcc94ec82021-01-15 07:10:04 -0800318 &quot;offload&quot;: True or False, # Option for export offload.
319 &quot;sqlExportOptions&quot;: { # Options for exporting data as SQL statements.
320 &quot;mysqlExportOptions&quot;: { # Options for exporting from MySQL.
yoshi-code-bot312da312021-09-21 00:22:28 -0700321 &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.
Yoshi Automation Bot0bf565c2020-12-09 08:56:03 -0800322 },
Yoshi Automation Botcc94ec82021-01-15 07:10:04 -0800323 &quot;schemaOnly&quot;: True or False, # Export only schemas.
324 &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.
Yoshi Automation Bot0bf565c2020-12-09 08:56:03 -0800325 &quot;A String&quot;,
326 ],
327 },
yoshi-code-bot312da312021-09-21 00:22:28 -0700328 &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.
Yoshi Automation Botcc94ec82021-01-15 07:10:04 -0800329 },
330 &quot;importContext&quot;: { # Database instance import context. # The context for import operation, if applicable.
331 &quot;bakImportOptions&quot;: { # Import parameters specific to SQL Server .BAK files
332 &quot;encryptionOptions&quot;: {
yoshi-code-bot312da312021-09-21 00:22:28 -0700333 &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.
Yoshi Automation Botcc94ec82021-01-15 07:10:04 -0800334 &quot;pvkPassword&quot;: &quot;A String&quot;, # Password that encrypts the private key
yoshi-code-bot1c9dcfd2021-10-12 00:20:31 -0700335 &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.
Yoshi Automation Botb6971b02020-11-26 17:16:03 -0800336 },
Yoshi Automation Bot0d561ef2020-11-25 07:50:41 -0800337 },
Yoshi Automation Botcc94ec82021-01-15 07:10:04 -0800338 &quot;csvImportOptions&quot;: { # Options for importing data as CSV.
339 &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.
340 &quot;A String&quot;,
341 ],
yoshi-code-bot2da5ed12021-09-07 00:20:27 -0700342 &quot;escapeCharacter&quot;: &quot;A String&quot;, # Specifies the character that should appear before a data character that needs to be escaped.
343 &quot;fieldsTerminatedBy&quot;: &quot;A String&quot;, # Specifies the character that separates columns within each row (line) of the file.
344 &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.
345 &quot;quoteCharacter&quot;: &quot;A String&quot;, # Specifies the quoting character to be used when a data value is quoted.
Yoshi Automation Botcc94ec82021-01-15 07:10:04 -0800346 &quot;table&quot;: &quot;A String&quot;, # The table to which CSV data is imported.
347 },
yoshi-code-bot312da312021-09-21 00:22:28 -0700348 &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. If **fileType** is **CSV**, one database must be specified.
349 &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. * **BAK**: The file contains backup data for a SQL Server instance.
Yoshi Automation Botcc94ec82021-01-15 07:10:04 -0800350 &quot;importUser&quot;: &quot;A String&quot;, # The PostgreSQL user for this import operation. PostgreSQL instances only.
yoshi-code-bot312da312021-09-21 00:22:28 -0700351 &quot;kind&quot;: &quot;A String&quot;, # This is always **sql#importContext**.
352 &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.
Yoshi Automation Botcc94ec82021-01-15 07:10:04 -0800353 },
yoshi-code-bot312da312021-09-21 00:22:28 -0700354 &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**.
355 &quot;kind&quot;: &quot;A String&quot;, # This is always **sql#operation**.
Yoshi Automation Botcc94ec82021-01-15 07:10:04 -0800356 &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.
yoshi-code-bot312da312021-09-21 00:22:28 -0700357 &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**
Yoshi Automation Botcc94ec82021-01-15 07:10:04 -0800358 &quot;selfLink&quot;: &quot;A String&quot;, # The URI of this resource.
yoshi-code-bot312da312021-09-21 00:22:28 -0700359 &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**.
360 &quot;status&quot;: &quot;A String&quot;, # The status of an operation. Valid values are: * **PENDING** * **RUNNING** * **DONE** * **SQL_OPERATION_STATUS_UNSPECIFIED**
Yoshi Automation Botcc94ec82021-01-15 07:10:04 -0800361 &quot;targetId&quot;: &quot;A String&quot;, # Name of the database instance related to this operation.
362 &quot;targetLink&quot;: &quot;A String&quot;,
363 &quot;targetProject&quot;: &quot;A String&quot;, # The project ID of the target instance related to this operation.
364 &quot;user&quot;: &quot;A String&quot;, # The email address of the user who initiated this operation.
365}</pre>
Craig Citroe633be12015-03-02 13:40:36 -0800366</div>
367
368<div class="method">
Yoshi Automation Bot0bf565c2020-12-09 08:56:03 -0800369 <code class="details" id="list">list(project, instance, maxResults=None, pageToken=None, x__xgafv=None)</code>
yoshi-code-bot1a4514d2021-07-13 00:20:24 -0700370 <pre>Lists all backup runs associated with the project or a given instance and configuration in the reverse chronological order of the backup initiation time.
Craig Citroe633be12015-03-02 13:40:36 -0800371
372Args:
373 project: string, Project ID of the project that contains the instance. (required)
yoshi-code-bot1a4514d2021-07-13 00:20:24 -0700374 instance: string, Cloud SQL instance ID, or &quot;-&quot; for all instances. This does not include the project ID. (required)
Yoshi Automation Botb6971b02020-11-26 17:16:03 -0800375 maxResults: integer, Maximum number of backup runs per response.
Yoshi Automation Bot0bf565c2020-12-09 08:56:03 -0800376 pageToken: string, A previously-returned page token representing part of the larger set of results to view.
Dan O'Mearadd494642020-05-01 07:42:23 -0700377 x__xgafv: string, V1 error format.
378 Allowed values
379 1 - v1 error format
380 2 - v2 error format
Craig Citroe633be12015-03-02 13:40:36 -0800381
382Returns:
383 An object of the form:
384
385 { # Backup run list results.
Yoshi Automation Botcc94ec82021-01-15 07:10:04 -0800386 &quot;items&quot;: [ # A list of backup runs in reverse chronological order of the enqueued time.
387 { # A BackupRun resource.
388 &quot;backupKind&quot;: &quot;A String&quot;, # Specifies the kind of backup, PHYSICAL or DEFAULT_SNAPSHOT.
389 &quot;description&quot;: &quot;A String&quot;, # The description of this run, only applicable to on-demand backups.
yoshi-code-bota36e3b12021-07-27 00:20:26 -0700390 &quot;diskEncryptionConfiguration&quot;: { # Disk encryption configuration for an instance. # Encryption configuration specific to a backup.
yoshi-code-bot312da312021-09-21 00:22:28 -0700391 &quot;kind&quot;: &quot;A String&quot;, # This is always **sql#diskEncryptionConfiguration**.
Yoshi Automation Botcc94ec82021-01-15 07:10:04 -0800392 &quot;kmsKeyName&quot;: &quot;A String&quot;, # Resource name of KMS key for disk encryption
Yoshi Automation Bot0bf565c2020-12-09 08:56:03 -0800393 },
yoshi-code-bota36e3b12021-07-27 00:20:26 -0700394 &quot;diskEncryptionStatus&quot;: { # Disk encryption status for an instance. # Encryption status specific to a backup.
yoshi-code-bot312da312021-09-21 00:22:28 -0700395 &quot;kind&quot;: &quot;A String&quot;, # This is always **sql#diskEncryptionStatus**.
Yoshi Automation Botcc94ec82021-01-15 07:10:04 -0800396 &quot;kmsKeyVersionName&quot;: &quot;A String&quot;, # KMS key version used to encrypt the Cloud SQL instance resource
397 },
yoshi-code-bot312da312021-09-21 00:22:28 -0700398 &quot;endTime&quot;: &quot;A String&quot;, # The time the backup operation completed in UTC timezone in [RFC 3339](https://tools.ietf.org/html/rfc3339) format, for example **2012-11-15T16:19:00.094Z**.
399 &quot;enqueuedTime&quot;: &quot;A String&quot;, # The time the run was enqueued in UTC timezone in [RFC 3339](https://tools.ietf.org/html/rfc3339) format, for example **2012-11-15T16:19:00.094Z**.
Yoshi Automation Botcc94ec82021-01-15 07:10:04 -0800400 &quot;error&quot;: { # Database instance operation error. # Information about why the backup operation failed. This is only present if the run has the FAILED status.
401 &quot;code&quot;: &quot;A String&quot;, # Identifies the specific error that occurred.
yoshi-code-bot312da312021-09-21 00:22:28 -0700402 &quot;kind&quot;: &quot;A String&quot;, # This is always **sql#operationError**.
Yoshi Automation Botcc94ec82021-01-15 07:10:04 -0800403 &quot;message&quot;: &quot;A String&quot;, # Additional information about the error encountered.
404 },
405 &quot;id&quot;: &quot;A String&quot;, # The identifier for this backup run. Unique only for a specific Cloud SQL instance.
406 &quot;instance&quot;: &quot;A String&quot;, # Name of the database instance.
yoshi-code-bot1c9dcfd2021-10-12 00:20:31 -0700407 &quot;kind&quot;: &quot;A String&quot;, # This is always **sql#backupRun**.
Yoshi Automation Botcc94ec82021-01-15 07:10:04 -0800408 &quot;location&quot;: &quot;A String&quot;, # Location of the backups.
409 &quot;selfLink&quot;: &quot;A String&quot;, # The URI of this resource.
yoshi-code-bot312da312021-09-21 00:22:28 -0700410 &quot;startTime&quot;: &quot;A String&quot;, # The time the backup operation actually started in UTC timezone in [RFC 3339](https://tools.ietf.org/html/rfc3339) format, for example **2012-11-15T16:19:00.094Z**.
Yoshi Automation Botcc94ec82021-01-15 07:10:04 -0800411 &quot;status&quot;: &quot;A String&quot;, # The status of this run.
yoshi-code-botb6dc1b92021-03-02 11:49:08 -0800412 &quot;type&quot;: &quot;A String&quot;, # The type of this run; can be either &quot;AUTOMATED&quot; or &quot;ON_DEMAND&quot;. This field defaults to &quot;ON_DEMAND&quot; and is ignored, when specified for insert requests.
yoshi-code-bot312da312021-09-21 00:22:28 -0700413 &quot;windowStartTime&quot;: &quot;A String&quot;, # The start time of the backup window during which this the backup was attempted in [RFC 3339](https://tools.ietf.org/html/rfc3339) format, for example **2012-11-15T16:19:00.094Z**.
Yoshi Automation Botcc94ec82021-01-15 07:10:04 -0800414 },
415 ],
yoshi-code-bot1c9dcfd2021-10-12 00:20:31 -0700416 &quot;kind&quot;: &quot;A String&quot;, # This is always **sql#backupRunsList**.
Yoshi Automation Botcc94ec82021-01-15 07:10:04 -0800417 &quot;nextPageToken&quot;: &quot;A String&quot;, # The continuation token, used to page through large result sets. Provide this value in a subsequent request to return the next page of results.
418}</pre>
Craig Citroe633be12015-03-02 13:40:36 -0800419</div>
420
421<div class="method">
422 <code class="details" id="list_next">list_next(previous_request, previous_response)</code>
423 <pre>Retrieves the next page of results.
424
425Args:
426 previous_request: The request for the previous page. (required)
427 previous_response: The response from the request for the previous page. (required)
428
429Returns:
Bu Sun Kim65020912020-05-20 12:08:20 -0700430 A request object that you can call &#x27;execute()&#x27; on to request the next
Craig Citroe633be12015-03-02 13:40:36 -0800431 page. Returns None if there are no more items in the collection.
432 </pre>
433</div>
434
435</body></html>