Google Cloud
list_instances
Lists Cloud SQL instances in a given project in the alphabetical order of the instance name
Exports data from a Cloud SQL instance to a Cloud Storage bucket
Below are the details and signature of the activity Python module.
Type | action |
Module | chaosgcp.sql.actions |
Name | export_data |
Return | mapping |
Usage
JSON
{
"name": "export-data",
"type": "action",
"provider": {
"type": "python",
"module": "chaosgcp.sql.actions",
"func": "export_data",
"arguments": {
"instance_id": "",
"storage_uri": ""
}
}
}
YAML
name: export-data
provider:
arguments:
instance_id: ""
storage_uri: ""
func: export_data
module: chaosgcp.sql.actions
type: python
type: action
Arguments
Name | Type | Default | Required | Title | Description |
---|---|---|---|---|---|
instance_id | string | Yes | Instance ID | Cloud SQL instance identifier | |
storage_uri | string | Yes | Storage URI | Cloud Storage URI to the SQL/CSV dump | |
database | string | Yes | Databases | Name of the databases to export | |
project_id | string | null | No | Project ID | Google Cloud Project identifier |
file_type | string | “sql” | No | Dump Type | Dump file type: sql, csv |
table | string | null | No | Table | Name of the table to export |
columns | list | null | No | Columns | Which columns to export |
wait_until_complete | boolean | true | No | Wait Until Complete | Wait until operation has completed |
Data is exported as a SQL dump or CSV file.
See https://cloud.google.com/sql/docs/postgres/admin-api/v1beta4/instances/export
Signature
def export_data(instance_id: str,
storage_uri: str,
project_id: str = None,
file_type: str = 'sql',
databases: List[str] = None,
tables: List[str] = None,
export_schema_only: bool = False,
wait_until_complete: bool = True,
configuration: Dict[str, Dict[str, str]] = None,
secrets: Dict[str, Dict[str, str]] = None) -> Dict[str, Any]:
pass