Skip to main content

failover_groups

Creates, updates, deletes, gets or lists a failover_groups resource.

Overview

Namefailover_groups
TypeResource
Iddatabricks_account.disasterrecovery.failover_groups

Fields

The following fields are returned by SELECT queries:

NameDatatypeDescription
namestringFully qualified resource name in the format accounts/{account_id}/failover-groups/{failover_group_id}.
create_timestring (date-time)Time at which this failover group was created.
effective_primary_regionstringCurrent effective primary region. Replication flows FROM workspaces in this region. Changes after a successful failover.
etagstringOpaque version string for optimistic locking. Server-generated and returned in responses.
initial_primary_regionstringInitial primary region. Used only in Create requests to set the starting primary region. Not returned in responses.
regionsarrayList of all regions participating in this failover group.
replication_pointstring (date-time)The latest point in time to which data has been replicated.
statestringAggregate state of the failover group. (ACTIVE, CREATING, CREATION_FAILED, DELETING, DELETION_FAILED, FAILING_OVER, FAILOVER_FAILED, INITIAL_REPLICATION)
unity_catalog_assetsobjectUnity Catalog replication configuration.
update_timestring (date-time)Time at which this failover group was last modified.
workspace_setsarrayWorkspace sets, each containing workspaces that replicate to each other.

Methods

The following methods are available for this resource:

NameAccessible byRequired ParamsOptional ParamsDescription
listselectparentpage_size, page_tokenList failover groups.
createinsertparent, failover_group_id, failover_groupvalidate_onlyCreate a new failover group.
updateupdatename, update_mask, failover_groupetagUpdate a failover group.
failoverexecname, target_primary_region, failover_typeInitiate 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.

NameDatatypeDescription
failover_group_idstringClient-provided identifier for the failover group. Used to construct the resource name as {parent}/failover-groups/{failover_group_id}.
namestringThe fully qualified resource name of the failover group to failover. Format: accounts/{account_id}/failover-groups/{failover_group_id}.
parentstringThe parent resource. Format: accounts/{account_id}.
update_maskobjectComma-separated list of fields to update.
etagstringOptional opaque version string for optimistic locking, obtained from a prior read of the failover group. If provided, the update is rejected unless it matches the failover group's current etag. If omitted, the update proceeds without an optimistic-lock check.
page_sizeintegerMaximum 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_tokenstringPage token received from a previous ListFailoverGroups call. Provide this to retrieve the subsequent page.
validate_onlybooleanWhen true, validates the request without creating the failover group.

SELECT examples

List failover groups.

SELECT
name,
create_time,
effective_primary_region,
etag,
initial_primary_region,
regions,
replication_point,
state,
unity_catalog_assets,
update_time,
workspace_sets
FROM databricks_account.disasterrecovery.failover_groups
WHERE parent = '{{ parent }}' -- required
AND page_size = '{{ page_size }}'
AND page_token = '{{ page_token }}'
;

INSERT examples

Create a new failover group.

INSERT INTO databricks_account.disasterrecovery.failover_groups (
failover_group,
parent,
failover_group_id,
validate_only
)
SELECT
'{{ failover_group }}' /* required */,
'{{ parent }}',
'{{ failover_group_id }}',
'{{ validate_only }}'
RETURNING
name,
create_time,
effective_primary_region,
etag,
initial_primary_region,
regions,
replication_point,
state,
unity_catalog_assets,
update_time,
workspace_sets
;

UPDATE examples

Update a failover group.

UPDATE databricks_account.disasterrecovery.failover_groups
SET
failover_group = '{{ failover_group }}'
WHERE
name = '{{ name }}' --required
AND update_mask = '{{ update_mask }}' --required
AND failover_group = '{{ failover_group }}' --required
AND etag = '{{ etag}}'
RETURNING
name,
create_time,
effective_primary_region,
etag,
initial_primary_region,
regions,
replication_point,
state,
unity_catalog_assets,
update_time,
workspace_sets;

Lifecycle Methods

Initiate a failover to a new primary region.

EXEC databricks_account.disasterrecovery.failover_groups.failover
@name='{{ name }}' --required
@@json=
'{
"target_primary_region": "{{ target_primary_region }}",
"failover_type": "{{ failover_type }}",
"etag": "{{ etag }}"
}'
;