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> |
| 79 | <p class="firstline">Add a new trusted Certificate Authority (CA) version for the specified</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> |
| 82 | <p class="firstline">Creates a Cloud SQL instance as a clone of the source instance. Using this</p> |
Craig Citro | e633be1 | 2015-03-02 13:40:36 -0800 | [diff] [blame] | 83 | <p class="toc_element"> |
Dan O'Meara | dd49464 | 2020-05-01 07:42:23 -0700 | [diff] [blame] | 84 | <code><a href="#delete">delete(project, instance, x__xgafv=None)</a></code></p> |
Craig Citro | e633be1 | 2015-03-02 13:40:36 -0800 | [diff] [blame] | 85 | <p class="firstline">Deletes a Cloud SQL instance.</p> |
| 86 | <p class="toc_element"> |
Dan O'Meara | dd49464 | 2020-05-01 07:42:23 -0700 | [diff] [blame] | 87 | <code><a href="#demoteMaster">demoteMaster(project, instance, body=None, x__xgafv=None)</a></code></p> |
| 88 | <p class="firstline">Demotes the stand-alone instance to be a Cloud SQL read replica for an</p> |
Bu Sun Kim | 715bd7f | 2019-06-14 16:50:42 -0700 | [diff] [blame] | 89 | <p class="toc_element"> |
Dan O'Meara | dd49464 | 2020-05-01 07:42:23 -0700 | [diff] [blame] | 90 | <code><a href="#export">export(project, instance, body=None, x__xgafv=None)</a></code></p> |
| 91 | <p class="firstline">Exports data from a Cloud SQL instance to a Cloud Storage bucket as a SQL</p> |
Craig Citro | e633be1 | 2015-03-02 13:40:36 -0800 | [diff] [blame] | 92 | <p class="toc_element"> |
Dan O'Meara | dd49464 | 2020-05-01 07:42:23 -0700 | [diff] [blame] | 93 | <code><a href="#failover">failover(project, instance, body=None, x__xgafv=None)</a></code></p> |
| 94 | <p class="firstline">Failover the instance to its failover replica instance. Using this</p> |
Jon Wayne Parrott | 36e41bc | 2016-02-19 16:02:29 -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="#get">get(project, instance, x__xgafv=None)</a></code></p> |
Craig Citro | e633be1 | 2015-03-02 13:40:36 -0800 | [diff] [blame] | 97 | <p class="firstline">Retrieves a resource containing information about a Cloud SQL instance.</p> |
| 98 | <p class="toc_element"> |
Dan O'Meara | dd49464 | 2020-05-01 07:42:23 -0700 | [diff] [blame] | 99 | <code><a href="#import_">import_(project, instance, body=None, x__xgafv=None)</a></code></p> |
| 100 | <p class="firstline">Imports data into a Cloud SQL instance from a SQL dump or CSV file in</p> |
Craig Citro | e633be1 | 2015-03-02 13:40:36 -0800 | [diff] [blame] | 101 | <p class="toc_element"> |
Dan O'Meara | dd49464 | 2020-05-01 07:42:23 -0700 | [diff] [blame] | 102 | <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] | 103 | <p class="firstline">Creates a new Cloud SQL instance.</p> |
| 104 | <p class="toc_element"> |
Bu Sun Kim | 6502091 | 2020-05-20 12:08:20 -0700 | [diff] [blame] | 105 | <code><a href="#list">list(project, filter=None, pageToken=None, maxResults=None, x__xgafv=None)</a></code></p> |
Dan O'Meara | dd49464 | 2020-05-01 07:42:23 -0700 | [diff] [blame] | 106 | <p class="firstline">Lists instances under a given project.</p> |
Craig Citro | e633be1 | 2015-03-02 13:40:36 -0800 | [diff] [blame] | 107 | <p class="toc_element"> |
Dan O'Meara | dd49464 | 2020-05-01 07:42:23 -0700 | [diff] [blame] | 108 | <code><a href="#listServerCas">listServerCas(project, instance, x__xgafv=None)</a></code></p> |
| 109 | <p class="firstline">Lists all of the trusted Certificate Authorities (CAs) for the specified</p> |
Bu Sun Kim | 715bd7f | 2019-06-14 16:50:42 -0700 | [diff] [blame] | 110 | <p class="toc_element"> |
Craig Citro | e633be1 | 2015-03-02 13:40:36 -0800 | [diff] [blame] | 111 | <code><a href="#list_next">list_next(previous_request, previous_response)</a></code></p> |
| 112 | <p class="firstline">Retrieves the next page of results.</p> |
| 113 | <p class="toc_element"> |
Dan O'Meara | dd49464 | 2020-05-01 07:42:23 -0700 | [diff] [blame] | 114 | <code><a href="#patch">patch(project, instance, body=None, x__xgafv=None)</a></code></p> |
| 115 | <p class="firstline">Updates settings of a Cloud SQL instance.</p> |
Craig Citro | e633be1 | 2015-03-02 13:40:36 -0800 | [diff] [blame] | 116 | <p class="toc_element"> |
Dan O'Meara | dd49464 | 2020-05-01 07:42:23 -0700 | [diff] [blame] | 117 | <code><a href="#promoteReplica">promoteReplica(project, instance, x__xgafv=None)</a></code></p> |
Craig Citro | e633be1 | 2015-03-02 13:40:36 -0800 | [diff] [blame] | 118 | <p class="firstline">Promotes the read replica instance to be a stand-alone Cloud SQL instance.</p> |
| 119 | <p class="toc_element"> |
Dan O'Meara | dd49464 | 2020-05-01 07:42:23 -0700 | [diff] [blame] | 120 | <code><a href="#resetSslConfig">resetSslConfig(project, instance, x__xgafv=None)</a></code></p> |
| 121 | <p class="firstline">Deletes all client certificates and generates a new server SSL certificate</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="#restart">restart(project, instance, x__xgafv=None)</a></code></p> |
Craig Citro | e633be1 | 2015-03-02 13:40:36 -0800 | [diff] [blame] | 124 | <p class="firstline">Restarts a Cloud SQL instance.</p> |
| 125 | <p class="toc_element"> |
Dan O'Meara | dd49464 | 2020-05-01 07:42:23 -0700 | [diff] [blame] | 126 | <code><a href="#restoreBackup">restoreBackup(project, instance, body=None, x__xgafv=None)</a></code></p> |
| 127 | <p class="firstline">Restores a backup of a Cloud SQL instance. Using this operation might cause</p> |
Craig Citro | e633be1 | 2015-03-02 13:40:36 -0800 | [diff] [blame] | 128 | <p class="toc_element"> |
Dan O'Meara | dd49464 | 2020-05-01 07:42:23 -0700 | [diff] [blame] | 129 | <code><a href="#rotateServerCa">rotateServerCa(project, instance, body=None, x__xgafv=None)</a></code></p> |
| 130 | <p class="firstline">Rotates the server certificate to one signed by the Certificate Authority</p> |
Bu Sun Kim | 715bd7f | 2019-06-14 16:50:42 -0700 | [diff] [blame] | 131 | <p class="toc_element"> |
Dan O'Meara | dd49464 | 2020-05-01 07:42:23 -0700 | [diff] [blame] | 132 | <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] | 133 | <p class="firstline">Starts the replication in the read replica instance.</p> |
| 134 | <p class="toc_element"> |
Dan O'Meara | dd49464 | 2020-05-01 07:42:23 -0700 | [diff] [blame] | 135 | <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] | 136 | <p class="firstline">Stops 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="#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] | 139 | <p class="firstline">Truncate MySQL general and slow query log tables</p> |
| 140 | <p class="toc_element"> |
Dan O'Meara | dd49464 | 2020-05-01 07:42:23 -0700 | [diff] [blame] | 141 | <code><a href="#update">update(project, instance, body=None, x__xgafv=None)</a></code></p> |
| 142 | <p class="firstline">Updates settings of a Cloud SQL instance. Using this operation might cause</p> |
Craig Citro | e633be1 | 2015-03-02 13:40:36 -0800 | [diff] [blame] | 143 | <h3>Method Details</h3> |
| 144 | <div class="method"> |
Dan O'Meara | dd49464 | 2020-05-01 07:42:23 -0700 | [diff] [blame] | 145 | <code class="details" id="addServerCa">addServerCa(project, instance, x__xgafv=None)</code> |
| 146 | <pre>Add a new trusted Certificate Authority (CA) version for the specified |
| 147 | instance. Required to prepare for a certificate rotation. If a CA version |
| 148 | was previously added but never used in a certificate rotation, this |
| 149 | operation replaces that version. There cannot be more than one CA version |
| 150 | waiting to be rotated in. |
Craig Citro | e633be1 | 2015-03-02 13:40:36 -0800 | [diff] [blame] | 151 | |
| 152 | Args: |
Bu Sun Kim | 715bd7f | 2019-06-14 16:50:42 -0700 | [diff] [blame] | 153 | project: string, Project ID of the project that contains the instance. (required) |
| 154 | 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] | 155 | x__xgafv: string, V1 error format. |
| 156 | Allowed values |
| 157 | 1 - v1 error format |
| 158 | 2 - v2 error format |
Craig Citro | e633be1 | 2015-03-02 13:40:36 -0800 | [diff] [blame] | 159 | |
| 160 | Returns: |
| 161 | An object of the form: |
| 162 | |
Dan O'Meara | dd49464 | 2020-05-01 07:42:23 -0700 | [diff] [blame] | 163 | { # An Operation resource.&nbsp;For successful operations that return an |
| 164 | # Operation resource, only the fields relevant to the operation are populated |
| 165 | # in the resource. |
Bu Sun Kim | 6502091 | 2020-05-20 12:08:20 -0700 | [diff] [blame] | 166 | "endTime": "A String", # The time this operation finished in UTC timezone in <a |
| 167 | # href="https://tools.ietf.org/html/rfc3339">RFC 3339</a> format, for example |
| 168 | # <code>2012-11-15T16:19:00.094Z</code>. |
| 169 | "startTime": "A String", # The time this operation actually started in UTC timezone in <a |
| 170 | # href="https://tools.ietf.org/html/rfc3339">RFC 3339</a> format, for example |
| 171 | # <code>2012-11-15T16:19:00.094Z</code>. |
| 172 | "insertTime": "A String", # The time this operation was enqueued in UTC timezone in <a |
| 173 | # href="https://tools.ietf.org/html/rfc3339">RFC 3339</a> format, for example |
| 174 | # <code>2012-11-15T16:19:00.094Z</code>. |
| 175 | "user": "A String", # The email address of the user who initiated this operation. |
| 176 | "targetProject": "A String", # The project ID of the target instance related to this operation. |
| 177 | "selfLink": "A String", # The URI of this resource. |
| 178 | "targetLink": "A String", |
| 179 | "operationType": "A String", # The type of the operation. Valid values are <code>CREATE</code>, |
| 180 | # <code>DELETE</code>, <code>UPDATE</code>, <code>RESTART</code>, |
| 181 | # <code>IMPORT</code>, <code>EXPORT</code>, <code>BACKUP_VOLUME</code>, |
| 182 | # <code>RESTORE_VOLUME</code>, <code>CREATE_USER</code>, |
| 183 | # <code>DELETE_USER</code>, <code>CREATE_DATABASE</code>, |
| 184 | # <code>DELETE_DATABASE</code> . |
| 185 | "error": { # Database instance operation errors list wrapper. # If errors occurred during processing of this operation, this field will be |
| 186 | # populated. |
| 187 | "errors": [ # The list of errors encountered while processing this operation. |
| 188 | { # Database instance operation error. |
| 189 | "kind": "A String", # This is always <code>sql#operationError</code>. |
| 190 | "code": "A String", # Identifies the specific error that occurred. |
| 191 | "message": "A String", # Additional information about the error encountered. |
Dan O'Meara | dd49464 | 2020-05-01 07:42:23 -0700 | [diff] [blame] | 192 | }, |
Bu Sun Kim | 6502091 | 2020-05-20 12:08:20 -0700 | [diff] [blame] | 193 | ], |
| 194 | "kind": "A String", # This is always <code>sql#operationErrors</code>. |
| 195 | }, |
| 196 | "kind": "A String", # This is always <code>sql#operation</code>. |
| 197 | "importContext": { # Database instance import context. # The context for import operation, if applicable. |
| 198 | "kind": "A String", # This is always <code>sql#importContext</code>. |
| 199 | "csvImportOptions": { # Options for importing data as CSV. |
| 200 | "table": "A String", # The table to which CSV data is imported. |
| 201 | "columns": [ # The columns to which CSV data is imported. If not specified, all columns |
| 202 | # of the database table are loaded with CSV data. |
| 203 | "A String", |
| 204 | ], |
Dan O'Meara | dd49464 | 2020-05-01 07:42:23 -0700 | [diff] [blame] | 205 | }, |
Bu Sun Kim | 6502091 | 2020-05-20 12:08:20 -0700 | [diff] [blame] | 206 | "database": "A String", # The target database for the import. If <code>fileType</code> is |
Dan O'Meara | dd49464 | 2020-05-01 07:42:23 -0700 | [diff] [blame] | 207 | # <code>SQL</code>, this field is required only if the import file does not |
| 208 | # specify a database, and is overridden by any database specification in the |
| 209 | # import file. If <code>fileType</code> is <code>CSV</code>, one database |
| 210 | # must be specified. |
Bu Sun Kim | 6502091 | 2020-05-20 12:08:20 -0700 | [diff] [blame] | 211 | "importUser": "A String", # The PostgreSQL user for this import operation. PostgreSQL instances only. |
| 212 | "bakImportOptions": { # Import parameters specific to SQL Server .BAK files |
| 213 | "encryptionOptions": { |
| 214 | "certPath": "A String", # Path to the Certificate (.cer) in Cloud Storage, in the form |
| 215 | # <code>gs://bucketName/fileName</code>. The instance must have |
| 216 | # write permissions to the bucket and read access to the file. |
| 217 | "pvkPath": "A String", # Path to the Certificate Private Key (.pvk) in Cloud Storage, in the |
| 218 | # form <code>gs://bucketName/fileName</code>. The instance must have |
| 219 | # write permissions to the bucket and read access to the file. |
| 220 | "pvkPassword": "A String", # Password that encrypts the private key |
| 221 | }, |
| 222 | }, |
| 223 | "uri": "A String", # Path to the import file in Cloud Storage, in the form |
Dan O'Meara | dd49464 | 2020-05-01 07:42:23 -0700 | [diff] [blame] | 224 | # <code>gs: |
| 225 | # //bucketName/fileName</code>. Compressed gzip files (.gz) are supported |
| 226 | # // when <code>fileType</code> is <code>SQL</code>. The instance must have |
| 227 | # // write permissions to the bucket and read access to the file. |
Bu Sun Kim | 6502091 | 2020-05-20 12:08:20 -0700 | [diff] [blame] | 228 | "fileType": "A String", # The file type for the specified uri. <br><code>SQL</code>: The file |
| 229 | # contains SQL statements. <br><code>CSV</code>: The file contains CSV data. |
Craig Citro | e633be1 | 2015-03-02 13:40:36 -0800 | [diff] [blame] | 230 | }, |
Bu Sun Kim | 6502091 | 2020-05-20 12:08:20 -0700 | [diff] [blame] | 231 | "status": "A String", # The status of an operation. Valid values are <code>PENDING</code>, |
| 232 | # <code>RUNNING</code>, <code>DONE</code>, |
| 233 | # <code>SQL_OPERATION_STATUS_UNSPECIFIED</code>. |
| 234 | "name": "A String", # An identifier that uniquely identifies the operation. You can use this |
Dan O'Meara | dd49464 | 2020-05-01 07:42:23 -0700 | [diff] [blame] | 235 | # identifier to retrieve the Operations resource that has information about |
| 236 | # the operation. |
Bu Sun Kim | 6502091 | 2020-05-20 12:08:20 -0700 | [diff] [blame] | 237 | "exportContext": { # Database instance export context. # The context for export operation, if applicable. |
| 238 | "databases": [ # Databases to be exported. <br /> <b>MySQL instances:</b> If |
Dan O'Meara | dd49464 | 2020-05-01 07:42:23 -0700 | [diff] [blame] | 239 | # <code>fileType</code> is <code>SQL</code> and no database is specified, all |
| 240 | # databases are exported, except for the <code>mysql</code> system database. |
| 241 | # If <code>fileType</code> is <code>CSV</code>, you can specify one database, |
| 242 | # either by using this property or by using the |
| 243 | # <code>csvExportOptions.selectQuery</code> property, which takes precedence |
| 244 | # over this property. <br /> <b>PostgreSQL instances:</b> You must specify |
| 245 | # one database to be exported. If <code>fileType</code> is <code>CSV</code>, |
| 246 | # this database must match the one specified in the |
| 247 | # <code>csvExportOptions.selectQuery</code> property. |
Bu Sun Kim | 6502091 | 2020-05-20 12:08:20 -0700 | [diff] [blame] | 248 | "A String", |
Craig Citro | e633be1 | 2015-03-02 13:40:36 -0800 | [diff] [blame] | 249 | ], |
Bu Sun Kim | 6502091 | 2020-05-20 12:08:20 -0700 | [diff] [blame] | 250 | "sqlExportOptions": { # Options for exporting data as SQL statements. |
| 251 | "tables": [ # Tables to export, or that were exported, from the specified database. If |
Dan O'Meara | dd49464 | 2020-05-01 07:42:23 -0700 | [diff] [blame] | 252 | # you specify tables, specify one and only one database. For PostgreSQL |
| 253 | # instances, you can specify only one table. |
Bu Sun Kim | 6502091 | 2020-05-20 12:08:20 -0700 | [diff] [blame] | 254 | "A String", |
Craig Citro | e633be1 | 2015-03-02 13:40:36 -0800 | [diff] [blame] | 255 | ], |
Bu Sun Kim | 6502091 | 2020-05-20 12:08:20 -0700 | [diff] [blame] | 256 | "schemaOnly": True or False, # Export only schemas. |
| 257 | "mysqlExportOptions": { # Options for exporting from MySQL. |
| 258 | "masterData": 42, # Option to include SQL statement required to set up replication. |
Dan O'Meara | dd49464 | 2020-05-01 07:42:23 -0700 | [diff] [blame] | 259 | # If set to <code>1</code>, the dump file includes |
| 260 | # a CHANGE MASTER TO statement with the binary log coordinates. |
| 261 | # If set to <code>2</code>, the CHANGE MASTER TO statement is written as |
| 262 | # a SQL comment, and has no effect. |
| 263 | # All other values are ignored. |
Bu Sun Kim | 715bd7f | 2019-06-14 16:50:42 -0700 | [diff] [blame] | 264 | }, |
Bu Sun Kim | 715bd7f | 2019-06-14 16:50:42 -0700 | [diff] [blame] | 265 | }, |
Bu Sun Kim | 6502091 | 2020-05-20 12:08:20 -0700 | [diff] [blame] | 266 | "fileType": "A String", # The file type for the specified uri. <br><code>SQL</code>: The file |
| 267 | # contains SQL statements. <br><code>CSV</code>: The file contains CSV data. |
| 268 | "uri": "A String", # The path to the file in Google Cloud Storage where the export will be |
| 269 | # stored. The URI is in the form <code>gs: |
| 270 | # //bucketName/fileName</code>. If the file already exists, the requests |
| 271 | # // succeeds, but the operation fails. If <code>fileType</code> is |
| 272 | # // <code>SQL</code> and the filename ends with .gz, the contents are |
| 273 | # // compressed. |
| 274 | "csvExportOptions": { # Options for exporting data as CSV. |
| 275 | "selectQuery": "A String", # The select query used to extract the data. |
| 276 | }, |
| 277 | "kind": "A String", # This is always <code>sql#exportContext</code>. |
Bu Sun Kim | 715bd7f | 2019-06-14 16:50:42 -0700 | [diff] [blame] | 278 | }, |
Bu Sun Kim | 6502091 | 2020-05-20 12:08:20 -0700 | [diff] [blame] | 279 | "targetId": "A String", # Name of the database instance related to this operation. |
Bu Sun Kim | 715bd7f | 2019-06-14 16:50:42 -0700 | [diff] [blame] | 280 | }</pre> |
| 281 | </div> |
| 282 | |
| 283 | <div class="method"> |
Dan O'Meara | dd49464 | 2020-05-01 07:42:23 -0700 | [diff] [blame] | 284 | <code class="details" id="clone">clone(project, instance, body=None, x__xgafv=None)</code> |
| 285 | <pre>Creates a Cloud SQL instance as a clone of the source instance. Using this |
| 286 | operation might cause your instance to restart. |
Bu Sun Kim | 715bd7f | 2019-06-14 16:50:42 -0700 | [diff] [blame] | 287 | |
| 288 | Args: |
| 289 | project: string, Project ID of the source as well as the clone Cloud SQL instance. (required) |
Dan O'Meara | dd49464 | 2020-05-01 07:42:23 -0700 | [diff] [blame] | 290 | instance: string, The ID of the Cloud SQL instance to be cloned (source). This does not |
| 291 | include the project ID. (required) |
| 292 | body: object, The request body. |
Bu Sun Kim | 715bd7f | 2019-06-14 16:50:42 -0700 | [diff] [blame] | 293 | The object takes the form of: |
| 294 | |
| 295 | { # Database instance clone request. |
Bu Sun Kim | 6502091 | 2020-05-20 12:08:20 -0700 | [diff] [blame] | 296 | "cloneContext": { # Database instance clone context. # Contains details about the clone operation. |
| 297 | "kind": "A String", # This is always <code>sql#cloneContext</code>. |
| 298 | "pointInTime": "A String", # Reserved for future use. |
| 299 | "destinationInstanceName": "A String", # Name of the Cloud SQL instance to be created as a clone. |
| 300 | "pitrTimestampMs": "A String", # Reserved for future use. |
| 301 | "binLogCoordinates": { # Binary log coordinates. # Binary log coordinates, if specified, identify the position up to which the |
Dan O'Meara | dd49464 | 2020-05-01 07:42:23 -0700 | [diff] [blame] | 302 | # source instance should be cloned. If not specified, the source instance is |
| 303 | # cloned up to the most recent binary log coordinates. |
Bu Sun Kim | 6502091 | 2020-05-20 12:08:20 -0700 | [diff] [blame] | 304 | "kind": "A String", # This is always <code>sql#binLogCoordinates</code>. |
| 305 | "binLogFileName": "A String", # Name of the binary log file for a Cloud SQL instance. |
| 306 | "binLogPosition": "A String", # Position (offset) within the binary log file. |
Bu Sun Kim | 715bd7f | 2019-06-14 16:50:42 -0700 | [diff] [blame] | 307 | }, |
Bu Sun Kim | 715bd7f | 2019-06-14 16:50:42 -0700 | [diff] [blame] | 308 | }, |
| 309 | } |
| 310 | |
Dan O'Meara | dd49464 | 2020-05-01 07:42:23 -0700 | [diff] [blame] | 311 | x__xgafv: string, V1 error format. |
| 312 | Allowed values |
| 313 | 1 - v1 error format |
| 314 | 2 - v2 error format |
Bu Sun Kim | 715bd7f | 2019-06-14 16:50:42 -0700 | [diff] [blame] | 315 | |
| 316 | Returns: |
| 317 | An object of the form: |
| 318 | |
Dan O'Meara | dd49464 | 2020-05-01 07:42:23 -0700 | [diff] [blame] | 319 | { # An Operation resource.&nbsp;For successful operations that return an |
| 320 | # Operation resource, only the fields relevant to the operation are populated |
| 321 | # in the resource. |
Bu Sun Kim | 6502091 | 2020-05-20 12:08:20 -0700 | [diff] [blame] | 322 | "endTime": "A String", # The time this operation finished in UTC timezone in <a |
| 323 | # href="https://tools.ietf.org/html/rfc3339">RFC 3339</a> format, for example |
| 324 | # <code>2012-11-15T16:19:00.094Z</code>. |
| 325 | "startTime": "A String", # The time this operation actually started in UTC timezone in <a |
| 326 | # href="https://tools.ietf.org/html/rfc3339">RFC 3339</a> format, for example |
| 327 | # <code>2012-11-15T16:19:00.094Z</code>. |
| 328 | "insertTime": "A String", # The time this operation was enqueued in UTC timezone in <a |
| 329 | # href="https://tools.ietf.org/html/rfc3339">RFC 3339</a> format, for example |
| 330 | # <code>2012-11-15T16:19:00.094Z</code>. |
| 331 | "user": "A String", # The email address of the user who initiated this operation. |
| 332 | "targetProject": "A String", # The project ID of the target instance related to this operation. |
| 333 | "selfLink": "A String", # The URI of this resource. |
| 334 | "targetLink": "A String", |
| 335 | "operationType": "A String", # The type of the operation. Valid values are <code>CREATE</code>, |
| 336 | # <code>DELETE</code>, <code>UPDATE</code>, <code>RESTART</code>, |
| 337 | # <code>IMPORT</code>, <code>EXPORT</code>, <code>BACKUP_VOLUME</code>, |
| 338 | # <code>RESTORE_VOLUME</code>, <code>CREATE_USER</code>, |
| 339 | # <code>DELETE_USER</code>, <code>CREATE_DATABASE</code>, |
| 340 | # <code>DELETE_DATABASE</code> . |
| 341 | "error": { # Database instance operation errors list wrapper. # If errors occurred during processing of this operation, this field will be |
| 342 | # populated. |
| 343 | "errors": [ # The list of errors encountered while processing this operation. |
| 344 | { # Database instance operation error. |
| 345 | "kind": "A String", # This is always <code>sql#operationError</code>. |
| 346 | "code": "A String", # Identifies the specific error that occurred. |
| 347 | "message": "A String", # Additional information about the error encountered. |
Dan O'Meara | dd49464 | 2020-05-01 07:42:23 -0700 | [diff] [blame] | 348 | }, |
Bu Sun Kim | 6502091 | 2020-05-20 12:08:20 -0700 | [diff] [blame] | 349 | ], |
| 350 | "kind": "A String", # This is always <code>sql#operationErrors</code>. |
| 351 | }, |
| 352 | "kind": "A String", # This is always <code>sql#operation</code>. |
| 353 | "importContext": { # Database instance import context. # The context for import operation, if applicable. |
| 354 | "kind": "A String", # This is always <code>sql#importContext</code>. |
| 355 | "csvImportOptions": { # Options for importing data as CSV. |
| 356 | "table": "A String", # The table to which CSV data is imported. |
| 357 | "columns": [ # The columns to which CSV data is imported. If not specified, all columns |
| 358 | # of the database table are loaded with CSV data. |
| 359 | "A String", |
| 360 | ], |
Dan O'Meara | dd49464 | 2020-05-01 07:42:23 -0700 | [diff] [blame] | 361 | }, |
Bu Sun Kim | 6502091 | 2020-05-20 12:08:20 -0700 | [diff] [blame] | 362 | "database": "A String", # The target database for the import. If <code>fileType</code> is |
Dan O'Meara | dd49464 | 2020-05-01 07:42:23 -0700 | [diff] [blame] | 363 | # <code>SQL</code>, this field is required only if the import file does not |
| 364 | # specify a database, and is overridden by any database specification in the |
| 365 | # import file. If <code>fileType</code> is <code>CSV</code>, one database |
| 366 | # must be specified. |
Bu Sun Kim | 6502091 | 2020-05-20 12:08:20 -0700 | [diff] [blame] | 367 | "importUser": "A String", # The PostgreSQL user for this import operation. PostgreSQL instances only. |
| 368 | "bakImportOptions": { # Import parameters specific to SQL Server .BAK files |
| 369 | "encryptionOptions": { |
| 370 | "certPath": "A String", # Path to the Certificate (.cer) in Cloud Storage, in the form |
| 371 | # <code>gs://bucketName/fileName</code>. The instance must have |
| 372 | # write permissions to the bucket and read access to the file. |
| 373 | "pvkPath": "A String", # Path to the Certificate Private Key (.pvk) in Cloud Storage, in the |
| 374 | # form <code>gs://bucketName/fileName</code>. The instance must have |
| 375 | # write permissions to the bucket and read access to the file. |
| 376 | "pvkPassword": "A String", # Password that encrypts the private key |
| 377 | }, |
| 378 | }, |
| 379 | "uri": "A String", # Path to the import file in Cloud Storage, in the form |
Dan O'Meara | dd49464 | 2020-05-01 07:42:23 -0700 | [diff] [blame] | 380 | # <code>gs: |
| 381 | # //bucketName/fileName</code>. Compressed gzip files (.gz) are supported |
| 382 | # // when <code>fileType</code> is <code>SQL</code>. The instance must have |
| 383 | # // write permissions to the bucket and read access to the file. |
Bu Sun Kim | 6502091 | 2020-05-20 12:08:20 -0700 | [diff] [blame] | 384 | "fileType": "A String", # The file type for the specified uri. <br><code>SQL</code>: The file |
| 385 | # contains SQL statements. <br><code>CSV</code>: The file contains CSV data. |
Bu Sun Kim | 715bd7f | 2019-06-14 16:50:42 -0700 | [diff] [blame] | 386 | }, |
Bu Sun Kim | 6502091 | 2020-05-20 12:08:20 -0700 | [diff] [blame] | 387 | "status": "A String", # The status of an operation. Valid values are <code>PENDING</code>, |
| 388 | # <code>RUNNING</code>, <code>DONE</code>, |
| 389 | # <code>SQL_OPERATION_STATUS_UNSPECIFIED</code>. |
| 390 | "name": "A String", # An identifier that uniquely identifies the operation. You can use this |
Dan O'Meara | dd49464 | 2020-05-01 07:42:23 -0700 | [diff] [blame] | 391 | # identifier to retrieve the Operations resource that has information about |
| 392 | # the operation. |
Bu Sun Kim | 6502091 | 2020-05-20 12:08:20 -0700 | [diff] [blame] | 393 | "exportContext": { # Database instance export context. # The context for export operation, if applicable. |
| 394 | "databases": [ # Databases to be exported. <br /> <b>MySQL instances:</b> If |
Dan O'Meara | dd49464 | 2020-05-01 07:42:23 -0700 | [diff] [blame] | 395 | # <code>fileType</code> is <code>SQL</code> and no database is specified, all |
| 396 | # databases are exported, except for the <code>mysql</code> system database. |
| 397 | # If <code>fileType</code> is <code>CSV</code>, you can specify one database, |
| 398 | # either by using this property or by using the |
| 399 | # <code>csvExportOptions.selectQuery</code> property, which takes precedence |
| 400 | # over this property. <br /> <b>PostgreSQL instances:</b> You must specify |
| 401 | # one database to be exported. If <code>fileType</code> is <code>CSV</code>, |
| 402 | # this database must match the one specified in the |
| 403 | # <code>csvExportOptions.selectQuery</code> property. |
Bu Sun Kim | 6502091 | 2020-05-20 12:08:20 -0700 | [diff] [blame] | 404 | "A String", |
Bu Sun Kim | 715bd7f | 2019-06-14 16:50:42 -0700 | [diff] [blame] | 405 | ], |
Bu Sun Kim | 6502091 | 2020-05-20 12:08:20 -0700 | [diff] [blame] | 406 | "sqlExportOptions": { # Options for exporting data as SQL statements. |
| 407 | "tables": [ # Tables to export, or that were exported, from the specified database. If |
Dan O'Meara | dd49464 | 2020-05-01 07:42:23 -0700 | [diff] [blame] | 408 | # you specify tables, specify one and only one database. For PostgreSQL |
| 409 | # instances, you can specify only one table. |
Bu Sun Kim | 6502091 | 2020-05-20 12:08:20 -0700 | [diff] [blame] | 410 | "A String", |
Bu Sun Kim | 715bd7f | 2019-06-14 16:50:42 -0700 | [diff] [blame] | 411 | ], |
Bu Sun Kim | 6502091 | 2020-05-20 12:08:20 -0700 | [diff] [blame] | 412 | "schemaOnly": True or False, # Export only schemas. |
| 413 | "mysqlExportOptions": { # Options for exporting from MySQL. |
| 414 | "masterData": 42, # Option to include SQL statement required to set up replication. |
Dan O'Meara | dd49464 | 2020-05-01 07:42:23 -0700 | [diff] [blame] | 415 | # If set to <code>1</code>, the dump file includes |
| 416 | # a CHANGE MASTER TO statement with the binary log coordinates. |
| 417 | # If set to <code>2</code>, the CHANGE MASTER TO statement is written as |
| 418 | # a SQL comment, and has no effect. |
| 419 | # All other values are ignored. |
Bu Sun Kim | 715bd7f | 2019-06-14 16:50:42 -0700 | [diff] [blame] | 420 | }, |
Craig Citro | e633be1 | 2015-03-02 13:40:36 -0800 | [diff] [blame] | 421 | }, |
Bu Sun Kim | 6502091 | 2020-05-20 12:08:20 -0700 | [diff] [blame] | 422 | "fileType": "A String", # The file type for the specified uri. <br><code>SQL</code>: The file |
| 423 | # contains SQL statements. <br><code>CSV</code>: The file contains CSV data. |
| 424 | "uri": "A String", # The path to the file in Google Cloud Storage where the export will be |
| 425 | # stored. The URI is in the form <code>gs: |
| 426 | # //bucketName/fileName</code>. If the file already exists, the requests |
| 427 | # // succeeds, but the operation fails. If <code>fileType</code> is |
| 428 | # // <code>SQL</code> and the filename ends with .gz, the contents are |
| 429 | # // compressed. |
| 430 | "csvExportOptions": { # Options for exporting data as CSV. |
| 431 | "selectQuery": "A String", # The select query used to extract the data. |
| 432 | }, |
| 433 | "kind": "A String", # This is always <code>sql#exportContext</code>. |
Craig Citro | e633be1 | 2015-03-02 13:40:36 -0800 | [diff] [blame] | 434 | }, |
Bu Sun Kim | 6502091 | 2020-05-20 12:08:20 -0700 | [diff] [blame] | 435 | "targetId": "A String", # Name of the database instance related to this operation. |
Craig Citro | e633be1 | 2015-03-02 13:40:36 -0800 | [diff] [blame] | 436 | }</pre> |
| 437 | </div> |
| 438 | |
| 439 | <div class="method"> |
Dan O'Meara | dd49464 | 2020-05-01 07:42:23 -0700 | [diff] [blame] | 440 | <code class="details" id="delete">delete(project, instance, x__xgafv=None)</code> |
Craig Citro | e633be1 | 2015-03-02 13:40:36 -0800 | [diff] [blame] | 441 | <pre>Deletes a Cloud SQL instance. |
| 442 | |
| 443 | Args: |
| 444 | project: string, Project ID of the project that contains the instance to be deleted. (required) |
| 445 | 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] | 446 | x__xgafv: string, V1 error format. |
| 447 | Allowed values |
| 448 | 1 - v1 error format |
| 449 | 2 - v2 error format |
Craig Citro | e633be1 | 2015-03-02 13:40:36 -0800 | [diff] [blame] | 450 | |
| 451 | Returns: |
| 452 | An object of the form: |
| 453 | |
Dan O'Meara | dd49464 | 2020-05-01 07:42:23 -0700 | [diff] [blame] | 454 | { # An Operation resource.&nbsp;For successful operations that return an |
| 455 | # Operation resource, only the fields relevant to the operation are populated |
| 456 | # in the resource. |
Bu Sun Kim | 6502091 | 2020-05-20 12:08:20 -0700 | [diff] [blame] | 457 | "endTime": "A String", # The time this operation finished in UTC timezone in <a |
| 458 | # href="https://tools.ietf.org/html/rfc3339">RFC 3339</a> format, for example |
| 459 | # <code>2012-11-15T16:19:00.094Z</code>. |
| 460 | "startTime": "A String", # The time this operation actually started in UTC timezone in <a |
| 461 | # href="https://tools.ietf.org/html/rfc3339">RFC 3339</a> format, for example |
| 462 | # <code>2012-11-15T16:19:00.094Z</code>. |
| 463 | "insertTime": "A String", # The time this operation was enqueued in UTC timezone in <a |
| 464 | # href="https://tools.ietf.org/html/rfc3339">RFC 3339</a> format, for example |
| 465 | # <code>2012-11-15T16:19:00.094Z</code>. |
| 466 | "user": "A String", # The email address of the user who initiated this operation. |
| 467 | "targetProject": "A String", # The project ID of the target instance related to this operation. |
| 468 | "selfLink": "A String", # The URI of this resource. |
| 469 | "targetLink": "A String", |
| 470 | "operationType": "A String", # The type of the operation. Valid values are <code>CREATE</code>, |
| 471 | # <code>DELETE</code>, <code>UPDATE</code>, <code>RESTART</code>, |
| 472 | # <code>IMPORT</code>, <code>EXPORT</code>, <code>BACKUP_VOLUME</code>, |
| 473 | # <code>RESTORE_VOLUME</code>, <code>CREATE_USER</code>, |
| 474 | # <code>DELETE_USER</code>, <code>CREATE_DATABASE</code>, |
| 475 | # <code>DELETE_DATABASE</code> . |
| 476 | "error": { # Database instance operation errors list wrapper. # If errors occurred during processing of this operation, this field will be |
| 477 | # populated. |
| 478 | "errors": [ # The list of errors encountered while processing this operation. |
| 479 | { # Database instance operation error. |
| 480 | "kind": "A String", # This is always <code>sql#operationError</code>. |
| 481 | "code": "A String", # Identifies the specific error that occurred. |
| 482 | "message": "A String", # Additional information about the error encountered. |
Dan O'Meara | dd49464 | 2020-05-01 07:42:23 -0700 | [diff] [blame] | 483 | }, |
Bu Sun Kim | 6502091 | 2020-05-20 12:08:20 -0700 | [diff] [blame] | 484 | ], |
| 485 | "kind": "A String", # This is always <code>sql#operationErrors</code>. |
| 486 | }, |
| 487 | "kind": "A String", # This is always <code>sql#operation</code>. |
| 488 | "importContext": { # Database instance import context. # The context for import operation, if applicable. |
| 489 | "kind": "A String", # This is always <code>sql#importContext</code>. |
| 490 | "csvImportOptions": { # Options for importing data as CSV. |
| 491 | "table": "A String", # The table to which CSV data is imported. |
| 492 | "columns": [ # The columns to which CSV data is imported. If not specified, all columns |
| 493 | # of the database table are loaded with CSV data. |
| 494 | "A String", |
| 495 | ], |
Dan O'Meara | dd49464 | 2020-05-01 07:42:23 -0700 | [diff] [blame] | 496 | }, |
Bu Sun Kim | 6502091 | 2020-05-20 12:08:20 -0700 | [diff] [blame] | 497 | "database": "A String", # The target database for the import. If <code>fileType</code> is |
Dan O'Meara | dd49464 | 2020-05-01 07:42:23 -0700 | [diff] [blame] | 498 | # <code>SQL</code>, this field is required only if the import file does not |
| 499 | # specify a database, and is overridden by any database specification in the |
| 500 | # import file. If <code>fileType</code> is <code>CSV</code>, one database |
| 501 | # must be specified. |
Bu Sun Kim | 6502091 | 2020-05-20 12:08:20 -0700 | [diff] [blame] | 502 | "importUser": "A String", # The PostgreSQL user for this import operation. PostgreSQL instances only. |
| 503 | "bakImportOptions": { # Import parameters specific to SQL Server .BAK files |
| 504 | "encryptionOptions": { |
| 505 | "certPath": "A String", # Path to the Certificate (.cer) in Cloud Storage, in the form |
| 506 | # <code>gs://bucketName/fileName</code>. The instance must have |
| 507 | # write permissions to the bucket and read access to the file. |
| 508 | "pvkPath": "A String", # Path to the Certificate Private Key (.pvk) in Cloud Storage, in the |
| 509 | # form <code>gs://bucketName/fileName</code>. The instance must have |
| 510 | # write permissions to the bucket and read access to the file. |
| 511 | "pvkPassword": "A String", # Password that encrypts the private key |
| 512 | }, |
| 513 | }, |
| 514 | "uri": "A String", # Path to the import file in Cloud Storage, in the form |
Dan O'Meara | dd49464 | 2020-05-01 07:42:23 -0700 | [diff] [blame] | 515 | # <code>gs: |
| 516 | # //bucketName/fileName</code>. Compressed gzip files (.gz) are supported |
| 517 | # // when <code>fileType</code> is <code>SQL</code>. The instance must have |
| 518 | # // write permissions to the bucket and read access to the file. |
Bu Sun Kim | 6502091 | 2020-05-20 12:08:20 -0700 | [diff] [blame] | 519 | "fileType": "A String", # The file type for the specified uri. <br><code>SQL</code>: The file |
| 520 | # contains SQL statements. <br><code>CSV</code>: The file contains CSV data. |
Craig Citro | e633be1 | 2015-03-02 13:40:36 -0800 | [diff] [blame] | 521 | }, |
Bu Sun Kim | 6502091 | 2020-05-20 12:08:20 -0700 | [diff] [blame] | 522 | "status": "A String", # The status of an operation. Valid values are <code>PENDING</code>, |
| 523 | # <code>RUNNING</code>, <code>DONE</code>, |
| 524 | # <code>SQL_OPERATION_STATUS_UNSPECIFIED</code>. |
| 525 | "name": "A String", # An identifier that uniquely identifies the operation. You can use this |
Dan O'Meara | dd49464 | 2020-05-01 07:42:23 -0700 | [diff] [blame] | 526 | # identifier to retrieve the Operations resource that has information about |
| 527 | # the operation. |
Bu Sun Kim | 6502091 | 2020-05-20 12:08:20 -0700 | [diff] [blame] | 528 | "exportContext": { # Database instance export context. # The context for export operation, if applicable. |
| 529 | "databases": [ # Databases to be exported. <br /> <b>MySQL instances:</b> If |
Dan O'Meara | dd49464 | 2020-05-01 07:42:23 -0700 | [diff] [blame] | 530 | # <code>fileType</code> is <code>SQL</code> and no database is specified, all |
| 531 | # databases are exported, except for the <code>mysql</code> system database. |
| 532 | # If <code>fileType</code> is <code>CSV</code>, you can specify one database, |
| 533 | # either by using this property or by using the |
| 534 | # <code>csvExportOptions.selectQuery</code> property, which takes precedence |
| 535 | # over this property. <br /> <b>PostgreSQL instances:</b> You must specify |
| 536 | # one database to be exported. If <code>fileType</code> is <code>CSV</code>, |
| 537 | # this database must match the one specified in the |
| 538 | # <code>csvExportOptions.selectQuery</code> property. |
Bu Sun Kim | 6502091 | 2020-05-20 12:08:20 -0700 | [diff] [blame] | 539 | "A String", |
Craig Citro | e633be1 | 2015-03-02 13:40:36 -0800 | [diff] [blame] | 540 | ], |
Bu Sun Kim | 6502091 | 2020-05-20 12:08:20 -0700 | [diff] [blame] | 541 | "sqlExportOptions": { # Options for exporting data as SQL statements. |
| 542 | "tables": [ # Tables to export, or that were exported, from the specified database. If |
Dan O'Meara | dd49464 | 2020-05-01 07:42:23 -0700 | [diff] [blame] | 543 | # you specify tables, specify one and only one database. For PostgreSQL |
| 544 | # instances, you can specify only one table. |
Bu Sun Kim | 6502091 | 2020-05-20 12:08:20 -0700 | [diff] [blame] | 545 | "A String", |
Craig Citro | e633be1 | 2015-03-02 13:40:36 -0800 | [diff] [blame] | 546 | ], |
Bu Sun Kim | 6502091 | 2020-05-20 12:08:20 -0700 | [diff] [blame] | 547 | "schemaOnly": True or False, # Export only schemas. |
| 548 | "mysqlExportOptions": { # Options for exporting from MySQL. |
| 549 | "masterData": 42, # Option to include SQL statement required to set up replication. |
Dan O'Meara | dd49464 | 2020-05-01 07:42:23 -0700 | [diff] [blame] | 550 | # If set to <code>1</code>, the dump file includes |
| 551 | # a CHANGE MASTER TO statement with the binary log coordinates. |
| 552 | # If set to <code>2</code>, the CHANGE MASTER TO statement is written as |
| 553 | # a SQL comment, and has no effect. |
| 554 | # All other values are ignored. |
Bu Sun Kim | 715bd7f | 2019-06-14 16:50:42 -0700 | [diff] [blame] | 555 | }, |
Bu Sun Kim | 715bd7f | 2019-06-14 16:50:42 -0700 | [diff] [blame] | 556 | }, |
Bu Sun Kim | 6502091 | 2020-05-20 12:08:20 -0700 | [diff] [blame] | 557 | "fileType": "A String", # The file type for the specified uri. <br><code>SQL</code>: The file |
| 558 | # contains SQL statements. <br><code>CSV</code>: The file contains CSV data. |
| 559 | "uri": "A String", # The path to the file in Google Cloud Storage where the export will be |
| 560 | # stored. The URI is in the form <code>gs: |
| 561 | # //bucketName/fileName</code>. If the file already exists, the requests |
| 562 | # // succeeds, but the operation fails. If <code>fileType</code> is |
| 563 | # // <code>SQL</code> and the filename ends with .gz, the contents are |
| 564 | # // compressed. |
| 565 | "csvExportOptions": { # Options for exporting data as CSV. |
| 566 | "selectQuery": "A String", # The select query used to extract the data. |
| 567 | }, |
| 568 | "kind": "A String", # This is always <code>sql#exportContext</code>. |
Bu Sun Kim | 715bd7f | 2019-06-14 16:50:42 -0700 | [diff] [blame] | 569 | }, |
Bu Sun Kim | 6502091 | 2020-05-20 12:08:20 -0700 | [diff] [blame] | 570 | "targetId": "A String", # Name of the database instance related to this operation. |
Bu Sun Kim | 715bd7f | 2019-06-14 16:50:42 -0700 | [diff] [blame] | 571 | }</pre> |
| 572 | </div> |
| 573 | |
| 574 | <div class="method"> |
Dan O'Meara | dd49464 | 2020-05-01 07:42:23 -0700 | [diff] [blame] | 575 | <code class="details" id="demoteMaster">demoteMaster(project, instance, body=None, x__xgafv=None)</code> |
| 576 | <pre>Demotes the stand-alone instance to be a Cloud SQL read replica for an |
| 577 | external database server. |
Bu Sun Kim | 715bd7f | 2019-06-14 16:50:42 -0700 | [diff] [blame] | 578 | |
| 579 | Args: |
| 580 | project: string, ID of the project that contains the instance. (required) |
| 581 | instance: string, Cloud SQL instance name. (required) |
Dan O'Meara | dd49464 | 2020-05-01 07:42:23 -0700 | [diff] [blame] | 582 | body: object, The request body. |
Bu Sun Kim | 715bd7f | 2019-06-14 16:50:42 -0700 | [diff] [blame] | 583 | The object takes the form of: |
| 584 | |
| 585 | { # Database demote master request. |
Bu Sun Kim | 6502091 | 2020-05-20 12:08:20 -0700 | [diff] [blame] | 586 | "demoteMasterContext": { # Database instance demote master context. # Contains details about the demoteMaster operation. |
| 587 | "replicaConfiguration": { # Read-replica configuration for connecting to the on-premises master. # Configuration specific to read-replicas replicating from the on-premises |
| 588 | # master. |
| 589 | "kind": "A String", # This is always <code>sql#demoteMasterConfiguration</code>. |
| 590 | "mysqlReplicaConfiguration": { # Read-replica configuration specific to MySQL databases. # MySQL specific configuration when replicating from a MySQL on-premises |
| 591 | # master. Replication configuration information such as the username, |
| 592 | # password, certificates, and keys are not stored in the instance metadata. |
| 593 | # The configuration information is used only to set up the replication |
| 594 | # connection and is stored by MySQL in a file named <code>master.info</code> |
| 595 | # in the data directory. |
| 596 | "kind": "A String", # This is always <code>sql#demoteMasterMysqlReplicaConfiguration</code>. |
| 597 | "password": "A String", # The password for the replication connection. |
| 598 | "clientKey": "A String", # PEM representation of the slave's private key. The corresponsing public key |
| 599 | # is encoded in the client's certificate. The format of the slave's private |
| 600 | # key can be either PKCS #1 or PKCS #8. |
| 601 | "clientCertificate": "A String", # PEM representation of the slave's x509 certificate. |
| 602 | "username": "A String", # The username for the replication connection. |
| 603 | "caCertificate": "A String", # PEM representation of the trusted CA's x509 certificate. |
| 604 | }, |
| 605 | }, |
| 606 | "kind": "A String", # This is always <code>sql#demoteMasterContext</code>. |
| 607 | "masterInstanceName": "A String", # The name of the instance which will act as on-premises master in the |
Dan O'Meara | dd49464 | 2020-05-01 07:42:23 -0700 | [diff] [blame] | 608 | # replication setup. |
Bu Sun Kim | 6502091 | 2020-05-20 12:08:20 -0700 | [diff] [blame] | 609 | "verifyGtidConsistency": True or False, # Verify GTID consistency for demote operation. Default value: |
Dan O'Meara | dd49464 | 2020-05-01 07:42:23 -0700 | [diff] [blame] | 610 | # <code>True</code>. Second Generation instances only. Setting this flag to |
| 611 | # false enables you to bypass GTID consistency check between on-premises |
| 612 | # master and Cloud SQL instance during the demotion operation but also |
| 613 | # exposes you to the risk of future replication failures. Change the value |
| 614 | # only if you know the reason for the GTID divergence and are confident that |
| 615 | # doing so will not cause any replication issues. |
Bu Sun Kim | 715bd7f | 2019-06-14 16:50:42 -0700 | [diff] [blame] | 616 | }, |
| 617 | } |
| 618 | |
Dan O'Meara | dd49464 | 2020-05-01 07:42:23 -0700 | [diff] [blame] | 619 | x__xgafv: string, V1 error format. |
| 620 | Allowed values |
| 621 | 1 - v1 error format |
| 622 | 2 - v2 error format |
Bu Sun Kim | 715bd7f | 2019-06-14 16:50:42 -0700 | [diff] [blame] | 623 | |
| 624 | Returns: |
| 625 | An object of the form: |
| 626 | |
Dan O'Meara | dd49464 | 2020-05-01 07:42:23 -0700 | [diff] [blame] | 627 | { # An Operation resource.&nbsp;For successful operations that return an |
| 628 | # Operation resource, only the fields relevant to the operation are populated |
| 629 | # in the resource. |
Bu Sun Kim | 6502091 | 2020-05-20 12:08:20 -0700 | [diff] [blame] | 630 | "endTime": "A String", # The time this operation finished in UTC timezone in <a |
| 631 | # href="https://tools.ietf.org/html/rfc3339">RFC 3339</a> format, for example |
| 632 | # <code>2012-11-15T16:19:00.094Z</code>. |
| 633 | "startTime": "A String", # The time this operation actually started in UTC timezone in <a |
| 634 | # href="https://tools.ietf.org/html/rfc3339">RFC 3339</a> format, for example |
| 635 | # <code>2012-11-15T16:19:00.094Z</code>. |
| 636 | "insertTime": "A String", # The time this operation was enqueued in UTC timezone in <a |
| 637 | # href="https://tools.ietf.org/html/rfc3339">RFC 3339</a> format, for example |
| 638 | # <code>2012-11-15T16:19:00.094Z</code>. |
| 639 | "user": "A String", # The email address of the user who initiated this operation. |
| 640 | "targetProject": "A String", # The project ID of the target instance related to this operation. |
| 641 | "selfLink": "A String", # The URI of this resource. |
| 642 | "targetLink": "A String", |
| 643 | "operationType": "A String", # The type of the operation. Valid values are <code>CREATE</code>, |
| 644 | # <code>DELETE</code>, <code>UPDATE</code>, <code>RESTART</code>, |
| 645 | # <code>IMPORT</code>, <code>EXPORT</code>, <code>BACKUP_VOLUME</code>, |
| 646 | # <code>RESTORE_VOLUME</code>, <code>CREATE_USER</code>, |
| 647 | # <code>DELETE_USER</code>, <code>CREATE_DATABASE</code>, |
| 648 | # <code>DELETE_DATABASE</code> . |
| 649 | "error": { # Database instance operation errors list wrapper. # If errors occurred during processing of this operation, this field will be |
| 650 | # populated. |
| 651 | "errors": [ # The list of errors encountered while processing this operation. |
| 652 | { # Database instance operation error. |
| 653 | "kind": "A String", # This is always <code>sql#operationError</code>. |
| 654 | "code": "A String", # Identifies the specific error that occurred. |
| 655 | "message": "A String", # Additional information about the error encountered. |
Dan O'Meara | dd49464 | 2020-05-01 07:42:23 -0700 | [diff] [blame] | 656 | }, |
Bu Sun Kim | 6502091 | 2020-05-20 12:08:20 -0700 | [diff] [blame] | 657 | ], |
| 658 | "kind": "A String", # This is always <code>sql#operationErrors</code>. |
| 659 | }, |
| 660 | "kind": "A String", # This is always <code>sql#operation</code>. |
| 661 | "importContext": { # Database instance import context. # The context for import operation, if applicable. |
| 662 | "kind": "A String", # This is always <code>sql#importContext</code>. |
| 663 | "csvImportOptions": { # Options for importing data as CSV. |
| 664 | "table": "A String", # The table to which CSV data is imported. |
| 665 | "columns": [ # The columns to which CSV data is imported. If not specified, all columns |
| 666 | # of the database table are loaded with CSV data. |
| 667 | "A String", |
| 668 | ], |
Dan O'Meara | dd49464 | 2020-05-01 07:42:23 -0700 | [diff] [blame] | 669 | }, |
Bu Sun Kim | 6502091 | 2020-05-20 12:08:20 -0700 | [diff] [blame] | 670 | "database": "A String", # The target database for the import. If <code>fileType</code> is |
Dan O'Meara | dd49464 | 2020-05-01 07:42:23 -0700 | [diff] [blame] | 671 | # <code>SQL</code>, this field is required only if the import file does not |
| 672 | # specify a database, and is overridden by any database specification in the |
| 673 | # import file. If <code>fileType</code> is <code>CSV</code>, one database |
| 674 | # must be specified. |
Bu Sun Kim | 6502091 | 2020-05-20 12:08:20 -0700 | [diff] [blame] | 675 | "importUser": "A String", # The PostgreSQL user for this import operation. PostgreSQL instances only. |
| 676 | "bakImportOptions": { # Import parameters specific to SQL Server .BAK files |
| 677 | "encryptionOptions": { |
| 678 | "certPath": "A String", # Path to the Certificate (.cer) in Cloud Storage, in the form |
| 679 | # <code>gs://bucketName/fileName</code>. The instance must have |
| 680 | # write permissions to the bucket and read access to the file. |
| 681 | "pvkPath": "A String", # Path to the Certificate Private Key (.pvk) in Cloud Storage, in the |
| 682 | # form <code>gs://bucketName/fileName</code>. The instance must have |
| 683 | # write permissions to the bucket and read access to the file. |
| 684 | "pvkPassword": "A String", # Password that encrypts the private key |
| 685 | }, |
| 686 | }, |
| 687 | "uri": "A String", # Path to the import file in Cloud Storage, in the form |
Dan O'Meara | dd49464 | 2020-05-01 07:42:23 -0700 | [diff] [blame] | 688 | # <code>gs: |
| 689 | # //bucketName/fileName</code>. Compressed gzip files (.gz) are supported |
| 690 | # // when <code>fileType</code> is <code>SQL</code>. The instance must have |
| 691 | # // write permissions to the bucket and read access to the file. |
Bu Sun Kim | 6502091 | 2020-05-20 12:08:20 -0700 | [diff] [blame] | 692 | "fileType": "A String", # The file type for the specified uri. <br><code>SQL</code>: The file |
| 693 | # contains SQL statements. <br><code>CSV</code>: The file contains CSV data. |
Bu Sun Kim | 715bd7f | 2019-06-14 16:50:42 -0700 | [diff] [blame] | 694 | }, |
Bu Sun Kim | 6502091 | 2020-05-20 12:08:20 -0700 | [diff] [blame] | 695 | "status": "A String", # The status of an operation. Valid values are <code>PENDING</code>, |
| 696 | # <code>RUNNING</code>, <code>DONE</code>, |
| 697 | # <code>SQL_OPERATION_STATUS_UNSPECIFIED</code>. |
| 698 | "name": "A String", # An identifier that uniquely identifies the operation. You can use this |
Dan O'Meara | dd49464 | 2020-05-01 07:42:23 -0700 | [diff] [blame] | 699 | # identifier to retrieve the Operations resource that has information about |
| 700 | # the operation. |
Bu Sun Kim | 6502091 | 2020-05-20 12:08:20 -0700 | [diff] [blame] | 701 | "exportContext": { # Database instance export context. # The context for export operation, if applicable. |
| 702 | "databases": [ # Databases to be exported. <br /> <b>MySQL instances:</b> If |
Dan O'Meara | dd49464 | 2020-05-01 07:42:23 -0700 | [diff] [blame] | 703 | # <code>fileType</code> is <code>SQL</code> and no database is specified, all |
| 704 | # databases are exported, except for the <code>mysql</code> system database. |
| 705 | # If <code>fileType</code> is <code>CSV</code>, you can specify one database, |
| 706 | # either by using this property or by using the |
| 707 | # <code>csvExportOptions.selectQuery</code> property, which takes precedence |
| 708 | # over this property. <br /> <b>PostgreSQL instances:</b> You must specify |
| 709 | # one database to be exported. If <code>fileType</code> is <code>CSV</code>, |
| 710 | # this database must match the one specified in the |
| 711 | # <code>csvExportOptions.selectQuery</code> property. |
Bu Sun Kim | 6502091 | 2020-05-20 12:08:20 -0700 | [diff] [blame] | 712 | "A String", |
Bu Sun Kim | 715bd7f | 2019-06-14 16:50:42 -0700 | [diff] [blame] | 713 | ], |
Bu Sun Kim | 6502091 | 2020-05-20 12:08:20 -0700 | [diff] [blame] | 714 | "sqlExportOptions": { # Options for exporting data as SQL statements. |
| 715 | "tables": [ # Tables to export, or that were exported, from the specified database. If |
Dan O'Meara | dd49464 | 2020-05-01 07:42:23 -0700 | [diff] [blame] | 716 | # you specify tables, specify one and only one database. For PostgreSQL |
| 717 | # instances, you can specify only one table. |
Bu Sun Kim | 6502091 | 2020-05-20 12:08:20 -0700 | [diff] [blame] | 718 | "A String", |
Bu Sun Kim | 715bd7f | 2019-06-14 16:50:42 -0700 | [diff] [blame] | 719 | ], |
Bu Sun Kim | 6502091 | 2020-05-20 12:08:20 -0700 | [diff] [blame] | 720 | "schemaOnly": True or False, # Export only schemas. |
| 721 | "mysqlExportOptions": { # Options for exporting from MySQL. |
| 722 | "masterData": 42, # Option to include SQL statement required to set up replication. |
Dan O'Meara | dd49464 | 2020-05-01 07:42:23 -0700 | [diff] [blame] | 723 | # If set to <code>1</code>, the dump file includes |
| 724 | # a CHANGE MASTER TO statement with the binary log coordinates. |
| 725 | # If set to <code>2</code>, the CHANGE MASTER TO statement is written as |
| 726 | # a SQL comment, and has no effect. |
| 727 | # All other values are ignored. |
Bu Sun Kim | 715bd7f | 2019-06-14 16:50:42 -0700 | [diff] [blame] | 728 | }, |
Craig Citro | e633be1 | 2015-03-02 13:40:36 -0800 | [diff] [blame] | 729 | }, |
Bu Sun Kim | 6502091 | 2020-05-20 12:08:20 -0700 | [diff] [blame] | 730 | "fileType": "A String", # The file type for the specified uri. <br><code>SQL</code>: The file |
| 731 | # contains SQL statements. <br><code>CSV</code>: The file contains CSV data. |
| 732 | "uri": "A String", # The path to the file in Google Cloud Storage where the export will be |
| 733 | # stored. The URI is in the form <code>gs: |
| 734 | # //bucketName/fileName</code>. If the file already exists, the requests |
| 735 | # // succeeds, but the operation fails. If <code>fileType</code> is |
| 736 | # // <code>SQL</code> and the filename ends with .gz, the contents are |
| 737 | # // compressed. |
| 738 | "csvExportOptions": { # Options for exporting data as CSV. |
| 739 | "selectQuery": "A String", # The select query used to extract the data. |
| 740 | }, |
| 741 | "kind": "A String", # This is always <code>sql#exportContext</code>. |
Craig Citro | e633be1 | 2015-03-02 13:40:36 -0800 | [diff] [blame] | 742 | }, |
Bu Sun Kim | 6502091 | 2020-05-20 12:08:20 -0700 | [diff] [blame] | 743 | "targetId": "A String", # Name of the database instance related to this operation. |
Craig Citro | e633be1 | 2015-03-02 13:40:36 -0800 | [diff] [blame] | 744 | }</pre> |
| 745 | </div> |
| 746 | |
| 747 | <div class="method"> |
Dan O'Meara | dd49464 | 2020-05-01 07:42:23 -0700 | [diff] [blame] | 748 | <code class="details" id="export">export(project, instance, body=None, x__xgafv=None)</code> |
| 749 | <pre>Exports data from a Cloud SQL instance to a Cloud Storage bucket as a SQL |
| 750 | dump or CSV file. |
Craig Citro | e633be1 | 2015-03-02 13:40:36 -0800 | [diff] [blame] | 751 | |
| 752 | Args: |
| 753 | project: string, Project ID of the project that contains the instance to be exported. (required) |
| 754 | 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] | 755 | body: object, The request body. |
Craig Citro | e633be1 | 2015-03-02 13:40:36 -0800 | [diff] [blame] | 756 | The object takes the form of: |
| 757 | |
| 758 | { # Database instance export request. |
Bu Sun Kim | 6502091 | 2020-05-20 12:08:20 -0700 | [diff] [blame] | 759 | "exportContext": { # Database instance export context. # Contains details about the export operation. |
| 760 | "databases": [ # Databases to be exported. <br /> <b>MySQL instances:</b> If |
Dan O'Meara | dd49464 | 2020-05-01 07:42:23 -0700 | [diff] [blame] | 761 | # <code>fileType</code> is <code>SQL</code> and no database is specified, all |
| 762 | # databases are exported, except for the <code>mysql</code> system database. |
| 763 | # If <code>fileType</code> is <code>CSV</code>, you can specify one database, |
| 764 | # either by using this property or by using the |
| 765 | # <code>csvExportOptions.selectQuery</code> property, which takes precedence |
| 766 | # over this property. <br /> <b>PostgreSQL instances:</b> You must specify |
| 767 | # one database to be exported. If <code>fileType</code> is <code>CSV</code>, |
| 768 | # this database must match the one specified in the |
| 769 | # <code>csvExportOptions.selectQuery</code> property. |
Bu Sun Kim | 6502091 | 2020-05-20 12:08:20 -0700 | [diff] [blame] | 770 | "A String", |
Craig Citro | e633be1 | 2015-03-02 13:40:36 -0800 | [diff] [blame] | 771 | ], |
Bu Sun Kim | 6502091 | 2020-05-20 12:08:20 -0700 | [diff] [blame] | 772 | "sqlExportOptions": { # Options for exporting data as SQL statements. |
| 773 | "tables": [ # Tables to export, or that were exported, from the specified database. If |
Dan O'Meara | dd49464 | 2020-05-01 07:42:23 -0700 | [diff] [blame] | 774 | # you specify tables, specify one and only one database. For PostgreSQL |
| 775 | # instances, you can specify only one table. |
Bu Sun Kim | 6502091 | 2020-05-20 12:08:20 -0700 | [diff] [blame] | 776 | "A String", |
Craig Citro | e633be1 | 2015-03-02 13:40:36 -0800 | [diff] [blame] | 777 | ], |
Bu Sun Kim | 6502091 | 2020-05-20 12:08:20 -0700 | [diff] [blame] | 778 | "schemaOnly": True or False, # Export only schemas. |
| 779 | "mysqlExportOptions": { # Options for exporting from MySQL. |
| 780 | "masterData": 42, # Option to include SQL statement required to set up replication. |
Dan O'Meara | dd49464 | 2020-05-01 07:42:23 -0700 | [diff] [blame] | 781 | # If set to <code>1</code>, the dump file includes |
| 782 | # a CHANGE MASTER TO statement with the binary log coordinates. |
| 783 | # If set to <code>2</code>, the CHANGE MASTER TO statement is written as |
| 784 | # a SQL comment, and has no effect. |
| 785 | # All other values are ignored. |
Bu Sun Kim | 715bd7f | 2019-06-14 16:50:42 -0700 | [diff] [blame] | 786 | }, |
Craig Citro | e633be1 | 2015-03-02 13:40:36 -0800 | [diff] [blame] | 787 | }, |
Bu Sun Kim | 6502091 | 2020-05-20 12:08:20 -0700 | [diff] [blame] | 788 | "fileType": "A String", # The file type for the specified uri. <br><code>SQL</code>: The file |
| 789 | # contains SQL statements. <br><code>CSV</code>: The file contains CSV data. |
| 790 | "uri": "A String", # The path to the file in Google Cloud Storage where the export will be |
| 791 | # stored. The URI is in the form <code>gs: |
| 792 | # //bucketName/fileName</code>. If the file already exists, the requests |
| 793 | # // succeeds, but the operation fails. If <code>fileType</code> is |
| 794 | # // <code>SQL</code> and the filename ends with .gz, the contents are |
| 795 | # // compressed. |
| 796 | "csvExportOptions": { # Options for exporting data as CSV. |
| 797 | "selectQuery": "A String", # The select query used to extract the data. |
| 798 | }, |
| 799 | "kind": "A String", # This is always <code>sql#exportContext</code>. |
Craig Citro | e633be1 | 2015-03-02 13:40:36 -0800 | [diff] [blame] | 800 | }, |
| 801 | } |
| 802 | |
Dan O'Meara | dd49464 | 2020-05-01 07:42:23 -0700 | [diff] [blame] | 803 | x__xgafv: string, V1 error format. |
| 804 | Allowed values |
| 805 | 1 - v1 error format |
| 806 | 2 - v2 error format |
Craig Citro | e633be1 | 2015-03-02 13:40:36 -0800 | [diff] [blame] | 807 | |
| 808 | Returns: |
| 809 | An object of the form: |
| 810 | |
Dan O'Meara | dd49464 | 2020-05-01 07:42:23 -0700 | [diff] [blame] | 811 | { # An Operation resource.&nbsp;For successful operations that return an |
| 812 | # Operation resource, only the fields relevant to the operation are populated |
| 813 | # in the resource. |
Bu Sun Kim | 6502091 | 2020-05-20 12:08:20 -0700 | [diff] [blame] | 814 | "endTime": "A String", # The time this operation finished in UTC timezone in <a |
| 815 | # href="https://tools.ietf.org/html/rfc3339">RFC 3339</a> format, for example |
| 816 | # <code>2012-11-15T16:19:00.094Z</code>. |
| 817 | "startTime": "A String", # The time this operation actually started in UTC timezone in <a |
| 818 | # href="https://tools.ietf.org/html/rfc3339">RFC 3339</a> format, for example |
| 819 | # <code>2012-11-15T16:19:00.094Z</code>. |
| 820 | "insertTime": "A String", # The time this operation was enqueued in UTC timezone in <a |
| 821 | # href="https://tools.ietf.org/html/rfc3339">RFC 3339</a> format, for example |
| 822 | # <code>2012-11-15T16:19:00.094Z</code>. |
| 823 | "user": "A String", # The email address of the user who initiated this operation. |
| 824 | "targetProject": "A String", # The project ID of the target instance related to this operation. |
| 825 | "selfLink": "A String", # The URI of this resource. |
| 826 | "targetLink": "A String", |
| 827 | "operationType": "A String", # The type of the operation. Valid values are <code>CREATE</code>, |
| 828 | # <code>DELETE</code>, <code>UPDATE</code>, <code>RESTART</code>, |
| 829 | # <code>IMPORT</code>, <code>EXPORT</code>, <code>BACKUP_VOLUME</code>, |
| 830 | # <code>RESTORE_VOLUME</code>, <code>CREATE_USER</code>, |
| 831 | # <code>DELETE_USER</code>, <code>CREATE_DATABASE</code>, |
| 832 | # <code>DELETE_DATABASE</code> . |
| 833 | "error": { # Database instance operation errors list wrapper. # If errors occurred during processing of this operation, this field will be |
| 834 | # populated. |
| 835 | "errors": [ # The list of errors encountered while processing this operation. |
| 836 | { # Database instance operation error. |
| 837 | "kind": "A String", # This is always <code>sql#operationError</code>. |
| 838 | "code": "A String", # Identifies the specific error that occurred. |
| 839 | "message": "A String", # Additional information about the error encountered. |
Dan O'Meara | dd49464 | 2020-05-01 07:42:23 -0700 | [diff] [blame] | 840 | }, |
Bu Sun Kim | 6502091 | 2020-05-20 12:08:20 -0700 | [diff] [blame] | 841 | ], |
| 842 | "kind": "A String", # This is always <code>sql#operationErrors</code>. |
| 843 | }, |
| 844 | "kind": "A String", # This is always <code>sql#operation</code>. |
| 845 | "importContext": { # Database instance import context. # The context for import operation, if applicable. |
| 846 | "kind": "A String", # This is always <code>sql#importContext</code>. |
| 847 | "csvImportOptions": { # Options for importing data as CSV. |
| 848 | "table": "A String", # The table to which CSV data is imported. |
| 849 | "columns": [ # The columns to which CSV data is imported. If not specified, all columns |
| 850 | # of the database table are loaded with CSV data. |
| 851 | "A String", |
| 852 | ], |
Dan O'Meara | dd49464 | 2020-05-01 07:42:23 -0700 | [diff] [blame] | 853 | }, |
Bu Sun Kim | 6502091 | 2020-05-20 12:08:20 -0700 | [diff] [blame] | 854 | "database": "A String", # The target database for the import. If <code>fileType</code> is |
Dan O'Meara | dd49464 | 2020-05-01 07:42:23 -0700 | [diff] [blame] | 855 | # <code>SQL</code>, this field is required only if the import file does not |
| 856 | # specify a database, and is overridden by any database specification in the |
| 857 | # import file. If <code>fileType</code> is <code>CSV</code>, one database |
| 858 | # must be specified. |
Bu Sun Kim | 6502091 | 2020-05-20 12:08:20 -0700 | [diff] [blame] | 859 | "importUser": "A String", # The PostgreSQL user for this import operation. PostgreSQL instances only. |
| 860 | "bakImportOptions": { # Import parameters specific to SQL Server .BAK files |
| 861 | "encryptionOptions": { |
| 862 | "certPath": "A String", # Path to the Certificate (.cer) in Cloud Storage, in the form |
| 863 | # <code>gs://bucketName/fileName</code>. The instance must have |
| 864 | # write permissions to the bucket and read access to the file. |
| 865 | "pvkPath": "A String", # Path to the Certificate Private Key (.pvk) in Cloud Storage, in the |
| 866 | # form <code>gs://bucketName/fileName</code>. The instance must have |
| 867 | # write permissions to the bucket and read access to the file. |
| 868 | "pvkPassword": "A String", # Password that encrypts the private key |
| 869 | }, |
| 870 | }, |
| 871 | "uri": "A String", # Path to the import file in Cloud Storage, in the form |
Dan O'Meara | dd49464 | 2020-05-01 07:42:23 -0700 | [diff] [blame] | 872 | # <code>gs: |
| 873 | # //bucketName/fileName</code>. Compressed gzip files (.gz) are supported |
| 874 | # // when <code>fileType</code> is <code>SQL</code>. The instance must have |
| 875 | # // write permissions to the bucket and read access to the file. |
Bu Sun Kim | 6502091 | 2020-05-20 12:08:20 -0700 | [diff] [blame] | 876 | "fileType": "A String", # The file type for the specified uri. <br><code>SQL</code>: The file |
| 877 | # contains SQL statements. <br><code>CSV</code>: The file contains CSV data. |
Craig Citro | e633be1 | 2015-03-02 13:40:36 -0800 | [diff] [blame] | 878 | }, |
Bu Sun Kim | 6502091 | 2020-05-20 12:08:20 -0700 | [diff] [blame] | 879 | "status": "A String", # The status of an operation. Valid values are <code>PENDING</code>, |
| 880 | # <code>RUNNING</code>, <code>DONE</code>, |
| 881 | # <code>SQL_OPERATION_STATUS_UNSPECIFIED</code>. |
| 882 | "name": "A String", # An identifier that uniquely identifies the operation. You can use this |
Dan O'Meara | dd49464 | 2020-05-01 07:42:23 -0700 | [diff] [blame] | 883 | # identifier to retrieve the Operations resource that has information about |
| 884 | # the operation. |
Bu Sun Kim | 6502091 | 2020-05-20 12:08:20 -0700 | [diff] [blame] | 885 | "exportContext": { # Database instance export context. # The context for export operation, if applicable. |
| 886 | "databases": [ # Databases to be exported. <br /> <b>MySQL instances:</b> If |
Dan O'Meara | dd49464 | 2020-05-01 07:42:23 -0700 | [diff] [blame] | 887 | # <code>fileType</code> is <code>SQL</code> and no database is specified, all |
| 888 | # databases are exported, except for the <code>mysql</code> system database. |
| 889 | # If <code>fileType</code> is <code>CSV</code>, you can specify one database, |
| 890 | # either by using this property or by using the |
| 891 | # <code>csvExportOptions.selectQuery</code> property, which takes precedence |
| 892 | # over this property. <br /> <b>PostgreSQL instances:</b> You must specify |
| 893 | # one database to be exported. If <code>fileType</code> is <code>CSV</code>, |
| 894 | # this database must match the one specified in the |
| 895 | # <code>csvExportOptions.selectQuery</code> property. |
Bu Sun Kim | 6502091 | 2020-05-20 12:08:20 -0700 | [diff] [blame] | 896 | "A String", |
Craig Citro | e633be1 | 2015-03-02 13:40:36 -0800 | [diff] [blame] | 897 | ], |
Bu Sun Kim | 6502091 | 2020-05-20 12:08:20 -0700 | [diff] [blame] | 898 | "sqlExportOptions": { # Options for exporting data as SQL statements. |
| 899 | "tables": [ # Tables to export, or that were exported, from the specified database. If |
Dan O'Meara | dd49464 | 2020-05-01 07:42:23 -0700 | [diff] [blame] | 900 | # you specify tables, specify one and only one database. For PostgreSQL |
| 901 | # instances, you can specify only one table. |
Bu Sun Kim | 6502091 | 2020-05-20 12:08:20 -0700 | [diff] [blame] | 902 | "A String", |
Craig Citro | e633be1 | 2015-03-02 13:40:36 -0800 | [diff] [blame] | 903 | ], |
Bu Sun Kim | 6502091 | 2020-05-20 12:08:20 -0700 | [diff] [blame] | 904 | "schemaOnly": True or False, # Export only schemas. |
| 905 | "mysqlExportOptions": { # Options for exporting from MySQL. |
| 906 | "masterData": 42, # Option to include SQL statement required to set up replication. |
Dan O'Meara | dd49464 | 2020-05-01 07:42:23 -0700 | [diff] [blame] | 907 | # If set to <code>1</code>, the dump file includes |
| 908 | # a CHANGE MASTER TO statement with the binary log coordinates. |
| 909 | # If set to <code>2</code>, the CHANGE MASTER TO statement is written as |
| 910 | # a SQL comment, and has no effect. |
| 911 | # All other values are ignored. |
Bu Sun Kim | 715bd7f | 2019-06-14 16:50:42 -0700 | [diff] [blame] | 912 | }, |
Jon Wayne Parrott | 36e41bc | 2016-02-19 16:02:29 -0800 | [diff] [blame] | 913 | }, |
Bu Sun Kim | 6502091 | 2020-05-20 12:08:20 -0700 | [diff] [blame] | 914 | "fileType": "A String", # The file type for the specified uri. <br><code>SQL</code>: The file |
| 915 | # contains SQL statements. <br><code>CSV</code>: The file contains CSV data. |
| 916 | "uri": "A String", # The path to the file in Google Cloud Storage where the export will be |
| 917 | # stored. The URI is in the form <code>gs: |
| 918 | # //bucketName/fileName</code>. If the file already exists, the requests |
| 919 | # // succeeds, but the operation fails. If <code>fileType</code> is |
| 920 | # // <code>SQL</code> and the filename ends with .gz, the contents are |
| 921 | # // compressed. |
| 922 | "csvExportOptions": { # Options for exporting data as CSV. |
| 923 | "selectQuery": "A String", # The select query used to extract the data. |
| 924 | }, |
| 925 | "kind": "A String", # This is always <code>sql#exportContext</code>. |
Jon Wayne Parrott | 36e41bc | 2016-02-19 16:02:29 -0800 | [diff] [blame] | 926 | }, |
Bu Sun Kim | 6502091 | 2020-05-20 12:08:20 -0700 | [diff] [blame] | 927 | "targetId": "A String", # Name of the database instance related to this operation. |
Jon Wayne Parrott | 36e41bc | 2016-02-19 16:02:29 -0800 | [diff] [blame] | 928 | }</pre> |
| 929 | </div> |
| 930 | |
| 931 | <div class="method"> |
Dan O'Meara | dd49464 | 2020-05-01 07:42:23 -0700 | [diff] [blame] | 932 | <code class="details" id="failover">failover(project, instance, body=None, x__xgafv=None)</code> |
| 933 | <pre>Failover the instance to its failover replica instance. Using this |
| 934 | operation might cause your instance to restart. |
Jon Wayne Parrott | 36e41bc | 2016-02-19 16:02:29 -0800 | [diff] [blame] | 935 | |
| 936 | Args: |
| 937 | project: string, ID of the project that contains the read replica. (required) |
| 938 | 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] | 939 | body: object, The request body. |
Jon Wayne Parrott | 36e41bc | 2016-02-19 16:02:29 -0800 | [diff] [blame] | 940 | The object takes the form of: |
| 941 | |
| 942 | { # Instance failover request. |
Bu Sun Kim | 6502091 | 2020-05-20 12:08:20 -0700 | [diff] [blame] | 943 | "failoverContext": { # Database instance failover context. # Failover Context. |
| 944 | "settingsVersion": "A String", # The current settings version of this instance. Request will be rejected if |
| 945 | # this version doesn't match the current settings version. |
| 946 | "kind": "A String", # This is always <code>sql#failoverContext</code>. |
Jon Wayne Parrott | 36e41bc | 2016-02-19 16:02:29 -0800 | [diff] [blame] | 947 | }, |
| 948 | } |
| 949 | |
Dan O'Meara | dd49464 | 2020-05-01 07:42:23 -0700 | [diff] [blame] | 950 | x__xgafv: string, V1 error format. |
| 951 | Allowed values |
| 952 | 1 - v1 error format |
| 953 | 2 - v2 error format |
Jon Wayne Parrott | 36e41bc | 2016-02-19 16:02:29 -0800 | [diff] [blame] | 954 | |
| 955 | Returns: |
| 956 | An object of the form: |
| 957 | |
Dan O'Meara | dd49464 | 2020-05-01 07:42:23 -0700 | [diff] [blame] | 958 | { # An Operation resource.&nbsp;For successful operations that return an |
| 959 | # Operation resource, only the fields relevant to the operation are populated |
| 960 | # in the resource. |
Bu Sun Kim | 6502091 | 2020-05-20 12:08:20 -0700 | [diff] [blame] | 961 | "endTime": "A String", # The time this operation finished in UTC timezone in <a |
| 962 | # href="https://tools.ietf.org/html/rfc3339">RFC 3339</a> format, for example |
| 963 | # <code>2012-11-15T16:19:00.094Z</code>. |
| 964 | "startTime": "A String", # The time this operation actually started in UTC timezone in <a |
| 965 | # href="https://tools.ietf.org/html/rfc3339">RFC 3339</a> format, for example |
| 966 | # <code>2012-11-15T16:19:00.094Z</code>. |
| 967 | "insertTime": "A String", # The time this operation was enqueued in UTC timezone in <a |
| 968 | # href="https://tools.ietf.org/html/rfc3339">RFC 3339</a> format, for example |
| 969 | # <code>2012-11-15T16:19:00.094Z</code>. |
| 970 | "user": "A String", # The email address of the user who initiated this operation. |
| 971 | "targetProject": "A String", # The project ID of the target instance related to this operation. |
| 972 | "selfLink": "A String", # The URI of this resource. |
| 973 | "targetLink": "A String", |
| 974 | "operationType": "A String", # The type of the operation. Valid values are <code>CREATE</code>, |
| 975 | # <code>DELETE</code>, <code>UPDATE</code>, <code>RESTART</code>, |
| 976 | # <code>IMPORT</code>, <code>EXPORT</code>, <code>BACKUP_VOLUME</code>, |
| 977 | # <code>RESTORE_VOLUME</code>, <code>CREATE_USER</code>, |
| 978 | # <code>DELETE_USER</code>, <code>CREATE_DATABASE</code>, |
| 979 | # <code>DELETE_DATABASE</code> . |
| 980 | "error": { # Database instance operation errors list wrapper. # If errors occurred during processing of this operation, this field will be |
| 981 | # populated. |
| 982 | "errors": [ # The list of errors encountered while processing this operation. |
| 983 | { # Database instance operation error. |
| 984 | "kind": "A String", # This is always <code>sql#operationError</code>. |
| 985 | "code": "A String", # Identifies the specific error that occurred. |
| 986 | "message": "A String", # Additional information about the error encountered. |
Dan O'Meara | dd49464 | 2020-05-01 07:42:23 -0700 | [diff] [blame] | 987 | }, |
Bu Sun Kim | 6502091 | 2020-05-20 12:08:20 -0700 | [diff] [blame] | 988 | ], |
| 989 | "kind": "A String", # This is always <code>sql#operationErrors</code>. |
| 990 | }, |
| 991 | "kind": "A String", # This is always <code>sql#operation</code>. |
| 992 | "importContext": { # Database instance import context. # The context for import operation, if applicable. |
| 993 | "kind": "A String", # This is always <code>sql#importContext</code>. |
| 994 | "csvImportOptions": { # Options for importing data as CSV. |
| 995 | "table": "A String", # The table to which CSV data is imported. |
| 996 | "columns": [ # The columns to which CSV data is imported. If not specified, all columns |
| 997 | # of the database table are loaded with CSV data. |
| 998 | "A String", |
| 999 | ], |
Dan O'Meara | dd49464 | 2020-05-01 07:42:23 -0700 | [diff] [blame] | 1000 | }, |
Bu Sun Kim | 6502091 | 2020-05-20 12:08:20 -0700 | [diff] [blame] | 1001 | "database": "A String", # The target database for the import. If <code>fileType</code> is |
Dan O'Meara | dd49464 | 2020-05-01 07:42:23 -0700 | [diff] [blame] | 1002 | # <code>SQL</code>, this field is required only if the import file does not |
| 1003 | # specify a database, and is overridden by any database specification in the |
| 1004 | # import file. If <code>fileType</code> is <code>CSV</code>, one database |
| 1005 | # must be specified. |
Bu Sun Kim | 6502091 | 2020-05-20 12:08:20 -0700 | [diff] [blame] | 1006 | "importUser": "A String", # The PostgreSQL user for this import operation. PostgreSQL instances only. |
| 1007 | "bakImportOptions": { # Import parameters specific to SQL Server .BAK files |
| 1008 | "encryptionOptions": { |
| 1009 | "certPath": "A String", # Path to the Certificate (.cer) in Cloud Storage, in the form |
| 1010 | # <code>gs://bucketName/fileName</code>. The instance must have |
| 1011 | # write permissions to the bucket and read access to the file. |
| 1012 | "pvkPath": "A String", # Path to the Certificate Private Key (.pvk) in Cloud Storage, in the |
| 1013 | # form <code>gs://bucketName/fileName</code>. The instance must have |
| 1014 | # write permissions to the bucket and read access to the file. |
| 1015 | "pvkPassword": "A String", # Password that encrypts the private key |
| 1016 | }, |
| 1017 | }, |
| 1018 | "uri": "A String", # Path to the import file in Cloud Storage, in the form |
Dan O'Meara | dd49464 | 2020-05-01 07:42:23 -0700 | [diff] [blame] | 1019 | # <code>gs: |
| 1020 | # //bucketName/fileName</code>. Compressed gzip files (.gz) are supported |
| 1021 | # // when <code>fileType</code> is <code>SQL</code>. The instance must have |
| 1022 | # // write permissions to the bucket and read access to the file. |
Bu Sun Kim | 6502091 | 2020-05-20 12:08:20 -0700 | [diff] [blame] | 1023 | "fileType": "A String", # The file type for the specified uri. <br><code>SQL</code>: The file |
| 1024 | # contains SQL statements. <br><code>CSV</code>: The file contains CSV data. |
Jon Wayne Parrott | 36e41bc | 2016-02-19 16:02:29 -0800 | [diff] [blame] | 1025 | }, |
Bu Sun Kim | 6502091 | 2020-05-20 12:08:20 -0700 | [diff] [blame] | 1026 | "status": "A String", # The status of an operation. Valid values are <code>PENDING</code>, |
| 1027 | # <code>RUNNING</code>, <code>DONE</code>, |
| 1028 | # <code>SQL_OPERATION_STATUS_UNSPECIFIED</code>. |
| 1029 | "name": "A String", # An identifier that uniquely identifies the operation. You can use this |
Dan O'Meara | dd49464 | 2020-05-01 07:42:23 -0700 | [diff] [blame] | 1030 | # identifier to retrieve the Operations resource that has information about |
| 1031 | # the operation. |
Bu Sun Kim | 6502091 | 2020-05-20 12:08:20 -0700 | [diff] [blame] | 1032 | "exportContext": { # Database instance export context. # The context for export operation, if applicable. |
| 1033 | "databases": [ # Databases to be exported. <br /> <b>MySQL instances:</b> If |
Dan O'Meara | dd49464 | 2020-05-01 07:42:23 -0700 | [diff] [blame] | 1034 | # <code>fileType</code> is <code>SQL</code> and no database is specified, all |
| 1035 | # databases are exported, except for the <code>mysql</code> system database. |
| 1036 | # If <code>fileType</code> is <code>CSV</code>, you can specify one database, |
| 1037 | # either by using this property or by using the |
| 1038 | # <code>csvExportOptions.selectQuery</code> property, which takes precedence |
| 1039 | # over this property. <br /> <b>PostgreSQL instances:</b> You must specify |
| 1040 | # one database to be exported. If <code>fileType</code> is <code>CSV</code>, |
| 1041 | # this database must match the one specified in the |
| 1042 | # <code>csvExportOptions.selectQuery</code> property. |
Bu Sun Kim | 6502091 | 2020-05-20 12:08:20 -0700 | [diff] [blame] | 1043 | "A String", |
Jon Wayne Parrott | 36e41bc | 2016-02-19 16:02:29 -0800 | [diff] [blame] | 1044 | ], |
Bu Sun Kim | 6502091 | 2020-05-20 12:08:20 -0700 | [diff] [blame] | 1045 | "sqlExportOptions": { # Options for exporting data as SQL statements. |
| 1046 | "tables": [ # Tables to export, or that were exported, from the specified database. If |
Dan O'Meara | dd49464 | 2020-05-01 07:42:23 -0700 | [diff] [blame] | 1047 | # you specify tables, specify one and only one database. For PostgreSQL |
| 1048 | # instances, you can specify only one table. |
Bu Sun Kim | 6502091 | 2020-05-20 12:08:20 -0700 | [diff] [blame] | 1049 | "A String", |
Jon Wayne Parrott | 36e41bc | 2016-02-19 16:02:29 -0800 | [diff] [blame] | 1050 | ], |
Bu Sun Kim | 6502091 | 2020-05-20 12:08:20 -0700 | [diff] [blame] | 1051 | "schemaOnly": True or False, # Export only schemas. |
| 1052 | "mysqlExportOptions": { # Options for exporting from MySQL. |
| 1053 | "masterData": 42, # Option to include SQL statement required to set up replication. |
Dan O'Meara | dd49464 | 2020-05-01 07:42:23 -0700 | [diff] [blame] | 1054 | # If set to <code>1</code>, the dump file includes |
| 1055 | # a CHANGE MASTER TO statement with the binary log coordinates. |
| 1056 | # If set to <code>2</code>, the CHANGE MASTER TO statement is written as |
| 1057 | # a SQL comment, and has no effect. |
| 1058 | # All other values are ignored. |
Bu Sun Kim | 715bd7f | 2019-06-14 16:50:42 -0700 | [diff] [blame] | 1059 | }, |
Craig Citro | e633be1 | 2015-03-02 13:40:36 -0800 | [diff] [blame] | 1060 | }, |
Bu Sun Kim | 6502091 | 2020-05-20 12:08:20 -0700 | [diff] [blame] | 1061 | "fileType": "A String", # The file type for the specified uri. <br><code>SQL</code>: The file |
| 1062 | # contains SQL statements. <br><code>CSV</code>: The file contains CSV data. |
| 1063 | "uri": "A String", # The path to the file in Google Cloud Storage where the export will be |
| 1064 | # stored. The URI is in the form <code>gs: |
| 1065 | # //bucketName/fileName</code>. If the file already exists, the requests |
| 1066 | # // succeeds, but the operation fails. If <code>fileType</code> is |
| 1067 | # // <code>SQL</code> and the filename ends with .gz, the contents are |
| 1068 | # // compressed. |
| 1069 | "csvExportOptions": { # Options for exporting data as CSV. |
| 1070 | "selectQuery": "A String", # The select query used to extract the data. |
| 1071 | }, |
| 1072 | "kind": "A String", # This is always <code>sql#exportContext</code>. |
Craig Citro | e633be1 | 2015-03-02 13:40:36 -0800 | [diff] [blame] | 1073 | }, |
Bu Sun Kim | 6502091 | 2020-05-20 12:08:20 -0700 | [diff] [blame] | 1074 | "targetId": "A String", # Name of the database instance related to this operation. |
Craig Citro | e633be1 | 2015-03-02 13:40:36 -0800 | [diff] [blame] | 1075 | }</pre> |
| 1076 | </div> |
| 1077 | |
| 1078 | <div class="method"> |
Dan O'Meara | dd49464 | 2020-05-01 07:42:23 -0700 | [diff] [blame] | 1079 | <code class="details" id="get">get(project, instance, x__xgafv=None)</code> |
Craig Citro | e633be1 | 2015-03-02 13:40:36 -0800 | [diff] [blame] | 1080 | <pre>Retrieves a resource containing information about a Cloud SQL instance. |
| 1081 | |
| 1082 | Args: |
| 1083 | project: string, Project ID of the project that contains the instance. (required) |
| 1084 | 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] | 1085 | x__xgafv: string, V1 error format. |
| 1086 | Allowed values |
| 1087 | 1 - v1 error format |
| 1088 | 2 - v2 error format |
Craig Citro | e633be1 | 2015-03-02 13:40:36 -0800 | [diff] [blame] | 1089 | |
| 1090 | Returns: |
| 1091 | An object of the form: |
| 1092 | |
| 1093 | { # A Cloud SQL instance resource. |
Bu Sun Kim | 6502091 | 2020-05-20 12:08:20 -0700 | [diff] [blame] | 1094 | "suspensionReason": [ # If the instance state is SUSPENDED, the reason for the suspension. |
| 1095 | "A String", |
| 1096 | ], |
| 1097 | "settings": { # Database instance settings. # The user settings. |
| 1098 | "ipConfiguration": { # IP Management configuration. # The settings for IP Management. This allows to enable or disable the |
| 1099 | # instance IP and manage which external networks can connect to the instance. |
| 1100 | # The IPv4 address cannot be disabled for Second Generation instances. |
| 1101 | "requireSsl": True or False, # Whether SSL connections over IP should be enforced or not. |
| 1102 | "privateNetwork": "A String", # The resource link for the VPC network from which the Cloud SQL instance is |
| 1103 | # accessible for private IP. For example, |
| 1104 | # <code>/projects/myProject/global/networks/default</code>. This setting can |
| 1105 | # be updated, but it cannot be removed after it is set. |
| 1106 | "ipv4Enabled": True or False, # Whether the instance should be assigned an IP address or not. |
| 1107 | "authorizedNetworks": [ # The list of external networks that are allowed to connect to the instance |
| 1108 | # using the IP. In <a |
| 1109 | # href="http://en.wikipedia.org/wiki/CIDR_notation#CIDR_notation">CIDR |
| 1110 | # notation</a>, also known as 'slash' notation (e.g. |
| 1111 | # <code>192.168.100.0/24</code>). |
| 1112 | { # An entry for an Access Control list. |
| 1113 | "name": "A String", # Optional. A label to identify this entry. |
| 1114 | "kind": "A String", # This is always <code>sql#aclEntry</code>. |
| 1115 | "value": "A String", # The whitelisted value for the access control list. |
| 1116 | "expirationTime": "A String", # The time when this access control entry expires in <a |
| 1117 | # href="https://tools.ietf.org/html/rfc3339">RFC 3339</a> format, for example |
| 1118 | # <code>2012-11-15T16:19:00.094Z</code>. |
| 1119 | }, |
| 1120 | ], |
Jon Wayne Parrott | 0a471d3 | 2016-05-19 10:54:38 -0700 | [diff] [blame] | 1121 | }, |
Bu Sun Kim | 6502091 | 2020-05-20 12:08:20 -0700 | [diff] [blame] | 1122 | "availabilityType": "A String", # Availability type (PostgreSQL and MySQL instances only). Potential values: |
Dan O'Meara | dd49464 | 2020-05-01 07:42:23 -0700 | [diff] [blame] | 1123 | # <br><code>ZONAL</code>: The instance serves data from only one zone. |
| 1124 | # Outages in that zone affect data accessibility. <br><code>REGIONAL</code>: |
| 1125 | # The instance can serve data from more than one zone in a region (it is |
| 1126 | # highly available). <br>For more information, see <a |
Bu Sun Kim | 6502091 | 2020-05-20 12:08:20 -0700 | [diff] [blame] | 1127 | # href="https://cloud.google.com/sql/docs/postgres/high-availability">Overview |
Dan O'Meara | dd49464 | 2020-05-01 07:42:23 -0700 | [diff] [blame] | 1128 | # of the High Availability Configuration</a>. |
Bu Sun Kim | 6502091 | 2020-05-20 12:08:20 -0700 | [diff] [blame] | 1129 | "settingsVersion": "A String", # The version of instance settings. This is a required field for update |
| 1130 | # method to make sure concurrent updates are handled properly. During update, |
| 1131 | # use the most recent settingsVersion value for this instance and do not try |
| 1132 | # to update this value. |
| 1133 | "databaseFlags": [ # The database flags passed to the instance at startup. |
| 1134 | { # Database flags for Cloud SQL instances. |
| 1135 | "name": "A String", # The name of the flag. These flags are passed at instance startup, so |
| 1136 | # include both server options and system variables for MySQL. Flags should be |
| 1137 | # specified with underscores, not hyphens. For more information, see <a |
| 1138 | # href="/sql/docs/mysql/flags">Configuring Database Flags</a> in the Cloud |
| 1139 | # SQL documentation. |
| 1140 | "value": "A String", # The value of the flag. Booleans should be set to <code>on</code> for true |
| 1141 | # and <code>off</code> for false. This field must be omitted if the flag |
| 1142 | # doesn't take a value. |
| 1143 | }, |
Dan O'Meara | dd49464 | 2020-05-01 07:42:23 -0700 | [diff] [blame] | 1144 | ], |
Bu Sun Kim | 6502091 | 2020-05-20 12:08:20 -0700 | [diff] [blame] | 1145 | "maintenanceWindow": { # Maintenance window. This specifies when a v2 Cloud SQL instance should # The maintenance window for this instance. This specifies when the instance |
| 1146 | # can be restarted for maintenance purposes. Not used for First Generation |
| 1147 | # instances. |
| 1148 | # preferably be restarted for system maintenance purposes. |
| 1149 | "hour": 42, # hour of day - 0 to 23. |
| 1150 | "day": 42, # day of week (1-7), starting on Monday. |
| 1151 | "kind": "A String", # This is always <code>sql#maintenanceWindow</code>. |
| 1152 | "updateTrack": "A String", # Maintenance timing setting: <code>canary</code> (Earlier) or |
| 1153 | # <code>stable</code> (Later). <br /><a |
| 1154 | # href="/sql/docs/db_path/instance-settings#maintenance-timing-2ndgen"> |
| 1155 | # Learn more</a>. |
| 1156 | }, |
| 1157 | "pricingPlan": "A String", # The pricing plan for this instance. This can be either <code>PER_USE</code> |
| 1158 | # or <code>PACKAGE</code>. Only <code>PER_USE</code> is supported for Second |
| 1159 | # Generation instances. |
| 1160 | "storageAutoResize": True or False, # Configuration to increase storage size automatically. The default value is |
| 1161 | # true. Not used for First Generation instances. |
| 1162 | "storageAutoResizeLimit": "A String", # The maximum size to which storage capacity can be automatically increased. |
| 1163 | # The default value is 0, which specifies that there is no limit. Not used |
| 1164 | # for First Generation instances. |
| 1165 | "authorizedGaeApplications": [ # The App Engine app IDs that can access this instance. First Generation |
| 1166 | # instances only. |
| 1167 | "A String", |
| 1168 | ], |
| 1169 | "tier": "A String", # The tier (or machine type) for this instance, for example |
| 1170 | # <code>db-n1-standard-1</code> (MySQL instances) or |
| 1171 | # <code>db-custom-1-3840</code> (PostgreSQL instances). For MySQL instances, |
| 1172 | # this property determines whether the instance is First or Second |
| 1173 | # Generation. For more information, see <a |
| 1174 | # href="/sql/docs/db_path/instance-settings">Instance Settings</a>. |
| 1175 | "dataDiskSizeGb": "A String", # The size of data disk, in GB. The data disk size minimum is 10GB. Not used |
| 1176 | # for First Generation instances. |
| 1177 | "dataDiskType": "A String", # The type of data disk: <code>PD_SSD</code> (default) or |
| 1178 | # <code>PD_HDD</code>. Not used for First Generation instances. |
| 1179 | "databaseReplicationEnabled": True or False, # Configuration specific to read replica instances. Indicates whether |
| 1180 | # replication is enabled or not. |
| 1181 | "crashSafeReplicationEnabled": True or False, # Configuration specific to read replica instances. Indicates whether |
| 1182 | # database flags for crash-safe replication are enabled. This property is |
| 1183 | # only applicable to First Generation instances. |
| 1184 | "backupConfiguration": { # Database instance backup configuration. # The daily backup configuration for the instance. |
| 1185 | "binaryLogEnabled": True or False, # (MySQL only) Whether binary log is enabled. If backup configuration is |
| 1186 | # disabled, binarylog must be disabled as well. |
| 1187 | "replicationLogArchivingEnabled": True or False, # Reserved for future use. |
| 1188 | "location": "A String", # Location of the backup |
| 1189 | "pointInTimeRecoveryEnabled": True or False, # Reserved for future use. |
| 1190 | "startTime": "A String", # Start time for the daily backup configuration in UTC timezone in the 24 |
| 1191 | # hour format - <code>HH:MM</code>. |
| 1192 | "kind": "A String", # This is always <code>sql#backupConfiguration</code>. |
| 1193 | "enabled": True or False, # Whether this configuration is enabled. |
| 1194 | }, |
| 1195 | "userLabels": { # User-provided labels, represented as a dictionary where each label is a |
| 1196 | # single key value pair. |
| 1197 | "a_key": "A String", |
| 1198 | }, |
| 1199 | "locationPreference": { # Preferred location. This specifies where a Cloud SQL instance should # The location preference settings. This allows the instance to be located as |
| 1200 | # near as possible to either an App Engine app or Compute Engine zone for |
| 1201 | # better performance. App Engine co-location is only applicable to First |
| 1202 | # Generation instances. |
| 1203 | # preferably be located, either in a specific Compute Engine zone, or |
| 1204 | # co-located with an App Engine application. Note that if the preferred |
| 1205 | # location is not available, the instance will be located as close as possible |
| 1206 | # within the region. Only one location may be specified. |
| 1207 | "zone": "A String", # The preferred Compute Engine zone (e.g. us-central1-a, us-central1-b, |
| 1208 | # etc.). |
| 1209 | "followGaeApplication": "A String", # The AppEngine application to follow, it must be in the same region as the |
| 1210 | # Cloud SQL instance. |
| 1211 | "kind": "A String", # This is always <code>sql#locationPreference</code>. |
| 1212 | }, |
| 1213 | "kind": "A String", # This is always <code>sql#settings</code>. |
| 1214 | "replicationType": "A String", # The type of replication this instance uses. This can be either |
| 1215 | # <code>ASYNCHRONOUS</code> or <code>SYNCHRONOUS</code>. This property is |
| 1216 | # only applicable to First Generation instances. |
| 1217 | "activationPolicy": "A String", # The activation policy specifies when the instance is activated; it is |
Dan O'Meara | dd49464 | 2020-05-01 07:42:23 -0700 | [diff] [blame] | 1218 | # applicable only when the instance state is <code>RUNNABLE</code>. Valid |
| 1219 | # values: <br><code>ALWAYS</code>: The instance is on, and remains so even in |
| 1220 | # the absence of connection requests. <br><code>NEVER</code>: The instance is |
| 1221 | # off; it is not activated, even if a connection request arrives. |
| 1222 | # <br><code>ON_DEMAND</code>: First Generation instances only. The instance |
| 1223 | # responds to incoming requests, and turns itself off when not in use. |
| 1224 | # Instances with <code>PER_USE</code> pricing turn off after 15 minutes of |
| 1225 | # inactivity. Instances with <code>PER_PACKAGE</code> pricing turn off after |
| 1226 | # 12 hours of inactivity. |
Jon Wayne Parrott | 0a471d3 | 2016-05-19 10:54:38 -0700 | [diff] [blame] | 1227 | }, |
Bu Sun Kim | 6502091 | 2020-05-20 12:08:20 -0700 | [diff] [blame] | 1228 | "replicaNames": [ # The replicas of the instance. |
| 1229 | "A String", |
| 1230 | ], |
| 1231 | "diskEncryptionConfiguration": { # Disk encryption configuration for an instance. # Disk encryption configuration specific to an instance. |
| 1232 | # Applies only to Second Generation instances. |
| 1233 | "kind": "A String", # This is always <code>sql#diskEncryptionConfiguration</code>. |
| 1234 | "kmsKeyName": "A String", # Resource name of KMS key for disk encryption |
| 1235 | }, |
| 1236 | "scheduledMaintenance": { # Any scheduled maintenancce for this instance. # The start time of any upcoming scheduled maintenance for this instance. |
| 1237 | "canDefer": True or False, |
| 1238 | "startTime": "A String", # The start time of any upcoming scheduled maintenance for this instance. |
| 1239 | "canReschedule": True or False, # If the scheduled maintenance can be rescheduled. |
| 1240 | }, |
| 1241 | "rootPassword": "A String", # Initial root password. Use only on creation. |
| 1242 | "etag": "A String", # This field is deprecated and will be removed from a future version of the |
| 1243 | # API. Use the <code>settings.settingsVersion</code> field instead. |
| 1244 | "serverCaCert": { # SslCerts Resource # SSL configuration. |
| 1245 | "sha1Fingerprint": "A String", # Sha1 Fingerprint. |
| 1246 | "certSerialNumber": "A String", # Serial number, as extracted from the certificate. |
| 1247 | "cert": "A String", # PEM representation. |
| 1248 | "kind": "A String", # This is always <code>sql#sslCert</code>. |
| 1249 | "commonName": "A String", # User supplied name. Constrained to [a-zA-Z.-_ ]+. |
| 1250 | "createTime": "A String", # The time when the certificate was created in <a |
| 1251 | # href="https://tools.ietf.org/html/rfc3339">RFC 3339</a> format, for example |
| 1252 | # <code>2012-11-15T16:19:00.094Z</code> |
| 1253 | "instance": "A String", # Name of the database instance. |
| 1254 | "selfLink": "A String", # The URI of this resource. |
| 1255 | "expirationTime": "A String", # The time when the certificate expires in <a |
| 1256 | # href="https://tools.ietf.org/html/rfc3339">RFC 3339</a> format, for example |
| 1257 | # <code>2012-11-15T16:19:00.094Z</code>. |
| 1258 | }, |
| 1259 | "maxDiskSize": "A String", # The maximum disk size of the instance in bytes. |
| 1260 | "name": "A String", # Name of the Cloud SQL instance. This does not include the project ID. |
| 1261 | "masterInstanceName": "A String", # The name of the instance which will act as master in the replication setup. |
| 1262 | "instanceType": "A String", # The instance type. This can be one of the following. |
| 1263 | # <br><code>CLOUD_SQL_INSTANCE</code>: A Cloud SQL instance that is not |
| 1264 | # replicating from a master. <br><code>ON_PREMISES_INSTANCE</code>: An |
| 1265 | # instance running on the |
| 1266 | # customer's premises. <br><code>READ_REPLICA_INSTANCE</code>: A Cloud SQL |
| 1267 | # instance configured as a read-replica. |
| 1268 | "gceZone": "A String", # The Compute Engine zone that the instance is currently serving from. This |
| 1269 | # value could be different from the zone that was specified when the instance |
| 1270 | # was created if the instance has failed over to its secondary zone. |
| 1271 | "currentDiskSize": "A String", # The current disk usage of the instance in bytes. This property has been |
| 1272 | # deprecated. Users should use the |
| 1273 | # "cloudsql.googleapis.com/database/disk/bytes_used" metric in Cloud |
| 1274 | # Monitoring API instead. Please see <a |
| 1275 | # href="https://groups.google.com/d/msg/google-cloud-sql-announce/I_7-F9EBhT0/BtvFtdFeAgAJ">this |
| 1276 | # announcement</a> for details. |
| 1277 | "replicaConfiguration": { # Read-replica configuration for connecting to the master. # Configuration specific to failover replicas and read replicas. |
| 1278 | "failoverTarget": True or False, # Specifies if the replica is the failover target. If the field is set to |
Dan O'Meara | dd49464 | 2020-05-01 07:42:23 -0700 | [diff] [blame] | 1279 | # <code>true</code> the replica will be designated as a failover replica. In |
| 1280 | # case the master instance fails, the replica instance will be promoted as |
| 1281 | # the new master instance. <p>Only one replica can be specified as failover |
| 1282 | # target, and the replica has to be in different zone with the master |
| 1283 | # instance. |
Bu Sun Kim | 6502091 | 2020-05-20 12:08:20 -0700 | [diff] [blame] | 1284 | "kind": "A String", # This is always <code>sql#replicaConfiguration</code>. |
| 1285 | "mysqlReplicaConfiguration": { # Read-replica configuration specific to MySQL databases. # MySQL specific configuration when replicating from a MySQL on-premises |
Dan O'Meara | dd49464 | 2020-05-01 07:42:23 -0700 | [diff] [blame] | 1286 | # master. Replication configuration information such as the username, |
| 1287 | # password, certificates, and keys are not stored in the instance metadata. |
| 1288 | # The configuration information is used only to set up the replication |
| 1289 | # connection and is stored by MySQL in a file named <code>master.info</code> |
| 1290 | # in the data directory. |
Bu Sun Kim | 6502091 | 2020-05-20 12:08:20 -0700 | [diff] [blame] | 1291 | "clientKey": "A String", # PEM representation of the slave's private key. The corresponsing public key |
| 1292 | # is encoded in the client's certificate. |
| 1293 | "sslCipher": "A String", # A list of permissible ciphers to use for SSL encryption. |
| 1294 | "masterHeartbeatPeriod": "A String", # Interval in milliseconds between replication heartbeats. |
| 1295 | "connectRetryInterval": 42, # Seconds to wait between connect retries. MySQL's default is 60 seconds. |
| 1296 | "dumpFilePath": "A String", # Path to a SQL dump file in Google Cloud Storage from which the slave |
Dan O'Meara | dd49464 | 2020-05-01 07:42:23 -0700 | [diff] [blame] | 1297 | # instance is to be created. The URI is in the form gs: |
| 1298 | # //bucketName/fileName. Compressed gzip files (.gz) are also supported. |
| 1299 | # // Dumps should have the binlog co-ordinates from which replication should |
| 1300 | # // begin. This can be accomplished by setting --master-data to 1 when using |
| 1301 | # // mysqldump. |
Bu Sun Kim | 6502091 | 2020-05-20 12:08:20 -0700 | [diff] [blame] | 1302 | "clientCertificate": "A String", # PEM representation of the slave's x509 certificate. |
| 1303 | "username": "A String", # The username for the replication connection. |
| 1304 | "caCertificate": "A String", # PEM representation of the trusted CA's x509 certificate. |
| 1305 | "kind": "A String", # This is always <code>sql#mysqlReplicaConfiguration</code>. |
| 1306 | "password": "A String", # The password for the replication connection. |
| 1307 | "verifyServerCertificate": True or False, # Whether or not to check the master's Common Name value in the certificate |
| 1308 | # that it sends during the SSL handshake. |
Nathaniel Manista | 4f877e5 | 2015-06-15 16:44:50 +0000 | [diff] [blame] | 1309 | }, |
| 1310 | }, |
Bu Sun Kim | 6502091 | 2020-05-20 12:08:20 -0700 | [diff] [blame] | 1311 | "connectionName": "A String", # Connection name of the Cloud SQL instance used in connection strings. |
| 1312 | "failoverReplica": { # The name and status of the failover replica. This property is applicable |
| 1313 | # only to Second Generation instances. |
| 1314 | "available": True or False, # The availability status of the failover replica. A false status indicates |
| 1315 | # that the failover replica is out of sync. The master can only failover to |
| 1316 | # the failover replica when the status is true. |
| 1317 | "name": "A String", # The name of the failover replica. If specified at instance creation, a |
| 1318 | # failover replica is created for the instance. The name |
| 1319 | # doesn't include the project ID. This property is applicable only to |
| 1320 | # Second Generation instances. |
| 1321 | }, |
| 1322 | "ipAddresses": [ # The assigned IP addresses for the instance. |
| 1323 | { # Database instance IP Mapping. |
| 1324 | "timeToRetire": "A String", # The due time for this IP to be retired in <a |
| 1325 | # href="https://tools.ietf.org/html/rfc3339">RFC 3339</a> format, for example |
| 1326 | # <code>2012-11-15T16:19:00.094Z</code>. This field is only available when |
| 1327 | # the IP is scheduled to be retired. |
| 1328 | "type": "A String", # The type of this IP address. A <code>PRIMARY</code> address is a public |
| 1329 | # address that can accept incoming connections. A <code>PRIVATE</code> |
| 1330 | # address is a private address that can accept incoming connections. An |
| 1331 | # <code>OUTGOING</code> address is the source address of connections |
| 1332 | # originating from the instance, if supported. |
| 1333 | "ipAddress": "A String", # The IP address assigned. |
| 1334 | }, |
| 1335 | ], |
| 1336 | "ipv6Address": "A String", # The IPv6 address assigned to the instance. This property is applicable only |
| 1337 | # to First Generation instances. |
| 1338 | "selfLink": "A String", # The URI of this resource. |
| 1339 | "diskEncryptionStatus": { # Disk encryption status for an instance. # Disk encryption status specific to an instance. |
| 1340 | # Applies only to Second Generation instances. |
| 1341 | "kmsKeyVersionName": "A String", # KMS key version used to encrypt the Cloud SQL instance resource |
| 1342 | "kind": "A String", # This is always <code>sql#diskEncryptionStatus</code>. |
| 1343 | }, |
| 1344 | "kind": "A String", # This is always <code>sql#instance</code>. |
| 1345 | "region": "A String", # The geographical region. Can be <code>us-central</code> |
| 1346 | # (<code>FIRST_GEN</code> instances only), <code>us-central1</code> |
| 1347 | # (<code>SECOND_GEN</code> instances only), <code>asia-east1</code> or |
| 1348 | # <code>europe-west1</code>. Defaults to <code>us-central</code> or |
| 1349 | # <code>us-central1</code> depending on the instance type (First Generation |
| 1350 | # or Second Generation). The region can not be changed after instance |
| 1351 | # creation. |
| 1352 | "state": "A String", # The current serving state of the Cloud SQL instance. This can be one of the |
| 1353 | # following. <br><code>RUNNABLE</code>: The instance is running, or is ready |
| 1354 | # to run when accessed. <br><code>SUSPENDED</code>: The instance is not |
| 1355 | # available, for example due to problems with billing. |
| 1356 | # <br><code>PENDING_CREATE</code>: The instance is being created. |
| 1357 | # <br><code>MAINTENANCE</code>: The instance is down for maintenance. |
| 1358 | # <br><code>FAILED</code>: The instance creation failed. |
| 1359 | # <br><code>UNKNOWN_STATE</code>: The state of the instance is unknown. |
| 1360 | "backendType": "A String", # <code>FIRST_GEN</code>: First Generation instance. MySQL only. <br |
| 1361 | # /><code>SECOND_GEN</code>: Second Generation instance or PostgreSQL |
| 1362 | # instance. <br /><code>EXTERNAL</code>: A database server that is not |
| 1363 | # managed by Google. <br>This property is read-only; use the |
| 1364 | # <code>tier</code> property in the <code>settings</code> object to determine |
| 1365 | # the database type and Second or First Generation. |
| 1366 | "onPremisesConfiguration": { # On-premises instance configuration. # Configuration specific to on-premises instances. |
| 1367 | "clientKey": "A String", # PEM representation of the slave's private key. The corresponsing public key |
| 1368 | # is encoded in the client's certificate. |
| 1369 | "dumpFilePath": "A String", # The dump file to create the Cloud SQL replica. |
| 1370 | "hostPort": "A String", # The host and port of the on-premises instance in host:port format |
| 1371 | "clientCertificate": "A String", # PEM representation of the slave's x509 certificate. |
| 1372 | "username": "A String", # The username for connecting to on-premises instance. |
| 1373 | "caCertificate": "A String", # PEM representation of the trusted CA's x509 certificate. |
| 1374 | "kind": "A String", # This is always <code>sql#onPremisesConfiguration</code>. |
| 1375 | "password": "A String", # The password for connecting to on-premises instance. |
| 1376 | }, |
| 1377 | "project": "A String", # The project ID of the project containing the Cloud SQL instance. The Google |
| 1378 | # apps domain is prefixed if applicable. |
| 1379 | "serviceAccountEmailAddress": "A String", # The service account email address assigned to the instance. This property |
| 1380 | # is applicable only to Second Generation instances. |
| 1381 | "databaseVersion": "A String", # The database engine type and version. The <code>databaseVersion</code> |
| 1382 | # field can not be changed after instance creation. MySQL Second Generation |
| 1383 | # instances: <code>MYSQL_5_7</code> (default) or <code>MYSQL_5_6</code>. |
| 1384 | # PostgreSQL instances: <code>POSTGRES_9_6</code> (default) or |
| 1385 | # <code>POSTGRES_11 Beta</code> MySQL First Generation |
| 1386 | # instances: <code>MYSQL_5_6</code> (default) or <code>MYSQL_5_5</code> |
Craig Citro | e633be1 | 2015-03-02 13:40:36 -0800 | [diff] [blame] | 1387 | }</pre> |
| 1388 | </div> |
| 1389 | |
| 1390 | <div class="method"> |
Dan O'Meara | dd49464 | 2020-05-01 07:42:23 -0700 | [diff] [blame] | 1391 | <code class="details" id="import_">import_(project, instance, body=None, x__xgafv=None)</code> |
| 1392 | <pre>Imports data into a Cloud SQL instance from a SQL dump or CSV file in |
| 1393 | Cloud Storage. |
Craig Citro | e633be1 | 2015-03-02 13:40:36 -0800 | [diff] [blame] | 1394 | |
| 1395 | Args: |
| 1396 | project: string, Project ID of the project that contains the instance. (required) |
| 1397 | 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] | 1398 | body: object, The request body. |
Craig Citro | e633be1 | 2015-03-02 13:40:36 -0800 | [diff] [blame] | 1399 | The object takes the form of: |
| 1400 | |
| 1401 | { # Database instance import request. |
Bu Sun Kim | 6502091 | 2020-05-20 12:08:20 -0700 | [diff] [blame] | 1402 | "importContext": { # Database instance import context. # Contains details about the import operation. |
| 1403 | "kind": "A String", # This is always <code>sql#importContext</code>. |
| 1404 | "csvImportOptions": { # Options for importing data as CSV. |
| 1405 | "table": "A String", # The table to which CSV data is imported. |
| 1406 | "columns": [ # The columns to which CSV data is imported. If not specified, all columns |
| 1407 | # of the database table are loaded with CSV data. |
| 1408 | "A String", |
| 1409 | ], |
Dan O'Meara | dd49464 | 2020-05-01 07:42:23 -0700 | [diff] [blame] | 1410 | }, |
Bu Sun Kim | 6502091 | 2020-05-20 12:08:20 -0700 | [diff] [blame] | 1411 | "database": "A String", # The target database for the import. If <code>fileType</code> is |
Dan O'Meara | dd49464 | 2020-05-01 07:42:23 -0700 | [diff] [blame] | 1412 | # <code>SQL</code>, this field is required only if the import file does not |
| 1413 | # specify a database, and is overridden by any database specification in the |
| 1414 | # import file. If <code>fileType</code> is <code>CSV</code>, one database |
| 1415 | # must be specified. |
Bu Sun Kim | 6502091 | 2020-05-20 12:08:20 -0700 | [diff] [blame] | 1416 | "importUser": "A String", # The PostgreSQL user for this import operation. PostgreSQL instances only. |
| 1417 | "bakImportOptions": { # Import parameters specific to SQL Server .BAK files |
| 1418 | "encryptionOptions": { |
| 1419 | "certPath": "A String", # Path to the Certificate (.cer) in Cloud Storage, in the form |
| 1420 | # <code>gs://bucketName/fileName</code>. The instance must have |
| 1421 | # write permissions to the bucket and read access to the file. |
| 1422 | "pvkPath": "A String", # Path to the Certificate Private Key (.pvk) in Cloud Storage, in the |
| 1423 | # form <code>gs://bucketName/fileName</code>. The instance must have |
| 1424 | # write permissions to the bucket and read access to the file. |
| 1425 | "pvkPassword": "A String", # Password that encrypts the private key |
| 1426 | }, |
| 1427 | }, |
| 1428 | "uri": "A String", # Path to the import file in Cloud Storage, in the form |
Dan O'Meara | dd49464 | 2020-05-01 07:42:23 -0700 | [diff] [blame] | 1429 | # <code>gs: |
| 1430 | # //bucketName/fileName</code>. Compressed gzip files (.gz) are supported |
| 1431 | # // when <code>fileType</code> is <code>SQL</code>. The instance must have |
| 1432 | # // write permissions to the bucket and read access to the file. |
Bu Sun Kim | 6502091 | 2020-05-20 12:08:20 -0700 | [diff] [blame] | 1433 | "fileType": "A String", # The file type for the specified uri. <br><code>SQL</code>: The file |
| 1434 | # contains SQL statements. <br><code>CSV</code>: The file contains CSV data. |
Craig Citro | e633be1 | 2015-03-02 13:40:36 -0800 | [diff] [blame] | 1435 | }, |
| 1436 | } |
| 1437 | |
Dan O'Meara | dd49464 | 2020-05-01 07:42:23 -0700 | [diff] [blame] | 1438 | x__xgafv: string, V1 error format. |
| 1439 | Allowed values |
| 1440 | 1 - v1 error format |
| 1441 | 2 - v2 error format |
Craig Citro | e633be1 | 2015-03-02 13:40:36 -0800 | [diff] [blame] | 1442 | |
| 1443 | Returns: |
| 1444 | An object of the form: |
| 1445 | |
Dan O'Meara | dd49464 | 2020-05-01 07:42:23 -0700 | [diff] [blame] | 1446 | { # An Operation resource.&nbsp;For successful operations that return an |
| 1447 | # Operation resource, only the fields relevant to the operation are populated |
| 1448 | # in the resource. |
Bu Sun Kim | 6502091 | 2020-05-20 12:08:20 -0700 | [diff] [blame] | 1449 | "endTime": "A String", # The time this operation finished in UTC timezone in <a |
| 1450 | # href="https://tools.ietf.org/html/rfc3339">RFC 3339</a> format, for example |
| 1451 | # <code>2012-11-15T16:19:00.094Z</code>. |
| 1452 | "startTime": "A String", # The time this operation actually started in UTC timezone in <a |
| 1453 | # href="https://tools.ietf.org/html/rfc3339">RFC 3339</a> format, for example |
| 1454 | # <code>2012-11-15T16:19:00.094Z</code>. |
| 1455 | "insertTime": "A String", # The time this operation was enqueued in UTC timezone in <a |
| 1456 | # href="https://tools.ietf.org/html/rfc3339">RFC 3339</a> format, for example |
| 1457 | # <code>2012-11-15T16:19:00.094Z</code>. |
| 1458 | "user": "A String", # The email address of the user who initiated this operation. |
| 1459 | "targetProject": "A String", # The project ID of the target instance related to this operation. |
| 1460 | "selfLink": "A String", # The URI of this resource. |
| 1461 | "targetLink": "A String", |
| 1462 | "operationType": "A String", # The type of the operation. Valid values are <code>CREATE</code>, |
| 1463 | # <code>DELETE</code>, <code>UPDATE</code>, <code>RESTART</code>, |
| 1464 | # <code>IMPORT</code>, <code>EXPORT</code>, <code>BACKUP_VOLUME</code>, |
| 1465 | # <code>RESTORE_VOLUME</code>, <code>CREATE_USER</code>, |
| 1466 | # <code>DELETE_USER</code>, <code>CREATE_DATABASE</code>, |
| 1467 | # <code>DELETE_DATABASE</code> . |
| 1468 | "error": { # Database instance operation errors list wrapper. # If errors occurred during processing of this operation, this field will be |
| 1469 | # populated. |
| 1470 | "errors": [ # The list of errors encountered while processing this operation. |
| 1471 | { # Database instance operation error. |
| 1472 | "kind": "A String", # This is always <code>sql#operationError</code>. |
| 1473 | "code": "A String", # Identifies the specific error that occurred. |
| 1474 | "message": "A String", # Additional information about the error encountered. |
Dan O'Meara | dd49464 | 2020-05-01 07:42:23 -0700 | [diff] [blame] | 1475 | }, |
Bu Sun Kim | 6502091 | 2020-05-20 12:08:20 -0700 | [diff] [blame] | 1476 | ], |
| 1477 | "kind": "A String", # This is always <code>sql#operationErrors</code>. |
| 1478 | }, |
| 1479 | "kind": "A String", # This is always <code>sql#operation</code>. |
| 1480 | "importContext": { # Database instance import context. # The context for import operation, if applicable. |
| 1481 | "kind": "A String", # This is always <code>sql#importContext</code>. |
| 1482 | "csvImportOptions": { # Options for importing data as CSV. |
| 1483 | "table": "A String", # The table to which CSV data is imported. |
| 1484 | "columns": [ # The columns to which CSV data is imported. If not specified, all columns |
| 1485 | # of the database table are loaded with CSV data. |
| 1486 | "A String", |
| 1487 | ], |
Dan O'Meara | dd49464 | 2020-05-01 07:42:23 -0700 | [diff] [blame] | 1488 | }, |
Bu Sun Kim | 6502091 | 2020-05-20 12:08:20 -0700 | [diff] [blame] | 1489 | "database": "A String", # The target database for the import. If <code>fileType</code> is |
Dan O'Meara | dd49464 | 2020-05-01 07:42:23 -0700 | [diff] [blame] | 1490 | # <code>SQL</code>, this field is required only if the import file does not |
| 1491 | # specify a database, and is overridden by any database specification in the |
| 1492 | # import file. If <code>fileType</code> is <code>CSV</code>, one database |
| 1493 | # must be specified. |
Bu Sun Kim | 6502091 | 2020-05-20 12:08:20 -0700 | [diff] [blame] | 1494 | "importUser": "A String", # The PostgreSQL user for this import operation. PostgreSQL instances only. |
| 1495 | "bakImportOptions": { # Import parameters specific to SQL Server .BAK files |
| 1496 | "encryptionOptions": { |
| 1497 | "certPath": "A String", # Path to the Certificate (.cer) in Cloud Storage, in the form |
| 1498 | # <code>gs://bucketName/fileName</code>. The instance must have |
| 1499 | # write permissions to the bucket and read access to the file. |
| 1500 | "pvkPath": "A String", # Path to the Certificate Private Key (.pvk) in Cloud Storage, in the |
| 1501 | # form <code>gs://bucketName/fileName</code>. The instance must have |
| 1502 | # write permissions to the bucket and read access to the file. |
| 1503 | "pvkPassword": "A String", # Password that encrypts the private key |
| 1504 | }, |
| 1505 | }, |
| 1506 | "uri": "A String", # Path to the import file in Cloud Storage, in the form |
Dan O'Meara | dd49464 | 2020-05-01 07:42:23 -0700 | [diff] [blame] | 1507 | # <code>gs: |
| 1508 | # //bucketName/fileName</code>. Compressed gzip files (.gz) are supported |
| 1509 | # // when <code>fileType</code> is <code>SQL</code>. The instance must have |
| 1510 | # // write permissions to the bucket and read access to the file. |
Bu Sun Kim | 6502091 | 2020-05-20 12:08:20 -0700 | [diff] [blame] | 1511 | "fileType": "A String", # The file type for the specified uri. <br><code>SQL</code>: The file |
| 1512 | # contains SQL statements. <br><code>CSV</code>: The file contains CSV data. |
Craig Citro | e633be1 | 2015-03-02 13:40:36 -0800 | [diff] [blame] | 1513 | }, |
Bu Sun Kim | 6502091 | 2020-05-20 12:08:20 -0700 | [diff] [blame] | 1514 | "status": "A String", # The status of an operation. Valid values are <code>PENDING</code>, |
| 1515 | # <code>RUNNING</code>, <code>DONE</code>, |
| 1516 | # <code>SQL_OPERATION_STATUS_UNSPECIFIED</code>. |
| 1517 | "name": "A String", # An identifier that uniquely identifies the operation. You can use this |
Dan O'Meara | dd49464 | 2020-05-01 07:42:23 -0700 | [diff] [blame] | 1518 | # identifier to retrieve the Operations resource that has information about |
| 1519 | # the operation. |
Bu Sun Kim | 6502091 | 2020-05-20 12:08:20 -0700 | [diff] [blame] | 1520 | "exportContext": { # Database instance export context. # The context for export operation, if applicable. |
| 1521 | "databases": [ # Databases to be exported. <br /> <b>MySQL instances:</b> If |
Dan O'Meara | dd49464 | 2020-05-01 07:42:23 -0700 | [diff] [blame] | 1522 | # <code>fileType</code> is <code>SQL</code> and no database is specified, all |
| 1523 | # databases are exported, except for the <code>mysql</code> system database. |
| 1524 | # If <code>fileType</code> is <code>CSV</code>, you can specify one database, |
| 1525 | # either by using this property or by using the |
| 1526 | # <code>csvExportOptions.selectQuery</code> property, which takes precedence |
| 1527 | # over this property. <br /> <b>PostgreSQL instances:</b> You must specify |
| 1528 | # one database to be exported. If <code>fileType</code> is <code>CSV</code>, |
| 1529 | # this database must match the one specified in the |
| 1530 | # <code>csvExportOptions.selectQuery</code> property. |
Bu Sun Kim | 6502091 | 2020-05-20 12:08:20 -0700 | [diff] [blame] | 1531 | "A String", |
Craig Citro | e633be1 | 2015-03-02 13:40:36 -0800 | [diff] [blame] | 1532 | ], |
Bu Sun Kim | 6502091 | 2020-05-20 12:08:20 -0700 | [diff] [blame] | 1533 | "sqlExportOptions": { # Options for exporting data as SQL statements. |
| 1534 | "tables": [ # Tables to export, or that were exported, from the specified database. If |
Dan O'Meara | dd49464 | 2020-05-01 07:42:23 -0700 | [diff] [blame] | 1535 | # you specify tables, specify one and only one database. For PostgreSQL |
| 1536 | # instances, you can specify only one table. |
Bu Sun Kim | 6502091 | 2020-05-20 12:08:20 -0700 | [diff] [blame] | 1537 | "A String", |
Craig Citro | e633be1 | 2015-03-02 13:40:36 -0800 | [diff] [blame] | 1538 | ], |
Bu Sun Kim | 6502091 | 2020-05-20 12:08:20 -0700 | [diff] [blame] | 1539 | "schemaOnly": True or False, # Export only schemas. |
| 1540 | "mysqlExportOptions": { # Options for exporting from MySQL. |
| 1541 | "masterData": 42, # Option to include SQL statement required to set up replication. |
Dan O'Meara | dd49464 | 2020-05-01 07:42:23 -0700 | [diff] [blame] | 1542 | # If set to <code>1</code>, the dump file includes |
| 1543 | # a CHANGE MASTER TO statement with the binary log coordinates. |
| 1544 | # If set to <code>2</code>, the CHANGE MASTER TO statement is written as |
| 1545 | # a SQL comment, and has no effect. |
| 1546 | # All other values are ignored. |
Bu Sun Kim | 715bd7f | 2019-06-14 16:50:42 -0700 | [diff] [blame] | 1547 | }, |
Craig Citro | e633be1 | 2015-03-02 13:40:36 -0800 | [diff] [blame] | 1548 | }, |
Bu Sun Kim | 6502091 | 2020-05-20 12:08:20 -0700 | [diff] [blame] | 1549 | "fileType": "A String", # The file type for the specified uri. <br><code>SQL</code>: The file |
| 1550 | # contains SQL statements. <br><code>CSV</code>: The file contains CSV data. |
| 1551 | "uri": "A String", # The path to the file in Google Cloud Storage where the export will be |
| 1552 | # stored. The URI is in the form <code>gs: |
| 1553 | # //bucketName/fileName</code>. If the file already exists, the requests |
| 1554 | # // succeeds, but the operation fails. If <code>fileType</code> is |
| 1555 | # // <code>SQL</code> and the filename ends with .gz, the contents are |
| 1556 | # // compressed. |
| 1557 | "csvExportOptions": { # Options for exporting data as CSV. |
| 1558 | "selectQuery": "A String", # The select query used to extract the data. |
| 1559 | }, |
| 1560 | "kind": "A String", # This is always <code>sql#exportContext</code>. |
Craig Citro | e633be1 | 2015-03-02 13:40:36 -0800 | [diff] [blame] | 1561 | }, |
Bu Sun Kim | 6502091 | 2020-05-20 12:08:20 -0700 | [diff] [blame] | 1562 | "targetId": "A String", # Name of the database instance related to this operation. |
Craig Citro | e633be1 | 2015-03-02 13:40:36 -0800 | [diff] [blame] | 1563 | }</pre> |
| 1564 | </div> |
| 1565 | |
| 1566 | <div class="method"> |
Dan O'Meara | dd49464 | 2020-05-01 07:42:23 -0700 | [diff] [blame] | 1567 | <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] | 1568 | <pre>Creates a new Cloud SQL instance. |
| 1569 | |
| 1570 | Args: |
Dan O'Meara | dd49464 | 2020-05-01 07:42:23 -0700 | [diff] [blame] | 1571 | project: string, Project ID of the project to which the newly created Cloud SQL instances |
| 1572 | should belong. (required) |
| 1573 | body: object, The request body. |
Craig Citro | e633be1 | 2015-03-02 13:40:36 -0800 | [diff] [blame] | 1574 | The object takes the form of: |
| 1575 | |
| 1576 | { # A Cloud SQL instance resource. |
Bu Sun Kim | 6502091 | 2020-05-20 12:08:20 -0700 | [diff] [blame] | 1577 | "suspensionReason": [ # If the instance state is SUSPENDED, the reason for the suspension. |
| 1578 | "A String", |
| 1579 | ], |
| 1580 | "settings": { # Database instance settings. # The user settings. |
| 1581 | "ipConfiguration": { # IP Management configuration. # The settings for IP Management. This allows to enable or disable the |
| 1582 | # instance IP and manage which external networks can connect to the instance. |
| 1583 | # The IPv4 address cannot be disabled for Second Generation instances. |
| 1584 | "requireSsl": True or False, # Whether SSL connections over IP should be enforced or not. |
| 1585 | "privateNetwork": "A String", # The resource link for the VPC network from which the Cloud SQL instance is |
| 1586 | # accessible for private IP. For example, |
| 1587 | # <code>/projects/myProject/global/networks/default</code>. This setting can |
| 1588 | # be updated, but it cannot be removed after it is set. |
| 1589 | "ipv4Enabled": True or False, # Whether the instance should be assigned an IP address or not. |
| 1590 | "authorizedNetworks": [ # The list of external networks that are allowed to connect to the instance |
| 1591 | # using the IP. In <a |
| 1592 | # href="http://en.wikipedia.org/wiki/CIDR_notation#CIDR_notation">CIDR |
| 1593 | # notation</a>, also known as 'slash' notation (e.g. |
| 1594 | # <code>192.168.100.0/24</code>). |
| 1595 | { # An entry for an Access Control list. |
| 1596 | "name": "A String", # Optional. A label to identify this entry. |
| 1597 | "kind": "A String", # This is always <code>sql#aclEntry</code>. |
| 1598 | "value": "A String", # The whitelisted value for the access control list. |
| 1599 | "expirationTime": "A String", # The time when this access control entry expires in <a |
| 1600 | # href="https://tools.ietf.org/html/rfc3339">RFC 3339</a> format, for example |
| 1601 | # <code>2012-11-15T16:19:00.094Z</code>. |
| 1602 | }, |
| 1603 | ], |
Jon Wayne Parrott | 0a471d3 | 2016-05-19 10:54:38 -0700 | [diff] [blame] | 1604 | }, |
Bu Sun Kim | 6502091 | 2020-05-20 12:08:20 -0700 | [diff] [blame] | 1605 | "availabilityType": "A String", # Availability type (PostgreSQL and MySQL instances only). Potential values: |
Dan O'Meara | dd49464 | 2020-05-01 07:42:23 -0700 | [diff] [blame] | 1606 | # <br><code>ZONAL</code>: The instance serves data from only one zone. |
| 1607 | # Outages in that zone affect data accessibility. <br><code>REGIONAL</code>: |
| 1608 | # The instance can serve data from more than one zone in a region (it is |
| 1609 | # highly available). <br>For more information, see <a |
Bu Sun Kim | 6502091 | 2020-05-20 12:08:20 -0700 | [diff] [blame] | 1610 | # href="https://cloud.google.com/sql/docs/postgres/high-availability">Overview |
Dan O'Meara | dd49464 | 2020-05-01 07:42:23 -0700 | [diff] [blame] | 1611 | # of the High Availability Configuration</a>. |
Bu Sun Kim | 6502091 | 2020-05-20 12:08:20 -0700 | [diff] [blame] | 1612 | "settingsVersion": "A String", # The version of instance settings. This is a required field for update |
| 1613 | # method to make sure concurrent updates are handled properly. During update, |
| 1614 | # use the most recent settingsVersion value for this instance and do not try |
| 1615 | # to update this value. |
| 1616 | "databaseFlags": [ # The database flags passed to the instance at startup. |
| 1617 | { # Database flags for Cloud SQL instances. |
| 1618 | "name": "A String", # The name of the flag. These flags are passed at instance startup, so |
| 1619 | # include both server options and system variables for MySQL. Flags should be |
| 1620 | # specified with underscores, not hyphens. For more information, see <a |
| 1621 | # href="/sql/docs/mysql/flags">Configuring Database Flags</a> in the Cloud |
| 1622 | # SQL documentation. |
| 1623 | "value": "A String", # The value of the flag. Booleans should be set to <code>on</code> for true |
| 1624 | # and <code>off</code> for false. This field must be omitted if the flag |
| 1625 | # doesn't take a value. |
| 1626 | }, |
Dan O'Meara | dd49464 | 2020-05-01 07:42:23 -0700 | [diff] [blame] | 1627 | ], |
Bu Sun Kim | 6502091 | 2020-05-20 12:08:20 -0700 | [diff] [blame] | 1628 | "maintenanceWindow": { # Maintenance window. This specifies when a v2 Cloud SQL instance should # The maintenance window for this instance. This specifies when the instance |
| 1629 | # can be restarted for maintenance purposes. Not used for First Generation |
| 1630 | # instances. |
| 1631 | # preferably be restarted for system maintenance purposes. |
| 1632 | "hour": 42, # hour of day - 0 to 23. |
| 1633 | "day": 42, # day of week (1-7), starting on Monday. |
| 1634 | "kind": "A String", # This is always <code>sql#maintenanceWindow</code>. |
| 1635 | "updateTrack": "A String", # Maintenance timing setting: <code>canary</code> (Earlier) or |
| 1636 | # <code>stable</code> (Later). <br /><a |
| 1637 | # href="/sql/docs/db_path/instance-settings#maintenance-timing-2ndgen"> |
| 1638 | # Learn more</a>. |
| 1639 | }, |
| 1640 | "pricingPlan": "A String", # The pricing plan for this instance. This can be either <code>PER_USE</code> |
| 1641 | # or <code>PACKAGE</code>. Only <code>PER_USE</code> is supported for Second |
| 1642 | # Generation instances. |
| 1643 | "storageAutoResize": True or False, # Configuration to increase storage size automatically. The default value is |
| 1644 | # true. Not used for First Generation instances. |
| 1645 | "storageAutoResizeLimit": "A String", # The maximum size to which storage capacity can be automatically increased. |
| 1646 | # The default value is 0, which specifies that there is no limit. Not used |
| 1647 | # for First Generation instances. |
| 1648 | "authorizedGaeApplications": [ # The App Engine app IDs that can access this instance. First Generation |
| 1649 | # instances only. |
| 1650 | "A String", |
| 1651 | ], |
| 1652 | "tier": "A String", # The tier (or machine type) for this instance, for example |
| 1653 | # <code>db-n1-standard-1</code> (MySQL instances) or |
| 1654 | # <code>db-custom-1-3840</code> (PostgreSQL instances). For MySQL instances, |
| 1655 | # this property determines whether the instance is First or Second |
| 1656 | # Generation. For more information, see <a |
| 1657 | # href="/sql/docs/db_path/instance-settings">Instance Settings</a>. |
| 1658 | "dataDiskSizeGb": "A String", # The size of data disk, in GB. The data disk size minimum is 10GB. Not used |
| 1659 | # for First Generation instances. |
| 1660 | "dataDiskType": "A String", # The type of data disk: <code>PD_SSD</code> (default) or |
| 1661 | # <code>PD_HDD</code>. Not used for First Generation instances. |
| 1662 | "databaseReplicationEnabled": True or False, # Configuration specific to read replica instances. Indicates whether |
| 1663 | # replication is enabled or not. |
| 1664 | "crashSafeReplicationEnabled": True or False, # Configuration specific to read replica instances. Indicates whether |
| 1665 | # database flags for crash-safe replication are enabled. This property is |
| 1666 | # only applicable to First Generation instances. |
| 1667 | "backupConfiguration": { # Database instance backup configuration. # The daily backup configuration for the instance. |
| 1668 | "binaryLogEnabled": True or False, # (MySQL only) Whether binary log is enabled. If backup configuration is |
| 1669 | # disabled, binarylog must be disabled as well. |
| 1670 | "replicationLogArchivingEnabled": True or False, # Reserved for future use. |
| 1671 | "location": "A String", # Location of the backup |
| 1672 | "pointInTimeRecoveryEnabled": True or False, # Reserved for future use. |
| 1673 | "startTime": "A String", # Start time for the daily backup configuration in UTC timezone in the 24 |
| 1674 | # hour format - <code>HH:MM</code>. |
| 1675 | "kind": "A String", # This is always <code>sql#backupConfiguration</code>. |
| 1676 | "enabled": True or False, # Whether this configuration is enabled. |
| 1677 | }, |
| 1678 | "userLabels": { # User-provided labels, represented as a dictionary where each label is a |
| 1679 | # single key value pair. |
| 1680 | "a_key": "A String", |
| 1681 | }, |
| 1682 | "locationPreference": { # Preferred location. This specifies where a Cloud SQL instance should # The location preference settings. This allows the instance to be located as |
| 1683 | # near as possible to either an App Engine app or Compute Engine zone for |
| 1684 | # better performance. App Engine co-location is only applicable to First |
| 1685 | # Generation instances. |
| 1686 | # preferably be located, either in a specific Compute Engine zone, or |
| 1687 | # co-located with an App Engine application. Note that if the preferred |
| 1688 | # location is not available, the instance will be located as close as possible |
| 1689 | # within the region. Only one location may be specified. |
| 1690 | "zone": "A String", # The preferred Compute Engine zone (e.g. us-central1-a, us-central1-b, |
| 1691 | # etc.). |
| 1692 | "followGaeApplication": "A String", # The AppEngine application to follow, it must be in the same region as the |
| 1693 | # Cloud SQL instance. |
| 1694 | "kind": "A String", # This is always <code>sql#locationPreference</code>. |
| 1695 | }, |
| 1696 | "kind": "A String", # This is always <code>sql#settings</code>. |
| 1697 | "replicationType": "A String", # The type of replication this instance uses. This can be either |
| 1698 | # <code>ASYNCHRONOUS</code> or <code>SYNCHRONOUS</code>. This property is |
| 1699 | # only applicable to First Generation instances. |
| 1700 | "activationPolicy": "A String", # The activation policy specifies when the instance is activated; it is |
Dan O'Meara | dd49464 | 2020-05-01 07:42:23 -0700 | [diff] [blame] | 1701 | # applicable only when the instance state is <code>RUNNABLE</code>. Valid |
| 1702 | # values: <br><code>ALWAYS</code>: The instance is on, and remains so even in |
| 1703 | # the absence of connection requests. <br><code>NEVER</code>: The instance is |
| 1704 | # off; it is not activated, even if a connection request arrives. |
| 1705 | # <br><code>ON_DEMAND</code>: First Generation instances only. The instance |
| 1706 | # responds to incoming requests, and turns itself off when not in use. |
| 1707 | # Instances with <code>PER_USE</code> pricing turn off after 15 minutes of |
| 1708 | # inactivity. Instances with <code>PER_PACKAGE</code> pricing turn off after |
| 1709 | # 12 hours of inactivity. |
Jon Wayne Parrott | 0a471d3 | 2016-05-19 10:54:38 -0700 | [diff] [blame] | 1710 | }, |
Bu Sun Kim | 6502091 | 2020-05-20 12:08:20 -0700 | [diff] [blame] | 1711 | "replicaNames": [ # The replicas of the instance. |
| 1712 | "A String", |
| 1713 | ], |
| 1714 | "diskEncryptionConfiguration": { # Disk encryption configuration for an instance. # Disk encryption configuration specific to an instance. |
| 1715 | # Applies only to Second Generation instances. |
| 1716 | "kind": "A String", # This is always <code>sql#diskEncryptionConfiguration</code>. |
| 1717 | "kmsKeyName": "A String", # Resource name of KMS key for disk encryption |
| 1718 | }, |
| 1719 | "scheduledMaintenance": { # Any scheduled maintenancce for this instance. # The start time of any upcoming scheduled maintenance for this instance. |
| 1720 | "canDefer": True or False, |
| 1721 | "startTime": "A String", # The start time of any upcoming scheduled maintenance for this instance. |
| 1722 | "canReschedule": True or False, # If the scheduled maintenance can be rescheduled. |
| 1723 | }, |
| 1724 | "rootPassword": "A String", # Initial root password. Use only on creation. |
| 1725 | "etag": "A String", # This field is deprecated and will be removed from a future version of the |
| 1726 | # API. Use the <code>settings.settingsVersion</code> field instead. |
| 1727 | "serverCaCert": { # SslCerts Resource # SSL configuration. |
| 1728 | "sha1Fingerprint": "A String", # Sha1 Fingerprint. |
| 1729 | "certSerialNumber": "A String", # Serial number, as extracted from the certificate. |
| 1730 | "cert": "A String", # PEM representation. |
| 1731 | "kind": "A String", # This is always <code>sql#sslCert</code>. |
| 1732 | "commonName": "A String", # User supplied name. Constrained to [a-zA-Z.-_ ]+. |
| 1733 | "createTime": "A String", # The time when the certificate was created in <a |
| 1734 | # href="https://tools.ietf.org/html/rfc3339">RFC 3339</a> format, for example |
| 1735 | # <code>2012-11-15T16:19:00.094Z</code> |
| 1736 | "instance": "A String", # Name of the database instance. |
| 1737 | "selfLink": "A String", # The URI of this resource. |
| 1738 | "expirationTime": "A String", # The time when the certificate expires in <a |
| 1739 | # href="https://tools.ietf.org/html/rfc3339">RFC 3339</a> format, for example |
| 1740 | # <code>2012-11-15T16:19:00.094Z</code>. |
| 1741 | }, |
| 1742 | "maxDiskSize": "A String", # The maximum disk size of the instance in bytes. |
| 1743 | "name": "A String", # Name of the Cloud SQL instance. This does not include the project ID. |
| 1744 | "masterInstanceName": "A String", # The name of the instance which will act as master in the replication setup. |
| 1745 | "instanceType": "A String", # The instance type. This can be one of the following. |
| 1746 | # <br><code>CLOUD_SQL_INSTANCE</code>: A Cloud SQL instance that is not |
| 1747 | # replicating from a master. <br><code>ON_PREMISES_INSTANCE</code>: An |
| 1748 | # instance running on the |
| 1749 | # customer's premises. <br><code>READ_REPLICA_INSTANCE</code>: A Cloud SQL |
| 1750 | # instance configured as a read-replica. |
| 1751 | "gceZone": "A String", # The Compute Engine zone that the instance is currently serving from. This |
| 1752 | # value could be different from the zone that was specified when the instance |
| 1753 | # was created if the instance has failed over to its secondary zone. |
| 1754 | "currentDiskSize": "A String", # The current disk usage of the instance in bytes. This property has been |
| 1755 | # deprecated. Users should use the |
| 1756 | # "cloudsql.googleapis.com/database/disk/bytes_used" metric in Cloud |
| 1757 | # Monitoring API instead. Please see <a |
| 1758 | # href="https://groups.google.com/d/msg/google-cloud-sql-announce/I_7-F9EBhT0/BtvFtdFeAgAJ">this |
| 1759 | # announcement</a> for details. |
| 1760 | "replicaConfiguration": { # Read-replica configuration for connecting to the master. # Configuration specific to failover replicas and read replicas. |
| 1761 | "failoverTarget": True or False, # Specifies if the replica is the failover target. If the field is set to |
Dan O'Meara | dd49464 | 2020-05-01 07:42:23 -0700 | [diff] [blame] | 1762 | # <code>true</code> the replica will be designated as a failover replica. In |
| 1763 | # case the master instance fails, the replica instance will be promoted as |
| 1764 | # the new master instance. <p>Only one replica can be specified as failover |
| 1765 | # target, and the replica has to be in different zone with the master |
| 1766 | # instance. |
Bu Sun Kim | 6502091 | 2020-05-20 12:08:20 -0700 | [diff] [blame] | 1767 | "kind": "A String", # This is always <code>sql#replicaConfiguration</code>. |
| 1768 | "mysqlReplicaConfiguration": { # Read-replica configuration specific to MySQL databases. # MySQL specific configuration when replicating from a MySQL on-premises |
Dan O'Meara | dd49464 | 2020-05-01 07:42:23 -0700 | [diff] [blame] | 1769 | # master. Replication configuration information such as the username, |
| 1770 | # password, certificates, and keys are not stored in the instance metadata. |
| 1771 | # The configuration information is used only to set up the replication |
| 1772 | # connection and is stored by MySQL in a file named <code>master.info</code> |
| 1773 | # in the data directory. |
Bu Sun Kim | 6502091 | 2020-05-20 12:08:20 -0700 | [diff] [blame] | 1774 | "clientKey": "A String", # PEM representation of the slave's private key. The corresponsing public key |
| 1775 | # is encoded in the client's certificate. |
| 1776 | "sslCipher": "A String", # A list of permissible ciphers to use for SSL encryption. |
| 1777 | "masterHeartbeatPeriod": "A String", # Interval in milliseconds between replication heartbeats. |
| 1778 | "connectRetryInterval": 42, # Seconds to wait between connect retries. MySQL's default is 60 seconds. |
| 1779 | "dumpFilePath": "A String", # Path to a SQL dump file in Google Cloud Storage from which the slave |
Dan O'Meara | dd49464 | 2020-05-01 07:42:23 -0700 | [diff] [blame] | 1780 | # instance is to be created. The URI is in the form gs: |
| 1781 | # //bucketName/fileName. Compressed gzip files (.gz) are also supported. |
| 1782 | # // Dumps should have the binlog co-ordinates from which replication should |
| 1783 | # // begin. This can be accomplished by setting --master-data to 1 when using |
| 1784 | # // mysqldump. |
Bu Sun Kim | 6502091 | 2020-05-20 12:08:20 -0700 | [diff] [blame] | 1785 | "clientCertificate": "A String", # PEM representation of the slave's x509 certificate. |
| 1786 | "username": "A String", # The username for the replication connection. |
| 1787 | "caCertificate": "A String", # PEM representation of the trusted CA's x509 certificate. |
| 1788 | "kind": "A String", # This is always <code>sql#mysqlReplicaConfiguration</code>. |
| 1789 | "password": "A String", # The password for the replication connection. |
| 1790 | "verifyServerCertificate": True or False, # Whether or not to check the master's Common Name value in the certificate |
| 1791 | # that it sends during the SSL handshake. |
Nathaniel Manista | 4f877e5 | 2015-06-15 16:44:50 +0000 | [diff] [blame] | 1792 | }, |
| 1793 | }, |
Bu Sun Kim | 6502091 | 2020-05-20 12:08:20 -0700 | [diff] [blame] | 1794 | "connectionName": "A String", # Connection name of the Cloud SQL instance used in connection strings. |
| 1795 | "failoverReplica": { # The name and status of the failover replica. This property is applicable |
| 1796 | # only to Second Generation instances. |
| 1797 | "available": True or False, # The availability status of the failover replica. A false status indicates |
| 1798 | # that the failover replica is out of sync. The master can only failover to |
| 1799 | # the failover replica when the status is true. |
| 1800 | "name": "A String", # The name of the failover replica. If specified at instance creation, a |
| 1801 | # failover replica is created for the instance. The name |
| 1802 | # doesn't include the project ID. This property is applicable only to |
| 1803 | # Second Generation instances. |
| 1804 | }, |
| 1805 | "ipAddresses": [ # The assigned IP addresses for the instance. |
| 1806 | { # Database instance IP Mapping. |
| 1807 | "timeToRetire": "A String", # The due time for this IP to be retired in <a |
| 1808 | # href="https://tools.ietf.org/html/rfc3339">RFC 3339</a> format, for example |
| 1809 | # <code>2012-11-15T16:19:00.094Z</code>. This field is only available when |
| 1810 | # the IP is scheduled to be retired. |
| 1811 | "type": "A String", # The type of this IP address. A <code>PRIMARY</code> address is a public |
| 1812 | # address that can accept incoming connections. A <code>PRIVATE</code> |
| 1813 | # address is a private address that can accept incoming connections. An |
| 1814 | # <code>OUTGOING</code> address is the source address of connections |
| 1815 | # originating from the instance, if supported. |
| 1816 | "ipAddress": "A String", # The IP address assigned. |
| 1817 | }, |
| 1818 | ], |
| 1819 | "ipv6Address": "A String", # The IPv6 address assigned to the instance. This property is applicable only |
| 1820 | # to First Generation instances. |
| 1821 | "selfLink": "A String", # The URI of this resource. |
| 1822 | "diskEncryptionStatus": { # Disk encryption status for an instance. # Disk encryption status specific to an instance. |
| 1823 | # Applies only to Second Generation instances. |
| 1824 | "kmsKeyVersionName": "A String", # KMS key version used to encrypt the Cloud SQL instance resource |
| 1825 | "kind": "A String", # This is always <code>sql#diskEncryptionStatus</code>. |
| 1826 | }, |
| 1827 | "kind": "A String", # This is always <code>sql#instance</code>. |
| 1828 | "region": "A String", # The geographical region. Can be <code>us-central</code> |
| 1829 | # (<code>FIRST_GEN</code> instances only), <code>us-central1</code> |
| 1830 | # (<code>SECOND_GEN</code> instances only), <code>asia-east1</code> or |
| 1831 | # <code>europe-west1</code>. Defaults to <code>us-central</code> or |
| 1832 | # <code>us-central1</code> depending on the instance type (First Generation |
| 1833 | # or Second Generation). The region can not be changed after instance |
| 1834 | # creation. |
| 1835 | "state": "A String", # The current serving state of the Cloud SQL instance. This can be one of the |
| 1836 | # following. <br><code>RUNNABLE</code>: The instance is running, or is ready |
| 1837 | # to run when accessed. <br><code>SUSPENDED</code>: The instance is not |
| 1838 | # available, for example due to problems with billing. |
| 1839 | # <br><code>PENDING_CREATE</code>: The instance is being created. |
| 1840 | # <br><code>MAINTENANCE</code>: The instance is down for maintenance. |
| 1841 | # <br><code>FAILED</code>: The instance creation failed. |
| 1842 | # <br><code>UNKNOWN_STATE</code>: The state of the instance is unknown. |
| 1843 | "backendType": "A String", # <code>FIRST_GEN</code>: First Generation instance. MySQL only. <br |
| 1844 | # /><code>SECOND_GEN</code>: Second Generation instance or PostgreSQL |
| 1845 | # instance. <br /><code>EXTERNAL</code>: A database server that is not |
| 1846 | # managed by Google. <br>This property is read-only; use the |
| 1847 | # <code>tier</code> property in the <code>settings</code> object to determine |
| 1848 | # the database type and Second or First Generation. |
| 1849 | "onPremisesConfiguration": { # On-premises instance configuration. # Configuration specific to on-premises instances. |
| 1850 | "clientKey": "A String", # PEM representation of the slave's private key. The corresponsing public key |
| 1851 | # is encoded in the client's certificate. |
| 1852 | "dumpFilePath": "A String", # The dump file to create the Cloud SQL replica. |
| 1853 | "hostPort": "A String", # The host and port of the on-premises instance in host:port format |
| 1854 | "clientCertificate": "A String", # PEM representation of the slave's x509 certificate. |
| 1855 | "username": "A String", # The username for connecting to on-premises instance. |
| 1856 | "caCertificate": "A String", # PEM representation of the trusted CA's x509 certificate. |
| 1857 | "kind": "A String", # This is always <code>sql#onPremisesConfiguration</code>. |
| 1858 | "password": "A String", # The password for connecting to on-premises instance. |
| 1859 | }, |
| 1860 | "project": "A String", # The project ID of the project containing the Cloud SQL instance. The Google |
| 1861 | # apps domain is prefixed if applicable. |
| 1862 | "serviceAccountEmailAddress": "A String", # The service account email address assigned to the instance. This property |
| 1863 | # is applicable only to Second Generation instances. |
| 1864 | "databaseVersion": "A String", # The database engine type and version. The <code>databaseVersion</code> |
| 1865 | # field can not be changed after instance creation. MySQL Second Generation |
| 1866 | # instances: <code>MYSQL_5_7</code> (default) or <code>MYSQL_5_6</code>. |
| 1867 | # PostgreSQL instances: <code>POSTGRES_9_6</code> (default) or |
| 1868 | # <code>POSTGRES_11 Beta</code> MySQL First Generation |
| 1869 | # instances: <code>MYSQL_5_6</code> (default) or <code>MYSQL_5_5</code> |
Craig Citro | e633be1 | 2015-03-02 13:40:36 -0800 | [diff] [blame] | 1870 | } |
| 1871 | |
Dan O'Meara | dd49464 | 2020-05-01 07:42:23 -0700 | [diff] [blame] | 1872 | x__xgafv: string, V1 error format. |
| 1873 | Allowed values |
| 1874 | 1 - v1 error format |
| 1875 | 2 - v2 error format |
Craig Citro | e633be1 | 2015-03-02 13:40:36 -0800 | [diff] [blame] | 1876 | |
| 1877 | Returns: |
| 1878 | An object of the form: |
| 1879 | |
Dan O'Meara | dd49464 | 2020-05-01 07:42:23 -0700 | [diff] [blame] | 1880 | { # An Operation resource.&nbsp;For successful operations that return an |
| 1881 | # Operation resource, only the fields relevant to the operation are populated |
| 1882 | # in the resource. |
Bu Sun Kim | 6502091 | 2020-05-20 12:08:20 -0700 | [diff] [blame] | 1883 | "endTime": "A String", # The time this operation finished in UTC timezone in <a |
| 1884 | # href="https://tools.ietf.org/html/rfc3339">RFC 3339</a> format, for example |
| 1885 | # <code>2012-11-15T16:19:00.094Z</code>. |
| 1886 | "startTime": "A String", # The time this operation actually started in UTC timezone in <a |
| 1887 | # href="https://tools.ietf.org/html/rfc3339">RFC 3339</a> format, for example |
| 1888 | # <code>2012-11-15T16:19:00.094Z</code>. |
| 1889 | "insertTime": "A String", # The time this operation was enqueued in UTC timezone in <a |
| 1890 | # href="https://tools.ietf.org/html/rfc3339">RFC 3339</a> format, for example |
| 1891 | # <code>2012-11-15T16:19:00.094Z</code>. |
| 1892 | "user": "A String", # The email address of the user who initiated this operation. |
| 1893 | "targetProject": "A String", # The project ID of the target instance related to this operation. |
| 1894 | "selfLink": "A String", # The URI of this resource. |
| 1895 | "targetLink": "A String", |
| 1896 | "operationType": "A String", # The type of the operation. Valid values are <code>CREATE</code>, |
| 1897 | # <code>DELETE</code>, <code>UPDATE</code>, <code>RESTART</code>, |
| 1898 | # <code>IMPORT</code>, <code>EXPORT</code>, <code>BACKUP_VOLUME</code>, |
| 1899 | # <code>RESTORE_VOLUME</code>, <code>CREATE_USER</code>, |
| 1900 | # <code>DELETE_USER</code>, <code>CREATE_DATABASE</code>, |
| 1901 | # <code>DELETE_DATABASE</code> . |
| 1902 | "error": { # Database instance operation errors list wrapper. # If errors occurred during processing of this operation, this field will be |
| 1903 | # populated. |
| 1904 | "errors": [ # The list of errors encountered while processing this operation. |
| 1905 | { # Database instance operation error. |
| 1906 | "kind": "A String", # This is always <code>sql#operationError</code>. |
| 1907 | "code": "A String", # Identifies the specific error that occurred. |
| 1908 | "message": "A String", # Additional information about the error encountered. |
Dan O'Meara | dd49464 | 2020-05-01 07:42:23 -0700 | [diff] [blame] | 1909 | }, |
Bu Sun Kim | 6502091 | 2020-05-20 12:08:20 -0700 | [diff] [blame] | 1910 | ], |
| 1911 | "kind": "A String", # This is always <code>sql#operationErrors</code>. |
| 1912 | }, |
| 1913 | "kind": "A String", # This is always <code>sql#operation</code>. |
| 1914 | "importContext": { # Database instance import context. # The context for import operation, if applicable. |
| 1915 | "kind": "A String", # This is always <code>sql#importContext</code>. |
| 1916 | "csvImportOptions": { # Options for importing data as CSV. |
| 1917 | "table": "A String", # The table to which CSV data is imported. |
| 1918 | "columns": [ # The columns to which CSV data is imported. If not specified, all columns |
| 1919 | # of the database table are loaded with CSV data. |
| 1920 | "A String", |
| 1921 | ], |
Dan O'Meara | dd49464 | 2020-05-01 07:42:23 -0700 | [diff] [blame] | 1922 | }, |
Bu Sun Kim | 6502091 | 2020-05-20 12:08:20 -0700 | [diff] [blame] | 1923 | "database": "A String", # The target database for the import. If <code>fileType</code> is |
Dan O'Meara | dd49464 | 2020-05-01 07:42:23 -0700 | [diff] [blame] | 1924 | # <code>SQL</code>, this field is required only if the import file does not |
| 1925 | # specify a database, and is overridden by any database specification in the |
| 1926 | # import file. If <code>fileType</code> is <code>CSV</code>, one database |
| 1927 | # must be specified. |
Bu Sun Kim | 6502091 | 2020-05-20 12:08:20 -0700 | [diff] [blame] | 1928 | "importUser": "A String", # The PostgreSQL user for this import operation. PostgreSQL instances only. |
| 1929 | "bakImportOptions": { # Import parameters specific to SQL Server .BAK files |
| 1930 | "encryptionOptions": { |
| 1931 | "certPath": "A String", # Path to the Certificate (.cer) in Cloud Storage, in the form |
| 1932 | # <code>gs://bucketName/fileName</code>. The instance must have |
| 1933 | # write permissions to the bucket and read access to the file. |
| 1934 | "pvkPath": "A String", # Path to the Certificate Private Key (.pvk) in Cloud Storage, in the |
| 1935 | # form <code>gs://bucketName/fileName</code>. The instance must have |
| 1936 | # write permissions to the bucket and read access to the file. |
| 1937 | "pvkPassword": "A String", # Password that encrypts the private key |
| 1938 | }, |
| 1939 | }, |
| 1940 | "uri": "A String", # Path to the import file in Cloud Storage, in the form |
Dan O'Meara | dd49464 | 2020-05-01 07:42:23 -0700 | [diff] [blame] | 1941 | # <code>gs: |
| 1942 | # //bucketName/fileName</code>. Compressed gzip files (.gz) are supported |
| 1943 | # // when <code>fileType</code> is <code>SQL</code>. The instance must have |
| 1944 | # // write permissions to the bucket and read access to the file. |
Bu Sun Kim | 6502091 | 2020-05-20 12:08:20 -0700 | [diff] [blame] | 1945 | "fileType": "A String", # The file type for the specified uri. <br><code>SQL</code>: The file |
| 1946 | # contains SQL statements. <br><code>CSV</code>: The file contains CSV data. |
Craig Citro | e633be1 | 2015-03-02 13:40:36 -0800 | [diff] [blame] | 1947 | }, |
Bu Sun Kim | 6502091 | 2020-05-20 12:08:20 -0700 | [diff] [blame] | 1948 | "status": "A String", # The status of an operation. Valid values are <code>PENDING</code>, |
| 1949 | # <code>RUNNING</code>, <code>DONE</code>, |
| 1950 | # <code>SQL_OPERATION_STATUS_UNSPECIFIED</code>. |
| 1951 | "name": "A String", # An identifier that uniquely identifies the operation. You can use this |
Dan O'Meara | dd49464 | 2020-05-01 07:42:23 -0700 | [diff] [blame] | 1952 | # identifier to retrieve the Operations resource that has information about |
| 1953 | # the operation. |
Bu Sun Kim | 6502091 | 2020-05-20 12:08:20 -0700 | [diff] [blame] | 1954 | "exportContext": { # Database instance export context. # The context for export operation, if applicable. |
| 1955 | "databases": [ # Databases to be exported. <br /> <b>MySQL instances:</b> If |
Dan O'Meara | dd49464 | 2020-05-01 07:42:23 -0700 | [diff] [blame] | 1956 | # <code>fileType</code> is <code>SQL</code> and no database is specified, all |
| 1957 | # databases are exported, except for the <code>mysql</code> system database. |
| 1958 | # If <code>fileType</code> is <code>CSV</code>, you can specify one database, |
| 1959 | # either by using this property or by using the |
| 1960 | # <code>csvExportOptions.selectQuery</code> property, which takes precedence |
| 1961 | # over this property. <br /> <b>PostgreSQL instances:</b> You must specify |
| 1962 | # one database to be exported. If <code>fileType</code> is <code>CSV</code>, |
| 1963 | # this database must match the one specified in the |
| 1964 | # <code>csvExportOptions.selectQuery</code> property. |
Bu Sun Kim | 6502091 | 2020-05-20 12:08:20 -0700 | [diff] [blame] | 1965 | "A String", |
Craig Citro | e633be1 | 2015-03-02 13:40:36 -0800 | [diff] [blame] | 1966 | ], |
Bu Sun Kim | 6502091 | 2020-05-20 12:08:20 -0700 | [diff] [blame] | 1967 | "sqlExportOptions": { # Options for exporting data as SQL statements. |
| 1968 | "tables": [ # Tables to export, or that were exported, from the specified database. If |
Dan O'Meara | dd49464 | 2020-05-01 07:42:23 -0700 | [diff] [blame] | 1969 | # you specify tables, specify one and only one database. For PostgreSQL |
| 1970 | # instances, you can specify only one table. |
Bu Sun Kim | 6502091 | 2020-05-20 12:08:20 -0700 | [diff] [blame] | 1971 | "A String", |
Craig Citro | e633be1 | 2015-03-02 13:40:36 -0800 | [diff] [blame] | 1972 | ], |
Bu Sun Kim | 6502091 | 2020-05-20 12:08:20 -0700 | [diff] [blame] | 1973 | "schemaOnly": True or False, # Export only schemas. |
| 1974 | "mysqlExportOptions": { # Options for exporting from MySQL. |
| 1975 | "masterData": 42, # Option to include SQL statement required to set up replication. |
Dan O'Meara | dd49464 | 2020-05-01 07:42:23 -0700 | [diff] [blame] | 1976 | # If set to <code>1</code>, the dump file includes |
| 1977 | # a CHANGE MASTER TO statement with the binary log coordinates. |
| 1978 | # If set to <code>2</code>, the CHANGE MASTER TO statement is written as |
| 1979 | # a SQL comment, and has no effect. |
| 1980 | # All other values are ignored. |
Bu Sun Kim | 715bd7f | 2019-06-14 16:50:42 -0700 | [diff] [blame] | 1981 | }, |
Craig Citro | e633be1 | 2015-03-02 13:40:36 -0800 | [diff] [blame] | 1982 | }, |
Bu Sun Kim | 6502091 | 2020-05-20 12:08:20 -0700 | [diff] [blame] | 1983 | "fileType": "A String", # The file type for the specified uri. <br><code>SQL</code>: The file |
| 1984 | # contains SQL statements. <br><code>CSV</code>: The file contains CSV data. |
| 1985 | "uri": "A String", # The path to the file in Google Cloud Storage where the export will be |
| 1986 | # stored. The URI is in the form <code>gs: |
| 1987 | # //bucketName/fileName</code>. If the file already exists, the requests |
| 1988 | # // succeeds, but the operation fails. If <code>fileType</code> is |
| 1989 | # // <code>SQL</code> and the filename ends with .gz, the contents are |
| 1990 | # // compressed. |
| 1991 | "csvExportOptions": { # Options for exporting data as CSV. |
| 1992 | "selectQuery": "A String", # The select query used to extract the data. |
| 1993 | }, |
| 1994 | "kind": "A String", # This is always <code>sql#exportContext</code>. |
Craig Citro | e633be1 | 2015-03-02 13:40:36 -0800 | [diff] [blame] | 1995 | }, |
Bu Sun Kim | 6502091 | 2020-05-20 12:08:20 -0700 | [diff] [blame] | 1996 | "targetId": "A String", # Name of the database instance related to this operation. |
Craig Citro | e633be1 | 2015-03-02 13:40:36 -0800 | [diff] [blame] | 1997 | }</pre> |
| 1998 | </div> |
| 1999 | |
| 2000 | <div class="method"> |
Bu Sun Kim | 6502091 | 2020-05-20 12:08:20 -0700 | [diff] [blame] | 2001 | <code class="details" id="list">list(project, filter=None, pageToken=None, maxResults=None, x__xgafv=None)</code> |
Dan O'Meara | dd49464 | 2020-05-01 07:42:23 -0700 | [diff] [blame] | 2002 | <pre>Lists instances under a given project. |
Craig Citro | e633be1 | 2015-03-02 13:40:36 -0800 | [diff] [blame] | 2003 | |
| 2004 | Args: |
| 2005 | project: string, Project ID of the project for which to list Cloud SQL instances. (required) |
Bu Sun Kim | 6502091 | 2020-05-20 12:08:20 -0700 | [diff] [blame] | 2006 | filter: string, A filter expression that filters resources listed in the response. |
| 2007 | The expression is in the form of field:value. For example, |
| 2008 | 'instanceType:CLOUD_SQL_INSTANCE'. Fields can be nested as needed as per |
| 2009 | their JSON representation, such as 'settings.userLabels.auto_start:true'. |
| 2010 | |
| 2011 | Multiple filter queries are space-separated. For example. |
| 2012 | 'state:RUNNABLE instanceType:CLOUD_SQL_INSTANCE'. By default, each |
| 2013 | expression is an AND expression. However, you can include AND and OR |
| 2014 | expressions explicitly. |
Dan O'Meara | dd49464 | 2020-05-01 07:42:23 -0700 | [diff] [blame] | 2015 | pageToken: string, A previously-returned page token representing part of the larger set of |
| 2016 | results to view. |
Craig Citro | e633be1 | 2015-03-02 13:40:36 -0800 | [diff] [blame] | 2017 | maxResults: integer, The maximum number of results to return per response. |
Dan O'Meara | dd49464 | 2020-05-01 07:42:23 -0700 | [diff] [blame] | 2018 | x__xgafv: string, V1 error format. |
| 2019 | Allowed values |
| 2020 | 1 - v1 error format |
| 2021 | 2 - v2 error format |
Craig Citro | e633be1 | 2015-03-02 13:40:36 -0800 | [diff] [blame] | 2022 | |
| 2023 | Returns: |
| 2024 | An object of the form: |
| 2025 | |
| 2026 | { # Database instances list response. |
Bu Sun Kim | 6502091 | 2020-05-20 12:08:20 -0700 | [diff] [blame] | 2027 | "kind": "A String", # This is always <code>sql#instancesList</code>. |
| 2028 | "items": [ # List of database instance resources. |
Craig Citro | e633be1 | 2015-03-02 13:40:36 -0800 | [diff] [blame] | 2029 | { # A Cloud SQL instance resource. |
Bu Sun Kim | 6502091 | 2020-05-20 12:08:20 -0700 | [diff] [blame] | 2030 | "suspensionReason": [ # If the instance state is SUSPENDED, the reason for the suspension. |
| 2031 | "A String", |
| 2032 | ], |
| 2033 | "settings": { # Database instance settings. # The user settings. |
| 2034 | "ipConfiguration": { # IP Management configuration. # The settings for IP Management. This allows to enable or disable the |
| 2035 | # instance IP and manage which external networks can connect to the instance. |
| 2036 | # The IPv4 address cannot be disabled for Second Generation instances. |
| 2037 | "requireSsl": True or False, # Whether SSL connections over IP should be enforced or not. |
| 2038 | "privateNetwork": "A String", # The resource link for the VPC network from which the Cloud SQL instance is |
| 2039 | # accessible for private IP. For example, |
| 2040 | # <code>/projects/myProject/global/networks/default</code>. This setting can |
| 2041 | # be updated, but it cannot be removed after it is set. |
| 2042 | "ipv4Enabled": True or False, # Whether the instance should be assigned an IP address or not. |
| 2043 | "authorizedNetworks": [ # The list of external networks that are allowed to connect to the instance |
| 2044 | # using the IP. In <a |
| 2045 | # href="http://en.wikipedia.org/wiki/CIDR_notation#CIDR_notation">CIDR |
| 2046 | # notation</a>, also known as 'slash' notation (e.g. |
| 2047 | # <code>192.168.100.0/24</code>). |
| 2048 | { # An entry for an Access Control list. |
| 2049 | "name": "A String", # Optional. A label to identify this entry. |
| 2050 | "kind": "A String", # This is always <code>sql#aclEntry</code>. |
| 2051 | "value": "A String", # The whitelisted value for the access control list. |
| 2052 | "expirationTime": "A String", # The time when this access control entry expires in <a |
| 2053 | # href="https://tools.ietf.org/html/rfc3339">RFC 3339</a> format, for example |
| 2054 | # <code>2012-11-15T16:19:00.094Z</code>. |
| 2055 | }, |
| 2056 | ], |
Jon Wayne Parrott | 0a471d3 | 2016-05-19 10:54:38 -0700 | [diff] [blame] | 2057 | }, |
Bu Sun Kim | 6502091 | 2020-05-20 12:08:20 -0700 | [diff] [blame] | 2058 | "availabilityType": "A String", # Availability type (PostgreSQL and MySQL instances only). Potential values: |
Dan O'Meara | dd49464 | 2020-05-01 07:42:23 -0700 | [diff] [blame] | 2059 | # <br><code>ZONAL</code>: The instance serves data from only one zone. |
| 2060 | # Outages in that zone affect data accessibility. <br><code>REGIONAL</code>: |
| 2061 | # The instance can serve data from more than one zone in a region (it is |
| 2062 | # highly available). <br>For more information, see <a |
Bu Sun Kim | 6502091 | 2020-05-20 12:08:20 -0700 | [diff] [blame] | 2063 | # href="https://cloud.google.com/sql/docs/postgres/high-availability">Overview |
Dan O'Meara | dd49464 | 2020-05-01 07:42:23 -0700 | [diff] [blame] | 2064 | # of the High Availability Configuration</a>. |
Bu Sun Kim | 6502091 | 2020-05-20 12:08:20 -0700 | [diff] [blame] | 2065 | "settingsVersion": "A String", # The version of instance settings. This is a required field for update |
| 2066 | # method to make sure concurrent updates are handled properly. During update, |
| 2067 | # use the most recent settingsVersion value for this instance and do not try |
| 2068 | # to update this value. |
| 2069 | "databaseFlags": [ # The database flags passed to the instance at startup. |
| 2070 | { # Database flags for Cloud SQL instances. |
| 2071 | "name": "A String", # The name of the flag. These flags are passed at instance startup, so |
| 2072 | # include both server options and system variables for MySQL. Flags should be |
| 2073 | # specified with underscores, not hyphens. For more information, see <a |
| 2074 | # href="/sql/docs/mysql/flags">Configuring Database Flags</a> in the Cloud |
| 2075 | # SQL documentation. |
| 2076 | "value": "A String", # The value of the flag. Booleans should be set to <code>on</code> for true |
| 2077 | # and <code>off</code> for false. This field must be omitted if the flag |
| 2078 | # doesn't take a value. |
| 2079 | }, |
Dan O'Meara | dd49464 | 2020-05-01 07:42:23 -0700 | [diff] [blame] | 2080 | ], |
Bu Sun Kim | 6502091 | 2020-05-20 12:08:20 -0700 | [diff] [blame] | 2081 | "maintenanceWindow": { # Maintenance window. This specifies when a v2 Cloud SQL instance should # The maintenance window for this instance. This specifies when the instance |
| 2082 | # can be restarted for maintenance purposes. Not used for First Generation |
| 2083 | # instances. |
| 2084 | # preferably be restarted for system maintenance purposes. |
| 2085 | "hour": 42, # hour of day - 0 to 23. |
| 2086 | "day": 42, # day of week (1-7), starting on Monday. |
| 2087 | "kind": "A String", # This is always <code>sql#maintenanceWindow</code>. |
| 2088 | "updateTrack": "A String", # Maintenance timing setting: <code>canary</code> (Earlier) or |
| 2089 | # <code>stable</code> (Later). <br /><a |
| 2090 | # href="/sql/docs/db_path/instance-settings#maintenance-timing-2ndgen"> |
| 2091 | # Learn more</a>. |
| 2092 | }, |
| 2093 | "pricingPlan": "A String", # The pricing plan for this instance. This can be either <code>PER_USE</code> |
| 2094 | # or <code>PACKAGE</code>. Only <code>PER_USE</code> is supported for Second |
| 2095 | # Generation instances. |
| 2096 | "storageAutoResize": True or False, # Configuration to increase storage size automatically. The default value is |
| 2097 | # true. Not used for First Generation instances. |
| 2098 | "storageAutoResizeLimit": "A String", # The maximum size to which storage capacity can be automatically increased. |
| 2099 | # The default value is 0, which specifies that there is no limit. Not used |
| 2100 | # for First Generation instances. |
| 2101 | "authorizedGaeApplications": [ # The App Engine app IDs that can access this instance. First Generation |
| 2102 | # instances only. |
| 2103 | "A String", |
| 2104 | ], |
| 2105 | "tier": "A String", # The tier (or machine type) for this instance, for example |
| 2106 | # <code>db-n1-standard-1</code> (MySQL instances) or |
| 2107 | # <code>db-custom-1-3840</code> (PostgreSQL instances). For MySQL instances, |
| 2108 | # this property determines whether the instance is First or Second |
| 2109 | # Generation. For more information, see <a |
| 2110 | # href="/sql/docs/db_path/instance-settings">Instance Settings</a>. |
| 2111 | "dataDiskSizeGb": "A String", # The size of data disk, in GB. The data disk size minimum is 10GB. Not used |
| 2112 | # for First Generation instances. |
| 2113 | "dataDiskType": "A String", # The type of data disk: <code>PD_SSD</code> (default) or |
| 2114 | # <code>PD_HDD</code>. Not used for First Generation instances. |
| 2115 | "databaseReplicationEnabled": True or False, # Configuration specific to read replica instances. Indicates whether |
| 2116 | # replication is enabled or not. |
| 2117 | "crashSafeReplicationEnabled": True or False, # Configuration specific to read replica instances. Indicates whether |
| 2118 | # database flags for crash-safe replication are enabled. This property is |
| 2119 | # only applicable to First Generation instances. |
| 2120 | "backupConfiguration": { # Database instance backup configuration. # The daily backup configuration for the instance. |
| 2121 | "binaryLogEnabled": True or False, # (MySQL only) Whether binary log is enabled. If backup configuration is |
| 2122 | # disabled, binarylog must be disabled as well. |
| 2123 | "replicationLogArchivingEnabled": True or False, # Reserved for future use. |
| 2124 | "location": "A String", # Location of the backup |
| 2125 | "pointInTimeRecoveryEnabled": True or False, # Reserved for future use. |
| 2126 | "startTime": "A String", # Start time for the daily backup configuration in UTC timezone in the 24 |
| 2127 | # hour format - <code>HH:MM</code>. |
| 2128 | "kind": "A String", # This is always <code>sql#backupConfiguration</code>. |
| 2129 | "enabled": True or False, # Whether this configuration is enabled. |
| 2130 | }, |
| 2131 | "userLabels": { # User-provided labels, represented as a dictionary where each label is a |
| 2132 | # single key value pair. |
| 2133 | "a_key": "A String", |
| 2134 | }, |
| 2135 | "locationPreference": { # Preferred location. This specifies where a Cloud SQL instance should # The location preference settings. This allows the instance to be located as |
| 2136 | # near as possible to either an App Engine app or Compute Engine zone for |
| 2137 | # better performance. App Engine co-location is only applicable to First |
| 2138 | # Generation instances. |
| 2139 | # preferably be located, either in a specific Compute Engine zone, or |
| 2140 | # co-located with an App Engine application. Note that if the preferred |
| 2141 | # location is not available, the instance will be located as close as possible |
| 2142 | # within the region. Only one location may be specified. |
| 2143 | "zone": "A String", # The preferred Compute Engine zone (e.g. us-central1-a, us-central1-b, |
| 2144 | # etc.). |
| 2145 | "followGaeApplication": "A String", # The AppEngine application to follow, it must be in the same region as the |
| 2146 | # Cloud SQL instance. |
| 2147 | "kind": "A String", # This is always <code>sql#locationPreference</code>. |
| 2148 | }, |
| 2149 | "kind": "A String", # This is always <code>sql#settings</code>. |
| 2150 | "replicationType": "A String", # The type of replication this instance uses. This can be either |
| 2151 | # <code>ASYNCHRONOUS</code> or <code>SYNCHRONOUS</code>. This property is |
| 2152 | # only applicable to First Generation instances. |
| 2153 | "activationPolicy": "A String", # The activation policy specifies when the instance is activated; it is |
Dan O'Meara | dd49464 | 2020-05-01 07:42:23 -0700 | [diff] [blame] | 2154 | # applicable only when the instance state is <code>RUNNABLE</code>. Valid |
| 2155 | # values: <br><code>ALWAYS</code>: The instance is on, and remains so even in |
| 2156 | # the absence of connection requests. <br><code>NEVER</code>: The instance is |
| 2157 | # off; it is not activated, even if a connection request arrives. |
| 2158 | # <br><code>ON_DEMAND</code>: First Generation instances only. The instance |
| 2159 | # responds to incoming requests, and turns itself off when not in use. |
| 2160 | # Instances with <code>PER_USE</code> pricing turn off after 15 minutes of |
| 2161 | # inactivity. Instances with <code>PER_PACKAGE</code> pricing turn off after |
| 2162 | # 12 hours of inactivity. |
Jon Wayne Parrott | 0a471d3 | 2016-05-19 10:54:38 -0700 | [diff] [blame] | 2163 | }, |
Bu Sun Kim | 6502091 | 2020-05-20 12:08:20 -0700 | [diff] [blame] | 2164 | "replicaNames": [ # The replicas of the instance. |
| 2165 | "A String", |
| 2166 | ], |
| 2167 | "diskEncryptionConfiguration": { # Disk encryption configuration for an instance. # Disk encryption configuration specific to an instance. |
| 2168 | # Applies only to Second Generation instances. |
| 2169 | "kind": "A String", # This is always <code>sql#diskEncryptionConfiguration</code>. |
| 2170 | "kmsKeyName": "A String", # Resource name of KMS key for disk encryption |
| 2171 | }, |
| 2172 | "scheduledMaintenance": { # Any scheduled maintenancce for this instance. # The start time of any upcoming scheduled maintenance for this instance. |
| 2173 | "canDefer": True or False, |
| 2174 | "startTime": "A String", # The start time of any upcoming scheduled maintenance for this instance. |
| 2175 | "canReschedule": True or False, # If the scheduled maintenance can be rescheduled. |
| 2176 | }, |
| 2177 | "rootPassword": "A String", # Initial root password. Use only on creation. |
| 2178 | "etag": "A String", # This field is deprecated and will be removed from a future version of the |
| 2179 | # API. Use the <code>settings.settingsVersion</code> field instead. |
| 2180 | "serverCaCert": { # SslCerts Resource # SSL configuration. |
| 2181 | "sha1Fingerprint": "A String", # Sha1 Fingerprint. |
| 2182 | "certSerialNumber": "A String", # Serial number, as extracted from the certificate. |
| 2183 | "cert": "A String", # PEM representation. |
| 2184 | "kind": "A String", # This is always <code>sql#sslCert</code>. |
| 2185 | "commonName": "A String", # User supplied name. Constrained to [a-zA-Z.-_ ]+. |
| 2186 | "createTime": "A String", # The time when the certificate was created in <a |
| 2187 | # href="https://tools.ietf.org/html/rfc3339">RFC 3339</a> format, for example |
| 2188 | # <code>2012-11-15T16:19:00.094Z</code> |
| 2189 | "instance": "A String", # Name of the database instance. |
| 2190 | "selfLink": "A String", # The URI of this resource. |
| 2191 | "expirationTime": "A String", # The time when the certificate expires in <a |
| 2192 | # href="https://tools.ietf.org/html/rfc3339">RFC 3339</a> format, for example |
| 2193 | # <code>2012-11-15T16:19:00.094Z</code>. |
| 2194 | }, |
| 2195 | "maxDiskSize": "A String", # The maximum disk size of the instance in bytes. |
| 2196 | "name": "A String", # Name of the Cloud SQL instance. This does not include the project ID. |
| 2197 | "masterInstanceName": "A String", # The name of the instance which will act as master in the replication setup. |
| 2198 | "instanceType": "A String", # The instance type. This can be one of the following. |
| 2199 | # <br><code>CLOUD_SQL_INSTANCE</code>: A Cloud SQL instance that is not |
| 2200 | # replicating from a master. <br><code>ON_PREMISES_INSTANCE</code>: An |
| 2201 | # instance running on the |
| 2202 | # customer's premises. <br><code>READ_REPLICA_INSTANCE</code>: A Cloud SQL |
| 2203 | # instance configured as a read-replica. |
| 2204 | "gceZone": "A String", # The Compute Engine zone that the instance is currently serving from. This |
| 2205 | # value could be different from the zone that was specified when the instance |
| 2206 | # was created if the instance has failed over to its secondary zone. |
| 2207 | "currentDiskSize": "A String", # The current disk usage of the instance in bytes. This property has been |
| 2208 | # deprecated. Users should use the |
| 2209 | # "cloudsql.googleapis.com/database/disk/bytes_used" metric in Cloud |
| 2210 | # Monitoring API instead. Please see <a |
| 2211 | # href="https://groups.google.com/d/msg/google-cloud-sql-announce/I_7-F9EBhT0/BtvFtdFeAgAJ">this |
| 2212 | # announcement</a> for details. |
| 2213 | "replicaConfiguration": { # Read-replica configuration for connecting to the master. # Configuration specific to failover replicas and read replicas. |
| 2214 | "failoverTarget": True or False, # Specifies if the replica is the failover target. If the field is set to |
Dan O'Meara | dd49464 | 2020-05-01 07:42:23 -0700 | [diff] [blame] | 2215 | # <code>true</code> the replica will be designated as a failover replica. In |
| 2216 | # case the master instance fails, the replica instance will be promoted as |
| 2217 | # the new master instance. <p>Only one replica can be specified as failover |
| 2218 | # target, and the replica has to be in different zone with the master |
| 2219 | # instance. |
Bu Sun Kim | 6502091 | 2020-05-20 12:08:20 -0700 | [diff] [blame] | 2220 | "kind": "A String", # This is always <code>sql#replicaConfiguration</code>. |
| 2221 | "mysqlReplicaConfiguration": { # Read-replica configuration specific to MySQL databases. # MySQL specific configuration when replicating from a MySQL on-premises |
Dan O'Meara | dd49464 | 2020-05-01 07:42:23 -0700 | [diff] [blame] | 2222 | # master. Replication configuration information such as the username, |
| 2223 | # password, certificates, and keys are not stored in the instance metadata. |
| 2224 | # The configuration information is used only to set up the replication |
| 2225 | # connection and is stored by MySQL in a file named <code>master.info</code> |
| 2226 | # in the data directory. |
Bu Sun Kim | 6502091 | 2020-05-20 12:08:20 -0700 | [diff] [blame] | 2227 | "clientKey": "A String", # PEM representation of the slave's private key. The corresponsing public key |
| 2228 | # is encoded in the client's certificate. |
| 2229 | "sslCipher": "A String", # A list of permissible ciphers to use for SSL encryption. |
| 2230 | "masterHeartbeatPeriod": "A String", # Interval in milliseconds between replication heartbeats. |
| 2231 | "connectRetryInterval": 42, # Seconds to wait between connect retries. MySQL's default is 60 seconds. |
| 2232 | "dumpFilePath": "A String", # Path to a SQL dump file in Google Cloud Storage from which the slave |
Dan O'Meara | dd49464 | 2020-05-01 07:42:23 -0700 | [diff] [blame] | 2233 | # instance is to be created. The URI is in the form gs: |
| 2234 | # //bucketName/fileName. Compressed gzip files (.gz) are also supported. |
| 2235 | # // Dumps should have the binlog co-ordinates from which replication should |
| 2236 | # // begin. This can be accomplished by setting --master-data to 1 when using |
| 2237 | # // mysqldump. |
Bu Sun Kim | 6502091 | 2020-05-20 12:08:20 -0700 | [diff] [blame] | 2238 | "clientCertificate": "A String", # PEM representation of the slave's x509 certificate. |
| 2239 | "username": "A String", # The username for the replication connection. |
| 2240 | "caCertificate": "A String", # PEM representation of the trusted CA's x509 certificate. |
| 2241 | "kind": "A String", # This is always <code>sql#mysqlReplicaConfiguration</code>. |
| 2242 | "password": "A String", # The password for the replication connection. |
| 2243 | "verifyServerCertificate": True or False, # Whether or not to check the master's Common Name value in the certificate |
| 2244 | # that it sends during the SSL handshake. |
Nathaniel Manista | 4f877e5 | 2015-06-15 16:44:50 +0000 | [diff] [blame] | 2245 | }, |
| 2246 | }, |
Bu Sun Kim | 6502091 | 2020-05-20 12:08:20 -0700 | [diff] [blame] | 2247 | "connectionName": "A String", # Connection name of the Cloud SQL instance used in connection strings. |
| 2248 | "failoverReplica": { # The name and status of the failover replica. This property is applicable |
| 2249 | # only to Second Generation instances. |
| 2250 | "available": True or False, # The availability status of the failover replica. A false status indicates |
| 2251 | # that the failover replica is out of sync. The master can only failover to |
| 2252 | # the failover replica when the status is true. |
| 2253 | "name": "A String", # The name of the failover replica. If specified at instance creation, a |
| 2254 | # failover replica is created for the instance. The name |
| 2255 | # doesn't include the project ID. This property is applicable only to |
| 2256 | # Second Generation instances. |
| 2257 | }, |
| 2258 | "ipAddresses": [ # The assigned IP addresses for the instance. |
| 2259 | { # Database instance IP Mapping. |
| 2260 | "timeToRetire": "A String", # The due time for this IP to be retired in <a |
| 2261 | # href="https://tools.ietf.org/html/rfc3339">RFC 3339</a> format, for example |
| 2262 | # <code>2012-11-15T16:19:00.094Z</code>. This field is only available when |
| 2263 | # the IP is scheduled to be retired. |
| 2264 | "type": "A String", # The type of this IP address. A <code>PRIMARY</code> address is a public |
| 2265 | # address that can accept incoming connections. A <code>PRIVATE</code> |
| 2266 | # address is a private address that can accept incoming connections. An |
| 2267 | # <code>OUTGOING</code> address is the source address of connections |
| 2268 | # originating from the instance, if supported. |
| 2269 | "ipAddress": "A String", # The IP address assigned. |
| 2270 | }, |
| 2271 | ], |
| 2272 | "ipv6Address": "A String", # The IPv6 address assigned to the instance. This property is applicable only |
| 2273 | # to First Generation instances. |
| 2274 | "selfLink": "A String", # The URI of this resource. |
| 2275 | "diskEncryptionStatus": { # Disk encryption status for an instance. # Disk encryption status specific to an instance. |
| 2276 | # Applies only to Second Generation instances. |
| 2277 | "kmsKeyVersionName": "A String", # KMS key version used to encrypt the Cloud SQL instance resource |
| 2278 | "kind": "A String", # This is always <code>sql#diskEncryptionStatus</code>. |
| 2279 | }, |
| 2280 | "kind": "A String", # This is always <code>sql#instance</code>. |
| 2281 | "region": "A String", # The geographical region. Can be <code>us-central</code> |
| 2282 | # (<code>FIRST_GEN</code> instances only), <code>us-central1</code> |
| 2283 | # (<code>SECOND_GEN</code> instances only), <code>asia-east1</code> or |
| 2284 | # <code>europe-west1</code>. Defaults to <code>us-central</code> or |
| 2285 | # <code>us-central1</code> depending on the instance type (First Generation |
| 2286 | # or Second Generation). The region can not be changed after instance |
| 2287 | # creation. |
| 2288 | "state": "A String", # The current serving state of the Cloud SQL instance. This can be one of the |
| 2289 | # following. <br><code>RUNNABLE</code>: The instance is running, or is ready |
| 2290 | # to run when accessed. <br><code>SUSPENDED</code>: The instance is not |
| 2291 | # available, for example due to problems with billing. |
| 2292 | # <br><code>PENDING_CREATE</code>: The instance is being created. |
| 2293 | # <br><code>MAINTENANCE</code>: The instance is down for maintenance. |
| 2294 | # <br><code>FAILED</code>: The instance creation failed. |
| 2295 | # <br><code>UNKNOWN_STATE</code>: The state of the instance is unknown. |
| 2296 | "backendType": "A String", # <code>FIRST_GEN</code>: First Generation instance. MySQL only. <br |
| 2297 | # /><code>SECOND_GEN</code>: Second Generation instance or PostgreSQL |
| 2298 | # instance. <br /><code>EXTERNAL</code>: A database server that is not |
| 2299 | # managed by Google. <br>This property is read-only; use the |
| 2300 | # <code>tier</code> property in the <code>settings</code> object to determine |
| 2301 | # the database type and Second or First Generation. |
| 2302 | "onPremisesConfiguration": { # On-premises instance configuration. # Configuration specific to on-premises instances. |
| 2303 | "clientKey": "A String", # PEM representation of the slave's private key. The corresponsing public key |
| 2304 | # is encoded in the client's certificate. |
| 2305 | "dumpFilePath": "A String", # The dump file to create the Cloud SQL replica. |
| 2306 | "hostPort": "A String", # The host and port of the on-premises instance in host:port format |
| 2307 | "clientCertificate": "A String", # PEM representation of the slave's x509 certificate. |
| 2308 | "username": "A String", # The username for connecting to on-premises instance. |
| 2309 | "caCertificate": "A String", # PEM representation of the trusted CA's x509 certificate. |
| 2310 | "kind": "A String", # This is always <code>sql#onPremisesConfiguration</code>. |
| 2311 | "password": "A String", # The password for connecting to on-premises instance. |
| 2312 | }, |
| 2313 | "project": "A String", # The project ID of the project containing the Cloud SQL instance. The Google |
| 2314 | # apps domain is prefixed if applicable. |
| 2315 | "serviceAccountEmailAddress": "A String", # The service account email address assigned to the instance. This property |
| 2316 | # is applicable only to Second Generation instances. |
| 2317 | "databaseVersion": "A String", # The database engine type and version. The <code>databaseVersion</code> |
| 2318 | # field can not be changed after instance creation. MySQL Second Generation |
| 2319 | # instances: <code>MYSQL_5_7</code> (default) or <code>MYSQL_5_6</code>. |
| 2320 | # PostgreSQL instances: <code>POSTGRES_9_6</code> (default) or |
| 2321 | # <code>POSTGRES_11 Beta</code> MySQL First Generation |
| 2322 | # instances: <code>MYSQL_5_6</code> (default) or <code>MYSQL_5_5</code> |
Craig Citro | e633be1 | 2015-03-02 13:40:36 -0800 | [diff] [blame] | 2323 | }, |
| 2324 | ], |
Bu Sun Kim | 6502091 | 2020-05-20 12:08:20 -0700 | [diff] [blame] | 2325 | "warnings": [ # List of warnings that occurred while handling the request. |
Bu Sun Kim | 715bd7f | 2019-06-14 16:50:42 -0700 | [diff] [blame] | 2326 | { # An Admin API warning message. |
Bu Sun Kim | 6502091 | 2020-05-20 12:08:20 -0700 | [diff] [blame] | 2327 | "code": "A String", # Code to uniquely identify the warning type. |
| 2328 | "message": "A String", # The warning message. |
Bu Sun Kim | 715bd7f | 2019-06-14 16:50:42 -0700 | [diff] [blame] | 2329 | }, |
| 2330 | ], |
Bu Sun Kim | 6502091 | 2020-05-20 12:08:20 -0700 | [diff] [blame] | 2331 | "nextPageToken": "A String", # The continuation token, used to page through large result sets. Provide |
| 2332 | # this value in a subsequent request to return the next page of results. |
Bu Sun Kim | 715bd7f | 2019-06-14 16:50:42 -0700 | [diff] [blame] | 2333 | }</pre> |
| 2334 | </div> |
| 2335 | |
| 2336 | <div class="method"> |
Dan O'Meara | dd49464 | 2020-05-01 07:42:23 -0700 | [diff] [blame] | 2337 | <code class="details" id="listServerCas">listServerCas(project, instance, x__xgafv=None)</code> |
| 2338 | <pre>Lists all of the trusted Certificate Authorities (CAs) for the specified |
| 2339 | instance. There can be up to three CAs listed: the CA that was used to sign |
| 2340 | the certificate that is currently in use, a CA that has been added but not |
| 2341 | yet used to sign a certificate, and a CA used to sign a certificate that |
| 2342 | has previously rotated out. |
Bu Sun Kim | 715bd7f | 2019-06-14 16:50:42 -0700 | [diff] [blame] | 2343 | |
| 2344 | Args: |
| 2345 | project: string, Project ID of the project that contains the instance. (required) |
| 2346 | 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] | 2347 | x__xgafv: string, V1 error format. |
| 2348 | Allowed values |
| 2349 | 1 - v1 error format |
| 2350 | 2 - v2 error format |
Bu Sun Kim | 715bd7f | 2019-06-14 16:50:42 -0700 | [diff] [blame] | 2351 | |
| 2352 | Returns: |
| 2353 | An object of the form: |
| 2354 | |
| 2355 | { # Instances ListServerCas response. |
Bu Sun Kim | 6502091 | 2020-05-20 12:08:20 -0700 | [diff] [blame] | 2356 | "activeVersion": "A String", |
| 2357 | "kind": "A String", # This is always <code>sql#instancesListServerCas</code>. |
| 2358 | "certs": [ # List of server CA certificates for the instance. |
Bu Sun Kim | 715bd7f | 2019-06-14 16:50:42 -0700 | [diff] [blame] | 2359 | { # SslCerts Resource |
Bu Sun Kim | 6502091 | 2020-05-20 12:08:20 -0700 | [diff] [blame] | 2360 | "sha1Fingerprint": "A String", # Sha1 Fingerprint. |
| 2361 | "certSerialNumber": "A String", # Serial number, as extracted from the certificate. |
| 2362 | "cert": "A String", # PEM representation. |
| 2363 | "kind": "A String", # This is always <code>sql#sslCert</code>. |
| 2364 | "commonName": "A String", # User supplied name. Constrained to [a-zA-Z.-_ ]+. |
| 2365 | "createTime": "A String", # The time when the certificate was created in <a |
| 2366 | # href="https://tools.ietf.org/html/rfc3339">RFC 3339</a> format, for example |
Dan O'Meara | dd49464 | 2020-05-01 07:42:23 -0700 | [diff] [blame] | 2367 | # <code>2012-11-15T16:19:00.094Z</code> |
Bu Sun Kim | 6502091 | 2020-05-20 12:08:20 -0700 | [diff] [blame] | 2368 | "instance": "A String", # Name of the database instance. |
| 2369 | "selfLink": "A String", # The URI of this resource. |
| 2370 | "expirationTime": "A String", # The time when the certificate expires in <a |
| 2371 | # href="https://tools.ietf.org/html/rfc3339">RFC 3339</a> format, for example |
| 2372 | # <code>2012-11-15T16:19:00.094Z</code>. |
Bu Sun Kim | 715bd7f | 2019-06-14 16:50:42 -0700 | [diff] [blame] | 2373 | }, |
| 2374 | ], |
Craig Citro | e633be1 | 2015-03-02 13:40:36 -0800 | [diff] [blame] | 2375 | }</pre> |
| 2376 | </div> |
| 2377 | |
| 2378 | <div class="method"> |
| 2379 | <code class="details" id="list_next">list_next(previous_request, previous_response)</code> |
| 2380 | <pre>Retrieves the next page of results. |
| 2381 | |
| 2382 | Args: |
| 2383 | previous_request: The request for the previous page. (required) |
| 2384 | previous_response: The response from the request for the previous page. (required) |
| 2385 | |
| 2386 | Returns: |
Bu Sun Kim | 6502091 | 2020-05-20 12:08:20 -0700 | [diff] [blame] | 2387 | 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] | 2388 | page. Returns None if there are no more items in the collection. |
| 2389 | </pre> |
| 2390 | </div> |
| 2391 | |
| 2392 | <div class="method"> |
Dan O'Meara | dd49464 | 2020-05-01 07:42:23 -0700 | [diff] [blame] | 2393 | <code class="details" id="patch">patch(project, instance, body=None, x__xgafv=None)</code> |
| 2394 | <pre>Updates settings of a Cloud SQL instance. |
| 2395 | This method supports patch semantics. |
Craig Citro | e633be1 | 2015-03-02 13:40:36 -0800 | [diff] [blame] | 2396 | |
| 2397 | Args: |
| 2398 | project: string, Project ID of the project that contains the instance. (required) |
| 2399 | 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] | 2400 | body: object, The request body. |
Craig Citro | e633be1 | 2015-03-02 13:40:36 -0800 | [diff] [blame] | 2401 | The object takes the form of: |
| 2402 | |
| 2403 | { # A Cloud SQL instance resource. |
Bu Sun Kim | 6502091 | 2020-05-20 12:08:20 -0700 | [diff] [blame] | 2404 | "suspensionReason": [ # If the instance state is SUSPENDED, the reason for the suspension. |
| 2405 | "A String", |
| 2406 | ], |
| 2407 | "settings": { # Database instance settings. # The user settings. |
| 2408 | "ipConfiguration": { # IP Management configuration. # The settings for IP Management. This allows to enable or disable the |
| 2409 | # instance IP and manage which external networks can connect to the instance. |
| 2410 | # The IPv4 address cannot be disabled for Second Generation instances. |
| 2411 | "requireSsl": True or False, # Whether SSL connections over IP should be enforced or not. |
| 2412 | "privateNetwork": "A String", # The resource link for the VPC network from which the Cloud SQL instance is |
| 2413 | # accessible for private IP. For example, |
| 2414 | # <code>/projects/myProject/global/networks/default</code>. This setting can |
| 2415 | # be updated, but it cannot be removed after it is set. |
| 2416 | "ipv4Enabled": True or False, # Whether the instance should be assigned an IP address or not. |
| 2417 | "authorizedNetworks": [ # The list of external networks that are allowed to connect to the instance |
| 2418 | # using the IP. In <a |
| 2419 | # href="http://en.wikipedia.org/wiki/CIDR_notation#CIDR_notation">CIDR |
| 2420 | # notation</a>, also known as 'slash' notation (e.g. |
| 2421 | # <code>192.168.100.0/24</code>). |
| 2422 | { # An entry for an Access Control list. |
| 2423 | "name": "A String", # Optional. A label to identify this entry. |
| 2424 | "kind": "A String", # This is always <code>sql#aclEntry</code>. |
| 2425 | "value": "A String", # The whitelisted value for the access control list. |
| 2426 | "expirationTime": "A String", # The time when this access control entry expires in <a |
| 2427 | # href="https://tools.ietf.org/html/rfc3339">RFC 3339</a> format, for example |
| 2428 | # <code>2012-11-15T16:19:00.094Z</code>. |
| 2429 | }, |
| 2430 | ], |
Jon Wayne Parrott | 0a471d3 | 2016-05-19 10:54:38 -0700 | [diff] [blame] | 2431 | }, |
Bu Sun Kim | 6502091 | 2020-05-20 12:08:20 -0700 | [diff] [blame] | 2432 | "availabilityType": "A String", # Availability type (PostgreSQL and MySQL instances only). Potential values: |
Dan O'Meara | dd49464 | 2020-05-01 07:42:23 -0700 | [diff] [blame] | 2433 | # <br><code>ZONAL</code>: The instance serves data from only one zone. |
| 2434 | # Outages in that zone affect data accessibility. <br><code>REGIONAL</code>: |
| 2435 | # The instance can serve data from more than one zone in a region (it is |
| 2436 | # highly available). <br>For more information, see <a |
Bu Sun Kim | 6502091 | 2020-05-20 12:08:20 -0700 | [diff] [blame] | 2437 | # href="https://cloud.google.com/sql/docs/postgres/high-availability">Overview |
Dan O'Meara | dd49464 | 2020-05-01 07:42:23 -0700 | [diff] [blame] | 2438 | # of the High Availability Configuration</a>. |
Bu Sun Kim | 6502091 | 2020-05-20 12:08:20 -0700 | [diff] [blame] | 2439 | "settingsVersion": "A String", # The version of instance settings. This is a required field for update |
| 2440 | # method to make sure concurrent updates are handled properly. During update, |
| 2441 | # use the most recent settingsVersion value for this instance and do not try |
| 2442 | # to update this value. |
| 2443 | "databaseFlags": [ # The database flags passed to the instance at startup. |
| 2444 | { # Database flags for Cloud SQL instances. |
| 2445 | "name": "A String", # The name of the flag. These flags are passed at instance startup, so |
| 2446 | # include both server options and system variables for MySQL. Flags should be |
| 2447 | # specified with underscores, not hyphens. For more information, see <a |
| 2448 | # href="/sql/docs/mysql/flags">Configuring Database Flags</a> in the Cloud |
| 2449 | # SQL documentation. |
| 2450 | "value": "A String", # The value of the flag. Booleans should be set to <code>on</code> for true |
| 2451 | # and <code>off</code> for false. This field must be omitted if the flag |
| 2452 | # doesn't take a value. |
| 2453 | }, |
Dan O'Meara | dd49464 | 2020-05-01 07:42:23 -0700 | [diff] [blame] | 2454 | ], |
Bu Sun Kim | 6502091 | 2020-05-20 12:08:20 -0700 | [diff] [blame] | 2455 | "maintenanceWindow": { # Maintenance window. This specifies when a v2 Cloud SQL instance should # The maintenance window for this instance. This specifies when the instance |
| 2456 | # can be restarted for maintenance purposes. Not used for First Generation |
| 2457 | # instances. |
| 2458 | # preferably be restarted for system maintenance purposes. |
| 2459 | "hour": 42, # hour of day - 0 to 23. |
| 2460 | "day": 42, # day of week (1-7), starting on Monday. |
| 2461 | "kind": "A String", # This is always <code>sql#maintenanceWindow</code>. |
| 2462 | "updateTrack": "A String", # Maintenance timing setting: <code>canary</code> (Earlier) or |
| 2463 | # <code>stable</code> (Later). <br /><a |
| 2464 | # href="/sql/docs/db_path/instance-settings#maintenance-timing-2ndgen"> |
| 2465 | # Learn more</a>. |
| 2466 | }, |
| 2467 | "pricingPlan": "A String", # The pricing plan for this instance. This can be either <code>PER_USE</code> |
| 2468 | # or <code>PACKAGE</code>. Only <code>PER_USE</code> is supported for Second |
| 2469 | # Generation instances. |
| 2470 | "storageAutoResize": True or False, # Configuration to increase storage size automatically. The default value is |
| 2471 | # true. Not used for First Generation instances. |
| 2472 | "storageAutoResizeLimit": "A String", # The maximum size to which storage capacity can be automatically increased. |
| 2473 | # The default value is 0, which specifies that there is no limit. Not used |
| 2474 | # for First Generation instances. |
| 2475 | "authorizedGaeApplications": [ # The App Engine app IDs that can access this instance. First Generation |
| 2476 | # instances only. |
| 2477 | "A String", |
| 2478 | ], |
| 2479 | "tier": "A String", # The tier (or machine type) for this instance, for example |
| 2480 | # <code>db-n1-standard-1</code> (MySQL instances) or |
| 2481 | # <code>db-custom-1-3840</code> (PostgreSQL instances). For MySQL instances, |
| 2482 | # this property determines whether the instance is First or Second |
| 2483 | # Generation. For more information, see <a |
| 2484 | # href="/sql/docs/db_path/instance-settings">Instance Settings</a>. |
| 2485 | "dataDiskSizeGb": "A String", # The size of data disk, in GB. The data disk size minimum is 10GB. Not used |
| 2486 | # for First Generation instances. |
| 2487 | "dataDiskType": "A String", # The type of data disk: <code>PD_SSD</code> (default) or |
| 2488 | # <code>PD_HDD</code>. Not used for First Generation instances. |
| 2489 | "databaseReplicationEnabled": True or False, # Configuration specific to read replica instances. Indicates whether |
| 2490 | # replication is enabled or not. |
| 2491 | "crashSafeReplicationEnabled": True or False, # Configuration specific to read replica instances. Indicates whether |
| 2492 | # database flags for crash-safe replication are enabled. This property is |
| 2493 | # only applicable to First Generation instances. |
| 2494 | "backupConfiguration": { # Database instance backup configuration. # The daily backup configuration for the instance. |
| 2495 | "binaryLogEnabled": True or False, # (MySQL only) Whether binary log is enabled. If backup configuration is |
| 2496 | # disabled, binarylog must be disabled as well. |
| 2497 | "replicationLogArchivingEnabled": True or False, # Reserved for future use. |
| 2498 | "location": "A String", # Location of the backup |
| 2499 | "pointInTimeRecoveryEnabled": True or False, # Reserved for future use. |
| 2500 | "startTime": "A String", # Start time for the daily backup configuration in UTC timezone in the 24 |
| 2501 | # hour format - <code>HH:MM</code>. |
| 2502 | "kind": "A String", # This is always <code>sql#backupConfiguration</code>. |
| 2503 | "enabled": True or False, # Whether this configuration is enabled. |
| 2504 | }, |
| 2505 | "userLabels": { # User-provided labels, represented as a dictionary where each label is a |
| 2506 | # single key value pair. |
| 2507 | "a_key": "A String", |
| 2508 | }, |
| 2509 | "locationPreference": { # Preferred location. This specifies where a Cloud SQL instance should # The location preference settings. This allows the instance to be located as |
| 2510 | # near as possible to either an App Engine app or Compute Engine zone for |
| 2511 | # better performance. App Engine co-location is only applicable to First |
| 2512 | # Generation instances. |
| 2513 | # preferably be located, either in a specific Compute Engine zone, or |
| 2514 | # co-located with an App Engine application. Note that if the preferred |
| 2515 | # location is not available, the instance will be located as close as possible |
| 2516 | # within the region. Only one location may be specified. |
| 2517 | "zone": "A String", # The preferred Compute Engine zone (e.g. us-central1-a, us-central1-b, |
| 2518 | # etc.). |
| 2519 | "followGaeApplication": "A String", # The AppEngine application to follow, it must be in the same region as the |
| 2520 | # Cloud SQL instance. |
| 2521 | "kind": "A String", # This is always <code>sql#locationPreference</code>. |
| 2522 | }, |
| 2523 | "kind": "A String", # This is always <code>sql#settings</code>. |
| 2524 | "replicationType": "A String", # The type of replication this instance uses. This can be either |
| 2525 | # <code>ASYNCHRONOUS</code> or <code>SYNCHRONOUS</code>. This property is |
| 2526 | # only applicable to First Generation instances. |
| 2527 | "activationPolicy": "A String", # The activation policy specifies when the instance is activated; it is |
Dan O'Meara | dd49464 | 2020-05-01 07:42:23 -0700 | [diff] [blame] | 2528 | # applicable only when the instance state is <code>RUNNABLE</code>. Valid |
| 2529 | # values: <br><code>ALWAYS</code>: The instance is on, and remains so even in |
| 2530 | # the absence of connection requests. <br><code>NEVER</code>: The instance is |
| 2531 | # off; it is not activated, even if a connection request arrives. |
| 2532 | # <br><code>ON_DEMAND</code>: First Generation instances only. The instance |
| 2533 | # responds to incoming requests, and turns itself off when not in use. |
| 2534 | # Instances with <code>PER_USE</code> pricing turn off after 15 minutes of |
| 2535 | # inactivity. Instances with <code>PER_PACKAGE</code> pricing turn off after |
| 2536 | # 12 hours of inactivity. |
Jon Wayne Parrott | 0a471d3 | 2016-05-19 10:54:38 -0700 | [diff] [blame] | 2537 | }, |
Bu Sun Kim | 6502091 | 2020-05-20 12:08:20 -0700 | [diff] [blame] | 2538 | "replicaNames": [ # The replicas of the instance. |
| 2539 | "A String", |
| 2540 | ], |
| 2541 | "diskEncryptionConfiguration": { # Disk encryption configuration for an instance. # Disk encryption configuration specific to an instance. |
| 2542 | # Applies only to Second Generation instances. |
| 2543 | "kind": "A String", # This is always <code>sql#diskEncryptionConfiguration</code>. |
| 2544 | "kmsKeyName": "A String", # Resource name of KMS key for disk encryption |
| 2545 | }, |
| 2546 | "scheduledMaintenance": { # Any scheduled maintenancce for this instance. # The start time of any upcoming scheduled maintenance for this instance. |
| 2547 | "canDefer": True or False, |
| 2548 | "startTime": "A String", # The start time of any upcoming scheduled maintenance for this instance. |
| 2549 | "canReschedule": True or False, # If the scheduled maintenance can be rescheduled. |
| 2550 | }, |
| 2551 | "rootPassword": "A String", # Initial root password. Use only on creation. |
| 2552 | "etag": "A String", # This field is deprecated and will be removed from a future version of the |
| 2553 | # API. Use the <code>settings.settingsVersion</code> field instead. |
| 2554 | "serverCaCert": { # SslCerts Resource # SSL configuration. |
| 2555 | "sha1Fingerprint": "A String", # Sha1 Fingerprint. |
| 2556 | "certSerialNumber": "A String", # Serial number, as extracted from the certificate. |
| 2557 | "cert": "A String", # PEM representation. |
| 2558 | "kind": "A String", # This is always <code>sql#sslCert</code>. |
| 2559 | "commonName": "A String", # User supplied name. Constrained to [a-zA-Z.-_ ]+. |
| 2560 | "createTime": "A String", # The time when the certificate was created in <a |
| 2561 | # href="https://tools.ietf.org/html/rfc3339">RFC 3339</a> format, for example |
| 2562 | # <code>2012-11-15T16:19:00.094Z</code> |
| 2563 | "instance": "A String", # Name of the database instance. |
| 2564 | "selfLink": "A String", # The URI of this resource. |
| 2565 | "expirationTime": "A String", # The time when the certificate expires in <a |
| 2566 | # href="https://tools.ietf.org/html/rfc3339">RFC 3339</a> format, for example |
| 2567 | # <code>2012-11-15T16:19:00.094Z</code>. |
| 2568 | }, |
| 2569 | "maxDiskSize": "A String", # The maximum disk size of the instance in bytes. |
| 2570 | "name": "A String", # Name of the Cloud SQL instance. This does not include the project ID. |
| 2571 | "masterInstanceName": "A String", # The name of the instance which will act as master in the replication setup. |
| 2572 | "instanceType": "A String", # The instance type. This can be one of the following. |
| 2573 | # <br><code>CLOUD_SQL_INSTANCE</code>: A Cloud SQL instance that is not |
| 2574 | # replicating from a master. <br><code>ON_PREMISES_INSTANCE</code>: An |
| 2575 | # instance running on the |
| 2576 | # customer's premises. <br><code>READ_REPLICA_INSTANCE</code>: A Cloud SQL |
| 2577 | # instance configured as a read-replica. |
| 2578 | "gceZone": "A String", # The Compute Engine zone that the instance is currently serving from. This |
| 2579 | # value could be different from the zone that was specified when the instance |
| 2580 | # was created if the instance has failed over to its secondary zone. |
| 2581 | "currentDiskSize": "A String", # The current disk usage of the instance in bytes. This property has been |
| 2582 | # deprecated. Users should use the |
| 2583 | # "cloudsql.googleapis.com/database/disk/bytes_used" metric in Cloud |
| 2584 | # Monitoring API instead. Please see <a |
| 2585 | # href="https://groups.google.com/d/msg/google-cloud-sql-announce/I_7-F9EBhT0/BtvFtdFeAgAJ">this |
| 2586 | # announcement</a> for details. |
| 2587 | "replicaConfiguration": { # Read-replica configuration for connecting to the master. # Configuration specific to failover replicas and read replicas. |
| 2588 | "failoverTarget": True or False, # Specifies if the replica is the failover target. If the field is set to |
Dan O'Meara | dd49464 | 2020-05-01 07:42:23 -0700 | [diff] [blame] | 2589 | # <code>true</code> the replica will be designated as a failover replica. In |
| 2590 | # case the master instance fails, the replica instance will be promoted as |
| 2591 | # the new master instance. <p>Only one replica can be specified as failover |
| 2592 | # target, and the replica has to be in different zone with the master |
| 2593 | # instance. |
Bu Sun Kim | 6502091 | 2020-05-20 12:08:20 -0700 | [diff] [blame] | 2594 | "kind": "A String", # This is always <code>sql#replicaConfiguration</code>. |
| 2595 | "mysqlReplicaConfiguration": { # Read-replica configuration specific to MySQL databases. # MySQL specific configuration when replicating from a MySQL on-premises |
Dan O'Meara | dd49464 | 2020-05-01 07:42:23 -0700 | [diff] [blame] | 2596 | # master. Replication configuration information such as the username, |
| 2597 | # password, certificates, and keys are not stored in the instance metadata. |
| 2598 | # The configuration information is used only to set up the replication |
| 2599 | # connection and is stored by MySQL in a file named <code>master.info</code> |
| 2600 | # in the data directory. |
Bu Sun Kim | 6502091 | 2020-05-20 12:08:20 -0700 | [diff] [blame] | 2601 | "clientKey": "A String", # PEM representation of the slave's private key. The corresponsing public key |
| 2602 | # is encoded in the client's certificate. |
| 2603 | "sslCipher": "A String", # A list of permissible ciphers to use for SSL encryption. |
| 2604 | "masterHeartbeatPeriod": "A String", # Interval in milliseconds between replication heartbeats. |
| 2605 | "connectRetryInterval": 42, # Seconds to wait between connect retries. MySQL's default is 60 seconds. |
| 2606 | "dumpFilePath": "A String", # Path to a SQL dump file in Google Cloud Storage from which the slave |
Dan O'Meara | dd49464 | 2020-05-01 07:42:23 -0700 | [diff] [blame] | 2607 | # instance is to be created. The URI is in the form gs: |
| 2608 | # //bucketName/fileName. Compressed gzip files (.gz) are also supported. |
| 2609 | # // Dumps should have the binlog co-ordinates from which replication should |
| 2610 | # // begin. This can be accomplished by setting --master-data to 1 when using |
| 2611 | # // mysqldump. |
Bu Sun Kim | 6502091 | 2020-05-20 12:08:20 -0700 | [diff] [blame] | 2612 | "clientCertificate": "A String", # PEM representation of the slave's x509 certificate. |
| 2613 | "username": "A String", # The username for the replication connection. |
| 2614 | "caCertificate": "A String", # PEM representation of the trusted CA's x509 certificate. |
| 2615 | "kind": "A String", # This is always <code>sql#mysqlReplicaConfiguration</code>. |
| 2616 | "password": "A String", # The password for the replication connection. |
| 2617 | "verifyServerCertificate": True or False, # Whether or not to check the master's Common Name value in the certificate |
| 2618 | # that it sends during the SSL handshake. |
Nathaniel Manista | 4f877e5 | 2015-06-15 16:44:50 +0000 | [diff] [blame] | 2619 | }, |
| 2620 | }, |
Bu Sun Kim | 6502091 | 2020-05-20 12:08:20 -0700 | [diff] [blame] | 2621 | "connectionName": "A String", # Connection name of the Cloud SQL instance used in connection strings. |
| 2622 | "failoverReplica": { # The name and status of the failover replica. This property is applicable |
| 2623 | # only to Second Generation instances. |
| 2624 | "available": True or False, # The availability status of the failover replica. A false status indicates |
| 2625 | # that the failover replica is out of sync. The master can only failover to |
| 2626 | # the failover replica when the status is true. |
| 2627 | "name": "A String", # The name of the failover replica. If specified at instance creation, a |
| 2628 | # failover replica is created for the instance. The name |
| 2629 | # doesn't include the project ID. This property is applicable only to |
| 2630 | # Second Generation instances. |
| 2631 | }, |
| 2632 | "ipAddresses": [ # The assigned IP addresses for the instance. |
| 2633 | { # Database instance IP Mapping. |
| 2634 | "timeToRetire": "A String", # The due time for this IP to be retired in <a |
| 2635 | # href="https://tools.ietf.org/html/rfc3339">RFC 3339</a> format, for example |
| 2636 | # <code>2012-11-15T16:19:00.094Z</code>. This field is only available when |
| 2637 | # the IP is scheduled to be retired. |
| 2638 | "type": "A String", # The type of this IP address. A <code>PRIMARY</code> address is a public |
| 2639 | # address that can accept incoming connections. A <code>PRIVATE</code> |
| 2640 | # address is a private address that can accept incoming connections. An |
| 2641 | # <code>OUTGOING</code> address is the source address of connections |
| 2642 | # originating from the instance, if supported. |
| 2643 | "ipAddress": "A String", # The IP address assigned. |
| 2644 | }, |
| 2645 | ], |
| 2646 | "ipv6Address": "A String", # The IPv6 address assigned to the instance. This property is applicable only |
| 2647 | # to First Generation instances. |
| 2648 | "selfLink": "A String", # The URI of this resource. |
| 2649 | "diskEncryptionStatus": { # Disk encryption status for an instance. # Disk encryption status specific to an instance. |
| 2650 | # Applies only to Second Generation instances. |
| 2651 | "kmsKeyVersionName": "A String", # KMS key version used to encrypt the Cloud SQL instance resource |
| 2652 | "kind": "A String", # This is always <code>sql#diskEncryptionStatus</code>. |
| 2653 | }, |
| 2654 | "kind": "A String", # This is always <code>sql#instance</code>. |
| 2655 | "region": "A String", # The geographical region. Can be <code>us-central</code> |
| 2656 | # (<code>FIRST_GEN</code> instances only), <code>us-central1</code> |
| 2657 | # (<code>SECOND_GEN</code> instances only), <code>asia-east1</code> or |
| 2658 | # <code>europe-west1</code>. Defaults to <code>us-central</code> or |
| 2659 | # <code>us-central1</code> depending on the instance type (First Generation |
| 2660 | # or Second Generation). The region can not be changed after instance |
| 2661 | # creation. |
| 2662 | "state": "A String", # The current serving state of the Cloud SQL instance. This can be one of the |
| 2663 | # following. <br><code>RUNNABLE</code>: The instance is running, or is ready |
| 2664 | # to run when accessed. <br><code>SUSPENDED</code>: The instance is not |
| 2665 | # available, for example due to problems with billing. |
| 2666 | # <br><code>PENDING_CREATE</code>: The instance is being created. |
| 2667 | # <br><code>MAINTENANCE</code>: The instance is down for maintenance. |
| 2668 | # <br><code>FAILED</code>: The instance creation failed. |
| 2669 | # <br><code>UNKNOWN_STATE</code>: The state of the instance is unknown. |
| 2670 | "backendType": "A String", # <code>FIRST_GEN</code>: First Generation instance. MySQL only. <br |
| 2671 | # /><code>SECOND_GEN</code>: Second Generation instance or PostgreSQL |
| 2672 | # instance. <br /><code>EXTERNAL</code>: A database server that is not |
| 2673 | # managed by Google. <br>This property is read-only; use the |
| 2674 | # <code>tier</code> property in the <code>settings</code> object to determine |
| 2675 | # the database type and Second or First Generation. |
| 2676 | "onPremisesConfiguration": { # On-premises instance configuration. # Configuration specific to on-premises instances. |
| 2677 | "clientKey": "A String", # PEM representation of the slave's private key. The corresponsing public key |
| 2678 | # is encoded in the client's certificate. |
| 2679 | "dumpFilePath": "A String", # The dump file to create the Cloud SQL replica. |
| 2680 | "hostPort": "A String", # The host and port of the on-premises instance in host:port format |
| 2681 | "clientCertificate": "A String", # PEM representation of the slave's x509 certificate. |
| 2682 | "username": "A String", # The username for connecting to on-premises instance. |
| 2683 | "caCertificate": "A String", # PEM representation of the trusted CA's x509 certificate. |
| 2684 | "kind": "A String", # This is always <code>sql#onPremisesConfiguration</code>. |
| 2685 | "password": "A String", # The password for connecting to on-premises instance. |
| 2686 | }, |
| 2687 | "project": "A String", # The project ID of the project containing the Cloud SQL instance. The Google |
| 2688 | # apps domain is prefixed if applicable. |
| 2689 | "serviceAccountEmailAddress": "A String", # The service account email address assigned to the instance. This property |
| 2690 | # is applicable only to Second Generation instances. |
| 2691 | "databaseVersion": "A String", # The database engine type and version. The <code>databaseVersion</code> |
| 2692 | # field can not be changed after instance creation. MySQL Second Generation |
| 2693 | # instances: <code>MYSQL_5_7</code> (default) or <code>MYSQL_5_6</code>. |
| 2694 | # PostgreSQL instances: <code>POSTGRES_9_6</code> (default) or |
| 2695 | # <code>POSTGRES_11 Beta</code> MySQL First Generation |
| 2696 | # instances: <code>MYSQL_5_6</code> (default) or <code>MYSQL_5_5</code> |
Craig Citro | e633be1 | 2015-03-02 13:40:36 -0800 | [diff] [blame] | 2697 | } |
| 2698 | |
Dan O'Meara | dd49464 | 2020-05-01 07:42:23 -0700 | [diff] [blame] | 2699 | x__xgafv: string, V1 error format. |
| 2700 | Allowed values |
| 2701 | 1 - v1 error format |
| 2702 | 2 - v2 error format |
Craig Citro | e633be1 | 2015-03-02 13:40:36 -0800 | [diff] [blame] | 2703 | |
| 2704 | Returns: |
| 2705 | An object of the form: |
| 2706 | |
Dan O'Meara | dd49464 | 2020-05-01 07:42:23 -0700 | [diff] [blame] | 2707 | { # An Operation resource.&nbsp;For successful operations that return an |
| 2708 | # Operation resource, only the fields relevant to the operation are populated |
| 2709 | # in the resource. |
Bu Sun Kim | 6502091 | 2020-05-20 12:08:20 -0700 | [diff] [blame] | 2710 | "endTime": "A String", # The time this operation finished in UTC timezone in <a |
| 2711 | # href="https://tools.ietf.org/html/rfc3339">RFC 3339</a> format, for example |
| 2712 | # <code>2012-11-15T16:19:00.094Z</code>. |
| 2713 | "startTime": "A String", # The time this operation actually started in UTC timezone in <a |
| 2714 | # href="https://tools.ietf.org/html/rfc3339">RFC 3339</a> format, for example |
| 2715 | # <code>2012-11-15T16:19:00.094Z</code>. |
| 2716 | "insertTime": "A String", # The time this operation was enqueued in UTC timezone in <a |
| 2717 | # href="https://tools.ietf.org/html/rfc3339">RFC 3339</a> format, for example |
| 2718 | # <code>2012-11-15T16:19:00.094Z</code>. |
| 2719 | "user": "A String", # The email address of the user who initiated this operation. |
| 2720 | "targetProject": "A String", # The project ID of the target instance related to this operation. |
| 2721 | "selfLink": "A String", # The URI of this resource. |
| 2722 | "targetLink": "A String", |
| 2723 | "operationType": "A String", # The type of the operation. Valid values are <code>CREATE</code>, |
| 2724 | # <code>DELETE</code>, <code>UPDATE</code>, <code>RESTART</code>, |
| 2725 | # <code>IMPORT</code>, <code>EXPORT</code>, <code>BACKUP_VOLUME</code>, |
| 2726 | # <code>RESTORE_VOLUME</code>, <code>CREATE_USER</code>, |
| 2727 | # <code>DELETE_USER</code>, <code>CREATE_DATABASE</code>, |
| 2728 | # <code>DELETE_DATABASE</code> . |
| 2729 | "error": { # Database instance operation errors list wrapper. # If errors occurred during processing of this operation, this field will be |
| 2730 | # populated. |
| 2731 | "errors": [ # The list of errors encountered while processing this operation. |
| 2732 | { # Database instance operation error. |
| 2733 | "kind": "A String", # This is always <code>sql#operationError</code>. |
| 2734 | "code": "A String", # Identifies the specific error that occurred. |
| 2735 | "message": "A String", # Additional information about the error encountered. |
Dan O'Meara | dd49464 | 2020-05-01 07:42:23 -0700 | [diff] [blame] | 2736 | }, |
Bu Sun Kim | 6502091 | 2020-05-20 12:08:20 -0700 | [diff] [blame] | 2737 | ], |
| 2738 | "kind": "A String", # This is always <code>sql#operationErrors</code>. |
| 2739 | }, |
| 2740 | "kind": "A String", # This is always <code>sql#operation</code>. |
| 2741 | "importContext": { # Database instance import context. # The context for import operation, if applicable. |
| 2742 | "kind": "A String", # This is always <code>sql#importContext</code>. |
| 2743 | "csvImportOptions": { # Options for importing data as CSV. |
| 2744 | "table": "A String", # The table to which CSV data is imported. |
| 2745 | "columns": [ # The columns to which CSV data is imported. If not specified, all columns |
| 2746 | # of the database table are loaded with CSV data. |
| 2747 | "A String", |
| 2748 | ], |
Dan O'Meara | dd49464 | 2020-05-01 07:42:23 -0700 | [diff] [blame] | 2749 | }, |
Bu Sun Kim | 6502091 | 2020-05-20 12:08:20 -0700 | [diff] [blame] | 2750 | "database": "A String", # The target database for the import. If <code>fileType</code> is |
Dan O'Meara | dd49464 | 2020-05-01 07:42:23 -0700 | [diff] [blame] | 2751 | # <code>SQL</code>, this field is required only if the import file does not |
| 2752 | # specify a database, and is overridden by any database specification in the |
| 2753 | # import file. If <code>fileType</code> is <code>CSV</code>, one database |
| 2754 | # must be specified. |
Bu Sun Kim | 6502091 | 2020-05-20 12:08:20 -0700 | [diff] [blame] | 2755 | "importUser": "A String", # The PostgreSQL user for this import operation. PostgreSQL instances only. |
| 2756 | "bakImportOptions": { # Import parameters specific to SQL Server .BAK files |
| 2757 | "encryptionOptions": { |
| 2758 | "certPath": "A String", # Path to the Certificate (.cer) in Cloud Storage, in the form |
| 2759 | # <code>gs://bucketName/fileName</code>. The instance must have |
| 2760 | # write permissions to the bucket and read access to the file. |
| 2761 | "pvkPath": "A String", # Path to the Certificate Private Key (.pvk) in Cloud Storage, in the |
| 2762 | # form <code>gs://bucketName/fileName</code>. The instance must have |
| 2763 | # write permissions to the bucket and read access to the file. |
| 2764 | "pvkPassword": "A String", # Password that encrypts the private key |
| 2765 | }, |
| 2766 | }, |
| 2767 | "uri": "A String", # Path to the import file in Cloud Storage, in the form |
Dan O'Meara | dd49464 | 2020-05-01 07:42:23 -0700 | [diff] [blame] | 2768 | # <code>gs: |
| 2769 | # //bucketName/fileName</code>. Compressed gzip files (.gz) are supported |
| 2770 | # // when <code>fileType</code> is <code>SQL</code>. The instance must have |
| 2771 | # // write permissions to the bucket and read access to the file. |
Bu Sun Kim | 6502091 | 2020-05-20 12:08:20 -0700 | [diff] [blame] | 2772 | "fileType": "A String", # The file type for the specified uri. <br><code>SQL</code>: The file |
| 2773 | # contains SQL statements. <br><code>CSV</code>: The file contains CSV data. |
Craig Citro | e633be1 | 2015-03-02 13:40:36 -0800 | [diff] [blame] | 2774 | }, |
Bu Sun Kim | 6502091 | 2020-05-20 12:08:20 -0700 | [diff] [blame] | 2775 | "status": "A String", # The status of an operation. Valid values are <code>PENDING</code>, |
| 2776 | # <code>RUNNING</code>, <code>DONE</code>, |
| 2777 | # <code>SQL_OPERATION_STATUS_UNSPECIFIED</code>. |
| 2778 | "name": "A String", # An identifier that uniquely identifies the operation. You can use this |
Dan O'Meara | dd49464 | 2020-05-01 07:42:23 -0700 | [diff] [blame] | 2779 | # identifier to retrieve the Operations resource that has information about |
| 2780 | # the operation. |
Bu Sun Kim | 6502091 | 2020-05-20 12:08:20 -0700 | [diff] [blame] | 2781 | "exportContext": { # Database instance export context. # The context for export operation, if applicable. |
| 2782 | "databases": [ # Databases to be exported. <br /> <b>MySQL instances:</b> If |
Dan O'Meara | dd49464 | 2020-05-01 07:42:23 -0700 | [diff] [blame] | 2783 | # <code>fileType</code> is <code>SQL</code> and no database is specified, all |
| 2784 | # databases are exported, except for the <code>mysql</code> system database. |
| 2785 | # If <code>fileType</code> is <code>CSV</code>, you can specify one database, |
| 2786 | # either by using this property or by using the |
| 2787 | # <code>csvExportOptions.selectQuery</code> property, which takes precedence |
| 2788 | # over this property. <br /> <b>PostgreSQL instances:</b> You must specify |
| 2789 | # one database to be exported. If <code>fileType</code> is <code>CSV</code>, |
| 2790 | # this database must match the one specified in the |
| 2791 | # <code>csvExportOptions.selectQuery</code> property. |
Bu Sun Kim | 6502091 | 2020-05-20 12:08:20 -0700 | [diff] [blame] | 2792 | "A String", |
Craig Citro | e633be1 | 2015-03-02 13:40:36 -0800 | [diff] [blame] | 2793 | ], |
Bu Sun Kim | 6502091 | 2020-05-20 12:08:20 -0700 | [diff] [blame] | 2794 | "sqlExportOptions": { # Options for exporting data as SQL statements. |
| 2795 | "tables": [ # Tables to export, or that were exported, from the specified database. If |
Dan O'Meara | dd49464 | 2020-05-01 07:42:23 -0700 | [diff] [blame] | 2796 | # you specify tables, specify one and only one database. For PostgreSQL |
| 2797 | # instances, you can specify only one table. |
Bu Sun Kim | 6502091 | 2020-05-20 12:08:20 -0700 | [diff] [blame] | 2798 | "A String", |
Craig Citro | e633be1 | 2015-03-02 13:40:36 -0800 | [diff] [blame] | 2799 | ], |
Bu Sun Kim | 6502091 | 2020-05-20 12:08:20 -0700 | [diff] [blame] | 2800 | "schemaOnly": True or False, # Export only schemas. |
| 2801 | "mysqlExportOptions": { # Options for exporting from MySQL. |
| 2802 | "masterData": 42, # Option to include SQL statement required to set up replication. |
Dan O'Meara | dd49464 | 2020-05-01 07:42:23 -0700 | [diff] [blame] | 2803 | # If set to <code>1</code>, the dump file includes |
| 2804 | # a CHANGE MASTER TO statement with the binary log coordinates. |
| 2805 | # If set to <code>2</code>, the CHANGE MASTER TO statement is written as |
| 2806 | # a SQL comment, and has no effect. |
| 2807 | # All other values are ignored. |
Bu Sun Kim | 715bd7f | 2019-06-14 16:50:42 -0700 | [diff] [blame] | 2808 | }, |
Craig Citro | e633be1 | 2015-03-02 13:40:36 -0800 | [diff] [blame] | 2809 | }, |
Bu Sun Kim | 6502091 | 2020-05-20 12:08:20 -0700 | [diff] [blame] | 2810 | "fileType": "A String", # The file type for the specified uri. <br><code>SQL</code>: The file |
| 2811 | # contains SQL statements. <br><code>CSV</code>: The file contains CSV data. |
| 2812 | "uri": "A String", # The path to the file in Google Cloud Storage where the export will be |
| 2813 | # stored. The URI is in the form <code>gs: |
| 2814 | # //bucketName/fileName</code>. If the file already exists, the requests |
| 2815 | # // succeeds, but the operation fails. If <code>fileType</code> is |
| 2816 | # // <code>SQL</code> and the filename ends with .gz, the contents are |
| 2817 | # // compressed. |
| 2818 | "csvExportOptions": { # Options for exporting data as CSV. |
| 2819 | "selectQuery": "A String", # The select query used to extract the data. |
| 2820 | }, |
| 2821 | "kind": "A String", # This is always <code>sql#exportContext</code>. |
Craig Citro | e633be1 | 2015-03-02 13:40:36 -0800 | [diff] [blame] | 2822 | }, |
Bu Sun Kim | 6502091 | 2020-05-20 12:08:20 -0700 | [diff] [blame] | 2823 | "targetId": "A String", # Name of the database instance related to this operation. |
Craig Citro | e633be1 | 2015-03-02 13:40:36 -0800 | [diff] [blame] | 2824 | }</pre> |
| 2825 | </div> |
| 2826 | |
| 2827 | <div class="method"> |
Dan O'Meara | dd49464 | 2020-05-01 07:42:23 -0700 | [diff] [blame] | 2828 | <code class="details" id="promoteReplica">promoteReplica(project, instance, x__xgafv=None)</code> |
Craig Citro | e633be1 | 2015-03-02 13:40:36 -0800 | [diff] [blame] | 2829 | <pre>Promotes the read replica instance to be a stand-alone Cloud SQL instance. |
Dan O'Meara | dd49464 | 2020-05-01 07:42:23 -0700 | [diff] [blame] | 2830 | Using this operation might cause your instance to restart. |
Craig Citro | e633be1 | 2015-03-02 13:40:36 -0800 | [diff] [blame] | 2831 | |
| 2832 | Args: |
| 2833 | project: string, ID of the project that contains the read replica. (required) |
| 2834 | instance: string, Cloud SQL read replica instance name. (required) |
Dan O'Meara | dd49464 | 2020-05-01 07:42:23 -0700 | [diff] [blame] | 2835 | x__xgafv: string, V1 error format. |
| 2836 | Allowed values |
| 2837 | 1 - v1 error format |
| 2838 | 2 - v2 error format |
Craig Citro | e633be1 | 2015-03-02 13:40:36 -0800 | [diff] [blame] | 2839 | |
| 2840 | Returns: |
| 2841 | An object of the form: |
| 2842 | |
Dan O'Meara | dd49464 | 2020-05-01 07:42:23 -0700 | [diff] [blame] | 2843 | { # An Operation resource.&nbsp;For successful operations that return an |
| 2844 | # Operation resource, only the fields relevant to the operation are populated |
| 2845 | # in the resource. |
Bu Sun Kim | 6502091 | 2020-05-20 12:08:20 -0700 | [diff] [blame] | 2846 | "endTime": "A String", # The time this operation finished in UTC timezone in <a |
| 2847 | # href="https://tools.ietf.org/html/rfc3339">RFC 3339</a> format, for example |
| 2848 | # <code>2012-11-15T16:19:00.094Z</code>. |
| 2849 | "startTime": "A String", # The time this operation actually started in UTC timezone in <a |
| 2850 | # href="https://tools.ietf.org/html/rfc3339">RFC 3339</a> format, for example |
| 2851 | # <code>2012-11-15T16:19:00.094Z</code>. |
| 2852 | "insertTime": "A String", # The time this operation was enqueued in UTC timezone in <a |
| 2853 | # href="https://tools.ietf.org/html/rfc3339">RFC 3339</a> format, for example |
| 2854 | # <code>2012-11-15T16:19:00.094Z</code>. |
| 2855 | "user": "A String", # The email address of the user who initiated this operation. |
| 2856 | "targetProject": "A String", # The project ID of the target instance related to this operation. |
| 2857 | "selfLink": "A String", # The URI of this resource. |
| 2858 | "targetLink": "A String", |
| 2859 | "operationType": "A String", # The type of the operation. Valid values are <code>CREATE</code>, |
| 2860 | # <code>DELETE</code>, <code>UPDATE</code>, <code>RESTART</code>, |
| 2861 | # <code>IMPORT</code>, <code>EXPORT</code>, <code>BACKUP_VOLUME</code>, |
| 2862 | # <code>RESTORE_VOLUME</code>, <code>CREATE_USER</code>, |
| 2863 | # <code>DELETE_USER</code>, <code>CREATE_DATABASE</code>, |
| 2864 | # <code>DELETE_DATABASE</code> . |
| 2865 | "error": { # Database instance operation errors list wrapper. # If errors occurred during processing of this operation, this field will be |
| 2866 | # populated. |
| 2867 | "errors": [ # The list of errors encountered while processing this operation. |
| 2868 | { # Database instance operation error. |
| 2869 | "kind": "A String", # This is always <code>sql#operationError</code>. |
| 2870 | "code": "A String", # Identifies the specific error that occurred. |
| 2871 | "message": "A String", # Additional information about the error encountered. |
Dan O'Meara | dd49464 | 2020-05-01 07:42:23 -0700 | [diff] [blame] | 2872 | }, |
Bu Sun Kim | 6502091 | 2020-05-20 12:08:20 -0700 | [diff] [blame] | 2873 | ], |
| 2874 | "kind": "A String", # This is always <code>sql#operationErrors</code>. |
| 2875 | }, |
| 2876 | "kind": "A String", # This is always <code>sql#operation</code>. |
| 2877 | "importContext": { # Database instance import context. # The context for import operation, if applicable. |
| 2878 | "kind": "A String", # This is always <code>sql#importContext</code>. |
| 2879 | "csvImportOptions": { # Options for importing data as CSV. |
| 2880 | "table": "A String", # The table to which CSV data is imported. |
| 2881 | "columns": [ # The columns to which CSV data is imported. If not specified, all columns |
| 2882 | # of the database table are loaded with CSV data. |
| 2883 | "A String", |
| 2884 | ], |
Dan O'Meara | dd49464 | 2020-05-01 07:42:23 -0700 | [diff] [blame] | 2885 | }, |
Bu Sun Kim | 6502091 | 2020-05-20 12:08:20 -0700 | [diff] [blame] | 2886 | "database": "A String", # The target database for the import. If <code>fileType</code> is |
Dan O'Meara | dd49464 | 2020-05-01 07:42:23 -0700 | [diff] [blame] | 2887 | # <code>SQL</code>, this field is required only if the import file does not |
| 2888 | # specify a database, and is overridden by any database specification in the |
| 2889 | # import file. If <code>fileType</code> is <code>CSV</code>, one database |
| 2890 | # must be specified. |
Bu Sun Kim | 6502091 | 2020-05-20 12:08:20 -0700 | [diff] [blame] | 2891 | "importUser": "A String", # The PostgreSQL user for this import operation. PostgreSQL instances only. |
| 2892 | "bakImportOptions": { # Import parameters specific to SQL Server .BAK files |
| 2893 | "encryptionOptions": { |
| 2894 | "certPath": "A String", # Path to the Certificate (.cer) in Cloud Storage, in the form |
| 2895 | # <code>gs://bucketName/fileName</code>. The instance must have |
| 2896 | # write permissions to the bucket and read access to the file. |
| 2897 | "pvkPath": "A String", # Path to the Certificate Private Key (.pvk) in Cloud Storage, in the |
| 2898 | # form <code>gs://bucketName/fileName</code>. The instance must have |
| 2899 | # write permissions to the bucket and read access to the file. |
| 2900 | "pvkPassword": "A String", # Password that encrypts the private key |
| 2901 | }, |
| 2902 | }, |
| 2903 | "uri": "A String", # Path to the import file in Cloud Storage, in the form |
Dan O'Meara | dd49464 | 2020-05-01 07:42:23 -0700 | [diff] [blame] | 2904 | # <code>gs: |
| 2905 | # //bucketName/fileName</code>. Compressed gzip files (.gz) are supported |
| 2906 | # // when <code>fileType</code> is <code>SQL</code>. The instance must have |
| 2907 | # // write permissions to the bucket and read access to the file. |
Bu Sun Kim | 6502091 | 2020-05-20 12:08:20 -0700 | [diff] [blame] | 2908 | "fileType": "A String", # The file type for the specified uri. <br><code>SQL</code>: The file |
| 2909 | # contains SQL statements. <br><code>CSV</code>: The file contains CSV data. |
Craig Citro | e633be1 | 2015-03-02 13:40:36 -0800 | [diff] [blame] | 2910 | }, |
Bu Sun Kim | 6502091 | 2020-05-20 12:08:20 -0700 | [diff] [blame] | 2911 | "status": "A String", # The status of an operation. Valid values are <code>PENDING</code>, |
| 2912 | # <code>RUNNING</code>, <code>DONE</code>, |
| 2913 | # <code>SQL_OPERATION_STATUS_UNSPECIFIED</code>. |
| 2914 | "name": "A String", # An identifier that uniquely identifies the operation. You can use this |
Dan O'Meara | dd49464 | 2020-05-01 07:42:23 -0700 | [diff] [blame] | 2915 | # identifier to retrieve the Operations resource that has information about |
| 2916 | # the operation. |
Bu Sun Kim | 6502091 | 2020-05-20 12:08:20 -0700 | [diff] [blame] | 2917 | "exportContext": { # Database instance export context. # The context for export operation, if applicable. |
| 2918 | "databases": [ # Databases to be exported. <br /> <b>MySQL instances:</b> If |
Dan O'Meara | dd49464 | 2020-05-01 07:42:23 -0700 | [diff] [blame] | 2919 | # <code>fileType</code> is <code>SQL</code> and no database is specified, all |
| 2920 | # databases are exported, except for the <code>mysql</code> system database. |
| 2921 | # If <code>fileType</code> is <code>CSV</code>, you can specify one database, |
| 2922 | # either by using this property or by using the |
| 2923 | # <code>csvExportOptions.selectQuery</code> property, which takes precedence |
| 2924 | # over this property. <br /> <b>PostgreSQL instances:</b> You must specify |
| 2925 | # one database to be exported. If <code>fileType</code> is <code>CSV</code>, |
| 2926 | # this database must match the one specified in the |
| 2927 | # <code>csvExportOptions.selectQuery</code> property. |
Bu Sun Kim | 6502091 | 2020-05-20 12:08:20 -0700 | [diff] [blame] | 2928 | "A String", |
Craig Citro | e633be1 | 2015-03-02 13:40:36 -0800 | [diff] [blame] | 2929 | ], |
Bu Sun Kim | 6502091 | 2020-05-20 12:08:20 -0700 | [diff] [blame] | 2930 | "sqlExportOptions": { # Options for exporting data as SQL statements. |
| 2931 | "tables": [ # Tables to export, or that were exported, from the specified database. If |
Dan O'Meara | dd49464 | 2020-05-01 07:42:23 -0700 | [diff] [blame] | 2932 | # you specify tables, specify one and only one database. For PostgreSQL |
| 2933 | # instances, you can specify only one table. |
Bu Sun Kim | 6502091 | 2020-05-20 12:08:20 -0700 | [diff] [blame] | 2934 | "A String", |
Craig Citro | e633be1 | 2015-03-02 13:40:36 -0800 | [diff] [blame] | 2935 | ], |
Bu Sun Kim | 6502091 | 2020-05-20 12:08:20 -0700 | [diff] [blame] | 2936 | "schemaOnly": True or False, # Export only schemas. |
| 2937 | "mysqlExportOptions": { # Options for exporting from MySQL. |
| 2938 | "masterData": 42, # Option to include SQL statement required to set up replication. |
Dan O'Meara | dd49464 | 2020-05-01 07:42:23 -0700 | [diff] [blame] | 2939 | # If set to <code>1</code>, the dump file includes |
| 2940 | # a CHANGE MASTER TO statement with the binary log coordinates. |
| 2941 | # If set to <code>2</code>, the CHANGE MASTER TO statement is written as |
| 2942 | # a SQL comment, and has no effect. |
| 2943 | # All other values are ignored. |
Bu Sun Kim | 715bd7f | 2019-06-14 16:50:42 -0700 | [diff] [blame] | 2944 | }, |
Craig Citro | e633be1 | 2015-03-02 13:40:36 -0800 | [diff] [blame] | 2945 | }, |
Bu Sun Kim | 6502091 | 2020-05-20 12:08:20 -0700 | [diff] [blame] | 2946 | "fileType": "A String", # The file type for the specified uri. <br><code>SQL</code>: The file |
| 2947 | # contains SQL statements. <br><code>CSV</code>: The file contains CSV data. |
| 2948 | "uri": "A String", # The path to the file in Google Cloud Storage where the export will be |
| 2949 | # stored. The URI is in the form <code>gs: |
| 2950 | # //bucketName/fileName</code>. If the file already exists, the requests |
| 2951 | # // succeeds, but the operation fails. If <code>fileType</code> is |
| 2952 | # // <code>SQL</code> and the filename ends with .gz, the contents are |
| 2953 | # // compressed. |
| 2954 | "csvExportOptions": { # Options for exporting data as CSV. |
| 2955 | "selectQuery": "A String", # The select query used to extract the data. |
| 2956 | }, |
| 2957 | "kind": "A String", # This is always <code>sql#exportContext</code>. |
Craig Citro | e633be1 | 2015-03-02 13:40:36 -0800 | [diff] [blame] | 2958 | }, |
Bu Sun Kim | 6502091 | 2020-05-20 12:08:20 -0700 | [diff] [blame] | 2959 | "targetId": "A String", # Name of the database instance related to this operation. |
Craig Citro | e633be1 | 2015-03-02 13:40:36 -0800 | [diff] [blame] | 2960 | }</pre> |
| 2961 | </div> |
| 2962 | |
| 2963 | <div class="method"> |
Dan O'Meara | dd49464 | 2020-05-01 07:42:23 -0700 | [diff] [blame] | 2964 | <code class="details" id="resetSslConfig">resetSslConfig(project, instance, x__xgafv=None)</code> |
| 2965 | <pre>Deletes all client certificates and generates a new server SSL certificate |
| 2966 | for the instance. |
Craig Citro | e633be1 | 2015-03-02 13:40:36 -0800 | [diff] [blame] | 2967 | |
| 2968 | Args: |
| 2969 | project: string, Project ID of the project that contains the instance. (required) |
| 2970 | 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] | 2971 | x__xgafv: string, V1 error format. |
| 2972 | Allowed values |
| 2973 | 1 - v1 error format |
| 2974 | 2 - v2 error format |
Craig Citro | e633be1 | 2015-03-02 13:40:36 -0800 | [diff] [blame] | 2975 | |
| 2976 | Returns: |
| 2977 | An object of the form: |
| 2978 | |
Dan O'Meara | dd49464 | 2020-05-01 07:42:23 -0700 | [diff] [blame] | 2979 | { # An Operation resource.&nbsp;For successful operations that return an |
| 2980 | # Operation resource, only the fields relevant to the operation are populated |
| 2981 | # in the resource. |
Bu Sun Kim | 6502091 | 2020-05-20 12:08:20 -0700 | [diff] [blame] | 2982 | "endTime": "A String", # The time this operation finished in UTC timezone in <a |
| 2983 | # href="https://tools.ietf.org/html/rfc3339">RFC 3339</a> format, for example |
| 2984 | # <code>2012-11-15T16:19:00.094Z</code>. |
| 2985 | "startTime": "A String", # The time this operation actually started in UTC timezone in <a |
| 2986 | # href="https://tools.ietf.org/html/rfc3339">RFC 3339</a> format, for example |
| 2987 | # <code>2012-11-15T16:19:00.094Z</code>. |
| 2988 | "insertTime": "A String", # The time this operation was enqueued in UTC timezone in <a |
| 2989 | # href="https://tools.ietf.org/html/rfc3339">RFC 3339</a> format, for example |
| 2990 | # <code>2012-11-15T16:19:00.094Z</code>. |
| 2991 | "user": "A String", # The email address of the user who initiated this operation. |
| 2992 | "targetProject": "A String", # The project ID of the target instance related to this operation. |
| 2993 | "selfLink": "A String", # The URI of this resource. |
| 2994 | "targetLink": "A String", |
| 2995 | "operationType": "A String", # The type of the operation. Valid values are <code>CREATE</code>, |
| 2996 | # <code>DELETE</code>, <code>UPDATE</code>, <code>RESTART</code>, |
| 2997 | # <code>IMPORT</code>, <code>EXPORT</code>, <code>BACKUP_VOLUME</code>, |
| 2998 | # <code>RESTORE_VOLUME</code>, <code>CREATE_USER</code>, |
| 2999 | # <code>DELETE_USER</code>, <code>CREATE_DATABASE</code>, |
| 3000 | # <code>DELETE_DATABASE</code> . |
| 3001 | "error": { # Database instance operation errors list wrapper. # If errors occurred during processing of this operation, this field will be |
| 3002 | # populated. |
| 3003 | "errors": [ # The list of errors encountered while processing this operation. |
| 3004 | { # Database instance operation error. |
| 3005 | "kind": "A String", # This is always <code>sql#operationError</code>. |
| 3006 | "code": "A String", # Identifies the specific error that occurred. |
| 3007 | "message": "A String", # Additional information about the error encountered. |
Dan O'Meara | dd49464 | 2020-05-01 07:42:23 -0700 | [diff] [blame] | 3008 | }, |
Bu Sun Kim | 6502091 | 2020-05-20 12:08:20 -0700 | [diff] [blame] | 3009 | ], |
| 3010 | "kind": "A String", # This is always <code>sql#operationErrors</code>. |
| 3011 | }, |
| 3012 | "kind": "A String", # This is always <code>sql#operation</code>. |
| 3013 | "importContext": { # Database instance import context. # The context for import operation, if applicable. |
| 3014 | "kind": "A String", # This is always <code>sql#importContext</code>. |
| 3015 | "csvImportOptions": { # Options for importing data as CSV. |
| 3016 | "table": "A String", # The table to which CSV data is imported. |
| 3017 | "columns": [ # The columns to which CSV data is imported. If not specified, all columns |
| 3018 | # of the database table are loaded with CSV data. |
| 3019 | "A String", |
| 3020 | ], |
Dan O'Meara | dd49464 | 2020-05-01 07:42:23 -0700 | [diff] [blame] | 3021 | }, |
Bu Sun Kim | 6502091 | 2020-05-20 12:08:20 -0700 | [diff] [blame] | 3022 | "database": "A String", # The target database for the import. If <code>fileType</code> is |
Dan O'Meara | dd49464 | 2020-05-01 07:42:23 -0700 | [diff] [blame] | 3023 | # <code>SQL</code>, this field is required only if the import file does not |
| 3024 | # specify a database, and is overridden by any database specification in the |
| 3025 | # import file. If <code>fileType</code> is <code>CSV</code>, one database |
| 3026 | # must be specified. |
Bu Sun Kim | 6502091 | 2020-05-20 12:08:20 -0700 | [diff] [blame] | 3027 | "importUser": "A String", # The PostgreSQL user for this import operation. PostgreSQL instances only. |
| 3028 | "bakImportOptions": { # Import parameters specific to SQL Server .BAK files |
| 3029 | "encryptionOptions": { |
| 3030 | "certPath": "A String", # Path to the Certificate (.cer) in Cloud Storage, in the form |
| 3031 | # <code>gs://bucketName/fileName</code>. The instance must have |
| 3032 | # write permissions to the bucket and read access to the file. |
| 3033 | "pvkPath": "A String", # Path to the Certificate Private Key (.pvk) in Cloud Storage, in the |
| 3034 | # form <code>gs://bucketName/fileName</code>. The instance must have |
| 3035 | # write permissions to the bucket and read access to the file. |
| 3036 | "pvkPassword": "A String", # Password that encrypts the private key |
| 3037 | }, |
| 3038 | }, |
| 3039 | "uri": "A String", # Path to the import file in Cloud Storage, in the form |
Dan O'Meara | dd49464 | 2020-05-01 07:42:23 -0700 | [diff] [blame] | 3040 | # <code>gs: |
| 3041 | # //bucketName/fileName</code>. Compressed gzip files (.gz) are supported |
| 3042 | # // when <code>fileType</code> is <code>SQL</code>. The instance must have |
| 3043 | # // write permissions to the bucket and read access to the file. |
Bu Sun Kim | 6502091 | 2020-05-20 12:08:20 -0700 | [diff] [blame] | 3044 | "fileType": "A String", # The file type for the specified uri. <br><code>SQL</code>: The file |
| 3045 | # contains SQL statements. <br><code>CSV</code>: The file contains CSV data. |
Craig Citro | e633be1 | 2015-03-02 13:40:36 -0800 | [diff] [blame] | 3046 | }, |
Bu Sun Kim | 6502091 | 2020-05-20 12:08:20 -0700 | [diff] [blame] | 3047 | "status": "A String", # The status of an operation. Valid values are <code>PENDING</code>, |
| 3048 | # <code>RUNNING</code>, <code>DONE</code>, |
| 3049 | # <code>SQL_OPERATION_STATUS_UNSPECIFIED</code>. |
| 3050 | "name": "A String", # An identifier that uniquely identifies the operation. You can use this |
Dan O'Meara | dd49464 | 2020-05-01 07:42:23 -0700 | [diff] [blame] | 3051 | # identifier to retrieve the Operations resource that has information about |
| 3052 | # the operation. |
Bu Sun Kim | 6502091 | 2020-05-20 12:08:20 -0700 | [diff] [blame] | 3053 | "exportContext": { # Database instance export context. # The context for export operation, if applicable. |
| 3054 | "databases": [ # Databases to be exported. <br /> <b>MySQL instances:</b> If |
Dan O'Meara | dd49464 | 2020-05-01 07:42:23 -0700 | [diff] [blame] | 3055 | # <code>fileType</code> is <code>SQL</code> and no database is specified, all |
| 3056 | # databases are exported, except for the <code>mysql</code> system database. |
| 3057 | # If <code>fileType</code> is <code>CSV</code>, you can specify one database, |
| 3058 | # either by using this property or by using the |
| 3059 | # <code>csvExportOptions.selectQuery</code> property, which takes precedence |
| 3060 | # over this property. <br /> <b>PostgreSQL instances:</b> You must specify |
| 3061 | # one database to be exported. If <code>fileType</code> is <code>CSV</code>, |
| 3062 | # this database must match the one specified in the |
| 3063 | # <code>csvExportOptions.selectQuery</code> property. |
Bu Sun Kim | 6502091 | 2020-05-20 12:08:20 -0700 | [diff] [blame] | 3064 | "A String", |
Craig Citro | e633be1 | 2015-03-02 13:40:36 -0800 | [diff] [blame] | 3065 | ], |
Bu Sun Kim | 6502091 | 2020-05-20 12:08:20 -0700 | [diff] [blame] | 3066 | "sqlExportOptions": { # Options for exporting data as SQL statements. |
| 3067 | "tables": [ # Tables to export, or that were exported, from the specified database. If |
Dan O'Meara | dd49464 | 2020-05-01 07:42:23 -0700 | [diff] [blame] | 3068 | # you specify tables, specify one and only one database. For PostgreSQL |
| 3069 | # instances, you can specify only one table. |
Bu Sun Kim | 6502091 | 2020-05-20 12:08:20 -0700 | [diff] [blame] | 3070 | "A String", |
Craig Citro | e633be1 | 2015-03-02 13:40:36 -0800 | [diff] [blame] | 3071 | ], |
Bu Sun Kim | 6502091 | 2020-05-20 12:08:20 -0700 | [diff] [blame] | 3072 | "schemaOnly": True or False, # Export only schemas. |
| 3073 | "mysqlExportOptions": { # Options for exporting from MySQL. |
| 3074 | "masterData": 42, # Option to include SQL statement required to set up replication. |
Dan O'Meara | dd49464 | 2020-05-01 07:42:23 -0700 | [diff] [blame] | 3075 | # If set to <code>1</code>, the dump file includes |
| 3076 | # a CHANGE MASTER TO statement with the binary log coordinates. |
| 3077 | # If set to <code>2</code>, the CHANGE MASTER TO statement is written as |
| 3078 | # a SQL comment, and has no effect. |
| 3079 | # All other values are ignored. |
Bu Sun Kim | 715bd7f | 2019-06-14 16:50:42 -0700 | [diff] [blame] | 3080 | }, |
Craig Citro | e633be1 | 2015-03-02 13:40:36 -0800 | [diff] [blame] | 3081 | }, |
Bu Sun Kim | 6502091 | 2020-05-20 12:08:20 -0700 | [diff] [blame] | 3082 | "fileType": "A String", # The file type for the specified uri. <br><code>SQL</code>: The file |
| 3083 | # contains SQL statements. <br><code>CSV</code>: The file contains CSV data. |
| 3084 | "uri": "A String", # The path to the file in Google Cloud Storage where the export will be |
| 3085 | # stored. The URI is in the form <code>gs: |
| 3086 | # //bucketName/fileName</code>. If the file already exists, the requests |
| 3087 | # // succeeds, but the operation fails. If <code>fileType</code> is |
| 3088 | # // <code>SQL</code> and the filename ends with .gz, the contents are |
| 3089 | # // compressed. |
| 3090 | "csvExportOptions": { # Options for exporting data as CSV. |
| 3091 | "selectQuery": "A String", # The select query used to extract the data. |
| 3092 | }, |
| 3093 | "kind": "A String", # This is always <code>sql#exportContext</code>. |
Craig Citro | e633be1 | 2015-03-02 13:40:36 -0800 | [diff] [blame] | 3094 | }, |
Bu Sun Kim | 6502091 | 2020-05-20 12:08:20 -0700 | [diff] [blame] | 3095 | "targetId": "A String", # Name of the database instance related to this operation. |
Craig Citro | e633be1 | 2015-03-02 13:40:36 -0800 | [diff] [blame] | 3096 | }</pre> |
| 3097 | </div> |
| 3098 | |
| 3099 | <div class="method"> |
Dan O'Meara | dd49464 | 2020-05-01 07:42:23 -0700 | [diff] [blame] | 3100 | <code class="details" id="restart">restart(project, instance, x__xgafv=None)</code> |
Craig Citro | e633be1 | 2015-03-02 13:40:36 -0800 | [diff] [blame] | 3101 | <pre>Restarts a Cloud SQL instance. |
| 3102 | |
| 3103 | Args: |
| 3104 | project: string, Project ID of the project that contains the instance to be restarted. (required) |
| 3105 | 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] | 3106 | x__xgafv: string, V1 error format. |
| 3107 | Allowed values |
| 3108 | 1 - v1 error format |
| 3109 | 2 - v2 error format |
Craig Citro | e633be1 | 2015-03-02 13:40:36 -0800 | [diff] [blame] | 3110 | |
| 3111 | Returns: |
| 3112 | An object of the form: |
| 3113 | |
Dan O'Meara | dd49464 | 2020-05-01 07:42:23 -0700 | [diff] [blame] | 3114 | { # An Operation resource.&nbsp;For successful operations that return an |
| 3115 | # Operation resource, only the fields relevant to the operation are populated |
| 3116 | # in the resource. |
Bu Sun Kim | 6502091 | 2020-05-20 12:08:20 -0700 | [diff] [blame] | 3117 | "endTime": "A String", # The time this operation finished in UTC timezone in <a |
| 3118 | # href="https://tools.ietf.org/html/rfc3339">RFC 3339</a> format, for example |
| 3119 | # <code>2012-11-15T16:19:00.094Z</code>. |
| 3120 | "startTime": "A String", # The time this operation actually started in UTC timezone in <a |
| 3121 | # href="https://tools.ietf.org/html/rfc3339">RFC 3339</a> format, for example |
| 3122 | # <code>2012-11-15T16:19:00.094Z</code>. |
| 3123 | "insertTime": "A String", # The time this operation was enqueued in UTC timezone in <a |
| 3124 | # href="https://tools.ietf.org/html/rfc3339">RFC 3339</a> format, for example |
| 3125 | # <code>2012-11-15T16:19:00.094Z</code>. |
| 3126 | "user": "A String", # The email address of the user who initiated this operation. |
| 3127 | "targetProject": "A String", # The project ID of the target instance related to this operation. |
| 3128 | "selfLink": "A String", # The URI of this resource. |
| 3129 | "targetLink": "A String", |
| 3130 | "operationType": "A String", # The type of the operation. Valid values are <code>CREATE</code>, |
| 3131 | # <code>DELETE</code>, <code>UPDATE</code>, <code>RESTART</code>, |
| 3132 | # <code>IMPORT</code>, <code>EXPORT</code>, <code>BACKUP_VOLUME</code>, |
| 3133 | # <code>RESTORE_VOLUME</code>, <code>CREATE_USER</code>, |
| 3134 | # <code>DELETE_USER</code>, <code>CREATE_DATABASE</code>, |
| 3135 | # <code>DELETE_DATABASE</code> . |
| 3136 | "error": { # Database instance operation errors list wrapper. # If errors occurred during processing of this operation, this field will be |
| 3137 | # populated. |
| 3138 | "errors": [ # The list of errors encountered while processing this operation. |
| 3139 | { # Database instance operation error. |
| 3140 | "kind": "A String", # This is always <code>sql#operationError</code>. |
| 3141 | "code": "A String", # Identifies the specific error that occurred. |
| 3142 | "message": "A String", # Additional information about the error encountered. |
Dan O'Meara | dd49464 | 2020-05-01 07:42:23 -0700 | [diff] [blame] | 3143 | }, |
Bu Sun Kim | 6502091 | 2020-05-20 12:08:20 -0700 | [diff] [blame] | 3144 | ], |
| 3145 | "kind": "A String", # This is always <code>sql#operationErrors</code>. |
| 3146 | }, |
| 3147 | "kind": "A String", # This is always <code>sql#operation</code>. |
| 3148 | "importContext": { # Database instance import context. # The context for import operation, if applicable. |
| 3149 | "kind": "A String", # This is always <code>sql#importContext</code>. |
| 3150 | "csvImportOptions": { # Options for importing data as CSV. |
| 3151 | "table": "A String", # The table to which CSV data is imported. |
| 3152 | "columns": [ # The columns to which CSV data is imported. If not specified, all columns |
| 3153 | # of the database table are loaded with CSV data. |
| 3154 | "A String", |
| 3155 | ], |
Dan O'Meara | dd49464 | 2020-05-01 07:42:23 -0700 | [diff] [blame] | 3156 | }, |
Bu Sun Kim | 6502091 | 2020-05-20 12:08:20 -0700 | [diff] [blame] | 3157 | "database": "A String", # The target database for the import. If <code>fileType</code> is |
Dan O'Meara | dd49464 | 2020-05-01 07:42:23 -0700 | [diff] [blame] | 3158 | # <code>SQL</code>, this field is required only if the import file does not |
| 3159 | # specify a database, and is overridden by any database specification in the |
| 3160 | # import file. If <code>fileType</code> is <code>CSV</code>, one database |
| 3161 | # must be specified. |
Bu Sun Kim | 6502091 | 2020-05-20 12:08:20 -0700 | [diff] [blame] | 3162 | "importUser": "A String", # The PostgreSQL user for this import operation. PostgreSQL instances only. |
| 3163 | "bakImportOptions": { # Import parameters specific to SQL Server .BAK files |
| 3164 | "encryptionOptions": { |
| 3165 | "certPath": "A String", # Path to the Certificate (.cer) in Cloud Storage, in the form |
| 3166 | # <code>gs://bucketName/fileName</code>. The instance must have |
| 3167 | # write permissions to the bucket and read access to the file. |
| 3168 | "pvkPath": "A String", # Path to the Certificate Private Key (.pvk) in Cloud Storage, in the |
| 3169 | # form <code>gs://bucketName/fileName</code>. The instance must have |
| 3170 | # write permissions to the bucket and read access to the file. |
| 3171 | "pvkPassword": "A String", # Password that encrypts the private key |
| 3172 | }, |
| 3173 | }, |
| 3174 | "uri": "A String", # Path to the import file in Cloud Storage, in the form |
Dan O'Meara | dd49464 | 2020-05-01 07:42:23 -0700 | [diff] [blame] | 3175 | # <code>gs: |
| 3176 | # //bucketName/fileName</code>. Compressed gzip files (.gz) are supported |
| 3177 | # // when <code>fileType</code> is <code>SQL</code>. The instance must have |
| 3178 | # // write permissions to the bucket and read access to the file. |
Bu Sun Kim | 6502091 | 2020-05-20 12:08:20 -0700 | [diff] [blame] | 3179 | "fileType": "A String", # The file type for the specified uri. <br><code>SQL</code>: The file |
| 3180 | # contains SQL statements. <br><code>CSV</code>: The file contains CSV data. |
Craig Citro | e633be1 | 2015-03-02 13:40:36 -0800 | [diff] [blame] | 3181 | }, |
Bu Sun Kim | 6502091 | 2020-05-20 12:08:20 -0700 | [diff] [blame] | 3182 | "status": "A String", # The status of an operation. Valid values are <code>PENDING</code>, |
| 3183 | # <code>RUNNING</code>, <code>DONE</code>, |
| 3184 | # <code>SQL_OPERATION_STATUS_UNSPECIFIED</code>. |
| 3185 | "name": "A String", # An identifier that uniquely identifies the operation. You can use this |
Dan O'Meara | dd49464 | 2020-05-01 07:42:23 -0700 | [diff] [blame] | 3186 | # identifier to retrieve the Operations resource that has information about |
| 3187 | # the operation. |
Bu Sun Kim | 6502091 | 2020-05-20 12:08:20 -0700 | [diff] [blame] | 3188 | "exportContext": { # Database instance export context. # The context for export operation, if applicable. |
| 3189 | "databases": [ # Databases to be exported. <br /> <b>MySQL instances:</b> If |
Dan O'Meara | dd49464 | 2020-05-01 07:42:23 -0700 | [diff] [blame] | 3190 | # <code>fileType</code> is <code>SQL</code> and no database is specified, all |
| 3191 | # databases are exported, except for the <code>mysql</code> system database. |
| 3192 | # If <code>fileType</code> is <code>CSV</code>, you can specify one database, |
| 3193 | # either by using this property or by using the |
| 3194 | # <code>csvExportOptions.selectQuery</code> property, which takes precedence |
| 3195 | # over this property. <br /> <b>PostgreSQL instances:</b> You must specify |
| 3196 | # one database to be exported. If <code>fileType</code> is <code>CSV</code>, |
| 3197 | # this database must match the one specified in the |
| 3198 | # <code>csvExportOptions.selectQuery</code> property. |
Bu Sun Kim | 6502091 | 2020-05-20 12:08:20 -0700 | [diff] [blame] | 3199 | "A String", |
Craig Citro | e633be1 | 2015-03-02 13:40:36 -0800 | [diff] [blame] | 3200 | ], |
Bu Sun Kim | 6502091 | 2020-05-20 12:08:20 -0700 | [diff] [blame] | 3201 | "sqlExportOptions": { # Options for exporting data as SQL statements. |
| 3202 | "tables": [ # Tables to export, or that were exported, from the specified database. If |
Dan O'Meara | dd49464 | 2020-05-01 07:42:23 -0700 | [diff] [blame] | 3203 | # you specify tables, specify one and only one database. For PostgreSQL |
| 3204 | # instances, you can specify only one table. |
Bu Sun Kim | 6502091 | 2020-05-20 12:08:20 -0700 | [diff] [blame] | 3205 | "A String", |
Craig Citro | e633be1 | 2015-03-02 13:40:36 -0800 | [diff] [blame] | 3206 | ], |
Bu Sun Kim | 6502091 | 2020-05-20 12:08:20 -0700 | [diff] [blame] | 3207 | "schemaOnly": True or False, # Export only schemas. |
| 3208 | "mysqlExportOptions": { # Options for exporting from MySQL. |
| 3209 | "masterData": 42, # Option to include SQL statement required to set up replication. |
Dan O'Meara | dd49464 | 2020-05-01 07:42:23 -0700 | [diff] [blame] | 3210 | # If set to <code>1</code>, the dump file includes |
| 3211 | # a CHANGE MASTER TO statement with the binary log coordinates. |
| 3212 | # If set to <code>2</code>, the CHANGE MASTER TO statement is written as |
| 3213 | # a SQL comment, and has no effect. |
| 3214 | # All other values are ignored. |
Bu Sun Kim | 715bd7f | 2019-06-14 16:50:42 -0700 | [diff] [blame] | 3215 | }, |
Craig Citro | e633be1 | 2015-03-02 13:40:36 -0800 | [diff] [blame] | 3216 | }, |
Bu Sun Kim | 6502091 | 2020-05-20 12:08:20 -0700 | [diff] [blame] | 3217 | "fileType": "A String", # The file type for the specified uri. <br><code>SQL</code>: The file |
| 3218 | # contains SQL statements. <br><code>CSV</code>: The file contains CSV data. |
| 3219 | "uri": "A String", # The path to the file in Google Cloud Storage where the export will be |
| 3220 | # stored. The URI is in the form <code>gs: |
| 3221 | # //bucketName/fileName</code>. If the file already exists, the requests |
| 3222 | # // succeeds, but the operation fails. If <code>fileType</code> is |
| 3223 | # // <code>SQL</code> and the filename ends with .gz, the contents are |
| 3224 | # // compressed. |
| 3225 | "csvExportOptions": { # Options for exporting data as CSV. |
| 3226 | "selectQuery": "A String", # The select query used to extract the data. |
| 3227 | }, |
| 3228 | "kind": "A String", # This is always <code>sql#exportContext</code>. |
Craig Citro | e633be1 | 2015-03-02 13:40:36 -0800 | [diff] [blame] | 3229 | }, |
Bu Sun Kim | 6502091 | 2020-05-20 12:08:20 -0700 | [diff] [blame] | 3230 | "targetId": "A String", # Name of the database instance related to this operation. |
Craig Citro | e633be1 | 2015-03-02 13:40:36 -0800 | [diff] [blame] | 3231 | }</pre> |
| 3232 | </div> |
| 3233 | |
| 3234 | <div class="method"> |
Dan O'Meara | dd49464 | 2020-05-01 07:42:23 -0700 | [diff] [blame] | 3235 | <code class="details" id="restoreBackup">restoreBackup(project, instance, body=None, x__xgafv=None)</code> |
| 3236 | <pre>Restores a backup of a Cloud SQL instance. Using this operation might cause |
| 3237 | your instance to restart. |
Craig Citro | e633be1 | 2015-03-02 13:40:36 -0800 | [diff] [blame] | 3238 | |
| 3239 | Args: |
| 3240 | project: string, Project ID of the project that contains the instance. (required) |
| 3241 | 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] | 3242 | body: object, The request body. |
Craig Citro | e633be1 | 2015-03-02 13:40:36 -0800 | [diff] [blame] | 3243 | The object takes the form of: |
| 3244 | |
| 3245 | { # Database instance restore backup request. |
Bu Sun Kim | 6502091 | 2020-05-20 12:08:20 -0700 | [diff] [blame] | 3246 | "restoreBackupContext": { # Database instance restore from backup context. # Parameters required to perform the restore backup operation. |
Dan O'Meara | dd49464 | 2020-05-01 07:42:23 -0700 | [diff] [blame] | 3247 | # Backup context contains source instance id and project id. |
Bu Sun Kim | 6502091 | 2020-05-20 12:08:20 -0700 | [diff] [blame] | 3248 | "kind": "A String", # This is always <code>sql#restoreBackupContext</code>. |
| 3249 | "project": "A String", # The full project ID of the source instance. |
| 3250 | "backupRunId": "A String", # The ID of the backup run to restore from. |
| 3251 | "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] | 3252 | }, |
| 3253 | } |
| 3254 | |
Dan O'Meara | dd49464 | 2020-05-01 07:42:23 -0700 | [diff] [blame] | 3255 | x__xgafv: string, V1 error format. |
| 3256 | Allowed values |
| 3257 | 1 - v1 error format |
| 3258 | 2 - v2 error format |
Craig Citro | e633be1 | 2015-03-02 13:40:36 -0800 | [diff] [blame] | 3259 | |
| 3260 | Returns: |
| 3261 | An object of the form: |
| 3262 | |
Dan O'Meara | dd49464 | 2020-05-01 07:42:23 -0700 | [diff] [blame] | 3263 | { # An Operation resource.&nbsp;For successful operations that return an |
| 3264 | # Operation resource, only the fields relevant to the operation are populated |
| 3265 | # in the resource. |
Bu Sun Kim | 6502091 | 2020-05-20 12:08:20 -0700 | [diff] [blame] | 3266 | "endTime": "A String", # The time this operation finished in UTC timezone in <a |
| 3267 | # href="https://tools.ietf.org/html/rfc3339">RFC 3339</a> format, for example |
| 3268 | # <code>2012-11-15T16:19:00.094Z</code>. |
| 3269 | "startTime": "A String", # The time this operation actually started in UTC timezone in <a |
| 3270 | # href="https://tools.ietf.org/html/rfc3339">RFC 3339</a> format, for example |
| 3271 | # <code>2012-11-15T16:19:00.094Z</code>. |
| 3272 | "insertTime": "A String", # The time this operation was enqueued in UTC timezone in <a |
| 3273 | # href="https://tools.ietf.org/html/rfc3339">RFC 3339</a> format, for example |
| 3274 | # <code>2012-11-15T16:19:00.094Z</code>. |
| 3275 | "user": "A String", # The email address of the user who initiated this operation. |
| 3276 | "targetProject": "A String", # The project ID of the target instance related to this operation. |
| 3277 | "selfLink": "A String", # The URI of this resource. |
| 3278 | "targetLink": "A String", |
| 3279 | "operationType": "A String", # The type of the operation. Valid values are <code>CREATE</code>, |
| 3280 | # <code>DELETE</code>, <code>UPDATE</code>, <code>RESTART</code>, |
| 3281 | # <code>IMPORT</code>, <code>EXPORT</code>, <code>BACKUP_VOLUME</code>, |
| 3282 | # <code>RESTORE_VOLUME</code>, <code>CREATE_USER</code>, |
| 3283 | # <code>DELETE_USER</code>, <code>CREATE_DATABASE</code>, |
| 3284 | # <code>DELETE_DATABASE</code> . |
| 3285 | "error": { # Database instance operation errors list wrapper. # If errors occurred during processing of this operation, this field will be |
| 3286 | # populated. |
| 3287 | "errors": [ # The list of errors encountered while processing this operation. |
| 3288 | { # Database instance operation error. |
| 3289 | "kind": "A String", # This is always <code>sql#operationError</code>. |
| 3290 | "code": "A String", # Identifies the specific error that occurred. |
| 3291 | "message": "A String", # Additional information about the error encountered. |
Dan O'Meara | dd49464 | 2020-05-01 07:42:23 -0700 | [diff] [blame] | 3292 | }, |
Bu Sun Kim | 6502091 | 2020-05-20 12:08:20 -0700 | [diff] [blame] | 3293 | ], |
| 3294 | "kind": "A String", # This is always <code>sql#operationErrors</code>. |
| 3295 | }, |
| 3296 | "kind": "A String", # This is always <code>sql#operation</code>. |
| 3297 | "importContext": { # Database instance import context. # The context for import operation, if applicable. |
| 3298 | "kind": "A String", # This is always <code>sql#importContext</code>. |
| 3299 | "csvImportOptions": { # Options for importing data as CSV. |
| 3300 | "table": "A String", # The table to which CSV data is imported. |
| 3301 | "columns": [ # The columns to which CSV data is imported. If not specified, all columns |
| 3302 | # of the database table are loaded with CSV data. |
| 3303 | "A String", |
| 3304 | ], |
Dan O'Meara | dd49464 | 2020-05-01 07:42:23 -0700 | [diff] [blame] | 3305 | }, |
Bu Sun Kim | 6502091 | 2020-05-20 12:08:20 -0700 | [diff] [blame] | 3306 | "database": "A String", # The target database for the import. If <code>fileType</code> is |
Dan O'Meara | dd49464 | 2020-05-01 07:42:23 -0700 | [diff] [blame] | 3307 | # <code>SQL</code>, this field is required only if the import file does not |
| 3308 | # specify a database, and is overridden by any database specification in the |
| 3309 | # import file. If <code>fileType</code> is <code>CSV</code>, one database |
| 3310 | # must be specified. |
Bu Sun Kim | 6502091 | 2020-05-20 12:08:20 -0700 | [diff] [blame] | 3311 | "importUser": "A String", # The PostgreSQL user for this import operation. PostgreSQL instances only. |
| 3312 | "bakImportOptions": { # Import parameters specific to SQL Server .BAK files |
| 3313 | "encryptionOptions": { |
| 3314 | "certPath": "A String", # Path to the Certificate (.cer) in Cloud Storage, in the form |
| 3315 | # <code>gs://bucketName/fileName</code>. The instance must have |
| 3316 | # write permissions to the bucket and read access to the file. |
| 3317 | "pvkPath": "A String", # Path to the Certificate Private Key (.pvk) in Cloud Storage, in the |
| 3318 | # form <code>gs://bucketName/fileName</code>. The instance must have |
| 3319 | # write permissions to the bucket and read access to the file. |
| 3320 | "pvkPassword": "A String", # Password that encrypts the private key |
| 3321 | }, |
| 3322 | }, |
| 3323 | "uri": "A String", # Path to the import file in Cloud Storage, in the form |
Dan O'Meara | dd49464 | 2020-05-01 07:42:23 -0700 | [diff] [blame] | 3324 | # <code>gs: |
| 3325 | # //bucketName/fileName</code>. Compressed gzip files (.gz) are supported |
| 3326 | # // when <code>fileType</code> is <code>SQL</code>. The instance must have |
| 3327 | # // write permissions to the bucket and read access to the file. |
Bu Sun Kim | 6502091 | 2020-05-20 12:08:20 -0700 | [diff] [blame] | 3328 | "fileType": "A String", # The file type for the specified uri. <br><code>SQL</code>: The file |
| 3329 | # contains SQL statements. <br><code>CSV</code>: The file contains CSV data. |
Craig Citro | e633be1 | 2015-03-02 13:40:36 -0800 | [diff] [blame] | 3330 | }, |
Bu Sun Kim | 6502091 | 2020-05-20 12:08:20 -0700 | [diff] [blame] | 3331 | "status": "A String", # The status of an operation. Valid values are <code>PENDING</code>, |
| 3332 | # <code>RUNNING</code>, <code>DONE</code>, |
| 3333 | # <code>SQL_OPERATION_STATUS_UNSPECIFIED</code>. |
| 3334 | "name": "A String", # An identifier that uniquely identifies the operation. You can use this |
Dan O'Meara | dd49464 | 2020-05-01 07:42:23 -0700 | [diff] [blame] | 3335 | # identifier to retrieve the Operations resource that has information about |
| 3336 | # the operation. |
Bu Sun Kim | 6502091 | 2020-05-20 12:08:20 -0700 | [diff] [blame] | 3337 | "exportContext": { # Database instance export context. # The context for export operation, if applicable. |
| 3338 | "databases": [ # Databases to be exported. <br /> <b>MySQL instances:</b> If |
Dan O'Meara | dd49464 | 2020-05-01 07:42:23 -0700 | [diff] [blame] | 3339 | # <code>fileType</code> is <code>SQL</code> and no database is specified, all |
| 3340 | # databases are exported, except for the <code>mysql</code> system database. |
| 3341 | # If <code>fileType</code> is <code>CSV</code>, you can specify one database, |
| 3342 | # either by using this property or by using the |
| 3343 | # <code>csvExportOptions.selectQuery</code> property, which takes precedence |
| 3344 | # over this property. <br /> <b>PostgreSQL instances:</b> You must specify |
| 3345 | # one database to be exported. If <code>fileType</code> is <code>CSV</code>, |
| 3346 | # this database must match the one specified in the |
| 3347 | # <code>csvExportOptions.selectQuery</code> property. |
Bu Sun Kim | 6502091 | 2020-05-20 12:08:20 -0700 | [diff] [blame] | 3348 | "A String", |
Craig Citro | e633be1 | 2015-03-02 13:40:36 -0800 | [diff] [blame] | 3349 | ], |
Bu Sun Kim | 6502091 | 2020-05-20 12:08:20 -0700 | [diff] [blame] | 3350 | "sqlExportOptions": { # Options for exporting data as SQL statements. |
| 3351 | "tables": [ # Tables to export, or that were exported, from the specified database. If |
Dan O'Meara | dd49464 | 2020-05-01 07:42:23 -0700 | [diff] [blame] | 3352 | # you specify tables, specify one and only one database. For PostgreSQL |
| 3353 | # instances, you can specify only one table. |
Bu Sun Kim | 6502091 | 2020-05-20 12:08:20 -0700 | [diff] [blame] | 3354 | "A String", |
Craig Citro | e633be1 | 2015-03-02 13:40:36 -0800 | [diff] [blame] | 3355 | ], |
Bu Sun Kim | 6502091 | 2020-05-20 12:08:20 -0700 | [diff] [blame] | 3356 | "schemaOnly": True or False, # Export only schemas. |
| 3357 | "mysqlExportOptions": { # Options for exporting from MySQL. |
| 3358 | "masterData": 42, # Option to include SQL statement required to set up replication. |
Dan O'Meara | dd49464 | 2020-05-01 07:42:23 -0700 | [diff] [blame] | 3359 | # If set to <code>1</code>, the dump file includes |
| 3360 | # a CHANGE MASTER TO statement with the binary log coordinates. |
| 3361 | # If set to <code>2</code>, the CHANGE MASTER TO statement is written as |
| 3362 | # a SQL comment, and has no effect. |
| 3363 | # All other values are ignored. |
Bu Sun Kim | 715bd7f | 2019-06-14 16:50:42 -0700 | [diff] [blame] | 3364 | }, |
Bu Sun Kim | 715bd7f | 2019-06-14 16:50:42 -0700 | [diff] [blame] | 3365 | }, |
Bu Sun Kim | 6502091 | 2020-05-20 12:08:20 -0700 | [diff] [blame] | 3366 | "fileType": "A String", # The file type for the specified uri. <br><code>SQL</code>: The file |
| 3367 | # contains SQL statements. <br><code>CSV</code>: The file contains CSV data. |
| 3368 | "uri": "A String", # The path to the file in Google Cloud Storage where the export will be |
| 3369 | # stored. The URI is in the form <code>gs: |
| 3370 | # //bucketName/fileName</code>. If the file already exists, the requests |
| 3371 | # // succeeds, but the operation fails. If <code>fileType</code> is |
| 3372 | # // <code>SQL</code> and the filename ends with .gz, the contents are |
| 3373 | # // compressed. |
| 3374 | "csvExportOptions": { # Options for exporting data as CSV. |
| 3375 | "selectQuery": "A String", # The select query used to extract the data. |
| 3376 | }, |
| 3377 | "kind": "A String", # This is always <code>sql#exportContext</code>. |
Bu Sun Kim | 715bd7f | 2019-06-14 16:50:42 -0700 | [diff] [blame] | 3378 | }, |
Bu Sun Kim | 6502091 | 2020-05-20 12:08:20 -0700 | [diff] [blame] | 3379 | "targetId": "A String", # Name of the database instance related to this operation. |
Bu Sun Kim | 715bd7f | 2019-06-14 16:50:42 -0700 | [diff] [blame] | 3380 | }</pre> |
| 3381 | </div> |
| 3382 | |
| 3383 | <div class="method"> |
Dan O'Meara | dd49464 | 2020-05-01 07:42:23 -0700 | [diff] [blame] | 3384 | <code class="details" id="rotateServerCa">rotateServerCa(project, instance, body=None, x__xgafv=None)</code> |
| 3385 | <pre>Rotates the server certificate to one signed by the Certificate Authority |
| 3386 | (CA) version previously added with the addServerCA method. |
Bu Sun Kim | 715bd7f | 2019-06-14 16:50:42 -0700 | [diff] [blame] | 3387 | |
| 3388 | Args: |
| 3389 | project: string, Project ID of the project that contains the instance. (required) |
| 3390 | 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] | 3391 | body: object, The request body. |
Bu Sun Kim | 715bd7f | 2019-06-14 16:50:42 -0700 | [diff] [blame] | 3392 | The object takes the form of: |
| 3393 | |
| 3394 | { # Rotate Server CA request. |
Bu Sun Kim | 6502091 | 2020-05-20 12:08:20 -0700 | [diff] [blame] | 3395 | "rotateServerCaContext": { # Instance rotate server CA context. # Contains details about the rotate server CA operation. |
| 3396 | "kind": "A String", # This is always <code>sql#rotateServerCaContext</code>. |
| 3397 | "nextVersion": "A String", # The fingerprint of the next version to be rotated to. If left unspecified, |
Dan O'Meara | dd49464 | 2020-05-01 07:42:23 -0700 | [diff] [blame] | 3398 | # will be rotated to the most recently added server CA version. |
Bu Sun Kim | 715bd7f | 2019-06-14 16:50:42 -0700 | [diff] [blame] | 3399 | }, |
| 3400 | } |
| 3401 | |
Dan O'Meara | dd49464 | 2020-05-01 07:42:23 -0700 | [diff] [blame] | 3402 | x__xgafv: string, V1 error format. |
| 3403 | Allowed values |
| 3404 | 1 - v1 error format |
| 3405 | 2 - v2 error format |
Bu Sun Kim | 715bd7f | 2019-06-14 16:50:42 -0700 | [diff] [blame] | 3406 | |
| 3407 | Returns: |
| 3408 | An object of the form: |
| 3409 | |
Dan O'Meara | dd49464 | 2020-05-01 07:42:23 -0700 | [diff] [blame] | 3410 | { # An Operation resource.&nbsp;For successful operations that return an |
| 3411 | # Operation resource, only the fields relevant to the operation are populated |
| 3412 | # in the resource. |
Bu Sun Kim | 6502091 | 2020-05-20 12:08:20 -0700 | [diff] [blame] | 3413 | "endTime": "A String", # The time this operation finished in UTC timezone in <a |
| 3414 | # href="https://tools.ietf.org/html/rfc3339">RFC 3339</a> format, for example |
| 3415 | # <code>2012-11-15T16:19:00.094Z</code>. |
| 3416 | "startTime": "A String", # The time this operation actually started in UTC timezone in <a |
| 3417 | # href="https://tools.ietf.org/html/rfc3339">RFC 3339</a> format, for example |
| 3418 | # <code>2012-11-15T16:19:00.094Z</code>. |
| 3419 | "insertTime": "A String", # The time this operation was enqueued in UTC timezone in <a |
| 3420 | # href="https://tools.ietf.org/html/rfc3339">RFC 3339</a> format, for example |
| 3421 | # <code>2012-11-15T16:19:00.094Z</code>. |
| 3422 | "user": "A String", # The email address of the user who initiated this operation. |
| 3423 | "targetProject": "A String", # The project ID of the target instance related to this operation. |
| 3424 | "selfLink": "A String", # The URI of this resource. |
| 3425 | "targetLink": "A String", |
| 3426 | "operationType": "A String", # The type of the operation. Valid values are <code>CREATE</code>, |
| 3427 | # <code>DELETE</code>, <code>UPDATE</code>, <code>RESTART</code>, |
| 3428 | # <code>IMPORT</code>, <code>EXPORT</code>, <code>BACKUP_VOLUME</code>, |
| 3429 | # <code>RESTORE_VOLUME</code>, <code>CREATE_USER</code>, |
| 3430 | # <code>DELETE_USER</code>, <code>CREATE_DATABASE</code>, |
| 3431 | # <code>DELETE_DATABASE</code> . |
| 3432 | "error": { # Database instance operation errors list wrapper. # If errors occurred during processing of this operation, this field will be |
| 3433 | # populated. |
| 3434 | "errors": [ # The list of errors encountered while processing this operation. |
| 3435 | { # Database instance operation error. |
| 3436 | "kind": "A String", # This is always <code>sql#operationError</code>. |
| 3437 | "code": "A String", # Identifies the specific error that occurred. |
| 3438 | "message": "A String", # Additional information about the error encountered. |
Dan O'Meara | dd49464 | 2020-05-01 07:42:23 -0700 | [diff] [blame] | 3439 | }, |
Bu Sun Kim | 6502091 | 2020-05-20 12:08:20 -0700 | [diff] [blame] | 3440 | ], |
| 3441 | "kind": "A String", # This is always <code>sql#operationErrors</code>. |
| 3442 | }, |
| 3443 | "kind": "A String", # This is always <code>sql#operation</code>. |
| 3444 | "importContext": { # Database instance import context. # The context for import operation, if applicable. |
| 3445 | "kind": "A String", # This is always <code>sql#importContext</code>. |
| 3446 | "csvImportOptions": { # Options for importing data as CSV. |
| 3447 | "table": "A String", # The table to which CSV data is imported. |
| 3448 | "columns": [ # The columns to which CSV data is imported. If not specified, all columns |
| 3449 | # of the database table are loaded with CSV data. |
| 3450 | "A String", |
| 3451 | ], |
Dan O'Meara | dd49464 | 2020-05-01 07:42:23 -0700 | [diff] [blame] | 3452 | }, |
Bu Sun Kim | 6502091 | 2020-05-20 12:08:20 -0700 | [diff] [blame] | 3453 | "database": "A String", # The target database for the import. If <code>fileType</code> is |
Dan O'Meara | dd49464 | 2020-05-01 07:42:23 -0700 | [diff] [blame] | 3454 | # <code>SQL</code>, this field is required only if the import file does not |
| 3455 | # specify a database, and is overridden by any database specification in the |
| 3456 | # import file. If <code>fileType</code> is <code>CSV</code>, one database |
| 3457 | # must be specified. |
Bu Sun Kim | 6502091 | 2020-05-20 12:08:20 -0700 | [diff] [blame] | 3458 | "importUser": "A String", # The PostgreSQL user for this import operation. PostgreSQL instances only. |
| 3459 | "bakImportOptions": { # Import parameters specific to SQL Server .BAK files |
| 3460 | "encryptionOptions": { |
| 3461 | "certPath": "A String", # Path to the Certificate (.cer) in Cloud Storage, in the form |
| 3462 | # <code>gs://bucketName/fileName</code>. The instance must have |
| 3463 | # write permissions to the bucket and read access to the file. |
| 3464 | "pvkPath": "A String", # Path to the Certificate Private Key (.pvk) in Cloud Storage, in the |
| 3465 | # form <code>gs://bucketName/fileName</code>. The instance must have |
| 3466 | # write permissions to the bucket and read access to the file. |
| 3467 | "pvkPassword": "A String", # Password that encrypts the private key |
| 3468 | }, |
| 3469 | }, |
| 3470 | "uri": "A String", # Path to the import file in Cloud Storage, in the form |
Dan O'Meara | dd49464 | 2020-05-01 07:42:23 -0700 | [diff] [blame] | 3471 | # <code>gs: |
| 3472 | # //bucketName/fileName</code>. Compressed gzip files (.gz) are supported |
| 3473 | # // when <code>fileType</code> is <code>SQL</code>. The instance must have |
| 3474 | # // write permissions to the bucket and read access to the file. |
Bu Sun Kim | 6502091 | 2020-05-20 12:08:20 -0700 | [diff] [blame] | 3475 | "fileType": "A String", # The file type for the specified uri. <br><code>SQL</code>: The file |
| 3476 | # contains SQL statements. <br><code>CSV</code>: The file contains CSV data. |
Bu Sun Kim | 715bd7f | 2019-06-14 16:50:42 -0700 | [diff] [blame] | 3477 | }, |
Bu Sun Kim | 6502091 | 2020-05-20 12:08:20 -0700 | [diff] [blame] | 3478 | "status": "A String", # The status of an operation. Valid values are <code>PENDING</code>, |
| 3479 | # <code>RUNNING</code>, <code>DONE</code>, |
| 3480 | # <code>SQL_OPERATION_STATUS_UNSPECIFIED</code>. |
| 3481 | "name": "A String", # An identifier that uniquely identifies the operation. You can use this |
Dan O'Meara | dd49464 | 2020-05-01 07:42:23 -0700 | [diff] [blame] | 3482 | # identifier to retrieve the Operations resource that has information about |
| 3483 | # the operation. |
Bu Sun Kim | 6502091 | 2020-05-20 12:08:20 -0700 | [diff] [blame] | 3484 | "exportContext": { # Database instance export context. # The context for export operation, if applicable. |
| 3485 | "databases": [ # Databases to be exported. <br /> <b>MySQL instances:</b> If |
Dan O'Meara | dd49464 | 2020-05-01 07:42:23 -0700 | [diff] [blame] | 3486 | # <code>fileType</code> is <code>SQL</code> and no database is specified, all |
| 3487 | # databases are exported, except for the <code>mysql</code> system database. |
| 3488 | # If <code>fileType</code> is <code>CSV</code>, you can specify one database, |
| 3489 | # either by using this property or by using the |
| 3490 | # <code>csvExportOptions.selectQuery</code> property, which takes precedence |
| 3491 | # over this property. <br /> <b>PostgreSQL instances:</b> You must specify |
| 3492 | # one database to be exported. If <code>fileType</code> is <code>CSV</code>, |
| 3493 | # this database must match the one specified in the |
| 3494 | # <code>csvExportOptions.selectQuery</code> property. |
Bu Sun Kim | 6502091 | 2020-05-20 12:08:20 -0700 | [diff] [blame] | 3495 | "A String", |
Bu Sun Kim | 715bd7f | 2019-06-14 16:50:42 -0700 | [diff] [blame] | 3496 | ], |
Bu Sun Kim | 6502091 | 2020-05-20 12:08:20 -0700 | [diff] [blame] | 3497 | "sqlExportOptions": { # Options for exporting data as SQL statements. |
| 3498 | "tables": [ # Tables to export, or that were exported, from the specified database. If |
Dan O'Meara | dd49464 | 2020-05-01 07:42:23 -0700 | [diff] [blame] | 3499 | # you specify tables, specify one and only one database. For PostgreSQL |
| 3500 | # instances, you can specify only one table. |
Bu Sun Kim | 6502091 | 2020-05-20 12:08:20 -0700 | [diff] [blame] | 3501 | "A String", |
Bu Sun Kim | 715bd7f | 2019-06-14 16:50:42 -0700 | [diff] [blame] | 3502 | ], |
Bu Sun Kim | 6502091 | 2020-05-20 12:08:20 -0700 | [diff] [blame] | 3503 | "schemaOnly": True or False, # Export only schemas. |
| 3504 | "mysqlExportOptions": { # Options for exporting from MySQL. |
| 3505 | "masterData": 42, # Option to include SQL statement required to set up replication. |
Dan O'Meara | dd49464 | 2020-05-01 07:42:23 -0700 | [diff] [blame] | 3506 | # If set to <code>1</code>, the dump file includes |
| 3507 | # a CHANGE MASTER TO statement with the binary log coordinates. |
| 3508 | # If set to <code>2</code>, the CHANGE MASTER TO statement is written as |
| 3509 | # a SQL comment, and has no effect. |
| 3510 | # All other values are ignored. |
Bu Sun Kim | 715bd7f | 2019-06-14 16:50:42 -0700 | [diff] [blame] | 3511 | }, |
Craig Citro | e633be1 | 2015-03-02 13:40:36 -0800 | [diff] [blame] | 3512 | }, |
Bu Sun Kim | 6502091 | 2020-05-20 12:08:20 -0700 | [diff] [blame] | 3513 | "fileType": "A String", # The file type for the specified uri. <br><code>SQL</code>: The file |
| 3514 | # contains SQL statements. <br><code>CSV</code>: The file contains CSV data. |
| 3515 | "uri": "A String", # The path to the file in Google Cloud Storage where the export will be |
| 3516 | # stored. The URI is in the form <code>gs: |
| 3517 | # //bucketName/fileName</code>. If the file already exists, the requests |
| 3518 | # // succeeds, but the operation fails. If <code>fileType</code> is |
| 3519 | # // <code>SQL</code> and the filename ends with .gz, the contents are |
| 3520 | # // compressed. |
| 3521 | "csvExportOptions": { # Options for exporting data as CSV. |
| 3522 | "selectQuery": "A String", # The select query used to extract the data. |
| 3523 | }, |
| 3524 | "kind": "A String", # This is always <code>sql#exportContext</code>. |
Craig Citro | e633be1 | 2015-03-02 13:40:36 -0800 | [diff] [blame] | 3525 | }, |
Bu Sun Kim | 6502091 | 2020-05-20 12:08:20 -0700 | [diff] [blame] | 3526 | "targetId": "A String", # Name of the database instance related to this operation. |
Craig Citro | e633be1 | 2015-03-02 13:40:36 -0800 | [diff] [blame] | 3527 | }</pre> |
| 3528 | </div> |
| 3529 | |
| 3530 | <div class="method"> |
Dan O'Meara | dd49464 | 2020-05-01 07:42:23 -0700 | [diff] [blame] | 3531 | <code class="details" id="startReplica">startReplica(project, instance, x__xgafv=None)</code> |
Craig Citro | e633be1 | 2015-03-02 13:40:36 -0800 | [diff] [blame] | 3532 | <pre>Starts the replication in the read replica instance. |
| 3533 | |
| 3534 | Args: |
| 3535 | project: string, ID of the project that contains the read replica. (required) |
| 3536 | instance: string, Cloud SQL read replica instance name. (required) |
Dan O'Meara | dd49464 | 2020-05-01 07:42:23 -0700 | [diff] [blame] | 3537 | x__xgafv: string, V1 error format. |
| 3538 | Allowed values |
| 3539 | 1 - v1 error format |
| 3540 | 2 - v2 error format |
Craig Citro | e633be1 | 2015-03-02 13:40:36 -0800 | [diff] [blame] | 3541 | |
| 3542 | Returns: |
| 3543 | An object of the form: |
| 3544 | |
Dan O'Meara | dd49464 | 2020-05-01 07:42:23 -0700 | [diff] [blame] | 3545 | { # An Operation resource.&nbsp;For successful operations that return an |
| 3546 | # Operation resource, only the fields relevant to the operation are populated |
| 3547 | # in the resource. |
Bu Sun Kim | 6502091 | 2020-05-20 12:08:20 -0700 | [diff] [blame] | 3548 | "endTime": "A String", # The time this operation finished in UTC timezone in <a |
| 3549 | # href="https://tools.ietf.org/html/rfc3339">RFC 3339</a> format, for example |
| 3550 | # <code>2012-11-15T16:19:00.094Z</code>. |
| 3551 | "startTime": "A String", # The time this operation actually started in UTC timezone in <a |
| 3552 | # href="https://tools.ietf.org/html/rfc3339">RFC 3339</a> format, for example |
| 3553 | # <code>2012-11-15T16:19:00.094Z</code>. |
| 3554 | "insertTime": "A String", # The time this operation was enqueued in UTC timezone in <a |
| 3555 | # href="https://tools.ietf.org/html/rfc3339">RFC 3339</a> format, for example |
| 3556 | # <code>2012-11-15T16:19:00.094Z</code>. |
| 3557 | "user": "A String", # The email address of the user who initiated this operation. |
| 3558 | "targetProject": "A String", # The project ID of the target instance related to this operation. |
| 3559 | "selfLink": "A String", # The URI of this resource. |
| 3560 | "targetLink": "A String", |
| 3561 | "operationType": "A String", # The type of the operation. Valid values are <code>CREATE</code>, |
| 3562 | # <code>DELETE</code>, <code>UPDATE</code>, <code>RESTART</code>, |
| 3563 | # <code>IMPORT</code>, <code>EXPORT</code>, <code>BACKUP_VOLUME</code>, |
| 3564 | # <code>RESTORE_VOLUME</code>, <code>CREATE_USER</code>, |
| 3565 | # <code>DELETE_USER</code>, <code>CREATE_DATABASE</code>, |
| 3566 | # <code>DELETE_DATABASE</code> . |
| 3567 | "error": { # Database instance operation errors list wrapper. # If errors occurred during processing of this operation, this field will be |
| 3568 | # populated. |
| 3569 | "errors": [ # The list of errors encountered while processing this operation. |
| 3570 | { # Database instance operation error. |
| 3571 | "kind": "A String", # This is always <code>sql#operationError</code>. |
| 3572 | "code": "A String", # Identifies the specific error that occurred. |
| 3573 | "message": "A String", # Additional information about the error encountered. |
Dan O'Meara | dd49464 | 2020-05-01 07:42:23 -0700 | [diff] [blame] | 3574 | }, |
Bu Sun Kim | 6502091 | 2020-05-20 12:08:20 -0700 | [diff] [blame] | 3575 | ], |
| 3576 | "kind": "A String", # This is always <code>sql#operationErrors</code>. |
| 3577 | }, |
| 3578 | "kind": "A String", # This is always <code>sql#operation</code>. |
| 3579 | "importContext": { # Database instance import context. # The context for import operation, if applicable. |
| 3580 | "kind": "A String", # This is always <code>sql#importContext</code>. |
| 3581 | "csvImportOptions": { # Options for importing data as CSV. |
| 3582 | "table": "A String", # The table to which CSV data is imported. |
| 3583 | "columns": [ # The columns to which CSV data is imported. If not specified, all columns |
| 3584 | # of the database table are loaded with CSV data. |
| 3585 | "A String", |
| 3586 | ], |
Dan O'Meara | dd49464 | 2020-05-01 07:42:23 -0700 | [diff] [blame] | 3587 | }, |
Bu Sun Kim | 6502091 | 2020-05-20 12:08:20 -0700 | [diff] [blame] | 3588 | "database": "A String", # The target database for the import. If <code>fileType</code> is |
Dan O'Meara | dd49464 | 2020-05-01 07:42:23 -0700 | [diff] [blame] | 3589 | # <code>SQL</code>, this field is required only if the import file does not |
| 3590 | # specify a database, and is overridden by any database specification in the |
| 3591 | # import file. If <code>fileType</code> is <code>CSV</code>, one database |
| 3592 | # must be specified. |
Bu Sun Kim | 6502091 | 2020-05-20 12:08:20 -0700 | [diff] [blame] | 3593 | "importUser": "A String", # The PostgreSQL user for this import operation. PostgreSQL instances only. |
| 3594 | "bakImportOptions": { # Import parameters specific to SQL Server .BAK files |
| 3595 | "encryptionOptions": { |
| 3596 | "certPath": "A String", # Path to the Certificate (.cer) in Cloud Storage, in the form |
| 3597 | # <code>gs://bucketName/fileName</code>. The instance must have |
| 3598 | # write permissions to the bucket and read access to the file. |
| 3599 | "pvkPath": "A String", # Path to the Certificate Private Key (.pvk) in Cloud Storage, in the |
| 3600 | # form <code>gs://bucketName/fileName</code>. The instance must have |
| 3601 | # write permissions to the bucket and read access to the file. |
| 3602 | "pvkPassword": "A String", # Password that encrypts the private key |
| 3603 | }, |
| 3604 | }, |
| 3605 | "uri": "A String", # Path to the import file in Cloud Storage, in the form |
Dan O'Meara | dd49464 | 2020-05-01 07:42:23 -0700 | [diff] [blame] | 3606 | # <code>gs: |
| 3607 | # //bucketName/fileName</code>. Compressed gzip files (.gz) are supported |
| 3608 | # // when <code>fileType</code> is <code>SQL</code>. The instance must have |
| 3609 | # // write permissions to the bucket and read access to the file. |
Bu Sun Kim | 6502091 | 2020-05-20 12:08:20 -0700 | [diff] [blame] | 3610 | "fileType": "A String", # The file type for the specified uri. <br><code>SQL</code>: The file |
| 3611 | # contains SQL statements. <br><code>CSV</code>: The file contains CSV data. |
Craig Citro | e633be1 | 2015-03-02 13:40:36 -0800 | [diff] [blame] | 3612 | }, |
Bu Sun Kim | 6502091 | 2020-05-20 12:08:20 -0700 | [diff] [blame] | 3613 | "status": "A String", # The status of an operation. Valid values are <code>PENDING</code>, |
| 3614 | # <code>RUNNING</code>, <code>DONE</code>, |
| 3615 | # <code>SQL_OPERATION_STATUS_UNSPECIFIED</code>. |
| 3616 | "name": "A String", # An identifier that uniquely identifies the operation. You can use this |
Dan O'Meara | dd49464 | 2020-05-01 07:42:23 -0700 | [diff] [blame] | 3617 | # identifier to retrieve the Operations resource that has information about |
| 3618 | # the operation. |
Bu Sun Kim | 6502091 | 2020-05-20 12:08:20 -0700 | [diff] [blame] | 3619 | "exportContext": { # Database instance export context. # The context for export operation, if applicable. |
| 3620 | "databases": [ # Databases to be exported. <br /> <b>MySQL instances:</b> If |
Dan O'Meara | dd49464 | 2020-05-01 07:42:23 -0700 | [diff] [blame] | 3621 | # <code>fileType</code> is <code>SQL</code> and no database is specified, all |
| 3622 | # databases are exported, except for the <code>mysql</code> system database. |
| 3623 | # If <code>fileType</code> is <code>CSV</code>, you can specify one database, |
| 3624 | # either by using this property or by using the |
| 3625 | # <code>csvExportOptions.selectQuery</code> property, which takes precedence |
| 3626 | # over this property. <br /> <b>PostgreSQL instances:</b> You must specify |
| 3627 | # one database to be exported. If <code>fileType</code> is <code>CSV</code>, |
| 3628 | # this database must match the one specified in the |
| 3629 | # <code>csvExportOptions.selectQuery</code> property. |
Bu Sun Kim | 6502091 | 2020-05-20 12:08:20 -0700 | [diff] [blame] | 3630 | "A String", |
Craig Citro | e633be1 | 2015-03-02 13:40:36 -0800 | [diff] [blame] | 3631 | ], |
Bu Sun Kim | 6502091 | 2020-05-20 12:08:20 -0700 | [diff] [blame] | 3632 | "sqlExportOptions": { # Options for exporting data as SQL statements. |
| 3633 | "tables": [ # Tables to export, or that were exported, from the specified database. If |
Dan O'Meara | dd49464 | 2020-05-01 07:42:23 -0700 | [diff] [blame] | 3634 | # you specify tables, specify one and only one database. For PostgreSQL |
| 3635 | # instances, you can specify only one table. |
Bu Sun Kim | 6502091 | 2020-05-20 12:08:20 -0700 | [diff] [blame] | 3636 | "A String", |
Craig Citro | e633be1 | 2015-03-02 13:40:36 -0800 | [diff] [blame] | 3637 | ], |
Bu Sun Kim | 6502091 | 2020-05-20 12:08:20 -0700 | [diff] [blame] | 3638 | "schemaOnly": True or False, # Export only schemas. |
| 3639 | "mysqlExportOptions": { # Options for exporting from MySQL. |
| 3640 | "masterData": 42, # Option to include SQL statement required to set up replication. |
Dan O'Meara | dd49464 | 2020-05-01 07:42:23 -0700 | [diff] [blame] | 3641 | # If set to <code>1</code>, the dump file includes |
| 3642 | # a CHANGE MASTER TO statement with the binary log coordinates. |
| 3643 | # If set to <code>2</code>, the CHANGE MASTER TO statement is written as |
| 3644 | # a SQL comment, and has no effect. |
| 3645 | # All other values are ignored. |
Bu Sun Kim | 715bd7f | 2019-06-14 16:50:42 -0700 | [diff] [blame] | 3646 | }, |
Craig Citro | e633be1 | 2015-03-02 13:40:36 -0800 | [diff] [blame] | 3647 | }, |
Bu Sun Kim | 6502091 | 2020-05-20 12:08:20 -0700 | [diff] [blame] | 3648 | "fileType": "A String", # The file type for the specified uri. <br><code>SQL</code>: The file |
| 3649 | # contains SQL statements. <br><code>CSV</code>: The file contains CSV data. |
| 3650 | "uri": "A String", # The path to the file in Google Cloud Storage where the export will be |
| 3651 | # stored. The URI is in the form <code>gs: |
| 3652 | # //bucketName/fileName</code>. If the file already exists, the requests |
| 3653 | # // succeeds, but the operation fails. If <code>fileType</code> is |
| 3654 | # // <code>SQL</code> and the filename ends with .gz, the contents are |
| 3655 | # // compressed. |
| 3656 | "csvExportOptions": { # Options for exporting data as CSV. |
| 3657 | "selectQuery": "A String", # The select query used to extract the data. |
| 3658 | }, |
| 3659 | "kind": "A String", # This is always <code>sql#exportContext</code>. |
Craig Citro | e633be1 | 2015-03-02 13:40:36 -0800 | [diff] [blame] | 3660 | }, |
Bu Sun Kim | 6502091 | 2020-05-20 12:08:20 -0700 | [diff] [blame] | 3661 | "targetId": "A String", # Name of the database instance related to this operation. |
Craig Citro | e633be1 | 2015-03-02 13:40:36 -0800 | [diff] [blame] | 3662 | }</pre> |
| 3663 | </div> |
| 3664 | |
| 3665 | <div class="method"> |
Dan O'Meara | dd49464 | 2020-05-01 07:42:23 -0700 | [diff] [blame] | 3666 | <code class="details" id="stopReplica">stopReplica(project, instance, x__xgafv=None)</code> |
Craig Citro | e633be1 | 2015-03-02 13:40:36 -0800 | [diff] [blame] | 3667 | <pre>Stops the replication in the read replica instance. |
| 3668 | |
| 3669 | Args: |
| 3670 | project: string, ID of the project that contains the read replica. (required) |
| 3671 | instance: string, Cloud SQL read replica instance name. (required) |
Dan O'Meara | dd49464 | 2020-05-01 07:42:23 -0700 | [diff] [blame] | 3672 | x__xgafv: string, V1 error format. |
| 3673 | Allowed values |
| 3674 | 1 - v1 error format |
| 3675 | 2 - v2 error format |
Craig Citro | e633be1 | 2015-03-02 13:40:36 -0800 | [diff] [blame] | 3676 | |
| 3677 | Returns: |
| 3678 | An object of the form: |
| 3679 | |
Dan O'Meara | dd49464 | 2020-05-01 07:42:23 -0700 | [diff] [blame] | 3680 | { # An Operation resource.&nbsp;For successful operations that return an |
| 3681 | # Operation resource, only the fields relevant to the operation are populated |
| 3682 | # in the resource. |
Bu Sun Kim | 6502091 | 2020-05-20 12:08:20 -0700 | [diff] [blame] | 3683 | "endTime": "A String", # The time this operation finished in UTC timezone in <a |
| 3684 | # href="https://tools.ietf.org/html/rfc3339">RFC 3339</a> format, for example |
| 3685 | # <code>2012-11-15T16:19:00.094Z</code>. |
| 3686 | "startTime": "A String", # The time this operation actually started in UTC timezone in <a |
| 3687 | # href="https://tools.ietf.org/html/rfc3339">RFC 3339</a> format, for example |
| 3688 | # <code>2012-11-15T16:19:00.094Z</code>. |
| 3689 | "insertTime": "A String", # The time this operation was enqueued in UTC timezone in <a |
| 3690 | # href="https://tools.ietf.org/html/rfc3339">RFC 3339</a> format, for example |
| 3691 | # <code>2012-11-15T16:19:00.094Z</code>. |
| 3692 | "user": "A String", # The email address of the user who initiated this operation. |
| 3693 | "targetProject": "A String", # The project ID of the target instance related to this operation. |
| 3694 | "selfLink": "A String", # The URI of this resource. |
| 3695 | "targetLink": "A String", |
| 3696 | "operationType": "A String", # The type of the operation. Valid values are <code>CREATE</code>, |
| 3697 | # <code>DELETE</code>, <code>UPDATE</code>, <code>RESTART</code>, |
| 3698 | # <code>IMPORT</code>, <code>EXPORT</code>, <code>BACKUP_VOLUME</code>, |
| 3699 | # <code>RESTORE_VOLUME</code>, <code>CREATE_USER</code>, |
| 3700 | # <code>DELETE_USER</code>, <code>CREATE_DATABASE</code>, |
| 3701 | # <code>DELETE_DATABASE</code> . |
| 3702 | "error": { # Database instance operation errors list wrapper. # If errors occurred during processing of this operation, this field will be |
| 3703 | # populated. |
| 3704 | "errors": [ # The list of errors encountered while processing this operation. |
| 3705 | { # Database instance operation error. |
| 3706 | "kind": "A String", # This is always <code>sql#operationError</code>. |
| 3707 | "code": "A String", # Identifies the specific error that occurred. |
| 3708 | "message": "A String", # Additional information about the error encountered. |
Dan O'Meara | dd49464 | 2020-05-01 07:42:23 -0700 | [diff] [blame] | 3709 | }, |
Bu Sun Kim | 6502091 | 2020-05-20 12:08:20 -0700 | [diff] [blame] | 3710 | ], |
| 3711 | "kind": "A String", # This is always <code>sql#operationErrors</code>. |
| 3712 | }, |
| 3713 | "kind": "A String", # This is always <code>sql#operation</code>. |
| 3714 | "importContext": { # Database instance import context. # The context for import operation, if applicable. |
| 3715 | "kind": "A String", # This is always <code>sql#importContext</code>. |
| 3716 | "csvImportOptions": { # Options for importing data as CSV. |
| 3717 | "table": "A String", # The table to which CSV data is imported. |
| 3718 | "columns": [ # The columns to which CSV data is imported. If not specified, all columns |
| 3719 | # of the database table are loaded with CSV data. |
| 3720 | "A String", |
| 3721 | ], |
Dan O'Meara | dd49464 | 2020-05-01 07:42:23 -0700 | [diff] [blame] | 3722 | }, |
Bu Sun Kim | 6502091 | 2020-05-20 12:08:20 -0700 | [diff] [blame] | 3723 | "database": "A String", # The target database for the import. If <code>fileType</code> is |
Dan O'Meara | dd49464 | 2020-05-01 07:42:23 -0700 | [diff] [blame] | 3724 | # <code>SQL</code>, this field is required only if the import file does not |
| 3725 | # specify a database, and is overridden by any database specification in the |
| 3726 | # import file. If <code>fileType</code> is <code>CSV</code>, one database |
| 3727 | # must be specified. |
Bu Sun Kim | 6502091 | 2020-05-20 12:08:20 -0700 | [diff] [blame] | 3728 | "importUser": "A String", # The PostgreSQL user for this import operation. PostgreSQL instances only. |
| 3729 | "bakImportOptions": { # Import parameters specific to SQL Server .BAK files |
| 3730 | "encryptionOptions": { |
| 3731 | "certPath": "A String", # Path to the Certificate (.cer) in Cloud Storage, in the form |
| 3732 | # <code>gs://bucketName/fileName</code>. The instance must have |
| 3733 | # write permissions to the bucket and read access to the file. |
| 3734 | "pvkPath": "A String", # Path to the Certificate Private Key (.pvk) in Cloud Storage, in the |
| 3735 | # form <code>gs://bucketName/fileName</code>. The instance must have |
| 3736 | # write permissions to the bucket and read access to the file. |
| 3737 | "pvkPassword": "A String", # Password that encrypts the private key |
| 3738 | }, |
| 3739 | }, |
| 3740 | "uri": "A String", # Path to the import file in Cloud Storage, in the form |
Dan O'Meara | dd49464 | 2020-05-01 07:42:23 -0700 | [diff] [blame] | 3741 | # <code>gs: |
| 3742 | # //bucketName/fileName</code>. Compressed gzip files (.gz) are supported |
| 3743 | # // when <code>fileType</code> is <code>SQL</code>. The instance must have |
| 3744 | # // write permissions to the bucket and read access to the file. |
Bu Sun Kim | 6502091 | 2020-05-20 12:08:20 -0700 | [diff] [blame] | 3745 | "fileType": "A String", # The file type for the specified uri. <br><code>SQL</code>: The file |
| 3746 | # contains SQL statements. <br><code>CSV</code>: The file contains CSV data. |
Craig Citro | e633be1 | 2015-03-02 13:40:36 -0800 | [diff] [blame] | 3747 | }, |
Bu Sun Kim | 6502091 | 2020-05-20 12:08:20 -0700 | [diff] [blame] | 3748 | "status": "A String", # The status of an operation. Valid values are <code>PENDING</code>, |
| 3749 | # <code>RUNNING</code>, <code>DONE</code>, |
| 3750 | # <code>SQL_OPERATION_STATUS_UNSPECIFIED</code>. |
| 3751 | "name": "A String", # An identifier that uniquely identifies the operation. You can use this |
Dan O'Meara | dd49464 | 2020-05-01 07:42:23 -0700 | [diff] [blame] | 3752 | # identifier to retrieve the Operations resource that has information about |
| 3753 | # the operation. |
Bu Sun Kim | 6502091 | 2020-05-20 12:08:20 -0700 | [diff] [blame] | 3754 | "exportContext": { # Database instance export context. # The context for export operation, if applicable. |
| 3755 | "databases": [ # Databases to be exported. <br /> <b>MySQL instances:</b> If |
Dan O'Meara | dd49464 | 2020-05-01 07:42:23 -0700 | [diff] [blame] | 3756 | # <code>fileType</code> is <code>SQL</code> and no database is specified, all |
| 3757 | # databases are exported, except for the <code>mysql</code> system database. |
| 3758 | # If <code>fileType</code> is <code>CSV</code>, you can specify one database, |
| 3759 | # either by using this property or by using the |
| 3760 | # <code>csvExportOptions.selectQuery</code> property, which takes precedence |
| 3761 | # over this property. <br /> <b>PostgreSQL instances:</b> You must specify |
| 3762 | # one database to be exported. If <code>fileType</code> is <code>CSV</code>, |
| 3763 | # this database must match the one specified in the |
| 3764 | # <code>csvExportOptions.selectQuery</code> property. |
Bu Sun Kim | 6502091 | 2020-05-20 12:08:20 -0700 | [diff] [blame] | 3765 | "A String", |
Craig Citro | e633be1 | 2015-03-02 13:40:36 -0800 | [diff] [blame] | 3766 | ], |
Bu Sun Kim | 6502091 | 2020-05-20 12:08:20 -0700 | [diff] [blame] | 3767 | "sqlExportOptions": { # Options for exporting data as SQL statements. |
| 3768 | "tables": [ # Tables to export, or that were exported, from the specified database. If |
Dan O'Meara | dd49464 | 2020-05-01 07:42:23 -0700 | [diff] [blame] | 3769 | # you specify tables, specify one and only one database. For PostgreSQL |
| 3770 | # instances, you can specify only one table. |
Bu Sun Kim | 6502091 | 2020-05-20 12:08:20 -0700 | [diff] [blame] | 3771 | "A String", |
Craig Citro | e633be1 | 2015-03-02 13:40:36 -0800 | [diff] [blame] | 3772 | ], |
Bu Sun Kim | 6502091 | 2020-05-20 12:08:20 -0700 | [diff] [blame] | 3773 | "schemaOnly": True or False, # Export only schemas. |
| 3774 | "mysqlExportOptions": { # Options for exporting from MySQL. |
| 3775 | "masterData": 42, # Option to include SQL statement required to set up replication. |
Dan O'Meara | dd49464 | 2020-05-01 07:42:23 -0700 | [diff] [blame] | 3776 | # If set to <code>1</code>, the dump file includes |
| 3777 | # a CHANGE MASTER TO statement with the binary log coordinates. |
| 3778 | # If set to <code>2</code>, the CHANGE MASTER TO statement is written as |
| 3779 | # a SQL comment, and has no effect. |
| 3780 | # All other values are ignored. |
Bu Sun Kim | 715bd7f | 2019-06-14 16:50:42 -0700 | [diff] [blame] | 3781 | }, |
Craig Citro | e633be1 | 2015-03-02 13:40:36 -0800 | [diff] [blame] | 3782 | }, |
Bu Sun Kim | 6502091 | 2020-05-20 12:08:20 -0700 | [diff] [blame] | 3783 | "fileType": "A String", # The file type for the specified uri. <br><code>SQL</code>: The file |
| 3784 | # contains SQL statements. <br><code>CSV</code>: The file contains CSV data. |
| 3785 | "uri": "A String", # The path to the file in Google Cloud Storage where the export will be |
| 3786 | # stored. The URI is in the form <code>gs: |
| 3787 | # //bucketName/fileName</code>. If the file already exists, the requests |
| 3788 | # // succeeds, but the operation fails. If <code>fileType</code> is |
| 3789 | # // <code>SQL</code> and the filename ends with .gz, the contents are |
| 3790 | # // compressed. |
| 3791 | "csvExportOptions": { # Options for exporting data as CSV. |
| 3792 | "selectQuery": "A String", # The select query used to extract the data. |
| 3793 | }, |
| 3794 | "kind": "A String", # This is always <code>sql#exportContext</code>. |
Craig Citro | e633be1 | 2015-03-02 13:40:36 -0800 | [diff] [blame] | 3795 | }, |
Bu Sun Kim | 6502091 | 2020-05-20 12:08:20 -0700 | [diff] [blame] | 3796 | "targetId": "A String", # Name of the database instance related to this operation. |
Craig Citro | e633be1 | 2015-03-02 13:40:36 -0800 | [diff] [blame] | 3797 | }</pre> |
| 3798 | </div> |
| 3799 | |
| 3800 | <div class="method"> |
Dan O'Meara | dd49464 | 2020-05-01 07:42:23 -0700 | [diff] [blame] | 3801 | <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] | 3802 | <pre>Truncate MySQL general and slow query log tables |
| 3803 | |
| 3804 | Args: |
| 3805 | project: string, Project ID of the Cloud SQL project. (required) |
| 3806 | 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] | 3807 | body: object, The request body. |
Jon Wayne Parrott | 692617a | 2017-01-06 09:58:29 -0800 | [diff] [blame] | 3808 | The object takes the form of: |
| 3809 | |
| 3810 | { # Instance truncate log request. |
Bu Sun Kim | 6502091 | 2020-05-20 12:08:20 -0700 | [diff] [blame] | 3811 | "truncateLogContext": { # Database Instance truncate log context. # Contains details about the truncate log operation. |
| 3812 | "logType": "A String", # The type of log to truncate. Valid values are |
Dan O'Meara | dd49464 | 2020-05-01 07:42:23 -0700 | [diff] [blame] | 3813 | # <code>MYSQL_GENERAL_TABLE</code> and <code>MYSQL_SLOW_TABLE</code>. |
Bu Sun Kim | 6502091 | 2020-05-20 12:08:20 -0700 | [diff] [blame] | 3814 | "kind": "A String", # This is always <code>sql#truncateLogContext</code>. |
Jon Wayne Parrott | 692617a | 2017-01-06 09:58:29 -0800 | [diff] [blame] | 3815 | }, |
| 3816 | } |
| 3817 | |
Dan O'Meara | dd49464 | 2020-05-01 07:42:23 -0700 | [diff] [blame] | 3818 | x__xgafv: string, V1 error format. |
| 3819 | Allowed values |
| 3820 | 1 - v1 error format |
| 3821 | 2 - v2 error format |
Jon Wayne Parrott | 692617a | 2017-01-06 09:58:29 -0800 | [diff] [blame] | 3822 | |
| 3823 | Returns: |
| 3824 | An object of the form: |
| 3825 | |
Dan O'Meara | dd49464 | 2020-05-01 07:42:23 -0700 | [diff] [blame] | 3826 | { # An Operation resource.&nbsp;For successful operations that return an |
| 3827 | # Operation resource, only the fields relevant to the operation are populated |
| 3828 | # in the resource. |
Bu Sun Kim | 6502091 | 2020-05-20 12:08:20 -0700 | [diff] [blame] | 3829 | "endTime": "A String", # The time this operation finished in UTC timezone in <a |
| 3830 | # href="https://tools.ietf.org/html/rfc3339">RFC 3339</a> format, for example |
| 3831 | # <code>2012-11-15T16:19:00.094Z</code>. |
| 3832 | "startTime": "A String", # The time this operation actually started in UTC timezone in <a |
| 3833 | # href="https://tools.ietf.org/html/rfc3339">RFC 3339</a> format, for example |
| 3834 | # <code>2012-11-15T16:19:00.094Z</code>. |
| 3835 | "insertTime": "A String", # The time this operation was enqueued in UTC timezone in <a |
| 3836 | # href="https://tools.ietf.org/html/rfc3339">RFC 3339</a> format, for example |
| 3837 | # <code>2012-11-15T16:19:00.094Z</code>. |
| 3838 | "user": "A String", # The email address of the user who initiated this operation. |
| 3839 | "targetProject": "A String", # The project ID of the target instance related to this operation. |
| 3840 | "selfLink": "A String", # The URI of this resource. |
| 3841 | "targetLink": "A String", |
| 3842 | "operationType": "A String", # The type of the operation. Valid values are <code>CREATE</code>, |
| 3843 | # <code>DELETE</code>, <code>UPDATE</code>, <code>RESTART</code>, |
| 3844 | # <code>IMPORT</code>, <code>EXPORT</code>, <code>BACKUP_VOLUME</code>, |
| 3845 | # <code>RESTORE_VOLUME</code>, <code>CREATE_USER</code>, |
| 3846 | # <code>DELETE_USER</code>, <code>CREATE_DATABASE</code>, |
| 3847 | # <code>DELETE_DATABASE</code> . |
| 3848 | "error": { # Database instance operation errors list wrapper. # If errors occurred during processing of this operation, this field will be |
| 3849 | # populated. |
| 3850 | "errors": [ # The list of errors encountered while processing this operation. |
| 3851 | { # Database instance operation error. |
| 3852 | "kind": "A String", # This is always <code>sql#operationError</code>. |
| 3853 | "code": "A String", # Identifies the specific error that occurred. |
| 3854 | "message": "A String", # Additional information about the error encountered. |
Dan O'Meara | dd49464 | 2020-05-01 07:42:23 -0700 | [diff] [blame] | 3855 | }, |
Bu Sun Kim | 6502091 | 2020-05-20 12:08:20 -0700 | [diff] [blame] | 3856 | ], |
| 3857 | "kind": "A String", # This is always <code>sql#operationErrors</code>. |
| 3858 | }, |
| 3859 | "kind": "A String", # This is always <code>sql#operation</code>. |
| 3860 | "importContext": { # Database instance import context. # The context for import operation, if applicable. |
| 3861 | "kind": "A String", # This is always <code>sql#importContext</code>. |
| 3862 | "csvImportOptions": { # Options for importing data as CSV. |
| 3863 | "table": "A String", # The table to which CSV data is imported. |
| 3864 | "columns": [ # The columns to which CSV data is imported. If not specified, all columns |
| 3865 | # of the database table are loaded with CSV data. |
| 3866 | "A String", |
| 3867 | ], |
Dan O'Meara | dd49464 | 2020-05-01 07:42:23 -0700 | [diff] [blame] | 3868 | }, |
Bu Sun Kim | 6502091 | 2020-05-20 12:08:20 -0700 | [diff] [blame] | 3869 | "database": "A String", # The target database for the import. If <code>fileType</code> is |
Dan O'Meara | dd49464 | 2020-05-01 07:42:23 -0700 | [diff] [blame] | 3870 | # <code>SQL</code>, this field is required only if the import file does not |
| 3871 | # specify a database, and is overridden by any database specification in the |
| 3872 | # import file. If <code>fileType</code> is <code>CSV</code>, one database |
| 3873 | # must be specified. |
Bu Sun Kim | 6502091 | 2020-05-20 12:08:20 -0700 | [diff] [blame] | 3874 | "importUser": "A String", # The PostgreSQL user for this import operation. PostgreSQL instances only. |
| 3875 | "bakImportOptions": { # Import parameters specific to SQL Server .BAK files |
| 3876 | "encryptionOptions": { |
| 3877 | "certPath": "A String", # Path to the Certificate (.cer) in Cloud Storage, in the form |
| 3878 | # <code>gs://bucketName/fileName</code>. The instance must have |
| 3879 | # write permissions to the bucket and read access to the file. |
| 3880 | "pvkPath": "A String", # Path to the Certificate Private Key (.pvk) in Cloud Storage, in the |
| 3881 | # form <code>gs://bucketName/fileName</code>. The instance must have |
| 3882 | # write permissions to the bucket and read access to the file. |
| 3883 | "pvkPassword": "A String", # Password that encrypts the private key |
| 3884 | }, |
| 3885 | }, |
| 3886 | "uri": "A String", # Path to the import file in Cloud Storage, in the form |
Dan O'Meara | dd49464 | 2020-05-01 07:42:23 -0700 | [diff] [blame] | 3887 | # <code>gs: |
| 3888 | # //bucketName/fileName</code>. Compressed gzip files (.gz) are supported |
| 3889 | # // when <code>fileType</code> is <code>SQL</code>. The instance must have |
| 3890 | # // write permissions to the bucket and read access to the file. |
Bu Sun Kim | 6502091 | 2020-05-20 12:08:20 -0700 | [diff] [blame] | 3891 | "fileType": "A String", # The file type for the specified uri. <br><code>SQL</code>: The file |
| 3892 | # contains SQL statements. <br><code>CSV</code>: The file contains CSV data. |
Jon Wayne Parrott | 692617a | 2017-01-06 09:58:29 -0800 | [diff] [blame] | 3893 | }, |
Bu Sun Kim | 6502091 | 2020-05-20 12:08:20 -0700 | [diff] [blame] | 3894 | "status": "A String", # The status of an operation. Valid values are <code>PENDING</code>, |
| 3895 | # <code>RUNNING</code>, <code>DONE</code>, |
| 3896 | # <code>SQL_OPERATION_STATUS_UNSPECIFIED</code>. |
| 3897 | "name": "A String", # An identifier that uniquely identifies the operation. You can use this |
Dan O'Meara | dd49464 | 2020-05-01 07:42:23 -0700 | [diff] [blame] | 3898 | # identifier to retrieve the Operations resource that has information about |
| 3899 | # the operation. |
Bu Sun Kim | 6502091 | 2020-05-20 12:08:20 -0700 | [diff] [blame] | 3900 | "exportContext": { # Database instance export context. # The context for export operation, if applicable. |
| 3901 | "databases": [ # Databases to be exported. <br /> <b>MySQL instances:</b> If |
Dan O'Meara | dd49464 | 2020-05-01 07:42:23 -0700 | [diff] [blame] | 3902 | # <code>fileType</code> is <code>SQL</code> and no database is specified, all |
| 3903 | # databases are exported, except for the <code>mysql</code> system database. |
| 3904 | # If <code>fileType</code> is <code>CSV</code>, you can specify one database, |
| 3905 | # either by using this property or by using the |
| 3906 | # <code>csvExportOptions.selectQuery</code> property, which takes precedence |
| 3907 | # over this property. <br /> <b>PostgreSQL instances:</b> You must specify |
| 3908 | # one database to be exported. If <code>fileType</code> is <code>CSV</code>, |
| 3909 | # this database must match the one specified in the |
| 3910 | # <code>csvExportOptions.selectQuery</code> property. |
Bu Sun Kim | 6502091 | 2020-05-20 12:08:20 -0700 | [diff] [blame] | 3911 | "A String", |
Jon Wayne Parrott | 692617a | 2017-01-06 09:58:29 -0800 | [diff] [blame] | 3912 | ], |
Bu Sun Kim | 6502091 | 2020-05-20 12:08:20 -0700 | [diff] [blame] | 3913 | "sqlExportOptions": { # Options for exporting data as SQL statements. |
| 3914 | "tables": [ # Tables to export, or that were exported, from the specified database. If |
Dan O'Meara | dd49464 | 2020-05-01 07:42:23 -0700 | [diff] [blame] | 3915 | # you specify tables, specify one and only one database. For PostgreSQL |
| 3916 | # instances, you can specify only one table. |
Bu Sun Kim | 6502091 | 2020-05-20 12:08:20 -0700 | [diff] [blame] | 3917 | "A String", |
Jon Wayne Parrott | 692617a | 2017-01-06 09:58:29 -0800 | [diff] [blame] | 3918 | ], |
Bu Sun Kim | 6502091 | 2020-05-20 12:08:20 -0700 | [diff] [blame] | 3919 | "schemaOnly": True or False, # Export only schemas. |
| 3920 | "mysqlExportOptions": { # Options for exporting from MySQL. |
| 3921 | "masterData": 42, # Option to include SQL statement required to set up replication. |
Dan O'Meara | dd49464 | 2020-05-01 07:42:23 -0700 | [diff] [blame] | 3922 | # If set to <code>1</code>, the dump file includes |
| 3923 | # a CHANGE MASTER TO statement with the binary log coordinates. |
| 3924 | # If set to <code>2</code>, the CHANGE MASTER TO statement is written as |
| 3925 | # a SQL comment, and has no effect. |
| 3926 | # All other values are ignored. |
Bu Sun Kim | 715bd7f | 2019-06-14 16:50:42 -0700 | [diff] [blame] | 3927 | }, |
Jon Wayne Parrott | 692617a | 2017-01-06 09:58:29 -0800 | [diff] [blame] | 3928 | }, |
Bu Sun Kim | 6502091 | 2020-05-20 12:08:20 -0700 | [diff] [blame] | 3929 | "fileType": "A String", # The file type for the specified uri. <br><code>SQL</code>: The file |
| 3930 | # contains SQL statements. <br><code>CSV</code>: The file contains CSV data. |
| 3931 | "uri": "A String", # The path to the file in Google Cloud Storage where the export will be |
| 3932 | # stored. The URI is in the form <code>gs: |
| 3933 | # //bucketName/fileName</code>. If the file already exists, the requests |
| 3934 | # // succeeds, but the operation fails. If <code>fileType</code> is |
| 3935 | # // <code>SQL</code> and the filename ends with .gz, the contents are |
| 3936 | # // compressed. |
| 3937 | "csvExportOptions": { # Options for exporting data as CSV. |
| 3938 | "selectQuery": "A String", # The select query used to extract the data. |
| 3939 | }, |
| 3940 | "kind": "A String", # This is always <code>sql#exportContext</code>. |
Jon Wayne Parrott | 692617a | 2017-01-06 09:58:29 -0800 | [diff] [blame] | 3941 | }, |
Bu Sun Kim | 6502091 | 2020-05-20 12:08:20 -0700 | [diff] [blame] | 3942 | "targetId": "A String", # Name of the database instance related to this operation. |
Jon Wayne Parrott | 692617a | 2017-01-06 09:58:29 -0800 | [diff] [blame] | 3943 | }</pre> |
| 3944 | </div> |
| 3945 | |
| 3946 | <div class="method"> |
Dan O'Meara | dd49464 | 2020-05-01 07:42:23 -0700 | [diff] [blame] | 3947 | <code class="details" id="update">update(project, instance, body=None, x__xgafv=None)</code> |
| 3948 | <pre>Updates settings of a Cloud SQL instance. Using this operation might cause |
| 3949 | your instance to restart. |
Craig Citro | e633be1 | 2015-03-02 13:40:36 -0800 | [diff] [blame] | 3950 | |
| 3951 | Args: |
| 3952 | project: string, Project ID of the project that contains the instance. (required) |
| 3953 | 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] | 3954 | body: object, The request body. |
Craig Citro | e633be1 | 2015-03-02 13:40:36 -0800 | [diff] [blame] | 3955 | The object takes the form of: |
| 3956 | |
| 3957 | { # A Cloud SQL instance resource. |
Bu Sun Kim | 6502091 | 2020-05-20 12:08:20 -0700 | [diff] [blame] | 3958 | "suspensionReason": [ # If the instance state is SUSPENDED, the reason for the suspension. |
| 3959 | "A String", |
| 3960 | ], |
| 3961 | "settings": { # Database instance settings. # The user settings. |
| 3962 | "ipConfiguration": { # IP Management configuration. # The settings for IP Management. This allows to enable or disable the |
| 3963 | # instance IP and manage which external networks can connect to the instance. |
| 3964 | # The IPv4 address cannot be disabled for Second Generation instances. |
| 3965 | "requireSsl": True or False, # Whether SSL connections over IP should be enforced or not. |
| 3966 | "privateNetwork": "A String", # The resource link for the VPC network from which the Cloud SQL instance is |
| 3967 | # accessible for private IP. For example, |
| 3968 | # <code>/projects/myProject/global/networks/default</code>. This setting can |
| 3969 | # be updated, but it cannot be removed after it is set. |
| 3970 | "ipv4Enabled": True or False, # Whether the instance should be assigned an IP address or not. |
| 3971 | "authorizedNetworks": [ # The list of external networks that are allowed to connect to the instance |
| 3972 | # using the IP. In <a |
| 3973 | # href="http://en.wikipedia.org/wiki/CIDR_notation#CIDR_notation">CIDR |
| 3974 | # notation</a>, also known as 'slash' notation (e.g. |
| 3975 | # <code>192.168.100.0/24</code>). |
| 3976 | { # An entry for an Access Control list. |
| 3977 | "name": "A String", # Optional. A label to identify this entry. |
| 3978 | "kind": "A String", # This is always <code>sql#aclEntry</code>. |
| 3979 | "value": "A String", # The whitelisted value for the access control list. |
| 3980 | "expirationTime": "A String", # The time when this access control entry expires in <a |
| 3981 | # href="https://tools.ietf.org/html/rfc3339">RFC 3339</a> format, for example |
| 3982 | # <code>2012-11-15T16:19:00.094Z</code>. |
| 3983 | }, |
| 3984 | ], |
Jon Wayne Parrott | 0a471d3 | 2016-05-19 10:54:38 -0700 | [diff] [blame] | 3985 | }, |
Bu Sun Kim | 6502091 | 2020-05-20 12:08:20 -0700 | [diff] [blame] | 3986 | "availabilityType": "A String", # Availability type (PostgreSQL and MySQL instances only). Potential values: |
Dan O'Meara | dd49464 | 2020-05-01 07:42:23 -0700 | [diff] [blame] | 3987 | # <br><code>ZONAL</code>: The instance serves data from only one zone. |
| 3988 | # Outages in that zone affect data accessibility. <br><code>REGIONAL</code>: |
| 3989 | # The instance can serve data from more than one zone in a region (it is |
| 3990 | # highly available). <br>For more information, see <a |
Bu Sun Kim | 6502091 | 2020-05-20 12:08:20 -0700 | [diff] [blame] | 3991 | # href="https://cloud.google.com/sql/docs/postgres/high-availability">Overview |
Dan O'Meara | dd49464 | 2020-05-01 07:42:23 -0700 | [diff] [blame] | 3992 | # of the High Availability Configuration</a>. |
Bu Sun Kim | 6502091 | 2020-05-20 12:08:20 -0700 | [diff] [blame] | 3993 | "settingsVersion": "A String", # The version of instance settings. This is a required field for update |
| 3994 | # method to make sure concurrent updates are handled properly. During update, |
| 3995 | # use the most recent settingsVersion value for this instance and do not try |
| 3996 | # to update this value. |
| 3997 | "databaseFlags": [ # The database flags passed to the instance at startup. |
| 3998 | { # Database flags for Cloud SQL instances. |
| 3999 | "name": "A String", # The name of the flag. These flags are passed at instance startup, so |
| 4000 | # include both server options and system variables for MySQL. Flags should be |
| 4001 | # specified with underscores, not hyphens. For more information, see <a |
| 4002 | # href="/sql/docs/mysql/flags">Configuring Database Flags</a> in the Cloud |
| 4003 | # SQL documentation. |
| 4004 | "value": "A String", # The value of the flag. Booleans should be set to <code>on</code> for true |
| 4005 | # and <code>off</code> for false. This field must be omitted if the flag |
| 4006 | # doesn't take a value. |
| 4007 | }, |
Dan O'Meara | dd49464 | 2020-05-01 07:42:23 -0700 | [diff] [blame] | 4008 | ], |
Bu Sun Kim | 6502091 | 2020-05-20 12:08:20 -0700 | [diff] [blame] | 4009 | "maintenanceWindow": { # Maintenance window. This specifies when a v2 Cloud SQL instance should # The maintenance window for this instance. This specifies when the instance |
| 4010 | # can be restarted for maintenance purposes. Not used for First Generation |
| 4011 | # instances. |
| 4012 | # preferably be restarted for system maintenance purposes. |
| 4013 | "hour": 42, # hour of day - 0 to 23. |
| 4014 | "day": 42, # day of week (1-7), starting on Monday. |
| 4015 | "kind": "A String", # This is always <code>sql#maintenanceWindow</code>. |
| 4016 | "updateTrack": "A String", # Maintenance timing setting: <code>canary</code> (Earlier) or |
| 4017 | # <code>stable</code> (Later). <br /><a |
| 4018 | # href="/sql/docs/db_path/instance-settings#maintenance-timing-2ndgen"> |
| 4019 | # Learn more</a>. |
| 4020 | }, |
| 4021 | "pricingPlan": "A String", # The pricing plan for this instance. This can be either <code>PER_USE</code> |
| 4022 | # or <code>PACKAGE</code>. Only <code>PER_USE</code> is supported for Second |
| 4023 | # Generation instances. |
| 4024 | "storageAutoResize": True or False, # Configuration to increase storage size automatically. The default value is |
| 4025 | # true. Not used for First Generation instances. |
| 4026 | "storageAutoResizeLimit": "A String", # The maximum size to which storage capacity can be automatically increased. |
| 4027 | # The default value is 0, which specifies that there is no limit. Not used |
| 4028 | # for First Generation instances. |
| 4029 | "authorizedGaeApplications": [ # The App Engine app IDs that can access this instance. First Generation |
| 4030 | # instances only. |
| 4031 | "A String", |
| 4032 | ], |
| 4033 | "tier": "A String", # The tier (or machine type) for this instance, for example |
| 4034 | # <code>db-n1-standard-1</code> (MySQL instances) or |
| 4035 | # <code>db-custom-1-3840</code> (PostgreSQL instances). For MySQL instances, |
| 4036 | # this property determines whether the instance is First or Second |
| 4037 | # Generation. For more information, see <a |
| 4038 | # href="/sql/docs/db_path/instance-settings">Instance Settings</a>. |
| 4039 | "dataDiskSizeGb": "A String", # The size of data disk, in GB. The data disk size minimum is 10GB. Not used |
| 4040 | # for First Generation instances. |
| 4041 | "dataDiskType": "A String", # The type of data disk: <code>PD_SSD</code> (default) or |
| 4042 | # <code>PD_HDD</code>. Not used for First Generation instances. |
| 4043 | "databaseReplicationEnabled": True or False, # Configuration specific to read replica instances. Indicates whether |
| 4044 | # replication is enabled or not. |
| 4045 | "crashSafeReplicationEnabled": True or False, # Configuration specific to read replica instances. Indicates whether |
| 4046 | # database flags for crash-safe replication are enabled. This property is |
| 4047 | # only applicable to First Generation instances. |
| 4048 | "backupConfiguration": { # Database instance backup configuration. # The daily backup configuration for the instance. |
| 4049 | "binaryLogEnabled": True or False, # (MySQL only) Whether binary log is enabled. If backup configuration is |
| 4050 | # disabled, binarylog must be disabled as well. |
| 4051 | "replicationLogArchivingEnabled": True or False, # Reserved for future use. |
| 4052 | "location": "A String", # Location of the backup |
| 4053 | "pointInTimeRecoveryEnabled": True or False, # Reserved for future use. |
| 4054 | "startTime": "A String", # Start time for the daily backup configuration in UTC timezone in the 24 |
| 4055 | # hour format - <code>HH:MM</code>. |
| 4056 | "kind": "A String", # This is always <code>sql#backupConfiguration</code>. |
| 4057 | "enabled": True or False, # Whether this configuration is enabled. |
| 4058 | }, |
| 4059 | "userLabels": { # User-provided labels, represented as a dictionary where each label is a |
| 4060 | # single key value pair. |
| 4061 | "a_key": "A String", |
| 4062 | }, |
| 4063 | "locationPreference": { # Preferred location. This specifies where a Cloud SQL instance should # The location preference settings. This allows the instance to be located as |
| 4064 | # near as possible to either an App Engine app or Compute Engine zone for |
| 4065 | # better performance. App Engine co-location is only applicable to First |
| 4066 | # Generation instances. |
| 4067 | # preferably be located, either in a specific Compute Engine zone, or |
| 4068 | # co-located with an App Engine application. Note that if the preferred |
| 4069 | # location is not available, the instance will be located as close as possible |
| 4070 | # within the region. Only one location may be specified. |
| 4071 | "zone": "A String", # The preferred Compute Engine zone (e.g. us-central1-a, us-central1-b, |
| 4072 | # etc.). |
| 4073 | "followGaeApplication": "A String", # The AppEngine application to follow, it must be in the same region as the |
| 4074 | # Cloud SQL instance. |
| 4075 | "kind": "A String", # This is always <code>sql#locationPreference</code>. |
| 4076 | }, |
| 4077 | "kind": "A String", # This is always <code>sql#settings</code>. |
| 4078 | "replicationType": "A String", # The type of replication this instance uses. This can be either |
| 4079 | # <code>ASYNCHRONOUS</code> or <code>SYNCHRONOUS</code>. This property is |
| 4080 | # only applicable to First Generation instances. |
| 4081 | "activationPolicy": "A String", # The activation policy specifies when the instance is activated; it is |
Dan O'Meara | dd49464 | 2020-05-01 07:42:23 -0700 | [diff] [blame] | 4082 | # applicable only when the instance state is <code>RUNNABLE</code>. Valid |
| 4083 | # values: <br><code>ALWAYS</code>: The instance is on, and remains so even in |
| 4084 | # the absence of connection requests. <br><code>NEVER</code>: The instance is |
| 4085 | # off; it is not activated, even if a connection request arrives. |
| 4086 | # <br><code>ON_DEMAND</code>: First Generation instances only. The instance |
| 4087 | # responds to incoming requests, and turns itself off when not in use. |
| 4088 | # Instances with <code>PER_USE</code> pricing turn off after 15 minutes of |
| 4089 | # inactivity. Instances with <code>PER_PACKAGE</code> pricing turn off after |
| 4090 | # 12 hours of inactivity. |
Jon Wayne Parrott | 0a471d3 | 2016-05-19 10:54:38 -0700 | [diff] [blame] | 4091 | }, |
Bu Sun Kim | 6502091 | 2020-05-20 12:08:20 -0700 | [diff] [blame] | 4092 | "replicaNames": [ # The replicas of the instance. |
| 4093 | "A String", |
| 4094 | ], |
| 4095 | "diskEncryptionConfiguration": { # Disk encryption configuration for an instance. # Disk encryption configuration specific to an instance. |
| 4096 | # Applies only to Second Generation instances. |
| 4097 | "kind": "A String", # This is always <code>sql#diskEncryptionConfiguration</code>. |
| 4098 | "kmsKeyName": "A String", # Resource name of KMS key for disk encryption |
| 4099 | }, |
| 4100 | "scheduledMaintenance": { # Any scheduled maintenancce for this instance. # The start time of any upcoming scheduled maintenance for this instance. |
| 4101 | "canDefer": True or False, |
| 4102 | "startTime": "A String", # The start time of any upcoming scheduled maintenance for this instance. |
| 4103 | "canReschedule": True or False, # If the scheduled maintenance can be rescheduled. |
| 4104 | }, |
| 4105 | "rootPassword": "A String", # Initial root password. Use only on creation. |
| 4106 | "etag": "A String", # This field is deprecated and will be removed from a future version of the |
| 4107 | # API. Use the <code>settings.settingsVersion</code> field instead. |
| 4108 | "serverCaCert": { # SslCerts Resource # SSL configuration. |
| 4109 | "sha1Fingerprint": "A String", # Sha1 Fingerprint. |
| 4110 | "certSerialNumber": "A String", # Serial number, as extracted from the certificate. |
| 4111 | "cert": "A String", # PEM representation. |
| 4112 | "kind": "A String", # This is always <code>sql#sslCert</code>. |
| 4113 | "commonName": "A String", # User supplied name. Constrained to [a-zA-Z.-_ ]+. |
| 4114 | "createTime": "A String", # The time when the certificate was created in <a |
| 4115 | # href="https://tools.ietf.org/html/rfc3339">RFC 3339</a> format, for example |
| 4116 | # <code>2012-11-15T16:19:00.094Z</code> |
| 4117 | "instance": "A String", # Name of the database instance. |
| 4118 | "selfLink": "A String", # The URI of this resource. |
| 4119 | "expirationTime": "A String", # The time when the certificate expires in <a |
| 4120 | # href="https://tools.ietf.org/html/rfc3339">RFC 3339</a> format, for example |
| 4121 | # <code>2012-11-15T16:19:00.094Z</code>. |
| 4122 | }, |
| 4123 | "maxDiskSize": "A String", # The maximum disk size of the instance in bytes. |
| 4124 | "name": "A String", # Name of the Cloud SQL instance. This does not include the project ID. |
| 4125 | "masterInstanceName": "A String", # The name of the instance which will act as master in the replication setup. |
| 4126 | "instanceType": "A String", # The instance type. This can be one of the following. |
| 4127 | # <br><code>CLOUD_SQL_INSTANCE</code>: A Cloud SQL instance that is not |
| 4128 | # replicating from a master. <br><code>ON_PREMISES_INSTANCE</code>: An |
| 4129 | # instance running on the |
| 4130 | # customer's premises. <br><code>READ_REPLICA_INSTANCE</code>: A Cloud SQL |
| 4131 | # instance configured as a read-replica. |
| 4132 | "gceZone": "A String", # The Compute Engine zone that the instance is currently serving from. This |
| 4133 | # value could be different from the zone that was specified when the instance |
| 4134 | # was created if the instance has failed over to its secondary zone. |
| 4135 | "currentDiskSize": "A String", # The current disk usage of the instance in bytes. This property has been |
| 4136 | # deprecated. Users should use the |
| 4137 | # "cloudsql.googleapis.com/database/disk/bytes_used" metric in Cloud |
| 4138 | # Monitoring API instead. Please see <a |
| 4139 | # href="https://groups.google.com/d/msg/google-cloud-sql-announce/I_7-F9EBhT0/BtvFtdFeAgAJ">this |
| 4140 | # announcement</a> for details. |
| 4141 | "replicaConfiguration": { # Read-replica configuration for connecting to the master. # Configuration specific to failover replicas and read replicas. |
| 4142 | "failoverTarget": True or False, # Specifies if the replica is the failover target. If the field is set to |
Dan O'Meara | dd49464 | 2020-05-01 07:42:23 -0700 | [diff] [blame] | 4143 | # <code>true</code> the replica will be designated as a failover replica. In |
| 4144 | # case the master instance fails, the replica instance will be promoted as |
| 4145 | # the new master instance. <p>Only one replica can be specified as failover |
| 4146 | # target, and the replica has to be in different zone with the master |
| 4147 | # instance. |
Bu Sun Kim | 6502091 | 2020-05-20 12:08:20 -0700 | [diff] [blame] | 4148 | "kind": "A String", # This is always <code>sql#replicaConfiguration</code>. |
| 4149 | "mysqlReplicaConfiguration": { # Read-replica configuration specific to MySQL databases. # MySQL specific configuration when replicating from a MySQL on-premises |
Dan O'Meara | dd49464 | 2020-05-01 07:42:23 -0700 | [diff] [blame] | 4150 | # master. Replication configuration information such as the username, |
| 4151 | # password, certificates, and keys are not stored in the instance metadata. |
| 4152 | # The configuration information is used only to set up the replication |
| 4153 | # connection and is stored by MySQL in a file named <code>master.info</code> |
| 4154 | # in the data directory. |
Bu Sun Kim | 6502091 | 2020-05-20 12:08:20 -0700 | [diff] [blame] | 4155 | "clientKey": "A String", # PEM representation of the slave's private key. The corresponsing public key |
| 4156 | # is encoded in the client's certificate. |
| 4157 | "sslCipher": "A String", # A list of permissible ciphers to use for SSL encryption. |
| 4158 | "masterHeartbeatPeriod": "A String", # Interval in milliseconds between replication heartbeats. |
| 4159 | "connectRetryInterval": 42, # Seconds to wait between connect retries. MySQL's default is 60 seconds. |
| 4160 | "dumpFilePath": "A String", # Path to a SQL dump file in Google Cloud Storage from which the slave |
Dan O'Meara | dd49464 | 2020-05-01 07:42:23 -0700 | [diff] [blame] | 4161 | # instance is to be created. The URI is in the form gs: |
| 4162 | # //bucketName/fileName. Compressed gzip files (.gz) are also supported. |
| 4163 | # // Dumps should have the binlog co-ordinates from which replication should |
| 4164 | # // begin. This can be accomplished by setting --master-data to 1 when using |
| 4165 | # // mysqldump. |
Bu Sun Kim | 6502091 | 2020-05-20 12:08:20 -0700 | [diff] [blame] | 4166 | "clientCertificate": "A String", # PEM representation of the slave's x509 certificate. |
| 4167 | "username": "A String", # The username for the replication connection. |
| 4168 | "caCertificate": "A String", # PEM representation of the trusted CA's x509 certificate. |
| 4169 | "kind": "A String", # This is always <code>sql#mysqlReplicaConfiguration</code>. |
| 4170 | "password": "A String", # The password for the replication connection. |
| 4171 | "verifyServerCertificate": True or False, # Whether or not to check the master's Common Name value in the certificate |
| 4172 | # that it sends during the SSL handshake. |
Nathaniel Manista | 4f877e5 | 2015-06-15 16:44:50 +0000 | [diff] [blame] | 4173 | }, |
| 4174 | }, |
Bu Sun Kim | 6502091 | 2020-05-20 12:08:20 -0700 | [diff] [blame] | 4175 | "connectionName": "A String", # Connection name of the Cloud SQL instance used in connection strings. |
| 4176 | "failoverReplica": { # The name and status of the failover replica. This property is applicable |
| 4177 | # only to Second Generation instances. |
| 4178 | "available": True or False, # The availability status of the failover replica. A false status indicates |
| 4179 | # that the failover replica is out of sync. The master can only failover to |
| 4180 | # the failover replica when the status is true. |
| 4181 | "name": "A String", # The name of the failover replica. If specified at instance creation, a |
| 4182 | # failover replica is created for the instance. The name |
| 4183 | # doesn't include the project ID. This property is applicable only to |
| 4184 | # Second Generation instances. |
| 4185 | }, |
| 4186 | "ipAddresses": [ # The assigned IP addresses for the instance. |
| 4187 | { # Database instance IP Mapping. |
| 4188 | "timeToRetire": "A String", # The due time for this IP to be retired in <a |
| 4189 | # href="https://tools.ietf.org/html/rfc3339">RFC 3339</a> format, for example |
| 4190 | # <code>2012-11-15T16:19:00.094Z</code>. This field is only available when |
| 4191 | # the IP is scheduled to be retired. |
| 4192 | "type": "A String", # The type of this IP address. A <code>PRIMARY</code> address is a public |
| 4193 | # address that can accept incoming connections. A <code>PRIVATE</code> |
| 4194 | # address is a private address that can accept incoming connections. An |
| 4195 | # <code>OUTGOING</code> address is the source address of connections |
| 4196 | # originating from the instance, if supported. |
| 4197 | "ipAddress": "A String", # The IP address assigned. |
| 4198 | }, |
| 4199 | ], |
| 4200 | "ipv6Address": "A String", # The IPv6 address assigned to the instance. This property is applicable only |
| 4201 | # to First Generation instances. |
| 4202 | "selfLink": "A String", # The URI of this resource. |
| 4203 | "diskEncryptionStatus": { # Disk encryption status for an instance. # Disk encryption status specific to an instance. |
| 4204 | # Applies only to Second Generation instances. |
| 4205 | "kmsKeyVersionName": "A String", # KMS key version used to encrypt the Cloud SQL instance resource |
| 4206 | "kind": "A String", # This is always <code>sql#diskEncryptionStatus</code>. |
| 4207 | }, |
| 4208 | "kind": "A String", # This is always <code>sql#instance</code>. |
| 4209 | "region": "A String", # The geographical region. Can be <code>us-central</code> |
| 4210 | # (<code>FIRST_GEN</code> instances only), <code>us-central1</code> |
| 4211 | # (<code>SECOND_GEN</code> instances only), <code>asia-east1</code> or |
| 4212 | # <code>europe-west1</code>. Defaults to <code>us-central</code> or |
| 4213 | # <code>us-central1</code> depending on the instance type (First Generation |
| 4214 | # or Second Generation). The region can not be changed after instance |
| 4215 | # creation. |
| 4216 | "state": "A String", # The current serving state of the Cloud SQL instance. This can be one of the |
| 4217 | # following. <br><code>RUNNABLE</code>: The instance is running, or is ready |
| 4218 | # to run when accessed. <br><code>SUSPENDED</code>: The instance is not |
| 4219 | # available, for example due to problems with billing. |
| 4220 | # <br><code>PENDING_CREATE</code>: The instance is being created. |
| 4221 | # <br><code>MAINTENANCE</code>: The instance is down for maintenance. |
| 4222 | # <br><code>FAILED</code>: The instance creation failed. |
| 4223 | # <br><code>UNKNOWN_STATE</code>: The state of the instance is unknown. |
| 4224 | "backendType": "A String", # <code>FIRST_GEN</code>: First Generation instance. MySQL only. <br |
| 4225 | # /><code>SECOND_GEN</code>: Second Generation instance or PostgreSQL |
| 4226 | # instance. <br /><code>EXTERNAL</code>: A database server that is not |
| 4227 | # managed by Google. <br>This property is read-only; use the |
| 4228 | # <code>tier</code> property in the <code>settings</code> object to determine |
| 4229 | # the database type and Second or First Generation. |
| 4230 | "onPremisesConfiguration": { # On-premises instance configuration. # Configuration specific to on-premises instances. |
| 4231 | "clientKey": "A String", # PEM representation of the slave's private key. The corresponsing public key |
| 4232 | # is encoded in the client's certificate. |
| 4233 | "dumpFilePath": "A String", # The dump file to create the Cloud SQL replica. |
| 4234 | "hostPort": "A String", # The host and port of the on-premises instance in host:port format |
| 4235 | "clientCertificate": "A String", # PEM representation of the slave's x509 certificate. |
| 4236 | "username": "A String", # The username for connecting to on-premises instance. |
| 4237 | "caCertificate": "A String", # PEM representation of the trusted CA's x509 certificate. |
| 4238 | "kind": "A String", # This is always <code>sql#onPremisesConfiguration</code>. |
| 4239 | "password": "A String", # The password for connecting to on-premises instance. |
| 4240 | }, |
| 4241 | "project": "A String", # The project ID of the project containing the Cloud SQL instance. The Google |
| 4242 | # apps domain is prefixed if applicable. |
| 4243 | "serviceAccountEmailAddress": "A String", # The service account email address assigned to the instance. This property |
| 4244 | # is applicable only to Second Generation instances. |
| 4245 | "databaseVersion": "A String", # The database engine type and version. The <code>databaseVersion</code> |
| 4246 | # field can not be changed after instance creation. MySQL Second Generation |
| 4247 | # instances: <code>MYSQL_5_7</code> (default) or <code>MYSQL_5_6</code>. |
| 4248 | # PostgreSQL instances: <code>POSTGRES_9_6</code> (default) or |
| 4249 | # <code>POSTGRES_11 Beta</code> MySQL First Generation |
| 4250 | # instances: <code>MYSQL_5_6</code> (default) or <code>MYSQL_5_5</code> |
Craig Citro | e633be1 | 2015-03-02 13:40:36 -0800 | [diff] [blame] | 4251 | } |
| 4252 | |
Dan O'Meara | dd49464 | 2020-05-01 07:42:23 -0700 | [diff] [blame] | 4253 | x__xgafv: string, V1 error format. |
| 4254 | Allowed values |
| 4255 | 1 - v1 error format |
| 4256 | 2 - v2 error format |
Craig Citro | e633be1 | 2015-03-02 13:40:36 -0800 | [diff] [blame] | 4257 | |
| 4258 | Returns: |
| 4259 | An object of the form: |
| 4260 | |
Dan O'Meara | dd49464 | 2020-05-01 07:42:23 -0700 | [diff] [blame] | 4261 | { # An Operation resource.&nbsp;For successful operations that return an |
| 4262 | # Operation resource, only the fields relevant to the operation are populated |
| 4263 | # in the resource. |
Bu Sun Kim | 6502091 | 2020-05-20 12:08:20 -0700 | [diff] [blame] | 4264 | "endTime": "A String", # The time this operation finished in UTC timezone in <a |
| 4265 | # href="https://tools.ietf.org/html/rfc3339">RFC 3339</a> format, for example |
| 4266 | # <code>2012-11-15T16:19:00.094Z</code>. |
| 4267 | "startTime": "A String", # The time this operation actually started in UTC timezone in <a |
| 4268 | # href="https://tools.ietf.org/html/rfc3339">RFC 3339</a> format, for example |
| 4269 | # <code>2012-11-15T16:19:00.094Z</code>. |
| 4270 | "insertTime": "A String", # The time this operation was enqueued in UTC timezone in <a |
| 4271 | # href="https://tools.ietf.org/html/rfc3339">RFC 3339</a> format, for example |
| 4272 | # <code>2012-11-15T16:19:00.094Z</code>. |
| 4273 | "user": "A String", # The email address of the user who initiated this operation. |
| 4274 | "targetProject": "A String", # The project ID of the target instance related to this operation. |
| 4275 | "selfLink": "A String", # The URI of this resource. |
| 4276 | "targetLink": "A String", |
| 4277 | "operationType": "A String", # The type of the operation. Valid values are <code>CREATE</code>, |
| 4278 | # <code>DELETE</code>, <code>UPDATE</code>, <code>RESTART</code>, |
| 4279 | # <code>IMPORT</code>, <code>EXPORT</code>, <code>BACKUP_VOLUME</code>, |
| 4280 | # <code>RESTORE_VOLUME</code>, <code>CREATE_USER</code>, |
| 4281 | # <code>DELETE_USER</code>, <code>CREATE_DATABASE</code>, |
| 4282 | # <code>DELETE_DATABASE</code> . |
| 4283 | "error": { # Database instance operation errors list wrapper. # If errors occurred during processing of this operation, this field will be |
| 4284 | # populated. |
| 4285 | "errors": [ # The list of errors encountered while processing this operation. |
| 4286 | { # Database instance operation error. |
| 4287 | "kind": "A String", # This is always <code>sql#operationError</code>. |
| 4288 | "code": "A String", # Identifies the specific error that occurred. |
| 4289 | "message": "A String", # Additional information about the error encountered. |
Dan O'Meara | dd49464 | 2020-05-01 07:42:23 -0700 | [diff] [blame] | 4290 | }, |
Bu Sun Kim | 6502091 | 2020-05-20 12:08:20 -0700 | [diff] [blame] | 4291 | ], |
| 4292 | "kind": "A String", # This is always <code>sql#operationErrors</code>. |
| 4293 | }, |
| 4294 | "kind": "A String", # This is always <code>sql#operation</code>. |
| 4295 | "importContext": { # Database instance import context. # The context for import operation, if applicable. |
| 4296 | "kind": "A String", # This is always <code>sql#importContext</code>. |
| 4297 | "csvImportOptions": { # Options for importing data as CSV. |
| 4298 | "table": "A String", # The table to which CSV data is imported. |
| 4299 | "columns": [ # The columns to which CSV data is imported. If not specified, all columns |
| 4300 | # of the database table are loaded with CSV data. |
| 4301 | "A String", |
| 4302 | ], |
Dan O'Meara | dd49464 | 2020-05-01 07:42:23 -0700 | [diff] [blame] | 4303 | }, |
Bu Sun Kim | 6502091 | 2020-05-20 12:08:20 -0700 | [diff] [blame] | 4304 | "database": "A String", # The target database for the import. If <code>fileType</code> is |
Dan O'Meara | dd49464 | 2020-05-01 07:42:23 -0700 | [diff] [blame] | 4305 | # <code>SQL</code>, this field is required only if the import file does not |
| 4306 | # specify a database, and is overridden by any database specification in the |
| 4307 | # import file. If <code>fileType</code> is <code>CSV</code>, one database |
| 4308 | # must be specified. |
Bu Sun Kim | 6502091 | 2020-05-20 12:08:20 -0700 | [diff] [blame] | 4309 | "importUser": "A String", # The PostgreSQL user for this import operation. PostgreSQL instances only. |
| 4310 | "bakImportOptions": { # Import parameters specific to SQL Server .BAK files |
| 4311 | "encryptionOptions": { |
| 4312 | "certPath": "A String", # Path to the Certificate (.cer) in Cloud Storage, in the form |
| 4313 | # <code>gs://bucketName/fileName</code>. The instance must have |
| 4314 | # write permissions to the bucket and read access to the file. |
| 4315 | "pvkPath": "A String", # Path to the Certificate Private Key (.pvk) in Cloud Storage, in the |
| 4316 | # form <code>gs://bucketName/fileName</code>. The instance must have |
| 4317 | # write permissions to the bucket and read access to the file. |
| 4318 | "pvkPassword": "A String", # Password that encrypts the private key |
| 4319 | }, |
| 4320 | }, |
| 4321 | "uri": "A String", # Path to the import file in Cloud Storage, in the form |
Dan O'Meara | dd49464 | 2020-05-01 07:42:23 -0700 | [diff] [blame] | 4322 | # <code>gs: |
| 4323 | # //bucketName/fileName</code>. Compressed gzip files (.gz) are supported |
| 4324 | # // when <code>fileType</code> is <code>SQL</code>. The instance must have |
| 4325 | # // write permissions to the bucket and read access to the file. |
Bu Sun Kim | 6502091 | 2020-05-20 12:08:20 -0700 | [diff] [blame] | 4326 | "fileType": "A String", # The file type for the specified uri. <br><code>SQL</code>: The file |
| 4327 | # contains SQL statements. <br><code>CSV</code>: The file contains CSV data. |
Craig Citro | e633be1 | 2015-03-02 13:40:36 -0800 | [diff] [blame] | 4328 | }, |
Bu Sun Kim | 6502091 | 2020-05-20 12:08:20 -0700 | [diff] [blame] | 4329 | "status": "A String", # The status of an operation. Valid values are <code>PENDING</code>, |
| 4330 | # <code>RUNNING</code>, <code>DONE</code>, |
| 4331 | # <code>SQL_OPERATION_STATUS_UNSPECIFIED</code>. |
| 4332 | "name": "A String", # An identifier that uniquely identifies the operation. You can use this |
Dan O'Meara | dd49464 | 2020-05-01 07:42:23 -0700 | [diff] [blame] | 4333 | # identifier to retrieve the Operations resource that has information about |
| 4334 | # the operation. |
Bu Sun Kim | 6502091 | 2020-05-20 12:08:20 -0700 | [diff] [blame] | 4335 | "exportContext": { # Database instance export context. # The context for export operation, if applicable. |
| 4336 | "databases": [ # Databases to be exported. <br /> <b>MySQL instances:</b> If |
Dan O'Meara | dd49464 | 2020-05-01 07:42:23 -0700 | [diff] [blame] | 4337 | # <code>fileType</code> is <code>SQL</code> and no database is specified, all |
| 4338 | # databases are exported, except for the <code>mysql</code> system database. |
| 4339 | # If <code>fileType</code> is <code>CSV</code>, you can specify one database, |
| 4340 | # either by using this property or by using the |
| 4341 | # <code>csvExportOptions.selectQuery</code> property, which takes precedence |
| 4342 | # over this property. <br /> <b>PostgreSQL instances:</b> You must specify |
| 4343 | # one database to be exported. If <code>fileType</code> is <code>CSV</code>, |
| 4344 | # this database must match the one specified in the |
| 4345 | # <code>csvExportOptions.selectQuery</code> property. |
Bu Sun Kim | 6502091 | 2020-05-20 12:08:20 -0700 | [diff] [blame] | 4346 | "A String", |
Craig Citro | e633be1 | 2015-03-02 13:40:36 -0800 | [diff] [blame] | 4347 | ], |
Bu Sun Kim | 6502091 | 2020-05-20 12:08:20 -0700 | [diff] [blame] | 4348 | "sqlExportOptions": { # Options for exporting data as SQL statements. |
| 4349 | "tables": [ # Tables to export, or that were exported, from the specified database. If |
Dan O'Meara | dd49464 | 2020-05-01 07:42:23 -0700 | [diff] [blame] | 4350 | # you specify tables, specify one and only one database. For PostgreSQL |
| 4351 | # instances, you can specify only one table. |
Bu Sun Kim | 6502091 | 2020-05-20 12:08:20 -0700 | [diff] [blame] | 4352 | "A String", |
Craig Citro | e633be1 | 2015-03-02 13:40:36 -0800 | [diff] [blame] | 4353 | ], |
Bu Sun Kim | 6502091 | 2020-05-20 12:08:20 -0700 | [diff] [blame] | 4354 | "schemaOnly": True or False, # Export only schemas. |
| 4355 | "mysqlExportOptions": { # Options for exporting from MySQL. |
| 4356 | "masterData": 42, # Option to include SQL statement required to set up replication. |
Dan O'Meara | dd49464 | 2020-05-01 07:42:23 -0700 | [diff] [blame] | 4357 | # If set to <code>1</code>, the dump file includes |
| 4358 | # a CHANGE MASTER TO statement with the binary log coordinates. |
| 4359 | # If set to <code>2</code>, the CHANGE MASTER TO statement is written as |
| 4360 | # a SQL comment, and has no effect. |
| 4361 | # All other values are ignored. |
Bu Sun Kim | 715bd7f | 2019-06-14 16:50:42 -0700 | [diff] [blame] | 4362 | }, |
Craig Citro | e633be1 | 2015-03-02 13:40:36 -0800 | [diff] [blame] | 4363 | }, |
Bu Sun Kim | 6502091 | 2020-05-20 12:08:20 -0700 | [diff] [blame] | 4364 | "fileType": "A String", # The file type for the specified uri. <br><code>SQL</code>: The file |
| 4365 | # contains SQL statements. <br><code>CSV</code>: The file contains CSV data. |
| 4366 | "uri": "A String", # The path to the file in Google Cloud Storage where the export will be |
| 4367 | # stored. The URI is in the form <code>gs: |
| 4368 | # //bucketName/fileName</code>. If the file already exists, the requests |
| 4369 | # // succeeds, but the operation fails. If <code>fileType</code> is |
| 4370 | # // <code>SQL</code> and the filename ends with .gz, the contents are |
| 4371 | # // compressed. |
| 4372 | "csvExportOptions": { # Options for exporting data as CSV. |
| 4373 | "selectQuery": "A String", # The select query used to extract the data. |
| 4374 | }, |
| 4375 | "kind": "A String", # This is always <code>sql#exportContext</code>. |
Craig Citro | e633be1 | 2015-03-02 13:40:36 -0800 | [diff] [blame] | 4376 | }, |
Bu Sun Kim | 6502091 | 2020-05-20 12:08:20 -0700 | [diff] [blame] | 4377 | "targetId": "A String", # Name of the database instance related to this operation. |
Craig Citro | e633be1 | 2015-03-02 13:40:36 -0800 | [diff] [blame] | 4378 | }</pre> |
| 4379 | </div> |
| 4380 | |
| 4381 | </body></html> |