disaster_recovery_configs
Creates, updates, deletes, gets or lists a disaster_recovery_configs resource.
Overview
| Name | disaster_recovery_configs |
| Type | Resource |
| Id | azure.event_hub.disaster_recovery_configs |
Fields
The following fields are returned by SELECT queries:
- list_keys
- get
- check_name_availability
- list
| Name | Datatype | Description |
|---|---|---|
aliasPrimaryConnectionString | string | Primary connection string of the alias if GEO DR is enabled. |
aliasSecondaryConnectionString | string | Secondary connection string of the alias if GEO DR is enabled. |
keyName | string | A string that describes the AuthorizationRule. |
primaryConnectionString | string | Primary connection string of the created namespace AuthorizationRule. |
primaryKey | string | A base64-encoded 256-bit primary key for signing and validating the SAS token. |
secondaryConnectionString | string | Secondary connection string of the created namespace AuthorizationRule. |
secondaryKey | string | A base64-encoded 256-bit primary key for signing and validating the SAS token. |
| Name | Datatype | Description |
|---|---|---|
id | string | Fully qualified resource ID for the resource. Ex - /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/{resourceProviderNamespace}/{resourceType}/{resourceName}. |
name | string | The name of the resource. |
alternateName | string | Alternate name specified when alias and namespace names are same. |
location | string | The geo-location where the resource lives. |
partnerNamespace | string | ARM Id of the Primary/Secondary eventhub namespace name, which is part of GEO DR pairing. |
pendingReplicationOperationsCount | integer | Number of entities pending to be replicated. |
provisioningState | string | Provisioning state of the Alias(Disaster Recovery configuration) - possible values 'Accepted' or 'Succeeded' or 'Failed'. Known values are: "Accepted", "Succeeded", and "Failed". |
role | string | role of namespace in GEO DR - possible values 'Primary' or 'PrimaryNotReplicating' or 'Secondary'. Known values are: "Primary", "PrimaryNotReplicating", and "Secondary". |
systemData | object | The system meta data relating to this resource. |
type | string | The type of the resource. E.g. "Microsoft.EventHub/Namespaces" or "Microsoft.EventHub/Namespaces/EventHubs". |
| Name | Datatype | Description |
|---|---|---|
message | string | The detailed info regarding the reason associated with the Namespace. |
nameAvailable | boolean | Value indicating Namespace is availability, true if the Namespace is available; otherwise, false. |
reason | string | The reason for unavailability of a Namespace. Known values are: "None", "InvalidName", "SubscriptionIsDisabled", "NameInUse", "NameInLockdown", and "TooManyNamespaceInCurrentSubscription". |
| Name | Datatype | Description |
|---|---|---|
id | string | Fully qualified resource ID for the resource. Ex - /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/{resourceProviderNamespace}/{resourceType}/{resourceName}. |
name | string | The name of the resource. |
alternateName | string | Alternate name specified when alias and namespace names are same. |
location | string | The geo-location where the resource lives. |
partnerNamespace | string | ARM Id of the Primary/Secondary eventhub namespace name, which is part of GEO DR pairing. |
pendingReplicationOperationsCount | integer | Number of entities pending to be replicated. |
provisioningState | string | Provisioning state of the Alias(Disaster Recovery configuration) - possible values 'Accepted' or 'Succeeded' or 'Failed'. Known values are: "Accepted", "Succeeded", and "Failed". |
role | string | role of namespace in GEO DR - possible values 'Primary' or 'PrimaryNotReplicating' or 'Secondary'. Known values are: "Primary", "PrimaryNotReplicating", and "Secondary". |
systemData | object | The system meta data relating to this resource. |
type | string | The type of the resource. E.g. "Microsoft.EventHub/Namespaces" or "Microsoft.EventHub/Namespaces/EventHubs". |
Methods
The following methods are available for this resource:
| Name | Accessible by | Required Params | Optional Params | Description |
|---|---|---|---|---|
list_keys | select | resource_group_name, namespace_name, alias, authorization_rule_name, subscription_id | Gets the primary and secondary connection strings for the Namespace. | |
get | select | resource_group_name, namespace_name, alias, subscription_id | Retrieves Alias(Disaster Recovery configuration) for primary or secondary namespace. | |
check_name_availability | select | resource_group_name, namespace_name, subscription_id | Check the give Namespace name availability. | |
list | select | resource_group_name, namespace_name, subscription_id | Gets all Alias(Disaster Recovery configurations). | |
create_or_update | insert | resource_group_name, namespace_name, alias, subscription_id | Creates or updates a new Alias(Disaster Recovery configuration). | |
create_or_update | replace | resource_group_name, namespace_name, alias, subscription_id | Creates or updates a new Alias(Disaster Recovery configuration). | |
delete | delete | resource_group_name, namespace_name, alias, subscription_id | Deletes an Alias(Disaster Recovery configuration). | |
list_authorization_rules | exec | resource_group_name, namespace_name, alias, subscription_id | Gets a list of authorization rules for a Namespace. | |
get_authorization_rule | exec | resource_group_name, namespace_name, alias, authorization_rule_name, subscription_id | Gets an AuthorizationRule for a Namespace by rule name. | |
break_pairing | exec | resource_group_name, namespace_name, alias, subscription_id | This operation disables the Disaster Recovery and stops replicating changes from primary to secondary namespaces. | |
fail_over | exec | resource_group_name, namespace_name, alias, subscription_id | Invokes 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.
| Name | Datatype | Description |
|---|---|---|
alias | string | The Disaster Recovery configuration name. Required. |
authorization_rule_name | string | The authorization rule name. Required. |
namespace_name | string | The Namespace name. Required. |
resource_group_name | string | Name of the resource group within the azure subscription. Required. |
subscription_id | string |
SELECT examples
- list_keys
- get
- check_name_availability
- list
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
;
Retrieves Alias(Disaster Recovery configuration) for primary or secondary namespace.
SELECT
id,
name,
alternateName,
location,
partnerNamespace,
pendingReplicationOperationsCount,
provisioningState,
role,
systemData,
type
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
;
Check the give Namespace name availability.
SELECT
message,
nameAvailable,
reason
FROM azure.event_hub.disaster_recovery_configs
WHERE resource_group_name = '{{ resource_group_name }}' -- required
AND namespace_name = '{{ namespace_name }}' -- required
AND subscription_id = '{{ subscription_id }}' -- required
;
Gets all Alias(Disaster Recovery configurations).
SELECT
id,
name,
alternateName,
location,
partnerNamespace,
pendingReplicationOperationsCount,
provisioningState,
role,
systemData,
type
FROM azure.event_hub.disaster_recovery_configs
WHERE resource_group_name = '{{ resource_group_name }}' -- required
AND namespace_name = '{{ namespace_name }}' -- required
AND subscription_id = '{{ subscription_id }}' -- required
;
INSERT examples
- create_or_update
- Manifest
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
;
# Description fields are for documentation purposes
- name: disaster_recovery_configs
props:
- name: resource_group_name
value: "{{ resource_group_name }}"
description: Required parameter for the disaster_recovery_configs resource.
- name: namespace_name
value: "{{ namespace_name }}"
description: Required parameter for the disaster_recovery_configs resource.
- name: alias
value: "{{ alias }}"
description: Required parameter for the disaster_recovery_configs resource.
- name: subscription_id
value: "{{ subscription_id }}"
description: Required parameter for the disaster_recovery_configs resource.
- name: properties
value:
partnerNamespace: "{{ partnerNamespace }}"
alternateName: "{{ alternateName }}"
REPLACE examples
- create_or_update
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
- delete
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
- list_authorization_rules
- get_authorization_rule
- break_pairing
- fail_over
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
;
Gets an AuthorizationRule for a Namespace by rule name.
EXEC azure.event_hub.disaster_recovery_configs.get_authorization_rule
@resource_group_name='{{ resource_group_name }}' --required,
@namespace_name='{{ namespace_name }}' --required,
@alias='{{ alias }}' --required,
@authorization_rule_name='{{ authorization_rule_name }}' --required,
@subscription_id='{{ subscription_id }}' --required
;
This operation disables the Disaster Recovery and stops replicating changes from primary to secondary namespaces.
EXEC azure.event_hub.disaster_recovery_configs.break_pairing
@resource_group_name='{{ resource_group_name }}' --required,
@namespace_name='{{ namespace_name }}' --required,
@alias='{{ alias }}' --required,
@subscription_id='{{ subscription_id }}' --required
;
Invokes GEO DR failover and reconfigure the alias to point to the secondary namespace.
EXEC azure.event_hub.disaster_recovery_configs.fail_over
@resource_group_name='{{ resource_group_name }}' --required,
@namespace_name='{{ namespace_name }}' --required,
@alias='{{ alias }}' --required,
@subscription_id='{{ subscription_id }}' --required
;