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