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.
has_replication_point_blocking_errorsbooleanTrue if errors currently block the replication point.
initial_primary_regionstringInitial primary region. Used only in Create requests to set the starting primary region. Not returned in responses.
â–¶initial_replication_progressobjectInitial replication progress of all in-scope assets. Set only when the FailoverGroup is in INITIAL_REPLICATION state.
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
getselectaccount_id, failover_group_id, account_hostGet a failover group.
listselectaccount_id, account_hostpage_size, page_tokenList failover groups.
createinsertaccount_id, failover_group_id, account_host, regions, workspace_sets, initial_primary_regionvalidate_onlyCreate a new failover group.
updateupdateaccount_id, failover_group_id, update_mask, account_host, regions, workspace_sets, initial_primary_regionetagUpdate a failover group.
deletedeleteaccount_id, failover_group_id, account_hostetagDelete a failover group.
failoverexecaccount_id, failover_group_id, account_host, 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
account_hoststringThe 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_idstringThe 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_idstringThe 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_maskobjectComma-separated list of fields to update.
etagstringOpaque version string for optimistic locking. If provided, must match the current etag. If omitted, the delete proceeds without an etag 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​

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
;

INSERT examples​

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
;

UPDATE examples​

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 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​

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 }}"
}'
;