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.instances.html">instances</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="#addServerCa">addServerCa(project, instance, x__xgafv=None)</a></code></p> |
Dmitry Frenkel | 3e17f89 | 2020-10-06 16:46:05 -0700 | [diff] [blame] | 79 | <p class="firstline">Add a new trusted Certificate Authority (CA) version for the specified instance. Required to prepare for a certificate rotation. If a CA version was previously added but never used in a certificate rotation, this operation replaces that version. There cannot be more than one CA version waiting to be rotated in.</p> |
Bu Sun Kim | 715bd7f | 2019-06-14 16:50:42 -0700 | [diff] [blame] | 80 | <p class="toc_element"> |
Dan O'Meara | dd49464 | 2020-05-01 07:42:23 -0700 | [diff] [blame] | 81 | <code><a href="#clone">clone(project, instance, body=None, x__xgafv=None)</a></code></p> |
Dmitry Frenkel | 3e17f89 | 2020-10-06 16:46:05 -0700 | [diff] [blame] | 82 | <p class="firstline">Creates a Cloud SQL instance as a clone of the source instance. Using this operation might cause your instance to restart.</p> |
| 83 | <p class="toc_element"> |
| 84 | <code><a href="#close">close()</a></code></p> |
| 85 | <p class="firstline">Close httplib2 connections.</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="#delete">delete(project, instance, x__xgafv=None)</a></code></p> |
Craig Citro | e633be1 | 2015-03-02 13:40:36 -0800 | [diff] [blame] | 88 | <p class="firstline">Deletes a 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="#demoteMaster">demoteMaster(project, instance, body=None, x__xgafv=None)</a></code></p> |
Dmitry Frenkel | 3e17f89 | 2020-10-06 16:46:05 -0700 | [diff] [blame] | 91 | <p class="firstline">Demotes the stand-alone instance to be a Cloud SQL read replica for an external database server.</p> |
Bu Sun Kim | 715bd7f | 2019-06-14 16:50:42 -0700 | [diff] [blame] | 92 | <p class="toc_element"> |
Dan O'Meara | dd49464 | 2020-05-01 07:42:23 -0700 | [diff] [blame] | 93 | <code><a href="#export">export(project, instance, body=None, x__xgafv=None)</a></code></p> |
Dmitry Frenkel | 3e17f89 | 2020-10-06 16:46:05 -0700 | [diff] [blame] | 94 | <p class="firstline">Exports data from a Cloud SQL instance to a Cloud Storage bucket as a SQL dump or CSV file.</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="#failover">failover(project, instance, body=None, x__xgafv=None)</a></code></p> |
Dmitry Frenkel | 3e17f89 | 2020-10-06 16:46:05 -0700 | [diff] [blame] | 97 | <p class="firstline">Failover the instance to its failover replica instance. Using this operation might cause your instance to restart.</p> |
Jon Wayne Parrott | 36e41bc | 2016-02-19 16:02:29 -0800 | [diff] [blame] | 98 | <p class="toc_element"> |
Dan O'Meara | dd49464 | 2020-05-01 07:42:23 -0700 | [diff] [blame] | 99 | <code><a href="#get">get(project, instance, x__xgafv=None)</a></code></p> |
Craig Citro | e633be1 | 2015-03-02 13:40:36 -0800 | [diff] [blame] | 100 | <p class="firstline">Retrieves a resource containing information about a Cloud SQL instance.</p> |
| 101 | <p class="toc_element"> |
Dan O'Meara | dd49464 | 2020-05-01 07:42:23 -0700 | [diff] [blame] | 102 | <code><a href="#import_">import_(project, instance, body=None, x__xgafv=None)</a></code></p> |
Dmitry Frenkel | 3e17f89 | 2020-10-06 16:46:05 -0700 | [diff] [blame] | 103 | <p class="firstline">Imports data into a Cloud SQL instance from a SQL dump or CSV file in Cloud Storage.</p> |
Craig Citro | e633be1 | 2015-03-02 13:40:36 -0800 | [diff] [blame] | 104 | <p class="toc_element"> |
Dan O'Meara | dd49464 | 2020-05-01 07:42:23 -0700 | [diff] [blame] | 105 | <code><a href="#insert">insert(project, body=None, x__xgafv=None)</a></code></p> |
Craig Citro | e633be1 | 2015-03-02 13:40:36 -0800 | [diff] [blame] | 106 | <p class="firstline">Creates a new Cloud SQL instance.</p> |
| 107 | <p class="toc_element"> |
Bu Sun Kim | 673ec5c | 2020-11-16 11:05:03 -0700 | [diff] [blame] | 108 | <code><a href="#list">list(project, pageToken=None, maxResults=None, filter=None, x__xgafv=None)</a></code></p> |
Dan O'Meara | dd49464 | 2020-05-01 07:42:23 -0700 | [diff] [blame] | 109 | <p class="firstline">Lists instances under a given project.</p> |
Craig Citro | e633be1 | 2015-03-02 13:40:36 -0800 | [diff] [blame] | 110 | <p class="toc_element"> |
Dan O'Meara | dd49464 | 2020-05-01 07:42:23 -0700 | [diff] [blame] | 111 | <code><a href="#listServerCas">listServerCas(project, instance, x__xgafv=None)</a></code></p> |
Dmitry Frenkel | 3e17f89 | 2020-10-06 16:46:05 -0700 | [diff] [blame] | 112 | <p class="firstline">Lists all of the trusted Certificate Authorities (CAs) for the specified instance. There can be up to three CAs listed: the CA that was used to sign the certificate that is currently in use, a CA that has been added but not yet used to sign a certificate, and a CA used to sign a certificate that has previously rotated out.</p> |
Bu Sun Kim | 715bd7f | 2019-06-14 16:50:42 -0700 | [diff] [blame] | 113 | <p class="toc_element"> |
Craig Citro | e633be1 | 2015-03-02 13:40:36 -0800 | [diff] [blame] | 114 | <code><a href="#list_next">list_next(previous_request, previous_response)</a></code></p> |
| 115 | <p class="firstline">Retrieves the next page of results.</p> |
| 116 | <p class="toc_element"> |
Dan O'Meara | dd49464 | 2020-05-01 07:42:23 -0700 | [diff] [blame] | 117 | <code><a href="#patch">patch(project, instance, body=None, x__xgafv=None)</a></code></p> |
Dmitry Frenkel | 3e17f89 | 2020-10-06 16:46:05 -0700 | [diff] [blame] | 118 | <p class="firstline">Updates settings of a Cloud SQL instance. This method supports patch semantics.</p> |
Craig Citro | e633be1 | 2015-03-02 13:40:36 -0800 | [diff] [blame] | 119 | <p class="toc_element"> |
Dan O'Meara | dd49464 | 2020-05-01 07:42:23 -0700 | [diff] [blame] | 120 | <code><a href="#promoteReplica">promoteReplica(project, instance, x__xgafv=None)</a></code></p> |
Dmitry Frenkel | 3e17f89 | 2020-10-06 16:46:05 -0700 | [diff] [blame] | 121 | <p class="firstline">Promotes the read replica instance to be a stand-alone Cloud SQL instance. Using this operation might cause your instance to restart.</p> |
Craig Citro | e633be1 | 2015-03-02 13:40:36 -0800 | [diff] [blame] | 122 | <p class="toc_element"> |
Dan O'Meara | dd49464 | 2020-05-01 07:42:23 -0700 | [diff] [blame] | 123 | <code><a href="#resetSslConfig">resetSslConfig(project, instance, x__xgafv=None)</a></code></p> |
Dmitry Frenkel | 3e17f89 | 2020-10-06 16:46:05 -0700 | [diff] [blame] | 124 | <p class="firstline">Deletes all client certificates and generates a new server SSL certificate for the instance.</p> |
Craig Citro | e633be1 | 2015-03-02 13:40:36 -0800 | [diff] [blame] | 125 | <p class="toc_element"> |
Dan O'Meara | dd49464 | 2020-05-01 07:42:23 -0700 | [diff] [blame] | 126 | <code><a href="#restart">restart(project, instance, x__xgafv=None)</a></code></p> |
Craig Citro | e633be1 | 2015-03-02 13:40:36 -0800 | [diff] [blame] | 127 | <p class="firstline">Restarts a Cloud SQL instance.</p> |
| 128 | <p class="toc_element"> |
Dan O'Meara | dd49464 | 2020-05-01 07:42:23 -0700 | [diff] [blame] | 129 | <code><a href="#restoreBackup">restoreBackup(project, instance, body=None, x__xgafv=None)</a></code></p> |
Dmitry Frenkel | 3e17f89 | 2020-10-06 16:46:05 -0700 | [diff] [blame] | 130 | <p class="firstline">Restores a backup of a Cloud SQL instance. Using this operation might cause your instance to restart.</p> |
Craig Citro | e633be1 | 2015-03-02 13:40:36 -0800 | [diff] [blame] | 131 | <p class="toc_element"> |
Dan O'Meara | dd49464 | 2020-05-01 07:42:23 -0700 | [diff] [blame] | 132 | <code><a href="#rotateServerCa">rotateServerCa(project, instance, body=None, x__xgafv=None)</a></code></p> |
Dmitry Frenkel | 3e17f89 | 2020-10-06 16:46:05 -0700 | [diff] [blame] | 133 | <p class="firstline">Rotates the server certificate to one signed by the Certificate Authority (CA) version previously added with the addServerCA method.</p> |
Bu Sun Kim | 715bd7f | 2019-06-14 16:50:42 -0700 | [diff] [blame] | 134 | <p class="toc_element"> |
Dan O'Meara | dd49464 | 2020-05-01 07:42:23 -0700 | [diff] [blame] | 135 | <code><a href="#startReplica">startReplica(project, instance, x__xgafv=None)</a></code></p> |
Craig Citro | e633be1 | 2015-03-02 13:40:36 -0800 | [diff] [blame] | 136 | <p class="firstline">Starts the replication in the read replica instance.</p> |
| 137 | <p class="toc_element"> |
Dan O'Meara | dd49464 | 2020-05-01 07:42:23 -0700 | [diff] [blame] | 138 | <code><a href="#stopReplica">stopReplica(project, instance, x__xgafv=None)</a></code></p> |
Craig Citro | e633be1 | 2015-03-02 13:40:36 -0800 | [diff] [blame] | 139 | <p class="firstline">Stops the replication in the read replica instance.</p> |
| 140 | <p class="toc_element"> |
Dan O'Meara | dd49464 | 2020-05-01 07:42:23 -0700 | [diff] [blame] | 141 | <code><a href="#truncateLog">truncateLog(project, instance, body=None, x__xgafv=None)</a></code></p> |
Jon Wayne Parrott | 692617a | 2017-01-06 09:58:29 -0800 | [diff] [blame] | 142 | <p class="firstline">Truncate MySQL general and slow query log tables</p> |
| 143 | <p class="toc_element"> |
Dan O'Meara | dd49464 | 2020-05-01 07:42:23 -0700 | [diff] [blame] | 144 | <code><a href="#update">update(project, instance, body=None, x__xgafv=None)</a></code></p> |
Dmitry Frenkel | 3e17f89 | 2020-10-06 16:46:05 -0700 | [diff] [blame] | 145 | <p class="firstline">Updates settings of a Cloud SQL instance. Using this operation might cause your instance to restart.</p> |
Craig Citro | e633be1 | 2015-03-02 13:40:36 -0800 | [diff] [blame] | 146 | <h3>Method Details</h3> |
| 147 | <div class="method"> |
Dan O'Meara | dd49464 | 2020-05-01 07:42:23 -0700 | [diff] [blame] | 148 | <code class="details" id="addServerCa">addServerCa(project, instance, x__xgafv=None)</code> |
Dmitry Frenkel | 3e17f89 | 2020-10-06 16:46:05 -0700 | [diff] [blame] | 149 | <pre>Add a new trusted Certificate Authority (CA) version for the specified instance. Required to prepare for a certificate rotation. If a CA version was previously added but never used in a certificate rotation, this operation replaces that version. There cannot be more than one CA version waiting to be rotated in. |
Craig Citro | e633be1 | 2015-03-02 13:40:36 -0800 | [diff] [blame] | 150 | |
| 151 | Args: |
Bu Sun Kim | 715bd7f | 2019-06-14 16:50:42 -0700 | [diff] [blame] | 152 | project: string, Project ID of the project that contains the instance. (required) |
| 153 | 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] | 154 | x__xgafv: string, V1 error format. |
| 155 | Allowed values |
| 156 | 1 - v1 error format |
| 157 | 2 - v2 error format |
Craig Citro | e633be1 | 2015-03-02 13:40:36 -0800 | [diff] [blame] | 158 | |
| 159 | Returns: |
| 160 | An object of the form: |
| 161 | |
Dmitry Frenkel | 3e17f89 | 2020-10-06 16:46:05 -0700 | [diff] [blame] | 162 | { # An Operation resource. For successful operations that return an Operation resource, only the fields relevant to the operation are populated in the resource. |
Dmitry Frenkel | 3e17f89 | 2020-10-06 16:46:05 -0700 | [diff] [blame] | 163 | "importContext": { # Database instance import context. # The context for import operation, if applicable. |
Bu Sun Kim | 673ec5c | 2020-11-16 11:05:03 -0700 | [diff] [blame] | 164 | "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. |
Dmitry Frenkel | 3e17f89 | 2020-10-06 16:46:05 -0700 | [diff] [blame] | 165 | "csvImportOptions": { # Options for importing data as CSV. |
| 166 | "columns": [ # The columns to which CSV data is imported. If not specified, all columns of the database table are loaded with CSV data. |
| 167 | "A String", |
| 168 | ], |
| 169 | "table": "A String", # The table to which CSV data is imported. |
| 170 | }, |
Bu Sun Kim | 673ec5c | 2020-11-16 11:05:03 -0700 | [diff] [blame] | 171 | "kind": "A String", # This is always *sql#importContext*. |
| 172 | "importUser": "A String", # The PostgreSQL user for this import operation. PostgreSQL instances only. |
| 173 | "fileType": "A String", # The file type for the specified uri. *SQL*: The file contains SQL statements. *CSV*: The file contains CSV data. |
| 174 | "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. |
Dmitry Frenkel | 3e17f89 | 2020-10-06 16:46:05 -0700 | [diff] [blame] | 175 | "bakImportOptions": { # Import parameters specific to SQL Server .BAK files |
| 176 | "encryptionOptions": { |
Dmitry Frenkel | 3e17f89 | 2020-10-06 16:46:05 -0700 | [diff] [blame] | 177 | "pvkPassword": "A String", # Password that encrypts the private key |
Bu Sun Kim | 673ec5c | 2020-11-16 11:05:03 -0700 | [diff] [blame] | 178 | "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. |
| 179 | "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. |
Dmitry Frenkel | 3e17f89 | 2020-10-06 16:46:05 -0700 | [diff] [blame] | 180 | }, |
| 181 | }, |
Dmitry Frenkel | 3e17f89 | 2020-10-06 16:46:05 -0700 | [diff] [blame] | 182 | }, |
Bu Sun Kim | 673ec5c | 2020-11-16 11:05:03 -0700 | [diff] [blame] | 183 | "exportContext": { # Database instance export context. # The context for export operation, if applicable. |
| 184 | "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. |
| 185 | "sqlExportOptions": { # Options for exporting data as SQL statements. |
| 186 | "mysqlExportOptions": { # Options for exporting from MySQL. |
| 187 | "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. If set to *2*, the CHANGE MASTER TO statement is written as a SQL comment, and has no effect. All other values are ignored. |
| 188 | }, |
| 189 | "schemaOnly": True or False, # Export only schemas. |
| 190 | "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. |
| 191 | "A String", |
| 192 | ], |
| 193 | }, |
| 194 | "kind": "A String", # This is always *sql#exportContext*. |
| 195 | "csvExportOptions": { # Options for exporting data as CSV. |
| 196 | "selectQuery": "A String", # The select query used to extract the data. |
| 197 | }, |
| 198 | "fileType": "A String", # The file type for the specified uri. *SQL*: The file contains SQL statements. *CSV*: The file contains CSV data. |
| 199 | "offload": True or False, # Option for export offload. |
| 200 | "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. |
| 201 | "A String", |
| 202 | ], |
| 203 | }, |
| 204 | "endTime": "A String", # The time this operation finished in UTC timezone in RFC 3339 format, for example *2012-11-15T16:19:00.094Z*. |
| 205 | "user": "A String", # The email address of the user who initiated this operation. |
| 206 | "selfLink": "A String", # The URI of this resource. |
| 207 | "status": "A String", # The status of an operation. Valid values are: *PENDING* *RUNNING* *DONE* *SQL_OPERATION_STATUS_UNSPECIFIED* |
| 208 | "insertTime": "A String", # The time this operation was enqueued in UTC timezone in RFC 3339 format, for example *2012-11-15T16:19:00.094Z*. |
| 209 | "targetId": "A String", # Name of the database instance related to this operation. |
| 210 | "targetProject": "A String", # The project ID of the target instance related to this operation. |
| 211 | "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* |
| 212 | "kind": "A String", # This is always *sql#operation*. |
| 213 | "error": { # Database instance operation errors list wrapper. # If errors occurred during processing of this operation, this field will be populated. |
| 214 | "kind": "A String", # This is always *sql#operationErrors*. |
| 215 | "errors": [ # The list of errors encountered while processing this operation. |
| 216 | { # Database instance operation error. |
| 217 | "code": "A String", # Identifies the specific error that occurred. |
| 218 | "message": "A String", # Additional information about the error encountered. |
| 219 | "kind": "A String", # This is always *sql#operationError*. |
| 220 | }, |
| 221 | ], |
| 222 | }, |
| 223 | "targetLink": "A String", |
| 224 | "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. |
| 225 | "startTime": "A String", # The time this operation actually started in UTC timezone in RFC 3339 format, for example *2012-11-15T16:19:00.094Z*. |
Bu Sun Kim | 715bd7f | 2019-06-14 16:50:42 -0700 | [diff] [blame] | 226 | }</pre> |
| 227 | </div> |
| 228 | |
| 229 | <div class="method"> |
Dan O'Meara | dd49464 | 2020-05-01 07:42:23 -0700 | [diff] [blame] | 230 | <code class="details" id="clone">clone(project, instance, body=None, x__xgafv=None)</code> |
Dmitry Frenkel | 3e17f89 | 2020-10-06 16:46:05 -0700 | [diff] [blame] | 231 | <pre>Creates a Cloud SQL instance as a clone of the source instance. Using this operation might cause your instance to restart. |
Bu Sun Kim | 715bd7f | 2019-06-14 16:50:42 -0700 | [diff] [blame] | 232 | |
| 233 | Args: |
| 234 | project: string, Project ID of the source as well as the clone Cloud SQL instance. (required) |
Dmitry Frenkel | 3e17f89 | 2020-10-06 16:46:05 -0700 | [diff] [blame] | 235 | instance: string, The ID of the Cloud SQL instance to be cloned (source). This does not include the project ID. (required) |
Dan O'Meara | dd49464 | 2020-05-01 07:42:23 -0700 | [diff] [blame] | 236 | body: object, The request body. |
Bu Sun Kim | 715bd7f | 2019-06-14 16:50:42 -0700 | [diff] [blame] | 237 | The object takes the form of: |
| 238 | |
| 239 | { # Database instance clone request. |
Bu Sun Kim | 6502091 | 2020-05-20 12:08:20 -0700 | [diff] [blame] | 240 | "cloneContext": { # Database instance clone context. # Contains details about the clone operation. |
Bu Sun Kim | 673ec5c | 2020-11-16 11:05:03 -0700 | [diff] [blame] | 241 | "pointInTime": "A String", # Reserved for future use. |
Bu Sun Kim | 6502091 | 2020-05-20 12:08:20 -0700 | [diff] [blame] | 242 | "destinationInstanceName": "A String", # Name of the Cloud SQL instance to be created as a clone. |
Dmitry Frenkel | 3e17f89 | 2020-10-06 16:46:05 -0700 | [diff] [blame] | 243 | "binLogCoordinates": { # Binary log coordinates. # Binary log coordinates, if specified, identify the position up to which the source instance is cloned. If not specified, the source instance is cloned up to the most recent binary log coordinates. |
| 244 | "kind": "A String", # This is always *sql#binLogCoordinates*. |
Bu Sun Kim | 6502091 | 2020-05-20 12:08:20 -0700 | [diff] [blame] | 245 | "binLogPosition": "A String", # Position (offset) within the binary log file. |
Bu Sun Kim | 673ec5c | 2020-11-16 11:05:03 -0700 | [diff] [blame] | 246 | "binLogFileName": "A String", # Name of the binary log file for a Cloud SQL instance. |
Bu Sun Kim | 715bd7f | 2019-06-14 16:50:42 -0700 | [diff] [blame] | 247 | }, |
Dmitry Frenkel | 3e17f89 | 2020-10-06 16:46:05 -0700 | [diff] [blame] | 248 | "pitrTimestampMs": "A String", # Reserved for future use. |
| 249 | "kind": "A String", # This is always *sql#cloneContext*. |
Bu Sun Kim | 715bd7f | 2019-06-14 16:50:42 -0700 | [diff] [blame] | 250 | }, |
| 251 | } |
| 252 | |
Dan O'Meara | dd49464 | 2020-05-01 07:42:23 -0700 | [diff] [blame] | 253 | x__xgafv: string, V1 error format. |
| 254 | Allowed values |
| 255 | 1 - v1 error format |
| 256 | 2 - v2 error format |
Bu Sun Kim | 715bd7f | 2019-06-14 16:50:42 -0700 | [diff] [blame] | 257 | |
| 258 | Returns: |
| 259 | An object of the form: |
| 260 | |
Dmitry Frenkel | 3e17f89 | 2020-10-06 16:46:05 -0700 | [diff] [blame] | 261 | { # An Operation resource. For successful operations that return an Operation resource, only the fields relevant to the operation are populated in the resource. |
Dmitry Frenkel | 3e17f89 | 2020-10-06 16:46:05 -0700 | [diff] [blame] | 262 | "importContext": { # Database instance import context. # The context for import operation, if applicable. |
Bu Sun Kim | 673ec5c | 2020-11-16 11:05:03 -0700 | [diff] [blame] | 263 | "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. |
Dmitry Frenkel | 3e17f89 | 2020-10-06 16:46:05 -0700 | [diff] [blame] | 264 | "csvImportOptions": { # Options for importing data as CSV. |
| 265 | "columns": [ # The columns to which CSV data is imported. If not specified, all columns of the database table are loaded with CSV data. |
| 266 | "A String", |
| 267 | ], |
| 268 | "table": "A String", # The table to which CSV data is imported. |
| 269 | }, |
Bu Sun Kim | 673ec5c | 2020-11-16 11:05:03 -0700 | [diff] [blame] | 270 | "kind": "A String", # This is always *sql#importContext*. |
| 271 | "importUser": "A String", # The PostgreSQL user for this import operation. PostgreSQL instances only. |
| 272 | "fileType": "A String", # The file type for the specified uri. *SQL*: The file contains SQL statements. *CSV*: The file contains CSV data. |
| 273 | "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. |
Dmitry Frenkel | 3e17f89 | 2020-10-06 16:46:05 -0700 | [diff] [blame] | 274 | "bakImportOptions": { # Import parameters specific to SQL Server .BAK files |
| 275 | "encryptionOptions": { |
Dmitry Frenkel | 3e17f89 | 2020-10-06 16:46:05 -0700 | [diff] [blame] | 276 | "pvkPassword": "A String", # Password that encrypts the private key |
Bu Sun Kim | 673ec5c | 2020-11-16 11:05:03 -0700 | [diff] [blame] | 277 | "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. |
| 278 | "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. |
Dmitry Frenkel | 3e17f89 | 2020-10-06 16:46:05 -0700 | [diff] [blame] | 279 | }, |
| 280 | }, |
Dmitry Frenkel | 3e17f89 | 2020-10-06 16:46:05 -0700 | [diff] [blame] | 281 | }, |
Bu Sun Kim | 673ec5c | 2020-11-16 11:05:03 -0700 | [diff] [blame] | 282 | "exportContext": { # Database instance export context. # The context for export operation, if applicable. |
| 283 | "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. |
| 284 | "sqlExportOptions": { # Options for exporting data as SQL statements. |
| 285 | "mysqlExportOptions": { # Options for exporting from MySQL. |
| 286 | "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. If set to *2*, the CHANGE MASTER TO statement is written as a SQL comment, and has no effect. All other values are ignored. |
| 287 | }, |
| 288 | "schemaOnly": True or False, # Export only schemas. |
| 289 | "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. |
| 290 | "A String", |
| 291 | ], |
| 292 | }, |
| 293 | "kind": "A String", # This is always *sql#exportContext*. |
| 294 | "csvExportOptions": { # Options for exporting data as CSV. |
| 295 | "selectQuery": "A String", # The select query used to extract the data. |
| 296 | }, |
| 297 | "fileType": "A String", # The file type for the specified uri. *SQL*: The file contains SQL statements. *CSV*: The file contains CSV data. |
| 298 | "offload": True or False, # Option for export offload. |
| 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 | }, |
| 303 | "endTime": "A String", # The time this operation finished in UTC timezone in RFC 3339 format, for example *2012-11-15T16:19:00.094Z*. |
| 304 | "user": "A String", # The email address of the user who initiated this operation. |
| 305 | "selfLink": "A String", # The URI of this resource. |
| 306 | "status": "A String", # The status of an operation. Valid values are: *PENDING* *RUNNING* *DONE* *SQL_OPERATION_STATUS_UNSPECIFIED* |
| 307 | "insertTime": "A String", # The time this operation was enqueued in UTC timezone in RFC 3339 format, for example *2012-11-15T16:19:00.094Z*. |
| 308 | "targetId": "A String", # Name of the database instance related to this operation. |
| 309 | "targetProject": "A String", # The project ID of the target instance related to this operation. |
| 310 | "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* |
| 311 | "kind": "A String", # This is always *sql#operation*. |
| 312 | "error": { # Database instance operation errors list wrapper. # If errors occurred during processing of this operation, this field will be populated. |
| 313 | "kind": "A String", # This is always *sql#operationErrors*. |
| 314 | "errors": [ # The list of errors encountered while processing this operation. |
| 315 | { # Database instance operation error. |
| 316 | "code": "A String", # Identifies the specific error that occurred. |
| 317 | "message": "A String", # Additional information about the error encountered. |
| 318 | "kind": "A String", # This is always *sql#operationError*. |
| 319 | }, |
| 320 | ], |
| 321 | }, |
| 322 | "targetLink": "A String", |
| 323 | "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. |
| 324 | "startTime": "A String", # The time this operation actually started in UTC timezone in RFC 3339 format, for example *2012-11-15T16:19:00.094Z*. |
Craig Citro | e633be1 | 2015-03-02 13:40:36 -0800 | [diff] [blame] | 325 | }</pre> |
| 326 | </div> |
| 327 | |
| 328 | <div class="method"> |
Dmitry Frenkel | 3e17f89 | 2020-10-06 16:46:05 -0700 | [diff] [blame] | 329 | <code class="details" id="close">close()</code> |
| 330 | <pre>Close httplib2 connections.</pre> |
| 331 | </div> |
| 332 | |
| 333 | <div class="method"> |
Dan O'Meara | dd49464 | 2020-05-01 07:42:23 -0700 | [diff] [blame] | 334 | <code class="details" id="delete">delete(project, instance, x__xgafv=None)</code> |
Craig Citro | e633be1 | 2015-03-02 13:40:36 -0800 | [diff] [blame] | 335 | <pre>Deletes a Cloud SQL instance. |
| 336 | |
| 337 | Args: |
| 338 | project: string, Project ID of the project that contains the instance to be deleted. (required) |
| 339 | 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] | 340 | x__xgafv: string, V1 error format. |
| 341 | Allowed values |
| 342 | 1 - v1 error format |
| 343 | 2 - v2 error format |
Craig Citro | e633be1 | 2015-03-02 13:40:36 -0800 | [diff] [blame] | 344 | |
| 345 | Returns: |
| 346 | An object of the form: |
| 347 | |
Dmitry Frenkel | 3e17f89 | 2020-10-06 16:46:05 -0700 | [diff] [blame] | 348 | { # An Operation resource. For successful operations that return an Operation resource, only the fields relevant to the operation are populated in the resource. |
Dmitry Frenkel | 3e17f89 | 2020-10-06 16:46:05 -0700 | [diff] [blame] | 349 | "importContext": { # Database instance import context. # The context for import operation, if applicable. |
Bu Sun Kim | 673ec5c | 2020-11-16 11:05:03 -0700 | [diff] [blame] | 350 | "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. |
Dmitry Frenkel | 3e17f89 | 2020-10-06 16:46:05 -0700 | [diff] [blame] | 351 | "csvImportOptions": { # Options for importing data as CSV. |
| 352 | "columns": [ # The columns to which CSV data is imported. If not specified, all columns of the database table are loaded with CSV data. |
| 353 | "A String", |
| 354 | ], |
| 355 | "table": "A String", # The table to which CSV data is imported. |
| 356 | }, |
Bu Sun Kim | 673ec5c | 2020-11-16 11:05:03 -0700 | [diff] [blame] | 357 | "kind": "A String", # This is always *sql#importContext*. |
| 358 | "importUser": "A String", # The PostgreSQL user for this import operation. PostgreSQL instances only. |
| 359 | "fileType": "A String", # The file type for the specified uri. *SQL*: The file contains SQL statements. *CSV*: The file contains CSV data. |
| 360 | "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. |
Dmitry Frenkel | 3e17f89 | 2020-10-06 16:46:05 -0700 | [diff] [blame] | 361 | "bakImportOptions": { # Import parameters specific to SQL Server .BAK files |
| 362 | "encryptionOptions": { |
Dmitry Frenkel | 3e17f89 | 2020-10-06 16:46:05 -0700 | [diff] [blame] | 363 | "pvkPassword": "A String", # Password that encrypts the private key |
Bu Sun Kim | 673ec5c | 2020-11-16 11:05:03 -0700 | [diff] [blame] | 364 | "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. |
| 365 | "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. |
Dmitry Frenkel | 3e17f89 | 2020-10-06 16:46:05 -0700 | [diff] [blame] | 366 | }, |
| 367 | }, |
Dmitry Frenkel | 3e17f89 | 2020-10-06 16:46:05 -0700 | [diff] [blame] | 368 | }, |
Bu Sun Kim | 673ec5c | 2020-11-16 11:05:03 -0700 | [diff] [blame] | 369 | "exportContext": { # Database instance export context. # The context for export operation, if applicable. |
| 370 | "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. |
| 371 | "sqlExportOptions": { # Options for exporting data as SQL statements. |
| 372 | "mysqlExportOptions": { # Options for exporting from MySQL. |
| 373 | "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. If set to *2*, the CHANGE MASTER TO statement is written as a SQL comment, and has no effect. All other values are ignored. |
| 374 | }, |
| 375 | "schemaOnly": True or False, # Export only schemas. |
| 376 | "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. |
| 377 | "A String", |
| 378 | ], |
| 379 | }, |
| 380 | "kind": "A String", # This is always *sql#exportContext*. |
| 381 | "csvExportOptions": { # Options for exporting data as CSV. |
| 382 | "selectQuery": "A String", # The select query used to extract the data. |
| 383 | }, |
| 384 | "fileType": "A String", # The file type for the specified uri. *SQL*: The file contains SQL statements. *CSV*: The file contains CSV data. |
| 385 | "offload": True or False, # Option for export offload. |
| 386 | "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. |
| 387 | "A String", |
| 388 | ], |
| 389 | }, |
| 390 | "endTime": "A String", # The time this operation finished in UTC timezone in RFC 3339 format, for example *2012-11-15T16:19:00.094Z*. |
| 391 | "user": "A String", # The email address of the user who initiated this operation. |
| 392 | "selfLink": "A String", # The URI of this resource. |
| 393 | "status": "A String", # The status of an operation. Valid values are: *PENDING* *RUNNING* *DONE* *SQL_OPERATION_STATUS_UNSPECIFIED* |
| 394 | "insertTime": "A String", # The time this operation was enqueued in UTC timezone in RFC 3339 format, for example *2012-11-15T16:19:00.094Z*. |
| 395 | "targetId": "A String", # Name of the database instance related to this operation. |
| 396 | "targetProject": "A String", # The project ID of the target instance related to this operation. |
| 397 | "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* |
| 398 | "kind": "A String", # This is always *sql#operation*. |
| 399 | "error": { # Database instance operation errors list wrapper. # If errors occurred during processing of this operation, this field will be populated. |
| 400 | "kind": "A String", # This is always *sql#operationErrors*. |
| 401 | "errors": [ # The list of errors encountered while processing this operation. |
| 402 | { # Database instance operation error. |
| 403 | "code": "A String", # Identifies the specific error that occurred. |
| 404 | "message": "A String", # Additional information about the error encountered. |
| 405 | "kind": "A String", # This is always *sql#operationError*. |
| 406 | }, |
| 407 | ], |
| 408 | }, |
| 409 | "targetLink": "A String", |
| 410 | "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. |
| 411 | "startTime": "A String", # The time this operation actually started in UTC timezone in RFC 3339 format, for example *2012-11-15T16:19:00.094Z*. |
Bu Sun Kim | 715bd7f | 2019-06-14 16:50:42 -0700 | [diff] [blame] | 412 | }</pre> |
| 413 | </div> |
| 414 | |
| 415 | <div class="method"> |
Dan O'Meara | dd49464 | 2020-05-01 07:42:23 -0700 | [diff] [blame] | 416 | <code class="details" id="demoteMaster">demoteMaster(project, instance, body=None, x__xgafv=None)</code> |
Dmitry Frenkel | 3e17f89 | 2020-10-06 16:46:05 -0700 | [diff] [blame] | 417 | <pre>Demotes the stand-alone instance to be a Cloud SQL read replica for an external database server. |
Bu Sun Kim | 715bd7f | 2019-06-14 16:50:42 -0700 | [diff] [blame] | 418 | |
| 419 | Args: |
| 420 | project: string, ID of the project that contains the instance. (required) |
| 421 | instance: string, Cloud SQL instance name. (required) |
Dan O'Meara | dd49464 | 2020-05-01 07:42:23 -0700 | [diff] [blame] | 422 | body: object, The request body. |
Bu Sun Kim | 715bd7f | 2019-06-14 16:50:42 -0700 | [diff] [blame] | 423 | The object takes the form of: |
| 424 | |
Dmitry Frenkel | 3e17f89 | 2020-10-06 16:46:05 -0700 | [diff] [blame] | 425 | { # Database demote primary instance request. |
| 426 | "demoteMasterContext": { # Database instance demote primary instance context. # Contains details about the demoteMaster operation. |
| 427 | "masterInstanceName": "A String", # The name of the instance which will act as on-premises primary instance in the replication setup. |
| 428 | "kind": "A String", # This is always *sql#demoteMasterContext*. |
| 429 | "verifyGtidConsistency": True or False, # Verify GTID consistency for demote operation. Default value: *True*. Second Generation instances only. Setting this flag to false enables you to bypass GTID consistency check between on-premises primary instance and Cloud SQL instance during the demotion operation but also exposes you to the risk of future replication failures. Change the value only if you know the reason for the GTID divergence and are confident that doing so will not cause any replication issues. |
| 430 | "replicaConfiguration": { # Read-replica configuration for connecting to the on-premises primary instance. # Configuration specific to read-replicas replicating from the on-premises primary instance. |
| 431 | "kind": "A String", # This is always *sql#demoteMasterConfiguration*. |
| 432 | "mysqlReplicaConfiguration": { # Read-replica configuration specific to MySQL databases. # MySQL specific configuration when replicating from a MySQL on-premises primary instance. Replication configuration information such as the username, password, certificates, and keys are not stored in the instance metadata. The configuration information is used only to set up the replication connection and is stored by MySQL in a file named *master.info* in the data directory. |
Dmitry Frenkel | 3e17f89 | 2020-10-06 16:46:05 -0700 | [diff] [blame] | 433 | "clientKey": "A String", # PEM representation of the replica's private key. The corresponsing public key is encoded in the client's certificate. The format of the replica's private key can be either PKCS #1 or PKCS #8. |
Bu Sun Kim | 6502091 | 2020-05-20 12:08:20 -0700 | [diff] [blame] | 434 | "username": "A String", # The username for the replication connection. |
| 435 | "caCertificate": "A String", # PEM representation of the trusted CA's x509 certificate. |
Dmitry Frenkel | 3e17f89 | 2020-10-06 16:46:05 -0700 | [diff] [blame] | 436 | "password": "A String", # The password for the replication connection. |
| 437 | "kind": "A String", # This is always *sql#demoteMasterMysqlReplicaConfiguration*. |
Bu Sun Kim | 673ec5c | 2020-11-16 11:05:03 -0700 | [diff] [blame] | 438 | "clientCertificate": "A String", # PEM representation of the replica's x509 certificate. |
Bu Sun Kim | 6502091 | 2020-05-20 12:08:20 -0700 | [diff] [blame] | 439 | }, |
| 440 | }, |
Bu Sun Kim | 715bd7f | 2019-06-14 16:50:42 -0700 | [diff] [blame] | 441 | }, |
| 442 | } |
| 443 | |
Dan O'Meara | dd49464 | 2020-05-01 07:42:23 -0700 | [diff] [blame] | 444 | x__xgafv: string, V1 error format. |
| 445 | Allowed values |
| 446 | 1 - v1 error format |
| 447 | 2 - v2 error format |
Bu Sun Kim | 715bd7f | 2019-06-14 16:50:42 -0700 | [diff] [blame] | 448 | |
| 449 | Returns: |
| 450 | An object of the form: |
| 451 | |
Dmitry Frenkel | 3e17f89 | 2020-10-06 16:46:05 -0700 | [diff] [blame] | 452 | { # An Operation resource. For successful operations that return an Operation resource, only the fields relevant to the operation are populated in the resource. |
Dmitry Frenkel | 3e17f89 | 2020-10-06 16:46:05 -0700 | [diff] [blame] | 453 | "importContext": { # Database instance import context. # The context for import operation, if applicable. |
Bu Sun Kim | 673ec5c | 2020-11-16 11:05:03 -0700 | [diff] [blame] | 454 | "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. |
Dmitry Frenkel | 3e17f89 | 2020-10-06 16:46:05 -0700 | [diff] [blame] | 455 | "csvImportOptions": { # Options for importing data as CSV. |
| 456 | "columns": [ # The columns to which CSV data is imported. If not specified, all columns of the database table are loaded with CSV data. |
| 457 | "A String", |
| 458 | ], |
| 459 | "table": "A String", # The table to which CSV data is imported. |
| 460 | }, |
Bu Sun Kim | 673ec5c | 2020-11-16 11:05:03 -0700 | [diff] [blame] | 461 | "kind": "A String", # This is always *sql#importContext*. |
| 462 | "importUser": "A String", # The PostgreSQL user for this import operation. PostgreSQL instances only. |
| 463 | "fileType": "A String", # The file type for the specified uri. *SQL*: The file contains SQL statements. *CSV*: The file contains CSV data. |
| 464 | "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. |
Dmitry Frenkel | 3e17f89 | 2020-10-06 16:46:05 -0700 | [diff] [blame] | 465 | "bakImportOptions": { # Import parameters specific to SQL Server .BAK files |
| 466 | "encryptionOptions": { |
Dmitry Frenkel | 3e17f89 | 2020-10-06 16:46:05 -0700 | [diff] [blame] | 467 | "pvkPassword": "A String", # Password that encrypts the private key |
Bu Sun Kim | 673ec5c | 2020-11-16 11:05:03 -0700 | [diff] [blame] | 468 | "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. |
| 469 | "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. |
Dmitry Frenkel | 3e17f89 | 2020-10-06 16:46:05 -0700 | [diff] [blame] | 470 | }, |
| 471 | }, |
Dmitry Frenkel | 3e17f89 | 2020-10-06 16:46:05 -0700 | [diff] [blame] | 472 | }, |
Bu Sun Kim | 673ec5c | 2020-11-16 11:05:03 -0700 | [diff] [blame] | 473 | "exportContext": { # Database instance export context. # The context for export operation, if applicable. |
| 474 | "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. |
| 475 | "sqlExportOptions": { # Options for exporting data as SQL statements. |
| 476 | "mysqlExportOptions": { # Options for exporting from MySQL. |
| 477 | "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. If set to *2*, the CHANGE MASTER TO statement is written as a SQL comment, and has no effect. All other values are ignored. |
| 478 | }, |
| 479 | "schemaOnly": True or False, # Export only schemas. |
| 480 | "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. |
| 481 | "A String", |
| 482 | ], |
| 483 | }, |
| 484 | "kind": "A String", # This is always *sql#exportContext*. |
| 485 | "csvExportOptions": { # Options for exporting data as CSV. |
| 486 | "selectQuery": "A String", # The select query used to extract the data. |
| 487 | }, |
| 488 | "fileType": "A String", # The file type for the specified uri. *SQL*: The file contains SQL statements. *CSV*: The file contains CSV data. |
| 489 | "offload": True or False, # Option for export offload. |
| 490 | "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. |
| 491 | "A String", |
| 492 | ], |
| 493 | }, |
| 494 | "endTime": "A String", # The time this operation finished in UTC timezone in RFC 3339 format, for example *2012-11-15T16:19:00.094Z*. |
| 495 | "user": "A String", # The email address of the user who initiated this operation. |
| 496 | "selfLink": "A String", # The URI of this resource. |
| 497 | "status": "A String", # The status of an operation. Valid values are: *PENDING* *RUNNING* *DONE* *SQL_OPERATION_STATUS_UNSPECIFIED* |
| 498 | "insertTime": "A String", # The time this operation was enqueued in UTC timezone in RFC 3339 format, for example *2012-11-15T16:19:00.094Z*. |
| 499 | "targetId": "A String", # Name of the database instance related to this operation. |
| 500 | "targetProject": "A String", # The project ID of the target instance related to this operation. |
| 501 | "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* |
| 502 | "kind": "A String", # This is always *sql#operation*. |
| 503 | "error": { # Database instance operation errors list wrapper. # If errors occurred during processing of this operation, this field will be populated. |
| 504 | "kind": "A String", # This is always *sql#operationErrors*. |
| 505 | "errors": [ # The list of errors encountered while processing this operation. |
| 506 | { # Database instance operation error. |
| 507 | "code": "A String", # Identifies the specific error that occurred. |
| 508 | "message": "A String", # Additional information about the error encountered. |
| 509 | "kind": "A String", # This is always *sql#operationError*. |
| 510 | }, |
| 511 | ], |
| 512 | }, |
| 513 | "targetLink": "A String", |
| 514 | "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. |
| 515 | "startTime": "A String", # The time this operation actually started in UTC timezone in RFC 3339 format, for example *2012-11-15T16:19:00.094Z*. |
Craig Citro | e633be1 | 2015-03-02 13:40:36 -0800 | [diff] [blame] | 516 | }</pre> |
| 517 | </div> |
| 518 | |
| 519 | <div class="method"> |
Dan O'Meara | dd49464 | 2020-05-01 07:42:23 -0700 | [diff] [blame] | 520 | <code class="details" id="export">export(project, instance, body=None, x__xgafv=None)</code> |
Dmitry Frenkel | 3e17f89 | 2020-10-06 16:46:05 -0700 | [diff] [blame] | 521 | <pre>Exports data from a Cloud SQL instance to a Cloud Storage bucket as a SQL dump or CSV file. |
Craig Citro | e633be1 | 2015-03-02 13:40:36 -0800 | [diff] [blame] | 522 | |
| 523 | Args: |
| 524 | project: string, Project ID of the project that contains the instance to be exported. (required) |
| 525 | 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] | 526 | body: object, The request body. |
Craig Citro | e633be1 | 2015-03-02 13:40:36 -0800 | [diff] [blame] | 527 | The object takes the form of: |
| 528 | |
| 529 | { # Database instance export request. |
Bu Sun Kim | 6502091 | 2020-05-20 12:08:20 -0700 | [diff] [blame] | 530 | "exportContext": { # Database instance export context. # Contains details about the export operation. |
Dmitry Frenkel | 3e17f89 | 2020-10-06 16:46:05 -0700 | [diff] [blame] | 531 | "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. |
Bu Sun Kim | 6502091 | 2020-05-20 12:08:20 -0700 | [diff] [blame] | 532 | "sqlExportOptions": { # Options for exporting data as SQL statements. |
Bu Sun Kim | 673ec5c | 2020-11-16 11:05:03 -0700 | [diff] [blame] | 533 | "mysqlExportOptions": { # Options for exporting from MySQL. |
| 534 | "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. If set to *2*, the CHANGE MASTER TO statement is written as a SQL comment, and has no effect. All other values are ignored. |
| 535 | }, |
Dmitry Frenkel | 3e17f89 | 2020-10-06 16:46:05 -0700 | [diff] [blame] | 536 | "schemaOnly": True or False, # Export only schemas. |
| 537 | "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. |
Bu Sun Kim | 6502091 | 2020-05-20 12:08:20 -0700 | [diff] [blame] | 538 | "A String", |
Craig Citro | e633be1 | 2015-03-02 13:40:36 -0800 | [diff] [blame] | 539 | ], |
| 540 | }, |
Bu Sun Kim | 673ec5c | 2020-11-16 11:05:03 -0700 | [diff] [blame] | 541 | "kind": "A String", # This is always *sql#exportContext*. |
| 542 | "csvExportOptions": { # Options for exporting data as CSV. |
| 543 | "selectQuery": "A String", # The select query used to extract the data. |
| 544 | }, |
| 545 | "fileType": "A String", # The file type for the specified uri. *SQL*: The file contains SQL statements. *CSV*: The file contains CSV data. |
| 546 | "offload": True or False, # Option for export offload. |
| 547 | "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. |
| 548 | "A String", |
| 549 | ], |
Craig Citro | e633be1 | 2015-03-02 13:40:36 -0800 | [diff] [blame] | 550 | }, |
| 551 | } |
| 552 | |
Dan O'Meara | dd49464 | 2020-05-01 07:42:23 -0700 | [diff] [blame] | 553 | x__xgafv: string, V1 error format. |
| 554 | Allowed values |
| 555 | 1 - v1 error format |
| 556 | 2 - v2 error format |
Craig Citro | e633be1 | 2015-03-02 13:40:36 -0800 | [diff] [blame] | 557 | |
| 558 | Returns: |
| 559 | An object of the form: |
| 560 | |
Dmitry Frenkel | 3e17f89 | 2020-10-06 16:46:05 -0700 | [diff] [blame] | 561 | { # An Operation resource. For successful operations that return an Operation resource, only the fields relevant to the operation are populated in the resource. |
Dmitry Frenkel | 3e17f89 | 2020-10-06 16:46:05 -0700 | [diff] [blame] | 562 | "importContext": { # Database instance import context. # The context for import operation, if applicable. |
Bu Sun Kim | 673ec5c | 2020-11-16 11:05:03 -0700 | [diff] [blame] | 563 | "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. |
Dmitry Frenkel | 3e17f89 | 2020-10-06 16:46:05 -0700 | [diff] [blame] | 564 | "csvImportOptions": { # Options for importing data as CSV. |
| 565 | "columns": [ # The columns to which CSV data is imported. If not specified, all columns of the database table are loaded with CSV data. |
| 566 | "A String", |
| 567 | ], |
| 568 | "table": "A String", # The table to which CSV data is imported. |
| 569 | }, |
Bu Sun Kim | 673ec5c | 2020-11-16 11:05:03 -0700 | [diff] [blame] | 570 | "kind": "A String", # This is always *sql#importContext*. |
| 571 | "importUser": "A String", # The PostgreSQL user for this import operation. PostgreSQL instances only. |
| 572 | "fileType": "A String", # The file type for the specified uri. *SQL*: The file contains SQL statements. *CSV*: The file contains CSV data. |
| 573 | "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. |
Dmitry Frenkel | 3e17f89 | 2020-10-06 16:46:05 -0700 | [diff] [blame] | 574 | "bakImportOptions": { # Import parameters specific to SQL Server .BAK files |
| 575 | "encryptionOptions": { |
Dmitry Frenkel | 3e17f89 | 2020-10-06 16:46:05 -0700 | [diff] [blame] | 576 | "pvkPassword": "A String", # Password that encrypts the private key |
Bu Sun Kim | 673ec5c | 2020-11-16 11:05:03 -0700 | [diff] [blame] | 577 | "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. |
| 578 | "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. |
Dmitry Frenkel | 3e17f89 | 2020-10-06 16:46:05 -0700 | [diff] [blame] | 579 | }, |
| 580 | }, |
Dmitry Frenkel | 3e17f89 | 2020-10-06 16:46:05 -0700 | [diff] [blame] | 581 | }, |
Bu Sun Kim | 673ec5c | 2020-11-16 11:05:03 -0700 | [diff] [blame] | 582 | "exportContext": { # Database instance export context. # The context for export operation, if applicable. |
| 583 | "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. |
| 584 | "sqlExportOptions": { # Options for exporting data as SQL statements. |
| 585 | "mysqlExportOptions": { # Options for exporting from MySQL. |
| 586 | "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. If set to *2*, the CHANGE MASTER TO statement is written as a SQL comment, and has no effect. All other values are ignored. |
| 587 | }, |
| 588 | "schemaOnly": True or False, # Export only schemas. |
| 589 | "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. |
| 590 | "A String", |
| 591 | ], |
| 592 | }, |
| 593 | "kind": "A String", # This is always *sql#exportContext*. |
| 594 | "csvExportOptions": { # Options for exporting data as CSV. |
| 595 | "selectQuery": "A String", # The select query used to extract the data. |
| 596 | }, |
| 597 | "fileType": "A String", # The file type for the specified uri. *SQL*: The file contains SQL statements. *CSV*: The file contains CSV data. |
| 598 | "offload": True or False, # Option for export offload. |
| 599 | "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. |
| 600 | "A String", |
| 601 | ], |
| 602 | }, |
| 603 | "endTime": "A String", # The time this operation finished in UTC timezone in RFC 3339 format, for example *2012-11-15T16:19:00.094Z*. |
| 604 | "user": "A String", # The email address of the user who initiated this operation. |
| 605 | "selfLink": "A String", # The URI of this resource. |
| 606 | "status": "A String", # The status of an operation. Valid values are: *PENDING* *RUNNING* *DONE* *SQL_OPERATION_STATUS_UNSPECIFIED* |
| 607 | "insertTime": "A String", # The time this operation was enqueued in UTC timezone in RFC 3339 format, for example *2012-11-15T16:19:00.094Z*. |
| 608 | "targetId": "A String", # Name of the database instance related to this operation. |
| 609 | "targetProject": "A String", # The project ID of the target instance related to this operation. |
| 610 | "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* |
| 611 | "kind": "A String", # This is always *sql#operation*. |
| 612 | "error": { # Database instance operation errors list wrapper. # If errors occurred during processing of this operation, this field will be populated. |
| 613 | "kind": "A String", # This is always *sql#operationErrors*. |
| 614 | "errors": [ # The list of errors encountered while processing this operation. |
| 615 | { # Database instance operation error. |
| 616 | "code": "A String", # Identifies the specific error that occurred. |
| 617 | "message": "A String", # Additional information about the error encountered. |
| 618 | "kind": "A String", # This is always *sql#operationError*. |
| 619 | }, |
| 620 | ], |
| 621 | }, |
| 622 | "targetLink": "A String", |
| 623 | "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. |
| 624 | "startTime": "A String", # The time this operation actually started in UTC timezone in RFC 3339 format, for example *2012-11-15T16:19:00.094Z*. |
Jon Wayne Parrott | 36e41bc | 2016-02-19 16:02:29 -0800 | [diff] [blame] | 625 | }</pre> |
| 626 | </div> |
| 627 | |
| 628 | <div class="method"> |
Dan O'Meara | dd49464 | 2020-05-01 07:42:23 -0700 | [diff] [blame] | 629 | <code class="details" id="failover">failover(project, instance, body=None, x__xgafv=None)</code> |
Dmitry Frenkel | 3e17f89 | 2020-10-06 16:46:05 -0700 | [diff] [blame] | 630 | <pre>Failover the instance to its failover replica instance. Using this operation might cause your instance to restart. |
Jon Wayne Parrott | 36e41bc | 2016-02-19 16:02:29 -0800 | [diff] [blame] | 631 | |
| 632 | Args: |
| 633 | project: string, ID of the project that contains the read replica. (required) |
| 634 | 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] | 635 | body: object, The request body. |
Jon Wayne Parrott | 36e41bc | 2016-02-19 16:02:29 -0800 | [diff] [blame] | 636 | The object takes the form of: |
| 637 | |
| 638 | { # Instance failover request. |
Bu Sun Kim | 6502091 | 2020-05-20 12:08:20 -0700 | [diff] [blame] | 639 | "failoverContext": { # Database instance failover context. # Failover Context. |
Dmitry Frenkel | 3e17f89 | 2020-10-06 16:46:05 -0700 | [diff] [blame] | 640 | "kind": "A String", # This is always *sql#failoverContext*. |
Bu Sun Kim | 673ec5c | 2020-11-16 11:05:03 -0700 | [diff] [blame] | 641 | "settingsVersion": "A String", # The current settings version of this instance. Request will be rejected if this version doesn't match the current settings version. |
Jon Wayne Parrott | 36e41bc | 2016-02-19 16:02:29 -0800 | [diff] [blame] | 642 | }, |
| 643 | } |
| 644 | |
Dan O'Meara | dd49464 | 2020-05-01 07:42:23 -0700 | [diff] [blame] | 645 | x__xgafv: string, V1 error format. |
| 646 | Allowed values |
| 647 | 1 - v1 error format |
| 648 | 2 - v2 error format |
Jon Wayne Parrott | 36e41bc | 2016-02-19 16:02:29 -0800 | [diff] [blame] | 649 | |
| 650 | Returns: |
| 651 | An object of the form: |
| 652 | |
Dmitry Frenkel | 3e17f89 | 2020-10-06 16:46:05 -0700 | [diff] [blame] | 653 | { # An Operation resource. For successful operations that return an Operation resource, only the fields relevant to the operation are populated in the resource. |
Dmitry Frenkel | 3e17f89 | 2020-10-06 16:46:05 -0700 | [diff] [blame] | 654 | "importContext": { # Database instance import context. # The context for import operation, if applicable. |
Bu Sun Kim | 673ec5c | 2020-11-16 11:05:03 -0700 | [diff] [blame] | 655 | "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. |
Dmitry Frenkel | 3e17f89 | 2020-10-06 16:46:05 -0700 | [diff] [blame] | 656 | "csvImportOptions": { # Options for importing data as CSV. |
| 657 | "columns": [ # The columns to which CSV data is imported. If not specified, all columns of the database table are loaded with CSV data. |
| 658 | "A String", |
| 659 | ], |
| 660 | "table": "A String", # The table to which CSV data is imported. |
| 661 | }, |
Bu Sun Kim | 673ec5c | 2020-11-16 11:05:03 -0700 | [diff] [blame] | 662 | "kind": "A String", # This is always *sql#importContext*. |
| 663 | "importUser": "A String", # The PostgreSQL user for this import operation. PostgreSQL instances only. |
| 664 | "fileType": "A String", # The file type for the specified uri. *SQL*: The file contains SQL statements. *CSV*: The file contains CSV data. |
| 665 | "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. |
Dmitry Frenkel | 3e17f89 | 2020-10-06 16:46:05 -0700 | [diff] [blame] | 666 | "bakImportOptions": { # Import parameters specific to SQL Server .BAK files |
| 667 | "encryptionOptions": { |
Dmitry Frenkel | 3e17f89 | 2020-10-06 16:46:05 -0700 | [diff] [blame] | 668 | "pvkPassword": "A String", # Password that encrypts the private key |
Bu Sun Kim | 673ec5c | 2020-11-16 11:05:03 -0700 | [diff] [blame] | 669 | "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. |
| 670 | "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. |
Dmitry Frenkel | 3e17f89 | 2020-10-06 16:46:05 -0700 | [diff] [blame] | 671 | }, |
| 672 | }, |
Dmitry Frenkel | 3e17f89 | 2020-10-06 16:46:05 -0700 | [diff] [blame] | 673 | }, |
Bu Sun Kim | 673ec5c | 2020-11-16 11:05:03 -0700 | [diff] [blame] | 674 | "exportContext": { # Database instance export context. # The context for export operation, if applicable. |
| 675 | "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. |
| 676 | "sqlExportOptions": { # Options for exporting data as SQL statements. |
| 677 | "mysqlExportOptions": { # Options for exporting from MySQL. |
| 678 | "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. If set to *2*, the CHANGE MASTER TO statement is written as a SQL comment, and has no effect. All other values are ignored. |
| 679 | }, |
| 680 | "schemaOnly": True or False, # Export only schemas. |
| 681 | "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. |
| 682 | "A String", |
| 683 | ], |
| 684 | }, |
| 685 | "kind": "A String", # This is always *sql#exportContext*. |
| 686 | "csvExportOptions": { # Options for exporting data as CSV. |
| 687 | "selectQuery": "A String", # The select query used to extract the data. |
| 688 | }, |
| 689 | "fileType": "A String", # The file type for the specified uri. *SQL*: The file contains SQL statements. *CSV*: The file contains CSV data. |
| 690 | "offload": True or False, # Option for export offload. |
| 691 | "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. |
| 692 | "A String", |
| 693 | ], |
| 694 | }, |
| 695 | "endTime": "A String", # The time this operation finished in UTC timezone in RFC 3339 format, for example *2012-11-15T16:19:00.094Z*. |
| 696 | "user": "A String", # The email address of the user who initiated this operation. |
| 697 | "selfLink": "A String", # The URI of this resource. |
| 698 | "status": "A String", # The status of an operation. Valid values are: *PENDING* *RUNNING* *DONE* *SQL_OPERATION_STATUS_UNSPECIFIED* |
| 699 | "insertTime": "A String", # The time this operation was enqueued in UTC timezone in RFC 3339 format, for example *2012-11-15T16:19:00.094Z*. |
| 700 | "targetId": "A String", # Name of the database instance related to this operation. |
| 701 | "targetProject": "A String", # The project ID of the target instance related to this operation. |
| 702 | "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* |
| 703 | "kind": "A String", # This is always *sql#operation*. |
| 704 | "error": { # Database instance operation errors list wrapper. # If errors occurred during processing of this operation, this field will be populated. |
| 705 | "kind": "A String", # This is always *sql#operationErrors*. |
| 706 | "errors": [ # The list of errors encountered while processing this operation. |
| 707 | { # Database instance operation error. |
| 708 | "code": "A String", # Identifies the specific error that occurred. |
| 709 | "message": "A String", # Additional information about the error encountered. |
| 710 | "kind": "A String", # This is always *sql#operationError*. |
| 711 | }, |
| 712 | ], |
| 713 | }, |
| 714 | "targetLink": "A String", |
| 715 | "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. |
| 716 | "startTime": "A String", # The time this operation actually started in UTC timezone in RFC 3339 format, for example *2012-11-15T16:19:00.094Z*. |
Craig Citro | e633be1 | 2015-03-02 13:40:36 -0800 | [diff] [blame] | 717 | }</pre> |
| 718 | </div> |
| 719 | |
| 720 | <div class="method"> |
Dan O'Meara | dd49464 | 2020-05-01 07:42:23 -0700 | [diff] [blame] | 721 | <code class="details" id="get">get(project, instance, x__xgafv=None)</code> |
Craig Citro | e633be1 | 2015-03-02 13:40:36 -0800 | [diff] [blame] | 722 | <pre>Retrieves a resource containing information about a Cloud SQL instance. |
| 723 | |
| 724 | Args: |
| 725 | project: string, Project ID of the project that contains the instance. (required) |
| 726 | 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] | 727 | x__xgafv: string, V1 error format. |
| 728 | Allowed values |
| 729 | 1 - v1 error format |
| 730 | 2 - v2 error format |
Craig Citro | e633be1 | 2015-03-02 13:40:36 -0800 | [diff] [blame] | 731 | |
| 732 | Returns: |
| 733 | An object of the form: |
| 734 | |
Dmitry Frenkel | 3e17f89 | 2020-10-06 16:46:05 -0700 | [diff] [blame] | 735 | { # A Cloud SQL instance resource. Next field: 36 |
Bu Sun Kim | 673ec5c | 2020-11-16 11:05:03 -0700 | [diff] [blame] | 736 | "gceZone": "A String", # The Compute Engine zone that the instance is currently serving from. This value could be different from the zone that was specified when the instance was created if the instance has failed over to its secondary zone. |
| 737 | "onPremisesConfiguration": { # On-premises instance configuration. # Configuration specific to on-premises instances. |
| 738 | "clientKey": "A String", # PEM representation of the replica's private key. The corresponsing public key is encoded in the client's certificate. |
| 739 | "username": "A String", # The username for connecting to on-premises instance. |
| 740 | "password": "A String", # The password for connecting to on-premises instance. |
| 741 | "kind": "A String", # This is always *sql#onPremisesConfiguration*. |
| 742 | "hostPort": "A String", # The host and port of the on-premises instance in host:port format |
| 743 | "caCertificate": "A String", # PEM representation of the trusted CA's x509 certificate. |
| 744 | "clientCertificate": "A String", # PEM representation of the replica's x509 certificate. |
| 745 | "dumpFilePath": "A String", # The dump file to create the Cloud SQL replica. |
| 746 | }, |
| 747 | "satisfiesPzs": True or False, # The status indicating if instance satisfies physical zone separation. Reserved for future use. |
| 748 | "scheduledMaintenance": { # Any scheduled maintenancce for this instance. # The start time of any upcoming scheduled maintenance for this instance. |
| 749 | "startTime": "A String", # The start time of any upcoming scheduled maintenance for this instance. |
| 750 | "canDefer": True or False, |
| 751 | "canReschedule": True or False, # If the scheduled maintenance can be rescheduled. |
| 752 | }, |
| 753 | "databaseVersion": "A String", # The database engine type and version. The *databaseVersion* field cannot be changed after instance creation. MySQL instances: *MYSQL_8_0*, *MYSQL_5_7* (default), or *MYSQL_5_6*. PostgreSQL instances: *POSTGRES_9_6*, *POSTGRES_10*, *POSTGRES_11* or *POSTGRES_12* (default). SQL Server instances: *SQLSERVER_2017_STANDARD* (default), *SQLSERVER_2017_ENTERPRISE*, *SQLSERVER_2017_EXPRESS*, or *SQLSERVER_2017_WEB*. |
| 754 | "diskEncryptionStatus": { # Disk encryption status for an instance. # Disk encryption status specific to an instance. Applies only to Second Generation instances. |
| 755 | "kind": "A String", # This is always *sql#diskEncryptionStatus*. |
| 756 | "kmsKeyVersionName": "A String", # KMS key version used to encrypt the Cloud SQL instance resource |
| 757 | }, |
| 758 | "selfLink": "A String", # The URI of this resource. |
| 759 | "suspensionReason": [ # If the instance state is SUSPENDED, the reason for the suspension. |
| 760 | "A String", |
| 761 | ], |
Dmitry Frenkel | 3e17f89 | 2020-10-06 16:46:05 -0700 | [diff] [blame] | 762 | "region": "A String", # The geographical region. Can be *us-central* (*FIRST_GEN* instances only) *us-central1* (*SECOND_GEN* instances only) *asia-east1* or *europe-west1*. Defaults to *us-central* or *us-central1* depending on the instance type. The region cannot be changed after instance creation. |
Bu Sun Kim | 673ec5c | 2020-11-16 11:05:03 -0700 | [diff] [blame] | 763 | "maxDiskSize": "A String", # The maximum disk size of the instance in bytes. |
| 764 | "masterInstanceName": "A String", # The name of the instance which will act as primary in the replication setup. |
| 765 | "serviceAccountEmailAddress": "A String", # The service account email address assigned to the instance. This property is applicable only to Second Generation instances. |
| 766 | "replicaConfiguration": { # Read-replica configuration for connecting to the primary instance. # Configuration specific to failover replicas and read replicas. |
| 767 | "mysqlReplicaConfiguration": { # Read-replica configuration specific to MySQL databases. # MySQL specific configuration when replicating from a MySQL on-premises primary instance. Replication configuration information such as the username, password, certificates, and keys are not stored in the instance metadata. The configuration information is used only to set up the replication connection and is stored by MySQL in a file named *master.info* in the data directory. |
| 768 | "clientKey": "A String", # PEM representation of the replica's private key. The corresponsing public key is encoded in the client's certificate. |
| 769 | "kind": "A String", # This is always *sql#mysqlReplicaConfiguration*. |
| 770 | "caCertificate": "A String", # PEM representation of the trusted CA's x509 certificate. |
| 771 | "masterHeartbeatPeriod": "A String", # Interval in milliseconds between replication heartbeats. |
| 772 | "dumpFilePath": "A String", # Path to a SQL dump file in Google Cloud Storage from which the replica instance is to be created. The URI is in the form gs://bucketName/fileName. Compressed gzip files (.gz) are also supported. Dumps have the binlog co-ordinates from which replication begins. This can be accomplished by setting --master-data to 1 when using mysqldump. |
| 773 | "username": "A String", # The username for the replication connection. |
| 774 | "sslCipher": "A String", # A list of permissible ciphers to use for SSL encryption. |
| 775 | "connectRetryInterval": 42, # Seconds to wait between connect retries. MySQL's default is 60 seconds. |
| 776 | "verifyServerCertificate": True or False, # Whether or not to check the primary instance's Common Name value in the certificate that it sends during the SSL handshake. |
| 777 | "clientCertificate": "A String", # PEM representation of the replica's x509 certificate. |
| 778 | "password": "A String", # The password for the replication connection. |
| 779 | }, |
| 780 | "kind": "A String", # This is always *sql#replicaConfiguration*. |
| 781 | "failoverTarget": True or False, # Specifies if the replica is the failover target. If the field is set to *true* the replica will be designated as a failover replica. In case the primary instance fails, the replica instance will be promoted as the new primary instance. Only one replica can be specified as failover target, and the replica has to be in different zone with the primary instance. |
| 782 | }, |
| 783 | "kind": "A String", # This is always *sql#instance*. |
| 784 | "instanceType": "A String", # The instance type. This can be one of the following. *CLOUD_SQL_INSTANCE*: A Cloud SQL instance that is not replicating from a primary instance. *ON_PREMISES_INSTANCE*: An instance running on the customer's premises. *READ_REPLICA_INSTANCE*: A Cloud SQL instance configured as a read-replica. |
| 785 | "name": "A String", # Name of the Cloud SQL instance. This does not include the project ID. |
| 786 | "serverCaCert": { # SslCerts Resource # SSL configuration. |
| 787 | "certSerialNumber": "A String", # Serial number, as extracted from the certificate. |
| 788 | "instance": "A String", # Name of the database instance. |
| 789 | "kind": "A String", # This is always *sql#sslCert*. |
| 790 | "createTime": "A String", # The time when the certificate was created in RFC 3339 format, for example *2012-11-15T16:19:00.094Z* |
| 791 | "cert": "A String", # PEM representation. |
| 792 | "sha1Fingerprint": "A String", # Sha1 Fingerprint. |
| 793 | "selfLink": "A String", # The URI of this resource. |
| 794 | "commonName": "A String", # User supplied name. Constrained to [a-zA-Z.-_ ]+. |
| 795 | "expirationTime": "A String", # The time when the certificate expires in RFC 3339 format, for example *2012-11-15T16:19:00.094Z*. |
| 796 | }, |
| 797 | "currentDiskSize": "A String", # The current disk usage of the instance in bytes. This property has been deprecated. Use the "cloudsql.googleapis.com/database/disk/bytes_used" metric in Cloud Monitoring API instead. Please see this announcement for details. |
| 798 | "project": "A String", # The project ID of the project containing the Cloud SQL instance. The Google apps domain is prefixed if applicable. |
| 799 | "diskEncryptionConfiguration": { # Disk encryption configuration for an instance. # Disk encryption configuration specific to an instance. Applies only to Second Generation instances. |
| 800 | "kmsKeyName": "A String", # Resource name of KMS key for disk encryption |
| 801 | "kind": "A String", # This is always *sql#diskEncryptionConfiguration*. |
| 802 | }, |
| 803 | "state": "A String", # The current serving state of the Cloud SQL instance. This can be one of the following. *SQL_INSTANCE_STATE_UNSPECIFIED*: The state of the instance is unknown. *RUNNABLE*: The instance has been stopped by owner. It is not currently running, but it's ready to be restarted. *SUSPENDED*: The instance is not available, for example due to problems with billing. for example due to problems with billing. *PENDING_DELETE*: The instance is being deleted. *PENDING_CREATE*: The instance is being created. *MAINTENANCE*: The instance is down for maintenance. *FAILED*: The instance creation failed. |
| 804 | "failoverReplica": { # The name and status of the failover replica. This property is applicable only to Second Generation instances. |
| 805 | "available": True or False, # The availability status of the failover replica. A false status indicates that the failover replica is out of sync. The primary instance can only failover to the failover replica when the status is true. |
| 806 | "name": "A String", # The name of the failover replica. If specified at instance creation, a failover replica is created for the instance. The name doesn't include the project ID. This property is applicable only to Second Generation instances. |
| 807 | }, |
| 808 | "ipAddresses": [ # The assigned IP addresses for the instance. |
| 809 | { # Database instance IP Mapping. |
| 810 | "type": "A String", # The type of this IP address. A *PRIMARY* address is a public address that can accept incoming connections. A *PRIVATE* address is a private address that can accept incoming connections. An *OUTGOING* address is the source address of connections originating from the instance, if supported. |
| 811 | "timeToRetire": "A String", # The due time for this IP to be retired in RFC 3339 format, for example *2012-11-15T16:19:00.094Z*. This field is only available when the IP is scheduled to be retired. |
| 812 | "ipAddress": "A String", # The IP address assigned. |
| 813 | }, |
| 814 | ], |
| 815 | "ipv6Address": "A String", # The IPv6 address assigned to the instance. (Deprecated) This property was applicable only to First Generation instances. |
Dmitry Frenkel | 3e17f89 | 2020-10-06 16:46:05 -0700 | [diff] [blame] | 816 | "settings": { # Database instance settings. # The user settings. |
Bu Sun Kim | 673ec5c | 2020-11-16 11:05:03 -0700 | [diff] [blame] | 817 | "activeDirectoryConfig": { # Active Directory configuration, relevant only for Cloud SQL for SQL Server. # Active Directory configuration, relevant only for Cloud SQL for SQL Server. |
| 818 | "kind": "A String", # This is always sql#activeDirectoryConfig. |
| 819 | "domain": "A String", # The name of the domain (e.g., mydomain.com). |
Dmitry Frenkel | 3e17f89 | 2020-10-06 16:46:05 -0700 | [diff] [blame] | 820 | }, |
Dmitry Frenkel | 3e17f89 | 2020-10-06 16:46:05 -0700 | [diff] [blame] | 821 | "denyMaintenancePeriods": [ # Deny maintenance periods |
| 822 | { # Deny Maintenance Periods. This specifies a date range during when all CSA rollout will be denied. |
| 823 | "startDate": "A String", # "deny maintenance period" start date. If the year of the start date is empty, the year of the end date also must be empty. In this case, it means the deny maintenance period recurs every year. The date is in format yyyy-mm-dd i.e., 2020-11-01, or mm-dd, i.e., 11-01 |
| 824 | "time": "A String", # Time in UTC when the "deny maintenance period" starts on start_date and ends on end_date. The time is in format: HH:mm:SS, i.e., 00:00:00 |
| 825 | "endDate": "A String", # "deny maintenance period" end date. If the year of the end date is empty, the year of the start date also must be empty. In this case, it means the deny maintenance period recurs every year. The date is in format yyyy-mm-dd i.e., 2020-11-01, or mm-dd, i.e., 11-01 |
| 826 | }, |
| 827 | ], |
Bu Sun Kim | 673ec5c | 2020-11-16 11:05:03 -0700 | [diff] [blame] | 828 | "authorizedGaeApplications": [ # The App Engine app IDs that can access this instance. (Deprecated) Applied to First Generation instances only. |
| 829 | "A String", |
| 830 | ], |
| 831 | "backupConfiguration": { # Database instance backup configuration. # The daily backup configuration for the instance. |
| 832 | "kind": "A String", # This is always *sql#backupConfiguration*. |
| 833 | "replicationLogArchivingEnabled": True or False, # Reserved for future use. |
| 834 | "pointInTimeRecoveryEnabled": True or False, # Reserved for future use. |
| 835 | "binaryLogEnabled": True or False, # (MySQL only) Whether binary log is enabled. If backup configuration is disabled, binarylog must be disabled as well. |
| 836 | "startTime": "A String", # Start time for the daily backup configuration in UTC timezone in the 24 hour format - *HH:MM*. |
| 837 | "enabled": True or False, # Whether this configuration is enabled. |
| 838 | "location": "A String", # Location of the backup |
| 839 | "transactionLogRetentionDays": 42, # The number of days of transaction logs we retain for point in time restore, from 1-7. |
| 840 | "backupRetentionSettings": { # We currently only support backup retention by specifying the number of backups we will retain. # Backup retention settings. |
| 841 | "retainedBackups": 42, # Depending on the value of retention_unit, this is used to determine if a backup needs to be deleted. If retention_unit is 'COUNT', we will retain this many backups. |
| 842 | "retentionUnit": "A String", # The unit that 'retained_backups' represents. |
| 843 | }, |
| 844 | }, |
| 845 | "databaseFlags": [ # The database flags passed to the instance at startup. |
| 846 | { # Database flags for Cloud SQL instances. |
| 847 | "value": "A String", # The value of the flag. Booleans are set to *on* for true and *off* for false. This field must be omitted if the flag doesn't take a value. |
| 848 | "name": "A String", # The name of the flag. These flags are passed at instance startup, so include both server options and system variables for MySQL. Flags are specified with underscores, not hyphens. For more information, see Configuring Database Flags in the Cloud SQL documentation. |
| 849 | }, |
| 850 | ], |
| 851 | "ipConfiguration": { # IP Management configuration. # The settings for IP Management. This allows to enable or disable the instance IP and manage which external networks can connect to the instance. The IPv4 address cannot be disabled for Second Generation instances. |
| 852 | "authorizedNetworks": [ # The list of external networks that are allowed to connect to the instance using the IP. In 'CIDR' notation, also known as 'slash' notation (for example: *192.168.100.0/24*). |
| 853 | { # An entry for an Access Control list. |
| 854 | "kind": "A String", # This is always *sql#aclEntry*. |
| 855 | "expirationTime": "A String", # The time when this access control entry expires in RFC 3339 format, for example *2012-11-15T16:19:00.094Z*. |
| 856 | "name": "A String", # Optional. A label to identify this entry. |
| 857 | "value": "A String", # The allowlisted value for the access control list. |
| 858 | }, |
| 859 | ], |
| 860 | "requireSsl": True or False, # Whether SSL connections over IP are enforced or not. |
| 861 | "privateNetwork": "A String", # The resource link for the VPC network from which the Cloud SQL instance is accessible for private IP. For example, */projects/myProject/global/networks/default*. This setting can be updated, but it cannot be removed after it is set. |
| 862 | "ipv4Enabled": True or False, # Whether the instance is assigned a public IP address or not. |
| 863 | }, |
| 864 | "tier": "A String", # The tier (or machine type) for this instance, for example *db-n1-standard-1* (MySQL instances) or *db-custom-1-3840* (PostgreSQL instances). |
| 865 | "userLabels": { # User-provided labels, represented as a dictionary where each label is a single key value pair. |
| 866 | "a_key": "A String", |
| 867 | }, |
| 868 | "settingsVersion": "A String", # The version of instance settings. This is a required field for update method to make sure concurrent updates are handled properly. During update, use the most recent settingsVersion value for this instance and do not try to update this value. |
| 869 | "dataDiskType": "A String", # The type of data disk: PD_SSD (default) or PD_HDD. Not used for First Generation instances. |
| 870 | "replicationType": "A String", # The type of replication this instance uses. This can be either *ASYNCHRONOUS* or *SYNCHRONOUS*. (Deprecated_ This property was only applicable to First Generation instances. |
| 871 | "locationPreference": { # Preferred location. This specifies where a Cloud SQL instance is located, either in a specific Compute Engine zone, or co-located with an App Engine application. Note that if the preferred location is not available, the instance will be located as close as possible within the region. Only one location may be specified. # The location preference settings. This allows the instance to be located as near as possible to either an App Engine app or Compute Engine zone for better performance. App Engine co-location was only applicable to First Generation instances. |
| 872 | "secondaryZone": "A String", # The preferred Compute Engine zone for the secondary/failover (for example: us-central1-a, us-central1-b, etc.). Reserved for future use. |
| 873 | "kind": "A String", # This is always *sql#locationPreference*. |
| 874 | "followGaeApplication": "A String", # The App Engine application to follow, it must be in the same region as the Cloud SQL instance. |
| 875 | "zone": "A String", # The preferred Compute Engine zone (for example: us-central1-a, us-central1-b, etc.). |
| 876 | }, |
| 877 | "maintenanceWindow": { # Maintenance window. This specifies when a Cloud SQL instance is restarted for system maintenance purposes. # The maintenance window for this instance. This specifies when the instance can be restarted for maintenance purposes. |
| 878 | "kind": "A String", # This is always *sql#maintenanceWindow*. |
| 879 | "updateTrack": "A String", # Maintenance timing setting: *canary* (Earlier) or *stable* (Later). Learn more. |
| 880 | "day": 42, # day of week (1-7), starting on Monday. |
| 881 | "hour": 42, # hour of day - 0 to 23. |
| 882 | }, |
| 883 | "storageAutoResizeLimit": "A String", # The maximum size to which storage capacity can be automatically increased. The default value is 0, which specifies that there is no limit. |
| 884 | "crashSafeReplicationEnabled": True or False, # Configuration specific to read replica instances. Indicates whether database flags for crash-safe replication are enabled. This property was only applicable to First Generation instances. |
| 885 | "storageAutoResize": True or False, # Configuration to increase storage size automatically. The default value is true. |
| 886 | "dataDiskSizeGb": "A String", # The size of data disk, in GB. The data disk size minimum is 10GB. |
| 887 | "availabilityType": "A String", # Availability type. Potential values: *ZONAL*: The instance serves data from only one zone. Outages in that zone affect data accessibility. *REGIONAL*: The instance can serve data from more than one zone in a region (it is highly available). For more information, see Overview of the High Availability Configuration. |
| 888 | "kind": "A String", # This is always *sql#settings*. |
| 889 | "activationPolicy": "A String", # The activation policy specifies when the instance is activated; it is applicable only when the instance state is RUNNABLE. Valid values: *ALWAYS*: The instance is on, and remains so even in the absence of connection requests. *NEVER*: The instance is off; it is not activated, even if a connection request arrives. |
| 890 | "databaseReplicationEnabled": True or False, # Configuration specific to read replica instances. Indicates whether replication is enabled or not. |
| 891 | "pricingPlan": "A String", # The pricing plan for this instance. This can be either *PER_USE* or *PACKAGE*. Only *PER_USE* is supported for Second Generation instances. |
| 892 | "collation": "A String", # The name of server Instance collation. |
Dmitry Frenkel | 3e17f89 | 2020-10-06 16:46:05 -0700 | [diff] [blame] | 893 | }, |
Bu Sun Kim | 673ec5c | 2020-11-16 11:05:03 -0700 | [diff] [blame] | 894 | "secondaryGceZone": "A String", # The Compute Engine zone that the failover instance is currently serving from for a regional instance. This value could be different from the zone that was specified when the instance was created if the instance has failed over to its secondary/failover zone. Reserved for future use. |
| 895 | "backendType": "A String", # *SECOND_GEN*: Cloud SQL database instance. *EXTERNAL*: A database server that is not managed by Google. This property is read-only; use the *tier* property in the *settings* object to determine the database type. |
Dmitry Frenkel | 3e17f89 | 2020-10-06 16:46:05 -0700 | [diff] [blame] | 896 | "replicaNames": [ # The replicas of the instance. |
| 897 | "A String", |
| 898 | ], |
Bu Sun Kim | 673ec5c | 2020-11-16 11:05:03 -0700 | [diff] [blame] | 899 | "rootPassword": "A String", # Initial root password. Use only on creation. |
Dmitry Frenkel | 3e17f89 | 2020-10-06 16:46:05 -0700 | [diff] [blame] | 900 | "connectionName": "A String", # Connection name of the Cloud SQL instance used in connection strings. |
Dmitry Frenkel | 3e17f89 | 2020-10-06 16:46:05 -0700 | [diff] [blame] | 901 | "etag": "A String", # This field is deprecated and will be removed from a future version of the API. Use the *settings.settingsVersion* field instead. |
Dmitry Frenkel | 3e17f89 | 2020-10-06 16:46:05 -0700 | [diff] [blame] | 902 | }</pre> |
Craig Citro | e633be1 | 2015-03-02 13:40:36 -0800 | [diff] [blame] | 903 | </div> |
| 904 | |
| 905 | <div class="method"> |
Dan O'Meara | dd49464 | 2020-05-01 07:42:23 -0700 | [diff] [blame] | 906 | <code class="details" id="import_">import_(project, instance, body=None, x__xgafv=None)</code> |
Dmitry Frenkel | 3e17f89 | 2020-10-06 16:46:05 -0700 | [diff] [blame] | 907 | <pre>Imports data into a Cloud SQL instance from a SQL dump or CSV file in Cloud Storage. |
Craig Citro | e633be1 | 2015-03-02 13:40:36 -0800 | [diff] [blame] | 908 | |
| 909 | Args: |
| 910 | project: string, Project ID of the project that contains the instance. (required) |
| 911 | 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] | 912 | body: object, The request body. |
Craig Citro | e633be1 | 2015-03-02 13:40:36 -0800 | [diff] [blame] | 913 | The object takes the form of: |
| 914 | |
| 915 | { # Database instance import request. |
Bu Sun Kim | 6502091 | 2020-05-20 12:08:20 -0700 | [diff] [blame] | 916 | "importContext": { # Database instance import context. # Contains details about the import operation. |
Bu Sun Kim | 673ec5c | 2020-11-16 11:05:03 -0700 | [diff] [blame] | 917 | "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. |
Bu Sun Kim | 4ed7d3f | 2020-05-27 12:20:54 -0700 | [diff] [blame] | 918 | "csvImportOptions": { # Options for importing data as CSV. |
Dmitry Frenkel | 3e17f89 | 2020-10-06 16:46:05 -0700 | [diff] [blame] | 919 | "columns": [ # The columns to which CSV data is imported. If not specified, all columns of the database table are loaded with CSV data. |
Bu Sun Kim | 4ed7d3f | 2020-05-27 12:20:54 -0700 | [diff] [blame] | 920 | "A String", |
| 921 | ], |
Dmitry Frenkel | 3e17f89 | 2020-10-06 16:46:05 -0700 | [diff] [blame] | 922 | "table": "A String", # The table to which CSV data is imported. |
Bu Sun Kim | 4ed7d3f | 2020-05-27 12:20:54 -0700 | [diff] [blame] | 923 | }, |
Bu Sun Kim | 673ec5c | 2020-11-16 11:05:03 -0700 | [diff] [blame] | 924 | "kind": "A String", # This is always *sql#importContext*. |
| 925 | "importUser": "A String", # The PostgreSQL user for this import operation. PostgreSQL instances only. |
| 926 | "fileType": "A String", # The file type for the specified uri. *SQL*: The file contains SQL statements. *CSV*: The file contains CSV data. |
| 927 | "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. |
Dmitry Frenkel | 3e17f89 | 2020-10-06 16:46:05 -0700 | [diff] [blame] | 928 | "bakImportOptions": { # Import parameters specific to SQL Server .BAK files |
| 929 | "encryptionOptions": { |
Dmitry Frenkel | 3e17f89 | 2020-10-06 16:46:05 -0700 | [diff] [blame] | 930 | "pvkPassword": "A String", # Password that encrypts the private key |
Bu Sun Kim | 673ec5c | 2020-11-16 11:05:03 -0700 | [diff] [blame] | 931 | "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. |
| 932 | "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. |
Dmitry Frenkel | 3e17f89 | 2020-10-06 16:46:05 -0700 | [diff] [blame] | 933 | }, |
| 934 | }, |
Craig Citro | e633be1 | 2015-03-02 13:40:36 -0800 | [diff] [blame] | 935 | }, |
| 936 | } |
| 937 | |
Dan O'Meara | dd49464 | 2020-05-01 07:42:23 -0700 | [diff] [blame] | 938 | x__xgafv: string, V1 error format. |
| 939 | Allowed values |
| 940 | 1 - v1 error format |
| 941 | 2 - v2 error format |
Craig Citro | e633be1 | 2015-03-02 13:40:36 -0800 | [diff] [blame] | 942 | |
| 943 | Returns: |
| 944 | An object of the form: |
| 945 | |
Dmitry Frenkel | 3e17f89 | 2020-10-06 16:46:05 -0700 | [diff] [blame] | 946 | { # An Operation resource. For successful operations that return an Operation resource, only the fields relevant to the operation are populated in the resource. |
Dmitry Frenkel | 3e17f89 | 2020-10-06 16:46:05 -0700 | [diff] [blame] | 947 | "importContext": { # Database instance import context. # The context for import operation, if applicable. |
Bu Sun Kim | 673ec5c | 2020-11-16 11:05:03 -0700 | [diff] [blame] | 948 | "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. |
Dmitry Frenkel | 3e17f89 | 2020-10-06 16:46:05 -0700 | [diff] [blame] | 949 | "csvImportOptions": { # Options for importing data as CSV. |
| 950 | "columns": [ # The columns to which CSV data is imported. If not specified, all columns of the database table are loaded with CSV data. |
| 951 | "A String", |
| 952 | ], |
| 953 | "table": "A String", # The table to which CSV data is imported. |
| 954 | }, |
Bu Sun Kim | 673ec5c | 2020-11-16 11:05:03 -0700 | [diff] [blame] | 955 | "kind": "A String", # This is always *sql#importContext*. |
| 956 | "importUser": "A String", # The PostgreSQL user for this import operation. PostgreSQL instances only. |
| 957 | "fileType": "A String", # The file type for the specified uri. *SQL*: The file contains SQL statements. *CSV*: The file contains CSV data. |
| 958 | "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. |
Dmitry Frenkel | 3e17f89 | 2020-10-06 16:46:05 -0700 | [diff] [blame] | 959 | "bakImportOptions": { # Import parameters specific to SQL Server .BAK files |
| 960 | "encryptionOptions": { |
Dmitry Frenkel | 3e17f89 | 2020-10-06 16:46:05 -0700 | [diff] [blame] | 961 | "pvkPassword": "A String", # Password that encrypts the private key |
Bu Sun Kim | 673ec5c | 2020-11-16 11:05:03 -0700 | [diff] [blame] | 962 | "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. |
| 963 | "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. |
Dmitry Frenkel | 3e17f89 | 2020-10-06 16:46:05 -0700 | [diff] [blame] | 964 | }, |
| 965 | }, |
Dmitry Frenkel | 3e17f89 | 2020-10-06 16:46:05 -0700 | [diff] [blame] | 966 | }, |
Bu Sun Kim | 673ec5c | 2020-11-16 11:05:03 -0700 | [diff] [blame] | 967 | "exportContext": { # Database instance export context. # The context for export operation, if applicable. |
| 968 | "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. |
| 969 | "sqlExportOptions": { # Options for exporting data as SQL statements. |
| 970 | "mysqlExportOptions": { # Options for exporting from MySQL. |
| 971 | "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. If set to *2*, the CHANGE MASTER TO statement is written as a SQL comment, and has no effect. All other values are ignored. |
| 972 | }, |
| 973 | "schemaOnly": True or False, # Export only schemas. |
| 974 | "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. |
| 975 | "A String", |
| 976 | ], |
| 977 | }, |
| 978 | "kind": "A String", # This is always *sql#exportContext*. |
| 979 | "csvExportOptions": { # Options for exporting data as CSV. |
| 980 | "selectQuery": "A String", # The select query used to extract the data. |
| 981 | }, |
| 982 | "fileType": "A String", # The file type for the specified uri. *SQL*: The file contains SQL statements. *CSV*: The file contains CSV data. |
| 983 | "offload": True or False, # Option for export offload. |
| 984 | "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. |
| 985 | "A String", |
| 986 | ], |
| 987 | }, |
| 988 | "endTime": "A String", # The time this operation finished in UTC timezone in RFC 3339 format, for example *2012-11-15T16:19:00.094Z*. |
| 989 | "user": "A String", # The email address of the user who initiated this operation. |
| 990 | "selfLink": "A String", # The URI of this resource. |
| 991 | "status": "A String", # The status of an operation. Valid values are: *PENDING* *RUNNING* *DONE* *SQL_OPERATION_STATUS_UNSPECIFIED* |
| 992 | "insertTime": "A String", # The time this operation was enqueued in UTC timezone in RFC 3339 format, for example *2012-11-15T16:19:00.094Z*. |
| 993 | "targetId": "A String", # Name of the database instance related to this operation. |
| 994 | "targetProject": "A String", # The project ID of the target instance related to this operation. |
| 995 | "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* |
| 996 | "kind": "A String", # This is always *sql#operation*. |
| 997 | "error": { # Database instance operation errors list wrapper. # If errors occurred during processing of this operation, this field will be populated. |
| 998 | "kind": "A String", # This is always *sql#operationErrors*. |
| 999 | "errors": [ # The list of errors encountered while processing this operation. |
| 1000 | { # Database instance operation error. |
| 1001 | "code": "A String", # Identifies the specific error that occurred. |
| 1002 | "message": "A String", # Additional information about the error encountered. |
| 1003 | "kind": "A String", # This is always *sql#operationError*. |
| 1004 | }, |
| 1005 | ], |
| 1006 | }, |
| 1007 | "targetLink": "A String", |
| 1008 | "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. |
| 1009 | "startTime": "A String", # The time this operation actually started in UTC timezone in RFC 3339 format, for example *2012-11-15T16:19:00.094Z*. |
Craig Citro | e633be1 | 2015-03-02 13:40:36 -0800 | [diff] [blame] | 1010 | }</pre> |
| 1011 | </div> |
| 1012 | |
| 1013 | <div class="method"> |
Dan O'Meara | dd49464 | 2020-05-01 07:42:23 -0700 | [diff] [blame] | 1014 | <code class="details" id="insert">insert(project, body=None, x__xgafv=None)</code> |
Craig Citro | e633be1 | 2015-03-02 13:40:36 -0800 | [diff] [blame] | 1015 | <pre>Creates a new Cloud SQL instance. |
| 1016 | |
| 1017 | Args: |
Dmitry Frenkel | 3e17f89 | 2020-10-06 16:46:05 -0700 | [diff] [blame] | 1018 | project: string, Project ID of the project to which the newly created Cloud SQL instances should belong. (required) |
Dan O'Meara | dd49464 | 2020-05-01 07:42:23 -0700 | [diff] [blame] | 1019 | body: object, The request body. |
Craig Citro | e633be1 | 2015-03-02 13:40:36 -0800 | [diff] [blame] | 1020 | The object takes the form of: |
| 1021 | |
Dmitry Frenkel | 3e17f89 | 2020-10-06 16:46:05 -0700 | [diff] [blame] | 1022 | { # A Cloud SQL instance resource. Next field: 36 |
Bu Sun Kim | 673ec5c | 2020-11-16 11:05:03 -0700 | [diff] [blame] | 1023 | "gceZone": "A String", # The Compute Engine zone that the instance is currently serving from. This value could be different from the zone that was specified when the instance was created if the instance has failed over to its secondary zone. |
| 1024 | "onPremisesConfiguration": { # On-premises instance configuration. # Configuration specific to on-premises instances. |
| 1025 | "clientKey": "A String", # PEM representation of the replica's private key. The corresponsing public key is encoded in the client's certificate. |
| 1026 | "username": "A String", # The username for connecting to on-premises instance. |
| 1027 | "password": "A String", # The password for connecting to on-premises instance. |
| 1028 | "kind": "A String", # This is always *sql#onPremisesConfiguration*. |
| 1029 | "hostPort": "A String", # The host and port of the on-premises instance in host:port format |
| 1030 | "caCertificate": "A String", # PEM representation of the trusted CA's x509 certificate. |
| 1031 | "clientCertificate": "A String", # PEM representation of the replica's x509 certificate. |
| 1032 | "dumpFilePath": "A String", # The dump file to create the Cloud SQL replica. |
| 1033 | }, |
| 1034 | "satisfiesPzs": True or False, # The status indicating if instance satisfies physical zone separation. Reserved for future use. |
| 1035 | "scheduledMaintenance": { # Any scheduled maintenancce for this instance. # The start time of any upcoming scheduled maintenance for this instance. |
| 1036 | "startTime": "A String", # The start time of any upcoming scheduled maintenance for this instance. |
| 1037 | "canDefer": True or False, |
| 1038 | "canReschedule": True or False, # If the scheduled maintenance can be rescheduled. |
| 1039 | }, |
| 1040 | "databaseVersion": "A String", # The database engine type and version. The *databaseVersion* field cannot be changed after instance creation. MySQL instances: *MYSQL_8_0*, *MYSQL_5_7* (default), or *MYSQL_5_6*. PostgreSQL instances: *POSTGRES_9_6*, *POSTGRES_10*, *POSTGRES_11* or *POSTGRES_12* (default). SQL Server instances: *SQLSERVER_2017_STANDARD* (default), *SQLSERVER_2017_ENTERPRISE*, *SQLSERVER_2017_EXPRESS*, or *SQLSERVER_2017_WEB*. |
| 1041 | "diskEncryptionStatus": { # Disk encryption status for an instance. # Disk encryption status specific to an instance. Applies only to Second Generation instances. |
| 1042 | "kind": "A String", # This is always *sql#diskEncryptionStatus*. |
| 1043 | "kmsKeyVersionName": "A String", # KMS key version used to encrypt the Cloud SQL instance resource |
| 1044 | }, |
| 1045 | "selfLink": "A String", # The URI of this resource. |
| 1046 | "suspensionReason": [ # If the instance state is SUSPENDED, the reason for the suspension. |
| 1047 | "A String", |
| 1048 | ], |
Dmitry Frenkel | 3e17f89 | 2020-10-06 16:46:05 -0700 | [diff] [blame] | 1049 | "region": "A String", # The geographical region. Can be *us-central* (*FIRST_GEN* instances only) *us-central1* (*SECOND_GEN* instances only) *asia-east1* or *europe-west1*. Defaults to *us-central* or *us-central1* depending on the instance type. The region cannot be changed after instance creation. |
Bu Sun Kim | 673ec5c | 2020-11-16 11:05:03 -0700 | [diff] [blame] | 1050 | "maxDiskSize": "A String", # The maximum disk size of the instance in bytes. |
| 1051 | "masterInstanceName": "A String", # The name of the instance which will act as primary in the replication setup. |
| 1052 | "serviceAccountEmailAddress": "A String", # The service account email address assigned to the instance. This property is applicable only to Second Generation instances. |
| 1053 | "replicaConfiguration": { # Read-replica configuration for connecting to the primary instance. # Configuration specific to failover replicas and read replicas. |
| 1054 | "mysqlReplicaConfiguration": { # Read-replica configuration specific to MySQL databases. # MySQL specific configuration when replicating from a MySQL on-premises primary instance. Replication configuration information such as the username, password, certificates, and keys are not stored in the instance metadata. The configuration information is used only to set up the replication connection and is stored by MySQL in a file named *master.info* in the data directory. |
| 1055 | "clientKey": "A String", # PEM representation of the replica's private key. The corresponsing public key is encoded in the client's certificate. |
| 1056 | "kind": "A String", # This is always *sql#mysqlReplicaConfiguration*. |
| 1057 | "caCertificate": "A String", # PEM representation of the trusted CA's x509 certificate. |
| 1058 | "masterHeartbeatPeriod": "A String", # Interval in milliseconds between replication heartbeats. |
| 1059 | "dumpFilePath": "A String", # Path to a SQL dump file in Google Cloud Storage from which the replica instance is to be created. The URI is in the form gs://bucketName/fileName. Compressed gzip files (.gz) are also supported. Dumps have the binlog co-ordinates from which replication begins. This can be accomplished by setting --master-data to 1 when using mysqldump. |
| 1060 | "username": "A String", # The username for the replication connection. |
| 1061 | "sslCipher": "A String", # A list of permissible ciphers to use for SSL encryption. |
| 1062 | "connectRetryInterval": 42, # Seconds to wait between connect retries. MySQL's default is 60 seconds. |
| 1063 | "verifyServerCertificate": True or False, # Whether or not to check the primary instance's Common Name value in the certificate that it sends during the SSL handshake. |
| 1064 | "clientCertificate": "A String", # PEM representation of the replica's x509 certificate. |
| 1065 | "password": "A String", # The password for the replication connection. |
| 1066 | }, |
| 1067 | "kind": "A String", # This is always *sql#replicaConfiguration*. |
| 1068 | "failoverTarget": True or False, # Specifies if the replica is the failover target. If the field is set to *true* the replica will be designated as a failover replica. In case the primary instance fails, the replica instance will be promoted as the new primary instance. Only one replica can be specified as failover target, and the replica has to be in different zone with the primary instance. |
| 1069 | }, |
| 1070 | "kind": "A String", # This is always *sql#instance*. |
| 1071 | "instanceType": "A String", # The instance type. This can be one of the following. *CLOUD_SQL_INSTANCE*: A Cloud SQL instance that is not replicating from a primary instance. *ON_PREMISES_INSTANCE*: An instance running on the customer's premises. *READ_REPLICA_INSTANCE*: A Cloud SQL instance configured as a read-replica. |
| 1072 | "name": "A String", # Name of the Cloud SQL instance. This does not include the project ID. |
| 1073 | "serverCaCert": { # SslCerts Resource # SSL configuration. |
| 1074 | "certSerialNumber": "A String", # Serial number, as extracted from the certificate. |
| 1075 | "instance": "A String", # Name of the database instance. |
| 1076 | "kind": "A String", # This is always *sql#sslCert*. |
| 1077 | "createTime": "A String", # The time when the certificate was created in RFC 3339 format, for example *2012-11-15T16:19:00.094Z* |
| 1078 | "cert": "A String", # PEM representation. |
| 1079 | "sha1Fingerprint": "A String", # Sha1 Fingerprint. |
| 1080 | "selfLink": "A String", # The URI of this resource. |
| 1081 | "commonName": "A String", # User supplied name. Constrained to [a-zA-Z.-_ ]+. |
| 1082 | "expirationTime": "A String", # The time when the certificate expires in RFC 3339 format, for example *2012-11-15T16:19:00.094Z*. |
| 1083 | }, |
| 1084 | "currentDiskSize": "A String", # The current disk usage of the instance in bytes. This property has been deprecated. Use the "cloudsql.googleapis.com/database/disk/bytes_used" metric in Cloud Monitoring API instead. Please see this announcement for details. |
| 1085 | "project": "A String", # The project ID of the project containing the Cloud SQL instance. The Google apps domain is prefixed if applicable. |
| 1086 | "diskEncryptionConfiguration": { # Disk encryption configuration for an instance. # Disk encryption configuration specific to an instance. Applies only to Second Generation instances. |
| 1087 | "kmsKeyName": "A String", # Resource name of KMS key for disk encryption |
| 1088 | "kind": "A String", # This is always *sql#diskEncryptionConfiguration*. |
| 1089 | }, |
| 1090 | "state": "A String", # The current serving state of the Cloud SQL instance. This can be one of the following. *SQL_INSTANCE_STATE_UNSPECIFIED*: The state of the instance is unknown. *RUNNABLE*: The instance has been stopped by owner. It is not currently running, but it's ready to be restarted. *SUSPENDED*: The instance is not available, for example due to problems with billing. for example due to problems with billing. *PENDING_DELETE*: The instance is being deleted. *PENDING_CREATE*: The instance is being created. *MAINTENANCE*: The instance is down for maintenance. *FAILED*: The instance creation failed. |
| 1091 | "failoverReplica": { # The name and status of the failover replica. This property is applicable only to Second Generation instances. |
| 1092 | "available": True or False, # The availability status of the failover replica. A false status indicates that the failover replica is out of sync. The primary instance can only failover to the failover replica when the status is true. |
| 1093 | "name": "A String", # The name of the failover replica. If specified at instance creation, a failover replica is created for the instance. The name doesn't include the project ID. This property is applicable only to Second Generation instances. |
| 1094 | }, |
| 1095 | "ipAddresses": [ # The assigned IP addresses for the instance. |
| 1096 | { # Database instance IP Mapping. |
| 1097 | "type": "A String", # The type of this IP address. A *PRIMARY* address is a public address that can accept incoming connections. A *PRIVATE* address is a private address that can accept incoming connections. An *OUTGOING* address is the source address of connections originating from the instance, if supported. |
| 1098 | "timeToRetire": "A String", # The due time for this IP to be retired in RFC 3339 format, for example *2012-11-15T16:19:00.094Z*. This field is only available when the IP is scheduled to be retired. |
| 1099 | "ipAddress": "A String", # The IP address assigned. |
| 1100 | }, |
| 1101 | ], |
| 1102 | "ipv6Address": "A String", # The IPv6 address assigned to the instance. (Deprecated) This property was applicable only to First Generation instances. |
Dmitry Frenkel | 3e17f89 | 2020-10-06 16:46:05 -0700 | [diff] [blame] | 1103 | "settings": { # Database instance settings. # The user settings. |
Bu Sun Kim | 673ec5c | 2020-11-16 11:05:03 -0700 | [diff] [blame] | 1104 | "activeDirectoryConfig": { # Active Directory configuration, relevant only for Cloud SQL for SQL Server. # Active Directory configuration, relevant only for Cloud SQL for SQL Server. |
| 1105 | "kind": "A String", # This is always sql#activeDirectoryConfig. |
| 1106 | "domain": "A String", # The name of the domain (e.g., mydomain.com). |
Dmitry Frenkel | 3e17f89 | 2020-10-06 16:46:05 -0700 | [diff] [blame] | 1107 | }, |
Dmitry Frenkel | 3e17f89 | 2020-10-06 16:46:05 -0700 | [diff] [blame] | 1108 | "denyMaintenancePeriods": [ # Deny maintenance periods |
| 1109 | { # Deny Maintenance Periods. This specifies a date range during when all CSA rollout will be denied. |
| 1110 | "startDate": "A String", # "deny maintenance period" start date. If the year of the start date is empty, the year of the end date also must be empty. In this case, it means the deny maintenance period recurs every year. The date is in format yyyy-mm-dd i.e., 2020-11-01, or mm-dd, i.e., 11-01 |
| 1111 | "time": "A String", # Time in UTC when the "deny maintenance period" starts on start_date and ends on end_date. The time is in format: HH:mm:SS, i.e., 00:00:00 |
| 1112 | "endDate": "A String", # "deny maintenance period" end date. If the year of the end date is empty, the year of the start date also must be empty. In this case, it means the deny maintenance period recurs every year. The date is in format yyyy-mm-dd i.e., 2020-11-01, or mm-dd, i.e., 11-01 |
| 1113 | }, |
| 1114 | ], |
Bu Sun Kim | 673ec5c | 2020-11-16 11:05:03 -0700 | [diff] [blame] | 1115 | "authorizedGaeApplications": [ # The App Engine app IDs that can access this instance. (Deprecated) Applied to First Generation instances only. |
| 1116 | "A String", |
| 1117 | ], |
| 1118 | "backupConfiguration": { # Database instance backup configuration. # The daily backup configuration for the instance. |
| 1119 | "kind": "A String", # This is always *sql#backupConfiguration*. |
| 1120 | "replicationLogArchivingEnabled": True or False, # Reserved for future use. |
| 1121 | "pointInTimeRecoveryEnabled": True or False, # Reserved for future use. |
| 1122 | "binaryLogEnabled": True or False, # (MySQL only) Whether binary log is enabled. If backup configuration is disabled, binarylog must be disabled as well. |
| 1123 | "startTime": "A String", # Start time for the daily backup configuration in UTC timezone in the 24 hour format - *HH:MM*. |
| 1124 | "enabled": True or False, # Whether this configuration is enabled. |
| 1125 | "location": "A String", # Location of the backup |
| 1126 | "transactionLogRetentionDays": 42, # The number of days of transaction logs we retain for point in time restore, from 1-7. |
| 1127 | "backupRetentionSettings": { # We currently only support backup retention by specifying the number of backups we will retain. # Backup retention settings. |
| 1128 | "retainedBackups": 42, # Depending on the value of retention_unit, this is used to determine if a backup needs to be deleted. If retention_unit is 'COUNT', we will retain this many backups. |
| 1129 | "retentionUnit": "A String", # The unit that 'retained_backups' represents. |
| 1130 | }, |
| 1131 | }, |
| 1132 | "databaseFlags": [ # The database flags passed to the instance at startup. |
| 1133 | { # Database flags for Cloud SQL instances. |
| 1134 | "value": "A String", # The value of the flag. Booleans are set to *on* for true and *off* for false. This field must be omitted if the flag doesn't take a value. |
| 1135 | "name": "A String", # The name of the flag. These flags are passed at instance startup, so include both server options and system variables for MySQL. Flags are specified with underscores, not hyphens. For more information, see Configuring Database Flags in the Cloud SQL documentation. |
| 1136 | }, |
| 1137 | ], |
| 1138 | "ipConfiguration": { # IP Management configuration. # The settings for IP Management. This allows to enable or disable the instance IP and manage which external networks can connect to the instance. The IPv4 address cannot be disabled for Second Generation instances. |
| 1139 | "authorizedNetworks": [ # The list of external networks that are allowed to connect to the instance using the IP. In 'CIDR' notation, also known as 'slash' notation (for example: *192.168.100.0/24*). |
| 1140 | { # An entry for an Access Control list. |
| 1141 | "kind": "A String", # This is always *sql#aclEntry*. |
| 1142 | "expirationTime": "A String", # The time when this access control entry expires in RFC 3339 format, for example *2012-11-15T16:19:00.094Z*. |
| 1143 | "name": "A String", # Optional. A label to identify this entry. |
| 1144 | "value": "A String", # The allowlisted value for the access control list. |
| 1145 | }, |
| 1146 | ], |
| 1147 | "requireSsl": True or False, # Whether SSL connections over IP are enforced or not. |
| 1148 | "privateNetwork": "A String", # The resource link for the VPC network from which the Cloud SQL instance is accessible for private IP. For example, */projects/myProject/global/networks/default*. This setting can be updated, but it cannot be removed after it is set. |
| 1149 | "ipv4Enabled": True or False, # Whether the instance is assigned a public IP address or not. |
| 1150 | }, |
| 1151 | "tier": "A String", # The tier (or machine type) for this instance, for example *db-n1-standard-1* (MySQL instances) or *db-custom-1-3840* (PostgreSQL instances). |
| 1152 | "userLabels": { # User-provided labels, represented as a dictionary where each label is a single key value pair. |
| 1153 | "a_key": "A String", |
| 1154 | }, |
| 1155 | "settingsVersion": "A String", # The version of instance settings. This is a required field for update method to make sure concurrent updates are handled properly. During update, use the most recent settingsVersion value for this instance and do not try to update this value. |
| 1156 | "dataDiskType": "A String", # The type of data disk: PD_SSD (default) or PD_HDD. Not used for First Generation instances. |
| 1157 | "replicationType": "A String", # The type of replication this instance uses. This can be either *ASYNCHRONOUS* or *SYNCHRONOUS*. (Deprecated_ This property was only applicable to First Generation instances. |
| 1158 | "locationPreference": { # Preferred location. This specifies where a Cloud SQL instance is located, either in a specific Compute Engine zone, or co-located with an App Engine application. Note that if the preferred location is not available, the instance will be located as close as possible within the region. Only one location may be specified. # The location preference settings. This allows the instance to be located as near as possible to either an App Engine app or Compute Engine zone for better performance. App Engine co-location was only applicable to First Generation instances. |
| 1159 | "secondaryZone": "A String", # The preferred Compute Engine zone for the secondary/failover (for example: us-central1-a, us-central1-b, etc.). Reserved for future use. |
| 1160 | "kind": "A String", # This is always *sql#locationPreference*. |
| 1161 | "followGaeApplication": "A String", # The App Engine application to follow, it must be in the same region as the Cloud SQL instance. |
| 1162 | "zone": "A String", # The preferred Compute Engine zone (for example: us-central1-a, us-central1-b, etc.). |
| 1163 | }, |
| 1164 | "maintenanceWindow": { # Maintenance window. This specifies when a Cloud SQL instance is restarted for system maintenance purposes. # The maintenance window for this instance. This specifies when the instance can be restarted for maintenance purposes. |
| 1165 | "kind": "A String", # This is always *sql#maintenanceWindow*. |
| 1166 | "updateTrack": "A String", # Maintenance timing setting: *canary* (Earlier) or *stable* (Later). Learn more. |
| 1167 | "day": 42, # day of week (1-7), starting on Monday. |
| 1168 | "hour": 42, # hour of day - 0 to 23. |
| 1169 | }, |
| 1170 | "storageAutoResizeLimit": "A String", # The maximum size to which storage capacity can be automatically increased. The default value is 0, which specifies that there is no limit. |
| 1171 | "crashSafeReplicationEnabled": True or False, # Configuration specific to read replica instances. Indicates whether database flags for crash-safe replication are enabled. This property was only applicable to First Generation instances. |
| 1172 | "storageAutoResize": True or False, # Configuration to increase storage size automatically. The default value is true. |
| 1173 | "dataDiskSizeGb": "A String", # The size of data disk, in GB. The data disk size minimum is 10GB. |
| 1174 | "availabilityType": "A String", # Availability type. Potential values: *ZONAL*: The instance serves data from only one zone. Outages in that zone affect data accessibility. *REGIONAL*: The instance can serve data from more than one zone in a region (it is highly available). For more information, see Overview of the High Availability Configuration. |
| 1175 | "kind": "A String", # This is always *sql#settings*. |
| 1176 | "activationPolicy": "A String", # The activation policy specifies when the instance is activated; it is applicable only when the instance state is RUNNABLE. Valid values: *ALWAYS*: The instance is on, and remains so even in the absence of connection requests. *NEVER*: The instance is off; it is not activated, even if a connection request arrives. |
| 1177 | "databaseReplicationEnabled": True or False, # Configuration specific to read replica instances. Indicates whether replication is enabled or not. |
| 1178 | "pricingPlan": "A String", # The pricing plan for this instance. This can be either *PER_USE* or *PACKAGE*. Only *PER_USE* is supported for Second Generation instances. |
| 1179 | "collation": "A String", # The name of server Instance collation. |
Dmitry Frenkel | 3e17f89 | 2020-10-06 16:46:05 -0700 | [diff] [blame] | 1180 | }, |
Bu Sun Kim | 673ec5c | 2020-11-16 11:05:03 -0700 | [diff] [blame] | 1181 | "secondaryGceZone": "A String", # The Compute Engine zone that the failover instance is currently serving from for a regional instance. This value could be different from the zone that was specified when the instance was created if the instance has failed over to its secondary/failover zone. Reserved for future use. |
| 1182 | "backendType": "A String", # *SECOND_GEN*: Cloud SQL database instance. *EXTERNAL*: A database server that is not managed by Google. This property is read-only; use the *tier* property in the *settings* object to determine the database type. |
Dmitry Frenkel | 3e17f89 | 2020-10-06 16:46:05 -0700 | [diff] [blame] | 1183 | "replicaNames": [ # The replicas of the instance. |
| 1184 | "A String", |
| 1185 | ], |
Bu Sun Kim | 673ec5c | 2020-11-16 11:05:03 -0700 | [diff] [blame] | 1186 | "rootPassword": "A String", # Initial root password. Use only on creation. |
Dmitry Frenkel | 3e17f89 | 2020-10-06 16:46:05 -0700 | [diff] [blame] | 1187 | "connectionName": "A String", # Connection name of the Cloud SQL instance used in connection strings. |
Dmitry Frenkel | 3e17f89 | 2020-10-06 16:46:05 -0700 | [diff] [blame] | 1188 | "etag": "A String", # This field is deprecated and will be removed from a future version of the API. Use the *settings.settingsVersion* field instead. |
Dmitry Frenkel | 3e17f89 | 2020-10-06 16:46:05 -0700 | [diff] [blame] | 1189 | } |
Craig Citro | e633be1 | 2015-03-02 13:40:36 -0800 | [diff] [blame] | 1190 | |
Dan O'Meara | dd49464 | 2020-05-01 07:42:23 -0700 | [diff] [blame] | 1191 | x__xgafv: string, V1 error format. |
| 1192 | Allowed values |
| 1193 | 1 - v1 error format |
| 1194 | 2 - v2 error format |
Craig Citro | e633be1 | 2015-03-02 13:40:36 -0800 | [diff] [blame] | 1195 | |
| 1196 | Returns: |
| 1197 | An object of the form: |
| 1198 | |
Dmitry Frenkel | 3e17f89 | 2020-10-06 16:46:05 -0700 | [diff] [blame] | 1199 | { # An Operation resource. For successful operations that return an Operation resource, only the fields relevant to the operation are populated in the resource. |
Dmitry Frenkel | 3e17f89 | 2020-10-06 16:46:05 -0700 | [diff] [blame] | 1200 | "importContext": { # Database instance import context. # The context for import operation, if applicable. |
Bu Sun Kim | 673ec5c | 2020-11-16 11:05:03 -0700 | [diff] [blame] | 1201 | "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. |
Dmitry Frenkel | 3e17f89 | 2020-10-06 16:46:05 -0700 | [diff] [blame] | 1202 | "csvImportOptions": { # Options for importing data as CSV. |
| 1203 | "columns": [ # The columns to which CSV data is imported. If not specified, all columns of the database table are loaded with CSV data. |
| 1204 | "A String", |
| 1205 | ], |
| 1206 | "table": "A String", # The table to which CSV data is imported. |
| 1207 | }, |
Bu Sun Kim | 673ec5c | 2020-11-16 11:05:03 -0700 | [diff] [blame] | 1208 | "kind": "A String", # This is always *sql#importContext*. |
| 1209 | "importUser": "A String", # The PostgreSQL user for this import operation. PostgreSQL instances only. |
| 1210 | "fileType": "A String", # The file type for the specified uri. *SQL*: The file contains SQL statements. *CSV*: The file contains CSV data. |
| 1211 | "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. |
Dmitry Frenkel | 3e17f89 | 2020-10-06 16:46:05 -0700 | [diff] [blame] | 1212 | "bakImportOptions": { # Import parameters specific to SQL Server .BAK files |
| 1213 | "encryptionOptions": { |
Dmitry Frenkel | 3e17f89 | 2020-10-06 16:46:05 -0700 | [diff] [blame] | 1214 | "pvkPassword": "A String", # Password that encrypts the private key |
Bu Sun Kim | 673ec5c | 2020-11-16 11:05:03 -0700 | [diff] [blame] | 1215 | "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. |
| 1216 | "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. |
Dmitry Frenkel | 3e17f89 | 2020-10-06 16:46:05 -0700 | [diff] [blame] | 1217 | }, |
| 1218 | }, |
Dmitry Frenkel | 3e17f89 | 2020-10-06 16:46:05 -0700 | [diff] [blame] | 1219 | }, |
Bu Sun Kim | 673ec5c | 2020-11-16 11:05:03 -0700 | [diff] [blame] | 1220 | "exportContext": { # Database instance export context. # The context for export operation, if applicable. |
| 1221 | "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. |
| 1222 | "sqlExportOptions": { # Options for exporting data as SQL statements. |
| 1223 | "mysqlExportOptions": { # Options for exporting from MySQL. |
| 1224 | "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. If set to *2*, the CHANGE MASTER TO statement is written as a SQL comment, and has no effect. All other values are ignored. |
| 1225 | }, |
| 1226 | "schemaOnly": True or False, # Export only schemas. |
| 1227 | "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. |
| 1228 | "A String", |
| 1229 | ], |
| 1230 | }, |
| 1231 | "kind": "A String", # This is always *sql#exportContext*. |
| 1232 | "csvExportOptions": { # Options for exporting data as CSV. |
| 1233 | "selectQuery": "A String", # The select query used to extract the data. |
| 1234 | }, |
| 1235 | "fileType": "A String", # The file type for the specified uri. *SQL*: The file contains SQL statements. *CSV*: The file contains CSV data. |
| 1236 | "offload": True or False, # Option for export offload. |
| 1237 | "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. |
| 1238 | "A String", |
| 1239 | ], |
| 1240 | }, |
| 1241 | "endTime": "A String", # The time this operation finished in UTC timezone in RFC 3339 format, for example *2012-11-15T16:19:00.094Z*. |
| 1242 | "user": "A String", # The email address of the user who initiated this operation. |
| 1243 | "selfLink": "A String", # The URI of this resource. |
| 1244 | "status": "A String", # The status of an operation. Valid values are: *PENDING* *RUNNING* *DONE* *SQL_OPERATION_STATUS_UNSPECIFIED* |
| 1245 | "insertTime": "A String", # The time this operation was enqueued in UTC timezone in RFC 3339 format, for example *2012-11-15T16:19:00.094Z*. |
| 1246 | "targetId": "A String", # Name of the database instance related to this operation. |
| 1247 | "targetProject": "A String", # The project ID of the target instance related to this operation. |
| 1248 | "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* |
| 1249 | "kind": "A String", # This is always *sql#operation*. |
| 1250 | "error": { # Database instance operation errors list wrapper. # If errors occurred during processing of this operation, this field will be populated. |
| 1251 | "kind": "A String", # This is always *sql#operationErrors*. |
| 1252 | "errors": [ # The list of errors encountered while processing this operation. |
| 1253 | { # Database instance operation error. |
| 1254 | "code": "A String", # Identifies the specific error that occurred. |
| 1255 | "message": "A String", # Additional information about the error encountered. |
| 1256 | "kind": "A String", # This is always *sql#operationError*. |
| 1257 | }, |
| 1258 | ], |
| 1259 | }, |
| 1260 | "targetLink": "A String", |
| 1261 | "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. |
| 1262 | "startTime": "A String", # The time this operation actually started in UTC timezone in RFC 3339 format, for example *2012-11-15T16:19:00.094Z*. |
Craig Citro | e633be1 | 2015-03-02 13:40:36 -0800 | [diff] [blame] | 1263 | }</pre> |
| 1264 | </div> |
| 1265 | |
| 1266 | <div class="method"> |
Bu Sun Kim | 673ec5c | 2020-11-16 11:05:03 -0700 | [diff] [blame] | 1267 | <code class="details" id="list">list(project, pageToken=None, maxResults=None, filter=None, x__xgafv=None)</code> |
Dan O'Meara | dd49464 | 2020-05-01 07:42:23 -0700 | [diff] [blame] | 1268 | <pre>Lists instances under a given project. |
Craig Citro | e633be1 | 2015-03-02 13:40:36 -0800 | [diff] [blame] | 1269 | |
| 1270 | Args: |
| 1271 | project: string, Project ID of the project for which to list Cloud SQL instances. (required) |
Bu Sun Kim | 673ec5c | 2020-11-16 11:05:03 -0700 | [diff] [blame] | 1272 | pageToken: string, A previously-returned page token representing part of the larger set of results to view. |
Bu Sun Kim | 4ed7d3f | 2020-05-27 12:20:54 -0700 | [diff] [blame] | 1273 | maxResults: integer, The maximum number of results to return per response. |
Dmitry Frenkel | 3e17f89 | 2020-10-06 16:46:05 -0700 | [diff] [blame] | 1274 | filter: string, A filter expression that filters resources listed in the response. The expression is in the form of field:value. For example, 'instanceType:CLOUD_SQL_INSTANCE'. Fields can be nested as needed as per their JSON representation, such as 'settings.userLabels.auto_start:true'. Multiple filter queries are space-separated. For example. 'state:RUNNABLE instanceType:CLOUD_SQL_INSTANCE'. By default, each expression is an AND expression. However, you can include AND and OR expressions explicitly. |
Dan O'Meara | dd49464 | 2020-05-01 07:42:23 -0700 | [diff] [blame] | 1275 | x__xgafv: string, V1 error format. |
| 1276 | Allowed values |
| 1277 | 1 - v1 error format |
| 1278 | 2 - v2 error format |
Craig Citro | e633be1 | 2015-03-02 13:40:36 -0800 | [diff] [blame] | 1279 | |
| 1280 | Returns: |
| 1281 | An object of the form: |
| 1282 | |
| 1283 | { # Database instances list response. |
Dmitry Frenkel | 3e17f89 | 2020-10-06 16:46:05 -0700 | [diff] [blame] | 1284 | "kind": "A String", # This is always *sql#instancesList*. |
Bu Sun Kim | 673ec5c | 2020-11-16 11:05:03 -0700 | [diff] [blame] | 1285 | "warnings": [ # List of warnings that occurred while handling the request. |
| 1286 | { # An Admin API warning message. |
| 1287 | "code": "A String", # Code to uniquely identify the warning type. |
| 1288 | "message": "A String", # The warning message. |
| 1289 | }, |
| 1290 | ], |
| 1291 | "nextPageToken": "A String", # The continuation token, used to page through large result sets. Provide this value in a subsequent request to return the next page of results. |
Bu Sun Kim | 6502091 | 2020-05-20 12:08:20 -0700 | [diff] [blame] | 1292 | "items": [ # List of database instance resources. |
Dmitry Frenkel | 3e17f89 | 2020-10-06 16:46:05 -0700 | [diff] [blame] | 1293 | { # A Cloud SQL instance resource. Next field: 36 |
Bu Sun Kim | 673ec5c | 2020-11-16 11:05:03 -0700 | [diff] [blame] | 1294 | "gceZone": "A String", # The Compute Engine zone that the instance is currently serving from. This value could be different from the zone that was specified when the instance was created if the instance has failed over to its secondary zone. |
| 1295 | "onPremisesConfiguration": { # On-premises instance configuration. # Configuration specific to on-premises instances. |
| 1296 | "clientKey": "A String", # PEM representation of the replica's private key. The corresponsing public key is encoded in the client's certificate. |
| 1297 | "username": "A String", # The username for connecting to on-premises instance. |
| 1298 | "password": "A String", # The password for connecting to on-premises instance. |
| 1299 | "kind": "A String", # This is always *sql#onPremisesConfiguration*. |
| 1300 | "hostPort": "A String", # The host and port of the on-premises instance in host:port format |
| 1301 | "caCertificate": "A String", # PEM representation of the trusted CA's x509 certificate. |
| 1302 | "clientCertificate": "A String", # PEM representation of the replica's x509 certificate. |
| 1303 | "dumpFilePath": "A String", # The dump file to create the Cloud SQL replica. |
| 1304 | }, |
| 1305 | "satisfiesPzs": True or False, # The status indicating if instance satisfies physical zone separation. Reserved for future use. |
| 1306 | "scheduledMaintenance": { # Any scheduled maintenancce for this instance. # The start time of any upcoming scheduled maintenance for this instance. |
| 1307 | "startTime": "A String", # The start time of any upcoming scheduled maintenance for this instance. |
| 1308 | "canDefer": True or False, |
| 1309 | "canReschedule": True or False, # If the scheduled maintenance can be rescheduled. |
| 1310 | }, |
| 1311 | "databaseVersion": "A String", # The database engine type and version. The *databaseVersion* field cannot be changed after instance creation. MySQL instances: *MYSQL_8_0*, *MYSQL_5_7* (default), or *MYSQL_5_6*. PostgreSQL instances: *POSTGRES_9_6*, *POSTGRES_10*, *POSTGRES_11* or *POSTGRES_12* (default). SQL Server instances: *SQLSERVER_2017_STANDARD* (default), *SQLSERVER_2017_ENTERPRISE*, *SQLSERVER_2017_EXPRESS*, or *SQLSERVER_2017_WEB*. |
| 1312 | "diskEncryptionStatus": { # Disk encryption status for an instance. # Disk encryption status specific to an instance. Applies only to Second Generation instances. |
| 1313 | "kind": "A String", # This is always *sql#diskEncryptionStatus*. |
| 1314 | "kmsKeyVersionName": "A String", # KMS key version used to encrypt the Cloud SQL instance resource |
| 1315 | }, |
| 1316 | "selfLink": "A String", # The URI of this resource. |
| 1317 | "suspensionReason": [ # If the instance state is SUSPENDED, the reason for the suspension. |
| 1318 | "A String", |
| 1319 | ], |
Dmitry Frenkel | 3e17f89 | 2020-10-06 16:46:05 -0700 | [diff] [blame] | 1320 | "region": "A String", # The geographical region. Can be *us-central* (*FIRST_GEN* instances only) *us-central1* (*SECOND_GEN* instances only) *asia-east1* or *europe-west1*. Defaults to *us-central* or *us-central1* depending on the instance type. The region cannot be changed after instance creation. |
Bu Sun Kim | 673ec5c | 2020-11-16 11:05:03 -0700 | [diff] [blame] | 1321 | "maxDiskSize": "A String", # The maximum disk size of the instance in bytes. |
| 1322 | "masterInstanceName": "A String", # The name of the instance which will act as primary in the replication setup. |
| 1323 | "serviceAccountEmailAddress": "A String", # The service account email address assigned to the instance. This property is applicable only to Second Generation instances. |
| 1324 | "replicaConfiguration": { # Read-replica configuration for connecting to the primary instance. # Configuration specific to failover replicas and read replicas. |
| 1325 | "mysqlReplicaConfiguration": { # Read-replica configuration specific to MySQL databases. # MySQL specific configuration when replicating from a MySQL on-premises primary instance. Replication configuration information such as the username, password, certificates, and keys are not stored in the instance metadata. The configuration information is used only to set up the replication connection and is stored by MySQL in a file named *master.info* in the data directory. |
| 1326 | "clientKey": "A String", # PEM representation of the replica's private key. The corresponsing public key is encoded in the client's certificate. |
| 1327 | "kind": "A String", # This is always *sql#mysqlReplicaConfiguration*. |
| 1328 | "caCertificate": "A String", # PEM representation of the trusted CA's x509 certificate. |
| 1329 | "masterHeartbeatPeriod": "A String", # Interval in milliseconds between replication heartbeats. |
| 1330 | "dumpFilePath": "A String", # Path to a SQL dump file in Google Cloud Storage from which the replica instance is to be created. The URI is in the form gs://bucketName/fileName. Compressed gzip files (.gz) are also supported. Dumps have the binlog co-ordinates from which replication begins. This can be accomplished by setting --master-data to 1 when using mysqldump. |
| 1331 | "username": "A String", # The username for the replication connection. |
| 1332 | "sslCipher": "A String", # A list of permissible ciphers to use for SSL encryption. |
| 1333 | "connectRetryInterval": 42, # Seconds to wait between connect retries. MySQL's default is 60 seconds. |
| 1334 | "verifyServerCertificate": True or False, # Whether or not to check the primary instance's Common Name value in the certificate that it sends during the SSL handshake. |
| 1335 | "clientCertificate": "A String", # PEM representation of the replica's x509 certificate. |
| 1336 | "password": "A String", # The password for the replication connection. |
| 1337 | }, |
| 1338 | "kind": "A String", # This is always *sql#replicaConfiguration*. |
| 1339 | "failoverTarget": True or False, # Specifies if the replica is the failover target. If the field is set to *true* the replica will be designated as a failover replica. In case the primary instance fails, the replica instance will be promoted as the new primary instance. Only one replica can be specified as failover target, and the replica has to be in different zone with the primary instance. |
| 1340 | }, |
| 1341 | "kind": "A String", # This is always *sql#instance*. |
| 1342 | "instanceType": "A String", # The instance type. This can be one of the following. *CLOUD_SQL_INSTANCE*: A Cloud SQL instance that is not replicating from a primary instance. *ON_PREMISES_INSTANCE*: An instance running on the customer's premises. *READ_REPLICA_INSTANCE*: A Cloud SQL instance configured as a read-replica. |
| 1343 | "name": "A String", # Name of the Cloud SQL instance. This does not include the project ID. |
| 1344 | "serverCaCert": { # SslCerts Resource # SSL configuration. |
| 1345 | "certSerialNumber": "A String", # Serial number, as extracted from the certificate. |
| 1346 | "instance": "A String", # Name of the database instance. |
| 1347 | "kind": "A String", # This is always *sql#sslCert*. |
| 1348 | "createTime": "A String", # The time when the certificate was created in RFC 3339 format, for example *2012-11-15T16:19:00.094Z* |
| 1349 | "cert": "A String", # PEM representation. |
| 1350 | "sha1Fingerprint": "A String", # Sha1 Fingerprint. |
| 1351 | "selfLink": "A String", # The URI of this resource. |
| 1352 | "commonName": "A String", # User supplied name. Constrained to [a-zA-Z.-_ ]+. |
| 1353 | "expirationTime": "A String", # The time when the certificate expires in RFC 3339 format, for example *2012-11-15T16:19:00.094Z*. |
| 1354 | }, |
| 1355 | "currentDiskSize": "A String", # The current disk usage of the instance in bytes. This property has been deprecated. Use the "cloudsql.googleapis.com/database/disk/bytes_used" metric in Cloud Monitoring API instead. Please see this announcement for details. |
| 1356 | "project": "A String", # The project ID of the project containing the Cloud SQL instance. The Google apps domain is prefixed if applicable. |
| 1357 | "diskEncryptionConfiguration": { # Disk encryption configuration for an instance. # Disk encryption configuration specific to an instance. Applies only to Second Generation instances. |
| 1358 | "kmsKeyName": "A String", # Resource name of KMS key for disk encryption |
| 1359 | "kind": "A String", # This is always *sql#diskEncryptionConfiguration*. |
| 1360 | }, |
| 1361 | "state": "A String", # The current serving state of the Cloud SQL instance. This can be one of the following. *SQL_INSTANCE_STATE_UNSPECIFIED*: The state of the instance is unknown. *RUNNABLE*: The instance has been stopped by owner. It is not currently running, but it's ready to be restarted. *SUSPENDED*: The instance is not available, for example due to problems with billing. for example due to problems with billing. *PENDING_DELETE*: The instance is being deleted. *PENDING_CREATE*: The instance is being created. *MAINTENANCE*: The instance is down for maintenance. *FAILED*: The instance creation failed. |
| 1362 | "failoverReplica": { # The name and status of the failover replica. This property is applicable only to Second Generation instances. |
| 1363 | "available": True or False, # The availability status of the failover replica. A false status indicates that the failover replica is out of sync. The primary instance can only failover to the failover replica when the status is true. |
| 1364 | "name": "A String", # The name of the failover replica. If specified at instance creation, a failover replica is created for the instance. The name doesn't include the project ID. This property is applicable only to Second Generation instances. |
| 1365 | }, |
| 1366 | "ipAddresses": [ # The assigned IP addresses for the instance. |
| 1367 | { # Database instance IP Mapping. |
| 1368 | "type": "A String", # The type of this IP address. A *PRIMARY* address is a public address that can accept incoming connections. A *PRIVATE* address is a private address that can accept incoming connections. An *OUTGOING* address is the source address of connections originating from the instance, if supported. |
| 1369 | "timeToRetire": "A String", # The due time for this IP to be retired in RFC 3339 format, for example *2012-11-15T16:19:00.094Z*. This field is only available when the IP is scheduled to be retired. |
| 1370 | "ipAddress": "A String", # The IP address assigned. |
| 1371 | }, |
| 1372 | ], |
| 1373 | "ipv6Address": "A String", # The IPv6 address assigned to the instance. (Deprecated) This property was applicable only to First Generation instances. |
Dmitry Frenkel | 3e17f89 | 2020-10-06 16:46:05 -0700 | [diff] [blame] | 1374 | "settings": { # Database instance settings. # The user settings. |
Bu Sun Kim | 673ec5c | 2020-11-16 11:05:03 -0700 | [diff] [blame] | 1375 | "activeDirectoryConfig": { # Active Directory configuration, relevant only for Cloud SQL for SQL Server. # Active Directory configuration, relevant only for Cloud SQL for SQL Server. |
| 1376 | "kind": "A String", # This is always sql#activeDirectoryConfig. |
| 1377 | "domain": "A String", # The name of the domain (e.g., mydomain.com). |
Dmitry Frenkel | 3e17f89 | 2020-10-06 16:46:05 -0700 | [diff] [blame] | 1378 | }, |
Dmitry Frenkel | 3e17f89 | 2020-10-06 16:46:05 -0700 | [diff] [blame] | 1379 | "denyMaintenancePeriods": [ # Deny maintenance periods |
| 1380 | { # Deny Maintenance Periods. This specifies a date range during when all CSA rollout will be denied. |
| 1381 | "startDate": "A String", # "deny maintenance period" start date. If the year of the start date is empty, the year of the end date also must be empty. In this case, it means the deny maintenance period recurs every year. The date is in format yyyy-mm-dd i.e., 2020-11-01, or mm-dd, i.e., 11-01 |
| 1382 | "time": "A String", # Time in UTC when the "deny maintenance period" starts on start_date and ends on end_date. The time is in format: HH:mm:SS, i.e., 00:00:00 |
| 1383 | "endDate": "A String", # "deny maintenance period" end date. If the year of the end date is empty, the year of the start date also must be empty. In this case, it means the deny maintenance period recurs every year. The date is in format yyyy-mm-dd i.e., 2020-11-01, or mm-dd, i.e., 11-01 |
| 1384 | }, |
| 1385 | ], |
Bu Sun Kim | 673ec5c | 2020-11-16 11:05:03 -0700 | [diff] [blame] | 1386 | "authorizedGaeApplications": [ # The App Engine app IDs that can access this instance. (Deprecated) Applied to First Generation instances only. |
| 1387 | "A String", |
| 1388 | ], |
| 1389 | "backupConfiguration": { # Database instance backup configuration. # The daily backup configuration for the instance. |
| 1390 | "kind": "A String", # This is always *sql#backupConfiguration*. |
| 1391 | "replicationLogArchivingEnabled": True or False, # Reserved for future use. |
| 1392 | "pointInTimeRecoveryEnabled": True or False, # Reserved for future use. |
| 1393 | "binaryLogEnabled": True or False, # (MySQL only) Whether binary log is enabled. If backup configuration is disabled, binarylog must be disabled as well. |
| 1394 | "startTime": "A String", # Start time for the daily backup configuration in UTC timezone in the 24 hour format - *HH:MM*. |
| 1395 | "enabled": True or False, # Whether this configuration is enabled. |
| 1396 | "location": "A String", # Location of the backup |
| 1397 | "transactionLogRetentionDays": 42, # The number of days of transaction logs we retain for point in time restore, from 1-7. |
| 1398 | "backupRetentionSettings": { # We currently only support backup retention by specifying the number of backups we will retain. # Backup retention settings. |
| 1399 | "retainedBackups": 42, # Depending on the value of retention_unit, this is used to determine if a backup needs to be deleted. If retention_unit is 'COUNT', we will retain this many backups. |
| 1400 | "retentionUnit": "A String", # The unit that 'retained_backups' represents. |
| 1401 | }, |
| 1402 | }, |
| 1403 | "databaseFlags": [ # The database flags passed to the instance at startup. |
| 1404 | { # Database flags for Cloud SQL instances. |
| 1405 | "value": "A String", # The value of the flag. Booleans are set to *on* for true and *off* for false. This field must be omitted if the flag doesn't take a value. |
| 1406 | "name": "A String", # The name of the flag. These flags are passed at instance startup, so include both server options and system variables for MySQL. Flags are specified with underscores, not hyphens. For more information, see Configuring Database Flags in the Cloud SQL documentation. |
| 1407 | }, |
| 1408 | ], |
| 1409 | "ipConfiguration": { # IP Management configuration. # The settings for IP Management. This allows to enable or disable the instance IP and manage which external networks can connect to the instance. The IPv4 address cannot be disabled for Second Generation instances. |
| 1410 | "authorizedNetworks": [ # The list of external networks that are allowed to connect to the instance using the IP. In 'CIDR' notation, also known as 'slash' notation (for example: *192.168.100.0/24*). |
| 1411 | { # An entry for an Access Control list. |
| 1412 | "kind": "A String", # This is always *sql#aclEntry*. |
| 1413 | "expirationTime": "A String", # The time when this access control entry expires in RFC 3339 format, for example *2012-11-15T16:19:00.094Z*. |
| 1414 | "name": "A String", # Optional. A label to identify this entry. |
| 1415 | "value": "A String", # The allowlisted value for the access control list. |
| 1416 | }, |
| 1417 | ], |
| 1418 | "requireSsl": True or False, # Whether SSL connections over IP are enforced or not. |
| 1419 | "privateNetwork": "A String", # The resource link for the VPC network from which the Cloud SQL instance is accessible for private IP. For example, */projects/myProject/global/networks/default*. This setting can be updated, but it cannot be removed after it is set. |
| 1420 | "ipv4Enabled": True or False, # Whether the instance is assigned a public IP address or not. |
| 1421 | }, |
| 1422 | "tier": "A String", # The tier (or machine type) for this instance, for example *db-n1-standard-1* (MySQL instances) or *db-custom-1-3840* (PostgreSQL instances). |
| 1423 | "userLabels": { # User-provided labels, represented as a dictionary where each label is a single key value pair. |
| 1424 | "a_key": "A String", |
| 1425 | }, |
| 1426 | "settingsVersion": "A String", # The version of instance settings. This is a required field for update method to make sure concurrent updates are handled properly. During update, use the most recent settingsVersion value for this instance and do not try to update this value. |
| 1427 | "dataDiskType": "A String", # The type of data disk: PD_SSD (default) or PD_HDD. Not used for First Generation instances. |
| 1428 | "replicationType": "A String", # The type of replication this instance uses. This can be either *ASYNCHRONOUS* or *SYNCHRONOUS*. (Deprecated_ This property was only applicable to First Generation instances. |
| 1429 | "locationPreference": { # Preferred location. This specifies where a Cloud SQL instance is located, either in a specific Compute Engine zone, or co-located with an App Engine application. Note that if the preferred location is not available, the instance will be located as close as possible within the region. Only one location may be specified. # The location preference settings. This allows the instance to be located as near as possible to either an App Engine app or Compute Engine zone for better performance. App Engine co-location was only applicable to First Generation instances. |
| 1430 | "secondaryZone": "A String", # The preferred Compute Engine zone for the secondary/failover (for example: us-central1-a, us-central1-b, etc.). Reserved for future use. |
| 1431 | "kind": "A String", # This is always *sql#locationPreference*. |
| 1432 | "followGaeApplication": "A String", # The App Engine application to follow, it must be in the same region as the Cloud SQL instance. |
| 1433 | "zone": "A String", # The preferred Compute Engine zone (for example: us-central1-a, us-central1-b, etc.). |
| 1434 | }, |
| 1435 | "maintenanceWindow": { # Maintenance window. This specifies when a Cloud SQL instance is restarted for system maintenance purposes. # The maintenance window for this instance. This specifies when the instance can be restarted for maintenance purposes. |
| 1436 | "kind": "A String", # This is always *sql#maintenanceWindow*. |
| 1437 | "updateTrack": "A String", # Maintenance timing setting: *canary* (Earlier) or *stable* (Later). Learn more. |
| 1438 | "day": 42, # day of week (1-7), starting on Monday. |
| 1439 | "hour": 42, # hour of day - 0 to 23. |
| 1440 | }, |
| 1441 | "storageAutoResizeLimit": "A String", # The maximum size to which storage capacity can be automatically increased. The default value is 0, which specifies that there is no limit. |
| 1442 | "crashSafeReplicationEnabled": True or False, # Configuration specific to read replica instances. Indicates whether database flags for crash-safe replication are enabled. This property was only applicable to First Generation instances. |
| 1443 | "storageAutoResize": True or False, # Configuration to increase storage size automatically. The default value is true. |
| 1444 | "dataDiskSizeGb": "A String", # The size of data disk, in GB. The data disk size minimum is 10GB. |
| 1445 | "availabilityType": "A String", # Availability type. Potential values: *ZONAL*: The instance serves data from only one zone. Outages in that zone affect data accessibility. *REGIONAL*: The instance can serve data from more than one zone in a region (it is highly available). For more information, see Overview of the High Availability Configuration. |
| 1446 | "kind": "A String", # This is always *sql#settings*. |
| 1447 | "activationPolicy": "A String", # The activation policy specifies when the instance is activated; it is applicable only when the instance state is RUNNABLE. Valid values: *ALWAYS*: The instance is on, and remains so even in the absence of connection requests. *NEVER*: The instance is off; it is not activated, even if a connection request arrives. |
| 1448 | "databaseReplicationEnabled": True or False, # Configuration specific to read replica instances. Indicates whether replication is enabled or not. |
| 1449 | "pricingPlan": "A String", # The pricing plan for this instance. This can be either *PER_USE* or *PACKAGE*. Only *PER_USE* is supported for Second Generation instances. |
| 1450 | "collation": "A String", # The name of server Instance collation. |
Craig Citro | e633be1 | 2015-03-02 13:40:36 -0800 | [diff] [blame] | 1451 | }, |
Bu Sun Kim | 673ec5c | 2020-11-16 11:05:03 -0700 | [diff] [blame] | 1452 | "secondaryGceZone": "A String", # The Compute Engine zone that the failover instance is currently serving from for a regional instance. This value could be different from the zone that was specified when the instance was created if the instance has failed over to its secondary/failover zone. Reserved for future use. |
| 1453 | "backendType": "A String", # *SECOND_GEN*: Cloud SQL database instance. *EXTERNAL*: A database server that is not managed by Google. This property is read-only; use the *tier* property in the *settings* object to determine the database type. |
Dmitry Frenkel | 3e17f89 | 2020-10-06 16:46:05 -0700 | [diff] [blame] | 1454 | "replicaNames": [ # The replicas of the instance. |
| 1455 | "A String", |
| 1456 | ], |
Bu Sun Kim | 673ec5c | 2020-11-16 11:05:03 -0700 | [diff] [blame] | 1457 | "rootPassword": "A String", # Initial root password. Use only on creation. |
Dmitry Frenkel | 3e17f89 | 2020-10-06 16:46:05 -0700 | [diff] [blame] | 1458 | "connectionName": "A String", # Connection name of the Cloud SQL instance used in connection strings. |
Dmitry Frenkel | 3e17f89 | 2020-10-06 16:46:05 -0700 | [diff] [blame] | 1459 | "etag": "A String", # This field is deprecated and will be removed from a future version of the API. Use the *settings.settingsVersion* field instead. |
Dmitry Frenkel | 3e17f89 | 2020-10-06 16:46:05 -0700 | [diff] [blame] | 1460 | }, |
Craig Citro | e633be1 | 2015-03-02 13:40:36 -0800 | [diff] [blame] | 1461 | ], |
Bu Sun Kim | 715bd7f | 2019-06-14 16:50:42 -0700 | [diff] [blame] | 1462 | }</pre> |
| 1463 | </div> |
| 1464 | |
| 1465 | <div class="method"> |
Dan O'Meara | dd49464 | 2020-05-01 07:42:23 -0700 | [diff] [blame] | 1466 | <code class="details" id="listServerCas">listServerCas(project, instance, x__xgafv=None)</code> |
Dmitry Frenkel | 3e17f89 | 2020-10-06 16:46:05 -0700 | [diff] [blame] | 1467 | <pre>Lists all of the trusted Certificate Authorities (CAs) for the specified instance. There can be up to three CAs listed: the CA that was used to sign the certificate that is currently in use, a CA that has been added but not yet used to sign a certificate, and a CA used to sign a certificate that has previously rotated out. |
Bu Sun Kim | 715bd7f | 2019-06-14 16:50:42 -0700 | [diff] [blame] | 1468 | |
| 1469 | Args: |
| 1470 | project: string, Project ID of the project that contains the instance. (required) |
| 1471 | 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] | 1472 | x__xgafv: string, V1 error format. |
| 1473 | Allowed values |
| 1474 | 1 - v1 error format |
| 1475 | 2 - v2 error format |
Bu Sun Kim | 715bd7f | 2019-06-14 16:50:42 -0700 | [diff] [blame] | 1476 | |
| 1477 | Returns: |
| 1478 | An object of the form: |
| 1479 | |
| 1480 | { # Instances ListServerCas response. |
Bu Sun Kim | 6502091 | 2020-05-20 12:08:20 -0700 | [diff] [blame] | 1481 | "certs": [ # List of server CA certificates for the instance. |
Bu Sun Kim | 715bd7f | 2019-06-14 16:50:42 -0700 | [diff] [blame] | 1482 | { # SslCerts Resource |
Dmitry Frenkel | 3e17f89 | 2020-10-06 16:46:05 -0700 | [diff] [blame] | 1483 | "certSerialNumber": "A String", # Serial number, as extracted from the certificate. |
Bu Sun Kim | 673ec5c | 2020-11-16 11:05:03 -0700 | [diff] [blame] | 1484 | "instance": "A String", # Name of the database instance. |
| 1485 | "kind": "A String", # This is always *sql#sslCert*. |
| 1486 | "createTime": "A String", # The time when the certificate was created in RFC 3339 format, for example *2012-11-15T16:19:00.094Z* |
| 1487 | "cert": "A String", # PEM representation. |
Dmitry Frenkel | 3e17f89 | 2020-10-06 16:46:05 -0700 | [diff] [blame] | 1488 | "sha1Fingerprint": "A String", # Sha1 Fingerprint. |
Bu Sun Kim | 673ec5c | 2020-11-16 11:05:03 -0700 | [diff] [blame] | 1489 | "selfLink": "A String", # The URI of this resource. |
| 1490 | "commonName": "A String", # User supplied name. Constrained to [a-zA-Z.-_ ]+. |
| 1491 | "expirationTime": "A String", # The time when the certificate expires in RFC 3339 format, for example *2012-11-15T16:19:00.094Z*. |
Bu Sun Kim | 715bd7f | 2019-06-14 16:50:42 -0700 | [diff] [blame] | 1492 | }, |
| 1493 | ], |
Bu Sun Kim | 673ec5c | 2020-11-16 11:05:03 -0700 | [diff] [blame] | 1494 | "kind": "A String", # This is always *sql#instancesListServerCas*. |
| 1495 | "activeVersion": "A String", |
Craig Citro | e633be1 | 2015-03-02 13:40:36 -0800 | [diff] [blame] | 1496 | }</pre> |
| 1497 | </div> |
| 1498 | |
| 1499 | <div class="method"> |
| 1500 | <code class="details" id="list_next">list_next(previous_request, previous_response)</code> |
| 1501 | <pre>Retrieves the next page of results. |
| 1502 | |
| 1503 | Args: |
| 1504 | previous_request: The request for the previous page. (required) |
| 1505 | previous_response: The response from the request for the previous page. (required) |
| 1506 | |
| 1507 | Returns: |
Bu Sun Kim | 6502091 | 2020-05-20 12:08:20 -0700 | [diff] [blame] | 1508 | A request object that you can call 'execute()' on to request the next |
Craig Citro | e633be1 | 2015-03-02 13:40:36 -0800 | [diff] [blame] | 1509 | page. Returns None if there are no more items in the collection. |
| 1510 | </pre> |
| 1511 | </div> |
| 1512 | |
| 1513 | <div class="method"> |
Dan O'Meara | dd49464 | 2020-05-01 07:42:23 -0700 | [diff] [blame] | 1514 | <code class="details" id="patch">patch(project, instance, body=None, x__xgafv=None)</code> |
Dmitry Frenkel | 3e17f89 | 2020-10-06 16:46:05 -0700 | [diff] [blame] | 1515 | <pre>Updates settings of a Cloud SQL instance. This method supports patch semantics. |
Craig Citro | e633be1 | 2015-03-02 13:40:36 -0800 | [diff] [blame] | 1516 | |
| 1517 | Args: |
| 1518 | project: string, Project ID of the project that contains the instance. (required) |
| 1519 | 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] | 1520 | body: object, The request body. |
Craig Citro | e633be1 | 2015-03-02 13:40:36 -0800 | [diff] [blame] | 1521 | The object takes the form of: |
| 1522 | |
Dmitry Frenkel | 3e17f89 | 2020-10-06 16:46:05 -0700 | [diff] [blame] | 1523 | { # A Cloud SQL instance resource. Next field: 36 |
Bu Sun Kim | 673ec5c | 2020-11-16 11:05:03 -0700 | [diff] [blame] | 1524 | "gceZone": "A String", # The Compute Engine zone that the instance is currently serving from. This value could be different from the zone that was specified when the instance was created if the instance has failed over to its secondary zone. |
| 1525 | "onPremisesConfiguration": { # On-premises instance configuration. # Configuration specific to on-premises instances. |
| 1526 | "clientKey": "A String", # PEM representation of the replica's private key. The corresponsing public key is encoded in the client's certificate. |
| 1527 | "username": "A String", # The username for connecting to on-premises instance. |
| 1528 | "password": "A String", # The password for connecting to on-premises instance. |
| 1529 | "kind": "A String", # This is always *sql#onPremisesConfiguration*. |
| 1530 | "hostPort": "A String", # The host and port of the on-premises instance in host:port format |
| 1531 | "caCertificate": "A String", # PEM representation of the trusted CA's x509 certificate. |
| 1532 | "clientCertificate": "A String", # PEM representation of the replica's x509 certificate. |
| 1533 | "dumpFilePath": "A String", # The dump file to create the Cloud SQL replica. |
| 1534 | }, |
| 1535 | "satisfiesPzs": True or False, # The status indicating if instance satisfies physical zone separation. Reserved for future use. |
| 1536 | "scheduledMaintenance": { # Any scheduled maintenancce for this instance. # The start time of any upcoming scheduled maintenance for this instance. |
| 1537 | "startTime": "A String", # The start time of any upcoming scheduled maintenance for this instance. |
| 1538 | "canDefer": True or False, |
| 1539 | "canReschedule": True or False, # If the scheduled maintenance can be rescheduled. |
| 1540 | }, |
| 1541 | "databaseVersion": "A String", # The database engine type and version. The *databaseVersion* field cannot be changed after instance creation. MySQL instances: *MYSQL_8_0*, *MYSQL_5_7* (default), or *MYSQL_5_6*. PostgreSQL instances: *POSTGRES_9_6*, *POSTGRES_10*, *POSTGRES_11* or *POSTGRES_12* (default). SQL Server instances: *SQLSERVER_2017_STANDARD* (default), *SQLSERVER_2017_ENTERPRISE*, *SQLSERVER_2017_EXPRESS*, or *SQLSERVER_2017_WEB*. |
| 1542 | "diskEncryptionStatus": { # Disk encryption status for an instance. # Disk encryption status specific to an instance. Applies only to Second Generation instances. |
| 1543 | "kind": "A String", # This is always *sql#diskEncryptionStatus*. |
| 1544 | "kmsKeyVersionName": "A String", # KMS key version used to encrypt the Cloud SQL instance resource |
| 1545 | }, |
| 1546 | "selfLink": "A String", # The URI of this resource. |
| 1547 | "suspensionReason": [ # If the instance state is SUSPENDED, the reason for the suspension. |
| 1548 | "A String", |
| 1549 | ], |
Dmitry Frenkel | 3e17f89 | 2020-10-06 16:46:05 -0700 | [diff] [blame] | 1550 | "region": "A String", # The geographical region. Can be *us-central* (*FIRST_GEN* instances only) *us-central1* (*SECOND_GEN* instances only) *asia-east1* or *europe-west1*. Defaults to *us-central* or *us-central1* depending on the instance type. The region cannot be changed after instance creation. |
Bu Sun Kim | 673ec5c | 2020-11-16 11:05:03 -0700 | [diff] [blame] | 1551 | "maxDiskSize": "A String", # The maximum disk size of the instance in bytes. |
| 1552 | "masterInstanceName": "A String", # The name of the instance which will act as primary in the replication setup. |
| 1553 | "serviceAccountEmailAddress": "A String", # The service account email address assigned to the instance. This property is applicable only to Second Generation instances. |
| 1554 | "replicaConfiguration": { # Read-replica configuration for connecting to the primary instance. # Configuration specific to failover replicas and read replicas. |
| 1555 | "mysqlReplicaConfiguration": { # Read-replica configuration specific to MySQL databases. # MySQL specific configuration when replicating from a MySQL on-premises primary instance. Replication configuration information such as the username, password, certificates, and keys are not stored in the instance metadata. The configuration information is used only to set up the replication connection and is stored by MySQL in a file named *master.info* in the data directory. |
| 1556 | "clientKey": "A String", # PEM representation of the replica's private key. The corresponsing public key is encoded in the client's certificate. |
| 1557 | "kind": "A String", # This is always *sql#mysqlReplicaConfiguration*. |
| 1558 | "caCertificate": "A String", # PEM representation of the trusted CA's x509 certificate. |
| 1559 | "masterHeartbeatPeriod": "A String", # Interval in milliseconds between replication heartbeats. |
| 1560 | "dumpFilePath": "A String", # Path to a SQL dump file in Google Cloud Storage from which the replica instance is to be created. The URI is in the form gs://bucketName/fileName. Compressed gzip files (.gz) are also supported. Dumps have the binlog co-ordinates from which replication begins. This can be accomplished by setting --master-data to 1 when using mysqldump. |
| 1561 | "username": "A String", # The username for the replication connection. |
| 1562 | "sslCipher": "A String", # A list of permissible ciphers to use for SSL encryption. |
| 1563 | "connectRetryInterval": 42, # Seconds to wait between connect retries. MySQL's default is 60 seconds. |
| 1564 | "verifyServerCertificate": True or False, # Whether or not to check the primary instance's Common Name value in the certificate that it sends during the SSL handshake. |
| 1565 | "clientCertificate": "A String", # PEM representation of the replica's x509 certificate. |
| 1566 | "password": "A String", # The password for the replication connection. |
| 1567 | }, |
| 1568 | "kind": "A String", # This is always *sql#replicaConfiguration*. |
| 1569 | "failoverTarget": True or False, # Specifies if the replica is the failover target. If the field is set to *true* the replica will be designated as a failover replica. In case the primary instance fails, the replica instance will be promoted as the new primary instance. Only one replica can be specified as failover target, and the replica has to be in different zone with the primary instance. |
| 1570 | }, |
| 1571 | "kind": "A String", # This is always *sql#instance*. |
| 1572 | "instanceType": "A String", # The instance type. This can be one of the following. *CLOUD_SQL_INSTANCE*: A Cloud SQL instance that is not replicating from a primary instance. *ON_PREMISES_INSTANCE*: An instance running on the customer's premises. *READ_REPLICA_INSTANCE*: A Cloud SQL instance configured as a read-replica. |
| 1573 | "name": "A String", # Name of the Cloud SQL instance. This does not include the project ID. |
| 1574 | "serverCaCert": { # SslCerts Resource # SSL configuration. |
| 1575 | "certSerialNumber": "A String", # Serial number, as extracted from the certificate. |
| 1576 | "instance": "A String", # Name of the database instance. |
| 1577 | "kind": "A String", # This is always *sql#sslCert*. |
| 1578 | "createTime": "A String", # The time when the certificate was created in RFC 3339 format, for example *2012-11-15T16:19:00.094Z* |
| 1579 | "cert": "A String", # PEM representation. |
| 1580 | "sha1Fingerprint": "A String", # Sha1 Fingerprint. |
| 1581 | "selfLink": "A String", # The URI of this resource. |
| 1582 | "commonName": "A String", # User supplied name. Constrained to [a-zA-Z.-_ ]+. |
| 1583 | "expirationTime": "A String", # The time when the certificate expires in RFC 3339 format, for example *2012-11-15T16:19:00.094Z*. |
| 1584 | }, |
| 1585 | "currentDiskSize": "A String", # The current disk usage of the instance in bytes. This property has been deprecated. Use the "cloudsql.googleapis.com/database/disk/bytes_used" metric in Cloud Monitoring API instead. Please see this announcement for details. |
| 1586 | "project": "A String", # The project ID of the project containing the Cloud SQL instance. The Google apps domain is prefixed if applicable. |
| 1587 | "diskEncryptionConfiguration": { # Disk encryption configuration for an instance. # Disk encryption configuration specific to an instance. Applies only to Second Generation instances. |
| 1588 | "kmsKeyName": "A String", # Resource name of KMS key for disk encryption |
| 1589 | "kind": "A String", # This is always *sql#diskEncryptionConfiguration*. |
| 1590 | }, |
| 1591 | "state": "A String", # The current serving state of the Cloud SQL instance. This can be one of the following. *SQL_INSTANCE_STATE_UNSPECIFIED*: The state of the instance is unknown. *RUNNABLE*: The instance has been stopped by owner. It is not currently running, but it's ready to be restarted. *SUSPENDED*: The instance is not available, for example due to problems with billing. for example due to problems with billing. *PENDING_DELETE*: The instance is being deleted. *PENDING_CREATE*: The instance is being created. *MAINTENANCE*: The instance is down for maintenance. *FAILED*: The instance creation failed. |
| 1592 | "failoverReplica": { # The name and status of the failover replica. This property is applicable only to Second Generation instances. |
| 1593 | "available": True or False, # The availability status of the failover replica. A false status indicates that the failover replica is out of sync. The primary instance can only failover to the failover replica when the status is true. |
| 1594 | "name": "A String", # The name of the failover replica. If specified at instance creation, a failover replica is created for the instance. The name doesn't include the project ID. This property is applicable only to Second Generation instances. |
| 1595 | }, |
| 1596 | "ipAddresses": [ # The assigned IP addresses for the instance. |
| 1597 | { # Database instance IP Mapping. |
| 1598 | "type": "A String", # The type of this IP address. A *PRIMARY* address is a public address that can accept incoming connections. A *PRIVATE* address is a private address that can accept incoming connections. An *OUTGOING* address is the source address of connections originating from the instance, if supported. |
| 1599 | "timeToRetire": "A String", # The due time for this IP to be retired in RFC 3339 format, for example *2012-11-15T16:19:00.094Z*. This field is only available when the IP is scheduled to be retired. |
| 1600 | "ipAddress": "A String", # The IP address assigned. |
| 1601 | }, |
| 1602 | ], |
| 1603 | "ipv6Address": "A String", # The IPv6 address assigned to the instance. (Deprecated) This property was applicable only to First Generation instances. |
Dmitry Frenkel | 3e17f89 | 2020-10-06 16:46:05 -0700 | [diff] [blame] | 1604 | "settings": { # Database instance settings. # The user settings. |
Bu Sun Kim | 673ec5c | 2020-11-16 11:05:03 -0700 | [diff] [blame] | 1605 | "activeDirectoryConfig": { # Active Directory configuration, relevant only for Cloud SQL for SQL Server. # Active Directory configuration, relevant only for Cloud SQL for SQL Server. |
| 1606 | "kind": "A String", # This is always sql#activeDirectoryConfig. |
| 1607 | "domain": "A String", # The name of the domain (e.g., mydomain.com). |
Dmitry Frenkel | 3e17f89 | 2020-10-06 16:46:05 -0700 | [diff] [blame] | 1608 | }, |
Dmitry Frenkel | 3e17f89 | 2020-10-06 16:46:05 -0700 | [diff] [blame] | 1609 | "denyMaintenancePeriods": [ # Deny maintenance periods |
| 1610 | { # Deny Maintenance Periods. This specifies a date range during when all CSA rollout will be denied. |
| 1611 | "startDate": "A String", # "deny maintenance period" start date. If the year of the start date is empty, the year of the end date also must be empty. In this case, it means the deny maintenance period recurs every year. The date is in format yyyy-mm-dd i.e., 2020-11-01, or mm-dd, i.e., 11-01 |
| 1612 | "time": "A String", # Time in UTC when the "deny maintenance period" starts on start_date and ends on end_date. The time is in format: HH:mm:SS, i.e., 00:00:00 |
| 1613 | "endDate": "A String", # "deny maintenance period" end date. If the year of the end date is empty, the year of the start date also must be empty. In this case, it means the deny maintenance period recurs every year. The date is in format yyyy-mm-dd i.e., 2020-11-01, or mm-dd, i.e., 11-01 |
| 1614 | }, |
| 1615 | ], |
Bu Sun Kim | 673ec5c | 2020-11-16 11:05:03 -0700 | [diff] [blame] | 1616 | "authorizedGaeApplications": [ # The App Engine app IDs that can access this instance. (Deprecated) Applied to First Generation instances only. |
| 1617 | "A String", |
| 1618 | ], |
| 1619 | "backupConfiguration": { # Database instance backup configuration. # The daily backup configuration for the instance. |
| 1620 | "kind": "A String", # This is always *sql#backupConfiguration*. |
| 1621 | "replicationLogArchivingEnabled": True or False, # Reserved for future use. |
| 1622 | "pointInTimeRecoveryEnabled": True or False, # Reserved for future use. |
| 1623 | "binaryLogEnabled": True or False, # (MySQL only) Whether binary log is enabled. If backup configuration is disabled, binarylog must be disabled as well. |
| 1624 | "startTime": "A String", # Start time for the daily backup configuration in UTC timezone in the 24 hour format - *HH:MM*. |
| 1625 | "enabled": True or False, # Whether this configuration is enabled. |
| 1626 | "location": "A String", # Location of the backup |
| 1627 | "transactionLogRetentionDays": 42, # The number of days of transaction logs we retain for point in time restore, from 1-7. |
| 1628 | "backupRetentionSettings": { # We currently only support backup retention by specifying the number of backups we will retain. # Backup retention settings. |
| 1629 | "retainedBackups": 42, # Depending on the value of retention_unit, this is used to determine if a backup needs to be deleted. If retention_unit is 'COUNT', we will retain this many backups. |
| 1630 | "retentionUnit": "A String", # The unit that 'retained_backups' represents. |
| 1631 | }, |
| 1632 | }, |
| 1633 | "databaseFlags": [ # The database flags passed to the instance at startup. |
| 1634 | { # Database flags for Cloud SQL instances. |
| 1635 | "value": "A String", # The value of the flag. Booleans are set to *on* for true and *off* for false. This field must be omitted if the flag doesn't take a value. |
| 1636 | "name": "A String", # The name of the flag. These flags are passed at instance startup, so include both server options and system variables for MySQL. Flags are specified with underscores, not hyphens. For more information, see Configuring Database Flags in the Cloud SQL documentation. |
| 1637 | }, |
| 1638 | ], |
| 1639 | "ipConfiguration": { # IP Management configuration. # The settings for IP Management. This allows to enable or disable the instance IP and manage which external networks can connect to the instance. The IPv4 address cannot be disabled for Second Generation instances. |
| 1640 | "authorizedNetworks": [ # The list of external networks that are allowed to connect to the instance using the IP. In 'CIDR' notation, also known as 'slash' notation (for example: *192.168.100.0/24*). |
| 1641 | { # An entry for an Access Control list. |
| 1642 | "kind": "A String", # This is always *sql#aclEntry*. |
| 1643 | "expirationTime": "A String", # The time when this access control entry expires in RFC 3339 format, for example *2012-11-15T16:19:00.094Z*. |
| 1644 | "name": "A String", # Optional. A label to identify this entry. |
| 1645 | "value": "A String", # The allowlisted value for the access control list. |
| 1646 | }, |
| 1647 | ], |
| 1648 | "requireSsl": True or False, # Whether SSL connections over IP are enforced or not. |
| 1649 | "privateNetwork": "A String", # The resource link for the VPC network from which the Cloud SQL instance is accessible for private IP. For example, */projects/myProject/global/networks/default*. This setting can be updated, but it cannot be removed after it is set. |
| 1650 | "ipv4Enabled": True or False, # Whether the instance is assigned a public IP address or not. |
| 1651 | }, |
| 1652 | "tier": "A String", # The tier (or machine type) for this instance, for example *db-n1-standard-1* (MySQL instances) or *db-custom-1-3840* (PostgreSQL instances). |
| 1653 | "userLabels": { # User-provided labels, represented as a dictionary where each label is a single key value pair. |
| 1654 | "a_key": "A String", |
| 1655 | }, |
| 1656 | "settingsVersion": "A String", # The version of instance settings. This is a required field for update method to make sure concurrent updates are handled properly. During update, use the most recent settingsVersion value for this instance and do not try to update this value. |
| 1657 | "dataDiskType": "A String", # The type of data disk: PD_SSD (default) or PD_HDD. Not used for First Generation instances. |
| 1658 | "replicationType": "A String", # The type of replication this instance uses. This can be either *ASYNCHRONOUS* or *SYNCHRONOUS*. (Deprecated_ This property was only applicable to First Generation instances. |
| 1659 | "locationPreference": { # Preferred location. This specifies where a Cloud SQL instance is located, either in a specific Compute Engine zone, or co-located with an App Engine application. Note that if the preferred location is not available, the instance will be located as close as possible within the region. Only one location may be specified. # The location preference settings. This allows the instance to be located as near as possible to either an App Engine app or Compute Engine zone for better performance. App Engine co-location was only applicable to First Generation instances. |
| 1660 | "secondaryZone": "A String", # The preferred Compute Engine zone for the secondary/failover (for example: us-central1-a, us-central1-b, etc.). Reserved for future use. |
| 1661 | "kind": "A String", # This is always *sql#locationPreference*. |
| 1662 | "followGaeApplication": "A String", # The App Engine application to follow, it must be in the same region as the Cloud SQL instance. |
| 1663 | "zone": "A String", # The preferred Compute Engine zone (for example: us-central1-a, us-central1-b, etc.). |
| 1664 | }, |
| 1665 | "maintenanceWindow": { # Maintenance window. This specifies when a Cloud SQL instance is restarted for system maintenance purposes. # The maintenance window for this instance. This specifies when the instance can be restarted for maintenance purposes. |
| 1666 | "kind": "A String", # This is always *sql#maintenanceWindow*. |
| 1667 | "updateTrack": "A String", # Maintenance timing setting: *canary* (Earlier) or *stable* (Later). Learn more. |
| 1668 | "day": 42, # day of week (1-7), starting on Monday. |
| 1669 | "hour": 42, # hour of day - 0 to 23. |
| 1670 | }, |
| 1671 | "storageAutoResizeLimit": "A String", # The maximum size to which storage capacity can be automatically increased. The default value is 0, which specifies that there is no limit. |
| 1672 | "crashSafeReplicationEnabled": True or False, # Configuration specific to read replica instances. Indicates whether database flags for crash-safe replication are enabled. This property was only applicable to First Generation instances. |
| 1673 | "storageAutoResize": True or False, # Configuration to increase storage size automatically. The default value is true. |
| 1674 | "dataDiskSizeGb": "A String", # The size of data disk, in GB. The data disk size minimum is 10GB. |
| 1675 | "availabilityType": "A String", # Availability type. Potential values: *ZONAL*: The instance serves data from only one zone. Outages in that zone affect data accessibility. *REGIONAL*: The instance can serve data from more than one zone in a region (it is highly available). For more information, see Overview of the High Availability Configuration. |
| 1676 | "kind": "A String", # This is always *sql#settings*. |
| 1677 | "activationPolicy": "A String", # The activation policy specifies when the instance is activated; it is applicable only when the instance state is RUNNABLE. Valid values: *ALWAYS*: The instance is on, and remains so even in the absence of connection requests. *NEVER*: The instance is off; it is not activated, even if a connection request arrives. |
| 1678 | "databaseReplicationEnabled": True or False, # Configuration specific to read replica instances. Indicates whether replication is enabled or not. |
| 1679 | "pricingPlan": "A String", # The pricing plan for this instance. This can be either *PER_USE* or *PACKAGE*. Only *PER_USE* is supported for Second Generation instances. |
| 1680 | "collation": "A String", # The name of server Instance collation. |
Dmitry Frenkel | 3e17f89 | 2020-10-06 16:46:05 -0700 | [diff] [blame] | 1681 | }, |
Bu Sun Kim | 673ec5c | 2020-11-16 11:05:03 -0700 | [diff] [blame] | 1682 | "secondaryGceZone": "A String", # The Compute Engine zone that the failover instance is currently serving from for a regional instance. This value could be different from the zone that was specified when the instance was created if the instance has failed over to its secondary/failover zone. Reserved for future use. |
| 1683 | "backendType": "A String", # *SECOND_GEN*: Cloud SQL database instance. *EXTERNAL*: A database server that is not managed by Google. This property is read-only; use the *tier* property in the *settings* object to determine the database type. |
Dmitry Frenkel | 3e17f89 | 2020-10-06 16:46:05 -0700 | [diff] [blame] | 1684 | "replicaNames": [ # The replicas of the instance. |
| 1685 | "A String", |
| 1686 | ], |
Bu Sun Kim | 673ec5c | 2020-11-16 11:05:03 -0700 | [diff] [blame] | 1687 | "rootPassword": "A String", # Initial root password. Use only on creation. |
Dmitry Frenkel | 3e17f89 | 2020-10-06 16:46:05 -0700 | [diff] [blame] | 1688 | "connectionName": "A String", # Connection name of the Cloud SQL instance used in connection strings. |
Dmitry Frenkel | 3e17f89 | 2020-10-06 16:46:05 -0700 | [diff] [blame] | 1689 | "etag": "A String", # This field is deprecated and will be removed from a future version of the API. Use the *settings.settingsVersion* field instead. |
Dmitry Frenkel | 3e17f89 | 2020-10-06 16:46:05 -0700 | [diff] [blame] | 1690 | } |
Craig Citro | e633be1 | 2015-03-02 13:40:36 -0800 | [diff] [blame] | 1691 | |
Dan O'Meara | dd49464 | 2020-05-01 07:42:23 -0700 | [diff] [blame] | 1692 | x__xgafv: string, V1 error format. |
| 1693 | Allowed values |
| 1694 | 1 - v1 error format |
| 1695 | 2 - v2 error format |
Craig Citro | e633be1 | 2015-03-02 13:40:36 -0800 | [diff] [blame] | 1696 | |
| 1697 | Returns: |
| 1698 | An object of the form: |
| 1699 | |
Dmitry Frenkel | 3e17f89 | 2020-10-06 16:46:05 -0700 | [diff] [blame] | 1700 | { # An Operation resource. For successful operations that return an Operation resource, only the fields relevant to the operation are populated in the resource. |
Dmitry Frenkel | 3e17f89 | 2020-10-06 16:46:05 -0700 | [diff] [blame] | 1701 | "importContext": { # Database instance import context. # The context for import operation, if applicable. |
Bu Sun Kim | 673ec5c | 2020-11-16 11:05:03 -0700 | [diff] [blame] | 1702 | "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. |
Dmitry Frenkel | 3e17f89 | 2020-10-06 16:46:05 -0700 | [diff] [blame] | 1703 | "csvImportOptions": { # Options for importing data as CSV. |
| 1704 | "columns": [ # The columns to which CSV data is imported. If not specified, all columns of the database table are loaded with CSV data. |
| 1705 | "A String", |
| 1706 | ], |
| 1707 | "table": "A String", # The table to which CSV data is imported. |
| 1708 | }, |
Bu Sun Kim | 673ec5c | 2020-11-16 11:05:03 -0700 | [diff] [blame] | 1709 | "kind": "A String", # This is always *sql#importContext*. |
| 1710 | "importUser": "A String", # The PostgreSQL user for this import operation. PostgreSQL instances only. |
| 1711 | "fileType": "A String", # The file type for the specified uri. *SQL*: The file contains SQL statements. *CSV*: The file contains CSV data. |
| 1712 | "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. |
Dmitry Frenkel | 3e17f89 | 2020-10-06 16:46:05 -0700 | [diff] [blame] | 1713 | "bakImportOptions": { # Import parameters specific to SQL Server .BAK files |
| 1714 | "encryptionOptions": { |
Dmitry Frenkel | 3e17f89 | 2020-10-06 16:46:05 -0700 | [diff] [blame] | 1715 | "pvkPassword": "A String", # Password that encrypts the private key |
Bu Sun Kim | 673ec5c | 2020-11-16 11:05:03 -0700 | [diff] [blame] | 1716 | "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. |
| 1717 | "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. |
Dmitry Frenkel | 3e17f89 | 2020-10-06 16:46:05 -0700 | [diff] [blame] | 1718 | }, |
| 1719 | }, |
Dmitry Frenkel | 3e17f89 | 2020-10-06 16:46:05 -0700 | [diff] [blame] | 1720 | }, |
Bu Sun Kim | 673ec5c | 2020-11-16 11:05:03 -0700 | [diff] [blame] | 1721 | "exportContext": { # Database instance export context. # The context for export operation, if applicable. |
| 1722 | "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. |
| 1723 | "sqlExportOptions": { # Options for exporting data as SQL statements. |
| 1724 | "mysqlExportOptions": { # Options for exporting from MySQL. |
| 1725 | "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. If set to *2*, the CHANGE MASTER TO statement is written as a SQL comment, and has no effect. All other values are ignored. |
| 1726 | }, |
| 1727 | "schemaOnly": True or False, # Export only schemas. |
| 1728 | "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. |
| 1729 | "A String", |
| 1730 | ], |
| 1731 | }, |
| 1732 | "kind": "A String", # This is always *sql#exportContext*. |
| 1733 | "csvExportOptions": { # Options for exporting data as CSV. |
| 1734 | "selectQuery": "A String", # The select query used to extract the data. |
| 1735 | }, |
| 1736 | "fileType": "A String", # The file type for the specified uri. *SQL*: The file contains SQL statements. *CSV*: The file contains CSV data. |
| 1737 | "offload": True or False, # Option for export offload. |
| 1738 | "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. |
| 1739 | "A String", |
| 1740 | ], |
| 1741 | }, |
| 1742 | "endTime": "A String", # The time this operation finished in UTC timezone in RFC 3339 format, for example *2012-11-15T16:19:00.094Z*. |
| 1743 | "user": "A String", # The email address of the user who initiated this operation. |
| 1744 | "selfLink": "A String", # The URI of this resource. |
| 1745 | "status": "A String", # The status of an operation. Valid values are: *PENDING* *RUNNING* *DONE* *SQL_OPERATION_STATUS_UNSPECIFIED* |
| 1746 | "insertTime": "A String", # The time this operation was enqueued in UTC timezone in RFC 3339 format, for example *2012-11-15T16:19:00.094Z*. |
| 1747 | "targetId": "A String", # Name of the database instance related to this operation. |
| 1748 | "targetProject": "A String", # The project ID of the target instance related to this operation. |
| 1749 | "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* |
| 1750 | "kind": "A String", # This is always *sql#operation*. |
| 1751 | "error": { # Database instance operation errors list wrapper. # If errors occurred during processing of this operation, this field will be populated. |
| 1752 | "kind": "A String", # This is always *sql#operationErrors*. |
| 1753 | "errors": [ # The list of errors encountered while processing this operation. |
| 1754 | { # Database instance operation error. |
| 1755 | "code": "A String", # Identifies the specific error that occurred. |
| 1756 | "message": "A String", # Additional information about the error encountered. |
| 1757 | "kind": "A String", # This is always *sql#operationError*. |
| 1758 | }, |
| 1759 | ], |
| 1760 | }, |
| 1761 | "targetLink": "A String", |
| 1762 | "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. |
| 1763 | "startTime": "A String", # The time this operation actually started in UTC timezone in RFC 3339 format, for example *2012-11-15T16:19:00.094Z*. |
Craig Citro | e633be1 | 2015-03-02 13:40:36 -0800 | [diff] [blame] | 1764 | }</pre> |
| 1765 | </div> |
| 1766 | |
| 1767 | <div class="method"> |
Dan O'Meara | dd49464 | 2020-05-01 07:42:23 -0700 | [diff] [blame] | 1768 | <code class="details" id="promoteReplica">promoteReplica(project, instance, x__xgafv=None)</code> |
Dmitry Frenkel | 3e17f89 | 2020-10-06 16:46:05 -0700 | [diff] [blame] | 1769 | <pre>Promotes the read replica instance to be a stand-alone Cloud SQL instance. Using this operation might cause your instance to restart. |
Craig Citro | e633be1 | 2015-03-02 13:40:36 -0800 | [diff] [blame] | 1770 | |
| 1771 | Args: |
| 1772 | project: string, ID of the project that contains the read replica. (required) |
| 1773 | instance: string, Cloud SQL read replica instance name. (required) |
Dan O'Meara | dd49464 | 2020-05-01 07:42:23 -0700 | [diff] [blame] | 1774 | x__xgafv: string, V1 error format. |
| 1775 | Allowed values |
| 1776 | 1 - v1 error format |
| 1777 | 2 - v2 error format |
Craig Citro | e633be1 | 2015-03-02 13:40:36 -0800 | [diff] [blame] | 1778 | |
| 1779 | Returns: |
| 1780 | An object of the form: |
| 1781 | |
Dmitry Frenkel | 3e17f89 | 2020-10-06 16:46:05 -0700 | [diff] [blame] | 1782 | { # An Operation resource. For successful operations that return an Operation resource, only the fields relevant to the operation are populated in the resource. |
Dmitry Frenkel | 3e17f89 | 2020-10-06 16:46:05 -0700 | [diff] [blame] | 1783 | "importContext": { # Database instance import context. # The context for import operation, if applicable. |
Bu Sun Kim | 673ec5c | 2020-11-16 11:05:03 -0700 | [diff] [blame] | 1784 | "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. |
Dmitry Frenkel | 3e17f89 | 2020-10-06 16:46:05 -0700 | [diff] [blame] | 1785 | "csvImportOptions": { # Options for importing data as CSV. |
| 1786 | "columns": [ # The columns to which CSV data is imported. If not specified, all columns of the database table are loaded with CSV data. |
| 1787 | "A String", |
| 1788 | ], |
| 1789 | "table": "A String", # The table to which CSV data is imported. |
| 1790 | }, |
Bu Sun Kim | 673ec5c | 2020-11-16 11:05:03 -0700 | [diff] [blame] | 1791 | "kind": "A String", # This is always *sql#importContext*. |
| 1792 | "importUser": "A String", # The PostgreSQL user for this import operation. PostgreSQL instances only. |
| 1793 | "fileType": "A String", # The file type for the specified uri. *SQL*: The file contains SQL statements. *CSV*: The file contains CSV data. |
| 1794 | "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. |
Dmitry Frenkel | 3e17f89 | 2020-10-06 16:46:05 -0700 | [diff] [blame] | 1795 | "bakImportOptions": { # Import parameters specific to SQL Server .BAK files |
| 1796 | "encryptionOptions": { |
Dmitry Frenkel | 3e17f89 | 2020-10-06 16:46:05 -0700 | [diff] [blame] | 1797 | "pvkPassword": "A String", # Password that encrypts the private key |
Bu Sun Kim | 673ec5c | 2020-11-16 11:05:03 -0700 | [diff] [blame] | 1798 | "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. |
| 1799 | "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. |
Dmitry Frenkel | 3e17f89 | 2020-10-06 16:46:05 -0700 | [diff] [blame] | 1800 | }, |
| 1801 | }, |
Dmitry Frenkel | 3e17f89 | 2020-10-06 16:46:05 -0700 | [diff] [blame] | 1802 | }, |
Bu Sun Kim | 673ec5c | 2020-11-16 11:05:03 -0700 | [diff] [blame] | 1803 | "exportContext": { # Database instance export context. # The context for export operation, if applicable. |
| 1804 | "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. |
| 1805 | "sqlExportOptions": { # Options for exporting data as SQL statements. |
| 1806 | "mysqlExportOptions": { # Options for exporting from MySQL. |
| 1807 | "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. If set to *2*, the CHANGE MASTER TO statement is written as a SQL comment, and has no effect. All other values are ignored. |
| 1808 | }, |
| 1809 | "schemaOnly": True or False, # Export only schemas. |
| 1810 | "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. |
| 1811 | "A String", |
| 1812 | ], |
| 1813 | }, |
| 1814 | "kind": "A String", # This is always *sql#exportContext*. |
| 1815 | "csvExportOptions": { # Options for exporting data as CSV. |
| 1816 | "selectQuery": "A String", # The select query used to extract the data. |
| 1817 | }, |
| 1818 | "fileType": "A String", # The file type for the specified uri. *SQL*: The file contains SQL statements. *CSV*: The file contains CSV data. |
| 1819 | "offload": True or False, # Option for export offload. |
| 1820 | "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. |
| 1821 | "A String", |
| 1822 | ], |
| 1823 | }, |
| 1824 | "endTime": "A String", # The time this operation finished in UTC timezone in RFC 3339 format, for example *2012-11-15T16:19:00.094Z*. |
| 1825 | "user": "A String", # The email address of the user who initiated this operation. |
| 1826 | "selfLink": "A String", # The URI of this resource. |
| 1827 | "status": "A String", # The status of an operation. Valid values are: *PENDING* *RUNNING* *DONE* *SQL_OPERATION_STATUS_UNSPECIFIED* |
| 1828 | "insertTime": "A String", # The time this operation was enqueued in UTC timezone in RFC 3339 format, for example *2012-11-15T16:19:00.094Z*. |
| 1829 | "targetId": "A String", # Name of the database instance related to this operation. |
| 1830 | "targetProject": "A String", # The project ID of the target instance related to this operation. |
| 1831 | "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* |
| 1832 | "kind": "A String", # This is always *sql#operation*. |
| 1833 | "error": { # Database instance operation errors list wrapper. # If errors occurred during processing of this operation, this field will be populated. |
| 1834 | "kind": "A String", # This is always *sql#operationErrors*. |
| 1835 | "errors": [ # The list of errors encountered while processing this operation. |
| 1836 | { # Database instance operation error. |
| 1837 | "code": "A String", # Identifies the specific error that occurred. |
| 1838 | "message": "A String", # Additional information about the error encountered. |
| 1839 | "kind": "A String", # This is always *sql#operationError*. |
| 1840 | }, |
| 1841 | ], |
| 1842 | }, |
| 1843 | "targetLink": "A String", |
| 1844 | "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. |
| 1845 | "startTime": "A String", # The time this operation actually started in UTC timezone in RFC 3339 format, for example *2012-11-15T16:19:00.094Z*. |
Craig Citro | e633be1 | 2015-03-02 13:40:36 -0800 | [diff] [blame] | 1846 | }</pre> |
| 1847 | </div> |
| 1848 | |
| 1849 | <div class="method"> |
Dan O'Meara | dd49464 | 2020-05-01 07:42:23 -0700 | [diff] [blame] | 1850 | <code class="details" id="resetSslConfig">resetSslConfig(project, instance, x__xgafv=None)</code> |
Dmitry Frenkel | 3e17f89 | 2020-10-06 16:46:05 -0700 | [diff] [blame] | 1851 | <pre>Deletes all client certificates and generates a new server SSL certificate for the instance. |
Craig Citro | e633be1 | 2015-03-02 13:40:36 -0800 | [diff] [blame] | 1852 | |
| 1853 | Args: |
| 1854 | project: string, Project ID of the project that contains the instance. (required) |
| 1855 | 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] | 1856 | x__xgafv: string, V1 error format. |
| 1857 | Allowed values |
| 1858 | 1 - v1 error format |
| 1859 | 2 - v2 error format |
Craig Citro | e633be1 | 2015-03-02 13:40:36 -0800 | [diff] [blame] | 1860 | |
| 1861 | Returns: |
| 1862 | An object of the form: |
| 1863 | |
Dmitry Frenkel | 3e17f89 | 2020-10-06 16:46:05 -0700 | [diff] [blame] | 1864 | { # An Operation resource. For successful operations that return an Operation resource, only the fields relevant to the operation are populated in the resource. |
Dmitry Frenkel | 3e17f89 | 2020-10-06 16:46:05 -0700 | [diff] [blame] | 1865 | "importContext": { # Database instance import context. # The context for import operation, if applicable. |
Bu Sun Kim | 673ec5c | 2020-11-16 11:05:03 -0700 | [diff] [blame] | 1866 | "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. |
Dmitry Frenkel | 3e17f89 | 2020-10-06 16:46:05 -0700 | [diff] [blame] | 1867 | "csvImportOptions": { # Options for importing data as CSV. |
| 1868 | "columns": [ # The columns to which CSV data is imported. If not specified, all columns of the database table are loaded with CSV data. |
| 1869 | "A String", |
| 1870 | ], |
| 1871 | "table": "A String", # The table to which CSV data is imported. |
| 1872 | }, |
Bu Sun Kim | 673ec5c | 2020-11-16 11:05:03 -0700 | [diff] [blame] | 1873 | "kind": "A String", # This is always *sql#importContext*. |
| 1874 | "importUser": "A String", # The PostgreSQL user for this import operation. PostgreSQL instances only. |
| 1875 | "fileType": "A String", # The file type for the specified uri. *SQL*: The file contains SQL statements. *CSV*: The file contains CSV data. |
| 1876 | "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. |
Dmitry Frenkel | 3e17f89 | 2020-10-06 16:46:05 -0700 | [diff] [blame] | 1877 | "bakImportOptions": { # Import parameters specific to SQL Server .BAK files |
| 1878 | "encryptionOptions": { |
Dmitry Frenkel | 3e17f89 | 2020-10-06 16:46:05 -0700 | [diff] [blame] | 1879 | "pvkPassword": "A String", # Password that encrypts the private key |
Bu Sun Kim | 673ec5c | 2020-11-16 11:05:03 -0700 | [diff] [blame] | 1880 | "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. |
| 1881 | "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. |
Dmitry Frenkel | 3e17f89 | 2020-10-06 16:46:05 -0700 | [diff] [blame] | 1882 | }, |
| 1883 | }, |
Dmitry Frenkel | 3e17f89 | 2020-10-06 16:46:05 -0700 | [diff] [blame] | 1884 | }, |
Bu Sun Kim | 673ec5c | 2020-11-16 11:05:03 -0700 | [diff] [blame] | 1885 | "exportContext": { # Database instance export context. # The context for export operation, if applicable. |
| 1886 | "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. |
| 1887 | "sqlExportOptions": { # Options for exporting data as SQL statements. |
| 1888 | "mysqlExportOptions": { # Options for exporting from MySQL. |
| 1889 | "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. If set to *2*, the CHANGE MASTER TO statement is written as a SQL comment, and has no effect. All other values are ignored. |
| 1890 | }, |
| 1891 | "schemaOnly": True or False, # Export only schemas. |
| 1892 | "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. |
| 1893 | "A String", |
| 1894 | ], |
| 1895 | }, |
| 1896 | "kind": "A String", # This is always *sql#exportContext*. |
| 1897 | "csvExportOptions": { # Options for exporting data as CSV. |
| 1898 | "selectQuery": "A String", # The select query used to extract the data. |
| 1899 | }, |
| 1900 | "fileType": "A String", # The file type for the specified uri. *SQL*: The file contains SQL statements. *CSV*: The file contains CSV data. |
| 1901 | "offload": True or False, # Option for export offload. |
| 1902 | "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. |
| 1903 | "A String", |
| 1904 | ], |
| 1905 | }, |
| 1906 | "endTime": "A String", # The time this operation finished in UTC timezone in RFC 3339 format, for example *2012-11-15T16:19:00.094Z*. |
| 1907 | "user": "A String", # The email address of the user who initiated this operation. |
| 1908 | "selfLink": "A String", # The URI of this resource. |
| 1909 | "status": "A String", # The status of an operation. Valid values are: *PENDING* *RUNNING* *DONE* *SQL_OPERATION_STATUS_UNSPECIFIED* |
| 1910 | "insertTime": "A String", # The time this operation was enqueued in UTC timezone in RFC 3339 format, for example *2012-11-15T16:19:00.094Z*. |
| 1911 | "targetId": "A String", # Name of the database instance related to this operation. |
| 1912 | "targetProject": "A String", # The project ID of the target instance related to this operation. |
| 1913 | "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* |
| 1914 | "kind": "A String", # This is always *sql#operation*. |
| 1915 | "error": { # Database instance operation errors list wrapper. # If errors occurred during processing of this operation, this field will be populated. |
| 1916 | "kind": "A String", # This is always *sql#operationErrors*. |
| 1917 | "errors": [ # The list of errors encountered while processing this operation. |
| 1918 | { # Database instance operation error. |
| 1919 | "code": "A String", # Identifies the specific error that occurred. |
| 1920 | "message": "A String", # Additional information about the error encountered. |
| 1921 | "kind": "A String", # This is always *sql#operationError*. |
| 1922 | }, |
| 1923 | ], |
| 1924 | }, |
| 1925 | "targetLink": "A String", |
| 1926 | "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. |
| 1927 | "startTime": "A String", # The time this operation actually started in UTC timezone in RFC 3339 format, for example *2012-11-15T16:19:00.094Z*. |
Craig Citro | e633be1 | 2015-03-02 13:40:36 -0800 | [diff] [blame] | 1928 | }</pre> |
| 1929 | </div> |
| 1930 | |
| 1931 | <div class="method"> |
Dan O'Meara | dd49464 | 2020-05-01 07:42:23 -0700 | [diff] [blame] | 1932 | <code class="details" id="restart">restart(project, instance, x__xgafv=None)</code> |
Craig Citro | e633be1 | 2015-03-02 13:40:36 -0800 | [diff] [blame] | 1933 | <pre>Restarts a Cloud SQL instance. |
| 1934 | |
| 1935 | Args: |
| 1936 | project: string, Project ID of the project that contains the instance to be restarted. (required) |
| 1937 | 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] | 1938 | x__xgafv: string, V1 error format. |
| 1939 | Allowed values |
| 1940 | 1 - v1 error format |
| 1941 | 2 - v2 error format |
Craig Citro | e633be1 | 2015-03-02 13:40:36 -0800 | [diff] [blame] | 1942 | |
| 1943 | Returns: |
| 1944 | An object of the form: |
| 1945 | |
Dmitry Frenkel | 3e17f89 | 2020-10-06 16:46:05 -0700 | [diff] [blame] | 1946 | { # An Operation resource. For successful operations that return an Operation resource, only the fields relevant to the operation are populated in the resource. |
Dmitry Frenkel | 3e17f89 | 2020-10-06 16:46:05 -0700 | [diff] [blame] | 1947 | "importContext": { # Database instance import context. # The context for import operation, if applicable. |
Bu Sun Kim | 673ec5c | 2020-11-16 11:05:03 -0700 | [diff] [blame] | 1948 | "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. |
Dmitry Frenkel | 3e17f89 | 2020-10-06 16:46:05 -0700 | [diff] [blame] | 1949 | "csvImportOptions": { # Options for importing data as CSV. |
| 1950 | "columns": [ # The columns to which CSV data is imported. If not specified, all columns of the database table are loaded with CSV data. |
| 1951 | "A String", |
| 1952 | ], |
| 1953 | "table": "A String", # The table to which CSV data is imported. |
| 1954 | }, |
Bu Sun Kim | 673ec5c | 2020-11-16 11:05:03 -0700 | [diff] [blame] | 1955 | "kind": "A String", # This is always *sql#importContext*. |
| 1956 | "importUser": "A String", # The PostgreSQL user for this import operation. PostgreSQL instances only. |
| 1957 | "fileType": "A String", # The file type for the specified uri. *SQL*: The file contains SQL statements. *CSV*: The file contains CSV data. |
| 1958 | "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. |
Dmitry Frenkel | 3e17f89 | 2020-10-06 16:46:05 -0700 | [diff] [blame] | 1959 | "bakImportOptions": { # Import parameters specific to SQL Server .BAK files |
| 1960 | "encryptionOptions": { |
Dmitry Frenkel | 3e17f89 | 2020-10-06 16:46:05 -0700 | [diff] [blame] | 1961 | "pvkPassword": "A String", # Password that encrypts the private key |
Bu Sun Kim | 673ec5c | 2020-11-16 11:05:03 -0700 | [diff] [blame] | 1962 | "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. |
| 1963 | "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. |
Dmitry Frenkel | 3e17f89 | 2020-10-06 16:46:05 -0700 | [diff] [blame] | 1964 | }, |
| 1965 | }, |
Dmitry Frenkel | 3e17f89 | 2020-10-06 16:46:05 -0700 | [diff] [blame] | 1966 | }, |
Bu Sun Kim | 673ec5c | 2020-11-16 11:05:03 -0700 | [diff] [blame] | 1967 | "exportContext": { # Database instance export context. # The context for export operation, if applicable. |
| 1968 | "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. |
| 1969 | "sqlExportOptions": { # Options for exporting data as SQL statements. |
| 1970 | "mysqlExportOptions": { # Options for exporting from MySQL. |
| 1971 | "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. If set to *2*, the CHANGE MASTER TO statement is written as a SQL comment, and has no effect. All other values are ignored. |
| 1972 | }, |
| 1973 | "schemaOnly": True or False, # Export only schemas. |
| 1974 | "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. |
| 1975 | "A String", |
| 1976 | ], |
| 1977 | }, |
| 1978 | "kind": "A String", # This is always *sql#exportContext*. |
| 1979 | "csvExportOptions": { # Options for exporting data as CSV. |
| 1980 | "selectQuery": "A String", # The select query used to extract the data. |
| 1981 | }, |
| 1982 | "fileType": "A String", # The file type for the specified uri. *SQL*: The file contains SQL statements. *CSV*: The file contains CSV data. |
| 1983 | "offload": True or False, # Option for export offload. |
| 1984 | "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. |
| 1985 | "A String", |
| 1986 | ], |
| 1987 | }, |
| 1988 | "endTime": "A String", # The time this operation finished in UTC timezone in RFC 3339 format, for example *2012-11-15T16:19:00.094Z*. |
| 1989 | "user": "A String", # The email address of the user who initiated this operation. |
| 1990 | "selfLink": "A String", # The URI of this resource. |
| 1991 | "status": "A String", # The status of an operation. Valid values are: *PENDING* *RUNNING* *DONE* *SQL_OPERATION_STATUS_UNSPECIFIED* |
| 1992 | "insertTime": "A String", # The time this operation was enqueued in UTC timezone in RFC 3339 format, for example *2012-11-15T16:19:00.094Z*. |
| 1993 | "targetId": "A String", # Name of the database instance related to this operation. |
| 1994 | "targetProject": "A String", # The project ID of the target instance related to this operation. |
| 1995 | "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* |
| 1996 | "kind": "A String", # This is always *sql#operation*. |
| 1997 | "error": { # Database instance operation errors list wrapper. # If errors occurred during processing of this operation, this field will be populated. |
| 1998 | "kind": "A String", # This is always *sql#operationErrors*. |
| 1999 | "errors": [ # The list of errors encountered while processing this operation. |
| 2000 | { # Database instance operation error. |
| 2001 | "code": "A String", # Identifies the specific error that occurred. |
| 2002 | "message": "A String", # Additional information about the error encountered. |
| 2003 | "kind": "A String", # This is always *sql#operationError*. |
| 2004 | }, |
| 2005 | ], |
| 2006 | }, |
| 2007 | "targetLink": "A String", |
| 2008 | "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. |
| 2009 | "startTime": "A String", # The time this operation actually started in UTC timezone in RFC 3339 format, for example *2012-11-15T16:19:00.094Z*. |
Craig Citro | e633be1 | 2015-03-02 13:40:36 -0800 | [diff] [blame] | 2010 | }</pre> |
| 2011 | </div> |
| 2012 | |
| 2013 | <div class="method"> |
Dan O'Meara | dd49464 | 2020-05-01 07:42:23 -0700 | [diff] [blame] | 2014 | <code class="details" id="restoreBackup">restoreBackup(project, instance, body=None, x__xgafv=None)</code> |
Dmitry Frenkel | 3e17f89 | 2020-10-06 16:46:05 -0700 | [diff] [blame] | 2015 | <pre>Restores a backup of a Cloud SQL instance. Using this operation might cause your instance to restart. |
Craig Citro | e633be1 | 2015-03-02 13:40:36 -0800 | [diff] [blame] | 2016 | |
| 2017 | Args: |
| 2018 | project: string, Project ID of the project that contains the instance. (required) |
| 2019 | 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] | 2020 | body: object, The request body. |
Craig Citro | e633be1 | 2015-03-02 13:40:36 -0800 | [diff] [blame] | 2021 | The object takes the form of: |
| 2022 | |
| 2023 | { # Database instance restore backup request. |
Dmitry Frenkel | 3e17f89 | 2020-10-06 16:46:05 -0700 | [diff] [blame] | 2024 | "restoreBackupContext": { # Database instance restore from backup context. Backup context contains source instance id and project id. # Parameters required to perform the restore backup operation. |
Dmitry Frenkel | 3e17f89 | 2020-10-06 16:46:05 -0700 | [diff] [blame] | 2025 | "kind": "A String", # This is always *sql#restoreBackupContext*. |
Bu Sun Kim | 6502091 | 2020-05-20 12:08:20 -0700 | [diff] [blame] | 2026 | "backupRunId": "A String", # The ID of the backup run to restore from. |
Bu Sun Kim | 673ec5c | 2020-11-16 11:05:03 -0700 | [diff] [blame] | 2027 | "project": "A String", # The full project ID of the source instance. |
Bu Sun Kim | 6502091 | 2020-05-20 12:08:20 -0700 | [diff] [blame] | 2028 | "instanceId": "A String", # The ID of the instance that the backup was taken from. |
Craig Citro | e633be1 | 2015-03-02 13:40:36 -0800 | [diff] [blame] | 2029 | }, |
| 2030 | } |
| 2031 | |
Dan O'Meara | dd49464 | 2020-05-01 07:42:23 -0700 | [diff] [blame] | 2032 | x__xgafv: string, V1 error format. |
| 2033 | Allowed values |
| 2034 | 1 - v1 error format |
| 2035 | 2 - v2 error format |
Craig Citro | e633be1 | 2015-03-02 13:40:36 -0800 | [diff] [blame] | 2036 | |
| 2037 | Returns: |
| 2038 | An object of the form: |
| 2039 | |
Dmitry Frenkel | 3e17f89 | 2020-10-06 16:46:05 -0700 | [diff] [blame] | 2040 | { # An Operation resource. For successful operations that return an Operation resource, only the fields relevant to the operation are populated in the resource. |
Dmitry Frenkel | 3e17f89 | 2020-10-06 16:46:05 -0700 | [diff] [blame] | 2041 | "importContext": { # Database instance import context. # The context for import operation, if applicable. |
Bu Sun Kim | 673ec5c | 2020-11-16 11:05:03 -0700 | [diff] [blame] | 2042 | "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. |
Dmitry Frenkel | 3e17f89 | 2020-10-06 16:46:05 -0700 | [diff] [blame] | 2043 | "csvImportOptions": { # Options for importing data as CSV. |
| 2044 | "columns": [ # The columns to which CSV data is imported. If not specified, all columns of the database table are loaded with CSV data. |
| 2045 | "A String", |
| 2046 | ], |
| 2047 | "table": "A String", # The table to which CSV data is imported. |
| 2048 | }, |
Bu Sun Kim | 673ec5c | 2020-11-16 11:05:03 -0700 | [diff] [blame] | 2049 | "kind": "A String", # This is always *sql#importContext*. |
| 2050 | "importUser": "A String", # The PostgreSQL user for this import operation. PostgreSQL instances only. |
| 2051 | "fileType": "A String", # The file type for the specified uri. *SQL*: The file contains SQL statements. *CSV*: The file contains CSV data. |
| 2052 | "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. |
Dmitry Frenkel | 3e17f89 | 2020-10-06 16:46:05 -0700 | [diff] [blame] | 2053 | "bakImportOptions": { # Import parameters specific to SQL Server .BAK files |
| 2054 | "encryptionOptions": { |
Dmitry Frenkel | 3e17f89 | 2020-10-06 16:46:05 -0700 | [diff] [blame] | 2055 | "pvkPassword": "A String", # Password that encrypts the private key |
Bu Sun Kim | 673ec5c | 2020-11-16 11:05:03 -0700 | [diff] [blame] | 2056 | "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. |
| 2057 | "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. |
Dmitry Frenkel | 3e17f89 | 2020-10-06 16:46:05 -0700 | [diff] [blame] | 2058 | }, |
| 2059 | }, |
Dmitry Frenkel | 3e17f89 | 2020-10-06 16:46:05 -0700 | [diff] [blame] | 2060 | }, |
Bu Sun Kim | 673ec5c | 2020-11-16 11:05:03 -0700 | [diff] [blame] | 2061 | "exportContext": { # Database instance export context. # The context for export operation, if applicable. |
| 2062 | "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. |
| 2063 | "sqlExportOptions": { # Options for exporting data as SQL statements. |
| 2064 | "mysqlExportOptions": { # Options for exporting from MySQL. |
| 2065 | "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. If set to *2*, the CHANGE MASTER TO statement is written as a SQL comment, and has no effect. All other values are ignored. |
| 2066 | }, |
| 2067 | "schemaOnly": True or False, # Export only schemas. |
| 2068 | "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. |
| 2069 | "A String", |
| 2070 | ], |
| 2071 | }, |
| 2072 | "kind": "A String", # This is always *sql#exportContext*. |
| 2073 | "csvExportOptions": { # Options for exporting data as CSV. |
| 2074 | "selectQuery": "A String", # The select query used to extract the data. |
| 2075 | }, |
| 2076 | "fileType": "A String", # The file type for the specified uri. *SQL*: The file contains SQL statements. *CSV*: The file contains CSV data. |
| 2077 | "offload": True or False, # Option for export offload. |
| 2078 | "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. |
| 2079 | "A String", |
| 2080 | ], |
| 2081 | }, |
| 2082 | "endTime": "A String", # The time this operation finished in UTC timezone in RFC 3339 format, for example *2012-11-15T16:19:00.094Z*. |
| 2083 | "user": "A String", # The email address of the user who initiated this operation. |
| 2084 | "selfLink": "A String", # The URI of this resource. |
| 2085 | "status": "A String", # The status of an operation. Valid values are: *PENDING* *RUNNING* *DONE* *SQL_OPERATION_STATUS_UNSPECIFIED* |
| 2086 | "insertTime": "A String", # The time this operation was enqueued in UTC timezone in RFC 3339 format, for example *2012-11-15T16:19:00.094Z*. |
| 2087 | "targetId": "A String", # Name of the database instance related to this operation. |
| 2088 | "targetProject": "A String", # The project ID of the target instance related to this operation. |
| 2089 | "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* |
| 2090 | "kind": "A String", # This is always *sql#operation*. |
| 2091 | "error": { # Database instance operation errors list wrapper. # If errors occurred during processing of this operation, this field will be populated. |
| 2092 | "kind": "A String", # This is always *sql#operationErrors*. |
| 2093 | "errors": [ # The list of errors encountered while processing this operation. |
| 2094 | { # Database instance operation error. |
| 2095 | "code": "A String", # Identifies the specific error that occurred. |
| 2096 | "message": "A String", # Additional information about the error encountered. |
| 2097 | "kind": "A String", # This is always *sql#operationError*. |
| 2098 | }, |
| 2099 | ], |
| 2100 | }, |
| 2101 | "targetLink": "A String", |
| 2102 | "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. |
| 2103 | "startTime": "A String", # The time this operation actually started in UTC timezone in RFC 3339 format, for example *2012-11-15T16:19:00.094Z*. |
Bu Sun Kim | 715bd7f | 2019-06-14 16:50:42 -0700 | [diff] [blame] | 2104 | }</pre> |
| 2105 | </div> |
| 2106 | |
| 2107 | <div class="method"> |
Dan O'Meara | dd49464 | 2020-05-01 07:42:23 -0700 | [diff] [blame] | 2108 | <code class="details" id="rotateServerCa">rotateServerCa(project, instance, body=None, x__xgafv=None)</code> |
Dmitry Frenkel | 3e17f89 | 2020-10-06 16:46:05 -0700 | [diff] [blame] | 2109 | <pre>Rotates the server certificate to one signed by the Certificate Authority (CA) version previously added with the addServerCA method. |
Bu Sun Kim | 715bd7f | 2019-06-14 16:50:42 -0700 | [diff] [blame] | 2110 | |
| 2111 | Args: |
| 2112 | project: string, Project ID of the project that contains the instance. (required) |
| 2113 | 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] | 2114 | body: object, The request body. |
Bu Sun Kim | 715bd7f | 2019-06-14 16:50:42 -0700 | [diff] [blame] | 2115 | The object takes the form of: |
| 2116 | |
| 2117 | { # Rotate Server CA request. |
Bu Sun Kim | 6502091 | 2020-05-20 12:08:20 -0700 | [diff] [blame] | 2118 | "rotateServerCaContext": { # Instance rotate server CA context. # Contains details about the rotate server CA operation. |
Dmitry Frenkel | 3e17f89 | 2020-10-06 16:46:05 -0700 | [diff] [blame] | 2119 | "kind": "A String", # This is always *sql#rotateServerCaContext*. |
Bu Sun Kim | 673ec5c | 2020-11-16 11:05:03 -0700 | [diff] [blame] | 2120 | "nextVersion": "A String", # The fingerprint of the next version to be rotated to. If left unspecified, will be rotated to the most recently added server CA version. |
Bu Sun Kim | 715bd7f | 2019-06-14 16:50:42 -0700 | [diff] [blame] | 2121 | }, |
| 2122 | } |
| 2123 | |
Dan O'Meara | dd49464 | 2020-05-01 07:42:23 -0700 | [diff] [blame] | 2124 | x__xgafv: string, V1 error format. |
| 2125 | Allowed values |
| 2126 | 1 - v1 error format |
| 2127 | 2 - v2 error format |
Bu Sun Kim | 715bd7f | 2019-06-14 16:50:42 -0700 | [diff] [blame] | 2128 | |
| 2129 | Returns: |
| 2130 | An object of the form: |
| 2131 | |
Dmitry Frenkel | 3e17f89 | 2020-10-06 16:46:05 -0700 | [diff] [blame] | 2132 | { # An Operation resource. For successful operations that return an Operation resource, only the fields relevant to the operation are populated in the resource. |
Dmitry Frenkel | 3e17f89 | 2020-10-06 16:46:05 -0700 | [diff] [blame] | 2133 | "importContext": { # Database instance import context. # The context for import operation, if applicable. |
Bu Sun Kim | 673ec5c | 2020-11-16 11:05:03 -0700 | [diff] [blame] | 2134 | "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. |
Dmitry Frenkel | 3e17f89 | 2020-10-06 16:46:05 -0700 | [diff] [blame] | 2135 | "csvImportOptions": { # Options for importing data as CSV. |
| 2136 | "columns": [ # The columns to which CSV data is imported. If not specified, all columns of the database table are loaded with CSV data. |
| 2137 | "A String", |
| 2138 | ], |
| 2139 | "table": "A String", # The table to which CSV data is imported. |
| 2140 | }, |
Bu Sun Kim | 673ec5c | 2020-11-16 11:05:03 -0700 | [diff] [blame] | 2141 | "kind": "A String", # This is always *sql#importContext*. |
| 2142 | "importUser": "A String", # The PostgreSQL user for this import operation. PostgreSQL instances only. |
| 2143 | "fileType": "A String", # The file type for the specified uri. *SQL*: The file contains SQL statements. *CSV*: The file contains CSV data. |
| 2144 | "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. |
Dmitry Frenkel | 3e17f89 | 2020-10-06 16:46:05 -0700 | [diff] [blame] | 2145 | "bakImportOptions": { # Import parameters specific to SQL Server .BAK files |
| 2146 | "encryptionOptions": { |
Dmitry Frenkel | 3e17f89 | 2020-10-06 16:46:05 -0700 | [diff] [blame] | 2147 | "pvkPassword": "A String", # Password that encrypts the private key |
Bu Sun Kim | 673ec5c | 2020-11-16 11:05:03 -0700 | [diff] [blame] | 2148 | "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. |
| 2149 | "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. |
Dmitry Frenkel | 3e17f89 | 2020-10-06 16:46:05 -0700 | [diff] [blame] | 2150 | }, |
| 2151 | }, |
Dmitry Frenkel | 3e17f89 | 2020-10-06 16:46:05 -0700 | [diff] [blame] | 2152 | }, |
Bu Sun Kim | 673ec5c | 2020-11-16 11:05:03 -0700 | [diff] [blame] | 2153 | "exportContext": { # Database instance export context. # The context for export operation, if applicable. |
| 2154 | "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. |
| 2155 | "sqlExportOptions": { # Options for exporting data as SQL statements. |
| 2156 | "mysqlExportOptions": { # Options for exporting from MySQL. |
| 2157 | "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. If set to *2*, the CHANGE MASTER TO statement is written as a SQL comment, and has no effect. All other values are ignored. |
| 2158 | }, |
| 2159 | "schemaOnly": True or False, # Export only schemas. |
| 2160 | "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. |
| 2161 | "A String", |
| 2162 | ], |
| 2163 | }, |
| 2164 | "kind": "A String", # This is always *sql#exportContext*. |
| 2165 | "csvExportOptions": { # Options for exporting data as CSV. |
| 2166 | "selectQuery": "A String", # The select query used to extract the data. |
| 2167 | }, |
| 2168 | "fileType": "A String", # The file type for the specified uri. *SQL*: The file contains SQL statements. *CSV*: The file contains CSV data. |
| 2169 | "offload": True or False, # Option for export offload. |
| 2170 | "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. |
| 2171 | "A String", |
| 2172 | ], |
| 2173 | }, |
| 2174 | "endTime": "A String", # The time this operation finished in UTC timezone in RFC 3339 format, for example *2012-11-15T16:19:00.094Z*. |
| 2175 | "user": "A String", # The email address of the user who initiated this operation. |
| 2176 | "selfLink": "A String", # The URI of this resource. |
| 2177 | "status": "A String", # The status of an operation. Valid values are: *PENDING* *RUNNING* *DONE* *SQL_OPERATION_STATUS_UNSPECIFIED* |
| 2178 | "insertTime": "A String", # The time this operation was enqueued in UTC timezone in RFC 3339 format, for example *2012-11-15T16:19:00.094Z*. |
| 2179 | "targetId": "A String", # Name of the database instance related to this operation. |
| 2180 | "targetProject": "A String", # The project ID of the target instance related to this operation. |
| 2181 | "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* |
| 2182 | "kind": "A String", # This is always *sql#operation*. |
| 2183 | "error": { # Database instance operation errors list wrapper. # If errors occurred during processing of this operation, this field will be populated. |
| 2184 | "kind": "A String", # This is always *sql#operationErrors*. |
| 2185 | "errors": [ # The list of errors encountered while processing this operation. |
| 2186 | { # Database instance operation error. |
| 2187 | "code": "A String", # Identifies the specific error that occurred. |
| 2188 | "message": "A String", # Additional information about the error encountered. |
| 2189 | "kind": "A String", # This is always *sql#operationError*. |
| 2190 | }, |
| 2191 | ], |
| 2192 | }, |
| 2193 | "targetLink": "A String", |
| 2194 | "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. |
| 2195 | "startTime": "A String", # The time this operation actually started in UTC timezone in RFC 3339 format, for example *2012-11-15T16:19:00.094Z*. |
Craig Citro | e633be1 | 2015-03-02 13:40:36 -0800 | [diff] [blame] | 2196 | }</pre> |
| 2197 | </div> |
| 2198 | |
| 2199 | <div class="method"> |
Dan O'Meara | dd49464 | 2020-05-01 07:42:23 -0700 | [diff] [blame] | 2200 | <code class="details" id="startReplica">startReplica(project, instance, x__xgafv=None)</code> |
Craig Citro | e633be1 | 2015-03-02 13:40:36 -0800 | [diff] [blame] | 2201 | <pre>Starts the replication in the read replica instance. |
| 2202 | |
| 2203 | Args: |
| 2204 | project: string, ID of the project that contains the read replica. (required) |
| 2205 | instance: string, Cloud SQL read replica instance name. (required) |
Dan O'Meara | dd49464 | 2020-05-01 07:42:23 -0700 | [diff] [blame] | 2206 | x__xgafv: string, V1 error format. |
| 2207 | Allowed values |
| 2208 | 1 - v1 error format |
| 2209 | 2 - v2 error format |
Craig Citro | e633be1 | 2015-03-02 13:40:36 -0800 | [diff] [blame] | 2210 | |
| 2211 | Returns: |
| 2212 | An object of the form: |
| 2213 | |
Dmitry Frenkel | 3e17f89 | 2020-10-06 16:46:05 -0700 | [diff] [blame] | 2214 | { # An Operation resource. For successful operations that return an Operation resource, only the fields relevant to the operation are populated in the resource. |
Dmitry Frenkel | 3e17f89 | 2020-10-06 16:46:05 -0700 | [diff] [blame] | 2215 | "importContext": { # Database instance import context. # The context for import operation, if applicable. |
Bu Sun Kim | 673ec5c | 2020-11-16 11:05:03 -0700 | [diff] [blame] | 2216 | "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. |
Dmitry Frenkel | 3e17f89 | 2020-10-06 16:46:05 -0700 | [diff] [blame] | 2217 | "csvImportOptions": { # Options for importing data as CSV. |
| 2218 | "columns": [ # The columns to which CSV data is imported. If not specified, all columns of the database table are loaded with CSV data. |
| 2219 | "A String", |
| 2220 | ], |
| 2221 | "table": "A String", # The table to which CSV data is imported. |
| 2222 | }, |
Bu Sun Kim | 673ec5c | 2020-11-16 11:05:03 -0700 | [diff] [blame] | 2223 | "kind": "A String", # This is always *sql#importContext*. |
| 2224 | "importUser": "A String", # The PostgreSQL user for this import operation. PostgreSQL instances only. |
| 2225 | "fileType": "A String", # The file type for the specified uri. *SQL*: The file contains SQL statements. *CSV*: The file contains CSV data. |
| 2226 | "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. |
Dmitry Frenkel | 3e17f89 | 2020-10-06 16:46:05 -0700 | [diff] [blame] | 2227 | "bakImportOptions": { # Import parameters specific to SQL Server .BAK files |
| 2228 | "encryptionOptions": { |
Dmitry Frenkel | 3e17f89 | 2020-10-06 16:46:05 -0700 | [diff] [blame] | 2229 | "pvkPassword": "A String", # Password that encrypts the private key |
Bu Sun Kim | 673ec5c | 2020-11-16 11:05:03 -0700 | [diff] [blame] | 2230 | "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. |
| 2231 | "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. |
Dmitry Frenkel | 3e17f89 | 2020-10-06 16:46:05 -0700 | [diff] [blame] | 2232 | }, |
| 2233 | }, |
Dmitry Frenkel | 3e17f89 | 2020-10-06 16:46:05 -0700 | [diff] [blame] | 2234 | }, |
Bu Sun Kim | 673ec5c | 2020-11-16 11:05:03 -0700 | [diff] [blame] | 2235 | "exportContext": { # Database instance export context. # The context for export operation, if applicable. |
| 2236 | "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. |
| 2237 | "sqlExportOptions": { # Options for exporting data as SQL statements. |
| 2238 | "mysqlExportOptions": { # Options for exporting from MySQL. |
| 2239 | "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. If set to *2*, the CHANGE MASTER TO statement is written as a SQL comment, and has no effect. All other values are ignored. |
| 2240 | }, |
| 2241 | "schemaOnly": True or False, # Export only schemas. |
| 2242 | "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. |
| 2243 | "A String", |
| 2244 | ], |
| 2245 | }, |
| 2246 | "kind": "A String", # This is always *sql#exportContext*. |
| 2247 | "csvExportOptions": { # Options for exporting data as CSV. |
| 2248 | "selectQuery": "A String", # The select query used to extract the data. |
| 2249 | }, |
| 2250 | "fileType": "A String", # The file type for the specified uri. *SQL*: The file contains SQL statements. *CSV*: The file contains CSV data. |
| 2251 | "offload": True or False, # Option for export offload. |
| 2252 | "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. |
| 2253 | "A String", |
| 2254 | ], |
| 2255 | }, |
| 2256 | "endTime": "A String", # The time this operation finished in UTC timezone in RFC 3339 format, for example *2012-11-15T16:19:00.094Z*. |
| 2257 | "user": "A String", # The email address of the user who initiated this operation. |
| 2258 | "selfLink": "A String", # The URI of this resource. |
| 2259 | "status": "A String", # The status of an operation. Valid values are: *PENDING* *RUNNING* *DONE* *SQL_OPERATION_STATUS_UNSPECIFIED* |
| 2260 | "insertTime": "A String", # The time this operation was enqueued in UTC timezone in RFC 3339 format, for example *2012-11-15T16:19:00.094Z*. |
| 2261 | "targetId": "A String", # Name of the database instance related to this operation. |
| 2262 | "targetProject": "A String", # The project ID of the target instance related to this operation. |
| 2263 | "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* |
| 2264 | "kind": "A String", # This is always *sql#operation*. |
| 2265 | "error": { # Database instance operation errors list wrapper. # If errors occurred during processing of this operation, this field will be populated. |
| 2266 | "kind": "A String", # This is always *sql#operationErrors*. |
| 2267 | "errors": [ # The list of errors encountered while processing this operation. |
| 2268 | { # Database instance operation error. |
| 2269 | "code": "A String", # Identifies the specific error that occurred. |
| 2270 | "message": "A String", # Additional information about the error encountered. |
| 2271 | "kind": "A String", # This is always *sql#operationError*. |
| 2272 | }, |
| 2273 | ], |
| 2274 | }, |
| 2275 | "targetLink": "A String", |
| 2276 | "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. |
| 2277 | "startTime": "A String", # The time this operation actually started in UTC timezone in RFC 3339 format, for example *2012-11-15T16:19:00.094Z*. |
Craig Citro | e633be1 | 2015-03-02 13:40:36 -0800 | [diff] [blame] | 2278 | }</pre> |
| 2279 | </div> |
| 2280 | |
| 2281 | <div class="method"> |
Dan O'Meara | dd49464 | 2020-05-01 07:42:23 -0700 | [diff] [blame] | 2282 | <code class="details" id="stopReplica">stopReplica(project, instance, x__xgafv=None)</code> |
Craig Citro | e633be1 | 2015-03-02 13:40:36 -0800 | [diff] [blame] | 2283 | <pre>Stops the replication in the read replica instance. |
| 2284 | |
| 2285 | Args: |
| 2286 | project: string, ID of the project that contains the read replica. (required) |
| 2287 | instance: string, Cloud SQL read replica instance name. (required) |
Dan O'Meara | dd49464 | 2020-05-01 07:42:23 -0700 | [diff] [blame] | 2288 | x__xgafv: string, V1 error format. |
| 2289 | Allowed values |
| 2290 | 1 - v1 error format |
| 2291 | 2 - v2 error format |
Craig Citro | e633be1 | 2015-03-02 13:40:36 -0800 | [diff] [blame] | 2292 | |
| 2293 | Returns: |
| 2294 | An object of the form: |
| 2295 | |
Dmitry Frenkel | 3e17f89 | 2020-10-06 16:46:05 -0700 | [diff] [blame] | 2296 | { # An Operation resource. For successful operations that return an Operation resource, only the fields relevant to the operation are populated in the resource. |
Dmitry Frenkel | 3e17f89 | 2020-10-06 16:46:05 -0700 | [diff] [blame] | 2297 | "importContext": { # Database instance import context. # The context for import operation, if applicable. |
Bu Sun Kim | 673ec5c | 2020-11-16 11:05:03 -0700 | [diff] [blame] | 2298 | "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. |
Dmitry Frenkel | 3e17f89 | 2020-10-06 16:46:05 -0700 | [diff] [blame] | 2299 | "csvImportOptions": { # Options for importing data as CSV. |
| 2300 | "columns": [ # The columns to which CSV data is imported. If not specified, all columns of the database table are loaded with CSV data. |
| 2301 | "A String", |
| 2302 | ], |
| 2303 | "table": "A String", # The table to which CSV data is imported. |
| 2304 | }, |
Bu Sun Kim | 673ec5c | 2020-11-16 11:05:03 -0700 | [diff] [blame] | 2305 | "kind": "A String", # This is always *sql#importContext*. |
| 2306 | "importUser": "A String", # The PostgreSQL user for this import operation. PostgreSQL instances only. |
| 2307 | "fileType": "A String", # The file type for the specified uri. *SQL*: The file contains SQL statements. *CSV*: The file contains CSV data. |
| 2308 | "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. |
Dmitry Frenkel | 3e17f89 | 2020-10-06 16:46:05 -0700 | [diff] [blame] | 2309 | "bakImportOptions": { # Import parameters specific to SQL Server .BAK files |
| 2310 | "encryptionOptions": { |
Dmitry Frenkel | 3e17f89 | 2020-10-06 16:46:05 -0700 | [diff] [blame] | 2311 | "pvkPassword": "A String", # Password that encrypts the private key |
Bu Sun Kim | 673ec5c | 2020-11-16 11:05:03 -0700 | [diff] [blame] | 2312 | "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. |
| 2313 | "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. |
Dmitry Frenkel | 3e17f89 | 2020-10-06 16:46:05 -0700 | [diff] [blame] | 2314 | }, |
| 2315 | }, |
Dmitry Frenkel | 3e17f89 | 2020-10-06 16:46:05 -0700 | [diff] [blame] | 2316 | }, |
Bu Sun Kim | 673ec5c | 2020-11-16 11:05:03 -0700 | [diff] [blame] | 2317 | "exportContext": { # Database instance export context. # The context for export operation, if applicable. |
| 2318 | "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. |
| 2319 | "sqlExportOptions": { # Options for exporting data as SQL statements. |
| 2320 | "mysqlExportOptions": { # Options for exporting from MySQL. |
| 2321 | "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. If set to *2*, the CHANGE MASTER TO statement is written as a SQL comment, and has no effect. All other values are ignored. |
| 2322 | }, |
| 2323 | "schemaOnly": True or False, # Export only schemas. |
| 2324 | "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. |
| 2325 | "A String", |
| 2326 | ], |
| 2327 | }, |
| 2328 | "kind": "A String", # This is always *sql#exportContext*. |
| 2329 | "csvExportOptions": { # Options for exporting data as CSV. |
| 2330 | "selectQuery": "A String", # The select query used to extract the data. |
| 2331 | }, |
| 2332 | "fileType": "A String", # The file type for the specified uri. *SQL*: The file contains SQL statements. *CSV*: The file contains CSV data. |
| 2333 | "offload": True or False, # Option for export offload. |
| 2334 | "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. |
| 2335 | "A String", |
| 2336 | ], |
| 2337 | }, |
| 2338 | "endTime": "A String", # The time this operation finished in UTC timezone in RFC 3339 format, for example *2012-11-15T16:19:00.094Z*. |
| 2339 | "user": "A String", # The email address of the user who initiated this operation. |
| 2340 | "selfLink": "A String", # The URI of this resource. |
| 2341 | "status": "A String", # The status of an operation. Valid values are: *PENDING* *RUNNING* *DONE* *SQL_OPERATION_STATUS_UNSPECIFIED* |
| 2342 | "insertTime": "A String", # The time this operation was enqueued in UTC timezone in RFC 3339 format, for example *2012-11-15T16:19:00.094Z*. |
| 2343 | "targetId": "A String", # Name of the database instance related to this operation. |
| 2344 | "targetProject": "A String", # The project ID of the target instance related to this operation. |
| 2345 | "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* |
| 2346 | "kind": "A String", # This is always *sql#operation*. |
| 2347 | "error": { # Database instance operation errors list wrapper. # If errors occurred during processing of this operation, this field will be populated. |
| 2348 | "kind": "A String", # This is always *sql#operationErrors*. |
| 2349 | "errors": [ # The list of errors encountered while processing this operation. |
| 2350 | { # Database instance operation error. |
| 2351 | "code": "A String", # Identifies the specific error that occurred. |
| 2352 | "message": "A String", # Additional information about the error encountered. |
| 2353 | "kind": "A String", # This is always *sql#operationError*. |
| 2354 | }, |
| 2355 | ], |
| 2356 | }, |
| 2357 | "targetLink": "A String", |
| 2358 | "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. |
| 2359 | "startTime": "A String", # The time this operation actually started in UTC timezone in RFC 3339 format, for example *2012-11-15T16:19:00.094Z*. |
Craig Citro | e633be1 | 2015-03-02 13:40:36 -0800 | [diff] [blame] | 2360 | }</pre> |
| 2361 | </div> |
| 2362 | |
| 2363 | <div class="method"> |
Dan O'Meara | dd49464 | 2020-05-01 07:42:23 -0700 | [diff] [blame] | 2364 | <code class="details" id="truncateLog">truncateLog(project, instance, body=None, x__xgafv=None)</code> |
Jon Wayne Parrott | 692617a | 2017-01-06 09:58:29 -0800 | [diff] [blame] | 2365 | <pre>Truncate MySQL general and slow query log tables |
| 2366 | |
| 2367 | Args: |
| 2368 | project: string, Project ID of the Cloud SQL project. (required) |
| 2369 | 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] | 2370 | body: object, The request body. |
Jon Wayne Parrott | 692617a | 2017-01-06 09:58:29 -0800 | [diff] [blame] | 2371 | The object takes the form of: |
| 2372 | |
| 2373 | { # Instance truncate log request. |
Bu Sun Kim | 6502091 | 2020-05-20 12:08:20 -0700 | [diff] [blame] | 2374 | "truncateLogContext": { # Database Instance truncate log context. # Contains details about the truncate log operation. |
Dmitry Frenkel | 3e17f89 | 2020-10-06 16:46:05 -0700 | [diff] [blame] | 2375 | "logType": "A String", # The type of log to truncate. Valid values are *MYSQL_GENERAL_TABLE* and *MYSQL_SLOW_TABLE*. |
Bu Sun Kim | 673ec5c | 2020-11-16 11:05:03 -0700 | [diff] [blame] | 2376 | "kind": "A String", # This is always *sql#truncateLogContext*. |
Jon Wayne Parrott | 692617a | 2017-01-06 09:58:29 -0800 | [diff] [blame] | 2377 | }, |
| 2378 | } |
| 2379 | |
Dan O'Meara | dd49464 | 2020-05-01 07:42:23 -0700 | [diff] [blame] | 2380 | x__xgafv: string, V1 error format. |
| 2381 | Allowed values |
| 2382 | 1 - v1 error format |
| 2383 | 2 - v2 error format |
Jon Wayne Parrott | 692617a | 2017-01-06 09:58:29 -0800 | [diff] [blame] | 2384 | |
| 2385 | Returns: |
| 2386 | An object of the form: |
| 2387 | |
Dmitry Frenkel | 3e17f89 | 2020-10-06 16:46:05 -0700 | [diff] [blame] | 2388 | { # An Operation resource. For successful operations that return an Operation resource, only the fields relevant to the operation are populated in the resource. |
Dmitry Frenkel | 3e17f89 | 2020-10-06 16:46:05 -0700 | [diff] [blame] | 2389 | "importContext": { # Database instance import context. # The context for import operation, if applicable. |
Bu Sun Kim | 673ec5c | 2020-11-16 11:05:03 -0700 | [diff] [blame] | 2390 | "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. |
Dmitry Frenkel | 3e17f89 | 2020-10-06 16:46:05 -0700 | [diff] [blame] | 2391 | "csvImportOptions": { # Options for importing data as CSV. |
| 2392 | "columns": [ # The columns to which CSV data is imported. If not specified, all columns of the database table are loaded with CSV data. |
| 2393 | "A String", |
| 2394 | ], |
| 2395 | "table": "A String", # The table to which CSV data is imported. |
| 2396 | }, |
Bu Sun Kim | 673ec5c | 2020-11-16 11:05:03 -0700 | [diff] [blame] | 2397 | "kind": "A String", # This is always *sql#importContext*. |
| 2398 | "importUser": "A String", # The PostgreSQL user for this import operation. PostgreSQL instances only. |
| 2399 | "fileType": "A String", # The file type for the specified uri. *SQL*: The file contains SQL statements. *CSV*: The file contains CSV data. |
| 2400 | "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. |
Dmitry Frenkel | 3e17f89 | 2020-10-06 16:46:05 -0700 | [diff] [blame] | 2401 | "bakImportOptions": { # Import parameters specific to SQL Server .BAK files |
| 2402 | "encryptionOptions": { |
Dmitry Frenkel | 3e17f89 | 2020-10-06 16:46:05 -0700 | [diff] [blame] | 2403 | "pvkPassword": "A String", # Password that encrypts the private key |
Bu Sun Kim | 673ec5c | 2020-11-16 11:05:03 -0700 | [diff] [blame] | 2404 | "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. |
| 2405 | "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. |
Dmitry Frenkel | 3e17f89 | 2020-10-06 16:46:05 -0700 | [diff] [blame] | 2406 | }, |
| 2407 | }, |
Dmitry Frenkel | 3e17f89 | 2020-10-06 16:46:05 -0700 | [diff] [blame] | 2408 | }, |
Bu Sun Kim | 673ec5c | 2020-11-16 11:05:03 -0700 | [diff] [blame] | 2409 | "exportContext": { # Database instance export context. # The context for export operation, if applicable. |
| 2410 | "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. |
| 2411 | "sqlExportOptions": { # Options for exporting data as SQL statements. |
| 2412 | "mysqlExportOptions": { # Options for exporting from MySQL. |
| 2413 | "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. If set to *2*, the CHANGE MASTER TO statement is written as a SQL comment, and has no effect. All other values are ignored. |
| 2414 | }, |
| 2415 | "schemaOnly": True or False, # Export only schemas. |
| 2416 | "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. |
| 2417 | "A String", |
| 2418 | ], |
| 2419 | }, |
| 2420 | "kind": "A String", # This is always *sql#exportContext*. |
| 2421 | "csvExportOptions": { # Options for exporting data as CSV. |
| 2422 | "selectQuery": "A String", # The select query used to extract the data. |
| 2423 | }, |
| 2424 | "fileType": "A String", # The file type for the specified uri. *SQL*: The file contains SQL statements. *CSV*: The file contains CSV data. |
| 2425 | "offload": True or False, # Option for export offload. |
| 2426 | "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. |
| 2427 | "A String", |
| 2428 | ], |
| 2429 | }, |
| 2430 | "endTime": "A String", # The time this operation finished in UTC timezone in RFC 3339 format, for example *2012-11-15T16:19:00.094Z*. |
| 2431 | "user": "A String", # The email address of the user who initiated this operation. |
| 2432 | "selfLink": "A String", # The URI of this resource. |
| 2433 | "status": "A String", # The status of an operation. Valid values are: *PENDING* *RUNNING* *DONE* *SQL_OPERATION_STATUS_UNSPECIFIED* |
| 2434 | "insertTime": "A String", # The time this operation was enqueued in UTC timezone in RFC 3339 format, for example *2012-11-15T16:19:00.094Z*. |
| 2435 | "targetId": "A String", # Name of the database instance related to this operation. |
| 2436 | "targetProject": "A String", # The project ID of the target instance related to this operation. |
| 2437 | "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* |
| 2438 | "kind": "A String", # This is always *sql#operation*. |
| 2439 | "error": { # Database instance operation errors list wrapper. # If errors occurred during processing of this operation, this field will be populated. |
| 2440 | "kind": "A String", # This is always *sql#operationErrors*. |
| 2441 | "errors": [ # The list of errors encountered while processing this operation. |
| 2442 | { # Database instance operation error. |
| 2443 | "code": "A String", # Identifies the specific error that occurred. |
| 2444 | "message": "A String", # Additional information about the error encountered. |
| 2445 | "kind": "A String", # This is always *sql#operationError*. |
| 2446 | }, |
| 2447 | ], |
| 2448 | }, |
| 2449 | "targetLink": "A String", |
| 2450 | "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. |
| 2451 | "startTime": "A String", # The time this operation actually started in UTC timezone in RFC 3339 format, for example *2012-11-15T16:19:00.094Z*. |
Jon Wayne Parrott | 692617a | 2017-01-06 09:58:29 -0800 | [diff] [blame] | 2452 | }</pre> |
| 2453 | </div> |
| 2454 | |
| 2455 | <div class="method"> |
Dan O'Meara | dd49464 | 2020-05-01 07:42:23 -0700 | [diff] [blame] | 2456 | <code class="details" id="update">update(project, instance, body=None, x__xgafv=None)</code> |
Dmitry Frenkel | 3e17f89 | 2020-10-06 16:46:05 -0700 | [diff] [blame] | 2457 | <pre>Updates settings of a Cloud SQL instance. Using this operation might cause your instance to restart. |
Craig Citro | e633be1 | 2015-03-02 13:40:36 -0800 | [diff] [blame] | 2458 | |
| 2459 | Args: |
| 2460 | project: string, Project ID of the project that contains the instance. (required) |
| 2461 | 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] | 2462 | body: object, The request body. |
Craig Citro | e633be1 | 2015-03-02 13:40:36 -0800 | [diff] [blame] | 2463 | The object takes the form of: |
| 2464 | |
Dmitry Frenkel | 3e17f89 | 2020-10-06 16:46:05 -0700 | [diff] [blame] | 2465 | { # A Cloud SQL instance resource. Next field: 36 |
Bu Sun Kim | 673ec5c | 2020-11-16 11:05:03 -0700 | [diff] [blame] | 2466 | "gceZone": "A String", # The Compute Engine zone that the instance is currently serving from. This value could be different from the zone that was specified when the instance was created if the instance has failed over to its secondary zone. |
| 2467 | "onPremisesConfiguration": { # On-premises instance configuration. # Configuration specific to on-premises instances. |
| 2468 | "clientKey": "A String", # PEM representation of the replica's private key. The corresponsing public key is encoded in the client's certificate. |
| 2469 | "username": "A String", # The username for connecting to on-premises instance. |
| 2470 | "password": "A String", # The password for connecting to on-premises instance. |
| 2471 | "kind": "A String", # This is always *sql#onPremisesConfiguration*. |
| 2472 | "hostPort": "A String", # The host and port of the on-premises instance in host:port format |
| 2473 | "caCertificate": "A String", # PEM representation of the trusted CA's x509 certificate. |
| 2474 | "clientCertificate": "A String", # PEM representation of the replica's x509 certificate. |
| 2475 | "dumpFilePath": "A String", # The dump file to create the Cloud SQL replica. |
| 2476 | }, |
| 2477 | "satisfiesPzs": True or False, # The status indicating if instance satisfies physical zone separation. Reserved for future use. |
| 2478 | "scheduledMaintenance": { # Any scheduled maintenancce for this instance. # The start time of any upcoming scheduled maintenance for this instance. |
| 2479 | "startTime": "A String", # The start time of any upcoming scheduled maintenance for this instance. |
| 2480 | "canDefer": True or False, |
| 2481 | "canReschedule": True or False, # If the scheduled maintenance can be rescheduled. |
| 2482 | }, |
| 2483 | "databaseVersion": "A String", # The database engine type and version. The *databaseVersion* field cannot be changed after instance creation. MySQL instances: *MYSQL_8_0*, *MYSQL_5_7* (default), or *MYSQL_5_6*. PostgreSQL instances: *POSTGRES_9_6*, *POSTGRES_10*, *POSTGRES_11* or *POSTGRES_12* (default). SQL Server instances: *SQLSERVER_2017_STANDARD* (default), *SQLSERVER_2017_ENTERPRISE*, *SQLSERVER_2017_EXPRESS*, or *SQLSERVER_2017_WEB*. |
| 2484 | "diskEncryptionStatus": { # Disk encryption status for an instance. # Disk encryption status specific to an instance. Applies only to Second Generation instances. |
| 2485 | "kind": "A String", # This is always *sql#diskEncryptionStatus*. |
| 2486 | "kmsKeyVersionName": "A String", # KMS key version used to encrypt the Cloud SQL instance resource |
| 2487 | }, |
| 2488 | "selfLink": "A String", # The URI of this resource. |
| 2489 | "suspensionReason": [ # If the instance state is SUSPENDED, the reason for the suspension. |
| 2490 | "A String", |
| 2491 | ], |
Dmitry Frenkel | 3e17f89 | 2020-10-06 16:46:05 -0700 | [diff] [blame] | 2492 | "region": "A String", # The geographical region. Can be *us-central* (*FIRST_GEN* instances only) *us-central1* (*SECOND_GEN* instances only) *asia-east1* or *europe-west1*. Defaults to *us-central* or *us-central1* depending on the instance type. The region cannot be changed after instance creation. |
Bu Sun Kim | 673ec5c | 2020-11-16 11:05:03 -0700 | [diff] [blame] | 2493 | "maxDiskSize": "A String", # The maximum disk size of the instance in bytes. |
| 2494 | "masterInstanceName": "A String", # The name of the instance which will act as primary in the replication setup. |
| 2495 | "serviceAccountEmailAddress": "A String", # The service account email address assigned to the instance. This property is applicable only to Second Generation instances. |
| 2496 | "replicaConfiguration": { # Read-replica configuration for connecting to the primary instance. # Configuration specific to failover replicas and read replicas. |
| 2497 | "mysqlReplicaConfiguration": { # Read-replica configuration specific to MySQL databases. # MySQL specific configuration when replicating from a MySQL on-premises primary instance. Replication configuration information such as the username, password, certificates, and keys are not stored in the instance metadata. The configuration information is used only to set up the replication connection and is stored by MySQL in a file named *master.info* in the data directory. |
| 2498 | "clientKey": "A String", # PEM representation of the replica's private key. The corresponsing public key is encoded in the client's certificate. |
| 2499 | "kind": "A String", # This is always *sql#mysqlReplicaConfiguration*. |
| 2500 | "caCertificate": "A String", # PEM representation of the trusted CA's x509 certificate. |
| 2501 | "masterHeartbeatPeriod": "A String", # Interval in milliseconds between replication heartbeats. |
| 2502 | "dumpFilePath": "A String", # Path to a SQL dump file in Google Cloud Storage from which the replica instance is to be created. The URI is in the form gs://bucketName/fileName. Compressed gzip files (.gz) are also supported. Dumps have the binlog co-ordinates from which replication begins. This can be accomplished by setting --master-data to 1 when using mysqldump. |
| 2503 | "username": "A String", # The username for the replication connection. |
| 2504 | "sslCipher": "A String", # A list of permissible ciphers to use for SSL encryption. |
| 2505 | "connectRetryInterval": 42, # Seconds to wait between connect retries. MySQL's default is 60 seconds. |
| 2506 | "verifyServerCertificate": True or False, # Whether or not to check the primary instance's Common Name value in the certificate that it sends during the SSL handshake. |
| 2507 | "clientCertificate": "A String", # PEM representation of the replica's x509 certificate. |
| 2508 | "password": "A String", # The password for the replication connection. |
| 2509 | }, |
| 2510 | "kind": "A String", # This is always *sql#replicaConfiguration*. |
| 2511 | "failoverTarget": True or False, # Specifies if the replica is the failover target. If the field is set to *true* the replica will be designated as a failover replica. In case the primary instance fails, the replica instance will be promoted as the new primary instance. Only one replica can be specified as failover target, and the replica has to be in different zone with the primary instance. |
| 2512 | }, |
| 2513 | "kind": "A String", # This is always *sql#instance*. |
| 2514 | "instanceType": "A String", # The instance type. This can be one of the following. *CLOUD_SQL_INSTANCE*: A Cloud SQL instance that is not replicating from a primary instance. *ON_PREMISES_INSTANCE*: An instance running on the customer's premises. *READ_REPLICA_INSTANCE*: A Cloud SQL instance configured as a read-replica. |
| 2515 | "name": "A String", # Name of the Cloud SQL instance. This does not include the project ID. |
| 2516 | "serverCaCert": { # SslCerts Resource # SSL configuration. |
| 2517 | "certSerialNumber": "A String", # Serial number, as extracted from the certificate. |
| 2518 | "instance": "A String", # Name of the database instance. |
| 2519 | "kind": "A String", # This is always *sql#sslCert*. |
| 2520 | "createTime": "A String", # The time when the certificate was created in RFC 3339 format, for example *2012-11-15T16:19:00.094Z* |
| 2521 | "cert": "A String", # PEM representation. |
| 2522 | "sha1Fingerprint": "A String", # Sha1 Fingerprint. |
| 2523 | "selfLink": "A String", # The URI of this resource. |
| 2524 | "commonName": "A String", # User supplied name. Constrained to [a-zA-Z.-_ ]+. |
| 2525 | "expirationTime": "A String", # The time when the certificate expires in RFC 3339 format, for example *2012-11-15T16:19:00.094Z*. |
| 2526 | }, |
| 2527 | "currentDiskSize": "A String", # The current disk usage of the instance in bytes. This property has been deprecated. Use the "cloudsql.googleapis.com/database/disk/bytes_used" metric in Cloud Monitoring API instead. Please see this announcement for details. |
| 2528 | "project": "A String", # The project ID of the project containing the Cloud SQL instance. The Google apps domain is prefixed if applicable. |
| 2529 | "diskEncryptionConfiguration": { # Disk encryption configuration for an instance. # Disk encryption configuration specific to an instance. Applies only to Second Generation instances. |
| 2530 | "kmsKeyName": "A String", # Resource name of KMS key for disk encryption |
| 2531 | "kind": "A String", # This is always *sql#diskEncryptionConfiguration*. |
| 2532 | }, |
| 2533 | "state": "A String", # The current serving state of the Cloud SQL instance. This can be one of the following. *SQL_INSTANCE_STATE_UNSPECIFIED*: The state of the instance is unknown. *RUNNABLE*: The instance has been stopped by owner. It is not currently running, but it's ready to be restarted. *SUSPENDED*: The instance is not available, for example due to problems with billing. for example due to problems with billing. *PENDING_DELETE*: The instance is being deleted. *PENDING_CREATE*: The instance is being created. *MAINTENANCE*: The instance is down for maintenance. *FAILED*: The instance creation failed. |
| 2534 | "failoverReplica": { # The name and status of the failover replica. This property is applicable only to Second Generation instances. |
| 2535 | "available": True or False, # The availability status of the failover replica. A false status indicates that the failover replica is out of sync. The primary instance can only failover to the failover replica when the status is true. |
| 2536 | "name": "A String", # The name of the failover replica. If specified at instance creation, a failover replica is created for the instance. The name doesn't include the project ID. This property is applicable only to Second Generation instances. |
| 2537 | }, |
| 2538 | "ipAddresses": [ # The assigned IP addresses for the instance. |
| 2539 | { # Database instance IP Mapping. |
| 2540 | "type": "A String", # The type of this IP address. A *PRIMARY* address is a public address that can accept incoming connections. A *PRIVATE* address is a private address that can accept incoming connections. An *OUTGOING* address is the source address of connections originating from the instance, if supported. |
| 2541 | "timeToRetire": "A String", # The due time for this IP to be retired in RFC 3339 format, for example *2012-11-15T16:19:00.094Z*. This field is only available when the IP is scheduled to be retired. |
| 2542 | "ipAddress": "A String", # The IP address assigned. |
| 2543 | }, |
| 2544 | ], |
| 2545 | "ipv6Address": "A String", # The IPv6 address assigned to the instance. (Deprecated) This property was applicable only to First Generation instances. |
Dmitry Frenkel | 3e17f89 | 2020-10-06 16:46:05 -0700 | [diff] [blame] | 2546 | "settings": { # Database instance settings. # The user settings. |
Bu Sun Kim | 673ec5c | 2020-11-16 11:05:03 -0700 | [diff] [blame] | 2547 | "activeDirectoryConfig": { # Active Directory configuration, relevant only for Cloud SQL for SQL Server. # Active Directory configuration, relevant only for Cloud SQL for SQL Server. |
| 2548 | "kind": "A String", # This is always sql#activeDirectoryConfig. |
| 2549 | "domain": "A String", # The name of the domain (e.g., mydomain.com). |
Dmitry Frenkel | 3e17f89 | 2020-10-06 16:46:05 -0700 | [diff] [blame] | 2550 | }, |
Dmitry Frenkel | 3e17f89 | 2020-10-06 16:46:05 -0700 | [diff] [blame] | 2551 | "denyMaintenancePeriods": [ # Deny maintenance periods |
| 2552 | { # Deny Maintenance Periods. This specifies a date range during when all CSA rollout will be denied. |
| 2553 | "startDate": "A String", # "deny maintenance period" start date. If the year of the start date is empty, the year of the end date also must be empty. In this case, it means the deny maintenance period recurs every year. The date is in format yyyy-mm-dd i.e., 2020-11-01, or mm-dd, i.e., 11-01 |
| 2554 | "time": "A String", # Time in UTC when the "deny maintenance period" starts on start_date and ends on end_date. The time is in format: HH:mm:SS, i.e., 00:00:00 |
| 2555 | "endDate": "A String", # "deny maintenance period" end date. If the year of the end date is empty, the year of the start date also must be empty. In this case, it means the deny maintenance period recurs every year. The date is in format yyyy-mm-dd i.e., 2020-11-01, or mm-dd, i.e., 11-01 |
| 2556 | }, |
| 2557 | ], |
Bu Sun Kim | 673ec5c | 2020-11-16 11:05:03 -0700 | [diff] [blame] | 2558 | "authorizedGaeApplications": [ # The App Engine app IDs that can access this instance. (Deprecated) Applied to First Generation instances only. |
| 2559 | "A String", |
| 2560 | ], |
| 2561 | "backupConfiguration": { # Database instance backup configuration. # The daily backup configuration for the instance. |
| 2562 | "kind": "A String", # This is always *sql#backupConfiguration*. |
| 2563 | "replicationLogArchivingEnabled": True or False, # Reserved for future use. |
| 2564 | "pointInTimeRecoveryEnabled": True or False, # Reserved for future use. |
| 2565 | "binaryLogEnabled": True or False, # (MySQL only) Whether binary log is enabled. If backup configuration is disabled, binarylog must be disabled as well. |
| 2566 | "startTime": "A String", # Start time for the daily backup configuration in UTC timezone in the 24 hour format - *HH:MM*. |
| 2567 | "enabled": True or False, # Whether this configuration is enabled. |
| 2568 | "location": "A String", # Location of the backup |
| 2569 | "transactionLogRetentionDays": 42, # The number of days of transaction logs we retain for point in time restore, from 1-7. |
| 2570 | "backupRetentionSettings": { # We currently only support backup retention by specifying the number of backups we will retain. # Backup retention settings. |
| 2571 | "retainedBackups": 42, # Depending on the value of retention_unit, this is used to determine if a backup needs to be deleted. If retention_unit is 'COUNT', we will retain this many backups. |
| 2572 | "retentionUnit": "A String", # The unit that 'retained_backups' represents. |
| 2573 | }, |
| 2574 | }, |
| 2575 | "databaseFlags": [ # The database flags passed to the instance at startup. |
| 2576 | { # Database flags for Cloud SQL instances. |
| 2577 | "value": "A String", # The value of the flag. Booleans are set to *on* for true and *off* for false. This field must be omitted if the flag doesn't take a value. |
| 2578 | "name": "A String", # The name of the flag. These flags are passed at instance startup, so include both server options and system variables for MySQL. Flags are specified with underscores, not hyphens. For more information, see Configuring Database Flags in the Cloud SQL documentation. |
| 2579 | }, |
| 2580 | ], |
| 2581 | "ipConfiguration": { # IP Management configuration. # The settings for IP Management. This allows to enable or disable the instance IP and manage which external networks can connect to the instance. The IPv4 address cannot be disabled for Second Generation instances. |
| 2582 | "authorizedNetworks": [ # The list of external networks that are allowed to connect to the instance using the IP. In 'CIDR' notation, also known as 'slash' notation (for example: *192.168.100.0/24*). |
| 2583 | { # An entry for an Access Control list. |
| 2584 | "kind": "A String", # This is always *sql#aclEntry*. |
| 2585 | "expirationTime": "A String", # The time when this access control entry expires in RFC 3339 format, for example *2012-11-15T16:19:00.094Z*. |
| 2586 | "name": "A String", # Optional. A label to identify this entry. |
| 2587 | "value": "A String", # The allowlisted value for the access control list. |
| 2588 | }, |
| 2589 | ], |
| 2590 | "requireSsl": True or False, # Whether SSL connections over IP are enforced or not. |
| 2591 | "privateNetwork": "A String", # The resource link for the VPC network from which the Cloud SQL instance is accessible for private IP. For example, */projects/myProject/global/networks/default*. This setting can be updated, but it cannot be removed after it is set. |
| 2592 | "ipv4Enabled": True or False, # Whether the instance is assigned a public IP address or not. |
| 2593 | }, |
| 2594 | "tier": "A String", # The tier (or machine type) for this instance, for example *db-n1-standard-1* (MySQL instances) or *db-custom-1-3840* (PostgreSQL instances). |
| 2595 | "userLabels": { # User-provided labels, represented as a dictionary where each label is a single key value pair. |
| 2596 | "a_key": "A String", |
| 2597 | }, |
| 2598 | "settingsVersion": "A String", # The version of instance settings. This is a required field for update method to make sure concurrent updates are handled properly. During update, use the most recent settingsVersion value for this instance and do not try to update this value. |
| 2599 | "dataDiskType": "A String", # The type of data disk: PD_SSD (default) or PD_HDD. Not used for First Generation instances. |
| 2600 | "replicationType": "A String", # The type of replication this instance uses. This can be either *ASYNCHRONOUS* or *SYNCHRONOUS*. (Deprecated_ This property was only applicable to First Generation instances. |
| 2601 | "locationPreference": { # Preferred location. This specifies where a Cloud SQL instance is located, either in a specific Compute Engine zone, or co-located with an App Engine application. Note that if the preferred location is not available, the instance will be located as close as possible within the region. Only one location may be specified. # The location preference settings. This allows the instance to be located as near as possible to either an App Engine app or Compute Engine zone for better performance. App Engine co-location was only applicable to First Generation instances. |
| 2602 | "secondaryZone": "A String", # The preferred Compute Engine zone for the secondary/failover (for example: us-central1-a, us-central1-b, etc.). Reserved for future use. |
| 2603 | "kind": "A String", # This is always *sql#locationPreference*. |
| 2604 | "followGaeApplication": "A String", # The App Engine application to follow, it must be in the same region as the Cloud SQL instance. |
| 2605 | "zone": "A String", # The preferred Compute Engine zone (for example: us-central1-a, us-central1-b, etc.). |
| 2606 | }, |
| 2607 | "maintenanceWindow": { # Maintenance window. This specifies when a Cloud SQL instance is restarted for system maintenance purposes. # The maintenance window for this instance. This specifies when the instance can be restarted for maintenance purposes. |
| 2608 | "kind": "A String", # This is always *sql#maintenanceWindow*. |
| 2609 | "updateTrack": "A String", # Maintenance timing setting: *canary* (Earlier) or *stable* (Later). Learn more. |
| 2610 | "day": 42, # day of week (1-7), starting on Monday. |
| 2611 | "hour": 42, # hour of day - 0 to 23. |
| 2612 | }, |
| 2613 | "storageAutoResizeLimit": "A String", # The maximum size to which storage capacity can be automatically increased. The default value is 0, which specifies that there is no limit. |
| 2614 | "crashSafeReplicationEnabled": True or False, # Configuration specific to read replica instances. Indicates whether database flags for crash-safe replication are enabled. This property was only applicable to First Generation instances. |
| 2615 | "storageAutoResize": True or False, # Configuration to increase storage size automatically. The default value is true. |
| 2616 | "dataDiskSizeGb": "A String", # The size of data disk, in GB. The data disk size minimum is 10GB. |
| 2617 | "availabilityType": "A String", # Availability type. Potential values: *ZONAL*: The instance serves data from only one zone. Outages in that zone affect data accessibility. *REGIONAL*: The instance can serve data from more than one zone in a region (it is highly available). For more information, see Overview of the High Availability Configuration. |
| 2618 | "kind": "A String", # This is always *sql#settings*. |
| 2619 | "activationPolicy": "A String", # The activation policy specifies when the instance is activated; it is applicable only when the instance state is RUNNABLE. Valid values: *ALWAYS*: The instance is on, and remains so even in the absence of connection requests. *NEVER*: The instance is off; it is not activated, even if a connection request arrives. |
| 2620 | "databaseReplicationEnabled": True or False, # Configuration specific to read replica instances. Indicates whether replication is enabled or not. |
| 2621 | "pricingPlan": "A String", # The pricing plan for this instance. This can be either *PER_USE* or *PACKAGE*. Only *PER_USE* is supported for Second Generation instances. |
| 2622 | "collation": "A String", # The name of server Instance collation. |
Dmitry Frenkel | 3e17f89 | 2020-10-06 16:46:05 -0700 | [diff] [blame] | 2623 | }, |
Bu Sun Kim | 673ec5c | 2020-11-16 11:05:03 -0700 | [diff] [blame] | 2624 | "secondaryGceZone": "A String", # The Compute Engine zone that the failover instance is currently serving from for a regional instance. This value could be different from the zone that was specified when the instance was created if the instance has failed over to its secondary/failover zone. Reserved for future use. |
| 2625 | "backendType": "A String", # *SECOND_GEN*: Cloud SQL database instance. *EXTERNAL*: A database server that is not managed by Google. This property is read-only; use the *tier* property in the *settings* object to determine the database type. |
Dmitry Frenkel | 3e17f89 | 2020-10-06 16:46:05 -0700 | [diff] [blame] | 2626 | "replicaNames": [ # The replicas of the instance. |
| 2627 | "A String", |
| 2628 | ], |
Bu Sun Kim | 673ec5c | 2020-11-16 11:05:03 -0700 | [diff] [blame] | 2629 | "rootPassword": "A String", # Initial root password. Use only on creation. |
Dmitry Frenkel | 3e17f89 | 2020-10-06 16:46:05 -0700 | [diff] [blame] | 2630 | "connectionName": "A String", # Connection name of the Cloud SQL instance used in connection strings. |
Dmitry Frenkel | 3e17f89 | 2020-10-06 16:46:05 -0700 | [diff] [blame] | 2631 | "etag": "A String", # This field is deprecated and will be removed from a future version of the API. Use the *settings.settingsVersion* field instead. |
Dmitry Frenkel | 3e17f89 | 2020-10-06 16:46:05 -0700 | [diff] [blame] | 2632 | } |
Craig Citro | e633be1 | 2015-03-02 13:40:36 -0800 | [diff] [blame] | 2633 | |
Dan O'Meara | dd49464 | 2020-05-01 07:42:23 -0700 | [diff] [blame] | 2634 | x__xgafv: string, V1 error format. |
| 2635 | Allowed values |
| 2636 | 1 - v1 error format |
| 2637 | 2 - v2 error format |
Craig Citro | e633be1 | 2015-03-02 13:40:36 -0800 | [diff] [blame] | 2638 | |
| 2639 | Returns: |
| 2640 | An object of the form: |
| 2641 | |
Dmitry Frenkel | 3e17f89 | 2020-10-06 16:46:05 -0700 | [diff] [blame] | 2642 | { # An Operation resource. For successful operations that return an Operation resource, only the fields relevant to the operation are populated in the resource. |
Dmitry Frenkel | 3e17f89 | 2020-10-06 16:46:05 -0700 | [diff] [blame] | 2643 | "importContext": { # Database instance import context. # The context for import operation, if applicable. |
Bu Sun Kim | 673ec5c | 2020-11-16 11:05:03 -0700 | [diff] [blame] | 2644 | "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. |
Dmitry Frenkel | 3e17f89 | 2020-10-06 16:46:05 -0700 | [diff] [blame] | 2645 | "csvImportOptions": { # Options for importing data as CSV. |
| 2646 | "columns": [ # The columns to which CSV data is imported. If not specified, all columns of the database table are loaded with CSV data. |
| 2647 | "A String", |
| 2648 | ], |
| 2649 | "table": "A String", # The table to which CSV data is imported. |
| 2650 | }, |
Bu Sun Kim | 673ec5c | 2020-11-16 11:05:03 -0700 | [diff] [blame] | 2651 | "kind": "A String", # This is always *sql#importContext*. |
| 2652 | "importUser": "A String", # The PostgreSQL user for this import operation. PostgreSQL instances only. |
| 2653 | "fileType": "A String", # The file type for the specified uri. *SQL*: The file contains SQL statements. *CSV*: The file contains CSV data. |
| 2654 | "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. |
Dmitry Frenkel | 3e17f89 | 2020-10-06 16:46:05 -0700 | [diff] [blame] | 2655 | "bakImportOptions": { # Import parameters specific to SQL Server .BAK files |
| 2656 | "encryptionOptions": { |
Dmitry Frenkel | 3e17f89 | 2020-10-06 16:46:05 -0700 | [diff] [blame] | 2657 | "pvkPassword": "A String", # Password that encrypts the private key |
Bu Sun Kim | 673ec5c | 2020-11-16 11:05:03 -0700 | [diff] [blame] | 2658 | "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. |
| 2659 | "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. |
Dmitry Frenkel | 3e17f89 | 2020-10-06 16:46:05 -0700 | [diff] [blame] | 2660 | }, |
| 2661 | }, |
Dmitry Frenkel | 3e17f89 | 2020-10-06 16:46:05 -0700 | [diff] [blame] | 2662 | }, |
Bu Sun Kim | 673ec5c | 2020-11-16 11:05:03 -0700 | [diff] [blame] | 2663 | "exportContext": { # Database instance export context. # The context for export operation, if applicable. |
| 2664 | "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. |
| 2665 | "sqlExportOptions": { # Options for exporting data as SQL statements. |
| 2666 | "mysqlExportOptions": { # Options for exporting from MySQL. |
| 2667 | "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. If set to *2*, the CHANGE MASTER TO statement is written as a SQL comment, and has no effect. All other values are ignored. |
| 2668 | }, |
| 2669 | "schemaOnly": True or False, # Export only schemas. |
| 2670 | "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. |
| 2671 | "A String", |
| 2672 | ], |
| 2673 | }, |
| 2674 | "kind": "A String", # This is always *sql#exportContext*. |
| 2675 | "csvExportOptions": { # Options for exporting data as CSV. |
| 2676 | "selectQuery": "A String", # The select query used to extract the data. |
| 2677 | }, |
| 2678 | "fileType": "A String", # The file type for the specified uri. *SQL*: The file contains SQL statements. *CSV*: The file contains CSV data. |
| 2679 | "offload": True or False, # Option for export offload. |
| 2680 | "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. |
| 2681 | "A String", |
| 2682 | ], |
| 2683 | }, |
| 2684 | "endTime": "A String", # The time this operation finished in UTC timezone in RFC 3339 format, for example *2012-11-15T16:19:00.094Z*. |
| 2685 | "user": "A String", # The email address of the user who initiated this operation. |
| 2686 | "selfLink": "A String", # The URI of this resource. |
| 2687 | "status": "A String", # The status of an operation. Valid values are: *PENDING* *RUNNING* *DONE* *SQL_OPERATION_STATUS_UNSPECIFIED* |
| 2688 | "insertTime": "A String", # The time this operation was enqueued in UTC timezone in RFC 3339 format, for example *2012-11-15T16:19:00.094Z*. |
| 2689 | "targetId": "A String", # Name of the database instance related to this operation. |
| 2690 | "targetProject": "A String", # The project ID of the target instance related to this operation. |
| 2691 | "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* |
| 2692 | "kind": "A String", # This is always *sql#operation*. |
| 2693 | "error": { # Database instance operation errors list wrapper. # If errors occurred during processing of this operation, this field will be populated. |
| 2694 | "kind": "A String", # This is always *sql#operationErrors*. |
| 2695 | "errors": [ # The list of errors encountered while processing this operation. |
| 2696 | { # Database instance operation error. |
| 2697 | "code": "A String", # Identifies the specific error that occurred. |
| 2698 | "message": "A String", # Additional information about the error encountered. |
| 2699 | "kind": "A String", # This is always *sql#operationError*. |
| 2700 | }, |
| 2701 | ], |
| 2702 | }, |
| 2703 | "targetLink": "A String", |
| 2704 | "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. |
| 2705 | "startTime": "A String", # The time this operation actually started in UTC timezone in RFC 3339 format, for example *2012-11-15T16:19:00.094Z*. |
Craig Citro | e633be1 | 2015-03-02 13:40:36 -0800 | [diff] [blame] | 2706 | }</pre> |
| 2707 | </div> |
| 2708 | |
| 2709 | </body></html> |