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