failover_groups
Creates, updates, deletes, gets or lists a failover_groups resource.
Overview​
| Name | failover_groups |
| Type | Resource |
| Id | databricks_account.disasterrecovery.failover_groups |
Fields​
The following fields are returned by SELECT queries:
- get
- list
| Name | Datatype | Description |
|---|---|---|
name | string | Fully qualified resource name in the format accounts/{account_id}/failover-groups/{failover_group_id}. |
create_time | string (date-time) | Time at which this failover group was created. |
effective_primary_region | string | Current effective primary region. Replication flows FROM workspaces in this region. Changes after a successful failover. |
etag | string | Opaque version string for optimistic locking. Server-generated and returned in responses. |
has_replication_point_blocking_errors | boolean | True if errors currently block the replication point. |
initial_primary_region | string | Initial primary region. Used only in Create requests to set the starting primary region. Not returned in responses. |
initial_replication_progress | object | Initial replication progress of all in-scope assets. Set only when the FailoverGroup is in INITIAL_REPLICATION state. |
regions | array | List of all regions participating in this failover group. |
replication_point | string (date-time) | The latest point in time to which data has been replicated. |
state | string | Aggregate state of the failover group. (ACTIVE, CREATING, CREATION_FAILED, DELETING, DELETION_FAILED, FAILING_OVER, FAILOVER_FAILED, INITIAL_REPLICATION) |
unity_catalog_assets | object | Unity Catalog replication configuration. |
update_time | string (date-time) | Time at which this failover group was last modified. |
workspace_sets | array | Workspace sets, each containing workspaces that replicate to each other. |
| Name | Datatype | Description |
|---|---|---|
name | string | Fully qualified resource name in the format accounts/{account_id}/failover-groups/{failover_group_id}. |
create_time | string (date-time) | Time at which this failover group was created. |
effective_primary_region | string | Current effective primary region. Replication flows FROM workspaces in this region. Changes after a successful failover. |
etag | string | Opaque version string for optimistic locking. Server-generated and returned in responses. |
has_replication_point_blocking_errors | boolean | True if errors currently block the replication point. |
initial_primary_region | string | Initial primary region. Used only in Create requests to set the starting primary region. Not returned in responses. |
initial_replication_progress | object | Initial replication progress of all in-scope assets. Set only when the FailoverGroup is in INITIAL_REPLICATION state. |
regions | array | List of all regions participating in this failover group. |
replication_point | string (date-time) | The latest point in time to which data has been replicated. |
state | string | Aggregate state of the failover group. (ACTIVE, CREATING, CREATION_FAILED, DELETING, DELETION_FAILED, FAILING_OVER, FAILOVER_FAILED, INITIAL_REPLICATION) |
unity_catalog_assets | object | Unity Catalog replication configuration. |
update_time | string (date-time) | Time at which this failover group was last modified. |
workspace_sets | array | Workspace sets, each containing workspaces that replicate to each other. |
Methods​
The following methods are available for this resource:
| Name | Accessible by | Required Params | Optional Params | Description |
|---|---|---|---|---|
get | select | account_id, failover_group_id, account_host | Get a failover group. | |
list | select | account_id, account_host | page_size, page_token | List failover groups. |
create | insert | account_id, failover_group_id, account_host, regions, workspace_sets, initial_primary_region | validate_only | Create a new failover group. |
update | update | account_id, failover_group_id, update_mask, account_host, regions, workspace_sets, initial_primary_region | etag | Update a failover group. |
delete | delete | account_id, failover_group_id, account_host | etag | Delete a failover group. |
failover | exec | account_id, failover_group_id, account_host, target_primary_region, failover_type | Initiate a failover to a new primary region. |
Parameters​
Parameters can be passed in the WHERE clause of a query. Check the Methods section to see which parameters are required or optional for each operation.
| Name | Datatype | Description |
|---|---|---|
account_host | string | The Databricks account console host. Selected by DATABRICKS_CLOUD (aws, azure or gcp; default aws), or set explicitly with DATABRICKS_ACCOUNT_HOST (bare host, no scheme). (default: accounts.cloud.databricks.com, x-stackQL-envVar: DATABRICKS_ACCOUNT_HOST, x-stackQL-envVarSelector: {"envVar":"DATABRICKS_CLOUD","default":"aws","values":{"aws":"accounts.cloud.databricks.com","azure":"accounts.azuredatabricks.net","gcp":"accounts.gcp.databricks.com"}}) |
account_id | string | The account_id segment of the name resource name (accounts/{account_id}/failover-groups/{failover_group_id}). The fully qualified resource name of the failover group to failover. Format: accounts/{account_id}/failover-groups/{failover_group_id}. |
failover_group_id | string | The failover_group_id segment of the name resource name (accounts/{account_id}/failover-groups/{failover_group_id}). The fully qualified resource name of the failover group to failover. Format: accounts/{account_id}/failover-groups/{failover_group_id}. |
update_mask | object | Comma-separated list of fields to update. |
etag | string | Opaque version string for optimistic locking. If provided, must match the current etag. If omitted, the delete proceeds without an etag check. |
page_size | integer | Maximum number of failover groups to return per page: - when set to a value greater than 0, the page length is the minimum of this value and a server configured value; - when set to 0 or unset, the page length is set to a server configured value (recommended); - when set to a value less than 0, an invalid parameter error is returned. |
page_token | string | Page token received from a previous ListFailoverGroups call. Provide this to retrieve the subsequent page. |
validate_only | boolean | When true, validates the request without creating the failover group. |
SELECT examples​
- get
- list
Get a failover group.
SELECT
name,
create_time,
effective_primary_region,
etag,
has_replication_point_blocking_errors,
initial_primary_region,
initial_replication_progress,
regions,
replication_point,
state,
unity_catalog_assets,
update_time,
workspace_sets
FROM databricks_account.disasterrecovery.failover_groups
WHERE account_id = '{{ account_id }}' -- required
AND failover_group_id = '{{ failover_group_id }}' -- required
AND account_host = '{{ account_host }}' -- required
;
List failover groups.
SELECT
name,
create_time,
effective_primary_region,
etag,
has_replication_point_blocking_errors,
initial_primary_region,
initial_replication_progress,
regions,
replication_point,
state,
unity_catalog_assets,
update_time,
workspace_sets
FROM databricks_account.disasterrecovery.failover_groups
WHERE account_id = '{{ account_id }}' -- required
AND account_host = '{{ account_host }}' -- required
AND page_size = '{{ page_size }}'
AND page_token = '{{ page_token }}'
;
INSERT examples​
- create
- Manifest
Create a new failover group.
INSERT INTO databricks_account.disasterrecovery.failover_groups (
regions,
workspace_sets,
initial_primary_region,
create_time,
effective_primary_region,
etag,
has_replication_point_blocking_errors,
initial_replication_progress,
name,
replication_point,
state,
unity_catalog_assets,
update_time,
account_id,
failover_group_id,
account_host,
validate_only
)
SELECT
'{{ regions }}' /* required */,
'{{ workspace_sets }}' /* required */,
'{{ initial_primary_region }}' /* required */,
'{{ create_time }}',
'{{ effective_primary_region }}',
'{{ etag }}',
{{ has_replication_point_blocking_errors }},
'{{ initial_replication_progress }}',
'{{ name }}',
'{{ replication_point }}',
'{{ state }}',
'{{ unity_catalog_assets }}',
'{{ update_time }}',
'{{ account_id }}',
'{{ failover_group_id }}',
'{{ account_host }}',
'{{ validate_only }}'
RETURNING
name,
create_time,
effective_primary_region,
etag,
has_replication_point_blocking_errors,
initial_primary_region,
initial_replication_progress,
regions,
replication_point,
state,
unity_catalog_assets,
update_time,
workspace_sets
;
# Description fields are for documentation purposes
- name: failover_groups
props:
- name: account_id
value: "{{ account_id }}"
description: Required parameter for the failover_groups resource.
- name: failover_group_id
value: "{{ failover_group_id }}"
description: Required parameter for the failover_groups resource.
- name: account_host
value: "{{ account_host }}"
description: Required parameter for the failover_groups resource.
- name: regions
value:
- "{{ regions }}"
description: |
List of all regions participating in this failover group.
- name: workspace_sets
description: |
Workspace sets, each containing workspaces that replicate to each other.
value:
- name: "{{ name }}"
workspace_ids: "{{ workspace_ids }}"
replicate_workspace_assets: {{ replicate_workspace_assets }}
stable_url_names: "{{ stable_url_names }}"
- name: initial_primary_region
value: "{{ initial_primary_region }}"
description: |
Initial primary region. Used only in Create requests to set the starting primary region. Not returned in responses.
- name: create_time
value: "{{ create_time }}"
description: |
Time at which this failover group was created.
- name: effective_primary_region
value: "{{ effective_primary_region }}"
description: |
Current effective primary region. Replication flows FROM workspaces in this region. Changes after a successful failover.
- name: etag
value: "{{ etag }}"
description: |
Opaque version string for optimistic locking. Server-generated and returned in responses.
- name: has_replication_point_blocking_errors
value: {{ has_replication_point_blocking_errors }}
description: |
True if errors currently block the replication point.
- name: initial_replication_progress
description: |
Initial replication progress of all in-scope assets. Set only when the FailoverGroup is in INITIAL_REPLICATION state.
value:
completed: {{ completed }}
- name: name
value: "{{ name }}"
description: |
Fully qualified resource name in the format accounts/{account_id}/failover-groups/{failover_group_id}.
- name: replication_point
value: "{{ replication_point }}"
description: |
The latest point in time to which data has been replicated.
- name: state
value: "{{ state }}"
description: |
Aggregate state of the failover group.
- name: unity_catalog_assets
description: |
Unity Catalog replication configuration.
value:
catalogs:
- name: "{{ name }}"
data_replication_workspace_set: "{{ data_replication_workspace_set }}"
location_mappings:
- name: "{{ name }}"
uri_by_region: "{{ uri_by_region }}"
- name: update_time
value: "{{ update_time }}"
description: |
Time at which this failover group was last modified.
- name: validate_only
value: {{ validate_only }}
description: When true, validates the request without creating the failover group.
description: When true, validates the request without creating the failover group.
UPDATE examples​
- update
Update a failover group.
UPDATE databricks_account.disasterrecovery.failover_groups
SET
regions = '{{ regions }}',
workspace_sets = '{{ workspace_sets }}',
initial_primary_region = '{{ initial_primary_region }}',
create_time = '{{ create_time }}',
effective_primary_region = '{{ effective_primary_region }}',
etag = '{{ etag }}',
has_replication_point_blocking_errors = {{ has_replication_point_blocking_errors }},
initial_replication_progress = '{{ initial_replication_progress }}',
name = '{{ name }}',
replication_point = '{{ replication_point }}',
state = '{{ state }}',
unity_catalog_assets = '{{ unity_catalog_assets }}',
update_time = '{{ update_time }}'
WHERE
account_id = '{{ account_id }}' --required
AND failover_group_id = '{{ failover_group_id }}' --required
AND update_mask = '{{ update_mask }}' --required
AND account_host = '{{ account_host }}' --required
AND regions = '{{ regions }}' --required
AND workspace_sets = '{{ workspace_sets }}' --required
AND initial_primary_region = '{{ initial_primary_region }}' --required
AND etag = '{{ etag}}'
RETURNING
name,
create_time,
effective_primary_region,
etag,
has_replication_point_blocking_errors,
initial_primary_region,
initial_replication_progress,
regions,
replication_point,
state,
unity_catalog_assets,
update_time,
workspace_sets;
DELETE examples​
- delete
Delete a failover group.
DELETE FROM databricks_account.disasterrecovery.failover_groups
WHERE account_id = '{{ account_id }}' --required
AND failover_group_id = '{{ failover_group_id }}' --required
AND account_host = '{{ account_host }}' --required
AND etag = '{{ etag }}'
;
Lifecycle Methods​
- failover
Initiate a failover to a new primary region.
EXEC databricks_account.disasterrecovery.failover_groups.failover
@account_id='{{ account_id }}' --required,
@failover_group_id='{{ failover_group_id }}' --required,
@account_host='{{ account_host }}' --required
@@json=
'{
"target_primary_region": "{{ target_primary_region }}",
"failover_type": "{{ failover_type }}",
"etag": "{{ etag }}"
}'
;