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. |
yoshi-code-bot | 312da31 | 2021-09-21 00:22:28 -0700 | [diff] [blame] | 123 | "kind": "A String", # This is always **sql#backupContext**. |
yoshi-code-bot | b6dc1b9 | 2021-03-02 11:49:08 -0800 | [diff] [blame] | 124 | }, |
yoshi-code-bot | 312da31 | 2021-09-21 00:22:28 -0700 | [diff] [blame] | 125 | "endTime": "A String", # 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 Bot | cc94ec8 | 2021-01-15 07:10:04 -0800 | [diff] [blame] | 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. |
yoshi-code-bot | 312da31 | 2021-09-21 00:22:28 -0700 | [diff] [blame] | 130 | "kind": "A String", # This is always **sql#operationError**. |
Yoshi Automation Bot | cc94ec8 | 2021-01-15 07:10:04 -0800 | [diff] [blame] | 131 | "message": "A String", # Additional information about the error encountered. |
| 132 | }, |
| 133 | ], |
yoshi-code-bot | 312da31 | 2021-09-21 00:22:28 -0700 | [diff] [blame] | 134 | "kind": "A String", # This is always **sql#operationErrors**. |
Yoshi Automation Bot | cc94ec8 | 2021-01-15 07:10:04 -0800 | [diff] [blame] | 135 | }, |
| 136 | "exportContext": { # Database instance export context. # The context for export operation, if applicable. |
yoshi-code-bot | 312da31 | 2021-09-21 00:22:28 -0700 | [diff] [blame] | 137 | "csvExportOptions": { # Options for exporting data as CSV. **MySQL** and **PostgreSQL** instances only. |
yoshi-code-bot | 2da5ed1 | 2021-09-07 00:20:27 -0700 | [diff] [blame] | 138 | "escapeCharacter": "A String", # Specifies the character that should appear before a data character that needs to be escaped. |
| 139 | "fieldsTerminatedBy": "A String", # Specifies the character that separates columns within each row (line) of the file. |
| 140 | "linesTerminatedBy": "A String", # 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. |
| 141 | "quoteCharacter": "A String", # Specifies the quoting character to be used when a data value is quoted. |
Yoshi Automation Bot | cc94ec8 | 2021-01-15 07:10:04 -0800 | [diff] [blame] | 142 | "selectQuery": "A String", # The select query used to extract the data. |
Yoshi Automation Bot | 0bf565c | 2020-12-09 08:56:03 -0800 | [diff] [blame] | 143 | }, |
yoshi-code-bot | 815c1ac | 2021-11-15 23:24:17 -0800 | [diff] [blame] | 144 | "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] | 145 | "A String", |
| 146 | ], |
yoshi-code-bot | 815c1ac | 2021-11-15 23:24:17 -0800 | [diff] [blame] | 147 | "fileType": "A String", # The file type for the specified uri. |
yoshi-code-bot | 1c9dcfd | 2021-10-12 00:20:31 -0700 | [diff] [blame] | 148 | "kind": "A String", # This is always **sql#exportContext**. |
Yoshi Automation Bot | cc94ec8 | 2021-01-15 07:10:04 -0800 | [diff] [blame] | 149 | "offload": True or False, # Option for export offload. |
| 150 | "sqlExportOptions": { # Options for exporting data as SQL statements. |
| 151 | "mysqlExportOptions": { # Options for exporting from MySQL. |
yoshi-code-bot | 815c1ac | 2021-11-15 23:24:17 -0800 | [diff] [blame] | 152 | "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] | 153 | }, |
Yoshi Automation Bot | cc94ec8 | 2021-01-15 07:10:04 -0800 | [diff] [blame] | 154 | "schemaOnly": True or False, # Export only schemas. |
| 155 | "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] | 156 | "A String", |
| 157 | ], |
| 158 | }, |
yoshi-code-bot | 312da31 | 2021-09-21 00:22:28 -0700 | [diff] [blame] | 159 | "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] | 160 | }, |
| 161 | "importContext": { # Database instance import context. # The context for import operation, if applicable. |
| 162 | "bakImportOptions": { # Import parameters specific to SQL Server .BAK files |
| 163 | "encryptionOptions": { |
yoshi-code-bot | 312da31 | 2021-09-21 00:22:28 -0700 | [diff] [blame] | 164 | "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. |
Yoshi Automation Bot | cc94ec8 | 2021-01-15 07:10:04 -0800 | [diff] [blame] | 165 | "pvkPassword": "A String", # Password that encrypts the private key |
yoshi-code-bot | 1c9dcfd | 2021-10-12 00:20:31 -0700 | [diff] [blame] | 166 | "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] | 167 | }, |
Yoshi Automation Bot | 0d561ef | 2020-11-25 07:50:41 -0800 | [diff] [blame] | 168 | }, |
Yoshi Automation Bot | cc94ec8 | 2021-01-15 07:10:04 -0800 | [diff] [blame] | 169 | "csvImportOptions": { # Options for importing data as CSV. |
| 170 | "columns": [ # The columns to which CSV data is imported. If not specified, all columns of the database table are loaded with CSV data. |
| 171 | "A String", |
| 172 | ], |
yoshi-code-bot | 2da5ed1 | 2021-09-07 00:20:27 -0700 | [diff] [blame] | 173 | "escapeCharacter": "A String", # Specifies the character that should appear before a data character that needs to be escaped. |
| 174 | "fieldsTerminatedBy": "A String", # Specifies the character that separates columns within each row (line) of the file. |
| 175 | "linesTerminatedBy": "A String", # 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. |
| 176 | "quoteCharacter": "A String", # Specifies the quoting character to be used when a data value is quoted. |
Yoshi Automation Bot | cc94ec8 | 2021-01-15 07:10:04 -0800 | [diff] [blame] | 177 | "table": "A String", # The table to which CSV data is imported. |
| 178 | }, |
yoshi-code-bot | 312da31 | 2021-09-21 00:22:28 -0700 | [diff] [blame] | 179 | "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. |
| 180 | "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] | 181 | "importUser": "A String", # The PostgreSQL user for this import operation. PostgreSQL instances only. |
yoshi-code-bot | 312da31 | 2021-09-21 00:22:28 -0700 | [diff] [blame] | 182 | "kind": "A String", # This is always **sql#importContext**. |
| 183 | "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] | 184 | }, |
yoshi-code-bot | 312da31 | 2021-09-21 00:22:28 -0700 | [diff] [blame] | 185 | "insertTime": "A String", # 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**. |
| 186 | "kind": "A String", # This is always **sql#operation**. |
Yoshi Automation Bot | cc94ec8 | 2021-01-15 07:10:04 -0800 | [diff] [blame] | 187 | "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. |
yoshi-code-bot | 312da31 | 2021-09-21 00:22:28 -0700 | [diff] [blame] | 188 | "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** |
Yoshi Automation Bot | cc94ec8 | 2021-01-15 07:10:04 -0800 | [diff] [blame] | 189 | "selfLink": "A String", # The URI of this resource. |
yoshi-code-bot | 312da31 | 2021-09-21 00:22:28 -0700 | [diff] [blame] | 190 | "startTime": "A String", # 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**. |
yoshi-code-bot | 815c1ac | 2021-11-15 23:24:17 -0800 | [diff] [blame] | 191 | "status": "A String", # The status of an operation. |
Yoshi Automation Bot | cc94ec8 | 2021-01-15 07:10:04 -0800 | [diff] [blame] | 192 | "targetId": "A String", # Name of the database instance related to this operation. |
| 193 | "targetLink": "A String", |
| 194 | "targetProject": "A String", # The project ID of the target instance related to this operation. |
| 195 | "user": "A String", # The email address of the user who initiated this operation. |
| 196 | }</pre> |
Craig Citro | e633be1 | 2015-03-02 13:40:36 -0800 | [diff] [blame] | 197 | </div> |
| 198 | |
| 199 | <div class="method"> |
Dan O'Meara | dd49464 | 2020-05-01 07:42:23 -0700 | [diff] [blame] | 200 | <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] | 201 | <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] | 202 | |
| 203 | Args: |
| 204 | project: string, Project ID of the project that contains the instance. (required) |
| 205 | instance: string, Database instance ID. This does not include the project ID. (required) |
| 206 | database: string, Name of the database in the instance. (required) |
Dan O'Meara | dd49464 | 2020-05-01 07:42:23 -0700 | [diff] [blame] | 207 | x__xgafv: string, V1 error format. |
| 208 | Allowed values |
| 209 | 1 - v1 error format |
| 210 | 2 - v2 error format |
Craig Citro | e633be1 | 2015-03-02 13:40:36 -0800 | [diff] [blame] | 211 | |
| 212 | Returns: |
| 213 | An object of the form: |
| 214 | |
Bu Sun Kim | 715bd7f | 2019-06-14 16:50:42 -0700 | [diff] [blame] | 215 | { # Represents a SQL database on the Cloud SQL instance. |
Yoshi Automation Bot | cc94ec8 | 2021-01-15 07:10:04 -0800 | [diff] [blame] | 216 | "charset": "A String", # The Cloud SQL charset value. |
| 217 | "collation": "A String", # The Cloud SQL collation value. |
| 218 | "etag": "A String", # This field is deprecated and will be removed from a future version of the API. |
| 219 | "instance": "A String", # The name of the Cloud SQL instance. This does not include the project ID. |
yoshi-code-bot | 312da31 | 2021-09-21 00:22:28 -0700 | [diff] [blame] | 220 | "kind": "A String", # This is always **sql#database**. |
Yoshi Automation Bot | cc94ec8 | 2021-01-15 07:10:04 -0800 | [diff] [blame] | 221 | "name": "A String", # The name of the database in the Cloud SQL instance. This does not include the project ID or instance name. |
| 222 | "project": "A String", # The project ID of the project containing the Cloud SQL database. The Google apps domain is prefixed if applicable. |
| 223 | "selfLink": "A String", # The URI of this resource. |
| 224 | "sqlserverDatabaseDetails": { # Represents a Sql Server database on the Cloud SQL instance. |
| 225 | "compatibilityLevel": 42, # The version of SQL Server with which the database is to be made compatible |
| 226 | "recoveryModel": "A String", # The recovery model of a SQL Server database |
| 227 | }, |
| 228 | }</pre> |
Craig Citro | e633be1 | 2015-03-02 13:40:36 -0800 | [diff] [blame] | 229 | </div> |
| 230 | |
| 231 | <div class="method"> |
Dan O'Meara | dd49464 | 2020-05-01 07:42:23 -0700 | [diff] [blame] | 232 | <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] | 233 | <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] | 234 | |
| 235 | Args: |
| 236 | project: string, Project ID of the project that contains the instance. (required) |
| 237 | 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] | 238 | body: object, The request body. |
Craig Citro | e633be1 | 2015-03-02 13:40:36 -0800 | [diff] [blame] | 239 | The object takes the form of: |
| 240 | |
Bu Sun Kim | 715bd7f | 2019-06-14 16:50:42 -0700 | [diff] [blame] | 241 | { # Represents a SQL database on the Cloud SQL instance. |
Yoshi Automation Bot | cc94ec8 | 2021-01-15 07:10:04 -0800 | [diff] [blame] | 242 | "charset": "A String", # The Cloud SQL charset value. |
| 243 | "collation": "A String", # The Cloud SQL collation value. |
| 244 | "etag": "A String", # This field is deprecated and will be removed from a future version of the API. |
| 245 | "instance": "A String", # The name of the Cloud SQL instance. This does not include the project ID. |
yoshi-code-bot | 312da31 | 2021-09-21 00:22:28 -0700 | [diff] [blame] | 246 | "kind": "A String", # This is always **sql#database**. |
Yoshi Automation Bot | cc94ec8 | 2021-01-15 07:10:04 -0800 | [diff] [blame] | 247 | "name": "A String", # The name of the database in the Cloud SQL instance. This does not include the project ID or instance name. |
| 248 | "project": "A String", # The project ID of the project containing the Cloud SQL database. The Google apps domain is prefixed if applicable. |
| 249 | "selfLink": "A String", # The URI of this resource. |
| 250 | "sqlserverDatabaseDetails": { # Represents a Sql Server database on the Cloud SQL instance. |
| 251 | "compatibilityLevel": 42, # The version of SQL Server with which the database is to be made compatible |
| 252 | "recoveryModel": "A String", # The recovery model of a SQL Server database |
| 253 | }, |
| 254 | } |
Craig Citro | e633be1 | 2015-03-02 13:40:36 -0800 | [diff] [blame] | 255 | |
Dan O'Meara | dd49464 | 2020-05-01 07:42:23 -0700 | [diff] [blame] | 256 | x__xgafv: string, V1 error format. |
| 257 | Allowed values |
| 258 | 1 - v1 error format |
| 259 | 2 - v2 error format |
Craig Citro | e633be1 | 2015-03-02 13:40:36 -0800 | [diff] [blame] | 260 | |
| 261 | Returns: |
| 262 | An object of the form: |
| 263 | |
yoshi-code-bot | a8b35b9 | 2021-03-31 13:33:30 -0700 | [diff] [blame] | 264 | { # 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] | 265 | "backupContext": { # Backup context. # The context for backup operation, if applicable. |
| 266 | "backupId": "A String", # The identifier of the backup. |
yoshi-code-bot | 312da31 | 2021-09-21 00:22:28 -0700 | [diff] [blame] | 267 | "kind": "A String", # This is always **sql#backupContext**. |
yoshi-code-bot | b6dc1b9 | 2021-03-02 11:49:08 -0800 | [diff] [blame] | 268 | }, |
yoshi-code-bot | 312da31 | 2021-09-21 00:22:28 -0700 | [diff] [blame] | 269 | "endTime": "A String", # 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 Bot | cc94ec8 | 2021-01-15 07:10:04 -0800 | [diff] [blame] | 270 | "error": { # Database instance operation errors list wrapper. # If errors occurred during processing of this operation, this field will be populated. |
| 271 | "errors": [ # The list of errors encountered while processing this operation. |
| 272 | { # Database instance operation error. |
| 273 | "code": "A String", # Identifies the specific error that occurred. |
yoshi-code-bot | 312da31 | 2021-09-21 00:22:28 -0700 | [diff] [blame] | 274 | "kind": "A String", # This is always **sql#operationError**. |
Yoshi Automation Bot | cc94ec8 | 2021-01-15 07:10:04 -0800 | [diff] [blame] | 275 | "message": "A String", # Additional information about the error encountered. |
| 276 | }, |
| 277 | ], |
yoshi-code-bot | 312da31 | 2021-09-21 00:22:28 -0700 | [diff] [blame] | 278 | "kind": "A String", # This is always **sql#operationErrors**. |
Yoshi Automation Bot | cc94ec8 | 2021-01-15 07:10:04 -0800 | [diff] [blame] | 279 | }, |
| 280 | "exportContext": { # Database instance export context. # The context for export operation, if applicable. |
yoshi-code-bot | 312da31 | 2021-09-21 00:22:28 -0700 | [diff] [blame] | 281 | "csvExportOptions": { # Options for exporting data as CSV. **MySQL** and **PostgreSQL** instances only. |
yoshi-code-bot | 2da5ed1 | 2021-09-07 00:20:27 -0700 | [diff] [blame] | 282 | "escapeCharacter": "A String", # Specifies the character that should appear before a data character that needs to be escaped. |
| 283 | "fieldsTerminatedBy": "A String", # Specifies the character that separates columns within each row (line) of the file. |
| 284 | "linesTerminatedBy": "A String", # 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. |
| 285 | "quoteCharacter": "A String", # Specifies the quoting character to be used when a data value is quoted. |
Yoshi Automation Bot | cc94ec8 | 2021-01-15 07:10:04 -0800 | [diff] [blame] | 286 | "selectQuery": "A String", # The select query used to extract the data. |
Yoshi Automation Bot | 0bf565c | 2020-12-09 08:56:03 -0800 | [diff] [blame] | 287 | }, |
yoshi-code-bot | 815c1ac | 2021-11-15 23:24:17 -0800 | [diff] [blame] | 288 | "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] | 289 | "A String", |
| 290 | ], |
yoshi-code-bot | 815c1ac | 2021-11-15 23:24:17 -0800 | [diff] [blame] | 291 | "fileType": "A String", # The file type for the specified uri. |
yoshi-code-bot | 1c9dcfd | 2021-10-12 00:20:31 -0700 | [diff] [blame] | 292 | "kind": "A String", # This is always **sql#exportContext**. |
Yoshi Automation Bot | cc94ec8 | 2021-01-15 07:10:04 -0800 | [diff] [blame] | 293 | "offload": True or False, # Option for export offload. |
| 294 | "sqlExportOptions": { # Options for exporting data as SQL statements. |
| 295 | "mysqlExportOptions": { # Options for exporting from MySQL. |
yoshi-code-bot | 815c1ac | 2021-11-15 23:24:17 -0800 | [diff] [blame] | 296 | "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] | 297 | }, |
Yoshi Automation Bot | cc94ec8 | 2021-01-15 07:10:04 -0800 | [diff] [blame] | 298 | "schemaOnly": True or False, # Export only schemas. |
| 299 | "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] | 300 | "A String", |
| 301 | ], |
| 302 | }, |
yoshi-code-bot | 312da31 | 2021-09-21 00:22:28 -0700 | [diff] [blame] | 303 | "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] | 304 | }, |
| 305 | "importContext": { # Database instance import context. # The context for import operation, if applicable. |
| 306 | "bakImportOptions": { # Import parameters specific to SQL Server .BAK files |
| 307 | "encryptionOptions": { |
yoshi-code-bot | 312da31 | 2021-09-21 00:22:28 -0700 | [diff] [blame] | 308 | "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. |
Yoshi Automation Bot | cc94ec8 | 2021-01-15 07:10:04 -0800 | [diff] [blame] | 309 | "pvkPassword": "A String", # Password that encrypts the private key |
yoshi-code-bot | 1c9dcfd | 2021-10-12 00:20:31 -0700 | [diff] [blame] | 310 | "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] | 311 | }, |
Yoshi Automation Bot | 0d561ef | 2020-11-25 07:50:41 -0800 | [diff] [blame] | 312 | }, |
Yoshi Automation Bot | cc94ec8 | 2021-01-15 07:10:04 -0800 | [diff] [blame] | 313 | "csvImportOptions": { # Options for importing data as CSV. |
| 314 | "columns": [ # The columns to which CSV data is imported. If not specified, all columns of the database table are loaded with CSV data. |
| 315 | "A String", |
| 316 | ], |
yoshi-code-bot | 2da5ed1 | 2021-09-07 00:20:27 -0700 | [diff] [blame] | 317 | "escapeCharacter": "A String", # Specifies the character that should appear before a data character that needs to be escaped. |
| 318 | "fieldsTerminatedBy": "A String", # Specifies the character that separates columns within each row (line) of the file. |
| 319 | "linesTerminatedBy": "A String", # 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. |
| 320 | "quoteCharacter": "A String", # Specifies the quoting character to be used when a data value is quoted. |
Yoshi Automation Bot | cc94ec8 | 2021-01-15 07:10:04 -0800 | [diff] [blame] | 321 | "table": "A String", # The table to which CSV data is imported. |
| 322 | }, |
yoshi-code-bot | 312da31 | 2021-09-21 00:22:28 -0700 | [diff] [blame] | 323 | "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. |
| 324 | "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] | 325 | "importUser": "A String", # The PostgreSQL user for this import operation. PostgreSQL instances only. |
yoshi-code-bot | 312da31 | 2021-09-21 00:22:28 -0700 | [diff] [blame] | 326 | "kind": "A String", # This is always **sql#importContext**. |
| 327 | "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] | 328 | }, |
yoshi-code-bot | 312da31 | 2021-09-21 00:22:28 -0700 | [diff] [blame] | 329 | "insertTime": "A String", # 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**. |
| 330 | "kind": "A String", # This is always **sql#operation**. |
Yoshi Automation Bot | cc94ec8 | 2021-01-15 07:10:04 -0800 | [diff] [blame] | 331 | "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. |
yoshi-code-bot | 312da31 | 2021-09-21 00:22:28 -0700 | [diff] [blame] | 332 | "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** |
Yoshi Automation Bot | cc94ec8 | 2021-01-15 07:10:04 -0800 | [diff] [blame] | 333 | "selfLink": "A String", # The URI of this resource. |
yoshi-code-bot | 312da31 | 2021-09-21 00:22:28 -0700 | [diff] [blame] | 334 | "startTime": "A String", # 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**. |
yoshi-code-bot | 815c1ac | 2021-11-15 23:24:17 -0800 | [diff] [blame] | 335 | "status": "A String", # The status of an operation. |
Yoshi Automation Bot | cc94ec8 | 2021-01-15 07:10:04 -0800 | [diff] [blame] | 336 | "targetId": "A String", # Name of the database instance related to this operation. |
| 337 | "targetLink": "A String", |
| 338 | "targetProject": "A String", # The project ID of the target instance related to this operation. |
| 339 | "user": "A String", # The email address of the user who initiated this operation. |
| 340 | }</pre> |
Craig Citro | e633be1 | 2015-03-02 13:40:36 -0800 | [diff] [blame] | 341 | </div> |
| 342 | |
| 343 | <div class="method"> |
Dan O'Meara | dd49464 | 2020-05-01 07:42:23 -0700 | [diff] [blame] | 344 | <code class="details" id="list">list(project, instance, x__xgafv=None)</code> |
Craig Citro | e633be1 | 2015-03-02 13:40:36 -0800 | [diff] [blame] | 345 | <pre>Lists databases in the specified Cloud SQL instance. |
| 346 | |
| 347 | Args: |
Bu Sun Kim | 715bd7f | 2019-06-14 16:50:42 -0700 | [diff] [blame] | 348 | project: string, Project ID of the project that contains the instance. (required) |
Craig Citro | e633be1 | 2015-03-02 13:40:36 -0800 | [diff] [blame] | 349 | 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] | 350 | x__xgafv: string, V1 error format. |
| 351 | Allowed values |
| 352 | 1 - v1 error format |
| 353 | 2 - v2 error format |
Craig Citro | e633be1 | 2015-03-02 13:40:36 -0800 | [diff] [blame] | 354 | |
| 355 | Returns: |
| 356 | An object of the form: |
| 357 | |
| 358 | { # Database list response. |
Yoshi Automation Bot | cc94ec8 | 2021-01-15 07:10:04 -0800 | [diff] [blame] | 359 | "items": [ # List of database resources in the instance. |
| 360 | { # Represents a SQL database on the Cloud SQL instance. |
| 361 | "charset": "A String", # The Cloud SQL charset value. |
| 362 | "collation": "A String", # The Cloud SQL collation value. |
| 363 | "etag": "A String", # This field is deprecated and will be removed from a future version of the API. |
| 364 | "instance": "A String", # The name of the Cloud SQL instance. This does not include the project ID. |
yoshi-code-bot | 312da31 | 2021-09-21 00:22:28 -0700 | [diff] [blame] | 365 | "kind": "A String", # This is always **sql#database**. |
Yoshi Automation Bot | cc94ec8 | 2021-01-15 07:10:04 -0800 | [diff] [blame] | 366 | "name": "A String", # The name of the database in the Cloud SQL instance. This does not include the project ID or instance name. |
| 367 | "project": "A String", # The project ID of the project containing the Cloud SQL database. The Google apps domain is prefixed if applicable. |
| 368 | "selfLink": "A String", # The URI of this resource. |
| 369 | "sqlserverDatabaseDetails": { # Represents a Sql Server database on the Cloud SQL instance. |
| 370 | "compatibilityLevel": 42, # The version of SQL Server with which the database is to be made compatible |
| 371 | "recoveryModel": "A String", # The recovery model of a SQL Server database |
| 372 | }, |
| 373 | }, |
| 374 | ], |
yoshi-code-bot | 1c9dcfd | 2021-10-12 00:20:31 -0700 | [diff] [blame] | 375 | "kind": "A String", # This is always **sql#databasesList**. |
Yoshi Automation Bot | cc94ec8 | 2021-01-15 07:10:04 -0800 | [diff] [blame] | 376 | }</pre> |
Craig Citro | e633be1 | 2015-03-02 13:40:36 -0800 | [diff] [blame] | 377 | </div> |
| 378 | |
| 379 | <div class="method"> |
Dan O'Meara | dd49464 | 2020-05-01 07:42:23 -0700 | [diff] [blame] | 380 | <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] | 381 | <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] | 382 | |
| 383 | Args: |
| 384 | project: string, Project ID of the project that contains the instance. (required) |
| 385 | instance: string, Database instance ID. This does not include the project ID. (required) |
| 386 | 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] | 387 | body: object, The request body. |
Craig Citro | e633be1 | 2015-03-02 13:40:36 -0800 | [diff] [blame] | 388 | The object takes the form of: |
| 389 | |
Bu Sun Kim | 715bd7f | 2019-06-14 16:50:42 -0700 | [diff] [blame] | 390 | { # Represents a SQL database on the Cloud SQL instance. |
Yoshi Automation Bot | cc94ec8 | 2021-01-15 07:10:04 -0800 | [diff] [blame] | 391 | "charset": "A String", # The Cloud SQL charset value. |
| 392 | "collation": "A String", # The Cloud SQL collation value. |
| 393 | "etag": "A String", # This field is deprecated and will be removed from a future version of the API. |
| 394 | "instance": "A String", # The name of the Cloud SQL instance. This does not include the project ID. |
yoshi-code-bot | 312da31 | 2021-09-21 00:22:28 -0700 | [diff] [blame] | 395 | "kind": "A String", # This is always **sql#database**. |
Yoshi Automation Bot | cc94ec8 | 2021-01-15 07:10:04 -0800 | [diff] [blame] | 396 | "name": "A String", # The name of the database in the Cloud SQL instance. This does not include the project ID or instance name. |
| 397 | "project": "A String", # The project ID of the project containing the Cloud SQL database. The Google apps domain is prefixed if applicable. |
| 398 | "selfLink": "A String", # The URI of this resource. |
| 399 | "sqlserverDatabaseDetails": { # Represents a Sql Server database on the Cloud SQL instance. |
| 400 | "compatibilityLevel": 42, # The version of SQL Server with which the database is to be made compatible |
| 401 | "recoveryModel": "A String", # The recovery model of a SQL Server database |
| 402 | }, |
| 403 | } |
Craig Citro | e633be1 | 2015-03-02 13:40:36 -0800 | [diff] [blame] | 404 | |
Dan O'Meara | dd49464 | 2020-05-01 07:42:23 -0700 | [diff] [blame] | 405 | x__xgafv: string, V1 error format. |
| 406 | Allowed values |
| 407 | 1 - v1 error format |
| 408 | 2 - v2 error format |
Craig Citro | e633be1 | 2015-03-02 13:40:36 -0800 | [diff] [blame] | 409 | |
| 410 | Returns: |
| 411 | An object of the form: |
| 412 | |
yoshi-code-bot | a8b35b9 | 2021-03-31 13:33:30 -0700 | [diff] [blame] | 413 | { # 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] | 414 | "backupContext": { # Backup context. # The context for backup operation, if applicable. |
| 415 | "backupId": "A String", # The identifier of the backup. |
yoshi-code-bot | 312da31 | 2021-09-21 00:22:28 -0700 | [diff] [blame] | 416 | "kind": "A String", # This is always **sql#backupContext**. |
yoshi-code-bot | b6dc1b9 | 2021-03-02 11:49:08 -0800 | [diff] [blame] | 417 | }, |
yoshi-code-bot | 312da31 | 2021-09-21 00:22:28 -0700 | [diff] [blame] | 418 | "endTime": "A String", # 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 Bot | cc94ec8 | 2021-01-15 07:10:04 -0800 | [diff] [blame] | 419 | "error": { # Database instance operation errors list wrapper. # If errors occurred during processing of this operation, this field will be populated. |
| 420 | "errors": [ # The list of errors encountered while processing this operation. |
| 421 | { # Database instance operation error. |
| 422 | "code": "A String", # Identifies the specific error that occurred. |
yoshi-code-bot | 312da31 | 2021-09-21 00:22:28 -0700 | [diff] [blame] | 423 | "kind": "A String", # This is always **sql#operationError**. |
Yoshi Automation Bot | cc94ec8 | 2021-01-15 07:10:04 -0800 | [diff] [blame] | 424 | "message": "A String", # Additional information about the error encountered. |
| 425 | }, |
| 426 | ], |
yoshi-code-bot | 312da31 | 2021-09-21 00:22:28 -0700 | [diff] [blame] | 427 | "kind": "A String", # This is always **sql#operationErrors**. |
Yoshi Automation Bot | cc94ec8 | 2021-01-15 07:10:04 -0800 | [diff] [blame] | 428 | }, |
| 429 | "exportContext": { # Database instance export context. # The context for export operation, if applicable. |
yoshi-code-bot | 312da31 | 2021-09-21 00:22:28 -0700 | [diff] [blame] | 430 | "csvExportOptions": { # Options for exporting data as CSV. **MySQL** and **PostgreSQL** instances only. |
yoshi-code-bot | 2da5ed1 | 2021-09-07 00:20:27 -0700 | [diff] [blame] | 431 | "escapeCharacter": "A String", # Specifies the character that should appear before a data character that needs to be escaped. |
| 432 | "fieldsTerminatedBy": "A String", # Specifies the character that separates columns within each row (line) of the file. |
| 433 | "linesTerminatedBy": "A String", # 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. |
| 434 | "quoteCharacter": "A String", # Specifies the quoting character to be used when a data value is quoted. |
Yoshi Automation Bot | cc94ec8 | 2021-01-15 07:10:04 -0800 | [diff] [blame] | 435 | "selectQuery": "A String", # The select query used to extract the data. |
Yoshi Automation Bot | 0bf565c | 2020-12-09 08:56:03 -0800 | [diff] [blame] | 436 | }, |
yoshi-code-bot | 815c1ac | 2021-11-15 23:24:17 -0800 | [diff] [blame] | 437 | "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] | 438 | "A String", |
| 439 | ], |
yoshi-code-bot | 815c1ac | 2021-11-15 23:24:17 -0800 | [diff] [blame] | 440 | "fileType": "A String", # The file type for the specified uri. |
yoshi-code-bot | 1c9dcfd | 2021-10-12 00:20:31 -0700 | [diff] [blame] | 441 | "kind": "A String", # This is always **sql#exportContext**. |
Yoshi Automation Bot | cc94ec8 | 2021-01-15 07:10:04 -0800 | [diff] [blame] | 442 | "offload": True or False, # Option for export offload. |
| 443 | "sqlExportOptions": { # Options for exporting data as SQL statements. |
| 444 | "mysqlExportOptions": { # Options for exporting from MySQL. |
yoshi-code-bot | 815c1ac | 2021-11-15 23:24:17 -0800 | [diff] [blame] | 445 | "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] | 446 | }, |
Yoshi Automation Bot | cc94ec8 | 2021-01-15 07:10:04 -0800 | [diff] [blame] | 447 | "schemaOnly": True or False, # Export only schemas. |
| 448 | "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] | 449 | "A String", |
| 450 | ], |
| 451 | }, |
yoshi-code-bot | 312da31 | 2021-09-21 00:22:28 -0700 | [diff] [blame] | 452 | "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] | 453 | }, |
| 454 | "importContext": { # Database instance import context. # The context for import operation, if applicable. |
| 455 | "bakImportOptions": { # Import parameters specific to SQL Server .BAK files |
| 456 | "encryptionOptions": { |
yoshi-code-bot | 312da31 | 2021-09-21 00:22:28 -0700 | [diff] [blame] | 457 | "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. |
Yoshi Automation Bot | cc94ec8 | 2021-01-15 07:10:04 -0800 | [diff] [blame] | 458 | "pvkPassword": "A String", # Password that encrypts the private key |
yoshi-code-bot | 1c9dcfd | 2021-10-12 00:20:31 -0700 | [diff] [blame] | 459 | "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] | 460 | }, |
Yoshi Automation Bot | 0d561ef | 2020-11-25 07:50:41 -0800 | [diff] [blame] | 461 | }, |
Yoshi Automation Bot | cc94ec8 | 2021-01-15 07:10:04 -0800 | [diff] [blame] | 462 | "csvImportOptions": { # Options for importing data as CSV. |
| 463 | "columns": [ # The columns to which CSV data is imported. If not specified, all columns of the database table are loaded with CSV data. |
| 464 | "A String", |
| 465 | ], |
yoshi-code-bot | 2da5ed1 | 2021-09-07 00:20:27 -0700 | [diff] [blame] | 466 | "escapeCharacter": "A String", # Specifies the character that should appear before a data character that needs to be escaped. |
| 467 | "fieldsTerminatedBy": "A String", # Specifies the character that separates columns within each row (line) of the file. |
| 468 | "linesTerminatedBy": "A String", # 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. |
| 469 | "quoteCharacter": "A String", # Specifies the quoting character to be used when a data value is quoted. |
Yoshi Automation Bot | cc94ec8 | 2021-01-15 07:10:04 -0800 | [diff] [blame] | 470 | "table": "A String", # The table to which CSV data is imported. |
| 471 | }, |
yoshi-code-bot | 312da31 | 2021-09-21 00:22:28 -0700 | [diff] [blame] | 472 | "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. |
| 473 | "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] | 474 | "importUser": "A String", # The PostgreSQL user for this import operation. PostgreSQL instances only. |
yoshi-code-bot | 312da31 | 2021-09-21 00:22:28 -0700 | [diff] [blame] | 475 | "kind": "A String", # This is always **sql#importContext**. |
| 476 | "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] | 477 | }, |
yoshi-code-bot | 312da31 | 2021-09-21 00:22:28 -0700 | [diff] [blame] | 478 | "insertTime": "A String", # 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**. |
| 479 | "kind": "A String", # This is always **sql#operation**. |
Yoshi Automation Bot | cc94ec8 | 2021-01-15 07:10:04 -0800 | [diff] [blame] | 480 | "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. |
yoshi-code-bot | 312da31 | 2021-09-21 00:22:28 -0700 | [diff] [blame] | 481 | "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** |
Yoshi Automation Bot | cc94ec8 | 2021-01-15 07:10:04 -0800 | [diff] [blame] | 482 | "selfLink": "A String", # The URI of this resource. |
yoshi-code-bot | 312da31 | 2021-09-21 00:22:28 -0700 | [diff] [blame] | 483 | "startTime": "A String", # 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**. |
yoshi-code-bot | 815c1ac | 2021-11-15 23:24:17 -0800 | [diff] [blame] | 484 | "status": "A String", # The status of an operation. |
Yoshi Automation Bot | cc94ec8 | 2021-01-15 07:10:04 -0800 | [diff] [blame] | 485 | "targetId": "A String", # Name of the database instance related to this operation. |
| 486 | "targetLink": "A String", |
| 487 | "targetProject": "A String", # The project ID of the target instance related to this operation. |
| 488 | "user": "A String", # The email address of the user who initiated this operation. |
| 489 | }</pre> |
Craig Citro | e633be1 | 2015-03-02 13:40:36 -0800 | [diff] [blame] | 490 | </div> |
| 491 | |
| 492 | <div class="method"> |
Dan O'Meara | dd49464 | 2020-05-01 07:42:23 -0700 | [diff] [blame] | 493 | <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] | 494 | <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] | 495 | |
| 496 | Args: |
| 497 | project: string, Project ID of the project that contains the instance. (required) |
| 498 | instance: string, Database instance ID. This does not include the project ID. (required) |
| 499 | 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] | 500 | body: object, The request body. |
Craig Citro | e633be1 | 2015-03-02 13:40:36 -0800 | [diff] [blame] | 501 | The object takes the form of: |
| 502 | |
Bu Sun Kim | 715bd7f | 2019-06-14 16:50:42 -0700 | [diff] [blame] | 503 | { # Represents a SQL database on the Cloud SQL instance. |
Yoshi Automation Bot | cc94ec8 | 2021-01-15 07:10:04 -0800 | [diff] [blame] | 504 | "charset": "A String", # The Cloud SQL charset value. |
| 505 | "collation": "A String", # The Cloud SQL collation value. |
| 506 | "etag": "A String", # This field is deprecated and will be removed from a future version of the API. |
| 507 | "instance": "A String", # The name of the Cloud SQL instance. This does not include the project ID. |
yoshi-code-bot | 312da31 | 2021-09-21 00:22:28 -0700 | [diff] [blame] | 508 | "kind": "A String", # This is always **sql#database**. |
Yoshi Automation Bot | cc94ec8 | 2021-01-15 07:10:04 -0800 | [diff] [blame] | 509 | "name": "A String", # The name of the database in the Cloud SQL instance. This does not include the project ID or instance name. |
| 510 | "project": "A String", # The project ID of the project containing the Cloud SQL database. The Google apps domain is prefixed if applicable. |
| 511 | "selfLink": "A String", # The URI of this resource. |
| 512 | "sqlserverDatabaseDetails": { # Represents a Sql Server database on the Cloud SQL instance. |
| 513 | "compatibilityLevel": 42, # The version of SQL Server with which the database is to be made compatible |
| 514 | "recoveryModel": "A String", # The recovery model of a SQL Server database |
| 515 | }, |
| 516 | } |
Craig Citro | e633be1 | 2015-03-02 13:40:36 -0800 | [diff] [blame] | 517 | |
Dan O'Meara | dd49464 | 2020-05-01 07:42:23 -0700 | [diff] [blame] | 518 | x__xgafv: string, V1 error format. |
| 519 | Allowed values |
| 520 | 1 - v1 error format |
| 521 | 2 - v2 error format |
Craig Citro | e633be1 | 2015-03-02 13:40:36 -0800 | [diff] [blame] | 522 | |
| 523 | Returns: |
| 524 | An object of the form: |
| 525 | |
yoshi-code-bot | a8b35b9 | 2021-03-31 13:33:30 -0700 | [diff] [blame] | 526 | { # 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] | 527 | "backupContext": { # Backup context. # The context for backup operation, if applicable. |
| 528 | "backupId": "A String", # The identifier of the backup. |
yoshi-code-bot | 312da31 | 2021-09-21 00:22:28 -0700 | [diff] [blame] | 529 | "kind": "A String", # This is always **sql#backupContext**. |
yoshi-code-bot | b6dc1b9 | 2021-03-02 11:49:08 -0800 | [diff] [blame] | 530 | }, |
yoshi-code-bot | 312da31 | 2021-09-21 00:22:28 -0700 | [diff] [blame] | 531 | "endTime": "A String", # 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 Bot | cc94ec8 | 2021-01-15 07:10:04 -0800 | [diff] [blame] | 532 | "error": { # Database instance operation errors list wrapper. # If errors occurred during processing of this operation, this field will be populated. |
| 533 | "errors": [ # The list of errors encountered while processing this operation. |
| 534 | { # Database instance operation error. |
| 535 | "code": "A String", # Identifies the specific error that occurred. |
yoshi-code-bot | 312da31 | 2021-09-21 00:22:28 -0700 | [diff] [blame] | 536 | "kind": "A String", # This is always **sql#operationError**. |
Yoshi Automation Bot | cc94ec8 | 2021-01-15 07:10:04 -0800 | [diff] [blame] | 537 | "message": "A String", # Additional information about the error encountered. |
| 538 | }, |
| 539 | ], |
yoshi-code-bot | 312da31 | 2021-09-21 00:22:28 -0700 | [diff] [blame] | 540 | "kind": "A String", # This is always **sql#operationErrors**. |
Yoshi Automation Bot | cc94ec8 | 2021-01-15 07:10:04 -0800 | [diff] [blame] | 541 | }, |
| 542 | "exportContext": { # Database instance export context. # The context for export operation, if applicable. |
yoshi-code-bot | 312da31 | 2021-09-21 00:22:28 -0700 | [diff] [blame] | 543 | "csvExportOptions": { # Options for exporting data as CSV. **MySQL** and **PostgreSQL** instances only. |
yoshi-code-bot | 2da5ed1 | 2021-09-07 00:20:27 -0700 | [diff] [blame] | 544 | "escapeCharacter": "A String", # Specifies the character that should appear before a data character that needs to be escaped. |
| 545 | "fieldsTerminatedBy": "A String", # Specifies the character that separates columns within each row (line) of the file. |
| 546 | "linesTerminatedBy": "A String", # 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. |
| 547 | "quoteCharacter": "A String", # Specifies the quoting character to be used when a data value is quoted. |
Yoshi Automation Bot | cc94ec8 | 2021-01-15 07:10:04 -0800 | [diff] [blame] | 548 | "selectQuery": "A String", # The select query used to extract the data. |
Yoshi Automation Bot | 0bf565c | 2020-12-09 08:56:03 -0800 | [diff] [blame] | 549 | }, |
yoshi-code-bot | 815c1ac | 2021-11-15 23:24:17 -0800 | [diff] [blame] | 550 | "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] | 551 | "A String", |
| 552 | ], |
yoshi-code-bot | 815c1ac | 2021-11-15 23:24:17 -0800 | [diff] [blame] | 553 | "fileType": "A String", # The file type for the specified uri. |
yoshi-code-bot | 1c9dcfd | 2021-10-12 00:20:31 -0700 | [diff] [blame] | 554 | "kind": "A String", # This is always **sql#exportContext**. |
Yoshi Automation Bot | cc94ec8 | 2021-01-15 07:10:04 -0800 | [diff] [blame] | 555 | "offload": True or False, # Option for export offload. |
| 556 | "sqlExportOptions": { # Options for exporting data as SQL statements. |
| 557 | "mysqlExportOptions": { # Options for exporting from MySQL. |
yoshi-code-bot | 815c1ac | 2021-11-15 23:24:17 -0800 | [diff] [blame] | 558 | "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] | 559 | }, |
Yoshi Automation Bot | cc94ec8 | 2021-01-15 07:10:04 -0800 | [diff] [blame] | 560 | "schemaOnly": True or False, # Export only schemas. |
| 561 | "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] | 562 | "A String", |
| 563 | ], |
| 564 | }, |
yoshi-code-bot | 312da31 | 2021-09-21 00:22:28 -0700 | [diff] [blame] | 565 | "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] | 566 | }, |
| 567 | "importContext": { # Database instance import context. # The context for import operation, if applicable. |
| 568 | "bakImportOptions": { # Import parameters specific to SQL Server .BAK files |
| 569 | "encryptionOptions": { |
yoshi-code-bot | 312da31 | 2021-09-21 00:22:28 -0700 | [diff] [blame] | 570 | "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. |
Yoshi Automation Bot | cc94ec8 | 2021-01-15 07:10:04 -0800 | [diff] [blame] | 571 | "pvkPassword": "A String", # Password that encrypts the private key |
yoshi-code-bot | 1c9dcfd | 2021-10-12 00:20:31 -0700 | [diff] [blame] | 572 | "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] | 573 | }, |
Yoshi Automation Bot | 0d561ef | 2020-11-25 07:50:41 -0800 | [diff] [blame] | 574 | }, |
Yoshi Automation Bot | cc94ec8 | 2021-01-15 07:10:04 -0800 | [diff] [blame] | 575 | "csvImportOptions": { # Options for importing data as CSV. |
| 576 | "columns": [ # The columns to which CSV data is imported. If not specified, all columns of the database table are loaded with CSV data. |
| 577 | "A String", |
| 578 | ], |
yoshi-code-bot | 2da5ed1 | 2021-09-07 00:20:27 -0700 | [diff] [blame] | 579 | "escapeCharacter": "A String", # Specifies the character that should appear before a data character that needs to be escaped. |
| 580 | "fieldsTerminatedBy": "A String", # Specifies the character that separates columns within each row (line) of the file. |
| 581 | "linesTerminatedBy": "A String", # 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. |
| 582 | "quoteCharacter": "A String", # Specifies the quoting character to be used when a data value is quoted. |
Yoshi Automation Bot | cc94ec8 | 2021-01-15 07:10:04 -0800 | [diff] [blame] | 583 | "table": "A String", # The table to which CSV data is imported. |
| 584 | }, |
yoshi-code-bot | 312da31 | 2021-09-21 00:22:28 -0700 | [diff] [blame] | 585 | "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. |
| 586 | "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] | 587 | "importUser": "A String", # The PostgreSQL user for this import operation. PostgreSQL instances only. |
yoshi-code-bot | 312da31 | 2021-09-21 00:22:28 -0700 | [diff] [blame] | 588 | "kind": "A String", # This is always **sql#importContext**. |
| 589 | "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] | 590 | }, |
yoshi-code-bot | 312da31 | 2021-09-21 00:22:28 -0700 | [diff] [blame] | 591 | "insertTime": "A String", # 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**. |
| 592 | "kind": "A String", # This is always **sql#operation**. |
Yoshi Automation Bot | cc94ec8 | 2021-01-15 07:10:04 -0800 | [diff] [blame] | 593 | "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. |
yoshi-code-bot | 312da31 | 2021-09-21 00:22:28 -0700 | [diff] [blame] | 594 | "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** |
Yoshi Automation Bot | cc94ec8 | 2021-01-15 07:10:04 -0800 | [diff] [blame] | 595 | "selfLink": "A String", # The URI of this resource. |
yoshi-code-bot | 312da31 | 2021-09-21 00:22:28 -0700 | [diff] [blame] | 596 | "startTime": "A String", # 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**. |
yoshi-code-bot | 815c1ac | 2021-11-15 23:24:17 -0800 | [diff] [blame] | 597 | "status": "A String", # The status of an operation. |
Yoshi Automation Bot | cc94ec8 | 2021-01-15 07:10:04 -0800 | [diff] [blame] | 598 | "targetId": "A String", # Name of the database instance related to this operation. |
| 599 | "targetLink": "A String", |
| 600 | "targetProject": "A String", # The project ID of the target instance related to this operation. |
| 601 | "user": "A String", # The email address of the user who initiated this operation. |
| 602 | }</pre> |
Craig Citro | e633be1 | 2015-03-02 13:40:36 -0800 | [diff] [blame] | 603 | </div> |
| 604 | |
| 605 | </body></html> |