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_hubs.disaster_recovery_configs

Fields

NameDatatypeDescription
idstringFully qualified resource ID for the resource. Ex - /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/{resourceProviderNamespace}/{resourceType}/{resourceName}
namestringThe name of the resource
locationstringThe geo-location where the resource lives
properties``Properties required to the Create Or Update Alias(Disaster Recovery configurations)
systemDataobjectMetadata pertaining to creation and last modification of the resource.
typestringThe type of the resource. E.g. "Microsoft.EventHub/Namespaces" or "Microsoft.EventHub/Namespaces/EventHubs"

Methods

NameAccessible byRequired ParamsDescription
getSELECTalias, namespaceName, resourceGroupName, subscriptionIdRetrieves Alias(Disaster Recovery configuration) for primary or secondary namespace
listSELECTnamespaceName, resourceGroupName, subscriptionIdGets all Alias(Disaster Recovery configurations)
create_or_updateINSERTalias, namespaceName, resourceGroupName, subscriptionIdCreates or updates a new Alias(Disaster Recovery configuration)
deleteDELETEalias, namespaceName, resourceGroupName, subscriptionIdDeletes an Alias(Disaster Recovery configuration)
break_pairingEXECalias, namespaceName, resourceGroupName, subscriptionIdThis operation disables the Disaster Recovery and stops replicating changes from primary to secondary namespaces
check_name_availabilityEXECnamespaceName, resourceGroupName, subscriptionId, data__nameCheck the give Namespace name availability.
fail_overEXECalias, namespaceName, resourceGroupName, subscriptionIdInvokes GEO DR failover and reconfigure the alias to point to the secondary namespace

SELECT examples

Gets all Alias(Disaster Recovery configurations)

SELECT
id,
name,
location,
properties,
systemData,
type
FROM azure.event_hubs.disaster_recovery_configs
WHERE namespaceName = '{{ namespaceName }}'
AND resourceGroupName = '{{ resourceGroupName }}'
AND subscriptionId = '{{ subscriptionId }}';

INSERT example

Use the following StackQL query and manifest file to create a new disaster_recovery_configs resource.

/*+ create */
INSERT INTO azure.event_hubs.disaster_recovery_configs (
alias,
namespaceName,
resourceGroupName,
subscriptionId,
properties
)
SELECT
'{{ alias }}',
'{{ namespaceName }}',
'{{ resourceGroupName }}',
'{{ subscriptionId }}',
'{{ properties }}'
;

DELETE example

Deletes the specified disaster_recovery_configs resource.

/*+ delete */
DELETE FROM azure.event_hubs.disaster_recovery_configs
WHERE alias = '{{ alias }}'
AND namespaceName = '{{ namespaceName }}'
AND resourceGroupName = '{{ resourceGroupName }}'
AND subscriptionId = '{{ subscriptionId }}';