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"> |
Dan O'Meara | dd49464 | 2020-05-01 07:42:23 -0700 | [diff] [blame] | 78 | <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] | 79 | <p class="firstline">Deletes a database from a Cloud SQL instance.</p> |
Craig Citro | e633be1 | 2015-03-02 13:40:36 -0800 | [diff] [blame] | 80 | <p class="toc_element"> |
Dan O'Meara | dd49464 | 2020-05-01 07:42:23 -0700 | [diff] [blame] | 81 | <code><a href="#get">get(project, instance, database, x__xgafv=None)</a></code></p> |
| 82 | <p class="firstline">Retrieves a resource containing information about a database inside a Cloud</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="#insert">insert(project, instance, body=None, x__xgafv=None)</a></code></p> |
| 85 | <p class="firstline">Inserts a resource containing information about a database inside a Cloud</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="#list">list(project, instance, x__xgafv=None)</a></code></p> |
Craig Citro | e633be1 | 2015-03-02 13:40:36 -0800 | [diff] [blame] | 88 | <p class="firstline">Lists databases in the specified Cloud SQL instance.</p> |
| 89 | <p class="toc_element"> |
Dan O'Meara | dd49464 | 2020-05-01 07:42:23 -0700 | [diff] [blame] | 90 | <code><a href="#patch">patch(project, instance, database, body=None, x__xgafv=None)</a></code></p> |
| 91 | <p class="firstline">Partially updates a resource containing information about a database inside</p> |
Craig Citro | e633be1 | 2015-03-02 13:40:36 -0800 | [diff] [blame] | 92 | <p class="toc_element"> |
Dan O'Meara | dd49464 | 2020-05-01 07:42:23 -0700 | [diff] [blame] | 93 | <code><a href="#update">update(project, instance, database, body=None, x__xgafv=None)</a></code></p> |
| 94 | <p class="firstline">Updates a resource containing information about a database inside a Cloud</p> |
Craig Citro | e633be1 | 2015-03-02 13:40:36 -0800 | [diff] [blame] | 95 | <h3>Method Details</h3> |
| 96 | <div class="method"> |
Dan O'Meara | dd49464 | 2020-05-01 07:42:23 -0700 | [diff] [blame] | 97 | <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] | 98 | <pre>Deletes a database from a Cloud SQL instance. |
Craig Citro | e633be1 | 2015-03-02 13:40:36 -0800 | [diff] [blame] | 99 | |
| 100 | Args: |
| 101 | project: string, Project ID of the project that contains the instance. (required) |
| 102 | instance: string, Database instance ID. This does not include the project ID. (required) |
| 103 | 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] | 104 | x__xgafv: string, V1 error format. |
| 105 | Allowed values |
| 106 | 1 - v1 error format |
| 107 | 2 - v2 error format |
Craig Citro | e633be1 | 2015-03-02 13:40:36 -0800 | [diff] [blame] | 108 | |
| 109 | Returns: |
| 110 | An object of the form: |
| 111 | |
Dan O'Meara | dd49464 | 2020-05-01 07:42:23 -0700 | [diff] [blame] | 112 | { # An Operation resource.&nbsp;For successful operations that return an |
| 113 | # Operation resource, only the fields relevant to the operation are populated |
| 114 | # in the resource. |
Bu Sun Kim | 6502091 | 2020-05-20 12:08:20 -0700 | [diff] [blame^] | 115 | "endTime": "A String", # The time this operation finished in UTC timezone in <a |
| 116 | # href="https://tools.ietf.org/html/rfc3339">RFC 3339</a> format, for example |
| 117 | # <code>2012-11-15T16:19:00.094Z</code>. |
| 118 | "startTime": "A String", # The time this operation actually started in UTC timezone in <a |
| 119 | # href="https://tools.ietf.org/html/rfc3339">RFC 3339</a> format, for example |
| 120 | # <code>2012-11-15T16:19:00.094Z</code>. |
| 121 | "insertTime": "A String", # The time this operation was enqueued in UTC timezone in <a |
| 122 | # href="https://tools.ietf.org/html/rfc3339">RFC 3339</a> format, for example |
| 123 | # <code>2012-11-15T16:19:00.094Z</code>. |
| 124 | "user": "A String", # The email address of the user who initiated this operation. |
| 125 | "targetProject": "A String", # The project ID of the target instance related to this operation. |
| 126 | "selfLink": "A String", # The URI of this resource. |
| 127 | "targetLink": "A String", |
| 128 | "operationType": "A String", # The type of the operation. Valid values are <code>CREATE</code>, |
| 129 | # <code>DELETE</code>, <code>UPDATE</code>, <code>RESTART</code>, |
| 130 | # <code>IMPORT</code>, <code>EXPORT</code>, <code>BACKUP_VOLUME</code>, |
| 131 | # <code>RESTORE_VOLUME</code>, <code>CREATE_USER</code>, |
| 132 | # <code>DELETE_USER</code>, <code>CREATE_DATABASE</code>, |
| 133 | # <code>DELETE_DATABASE</code> . |
| 134 | "error": { # Database instance operation errors list wrapper. # If errors occurred during processing of this operation, this field will be |
| 135 | # populated. |
| 136 | "errors": [ # The list of errors encountered while processing this operation. |
| 137 | { # Database instance operation error. |
| 138 | "kind": "A String", # This is always <code>sql#operationError</code>. |
| 139 | "code": "A String", # Identifies the specific error that occurred. |
| 140 | "message": "A String", # Additional information about the error encountered. |
Dan O'Meara | dd49464 | 2020-05-01 07:42:23 -0700 | [diff] [blame] | 141 | }, |
Bu Sun Kim | 6502091 | 2020-05-20 12:08:20 -0700 | [diff] [blame^] | 142 | ], |
| 143 | "kind": "A String", # This is always <code>sql#operationErrors</code>. |
| 144 | }, |
| 145 | "kind": "A String", # This is always <code>sql#operation</code>. |
| 146 | "importContext": { # Database instance import context. # The context for import operation, if applicable. |
| 147 | "kind": "A String", # This is always <code>sql#importContext</code>. |
| 148 | "csvImportOptions": { # Options for importing data as CSV. |
| 149 | "table": "A String", # The table to which CSV data is imported. |
| 150 | "columns": [ # The columns to which CSV data is imported. If not specified, all columns |
| 151 | # of the database table are loaded with CSV data. |
| 152 | "A String", |
| 153 | ], |
Dan O'Meara | dd49464 | 2020-05-01 07:42:23 -0700 | [diff] [blame] | 154 | }, |
Bu Sun Kim | 6502091 | 2020-05-20 12:08:20 -0700 | [diff] [blame^] | 155 | "database": "A String", # The target database for the import. If <code>fileType</code> is |
Dan O'Meara | dd49464 | 2020-05-01 07:42:23 -0700 | [diff] [blame] | 156 | # <code>SQL</code>, this field is required only if the import file does not |
| 157 | # specify a database, and is overridden by any database specification in the |
| 158 | # import file. If <code>fileType</code> is <code>CSV</code>, one database |
| 159 | # must be specified. |
Bu Sun Kim | 6502091 | 2020-05-20 12:08:20 -0700 | [diff] [blame^] | 160 | "importUser": "A String", # The PostgreSQL user for this import operation. PostgreSQL instances only. |
| 161 | "bakImportOptions": { # Import parameters specific to SQL Server .BAK files |
| 162 | "encryptionOptions": { |
| 163 | "certPath": "A String", # Path to the Certificate (.cer) in Cloud Storage, in the form |
| 164 | # <code>gs://bucketName/fileName</code>. The instance must have |
| 165 | # write permissions to the bucket and read access to the file. |
| 166 | "pvkPath": "A String", # Path to the Certificate Private Key (.pvk) in Cloud Storage, in the |
| 167 | # form <code>gs://bucketName/fileName</code>. The instance must have |
| 168 | # write permissions to the bucket and read access to the file. |
| 169 | "pvkPassword": "A String", # Password that encrypts the private key |
| 170 | }, |
| 171 | }, |
| 172 | "uri": "A String", # Path to the import file in Cloud Storage, in the form |
Dan O'Meara | dd49464 | 2020-05-01 07:42:23 -0700 | [diff] [blame] | 173 | # <code>gs: |
| 174 | # //bucketName/fileName</code>. Compressed gzip files (.gz) are supported |
| 175 | # // when <code>fileType</code> is <code>SQL</code>. The instance must have |
| 176 | # // write permissions to the bucket and read access to the file. |
Bu Sun Kim | 6502091 | 2020-05-20 12:08:20 -0700 | [diff] [blame^] | 177 | "fileType": "A String", # The file type for the specified uri. <br><code>SQL</code>: The file |
| 178 | # contains SQL statements. <br><code>CSV</code>: The file contains CSV data. |
Craig Citro | e633be1 | 2015-03-02 13:40:36 -0800 | [diff] [blame] | 179 | }, |
Bu Sun Kim | 6502091 | 2020-05-20 12:08:20 -0700 | [diff] [blame^] | 180 | "status": "A String", # The status of an operation. Valid values are <code>PENDING</code>, |
| 181 | # <code>RUNNING</code>, <code>DONE</code>, |
| 182 | # <code>SQL_OPERATION_STATUS_UNSPECIFIED</code>. |
| 183 | "name": "A String", # An identifier that uniquely identifies the operation. You can use this |
Dan O'Meara | dd49464 | 2020-05-01 07:42:23 -0700 | [diff] [blame] | 184 | # identifier to retrieve the Operations resource that has information about |
| 185 | # the operation. |
Bu Sun Kim | 6502091 | 2020-05-20 12:08:20 -0700 | [diff] [blame^] | 186 | "exportContext": { # Database instance export context. # The context for export operation, if applicable. |
| 187 | "databases": [ # Databases to be exported. <br /> <b>MySQL instances:</b> If |
Dan O'Meara | dd49464 | 2020-05-01 07:42:23 -0700 | [diff] [blame] | 188 | # <code>fileType</code> is <code>SQL</code> and no database is specified, all |
| 189 | # databases are exported, except for the <code>mysql</code> system database. |
| 190 | # If <code>fileType</code> is <code>CSV</code>, you can specify one database, |
| 191 | # either by using this property or by using the |
| 192 | # <code>csvExportOptions.selectQuery</code> property, which takes precedence |
| 193 | # over this property. <br /> <b>PostgreSQL instances:</b> You must specify |
| 194 | # one database to be exported. If <code>fileType</code> is <code>CSV</code>, |
| 195 | # this database must match the one specified in the |
| 196 | # <code>csvExportOptions.selectQuery</code> property. |
Bu Sun Kim | 6502091 | 2020-05-20 12:08:20 -0700 | [diff] [blame^] | 197 | "A String", |
Craig Citro | e633be1 | 2015-03-02 13:40:36 -0800 | [diff] [blame] | 198 | ], |
Bu Sun Kim | 6502091 | 2020-05-20 12:08:20 -0700 | [diff] [blame^] | 199 | "sqlExportOptions": { # Options for exporting data as SQL statements. |
| 200 | "tables": [ # Tables to export, or that were exported, from the specified database. If |
Dan O'Meara | dd49464 | 2020-05-01 07:42:23 -0700 | [diff] [blame] | 201 | # you specify tables, specify one and only one database. For PostgreSQL |
| 202 | # instances, you can specify only one table. |
Bu Sun Kim | 6502091 | 2020-05-20 12:08:20 -0700 | [diff] [blame^] | 203 | "A String", |
Craig Citro | e633be1 | 2015-03-02 13:40:36 -0800 | [diff] [blame] | 204 | ], |
Bu Sun Kim | 6502091 | 2020-05-20 12:08:20 -0700 | [diff] [blame^] | 205 | "schemaOnly": True or False, # Export only schemas. |
| 206 | "mysqlExportOptions": { # Options for exporting from MySQL. |
| 207 | "masterData": 42, # Option to include SQL statement required to set up replication. |
Dan O'Meara | dd49464 | 2020-05-01 07:42:23 -0700 | [diff] [blame] | 208 | # If set to <code>1</code>, the dump file includes |
| 209 | # a CHANGE MASTER TO statement with the binary log coordinates. |
| 210 | # If set to <code>2</code>, the CHANGE MASTER TO statement is written as |
| 211 | # a SQL comment, and has no effect. |
| 212 | # All other values are ignored. |
Bu Sun Kim | 715bd7f | 2019-06-14 16:50:42 -0700 | [diff] [blame] | 213 | }, |
Craig Citro | e633be1 | 2015-03-02 13:40:36 -0800 | [diff] [blame] | 214 | }, |
Bu Sun Kim | 6502091 | 2020-05-20 12:08:20 -0700 | [diff] [blame^] | 215 | "fileType": "A String", # The file type for the specified uri. <br><code>SQL</code>: The file |
| 216 | # contains SQL statements. <br><code>CSV</code>: The file contains CSV data. |
| 217 | "uri": "A String", # The path to the file in Google Cloud Storage where the export will be |
| 218 | # stored. The URI is in the form <code>gs: |
| 219 | # //bucketName/fileName</code>. If the file already exists, the requests |
| 220 | # // succeeds, but the operation fails. If <code>fileType</code> is |
| 221 | # // <code>SQL</code> and the filename ends with .gz, the contents are |
| 222 | # // compressed. |
| 223 | "csvExportOptions": { # Options for exporting data as CSV. |
| 224 | "selectQuery": "A String", # The select query used to extract the data. |
| 225 | }, |
| 226 | "kind": "A String", # This is always <code>sql#exportContext</code>. |
Craig Citro | e633be1 | 2015-03-02 13:40:36 -0800 | [diff] [blame] | 227 | }, |
Bu Sun Kim | 6502091 | 2020-05-20 12:08:20 -0700 | [diff] [blame^] | 228 | "targetId": "A String", # Name of the database instance related to this operation. |
Craig Citro | e633be1 | 2015-03-02 13:40:36 -0800 | [diff] [blame] | 229 | }</pre> |
| 230 | </div> |
| 231 | |
| 232 | <div class="method"> |
Dan O'Meara | dd49464 | 2020-05-01 07:42:23 -0700 | [diff] [blame] | 233 | <code class="details" id="get">get(project, instance, database, x__xgafv=None)</code> |
| 234 | <pre>Retrieves a resource containing information about a database inside a Cloud |
| 235 | SQL instance. |
Craig Citro | e633be1 | 2015-03-02 13:40:36 -0800 | [diff] [blame] | 236 | |
| 237 | Args: |
| 238 | project: string, Project ID of the project that contains the instance. (required) |
| 239 | instance: string, Database instance ID. This does not include the project ID. (required) |
| 240 | database: string, Name of the database in the instance. (required) |
Dan O'Meara | dd49464 | 2020-05-01 07:42:23 -0700 | [diff] [blame] | 241 | x__xgafv: string, V1 error format. |
| 242 | Allowed values |
| 243 | 1 - v1 error format |
| 244 | 2 - v2 error format |
Craig Citro | e633be1 | 2015-03-02 13:40:36 -0800 | [diff] [blame] | 245 | |
| 246 | Returns: |
| 247 | An object of the form: |
| 248 | |
Bu Sun Kim | 715bd7f | 2019-06-14 16:50:42 -0700 | [diff] [blame] | 249 | { # Represents a SQL database on the Cloud SQL instance. |
Bu Sun Kim | 6502091 | 2020-05-20 12:08:20 -0700 | [diff] [blame^] | 250 | "collation": "A String", # The MySQL collation value. |
| 251 | "name": "A String", # The name of the database in the Cloud SQL instance. This does not include |
Dan O'Meara | dd49464 | 2020-05-01 07:42:23 -0700 | [diff] [blame] | 252 | # the project ID or instance name. |
Bu Sun Kim | 6502091 | 2020-05-20 12:08:20 -0700 | [diff] [blame^] | 253 | "instance": "A String", # The name of the Cloud SQL instance. This does not include the project ID. |
| 254 | "project": "A String", # The project ID of the project containing the Cloud SQL database. The Google |
Dan O'Meara | dd49464 | 2020-05-01 07:42:23 -0700 | [diff] [blame] | 255 | # apps domain is prefixed if applicable. |
Bu Sun Kim | 6502091 | 2020-05-20 12:08:20 -0700 | [diff] [blame^] | 256 | "selfLink": "A String", # The URI of this resource. |
| 257 | "sqlserverDatabaseDetails": { # Represents a Sql Server database on the Cloud SQL instance. |
| 258 | "recoveryModel": "A String", # The recovery model of a SQL Server database |
| 259 | "compatibilityLevel": 42, # The version of SQL Server with which the database is to be made compatible |
| 260 | }, |
| 261 | "kind": "A String", # This is always <code>sql#database</code>. |
| 262 | "charset": "A String", # The MySQL charset value. |
| 263 | "etag": "A String", # This field is deprecated and will be removed from a future version of the |
Dan O'Meara | dd49464 | 2020-05-01 07:42:23 -0700 | [diff] [blame] | 264 | # API. |
Craig Citro | e633be1 | 2015-03-02 13:40:36 -0800 | [diff] [blame] | 265 | }</pre> |
| 266 | </div> |
| 267 | |
| 268 | <div class="method"> |
Dan O'Meara | dd49464 | 2020-05-01 07:42:23 -0700 | [diff] [blame] | 269 | <code class="details" id="insert">insert(project, instance, body=None, x__xgafv=None)</code> |
| 270 | <pre>Inserts a resource containing information about a database inside a Cloud |
| 271 | SQL instance. |
Craig Citro | e633be1 | 2015-03-02 13:40:36 -0800 | [diff] [blame] | 272 | |
| 273 | Args: |
| 274 | project: string, Project ID of the project that contains the instance. (required) |
| 275 | 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] | 276 | body: object, The request body. |
Craig Citro | e633be1 | 2015-03-02 13:40:36 -0800 | [diff] [blame] | 277 | The object takes the form of: |
| 278 | |
Bu Sun Kim | 715bd7f | 2019-06-14 16:50:42 -0700 | [diff] [blame] | 279 | { # Represents a SQL database on the Cloud SQL instance. |
Bu Sun Kim | 6502091 | 2020-05-20 12:08:20 -0700 | [diff] [blame^] | 280 | "collation": "A String", # The MySQL collation value. |
| 281 | "name": "A String", # The name of the database in the Cloud SQL instance. This does not include |
Dan O'Meara | dd49464 | 2020-05-01 07:42:23 -0700 | [diff] [blame] | 282 | # the project ID or instance name. |
Bu Sun Kim | 6502091 | 2020-05-20 12:08:20 -0700 | [diff] [blame^] | 283 | "instance": "A String", # The name of the Cloud SQL instance. This does not include the project ID. |
| 284 | "project": "A String", # The project ID of the project containing the Cloud SQL database. The Google |
Dan O'Meara | dd49464 | 2020-05-01 07:42:23 -0700 | [diff] [blame] | 285 | # apps domain is prefixed if applicable. |
Bu Sun Kim | 6502091 | 2020-05-20 12:08:20 -0700 | [diff] [blame^] | 286 | "selfLink": "A String", # The URI of this resource. |
| 287 | "sqlserverDatabaseDetails": { # Represents a Sql Server database on the Cloud SQL instance. |
| 288 | "recoveryModel": "A String", # The recovery model of a SQL Server database |
| 289 | "compatibilityLevel": 42, # The version of SQL Server with which the database is to be made compatible |
| 290 | }, |
| 291 | "kind": "A String", # This is always <code>sql#database</code>. |
| 292 | "charset": "A String", # The MySQL charset value. |
| 293 | "etag": "A String", # This field is deprecated and will be removed from a future version of the |
Dan O'Meara | dd49464 | 2020-05-01 07:42:23 -0700 | [diff] [blame] | 294 | # API. |
Craig Citro | e633be1 | 2015-03-02 13:40:36 -0800 | [diff] [blame] | 295 | } |
| 296 | |
Dan O'Meara | dd49464 | 2020-05-01 07:42:23 -0700 | [diff] [blame] | 297 | x__xgafv: string, V1 error format. |
| 298 | Allowed values |
| 299 | 1 - v1 error format |
| 300 | 2 - v2 error format |
Craig Citro | e633be1 | 2015-03-02 13:40:36 -0800 | [diff] [blame] | 301 | |
| 302 | Returns: |
| 303 | An object of the form: |
| 304 | |
Dan O'Meara | dd49464 | 2020-05-01 07:42:23 -0700 | [diff] [blame] | 305 | { # An Operation resource.&nbsp;For successful operations that return an |
| 306 | # Operation resource, only the fields relevant to the operation are populated |
| 307 | # in the resource. |
Bu Sun Kim | 6502091 | 2020-05-20 12:08:20 -0700 | [diff] [blame^] | 308 | "endTime": "A String", # The time this operation finished in UTC timezone in <a |
| 309 | # href="https://tools.ietf.org/html/rfc3339">RFC 3339</a> format, for example |
| 310 | # <code>2012-11-15T16:19:00.094Z</code>. |
| 311 | "startTime": "A String", # The time this operation actually started in UTC timezone in <a |
| 312 | # href="https://tools.ietf.org/html/rfc3339">RFC 3339</a> format, for example |
| 313 | # <code>2012-11-15T16:19:00.094Z</code>. |
| 314 | "insertTime": "A String", # The time this operation was enqueued in UTC timezone in <a |
| 315 | # href="https://tools.ietf.org/html/rfc3339">RFC 3339</a> format, for example |
| 316 | # <code>2012-11-15T16:19:00.094Z</code>. |
| 317 | "user": "A String", # The email address of the user who initiated this operation. |
| 318 | "targetProject": "A String", # The project ID of the target instance related to this operation. |
| 319 | "selfLink": "A String", # The URI of this resource. |
| 320 | "targetLink": "A String", |
| 321 | "operationType": "A String", # The type of the operation. Valid values are <code>CREATE</code>, |
| 322 | # <code>DELETE</code>, <code>UPDATE</code>, <code>RESTART</code>, |
| 323 | # <code>IMPORT</code>, <code>EXPORT</code>, <code>BACKUP_VOLUME</code>, |
| 324 | # <code>RESTORE_VOLUME</code>, <code>CREATE_USER</code>, |
| 325 | # <code>DELETE_USER</code>, <code>CREATE_DATABASE</code>, |
| 326 | # <code>DELETE_DATABASE</code> . |
| 327 | "error": { # Database instance operation errors list wrapper. # If errors occurred during processing of this operation, this field will be |
| 328 | # populated. |
| 329 | "errors": [ # The list of errors encountered while processing this operation. |
| 330 | { # Database instance operation error. |
| 331 | "kind": "A String", # This is always <code>sql#operationError</code>. |
| 332 | "code": "A String", # Identifies the specific error that occurred. |
| 333 | "message": "A String", # Additional information about the error encountered. |
Dan O'Meara | dd49464 | 2020-05-01 07:42:23 -0700 | [diff] [blame] | 334 | }, |
Bu Sun Kim | 6502091 | 2020-05-20 12:08:20 -0700 | [diff] [blame^] | 335 | ], |
| 336 | "kind": "A String", # This is always <code>sql#operationErrors</code>. |
| 337 | }, |
| 338 | "kind": "A String", # This is always <code>sql#operation</code>. |
| 339 | "importContext": { # Database instance import context. # The context for import operation, if applicable. |
| 340 | "kind": "A String", # This is always <code>sql#importContext</code>. |
| 341 | "csvImportOptions": { # Options for importing data as CSV. |
| 342 | "table": "A String", # The table to which CSV data is imported. |
| 343 | "columns": [ # The columns to which CSV data is imported. If not specified, all columns |
| 344 | # of the database table are loaded with CSV data. |
| 345 | "A String", |
| 346 | ], |
Dan O'Meara | dd49464 | 2020-05-01 07:42:23 -0700 | [diff] [blame] | 347 | }, |
Bu Sun Kim | 6502091 | 2020-05-20 12:08:20 -0700 | [diff] [blame^] | 348 | "database": "A String", # The target database for the import. If <code>fileType</code> is |
Dan O'Meara | dd49464 | 2020-05-01 07:42:23 -0700 | [diff] [blame] | 349 | # <code>SQL</code>, this field is required only if the import file does not |
| 350 | # specify a database, and is overridden by any database specification in the |
| 351 | # import file. If <code>fileType</code> is <code>CSV</code>, one database |
| 352 | # must be specified. |
Bu Sun Kim | 6502091 | 2020-05-20 12:08:20 -0700 | [diff] [blame^] | 353 | "importUser": "A String", # The PostgreSQL user for this import operation. PostgreSQL instances only. |
| 354 | "bakImportOptions": { # Import parameters specific to SQL Server .BAK files |
| 355 | "encryptionOptions": { |
| 356 | "certPath": "A String", # Path to the Certificate (.cer) in Cloud Storage, in the form |
| 357 | # <code>gs://bucketName/fileName</code>. The instance must have |
| 358 | # write permissions to the bucket and read access to the file. |
| 359 | "pvkPath": "A String", # Path to the Certificate Private Key (.pvk) in Cloud Storage, in the |
| 360 | # form <code>gs://bucketName/fileName</code>. The instance must have |
| 361 | # write permissions to the bucket and read access to the file. |
| 362 | "pvkPassword": "A String", # Password that encrypts the private key |
| 363 | }, |
| 364 | }, |
| 365 | "uri": "A String", # Path to the import file in Cloud Storage, in the form |
Dan O'Meara | dd49464 | 2020-05-01 07:42:23 -0700 | [diff] [blame] | 366 | # <code>gs: |
| 367 | # //bucketName/fileName</code>. Compressed gzip files (.gz) are supported |
| 368 | # // when <code>fileType</code> is <code>SQL</code>. The instance must have |
| 369 | # // write permissions to the bucket and read access to the file. |
Bu Sun Kim | 6502091 | 2020-05-20 12:08:20 -0700 | [diff] [blame^] | 370 | "fileType": "A String", # The file type for the specified uri. <br><code>SQL</code>: The file |
| 371 | # contains SQL statements. <br><code>CSV</code>: The file contains CSV data. |
Craig Citro | e633be1 | 2015-03-02 13:40:36 -0800 | [diff] [blame] | 372 | }, |
Bu Sun Kim | 6502091 | 2020-05-20 12:08:20 -0700 | [diff] [blame^] | 373 | "status": "A String", # The status of an operation. Valid values are <code>PENDING</code>, |
| 374 | # <code>RUNNING</code>, <code>DONE</code>, |
| 375 | # <code>SQL_OPERATION_STATUS_UNSPECIFIED</code>. |
| 376 | "name": "A String", # An identifier that uniquely identifies the operation. You can use this |
Dan O'Meara | dd49464 | 2020-05-01 07:42:23 -0700 | [diff] [blame] | 377 | # identifier to retrieve the Operations resource that has information about |
| 378 | # the operation. |
Bu Sun Kim | 6502091 | 2020-05-20 12:08:20 -0700 | [diff] [blame^] | 379 | "exportContext": { # Database instance export context. # The context for export operation, if applicable. |
| 380 | "databases": [ # Databases to be exported. <br /> <b>MySQL instances:</b> If |
Dan O'Meara | dd49464 | 2020-05-01 07:42:23 -0700 | [diff] [blame] | 381 | # <code>fileType</code> is <code>SQL</code> and no database is specified, all |
| 382 | # databases are exported, except for the <code>mysql</code> system database. |
| 383 | # If <code>fileType</code> is <code>CSV</code>, you can specify one database, |
| 384 | # either by using this property or by using the |
| 385 | # <code>csvExportOptions.selectQuery</code> property, which takes precedence |
| 386 | # over this property. <br /> <b>PostgreSQL instances:</b> You must specify |
| 387 | # one database to be exported. If <code>fileType</code> is <code>CSV</code>, |
| 388 | # this database must match the one specified in the |
| 389 | # <code>csvExportOptions.selectQuery</code> property. |
Bu Sun Kim | 6502091 | 2020-05-20 12:08:20 -0700 | [diff] [blame^] | 390 | "A String", |
Craig Citro | e633be1 | 2015-03-02 13:40:36 -0800 | [diff] [blame] | 391 | ], |
Bu Sun Kim | 6502091 | 2020-05-20 12:08:20 -0700 | [diff] [blame^] | 392 | "sqlExportOptions": { # Options for exporting data as SQL statements. |
| 393 | "tables": [ # Tables to export, or that were exported, from the specified database. If |
Dan O'Meara | dd49464 | 2020-05-01 07:42:23 -0700 | [diff] [blame] | 394 | # you specify tables, specify one and only one database. For PostgreSQL |
| 395 | # instances, you can specify only one table. |
Bu Sun Kim | 6502091 | 2020-05-20 12:08:20 -0700 | [diff] [blame^] | 396 | "A String", |
Craig Citro | e633be1 | 2015-03-02 13:40:36 -0800 | [diff] [blame] | 397 | ], |
Bu Sun Kim | 6502091 | 2020-05-20 12:08:20 -0700 | [diff] [blame^] | 398 | "schemaOnly": True or False, # Export only schemas. |
| 399 | "mysqlExportOptions": { # Options for exporting from MySQL. |
| 400 | "masterData": 42, # Option to include SQL statement required to set up replication. |
Dan O'Meara | dd49464 | 2020-05-01 07:42:23 -0700 | [diff] [blame] | 401 | # If set to <code>1</code>, the dump file includes |
| 402 | # a CHANGE MASTER TO statement with the binary log coordinates. |
| 403 | # If set to <code>2</code>, the CHANGE MASTER TO statement is written as |
| 404 | # a SQL comment, and has no effect. |
| 405 | # All other values are ignored. |
Bu Sun Kim | 715bd7f | 2019-06-14 16:50:42 -0700 | [diff] [blame] | 406 | }, |
Craig Citro | e633be1 | 2015-03-02 13:40:36 -0800 | [diff] [blame] | 407 | }, |
Bu Sun Kim | 6502091 | 2020-05-20 12:08:20 -0700 | [diff] [blame^] | 408 | "fileType": "A String", # The file type for the specified uri. <br><code>SQL</code>: The file |
| 409 | # contains SQL statements. <br><code>CSV</code>: The file contains CSV data. |
| 410 | "uri": "A String", # The path to the file in Google Cloud Storage where the export will be |
| 411 | # stored. The URI is in the form <code>gs: |
| 412 | # //bucketName/fileName</code>. If the file already exists, the requests |
| 413 | # // succeeds, but the operation fails. If <code>fileType</code> is |
| 414 | # // <code>SQL</code> and the filename ends with .gz, the contents are |
| 415 | # // compressed. |
| 416 | "csvExportOptions": { # Options for exporting data as CSV. |
| 417 | "selectQuery": "A String", # The select query used to extract the data. |
| 418 | }, |
| 419 | "kind": "A String", # This is always <code>sql#exportContext</code>. |
Craig Citro | e633be1 | 2015-03-02 13:40:36 -0800 | [diff] [blame] | 420 | }, |
Bu Sun Kim | 6502091 | 2020-05-20 12:08:20 -0700 | [diff] [blame^] | 421 | "targetId": "A String", # Name of the database instance related to this operation. |
Craig Citro | e633be1 | 2015-03-02 13:40:36 -0800 | [diff] [blame] | 422 | }</pre> |
| 423 | </div> |
| 424 | |
| 425 | <div class="method"> |
Dan O'Meara | dd49464 | 2020-05-01 07:42:23 -0700 | [diff] [blame] | 426 | <code class="details" id="list">list(project, instance, x__xgafv=None)</code> |
Craig Citro | e633be1 | 2015-03-02 13:40:36 -0800 | [diff] [blame] | 427 | <pre>Lists databases in the specified Cloud SQL instance. |
| 428 | |
| 429 | Args: |
Bu Sun Kim | 715bd7f | 2019-06-14 16:50:42 -0700 | [diff] [blame] | 430 | project: string, Project ID of the project that contains the instance. (required) |
Craig Citro | e633be1 | 2015-03-02 13:40:36 -0800 | [diff] [blame] | 431 | 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] | 432 | x__xgafv: string, V1 error format. |
| 433 | Allowed values |
| 434 | 1 - v1 error format |
| 435 | 2 - v2 error format |
Craig Citro | e633be1 | 2015-03-02 13:40:36 -0800 | [diff] [blame] | 436 | |
| 437 | Returns: |
| 438 | An object of the form: |
| 439 | |
| 440 | { # Database list response. |
Bu Sun Kim | 6502091 | 2020-05-20 12:08:20 -0700 | [diff] [blame^] | 441 | "items": [ # List of database resources in the instance. |
Bu Sun Kim | 715bd7f | 2019-06-14 16:50:42 -0700 | [diff] [blame] | 442 | { # Represents a SQL database on the Cloud SQL instance. |
Bu Sun Kim | 6502091 | 2020-05-20 12:08:20 -0700 | [diff] [blame^] | 443 | "collation": "A String", # The MySQL collation value. |
| 444 | "name": "A String", # The name of the database in the Cloud SQL instance. This does not include |
Dan O'Meara | dd49464 | 2020-05-01 07:42:23 -0700 | [diff] [blame] | 445 | # the project ID or instance name. |
Bu Sun Kim | 6502091 | 2020-05-20 12:08:20 -0700 | [diff] [blame^] | 446 | "instance": "A String", # The name of the Cloud SQL instance. This does not include the project ID. |
| 447 | "project": "A String", # The project ID of the project containing the Cloud SQL database. The Google |
Dan O'Meara | dd49464 | 2020-05-01 07:42:23 -0700 | [diff] [blame] | 448 | # apps domain is prefixed if applicable. |
Bu Sun Kim | 6502091 | 2020-05-20 12:08:20 -0700 | [diff] [blame^] | 449 | "selfLink": "A String", # The URI of this resource. |
| 450 | "sqlserverDatabaseDetails": { # Represents a Sql Server database on the Cloud SQL instance. |
| 451 | "recoveryModel": "A String", # The recovery model of a SQL Server database |
| 452 | "compatibilityLevel": 42, # The version of SQL Server with which the database is to be made compatible |
| 453 | }, |
| 454 | "kind": "A String", # This is always <code>sql#database</code>. |
| 455 | "charset": "A String", # The MySQL charset value. |
| 456 | "etag": "A String", # This field is deprecated and will be removed from a future version of the |
Dan O'Meara | dd49464 | 2020-05-01 07:42:23 -0700 | [diff] [blame] | 457 | # API. |
Craig Citro | e633be1 | 2015-03-02 13:40:36 -0800 | [diff] [blame] | 458 | }, |
| 459 | ], |
Bu Sun Kim | 6502091 | 2020-05-20 12:08:20 -0700 | [diff] [blame^] | 460 | "kind": "A String", # This is always <code>sql#databasesList</code>. |
Craig Citro | e633be1 | 2015-03-02 13:40:36 -0800 | [diff] [blame] | 461 | }</pre> |
| 462 | </div> |
| 463 | |
| 464 | <div class="method"> |
Dan O'Meara | dd49464 | 2020-05-01 07:42:23 -0700 | [diff] [blame] | 465 | <code class="details" id="patch">patch(project, instance, database, body=None, x__xgafv=None)</code> |
| 466 | <pre>Partially updates a resource containing information about a database inside |
| 467 | a Cloud SQL instance. This method supports patch semantics. |
Craig Citro | e633be1 | 2015-03-02 13:40:36 -0800 | [diff] [blame] | 468 | |
| 469 | Args: |
| 470 | project: string, Project ID of the project that contains the instance. (required) |
| 471 | instance: string, Database instance ID. This does not include the project ID. (required) |
| 472 | 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] | 473 | body: object, The request body. |
Craig Citro | e633be1 | 2015-03-02 13:40:36 -0800 | [diff] [blame] | 474 | The object takes the form of: |
| 475 | |
Bu Sun Kim | 715bd7f | 2019-06-14 16:50:42 -0700 | [diff] [blame] | 476 | { # Represents a SQL database on the Cloud SQL instance. |
Bu Sun Kim | 6502091 | 2020-05-20 12:08:20 -0700 | [diff] [blame^] | 477 | "collation": "A String", # The MySQL collation value. |
| 478 | "name": "A String", # The name of the database in the Cloud SQL instance. This does not include |
Dan O'Meara | dd49464 | 2020-05-01 07:42:23 -0700 | [diff] [blame] | 479 | # the project ID or instance name. |
Bu Sun Kim | 6502091 | 2020-05-20 12:08:20 -0700 | [diff] [blame^] | 480 | "instance": "A String", # The name of the Cloud SQL instance. This does not include the project ID. |
| 481 | "project": "A String", # The project ID of the project containing the Cloud SQL database. The Google |
Dan O'Meara | dd49464 | 2020-05-01 07:42:23 -0700 | [diff] [blame] | 482 | # apps domain is prefixed if applicable. |
Bu Sun Kim | 6502091 | 2020-05-20 12:08:20 -0700 | [diff] [blame^] | 483 | "selfLink": "A String", # The URI of this resource. |
| 484 | "sqlserverDatabaseDetails": { # Represents a Sql Server database on the Cloud SQL instance. |
| 485 | "recoveryModel": "A String", # The recovery model of a SQL Server database |
| 486 | "compatibilityLevel": 42, # The version of SQL Server with which the database is to be made compatible |
| 487 | }, |
| 488 | "kind": "A String", # This is always <code>sql#database</code>. |
| 489 | "charset": "A String", # The MySQL charset value. |
| 490 | "etag": "A String", # This field is deprecated and will be removed from a future version of the |
Dan O'Meara | dd49464 | 2020-05-01 07:42:23 -0700 | [diff] [blame] | 491 | # API. |
Craig Citro | e633be1 | 2015-03-02 13:40:36 -0800 | [diff] [blame] | 492 | } |
| 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 | |
Dan O'Meara | dd49464 | 2020-05-01 07:42:23 -0700 | [diff] [blame] | 502 | { # An Operation resource.&nbsp;For successful operations that return an |
| 503 | # Operation resource, only the fields relevant to the operation are populated |
| 504 | # in the resource. |
Bu Sun Kim | 6502091 | 2020-05-20 12:08:20 -0700 | [diff] [blame^] | 505 | "endTime": "A String", # The time this operation finished in UTC timezone in <a |
| 506 | # href="https://tools.ietf.org/html/rfc3339">RFC 3339</a> format, for example |
| 507 | # <code>2012-11-15T16:19:00.094Z</code>. |
| 508 | "startTime": "A String", # The time this operation actually started in UTC timezone in <a |
| 509 | # href="https://tools.ietf.org/html/rfc3339">RFC 3339</a> format, for example |
| 510 | # <code>2012-11-15T16:19:00.094Z</code>. |
| 511 | "insertTime": "A String", # The time this operation was enqueued in UTC timezone in <a |
| 512 | # href="https://tools.ietf.org/html/rfc3339">RFC 3339</a> format, for example |
| 513 | # <code>2012-11-15T16:19:00.094Z</code>. |
| 514 | "user": "A String", # The email address of the user who initiated this operation. |
| 515 | "targetProject": "A String", # The project ID of the target instance related to this operation. |
| 516 | "selfLink": "A String", # The URI of this resource. |
| 517 | "targetLink": "A String", |
| 518 | "operationType": "A String", # The type of the operation. Valid values are <code>CREATE</code>, |
| 519 | # <code>DELETE</code>, <code>UPDATE</code>, <code>RESTART</code>, |
| 520 | # <code>IMPORT</code>, <code>EXPORT</code>, <code>BACKUP_VOLUME</code>, |
| 521 | # <code>RESTORE_VOLUME</code>, <code>CREATE_USER</code>, |
| 522 | # <code>DELETE_USER</code>, <code>CREATE_DATABASE</code>, |
| 523 | # <code>DELETE_DATABASE</code> . |
| 524 | "error": { # Database instance operation errors list wrapper. # If errors occurred during processing of this operation, this field will be |
| 525 | # populated. |
| 526 | "errors": [ # The list of errors encountered while processing this operation. |
| 527 | { # Database instance operation error. |
| 528 | "kind": "A String", # This is always <code>sql#operationError</code>. |
| 529 | "code": "A String", # Identifies the specific error that occurred. |
| 530 | "message": "A String", # Additional information about the error encountered. |
Dan O'Meara | dd49464 | 2020-05-01 07:42:23 -0700 | [diff] [blame] | 531 | }, |
Bu Sun Kim | 6502091 | 2020-05-20 12:08:20 -0700 | [diff] [blame^] | 532 | ], |
| 533 | "kind": "A String", # This is always <code>sql#operationErrors</code>. |
| 534 | }, |
| 535 | "kind": "A String", # This is always <code>sql#operation</code>. |
| 536 | "importContext": { # Database instance import context. # The context for import operation, if applicable. |
| 537 | "kind": "A String", # This is always <code>sql#importContext</code>. |
| 538 | "csvImportOptions": { # Options for importing data as CSV. |
| 539 | "table": "A String", # The table to which CSV data is imported. |
| 540 | "columns": [ # The columns to which CSV data is imported. If not specified, all columns |
| 541 | # of the database table are loaded with CSV data. |
| 542 | "A String", |
| 543 | ], |
Dan O'Meara | dd49464 | 2020-05-01 07:42:23 -0700 | [diff] [blame] | 544 | }, |
Bu Sun Kim | 6502091 | 2020-05-20 12:08:20 -0700 | [diff] [blame^] | 545 | "database": "A String", # The target database for the import. If <code>fileType</code> is |
Dan O'Meara | dd49464 | 2020-05-01 07:42:23 -0700 | [diff] [blame] | 546 | # <code>SQL</code>, this field is required only if the import file does not |
| 547 | # specify a database, and is overridden by any database specification in the |
| 548 | # import file. If <code>fileType</code> is <code>CSV</code>, one database |
| 549 | # must be specified. |
Bu Sun Kim | 6502091 | 2020-05-20 12:08:20 -0700 | [diff] [blame^] | 550 | "importUser": "A String", # The PostgreSQL user for this import operation. PostgreSQL instances only. |
| 551 | "bakImportOptions": { # Import parameters specific to SQL Server .BAK files |
| 552 | "encryptionOptions": { |
| 553 | "certPath": "A String", # Path to the Certificate (.cer) in Cloud Storage, in the form |
| 554 | # <code>gs://bucketName/fileName</code>. The instance must have |
| 555 | # write permissions to the bucket and read access to the file. |
| 556 | "pvkPath": "A String", # Path to the Certificate Private Key (.pvk) in Cloud Storage, in the |
| 557 | # form <code>gs://bucketName/fileName</code>. The instance must have |
| 558 | # write permissions to the bucket and read access to the file. |
| 559 | "pvkPassword": "A String", # Password that encrypts the private key |
| 560 | }, |
| 561 | }, |
| 562 | "uri": "A String", # Path to the import file in Cloud Storage, in the form |
Dan O'Meara | dd49464 | 2020-05-01 07:42:23 -0700 | [diff] [blame] | 563 | # <code>gs: |
| 564 | # //bucketName/fileName</code>. Compressed gzip files (.gz) are supported |
| 565 | # // when <code>fileType</code> is <code>SQL</code>. The instance must have |
| 566 | # // write permissions to the bucket and read access to the file. |
Bu Sun Kim | 6502091 | 2020-05-20 12:08:20 -0700 | [diff] [blame^] | 567 | "fileType": "A String", # The file type for the specified uri. <br><code>SQL</code>: The file |
| 568 | # contains SQL statements. <br><code>CSV</code>: The file contains CSV data. |
Craig Citro | e633be1 | 2015-03-02 13:40:36 -0800 | [diff] [blame] | 569 | }, |
Bu Sun Kim | 6502091 | 2020-05-20 12:08:20 -0700 | [diff] [blame^] | 570 | "status": "A String", # The status of an operation. Valid values are <code>PENDING</code>, |
| 571 | # <code>RUNNING</code>, <code>DONE</code>, |
| 572 | # <code>SQL_OPERATION_STATUS_UNSPECIFIED</code>. |
| 573 | "name": "A String", # An identifier that uniquely identifies the operation. You can use this |
Dan O'Meara | dd49464 | 2020-05-01 07:42:23 -0700 | [diff] [blame] | 574 | # identifier to retrieve the Operations resource that has information about |
| 575 | # the operation. |
Bu Sun Kim | 6502091 | 2020-05-20 12:08:20 -0700 | [diff] [blame^] | 576 | "exportContext": { # Database instance export context. # The context for export operation, if applicable. |
| 577 | "databases": [ # Databases to be exported. <br /> <b>MySQL instances:</b> If |
Dan O'Meara | dd49464 | 2020-05-01 07:42:23 -0700 | [diff] [blame] | 578 | # <code>fileType</code> is <code>SQL</code> and no database is specified, all |
| 579 | # databases are exported, except for the <code>mysql</code> system database. |
| 580 | # If <code>fileType</code> is <code>CSV</code>, you can specify one database, |
| 581 | # either by using this property or by using the |
| 582 | # <code>csvExportOptions.selectQuery</code> property, which takes precedence |
| 583 | # over this property. <br /> <b>PostgreSQL instances:</b> You must specify |
| 584 | # one database to be exported. If <code>fileType</code> is <code>CSV</code>, |
| 585 | # this database must match the one specified in the |
| 586 | # <code>csvExportOptions.selectQuery</code> property. |
Bu Sun Kim | 6502091 | 2020-05-20 12:08:20 -0700 | [diff] [blame^] | 587 | "A String", |
Craig Citro | e633be1 | 2015-03-02 13:40:36 -0800 | [diff] [blame] | 588 | ], |
Bu Sun Kim | 6502091 | 2020-05-20 12:08:20 -0700 | [diff] [blame^] | 589 | "sqlExportOptions": { # Options for exporting data as SQL statements. |
| 590 | "tables": [ # Tables to export, or that were exported, from the specified database. If |
Dan O'Meara | dd49464 | 2020-05-01 07:42:23 -0700 | [diff] [blame] | 591 | # you specify tables, specify one and only one database. For PostgreSQL |
| 592 | # instances, you can specify only one table. |
Bu Sun Kim | 6502091 | 2020-05-20 12:08:20 -0700 | [diff] [blame^] | 593 | "A String", |
Craig Citro | e633be1 | 2015-03-02 13:40:36 -0800 | [diff] [blame] | 594 | ], |
Bu Sun Kim | 6502091 | 2020-05-20 12:08:20 -0700 | [diff] [blame^] | 595 | "schemaOnly": True or False, # Export only schemas. |
| 596 | "mysqlExportOptions": { # Options for exporting from MySQL. |
| 597 | "masterData": 42, # Option to include SQL statement required to set up replication. |
Dan O'Meara | dd49464 | 2020-05-01 07:42:23 -0700 | [diff] [blame] | 598 | # If set to <code>1</code>, the dump file includes |
| 599 | # a CHANGE MASTER TO statement with the binary log coordinates. |
| 600 | # If set to <code>2</code>, the CHANGE MASTER TO statement is written as |
| 601 | # a SQL comment, and has no effect. |
| 602 | # All other values are ignored. |
Bu Sun Kim | 715bd7f | 2019-06-14 16:50:42 -0700 | [diff] [blame] | 603 | }, |
Craig Citro | e633be1 | 2015-03-02 13:40:36 -0800 | [diff] [blame] | 604 | }, |
Bu Sun Kim | 6502091 | 2020-05-20 12:08:20 -0700 | [diff] [blame^] | 605 | "fileType": "A String", # The file type for the specified uri. <br><code>SQL</code>: The file |
| 606 | # contains SQL statements. <br><code>CSV</code>: The file contains CSV data. |
| 607 | "uri": "A String", # The path to the file in Google Cloud Storage where the export will be |
| 608 | # stored. The URI is in the form <code>gs: |
| 609 | # //bucketName/fileName</code>. If the file already exists, the requests |
| 610 | # // succeeds, but the operation fails. If <code>fileType</code> is |
| 611 | # // <code>SQL</code> and the filename ends with .gz, the contents are |
| 612 | # // compressed. |
| 613 | "csvExportOptions": { # Options for exporting data as CSV. |
| 614 | "selectQuery": "A String", # The select query used to extract the data. |
| 615 | }, |
| 616 | "kind": "A String", # This is always <code>sql#exportContext</code>. |
Craig Citro | e633be1 | 2015-03-02 13:40:36 -0800 | [diff] [blame] | 617 | }, |
Bu Sun Kim | 6502091 | 2020-05-20 12:08:20 -0700 | [diff] [blame^] | 618 | "targetId": "A String", # Name of the database instance related to this operation. |
Craig Citro | e633be1 | 2015-03-02 13:40:36 -0800 | [diff] [blame] | 619 | }</pre> |
| 620 | </div> |
| 621 | |
| 622 | <div class="method"> |
Dan O'Meara | dd49464 | 2020-05-01 07:42:23 -0700 | [diff] [blame] | 623 | <code class="details" id="update">update(project, instance, database, body=None, x__xgafv=None)</code> |
| 624 | <pre>Updates a resource containing information about a database inside a Cloud |
| 625 | SQL instance. |
Craig Citro | e633be1 | 2015-03-02 13:40:36 -0800 | [diff] [blame] | 626 | |
| 627 | Args: |
| 628 | project: string, Project ID of the project that contains the instance. (required) |
| 629 | instance: string, Database instance ID. This does not include the project ID. (required) |
| 630 | 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] | 631 | body: object, The request body. |
Craig Citro | e633be1 | 2015-03-02 13:40:36 -0800 | [diff] [blame] | 632 | The object takes the form of: |
| 633 | |
Bu Sun Kim | 715bd7f | 2019-06-14 16:50:42 -0700 | [diff] [blame] | 634 | { # Represents a SQL database on the Cloud SQL instance. |
Bu Sun Kim | 6502091 | 2020-05-20 12:08:20 -0700 | [diff] [blame^] | 635 | "collation": "A String", # The MySQL collation value. |
| 636 | "name": "A String", # The name of the database in the Cloud SQL instance. This does not include |
Dan O'Meara | dd49464 | 2020-05-01 07:42:23 -0700 | [diff] [blame] | 637 | # the project ID or instance name. |
Bu Sun Kim | 6502091 | 2020-05-20 12:08:20 -0700 | [diff] [blame^] | 638 | "instance": "A String", # The name of the Cloud SQL instance. This does not include the project ID. |
| 639 | "project": "A String", # The project ID of the project containing the Cloud SQL database. The Google |
Dan O'Meara | dd49464 | 2020-05-01 07:42:23 -0700 | [diff] [blame] | 640 | # apps domain is prefixed if applicable. |
Bu Sun Kim | 6502091 | 2020-05-20 12:08:20 -0700 | [diff] [blame^] | 641 | "selfLink": "A String", # The URI of this resource. |
| 642 | "sqlserverDatabaseDetails": { # Represents a Sql Server database on the Cloud SQL instance. |
| 643 | "recoveryModel": "A String", # The recovery model of a SQL Server database |
| 644 | "compatibilityLevel": 42, # The version of SQL Server with which the database is to be made compatible |
| 645 | }, |
| 646 | "kind": "A String", # This is always <code>sql#database</code>. |
| 647 | "charset": "A String", # The MySQL charset value. |
| 648 | "etag": "A String", # This field is deprecated and will be removed from a future version of the |
Dan O'Meara | dd49464 | 2020-05-01 07:42:23 -0700 | [diff] [blame] | 649 | # API. |
Craig Citro | e633be1 | 2015-03-02 13:40:36 -0800 | [diff] [blame] | 650 | } |
| 651 | |
Dan O'Meara | dd49464 | 2020-05-01 07:42:23 -0700 | [diff] [blame] | 652 | x__xgafv: string, V1 error format. |
| 653 | Allowed values |
| 654 | 1 - v1 error format |
| 655 | 2 - v2 error format |
Craig Citro | e633be1 | 2015-03-02 13:40:36 -0800 | [diff] [blame] | 656 | |
| 657 | Returns: |
| 658 | An object of the form: |
| 659 | |
Dan O'Meara | dd49464 | 2020-05-01 07:42:23 -0700 | [diff] [blame] | 660 | { # An Operation resource.&nbsp;For successful operations that return an |
| 661 | # Operation resource, only the fields relevant to the operation are populated |
| 662 | # in the resource. |
Bu Sun Kim | 6502091 | 2020-05-20 12:08:20 -0700 | [diff] [blame^] | 663 | "endTime": "A String", # The time this operation finished in UTC timezone in <a |
| 664 | # href="https://tools.ietf.org/html/rfc3339">RFC 3339</a> format, for example |
| 665 | # <code>2012-11-15T16:19:00.094Z</code>. |
| 666 | "startTime": "A String", # The time this operation actually started in UTC timezone in <a |
| 667 | # href="https://tools.ietf.org/html/rfc3339">RFC 3339</a> format, for example |
| 668 | # <code>2012-11-15T16:19:00.094Z</code>. |
| 669 | "insertTime": "A String", # The time this operation was enqueued in UTC timezone in <a |
| 670 | # href="https://tools.ietf.org/html/rfc3339">RFC 3339</a> format, for example |
| 671 | # <code>2012-11-15T16:19:00.094Z</code>. |
| 672 | "user": "A String", # The email address of the user who initiated this operation. |
| 673 | "targetProject": "A String", # The project ID of the target instance related to this operation. |
| 674 | "selfLink": "A String", # The URI of this resource. |
| 675 | "targetLink": "A String", |
| 676 | "operationType": "A String", # The type of the operation. Valid values are <code>CREATE</code>, |
| 677 | # <code>DELETE</code>, <code>UPDATE</code>, <code>RESTART</code>, |
| 678 | # <code>IMPORT</code>, <code>EXPORT</code>, <code>BACKUP_VOLUME</code>, |
| 679 | # <code>RESTORE_VOLUME</code>, <code>CREATE_USER</code>, |
| 680 | # <code>DELETE_USER</code>, <code>CREATE_DATABASE</code>, |
| 681 | # <code>DELETE_DATABASE</code> . |
| 682 | "error": { # Database instance operation errors list wrapper. # If errors occurred during processing of this operation, this field will be |
| 683 | # populated. |
| 684 | "errors": [ # The list of errors encountered while processing this operation. |
| 685 | { # Database instance operation error. |
| 686 | "kind": "A String", # This is always <code>sql#operationError</code>. |
| 687 | "code": "A String", # Identifies the specific error that occurred. |
| 688 | "message": "A String", # Additional information about the error encountered. |
Dan O'Meara | dd49464 | 2020-05-01 07:42:23 -0700 | [diff] [blame] | 689 | }, |
Bu Sun Kim | 6502091 | 2020-05-20 12:08:20 -0700 | [diff] [blame^] | 690 | ], |
| 691 | "kind": "A String", # This is always <code>sql#operationErrors</code>. |
| 692 | }, |
| 693 | "kind": "A String", # This is always <code>sql#operation</code>. |
| 694 | "importContext": { # Database instance import context. # The context for import operation, if applicable. |
| 695 | "kind": "A String", # This is always <code>sql#importContext</code>. |
| 696 | "csvImportOptions": { # Options for importing data as CSV. |
| 697 | "table": "A String", # The table to which CSV data is imported. |
| 698 | "columns": [ # The columns to which CSV data is imported. If not specified, all columns |
| 699 | # of the database table are loaded with CSV data. |
| 700 | "A String", |
| 701 | ], |
Dan O'Meara | dd49464 | 2020-05-01 07:42:23 -0700 | [diff] [blame] | 702 | }, |
Bu Sun Kim | 6502091 | 2020-05-20 12:08:20 -0700 | [diff] [blame^] | 703 | "database": "A String", # The target database for the import. If <code>fileType</code> is |
Dan O'Meara | dd49464 | 2020-05-01 07:42:23 -0700 | [diff] [blame] | 704 | # <code>SQL</code>, this field is required only if the import file does not |
| 705 | # specify a database, and is overridden by any database specification in the |
| 706 | # import file. If <code>fileType</code> is <code>CSV</code>, one database |
| 707 | # must be specified. |
Bu Sun Kim | 6502091 | 2020-05-20 12:08:20 -0700 | [diff] [blame^] | 708 | "importUser": "A String", # The PostgreSQL user for this import operation. PostgreSQL instances only. |
| 709 | "bakImportOptions": { # Import parameters specific to SQL Server .BAK files |
| 710 | "encryptionOptions": { |
| 711 | "certPath": "A String", # Path to the Certificate (.cer) in Cloud Storage, in the form |
| 712 | # <code>gs://bucketName/fileName</code>. The instance must have |
| 713 | # write permissions to the bucket and read access to the file. |
| 714 | "pvkPath": "A String", # Path to the Certificate Private Key (.pvk) in Cloud Storage, in the |
| 715 | # form <code>gs://bucketName/fileName</code>. The instance must have |
| 716 | # write permissions to the bucket and read access to the file. |
| 717 | "pvkPassword": "A String", # Password that encrypts the private key |
| 718 | }, |
| 719 | }, |
| 720 | "uri": "A String", # Path to the import file in Cloud Storage, in the form |
Dan O'Meara | dd49464 | 2020-05-01 07:42:23 -0700 | [diff] [blame] | 721 | # <code>gs: |
| 722 | # //bucketName/fileName</code>. Compressed gzip files (.gz) are supported |
| 723 | # // when <code>fileType</code> is <code>SQL</code>. The instance must have |
| 724 | # // write permissions to the bucket and read access to the file. |
Bu Sun Kim | 6502091 | 2020-05-20 12:08:20 -0700 | [diff] [blame^] | 725 | "fileType": "A String", # The file type for the specified uri. <br><code>SQL</code>: The file |
| 726 | # contains SQL statements. <br><code>CSV</code>: The file contains CSV data. |
Craig Citro | e633be1 | 2015-03-02 13:40:36 -0800 | [diff] [blame] | 727 | }, |
Bu Sun Kim | 6502091 | 2020-05-20 12:08:20 -0700 | [diff] [blame^] | 728 | "status": "A String", # The status of an operation. Valid values are <code>PENDING</code>, |
| 729 | # <code>RUNNING</code>, <code>DONE</code>, |
| 730 | # <code>SQL_OPERATION_STATUS_UNSPECIFIED</code>. |
| 731 | "name": "A String", # An identifier that uniquely identifies the operation. You can use this |
Dan O'Meara | dd49464 | 2020-05-01 07:42:23 -0700 | [diff] [blame] | 732 | # identifier to retrieve the Operations resource that has information about |
| 733 | # the operation. |
Bu Sun Kim | 6502091 | 2020-05-20 12:08:20 -0700 | [diff] [blame^] | 734 | "exportContext": { # Database instance export context. # The context for export operation, if applicable. |
| 735 | "databases": [ # Databases to be exported. <br /> <b>MySQL instances:</b> If |
Dan O'Meara | dd49464 | 2020-05-01 07:42:23 -0700 | [diff] [blame] | 736 | # <code>fileType</code> is <code>SQL</code> and no database is specified, all |
| 737 | # databases are exported, except for the <code>mysql</code> system database. |
| 738 | # If <code>fileType</code> is <code>CSV</code>, you can specify one database, |
| 739 | # either by using this property or by using the |
| 740 | # <code>csvExportOptions.selectQuery</code> property, which takes precedence |
| 741 | # over this property. <br /> <b>PostgreSQL instances:</b> You must specify |
| 742 | # one database to be exported. If <code>fileType</code> is <code>CSV</code>, |
| 743 | # this database must match the one specified in the |
| 744 | # <code>csvExportOptions.selectQuery</code> property. |
Bu Sun Kim | 6502091 | 2020-05-20 12:08:20 -0700 | [diff] [blame^] | 745 | "A String", |
Craig Citro | e633be1 | 2015-03-02 13:40:36 -0800 | [diff] [blame] | 746 | ], |
Bu Sun Kim | 6502091 | 2020-05-20 12:08:20 -0700 | [diff] [blame^] | 747 | "sqlExportOptions": { # Options for exporting data as SQL statements. |
| 748 | "tables": [ # Tables to export, or that were exported, from the specified database. If |
Dan O'Meara | dd49464 | 2020-05-01 07:42:23 -0700 | [diff] [blame] | 749 | # you specify tables, specify one and only one database. For PostgreSQL |
| 750 | # instances, you can specify only one table. |
Bu Sun Kim | 6502091 | 2020-05-20 12:08:20 -0700 | [diff] [blame^] | 751 | "A String", |
Craig Citro | e633be1 | 2015-03-02 13:40:36 -0800 | [diff] [blame] | 752 | ], |
Bu Sun Kim | 6502091 | 2020-05-20 12:08:20 -0700 | [diff] [blame^] | 753 | "schemaOnly": True or False, # Export only schemas. |
| 754 | "mysqlExportOptions": { # Options for exporting from MySQL. |
| 755 | "masterData": 42, # Option to include SQL statement required to set up replication. |
Dan O'Meara | dd49464 | 2020-05-01 07:42:23 -0700 | [diff] [blame] | 756 | # If set to <code>1</code>, the dump file includes |
| 757 | # a CHANGE MASTER TO statement with the binary log coordinates. |
| 758 | # If set to <code>2</code>, the CHANGE MASTER TO statement is written as |
| 759 | # a SQL comment, and has no effect. |
| 760 | # All other values are ignored. |
Bu Sun Kim | 715bd7f | 2019-06-14 16:50:42 -0700 | [diff] [blame] | 761 | }, |
Craig Citro | e633be1 | 2015-03-02 13:40:36 -0800 | [diff] [blame] | 762 | }, |
Bu Sun Kim | 6502091 | 2020-05-20 12:08:20 -0700 | [diff] [blame^] | 763 | "fileType": "A String", # The file type for the specified uri. <br><code>SQL</code>: The file |
| 764 | # contains SQL statements. <br><code>CSV</code>: The file contains CSV data. |
| 765 | "uri": "A String", # The path to the file in Google Cloud Storage where the export will be |
| 766 | # stored. The URI is in the form <code>gs: |
| 767 | # //bucketName/fileName</code>. If the file already exists, the requests |
| 768 | # // succeeds, but the operation fails. If <code>fileType</code> is |
| 769 | # // <code>SQL</code> and the filename ends with .gz, the contents are |
| 770 | # // compressed. |
| 771 | "csvExportOptions": { # Options for exporting data as CSV. |
| 772 | "selectQuery": "A String", # The select query used to extract the data. |
| 773 | }, |
| 774 | "kind": "A String", # This is always <code>sql#exportContext</code>. |
Craig Citro | e633be1 | 2015-03-02 13:40:36 -0800 | [diff] [blame] | 775 | }, |
Bu Sun Kim | 6502091 | 2020-05-20 12:08:20 -0700 | [diff] [blame^] | 776 | "targetId": "A String", # Name of the database instance related to this operation. |
Craig Citro | e633be1 | 2015-03-02 13:40:36 -0800 | [diff] [blame] | 777 | }</pre> |
| 778 | </div> |
| 779 | |
| 780 | </body></html> |