Google Cloud
action SQL

# trigger_failover

Causes a high-availability Cloud SQL instance to failover

Run it now
View details

Type | action
Module | chaosgcp.sql.actions
Name | trigger_failover
Return | mapping

Usage

JSON

    {
      "name": "trigger-failover",
      "type": "action",
      "provider": {
        "type": "python",
        "module": "chaosgcp.sql.actions",
        "func": "trigger_failover",
        "arguments": {
          "instance_id": ""
        }
      }
    }

YAML

    name: trigger-failover
    provider:
      arguments:
        instance_id: ""
      func: trigger_failover
      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 to failover
wait_until_complete | boolean | true | No | Wait Until Complete | Wait until operation has completed
settings_version | integer | null | No | Version | Current settings version of the instance

- instance_id: Cloud SQL instance ID.
- wait_until_complete: wait for the operation in progress to complete.
- settings_version: The current settings version of this instance.

See https://cloud.google.com/sql/docs/postgres/admin-api/v1beta4/instances/failover

Signature

    def trigger_failover(
            instance_id: str,
            wait_until_complete: bool = True,
            settings_version: int = None,
            configuration: Dict[str, Dict[str, str]] = None,
            secrets: Dict[str, Dict[str, str]] = None) -> Dict[str, Any]:
        pass

## Related starters

- Google Cloud
  action SQL

  ## `export_data`

  Exports data from a Cloud SQL instance to a Cloud Storage bucket
- Google Cloud
  probe SQL

  ## `list_instances`

  Lists Cloud SQL instances in a given project in the alphabetical order of the instance name
- Google Cloud
  action SQL

  ## `import_data`

  Imports data into a Cloud SQL instance from a SQL dump or CSV file in Cloud Storage