Exports data from the cluster. Imperative only.
HTTP request
POST https://alloydb.googleapis.com/v1/{name=projects/*/locations/*/clusters/*}:export
The URL uses gRPC Transcoding syntax.
Path parameters
| Parameters | |
|---|---|
| name | 
 Required. The resource name of the cluster. Authorization requires the following IAM permission on the specified resource  
 | 
Request body
The request body contains data with the following structure:
| JSON representation | 
|---|
| { "database": string, // Union field | 
| Fields | |
|---|---|
| database | 
 Required. Name of the database where the export command will be executed. Note - Value provided should be the same as expected from  | 
| Union field destination. Oneof field to support other destinations in future.destinationcan be only one of the following: | |
| gcsDestination | 
 Required. Option to export data to cloud storage. | 
| Union field export_options. Required field to specify export file type and options.export_optionscan be only one of the following: | |
| csvExportOptions | 
 Options for exporting data in CSV format. Required field to be set for CSV file type. | 
| sqlExportOptions | 
 Options for exporting data in SQL format. Required field to be set for SQL file type. | 
Response body
If successful, the response body contains an instance of Operation.
Authorization scopes
Requires the following OAuth scope:
- https://www.googleapis.com/auth/cloud-platform
For more information, see the Authentication Overview.
IAM Permissions
Requires the following IAM permission on the name resource:
- alloydb.googleapis.com/alloydb.clusters.export
For more information, see the IAM documentation.
GcsDestination
Destination for Export. Export will be done to cloud storage.
| JSON representation | 
|---|
| { "uri": string } | 
| Fields | |
|---|---|
| uri | 
 Required. The path to the file in Google Cloud Storage where the export will be stored. The URI is in the form  | 
CsvExportOptions
Options for exporting data in CSV format.
| JSON representation | 
|---|
| { "selectQuery": string, "fieldDelimiter": string, "quoteCharacter": string, "escapeCharacter": string } | 
| Fields | |
|---|---|
| selectQuery | 
 Required. The SELECT query used to extract the data. | 
| fieldDelimiter | 
 Optional. Specifies the character that separates columns within each row (line) of the file. The default is comma. The value of this argument has to be a character in Hex ASCII Code. | 
| quoteCharacter | 
 Optional. Specifies the quoting character to be used when a data value is quoted. The default is double-quote. The value of this argument has to be a character in Hex ASCII Code. | 
| escapeCharacter | 
 Optional. Specifies the character that should appear before a data character that needs to be escaped. The default is the same as quote character. The value of this argument has to be a character in Hex ASCII Code. | 
SqlExportOptions
Options for exporting data in SQL format.
| JSON representation | 
|---|
| { "tables": [ string ], "schemaOnly": boolean, "cleanTargetObjects": boolean, "ifExistTargetObjects": boolean } | 
| Fields | |
|---|---|
| tables[] | 
 Optional. Tables to export from. | 
| schemaOnly | 
 Optional. If true, only export the schema. | 
| cleanTargetObjects | 
 Optional. If true, output commands to DROP all the dumped database objects prior to outputting the commands for creating them. | 
| ifExistTargetObjects | 
 Optional. If true, use DROP ... IF EXISTS commands to check for the object's existence before dropping it in cleanTargetObjects mode. |