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_v1beta4.html">Cloud SQL Administration API</a> . <a href="sqladmin_v1beta4.backupRuns.html">backupRuns</a></h1> 76<h2>Instance Methods</h2> 77<p class="toc_element"> 78 <code><a href="#delete">delete(project, instance, id)</a></code></p> 79<p class="firstline">Deletes the backup taken by a backup run.</p> 80<p class="toc_element"> 81 <code><a href="#get">get(project, instance, id)</a></code></p> 82<p class="firstline">Retrieves a resource containing information about a backup run.</p> 83<p class="toc_element"> 84 <code><a href="#insert">insert(project, instance, body)</a></code></p> 85<p class="firstline">Creates a new backup run on demand. This method is applicable only to Second Generation instances.</p> 86<p class="toc_element"> 87 <code><a href="#list">list(project, instance, maxResults=None, pageToken=None)</a></code></p> 88<p class="firstline">Lists all backup runs associated with a given instance and configuration in the reverse chronological order of the enqueued time.</p> 89<p class="toc_element"> 90 <code><a href="#list_next">list_next(previous_request, previous_response)</a></code></p> 91<p class="firstline">Retrieves the next page of results.</p> 92<h3>Method Details</h3> 93<div class="method"> 94 <code class="details" id="delete">delete(project, instance, id)</code> 95 <pre>Deletes the backup taken by a backup run. 96 97Args: 98 project: string, Project ID of the project that contains the instance. (required) 99 instance: string, Cloud SQL instance ID. This does not include the project ID. (required) 100 id: string, The ID of the Backup Run to delete. To find a Backup Run ID, use the list method. (required) 101 102Returns: 103 An object of the form: 104 105 { # An Operations resource contains information about database instance operations such as create, delete, and restart. Operations resources are created in response to operations that were initiated; you never create them directly. 106 "status": "A String", # The status of an operation. Valid values are PENDING, RUNNING, DONE, UNKNOWN. 107 "importContext": { # Database instance import context. # The context for import operation, if applicable. 108 "kind": "sql#importContext", # This is always sql#importContext. 109 "database": "A String", # The database (for example, guestbook) to which the import is made. If fileType is SQL and no database is specified, it is assumed that the database is specified in the file to be imported. If fileType is CSV, it must be specified. 110 "fileType": "A String", # The file type for the specified uri. 111 # SQL: The file contains SQL statements. 112 # CSV: The file contains CSV data. 113 "uri": "A String", # A path to the file in Google Cloud Storage from which the import is made. The URI is in the form gs://bucketName/fileName. Compressed gzip files (.gz) are supported when fileType is SQL. 114 "importUser": "A String", # The PostgreSQL user to use for this import operation. Defaults to cloudsqlsuperuser. Does not apply to MySQL instances. 115 "csvImportOptions": { # Options for importing data as CSV. 116 "table": "A String", # The table to which CSV data is imported. 117 "columns": [ # The columns to which CSV data is imported. If not specified, all columns of the database table are loaded with CSV data. 118 "A String", 119 ], 120 }, 121 }, 122 "kind": "sql#operation", # This is always sql#operation. 123 "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. 124 "exportContext": { # Database instance export context. # The context for export operation, if applicable. 125 "kind": "sql#exportContext", # This is always sql#exportContext. 126 "fileType": "A String", # The file type for the specified uri. 127 # SQL: The file contains SQL statements. 128 # CSV: The file contains CSV data. 129 "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 operation fails. If fileType is SQL and the filename ends with .gz, the contents are compressed. 130 "csvExportOptions": { # Options for exporting data as CSV. 131 "selectQuery": "A String", # The select query used to extract the data. 132 }, 133 "databases": [ # Databases (for example, guestbook) from which the export is made. If fileType is SQL and no database is specified, all databases are exported. If fileType is CSV, you can optionally specify at most one database to export. If csvExportOptions.selectQuery also specifies the database, this field will be ignored. 134 "A String", 135 ], 136 "sqlExportOptions": { # Options for exporting data as SQL statements. 137 "tables": [ # Tables to export, or that were exported, from the specified database. If you specify tables, specify one and only one database. 138 "A String", 139 ], 140 "schemaOnly": True or False, # Export only schemas. 141 }, 142 }, 143 "startTime": "A String", # The time this operation actually started in UTC timezone in RFC 3339 format, for example 2012-11-15T16:19:00.094Z. 144 "targetProject": "A String", # The project ID of the target instance related to this operation. 145 "targetId": "A String", # Name of the database instance related to this operation. 146 "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 . 147 "targetLink": "A String", 148 "insertTime": "A String", # The time this operation was enqueued in UTC timezone in RFC 3339 format, for example 2012-11-15T16:19:00.094Z. 149 "error": { # Database instance operation errors list wrapper. # If errors occurred during processing of this operation, this field will be populated. 150 "kind": "sql#operationErrors", # This is always sql#operationErrors. 151 "errors": [ # The list of errors encountered while processing this operation. 152 { # Database instance operation error. 153 "kind": "sql#operationError", # This is always sql#operationError. 154 "code": "A String", # Identifies the specific error that occurred. 155 "message": "A String", # Additional information about the error encountered. 156 }, 157 ], 158 }, 159 "endTime": "A String", # The time this operation finished in UTC timezone in RFC 3339 format, for example 2012-11-15T16:19:00.094Z. 160 "selfLink": "A String", # The URI of this resource. 161 "user": "A String", # The email address of the user who initiated this operation. 162 }</pre> 163</div> 164 165<div class="method"> 166 <code class="details" id="get">get(project, instance, id)</code> 167 <pre>Retrieves a resource containing information about a backup run. 168 169Args: 170 project: string, Project ID of the project that contains the instance. (required) 171 instance: string, Cloud SQL instance ID. This does not include the project ID. (required) 172 id: string, The ID of this Backup Run. (required) 173 174Returns: 175 An object of the form: 176 177 { # A database instance backup run resource. 178 "status": "A String", # The status of this run. 179 "kind": "sql#backupRun", # This is always sql#backupRun. 180 "description": "A String", # The description of this run, only applicable to on-demand backups. 181 "windowStartTime": "A String", # The start time of the backup window during which this the backup was attempted in RFC 3339 format, for example 2012-11-15T16:19:00.094Z. 182 "enqueuedTime": "A String", # The time the run was enqueued in UTC timezone in RFC 3339 format, for example 2012-11-15T16:19:00.094Z. 183 "instance": "A String", # Name of the database instance. 184 "startTime": "A String", # The time the backup operation actually started in UTC timezone in RFC 3339 format, for example 2012-11-15T16:19:00.094Z. 185 "error": { # Database instance operation error. # Information about why the backup operation failed. This is only present if the run has the FAILED status. 186 "kind": "sql#operationError", # This is always sql#operationError. 187 "code": "A String", # Identifies the specific error that occurred. 188 "message": "A String", # Additional information about the error encountered. 189 }, 190 "endTime": "A String", # The time the backup operation completed in UTC timezone in RFC 3339 format, for example 2012-11-15T16:19:00.094Z. 191 "type": "A String", # The type of this run; can be either "AUTOMATED" or "ON_DEMAND". 192 "id": "A String", # A unique identifier for this backup run. Note that this is unique only within the scope of a particular Cloud SQL instance. 193 "selfLink": "A String", # The URI of this resource. 194 }</pre> 195</div> 196 197<div class="method"> 198 <code class="details" id="insert">insert(project, instance, body)</code> 199 <pre>Creates a new backup run on demand. This method is applicable only to Second Generation instances. 200 201Args: 202 project: string, Project ID of the project that contains the instance. (required) 203 instance: string, Cloud SQL instance ID. This does not include the project ID. (required) 204 body: object, The request body. (required) 205 The object takes the form of: 206 207{ # A database instance backup run resource. 208 "status": "A String", # The status of this run. 209 "kind": "sql#backupRun", # This is always sql#backupRun. 210 "description": "A String", # The description of this run, only applicable to on-demand backups. 211 "windowStartTime": "A String", # The start time of the backup window during which this the backup was attempted in RFC 3339 format, for example 2012-11-15T16:19:00.094Z. 212 "enqueuedTime": "A String", # The time the run was enqueued in UTC timezone in RFC 3339 format, for example 2012-11-15T16:19:00.094Z. 213 "instance": "A String", # Name of the database instance. 214 "startTime": "A String", # The time the backup operation actually started in UTC timezone in RFC 3339 format, for example 2012-11-15T16:19:00.094Z. 215 "error": { # Database instance operation error. # Information about why the backup operation failed. This is only present if the run has the FAILED status. 216 "kind": "sql#operationError", # This is always sql#operationError. 217 "code": "A String", # Identifies the specific error that occurred. 218 "message": "A String", # Additional information about the error encountered. 219 }, 220 "endTime": "A String", # The time the backup operation completed in UTC timezone in RFC 3339 format, for example 2012-11-15T16:19:00.094Z. 221 "type": "A String", # The type of this run; can be either "AUTOMATED" or "ON_DEMAND". 222 "id": "A String", # A unique identifier for this backup run. Note that this is unique only within the scope of a particular Cloud SQL instance. 223 "selfLink": "A String", # The URI of this resource. 224 } 225 226 227Returns: 228 An object of the form: 229 230 { # An Operations resource contains information about database instance operations such as create, delete, and restart. Operations resources are created in response to operations that were initiated; you never create them directly. 231 "status": "A String", # The status of an operation. Valid values are PENDING, RUNNING, DONE, UNKNOWN. 232 "importContext": { # Database instance import context. # The context for import operation, if applicable. 233 "kind": "sql#importContext", # This is always sql#importContext. 234 "database": "A String", # The database (for example, guestbook) to which the import is made. If fileType is SQL and no database is specified, it is assumed that the database is specified in the file to be imported. If fileType is CSV, it must be specified. 235 "fileType": "A String", # The file type for the specified uri. 236 # SQL: The file contains SQL statements. 237 # CSV: The file contains CSV data. 238 "uri": "A String", # A path to the file in Google Cloud Storage from which the import is made. The URI is in the form gs://bucketName/fileName. Compressed gzip files (.gz) are supported when fileType is SQL. 239 "importUser": "A String", # The PostgreSQL user to use for this import operation. Defaults to cloudsqlsuperuser. Does not apply to MySQL instances. 240 "csvImportOptions": { # Options for importing data as CSV. 241 "table": "A String", # The table to which CSV data is imported. 242 "columns": [ # The columns to which CSV data is imported. If not specified, all columns of the database table are loaded with CSV data. 243 "A String", 244 ], 245 }, 246 }, 247 "kind": "sql#operation", # This is always sql#operation. 248 "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. 249 "exportContext": { # Database instance export context. # The context for export operation, if applicable. 250 "kind": "sql#exportContext", # This is always sql#exportContext. 251 "fileType": "A String", # The file type for the specified uri. 252 # SQL: The file contains SQL statements. 253 # CSV: The file contains CSV data. 254 "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 operation fails. If fileType is SQL and the filename ends with .gz, the contents are compressed. 255 "csvExportOptions": { # Options for exporting data as CSV. 256 "selectQuery": "A String", # The select query used to extract the data. 257 }, 258 "databases": [ # Databases (for example, guestbook) from which the export is made. If fileType is SQL and no database is specified, all databases are exported. If fileType is CSV, you can optionally specify at most one database to export. If csvExportOptions.selectQuery also specifies the database, this field will be ignored. 259 "A String", 260 ], 261 "sqlExportOptions": { # Options for exporting data as SQL statements. 262 "tables": [ # Tables to export, or that were exported, from the specified database. If you specify tables, specify one and only one database. 263 "A String", 264 ], 265 "schemaOnly": True or False, # Export only schemas. 266 }, 267 }, 268 "startTime": "A String", # The time this operation actually started in UTC timezone in RFC 3339 format, for example 2012-11-15T16:19:00.094Z. 269 "targetProject": "A String", # The project ID of the target instance related to this operation. 270 "targetId": "A String", # Name of the database instance related to this operation. 271 "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 . 272 "targetLink": "A String", 273 "insertTime": "A String", # The time this operation was enqueued in UTC timezone in RFC 3339 format, for example 2012-11-15T16:19:00.094Z. 274 "error": { # Database instance operation errors list wrapper. # If errors occurred during processing of this operation, this field will be populated. 275 "kind": "sql#operationErrors", # This is always sql#operationErrors. 276 "errors": [ # The list of errors encountered while processing this operation. 277 { # Database instance operation error. 278 "kind": "sql#operationError", # This is always sql#operationError. 279 "code": "A String", # Identifies the specific error that occurred. 280 "message": "A String", # Additional information about the error encountered. 281 }, 282 ], 283 }, 284 "endTime": "A String", # The time this operation finished in UTC timezone in RFC 3339 format, for example 2012-11-15T16:19:00.094Z. 285 "selfLink": "A String", # The URI of this resource. 286 "user": "A String", # The email address of the user who initiated this operation. 287 }</pre> 288</div> 289 290<div class="method"> 291 <code class="details" id="list">list(project, instance, maxResults=None, pageToken=None)</code> 292 <pre>Lists all backup runs associated with a given instance and configuration in the reverse chronological order of the enqueued time. 293 294Args: 295 project: string, Project ID of the project that contains the instance. (required) 296 instance: string, Cloud SQL instance ID. This does not include the project ID. (required) 297 maxResults: integer, Maximum number of backup runs per response. 298 pageToken: string, A previously-returned page token representing part of the larger set of results to view. 299 300Returns: 301 An object of the form: 302 303 { # Backup run list results. 304 "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. 305 "items": [ # A list of backup runs in reverse chronological order of the enqueued time. 306 { # A database instance backup run resource. 307 "status": "A String", # The status of this run. 308 "kind": "sql#backupRun", # This is always sql#backupRun. 309 "description": "A String", # The description of this run, only applicable to on-demand backups. 310 "windowStartTime": "A String", # The start time of the backup window during which this the backup was attempted in RFC 3339 format, for example 2012-11-15T16:19:00.094Z. 311 "enqueuedTime": "A String", # The time the run was enqueued in UTC timezone in RFC 3339 format, for example 2012-11-15T16:19:00.094Z. 312 "instance": "A String", # Name of the database instance. 313 "startTime": "A String", # The time the backup operation actually started in UTC timezone in RFC 3339 format, for example 2012-11-15T16:19:00.094Z. 314 "error": { # Database instance operation error. # Information about why the backup operation failed. This is only present if the run has the FAILED status. 315 "kind": "sql#operationError", # This is always sql#operationError. 316 "code": "A String", # Identifies the specific error that occurred. 317 "message": "A String", # Additional information about the error encountered. 318 }, 319 "endTime": "A String", # The time the backup operation completed in UTC timezone in RFC 3339 format, for example 2012-11-15T16:19:00.094Z. 320 "type": "A String", # The type of this run; can be either "AUTOMATED" or "ON_DEMAND". 321 "id": "A String", # A unique identifier for this backup run. Note that this is unique only within the scope of a particular Cloud SQL instance. 322 "selfLink": "A String", # The URI of this resource. 323 }, 324 ], 325 "kind": "sql#backupRunsList", # This is always sql#backupRunsList. 326 }</pre> 327</div> 328 329<div class="method"> 330 <code class="details" id="list_next">list_next(previous_request, previous_response)</code> 331 <pre>Retrieves the next page of results. 332 333Args: 334 previous_request: The request for the previous page. (required) 335 previous_response: The response from the request for the previous page. (required) 336 337Returns: 338 A request object that you can call 'execute()' on to request the next 339 page. Returns None if there are no more items in the collection. 340 </pre> 341</div> 342 343</body></html>