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