Azure Event Hubs Disaster Recovery Configs API

Operations for managing disaster recovery (Geo-DR) configurations.

OpenAPI Specification

microsoft-azure-event-hubs-disaster-recovery-configs-api-openapi.yml Raw ↑
openapi: 3.1.0
info:
  title: Azure Event Hubs Data Plane REST Authorization Rules Disaster Recovery Configs API
  description: The Azure Event Hubs Data Plane REST API enables you to send events to and interact with Event Hubs directly. This API operates against the Event Hubs service endpoint at {namespace}.servicebus.windows.net and supports sending individual events, batch events, partition-specific events, and events with publisher identity. Authentication is via Azure Active Directory tokens or Shared Access Signature (SAS) tokens.
  version: 2014-01
  contact:
    name: Microsoft Azure Support
    url: https://azure.microsoft.com/en-us/support/
  license:
    name: Microsoft Azure Terms of Service
    url: https://azure.microsoft.com/en-us/support/legal/
  x-logo:
    url: https://azure.microsoft.com/svghandler/event-hubs/
servers:
- url: https://{namespaceName}.servicebus.windows.net
  description: Azure Event Hubs Service Endpoint
  variables:
    namespaceName:
      description: The Event Hubs namespace name.
      default: my-namespace
security:
- sas_token: []
- bearer_token: []
tags:
- name: Disaster Recovery Configs
  description: Operations for managing disaster recovery (Geo-DR) configurations.
paths:
  ? /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.EventHub/namespaces/{namespaceName}/disasterRecoveryConfigs
  : get:
      operationId: DisasterRecoveryConfigs_List
      summary: Azure Event Hubs List disaster recovery configurations
      description: Gets all Alias (Disaster Recovery configurations).
      tags:
      - Disaster Recovery Configs
      parameters:
      - $ref: '#/components/parameters/SubscriptionIdParameter'
      - $ref: '#/components/parameters/ResourceGroupNameParameter'
      - $ref: '#/components/parameters/NamespaceNameParameter'
      - $ref: '#/components/parameters/ApiVersionParameter'
      responses:
        '200':
          description: Successfully retrieved the list of disaster recovery configurations.
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ArmDisasterRecoveryListResult'
        default:
          description: Event Hubs error response describing why the operation failed.
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ErrorResponse'
  ? /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.EventHub/namespaces/{namespaceName}/disasterRecoveryConfigs/{alias}
  : put:
      operationId: DisasterRecoveryConfigs_CreateOrUpdate
      summary: Azure Event Hubs Create or update a disaster recovery configuration
      description: Creates or updates a new Alias (Disaster Recovery configuration).
      tags:
      - Disaster Recovery Configs
      parameters:
      - $ref: '#/components/parameters/SubscriptionIdParameter'
      - $ref: '#/components/parameters/ResourceGroupNameParameter'
      - $ref: '#/components/parameters/NamespaceNameParameter'
      - name: alias
        in: path
        required: true
        description: The Disaster Recovery configuration name.
        schema:
          type: string
          minLength: 1
          maxLength: 50
      - $ref: '#/components/parameters/ApiVersionParameter'
      requestBody:
        required: true
        description: Parameters required to create an Alias (Disaster Recovery configuration).
        content:
          application/json:
            schema:
              $ref: '#/components/schemas/ArmDisasterRecovery'
      responses:
        '200':
          description: Disaster Recovery configuration successfully created.
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ArmDisasterRecovery'
        '201':
          description: Disaster Recovery configuration create request accepted.
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ArmDisasterRecovery'
        default:
          description: Event Hubs error response describing why the operation failed.
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ErrorResponse'
    get:
      operationId: DisasterRecoveryConfigs_Get
      summary: Azure Event Hubs Get a disaster recovery configuration
      description: Retrieves Alias (Disaster Recovery configuration) for primary or secondary namespace.
      tags:
      - Disaster Recovery Configs
      parameters:
      - $ref: '#/components/parameters/SubscriptionIdParameter'
      - $ref: '#/components/parameters/ResourceGroupNameParameter'
      - $ref: '#/components/parameters/NamespaceNameParameter'
      - name: alias
        in: path
        required: true
        description: The Disaster Recovery configuration name.
        schema:
          type: string
          minLength: 1
          maxLength: 50
      - $ref: '#/components/parameters/ApiVersionParameter'
      responses:
        '200':
          description: Successfully retrieved the Disaster Recovery configuration.
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ArmDisasterRecovery'
        default:
          description: Event Hubs error response describing why the operation failed.
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ErrorResponse'
    delete:
      operationId: DisasterRecoveryConfigs_Delete
      summary: Azure Event Hubs Delete a disaster recovery configuration
      description: Deletes an Alias (Disaster Recovery configuration).
      tags:
      - Disaster Recovery Configs
      parameters:
      - $ref: '#/components/parameters/SubscriptionIdParameter'
      - $ref: '#/components/parameters/ResourceGroupNameParameter'
      - $ref: '#/components/parameters/NamespaceNameParameter'
      - name: alias
        in: path
        required: true
        description: The Disaster Recovery configuration name.
        schema:
          type: string
          minLength: 1
          maxLength: 50
      - $ref: '#/components/parameters/ApiVersionParameter'
      responses:
        '200':
          description: Disaster Recovery configuration deleted.
        '204':
          description: No content.
        default:
          description: Event Hubs error response describing why the operation failed.
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ErrorResponse'
  ? /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.EventHub/namespaces/{namespaceName}/disasterRecoveryConfigs/{alias}/breakPairing
  : post:
      operationId: DisasterRecoveryConfigs_BreakPairing
      summary: Azure Event Hubs Break disaster recovery pairing
      description: This operation disables the Disaster Recovery and stops replicating changes from primary to secondary namespaces.
      tags:
      - Disaster Recovery Configs
      parameters:
      - $ref: '#/components/parameters/SubscriptionIdParameter'
      - $ref: '#/components/parameters/ResourceGroupNameParameter'
      - $ref: '#/components/parameters/NamespaceNameParameter'
      - name: alias
        in: path
        required: true
        description: The Disaster Recovery configuration name.
        schema:
          type: string
          minLength: 1
          maxLength: 50
      - $ref: '#/components/parameters/ApiVersionParameter'
      responses:
        '200':
          description: Disaster Recovery pairing broken successfully.
        default:
          description: Event Hubs error response describing why the operation failed.
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ErrorResponse'
  ? /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.EventHub/namespaces/{namespaceName}/disasterRecoveryConfigs/{alias}/failover
  : post:
      operationId: DisasterRecoveryConfigs_FailOver
      summary: Azure Event Hubs Initiate disaster recovery failover
      description: Invokes GEO DR failover and reconfigures the alias to point to the secondary namespace.
      tags:
      - Disaster Recovery Configs
      parameters:
      - $ref: '#/components/parameters/SubscriptionIdParameter'
      - $ref: '#/components/parameters/ResourceGroupNameParameter'
      - $ref: '#/components/parameters/NamespaceNameParameter'
      - name: alias
        in: path
        required: true
        description: The Disaster Recovery configuration name.
        schema:
          type: string
          minLength: 1
          maxLength: 50
      - $ref: '#/components/parameters/ApiVersionParameter'
      responses:
        '200':
          description: Failover initiated successfully.
        default:
          description: Event Hubs error response describing why the operation failed.
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ErrorResponse'
components:
  schemas:
    ErrorAdditionalInfo:
      type: object
      description: The resource management error additional info.
      properties:
        type:
          type: string
          readOnly: true
          description: The additional info type.
        info:
          type: object
          readOnly: true
          description: The additional info.
    ErrorDetail:
      type: object
      description: The error detail.
      properties:
        code:
          type: string
          readOnly: true
          description: The error code.
        message:
          type: string
          readOnly: true
          description: The error message.
        target:
          type: string
          readOnly: true
          description: The error target.
        details:
          type: array
          items:
            $ref: '#/components/schemas/ErrorDetail'
          readOnly: true
          description: The error details.
        additionalInfo:
          type: array
          items:
            $ref: '#/components/schemas/ErrorAdditionalInfo'
          readOnly: true
          description: The error additional info.
    ArmDisasterRecovery:
      type: object
      description: Single item in List or Get Alias (Disaster Recovery configuration) operation.
      properties:
        id:
          type: string
          readOnly: true
          description: Fully qualified resource ID for the resource.
        name:
          type: string
          readOnly: true
          description: The name of the resource.
        type:
          type: string
          readOnly: true
          description: The type of the resource.
        properties:
          type: object
          properties:
            provisioningState:
              type: string
              readOnly: true
              description: Provisioning state of the Alias (Disaster Recovery configuration).
              enum:
              - Accepted
              - Succeeded
              - Failed
            partnerNamespace:
              type: string
              description: ARM Id of the Primary/Secondary eventhub namespace name, which is part of GEO DR pairing.
            alternateName:
              type: string
              description: Alternate name specified when alias and namespace names are same.
            role:
              type: string
              readOnly: true
              description: role of namespace in GEO DR.
              enum:
              - Primary
              - PrimaryNotReplicating
              - Secondary
            pendingReplicationOperationsCount:
              type: integer
              format: int64
              readOnly: true
              description: Number of entities pending to be replicated.
        systemData:
          $ref: '#/components/schemas/SystemData'
    ErrorResponse:
      type: object
      description: Error response indicates Event Hub service is not able to process the incoming request. The reason is provided in the error message.
      properties:
        error:
          $ref: '#/components/schemas/ErrorDetail'
    SystemData:
      type: object
      description: Metadata pertaining to creation and last modification of the resource.
      properties:
        createdBy:
          type: string
          description: The identity that created the resource.
        createdByType:
          type: string
          description: The type of identity that created the resource.
          enum:
          - User
          - Application
          - ManagedIdentity
          - Key
        createdAt:
          type: string
          format: date-time
          description: The timestamp of resource creation (UTC).
        lastModifiedBy:
          type: string
          description: The identity that last modified the resource.
        lastModifiedByType:
          type: string
          description: The type of identity that last modified the resource.
          enum:
          - User
          - Application
          - ManagedIdentity
          - Key
        lastModifiedAt:
          type: string
          format: date-time
          description: The timestamp of resource last modification (UTC).
    ArmDisasterRecoveryListResult:
      type: object
      description: The result of the List Alias (Disaster Recovery configuration) operation.
      properties:
        value:
          type: array
          items:
            $ref: '#/components/schemas/ArmDisasterRecovery'
          description: List of Alias (Disaster Recovery configurations).
        nextLink:
          type: string
          readOnly: true
          description: Link to the next set of results.
  parameters:
    ApiVersionParameter:
      name: api-version
      in: query
      required: true
      description: Client API version.
      schema:
        type: string
        default: '2024-01-01'
    ResourceGroupNameParameter:
      name: resourceGroupName
      in: path
      required: true
      description: Name of the resource group within the Azure subscription.
      schema:
        type: string
        minLength: 1
        maxLength: 90
    SubscriptionIdParameter:
      name: subscriptionId
      in: path
      required: true
      description: Subscription credentials that uniquely identify a Microsoft Azure subscription. The subscription ID forms part of the URI for every service call.
      schema:
        type: string
    NamespaceNameParameter:
      name: namespaceName
      in: path
      required: true
      description: The Namespace name.
      schema:
        type: string
        minLength: 6
        maxLength: 50
        pattern: ^[a-zA-Z][a-zA-Z0-9-]{6,50}[a-zA-Z0-9]$
  securitySchemes:
    sas_token:
      type: apiKey
      in: header
      name: Authorization
      description: 'Shared Access Signature token. Format: SharedAccessSignature sr={namespace}.servicebus.windows.net&sig={signature}&se={expiry}&skn={keyName}'
    bearer_token:
      type: http
      scheme: bearer
      bearerFormat: JWT
      description: 'Azure Active Directory (Azure AD) JSON Web Token (JWT). Format: Bearer {Azure AD JWT token}'