Craig Citro | e633be1 | 2015-03-02 13:40:36 -0800 | [diff] [blame] | 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 | |
Bu Sun Kim | 715bd7f | 2019-06-14 16:50:42 -0700 | [diff] [blame] | 75 | <h1><a href="sqladmin_v1beta4.html">Cloud SQL Admin API</a> . <a href="sqladmin_v1beta4.databases.html">databases</a></h1> |
Craig Citro | e633be1 | 2015-03-02 13:40:36 -0800 | [diff] [blame] | 76 | <h2>Instance Methods</h2> |
| 77 | <p class="toc_element"> |
Dmitry Frenkel | 3e17f89 | 2020-10-06 16:46:05 -0700 | [diff] [blame] | 78 | <code><a href="#close">close()</a></code></p> |
| 79 | <p class="firstline">Close httplib2 connections.</p> |
| 80 | <p class="toc_element"> |
Dan O'Meara | dd49464 | 2020-05-01 07:42:23 -0700 | [diff] [blame] | 81 | <code><a href="#delete">delete(project, instance, database, x__xgafv=None)</a></code></p> |
Jon Wayne Parrott | 0a471d3 | 2016-05-19 10:54:38 -0700 | [diff] [blame] | 82 | <p class="firstline">Deletes a database from a Cloud SQL instance.</p> |
Craig Citro | e633be1 | 2015-03-02 13:40:36 -0800 | [diff] [blame] | 83 | <p class="toc_element"> |
Dan O'Meara | dd49464 | 2020-05-01 07:42:23 -0700 | [diff] [blame] | 84 | <code><a href="#get">get(project, instance, database, x__xgafv=None)</a></code></p> |
Dmitry Frenkel | 3e17f89 | 2020-10-06 16:46:05 -0700 | [diff] [blame] | 85 | <p class="firstline">Retrieves a resource containing information about a database inside a Cloud SQL instance.</p> |
Craig Citro | e633be1 | 2015-03-02 13:40:36 -0800 | [diff] [blame] | 86 | <p class="toc_element"> |
Dan O'Meara | dd49464 | 2020-05-01 07:42:23 -0700 | [diff] [blame] | 87 | <code><a href="#insert">insert(project, instance, body=None, x__xgafv=None)</a></code></p> |
Dmitry Frenkel | 3e17f89 | 2020-10-06 16:46:05 -0700 | [diff] [blame] | 88 | <p class="firstline">Inserts a resource containing information about a database inside a Cloud SQL instance.</p> |
Craig Citro | e633be1 | 2015-03-02 13:40:36 -0800 | [diff] [blame] | 89 | <p class="toc_element"> |
Dan O'Meara | dd49464 | 2020-05-01 07:42:23 -0700 | [diff] [blame] | 90 | <code><a href="#list">list(project, instance, x__xgafv=None)</a></code></p> |
Craig Citro | e633be1 | 2015-03-02 13:40:36 -0800 | [diff] [blame] | 91 | <p class="firstline">Lists databases in the specified Cloud SQL instance.</p> |
| 92 | <p class="toc_element"> |
Dan O'Meara | dd49464 | 2020-05-01 07:42:23 -0700 | [diff] [blame] | 93 | <code><a href="#patch">patch(project, instance, database, body=None, x__xgafv=None)</a></code></p> |
Dmitry Frenkel | 3e17f89 | 2020-10-06 16:46:05 -0700 | [diff] [blame] | 94 | <p class="firstline">Partially updates a resource containing information about a database inside a Cloud SQL instance. This method supports patch semantics.</p> |
Craig Citro | e633be1 | 2015-03-02 13:40:36 -0800 | [diff] [blame] | 95 | <p class="toc_element"> |
Dan O'Meara | dd49464 | 2020-05-01 07:42:23 -0700 | [diff] [blame] | 96 | <code><a href="#update">update(project, instance, database, body=None, x__xgafv=None)</a></code></p> |
Dmitry Frenkel | 3e17f89 | 2020-10-06 16:46:05 -0700 | [diff] [blame] | 97 | <p class="firstline">Updates a resource containing information about a database inside a Cloud SQL instance.</p> |
Craig Citro | e633be1 | 2015-03-02 13:40:36 -0800 | [diff] [blame] | 98 | <h3>Method Details</h3> |
| 99 | <div class="method"> |
Dmitry Frenkel | 3e17f89 | 2020-10-06 16:46:05 -0700 | [diff] [blame] | 100 | <code class="details" id="close">close()</code> |
| 101 | <pre>Close httplib2 connections.</pre> |
| 102 | </div> |
| 103 | |
| 104 | <div class="method"> |
Dan O'Meara | dd49464 | 2020-05-01 07:42:23 -0700 | [diff] [blame] | 105 | <code class="details" id="delete">delete(project, instance, database, x__xgafv=None)</code> |
Jon Wayne Parrott | 0a471d3 | 2016-05-19 10:54:38 -0700 | [diff] [blame] | 106 | <pre>Deletes a database from a Cloud SQL instance. |
Craig Citro | e633be1 | 2015-03-02 13:40:36 -0800 | [diff] [blame] | 107 | |
| 108 | Args: |
| 109 | project: string, Project ID of the project that contains the instance. (required) |
| 110 | instance: string, Database instance ID. This does not include the project ID. (required) |
| 111 | database: string, Name of the database to be deleted in the instance. (required) |
Dan O'Meara | dd49464 | 2020-05-01 07:42:23 -0700 | [diff] [blame] | 112 | x__xgafv: string, V1 error format. |
| 113 | Allowed values |
| 114 | 1 - v1 error format |
| 115 | 2 - v2 error format |
Craig Citro | e633be1 | 2015-03-02 13:40:36 -0800 | [diff] [blame] | 116 | |
| 117 | Returns: |
| 118 | An object of the form: |
| 119 | |
yoshi-code-bot | a8b35b9 | 2021-03-31 13:33:30 -0700 | [diff] [blame] | 120 | { # 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-bot | b6dc1b9 | 2021-03-02 11:49:08 -0800 | [diff] [blame] | 121 | "backupContext": { # Backup context. # The context for backup operation, if applicable. |
| 122 | "backupId": "A String", # The identifier of the backup. |
| 123 | "kind": "A String", # This is always *sql#backupContext*. |
| 124 | }, |
Yoshi Automation Bot | cc94ec8 | 2021-01-15 07:10:04 -0800 | [diff] [blame] | 125 | "endTime": "A String", # The time this operation finished in UTC timezone in RFC 3339 format, for example *2012-11-15T16:19:00.094Z*. |
| 126 | "error": { # Database instance operation errors list wrapper. # If errors occurred during processing of this operation, this field will be populated. |
| 127 | "errors": [ # The list of errors encountered while processing this operation. |
| 128 | { # Database instance operation error. |
| 129 | "code": "A String", # Identifies the specific error that occurred. |
| 130 | "kind": "A String", # This is always *sql#operationError*. |
| 131 | "message": "A String", # Additional information about the error encountered. |
| 132 | }, |
| 133 | ], |
| 134 | "kind": "A String", # This is always *sql#operationErrors*. |
| 135 | }, |
| 136 | "exportContext": { # Database instance export context. # The context for export operation, if applicable. |
yoshi-code-bot | b6dc1b9 | 2021-03-02 11:49:08 -0800 | [diff] [blame] | 137 | "csvExportOptions": { # Options for exporting data as CSV. *MySQL* and *PostgreSQL* instances only. |
Yoshi Automation Bot | cc94ec8 | 2021-01-15 07:10:04 -0800 | [diff] [blame] | 138 | "selectQuery": "A String", # The select query used to extract the data. |
Yoshi Automation Bot | 0bf565c | 2020-12-09 08:56:03 -0800 | [diff] [blame] | 139 | }, |
yoshi-code-bot | a8b35b9 | 2021-03-31 13:33:30 -0700 | [diff] [blame] | 140 | "databases": [ # 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 Bot | cc94ec8 | 2021-01-15 07:10:04 -0800 | [diff] [blame] | 141 | "A String", |
| 142 | ], |
yoshi-code-bot | b6dc1b9 | 2021-03-02 11:49:08 -0800 | [diff] [blame] | 143 | "fileType": "A String", # 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 Bot | cc94ec8 | 2021-01-15 07:10:04 -0800 | [diff] [blame] | 144 | "kind": "A String", # This is always *sql#exportContext*. |
| 145 | "offload": True or False, # Option for export offload. |
| 146 | "sqlExportOptions": { # Options for exporting data as SQL statements. |
| 147 | "mysqlExportOptions": { # Options for exporting from MySQL. |
yoshi-code-bot | b6dc1b9 | 2021-03-02 11:49:08 -0800 | [diff] [blame] | 148 | "masterData": 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 Bot | 0bf565c | 2020-12-09 08:56:03 -0800 | [diff] [blame] | 149 | }, |
Yoshi Automation Bot | cc94ec8 | 2021-01-15 07:10:04 -0800 | [diff] [blame] | 150 | "schemaOnly": True or False, # Export only schemas. |
| 151 | "tables": [ # 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 Bot | 0bf565c | 2020-12-09 08:56:03 -0800 | [diff] [blame] | 152 | "A String", |
| 153 | ], |
| 154 | }, |
yoshi-code-bot | b6dc1b9 | 2021-03-02 11:49:08 -0800 | [diff] [blame] | 155 | "uri": "A String", # The path to the file in Google Cloud Storage where the export will be stored. The URI is in the form *gs://bucketName/fileName*. If the file already exists, the request succeeds, but the operation fails. If *fileType* is *SQL* and the filename ends with .gz, the contents are compressed. |
Yoshi Automation Bot | cc94ec8 | 2021-01-15 07:10:04 -0800 | [diff] [blame] | 156 | }, |
| 157 | "importContext": { # Database instance import context. # The context for import operation, if applicable. |
| 158 | "bakImportOptions": { # Import parameters specific to SQL Server .BAK files |
| 159 | "encryptionOptions": { |
| 160 | "certPath": "A String", # 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. |
| 161 | "pvkPassword": "A String", # Password that encrypts the private key |
| 162 | "pvkPath": "A String", # 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 Bot | b6971b0 | 2020-11-26 17:16:03 -0800 | [diff] [blame] | 163 | }, |
Yoshi Automation Bot | 0d561ef | 2020-11-25 07:50:41 -0800 | [diff] [blame] | 164 | }, |
Yoshi Automation Bot | cc94ec8 | 2021-01-15 07:10:04 -0800 | [diff] [blame] | 165 | "csvImportOptions": { # Options for importing data as CSV. |
| 166 | "columns": [ # The columns to which CSV data is imported. If not specified, all columns of the database table are loaded with CSV data. |
| 167 | "A String", |
| 168 | ], |
| 169 | "table": "A String", # The table to which CSV data is imported. |
| 170 | }, |
| 171 | "database": "A String", # 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. |
| 172 | "fileType": "A String", # The file type for the specified uri. *SQL*: The file contains SQL statements. *CSV*: The file contains CSV data. |
| 173 | "importUser": "A String", # The PostgreSQL user for this import operation. PostgreSQL instances only. |
| 174 | "kind": "A String", # This is always *sql#importContext*. |
yoshi-code-bot | b6dc1b9 | 2021-03-02 11:49:08 -0800 | [diff] [blame] | 175 | "uri": "A String", # 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 Bot | cc94ec8 | 2021-01-15 07:10:04 -0800 | [diff] [blame] | 176 | }, |
| 177 | "insertTime": "A String", # The time this operation was enqueued in UTC timezone in RFC 3339 format, for example *2012-11-15T16:19:00.094Z*. |
| 178 | "kind": "A String", # This is always *sql#operation*. |
| 179 | "name": "A String", # An identifier that uniquely identifies the operation. You can use this identifier to retrieve the Operations resource that has information about the operation. |
| 180 | "operationType": "A String", # The type of the operation. Valid values are: *CREATE* *DELETE* *UPDATE* *RESTART* *IMPORT* *EXPORT* *BACKUP_VOLUME* *RESTORE_VOLUME* *CREATE_USER* *DELETE_USER* *CREATE_DATABASE* *DELETE_DATABASE* |
| 181 | "selfLink": "A String", # The URI of this resource. |
| 182 | "startTime": "A String", # The time this operation actually started in UTC timezone in RFC 3339 format, for example *2012-11-15T16:19:00.094Z*. |
| 183 | "status": "A String", # The status of an operation. Valid values are: *PENDING* *RUNNING* *DONE* *SQL_OPERATION_STATUS_UNSPECIFIED* |
| 184 | "targetId": "A String", # Name of the database instance related to this operation. |
| 185 | "targetLink": "A String", |
| 186 | "targetProject": "A String", # The project ID of the target instance related to this operation. |
| 187 | "user": "A String", # The email address of the user who initiated this operation. |
| 188 | }</pre> |
Craig Citro | e633be1 | 2015-03-02 13:40:36 -0800 | [diff] [blame] | 189 | </div> |
| 190 | |
| 191 | <div class="method"> |
Dan O'Meara | dd49464 | 2020-05-01 07:42:23 -0700 | [diff] [blame] | 192 | <code class="details" id="get">get(project, instance, database, x__xgafv=None)</code> |
Dmitry Frenkel | 3e17f89 | 2020-10-06 16:46:05 -0700 | [diff] [blame] | 193 | <pre>Retrieves a resource containing information about a database inside a Cloud SQL instance. |
Craig Citro | e633be1 | 2015-03-02 13:40:36 -0800 | [diff] [blame] | 194 | |
| 195 | Args: |
| 196 | project: string, Project ID of the project that contains the instance. (required) |
| 197 | instance: string, Database instance ID. This does not include the project ID. (required) |
| 198 | database: string, Name of the database in the instance. (required) |
Dan O'Meara | dd49464 | 2020-05-01 07:42:23 -0700 | [diff] [blame] | 199 | x__xgafv: string, V1 error format. |
| 200 | Allowed values |
| 201 | 1 - v1 error format |
| 202 | 2 - v2 error format |
Craig Citro | e633be1 | 2015-03-02 13:40:36 -0800 | [diff] [blame] | 203 | |
| 204 | Returns: |
| 205 | An object of the form: |
| 206 | |
Bu Sun Kim | 715bd7f | 2019-06-14 16:50:42 -0700 | [diff] [blame] | 207 | { # Represents a SQL database on the Cloud SQL instance. |
Yoshi Automation Bot | cc94ec8 | 2021-01-15 07:10:04 -0800 | [diff] [blame] | 208 | "charset": "A String", # The Cloud SQL charset value. |
| 209 | "collation": "A String", # The Cloud SQL collation value. |
| 210 | "etag": "A String", # This field is deprecated and will be removed from a future version of the API. |
| 211 | "instance": "A String", # The name of the Cloud SQL instance. This does not include the project ID. |
| 212 | "kind": "A String", # This is always *sql#database*. |
| 213 | "name": "A String", # The name of the database in the Cloud SQL instance. This does not include the project ID or instance name. |
| 214 | "project": "A String", # The project ID of the project containing the Cloud SQL database. The Google apps domain is prefixed if applicable. |
| 215 | "selfLink": "A String", # The URI of this resource. |
| 216 | "sqlserverDatabaseDetails": { # Represents a Sql Server database on the Cloud SQL instance. |
| 217 | "compatibilityLevel": 42, # The version of SQL Server with which the database is to be made compatible |
| 218 | "recoveryModel": "A String", # The recovery model of a SQL Server database |
| 219 | }, |
| 220 | }</pre> |
Craig Citro | e633be1 | 2015-03-02 13:40:36 -0800 | [diff] [blame] | 221 | </div> |
| 222 | |
| 223 | <div class="method"> |
Dan O'Meara | dd49464 | 2020-05-01 07:42:23 -0700 | [diff] [blame] | 224 | <code class="details" id="insert">insert(project, instance, body=None, x__xgafv=None)</code> |
Dmitry Frenkel | 3e17f89 | 2020-10-06 16:46:05 -0700 | [diff] [blame] | 225 | <pre>Inserts a resource containing information about a database inside a Cloud SQL instance. |
Craig Citro | e633be1 | 2015-03-02 13:40:36 -0800 | [diff] [blame] | 226 | |
| 227 | Args: |
| 228 | project: string, Project ID of the project that contains the instance. (required) |
| 229 | instance: string, Database instance ID. This does not include the project ID. (required) |
Dan O'Meara | dd49464 | 2020-05-01 07:42:23 -0700 | [diff] [blame] | 230 | body: object, The request body. |
Craig Citro | e633be1 | 2015-03-02 13:40:36 -0800 | [diff] [blame] | 231 | The object takes the form of: |
| 232 | |
Bu Sun Kim | 715bd7f | 2019-06-14 16:50:42 -0700 | [diff] [blame] | 233 | { # Represents a SQL database on the Cloud SQL instance. |
Yoshi Automation Bot | cc94ec8 | 2021-01-15 07:10:04 -0800 | [diff] [blame] | 234 | "charset": "A String", # The Cloud SQL charset value. |
| 235 | "collation": "A String", # The Cloud SQL collation value. |
| 236 | "etag": "A String", # This field is deprecated and will be removed from a future version of the API. |
| 237 | "instance": "A String", # The name of the Cloud SQL instance. This does not include the project ID. |
| 238 | "kind": "A String", # This is always *sql#database*. |
| 239 | "name": "A String", # The name of the database in the Cloud SQL instance. This does not include the project ID or instance name. |
| 240 | "project": "A String", # The project ID of the project containing the Cloud SQL database. The Google apps domain is prefixed if applicable. |
| 241 | "selfLink": "A String", # The URI of this resource. |
| 242 | "sqlserverDatabaseDetails": { # Represents a Sql Server database on the Cloud SQL instance. |
| 243 | "compatibilityLevel": 42, # The version of SQL Server with which the database is to be made compatible |
| 244 | "recoveryModel": "A String", # The recovery model of a SQL Server database |
| 245 | }, |
| 246 | } |
Craig Citro | e633be1 | 2015-03-02 13:40:36 -0800 | [diff] [blame] | 247 | |
Dan O'Meara | dd49464 | 2020-05-01 07:42:23 -0700 | [diff] [blame] | 248 | x__xgafv: string, V1 error format. |
| 249 | Allowed values |
| 250 | 1 - v1 error format |
| 251 | 2 - v2 error format |
Craig Citro | e633be1 | 2015-03-02 13:40:36 -0800 | [diff] [blame] | 252 | |
| 253 | Returns: |
| 254 | An object of the form: |
| 255 | |
yoshi-code-bot | a8b35b9 | 2021-03-31 13:33:30 -0700 | [diff] [blame] | 256 | { # 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-bot | b6dc1b9 | 2021-03-02 11:49:08 -0800 | [diff] [blame] | 257 | "backupContext": { # Backup context. # The context for backup operation, if applicable. |
| 258 | "backupId": "A String", # The identifier of the backup. |
| 259 | "kind": "A String", # This is always *sql#backupContext*. |
| 260 | }, |
Yoshi Automation Bot | cc94ec8 | 2021-01-15 07:10:04 -0800 | [diff] [blame] | 261 | "endTime": "A String", # The time this operation finished in UTC timezone in RFC 3339 format, for example *2012-11-15T16:19:00.094Z*. |
| 262 | "error": { # Database instance operation errors list wrapper. # If errors occurred during processing of this operation, this field will be populated. |
| 263 | "errors": [ # The list of errors encountered while processing this operation. |
| 264 | { # Database instance operation error. |
| 265 | "code": "A String", # Identifies the specific error that occurred. |
| 266 | "kind": "A String", # This is always *sql#operationError*. |
| 267 | "message": "A String", # Additional information about the error encountered. |
| 268 | }, |
| 269 | ], |
| 270 | "kind": "A String", # This is always *sql#operationErrors*. |
| 271 | }, |
| 272 | "exportContext": { # Database instance export context. # The context for export operation, if applicable. |
yoshi-code-bot | b6dc1b9 | 2021-03-02 11:49:08 -0800 | [diff] [blame] | 273 | "csvExportOptions": { # Options for exporting data as CSV. *MySQL* and *PostgreSQL* instances only. |
Yoshi Automation Bot | cc94ec8 | 2021-01-15 07:10:04 -0800 | [diff] [blame] | 274 | "selectQuery": "A String", # The select query used to extract the data. |
Yoshi Automation Bot | 0bf565c | 2020-12-09 08:56:03 -0800 | [diff] [blame] | 275 | }, |
yoshi-code-bot | a8b35b9 | 2021-03-31 13:33:30 -0700 | [diff] [blame] | 276 | "databases": [ # 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 Bot | cc94ec8 | 2021-01-15 07:10:04 -0800 | [diff] [blame] | 277 | "A String", |
| 278 | ], |
yoshi-code-bot | b6dc1b9 | 2021-03-02 11:49:08 -0800 | [diff] [blame] | 279 | "fileType": "A String", # 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 Bot | cc94ec8 | 2021-01-15 07:10:04 -0800 | [diff] [blame] | 280 | "kind": "A String", # This is always *sql#exportContext*. |
| 281 | "offload": True or False, # Option for export offload. |
| 282 | "sqlExportOptions": { # Options for exporting data as SQL statements. |
| 283 | "mysqlExportOptions": { # Options for exporting from MySQL. |
yoshi-code-bot | b6dc1b9 | 2021-03-02 11:49:08 -0800 | [diff] [blame] | 284 | "masterData": 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 Bot | 0bf565c | 2020-12-09 08:56:03 -0800 | [diff] [blame] | 285 | }, |
Yoshi Automation Bot | cc94ec8 | 2021-01-15 07:10:04 -0800 | [diff] [blame] | 286 | "schemaOnly": True or False, # Export only schemas. |
| 287 | "tables": [ # 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 Bot | 0bf565c | 2020-12-09 08:56:03 -0800 | [diff] [blame] | 288 | "A String", |
| 289 | ], |
| 290 | }, |
yoshi-code-bot | b6dc1b9 | 2021-03-02 11:49:08 -0800 | [diff] [blame] | 291 | "uri": "A String", # The path to the file in Google Cloud Storage where the export will be stored. The URI is in the form *gs://bucketName/fileName*. If the file already exists, the request succeeds, but the operation fails. If *fileType* is *SQL* and the filename ends with .gz, the contents are compressed. |
Yoshi Automation Bot | cc94ec8 | 2021-01-15 07:10:04 -0800 | [diff] [blame] | 292 | }, |
| 293 | "importContext": { # Database instance import context. # The context for import operation, if applicable. |
| 294 | "bakImportOptions": { # Import parameters specific to SQL Server .BAK files |
| 295 | "encryptionOptions": { |
| 296 | "certPath": "A String", # 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. |
| 297 | "pvkPassword": "A String", # Password that encrypts the private key |
| 298 | "pvkPath": "A String", # 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 Bot | b6971b0 | 2020-11-26 17:16:03 -0800 | [diff] [blame] | 299 | }, |
Yoshi Automation Bot | 0d561ef | 2020-11-25 07:50:41 -0800 | [diff] [blame] | 300 | }, |
Yoshi Automation Bot | cc94ec8 | 2021-01-15 07:10:04 -0800 | [diff] [blame] | 301 | "csvImportOptions": { # Options for importing data as CSV. |
| 302 | "columns": [ # The columns to which CSV data is imported. If not specified, all columns of the database table are loaded with CSV data. |
| 303 | "A String", |
| 304 | ], |
| 305 | "table": "A String", # The table to which CSV data is imported. |
| 306 | }, |
| 307 | "database": "A String", # 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. |
| 308 | "fileType": "A String", # The file type for the specified uri. *SQL*: The file contains SQL statements. *CSV*: The file contains CSV data. |
| 309 | "importUser": "A String", # The PostgreSQL user for this import operation. PostgreSQL instances only. |
| 310 | "kind": "A String", # This is always *sql#importContext*. |
yoshi-code-bot | b6dc1b9 | 2021-03-02 11:49:08 -0800 | [diff] [blame] | 311 | "uri": "A String", # 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 Bot | cc94ec8 | 2021-01-15 07:10:04 -0800 | [diff] [blame] | 312 | }, |
| 313 | "insertTime": "A String", # The time this operation was enqueued in UTC timezone in RFC 3339 format, for example *2012-11-15T16:19:00.094Z*. |
| 314 | "kind": "A String", # This is always *sql#operation*. |
| 315 | "name": "A String", # An identifier that uniquely identifies the operation. You can use this identifier to retrieve the Operations resource that has information about the operation. |
| 316 | "operationType": "A String", # The type of the operation. Valid values are: *CREATE* *DELETE* *UPDATE* *RESTART* *IMPORT* *EXPORT* *BACKUP_VOLUME* *RESTORE_VOLUME* *CREATE_USER* *DELETE_USER* *CREATE_DATABASE* *DELETE_DATABASE* |
| 317 | "selfLink": "A String", # The URI of this resource. |
| 318 | "startTime": "A String", # The time this operation actually started in UTC timezone in RFC 3339 format, for example *2012-11-15T16:19:00.094Z*. |
| 319 | "status": "A String", # The status of an operation. Valid values are: *PENDING* *RUNNING* *DONE* *SQL_OPERATION_STATUS_UNSPECIFIED* |
| 320 | "targetId": "A String", # Name of the database instance related to this operation. |
| 321 | "targetLink": "A String", |
| 322 | "targetProject": "A String", # The project ID of the target instance related to this operation. |
| 323 | "user": "A String", # The email address of the user who initiated this operation. |
| 324 | }</pre> |
Craig Citro | e633be1 | 2015-03-02 13:40:36 -0800 | [diff] [blame] | 325 | </div> |
| 326 | |
| 327 | <div class="method"> |
Dan O'Meara | dd49464 | 2020-05-01 07:42:23 -0700 | [diff] [blame] | 328 | <code class="details" id="list">list(project, instance, x__xgafv=None)</code> |
Craig Citro | e633be1 | 2015-03-02 13:40:36 -0800 | [diff] [blame] | 329 | <pre>Lists databases in the specified Cloud SQL instance. |
| 330 | |
| 331 | Args: |
Bu Sun Kim | 715bd7f | 2019-06-14 16:50:42 -0700 | [diff] [blame] | 332 | project: string, Project ID of the project that contains the instance. (required) |
Craig Citro | e633be1 | 2015-03-02 13:40:36 -0800 | [diff] [blame] | 333 | instance: string, Cloud SQL instance ID. This does not include the project ID. (required) |
Dan O'Meara | dd49464 | 2020-05-01 07:42:23 -0700 | [diff] [blame] | 334 | x__xgafv: string, V1 error format. |
| 335 | Allowed values |
| 336 | 1 - v1 error format |
| 337 | 2 - v2 error format |
Craig Citro | e633be1 | 2015-03-02 13:40:36 -0800 | [diff] [blame] | 338 | |
| 339 | Returns: |
| 340 | An object of the form: |
| 341 | |
| 342 | { # Database list response. |
Yoshi Automation Bot | cc94ec8 | 2021-01-15 07:10:04 -0800 | [diff] [blame] | 343 | "items": [ # List of database resources in the instance. |
| 344 | { # Represents a SQL database on the Cloud SQL instance. |
| 345 | "charset": "A String", # The Cloud SQL charset value. |
| 346 | "collation": "A String", # The Cloud SQL collation value. |
| 347 | "etag": "A String", # This field is deprecated and will be removed from a future version of the API. |
| 348 | "instance": "A String", # The name of the Cloud SQL instance. This does not include the project ID. |
| 349 | "kind": "A String", # This is always *sql#database*. |
| 350 | "name": "A String", # The name of the database in the Cloud SQL instance. This does not include the project ID or instance name. |
| 351 | "project": "A String", # The project ID of the project containing the Cloud SQL database. The Google apps domain is prefixed if applicable. |
| 352 | "selfLink": "A String", # The URI of this resource. |
| 353 | "sqlserverDatabaseDetails": { # Represents a Sql Server database on the Cloud SQL instance. |
| 354 | "compatibilityLevel": 42, # The version of SQL Server with which the database is to be made compatible |
| 355 | "recoveryModel": "A String", # The recovery model of a SQL Server database |
| 356 | }, |
| 357 | }, |
| 358 | ], |
| 359 | "kind": "A String", # This is always *sql#databasesList*. |
| 360 | }</pre> |
Craig Citro | e633be1 | 2015-03-02 13:40:36 -0800 | [diff] [blame] | 361 | </div> |
| 362 | |
| 363 | <div class="method"> |
Dan O'Meara | dd49464 | 2020-05-01 07:42:23 -0700 | [diff] [blame] | 364 | <code class="details" id="patch">patch(project, instance, database, body=None, x__xgafv=None)</code> |
Dmitry Frenkel | 3e17f89 | 2020-10-06 16:46:05 -0700 | [diff] [blame] | 365 | <pre>Partially updates a resource containing information about a database inside a Cloud SQL instance. This method supports patch semantics. |
Craig Citro | e633be1 | 2015-03-02 13:40:36 -0800 | [diff] [blame] | 366 | |
| 367 | Args: |
| 368 | project: string, Project ID of the project that contains the instance. (required) |
| 369 | instance: string, Database instance ID. This does not include the project ID. (required) |
| 370 | database: string, Name of the database to be updated in the instance. (required) |
Dan O'Meara | dd49464 | 2020-05-01 07:42:23 -0700 | [diff] [blame] | 371 | body: object, The request body. |
Craig Citro | e633be1 | 2015-03-02 13:40:36 -0800 | [diff] [blame] | 372 | The object takes the form of: |
| 373 | |
Bu Sun Kim | 715bd7f | 2019-06-14 16:50:42 -0700 | [diff] [blame] | 374 | { # Represents a SQL database on the Cloud SQL instance. |
Yoshi Automation Bot | cc94ec8 | 2021-01-15 07:10:04 -0800 | [diff] [blame] | 375 | "charset": "A String", # The Cloud SQL charset value. |
| 376 | "collation": "A String", # The Cloud SQL collation value. |
| 377 | "etag": "A String", # This field is deprecated and will be removed from a future version of the API. |
| 378 | "instance": "A String", # The name of the Cloud SQL instance. This does not include the project ID. |
| 379 | "kind": "A String", # This is always *sql#database*. |
| 380 | "name": "A String", # The name of the database in the Cloud SQL instance. This does not include the project ID or instance name. |
| 381 | "project": "A String", # The project ID of the project containing the Cloud SQL database. The Google apps domain is prefixed if applicable. |
| 382 | "selfLink": "A String", # The URI of this resource. |
| 383 | "sqlserverDatabaseDetails": { # Represents a Sql Server database on the Cloud SQL instance. |
| 384 | "compatibilityLevel": 42, # The version of SQL Server with which the database is to be made compatible |
| 385 | "recoveryModel": "A String", # The recovery model of a SQL Server database |
| 386 | }, |
| 387 | } |
Craig Citro | e633be1 | 2015-03-02 13:40:36 -0800 | [diff] [blame] | 388 | |
Dan O'Meara | dd49464 | 2020-05-01 07:42:23 -0700 | [diff] [blame] | 389 | x__xgafv: string, V1 error format. |
| 390 | Allowed values |
| 391 | 1 - v1 error format |
| 392 | 2 - v2 error format |
Craig Citro | e633be1 | 2015-03-02 13:40:36 -0800 | [diff] [blame] | 393 | |
| 394 | Returns: |
| 395 | An object of the form: |
| 396 | |
yoshi-code-bot | a8b35b9 | 2021-03-31 13:33:30 -0700 | [diff] [blame] | 397 | { # 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-bot | b6dc1b9 | 2021-03-02 11:49:08 -0800 | [diff] [blame] | 398 | "backupContext": { # Backup context. # The context for backup operation, if applicable. |
| 399 | "backupId": "A String", # The identifier of the backup. |
| 400 | "kind": "A String", # This is always *sql#backupContext*. |
| 401 | }, |
Yoshi Automation Bot | cc94ec8 | 2021-01-15 07:10:04 -0800 | [diff] [blame] | 402 | "endTime": "A String", # The time this operation finished in UTC timezone in RFC 3339 format, for example *2012-11-15T16:19:00.094Z*. |
| 403 | "error": { # Database instance operation errors list wrapper. # If errors occurred during processing of this operation, this field will be populated. |
| 404 | "errors": [ # The list of errors encountered while processing this operation. |
| 405 | { # Database instance operation error. |
| 406 | "code": "A String", # Identifies the specific error that occurred. |
| 407 | "kind": "A String", # This is always *sql#operationError*. |
| 408 | "message": "A String", # Additional information about the error encountered. |
| 409 | }, |
| 410 | ], |
| 411 | "kind": "A String", # This is always *sql#operationErrors*. |
| 412 | }, |
| 413 | "exportContext": { # Database instance export context. # The context for export operation, if applicable. |
yoshi-code-bot | b6dc1b9 | 2021-03-02 11:49:08 -0800 | [diff] [blame] | 414 | "csvExportOptions": { # Options for exporting data as CSV. *MySQL* and *PostgreSQL* instances only. |
Yoshi Automation Bot | cc94ec8 | 2021-01-15 07:10:04 -0800 | [diff] [blame] | 415 | "selectQuery": "A String", # The select query used to extract the data. |
Yoshi Automation Bot | 0bf565c | 2020-12-09 08:56:03 -0800 | [diff] [blame] | 416 | }, |
yoshi-code-bot | a8b35b9 | 2021-03-31 13:33:30 -0700 | [diff] [blame] | 417 | "databases": [ # 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 Bot | cc94ec8 | 2021-01-15 07:10:04 -0800 | [diff] [blame] | 418 | "A String", |
| 419 | ], |
yoshi-code-bot | b6dc1b9 | 2021-03-02 11:49:08 -0800 | [diff] [blame] | 420 | "fileType": "A String", # 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 Bot | cc94ec8 | 2021-01-15 07:10:04 -0800 | [diff] [blame] | 421 | "kind": "A String", # This is always *sql#exportContext*. |
| 422 | "offload": True or False, # Option for export offload. |
| 423 | "sqlExportOptions": { # Options for exporting data as SQL statements. |
| 424 | "mysqlExportOptions": { # Options for exporting from MySQL. |
yoshi-code-bot | b6dc1b9 | 2021-03-02 11:49:08 -0800 | [diff] [blame] | 425 | "masterData": 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 Bot | 0bf565c | 2020-12-09 08:56:03 -0800 | [diff] [blame] | 426 | }, |
Yoshi Automation Bot | cc94ec8 | 2021-01-15 07:10:04 -0800 | [diff] [blame] | 427 | "schemaOnly": True or False, # Export only schemas. |
| 428 | "tables": [ # 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 Bot | 0bf565c | 2020-12-09 08:56:03 -0800 | [diff] [blame] | 429 | "A String", |
| 430 | ], |
| 431 | }, |
yoshi-code-bot | b6dc1b9 | 2021-03-02 11:49:08 -0800 | [diff] [blame] | 432 | "uri": "A String", # The path to the file in Google Cloud Storage where the export will be stored. The URI is in the form *gs://bucketName/fileName*. If the file already exists, the request succeeds, but the operation fails. If *fileType* is *SQL* and the filename ends with .gz, the contents are compressed. |
Yoshi Automation Bot | cc94ec8 | 2021-01-15 07:10:04 -0800 | [diff] [blame] | 433 | }, |
| 434 | "importContext": { # Database instance import context. # The context for import operation, if applicable. |
| 435 | "bakImportOptions": { # Import parameters specific to SQL Server .BAK files |
| 436 | "encryptionOptions": { |
| 437 | "certPath": "A String", # 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. |
| 438 | "pvkPassword": "A String", # Password that encrypts the private key |
| 439 | "pvkPath": "A String", # 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 Bot | b6971b0 | 2020-11-26 17:16:03 -0800 | [diff] [blame] | 440 | }, |
Yoshi Automation Bot | 0d561ef | 2020-11-25 07:50:41 -0800 | [diff] [blame] | 441 | }, |
Yoshi Automation Bot | cc94ec8 | 2021-01-15 07:10:04 -0800 | [diff] [blame] | 442 | "csvImportOptions": { # Options for importing data as CSV. |
| 443 | "columns": [ # The columns to which CSV data is imported. If not specified, all columns of the database table are loaded with CSV data. |
| 444 | "A String", |
| 445 | ], |
| 446 | "table": "A String", # The table to which CSV data is imported. |
| 447 | }, |
| 448 | "database": "A String", # 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. |
| 449 | "fileType": "A String", # The file type for the specified uri. *SQL*: The file contains SQL statements. *CSV*: The file contains CSV data. |
| 450 | "importUser": "A String", # The PostgreSQL user for this import operation. PostgreSQL instances only. |
| 451 | "kind": "A String", # This is always *sql#importContext*. |
yoshi-code-bot | b6dc1b9 | 2021-03-02 11:49:08 -0800 | [diff] [blame] | 452 | "uri": "A String", # 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 Bot | cc94ec8 | 2021-01-15 07:10:04 -0800 | [diff] [blame] | 453 | }, |
| 454 | "insertTime": "A String", # The time this operation was enqueued in UTC timezone in RFC 3339 format, for example *2012-11-15T16:19:00.094Z*. |
| 455 | "kind": "A String", # This is always *sql#operation*. |
| 456 | "name": "A String", # An identifier that uniquely identifies the operation. You can use this identifier to retrieve the Operations resource that has information about the operation. |
| 457 | "operationType": "A String", # The type of the operation. Valid values are: *CREATE* *DELETE* *UPDATE* *RESTART* *IMPORT* *EXPORT* *BACKUP_VOLUME* *RESTORE_VOLUME* *CREATE_USER* *DELETE_USER* *CREATE_DATABASE* *DELETE_DATABASE* |
| 458 | "selfLink": "A String", # The URI of this resource. |
| 459 | "startTime": "A String", # The time this operation actually started in UTC timezone in RFC 3339 format, for example *2012-11-15T16:19:00.094Z*. |
| 460 | "status": "A String", # The status of an operation. Valid values are: *PENDING* *RUNNING* *DONE* *SQL_OPERATION_STATUS_UNSPECIFIED* |
| 461 | "targetId": "A String", # Name of the database instance related to this operation. |
| 462 | "targetLink": "A String", |
| 463 | "targetProject": "A String", # The project ID of the target instance related to this operation. |
| 464 | "user": "A String", # The email address of the user who initiated this operation. |
| 465 | }</pre> |
Craig Citro | e633be1 | 2015-03-02 13:40:36 -0800 | [diff] [blame] | 466 | </div> |
| 467 | |
| 468 | <div class="method"> |
Dan O'Meara | dd49464 | 2020-05-01 07:42:23 -0700 | [diff] [blame] | 469 | <code class="details" id="update">update(project, instance, database, body=None, x__xgafv=None)</code> |
Dmitry Frenkel | 3e17f89 | 2020-10-06 16:46:05 -0700 | [diff] [blame] | 470 | <pre>Updates a resource containing information about a database inside a Cloud SQL instance. |
Craig Citro | e633be1 | 2015-03-02 13:40:36 -0800 | [diff] [blame] | 471 | |
| 472 | Args: |
| 473 | project: string, Project ID of the project that contains the instance. (required) |
| 474 | instance: string, Database instance ID. This does not include the project ID. (required) |
| 475 | database: string, Name of the database to be updated in the instance. (required) |
Dan O'Meara | dd49464 | 2020-05-01 07:42:23 -0700 | [diff] [blame] | 476 | body: object, The request body. |
Craig Citro | e633be1 | 2015-03-02 13:40:36 -0800 | [diff] [blame] | 477 | The object takes the form of: |
| 478 | |
Bu Sun Kim | 715bd7f | 2019-06-14 16:50:42 -0700 | [diff] [blame] | 479 | { # Represents a SQL database on the Cloud SQL instance. |
Yoshi Automation Bot | cc94ec8 | 2021-01-15 07:10:04 -0800 | [diff] [blame] | 480 | "charset": "A String", # The Cloud SQL charset value. |
| 481 | "collation": "A String", # The Cloud SQL collation value. |
| 482 | "etag": "A String", # This field is deprecated and will be removed from a future version of the API. |
| 483 | "instance": "A String", # The name of the Cloud SQL instance. This does not include the project ID. |
| 484 | "kind": "A String", # This is always *sql#database*. |
| 485 | "name": "A String", # The name of the database in the Cloud SQL instance. This does not include the project ID or instance name. |
| 486 | "project": "A String", # The project ID of the project containing the Cloud SQL database. The Google apps domain is prefixed if applicable. |
| 487 | "selfLink": "A String", # The URI of this resource. |
| 488 | "sqlserverDatabaseDetails": { # Represents a Sql Server database on the Cloud SQL instance. |
| 489 | "compatibilityLevel": 42, # The version of SQL Server with which the database is to be made compatible |
| 490 | "recoveryModel": "A String", # The recovery model of a SQL Server database |
| 491 | }, |
| 492 | } |
Craig Citro | e633be1 | 2015-03-02 13:40:36 -0800 | [diff] [blame] | 493 | |
Dan O'Meara | dd49464 | 2020-05-01 07:42:23 -0700 | [diff] [blame] | 494 | x__xgafv: string, V1 error format. |
| 495 | Allowed values |
| 496 | 1 - v1 error format |
| 497 | 2 - v2 error format |
Craig Citro | e633be1 | 2015-03-02 13:40:36 -0800 | [diff] [blame] | 498 | |
| 499 | Returns: |
| 500 | An object of the form: |
| 501 | |
yoshi-code-bot | a8b35b9 | 2021-03-31 13:33:30 -0700 | [diff] [blame] | 502 | { # 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-bot | b6dc1b9 | 2021-03-02 11:49:08 -0800 | [diff] [blame] | 503 | "backupContext": { # Backup context. # The context for backup operation, if applicable. |
| 504 | "backupId": "A String", # The identifier of the backup. |
| 505 | "kind": "A String", # This is always *sql#backupContext*. |
| 506 | }, |
Yoshi Automation Bot | cc94ec8 | 2021-01-15 07:10:04 -0800 | [diff] [blame] | 507 | "endTime": "A String", # The time this operation finished in UTC timezone in RFC 3339 format, for example *2012-11-15T16:19:00.094Z*. |
| 508 | "error": { # Database instance operation errors list wrapper. # If errors occurred during processing of this operation, this field will be populated. |
| 509 | "errors": [ # The list of errors encountered while processing this operation. |
| 510 | { # Database instance operation error. |
| 511 | "code": "A String", # Identifies the specific error that occurred. |
| 512 | "kind": "A String", # This is always *sql#operationError*. |
| 513 | "message": "A String", # Additional information about the error encountered. |
| 514 | }, |
| 515 | ], |
| 516 | "kind": "A String", # This is always *sql#operationErrors*. |
| 517 | }, |
| 518 | "exportContext": { # Database instance export context. # The context for export operation, if applicable. |
yoshi-code-bot | b6dc1b9 | 2021-03-02 11:49:08 -0800 | [diff] [blame] | 519 | "csvExportOptions": { # Options for exporting data as CSV. *MySQL* and *PostgreSQL* instances only. |
Yoshi Automation Bot | cc94ec8 | 2021-01-15 07:10:04 -0800 | [diff] [blame] | 520 | "selectQuery": "A String", # The select query used to extract the data. |
Yoshi Automation Bot | 0bf565c | 2020-12-09 08:56:03 -0800 | [diff] [blame] | 521 | }, |
yoshi-code-bot | a8b35b9 | 2021-03-31 13:33:30 -0700 | [diff] [blame] | 522 | "databases": [ # 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 Bot | cc94ec8 | 2021-01-15 07:10:04 -0800 | [diff] [blame] | 523 | "A String", |
| 524 | ], |
yoshi-code-bot | b6dc1b9 | 2021-03-02 11:49:08 -0800 | [diff] [blame] | 525 | "fileType": "A String", # 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 Bot | cc94ec8 | 2021-01-15 07:10:04 -0800 | [diff] [blame] | 526 | "kind": "A String", # This is always *sql#exportContext*. |
| 527 | "offload": True or False, # Option for export offload. |
| 528 | "sqlExportOptions": { # Options for exporting data as SQL statements. |
| 529 | "mysqlExportOptions": { # Options for exporting from MySQL. |
yoshi-code-bot | b6dc1b9 | 2021-03-02 11:49:08 -0800 | [diff] [blame] | 530 | "masterData": 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 Bot | 0bf565c | 2020-12-09 08:56:03 -0800 | [diff] [blame] | 531 | }, |
Yoshi Automation Bot | cc94ec8 | 2021-01-15 07:10:04 -0800 | [diff] [blame] | 532 | "schemaOnly": True or False, # Export only schemas. |
| 533 | "tables": [ # 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 Bot | 0bf565c | 2020-12-09 08:56:03 -0800 | [diff] [blame] | 534 | "A String", |
| 535 | ], |
| 536 | }, |
yoshi-code-bot | b6dc1b9 | 2021-03-02 11:49:08 -0800 | [diff] [blame] | 537 | "uri": "A String", # The path to the file in Google Cloud Storage where the export will be stored. The URI is in the form *gs://bucketName/fileName*. If the file already exists, the request succeeds, but the operation fails. If *fileType* is *SQL* and the filename ends with .gz, the contents are compressed. |
Yoshi Automation Bot | cc94ec8 | 2021-01-15 07:10:04 -0800 | [diff] [blame] | 538 | }, |
| 539 | "importContext": { # Database instance import context. # The context for import operation, if applicable. |
| 540 | "bakImportOptions": { # Import parameters specific to SQL Server .BAK files |
| 541 | "encryptionOptions": { |
| 542 | "certPath": "A String", # 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. |
| 543 | "pvkPassword": "A String", # Password that encrypts the private key |
| 544 | "pvkPath": "A String", # 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 Bot | b6971b0 | 2020-11-26 17:16:03 -0800 | [diff] [blame] | 545 | }, |
Yoshi Automation Bot | 0d561ef | 2020-11-25 07:50:41 -0800 | [diff] [blame] | 546 | }, |
Yoshi Automation Bot | cc94ec8 | 2021-01-15 07:10:04 -0800 | [diff] [blame] | 547 | "csvImportOptions": { # Options for importing data as CSV. |
| 548 | "columns": [ # The columns to which CSV data is imported. If not specified, all columns of the database table are loaded with CSV data. |
| 549 | "A String", |
| 550 | ], |
| 551 | "table": "A String", # The table to which CSV data is imported. |
| 552 | }, |
| 553 | "database": "A String", # 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. |
| 554 | "fileType": "A String", # The file type for the specified uri. *SQL*: The file contains SQL statements. *CSV*: The file contains CSV data. |
| 555 | "importUser": "A String", # The PostgreSQL user for this import operation. PostgreSQL instances only. |
| 556 | "kind": "A String", # This is always *sql#importContext*. |
yoshi-code-bot | b6dc1b9 | 2021-03-02 11:49:08 -0800 | [diff] [blame] | 557 | "uri": "A String", # 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 Bot | cc94ec8 | 2021-01-15 07:10:04 -0800 | [diff] [blame] | 558 | }, |
| 559 | "insertTime": "A String", # The time this operation was enqueued in UTC timezone in RFC 3339 format, for example *2012-11-15T16:19:00.094Z*. |
| 560 | "kind": "A String", # This is always *sql#operation*. |
| 561 | "name": "A String", # An identifier that uniquely identifies the operation. You can use this identifier to retrieve the Operations resource that has information about the operation. |
| 562 | "operationType": "A String", # The type of the operation. Valid values are: *CREATE* *DELETE* *UPDATE* *RESTART* *IMPORT* *EXPORT* *BACKUP_VOLUME* *RESTORE_VOLUME* *CREATE_USER* *DELETE_USER* *CREATE_DATABASE* *DELETE_DATABASE* |
| 563 | "selfLink": "A String", # The URI of this resource. |
| 564 | "startTime": "A String", # The time this operation actually started in UTC timezone in RFC 3339 format, for example *2012-11-15T16:19:00.094Z*. |
| 565 | "status": "A String", # The status of an operation. Valid values are: *PENDING* *RUNNING* *DONE* *SQL_OPERATION_STATUS_UNSPECIFIED* |
| 566 | "targetId": "A String", # Name of the database instance related to this operation. |
| 567 | "targetLink": "A String", |
| 568 | "targetProject": "A String", # The project ID of the target instance related to this operation. |
| 569 | "user": "A String", # The email address of the user who initiated this operation. |
| 570 | }</pre> |
Craig Citro | e633be1 | 2015-03-02 13:40:36 -0800 | [diff] [blame] | 571 | </div> |
| 572 | |
| 573 | </body></html> |