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:
- 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. |
initial_primary_region | string | Initial primary region. Used only in Create requests to set the starting primary region. Not returned in responses. |
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 |
|---|---|---|---|---|
list | select | parent | page_size, page_token | List failover groups. |
create | insert | parent, failover_group_id, failover_group | validate_only | Create a new failover group. |
update | update | name, update_mask, failover_group | etag | Update a failover group. |
failover | exec | name, 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 |
|---|---|---|
failover_group_id | string | Client-provided identifier for the failover group. Used to construct the resource name as {parent}/failover-groups/{failover_group_id}. |
name | string | The fully qualified resource name of the failover group to failover. Format: accounts/{account_id}/failover-groups/{failover_group_id}. |
parent | string | The parent resource. Format: accounts/{account_id}. |
update_mask | object | Comma-separated list of fields to update. |
etag | string | Optional 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_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
- list
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
- Manifest
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
;
# Description fields are for documentation purposes
- name: failover_groups
props:
- name: parent
value: "{{ parent }}"
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: failover_group
description: |
The failover group to create.
value:
regions:
- "{{ regions }}"
workspace_sets:
- name: "{{ name }}"
workspace_ids: "{{ workspace_ids }}"
asset_replication_config:
enable_jobs: {{ enable_jobs }}
enable_clusters: {{ enable_clusters }}
enable_warehouse: {{ enable_warehouse }}
enable_sql_workspace: {{ enable_sql_workspace }}
enable_libraries: {{ enable_libraries }}
enable_notebooks: {{ enable_notebooks }}
enable_files: {{ enable_files }}
enable_queries: {{ enable_queries }}
enable_dashboards: {{ enable_dashboards }}
replicate_workspace_assets: {{ replicate_workspace_assets }}
stable_url_names: "{{ stable_url_names }}"
initial_primary_region: "{{ initial_primary_region }}"
create_time: "{{ create_time }}"
effective_primary_region: "{{ effective_primary_region }}"
etag: "{{ etag }}"
name: "{{ name }}"
replication_point: "{{ replication_point }}"
state: "{{ state }}"
unity_catalog_assets:
catalogs:
- name: "{{ name }}"
data_replication_workspace_set: "{{ data_replication_workspace_set }}"
location_mappings:
- name: "{{ name }}"
uri_by_region: "{{ uri_by_region }}"
update_time: "{{ update_time }}"
- 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
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
- failover
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 }}"
}'
;