Reference documentation and code samples for the Google Cloud Sql Admin V1 Client class ExportContext.
Database instance export context.
Generated from protobuf messagegoogle.cloud.sql.v1.ExportContext
Namespace
Google \ Cloud \ Sql \ V1
Methods
__construct
Constructor.
Parameters
Name
Description
data
array
Optional. Data for populating the Message object.
↳ uri
string
The path to the file in Google Cloud Storage where the export will be stored. The URI is in the formgs://bucketName/fileName. If the file already exists, the request succeeds, but the operation fails. IffileTypeisSQLand the filename ends with .gz, the contents are compressed.
↳ databases
array
Databases to be exported. MySQL instances:IffileTypeisSQLand no database is specified, all databases are exported, except for themysqlsystem database. IffileTypeisCSV, you can specify one database, either by using this property or by using thecsvExportOptions.selectQueryproperty, which takes precedence over this property. PostgreSQL instances:You must specify one database to be exported. IffileTypeisCSV, this database must match the one specified in thecsvExportOptions.selectQueryproperty. SQL Server instances:You must specify one database to be exported, and thefileTypemust beBAK.
The path to the file in Google Cloud Storage where the export will be
stored. The URI is in the formgs://bucketName/fileName. If the file
already exists, the request succeeds, but the operation fails. IffileTypeisSQLand the filename ends with .gz,
the contents are compressed.
Returns
Type
Description
string
setUri
The path to the file in Google Cloud Storage where the export will be
stored. The URI is in the formgs://bucketName/fileName. If the file
already exists, the request succeeds, but the operation fails. IffileTypeisSQLand the filename ends with .gz,
the contents are compressed.
Parameter
Name
Description
var
string
Returns
Type
Description
$this
getDatabases
Databases to be exported. MySQL instances:IffileTypeisSQLand no database is specified, all
databases are exported, except for themysqlsystem database.
IffileTypeisCSV, you can specify one database,
either by using this property or by using thecsvExportOptions.selectQueryproperty, which takes precedence
over this property. PostgreSQL instances:You must specify
one database to be exported. IffileTypeisCSV,
this database must match the one specified in thecsvExportOptions.selectQueryproperty. SQL Server
instances:You must specify one database to be exported, and thefileTypemust beBAK.
Databases to be exported. MySQL instances:IffileTypeisSQLand no database is specified, all
databases are exported, except for themysqlsystem database.
IffileTypeisCSV, you can specify one database,
either by using this property or by using thecsvExportOptions.selectQueryproperty, which takes precedence
over this property. PostgreSQL instances:You must specify
one database to be exported. IffileTypeisCSV,
this database must match the one specified in thecsvExportOptions.selectQueryproperty. SQL Server
instances:You must specify one database to be exported, and thefileTypemust beBAK.
[[["Easy to understand","easyToUnderstand","thumb-up"],["Solved my problem","solvedMyProblem","thumb-up"],["Other","otherUp","thumb-up"]],[["Hard to understand","hardToUnderstand","thumb-down"],["Incorrect information or sample code","incorrectInformationOrSampleCode","thumb-down"],["Missing the information/samples I need","missingTheInformationSamplesINeed","thumb-down"],["Other","otherDown","thumb-down"]],["Last updated 2025-09-04 UTC."],[],[],null,["# Google Cloud Sql Admin V1 Client - Class ExportContext (1.2.6)\n\nVersion latestkeyboard_arrow_down\n\n- [1.2.6 (latest)](/php/docs/reference/cloud-sql-admin/latest/V1.ExportContext)\n- [1.2.5](/php/docs/reference/cloud-sql-admin/1.2.5/V1.ExportContext)\n- [1.1.0](/php/docs/reference/cloud-sql-admin/1.1.0/V1.ExportContext)\n- [1.0.0](/php/docs/reference/cloud-sql-admin/1.0.0/V1.ExportContext)\n- [0.19.0](/php/docs/reference/cloud-sql-admin/0.19.0/V1.ExportContext)\n- [0.18.0](/php/docs/reference/cloud-sql-admin/0.18.0/V1.ExportContext)\n- [0.17.1](/php/docs/reference/cloud-sql-admin/0.17.1/V1.ExportContext)\n- [0.16.1](/php/docs/reference/cloud-sql-admin/0.16.1/V1.ExportContext)\n- [0.12.0](/php/docs/reference/cloud-sql-admin/0.12.0/V1.ExportContext)\n- [0.11.0](/php/docs/reference/cloud-sql-admin/0.11.0/V1.ExportContext)\n- [0.10.0](/php/docs/reference/cloud-sql-admin/0.10.0/V1.ExportContext)\n- [0.9.0](/php/docs/reference/cloud-sql-admin/0.9.0/V1.ExportContext)\n- [0.8.0](/php/docs/reference/cloud-sql-admin/0.8.0/V1.ExportContext)\n- [0.7.0](/php/docs/reference/cloud-sql-admin/0.7.0/V1.ExportContext)\n- [0.6.0](/php/docs/reference/cloud-sql-admin/0.6.0/V1.ExportContext)\n- [0.5.0](/php/docs/reference/cloud-sql-admin/0.5.0/V1.ExportContext)\n- [0.4.1](/php/docs/reference/cloud-sql-admin/0.4.1/V1.ExportContext)\n- [0.3.1](/php/docs/reference/cloud-sql-admin/0.3.1/V1.ExportContext)\n- [0.2.12](/php/docs/reference/cloud-sql-admin/0.2.12/V1.ExportContext) \nReference documentation and code samples for the Google Cloud Sql Admin V1 Client class ExportContext.\n\nDatabase instance export context.\n\nGenerated from protobuf message `google.cloud.sql.v1.ExportContext`\n\nNamespace\n---------\n\nGoogle \\\\ Cloud \\\\ Sql \\\\ V1\n\nMethods\n-------\n\n### __construct\n\nConstructor.\n\n### getUri\n\nThe path to the file in Google Cloud Storage where the export will be\nstored. The URI is in the form `gs://bucketName/fileName`. If the file\nalready exists, the request succeeds, but the operation fails. If\n`fileType` is `SQL` and the filename ends with .gz,\nthe contents are compressed.\n\n### setUri\n\nThe path to the file in Google Cloud Storage where the export will be\nstored. The URI is in the form `gs://bucketName/fileName`. If the file\nalready exists, the request succeeds, but the operation fails. If\n`fileType` is `SQL` and the filename ends with .gz,\nthe contents are compressed.\n\n### getDatabases\n\nDatabases to be exported. \n`MySQL instances:` If\n`fileType` is `SQL` and no database is specified, all\ndatabases are exported, except for the `mysql` system database.\n\nIf `fileType` is `CSV`, you can specify one database,\neither by using this property or by using the\n`csvExportOptions.selectQuery` property, which takes precedence\nover this property. \n`PostgreSQL instances:` You must specify\none database to be exported. If `fileType` is `CSV`,\nthis database must match the one specified in the\n`csvExportOptions.selectQuery` property. \n`SQL Server\ninstances:` You must specify one database to be exported, and the\n`fileType` must be `BAK`.\n\n### setDatabases\n\nDatabases to be exported. \n`MySQL instances:` If\n`fileType` is `SQL` and no database is specified, all\ndatabases are exported, except for the `mysql` system database.\n\nIf `fileType` is `CSV`, you can specify one database,\neither by using this property or by using the\n`csvExportOptions.selectQuery` property, which takes precedence\nover this property. \n`PostgreSQL instances:` You must specify\none database to be exported. If `fileType` is `CSV`,\nthis database must match the one specified in the\n`csvExportOptions.selectQuery` property. \n`SQL Server\ninstances:` You must specify one database to be exported, and the\n`fileType` must be `BAK`.\n\n### getKind\n\nThis is always `sql#exportContext`.\n\n### setKind\n\nThis is always `sql#exportContext`.\n\n### getSqlExportOptions\n\nOptions for exporting data as SQL statements.\n\n### hasSqlExportOptions\n\n### clearSqlExportOptions\n\n### setSqlExportOptions\n\nOptions for exporting data as SQL statements.\n\n### getCsvExportOptions\n\nOptions for exporting data as CSV. `MySQL` and `PostgreSQL`\ninstances only.\n\n### hasCsvExportOptions\n\n### clearCsvExportOptions\n\n### setCsvExportOptions\n\nOptions for exporting data as CSV. `MySQL` and `PostgreSQL`\ninstances only.\n\n### getFileType\n\nThe file type for the specified uri.\n\n### setFileType\n\nThe file type for the specified uri.\n\n### getOffload\n\nOption for export offload.\n\n### hasOffload\n\n### clearOffload\n\n### getOffloadUnwrapped\n\nReturns the unboxed value from `getOffload()`\n\nOption for export offload.\n\n### setOffload\n\nOption for export offload.\n\n### setOffloadUnwrapped\n\nSets the field by wrapping a primitive type in a Google\\\\Protobuf\\\\BoolValue object.\n\nOption for export offload.\n\n### getBakExportOptions\n\nOptions for exporting data as BAK files.\n\n### hasBakExportOptions\n\n### clearBakExportOptions\n\n### setBakExportOptions\n\nOptions for exporting data as BAK files."]]