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 | 4ed7d3f | 2020-05-27 12:20:54 -0700 | [diff] [blame^] | 105 | <code><a href="#list">list(project, pageToken=None, maxResults=None, filter=None, x__xgafv=None)</a></code></p> |
Dan O'Meara | dd49464 | 2020-05-01 07:42:23 -0700 | [diff] [blame] | 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 | "targetLink": "A String", |
| 167 | "operationType": "A String", # The type of the operation. Valid values are <code>CREATE</code>, |
| 168 | # <code>DELETE</code>, <code>UPDATE</code>, <code>RESTART</code>, |
| 169 | # <code>IMPORT</code>, <code>EXPORT</code>, <code>BACKUP_VOLUME</code>, |
| 170 | # <code>RESTORE_VOLUME</code>, <code>CREATE_USER</code>, |
| 171 | # <code>DELETE_USER</code>, <code>CREATE_DATABASE</code>, |
| 172 | # <code>DELETE_DATABASE</code> . |
| 173 | "error": { # Database instance operation errors list wrapper. # If errors occurred during processing of this operation, this field will be |
| 174 | # populated. |
| 175 | "errors": [ # The list of errors encountered while processing this operation. |
| 176 | { # Database instance operation error. |
| 177 | "kind": "A String", # This is always <code>sql#operationError</code>. |
| 178 | "code": "A String", # Identifies the specific error that occurred. |
| 179 | "message": "A String", # Additional information about the error encountered. |
Dan O'Meara | dd49464 | 2020-05-01 07:42:23 -0700 | [diff] [blame] | 180 | }, |
Bu Sun Kim | 6502091 | 2020-05-20 12:08:20 -0700 | [diff] [blame] | 181 | ], |
| 182 | "kind": "A String", # This is always <code>sql#operationErrors</code>. |
| 183 | }, |
| 184 | "kind": "A String", # This is always <code>sql#operation</code>. |
| 185 | "importContext": { # Database instance import context. # The context for import operation, if applicable. |
Bu Sun Kim | 6502091 | 2020-05-20 12:08:20 -0700 | [diff] [blame] | 186 | "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] | 187 | # <code>SQL</code>, this field is required only if the import file does not |
| 188 | # specify a database, and is overridden by any database specification in the |
| 189 | # import file. If <code>fileType</code> is <code>CSV</code>, one database |
| 190 | # must be specified. |
Bu Sun Kim | 6502091 | 2020-05-20 12:08:20 -0700 | [diff] [blame] | 191 | "importUser": "A String", # The PostgreSQL user for this import operation. PostgreSQL instances only. |
| 192 | "bakImportOptions": { # Import parameters specific to SQL Server .BAK files |
| 193 | "encryptionOptions": { |
Bu Sun Kim | 4ed7d3f | 2020-05-27 12:20:54 -0700 | [diff] [blame^] | 194 | "pvkPassword": "A String", # Password that encrypts the private key |
Bu Sun Kim | 6502091 | 2020-05-20 12:08:20 -0700 | [diff] [blame] | 195 | "certPath": "A String", # Path to the Certificate (.cer) in Cloud Storage, in the form |
| 196 | # <code>gs://bucketName/fileName</code>. The instance must have |
| 197 | # write permissions to the bucket and read access to the file. |
| 198 | "pvkPath": "A String", # Path to the Certificate Private Key (.pvk) in Cloud Storage, in the |
| 199 | # form <code>gs://bucketName/fileName</code>. The instance must have |
| 200 | # write permissions to the bucket and read access to the file. |
Bu Sun Kim | 6502091 | 2020-05-20 12:08:20 -0700 | [diff] [blame] | 201 | }, |
| 202 | }, |
| 203 | "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] | 204 | # <code>gs: |
| 205 | # //bucketName/fileName</code>. Compressed gzip files (.gz) are supported |
| 206 | # // when <code>fileType</code> is <code>SQL</code>. The instance must have |
| 207 | # // write permissions to the bucket and read access to the file. |
Bu Sun Kim | 6502091 | 2020-05-20 12:08:20 -0700 | [diff] [blame] | 208 | "fileType": "A String", # The file type for the specified uri. <br><code>SQL</code>: The file |
| 209 | # contains SQL statements. <br><code>CSV</code>: The file contains CSV data. |
Bu Sun Kim | 4ed7d3f | 2020-05-27 12:20:54 -0700 | [diff] [blame^] | 210 | "kind": "A String", # This is always <code>sql#importContext</code>. |
| 211 | "csvImportOptions": { # Options for importing data as CSV. |
| 212 | "table": "A String", # The table to which CSV data is imported. |
| 213 | "columns": [ # The columns to which CSV data is imported. If not specified, all columns |
| 214 | # of the database table are loaded with CSV data. |
| 215 | "A String", |
| 216 | ], |
| 217 | }, |
Craig Citro | e633be1 | 2015-03-02 13:40:36 -0800 | [diff] [blame] | 218 | }, |
Bu Sun Kim | 6502091 | 2020-05-20 12:08:20 -0700 | [diff] [blame] | 219 | "status": "A String", # The status of an operation. Valid values are <code>PENDING</code>, |
| 220 | # <code>RUNNING</code>, <code>DONE</code>, |
| 221 | # <code>SQL_OPERATION_STATUS_UNSPECIFIED</code>. |
| 222 | "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] | 223 | # identifier to retrieve the Operations resource that has information about |
| 224 | # the operation. |
Bu Sun Kim | 6502091 | 2020-05-20 12:08:20 -0700 | [diff] [blame] | 225 | "exportContext": { # Database instance export context. # The context for export operation, if applicable. |
Bu Sun Kim | 4ed7d3f | 2020-05-27 12:20:54 -0700 | [diff] [blame^] | 226 | "fileType": "A String", # The file type for the specified uri. <br><code>SQL</code>: The file |
| 227 | # contains SQL statements. <br><code>CSV</code>: The file contains CSV data. |
| 228 | "uri": "A String", # The path to the file in Google Cloud Storage where the export will be |
| 229 | # stored. The URI is in the form <code>gs: |
| 230 | # //bucketName/fileName</code>. If the file already exists, the requests |
| 231 | # // succeeds, but the operation fails. If <code>fileType</code> is |
| 232 | # // <code>SQL</code> and the filename ends with .gz, the contents are |
| 233 | # // compressed. |
| 234 | "csvExportOptions": { # Options for exporting data as CSV. |
| 235 | "selectQuery": "A String", # The select query used to extract the data. |
| 236 | }, |
| 237 | "kind": "A String", # This is always <code>sql#exportContext</code>. |
Bu Sun Kim | 6502091 | 2020-05-20 12:08:20 -0700 | [diff] [blame] | 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 | }, |
| 266 | }, |
Bu Sun Kim | 6502091 | 2020-05-20 12:08:20 -0700 | [diff] [blame] | 267 | "targetId": "A String", # Name of the database instance related to this operation. |
Bu Sun Kim | 4ed7d3f | 2020-05-27 12:20:54 -0700 | [diff] [blame^] | 268 | "endTime": "A String", # The time this operation finished in UTC timezone in <a |
| 269 | # href="https://tools.ietf.org/html/rfc3339">RFC 3339</a> format, for example |
| 270 | # <code>2012-11-15T16:19:00.094Z</code>. |
| 271 | "startTime": "A String", # The time this operation actually started in UTC timezone in <a |
| 272 | # href="https://tools.ietf.org/html/rfc3339">RFC 3339</a> format, for example |
| 273 | # <code>2012-11-15T16:19:00.094Z</code>. |
| 274 | "insertTime": "A String", # The time this operation was enqueued in UTC timezone in <a |
| 275 | # href="https://tools.ietf.org/html/rfc3339">RFC 3339</a> format, for example |
| 276 | # <code>2012-11-15T16:19:00.094Z</code>. |
| 277 | "user": "A String", # The email address of the user who initiated this operation. |
| 278 | "targetProject": "A String", # The project ID of the target instance related to this operation. |
| 279 | "selfLink": "A String", # The URI of this resource. |
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. |
Bu Sun Kim | 6502091 | 2020-05-20 12:08:20 -0700 | [diff] [blame] | 297 | "pointInTime": "A String", # Reserved for future use. |
| 298 | "destinationInstanceName": "A String", # Name of the Cloud SQL instance to be created as a clone. |
| 299 | "pitrTimestampMs": "A String", # Reserved for future use. |
| 300 | "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] | 301 | # source instance should be cloned. If not specified, the source instance is |
| 302 | # cloned up to the most recent binary log coordinates. |
Bu Sun Kim | 6502091 | 2020-05-20 12:08:20 -0700 | [diff] [blame] | 303 | "binLogFileName": "A String", # Name of the binary log file for a Cloud SQL instance. |
| 304 | "binLogPosition": "A String", # Position (offset) within the binary log file. |
Bu Sun Kim | 4ed7d3f | 2020-05-27 12:20:54 -0700 | [diff] [blame^] | 305 | "kind": "A String", # This is always <code>sql#binLogCoordinates</code>. |
Bu Sun Kim | 715bd7f | 2019-06-14 16:50:42 -0700 | [diff] [blame] | 306 | }, |
Bu Sun Kim | 4ed7d3f | 2020-05-27 12:20:54 -0700 | [diff] [blame^] | 307 | "kind": "A String", # This is always <code>sql#cloneContext</code>. |
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 | "targetLink": "A String", |
| 323 | "operationType": "A String", # The type of the operation. Valid values are <code>CREATE</code>, |
| 324 | # <code>DELETE</code>, <code>UPDATE</code>, <code>RESTART</code>, |
| 325 | # <code>IMPORT</code>, <code>EXPORT</code>, <code>BACKUP_VOLUME</code>, |
| 326 | # <code>RESTORE_VOLUME</code>, <code>CREATE_USER</code>, |
| 327 | # <code>DELETE_USER</code>, <code>CREATE_DATABASE</code>, |
| 328 | # <code>DELETE_DATABASE</code> . |
| 329 | "error": { # Database instance operation errors list wrapper. # If errors occurred during processing of this operation, this field will be |
| 330 | # populated. |
| 331 | "errors": [ # The list of errors encountered while processing this operation. |
| 332 | { # Database instance operation error. |
| 333 | "kind": "A String", # This is always <code>sql#operationError</code>. |
| 334 | "code": "A String", # Identifies the specific error that occurred. |
| 335 | "message": "A String", # Additional information about the error encountered. |
Dan O'Meara | dd49464 | 2020-05-01 07:42:23 -0700 | [diff] [blame] | 336 | }, |
Bu Sun Kim | 6502091 | 2020-05-20 12:08:20 -0700 | [diff] [blame] | 337 | ], |
| 338 | "kind": "A String", # This is always <code>sql#operationErrors</code>. |
| 339 | }, |
| 340 | "kind": "A String", # This is always <code>sql#operation</code>. |
| 341 | "importContext": { # Database instance import context. # The context for import operation, if applicable. |
Bu Sun Kim | 6502091 | 2020-05-20 12:08:20 -0700 | [diff] [blame] | 342 | "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] | 343 | # <code>SQL</code>, this field is required only if the import file does not |
| 344 | # specify a database, and is overridden by any database specification in the |
| 345 | # import file. If <code>fileType</code> is <code>CSV</code>, one database |
| 346 | # must be specified. |
Bu Sun Kim | 6502091 | 2020-05-20 12:08:20 -0700 | [diff] [blame] | 347 | "importUser": "A String", # The PostgreSQL user for this import operation. PostgreSQL instances only. |
| 348 | "bakImportOptions": { # Import parameters specific to SQL Server .BAK files |
| 349 | "encryptionOptions": { |
Bu Sun Kim | 4ed7d3f | 2020-05-27 12:20:54 -0700 | [diff] [blame^] | 350 | "pvkPassword": "A String", # Password that encrypts the private key |
Bu Sun Kim | 6502091 | 2020-05-20 12:08:20 -0700 | [diff] [blame] | 351 | "certPath": "A String", # Path to the Certificate (.cer) in Cloud Storage, in the form |
| 352 | # <code>gs://bucketName/fileName</code>. The instance must have |
| 353 | # write permissions to the bucket and read access to the file. |
| 354 | "pvkPath": "A String", # Path to the Certificate Private Key (.pvk) in Cloud Storage, in the |
| 355 | # form <code>gs://bucketName/fileName</code>. The instance must have |
| 356 | # write permissions to the bucket and read access to the file. |
Bu Sun Kim | 6502091 | 2020-05-20 12:08:20 -0700 | [diff] [blame] | 357 | }, |
| 358 | }, |
| 359 | "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] | 360 | # <code>gs: |
| 361 | # //bucketName/fileName</code>. Compressed gzip files (.gz) are supported |
| 362 | # // when <code>fileType</code> is <code>SQL</code>. The instance must have |
| 363 | # // write permissions to the bucket and read access to the file. |
Bu Sun Kim | 6502091 | 2020-05-20 12:08:20 -0700 | [diff] [blame] | 364 | "fileType": "A String", # The file type for the specified uri. <br><code>SQL</code>: The file |
| 365 | # contains SQL statements. <br><code>CSV</code>: The file contains CSV data. |
Bu Sun Kim | 4ed7d3f | 2020-05-27 12:20:54 -0700 | [diff] [blame^] | 366 | "kind": "A String", # This is always <code>sql#importContext</code>. |
| 367 | "csvImportOptions": { # Options for importing data as CSV. |
| 368 | "table": "A String", # The table to which CSV data is imported. |
| 369 | "columns": [ # The columns to which CSV data is imported. If not specified, all columns |
| 370 | # of the database table are loaded with CSV data. |
| 371 | "A String", |
| 372 | ], |
| 373 | }, |
Bu Sun Kim | 715bd7f | 2019-06-14 16:50:42 -0700 | [diff] [blame] | 374 | }, |
Bu Sun Kim | 6502091 | 2020-05-20 12:08:20 -0700 | [diff] [blame] | 375 | "status": "A String", # The status of an operation. Valid values are <code>PENDING</code>, |
| 376 | # <code>RUNNING</code>, <code>DONE</code>, |
| 377 | # <code>SQL_OPERATION_STATUS_UNSPECIFIED</code>. |
| 378 | "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] | 379 | # identifier to retrieve the Operations resource that has information about |
| 380 | # the operation. |
Bu Sun Kim | 6502091 | 2020-05-20 12:08:20 -0700 | [diff] [blame] | 381 | "exportContext": { # Database instance export context. # The context for export operation, if applicable. |
Bu Sun Kim | 4ed7d3f | 2020-05-27 12:20:54 -0700 | [diff] [blame^] | 382 | "fileType": "A String", # The file type for the specified uri. <br><code>SQL</code>: The file |
| 383 | # contains SQL statements. <br><code>CSV</code>: The file contains CSV data. |
| 384 | "uri": "A String", # The path to the file in Google Cloud Storage where the export will be |
| 385 | # stored. The URI is in the form <code>gs: |
| 386 | # //bucketName/fileName</code>. If the file already exists, the requests |
| 387 | # // succeeds, but the operation fails. If <code>fileType</code> is |
| 388 | # // <code>SQL</code> and the filename ends with .gz, the contents are |
| 389 | # // compressed. |
| 390 | "csvExportOptions": { # Options for exporting data as CSV. |
| 391 | "selectQuery": "A String", # The select query used to extract the data. |
| 392 | }, |
| 393 | "kind": "A String", # This is always <code>sql#exportContext</code>. |
Bu Sun Kim | 6502091 | 2020-05-20 12:08:20 -0700 | [diff] [blame] | 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 | }, |
| 422 | }, |
Bu Sun Kim | 6502091 | 2020-05-20 12:08:20 -0700 | [diff] [blame] | 423 | "targetId": "A String", # Name of the database instance related to this operation. |
Bu Sun Kim | 4ed7d3f | 2020-05-27 12:20:54 -0700 | [diff] [blame^] | 424 | "endTime": "A String", # The time this operation finished in UTC timezone in <a |
| 425 | # href="https://tools.ietf.org/html/rfc3339">RFC 3339</a> format, for example |
| 426 | # <code>2012-11-15T16:19:00.094Z</code>. |
| 427 | "startTime": "A String", # The time this operation actually started in UTC timezone in <a |
| 428 | # href="https://tools.ietf.org/html/rfc3339">RFC 3339</a> format, for example |
| 429 | # <code>2012-11-15T16:19:00.094Z</code>. |
| 430 | "insertTime": "A String", # The time this operation was enqueued in UTC timezone in <a |
| 431 | # href="https://tools.ietf.org/html/rfc3339">RFC 3339</a> format, for example |
| 432 | # <code>2012-11-15T16:19:00.094Z</code>. |
| 433 | "user": "A String", # The email address of the user who initiated this operation. |
| 434 | "targetProject": "A String", # The project ID of the target instance related to this operation. |
| 435 | "selfLink": "A String", # The URI of this resource. |
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 | "targetLink": "A String", |
| 458 | "operationType": "A String", # The type of the operation. Valid values are <code>CREATE</code>, |
| 459 | # <code>DELETE</code>, <code>UPDATE</code>, <code>RESTART</code>, |
| 460 | # <code>IMPORT</code>, <code>EXPORT</code>, <code>BACKUP_VOLUME</code>, |
| 461 | # <code>RESTORE_VOLUME</code>, <code>CREATE_USER</code>, |
| 462 | # <code>DELETE_USER</code>, <code>CREATE_DATABASE</code>, |
| 463 | # <code>DELETE_DATABASE</code> . |
| 464 | "error": { # Database instance operation errors list wrapper. # If errors occurred during processing of this operation, this field will be |
| 465 | # populated. |
| 466 | "errors": [ # The list of errors encountered while processing this operation. |
| 467 | { # Database instance operation error. |
| 468 | "kind": "A String", # This is always <code>sql#operationError</code>. |
| 469 | "code": "A String", # Identifies the specific error that occurred. |
| 470 | "message": "A String", # Additional information about the error encountered. |
Dan O'Meara | dd49464 | 2020-05-01 07:42:23 -0700 | [diff] [blame] | 471 | }, |
Bu Sun Kim | 6502091 | 2020-05-20 12:08:20 -0700 | [diff] [blame] | 472 | ], |
| 473 | "kind": "A String", # This is always <code>sql#operationErrors</code>. |
| 474 | }, |
| 475 | "kind": "A String", # This is always <code>sql#operation</code>. |
| 476 | "importContext": { # Database instance import context. # The context for import operation, if applicable. |
Bu Sun Kim | 6502091 | 2020-05-20 12:08:20 -0700 | [diff] [blame] | 477 | "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] | 478 | # <code>SQL</code>, this field is required only if the import file does not |
| 479 | # specify a database, and is overridden by any database specification in the |
| 480 | # import file. If <code>fileType</code> is <code>CSV</code>, one database |
| 481 | # must be specified. |
Bu Sun Kim | 6502091 | 2020-05-20 12:08:20 -0700 | [diff] [blame] | 482 | "importUser": "A String", # The PostgreSQL user for this import operation. PostgreSQL instances only. |
| 483 | "bakImportOptions": { # Import parameters specific to SQL Server .BAK files |
| 484 | "encryptionOptions": { |
Bu Sun Kim | 4ed7d3f | 2020-05-27 12:20:54 -0700 | [diff] [blame^] | 485 | "pvkPassword": "A String", # Password that encrypts the private key |
Bu Sun Kim | 6502091 | 2020-05-20 12:08:20 -0700 | [diff] [blame] | 486 | "certPath": "A String", # Path to the Certificate (.cer) in Cloud Storage, in the form |
| 487 | # <code>gs://bucketName/fileName</code>. The instance must have |
| 488 | # write permissions to the bucket and read access to the file. |
| 489 | "pvkPath": "A String", # Path to the Certificate Private Key (.pvk) in Cloud Storage, in the |
| 490 | # form <code>gs://bucketName/fileName</code>. The instance must have |
| 491 | # write permissions to the bucket and read access to the file. |
Bu Sun Kim | 6502091 | 2020-05-20 12:08:20 -0700 | [diff] [blame] | 492 | }, |
| 493 | }, |
| 494 | "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] | 495 | # <code>gs: |
| 496 | # //bucketName/fileName</code>. Compressed gzip files (.gz) are supported |
| 497 | # // when <code>fileType</code> is <code>SQL</code>. The instance must have |
| 498 | # // write permissions to the bucket and read access to the file. |
Bu Sun Kim | 6502091 | 2020-05-20 12:08:20 -0700 | [diff] [blame] | 499 | "fileType": "A String", # The file type for the specified uri. <br><code>SQL</code>: The file |
| 500 | # contains SQL statements. <br><code>CSV</code>: The file contains CSV data. |
Bu Sun Kim | 4ed7d3f | 2020-05-27 12:20:54 -0700 | [diff] [blame^] | 501 | "kind": "A String", # This is always <code>sql#importContext</code>. |
| 502 | "csvImportOptions": { # Options for importing data as CSV. |
| 503 | "table": "A String", # The table to which CSV data is imported. |
| 504 | "columns": [ # The columns to which CSV data is imported. If not specified, all columns |
| 505 | # of the database table are loaded with CSV data. |
| 506 | "A String", |
| 507 | ], |
| 508 | }, |
Craig Citro | e633be1 | 2015-03-02 13:40:36 -0800 | [diff] [blame] | 509 | }, |
Bu Sun Kim | 6502091 | 2020-05-20 12:08:20 -0700 | [diff] [blame] | 510 | "status": "A String", # The status of an operation. Valid values are <code>PENDING</code>, |
| 511 | # <code>RUNNING</code>, <code>DONE</code>, |
| 512 | # <code>SQL_OPERATION_STATUS_UNSPECIFIED</code>. |
| 513 | "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] | 514 | # identifier to retrieve the Operations resource that has information about |
| 515 | # the operation. |
Bu Sun Kim | 6502091 | 2020-05-20 12:08:20 -0700 | [diff] [blame] | 516 | "exportContext": { # Database instance export context. # The context for export operation, if applicable. |
Bu Sun Kim | 4ed7d3f | 2020-05-27 12:20:54 -0700 | [diff] [blame^] | 517 | "fileType": "A String", # The file type for the specified uri. <br><code>SQL</code>: The file |
| 518 | # contains SQL statements. <br><code>CSV</code>: The file contains CSV data. |
| 519 | "uri": "A String", # The path to the file in Google Cloud Storage where the export will be |
| 520 | # stored. The URI is in the form <code>gs: |
| 521 | # //bucketName/fileName</code>. If the file already exists, the requests |
| 522 | # // succeeds, but the operation fails. If <code>fileType</code> is |
| 523 | # // <code>SQL</code> and the filename ends with .gz, the contents are |
| 524 | # // compressed. |
| 525 | "csvExportOptions": { # Options for exporting data as CSV. |
| 526 | "selectQuery": "A String", # The select query used to extract the data. |
| 527 | }, |
| 528 | "kind": "A String", # This is always <code>sql#exportContext</code>. |
Bu Sun Kim | 6502091 | 2020-05-20 12:08:20 -0700 | [diff] [blame] | 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 | }, |
| 557 | }, |
Bu Sun Kim | 6502091 | 2020-05-20 12:08:20 -0700 | [diff] [blame] | 558 | "targetId": "A String", # Name of the database instance related to this operation. |
Bu Sun Kim | 4ed7d3f | 2020-05-27 12:20:54 -0700 | [diff] [blame^] | 559 | "endTime": "A String", # The time this operation finished in UTC timezone in <a |
| 560 | # href="https://tools.ietf.org/html/rfc3339">RFC 3339</a> format, for example |
| 561 | # <code>2012-11-15T16:19:00.094Z</code>. |
| 562 | "startTime": "A String", # The time this operation actually started in UTC timezone in <a |
| 563 | # href="https://tools.ietf.org/html/rfc3339">RFC 3339</a> format, for example |
| 564 | # <code>2012-11-15T16:19:00.094Z</code>. |
| 565 | "insertTime": "A String", # The time this operation was enqueued in UTC timezone in <a |
| 566 | # href="https://tools.ietf.org/html/rfc3339">RFC 3339</a> format, for example |
| 567 | # <code>2012-11-15T16:19:00.094Z</code>. |
| 568 | "user": "A String", # The email address of the user who initiated this operation. |
| 569 | "targetProject": "A String", # The project ID of the target instance related to this operation. |
| 570 | "selfLink": "A String", # The URI of this resource. |
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. |
Bu Sun Kim | 6502091 | 2020-05-20 12:08:20 -0700 | [diff] [blame] | 589 | "mysqlReplicaConfiguration": { # Read-replica configuration specific to MySQL databases. # MySQL specific configuration when replicating from a MySQL on-premises |
| 590 | # master. Replication configuration information such as the username, |
| 591 | # password, certificates, and keys are not stored in the instance metadata. |
| 592 | # The configuration information is used only to set up the replication |
| 593 | # connection and is stored by MySQL in a file named <code>master.info</code> |
| 594 | # in the data directory. |
| 595 | "kind": "A String", # This is always <code>sql#demoteMasterMysqlReplicaConfiguration</code>. |
| 596 | "password": "A String", # The password for the replication connection. |
| 597 | "clientKey": "A String", # PEM representation of the slave's private key. The corresponsing public key |
| 598 | # is encoded in the client's certificate. The format of the slave's private |
| 599 | # key can be either PKCS #1 or PKCS #8. |
| 600 | "clientCertificate": "A String", # PEM representation of the slave's x509 certificate. |
| 601 | "username": "A String", # The username for the replication connection. |
| 602 | "caCertificate": "A String", # PEM representation of the trusted CA's x509 certificate. |
| 603 | }, |
Bu Sun Kim | 4ed7d3f | 2020-05-27 12:20:54 -0700 | [diff] [blame^] | 604 | "kind": "A String", # This is always <code>sql#demoteMasterConfiguration</code>. |
Bu Sun Kim | 6502091 | 2020-05-20 12:08:20 -0700 | [diff] [blame] | 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 | "targetLink": "A String", |
| 631 | "operationType": "A String", # The type of the operation. Valid values are <code>CREATE</code>, |
| 632 | # <code>DELETE</code>, <code>UPDATE</code>, <code>RESTART</code>, |
| 633 | # <code>IMPORT</code>, <code>EXPORT</code>, <code>BACKUP_VOLUME</code>, |
| 634 | # <code>RESTORE_VOLUME</code>, <code>CREATE_USER</code>, |
| 635 | # <code>DELETE_USER</code>, <code>CREATE_DATABASE</code>, |
| 636 | # <code>DELETE_DATABASE</code> . |
| 637 | "error": { # Database instance operation errors list wrapper. # If errors occurred during processing of this operation, this field will be |
| 638 | # populated. |
| 639 | "errors": [ # The list of errors encountered while processing this operation. |
| 640 | { # Database instance operation error. |
| 641 | "kind": "A String", # This is always <code>sql#operationError</code>. |
| 642 | "code": "A String", # Identifies the specific error that occurred. |
| 643 | "message": "A String", # Additional information about the error encountered. |
Dan O'Meara | dd49464 | 2020-05-01 07:42:23 -0700 | [diff] [blame] | 644 | }, |
Bu Sun Kim | 6502091 | 2020-05-20 12:08:20 -0700 | [diff] [blame] | 645 | ], |
| 646 | "kind": "A String", # This is always <code>sql#operationErrors</code>. |
| 647 | }, |
| 648 | "kind": "A String", # This is always <code>sql#operation</code>. |
| 649 | "importContext": { # Database instance import context. # The context for import operation, if applicable. |
Bu Sun Kim | 6502091 | 2020-05-20 12:08:20 -0700 | [diff] [blame] | 650 | "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] | 651 | # <code>SQL</code>, this field is required only if the import file does not |
| 652 | # specify a database, and is overridden by any database specification in the |
| 653 | # import file. If <code>fileType</code> is <code>CSV</code>, one database |
| 654 | # must be specified. |
Bu Sun Kim | 6502091 | 2020-05-20 12:08:20 -0700 | [diff] [blame] | 655 | "importUser": "A String", # The PostgreSQL user for this import operation. PostgreSQL instances only. |
| 656 | "bakImportOptions": { # Import parameters specific to SQL Server .BAK files |
| 657 | "encryptionOptions": { |
Bu Sun Kim | 4ed7d3f | 2020-05-27 12:20:54 -0700 | [diff] [blame^] | 658 | "pvkPassword": "A String", # Password that encrypts the private key |
Bu Sun Kim | 6502091 | 2020-05-20 12:08:20 -0700 | [diff] [blame] | 659 | "certPath": "A String", # Path to the Certificate (.cer) in Cloud Storage, in the form |
| 660 | # <code>gs://bucketName/fileName</code>. The instance must have |
| 661 | # write permissions to the bucket and read access to the file. |
| 662 | "pvkPath": "A String", # Path to the Certificate Private Key (.pvk) in Cloud Storage, in the |
| 663 | # form <code>gs://bucketName/fileName</code>. The instance must have |
| 664 | # write permissions to the bucket and read access to the file. |
Bu Sun Kim | 6502091 | 2020-05-20 12:08:20 -0700 | [diff] [blame] | 665 | }, |
| 666 | }, |
| 667 | "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] | 668 | # <code>gs: |
| 669 | # //bucketName/fileName</code>. Compressed gzip files (.gz) are supported |
| 670 | # // when <code>fileType</code> is <code>SQL</code>. The instance must have |
| 671 | # // write permissions to the bucket and read access to the file. |
Bu Sun Kim | 6502091 | 2020-05-20 12:08:20 -0700 | [diff] [blame] | 672 | "fileType": "A String", # The file type for the specified uri. <br><code>SQL</code>: The file |
| 673 | # contains SQL statements. <br><code>CSV</code>: The file contains CSV data. |
Bu Sun Kim | 4ed7d3f | 2020-05-27 12:20:54 -0700 | [diff] [blame^] | 674 | "kind": "A String", # This is always <code>sql#importContext</code>. |
| 675 | "csvImportOptions": { # Options for importing data as CSV. |
| 676 | "table": "A String", # The table to which CSV data is imported. |
| 677 | "columns": [ # The columns to which CSV data is imported. If not specified, all columns |
| 678 | # of the database table are loaded with CSV data. |
| 679 | "A String", |
| 680 | ], |
| 681 | }, |
Bu Sun Kim | 715bd7f | 2019-06-14 16:50:42 -0700 | [diff] [blame] | 682 | }, |
Bu Sun Kim | 6502091 | 2020-05-20 12:08:20 -0700 | [diff] [blame] | 683 | "status": "A String", # The status of an operation. Valid values are <code>PENDING</code>, |
| 684 | # <code>RUNNING</code>, <code>DONE</code>, |
| 685 | # <code>SQL_OPERATION_STATUS_UNSPECIFIED</code>. |
| 686 | "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] | 687 | # identifier to retrieve the Operations resource that has information about |
| 688 | # the operation. |
Bu Sun Kim | 6502091 | 2020-05-20 12:08:20 -0700 | [diff] [blame] | 689 | "exportContext": { # Database instance export context. # The context for export operation, if applicable. |
Bu Sun Kim | 4ed7d3f | 2020-05-27 12:20:54 -0700 | [diff] [blame^] | 690 | "fileType": "A String", # The file type for the specified uri. <br><code>SQL</code>: The file |
| 691 | # contains SQL statements. <br><code>CSV</code>: The file contains CSV data. |
| 692 | "uri": "A String", # The path to the file in Google Cloud Storage where the export will be |
| 693 | # stored. The URI is in the form <code>gs: |
| 694 | # //bucketName/fileName</code>. If the file already exists, the requests |
| 695 | # // succeeds, but the operation fails. If <code>fileType</code> is |
| 696 | # // <code>SQL</code> and the filename ends with .gz, the contents are |
| 697 | # // compressed. |
| 698 | "csvExportOptions": { # Options for exporting data as CSV. |
| 699 | "selectQuery": "A String", # The select query used to extract the data. |
| 700 | }, |
| 701 | "kind": "A String", # This is always <code>sql#exportContext</code>. |
Bu Sun Kim | 6502091 | 2020-05-20 12:08:20 -0700 | [diff] [blame] | 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 | }, |
| 730 | }, |
Bu Sun Kim | 6502091 | 2020-05-20 12:08:20 -0700 | [diff] [blame] | 731 | "targetId": "A String", # Name of the database instance related to this operation. |
Bu Sun Kim | 4ed7d3f | 2020-05-27 12:20:54 -0700 | [diff] [blame^] | 732 | "endTime": "A String", # The time this operation finished in UTC timezone in <a |
| 733 | # href="https://tools.ietf.org/html/rfc3339">RFC 3339</a> format, for example |
| 734 | # <code>2012-11-15T16:19:00.094Z</code>. |
| 735 | "startTime": "A String", # The time this operation actually started in UTC timezone in <a |
| 736 | # href="https://tools.ietf.org/html/rfc3339">RFC 3339</a> format, for example |
| 737 | # <code>2012-11-15T16:19:00.094Z</code>. |
| 738 | "insertTime": "A String", # The time this operation was enqueued in UTC timezone in <a |
| 739 | # href="https://tools.ietf.org/html/rfc3339">RFC 3339</a> format, for example |
| 740 | # <code>2012-11-15T16:19:00.094Z</code>. |
| 741 | "user": "A String", # The email address of the user who initiated this operation. |
| 742 | "targetProject": "A String", # The project ID of the target instance related to this operation. |
| 743 | "selfLink": "A String", # The URI of this resource. |
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. |
Bu Sun Kim | 4ed7d3f | 2020-05-27 12:20:54 -0700 | [diff] [blame^] | 760 | "fileType": "A String", # The file type for the specified uri. <br><code>SQL</code>: The file |
| 761 | # contains SQL statements. <br><code>CSV</code>: The file contains CSV data. |
| 762 | "uri": "A String", # The path to the file in Google Cloud Storage where the export will be |
| 763 | # stored. The URI is in the form <code>gs: |
| 764 | # //bucketName/fileName</code>. If the file already exists, the requests |
| 765 | # // succeeds, but the operation fails. If <code>fileType</code> is |
| 766 | # // <code>SQL</code> and the filename ends with .gz, the contents are |
| 767 | # // compressed. |
| 768 | "csvExportOptions": { # Options for exporting data as CSV. |
| 769 | "selectQuery": "A String", # The select query used to extract the data. |
| 770 | }, |
| 771 | "kind": "A String", # This is always <code>sql#exportContext</code>. |
Bu Sun Kim | 6502091 | 2020-05-20 12:08:20 -0700 | [diff] [blame] | 772 | "databases": [ # Databases to be exported. <br /> <b>MySQL instances:</b> If |
Dan O'Meara | dd49464 | 2020-05-01 07:42:23 -0700 | [diff] [blame] | 773 | # <code>fileType</code> is <code>SQL</code> and no database is specified, all |
| 774 | # databases are exported, except for the <code>mysql</code> system database. |
| 775 | # If <code>fileType</code> is <code>CSV</code>, you can specify one database, |
| 776 | # either by using this property or by using the |
| 777 | # <code>csvExportOptions.selectQuery</code> property, which takes precedence |
| 778 | # over this property. <br /> <b>PostgreSQL instances:</b> You must specify |
| 779 | # one database to be exported. If <code>fileType</code> is <code>CSV</code>, |
| 780 | # this database must match the one specified in the |
| 781 | # <code>csvExportOptions.selectQuery</code> property. |
Bu Sun Kim | 6502091 | 2020-05-20 12:08:20 -0700 | [diff] [blame] | 782 | "A String", |
Craig Citro | e633be1 | 2015-03-02 13:40:36 -0800 | [diff] [blame] | 783 | ], |
Bu Sun Kim | 6502091 | 2020-05-20 12:08:20 -0700 | [diff] [blame] | 784 | "sqlExportOptions": { # Options for exporting data as SQL statements. |
| 785 | "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] | 786 | # you specify tables, specify one and only one database. For PostgreSQL |
| 787 | # instances, you can specify only one table. |
Bu Sun Kim | 6502091 | 2020-05-20 12:08:20 -0700 | [diff] [blame] | 788 | "A String", |
Craig Citro | e633be1 | 2015-03-02 13:40:36 -0800 | [diff] [blame] | 789 | ], |
Bu Sun Kim | 6502091 | 2020-05-20 12:08:20 -0700 | [diff] [blame] | 790 | "schemaOnly": True or False, # Export only schemas. |
| 791 | "mysqlExportOptions": { # Options for exporting from MySQL. |
| 792 | "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] | 793 | # If set to <code>1</code>, the dump file includes |
| 794 | # a CHANGE MASTER TO statement with the binary log coordinates. |
| 795 | # If set to <code>2</code>, the CHANGE MASTER TO statement is written as |
| 796 | # a SQL comment, and has no effect. |
| 797 | # All other values are ignored. |
Bu Sun Kim | 715bd7f | 2019-06-14 16:50:42 -0700 | [diff] [blame] | 798 | }, |
Craig Citro | e633be1 | 2015-03-02 13:40:36 -0800 | [diff] [blame] | 799 | }, |
| 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 | "targetLink": "A String", |
| 815 | "operationType": "A String", # The type of the operation. Valid values are <code>CREATE</code>, |
| 816 | # <code>DELETE</code>, <code>UPDATE</code>, <code>RESTART</code>, |
| 817 | # <code>IMPORT</code>, <code>EXPORT</code>, <code>BACKUP_VOLUME</code>, |
| 818 | # <code>RESTORE_VOLUME</code>, <code>CREATE_USER</code>, |
| 819 | # <code>DELETE_USER</code>, <code>CREATE_DATABASE</code>, |
| 820 | # <code>DELETE_DATABASE</code> . |
| 821 | "error": { # Database instance operation errors list wrapper. # If errors occurred during processing of this operation, this field will be |
| 822 | # populated. |
| 823 | "errors": [ # The list of errors encountered while processing this operation. |
| 824 | { # Database instance operation error. |
| 825 | "kind": "A String", # This is always <code>sql#operationError</code>. |
| 826 | "code": "A String", # Identifies the specific error that occurred. |
| 827 | "message": "A String", # Additional information about the error encountered. |
Dan O'Meara | dd49464 | 2020-05-01 07:42:23 -0700 | [diff] [blame] | 828 | }, |
Bu Sun Kim | 6502091 | 2020-05-20 12:08:20 -0700 | [diff] [blame] | 829 | ], |
| 830 | "kind": "A String", # This is always <code>sql#operationErrors</code>. |
| 831 | }, |
| 832 | "kind": "A String", # This is always <code>sql#operation</code>. |
| 833 | "importContext": { # Database instance import context. # The context for import operation, if applicable. |
Bu Sun Kim | 6502091 | 2020-05-20 12:08:20 -0700 | [diff] [blame] | 834 | "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] | 835 | # <code>SQL</code>, this field is required only if the import file does not |
| 836 | # specify a database, and is overridden by any database specification in the |
| 837 | # import file. If <code>fileType</code> is <code>CSV</code>, one database |
| 838 | # must be specified. |
Bu Sun Kim | 6502091 | 2020-05-20 12:08:20 -0700 | [diff] [blame] | 839 | "importUser": "A String", # The PostgreSQL user for this import operation. PostgreSQL instances only. |
| 840 | "bakImportOptions": { # Import parameters specific to SQL Server .BAK files |
| 841 | "encryptionOptions": { |
Bu Sun Kim | 4ed7d3f | 2020-05-27 12:20:54 -0700 | [diff] [blame^] | 842 | "pvkPassword": "A String", # Password that encrypts the private key |
Bu Sun Kim | 6502091 | 2020-05-20 12:08:20 -0700 | [diff] [blame] | 843 | "certPath": "A String", # Path to the Certificate (.cer) in Cloud Storage, in the form |
| 844 | # <code>gs://bucketName/fileName</code>. The instance must have |
| 845 | # write permissions to the bucket and read access to the file. |
| 846 | "pvkPath": "A String", # Path to the Certificate Private Key (.pvk) in Cloud Storage, in the |
| 847 | # form <code>gs://bucketName/fileName</code>. The instance must have |
| 848 | # write permissions to the bucket and read access to the file. |
Bu Sun Kim | 6502091 | 2020-05-20 12:08:20 -0700 | [diff] [blame] | 849 | }, |
| 850 | }, |
| 851 | "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] | 852 | # <code>gs: |
| 853 | # //bucketName/fileName</code>. Compressed gzip files (.gz) are supported |
| 854 | # // when <code>fileType</code> is <code>SQL</code>. The instance must have |
| 855 | # // write permissions to the bucket and read access to the file. |
Bu Sun Kim | 6502091 | 2020-05-20 12:08:20 -0700 | [diff] [blame] | 856 | "fileType": "A String", # The file type for the specified uri. <br><code>SQL</code>: The file |
| 857 | # contains SQL statements. <br><code>CSV</code>: The file contains CSV data. |
Bu Sun Kim | 4ed7d3f | 2020-05-27 12:20:54 -0700 | [diff] [blame^] | 858 | "kind": "A String", # This is always <code>sql#importContext</code>. |
| 859 | "csvImportOptions": { # Options for importing data as CSV. |
| 860 | "table": "A String", # The table to which CSV data is imported. |
| 861 | "columns": [ # The columns to which CSV data is imported. If not specified, all columns |
| 862 | # of the database table are loaded with CSV data. |
| 863 | "A String", |
| 864 | ], |
| 865 | }, |
Craig Citro | e633be1 | 2015-03-02 13:40:36 -0800 | [diff] [blame] | 866 | }, |
Bu Sun Kim | 6502091 | 2020-05-20 12:08:20 -0700 | [diff] [blame] | 867 | "status": "A String", # The status of an operation. Valid values are <code>PENDING</code>, |
| 868 | # <code>RUNNING</code>, <code>DONE</code>, |
| 869 | # <code>SQL_OPERATION_STATUS_UNSPECIFIED</code>. |
| 870 | "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] | 871 | # identifier to retrieve the Operations resource that has information about |
| 872 | # the operation. |
Bu Sun Kim | 6502091 | 2020-05-20 12:08:20 -0700 | [diff] [blame] | 873 | "exportContext": { # Database instance export context. # The context for export operation, if applicable. |
Bu Sun Kim | 4ed7d3f | 2020-05-27 12:20:54 -0700 | [diff] [blame^] | 874 | "fileType": "A String", # The file type for the specified uri. <br><code>SQL</code>: The file |
| 875 | # contains SQL statements. <br><code>CSV</code>: The file contains CSV data. |
| 876 | "uri": "A String", # The path to the file in Google Cloud Storage where the export will be |
| 877 | # stored. The URI is in the form <code>gs: |
| 878 | # //bucketName/fileName</code>. If the file already exists, the requests |
| 879 | # // succeeds, but the operation fails. If <code>fileType</code> is |
| 880 | # // <code>SQL</code> and the filename ends with .gz, the contents are |
| 881 | # // compressed. |
| 882 | "csvExportOptions": { # Options for exporting data as CSV. |
| 883 | "selectQuery": "A String", # The select query used to extract the data. |
| 884 | }, |
| 885 | "kind": "A String", # This is always <code>sql#exportContext</code>. |
Bu Sun Kim | 6502091 | 2020-05-20 12:08:20 -0700 | [diff] [blame] | 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 | }, |
| 914 | }, |
Bu Sun Kim | 6502091 | 2020-05-20 12:08:20 -0700 | [diff] [blame] | 915 | "targetId": "A String", # Name of the database instance related to this operation. |
Bu Sun Kim | 4ed7d3f | 2020-05-27 12:20:54 -0700 | [diff] [blame^] | 916 | "endTime": "A String", # The time this operation finished in UTC timezone in <a |
| 917 | # href="https://tools.ietf.org/html/rfc3339">RFC 3339</a> format, for example |
| 918 | # <code>2012-11-15T16:19:00.094Z</code>. |
| 919 | "startTime": "A String", # The time this operation actually started in UTC timezone in <a |
| 920 | # href="https://tools.ietf.org/html/rfc3339">RFC 3339</a> format, for example |
| 921 | # <code>2012-11-15T16:19:00.094Z</code>. |
| 922 | "insertTime": "A String", # The time this operation was enqueued in UTC timezone in <a |
| 923 | # href="https://tools.ietf.org/html/rfc3339">RFC 3339</a> format, for example |
| 924 | # <code>2012-11-15T16:19:00.094Z</code>. |
| 925 | "user": "A String", # The email address of the user who initiated this operation. |
| 926 | "targetProject": "A String", # The project ID of the target instance related to this operation. |
| 927 | "selfLink": "A String", # The URI of this resource. |
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 | "targetLink": "A String", |
| 962 | "operationType": "A String", # The type of the operation. Valid values are <code>CREATE</code>, |
| 963 | # <code>DELETE</code>, <code>UPDATE</code>, <code>RESTART</code>, |
| 964 | # <code>IMPORT</code>, <code>EXPORT</code>, <code>BACKUP_VOLUME</code>, |
| 965 | # <code>RESTORE_VOLUME</code>, <code>CREATE_USER</code>, |
| 966 | # <code>DELETE_USER</code>, <code>CREATE_DATABASE</code>, |
| 967 | # <code>DELETE_DATABASE</code> . |
| 968 | "error": { # Database instance operation errors list wrapper. # If errors occurred during processing of this operation, this field will be |
| 969 | # populated. |
| 970 | "errors": [ # The list of errors encountered while processing this operation. |
| 971 | { # Database instance operation error. |
| 972 | "kind": "A String", # This is always <code>sql#operationError</code>. |
| 973 | "code": "A String", # Identifies the specific error that occurred. |
| 974 | "message": "A String", # Additional information about the error encountered. |
Dan O'Meara | dd49464 | 2020-05-01 07:42:23 -0700 | [diff] [blame] | 975 | }, |
Bu Sun Kim | 6502091 | 2020-05-20 12:08:20 -0700 | [diff] [blame] | 976 | ], |
| 977 | "kind": "A String", # This is always <code>sql#operationErrors</code>. |
| 978 | }, |
| 979 | "kind": "A String", # This is always <code>sql#operation</code>. |
| 980 | "importContext": { # Database instance import context. # The context for import operation, if applicable. |
Bu Sun Kim | 6502091 | 2020-05-20 12:08:20 -0700 | [diff] [blame] | 981 | "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] | 982 | # <code>SQL</code>, this field is required only if the import file does not |
| 983 | # specify a database, and is overridden by any database specification in the |
| 984 | # import file. If <code>fileType</code> is <code>CSV</code>, one database |
| 985 | # must be specified. |
Bu Sun Kim | 6502091 | 2020-05-20 12:08:20 -0700 | [diff] [blame] | 986 | "importUser": "A String", # The PostgreSQL user for this import operation. PostgreSQL instances only. |
| 987 | "bakImportOptions": { # Import parameters specific to SQL Server .BAK files |
| 988 | "encryptionOptions": { |
Bu Sun Kim | 4ed7d3f | 2020-05-27 12:20:54 -0700 | [diff] [blame^] | 989 | "pvkPassword": "A String", # Password that encrypts the private key |
Bu Sun Kim | 6502091 | 2020-05-20 12:08:20 -0700 | [diff] [blame] | 990 | "certPath": "A String", # Path to the Certificate (.cer) in Cloud Storage, in the form |
| 991 | # <code>gs://bucketName/fileName</code>. The instance must have |
| 992 | # write permissions to the bucket and read access to the file. |
| 993 | "pvkPath": "A String", # Path to the Certificate Private Key (.pvk) in Cloud Storage, in the |
| 994 | # form <code>gs://bucketName/fileName</code>. The instance must have |
| 995 | # write permissions to the bucket and read access to the file. |
Bu Sun Kim | 6502091 | 2020-05-20 12:08:20 -0700 | [diff] [blame] | 996 | }, |
| 997 | }, |
| 998 | "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] | 999 | # <code>gs: |
| 1000 | # //bucketName/fileName</code>. Compressed gzip files (.gz) are supported |
| 1001 | # // when <code>fileType</code> is <code>SQL</code>. The instance must have |
| 1002 | # // write permissions to the bucket and read access to the file. |
Bu Sun Kim | 6502091 | 2020-05-20 12:08:20 -0700 | [diff] [blame] | 1003 | "fileType": "A String", # The file type for the specified uri. <br><code>SQL</code>: The file |
| 1004 | # contains SQL statements. <br><code>CSV</code>: The file contains CSV data. |
Bu Sun Kim | 4ed7d3f | 2020-05-27 12:20:54 -0700 | [diff] [blame^] | 1005 | "kind": "A String", # This is always <code>sql#importContext</code>. |
| 1006 | "csvImportOptions": { # Options for importing data as CSV. |
| 1007 | "table": "A String", # The table to which CSV data is imported. |
| 1008 | "columns": [ # The columns to which CSV data is imported. If not specified, all columns |
| 1009 | # of the database table are loaded with CSV data. |
| 1010 | "A String", |
| 1011 | ], |
| 1012 | }, |
Jon Wayne Parrott | 36e41bc | 2016-02-19 16:02:29 -0800 | [diff] [blame] | 1013 | }, |
Bu Sun Kim | 6502091 | 2020-05-20 12:08:20 -0700 | [diff] [blame] | 1014 | "status": "A String", # The status of an operation. Valid values are <code>PENDING</code>, |
| 1015 | # <code>RUNNING</code>, <code>DONE</code>, |
| 1016 | # <code>SQL_OPERATION_STATUS_UNSPECIFIED</code>. |
| 1017 | "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] | 1018 | # identifier to retrieve the Operations resource that has information about |
| 1019 | # the operation. |
Bu Sun Kim | 6502091 | 2020-05-20 12:08:20 -0700 | [diff] [blame] | 1020 | "exportContext": { # Database instance export context. # The context for export operation, if applicable. |
Bu Sun Kim | 4ed7d3f | 2020-05-27 12:20:54 -0700 | [diff] [blame^] | 1021 | "fileType": "A String", # The file type for the specified uri. <br><code>SQL</code>: The file |
| 1022 | # contains SQL statements. <br><code>CSV</code>: The file contains CSV data. |
| 1023 | "uri": "A String", # The path to the file in Google Cloud Storage where the export will be |
| 1024 | # stored. The URI is in the form <code>gs: |
| 1025 | # //bucketName/fileName</code>. If the file already exists, the requests |
| 1026 | # // succeeds, but the operation fails. If <code>fileType</code> is |
| 1027 | # // <code>SQL</code> and the filename ends with .gz, the contents are |
| 1028 | # // compressed. |
| 1029 | "csvExportOptions": { # Options for exporting data as CSV. |
| 1030 | "selectQuery": "A String", # The select query used to extract the data. |
| 1031 | }, |
| 1032 | "kind": "A String", # This is always <code>sql#exportContext</code>. |
Bu Sun Kim | 6502091 | 2020-05-20 12:08:20 -0700 | [diff] [blame] | 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 | }, |
| 1061 | }, |
Bu Sun Kim | 6502091 | 2020-05-20 12:08:20 -0700 | [diff] [blame] | 1062 | "targetId": "A String", # Name of the database instance related to this operation. |
Bu Sun Kim | 4ed7d3f | 2020-05-27 12:20:54 -0700 | [diff] [blame^] | 1063 | "endTime": "A String", # The time this operation finished in UTC timezone in <a |
| 1064 | # href="https://tools.ietf.org/html/rfc3339">RFC 3339</a> format, for example |
| 1065 | # <code>2012-11-15T16:19:00.094Z</code>. |
| 1066 | "startTime": "A String", # The time this operation actually started in UTC timezone in <a |
| 1067 | # href="https://tools.ietf.org/html/rfc3339">RFC 3339</a> format, for example |
| 1068 | # <code>2012-11-15T16:19:00.094Z</code>. |
| 1069 | "insertTime": "A String", # The time this operation was enqueued in UTC timezone in <a |
| 1070 | # href="https://tools.ietf.org/html/rfc3339">RFC 3339</a> format, for example |
| 1071 | # <code>2012-11-15T16:19:00.094Z</code>. |
| 1072 | "user": "A String", # The email address of the user who initiated this operation. |
| 1073 | "targetProject": "A String", # The project ID of the target instance related to this operation. |
| 1074 | "selfLink": "A String", # The URI of this resource. |
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 | 4ed7d3f | 2020-05-27 12:20:54 -0700 | [diff] [blame^] | 1094 | "onPremisesConfiguration": { # On-premises instance configuration. # Configuration specific to on-premises instances. |
| 1095 | "clientKey": "A String", # PEM representation of the slave's private key. The corresponsing public key |
| 1096 | # is encoded in the client's certificate. |
| 1097 | "dumpFilePath": "A String", # The dump file to create the Cloud SQL replica. |
| 1098 | "hostPort": "A String", # The host and port of the on-premises instance in host:port format |
| 1099 | "clientCertificate": "A String", # PEM representation of the slave's x509 certificate. |
| 1100 | "username": "A String", # The username for connecting to on-premises instance. |
| 1101 | "caCertificate": "A String", # PEM representation of the trusted CA's x509 certificate. |
| 1102 | "kind": "A String", # This is always <code>sql#onPremisesConfiguration</code>. |
| 1103 | "password": "A String", # The password for connecting to on-premises instance. |
| 1104 | }, |
| 1105 | "project": "A String", # The project ID of the project containing the Cloud SQL instance. The Google |
| 1106 | # apps domain is prefixed if applicable. |
| 1107 | "serviceAccountEmailAddress": "A String", # The service account email address assigned to the instance. This property |
| 1108 | # is applicable only to Second Generation instances. |
| 1109 | "databaseVersion": "A String", # The database engine type and version. The <code>databaseVersion</code> |
| 1110 | # field can not be changed after instance creation. MySQL Second Generation |
| 1111 | # instances: <code>MYSQL_5_7</code> (default) or <code>MYSQL_5_6</code>. |
| 1112 | # PostgreSQL instances: <code>POSTGRES_9_6</code> (default) or |
| 1113 | # <code>POSTGRES_11 Beta</code> MySQL First Generation |
| 1114 | # instances: <code>MYSQL_5_6</code> (default) or <code>MYSQL_5_5</code> |
Bu Sun Kim | 6502091 | 2020-05-20 12:08:20 -0700 | [diff] [blame] | 1115 | "suspensionReason": [ # If the instance state is SUSPENDED, the reason for the suspension. |
| 1116 | "A String", |
| 1117 | ], |
| 1118 | "settings": { # Database instance settings. # The user settings. |
Bu Sun Kim | 6502091 | 2020-05-20 12:08:20 -0700 | [diff] [blame] | 1119 | "pricingPlan": "A String", # The pricing plan for this instance. This can be either <code>PER_USE</code> |
| 1120 | # or <code>PACKAGE</code>. Only <code>PER_USE</code> is supported for Second |
| 1121 | # Generation instances. |
| 1122 | "storageAutoResize": True or False, # Configuration to increase storage size automatically. The default value is |
| 1123 | # true. Not used for First Generation instances. |
| 1124 | "storageAutoResizeLimit": "A String", # The maximum size to which storage capacity can be automatically increased. |
| 1125 | # The default value is 0, which specifies that there is no limit. Not used |
| 1126 | # for First Generation instances. |
| 1127 | "authorizedGaeApplications": [ # The App Engine app IDs that can access this instance. First Generation |
| 1128 | # instances only. |
| 1129 | "A String", |
| 1130 | ], |
| 1131 | "tier": "A String", # The tier (or machine type) for this instance, for example |
| 1132 | # <code>db-n1-standard-1</code> (MySQL instances) or |
| 1133 | # <code>db-custom-1-3840</code> (PostgreSQL instances). For MySQL instances, |
| 1134 | # this property determines whether the instance is First or Second |
| 1135 | # Generation. For more information, see <a |
| 1136 | # href="/sql/docs/db_path/instance-settings">Instance Settings</a>. |
| 1137 | "dataDiskSizeGb": "A String", # The size of data disk, in GB. The data disk size minimum is 10GB. Not used |
| 1138 | # for First Generation instances. |
| 1139 | "dataDiskType": "A String", # The type of data disk: <code>PD_SSD</code> (default) or |
| 1140 | # <code>PD_HDD</code>. Not used for First Generation instances. |
| 1141 | "databaseReplicationEnabled": True or False, # Configuration specific to read replica instances. Indicates whether |
| 1142 | # replication is enabled or not. |
| 1143 | "crashSafeReplicationEnabled": True or False, # Configuration specific to read replica instances. Indicates whether |
| 1144 | # database flags for crash-safe replication are enabled. This property is |
| 1145 | # only applicable to First Generation instances. |
| 1146 | "backupConfiguration": { # Database instance backup configuration. # The daily backup configuration for the instance. |
Bu Sun Kim | 6502091 | 2020-05-20 12:08:20 -0700 | [diff] [blame] | 1147 | "replicationLogArchivingEnabled": True or False, # Reserved for future use. |
| 1148 | "location": "A String", # Location of the backup |
| 1149 | "pointInTimeRecoveryEnabled": True or False, # Reserved for future use. |
| 1150 | "startTime": "A String", # Start time for the daily backup configuration in UTC timezone in the 24 |
| 1151 | # hour format - <code>HH:MM</code>. |
| 1152 | "kind": "A String", # This is always <code>sql#backupConfiguration</code>. |
| 1153 | "enabled": True or False, # Whether this configuration is enabled. |
Bu Sun Kim | 4ed7d3f | 2020-05-27 12:20:54 -0700 | [diff] [blame^] | 1154 | "binaryLogEnabled": True or False, # (MySQL only) Whether binary log is enabled. If backup configuration is |
| 1155 | # disabled, binarylog must be disabled as well. |
Bu Sun Kim | 6502091 | 2020-05-20 12:08:20 -0700 | [diff] [blame] | 1156 | }, |
| 1157 | "userLabels": { # User-provided labels, represented as a dictionary where each label is a |
| 1158 | # single key value pair. |
| 1159 | "a_key": "A String", |
| 1160 | }, |
Bu Sun Kim | 4ed7d3f | 2020-05-27 12:20:54 -0700 | [diff] [blame^] | 1161 | "replicationType": "A String", # The type of replication this instance uses. This can be either |
| 1162 | # <code>ASYNCHRONOUS</code> or <code>SYNCHRONOUS</code>. This property is |
| 1163 | # only applicable to First Generation instances. |
| 1164 | "kind": "A String", # This is always <code>sql#settings</code>. |
Bu Sun Kim | 6502091 | 2020-05-20 12:08:20 -0700 | [diff] [blame] | 1165 | "locationPreference": { # Preferred location. This specifies where a Cloud SQL instance should # The location preference settings. This allows the instance to be located as |
| 1166 | # near as possible to either an App Engine app or Compute Engine zone for |
| 1167 | # better performance. App Engine co-location is only applicable to First |
| 1168 | # Generation instances. |
| 1169 | # preferably be located, either in a specific Compute Engine zone, or |
| 1170 | # co-located with an App Engine application. Note that if the preferred |
| 1171 | # location is not available, the instance will be located as close as possible |
| 1172 | # within the region. Only one location may be specified. |
Bu Sun Kim | 4ed7d3f | 2020-05-27 12:20:54 -0700 | [diff] [blame^] | 1173 | "kind": "A String", # This is always <code>sql#locationPreference</code>. |
Bu Sun Kim | 6502091 | 2020-05-20 12:08:20 -0700 | [diff] [blame] | 1174 | "zone": "A String", # The preferred Compute Engine zone (e.g. us-central1-a, us-central1-b, |
| 1175 | # etc.). |
| 1176 | "followGaeApplication": "A String", # The AppEngine application to follow, it must be in the same region as the |
| 1177 | # Cloud SQL instance. |
Bu Sun Kim | 6502091 | 2020-05-20 12:08:20 -0700 | [diff] [blame] | 1178 | }, |
Bu Sun Kim | 6502091 | 2020-05-20 12:08:20 -0700 | [diff] [blame] | 1179 | "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] | 1180 | # applicable only when the instance state is <code>RUNNABLE</code>. Valid |
| 1181 | # values: <br><code>ALWAYS</code>: The instance is on, and remains so even in |
| 1182 | # the absence of connection requests. <br><code>NEVER</code>: The instance is |
| 1183 | # off; it is not activated, even if a connection request arrives. |
| 1184 | # <br><code>ON_DEMAND</code>: First Generation instances only. The instance |
| 1185 | # responds to incoming requests, and turns itself off when not in use. |
| 1186 | # Instances with <code>PER_USE</code> pricing turn off after 15 minutes of |
| 1187 | # inactivity. Instances with <code>PER_PACKAGE</code> pricing turn off after |
| 1188 | # 12 hours of inactivity. |
Bu Sun Kim | 4ed7d3f | 2020-05-27 12:20:54 -0700 | [diff] [blame^] | 1189 | "databaseFlags": [ # The database flags passed to the instance at startup. |
| 1190 | { # Database flags for Cloud SQL instances. |
| 1191 | "name": "A String", # The name of the flag. These flags are passed at instance startup, so |
| 1192 | # include both server options and system variables for MySQL. Flags should be |
| 1193 | # specified with underscores, not hyphens. For more information, see <a |
| 1194 | # href="/sql/docs/mysql/flags">Configuring Database Flags</a> in the Cloud |
| 1195 | # SQL documentation. |
| 1196 | "value": "A String", # The value of the flag. Booleans should be set to <code>on</code> for true |
| 1197 | # and <code>off</code> for false. This field must be omitted if the flag |
| 1198 | # doesn't take a value. |
| 1199 | }, |
| 1200 | ], |
| 1201 | "settingsVersion": "A String", # The version of instance settings. This is a required field for update |
| 1202 | # method to make sure concurrent updates are handled properly. During update, |
| 1203 | # use the most recent settingsVersion value for this instance and do not try |
| 1204 | # to update this value. |
| 1205 | "availabilityType": "A String", # Availability type (PostgreSQL and MySQL instances only). Potential values: |
| 1206 | # <br><code>ZONAL</code>: The instance serves data from only one zone. |
| 1207 | # Outages in that zone affect data accessibility. <br><code>REGIONAL</code>: |
| 1208 | # The instance can serve data from more than one zone in a region (it is |
| 1209 | # highly available). <br>For more information, see <a |
| 1210 | # href="https://cloud.google.com/sql/docs/postgres/high-availability">Overview |
| 1211 | # of the High Availability Configuration</a>. |
| 1212 | "ipConfiguration": { # IP Management configuration. # The settings for IP Management. This allows to enable or disable the |
| 1213 | # instance IP and manage which external networks can connect to the instance. |
| 1214 | # The IPv4 address cannot be disabled for Second Generation instances. |
| 1215 | "privateNetwork": "A String", # The resource link for the VPC network from which the Cloud SQL instance is |
| 1216 | # accessible for private IP. For example, |
| 1217 | # <code>/projects/myProject/global/networks/default</code>. This setting can |
| 1218 | # be updated, but it cannot be removed after it is set. |
| 1219 | "ipv4Enabled": True or False, # Whether the instance should be assigned an IP address or not. |
| 1220 | "authorizedNetworks": [ # The list of external networks that are allowed to connect to the instance |
| 1221 | # using the IP. In <a |
| 1222 | # href="http://en.wikipedia.org/wiki/CIDR_notation#CIDR_notation">CIDR |
| 1223 | # notation</a>, also known as 'slash' notation (e.g. |
| 1224 | # <code>192.168.100.0/24</code>). |
| 1225 | { # An entry for an Access Control list. |
| 1226 | "value": "A String", # The whitelisted value for the access control list. |
| 1227 | "expirationTime": "A String", # The time when this access control entry expires in <a |
| 1228 | # href="https://tools.ietf.org/html/rfc3339">RFC 3339</a> format, for example |
| 1229 | # <code>2012-11-15T16:19:00.094Z</code>. |
| 1230 | "name": "A String", # Optional. A label to identify this entry. |
| 1231 | "kind": "A String", # This is always <code>sql#aclEntry</code>. |
| 1232 | }, |
| 1233 | ], |
| 1234 | "requireSsl": True or False, # Whether SSL connections over IP should be enforced or not. |
| 1235 | }, |
| 1236 | "maintenanceWindow": { # Maintenance window. This specifies when a v2 Cloud SQL instance should # The maintenance window for this instance. This specifies when the instance |
| 1237 | # can be restarted for maintenance purposes. Not used for First Generation |
| 1238 | # instances. |
| 1239 | # preferably be restarted for system maintenance purposes. |
| 1240 | "updateTrack": "A String", # Maintenance timing setting: <code>canary</code> (Earlier) or |
| 1241 | # <code>stable</code> (Later). <br /><a |
| 1242 | # href="/sql/docs/db_path/instance-settings#maintenance-timing-2ndgen"> |
| 1243 | # Learn more</a>. |
| 1244 | "hour": 42, # hour of day - 0 to 23. |
| 1245 | "day": 42, # day of week (1-7), starting on Monday. |
| 1246 | "kind": "A String", # This is always <code>sql#maintenanceWindow</code>. |
| 1247 | }, |
Jon Wayne Parrott | 0a471d3 | 2016-05-19 10:54:38 -0700 | [diff] [blame] | 1248 | }, |
Bu Sun Kim | 6502091 | 2020-05-20 12:08:20 -0700 | [diff] [blame] | 1249 | "replicaNames": [ # The replicas of the instance. |
| 1250 | "A String", |
| 1251 | ], |
| 1252 | "diskEncryptionConfiguration": { # Disk encryption configuration for an instance. # Disk encryption configuration specific to an instance. |
| 1253 | # Applies only to Second Generation instances. |
| 1254 | "kind": "A String", # This is always <code>sql#diskEncryptionConfiguration</code>. |
| 1255 | "kmsKeyName": "A String", # Resource name of KMS key for disk encryption |
| 1256 | }, |
Bu Sun Kim | 4ed7d3f | 2020-05-27 12:20:54 -0700 | [diff] [blame^] | 1257 | "etag": "A String", # This field is deprecated and will be removed from a future version of the |
| 1258 | # API. Use the <code>settings.settingsVersion</code> field instead. |
| 1259 | "rootPassword": "A String", # Initial root password. Use only on creation. |
Bu Sun Kim | 6502091 | 2020-05-20 12:08:20 -0700 | [diff] [blame] | 1260 | "scheduledMaintenance": { # Any scheduled maintenancce for this instance. # The start time of any upcoming scheduled maintenance for this instance. |
| 1261 | "canDefer": True or False, |
| 1262 | "startTime": "A String", # The start time of any upcoming scheduled maintenance for this instance. |
| 1263 | "canReschedule": True or False, # If the scheduled maintenance can be rescheduled. |
| 1264 | }, |
Bu Sun Kim | 6502091 | 2020-05-20 12:08:20 -0700 | [diff] [blame] | 1265 | "serverCaCert": { # SslCerts Resource # SSL configuration. |
Bu Sun Kim | 4ed7d3f | 2020-05-27 12:20:54 -0700 | [diff] [blame^] | 1266 | "expirationTime": "A String", # The time when the certificate expires in <a |
| 1267 | # href="https://tools.ietf.org/html/rfc3339">RFC 3339</a> format, for example |
| 1268 | # <code>2012-11-15T16:19:00.094Z</code>. |
Bu Sun Kim | 6502091 | 2020-05-20 12:08:20 -0700 | [diff] [blame] | 1269 | "sha1Fingerprint": "A String", # Sha1 Fingerprint. |
| 1270 | "certSerialNumber": "A String", # Serial number, as extracted from the certificate. |
| 1271 | "cert": "A String", # PEM representation. |
| 1272 | "kind": "A String", # This is always <code>sql#sslCert</code>. |
| 1273 | "commonName": "A String", # User supplied name. Constrained to [a-zA-Z.-_ ]+. |
| 1274 | "createTime": "A String", # The time when the certificate was created in <a |
| 1275 | # href="https://tools.ietf.org/html/rfc3339">RFC 3339</a> format, for example |
| 1276 | # <code>2012-11-15T16:19:00.094Z</code> |
| 1277 | "instance": "A String", # Name of the database instance. |
| 1278 | "selfLink": "A String", # The URI of this resource. |
Bu Sun Kim | 6502091 | 2020-05-20 12:08:20 -0700 | [diff] [blame] | 1279 | }, |
| 1280 | "maxDiskSize": "A String", # The maximum disk size of the instance in bytes. |
| 1281 | "name": "A String", # Name of the Cloud SQL instance. This does not include the project ID. |
| 1282 | "masterInstanceName": "A String", # The name of the instance which will act as master in the replication setup. |
| 1283 | "instanceType": "A String", # The instance type. This can be one of the following. |
| 1284 | # <br><code>CLOUD_SQL_INSTANCE</code>: A Cloud SQL instance that is not |
| 1285 | # replicating from a master. <br><code>ON_PREMISES_INSTANCE</code>: An |
| 1286 | # instance running on the |
| 1287 | # customer's premises. <br><code>READ_REPLICA_INSTANCE</code>: A Cloud SQL |
| 1288 | # instance configured as a read-replica. |
| 1289 | "gceZone": "A String", # The Compute Engine zone that the instance is currently serving from. This |
| 1290 | # value could be different from the zone that was specified when the instance |
| 1291 | # was created if the instance has failed over to its secondary zone. |
| 1292 | "currentDiskSize": "A String", # The current disk usage of the instance in bytes. This property has been |
| 1293 | # deprecated. Users should use the |
| 1294 | # "cloudsql.googleapis.com/database/disk/bytes_used" metric in Cloud |
| 1295 | # Monitoring API instead. Please see <a |
| 1296 | # href="https://groups.google.com/d/msg/google-cloud-sql-announce/I_7-F9EBhT0/BtvFtdFeAgAJ">this |
| 1297 | # announcement</a> for details. |
| 1298 | "replicaConfiguration": { # Read-replica configuration for connecting to the master. # Configuration specific to failover replicas and read replicas. |
Bu Sun Kim | 4ed7d3f | 2020-05-27 12:20:54 -0700 | [diff] [blame^] | 1299 | "mysqlReplicaConfiguration": { # Read-replica configuration specific to MySQL databases. # MySQL specific configuration when replicating from a MySQL on-premises |
| 1300 | # master. Replication configuration information such as the username, |
| 1301 | # password, certificates, and keys are not stored in the instance metadata. |
| 1302 | # The configuration information is used only to set up the replication |
| 1303 | # connection and is stored by MySQL in a file named <code>master.info</code> |
| 1304 | # in the data directory. |
| 1305 | "password": "A String", # The password for the replication connection. |
| 1306 | "verifyServerCertificate": True or False, # Whether or not to check the master's Common Name value in the certificate |
| 1307 | # that it sends during the SSL handshake. |
| 1308 | "clientKey": "A String", # PEM representation of the slave's private key. The corresponsing public key |
| 1309 | # is encoded in the client's certificate. |
| 1310 | "sslCipher": "A String", # A list of permissible ciphers to use for SSL encryption. |
| 1311 | "masterHeartbeatPeriod": "A String", # Interval in milliseconds between replication heartbeats. |
| 1312 | "dumpFilePath": "A String", # Path to a SQL dump file in Google Cloud Storage from which the slave |
| 1313 | # instance is to be created. The URI is in the form gs: |
| 1314 | # //bucketName/fileName. Compressed gzip files (.gz) are also supported. |
| 1315 | # // Dumps should have the binlog co-ordinates from which replication should |
| 1316 | # // begin. This can be accomplished by setting --master-data to 1 when using |
| 1317 | # // mysqldump. |
| 1318 | "connectRetryInterval": 42, # Seconds to wait between connect retries. MySQL's default is 60 seconds. |
| 1319 | "clientCertificate": "A String", # PEM representation of the slave's x509 certificate. |
| 1320 | "username": "A String", # The username for the replication connection. |
| 1321 | "caCertificate": "A String", # PEM representation of the trusted CA's x509 certificate. |
| 1322 | "kind": "A String", # This is always <code>sql#mysqlReplicaConfiguration</code>. |
| 1323 | }, |
Bu Sun Kim | 6502091 | 2020-05-20 12:08:20 -0700 | [diff] [blame] | 1324 | "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] | 1325 | # <code>true</code> the replica will be designated as a failover replica. In |
| 1326 | # case the master instance fails, the replica instance will be promoted as |
| 1327 | # the new master instance. <p>Only one replica can be specified as failover |
| 1328 | # target, and the replica has to be in different zone with the master |
| 1329 | # instance. |
Bu Sun Kim | 6502091 | 2020-05-20 12:08:20 -0700 | [diff] [blame] | 1330 | "kind": "A String", # This is always <code>sql#replicaConfiguration</code>. |
Nathaniel Manista | 4f877e5 | 2015-06-15 16:44:50 +0000 | [diff] [blame] | 1331 | }, |
Bu Sun Kim | 6502091 | 2020-05-20 12:08:20 -0700 | [diff] [blame] | 1332 | "connectionName": "A String", # Connection name of the Cloud SQL instance used in connection strings. |
| 1333 | "failoverReplica": { # The name and status of the failover replica. This property is applicable |
| 1334 | # only to Second Generation instances. |
| 1335 | "available": True or False, # The availability status of the failover replica. A false status indicates |
| 1336 | # that the failover replica is out of sync. The master can only failover to |
| 1337 | # the failover replica when the status is true. |
| 1338 | "name": "A String", # The name of the failover replica. If specified at instance creation, a |
| 1339 | # failover replica is created for the instance. The name |
| 1340 | # doesn't include the project ID. This property is applicable only to |
| 1341 | # Second Generation instances. |
| 1342 | }, |
| 1343 | "ipAddresses": [ # The assigned IP addresses for the instance. |
| 1344 | { # Database instance IP Mapping. |
| 1345 | "timeToRetire": "A String", # The due time for this IP to be retired in <a |
| 1346 | # href="https://tools.ietf.org/html/rfc3339">RFC 3339</a> format, for example |
| 1347 | # <code>2012-11-15T16:19:00.094Z</code>. This field is only available when |
| 1348 | # the IP is scheduled to be retired. |
| 1349 | "type": "A String", # The type of this IP address. A <code>PRIMARY</code> address is a public |
| 1350 | # address that can accept incoming connections. A <code>PRIVATE</code> |
| 1351 | # address is a private address that can accept incoming connections. An |
| 1352 | # <code>OUTGOING</code> address is the source address of connections |
| 1353 | # originating from the instance, if supported. |
| 1354 | "ipAddress": "A String", # The IP address assigned. |
| 1355 | }, |
| 1356 | ], |
| 1357 | "ipv6Address": "A String", # The IPv6 address assigned to the instance. This property is applicable only |
| 1358 | # to First Generation instances. |
| 1359 | "selfLink": "A String", # The URI of this resource. |
| 1360 | "diskEncryptionStatus": { # Disk encryption status for an instance. # Disk encryption status specific to an instance. |
| 1361 | # Applies only to Second Generation instances. |
| 1362 | "kmsKeyVersionName": "A String", # KMS key version used to encrypt the Cloud SQL instance resource |
| 1363 | "kind": "A String", # This is always <code>sql#diskEncryptionStatus</code>. |
| 1364 | }, |
| 1365 | "kind": "A String", # This is always <code>sql#instance</code>. |
| 1366 | "region": "A String", # The geographical region. Can be <code>us-central</code> |
| 1367 | # (<code>FIRST_GEN</code> instances only), <code>us-central1</code> |
| 1368 | # (<code>SECOND_GEN</code> instances only), <code>asia-east1</code> or |
| 1369 | # <code>europe-west1</code>. Defaults to <code>us-central</code> or |
| 1370 | # <code>us-central1</code> depending on the instance type (First Generation |
| 1371 | # or Second Generation). The region can not be changed after instance |
| 1372 | # creation. |
| 1373 | "state": "A String", # The current serving state of the Cloud SQL instance. This can be one of the |
| 1374 | # following. <br><code>RUNNABLE</code>: The instance is running, or is ready |
| 1375 | # to run when accessed. <br><code>SUSPENDED</code>: The instance is not |
| 1376 | # available, for example due to problems with billing. |
| 1377 | # <br><code>PENDING_CREATE</code>: The instance is being created. |
| 1378 | # <br><code>MAINTENANCE</code>: The instance is down for maintenance. |
| 1379 | # <br><code>FAILED</code>: The instance creation failed. |
| 1380 | # <br><code>UNKNOWN_STATE</code>: The state of the instance is unknown. |
| 1381 | "backendType": "A String", # <code>FIRST_GEN</code>: First Generation instance. MySQL only. <br |
| 1382 | # /><code>SECOND_GEN</code>: Second Generation instance or PostgreSQL |
| 1383 | # instance. <br /><code>EXTERNAL</code>: A database server that is not |
| 1384 | # managed by Google. <br>This property is read-only; use the |
| 1385 | # <code>tier</code> property in the <code>settings</code> object to determine |
| 1386 | # the database type and Second or First Generation. |
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. |
Bu Sun Kim | 6502091 | 2020-05-20 12:08:20 -0700 | [diff] [blame] | 1403 | "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] | 1404 | # <code>SQL</code>, this field is required only if the import file does not |
| 1405 | # specify a database, and is overridden by any database specification in the |
| 1406 | # import file. If <code>fileType</code> is <code>CSV</code>, one database |
| 1407 | # must be specified. |
Bu Sun Kim | 6502091 | 2020-05-20 12:08:20 -0700 | [diff] [blame] | 1408 | "importUser": "A String", # The PostgreSQL user for this import operation. PostgreSQL instances only. |
| 1409 | "bakImportOptions": { # Import parameters specific to SQL Server .BAK files |
| 1410 | "encryptionOptions": { |
Bu Sun Kim | 4ed7d3f | 2020-05-27 12:20:54 -0700 | [diff] [blame^] | 1411 | "pvkPassword": "A String", # Password that encrypts the private key |
Bu Sun Kim | 6502091 | 2020-05-20 12:08:20 -0700 | [diff] [blame] | 1412 | "certPath": "A String", # Path to the Certificate (.cer) in Cloud Storage, in the form |
| 1413 | # <code>gs://bucketName/fileName</code>. The instance must have |
| 1414 | # write permissions to the bucket and read access to the file. |
| 1415 | "pvkPath": "A String", # Path to the Certificate Private Key (.pvk) in Cloud Storage, in the |
| 1416 | # form <code>gs://bucketName/fileName</code>. The instance must have |
| 1417 | # write permissions to the bucket and read access to the file. |
Bu Sun Kim | 6502091 | 2020-05-20 12:08:20 -0700 | [diff] [blame] | 1418 | }, |
| 1419 | }, |
| 1420 | "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] | 1421 | # <code>gs: |
| 1422 | # //bucketName/fileName</code>. Compressed gzip files (.gz) are supported |
| 1423 | # // when <code>fileType</code> is <code>SQL</code>. The instance must have |
| 1424 | # // write permissions to the bucket and read access to the file. |
Bu Sun Kim | 6502091 | 2020-05-20 12:08:20 -0700 | [diff] [blame] | 1425 | "fileType": "A String", # The file type for the specified uri. <br><code>SQL</code>: The file |
| 1426 | # contains SQL statements. <br><code>CSV</code>: The file contains CSV data. |
Bu Sun Kim | 4ed7d3f | 2020-05-27 12:20:54 -0700 | [diff] [blame^] | 1427 | "kind": "A String", # This is always <code>sql#importContext</code>. |
| 1428 | "csvImportOptions": { # Options for importing data as CSV. |
| 1429 | "table": "A String", # The table to which CSV data is imported. |
| 1430 | "columns": [ # The columns to which CSV data is imported. If not specified, all columns |
| 1431 | # of the database table are loaded with CSV data. |
| 1432 | "A String", |
| 1433 | ], |
| 1434 | }, |
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 | "targetLink": "A String", |
| 1450 | "operationType": "A String", # The type of the operation. Valid values are <code>CREATE</code>, |
| 1451 | # <code>DELETE</code>, <code>UPDATE</code>, <code>RESTART</code>, |
| 1452 | # <code>IMPORT</code>, <code>EXPORT</code>, <code>BACKUP_VOLUME</code>, |
| 1453 | # <code>RESTORE_VOLUME</code>, <code>CREATE_USER</code>, |
| 1454 | # <code>DELETE_USER</code>, <code>CREATE_DATABASE</code>, |
| 1455 | # <code>DELETE_DATABASE</code> . |
| 1456 | "error": { # Database instance operation errors list wrapper. # If errors occurred during processing of this operation, this field will be |
| 1457 | # populated. |
| 1458 | "errors": [ # The list of errors encountered while processing this operation. |
| 1459 | { # Database instance operation error. |
| 1460 | "kind": "A String", # This is always <code>sql#operationError</code>. |
| 1461 | "code": "A String", # Identifies the specific error that occurred. |
| 1462 | "message": "A String", # Additional information about the error encountered. |
Dan O'Meara | dd49464 | 2020-05-01 07:42:23 -0700 | [diff] [blame] | 1463 | }, |
Bu Sun Kim | 6502091 | 2020-05-20 12:08:20 -0700 | [diff] [blame] | 1464 | ], |
| 1465 | "kind": "A String", # This is always <code>sql#operationErrors</code>. |
| 1466 | }, |
| 1467 | "kind": "A String", # This is always <code>sql#operation</code>. |
| 1468 | "importContext": { # Database instance import context. # The context for import operation, if applicable. |
Bu Sun Kim | 6502091 | 2020-05-20 12:08:20 -0700 | [diff] [blame] | 1469 | "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] | 1470 | # <code>SQL</code>, this field is required only if the import file does not |
| 1471 | # specify a database, and is overridden by any database specification in the |
| 1472 | # import file. If <code>fileType</code> is <code>CSV</code>, one database |
| 1473 | # must be specified. |
Bu Sun Kim | 6502091 | 2020-05-20 12:08:20 -0700 | [diff] [blame] | 1474 | "importUser": "A String", # The PostgreSQL user for this import operation. PostgreSQL instances only. |
| 1475 | "bakImportOptions": { # Import parameters specific to SQL Server .BAK files |
| 1476 | "encryptionOptions": { |
Bu Sun Kim | 4ed7d3f | 2020-05-27 12:20:54 -0700 | [diff] [blame^] | 1477 | "pvkPassword": "A String", # Password that encrypts the private key |
Bu Sun Kim | 6502091 | 2020-05-20 12:08:20 -0700 | [diff] [blame] | 1478 | "certPath": "A String", # Path to the Certificate (.cer) in Cloud Storage, in the form |
| 1479 | # <code>gs://bucketName/fileName</code>. The instance must have |
| 1480 | # write permissions to the bucket and read access to the file. |
| 1481 | "pvkPath": "A String", # Path to the Certificate Private Key (.pvk) in Cloud Storage, in the |
| 1482 | # form <code>gs://bucketName/fileName</code>. The instance must have |
| 1483 | # write permissions to the bucket and read access to the file. |
Bu Sun Kim | 6502091 | 2020-05-20 12:08:20 -0700 | [diff] [blame] | 1484 | }, |
| 1485 | }, |
| 1486 | "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] | 1487 | # <code>gs: |
| 1488 | # //bucketName/fileName</code>. Compressed gzip files (.gz) are supported |
| 1489 | # // when <code>fileType</code> is <code>SQL</code>. The instance must have |
| 1490 | # // write permissions to the bucket and read access to the file. |
Bu Sun Kim | 6502091 | 2020-05-20 12:08:20 -0700 | [diff] [blame] | 1491 | "fileType": "A String", # The file type for the specified uri. <br><code>SQL</code>: The file |
| 1492 | # contains SQL statements. <br><code>CSV</code>: The file contains CSV data. |
Bu Sun Kim | 4ed7d3f | 2020-05-27 12:20:54 -0700 | [diff] [blame^] | 1493 | "kind": "A String", # This is always <code>sql#importContext</code>. |
| 1494 | "csvImportOptions": { # Options for importing data as CSV. |
| 1495 | "table": "A String", # The table to which CSV data is imported. |
| 1496 | "columns": [ # The columns to which CSV data is imported. If not specified, all columns |
| 1497 | # of the database table are loaded with CSV data. |
| 1498 | "A String", |
| 1499 | ], |
| 1500 | }, |
Craig Citro | e633be1 | 2015-03-02 13:40:36 -0800 | [diff] [blame] | 1501 | }, |
Bu Sun Kim | 6502091 | 2020-05-20 12:08:20 -0700 | [diff] [blame] | 1502 | "status": "A String", # The status of an operation. Valid values are <code>PENDING</code>, |
| 1503 | # <code>RUNNING</code>, <code>DONE</code>, |
| 1504 | # <code>SQL_OPERATION_STATUS_UNSPECIFIED</code>. |
| 1505 | "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] | 1506 | # identifier to retrieve the Operations resource that has information about |
| 1507 | # the operation. |
Bu Sun Kim | 6502091 | 2020-05-20 12:08:20 -0700 | [diff] [blame] | 1508 | "exportContext": { # Database instance export context. # The context for export operation, if applicable. |
Bu Sun Kim | 4ed7d3f | 2020-05-27 12:20:54 -0700 | [diff] [blame^] | 1509 | "fileType": "A String", # The file type for the specified uri. <br><code>SQL</code>: The file |
| 1510 | # contains SQL statements. <br><code>CSV</code>: The file contains CSV data. |
| 1511 | "uri": "A String", # The path to the file in Google Cloud Storage where the export will be |
| 1512 | # stored. The URI is in the form <code>gs: |
| 1513 | # //bucketName/fileName</code>. If the file already exists, the requests |
| 1514 | # // succeeds, but the operation fails. If <code>fileType</code> is |
| 1515 | # // <code>SQL</code> and the filename ends with .gz, the contents are |
| 1516 | # // compressed. |
| 1517 | "csvExportOptions": { # Options for exporting data as CSV. |
| 1518 | "selectQuery": "A String", # The select query used to extract the data. |
| 1519 | }, |
| 1520 | "kind": "A String", # This is always <code>sql#exportContext</code>. |
Bu Sun Kim | 6502091 | 2020-05-20 12:08:20 -0700 | [diff] [blame] | 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 | }, |
| 1549 | }, |
Bu Sun Kim | 6502091 | 2020-05-20 12:08:20 -0700 | [diff] [blame] | 1550 | "targetId": "A String", # Name of the database instance related to this operation. |
Bu Sun Kim | 4ed7d3f | 2020-05-27 12:20:54 -0700 | [diff] [blame^] | 1551 | "endTime": "A String", # The time this operation finished in UTC timezone in <a |
| 1552 | # href="https://tools.ietf.org/html/rfc3339">RFC 3339</a> format, for example |
| 1553 | # <code>2012-11-15T16:19:00.094Z</code>. |
| 1554 | "startTime": "A String", # The time this operation actually started in UTC timezone in <a |
| 1555 | # href="https://tools.ietf.org/html/rfc3339">RFC 3339</a> format, for example |
| 1556 | # <code>2012-11-15T16:19:00.094Z</code>. |
| 1557 | "insertTime": "A String", # The time this operation was enqueued in UTC timezone in <a |
| 1558 | # href="https://tools.ietf.org/html/rfc3339">RFC 3339</a> format, for example |
| 1559 | # <code>2012-11-15T16:19:00.094Z</code>. |
| 1560 | "user": "A String", # The email address of the user who initiated this operation. |
| 1561 | "targetProject": "A String", # The project ID of the target instance related to this operation. |
| 1562 | "selfLink": "A String", # The URI of this resource. |
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 | 4ed7d3f | 2020-05-27 12:20:54 -0700 | [diff] [blame^] | 1577 | "onPremisesConfiguration": { # On-premises instance configuration. # Configuration specific to on-premises instances. |
| 1578 | "clientKey": "A String", # PEM representation of the slave's private key. The corresponsing public key |
| 1579 | # is encoded in the client's certificate. |
| 1580 | "dumpFilePath": "A String", # The dump file to create the Cloud SQL replica. |
| 1581 | "hostPort": "A String", # The host and port of the on-premises instance in host:port format |
| 1582 | "clientCertificate": "A String", # PEM representation of the slave's x509 certificate. |
| 1583 | "username": "A String", # The username for connecting to on-premises instance. |
| 1584 | "caCertificate": "A String", # PEM representation of the trusted CA's x509 certificate. |
| 1585 | "kind": "A String", # This is always <code>sql#onPremisesConfiguration</code>. |
| 1586 | "password": "A String", # The password for connecting to on-premises instance. |
| 1587 | }, |
| 1588 | "project": "A String", # The project ID of the project containing the Cloud SQL instance. The Google |
| 1589 | # apps domain is prefixed if applicable. |
| 1590 | "serviceAccountEmailAddress": "A String", # The service account email address assigned to the instance. This property |
| 1591 | # is applicable only to Second Generation instances. |
| 1592 | "databaseVersion": "A String", # The database engine type and version. The <code>databaseVersion</code> |
| 1593 | # field can not be changed after instance creation. MySQL Second Generation |
| 1594 | # instances: <code>MYSQL_5_7</code> (default) or <code>MYSQL_5_6</code>. |
| 1595 | # PostgreSQL instances: <code>POSTGRES_9_6</code> (default) or |
| 1596 | # <code>POSTGRES_11 Beta</code> MySQL First Generation |
| 1597 | # instances: <code>MYSQL_5_6</code> (default) or <code>MYSQL_5_5</code> |
Bu Sun Kim | 6502091 | 2020-05-20 12:08:20 -0700 | [diff] [blame] | 1598 | "suspensionReason": [ # If the instance state is SUSPENDED, the reason for the suspension. |
| 1599 | "A String", |
| 1600 | ], |
| 1601 | "settings": { # Database instance settings. # The user settings. |
Bu Sun Kim | 6502091 | 2020-05-20 12:08:20 -0700 | [diff] [blame] | 1602 | "pricingPlan": "A String", # The pricing plan for this instance. This can be either <code>PER_USE</code> |
| 1603 | # or <code>PACKAGE</code>. Only <code>PER_USE</code> is supported for Second |
| 1604 | # Generation instances. |
| 1605 | "storageAutoResize": True or False, # Configuration to increase storage size automatically. The default value is |
| 1606 | # true. Not used for First Generation instances. |
| 1607 | "storageAutoResizeLimit": "A String", # The maximum size to which storage capacity can be automatically increased. |
| 1608 | # The default value is 0, which specifies that there is no limit. Not used |
| 1609 | # for First Generation instances. |
| 1610 | "authorizedGaeApplications": [ # The App Engine app IDs that can access this instance. First Generation |
| 1611 | # instances only. |
| 1612 | "A String", |
| 1613 | ], |
| 1614 | "tier": "A String", # The tier (or machine type) for this instance, for example |
| 1615 | # <code>db-n1-standard-1</code> (MySQL instances) or |
| 1616 | # <code>db-custom-1-3840</code> (PostgreSQL instances). For MySQL instances, |
| 1617 | # this property determines whether the instance is First or Second |
| 1618 | # Generation. For more information, see <a |
| 1619 | # href="/sql/docs/db_path/instance-settings">Instance Settings</a>. |
| 1620 | "dataDiskSizeGb": "A String", # The size of data disk, in GB. The data disk size minimum is 10GB. Not used |
| 1621 | # for First Generation instances. |
| 1622 | "dataDiskType": "A String", # The type of data disk: <code>PD_SSD</code> (default) or |
| 1623 | # <code>PD_HDD</code>. Not used for First Generation instances. |
| 1624 | "databaseReplicationEnabled": True or False, # Configuration specific to read replica instances. Indicates whether |
| 1625 | # replication is enabled or not. |
| 1626 | "crashSafeReplicationEnabled": True or False, # Configuration specific to read replica instances. Indicates whether |
| 1627 | # database flags for crash-safe replication are enabled. This property is |
| 1628 | # only applicable to First Generation instances. |
| 1629 | "backupConfiguration": { # Database instance backup configuration. # The daily backup configuration for the instance. |
Bu Sun Kim | 6502091 | 2020-05-20 12:08:20 -0700 | [diff] [blame] | 1630 | "replicationLogArchivingEnabled": True or False, # Reserved for future use. |
| 1631 | "location": "A String", # Location of the backup |
| 1632 | "pointInTimeRecoveryEnabled": True or False, # Reserved for future use. |
| 1633 | "startTime": "A String", # Start time for the daily backup configuration in UTC timezone in the 24 |
| 1634 | # hour format - <code>HH:MM</code>. |
| 1635 | "kind": "A String", # This is always <code>sql#backupConfiguration</code>. |
| 1636 | "enabled": True or False, # Whether this configuration is enabled. |
Bu Sun Kim | 4ed7d3f | 2020-05-27 12:20:54 -0700 | [diff] [blame^] | 1637 | "binaryLogEnabled": True or False, # (MySQL only) Whether binary log is enabled. If backup configuration is |
| 1638 | # disabled, binarylog must be disabled as well. |
Bu Sun Kim | 6502091 | 2020-05-20 12:08:20 -0700 | [diff] [blame] | 1639 | }, |
| 1640 | "userLabels": { # User-provided labels, represented as a dictionary where each label is a |
| 1641 | # single key value pair. |
| 1642 | "a_key": "A String", |
| 1643 | }, |
Bu Sun Kim | 4ed7d3f | 2020-05-27 12:20:54 -0700 | [diff] [blame^] | 1644 | "replicationType": "A String", # The type of replication this instance uses. This can be either |
| 1645 | # <code>ASYNCHRONOUS</code> or <code>SYNCHRONOUS</code>. This property is |
| 1646 | # only applicable to First Generation instances. |
| 1647 | "kind": "A String", # This is always <code>sql#settings</code>. |
Bu Sun Kim | 6502091 | 2020-05-20 12:08:20 -0700 | [diff] [blame] | 1648 | "locationPreference": { # Preferred location. This specifies where a Cloud SQL instance should # The location preference settings. This allows the instance to be located as |
| 1649 | # near as possible to either an App Engine app or Compute Engine zone for |
| 1650 | # better performance. App Engine co-location is only applicable to First |
| 1651 | # Generation instances. |
| 1652 | # preferably be located, either in a specific Compute Engine zone, or |
| 1653 | # co-located with an App Engine application. Note that if the preferred |
| 1654 | # location is not available, the instance will be located as close as possible |
| 1655 | # within the region. Only one location may be specified. |
Bu Sun Kim | 4ed7d3f | 2020-05-27 12:20:54 -0700 | [diff] [blame^] | 1656 | "kind": "A String", # This is always <code>sql#locationPreference</code>. |
Bu Sun Kim | 6502091 | 2020-05-20 12:08:20 -0700 | [diff] [blame] | 1657 | "zone": "A String", # The preferred Compute Engine zone (e.g. us-central1-a, us-central1-b, |
| 1658 | # etc.). |
| 1659 | "followGaeApplication": "A String", # The AppEngine application to follow, it must be in the same region as the |
| 1660 | # Cloud SQL instance. |
Bu Sun Kim | 6502091 | 2020-05-20 12:08:20 -0700 | [diff] [blame] | 1661 | }, |
Bu Sun Kim | 6502091 | 2020-05-20 12:08:20 -0700 | [diff] [blame] | 1662 | "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] | 1663 | # applicable only when the instance state is <code>RUNNABLE</code>. Valid |
| 1664 | # values: <br><code>ALWAYS</code>: The instance is on, and remains so even in |
| 1665 | # the absence of connection requests. <br><code>NEVER</code>: The instance is |
| 1666 | # off; it is not activated, even if a connection request arrives. |
| 1667 | # <br><code>ON_DEMAND</code>: First Generation instances only. The instance |
| 1668 | # responds to incoming requests, and turns itself off when not in use. |
| 1669 | # Instances with <code>PER_USE</code> pricing turn off after 15 minutes of |
| 1670 | # inactivity. Instances with <code>PER_PACKAGE</code> pricing turn off after |
| 1671 | # 12 hours of inactivity. |
Bu Sun Kim | 4ed7d3f | 2020-05-27 12:20:54 -0700 | [diff] [blame^] | 1672 | "databaseFlags": [ # The database flags passed to the instance at startup. |
| 1673 | { # Database flags for Cloud SQL instances. |
| 1674 | "name": "A String", # The name of the flag. These flags are passed at instance startup, so |
| 1675 | # include both server options and system variables for MySQL. Flags should be |
| 1676 | # specified with underscores, not hyphens. For more information, see <a |
| 1677 | # href="/sql/docs/mysql/flags">Configuring Database Flags</a> in the Cloud |
| 1678 | # SQL documentation. |
| 1679 | "value": "A String", # The value of the flag. Booleans should be set to <code>on</code> for true |
| 1680 | # and <code>off</code> for false. This field must be omitted if the flag |
| 1681 | # doesn't take a value. |
| 1682 | }, |
| 1683 | ], |
| 1684 | "settingsVersion": "A String", # The version of instance settings. This is a required field for update |
| 1685 | # method to make sure concurrent updates are handled properly. During update, |
| 1686 | # use the most recent settingsVersion value for this instance and do not try |
| 1687 | # to update this value. |
| 1688 | "availabilityType": "A String", # Availability type (PostgreSQL and MySQL instances only). Potential values: |
| 1689 | # <br><code>ZONAL</code>: The instance serves data from only one zone. |
| 1690 | # Outages in that zone affect data accessibility. <br><code>REGIONAL</code>: |
| 1691 | # The instance can serve data from more than one zone in a region (it is |
| 1692 | # highly available). <br>For more information, see <a |
| 1693 | # href="https://cloud.google.com/sql/docs/postgres/high-availability">Overview |
| 1694 | # of the High Availability Configuration</a>. |
| 1695 | "ipConfiguration": { # IP Management configuration. # The settings for IP Management. This allows to enable or disable the |
| 1696 | # instance IP and manage which external networks can connect to the instance. |
| 1697 | # The IPv4 address cannot be disabled for Second Generation instances. |
| 1698 | "privateNetwork": "A String", # The resource link for the VPC network from which the Cloud SQL instance is |
| 1699 | # accessible for private IP. For example, |
| 1700 | # <code>/projects/myProject/global/networks/default</code>. This setting can |
| 1701 | # be updated, but it cannot be removed after it is set. |
| 1702 | "ipv4Enabled": True or False, # Whether the instance should be assigned an IP address or not. |
| 1703 | "authorizedNetworks": [ # The list of external networks that are allowed to connect to the instance |
| 1704 | # using the IP. In <a |
| 1705 | # href="http://en.wikipedia.org/wiki/CIDR_notation#CIDR_notation">CIDR |
| 1706 | # notation</a>, also known as 'slash' notation (e.g. |
| 1707 | # <code>192.168.100.0/24</code>). |
| 1708 | { # An entry for an Access Control list. |
| 1709 | "value": "A String", # The whitelisted value for the access control list. |
| 1710 | "expirationTime": "A String", # The time when this access control entry expires in <a |
| 1711 | # href="https://tools.ietf.org/html/rfc3339">RFC 3339</a> format, for example |
| 1712 | # <code>2012-11-15T16:19:00.094Z</code>. |
| 1713 | "name": "A String", # Optional. A label to identify this entry. |
| 1714 | "kind": "A String", # This is always <code>sql#aclEntry</code>. |
| 1715 | }, |
| 1716 | ], |
| 1717 | "requireSsl": True or False, # Whether SSL connections over IP should be enforced or not. |
| 1718 | }, |
| 1719 | "maintenanceWindow": { # Maintenance window. This specifies when a v2 Cloud SQL instance should # The maintenance window for this instance. This specifies when the instance |
| 1720 | # can be restarted for maintenance purposes. Not used for First Generation |
| 1721 | # instances. |
| 1722 | # preferably be restarted for system maintenance purposes. |
| 1723 | "updateTrack": "A String", # Maintenance timing setting: <code>canary</code> (Earlier) or |
| 1724 | # <code>stable</code> (Later). <br /><a |
| 1725 | # href="/sql/docs/db_path/instance-settings#maintenance-timing-2ndgen"> |
| 1726 | # Learn more</a>. |
| 1727 | "hour": 42, # hour of day - 0 to 23. |
| 1728 | "day": 42, # day of week (1-7), starting on Monday. |
| 1729 | "kind": "A String", # This is always <code>sql#maintenanceWindow</code>. |
| 1730 | }, |
Jon Wayne Parrott | 0a471d3 | 2016-05-19 10:54:38 -0700 | [diff] [blame] | 1731 | }, |
Bu Sun Kim | 6502091 | 2020-05-20 12:08:20 -0700 | [diff] [blame] | 1732 | "replicaNames": [ # The replicas of the instance. |
| 1733 | "A String", |
| 1734 | ], |
| 1735 | "diskEncryptionConfiguration": { # Disk encryption configuration for an instance. # Disk encryption configuration specific to an instance. |
| 1736 | # Applies only to Second Generation instances. |
| 1737 | "kind": "A String", # This is always <code>sql#diskEncryptionConfiguration</code>. |
| 1738 | "kmsKeyName": "A String", # Resource name of KMS key for disk encryption |
| 1739 | }, |
Bu Sun Kim | 4ed7d3f | 2020-05-27 12:20:54 -0700 | [diff] [blame^] | 1740 | "etag": "A String", # This field is deprecated and will be removed from a future version of the |
| 1741 | # API. Use the <code>settings.settingsVersion</code> field instead. |
| 1742 | "rootPassword": "A String", # Initial root password. Use only on creation. |
Bu Sun Kim | 6502091 | 2020-05-20 12:08:20 -0700 | [diff] [blame] | 1743 | "scheduledMaintenance": { # Any scheduled maintenancce for this instance. # The start time of any upcoming scheduled maintenance for this instance. |
| 1744 | "canDefer": True or False, |
| 1745 | "startTime": "A String", # The start time of any upcoming scheduled maintenance for this instance. |
| 1746 | "canReschedule": True or False, # If the scheduled maintenance can be rescheduled. |
| 1747 | }, |
Bu Sun Kim | 6502091 | 2020-05-20 12:08:20 -0700 | [diff] [blame] | 1748 | "serverCaCert": { # SslCerts Resource # SSL configuration. |
Bu Sun Kim | 4ed7d3f | 2020-05-27 12:20:54 -0700 | [diff] [blame^] | 1749 | "expirationTime": "A String", # The time when the certificate expires in <a |
| 1750 | # href="https://tools.ietf.org/html/rfc3339">RFC 3339</a> format, for example |
| 1751 | # <code>2012-11-15T16:19:00.094Z</code>. |
Bu Sun Kim | 6502091 | 2020-05-20 12:08:20 -0700 | [diff] [blame] | 1752 | "sha1Fingerprint": "A String", # Sha1 Fingerprint. |
| 1753 | "certSerialNumber": "A String", # Serial number, as extracted from the certificate. |
| 1754 | "cert": "A String", # PEM representation. |
| 1755 | "kind": "A String", # This is always <code>sql#sslCert</code>. |
| 1756 | "commonName": "A String", # User supplied name. Constrained to [a-zA-Z.-_ ]+. |
| 1757 | "createTime": "A String", # The time when the certificate was created in <a |
| 1758 | # href="https://tools.ietf.org/html/rfc3339">RFC 3339</a> format, for example |
| 1759 | # <code>2012-11-15T16:19:00.094Z</code> |
| 1760 | "instance": "A String", # Name of the database instance. |
| 1761 | "selfLink": "A String", # The URI of this resource. |
Bu Sun Kim | 6502091 | 2020-05-20 12:08:20 -0700 | [diff] [blame] | 1762 | }, |
| 1763 | "maxDiskSize": "A String", # The maximum disk size of the instance in bytes. |
| 1764 | "name": "A String", # Name of the Cloud SQL instance. This does not include the project ID. |
| 1765 | "masterInstanceName": "A String", # The name of the instance which will act as master in the replication setup. |
| 1766 | "instanceType": "A String", # The instance type. This can be one of the following. |
| 1767 | # <br><code>CLOUD_SQL_INSTANCE</code>: A Cloud SQL instance that is not |
| 1768 | # replicating from a master. <br><code>ON_PREMISES_INSTANCE</code>: An |
| 1769 | # instance running on the |
| 1770 | # customer's premises. <br><code>READ_REPLICA_INSTANCE</code>: A Cloud SQL |
| 1771 | # instance configured as a read-replica. |
| 1772 | "gceZone": "A String", # The Compute Engine zone that the instance is currently serving from. This |
| 1773 | # value could be different from the zone that was specified when the instance |
| 1774 | # was created if the instance has failed over to its secondary zone. |
| 1775 | "currentDiskSize": "A String", # The current disk usage of the instance in bytes. This property has been |
| 1776 | # deprecated. Users should use the |
| 1777 | # "cloudsql.googleapis.com/database/disk/bytes_used" metric in Cloud |
| 1778 | # Monitoring API instead. Please see <a |
| 1779 | # href="https://groups.google.com/d/msg/google-cloud-sql-announce/I_7-F9EBhT0/BtvFtdFeAgAJ">this |
| 1780 | # announcement</a> for details. |
| 1781 | "replicaConfiguration": { # Read-replica configuration for connecting to the master. # Configuration specific to failover replicas and read replicas. |
Bu Sun Kim | 4ed7d3f | 2020-05-27 12:20:54 -0700 | [diff] [blame^] | 1782 | "mysqlReplicaConfiguration": { # Read-replica configuration specific to MySQL databases. # MySQL specific configuration when replicating from a MySQL on-premises |
| 1783 | # master. Replication configuration information such as the username, |
| 1784 | # password, certificates, and keys are not stored in the instance metadata. |
| 1785 | # The configuration information is used only to set up the replication |
| 1786 | # connection and is stored by MySQL in a file named <code>master.info</code> |
| 1787 | # in the data directory. |
| 1788 | "password": "A String", # The password for the replication connection. |
| 1789 | "verifyServerCertificate": True or False, # Whether or not to check the master's Common Name value in the certificate |
| 1790 | # that it sends during the SSL handshake. |
| 1791 | "clientKey": "A String", # PEM representation of the slave's private key. The corresponsing public key |
| 1792 | # is encoded in the client's certificate. |
| 1793 | "sslCipher": "A String", # A list of permissible ciphers to use for SSL encryption. |
| 1794 | "masterHeartbeatPeriod": "A String", # Interval in milliseconds between replication heartbeats. |
| 1795 | "dumpFilePath": "A String", # Path to a SQL dump file in Google Cloud Storage from which the slave |
| 1796 | # instance is to be created. The URI is in the form gs: |
| 1797 | # //bucketName/fileName. Compressed gzip files (.gz) are also supported. |
| 1798 | # // Dumps should have the binlog co-ordinates from which replication should |
| 1799 | # // begin. This can be accomplished by setting --master-data to 1 when using |
| 1800 | # // mysqldump. |
| 1801 | "connectRetryInterval": 42, # Seconds to wait between connect retries. MySQL's default is 60 seconds. |
| 1802 | "clientCertificate": "A String", # PEM representation of the slave's x509 certificate. |
| 1803 | "username": "A String", # The username for the replication connection. |
| 1804 | "caCertificate": "A String", # PEM representation of the trusted CA's x509 certificate. |
| 1805 | "kind": "A String", # This is always <code>sql#mysqlReplicaConfiguration</code>. |
| 1806 | }, |
Bu Sun Kim | 6502091 | 2020-05-20 12:08:20 -0700 | [diff] [blame] | 1807 | "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] | 1808 | # <code>true</code> the replica will be designated as a failover replica. In |
| 1809 | # case the master instance fails, the replica instance will be promoted as |
| 1810 | # the new master instance. <p>Only one replica can be specified as failover |
| 1811 | # target, and the replica has to be in different zone with the master |
| 1812 | # instance. |
Bu Sun Kim | 6502091 | 2020-05-20 12:08:20 -0700 | [diff] [blame] | 1813 | "kind": "A String", # This is always <code>sql#replicaConfiguration</code>. |
Nathaniel Manista | 4f877e5 | 2015-06-15 16:44:50 +0000 | [diff] [blame] | 1814 | }, |
Bu Sun Kim | 6502091 | 2020-05-20 12:08:20 -0700 | [diff] [blame] | 1815 | "connectionName": "A String", # Connection name of the Cloud SQL instance used in connection strings. |
| 1816 | "failoverReplica": { # The name and status of the failover replica. This property is applicable |
| 1817 | # only to Second Generation instances. |
| 1818 | "available": True or False, # The availability status of the failover replica. A false status indicates |
| 1819 | # that the failover replica is out of sync. The master can only failover to |
| 1820 | # the failover replica when the status is true. |
| 1821 | "name": "A String", # The name of the failover replica. If specified at instance creation, a |
| 1822 | # failover replica is created for the instance. The name |
| 1823 | # doesn't include the project ID. This property is applicable only to |
| 1824 | # Second Generation instances. |
| 1825 | }, |
| 1826 | "ipAddresses": [ # The assigned IP addresses for the instance. |
| 1827 | { # Database instance IP Mapping. |
| 1828 | "timeToRetire": "A String", # The due time for this IP to be retired in <a |
| 1829 | # href="https://tools.ietf.org/html/rfc3339">RFC 3339</a> format, for example |
| 1830 | # <code>2012-11-15T16:19:00.094Z</code>. This field is only available when |
| 1831 | # the IP is scheduled to be retired. |
| 1832 | "type": "A String", # The type of this IP address. A <code>PRIMARY</code> address is a public |
| 1833 | # address that can accept incoming connections. A <code>PRIVATE</code> |
| 1834 | # address is a private address that can accept incoming connections. An |
| 1835 | # <code>OUTGOING</code> address is the source address of connections |
| 1836 | # originating from the instance, if supported. |
| 1837 | "ipAddress": "A String", # The IP address assigned. |
| 1838 | }, |
| 1839 | ], |
| 1840 | "ipv6Address": "A String", # The IPv6 address assigned to the instance. This property is applicable only |
| 1841 | # to First Generation instances. |
| 1842 | "selfLink": "A String", # The URI of this resource. |
| 1843 | "diskEncryptionStatus": { # Disk encryption status for an instance. # Disk encryption status specific to an instance. |
| 1844 | # Applies only to Second Generation instances. |
| 1845 | "kmsKeyVersionName": "A String", # KMS key version used to encrypt the Cloud SQL instance resource |
| 1846 | "kind": "A String", # This is always <code>sql#diskEncryptionStatus</code>. |
| 1847 | }, |
| 1848 | "kind": "A String", # This is always <code>sql#instance</code>. |
| 1849 | "region": "A String", # The geographical region. Can be <code>us-central</code> |
| 1850 | # (<code>FIRST_GEN</code> instances only), <code>us-central1</code> |
| 1851 | # (<code>SECOND_GEN</code> instances only), <code>asia-east1</code> or |
| 1852 | # <code>europe-west1</code>. Defaults to <code>us-central</code> or |
| 1853 | # <code>us-central1</code> depending on the instance type (First Generation |
| 1854 | # or Second Generation). The region can not be changed after instance |
| 1855 | # creation. |
| 1856 | "state": "A String", # The current serving state of the Cloud SQL instance. This can be one of the |
| 1857 | # following. <br><code>RUNNABLE</code>: The instance is running, or is ready |
| 1858 | # to run when accessed. <br><code>SUSPENDED</code>: The instance is not |
| 1859 | # available, for example due to problems with billing. |
| 1860 | # <br><code>PENDING_CREATE</code>: The instance is being created. |
| 1861 | # <br><code>MAINTENANCE</code>: The instance is down for maintenance. |
| 1862 | # <br><code>FAILED</code>: The instance creation failed. |
| 1863 | # <br><code>UNKNOWN_STATE</code>: The state of the instance is unknown. |
| 1864 | "backendType": "A String", # <code>FIRST_GEN</code>: First Generation instance. MySQL only. <br |
| 1865 | # /><code>SECOND_GEN</code>: Second Generation instance or PostgreSQL |
| 1866 | # instance. <br /><code>EXTERNAL</code>: A database server that is not |
| 1867 | # managed by Google. <br>This property is read-only; use the |
| 1868 | # <code>tier</code> property in the <code>settings</code> object to determine |
| 1869 | # the database type and Second or First Generation. |
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 | "targetLink": "A String", |
| 1884 | "operationType": "A String", # The type of the operation. Valid values are <code>CREATE</code>, |
| 1885 | # <code>DELETE</code>, <code>UPDATE</code>, <code>RESTART</code>, |
| 1886 | # <code>IMPORT</code>, <code>EXPORT</code>, <code>BACKUP_VOLUME</code>, |
| 1887 | # <code>RESTORE_VOLUME</code>, <code>CREATE_USER</code>, |
| 1888 | # <code>DELETE_USER</code>, <code>CREATE_DATABASE</code>, |
| 1889 | # <code>DELETE_DATABASE</code> . |
| 1890 | "error": { # Database instance operation errors list wrapper. # If errors occurred during processing of this operation, this field will be |
| 1891 | # populated. |
| 1892 | "errors": [ # The list of errors encountered while processing this operation. |
| 1893 | { # Database instance operation error. |
| 1894 | "kind": "A String", # This is always <code>sql#operationError</code>. |
| 1895 | "code": "A String", # Identifies the specific error that occurred. |
| 1896 | "message": "A String", # Additional information about the error encountered. |
Dan O'Meara | dd49464 | 2020-05-01 07:42:23 -0700 | [diff] [blame] | 1897 | }, |
Bu Sun Kim | 6502091 | 2020-05-20 12:08:20 -0700 | [diff] [blame] | 1898 | ], |
| 1899 | "kind": "A String", # This is always <code>sql#operationErrors</code>. |
| 1900 | }, |
| 1901 | "kind": "A String", # This is always <code>sql#operation</code>. |
| 1902 | "importContext": { # Database instance import context. # The context for import operation, if applicable. |
Bu Sun Kim | 6502091 | 2020-05-20 12:08:20 -0700 | [diff] [blame] | 1903 | "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] | 1904 | # <code>SQL</code>, this field is required only if the import file does not |
| 1905 | # specify a database, and is overridden by any database specification in the |
| 1906 | # import file. If <code>fileType</code> is <code>CSV</code>, one database |
| 1907 | # must be specified. |
Bu Sun Kim | 6502091 | 2020-05-20 12:08:20 -0700 | [diff] [blame] | 1908 | "importUser": "A String", # The PostgreSQL user for this import operation. PostgreSQL instances only. |
| 1909 | "bakImportOptions": { # Import parameters specific to SQL Server .BAK files |
| 1910 | "encryptionOptions": { |
Bu Sun Kim | 4ed7d3f | 2020-05-27 12:20:54 -0700 | [diff] [blame^] | 1911 | "pvkPassword": "A String", # Password that encrypts the private key |
Bu Sun Kim | 6502091 | 2020-05-20 12:08:20 -0700 | [diff] [blame] | 1912 | "certPath": "A String", # Path to the Certificate (.cer) in Cloud Storage, in the form |
| 1913 | # <code>gs://bucketName/fileName</code>. The instance must have |
| 1914 | # write permissions to the bucket and read access to the file. |
| 1915 | "pvkPath": "A String", # Path to the Certificate Private Key (.pvk) in Cloud Storage, in the |
| 1916 | # form <code>gs://bucketName/fileName</code>. The instance must have |
| 1917 | # write permissions to the bucket and read access to the file. |
Bu Sun Kim | 6502091 | 2020-05-20 12:08:20 -0700 | [diff] [blame] | 1918 | }, |
| 1919 | }, |
| 1920 | "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] | 1921 | # <code>gs: |
| 1922 | # //bucketName/fileName</code>. Compressed gzip files (.gz) are supported |
| 1923 | # // when <code>fileType</code> is <code>SQL</code>. The instance must have |
| 1924 | # // write permissions to the bucket and read access to the file. |
Bu Sun Kim | 6502091 | 2020-05-20 12:08:20 -0700 | [diff] [blame] | 1925 | "fileType": "A String", # The file type for the specified uri. <br><code>SQL</code>: The file |
| 1926 | # contains SQL statements. <br><code>CSV</code>: The file contains CSV data. |
Bu Sun Kim | 4ed7d3f | 2020-05-27 12:20:54 -0700 | [diff] [blame^] | 1927 | "kind": "A String", # This is always <code>sql#importContext</code>. |
| 1928 | "csvImportOptions": { # Options for importing data as CSV. |
| 1929 | "table": "A String", # The table to which CSV data is imported. |
| 1930 | "columns": [ # The columns to which CSV data is imported. If not specified, all columns |
| 1931 | # of the database table are loaded with CSV data. |
| 1932 | "A String", |
| 1933 | ], |
| 1934 | }, |
Craig Citro | e633be1 | 2015-03-02 13:40:36 -0800 | [diff] [blame] | 1935 | }, |
Bu Sun Kim | 6502091 | 2020-05-20 12:08:20 -0700 | [diff] [blame] | 1936 | "status": "A String", # The status of an operation. Valid values are <code>PENDING</code>, |
| 1937 | # <code>RUNNING</code>, <code>DONE</code>, |
| 1938 | # <code>SQL_OPERATION_STATUS_UNSPECIFIED</code>. |
| 1939 | "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] | 1940 | # identifier to retrieve the Operations resource that has information about |
| 1941 | # the operation. |
Bu Sun Kim | 6502091 | 2020-05-20 12:08:20 -0700 | [diff] [blame] | 1942 | "exportContext": { # Database instance export context. # The context for export operation, if applicable. |
Bu Sun Kim | 4ed7d3f | 2020-05-27 12:20:54 -0700 | [diff] [blame^] | 1943 | "fileType": "A String", # The file type for the specified uri. <br><code>SQL</code>: The file |
| 1944 | # contains SQL statements. <br><code>CSV</code>: The file contains CSV data. |
| 1945 | "uri": "A String", # The path to the file in Google Cloud Storage where the export will be |
| 1946 | # stored. The URI is in the form <code>gs: |
| 1947 | # //bucketName/fileName</code>. If the file already exists, the requests |
| 1948 | # // succeeds, but the operation fails. If <code>fileType</code> is |
| 1949 | # // <code>SQL</code> and the filename ends with .gz, the contents are |
| 1950 | # // compressed. |
| 1951 | "csvExportOptions": { # Options for exporting data as CSV. |
| 1952 | "selectQuery": "A String", # The select query used to extract the data. |
| 1953 | }, |
| 1954 | "kind": "A String", # This is always <code>sql#exportContext</code>. |
Bu Sun Kim | 6502091 | 2020-05-20 12:08:20 -0700 | [diff] [blame] | 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 | }, |
| 1983 | }, |
Bu Sun Kim | 6502091 | 2020-05-20 12:08:20 -0700 | [diff] [blame] | 1984 | "targetId": "A String", # Name of the database instance related to this operation. |
Bu Sun Kim | 4ed7d3f | 2020-05-27 12:20:54 -0700 | [diff] [blame^] | 1985 | "endTime": "A String", # The time this operation finished in UTC timezone in <a |
| 1986 | # href="https://tools.ietf.org/html/rfc3339">RFC 3339</a> format, for example |
| 1987 | # <code>2012-11-15T16:19:00.094Z</code>. |
| 1988 | "startTime": "A String", # The time this operation actually started in UTC timezone in <a |
| 1989 | # href="https://tools.ietf.org/html/rfc3339">RFC 3339</a> format, for example |
| 1990 | # <code>2012-11-15T16:19:00.094Z</code>. |
| 1991 | "insertTime": "A String", # The time this operation was enqueued in UTC timezone in <a |
| 1992 | # href="https://tools.ietf.org/html/rfc3339">RFC 3339</a> format, for example |
| 1993 | # <code>2012-11-15T16:19:00.094Z</code>. |
| 1994 | "user": "A String", # The email address of the user who initiated this operation. |
| 1995 | "targetProject": "A String", # The project ID of the target instance related to this operation. |
| 1996 | "selfLink": "A String", # The URI of this resource. |
Craig Citro | e633be1 | 2015-03-02 13:40:36 -0800 | [diff] [blame] | 1997 | }</pre> |
| 1998 | </div> |
| 1999 | |
| 2000 | <div class="method"> |
Bu Sun Kim | 4ed7d3f | 2020-05-27 12:20:54 -0700 | [diff] [blame^] | 2001 | <code class="details" id="list">list(project, pageToken=None, maxResults=None, filter=None, x__xgafv=None)</code> |
Dan O'Meara | dd49464 | 2020-05-01 07:42:23 -0700 | [diff] [blame] | 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 | 4ed7d3f | 2020-05-27 12:20:54 -0700 | [diff] [blame^] | 2006 | pageToken: string, A previously-returned page token representing part of the larger set of |
| 2007 | results to view. |
| 2008 | maxResults: integer, The maximum number of results to return per response. |
Bu Sun Kim | 6502091 | 2020-05-20 12:08:20 -0700 | [diff] [blame] | 2009 | filter: string, A filter expression that filters resources listed in the response. |
| 2010 | The expression is in the form of field:value. For example, |
| 2011 | 'instanceType:CLOUD_SQL_INSTANCE'. Fields can be nested as needed as per |
| 2012 | their JSON representation, such as 'settings.userLabels.auto_start:true'. |
| 2013 | |
| 2014 | Multiple filter queries are space-separated. For example. |
| 2015 | 'state:RUNNABLE instanceType:CLOUD_SQL_INSTANCE'. By default, each |
| 2016 | expression is an AND expression. However, you can include AND and OR |
| 2017 | expressions explicitly. |
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 | 4ed7d3f | 2020-05-27 12:20:54 -0700 | [diff] [blame^] | 2030 | "onPremisesConfiguration": { # On-premises instance configuration. # Configuration specific to on-premises instances. |
| 2031 | "clientKey": "A String", # PEM representation of the slave's private key. The corresponsing public key |
| 2032 | # is encoded in the client's certificate. |
| 2033 | "dumpFilePath": "A String", # The dump file to create the Cloud SQL replica. |
| 2034 | "hostPort": "A String", # The host and port of the on-premises instance in host:port format |
| 2035 | "clientCertificate": "A String", # PEM representation of the slave's x509 certificate. |
| 2036 | "username": "A String", # The username for connecting to on-premises instance. |
| 2037 | "caCertificate": "A String", # PEM representation of the trusted CA's x509 certificate. |
| 2038 | "kind": "A String", # This is always <code>sql#onPremisesConfiguration</code>. |
| 2039 | "password": "A String", # The password for connecting to on-premises instance. |
| 2040 | }, |
| 2041 | "project": "A String", # The project ID of the project containing the Cloud SQL instance. The Google |
| 2042 | # apps domain is prefixed if applicable. |
| 2043 | "serviceAccountEmailAddress": "A String", # The service account email address assigned to the instance. This property |
| 2044 | # is applicable only to Second Generation instances. |
| 2045 | "databaseVersion": "A String", # The database engine type and version. The <code>databaseVersion</code> |
| 2046 | # field can not be changed after instance creation. MySQL Second Generation |
| 2047 | # instances: <code>MYSQL_5_7</code> (default) or <code>MYSQL_5_6</code>. |
| 2048 | # PostgreSQL instances: <code>POSTGRES_9_6</code> (default) or |
| 2049 | # <code>POSTGRES_11 Beta</code> MySQL First Generation |
| 2050 | # instances: <code>MYSQL_5_6</code> (default) or <code>MYSQL_5_5</code> |
Bu Sun Kim | 6502091 | 2020-05-20 12:08:20 -0700 | [diff] [blame] | 2051 | "suspensionReason": [ # If the instance state is SUSPENDED, the reason for the suspension. |
| 2052 | "A String", |
| 2053 | ], |
| 2054 | "settings": { # Database instance settings. # The user settings. |
Bu Sun Kim | 6502091 | 2020-05-20 12:08:20 -0700 | [diff] [blame] | 2055 | "pricingPlan": "A String", # The pricing plan for this instance. This can be either <code>PER_USE</code> |
| 2056 | # or <code>PACKAGE</code>. Only <code>PER_USE</code> is supported for Second |
| 2057 | # Generation instances. |
| 2058 | "storageAutoResize": True or False, # Configuration to increase storage size automatically. The default value is |
| 2059 | # true. Not used for First Generation instances. |
| 2060 | "storageAutoResizeLimit": "A String", # The maximum size to which storage capacity can be automatically increased. |
| 2061 | # The default value is 0, which specifies that there is no limit. Not used |
| 2062 | # for First Generation instances. |
| 2063 | "authorizedGaeApplications": [ # The App Engine app IDs that can access this instance. First Generation |
| 2064 | # instances only. |
| 2065 | "A String", |
| 2066 | ], |
| 2067 | "tier": "A String", # The tier (or machine type) for this instance, for example |
| 2068 | # <code>db-n1-standard-1</code> (MySQL instances) or |
| 2069 | # <code>db-custom-1-3840</code> (PostgreSQL instances). For MySQL instances, |
| 2070 | # this property determines whether the instance is First or Second |
| 2071 | # Generation. For more information, see <a |
| 2072 | # href="/sql/docs/db_path/instance-settings">Instance Settings</a>. |
| 2073 | "dataDiskSizeGb": "A String", # The size of data disk, in GB. The data disk size minimum is 10GB. Not used |
| 2074 | # for First Generation instances. |
| 2075 | "dataDiskType": "A String", # The type of data disk: <code>PD_SSD</code> (default) or |
| 2076 | # <code>PD_HDD</code>. Not used for First Generation instances. |
| 2077 | "databaseReplicationEnabled": True or False, # Configuration specific to read replica instances. Indicates whether |
| 2078 | # replication is enabled or not. |
| 2079 | "crashSafeReplicationEnabled": True or False, # Configuration specific to read replica instances. Indicates whether |
| 2080 | # database flags for crash-safe replication are enabled. This property is |
| 2081 | # only applicable to First Generation instances. |
| 2082 | "backupConfiguration": { # Database instance backup configuration. # The daily backup configuration for the instance. |
Bu Sun Kim | 6502091 | 2020-05-20 12:08:20 -0700 | [diff] [blame] | 2083 | "replicationLogArchivingEnabled": True or False, # Reserved for future use. |
| 2084 | "location": "A String", # Location of the backup |
| 2085 | "pointInTimeRecoveryEnabled": True or False, # Reserved for future use. |
| 2086 | "startTime": "A String", # Start time for the daily backup configuration in UTC timezone in the 24 |
| 2087 | # hour format - <code>HH:MM</code>. |
| 2088 | "kind": "A String", # This is always <code>sql#backupConfiguration</code>. |
| 2089 | "enabled": True or False, # Whether this configuration is enabled. |
Bu Sun Kim | 4ed7d3f | 2020-05-27 12:20:54 -0700 | [diff] [blame^] | 2090 | "binaryLogEnabled": True or False, # (MySQL only) Whether binary log is enabled. If backup configuration is |
| 2091 | # disabled, binarylog must be disabled as well. |
Bu Sun Kim | 6502091 | 2020-05-20 12:08:20 -0700 | [diff] [blame] | 2092 | }, |
| 2093 | "userLabels": { # User-provided labels, represented as a dictionary where each label is a |
| 2094 | # single key value pair. |
| 2095 | "a_key": "A String", |
| 2096 | }, |
Bu Sun Kim | 4ed7d3f | 2020-05-27 12:20:54 -0700 | [diff] [blame^] | 2097 | "replicationType": "A String", # The type of replication this instance uses. This can be either |
| 2098 | # <code>ASYNCHRONOUS</code> or <code>SYNCHRONOUS</code>. This property is |
| 2099 | # only applicable to First Generation instances. |
| 2100 | "kind": "A String", # This is always <code>sql#settings</code>. |
Bu Sun Kim | 6502091 | 2020-05-20 12:08:20 -0700 | [diff] [blame] | 2101 | "locationPreference": { # Preferred location. This specifies where a Cloud SQL instance should # The location preference settings. This allows the instance to be located as |
| 2102 | # near as possible to either an App Engine app or Compute Engine zone for |
| 2103 | # better performance. App Engine co-location is only applicable to First |
| 2104 | # Generation instances. |
| 2105 | # preferably be located, either in a specific Compute Engine zone, or |
| 2106 | # co-located with an App Engine application. Note that if the preferred |
| 2107 | # location is not available, the instance will be located as close as possible |
| 2108 | # within the region. Only one location may be specified. |
Bu Sun Kim | 4ed7d3f | 2020-05-27 12:20:54 -0700 | [diff] [blame^] | 2109 | "kind": "A String", # This is always <code>sql#locationPreference</code>. |
Bu Sun Kim | 6502091 | 2020-05-20 12:08:20 -0700 | [diff] [blame] | 2110 | "zone": "A String", # The preferred Compute Engine zone (e.g. us-central1-a, us-central1-b, |
| 2111 | # etc.). |
| 2112 | "followGaeApplication": "A String", # The AppEngine application to follow, it must be in the same region as the |
| 2113 | # Cloud SQL instance. |
Bu Sun Kim | 6502091 | 2020-05-20 12:08:20 -0700 | [diff] [blame] | 2114 | }, |
Bu Sun Kim | 6502091 | 2020-05-20 12:08:20 -0700 | [diff] [blame] | 2115 | "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] | 2116 | # applicable only when the instance state is <code>RUNNABLE</code>. Valid |
| 2117 | # values: <br><code>ALWAYS</code>: The instance is on, and remains so even in |
| 2118 | # the absence of connection requests. <br><code>NEVER</code>: The instance is |
| 2119 | # off; it is not activated, even if a connection request arrives. |
| 2120 | # <br><code>ON_DEMAND</code>: First Generation instances only. The instance |
| 2121 | # responds to incoming requests, and turns itself off when not in use. |
| 2122 | # Instances with <code>PER_USE</code> pricing turn off after 15 minutes of |
| 2123 | # inactivity. Instances with <code>PER_PACKAGE</code> pricing turn off after |
| 2124 | # 12 hours of inactivity. |
Bu Sun Kim | 4ed7d3f | 2020-05-27 12:20:54 -0700 | [diff] [blame^] | 2125 | "databaseFlags": [ # The database flags passed to the instance at startup. |
| 2126 | { # Database flags for Cloud SQL instances. |
| 2127 | "name": "A String", # The name of the flag. These flags are passed at instance startup, so |
| 2128 | # include both server options and system variables for MySQL. Flags should be |
| 2129 | # specified with underscores, not hyphens. For more information, see <a |
| 2130 | # href="/sql/docs/mysql/flags">Configuring Database Flags</a> in the Cloud |
| 2131 | # SQL documentation. |
| 2132 | "value": "A String", # The value of the flag. Booleans should be set to <code>on</code> for true |
| 2133 | # and <code>off</code> for false. This field must be omitted if the flag |
| 2134 | # doesn't take a value. |
| 2135 | }, |
| 2136 | ], |
| 2137 | "settingsVersion": "A String", # The version of instance settings. This is a required field for update |
| 2138 | # method to make sure concurrent updates are handled properly. During update, |
| 2139 | # use the most recent settingsVersion value for this instance and do not try |
| 2140 | # to update this value. |
| 2141 | "availabilityType": "A String", # Availability type (PostgreSQL and MySQL instances only). Potential values: |
| 2142 | # <br><code>ZONAL</code>: The instance serves data from only one zone. |
| 2143 | # Outages in that zone affect data accessibility. <br><code>REGIONAL</code>: |
| 2144 | # The instance can serve data from more than one zone in a region (it is |
| 2145 | # highly available). <br>For more information, see <a |
| 2146 | # href="https://cloud.google.com/sql/docs/postgres/high-availability">Overview |
| 2147 | # of the High Availability Configuration</a>. |
| 2148 | "ipConfiguration": { # IP Management configuration. # The settings for IP Management. This allows to enable or disable the |
| 2149 | # instance IP and manage which external networks can connect to the instance. |
| 2150 | # The IPv4 address cannot be disabled for Second Generation instances. |
| 2151 | "privateNetwork": "A String", # The resource link for the VPC network from which the Cloud SQL instance is |
| 2152 | # accessible for private IP. For example, |
| 2153 | # <code>/projects/myProject/global/networks/default</code>. This setting can |
| 2154 | # be updated, but it cannot be removed after it is set. |
| 2155 | "ipv4Enabled": True or False, # Whether the instance should be assigned an IP address or not. |
| 2156 | "authorizedNetworks": [ # The list of external networks that are allowed to connect to the instance |
| 2157 | # using the IP. In <a |
| 2158 | # href="http://en.wikipedia.org/wiki/CIDR_notation#CIDR_notation">CIDR |
| 2159 | # notation</a>, also known as 'slash' notation (e.g. |
| 2160 | # <code>192.168.100.0/24</code>). |
| 2161 | { # An entry for an Access Control list. |
| 2162 | "value": "A String", # The whitelisted value for the access control list. |
| 2163 | "expirationTime": "A String", # The time when this access control entry expires in <a |
| 2164 | # href="https://tools.ietf.org/html/rfc3339">RFC 3339</a> format, for example |
| 2165 | # <code>2012-11-15T16:19:00.094Z</code>. |
| 2166 | "name": "A String", # Optional. A label to identify this entry. |
| 2167 | "kind": "A String", # This is always <code>sql#aclEntry</code>. |
| 2168 | }, |
| 2169 | ], |
| 2170 | "requireSsl": True or False, # Whether SSL connections over IP should be enforced or not. |
| 2171 | }, |
| 2172 | "maintenanceWindow": { # Maintenance window. This specifies when a v2 Cloud SQL instance should # The maintenance window for this instance. This specifies when the instance |
| 2173 | # can be restarted for maintenance purposes. Not used for First Generation |
| 2174 | # instances. |
| 2175 | # preferably be restarted for system maintenance purposes. |
| 2176 | "updateTrack": "A String", # Maintenance timing setting: <code>canary</code> (Earlier) or |
| 2177 | # <code>stable</code> (Later). <br /><a |
| 2178 | # href="/sql/docs/db_path/instance-settings#maintenance-timing-2ndgen"> |
| 2179 | # Learn more</a>. |
| 2180 | "hour": 42, # hour of day - 0 to 23. |
| 2181 | "day": 42, # day of week (1-7), starting on Monday. |
| 2182 | "kind": "A String", # This is always <code>sql#maintenanceWindow</code>. |
| 2183 | }, |
Jon Wayne Parrott | 0a471d3 | 2016-05-19 10:54:38 -0700 | [diff] [blame] | 2184 | }, |
Bu Sun Kim | 6502091 | 2020-05-20 12:08:20 -0700 | [diff] [blame] | 2185 | "replicaNames": [ # The replicas of the instance. |
| 2186 | "A String", |
| 2187 | ], |
| 2188 | "diskEncryptionConfiguration": { # Disk encryption configuration for an instance. # Disk encryption configuration specific to an instance. |
| 2189 | # Applies only to Second Generation instances. |
| 2190 | "kind": "A String", # This is always <code>sql#diskEncryptionConfiguration</code>. |
| 2191 | "kmsKeyName": "A String", # Resource name of KMS key for disk encryption |
| 2192 | }, |
Bu Sun Kim | 4ed7d3f | 2020-05-27 12:20:54 -0700 | [diff] [blame^] | 2193 | "etag": "A String", # This field is deprecated and will be removed from a future version of the |
| 2194 | # API. Use the <code>settings.settingsVersion</code> field instead. |
| 2195 | "rootPassword": "A String", # Initial root password. Use only on creation. |
Bu Sun Kim | 6502091 | 2020-05-20 12:08:20 -0700 | [diff] [blame] | 2196 | "scheduledMaintenance": { # Any scheduled maintenancce for this instance. # The start time of any upcoming scheduled maintenance for this instance. |
| 2197 | "canDefer": True or False, |
| 2198 | "startTime": "A String", # The start time of any upcoming scheduled maintenance for this instance. |
| 2199 | "canReschedule": True or False, # If the scheduled maintenance can be rescheduled. |
| 2200 | }, |
Bu Sun Kim | 6502091 | 2020-05-20 12:08:20 -0700 | [diff] [blame] | 2201 | "serverCaCert": { # SslCerts Resource # SSL configuration. |
Bu Sun Kim | 4ed7d3f | 2020-05-27 12:20:54 -0700 | [diff] [blame^] | 2202 | "expirationTime": "A String", # The time when the certificate expires in <a |
| 2203 | # href="https://tools.ietf.org/html/rfc3339">RFC 3339</a> format, for example |
| 2204 | # <code>2012-11-15T16:19:00.094Z</code>. |
Bu Sun Kim | 6502091 | 2020-05-20 12:08:20 -0700 | [diff] [blame] | 2205 | "sha1Fingerprint": "A String", # Sha1 Fingerprint. |
| 2206 | "certSerialNumber": "A String", # Serial number, as extracted from the certificate. |
| 2207 | "cert": "A String", # PEM representation. |
| 2208 | "kind": "A String", # This is always <code>sql#sslCert</code>. |
| 2209 | "commonName": "A String", # User supplied name. Constrained to [a-zA-Z.-_ ]+. |
| 2210 | "createTime": "A String", # The time when the certificate was created in <a |
| 2211 | # href="https://tools.ietf.org/html/rfc3339">RFC 3339</a> format, for example |
| 2212 | # <code>2012-11-15T16:19:00.094Z</code> |
| 2213 | "instance": "A String", # Name of the database instance. |
| 2214 | "selfLink": "A String", # The URI of this resource. |
Bu Sun Kim | 6502091 | 2020-05-20 12:08:20 -0700 | [diff] [blame] | 2215 | }, |
| 2216 | "maxDiskSize": "A String", # The maximum disk size of the instance in bytes. |
| 2217 | "name": "A String", # Name of the Cloud SQL instance. This does not include the project ID. |
| 2218 | "masterInstanceName": "A String", # The name of the instance which will act as master in the replication setup. |
| 2219 | "instanceType": "A String", # The instance type. This can be one of the following. |
| 2220 | # <br><code>CLOUD_SQL_INSTANCE</code>: A Cloud SQL instance that is not |
| 2221 | # replicating from a master. <br><code>ON_PREMISES_INSTANCE</code>: An |
| 2222 | # instance running on the |
| 2223 | # customer's premises. <br><code>READ_REPLICA_INSTANCE</code>: A Cloud SQL |
| 2224 | # instance configured as a read-replica. |
| 2225 | "gceZone": "A String", # The Compute Engine zone that the instance is currently serving from. This |
| 2226 | # value could be different from the zone that was specified when the instance |
| 2227 | # was created if the instance has failed over to its secondary zone. |
| 2228 | "currentDiskSize": "A String", # The current disk usage of the instance in bytes. This property has been |
| 2229 | # deprecated. Users should use the |
| 2230 | # "cloudsql.googleapis.com/database/disk/bytes_used" metric in Cloud |
| 2231 | # Monitoring API instead. Please see <a |
| 2232 | # href="https://groups.google.com/d/msg/google-cloud-sql-announce/I_7-F9EBhT0/BtvFtdFeAgAJ">this |
| 2233 | # announcement</a> for details. |
| 2234 | "replicaConfiguration": { # Read-replica configuration for connecting to the master. # Configuration specific to failover replicas and read replicas. |
Bu Sun Kim | 4ed7d3f | 2020-05-27 12:20:54 -0700 | [diff] [blame^] | 2235 | "mysqlReplicaConfiguration": { # Read-replica configuration specific to MySQL databases. # MySQL specific configuration when replicating from a MySQL on-premises |
| 2236 | # master. Replication configuration information such as the username, |
| 2237 | # password, certificates, and keys are not stored in the instance metadata. |
| 2238 | # The configuration information is used only to set up the replication |
| 2239 | # connection and is stored by MySQL in a file named <code>master.info</code> |
| 2240 | # in the data directory. |
| 2241 | "password": "A String", # The password for the replication connection. |
| 2242 | "verifyServerCertificate": True or False, # Whether or not to check the master's Common Name value in the certificate |
| 2243 | # that it sends during the SSL handshake. |
| 2244 | "clientKey": "A String", # PEM representation of the slave's private key. The corresponsing public key |
| 2245 | # is encoded in the client's certificate. |
| 2246 | "sslCipher": "A String", # A list of permissible ciphers to use for SSL encryption. |
| 2247 | "masterHeartbeatPeriod": "A String", # Interval in milliseconds between replication heartbeats. |
| 2248 | "dumpFilePath": "A String", # Path to a SQL dump file in Google Cloud Storage from which the slave |
| 2249 | # instance is to be created. The URI is in the form gs: |
| 2250 | # //bucketName/fileName. Compressed gzip files (.gz) are also supported. |
| 2251 | # // Dumps should have the binlog co-ordinates from which replication should |
| 2252 | # // begin. This can be accomplished by setting --master-data to 1 when using |
| 2253 | # // mysqldump. |
| 2254 | "connectRetryInterval": 42, # Seconds to wait between connect retries. MySQL's default is 60 seconds. |
| 2255 | "clientCertificate": "A String", # PEM representation of the slave's x509 certificate. |
| 2256 | "username": "A String", # The username for the replication connection. |
| 2257 | "caCertificate": "A String", # PEM representation of the trusted CA's x509 certificate. |
| 2258 | "kind": "A String", # This is always <code>sql#mysqlReplicaConfiguration</code>. |
| 2259 | }, |
Bu Sun Kim | 6502091 | 2020-05-20 12:08:20 -0700 | [diff] [blame] | 2260 | "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] | 2261 | # <code>true</code> the replica will be designated as a failover replica. In |
| 2262 | # case the master instance fails, the replica instance will be promoted as |
| 2263 | # the new master instance. <p>Only one replica can be specified as failover |
| 2264 | # target, and the replica has to be in different zone with the master |
| 2265 | # instance. |
Bu Sun Kim | 6502091 | 2020-05-20 12:08:20 -0700 | [diff] [blame] | 2266 | "kind": "A String", # This is always <code>sql#replicaConfiguration</code>. |
Nathaniel Manista | 4f877e5 | 2015-06-15 16:44:50 +0000 | [diff] [blame] | 2267 | }, |
Bu Sun Kim | 6502091 | 2020-05-20 12:08:20 -0700 | [diff] [blame] | 2268 | "connectionName": "A String", # Connection name of the Cloud SQL instance used in connection strings. |
| 2269 | "failoverReplica": { # The name and status of the failover replica. This property is applicable |
| 2270 | # only to Second Generation instances. |
| 2271 | "available": True or False, # The availability status of the failover replica. A false status indicates |
| 2272 | # that the failover replica is out of sync. The master can only failover to |
| 2273 | # the failover replica when the status is true. |
| 2274 | "name": "A String", # The name of the failover replica. If specified at instance creation, a |
| 2275 | # failover replica is created for the instance. The name |
| 2276 | # doesn't include the project ID. This property is applicable only to |
| 2277 | # Second Generation instances. |
| 2278 | }, |
| 2279 | "ipAddresses": [ # The assigned IP addresses for the instance. |
| 2280 | { # Database instance IP Mapping. |
| 2281 | "timeToRetire": "A String", # The due time for this IP to be retired in <a |
| 2282 | # href="https://tools.ietf.org/html/rfc3339">RFC 3339</a> format, for example |
| 2283 | # <code>2012-11-15T16:19:00.094Z</code>. This field is only available when |
| 2284 | # the IP is scheduled to be retired. |
| 2285 | "type": "A String", # The type of this IP address. A <code>PRIMARY</code> address is a public |
| 2286 | # address that can accept incoming connections. A <code>PRIVATE</code> |
| 2287 | # address is a private address that can accept incoming connections. An |
| 2288 | # <code>OUTGOING</code> address is the source address of connections |
| 2289 | # originating from the instance, if supported. |
| 2290 | "ipAddress": "A String", # The IP address assigned. |
| 2291 | }, |
| 2292 | ], |
| 2293 | "ipv6Address": "A String", # The IPv6 address assigned to the instance. This property is applicable only |
| 2294 | # to First Generation instances. |
| 2295 | "selfLink": "A String", # The URI of this resource. |
| 2296 | "diskEncryptionStatus": { # Disk encryption status for an instance. # Disk encryption status specific to an instance. |
| 2297 | # Applies only to Second Generation instances. |
| 2298 | "kmsKeyVersionName": "A String", # KMS key version used to encrypt the Cloud SQL instance resource |
| 2299 | "kind": "A String", # This is always <code>sql#diskEncryptionStatus</code>. |
| 2300 | }, |
| 2301 | "kind": "A String", # This is always <code>sql#instance</code>. |
| 2302 | "region": "A String", # The geographical region. Can be <code>us-central</code> |
| 2303 | # (<code>FIRST_GEN</code> instances only), <code>us-central1</code> |
| 2304 | # (<code>SECOND_GEN</code> instances only), <code>asia-east1</code> or |
| 2305 | # <code>europe-west1</code>. Defaults to <code>us-central</code> or |
| 2306 | # <code>us-central1</code> depending on the instance type (First Generation |
| 2307 | # or Second Generation). The region can not be changed after instance |
| 2308 | # creation. |
| 2309 | "state": "A String", # The current serving state of the Cloud SQL instance. This can be one of the |
| 2310 | # following. <br><code>RUNNABLE</code>: The instance is running, or is ready |
| 2311 | # to run when accessed. <br><code>SUSPENDED</code>: The instance is not |
| 2312 | # available, for example due to problems with billing. |
| 2313 | # <br><code>PENDING_CREATE</code>: The instance is being created. |
| 2314 | # <br><code>MAINTENANCE</code>: The instance is down for maintenance. |
| 2315 | # <br><code>FAILED</code>: The instance creation failed. |
| 2316 | # <br><code>UNKNOWN_STATE</code>: The state of the instance is unknown. |
| 2317 | "backendType": "A String", # <code>FIRST_GEN</code>: First Generation instance. MySQL only. <br |
| 2318 | # /><code>SECOND_GEN</code>: Second Generation instance or PostgreSQL |
| 2319 | # instance. <br /><code>EXTERNAL</code>: A database server that is not |
| 2320 | # managed by Google. <br>This property is read-only; use the |
| 2321 | # <code>tier</code> property in the <code>settings</code> object to determine |
| 2322 | # the database type and Second or First Generation. |
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 | "certs": [ # List of server CA certificates for the instance. |
Bu Sun Kim | 715bd7f | 2019-06-14 16:50:42 -0700 | [diff] [blame] | 2357 | { # SslCerts Resource |
Bu Sun Kim | 4ed7d3f | 2020-05-27 12:20:54 -0700 | [diff] [blame^] | 2358 | "expirationTime": "A String", # The time when the certificate expires in <a |
| 2359 | # href="https://tools.ietf.org/html/rfc3339">RFC 3339</a> format, for example |
| 2360 | # <code>2012-11-15T16:19:00.094Z</code>. |
Bu Sun Kim | 6502091 | 2020-05-20 12:08:20 -0700 | [diff] [blame] | 2361 | "sha1Fingerprint": "A String", # Sha1 Fingerprint. |
| 2362 | "certSerialNumber": "A String", # Serial number, as extracted from the certificate. |
| 2363 | "cert": "A String", # PEM representation. |
| 2364 | "kind": "A String", # This is always <code>sql#sslCert</code>. |
| 2365 | "commonName": "A String", # User supplied name. Constrained to [a-zA-Z.-_ ]+. |
| 2366 | "createTime": "A String", # The time when the certificate was created in <a |
| 2367 | # 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] | 2368 | # <code>2012-11-15T16:19:00.094Z</code> |
Bu Sun Kim | 6502091 | 2020-05-20 12:08:20 -0700 | [diff] [blame] | 2369 | "instance": "A String", # Name of the database instance. |
| 2370 | "selfLink": "A String", # The URI of this resource. |
Bu Sun Kim | 715bd7f | 2019-06-14 16:50:42 -0700 | [diff] [blame] | 2371 | }, |
| 2372 | ], |
Bu Sun Kim | 4ed7d3f | 2020-05-27 12:20:54 -0700 | [diff] [blame^] | 2373 | "activeVersion": "A String", |
| 2374 | "kind": "A String", # This is always <code>sql#instancesListServerCas</code>. |
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 | 4ed7d3f | 2020-05-27 12:20:54 -0700 | [diff] [blame^] | 2404 | "onPremisesConfiguration": { # On-premises instance configuration. # Configuration specific to on-premises instances. |
| 2405 | "clientKey": "A String", # PEM representation of the slave's private key. The corresponsing public key |
| 2406 | # is encoded in the client's certificate. |
| 2407 | "dumpFilePath": "A String", # The dump file to create the Cloud SQL replica. |
| 2408 | "hostPort": "A String", # The host and port of the on-premises instance in host:port format |
| 2409 | "clientCertificate": "A String", # PEM representation of the slave's x509 certificate. |
| 2410 | "username": "A String", # The username for connecting to on-premises instance. |
| 2411 | "caCertificate": "A String", # PEM representation of the trusted CA's x509 certificate. |
| 2412 | "kind": "A String", # This is always <code>sql#onPremisesConfiguration</code>. |
| 2413 | "password": "A String", # The password for connecting to on-premises instance. |
| 2414 | }, |
| 2415 | "project": "A String", # The project ID of the project containing the Cloud SQL instance. The Google |
| 2416 | # apps domain is prefixed if applicable. |
| 2417 | "serviceAccountEmailAddress": "A String", # The service account email address assigned to the instance. This property |
| 2418 | # is applicable only to Second Generation instances. |
| 2419 | "databaseVersion": "A String", # The database engine type and version. The <code>databaseVersion</code> |
| 2420 | # field can not be changed after instance creation. MySQL Second Generation |
| 2421 | # instances: <code>MYSQL_5_7</code> (default) or <code>MYSQL_5_6</code>. |
| 2422 | # PostgreSQL instances: <code>POSTGRES_9_6</code> (default) or |
| 2423 | # <code>POSTGRES_11 Beta</code> MySQL First Generation |
| 2424 | # instances: <code>MYSQL_5_6</code> (default) or <code>MYSQL_5_5</code> |
Bu Sun Kim | 6502091 | 2020-05-20 12:08:20 -0700 | [diff] [blame] | 2425 | "suspensionReason": [ # If the instance state is SUSPENDED, the reason for the suspension. |
| 2426 | "A String", |
| 2427 | ], |
| 2428 | "settings": { # Database instance settings. # The user settings. |
Bu Sun Kim | 6502091 | 2020-05-20 12:08:20 -0700 | [diff] [blame] | 2429 | "pricingPlan": "A String", # The pricing plan for this instance. This can be either <code>PER_USE</code> |
| 2430 | # or <code>PACKAGE</code>. Only <code>PER_USE</code> is supported for Second |
| 2431 | # Generation instances. |
| 2432 | "storageAutoResize": True or False, # Configuration to increase storage size automatically. The default value is |
| 2433 | # true. Not used for First Generation instances. |
| 2434 | "storageAutoResizeLimit": "A String", # The maximum size to which storage capacity can be automatically increased. |
| 2435 | # The default value is 0, which specifies that there is no limit. Not used |
| 2436 | # for First Generation instances. |
| 2437 | "authorizedGaeApplications": [ # The App Engine app IDs that can access this instance. First Generation |
| 2438 | # instances only. |
| 2439 | "A String", |
| 2440 | ], |
| 2441 | "tier": "A String", # The tier (or machine type) for this instance, for example |
| 2442 | # <code>db-n1-standard-1</code> (MySQL instances) or |
| 2443 | # <code>db-custom-1-3840</code> (PostgreSQL instances). For MySQL instances, |
| 2444 | # this property determines whether the instance is First or Second |
| 2445 | # Generation. For more information, see <a |
| 2446 | # href="/sql/docs/db_path/instance-settings">Instance Settings</a>. |
| 2447 | "dataDiskSizeGb": "A String", # The size of data disk, in GB. The data disk size minimum is 10GB. Not used |
| 2448 | # for First Generation instances. |
| 2449 | "dataDiskType": "A String", # The type of data disk: <code>PD_SSD</code> (default) or |
| 2450 | # <code>PD_HDD</code>. Not used for First Generation instances. |
| 2451 | "databaseReplicationEnabled": True or False, # Configuration specific to read replica instances. Indicates whether |
| 2452 | # replication is enabled or not. |
| 2453 | "crashSafeReplicationEnabled": True or False, # Configuration specific to read replica instances. Indicates whether |
| 2454 | # database flags for crash-safe replication are enabled. This property is |
| 2455 | # only applicable to First Generation instances. |
| 2456 | "backupConfiguration": { # Database instance backup configuration. # The daily backup configuration for the instance. |
Bu Sun Kim | 6502091 | 2020-05-20 12:08:20 -0700 | [diff] [blame] | 2457 | "replicationLogArchivingEnabled": True or False, # Reserved for future use. |
| 2458 | "location": "A String", # Location of the backup |
| 2459 | "pointInTimeRecoveryEnabled": True or False, # Reserved for future use. |
| 2460 | "startTime": "A String", # Start time for the daily backup configuration in UTC timezone in the 24 |
| 2461 | # hour format - <code>HH:MM</code>. |
| 2462 | "kind": "A String", # This is always <code>sql#backupConfiguration</code>. |
| 2463 | "enabled": True or False, # Whether this configuration is enabled. |
Bu Sun Kim | 4ed7d3f | 2020-05-27 12:20:54 -0700 | [diff] [blame^] | 2464 | "binaryLogEnabled": True or False, # (MySQL only) Whether binary log is enabled. If backup configuration is |
| 2465 | # disabled, binarylog must be disabled as well. |
Bu Sun Kim | 6502091 | 2020-05-20 12:08:20 -0700 | [diff] [blame] | 2466 | }, |
| 2467 | "userLabels": { # User-provided labels, represented as a dictionary where each label is a |
| 2468 | # single key value pair. |
| 2469 | "a_key": "A String", |
| 2470 | }, |
Bu Sun Kim | 4ed7d3f | 2020-05-27 12:20:54 -0700 | [diff] [blame^] | 2471 | "replicationType": "A String", # The type of replication this instance uses. This can be either |
| 2472 | # <code>ASYNCHRONOUS</code> or <code>SYNCHRONOUS</code>. This property is |
| 2473 | # only applicable to First Generation instances. |
| 2474 | "kind": "A String", # This is always <code>sql#settings</code>. |
Bu Sun Kim | 6502091 | 2020-05-20 12:08:20 -0700 | [diff] [blame] | 2475 | "locationPreference": { # Preferred location. This specifies where a Cloud SQL instance should # The location preference settings. This allows the instance to be located as |
| 2476 | # near as possible to either an App Engine app or Compute Engine zone for |
| 2477 | # better performance. App Engine co-location is only applicable to First |
| 2478 | # Generation instances. |
| 2479 | # preferably be located, either in a specific Compute Engine zone, or |
| 2480 | # co-located with an App Engine application. Note that if the preferred |
| 2481 | # location is not available, the instance will be located as close as possible |
| 2482 | # within the region. Only one location may be specified. |
Bu Sun Kim | 4ed7d3f | 2020-05-27 12:20:54 -0700 | [diff] [blame^] | 2483 | "kind": "A String", # This is always <code>sql#locationPreference</code>. |
Bu Sun Kim | 6502091 | 2020-05-20 12:08:20 -0700 | [diff] [blame] | 2484 | "zone": "A String", # The preferred Compute Engine zone (e.g. us-central1-a, us-central1-b, |
| 2485 | # etc.). |
| 2486 | "followGaeApplication": "A String", # The AppEngine application to follow, it must be in the same region as the |
| 2487 | # Cloud SQL instance. |
Bu Sun Kim | 6502091 | 2020-05-20 12:08:20 -0700 | [diff] [blame] | 2488 | }, |
Bu Sun Kim | 6502091 | 2020-05-20 12:08:20 -0700 | [diff] [blame] | 2489 | "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] | 2490 | # applicable only when the instance state is <code>RUNNABLE</code>. Valid |
| 2491 | # values: <br><code>ALWAYS</code>: The instance is on, and remains so even in |
| 2492 | # the absence of connection requests. <br><code>NEVER</code>: The instance is |
| 2493 | # off; it is not activated, even if a connection request arrives. |
| 2494 | # <br><code>ON_DEMAND</code>: First Generation instances only. The instance |
| 2495 | # responds to incoming requests, and turns itself off when not in use. |
| 2496 | # Instances with <code>PER_USE</code> pricing turn off after 15 minutes of |
| 2497 | # inactivity. Instances with <code>PER_PACKAGE</code> pricing turn off after |
| 2498 | # 12 hours of inactivity. |
Bu Sun Kim | 4ed7d3f | 2020-05-27 12:20:54 -0700 | [diff] [blame^] | 2499 | "databaseFlags": [ # The database flags passed to the instance at startup. |
| 2500 | { # Database flags for Cloud SQL instances. |
| 2501 | "name": "A String", # The name of the flag. These flags are passed at instance startup, so |
| 2502 | # include both server options and system variables for MySQL. Flags should be |
| 2503 | # specified with underscores, not hyphens. For more information, see <a |
| 2504 | # href="/sql/docs/mysql/flags">Configuring Database Flags</a> in the Cloud |
| 2505 | # SQL documentation. |
| 2506 | "value": "A String", # The value of the flag. Booleans should be set to <code>on</code> for true |
| 2507 | # and <code>off</code> for false. This field must be omitted if the flag |
| 2508 | # doesn't take a value. |
| 2509 | }, |
| 2510 | ], |
| 2511 | "settingsVersion": "A String", # The version of instance settings. This is a required field for update |
| 2512 | # method to make sure concurrent updates are handled properly. During update, |
| 2513 | # use the most recent settingsVersion value for this instance and do not try |
| 2514 | # to update this value. |
| 2515 | "availabilityType": "A String", # Availability type (PostgreSQL and MySQL instances only). Potential values: |
| 2516 | # <br><code>ZONAL</code>: The instance serves data from only one zone. |
| 2517 | # Outages in that zone affect data accessibility. <br><code>REGIONAL</code>: |
| 2518 | # The instance can serve data from more than one zone in a region (it is |
| 2519 | # highly available). <br>For more information, see <a |
| 2520 | # href="https://cloud.google.com/sql/docs/postgres/high-availability">Overview |
| 2521 | # of the High Availability Configuration</a>. |
| 2522 | "ipConfiguration": { # IP Management configuration. # The settings for IP Management. This allows to enable or disable the |
| 2523 | # instance IP and manage which external networks can connect to the instance. |
| 2524 | # The IPv4 address cannot be disabled for Second Generation instances. |
| 2525 | "privateNetwork": "A String", # The resource link for the VPC network from which the Cloud SQL instance is |
| 2526 | # accessible for private IP. For example, |
| 2527 | # <code>/projects/myProject/global/networks/default</code>. This setting can |
| 2528 | # be updated, but it cannot be removed after it is set. |
| 2529 | "ipv4Enabled": True or False, # Whether the instance should be assigned an IP address or not. |
| 2530 | "authorizedNetworks": [ # The list of external networks that are allowed to connect to the instance |
| 2531 | # using the IP. In <a |
| 2532 | # href="http://en.wikipedia.org/wiki/CIDR_notation#CIDR_notation">CIDR |
| 2533 | # notation</a>, also known as 'slash' notation (e.g. |
| 2534 | # <code>192.168.100.0/24</code>). |
| 2535 | { # An entry for an Access Control list. |
| 2536 | "value": "A String", # The whitelisted value for the access control list. |
| 2537 | "expirationTime": "A String", # The time when this access control entry expires in <a |
| 2538 | # href="https://tools.ietf.org/html/rfc3339">RFC 3339</a> format, for example |
| 2539 | # <code>2012-11-15T16:19:00.094Z</code>. |
| 2540 | "name": "A String", # Optional. A label to identify this entry. |
| 2541 | "kind": "A String", # This is always <code>sql#aclEntry</code>. |
| 2542 | }, |
| 2543 | ], |
| 2544 | "requireSsl": True or False, # Whether SSL connections over IP should be enforced or not. |
| 2545 | }, |
| 2546 | "maintenanceWindow": { # Maintenance window. This specifies when a v2 Cloud SQL instance should # The maintenance window for this instance. This specifies when the instance |
| 2547 | # can be restarted for maintenance purposes. Not used for First Generation |
| 2548 | # instances. |
| 2549 | # preferably be restarted for system maintenance purposes. |
| 2550 | "updateTrack": "A String", # Maintenance timing setting: <code>canary</code> (Earlier) or |
| 2551 | # <code>stable</code> (Later). <br /><a |
| 2552 | # href="/sql/docs/db_path/instance-settings#maintenance-timing-2ndgen"> |
| 2553 | # Learn more</a>. |
| 2554 | "hour": 42, # hour of day - 0 to 23. |
| 2555 | "day": 42, # day of week (1-7), starting on Monday. |
| 2556 | "kind": "A String", # This is always <code>sql#maintenanceWindow</code>. |
| 2557 | }, |
Jon Wayne Parrott | 0a471d3 | 2016-05-19 10:54:38 -0700 | [diff] [blame] | 2558 | }, |
Bu Sun Kim | 6502091 | 2020-05-20 12:08:20 -0700 | [diff] [blame] | 2559 | "replicaNames": [ # The replicas of the instance. |
| 2560 | "A String", |
| 2561 | ], |
| 2562 | "diskEncryptionConfiguration": { # Disk encryption configuration for an instance. # Disk encryption configuration specific to an instance. |
| 2563 | # Applies only to Second Generation instances. |
| 2564 | "kind": "A String", # This is always <code>sql#diskEncryptionConfiguration</code>. |
| 2565 | "kmsKeyName": "A String", # Resource name of KMS key for disk encryption |
| 2566 | }, |
Bu Sun Kim | 4ed7d3f | 2020-05-27 12:20:54 -0700 | [diff] [blame^] | 2567 | "etag": "A String", # This field is deprecated and will be removed from a future version of the |
| 2568 | # API. Use the <code>settings.settingsVersion</code> field instead. |
| 2569 | "rootPassword": "A String", # Initial root password. Use only on creation. |
Bu Sun Kim | 6502091 | 2020-05-20 12:08:20 -0700 | [diff] [blame] | 2570 | "scheduledMaintenance": { # Any scheduled maintenancce for this instance. # The start time of any upcoming scheduled maintenance for this instance. |
| 2571 | "canDefer": True or False, |
| 2572 | "startTime": "A String", # The start time of any upcoming scheduled maintenance for this instance. |
| 2573 | "canReschedule": True or False, # If the scheduled maintenance can be rescheduled. |
| 2574 | }, |
Bu Sun Kim | 6502091 | 2020-05-20 12:08:20 -0700 | [diff] [blame] | 2575 | "serverCaCert": { # SslCerts Resource # SSL configuration. |
Bu Sun Kim | 4ed7d3f | 2020-05-27 12:20:54 -0700 | [diff] [blame^] | 2576 | "expirationTime": "A String", # The time when the certificate expires in <a |
| 2577 | # href="https://tools.ietf.org/html/rfc3339">RFC 3339</a> format, for example |
| 2578 | # <code>2012-11-15T16:19:00.094Z</code>. |
Bu Sun Kim | 6502091 | 2020-05-20 12:08:20 -0700 | [diff] [blame] | 2579 | "sha1Fingerprint": "A String", # Sha1 Fingerprint. |
| 2580 | "certSerialNumber": "A String", # Serial number, as extracted from the certificate. |
| 2581 | "cert": "A String", # PEM representation. |
| 2582 | "kind": "A String", # This is always <code>sql#sslCert</code>. |
| 2583 | "commonName": "A String", # User supplied name. Constrained to [a-zA-Z.-_ ]+. |
| 2584 | "createTime": "A String", # The time when the certificate was created in <a |
| 2585 | # href="https://tools.ietf.org/html/rfc3339">RFC 3339</a> format, for example |
| 2586 | # <code>2012-11-15T16:19:00.094Z</code> |
| 2587 | "instance": "A String", # Name of the database instance. |
| 2588 | "selfLink": "A String", # The URI of this resource. |
Bu Sun Kim | 6502091 | 2020-05-20 12:08:20 -0700 | [diff] [blame] | 2589 | }, |
| 2590 | "maxDiskSize": "A String", # The maximum disk size of the instance in bytes. |
| 2591 | "name": "A String", # Name of the Cloud SQL instance. This does not include the project ID. |
| 2592 | "masterInstanceName": "A String", # The name of the instance which will act as master in the replication setup. |
| 2593 | "instanceType": "A String", # The instance type. This can be one of the following. |
| 2594 | # <br><code>CLOUD_SQL_INSTANCE</code>: A Cloud SQL instance that is not |
| 2595 | # replicating from a master. <br><code>ON_PREMISES_INSTANCE</code>: An |
| 2596 | # instance running on the |
| 2597 | # customer's premises. <br><code>READ_REPLICA_INSTANCE</code>: A Cloud SQL |
| 2598 | # instance configured as a read-replica. |
| 2599 | "gceZone": "A String", # The Compute Engine zone that the instance is currently serving from. This |
| 2600 | # value could be different from the zone that was specified when the instance |
| 2601 | # was created if the instance has failed over to its secondary zone. |
| 2602 | "currentDiskSize": "A String", # The current disk usage of the instance in bytes. This property has been |
| 2603 | # deprecated. Users should use the |
| 2604 | # "cloudsql.googleapis.com/database/disk/bytes_used" metric in Cloud |
| 2605 | # Monitoring API instead. Please see <a |
| 2606 | # href="https://groups.google.com/d/msg/google-cloud-sql-announce/I_7-F9EBhT0/BtvFtdFeAgAJ">this |
| 2607 | # announcement</a> for details. |
| 2608 | "replicaConfiguration": { # Read-replica configuration for connecting to the master. # Configuration specific to failover replicas and read replicas. |
Bu Sun Kim | 4ed7d3f | 2020-05-27 12:20:54 -0700 | [diff] [blame^] | 2609 | "mysqlReplicaConfiguration": { # Read-replica configuration specific to MySQL databases. # MySQL specific configuration when replicating from a MySQL on-premises |
| 2610 | # master. Replication configuration information such as the username, |
| 2611 | # password, certificates, and keys are not stored in the instance metadata. |
| 2612 | # The configuration information is used only to set up the replication |
| 2613 | # connection and is stored by MySQL in a file named <code>master.info</code> |
| 2614 | # in the data directory. |
| 2615 | "password": "A String", # The password for the replication connection. |
| 2616 | "verifyServerCertificate": True or False, # Whether or not to check the master's Common Name value in the certificate |
| 2617 | # that it sends during the SSL handshake. |
| 2618 | "clientKey": "A String", # PEM representation of the slave's private key. The corresponsing public key |
| 2619 | # is encoded in the client's certificate. |
| 2620 | "sslCipher": "A String", # A list of permissible ciphers to use for SSL encryption. |
| 2621 | "masterHeartbeatPeriod": "A String", # Interval in milliseconds between replication heartbeats. |
| 2622 | "dumpFilePath": "A String", # Path to a SQL dump file in Google Cloud Storage from which the slave |
| 2623 | # instance is to be created. The URI is in the form gs: |
| 2624 | # //bucketName/fileName. Compressed gzip files (.gz) are also supported. |
| 2625 | # // Dumps should have the binlog co-ordinates from which replication should |
| 2626 | # // begin. This can be accomplished by setting --master-data to 1 when using |
| 2627 | # // mysqldump. |
| 2628 | "connectRetryInterval": 42, # Seconds to wait between connect retries. MySQL's default is 60 seconds. |
| 2629 | "clientCertificate": "A String", # PEM representation of the slave's x509 certificate. |
| 2630 | "username": "A String", # The username for the replication connection. |
| 2631 | "caCertificate": "A String", # PEM representation of the trusted CA's x509 certificate. |
| 2632 | "kind": "A String", # This is always <code>sql#mysqlReplicaConfiguration</code>. |
| 2633 | }, |
Bu Sun Kim | 6502091 | 2020-05-20 12:08:20 -0700 | [diff] [blame] | 2634 | "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] | 2635 | # <code>true</code> the replica will be designated as a failover replica. In |
| 2636 | # case the master instance fails, the replica instance will be promoted as |
| 2637 | # the new master instance. <p>Only one replica can be specified as failover |
| 2638 | # target, and the replica has to be in different zone with the master |
| 2639 | # instance. |
Bu Sun Kim | 6502091 | 2020-05-20 12:08:20 -0700 | [diff] [blame] | 2640 | "kind": "A String", # This is always <code>sql#replicaConfiguration</code>. |
Nathaniel Manista | 4f877e5 | 2015-06-15 16:44:50 +0000 | [diff] [blame] | 2641 | }, |
Bu Sun Kim | 6502091 | 2020-05-20 12:08:20 -0700 | [diff] [blame] | 2642 | "connectionName": "A String", # Connection name of the Cloud SQL instance used in connection strings. |
| 2643 | "failoverReplica": { # The name and status of the failover replica. This property is applicable |
| 2644 | # only to Second Generation instances. |
| 2645 | "available": True or False, # The availability status of the failover replica. A false status indicates |
| 2646 | # that the failover replica is out of sync. The master can only failover to |
| 2647 | # the failover replica when the status is true. |
| 2648 | "name": "A String", # The name of the failover replica. If specified at instance creation, a |
| 2649 | # failover replica is created for the instance. The name |
| 2650 | # doesn't include the project ID. This property is applicable only to |
| 2651 | # Second Generation instances. |
| 2652 | }, |
| 2653 | "ipAddresses": [ # The assigned IP addresses for the instance. |
| 2654 | { # Database instance IP Mapping. |
| 2655 | "timeToRetire": "A String", # The due time for this IP to be retired in <a |
| 2656 | # href="https://tools.ietf.org/html/rfc3339">RFC 3339</a> format, for example |
| 2657 | # <code>2012-11-15T16:19:00.094Z</code>. This field is only available when |
| 2658 | # the IP is scheduled to be retired. |
| 2659 | "type": "A String", # The type of this IP address. A <code>PRIMARY</code> address is a public |
| 2660 | # address that can accept incoming connections. A <code>PRIVATE</code> |
| 2661 | # address is a private address that can accept incoming connections. An |
| 2662 | # <code>OUTGOING</code> address is the source address of connections |
| 2663 | # originating from the instance, if supported. |
| 2664 | "ipAddress": "A String", # The IP address assigned. |
| 2665 | }, |
| 2666 | ], |
| 2667 | "ipv6Address": "A String", # The IPv6 address assigned to the instance. This property is applicable only |
| 2668 | # to First Generation instances. |
| 2669 | "selfLink": "A String", # The URI of this resource. |
| 2670 | "diskEncryptionStatus": { # Disk encryption status for an instance. # Disk encryption status specific to an instance. |
| 2671 | # Applies only to Second Generation instances. |
| 2672 | "kmsKeyVersionName": "A String", # KMS key version used to encrypt the Cloud SQL instance resource |
| 2673 | "kind": "A String", # This is always <code>sql#diskEncryptionStatus</code>. |
| 2674 | }, |
| 2675 | "kind": "A String", # This is always <code>sql#instance</code>. |
| 2676 | "region": "A String", # The geographical region. Can be <code>us-central</code> |
| 2677 | # (<code>FIRST_GEN</code> instances only), <code>us-central1</code> |
| 2678 | # (<code>SECOND_GEN</code> instances only), <code>asia-east1</code> or |
| 2679 | # <code>europe-west1</code>. Defaults to <code>us-central</code> or |
| 2680 | # <code>us-central1</code> depending on the instance type (First Generation |
| 2681 | # or Second Generation). The region can not be changed after instance |
| 2682 | # creation. |
| 2683 | "state": "A String", # The current serving state of the Cloud SQL instance. This can be one of the |
| 2684 | # following. <br><code>RUNNABLE</code>: The instance is running, or is ready |
| 2685 | # to run when accessed. <br><code>SUSPENDED</code>: The instance is not |
| 2686 | # available, for example due to problems with billing. |
| 2687 | # <br><code>PENDING_CREATE</code>: The instance is being created. |
| 2688 | # <br><code>MAINTENANCE</code>: The instance is down for maintenance. |
| 2689 | # <br><code>FAILED</code>: The instance creation failed. |
| 2690 | # <br><code>UNKNOWN_STATE</code>: The state of the instance is unknown. |
| 2691 | "backendType": "A String", # <code>FIRST_GEN</code>: First Generation instance. MySQL only. <br |
| 2692 | # /><code>SECOND_GEN</code>: Second Generation instance or PostgreSQL |
| 2693 | # instance. <br /><code>EXTERNAL</code>: A database server that is not |
| 2694 | # managed by Google. <br>This property is read-only; use the |
| 2695 | # <code>tier</code> property in the <code>settings</code> object to determine |
| 2696 | # the database type and Second or First Generation. |
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 | "targetLink": "A String", |
| 2711 | "operationType": "A String", # The type of the operation. Valid values are <code>CREATE</code>, |
| 2712 | # <code>DELETE</code>, <code>UPDATE</code>, <code>RESTART</code>, |
| 2713 | # <code>IMPORT</code>, <code>EXPORT</code>, <code>BACKUP_VOLUME</code>, |
| 2714 | # <code>RESTORE_VOLUME</code>, <code>CREATE_USER</code>, |
| 2715 | # <code>DELETE_USER</code>, <code>CREATE_DATABASE</code>, |
| 2716 | # <code>DELETE_DATABASE</code> . |
| 2717 | "error": { # Database instance operation errors list wrapper. # If errors occurred during processing of this operation, this field will be |
| 2718 | # populated. |
| 2719 | "errors": [ # The list of errors encountered while processing this operation. |
| 2720 | { # Database instance operation error. |
| 2721 | "kind": "A String", # This is always <code>sql#operationError</code>. |
| 2722 | "code": "A String", # Identifies the specific error that occurred. |
| 2723 | "message": "A String", # Additional information about the error encountered. |
Dan O'Meara | dd49464 | 2020-05-01 07:42:23 -0700 | [diff] [blame] | 2724 | }, |
Bu Sun Kim | 6502091 | 2020-05-20 12:08:20 -0700 | [diff] [blame] | 2725 | ], |
| 2726 | "kind": "A String", # This is always <code>sql#operationErrors</code>. |
| 2727 | }, |
| 2728 | "kind": "A String", # This is always <code>sql#operation</code>. |
| 2729 | "importContext": { # Database instance import context. # The context for import operation, if applicable. |
Bu Sun Kim | 6502091 | 2020-05-20 12:08:20 -0700 | [diff] [blame] | 2730 | "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] | 2731 | # <code>SQL</code>, this field is required only if the import file does not |
| 2732 | # specify a database, and is overridden by any database specification in the |
| 2733 | # import file. If <code>fileType</code> is <code>CSV</code>, one database |
| 2734 | # must be specified. |
Bu Sun Kim | 6502091 | 2020-05-20 12:08:20 -0700 | [diff] [blame] | 2735 | "importUser": "A String", # The PostgreSQL user for this import operation. PostgreSQL instances only. |
| 2736 | "bakImportOptions": { # Import parameters specific to SQL Server .BAK files |
| 2737 | "encryptionOptions": { |
Bu Sun Kim | 4ed7d3f | 2020-05-27 12:20:54 -0700 | [diff] [blame^] | 2738 | "pvkPassword": "A String", # Password that encrypts the private key |
Bu Sun Kim | 6502091 | 2020-05-20 12:08:20 -0700 | [diff] [blame] | 2739 | "certPath": "A String", # Path to the Certificate (.cer) in Cloud Storage, in the form |
| 2740 | # <code>gs://bucketName/fileName</code>. The instance must have |
| 2741 | # write permissions to the bucket and read access to the file. |
| 2742 | "pvkPath": "A String", # Path to the Certificate Private Key (.pvk) in Cloud Storage, in the |
| 2743 | # form <code>gs://bucketName/fileName</code>. The instance must have |
| 2744 | # write permissions to the bucket and read access to the file. |
Bu Sun Kim | 6502091 | 2020-05-20 12:08:20 -0700 | [diff] [blame] | 2745 | }, |
| 2746 | }, |
| 2747 | "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] | 2748 | # <code>gs: |
| 2749 | # //bucketName/fileName</code>. Compressed gzip files (.gz) are supported |
| 2750 | # // when <code>fileType</code> is <code>SQL</code>. The instance must have |
| 2751 | # // write permissions to the bucket and read access to the file. |
Bu Sun Kim | 6502091 | 2020-05-20 12:08:20 -0700 | [diff] [blame] | 2752 | "fileType": "A String", # The file type for the specified uri. <br><code>SQL</code>: The file |
| 2753 | # contains SQL statements. <br><code>CSV</code>: The file contains CSV data. |
Bu Sun Kim | 4ed7d3f | 2020-05-27 12:20:54 -0700 | [diff] [blame^] | 2754 | "kind": "A String", # This is always <code>sql#importContext</code>. |
| 2755 | "csvImportOptions": { # Options for importing data as CSV. |
| 2756 | "table": "A String", # The table to which CSV data is imported. |
| 2757 | "columns": [ # The columns to which CSV data is imported. If not specified, all columns |
| 2758 | # of the database table are loaded with CSV data. |
| 2759 | "A String", |
| 2760 | ], |
| 2761 | }, |
Craig Citro | e633be1 | 2015-03-02 13:40:36 -0800 | [diff] [blame] | 2762 | }, |
Bu Sun Kim | 6502091 | 2020-05-20 12:08:20 -0700 | [diff] [blame] | 2763 | "status": "A String", # The status of an operation. Valid values are <code>PENDING</code>, |
| 2764 | # <code>RUNNING</code>, <code>DONE</code>, |
| 2765 | # <code>SQL_OPERATION_STATUS_UNSPECIFIED</code>. |
| 2766 | "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] | 2767 | # identifier to retrieve the Operations resource that has information about |
| 2768 | # the operation. |
Bu Sun Kim | 6502091 | 2020-05-20 12:08:20 -0700 | [diff] [blame] | 2769 | "exportContext": { # Database instance export context. # The context for export operation, if applicable. |
Bu Sun Kim | 4ed7d3f | 2020-05-27 12:20:54 -0700 | [diff] [blame^] | 2770 | "fileType": "A String", # The file type for the specified uri. <br><code>SQL</code>: The file |
| 2771 | # contains SQL statements. <br><code>CSV</code>: The file contains CSV data. |
| 2772 | "uri": "A String", # The path to the file in Google Cloud Storage where the export will be |
| 2773 | # stored. The URI is in the form <code>gs: |
| 2774 | # //bucketName/fileName</code>. If the file already exists, the requests |
| 2775 | # // succeeds, but the operation fails. If <code>fileType</code> is |
| 2776 | # // <code>SQL</code> and the filename ends with .gz, the contents are |
| 2777 | # // compressed. |
| 2778 | "csvExportOptions": { # Options for exporting data as CSV. |
| 2779 | "selectQuery": "A String", # The select query used to extract the data. |
| 2780 | }, |
| 2781 | "kind": "A String", # This is always <code>sql#exportContext</code>. |
Bu Sun Kim | 6502091 | 2020-05-20 12:08:20 -0700 | [diff] [blame] | 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 | }, |
| 2810 | }, |
Bu Sun Kim | 6502091 | 2020-05-20 12:08:20 -0700 | [diff] [blame] | 2811 | "targetId": "A String", # Name of the database instance related to this operation. |
Bu Sun Kim | 4ed7d3f | 2020-05-27 12:20:54 -0700 | [diff] [blame^] | 2812 | "endTime": "A String", # The time this operation finished in UTC timezone in <a |
| 2813 | # href="https://tools.ietf.org/html/rfc3339">RFC 3339</a> format, for example |
| 2814 | # <code>2012-11-15T16:19:00.094Z</code>. |
| 2815 | "startTime": "A String", # The time this operation actually started in UTC timezone in <a |
| 2816 | # href="https://tools.ietf.org/html/rfc3339">RFC 3339</a> format, for example |
| 2817 | # <code>2012-11-15T16:19:00.094Z</code>. |
| 2818 | "insertTime": "A String", # The time this operation was enqueued in UTC timezone in <a |
| 2819 | # href="https://tools.ietf.org/html/rfc3339">RFC 3339</a> format, for example |
| 2820 | # <code>2012-11-15T16:19:00.094Z</code>. |
| 2821 | "user": "A String", # The email address of the user who initiated this operation. |
| 2822 | "targetProject": "A String", # The project ID of the target instance related to this operation. |
| 2823 | "selfLink": "A String", # The URI of this resource. |
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 | "targetLink": "A String", |
| 2847 | "operationType": "A String", # The type of the operation. Valid values are <code>CREATE</code>, |
| 2848 | # <code>DELETE</code>, <code>UPDATE</code>, <code>RESTART</code>, |
| 2849 | # <code>IMPORT</code>, <code>EXPORT</code>, <code>BACKUP_VOLUME</code>, |
| 2850 | # <code>RESTORE_VOLUME</code>, <code>CREATE_USER</code>, |
| 2851 | # <code>DELETE_USER</code>, <code>CREATE_DATABASE</code>, |
| 2852 | # <code>DELETE_DATABASE</code> . |
| 2853 | "error": { # Database instance operation errors list wrapper. # If errors occurred during processing of this operation, this field will be |
| 2854 | # populated. |
| 2855 | "errors": [ # The list of errors encountered while processing this operation. |
| 2856 | { # Database instance operation error. |
| 2857 | "kind": "A String", # This is always <code>sql#operationError</code>. |
| 2858 | "code": "A String", # Identifies the specific error that occurred. |
| 2859 | "message": "A String", # Additional information about the error encountered. |
Dan O'Meara | dd49464 | 2020-05-01 07:42:23 -0700 | [diff] [blame] | 2860 | }, |
Bu Sun Kim | 6502091 | 2020-05-20 12:08:20 -0700 | [diff] [blame] | 2861 | ], |
| 2862 | "kind": "A String", # This is always <code>sql#operationErrors</code>. |
| 2863 | }, |
| 2864 | "kind": "A String", # This is always <code>sql#operation</code>. |
| 2865 | "importContext": { # Database instance import context. # The context for import operation, if applicable. |
Bu Sun Kim | 6502091 | 2020-05-20 12:08:20 -0700 | [diff] [blame] | 2866 | "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] | 2867 | # <code>SQL</code>, this field is required only if the import file does not |
| 2868 | # specify a database, and is overridden by any database specification in the |
| 2869 | # import file. If <code>fileType</code> is <code>CSV</code>, one database |
| 2870 | # must be specified. |
Bu Sun Kim | 6502091 | 2020-05-20 12:08:20 -0700 | [diff] [blame] | 2871 | "importUser": "A String", # The PostgreSQL user for this import operation. PostgreSQL instances only. |
| 2872 | "bakImportOptions": { # Import parameters specific to SQL Server .BAK files |
| 2873 | "encryptionOptions": { |
Bu Sun Kim | 4ed7d3f | 2020-05-27 12:20:54 -0700 | [diff] [blame^] | 2874 | "pvkPassword": "A String", # Password that encrypts the private key |
Bu Sun Kim | 6502091 | 2020-05-20 12:08:20 -0700 | [diff] [blame] | 2875 | "certPath": "A String", # Path to the Certificate (.cer) in Cloud Storage, in the form |
| 2876 | # <code>gs://bucketName/fileName</code>. The instance must have |
| 2877 | # write permissions to the bucket and read access to the file. |
| 2878 | "pvkPath": "A String", # Path to the Certificate Private Key (.pvk) in Cloud Storage, in the |
| 2879 | # form <code>gs://bucketName/fileName</code>. The instance must have |
| 2880 | # write permissions to the bucket and read access to the file. |
Bu Sun Kim | 6502091 | 2020-05-20 12:08:20 -0700 | [diff] [blame] | 2881 | }, |
| 2882 | }, |
| 2883 | "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] | 2884 | # <code>gs: |
| 2885 | # //bucketName/fileName</code>. Compressed gzip files (.gz) are supported |
| 2886 | # // when <code>fileType</code> is <code>SQL</code>. The instance must have |
| 2887 | # // write permissions to the bucket and read access to the file. |
Bu Sun Kim | 6502091 | 2020-05-20 12:08:20 -0700 | [diff] [blame] | 2888 | "fileType": "A String", # The file type for the specified uri. <br><code>SQL</code>: The file |
| 2889 | # contains SQL statements. <br><code>CSV</code>: The file contains CSV data. |
Bu Sun Kim | 4ed7d3f | 2020-05-27 12:20:54 -0700 | [diff] [blame^] | 2890 | "kind": "A String", # This is always <code>sql#importContext</code>. |
| 2891 | "csvImportOptions": { # Options for importing data as CSV. |
| 2892 | "table": "A String", # The table to which CSV data is imported. |
| 2893 | "columns": [ # The columns to which CSV data is imported. If not specified, all columns |
| 2894 | # of the database table are loaded with CSV data. |
| 2895 | "A String", |
| 2896 | ], |
| 2897 | }, |
Craig Citro | e633be1 | 2015-03-02 13:40:36 -0800 | [diff] [blame] | 2898 | }, |
Bu Sun Kim | 6502091 | 2020-05-20 12:08:20 -0700 | [diff] [blame] | 2899 | "status": "A String", # The status of an operation. Valid values are <code>PENDING</code>, |
| 2900 | # <code>RUNNING</code>, <code>DONE</code>, |
| 2901 | # <code>SQL_OPERATION_STATUS_UNSPECIFIED</code>. |
| 2902 | "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] | 2903 | # identifier to retrieve the Operations resource that has information about |
| 2904 | # the operation. |
Bu Sun Kim | 6502091 | 2020-05-20 12:08:20 -0700 | [diff] [blame] | 2905 | "exportContext": { # Database instance export context. # The context for export operation, if applicable. |
Bu Sun Kim | 4ed7d3f | 2020-05-27 12:20:54 -0700 | [diff] [blame^] | 2906 | "fileType": "A String", # The file type for the specified uri. <br><code>SQL</code>: The file |
| 2907 | # contains SQL statements. <br><code>CSV</code>: The file contains CSV data. |
| 2908 | "uri": "A String", # The path to the file in Google Cloud Storage where the export will be |
| 2909 | # stored. The URI is in the form <code>gs: |
| 2910 | # //bucketName/fileName</code>. If the file already exists, the requests |
| 2911 | # // succeeds, but the operation fails. If <code>fileType</code> is |
| 2912 | # // <code>SQL</code> and the filename ends with .gz, the contents are |
| 2913 | # // compressed. |
| 2914 | "csvExportOptions": { # Options for exporting data as CSV. |
| 2915 | "selectQuery": "A String", # The select query used to extract the data. |
| 2916 | }, |
| 2917 | "kind": "A String", # This is always <code>sql#exportContext</code>. |
Bu Sun Kim | 6502091 | 2020-05-20 12:08:20 -0700 | [diff] [blame] | 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 | }, |
| 2946 | }, |
Bu Sun Kim | 6502091 | 2020-05-20 12:08:20 -0700 | [diff] [blame] | 2947 | "targetId": "A String", # Name of the database instance related to this operation. |
Bu Sun Kim | 4ed7d3f | 2020-05-27 12:20:54 -0700 | [diff] [blame^] | 2948 | "endTime": "A String", # The time this operation finished in UTC timezone in <a |
| 2949 | # href="https://tools.ietf.org/html/rfc3339">RFC 3339</a> format, for example |
| 2950 | # <code>2012-11-15T16:19:00.094Z</code>. |
| 2951 | "startTime": "A String", # The time this operation actually started in UTC timezone in <a |
| 2952 | # href="https://tools.ietf.org/html/rfc3339">RFC 3339</a> format, for example |
| 2953 | # <code>2012-11-15T16:19:00.094Z</code>. |
| 2954 | "insertTime": "A String", # The time this operation was enqueued in UTC timezone in <a |
| 2955 | # href="https://tools.ietf.org/html/rfc3339">RFC 3339</a> format, for example |
| 2956 | # <code>2012-11-15T16:19:00.094Z</code>. |
| 2957 | "user": "A String", # The email address of the user who initiated this operation. |
| 2958 | "targetProject": "A String", # The project ID of the target instance related to this operation. |
| 2959 | "selfLink": "A String", # The URI of this resource. |
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 | "targetLink": "A String", |
| 2983 | "operationType": "A String", # The type of the operation. Valid values are <code>CREATE</code>, |
| 2984 | # <code>DELETE</code>, <code>UPDATE</code>, <code>RESTART</code>, |
| 2985 | # <code>IMPORT</code>, <code>EXPORT</code>, <code>BACKUP_VOLUME</code>, |
| 2986 | # <code>RESTORE_VOLUME</code>, <code>CREATE_USER</code>, |
| 2987 | # <code>DELETE_USER</code>, <code>CREATE_DATABASE</code>, |
| 2988 | # <code>DELETE_DATABASE</code> . |
| 2989 | "error": { # Database instance operation errors list wrapper. # If errors occurred during processing of this operation, this field will be |
| 2990 | # populated. |
| 2991 | "errors": [ # The list of errors encountered while processing this operation. |
| 2992 | { # Database instance operation error. |
| 2993 | "kind": "A String", # This is always <code>sql#operationError</code>. |
| 2994 | "code": "A String", # Identifies the specific error that occurred. |
| 2995 | "message": "A String", # Additional information about the error encountered. |
Dan O'Meara | dd49464 | 2020-05-01 07:42:23 -0700 | [diff] [blame] | 2996 | }, |
Bu Sun Kim | 6502091 | 2020-05-20 12:08:20 -0700 | [diff] [blame] | 2997 | ], |
| 2998 | "kind": "A String", # This is always <code>sql#operationErrors</code>. |
| 2999 | }, |
| 3000 | "kind": "A String", # This is always <code>sql#operation</code>. |
| 3001 | "importContext": { # Database instance import context. # The context for import operation, if applicable. |
Bu Sun Kim | 6502091 | 2020-05-20 12:08:20 -0700 | [diff] [blame] | 3002 | "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] | 3003 | # <code>SQL</code>, this field is required only if the import file does not |
| 3004 | # specify a database, and is overridden by any database specification in the |
| 3005 | # import file. If <code>fileType</code> is <code>CSV</code>, one database |
| 3006 | # must be specified. |
Bu Sun Kim | 6502091 | 2020-05-20 12:08:20 -0700 | [diff] [blame] | 3007 | "importUser": "A String", # The PostgreSQL user for this import operation. PostgreSQL instances only. |
| 3008 | "bakImportOptions": { # Import parameters specific to SQL Server .BAK files |
| 3009 | "encryptionOptions": { |
Bu Sun Kim | 4ed7d3f | 2020-05-27 12:20:54 -0700 | [diff] [blame^] | 3010 | "pvkPassword": "A String", # Password that encrypts the private key |
Bu Sun Kim | 6502091 | 2020-05-20 12:08:20 -0700 | [diff] [blame] | 3011 | "certPath": "A String", # Path to the Certificate (.cer) in Cloud Storage, in the form |
| 3012 | # <code>gs://bucketName/fileName</code>. The instance must have |
| 3013 | # write permissions to the bucket and read access to the file. |
| 3014 | "pvkPath": "A String", # Path to the Certificate Private Key (.pvk) in Cloud Storage, in the |
| 3015 | # form <code>gs://bucketName/fileName</code>. The instance must have |
| 3016 | # write permissions to the bucket and read access to the file. |
Bu Sun Kim | 6502091 | 2020-05-20 12:08:20 -0700 | [diff] [blame] | 3017 | }, |
| 3018 | }, |
| 3019 | "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] | 3020 | # <code>gs: |
| 3021 | # //bucketName/fileName</code>. Compressed gzip files (.gz) are supported |
| 3022 | # // when <code>fileType</code> is <code>SQL</code>. The instance must have |
| 3023 | # // write permissions to the bucket and read access to the file. |
Bu Sun Kim | 6502091 | 2020-05-20 12:08:20 -0700 | [diff] [blame] | 3024 | "fileType": "A String", # The file type for the specified uri. <br><code>SQL</code>: The file |
| 3025 | # contains SQL statements. <br><code>CSV</code>: The file contains CSV data. |
Bu Sun Kim | 4ed7d3f | 2020-05-27 12:20:54 -0700 | [diff] [blame^] | 3026 | "kind": "A String", # This is always <code>sql#importContext</code>. |
| 3027 | "csvImportOptions": { # Options for importing data as CSV. |
| 3028 | "table": "A String", # The table to which CSV data is imported. |
| 3029 | "columns": [ # The columns to which CSV data is imported. If not specified, all columns |
| 3030 | # of the database table are loaded with CSV data. |
| 3031 | "A String", |
| 3032 | ], |
| 3033 | }, |
Craig Citro | e633be1 | 2015-03-02 13:40:36 -0800 | [diff] [blame] | 3034 | }, |
Bu Sun Kim | 6502091 | 2020-05-20 12:08:20 -0700 | [diff] [blame] | 3035 | "status": "A String", # The status of an operation. Valid values are <code>PENDING</code>, |
| 3036 | # <code>RUNNING</code>, <code>DONE</code>, |
| 3037 | # <code>SQL_OPERATION_STATUS_UNSPECIFIED</code>. |
| 3038 | "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] | 3039 | # identifier to retrieve the Operations resource that has information about |
| 3040 | # the operation. |
Bu Sun Kim | 6502091 | 2020-05-20 12:08:20 -0700 | [diff] [blame] | 3041 | "exportContext": { # Database instance export context. # The context for export operation, if applicable. |
Bu Sun Kim | 4ed7d3f | 2020-05-27 12:20:54 -0700 | [diff] [blame^] | 3042 | "fileType": "A String", # The file type for the specified uri. <br><code>SQL</code>: The file |
| 3043 | # contains SQL statements. <br><code>CSV</code>: The file contains CSV data. |
| 3044 | "uri": "A String", # The path to the file in Google Cloud Storage where the export will be |
| 3045 | # stored. The URI is in the form <code>gs: |
| 3046 | # //bucketName/fileName</code>. If the file already exists, the requests |
| 3047 | # // succeeds, but the operation fails. If <code>fileType</code> is |
| 3048 | # // <code>SQL</code> and the filename ends with .gz, the contents are |
| 3049 | # // compressed. |
| 3050 | "csvExportOptions": { # Options for exporting data as CSV. |
| 3051 | "selectQuery": "A String", # The select query used to extract the data. |
| 3052 | }, |
| 3053 | "kind": "A String", # This is always <code>sql#exportContext</code>. |
Bu Sun Kim | 6502091 | 2020-05-20 12:08:20 -0700 | [diff] [blame] | 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 | }, |
| 3082 | }, |
Bu Sun Kim | 6502091 | 2020-05-20 12:08:20 -0700 | [diff] [blame] | 3083 | "targetId": "A String", # Name of the database instance related to this operation. |
Bu Sun Kim | 4ed7d3f | 2020-05-27 12:20:54 -0700 | [diff] [blame^] | 3084 | "endTime": "A String", # The time this operation finished in UTC timezone in <a |
| 3085 | # href="https://tools.ietf.org/html/rfc3339">RFC 3339</a> format, for example |
| 3086 | # <code>2012-11-15T16:19:00.094Z</code>. |
| 3087 | "startTime": "A String", # The time this operation actually started in UTC timezone in <a |
| 3088 | # href="https://tools.ietf.org/html/rfc3339">RFC 3339</a> format, for example |
| 3089 | # <code>2012-11-15T16:19:00.094Z</code>. |
| 3090 | "insertTime": "A String", # The time this operation was enqueued in UTC timezone in <a |
| 3091 | # href="https://tools.ietf.org/html/rfc3339">RFC 3339</a> format, for example |
| 3092 | # <code>2012-11-15T16:19:00.094Z</code>. |
| 3093 | "user": "A String", # The email address of the user who initiated this operation. |
| 3094 | "targetProject": "A String", # The project ID of the target instance related to this operation. |
| 3095 | "selfLink": "A String", # The URI of this resource. |
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 | "targetLink": "A String", |
| 3118 | "operationType": "A String", # The type of the operation. Valid values are <code>CREATE</code>, |
| 3119 | # <code>DELETE</code>, <code>UPDATE</code>, <code>RESTART</code>, |
| 3120 | # <code>IMPORT</code>, <code>EXPORT</code>, <code>BACKUP_VOLUME</code>, |
| 3121 | # <code>RESTORE_VOLUME</code>, <code>CREATE_USER</code>, |
| 3122 | # <code>DELETE_USER</code>, <code>CREATE_DATABASE</code>, |
| 3123 | # <code>DELETE_DATABASE</code> . |
| 3124 | "error": { # Database instance operation errors list wrapper. # If errors occurred during processing of this operation, this field will be |
| 3125 | # populated. |
| 3126 | "errors": [ # The list of errors encountered while processing this operation. |
| 3127 | { # Database instance operation error. |
| 3128 | "kind": "A String", # This is always <code>sql#operationError</code>. |
| 3129 | "code": "A String", # Identifies the specific error that occurred. |
| 3130 | "message": "A String", # Additional information about the error encountered. |
Dan O'Meara | dd49464 | 2020-05-01 07:42:23 -0700 | [diff] [blame] | 3131 | }, |
Bu Sun Kim | 6502091 | 2020-05-20 12:08:20 -0700 | [diff] [blame] | 3132 | ], |
| 3133 | "kind": "A String", # This is always <code>sql#operationErrors</code>. |
| 3134 | }, |
| 3135 | "kind": "A String", # This is always <code>sql#operation</code>. |
| 3136 | "importContext": { # Database instance import context. # The context for import operation, if applicable. |
Bu Sun Kim | 6502091 | 2020-05-20 12:08:20 -0700 | [diff] [blame] | 3137 | "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] | 3138 | # <code>SQL</code>, this field is required only if the import file does not |
| 3139 | # specify a database, and is overridden by any database specification in the |
| 3140 | # import file. If <code>fileType</code> is <code>CSV</code>, one database |
| 3141 | # must be specified. |
Bu Sun Kim | 6502091 | 2020-05-20 12:08:20 -0700 | [diff] [blame] | 3142 | "importUser": "A String", # The PostgreSQL user for this import operation. PostgreSQL instances only. |
| 3143 | "bakImportOptions": { # Import parameters specific to SQL Server .BAK files |
| 3144 | "encryptionOptions": { |
Bu Sun Kim | 4ed7d3f | 2020-05-27 12:20:54 -0700 | [diff] [blame^] | 3145 | "pvkPassword": "A String", # Password that encrypts the private key |
Bu Sun Kim | 6502091 | 2020-05-20 12:08:20 -0700 | [diff] [blame] | 3146 | "certPath": "A String", # Path to the Certificate (.cer) in Cloud Storage, in the form |
| 3147 | # <code>gs://bucketName/fileName</code>. The instance must have |
| 3148 | # write permissions to the bucket and read access to the file. |
| 3149 | "pvkPath": "A String", # Path to the Certificate Private Key (.pvk) in Cloud Storage, in the |
| 3150 | # form <code>gs://bucketName/fileName</code>. The instance must have |
| 3151 | # write permissions to the bucket and read access to the file. |
Bu Sun Kim | 6502091 | 2020-05-20 12:08:20 -0700 | [diff] [blame] | 3152 | }, |
| 3153 | }, |
| 3154 | "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] | 3155 | # <code>gs: |
| 3156 | # //bucketName/fileName</code>. Compressed gzip files (.gz) are supported |
| 3157 | # // when <code>fileType</code> is <code>SQL</code>. The instance must have |
| 3158 | # // write permissions to the bucket and read access to the file. |
Bu Sun Kim | 6502091 | 2020-05-20 12:08:20 -0700 | [diff] [blame] | 3159 | "fileType": "A String", # The file type for the specified uri. <br><code>SQL</code>: The file |
| 3160 | # contains SQL statements. <br><code>CSV</code>: The file contains CSV data. |
Bu Sun Kim | 4ed7d3f | 2020-05-27 12:20:54 -0700 | [diff] [blame^] | 3161 | "kind": "A String", # This is always <code>sql#importContext</code>. |
| 3162 | "csvImportOptions": { # Options for importing data as CSV. |
| 3163 | "table": "A String", # The table to which CSV data is imported. |
| 3164 | "columns": [ # The columns to which CSV data is imported. If not specified, all columns |
| 3165 | # of the database table are loaded with CSV data. |
| 3166 | "A String", |
| 3167 | ], |
| 3168 | }, |
Craig Citro | e633be1 | 2015-03-02 13:40:36 -0800 | [diff] [blame] | 3169 | }, |
Bu Sun Kim | 6502091 | 2020-05-20 12:08:20 -0700 | [diff] [blame] | 3170 | "status": "A String", # The status of an operation. Valid values are <code>PENDING</code>, |
| 3171 | # <code>RUNNING</code>, <code>DONE</code>, |
| 3172 | # <code>SQL_OPERATION_STATUS_UNSPECIFIED</code>. |
| 3173 | "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] | 3174 | # identifier to retrieve the Operations resource that has information about |
| 3175 | # the operation. |
Bu Sun Kim | 6502091 | 2020-05-20 12:08:20 -0700 | [diff] [blame] | 3176 | "exportContext": { # Database instance export context. # The context for export operation, if applicable. |
Bu Sun Kim | 4ed7d3f | 2020-05-27 12:20:54 -0700 | [diff] [blame^] | 3177 | "fileType": "A String", # The file type for the specified uri. <br><code>SQL</code>: The file |
| 3178 | # contains SQL statements. <br><code>CSV</code>: The file contains CSV data. |
| 3179 | "uri": "A String", # The path to the file in Google Cloud Storage where the export will be |
| 3180 | # stored. The URI is in the form <code>gs: |
| 3181 | # //bucketName/fileName</code>. If the file already exists, the requests |
| 3182 | # // succeeds, but the operation fails. If <code>fileType</code> is |
| 3183 | # // <code>SQL</code> and the filename ends with .gz, the contents are |
| 3184 | # // compressed. |
| 3185 | "csvExportOptions": { # Options for exporting data as CSV. |
| 3186 | "selectQuery": "A String", # The select query used to extract the data. |
| 3187 | }, |
| 3188 | "kind": "A String", # This is always <code>sql#exportContext</code>. |
Bu Sun Kim | 6502091 | 2020-05-20 12:08:20 -0700 | [diff] [blame] | 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 | }, |
| 3217 | }, |
Bu Sun Kim | 6502091 | 2020-05-20 12:08:20 -0700 | [diff] [blame] | 3218 | "targetId": "A String", # Name of the database instance related to this operation. |
Bu Sun Kim | 4ed7d3f | 2020-05-27 12:20:54 -0700 | [diff] [blame^] | 3219 | "endTime": "A String", # The time this operation finished in UTC timezone in <a |
| 3220 | # href="https://tools.ietf.org/html/rfc3339">RFC 3339</a> format, for example |
| 3221 | # <code>2012-11-15T16:19:00.094Z</code>. |
| 3222 | "startTime": "A String", # The time this operation actually started in UTC timezone in <a |
| 3223 | # href="https://tools.ietf.org/html/rfc3339">RFC 3339</a> format, for example |
| 3224 | # <code>2012-11-15T16:19:00.094Z</code>. |
| 3225 | "insertTime": "A String", # The time this operation was enqueued in UTC timezone in <a |
| 3226 | # href="https://tools.ietf.org/html/rfc3339">RFC 3339</a> format, for example |
| 3227 | # <code>2012-11-15T16:19:00.094Z</code>. |
| 3228 | "user": "A String", # The email address of the user who initiated this operation. |
| 3229 | "targetProject": "A String", # The project ID of the target instance related to this operation. |
| 3230 | "selfLink": "A String", # The URI of this resource. |
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 | "project": "A String", # The full project ID of the source instance. |
| 3249 | "backupRunId": "A String", # The ID of the backup run to restore from. |
| 3250 | "instanceId": "A String", # The ID of the instance that the backup was taken from. |
Bu Sun Kim | 4ed7d3f | 2020-05-27 12:20:54 -0700 | [diff] [blame^] | 3251 | "kind": "A String", # This is always <code>sql#restoreBackupContext</code>. |
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 | "targetLink": "A String", |
| 3267 | "operationType": "A String", # The type of the operation. Valid values are <code>CREATE</code>, |
| 3268 | # <code>DELETE</code>, <code>UPDATE</code>, <code>RESTART</code>, |
| 3269 | # <code>IMPORT</code>, <code>EXPORT</code>, <code>BACKUP_VOLUME</code>, |
| 3270 | # <code>RESTORE_VOLUME</code>, <code>CREATE_USER</code>, |
| 3271 | # <code>DELETE_USER</code>, <code>CREATE_DATABASE</code>, |
| 3272 | # <code>DELETE_DATABASE</code> . |
| 3273 | "error": { # Database instance operation errors list wrapper. # If errors occurred during processing of this operation, this field will be |
| 3274 | # populated. |
| 3275 | "errors": [ # The list of errors encountered while processing this operation. |
| 3276 | { # Database instance operation error. |
| 3277 | "kind": "A String", # This is always <code>sql#operationError</code>. |
| 3278 | "code": "A String", # Identifies the specific error that occurred. |
| 3279 | "message": "A String", # Additional information about the error encountered. |
Dan O'Meara | dd49464 | 2020-05-01 07:42:23 -0700 | [diff] [blame] | 3280 | }, |
Bu Sun Kim | 6502091 | 2020-05-20 12:08:20 -0700 | [diff] [blame] | 3281 | ], |
| 3282 | "kind": "A String", # This is always <code>sql#operationErrors</code>. |
| 3283 | }, |
| 3284 | "kind": "A String", # This is always <code>sql#operation</code>. |
| 3285 | "importContext": { # Database instance import context. # The context for import operation, if applicable. |
Bu Sun Kim | 6502091 | 2020-05-20 12:08:20 -0700 | [diff] [blame] | 3286 | "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] | 3287 | # <code>SQL</code>, this field is required only if the import file does not |
| 3288 | # specify a database, and is overridden by any database specification in the |
| 3289 | # import file. If <code>fileType</code> is <code>CSV</code>, one database |
| 3290 | # must be specified. |
Bu Sun Kim | 6502091 | 2020-05-20 12:08:20 -0700 | [diff] [blame] | 3291 | "importUser": "A String", # The PostgreSQL user for this import operation. PostgreSQL instances only. |
| 3292 | "bakImportOptions": { # Import parameters specific to SQL Server .BAK files |
| 3293 | "encryptionOptions": { |
Bu Sun Kim | 4ed7d3f | 2020-05-27 12:20:54 -0700 | [diff] [blame^] | 3294 | "pvkPassword": "A String", # Password that encrypts the private key |
Bu Sun Kim | 6502091 | 2020-05-20 12:08:20 -0700 | [diff] [blame] | 3295 | "certPath": "A String", # Path to the Certificate (.cer) in Cloud Storage, in the form |
| 3296 | # <code>gs://bucketName/fileName</code>. The instance must have |
| 3297 | # write permissions to the bucket and read access to the file. |
| 3298 | "pvkPath": "A String", # Path to the Certificate Private Key (.pvk) in Cloud Storage, in the |
| 3299 | # form <code>gs://bucketName/fileName</code>. The instance must have |
| 3300 | # write permissions to the bucket and read access to the file. |
Bu Sun Kim | 6502091 | 2020-05-20 12:08:20 -0700 | [diff] [blame] | 3301 | }, |
| 3302 | }, |
| 3303 | "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] | 3304 | # <code>gs: |
| 3305 | # //bucketName/fileName</code>. Compressed gzip files (.gz) are supported |
| 3306 | # // when <code>fileType</code> is <code>SQL</code>. The instance must have |
| 3307 | # // write permissions to the bucket and read access to the file. |
Bu Sun Kim | 6502091 | 2020-05-20 12:08:20 -0700 | [diff] [blame] | 3308 | "fileType": "A String", # The file type for the specified uri. <br><code>SQL</code>: The file |
| 3309 | # contains SQL statements. <br><code>CSV</code>: The file contains CSV data. |
Bu Sun Kim | 4ed7d3f | 2020-05-27 12:20:54 -0700 | [diff] [blame^] | 3310 | "kind": "A String", # This is always <code>sql#importContext</code>. |
| 3311 | "csvImportOptions": { # Options for importing data as CSV. |
| 3312 | "table": "A String", # The table to which CSV data is imported. |
| 3313 | "columns": [ # The columns to which CSV data is imported. If not specified, all columns |
| 3314 | # of the database table are loaded with CSV data. |
| 3315 | "A String", |
| 3316 | ], |
| 3317 | }, |
Craig Citro | e633be1 | 2015-03-02 13:40:36 -0800 | [diff] [blame] | 3318 | }, |
Bu Sun Kim | 6502091 | 2020-05-20 12:08:20 -0700 | [diff] [blame] | 3319 | "status": "A String", # The status of an operation. Valid values are <code>PENDING</code>, |
| 3320 | # <code>RUNNING</code>, <code>DONE</code>, |
| 3321 | # <code>SQL_OPERATION_STATUS_UNSPECIFIED</code>. |
| 3322 | "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] | 3323 | # identifier to retrieve the Operations resource that has information about |
| 3324 | # the operation. |
Bu Sun Kim | 6502091 | 2020-05-20 12:08:20 -0700 | [diff] [blame] | 3325 | "exportContext": { # Database instance export context. # The context for export operation, if applicable. |
Bu Sun Kim | 4ed7d3f | 2020-05-27 12:20:54 -0700 | [diff] [blame^] | 3326 | "fileType": "A String", # The file type for the specified uri. <br><code>SQL</code>: The file |
| 3327 | # contains SQL statements. <br><code>CSV</code>: The file contains CSV data. |
| 3328 | "uri": "A String", # The path to the file in Google Cloud Storage where the export will be |
| 3329 | # stored. The URI is in the form <code>gs: |
| 3330 | # //bucketName/fileName</code>. If the file already exists, the requests |
| 3331 | # // succeeds, but the operation fails. If <code>fileType</code> is |
| 3332 | # // <code>SQL</code> and the filename ends with .gz, the contents are |
| 3333 | # // compressed. |
| 3334 | "csvExportOptions": { # Options for exporting data as CSV. |
| 3335 | "selectQuery": "A String", # The select query used to extract the data. |
| 3336 | }, |
| 3337 | "kind": "A String", # This is always <code>sql#exportContext</code>. |
Bu Sun Kim | 6502091 | 2020-05-20 12:08:20 -0700 | [diff] [blame] | 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 | }, |
| 3366 | }, |
Bu Sun Kim | 6502091 | 2020-05-20 12:08:20 -0700 | [diff] [blame] | 3367 | "targetId": "A String", # Name of the database instance related to this operation. |
Bu Sun Kim | 4ed7d3f | 2020-05-27 12:20:54 -0700 | [diff] [blame^] | 3368 | "endTime": "A String", # The time this operation finished in UTC timezone in <a |
| 3369 | # href="https://tools.ietf.org/html/rfc3339">RFC 3339</a> format, for example |
| 3370 | # <code>2012-11-15T16:19:00.094Z</code>. |
| 3371 | "startTime": "A String", # The time this operation actually started in UTC timezone in <a |
| 3372 | # href="https://tools.ietf.org/html/rfc3339">RFC 3339</a> format, for example |
| 3373 | # <code>2012-11-15T16:19:00.094Z</code>. |
| 3374 | "insertTime": "A String", # The time this operation was enqueued in UTC timezone in <a |
| 3375 | # href="https://tools.ietf.org/html/rfc3339">RFC 3339</a> format, for example |
| 3376 | # <code>2012-11-15T16:19:00.094Z</code>. |
| 3377 | "user": "A String", # The email address of the user who initiated this operation. |
| 3378 | "targetProject": "A String", # The project ID of the target instance related to this operation. |
| 3379 | "selfLink": "A String", # The URI of this resource. |
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 | "targetLink": "A String", |
| 3414 | "operationType": "A String", # The type of the operation. Valid values are <code>CREATE</code>, |
| 3415 | # <code>DELETE</code>, <code>UPDATE</code>, <code>RESTART</code>, |
| 3416 | # <code>IMPORT</code>, <code>EXPORT</code>, <code>BACKUP_VOLUME</code>, |
| 3417 | # <code>RESTORE_VOLUME</code>, <code>CREATE_USER</code>, |
| 3418 | # <code>DELETE_USER</code>, <code>CREATE_DATABASE</code>, |
| 3419 | # <code>DELETE_DATABASE</code> . |
| 3420 | "error": { # Database instance operation errors list wrapper. # If errors occurred during processing of this operation, this field will be |
| 3421 | # populated. |
| 3422 | "errors": [ # The list of errors encountered while processing this operation. |
| 3423 | { # Database instance operation error. |
| 3424 | "kind": "A String", # This is always <code>sql#operationError</code>. |
| 3425 | "code": "A String", # Identifies the specific error that occurred. |
| 3426 | "message": "A String", # Additional information about the error encountered. |
Dan O'Meara | dd49464 | 2020-05-01 07:42:23 -0700 | [diff] [blame] | 3427 | }, |
Bu Sun Kim | 6502091 | 2020-05-20 12:08:20 -0700 | [diff] [blame] | 3428 | ], |
| 3429 | "kind": "A String", # This is always <code>sql#operationErrors</code>. |
| 3430 | }, |
| 3431 | "kind": "A String", # This is always <code>sql#operation</code>. |
| 3432 | "importContext": { # Database instance import context. # The context for import operation, if applicable. |
Bu Sun Kim | 6502091 | 2020-05-20 12:08:20 -0700 | [diff] [blame] | 3433 | "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] | 3434 | # <code>SQL</code>, this field is required only if the import file does not |
| 3435 | # specify a database, and is overridden by any database specification in the |
| 3436 | # import file. If <code>fileType</code> is <code>CSV</code>, one database |
| 3437 | # must be specified. |
Bu Sun Kim | 6502091 | 2020-05-20 12:08:20 -0700 | [diff] [blame] | 3438 | "importUser": "A String", # The PostgreSQL user for this import operation. PostgreSQL instances only. |
| 3439 | "bakImportOptions": { # Import parameters specific to SQL Server .BAK files |
| 3440 | "encryptionOptions": { |
Bu Sun Kim | 4ed7d3f | 2020-05-27 12:20:54 -0700 | [diff] [blame^] | 3441 | "pvkPassword": "A String", # Password that encrypts the private key |
Bu Sun Kim | 6502091 | 2020-05-20 12:08:20 -0700 | [diff] [blame] | 3442 | "certPath": "A String", # Path to the Certificate (.cer) in Cloud Storage, in the form |
| 3443 | # <code>gs://bucketName/fileName</code>. The instance must have |
| 3444 | # write permissions to the bucket and read access to the file. |
| 3445 | "pvkPath": "A String", # Path to the Certificate Private Key (.pvk) in Cloud Storage, in the |
| 3446 | # form <code>gs://bucketName/fileName</code>. The instance must have |
| 3447 | # write permissions to the bucket and read access to the file. |
Bu Sun Kim | 6502091 | 2020-05-20 12:08:20 -0700 | [diff] [blame] | 3448 | }, |
| 3449 | }, |
| 3450 | "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] | 3451 | # <code>gs: |
| 3452 | # //bucketName/fileName</code>. Compressed gzip files (.gz) are supported |
| 3453 | # // when <code>fileType</code> is <code>SQL</code>. The instance must have |
| 3454 | # // write permissions to the bucket and read access to the file. |
Bu Sun Kim | 6502091 | 2020-05-20 12:08:20 -0700 | [diff] [blame] | 3455 | "fileType": "A String", # The file type for the specified uri. <br><code>SQL</code>: The file |
| 3456 | # contains SQL statements. <br><code>CSV</code>: The file contains CSV data. |
Bu Sun Kim | 4ed7d3f | 2020-05-27 12:20:54 -0700 | [diff] [blame^] | 3457 | "kind": "A String", # This is always <code>sql#importContext</code>. |
| 3458 | "csvImportOptions": { # Options for importing data as CSV. |
| 3459 | "table": "A String", # The table to which CSV data is imported. |
| 3460 | "columns": [ # The columns to which CSV data is imported. If not specified, all columns |
| 3461 | # of the database table are loaded with CSV data. |
| 3462 | "A String", |
| 3463 | ], |
| 3464 | }, |
Bu Sun Kim | 715bd7f | 2019-06-14 16:50:42 -0700 | [diff] [blame] | 3465 | }, |
Bu Sun Kim | 6502091 | 2020-05-20 12:08:20 -0700 | [diff] [blame] | 3466 | "status": "A String", # The status of an operation. Valid values are <code>PENDING</code>, |
| 3467 | # <code>RUNNING</code>, <code>DONE</code>, |
| 3468 | # <code>SQL_OPERATION_STATUS_UNSPECIFIED</code>. |
| 3469 | "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] | 3470 | # identifier to retrieve the Operations resource that has information about |
| 3471 | # the operation. |
Bu Sun Kim | 6502091 | 2020-05-20 12:08:20 -0700 | [diff] [blame] | 3472 | "exportContext": { # Database instance export context. # The context for export operation, if applicable. |
Bu Sun Kim | 4ed7d3f | 2020-05-27 12:20:54 -0700 | [diff] [blame^] | 3473 | "fileType": "A String", # The file type for the specified uri. <br><code>SQL</code>: The file |
| 3474 | # contains SQL statements. <br><code>CSV</code>: The file contains CSV data. |
| 3475 | "uri": "A String", # The path to the file in Google Cloud Storage where the export will be |
| 3476 | # stored. The URI is in the form <code>gs: |
| 3477 | # //bucketName/fileName</code>. If the file already exists, the requests |
| 3478 | # // succeeds, but the operation fails. If <code>fileType</code> is |
| 3479 | # // <code>SQL</code> and the filename ends with .gz, the contents are |
| 3480 | # // compressed. |
| 3481 | "csvExportOptions": { # Options for exporting data as CSV. |
| 3482 | "selectQuery": "A String", # The select query used to extract the data. |
| 3483 | }, |
| 3484 | "kind": "A String", # This is always <code>sql#exportContext</code>. |
Bu Sun Kim | 6502091 | 2020-05-20 12:08:20 -0700 | [diff] [blame] | 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 | }, |
| 3513 | }, |
Bu Sun Kim | 6502091 | 2020-05-20 12:08:20 -0700 | [diff] [blame] | 3514 | "targetId": "A String", # Name of the database instance related to this operation. |
Bu Sun Kim | 4ed7d3f | 2020-05-27 12:20:54 -0700 | [diff] [blame^] | 3515 | "endTime": "A String", # The time this operation finished in UTC timezone in <a |
| 3516 | # href="https://tools.ietf.org/html/rfc3339">RFC 3339</a> format, for example |
| 3517 | # <code>2012-11-15T16:19:00.094Z</code>. |
| 3518 | "startTime": "A String", # The time this operation actually started in UTC timezone in <a |
| 3519 | # href="https://tools.ietf.org/html/rfc3339">RFC 3339</a> format, for example |
| 3520 | # <code>2012-11-15T16:19:00.094Z</code>. |
| 3521 | "insertTime": "A String", # The time this operation was enqueued in UTC timezone in <a |
| 3522 | # href="https://tools.ietf.org/html/rfc3339">RFC 3339</a> format, for example |
| 3523 | # <code>2012-11-15T16:19:00.094Z</code>. |
| 3524 | "user": "A String", # The email address of the user who initiated this operation. |
| 3525 | "targetProject": "A String", # The project ID of the target instance related to this operation. |
| 3526 | "selfLink": "A String", # The URI of this resource. |
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 | "targetLink": "A String", |
| 3549 | "operationType": "A String", # The type of the operation. Valid values are <code>CREATE</code>, |
| 3550 | # <code>DELETE</code>, <code>UPDATE</code>, <code>RESTART</code>, |
| 3551 | # <code>IMPORT</code>, <code>EXPORT</code>, <code>BACKUP_VOLUME</code>, |
| 3552 | # <code>RESTORE_VOLUME</code>, <code>CREATE_USER</code>, |
| 3553 | # <code>DELETE_USER</code>, <code>CREATE_DATABASE</code>, |
| 3554 | # <code>DELETE_DATABASE</code> . |
| 3555 | "error": { # Database instance operation errors list wrapper. # If errors occurred during processing of this operation, this field will be |
| 3556 | # populated. |
| 3557 | "errors": [ # The list of errors encountered while processing this operation. |
| 3558 | { # Database instance operation error. |
| 3559 | "kind": "A String", # This is always <code>sql#operationError</code>. |
| 3560 | "code": "A String", # Identifies the specific error that occurred. |
| 3561 | "message": "A String", # Additional information about the error encountered. |
Dan O'Meara | dd49464 | 2020-05-01 07:42:23 -0700 | [diff] [blame] | 3562 | }, |
Bu Sun Kim | 6502091 | 2020-05-20 12:08:20 -0700 | [diff] [blame] | 3563 | ], |
| 3564 | "kind": "A String", # This is always <code>sql#operationErrors</code>. |
| 3565 | }, |
| 3566 | "kind": "A String", # This is always <code>sql#operation</code>. |
| 3567 | "importContext": { # Database instance import context. # The context for import operation, if applicable. |
Bu Sun Kim | 6502091 | 2020-05-20 12:08:20 -0700 | [diff] [blame] | 3568 | "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] | 3569 | # <code>SQL</code>, this field is required only if the import file does not |
| 3570 | # specify a database, and is overridden by any database specification in the |
| 3571 | # import file. If <code>fileType</code> is <code>CSV</code>, one database |
| 3572 | # must be specified. |
Bu Sun Kim | 6502091 | 2020-05-20 12:08:20 -0700 | [diff] [blame] | 3573 | "importUser": "A String", # The PostgreSQL user for this import operation. PostgreSQL instances only. |
| 3574 | "bakImportOptions": { # Import parameters specific to SQL Server .BAK files |
| 3575 | "encryptionOptions": { |
Bu Sun Kim | 4ed7d3f | 2020-05-27 12:20:54 -0700 | [diff] [blame^] | 3576 | "pvkPassword": "A String", # Password that encrypts the private key |
Bu Sun Kim | 6502091 | 2020-05-20 12:08:20 -0700 | [diff] [blame] | 3577 | "certPath": "A String", # Path to the Certificate (.cer) in Cloud Storage, in the form |
| 3578 | # <code>gs://bucketName/fileName</code>. The instance must have |
| 3579 | # write permissions to the bucket and read access to the file. |
| 3580 | "pvkPath": "A String", # Path to the Certificate Private Key (.pvk) in Cloud Storage, in the |
| 3581 | # form <code>gs://bucketName/fileName</code>. The instance must have |
| 3582 | # write permissions to the bucket and read access to the file. |
Bu Sun Kim | 6502091 | 2020-05-20 12:08:20 -0700 | [diff] [blame] | 3583 | }, |
| 3584 | }, |
| 3585 | "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] | 3586 | # <code>gs: |
| 3587 | # //bucketName/fileName</code>. Compressed gzip files (.gz) are supported |
| 3588 | # // when <code>fileType</code> is <code>SQL</code>. The instance must have |
| 3589 | # // write permissions to the bucket and read access to the file. |
Bu Sun Kim | 6502091 | 2020-05-20 12:08:20 -0700 | [diff] [blame] | 3590 | "fileType": "A String", # The file type for the specified uri. <br><code>SQL</code>: The file |
| 3591 | # contains SQL statements. <br><code>CSV</code>: The file contains CSV data. |
Bu Sun Kim | 4ed7d3f | 2020-05-27 12:20:54 -0700 | [diff] [blame^] | 3592 | "kind": "A String", # This is always <code>sql#importContext</code>. |
| 3593 | "csvImportOptions": { # Options for importing data as CSV. |
| 3594 | "table": "A String", # The table to which CSV data is imported. |
| 3595 | "columns": [ # The columns to which CSV data is imported. If not specified, all columns |
| 3596 | # of the database table are loaded with CSV data. |
| 3597 | "A String", |
| 3598 | ], |
| 3599 | }, |
Craig Citro | e633be1 | 2015-03-02 13:40:36 -0800 | [diff] [blame] | 3600 | }, |
Bu Sun Kim | 6502091 | 2020-05-20 12:08:20 -0700 | [diff] [blame] | 3601 | "status": "A String", # The status of an operation. Valid values are <code>PENDING</code>, |
| 3602 | # <code>RUNNING</code>, <code>DONE</code>, |
| 3603 | # <code>SQL_OPERATION_STATUS_UNSPECIFIED</code>. |
| 3604 | "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] | 3605 | # identifier to retrieve the Operations resource that has information about |
| 3606 | # the operation. |
Bu Sun Kim | 6502091 | 2020-05-20 12:08:20 -0700 | [diff] [blame] | 3607 | "exportContext": { # Database instance export context. # The context for export operation, if applicable. |
Bu Sun Kim | 4ed7d3f | 2020-05-27 12:20:54 -0700 | [diff] [blame^] | 3608 | "fileType": "A String", # The file type for the specified uri. <br><code>SQL</code>: The file |
| 3609 | # contains SQL statements. <br><code>CSV</code>: The file contains CSV data. |
| 3610 | "uri": "A String", # The path to the file in Google Cloud Storage where the export will be |
| 3611 | # stored. The URI is in the form <code>gs: |
| 3612 | # //bucketName/fileName</code>. If the file already exists, the requests |
| 3613 | # // succeeds, but the operation fails. If <code>fileType</code> is |
| 3614 | # // <code>SQL</code> and the filename ends with .gz, the contents are |
| 3615 | # // compressed. |
| 3616 | "csvExportOptions": { # Options for exporting data as CSV. |
| 3617 | "selectQuery": "A String", # The select query used to extract the data. |
| 3618 | }, |
| 3619 | "kind": "A String", # This is always <code>sql#exportContext</code>. |
Bu Sun Kim | 6502091 | 2020-05-20 12:08:20 -0700 | [diff] [blame] | 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 | }, |
| 3648 | }, |
Bu Sun Kim | 6502091 | 2020-05-20 12:08:20 -0700 | [diff] [blame] | 3649 | "targetId": "A String", # Name of the database instance related to this operation. |
Bu Sun Kim | 4ed7d3f | 2020-05-27 12:20:54 -0700 | [diff] [blame^] | 3650 | "endTime": "A String", # The time this operation finished in UTC timezone in <a |
| 3651 | # href="https://tools.ietf.org/html/rfc3339">RFC 3339</a> format, for example |
| 3652 | # <code>2012-11-15T16:19:00.094Z</code>. |
| 3653 | "startTime": "A String", # The time this operation actually started in UTC timezone in <a |
| 3654 | # href="https://tools.ietf.org/html/rfc3339">RFC 3339</a> format, for example |
| 3655 | # <code>2012-11-15T16:19:00.094Z</code>. |
| 3656 | "insertTime": "A String", # The time this operation was enqueued in UTC timezone in <a |
| 3657 | # href="https://tools.ietf.org/html/rfc3339">RFC 3339</a> format, for example |
| 3658 | # <code>2012-11-15T16:19:00.094Z</code>. |
| 3659 | "user": "A String", # The email address of the user who initiated this operation. |
| 3660 | "targetProject": "A String", # The project ID of the target instance related to this operation. |
| 3661 | "selfLink": "A String", # The URI of this resource. |
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 | "targetLink": "A String", |
| 3684 | "operationType": "A String", # The type of the operation. Valid values are <code>CREATE</code>, |
| 3685 | # <code>DELETE</code>, <code>UPDATE</code>, <code>RESTART</code>, |
| 3686 | # <code>IMPORT</code>, <code>EXPORT</code>, <code>BACKUP_VOLUME</code>, |
| 3687 | # <code>RESTORE_VOLUME</code>, <code>CREATE_USER</code>, |
| 3688 | # <code>DELETE_USER</code>, <code>CREATE_DATABASE</code>, |
| 3689 | # <code>DELETE_DATABASE</code> . |
| 3690 | "error": { # Database instance operation errors list wrapper. # If errors occurred during processing of this operation, this field will be |
| 3691 | # populated. |
| 3692 | "errors": [ # The list of errors encountered while processing this operation. |
| 3693 | { # Database instance operation error. |
| 3694 | "kind": "A String", # This is always <code>sql#operationError</code>. |
| 3695 | "code": "A String", # Identifies the specific error that occurred. |
| 3696 | "message": "A String", # Additional information about the error encountered. |
Dan O'Meara | dd49464 | 2020-05-01 07:42:23 -0700 | [diff] [blame] | 3697 | }, |
Bu Sun Kim | 6502091 | 2020-05-20 12:08:20 -0700 | [diff] [blame] | 3698 | ], |
| 3699 | "kind": "A String", # This is always <code>sql#operationErrors</code>. |
| 3700 | }, |
| 3701 | "kind": "A String", # This is always <code>sql#operation</code>. |
| 3702 | "importContext": { # Database instance import context. # The context for import operation, if applicable. |
Bu Sun Kim | 6502091 | 2020-05-20 12:08:20 -0700 | [diff] [blame] | 3703 | "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] | 3704 | # <code>SQL</code>, this field is required only if the import file does not |
| 3705 | # specify a database, and is overridden by any database specification in the |
| 3706 | # import file. If <code>fileType</code> is <code>CSV</code>, one database |
| 3707 | # must be specified. |
Bu Sun Kim | 6502091 | 2020-05-20 12:08:20 -0700 | [diff] [blame] | 3708 | "importUser": "A String", # The PostgreSQL user for this import operation. PostgreSQL instances only. |
| 3709 | "bakImportOptions": { # Import parameters specific to SQL Server .BAK files |
| 3710 | "encryptionOptions": { |
Bu Sun Kim | 4ed7d3f | 2020-05-27 12:20:54 -0700 | [diff] [blame^] | 3711 | "pvkPassword": "A String", # Password that encrypts the private key |
Bu Sun Kim | 6502091 | 2020-05-20 12:08:20 -0700 | [diff] [blame] | 3712 | "certPath": "A String", # Path to the Certificate (.cer) in Cloud Storage, in the form |
| 3713 | # <code>gs://bucketName/fileName</code>. The instance must have |
| 3714 | # write permissions to the bucket and read access to the file. |
| 3715 | "pvkPath": "A String", # Path to the Certificate Private Key (.pvk) in Cloud Storage, in the |
| 3716 | # form <code>gs://bucketName/fileName</code>. The instance must have |
| 3717 | # write permissions to the bucket and read access to the file. |
Bu Sun Kim | 6502091 | 2020-05-20 12:08:20 -0700 | [diff] [blame] | 3718 | }, |
| 3719 | }, |
| 3720 | "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] | 3721 | # <code>gs: |
| 3722 | # //bucketName/fileName</code>. Compressed gzip files (.gz) are supported |
| 3723 | # // when <code>fileType</code> is <code>SQL</code>. The instance must have |
| 3724 | # // write permissions to the bucket and read access to the file. |
Bu Sun Kim | 6502091 | 2020-05-20 12:08:20 -0700 | [diff] [blame] | 3725 | "fileType": "A String", # The file type for the specified uri. <br><code>SQL</code>: The file |
| 3726 | # contains SQL statements. <br><code>CSV</code>: The file contains CSV data. |
Bu Sun Kim | 4ed7d3f | 2020-05-27 12:20:54 -0700 | [diff] [blame^] | 3727 | "kind": "A String", # This is always <code>sql#importContext</code>. |
| 3728 | "csvImportOptions": { # Options for importing data as CSV. |
| 3729 | "table": "A String", # The table to which CSV data is imported. |
| 3730 | "columns": [ # The columns to which CSV data is imported. If not specified, all columns |
| 3731 | # of the database table are loaded with CSV data. |
| 3732 | "A String", |
| 3733 | ], |
| 3734 | }, |
Craig Citro | e633be1 | 2015-03-02 13:40:36 -0800 | [diff] [blame] | 3735 | }, |
Bu Sun Kim | 6502091 | 2020-05-20 12:08:20 -0700 | [diff] [blame] | 3736 | "status": "A String", # The status of an operation. Valid values are <code>PENDING</code>, |
| 3737 | # <code>RUNNING</code>, <code>DONE</code>, |
| 3738 | # <code>SQL_OPERATION_STATUS_UNSPECIFIED</code>. |
| 3739 | "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] | 3740 | # identifier to retrieve the Operations resource that has information about |
| 3741 | # the operation. |
Bu Sun Kim | 6502091 | 2020-05-20 12:08:20 -0700 | [diff] [blame] | 3742 | "exportContext": { # Database instance export context. # The context for export operation, if applicable. |
Bu Sun Kim | 4ed7d3f | 2020-05-27 12:20:54 -0700 | [diff] [blame^] | 3743 | "fileType": "A String", # The file type for the specified uri. <br><code>SQL</code>: The file |
| 3744 | # contains SQL statements. <br><code>CSV</code>: The file contains CSV data. |
| 3745 | "uri": "A String", # The path to the file in Google Cloud Storage where the export will be |
| 3746 | # stored. The URI is in the form <code>gs: |
| 3747 | # //bucketName/fileName</code>. If the file already exists, the requests |
| 3748 | # // succeeds, but the operation fails. If <code>fileType</code> is |
| 3749 | # // <code>SQL</code> and the filename ends with .gz, the contents are |
| 3750 | # // compressed. |
| 3751 | "csvExportOptions": { # Options for exporting data as CSV. |
| 3752 | "selectQuery": "A String", # The select query used to extract the data. |
| 3753 | }, |
| 3754 | "kind": "A String", # This is always <code>sql#exportContext</code>. |
Bu Sun Kim | 6502091 | 2020-05-20 12:08:20 -0700 | [diff] [blame] | 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 | }, |
| 3783 | }, |
Bu Sun Kim | 6502091 | 2020-05-20 12:08:20 -0700 | [diff] [blame] | 3784 | "targetId": "A String", # Name of the database instance related to this operation. |
Bu Sun Kim | 4ed7d3f | 2020-05-27 12:20:54 -0700 | [diff] [blame^] | 3785 | "endTime": "A String", # The time this operation finished in UTC timezone in <a |
| 3786 | # href="https://tools.ietf.org/html/rfc3339">RFC 3339</a> format, for example |
| 3787 | # <code>2012-11-15T16:19:00.094Z</code>. |
| 3788 | "startTime": "A String", # The time this operation actually started in UTC timezone in <a |
| 3789 | # href="https://tools.ietf.org/html/rfc3339">RFC 3339</a> format, for example |
| 3790 | # <code>2012-11-15T16:19:00.094Z</code>. |
| 3791 | "insertTime": "A String", # The time this operation was enqueued in UTC timezone in <a |
| 3792 | # href="https://tools.ietf.org/html/rfc3339">RFC 3339</a> format, for example |
| 3793 | # <code>2012-11-15T16:19:00.094Z</code>. |
| 3794 | "user": "A String", # The email address of the user who initiated this operation. |
| 3795 | "targetProject": "A String", # The project ID of the target instance related to this operation. |
| 3796 | "selfLink": "A String", # The URI of this resource. |
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. |
Bu Sun Kim | 4ed7d3f | 2020-05-27 12:20:54 -0700 | [diff] [blame^] | 3812 | "kind": "A String", # This is always <code>sql#truncateLogContext</code>. |
Bu Sun Kim | 6502091 | 2020-05-20 12:08:20 -0700 | [diff] [blame] | 3813 | "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] | 3814 | # <code>MYSQL_GENERAL_TABLE</code> and <code>MYSQL_SLOW_TABLE</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 | "targetLink": "A String", |
| 3830 | "operationType": "A String", # The type of the operation. Valid values are <code>CREATE</code>, |
| 3831 | # <code>DELETE</code>, <code>UPDATE</code>, <code>RESTART</code>, |
| 3832 | # <code>IMPORT</code>, <code>EXPORT</code>, <code>BACKUP_VOLUME</code>, |
| 3833 | # <code>RESTORE_VOLUME</code>, <code>CREATE_USER</code>, |
| 3834 | # <code>DELETE_USER</code>, <code>CREATE_DATABASE</code>, |
| 3835 | # <code>DELETE_DATABASE</code> . |
| 3836 | "error": { # Database instance operation errors list wrapper. # If errors occurred during processing of this operation, this field will be |
| 3837 | # populated. |
| 3838 | "errors": [ # The list of errors encountered while processing this operation. |
| 3839 | { # Database instance operation error. |
| 3840 | "kind": "A String", # This is always <code>sql#operationError</code>. |
| 3841 | "code": "A String", # Identifies the specific error that occurred. |
| 3842 | "message": "A String", # Additional information about the error encountered. |
Dan O'Meara | dd49464 | 2020-05-01 07:42:23 -0700 | [diff] [blame] | 3843 | }, |
Bu Sun Kim | 6502091 | 2020-05-20 12:08:20 -0700 | [diff] [blame] | 3844 | ], |
| 3845 | "kind": "A String", # This is always <code>sql#operationErrors</code>. |
| 3846 | }, |
| 3847 | "kind": "A String", # This is always <code>sql#operation</code>. |
| 3848 | "importContext": { # Database instance import context. # The context for import operation, if applicable. |
Bu Sun Kim | 6502091 | 2020-05-20 12:08:20 -0700 | [diff] [blame] | 3849 | "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] | 3850 | # <code>SQL</code>, this field is required only if the import file does not |
| 3851 | # specify a database, and is overridden by any database specification in the |
| 3852 | # import file. If <code>fileType</code> is <code>CSV</code>, one database |
| 3853 | # must be specified. |
Bu Sun Kim | 6502091 | 2020-05-20 12:08:20 -0700 | [diff] [blame] | 3854 | "importUser": "A String", # The PostgreSQL user for this import operation. PostgreSQL instances only. |
| 3855 | "bakImportOptions": { # Import parameters specific to SQL Server .BAK files |
| 3856 | "encryptionOptions": { |
Bu Sun Kim | 4ed7d3f | 2020-05-27 12:20:54 -0700 | [diff] [blame^] | 3857 | "pvkPassword": "A String", # Password that encrypts the private key |
Bu Sun Kim | 6502091 | 2020-05-20 12:08:20 -0700 | [diff] [blame] | 3858 | "certPath": "A String", # Path to the Certificate (.cer) in Cloud Storage, in the form |
| 3859 | # <code>gs://bucketName/fileName</code>. The instance must have |
| 3860 | # write permissions to the bucket and read access to the file. |
| 3861 | "pvkPath": "A String", # Path to the Certificate Private Key (.pvk) in Cloud Storage, in the |
| 3862 | # form <code>gs://bucketName/fileName</code>. The instance must have |
| 3863 | # write permissions to the bucket and read access to the file. |
Bu Sun Kim | 6502091 | 2020-05-20 12:08:20 -0700 | [diff] [blame] | 3864 | }, |
| 3865 | }, |
| 3866 | "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] | 3867 | # <code>gs: |
| 3868 | # //bucketName/fileName</code>. Compressed gzip files (.gz) are supported |
| 3869 | # // when <code>fileType</code> is <code>SQL</code>. The instance must have |
| 3870 | # // write permissions to the bucket and read access to the file. |
Bu Sun Kim | 6502091 | 2020-05-20 12:08:20 -0700 | [diff] [blame] | 3871 | "fileType": "A String", # The file type for the specified uri. <br><code>SQL</code>: The file |
| 3872 | # contains SQL statements. <br><code>CSV</code>: The file contains CSV data. |
Bu Sun Kim | 4ed7d3f | 2020-05-27 12:20:54 -0700 | [diff] [blame^] | 3873 | "kind": "A String", # This is always <code>sql#importContext</code>. |
| 3874 | "csvImportOptions": { # Options for importing data as CSV. |
| 3875 | "table": "A String", # The table to which CSV data is imported. |
| 3876 | "columns": [ # The columns to which CSV data is imported. If not specified, all columns |
| 3877 | # of the database table are loaded with CSV data. |
| 3878 | "A String", |
| 3879 | ], |
| 3880 | }, |
Jon Wayne Parrott | 692617a | 2017-01-06 09:58:29 -0800 | [diff] [blame] | 3881 | }, |
Bu Sun Kim | 6502091 | 2020-05-20 12:08:20 -0700 | [diff] [blame] | 3882 | "status": "A String", # The status of an operation. Valid values are <code>PENDING</code>, |
| 3883 | # <code>RUNNING</code>, <code>DONE</code>, |
| 3884 | # <code>SQL_OPERATION_STATUS_UNSPECIFIED</code>. |
| 3885 | "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] | 3886 | # identifier to retrieve the Operations resource that has information about |
| 3887 | # the operation. |
Bu Sun Kim | 6502091 | 2020-05-20 12:08:20 -0700 | [diff] [blame] | 3888 | "exportContext": { # Database instance export context. # The context for export operation, if applicable. |
Bu Sun Kim | 4ed7d3f | 2020-05-27 12:20:54 -0700 | [diff] [blame^] | 3889 | "fileType": "A String", # The file type for the specified uri. <br><code>SQL</code>: The file |
| 3890 | # contains SQL statements. <br><code>CSV</code>: The file contains CSV data. |
| 3891 | "uri": "A String", # The path to the file in Google Cloud Storage where the export will be |
| 3892 | # stored. The URI is in the form <code>gs: |
| 3893 | # //bucketName/fileName</code>. If the file already exists, the requests |
| 3894 | # // succeeds, but the operation fails. If <code>fileType</code> is |
| 3895 | # // <code>SQL</code> and the filename ends with .gz, the contents are |
| 3896 | # // compressed. |
| 3897 | "csvExportOptions": { # Options for exporting data as CSV. |
| 3898 | "selectQuery": "A String", # The select query used to extract the data. |
| 3899 | }, |
| 3900 | "kind": "A String", # This is always <code>sql#exportContext</code>. |
Bu Sun Kim | 6502091 | 2020-05-20 12:08:20 -0700 | [diff] [blame] | 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 | }, |
| 3929 | }, |
Bu Sun Kim | 6502091 | 2020-05-20 12:08:20 -0700 | [diff] [blame] | 3930 | "targetId": "A String", # Name of the database instance related to this operation. |
Bu Sun Kim | 4ed7d3f | 2020-05-27 12:20:54 -0700 | [diff] [blame^] | 3931 | "endTime": "A String", # The time this operation finished in UTC timezone in <a |
| 3932 | # href="https://tools.ietf.org/html/rfc3339">RFC 3339</a> format, for example |
| 3933 | # <code>2012-11-15T16:19:00.094Z</code>. |
| 3934 | "startTime": "A String", # The time this operation actually started in UTC timezone in <a |
| 3935 | # href="https://tools.ietf.org/html/rfc3339">RFC 3339</a> format, for example |
| 3936 | # <code>2012-11-15T16:19:00.094Z</code>. |
| 3937 | "insertTime": "A String", # The time this operation was enqueued in UTC timezone in <a |
| 3938 | # href="https://tools.ietf.org/html/rfc3339">RFC 3339</a> format, for example |
| 3939 | # <code>2012-11-15T16:19:00.094Z</code>. |
| 3940 | "user": "A String", # The email address of the user who initiated this operation. |
| 3941 | "targetProject": "A String", # The project ID of the target instance related to this operation. |
| 3942 | "selfLink": "A String", # The URI of this resource. |
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 | 4ed7d3f | 2020-05-27 12:20:54 -0700 | [diff] [blame^] | 3958 | "onPremisesConfiguration": { # On-premises instance configuration. # Configuration specific to on-premises instances. |
| 3959 | "clientKey": "A String", # PEM representation of the slave's private key. The corresponsing public key |
| 3960 | # is encoded in the client's certificate. |
| 3961 | "dumpFilePath": "A String", # The dump file to create the Cloud SQL replica. |
| 3962 | "hostPort": "A String", # The host and port of the on-premises instance in host:port format |
| 3963 | "clientCertificate": "A String", # PEM representation of the slave's x509 certificate. |
| 3964 | "username": "A String", # The username for connecting to on-premises instance. |
| 3965 | "caCertificate": "A String", # PEM representation of the trusted CA's x509 certificate. |
| 3966 | "kind": "A String", # This is always <code>sql#onPremisesConfiguration</code>. |
| 3967 | "password": "A String", # The password for connecting to on-premises instance. |
| 3968 | }, |
| 3969 | "project": "A String", # The project ID of the project containing the Cloud SQL instance. The Google |
| 3970 | # apps domain is prefixed if applicable. |
| 3971 | "serviceAccountEmailAddress": "A String", # The service account email address assigned to the instance. This property |
| 3972 | # is applicable only to Second Generation instances. |
| 3973 | "databaseVersion": "A String", # The database engine type and version. The <code>databaseVersion</code> |
| 3974 | # field can not be changed after instance creation. MySQL Second Generation |
| 3975 | # instances: <code>MYSQL_5_7</code> (default) or <code>MYSQL_5_6</code>. |
| 3976 | # PostgreSQL instances: <code>POSTGRES_9_6</code> (default) or |
| 3977 | # <code>POSTGRES_11 Beta</code> MySQL First Generation |
| 3978 | # instances: <code>MYSQL_5_6</code> (default) or <code>MYSQL_5_5</code> |
Bu Sun Kim | 6502091 | 2020-05-20 12:08:20 -0700 | [diff] [blame] | 3979 | "suspensionReason": [ # If the instance state is SUSPENDED, the reason for the suspension. |
| 3980 | "A String", |
| 3981 | ], |
| 3982 | "settings": { # Database instance settings. # The user settings. |
Bu Sun Kim | 6502091 | 2020-05-20 12:08:20 -0700 | [diff] [blame] | 3983 | "pricingPlan": "A String", # The pricing plan for this instance. This can be either <code>PER_USE</code> |
| 3984 | # or <code>PACKAGE</code>. Only <code>PER_USE</code> is supported for Second |
| 3985 | # Generation instances. |
| 3986 | "storageAutoResize": True or False, # Configuration to increase storage size automatically. The default value is |
| 3987 | # true. Not used for First Generation instances. |
| 3988 | "storageAutoResizeLimit": "A String", # The maximum size to which storage capacity can be automatically increased. |
| 3989 | # The default value is 0, which specifies that there is no limit. Not used |
| 3990 | # for First Generation instances. |
| 3991 | "authorizedGaeApplications": [ # The App Engine app IDs that can access this instance. First Generation |
| 3992 | # instances only. |
| 3993 | "A String", |
| 3994 | ], |
| 3995 | "tier": "A String", # The tier (or machine type) for this instance, for example |
| 3996 | # <code>db-n1-standard-1</code> (MySQL instances) or |
| 3997 | # <code>db-custom-1-3840</code> (PostgreSQL instances). For MySQL instances, |
| 3998 | # this property determines whether the instance is First or Second |
| 3999 | # Generation. For more information, see <a |
| 4000 | # href="/sql/docs/db_path/instance-settings">Instance Settings</a>. |
| 4001 | "dataDiskSizeGb": "A String", # The size of data disk, in GB. The data disk size minimum is 10GB. Not used |
| 4002 | # for First Generation instances. |
| 4003 | "dataDiskType": "A String", # The type of data disk: <code>PD_SSD</code> (default) or |
| 4004 | # <code>PD_HDD</code>. Not used for First Generation instances. |
| 4005 | "databaseReplicationEnabled": True or False, # Configuration specific to read replica instances. Indicates whether |
| 4006 | # replication is enabled or not. |
| 4007 | "crashSafeReplicationEnabled": True or False, # Configuration specific to read replica instances. Indicates whether |
| 4008 | # database flags for crash-safe replication are enabled. This property is |
| 4009 | # only applicable to First Generation instances. |
| 4010 | "backupConfiguration": { # Database instance backup configuration. # The daily backup configuration for the instance. |
Bu Sun Kim | 6502091 | 2020-05-20 12:08:20 -0700 | [diff] [blame] | 4011 | "replicationLogArchivingEnabled": True or False, # Reserved for future use. |
| 4012 | "location": "A String", # Location of the backup |
| 4013 | "pointInTimeRecoveryEnabled": True or False, # Reserved for future use. |
| 4014 | "startTime": "A String", # Start time for the daily backup configuration in UTC timezone in the 24 |
| 4015 | # hour format - <code>HH:MM</code>. |
| 4016 | "kind": "A String", # This is always <code>sql#backupConfiguration</code>. |
| 4017 | "enabled": True or False, # Whether this configuration is enabled. |
Bu Sun Kim | 4ed7d3f | 2020-05-27 12:20:54 -0700 | [diff] [blame^] | 4018 | "binaryLogEnabled": True or False, # (MySQL only) Whether binary log is enabled. If backup configuration is |
| 4019 | # disabled, binarylog must be disabled as well. |
Bu Sun Kim | 6502091 | 2020-05-20 12:08:20 -0700 | [diff] [blame] | 4020 | }, |
| 4021 | "userLabels": { # User-provided labels, represented as a dictionary where each label is a |
| 4022 | # single key value pair. |
| 4023 | "a_key": "A String", |
| 4024 | }, |
Bu Sun Kim | 4ed7d3f | 2020-05-27 12:20:54 -0700 | [diff] [blame^] | 4025 | "replicationType": "A String", # The type of replication this instance uses. This can be either |
| 4026 | # <code>ASYNCHRONOUS</code> or <code>SYNCHRONOUS</code>. This property is |
| 4027 | # only applicable to First Generation instances. |
| 4028 | "kind": "A String", # This is always <code>sql#settings</code>. |
Bu Sun Kim | 6502091 | 2020-05-20 12:08:20 -0700 | [diff] [blame] | 4029 | "locationPreference": { # Preferred location. This specifies where a Cloud SQL instance should # The location preference settings. This allows the instance to be located as |
| 4030 | # near as possible to either an App Engine app or Compute Engine zone for |
| 4031 | # better performance. App Engine co-location is only applicable to First |
| 4032 | # Generation instances. |
| 4033 | # preferably be located, either in a specific Compute Engine zone, or |
| 4034 | # co-located with an App Engine application. Note that if the preferred |
| 4035 | # location is not available, the instance will be located as close as possible |
| 4036 | # within the region. Only one location may be specified. |
Bu Sun Kim | 4ed7d3f | 2020-05-27 12:20:54 -0700 | [diff] [blame^] | 4037 | "kind": "A String", # This is always <code>sql#locationPreference</code>. |
Bu Sun Kim | 6502091 | 2020-05-20 12:08:20 -0700 | [diff] [blame] | 4038 | "zone": "A String", # The preferred Compute Engine zone (e.g. us-central1-a, us-central1-b, |
| 4039 | # etc.). |
| 4040 | "followGaeApplication": "A String", # The AppEngine application to follow, it must be in the same region as the |
| 4041 | # Cloud SQL instance. |
Bu Sun Kim | 6502091 | 2020-05-20 12:08:20 -0700 | [diff] [blame] | 4042 | }, |
Bu Sun Kim | 6502091 | 2020-05-20 12:08:20 -0700 | [diff] [blame] | 4043 | "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] | 4044 | # applicable only when the instance state is <code>RUNNABLE</code>. Valid |
| 4045 | # values: <br><code>ALWAYS</code>: The instance is on, and remains so even in |
| 4046 | # the absence of connection requests. <br><code>NEVER</code>: The instance is |
| 4047 | # off; it is not activated, even if a connection request arrives. |
| 4048 | # <br><code>ON_DEMAND</code>: First Generation instances only. The instance |
| 4049 | # responds to incoming requests, and turns itself off when not in use. |
| 4050 | # Instances with <code>PER_USE</code> pricing turn off after 15 minutes of |
| 4051 | # inactivity. Instances with <code>PER_PACKAGE</code> pricing turn off after |
| 4052 | # 12 hours of inactivity. |
Bu Sun Kim | 4ed7d3f | 2020-05-27 12:20:54 -0700 | [diff] [blame^] | 4053 | "databaseFlags": [ # The database flags passed to the instance at startup. |
| 4054 | { # Database flags for Cloud SQL instances. |
| 4055 | "name": "A String", # The name of the flag. These flags are passed at instance startup, so |
| 4056 | # include both server options and system variables for MySQL. Flags should be |
| 4057 | # specified with underscores, not hyphens. For more information, see <a |
| 4058 | # href="/sql/docs/mysql/flags">Configuring Database Flags</a> in the Cloud |
| 4059 | # SQL documentation. |
| 4060 | "value": "A String", # The value of the flag. Booleans should be set to <code>on</code> for true |
| 4061 | # and <code>off</code> for false. This field must be omitted if the flag |
| 4062 | # doesn't take a value. |
| 4063 | }, |
| 4064 | ], |
| 4065 | "settingsVersion": "A String", # The version of instance settings. This is a required field for update |
| 4066 | # method to make sure concurrent updates are handled properly. During update, |
| 4067 | # use the most recent settingsVersion value for this instance and do not try |
| 4068 | # to update this value. |
| 4069 | "availabilityType": "A String", # Availability type (PostgreSQL and MySQL instances only). Potential values: |
| 4070 | # <br><code>ZONAL</code>: The instance serves data from only one zone. |
| 4071 | # Outages in that zone affect data accessibility. <br><code>REGIONAL</code>: |
| 4072 | # The instance can serve data from more than one zone in a region (it is |
| 4073 | # highly available). <br>For more information, see <a |
| 4074 | # href="https://cloud.google.com/sql/docs/postgres/high-availability">Overview |
| 4075 | # of the High Availability Configuration</a>. |
| 4076 | "ipConfiguration": { # IP Management configuration. # The settings for IP Management. This allows to enable or disable the |
| 4077 | # instance IP and manage which external networks can connect to the instance. |
| 4078 | # The IPv4 address cannot be disabled for Second Generation instances. |
| 4079 | "privateNetwork": "A String", # The resource link for the VPC network from which the Cloud SQL instance is |
| 4080 | # accessible for private IP. For example, |
| 4081 | # <code>/projects/myProject/global/networks/default</code>. This setting can |
| 4082 | # be updated, but it cannot be removed after it is set. |
| 4083 | "ipv4Enabled": True or False, # Whether the instance should be assigned an IP address or not. |
| 4084 | "authorizedNetworks": [ # The list of external networks that are allowed to connect to the instance |
| 4085 | # using the IP. In <a |
| 4086 | # href="http://en.wikipedia.org/wiki/CIDR_notation#CIDR_notation">CIDR |
| 4087 | # notation</a>, also known as 'slash' notation (e.g. |
| 4088 | # <code>192.168.100.0/24</code>). |
| 4089 | { # An entry for an Access Control list. |
| 4090 | "value": "A String", # The whitelisted value for the access control list. |
| 4091 | "expirationTime": "A String", # The time when this access control entry expires in <a |
| 4092 | # href="https://tools.ietf.org/html/rfc3339">RFC 3339</a> format, for example |
| 4093 | # <code>2012-11-15T16:19:00.094Z</code>. |
| 4094 | "name": "A String", # Optional. A label to identify this entry. |
| 4095 | "kind": "A String", # This is always <code>sql#aclEntry</code>. |
| 4096 | }, |
| 4097 | ], |
| 4098 | "requireSsl": True or False, # Whether SSL connections over IP should be enforced or not. |
| 4099 | }, |
| 4100 | "maintenanceWindow": { # Maintenance window. This specifies when a v2 Cloud SQL instance should # The maintenance window for this instance. This specifies when the instance |
| 4101 | # can be restarted for maintenance purposes. Not used for First Generation |
| 4102 | # instances. |
| 4103 | # preferably be restarted for system maintenance purposes. |
| 4104 | "updateTrack": "A String", # Maintenance timing setting: <code>canary</code> (Earlier) or |
| 4105 | # <code>stable</code> (Later). <br /><a |
| 4106 | # href="/sql/docs/db_path/instance-settings#maintenance-timing-2ndgen"> |
| 4107 | # Learn more</a>. |
| 4108 | "hour": 42, # hour of day - 0 to 23. |
| 4109 | "day": 42, # day of week (1-7), starting on Monday. |
| 4110 | "kind": "A String", # This is always <code>sql#maintenanceWindow</code>. |
| 4111 | }, |
Jon Wayne Parrott | 0a471d3 | 2016-05-19 10:54:38 -0700 | [diff] [blame] | 4112 | }, |
Bu Sun Kim | 6502091 | 2020-05-20 12:08:20 -0700 | [diff] [blame] | 4113 | "replicaNames": [ # The replicas of the instance. |
| 4114 | "A String", |
| 4115 | ], |
| 4116 | "diskEncryptionConfiguration": { # Disk encryption configuration for an instance. # Disk encryption configuration specific to an instance. |
| 4117 | # Applies only to Second Generation instances. |
| 4118 | "kind": "A String", # This is always <code>sql#diskEncryptionConfiguration</code>. |
| 4119 | "kmsKeyName": "A String", # Resource name of KMS key for disk encryption |
| 4120 | }, |
Bu Sun Kim | 4ed7d3f | 2020-05-27 12:20:54 -0700 | [diff] [blame^] | 4121 | "etag": "A String", # This field is deprecated and will be removed from a future version of the |
| 4122 | # API. Use the <code>settings.settingsVersion</code> field instead. |
| 4123 | "rootPassword": "A String", # Initial root password. Use only on creation. |
Bu Sun Kim | 6502091 | 2020-05-20 12:08:20 -0700 | [diff] [blame] | 4124 | "scheduledMaintenance": { # Any scheduled maintenancce for this instance. # The start time of any upcoming scheduled maintenance for this instance. |
| 4125 | "canDefer": True or False, |
| 4126 | "startTime": "A String", # The start time of any upcoming scheduled maintenance for this instance. |
| 4127 | "canReschedule": True or False, # If the scheduled maintenance can be rescheduled. |
| 4128 | }, |
Bu Sun Kim | 6502091 | 2020-05-20 12:08:20 -0700 | [diff] [blame] | 4129 | "serverCaCert": { # SslCerts Resource # SSL configuration. |
Bu Sun Kim | 4ed7d3f | 2020-05-27 12:20:54 -0700 | [diff] [blame^] | 4130 | "expirationTime": "A String", # The time when the certificate expires in <a |
| 4131 | # href="https://tools.ietf.org/html/rfc3339">RFC 3339</a> format, for example |
| 4132 | # <code>2012-11-15T16:19:00.094Z</code>. |
Bu Sun Kim | 6502091 | 2020-05-20 12:08:20 -0700 | [diff] [blame] | 4133 | "sha1Fingerprint": "A String", # Sha1 Fingerprint. |
| 4134 | "certSerialNumber": "A String", # Serial number, as extracted from the certificate. |
| 4135 | "cert": "A String", # PEM representation. |
| 4136 | "kind": "A String", # This is always <code>sql#sslCert</code>. |
| 4137 | "commonName": "A String", # User supplied name. Constrained to [a-zA-Z.-_ ]+. |
| 4138 | "createTime": "A String", # The time when the certificate was created in <a |
| 4139 | # href="https://tools.ietf.org/html/rfc3339">RFC 3339</a> format, for example |
| 4140 | # <code>2012-11-15T16:19:00.094Z</code> |
| 4141 | "instance": "A String", # Name of the database instance. |
| 4142 | "selfLink": "A String", # The URI of this resource. |
Bu Sun Kim | 6502091 | 2020-05-20 12:08:20 -0700 | [diff] [blame] | 4143 | }, |
| 4144 | "maxDiskSize": "A String", # The maximum disk size of the instance in bytes. |
| 4145 | "name": "A String", # Name of the Cloud SQL instance. This does not include the project ID. |
| 4146 | "masterInstanceName": "A String", # The name of the instance which will act as master in the replication setup. |
| 4147 | "instanceType": "A String", # The instance type. This can be one of the following. |
| 4148 | # <br><code>CLOUD_SQL_INSTANCE</code>: A Cloud SQL instance that is not |
| 4149 | # replicating from a master. <br><code>ON_PREMISES_INSTANCE</code>: An |
| 4150 | # instance running on the |
| 4151 | # customer's premises. <br><code>READ_REPLICA_INSTANCE</code>: A Cloud SQL |
| 4152 | # instance configured as a read-replica. |
| 4153 | "gceZone": "A String", # The Compute Engine zone that the instance is currently serving from. This |
| 4154 | # value could be different from the zone that was specified when the instance |
| 4155 | # was created if the instance has failed over to its secondary zone. |
| 4156 | "currentDiskSize": "A String", # The current disk usage of the instance in bytes. This property has been |
| 4157 | # deprecated. Users should use the |
| 4158 | # "cloudsql.googleapis.com/database/disk/bytes_used" metric in Cloud |
| 4159 | # Monitoring API instead. Please see <a |
| 4160 | # href="https://groups.google.com/d/msg/google-cloud-sql-announce/I_7-F9EBhT0/BtvFtdFeAgAJ">this |
| 4161 | # announcement</a> for details. |
| 4162 | "replicaConfiguration": { # Read-replica configuration for connecting to the master. # Configuration specific to failover replicas and read replicas. |
Bu Sun Kim | 4ed7d3f | 2020-05-27 12:20:54 -0700 | [diff] [blame^] | 4163 | "mysqlReplicaConfiguration": { # Read-replica configuration specific to MySQL databases. # MySQL specific configuration when replicating from a MySQL on-premises |
| 4164 | # master. Replication configuration information such as the username, |
| 4165 | # password, certificates, and keys are not stored in the instance metadata. |
| 4166 | # The configuration information is used only to set up the replication |
| 4167 | # connection and is stored by MySQL in a file named <code>master.info</code> |
| 4168 | # in the data directory. |
| 4169 | "password": "A String", # The password for the replication connection. |
| 4170 | "verifyServerCertificate": True or False, # Whether or not to check the master's Common Name value in the certificate |
| 4171 | # that it sends during the SSL handshake. |
| 4172 | "clientKey": "A String", # PEM representation of the slave's private key. The corresponsing public key |
| 4173 | # is encoded in the client's certificate. |
| 4174 | "sslCipher": "A String", # A list of permissible ciphers to use for SSL encryption. |
| 4175 | "masterHeartbeatPeriod": "A String", # Interval in milliseconds between replication heartbeats. |
| 4176 | "dumpFilePath": "A String", # Path to a SQL dump file in Google Cloud Storage from which the slave |
| 4177 | # instance is to be created. The URI is in the form gs: |
| 4178 | # //bucketName/fileName. Compressed gzip files (.gz) are also supported. |
| 4179 | # // Dumps should have the binlog co-ordinates from which replication should |
| 4180 | # // begin. This can be accomplished by setting --master-data to 1 when using |
| 4181 | # // mysqldump. |
| 4182 | "connectRetryInterval": 42, # Seconds to wait between connect retries. MySQL's default is 60 seconds. |
| 4183 | "clientCertificate": "A String", # PEM representation of the slave's x509 certificate. |
| 4184 | "username": "A String", # The username for the replication connection. |
| 4185 | "caCertificate": "A String", # PEM representation of the trusted CA's x509 certificate. |
| 4186 | "kind": "A String", # This is always <code>sql#mysqlReplicaConfiguration</code>. |
| 4187 | }, |
Bu Sun Kim | 6502091 | 2020-05-20 12:08:20 -0700 | [diff] [blame] | 4188 | "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] | 4189 | # <code>true</code> the replica will be designated as a failover replica. In |
| 4190 | # case the master instance fails, the replica instance will be promoted as |
| 4191 | # the new master instance. <p>Only one replica can be specified as failover |
| 4192 | # target, and the replica has to be in different zone with the master |
| 4193 | # instance. |
Bu Sun Kim | 6502091 | 2020-05-20 12:08:20 -0700 | [diff] [blame] | 4194 | "kind": "A String", # This is always <code>sql#replicaConfiguration</code>. |
Nathaniel Manista | 4f877e5 | 2015-06-15 16:44:50 +0000 | [diff] [blame] | 4195 | }, |
Bu Sun Kim | 6502091 | 2020-05-20 12:08:20 -0700 | [diff] [blame] | 4196 | "connectionName": "A String", # Connection name of the Cloud SQL instance used in connection strings. |
| 4197 | "failoverReplica": { # The name and status of the failover replica. This property is applicable |
| 4198 | # only to Second Generation instances. |
| 4199 | "available": True or False, # The availability status of the failover replica. A false status indicates |
| 4200 | # that the failover replica is out of sync. The master can only failover to |
| 4201 | # the failover replica when the status is true. |
| 4202 | "name": "A String", # The name of the failover replica. If specified at instance creation, a |
| 4203 | # failover replica is created for the instance. The name |
| 4204 | # doesn't include the project ID. This property is applicable only to |
| 4205 | # Second Generation instances. |
| 4206 | }, |
| 4207 | "ipAddresses": [ # The assigned IP addresses for the instance. |
| 4208 | { # Database instance IP Mapping. |
| 4209 | "timeToRetire": "A String", # The due time for this IP to be retired in <a |
| 4210 | # href="https://tools.ietf.org/html/rfc3339">RFC 3339</a> format, for example |
| 4211 | # <code>2012-11-15T16:19:00.094Z</code>. This field is only available when |
| 4212 | # the IP is scheduled to be retired. |
| 4213 | "type": "A String", # The type of this IP address. A <code>PRIMARY</code> address is a public |
| 4214 | # address that can accept incoming connections. A <code>PRIVATE</code> |
| 4215 | # address is a private address that can accept incoming connections. An |
| 4216 | # <code>OUTGOING</code> address is the source address of connections |
| 4217 | # originating from the instance, if supported. |
| 4218 | "ipAddress": "A String", # The IP address assigned. |
| 4219 | }, |
| 4220 | ], |
| 4221 | "ipv6Address": "A String", # The IPv6 address assigned to the instance. This property is applicable only |
| 4222 | # to First Generation instances. |
| 4223 | "selfLink": "A String", # The URI of this resource. |
| 4224 | "diskEncryptionStatus": { # Disk encryption status for an instance. # Disk encryption status specific to an instance. |
| 4225 | # Applies only to Second Generation instances. |
| 4226 | "kmsKeyVersionName": "A String", # KMS key version used to encrypt the Cloud SQL instance resource |
| 4227 | "kind": "A String", # This is always <code>sql#diskEncryptionStatus</code>. |
| 4228 | }, |
| 4229 | "kind": "A String", # This is always <code>sql#instance</code>. |
| 4230 | "region": "A String", # The geographical region. Can be <code>us-central</code> |
| 4231 | # (<code>FIRST_GEN</code> instances only), <code>us-central1</code> |
| 4232 | # (<code>SECOND_GEN</code> instances only), <code>asia-east1</code> or |
| 4233 | # <code>europe-west1</code>. Defaults to <code>us-central</code> or |
| 4234 | # <code>us-central1</code> depending on the instance type (First Generation |
| 4235 | # or Second Generation). The region can not be changed after instance |
| 4236 | # creation. |
| 4237 | "state": "A String", # The current serving state of the Cloud SQL instance. This can be one of the |
| 4238 | # following. <br><code>RUNNABLE</code>: The instance is running, or is ready |
| 4239 | # to run when accessed. <br><code>SUSPENDED</code>: The instance is not |
| 4240 | # available, for example due to problems with billing. |
| 4241 | # <br><code>PENDING_CREATE</code>: The instance is being created. |
| 4242 | # <br><code>MAINTENANCE</code>: The instance is down for maintenance. |
| 4243 | # <br><code>FAILED</code>: The instance creation failed. |
| 4244 | # <br><code>UNKNOWN_STATE</code>: The state of the instance is unknown. |
| 4245 | "backendType": "A String", # <code>FIRST_GEN</code>: First Generation instance. MySQL only. <br |
| 4246 | # /><code>SECOND_GEN</code>: Second Generation instance or PostgreSQL |
| 4247 | # instance. <br /><code>EXTERNAL</code>: A database server that is not |
| 4248 | # managed by Google. <br>This property is read-only; use the |
| 4249 | # <code>tier</code> property in the <code>settings</code> object to determine |
| 4250 | # the database type and Second or First Generation. |
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 | "targetLink": "A String", |
| 4265 | "operationType": "A String", # The type of the operation. Valid values are <code>CREATE</code>, |
| 4266 | # <code>DELETE</code>, <code>UPDATE</code>, <code>RESTART</code>, |
| 4267 | # <code>IMPORT</code>, <code>EXPORT</code>, <code>BACKUP_VOLUME</code>, |
| 4268 | # <code>RESTORE_VOLUME</code>, <code>CREATE_USER</code>, |
| 4269 | # <code>DELETE_USER</code>, <code>CREATE_DATABASE</code>, |
| 4270 | # <code>DELETE_DATABASE</code> . |
| 4271 | "error": { # Database instance operation errors list wrapper. # If errors occurred during processing of this operation, this field will be |
| 4272 | # populated. |
| 4273 | "errors": [ # The list of errors encountered while processing this operation. |
| 4274 | { # Database instance operation error. |
| 4275 | "kind": "A String", # This is always <code>sql#operationError</code>. |
| 4276 | "code": "A String", # Identifies the specific error that occurred. |
| 4277 | "message": "A String", # Additional information about the error encountered. |
Dan O'Meara | dd49464 | 2020-05-01 07:42:23 -0700 | [diff] [blame] | 4278 | }, |
Bu Sun Kim | 6502091 | 2020-05-20 12:08:20 -0700 | [diff] [blame] | 4279 | ], |
| 4280 | "kind": "A String", # This is always <code>sql#operationErrors</code>. |
| 4281 | }, |
| 4282 | "kind": "A String", # This is always <code>sql#operation</code>. |
| 4283 | "importContext": { # Database instance import context. # The context for import operation, if applicable. |
Bu Sun Kim | 6502091 | 2020-05-20 12:08:20 -0700 | [diff] [blame] | 4284 | "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] | 4285 | # <code>SQL</code>, this field is required only if the import file does not |
| 4286 | # specify a database, and is overridden by any database specification in the |
| 4287 | # import file. If <code>fileType</code> is <code>CSV</code>, one database |
| 4288 | # must be specified. |
Bu Sun Kim | 6502091 | 2020-05-20 12:08:20 -0700 | [diff] [blame] | 4289 | "importUser": "A String", # The PostgreSQL user for this import operation. PostgreSQL instances only. |
| 4290 | "bakImportOptions": { # Import parameters specific to SQL Server .BAK files |
| 4291 | "encryptionOptions": { |
Bu Sun Kim | 4ed7d3f | 2020-05-27 12:20:54 -0700 | [diff] [blame^] | 4292 | "pvkPassword": "A String", # Password that encrypts the private key |
Bu Sun Kim | 6502091 | 2020-05-20 12:08:20 -0700 | [diff] [blame] | 4293 | "certPath": "A String", # Path to the Certificate (.cer) in Cloud Storage, in the form |
| 4294 | # <code>gs://bucketName/fileName</code>. The instance must have |
| 4295 | # write permissions to the bucket and read access to the file. |
| 4296 | "pvkPath": "A String", # Path to the Certificate Private Key (.pvk) in Cloud Storage, in the |
| 4297 | # form <code>gs://bucketName/fileName</code>. The instance must have |
| 4298 | # write permissions to the bucket and read access to the file. |
Bu Sun Kim | 6502091 | 2020-05-20 12:08:20 -0700 | [diff] [blame] | 4299 | }, |
| 4300 | }, |
| 4301 | "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] | 4302 | # <code>gs: |
| 4303 | # //bucketName/fileName</code>. Compressed gzip files (.gz) are supported |
| 4304 | # // when <code>fileType</code> is <code>SQL</code>. The instance must have |
| 4305 | # // write permissions to the bucket and read access to the file. |
Bu Sun Kim | 6502091 | 2020-05-20 12:08:20 -0700 | [diff] [blame] | 4306 | "fileType": "A String", # The file type for the specified uri. <br><code>SQL</code>: The file |
| 4307 | # contains SQL statements. <br><code>CSV</code>: The file contains CSV data. |
Bu Sun Kim | 4ed7d3f | 2020-05-27 12:20:54 -0700 | [diff] [blame^] | 4308 | "kind": "A String", # This is always <code>sql#importContext</code>. |
| 4309 | "csvImportOptions": { # Options for importing data as CSV. |
| 4310 | "table": "A String", # The table to which CSV data is imported. |
| 4311 | "columns": [ # The columns to which CSV data is imported. If not specified, all columns |
| 4312 | # of the database table are loaded with CSV data. |
| 4313 | "A String", |
| 4314 | ], |
| 4315 | }, |
Craig Citro | e633be1 | 2015-03-02 13:40:36 -0800 | [diff] [blame] | 4316 | }, |
Bu Sun Kim | 6502091 | 2020-05-20 12:08:20 -0700 | [diff] [blame] | 4317 | "status": "A String", # The status of an operation. Valid values are <code>PENDING</code>, |
| 4318 | # <code>RUNNING</code>, <code>DONE</code>, |
| 4319 | # <code>SQL_OPERATION_STATUS_UNSPECIFIED</code>. |
| 4320 | "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] | 4321 | # identifier to retrieve the Operations resource that has information about |
| 4322 | # the operation. |
Bu Sun Kim | 6502091 | 2020-05-20 12:08:20 -0700 | [diff] [blame] | 4323 | "exportContext": { # Database instance export context. # The context for export operation, if applicable. |
Bu Sun Kim | 4ed7d3f | 2020-05-27 12:20:54 -0700 | [diff] [blame^] | 4324 | "fileType": "A String", # The file type for the specified uri. <br><code>SQL</code>: The file |
| 4325 | # contains SQL statements. <br><code>CSV</code>: The file contains CSV data. |
| 4326 | "uri": "A String", # The path to the file in Google Cloud Storage where the export will be |
| 4327 | # stored. The URI is in the form <code>gs: |
| 4328 | # //bucketName/fileName</code>. If the file already exists, the requests |
| 4329 | # // succeeds, but the operation fails. If <code>fileType</code> is |
| 4330 | # // <code>SQL</code> and the filename ends with .gz, the contents are |
| 4331 | # // compressed. |
| 4332 | "csvExportOptions": { # Options for exporting data as CSV. |
| 4333 | "selectQuery": "A String", # The select query used to extract the data. |
| 4334 | }, |
| 4335 | "kind": "A String", # This is always <code>sql#exportContext</code>. |
Bu Sun Kim | 6502091 | 2020-05-20 12:08:20 -0700 | [diff] [blame] | 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 | }, |
| 4364 | }, |
Bu Sun Kim | 6502091 | 2020-05-20 12:08:20 -0700 | [diff] [blame] | 4365 | "targetId": "A String", # Name of the database instance related to this operation. |
Bu Sun Kim | 4ed7d3f | 2020-05-27 12:20:54 -0700 | [diff] [blame^] | 4366 | "endTime": "A String", # The time this operation finished in UTC timezone in <a |
| 4367 | # href="https://tools.ietf.org/html/rfc3339">RFC 3339</a> format, for example |
| 4368 | # <code>2012-11-15T16:19:00.094Z</code>. |
| 4369 | "startTime": "A String", # The time this operation actually started in UTC timezone in <a |
| 4370 | # href="https://tools.ietf.org/html/rfc3339">RFC 3339</a> format, for example |
| 4371 | # <code>2012-11-15T16:19:00.094Z</code>. |
| 4372 | "insertTime": "A String", # The time this operation was enqueued in UTC timezone in <a |
| 4373 | # href="https://tools.ietf.org/html/rfc3339">RFC 3339</a> format, for example |
| 4374 | # <code>2012-11-15T16:19:00.094Z</code>. |
| 4375 | "user": "A String", # The email address of the user who initiated this operation. |
| 4376 | "targetProject": "A String", # The project ID of the target instance related to this operation. |
| 4377 | "selfLink": "A String", # The URI of this resource. |
Craig Citro | e633be1 | 2015-03-02 13:40:36 -0800 | [diff] [blame] | 4378 | }</pre> |
| 4379 | </div> |
| 4380 | |
| 4381 | </body></html> |