Skip to main content

disaster_recovery_configs

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

Overview

Namedisaster_recovery_configs
TypeResource
Idazure.event_hub.disaster_recovery_configs

Fields

The following fields are returned by SELECT queries:

NameDatatypeDescription
aliasPrimaryConnectionStringstringPrimary connection string of the alias if GEO DR is enabled.
aliasSecondaryConnectionStringstringSecondary connection string of the alias if GEO DR is enabled.
keyNamestringA string that describes the AuthorizationRule.
primaryConnectionStringstringPrimary connection string of the created namespace AuthorizationRule.
primaryKeystringA base64-encoded 256-bit primary key for signing and validating the SAS token.
secondaryConnectionStringstringSecondary connection string of the created namespace AuthorizationRule.
secondaryKeystringA base64-encoded 256-bit primary key for signing and validating the SAS token.

Methods

The following methods are available for this resource:

NameAccessible byRequired ParamsOptional ParamsDescription
list_keysselectresource_group_name, namespace_name, alias, authorization_rule_name, subscription_idGets the primary and secondary connection strings for the Namespace.
getselectresource_group_name, namespace_name, alias, subscription_idRetrieves Alias(Disaster Recovery configuration) for primary or secondary namespace.
check_name_availabilityselectresource_group_name, namespace_name, subscription_idCheck the give Namespace name availability.
listselectresource_group_name, namespace_name, subscription_idGets all Alias(Disaster Recovery configurations).
create_or_updateinsertresource_group_name, namespace_name, alias, subscription_idCreates or updates a new Alias(Disaster Recovery configuration).
create_or_updatereplaceresource_group_name, namespace_name, alias, subscription_idCreates or updates a new Alias(Disaster Recovery configuration).
deletedeleteresource_group_name, namespace_name, alias, subscription_idDeletes an Alias(Disaster Recovery configuration).
list_authorization_rulesexecresource_group_name, namespace_name, alias, subscription_idGets a list of authorization rules for a Namespace.
get_authorization_ruleexecresource_group_name, namespace_name, alias, authorization_rule_name, subscription_idGets an AuthorizationRule for a Namespace by rule name.
break_pairingexecresource_group_name, namespace_name, alias, subscription_idThis operation disables the Disaster Recovery and stops replicating changes from primary to secondary namespaces.
fail_overexecresource_group_name, namespace_name, alias, subscription_idInvokes GEO DR failover and reconfigure the alias to point to the secondary namespace.

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
aliasstringThe Disaster Recovery configuration name. Required.
authorization_rule_namestringThe authorization rule name. Required.
namespace_namestringThe Namespace name. Required.
resource_group_namestringName of the resource group within the azure subscription. Required.
subscription_idstring

SELECT examples

Gets the primary and secondary connection strings for the Namespace.

SELECT
aliasPrimaryConnectionString,
aliasSecondaryConnectionString,
keyName,
primaryConnectionString,
primaryKey,
secondaryConnectionString,
secondaryKey
FROM azure.event_hub.disaster_recovery_configs
WHERE resource_group_name = '{{ resource_group_name }}' -- required
AND namespace_name = '{{ namespace_name }}' -- required
AND alias = '{{ alias }}' -- required
AND authorization_rule_name = '{{ authorization_rule_name }}' -- required
AND subscription_id = '{{ subscription_id }}' -- required
;

INSERT examples

Creates or updates a new Alias(Disaster Recovery configuration).

INSERT INTO azure.event_hub.disaster_recovery_configs (
properties,
resource_group_name,
namespace_name,
alias,
subscription_id
)
SELECT
'{{ properties }}',
'{{ resource_group_name }}',
'{{ namespace_name }}',
'{{ alias }}',
'{{ subscription_id }}'
RETURNING
id,
name,
location,
properties,
systemData,
type
;

REPLACE examples

Creates or updates a new Alias(Disaster Recovery configuration).

REPLACE azure.event_hub.disaster_recovery_configs
SET
properties = '{{ properties }}'
WHERE
resource_group_name = '{{ resource_group_name }}' --required
AND namespace_name = '{{ namespace_name }}' --required
AND alias = '{{ alias }}' --required
AND subscription_id = '{{ subscription_id }}' --required
RETURNING
id,
name,
location,
properties,
systemData,
type;

DELETE examples

Deletes an Alias(Disaster Recovery configuration).

DELETE FROM azure.event_hub.disaster_recovery_configs
WHERE resource_group_name = '{{ resource_group_name }}' --required
AND namespace_name = '{{ namespace_name }}' --required
AND alias = '{{ alias }}' --required
AND subscription_id = '{{ subscription_id }}' --required
;

Lifecycle Methods

Gets a list of authorization rules for a Namespace.

EXEC azure.event_hub.disaster_recovery_configs.list_authorization_rules 
@resource_group_name='{{ resource_group_name }}' --required,
@namespace_name='{{ namespace_name }}' --required,
@alias='{{ alias }}' --required,
@subscription_id='{{ subscription_id }}' --required
;