1<html><body> 2<style> 3 4body, 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 15body { 16 font-size: 13px; 17 padding: 1em; 18} 19 20h1 { 21 font-size: 26px; 22 margin-bottom: 1em; 23} 24 25h2 { 26 font-size: 24px; 27 margin-bottom: 1em; 28} 29 30h3 { 31 font-size: 20px; 32 margin-bottom: 1em; 33 margin-top: 1em; 34} 35 36pre, code { 37 line-height: 1.5; 38 font-family: Monaco, 'DejaVu Sans Mono', 'Bitstream Vera Sans Mono', 'Lucida Console', monospace; 39} 40 41pre { 42 margin-top: 0.5em; 43} 44 45h1, h2, h3, p { 46 font-family: Arial, sans serif; 47} 48 49h1, 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 75<h1><a href="sqladmin_v1.html">Cloud SQL Admin API</a> . <a href="sqladmin_v1.operations.html">operations</a></h1> 76<h2>Instance Methods</h2> 77<p class="toc_element"> 78 <code><a href="#close">close()</a></code></p> 79<p class="firstline">Close httplib2 connections.</p> 80<p class="toc_element"> 81 <code><a href="#get">get(project, operation, x__xgafv=None)</a></code></p> 82<p class="firstline">Retrieves an instance operation that has been performed on an instance.</p> 83<p class="toc_element"> 84 <code><a href="#list">list(project, instance=None, maxResults=None, pageToken=None, x__xgafv=None)</a></code></p> 85<p class="firstline">Lists all instance operations that have been performed on the given Cloud SQL instance in the reverse chronological order of the start time.</p> 86<p class="toc_element"> 87 <code><a href="#list_next">list_next(previous_request, previous_response)</a></code></p> 88<p class="firstline">Retrieves the next page of results.</p> 89<h3>Method Details</h3> 90<div class="method"> 91 <code class="details" id="close">close()</code> 92 <pre>Close httplib2 connections.</pre> 93</div> 94 95<div class="method"> 96 <code class="details" id="get">get(project, operation, x__xgafv=None)</code> 97 <pre>Retrieves an instance operation that has been performed on an instance. 98 99Args: 100 project: string, Project ID of the project that contains the instance. (required) 101 operation: string, Instance operation ID. (required) 102 x__xgafv: string, V1 error format. 103 Allowed values 104 1 - v1 error format 105 2 - v2 error format 106 107Returns: 108 An object of the form: 109 110 { # An Operation resource. For successful operations that return an Operation resource, only the fields relevant to the operation are populated in the resource. 111 "backupContext": { # Backup context. # The context for backup operation, if applicable. 112 "backupId": "A String", # The identifier of the backup. 113 "kind": "A String", # This is always **sql#backupContext**. 114 }, 115 "endTime": "A String", # The time this operation finished in UTC timezone in [RFC 3339](https://tools.ietf.org/html/rfc3339) format, for example **2012-11-15T16:19:00.094Z**. 116 "error": { # Database instance operation errors list wrapper. # If errors occurred during processing of this operation, this field will be populated. 117 "errors": [ # The list of errors encountered while processing this operation. 118 { # Database instance operation error. 119 "code": "A String", # Identifies the specific error that occurred. 120 "kind": "A String", # This is always **sql#operationError**. 121 "message": "A String", # Additional information about the error encountered. 122 }, 123 ], 124 "kind": "A String", # This is always **sql#operationErrors**. 125 }, 126 "exportContext": { # Database instance export context. # The context for export operation, if applicable. 127 "csvExportOptions": { # Options for exporting data as CSV. **MySQL** and **PostgreSQL** instances only. 128 "escapeCharacter": "A String", # Specifies the character that should appear before a data character that needs to be escaped. 129 "fieldsTerminatedBy": "A String", # Specifies the character that separates columns within each row (line) of the file. 130 "linesTerminatedBy": "A String", # This is used to separate lines. If a line does not contain all fields, the rest of the columns are set to their default values. 131 "quoteCharacter": "A String", # Specifies the quoting character to be used when a data value is quoted. 132 "selectQuery": "A String", # The select query used to extract the data. 133 }, 134 "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. **SQL Server instances:** You must specify one database to be exported, and the **fileType** must be **BAK**. 135 "A String", 136 ], 137 "fileType": "A String", # The file type for the specified uri. 138 "kind": "A String", # This is always **sql#exportContext**. 139 "offload": True or False, # Option for export offload. 140 "sqlExportOptions": { # Options for exporting data as SQL statements. 141 "mysqlExportOptions": { # Options for exporting from MySQL. 142 "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. 143 }, 144 "schemaOnly": True or False, # Export only schemas. 145 "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. 146 "A String", 147 ], 148 }, 149 "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 request succeeds, but the operation fails. If **fileType** is **SQL** and the filename ends with .gz, the contents are compressed. 150 }, 151 "importContext": { # Database instance import context. # The context for import operation, if applicable. 152 "bakImportOptions": { # Import parameters specific to SQL Server .BAK files 153 "encryptionOptions": { 154 "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. 155 "pvkPassword": "A String", # Password that encrypts the private key 156 "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. 157 }, 158 }, 159 "csvImportOptions": { # Options for importing data as CSV. 160 "columns": [ # The columns to which CSV data is imported. If not specified, all columns of the database table are loaded with CSV data. 161 "A String", 162 ], 163 "escapeCharacter": "A String", # Specifies the character that should appear before a data character that needs to be escaped. 164 "fieldsTerminatedBy": "A String", # Specifies the character that separates columns within each row (line) of the file. 165 "linesTerminatedBy": "A String", # This is used to separate lines. If a line does not contain all fields, the rest of the columns are set to their default values. 166 "quoteCharacter": "A String", # Specifies the quoting character to be used when a data value is quoted. 167 "table": "A String", # The table to which CSV data is imported. 168 }, 169 "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. 170 "fileType": "A String", # The file type for the specified uri. **SQL**: The file contains SQL statements. **CSV**: The file contains CSV data. 171 "importUser": "A String", # The PostgreSQL user for this import operation. PostgreSQL instances only. 172 "kind": "A String", # This is always **sql#importContext**. 173 "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. 174 }, 175 "insertTime": "A String", # The time this operation was enqueued in UTC timezone in [RFC 3339](https://tools.ietf.org/html/rfc3339) format, for example **2012-11-15T16:19:00.094Z**. 176 "kind": "A String", # This is always **sql#operation**. 177 "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. 178 "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** 179 "selfLink": "A String", # The URI of this resource. 180 "startTime": "A String", # The time this operation actually started in UTC timezone in [RFC 3339](https://tools.ietf.org/html/rfc3339) format, for example **2012-11-15T16:19:00.094Z**. 181 "status": "A String", # The status of an operation. 182 "targetId": "A String", # Name of the database instance related to this operation. 183 "targetLink": "A String", 184 "targetProject": "A String", # The project ID of the target instance related to this operation. 185 "user": "A String", # The email address of the user who initiated this operation. 186}</pre> 187</div> 188 189<div class="method"> 190 <code class="details" id="list">list(project, instance=None, maxResults=None, pageToken=None, x__xgafv=None)</code> 191 <pre>Lists all instance operations that have been performed on the given Cloud SQL instance in the reverse chronological order of the start time. 192 193Args: 194 project: string, Project ID of the project that contains the instance. (required) 195 instance: string, Cloud SQL instance ID. This does not include the project ID. 196 maxResults: integer, Maximum number of operations per response. 197 pageToken: string, A previously-returned page token representing part of the larger set of results to view. 198 x__xgafv: string, V1 error format. 199 Allowed values 200 1 - v1 error format 201 2 - v2 error format 202 203Returns: 204 An object of the form: 205 206 { # Operations list response. 207 "items": [ # List of operation resources. 208 { # An Operation resource. For successful operations that return an Operation resource, only the fields relevant to the operation are populated in the resource. 209 "backupContext": { # Backup context. # The context for backup operation, if applicable. 210 "backupId": "A String", # The identifier of the backup. 211 "kind": "A String", # This is always **sql#backupContext**. 212 }, 213 "endTime": "A String", # The time this operation finished in UTC timezone in [RFC 3339](https://tools.ietf.org/html/rfc3339) format, for example **2012-11-15T16:19:00.094Z**. 214 "error": { # Database instance operation errors list wrapper. # If errors occurred during processing of this operation, this field will be populated. 215 "errors": [ # The list of errors encountered while processing this operation. 216 { # Database instance operation error. 217 "code": "A String", # Identifies the specific error that occurred. 218 "kind": "A String", # This is always **sql#operationError**. 219 "message": "A String", # Additional information about the error encountered. 220 }, 221 ], 222 "kind": "A String", # This is always **sql#operationErrors**. 223 }, 224 "exportContext": { # Database instance export context. # The context for export operation, if applicable. 225 "csvExportOptions": { # Options for exporting data as CSV. **MySQL** and **PostgreSQL** instances only. 226 "escapeCharacter": "A String", # Specifies the character that should appear before a data character that needs to be escaped. 227 "fieldsTerminatedBy": "A String", # Specifies the character that separates columns within each row (line) of the file. 228 "linesTerminatedBy": "A String", # This is used to separate lines. If a line does not contain all fields, the rest of the columns are set to their default values. 229 "quoteCharacter": "A String", # Specifies the quoting character to be used when a data value is quoted. 230 "selectQuery": "A String", # The select query used to extract the data. 231 }, 232 "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. **SQL Server instances:** You must specify one database to be exported, and the **fileType** must be **BAK**. 233 "A String", 234 ], 235 "fileType": "A String", # The file type for the specified uri. 236 "kind": "A String", # This is always **sql#exportContext**. 237 "offload": True or False, # Option for export offload. 238 "sqlExportOptions": { # Options for exporting data as SQL statements. 239 "mysqlExportOptions": { # Options for exporting from MySQL. 240 "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. 241 }, 242 "schemaOnly": True or False, # Export only schemas. 243 "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. 244 "A String", 245 ], 246 }, 247 "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 request succeeds, but the operation fails. If **fileType** is **SQL** and the filename ends with .gz, the contents are compressed. 248 }, 249 "importContext": { # Database instance import context. # The context for import operation, if applicable. 250 "bakImportOptions": { # Import parameters specific to SQL Server .BAK files 251 "encryptionOptions": { 252 "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. 253 "pvkPassword": "A String", # Password that encrypts the private key 254 "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. 255 }, 256 }, 257 "csvImportOptions": { # Options for importing data as CSV. 258 "columns": [ # The columns to which CSV data is imported. If not specified, all columns of the database table are loaded with CSV data. 259 "A String", 260 ], 261 "escapeCharacter": "A String", # Specifies the character that should appear before a data character that needs to be escaped. 262 "fieldsTerminatedBy": "A String", # Specifies the character that separates columns within each row (line) of the file. 263 "linesTerminatedBy": "A String", # This is used to separate lines. If a line does not contain all fields, the rest of the columns are set to their default values. 264 "quoteCharacter": "A String", # Specifies the quoting character to be used when a data value is quoted. 265 "table": "A String", # The table to which CSV data is imported. 266 }, 267 "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. 268 "fileType": "A String", # The file type for the specified uri. **SQL**: The file contains SQL statements. **CSV**: The file contains CSV data. 269 "importUser": "A String", # The PostgreSQL user for this import operation. PostgreSQL instances only. 270 "kind": "A String", # This is always **sql#importContext**. 271 "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. 272 }, 273 "insertTime": "A String", # The time this operation was enqueued in UTC timezone in [RFC 3339](https://tools.ietf.org/html/rfc3339) format, for example **2012-11-15T16:19:00.094Z**. 274 "kind": "A String", # This is always **sql#operation**. 275 "name": "A String", # An identifier that uniquely identifies the operation. You can use this identifier to retrieve the Operations resource that has information about the operation. 276 "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** 277 "selfLink": "A String", # The URI of this resource. 278 "startTime": "A String", # The time this operation actually started in UTC timezone in [RFC 3339](https://tools.ietf.org/html/rfc3339) format, for example **2012-11-15T16:19:00.094Z**. 279 "status": "A String", # The status of an operation. 280 "targetId": "A String", # Name of the database instance related to this operation. 281 "targetLink": "A String", 282 "targetProject": "A String", # The project ID of the target instance related to this operation. 283 "user": "A String", # The email address of the user who initiated this operation. 284 }, 285 ], 286 "kind": "A String", # This is always **sql#operationsList**. 287 "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. 288}</pre> 289</div> 290 291<div class="method"> 292 <code class="details" id="list_next">list_next(previous_request, previous_response)</code> 293 <pre>Retrieves the next page of results. 294 295Args: 296 previous_request: The request for the previous page. (required) 297 previous_response: The response from the request for the previous page. (required) 298 299Returns: 300 A request object that you can call 'execute()' on to request the next 301 page. Returns None if there are no more items in the collection. 302 </pre> 303</div> 304 305</body></html>