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.

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: Specify exactly one database to be exported. If fileType is CSV, this database must match the database used in the csvExportOptions.selectQuery property.

exportContext.sqlExportOptions

object

Options for exporting data as SQL statements.

exportContext.sqlExportOptions.tables[]

list

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.

exportContext.csvExportOptions

object

Options for exporting data as CSV.

exportContext.csvExportOptions.selectQuery

string

The select query used to extract the data.

exportContext.sqlExportOptions.schemaOnly

boolean

Export only schemas.

exportContext.sqlExportOptions.mysqlExportOptions

object

Options for exporting from MySQL.

exportContext.sqlExportOptions.mysqlExportOptions.masterData

integer

Option to include SQL statement required to set up replication. If set to 1, the dump file includes a CHANGE MASTER TO statement with the binary log coordinates. If set to 2, the CHANGE MASTER TO statement is written as a SQL comment, and has no effect. All other values are ignored.

Response

If successful, this method returns an operation resource in the response body. Note that only the fields that are relevant to the export operation will be populated.

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.

importContext.database

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.

importContext.csvImportOptions

object

Options for importing data as CSV.

importContext.csvImportOptions.table

string

The table to which CSV data is imported.

importContext.csvImportOptions.columns[]

list

The columns to which CSV data is imported. If not specified, all columns of the database table are loaded with CSV data.

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.

exportContext.databases[]

list

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: Specify exactly one database to be exported. If fileType is CSV, this database must match the database used in the csvExportOptions.selectQuery property.

exportContext.sqlExportOptions

object

Options for exporting data as SQL statements.

exportContext.sqlExportOptions.tables[]

list

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.

exportContext.csvExportOptions

object

Options for exporting data as CSV.

exportContext.csvExportOptions.selectQuery

string

The select query used to extract the data.

error.kind

string

This is always sql#operationErrors.

exportContext.sqlExportOptions.schemaOnly

boolean

Export only schemas.

importContext.importUser

string

The PostgreSQL user for this import operation. PostgreSQL instances only.

exportContext.sqlExportOptions.mysqlExportOptions

object

Options for exporting from MySQL.

exportContext.sqlExportOptions.mysqlExportOptions.masterData

integer

Option to include SQL statement required to set up replication. If set to 1, the dump file includes a CHANGE MASTER TO statement with the binary log coordinates. If set to 2, the CHANGE MASTER TO statement is written as a SQL comment, and has no effect. All other values are ignored.