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