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