swagger: "2.0"
schemes:
  - https
host: management.azure.com
info:
  description: Use these API to manage Azure Relay resources through Azure Resources Manager.
  title: Relay
  version: 2016-07-01
  x-apisguru-categories:
    - cloud
  x-logo:
    url: https://api.apis.guru/v2/cache/logo/https_assets.onestore.ms_cdnfiles_onestorerolling-1606-01000_shell_v3_images_logo_microsoft.png
  x-ms-code-generation-settings:
    name: RelayManagementClient
  x-origin:
    - format: swagger
      url: https://raw.githubusercontent.com/Azure/azure-rest-api-specs/master/specification/relay/resource-manager/Microsoft.Relay/stable/2016-07-01/relay.json
      version: "2.0"
  x-preferred: false
  x-providerName: azure.com
  x-serviceName: relay
  x-tags:
    - Azure
    - Microsoft
consumes:
  - application/json
produces:
  - application/json
securityDefinitions:
  azure_auth:
    authorizationUrl: https://login.microsoftonline.com/common/oauth2/authorize
    description: Azure Active Directory OAuth2 Flow
    flow: implicit
    scopes:
      user_impersonation: impersonate your user account
    type: oauth2
security:
  - azure_auth:
      - user_impersonation
parameters:
  ApiVersionParameter:
    description: Client Api Version.
    in: query
    name: api-version
    required: true
    type: string
  SubscriptionIdParameter:
    description: Subscription credentials which uniquely identify Microsoft Azure subscription. The subscription ID forms part of the URI for every service call.
    in: path
    name: subscriptionId
    required: true
    type: string
  authorizationRuleNameParameter:
    description: The authorizationRule name.
    in: path
    maxLength: 50
    minLength: 1
    name: authorizationRuleName
    required: true
    type: string
    x-ms-parameter-location: method
  hybridConnectionNameParameter:
    description: The hybrid connection name.
    in: path
    maxLength: 50
    minLength: 1
    name: hybridConnectionName
    required: true
    type: string
    x-ms-parameter-location: method
  namespaceNameParameter:
    description: The Namespace Name
    in: path
    maxLength: 50
    minLength: 6
    name: namespaceName
    required: true
    type: string
    x-ms-parameter-location: method
  relayNameParameter:
    description: The relay name
    in: path
    maxLength: 50
    minLength: 1
    name: relayName
    required: true
    type: string
    x-ms-parameter-location: method
  resourceGroupNameParameter:
    description: Name of the Resource group within the Azure subscription.
    in: path
    maxLength: 90
    minLength: 1
    name: resourceGroupName
    required: true
    type: string
    x-ms-parameter-location: method
paths:
  /providers/Microsoft.Relay/operations:
    get:
      description: Lists all of the available Relay REST API operations.
      operationId: Operations_List
      parameters:
        - $ref: "#/parameters/ApiVersionParameter"
      responses:
        "200":
          description: OK. The request has succeeded.
          schema:
            $ref: "#/definitions/OperationListResult"
        default:
          description: Relay error response describing why the operation failed.
          schema:
            $ref: "#/definitions/ErrorResponse"
      tags:
        - Operations
      x-ms-examples:
        RelayOperationsList:
          parameters:
            api-version: 2016-07-01
          responses:
            "200":
              body:
                value:
                  - display:
                      operation: Get namespace availability.
                      provider: Microsoft Azure Relay
                      resource: Non Resource Operation
                    name: Microsoft.Relay/checkNamespaceAvailability/action
                  - display:
                      operation: Registers the Relay Resource Provider
                      provider: Microsoft Azure Relay
                      resource: Relay and Hybridconnection Resource Provider
                    name: Microsoft.Relay/register/action
                  - display:
                      operation: "Create Or Update Namespace "
                      provider: Microsoft Azure Relay
                      resource: Namespace
                    name: Microsoft.Relay/namespaces/write
                  - display:
                      operation: Get Namespace Resource
                      provider: Microsoft Azure Relay
                      resource: Namespace
                    name: Microsoft.Relay/namespaces/read
                  - display:
                      operation: Delete Namespace
                      provider: Microsoft Azure Relay
                      resource: Namespace
                    name: Microsoft.Relay/namespaces/Delete
                  - display:
                      operation: Create or Update Namespace Authorization Rules
                      provider: Microsoft Azure Relay
                      resource: AuthorizationRules
                    name: Microsoft.Relay/namespaces/authorizationRules/write
                  - display:
                      operation: Delete Namespace Authorization Rule
                      provider: Microsoft Azure Relay
                      resource: AuthorizationRules
                    name: Microsoft.Relay/namespaces/authorizationRules/delete
                  - display:
                      operation: Get Namespace Listkeys
                      provider: Microsoft Azure Relay
                      resource: AuthorizationRules
                    name: Microsoft.Relay/namespaces/authorizationRules/listkeys/action
                  - display:
                      operation: Create or Update HybridConnection
                      provider: Microsoft Azure Relay
                      resource: HybridConnection
                    name: Microsoft.Relay/namespaces/HybridConnections/write
                  - display:
                      operation: Get HybridConnection
                      provider: Microsoft Azure Relay
                      resource: HybridConnection
                    name: Microsoft.Relay/namespaces/HybridConnections/read
                  - display:
                      operation: Delete HybridConnection
                      provider: Microsoft Azure Relay
                      resource: HybridConnection
                    name: Microsoft.Relay/namespaces/HybridConnections/Delete
                  - display:
                      operation: Create or Update HybridConnection Authorization Rule
                      provider: Microsoft Azure Relay
                      resource: HybridConnection AuthorizationRules
                    name: Microsoft.Relay/namespaces/HybridConnections/authorizationRules/write
                  - display:
                      operation: Delete HybridConnection Authorization Rules
                      provider: Microsoft Azure Relay
                      resource: HybridConnection AuthorizationRules
                    name: Microsoft.Relay/namespaces/HybridConnections/authorizationRules/delete
                  - display:
                      operation: List HybridConnection keys
                      provider: Microsoft Azure Relay
                      resource: HybridConnection AuthorizationRules
                    name: Microsoft.Relay/namespaces/HybridConnections/authorizationRules/listkeys/action
                  - display:
                      operation: Create or Update WcfRelay
                      provider: Microsoft Azure Relay
                      resource: WcfRelay
                    name: Microsoft.Relay/namespaces/WcfRelays/write
                  - display:
                      operation: Get WcfRelay
                      provider: Microsoft Azure Relay
                      resource: WcfRelay
                    name: Microsoft.Relay/namespaces/WcfRelays/read
                  - display:
                      operation: Delete WcfRelay
                      provider: Microsoft Azure Relay
                      resource: WcfRelay
                    name: Microsoft.Relay/namespaces/WcfRelays/Delete
                  - display:
                      operation: Create or Update WcfRelay Authorization Rule
                      provider: Microsoft Azure Relay
                      resource: WcfRelay AuthorizationRules
                    name: Microsoft.Relay/namespaces/WcfRelays/authorizationRules/write
                  - display:
                      operation: Delete WcfRelay Authorization Rules
                      provider: Microsoft Azure Relay
                      resource: WcfRelay AuthorizationRules
                    name: Microsoft.Relay/namespaces/WcfRelays/authorizationRules/delete
                  - display:
                      operation: List WcfRelay keys
                      provider: Microsoft Azure Relay
                      resource: WcfRelay AuthorizationRules
                    name: Microsoft.Relay/namespaces/WcfRelays/authorizationRules/listkeys/action
      x-ms-pageable:
        nextLinkName: nextLink
  "/subscriptions/{subscriptionId}/providers/Microsoft.Relay/CheckNameAvailability":
    post:
      description: Check the give namespace name availability.
      operationId: Namespaces_CheckNameAvailability
      parameters:
        - $ref: "#/parameters/ApiVersionParameter"
        - $ref: "#/parameters/SubscriptionIdParameter"
        - description: Parameters to check availability of the given namespace name
          in: body
          name: parameters
          required: true
          schema:
            $ref: "#/definitions/CheckNameAvailability"
      responses:
        "200":
          description: check availability returned successfully.
          schema:
            $ref: "#/definitions/CheckNameAvailabilityResult"
      tags:
        - Namespaces
      x-ms-examples:
        RelayCheckNameAvailability:
          parameters:
            api-version: 2016-07-01
            parameters:
              name: sdk-Namespace1321
            subscriptionId: e2f361f0-3b27-4503-a9cc-21cfba380093
          responses:
            "200":
              body:
                message: ""
                nameAvailable: true
                reason: None
  "/subscriptions/{subscriptionId}/providers/Microsoft.Relay/Namespaces":
    get:
      description: Lists all the available namespaces within the subscription irrespective of the resourceGroups.
      operationId: Namespaces_List
      parameters:
        - $ref: "#/parameters/ApiVersionParameter"
        - $ref: "#/parameters/SubscriptionIdParameter"
      responses:
        "200":
          description: Namespaces returned successfully
          schema:
            $ref: "#/definitions/RelayNamespaceListResult"
        default:
          description: Relay error response describing why the operation failed.
          schema:
            $ref: "#/definitions/ErrorResponse"
      tags:
        - Namespaces
      x-ms-examples:
        RelayNameSpaceListBySubscription:
          parameters:
            api-version: 2016-07-01
            subscriptionId: 8c246e6a-cbc6-4a87-aff1-d6a886f376ef
          responses:
            "200":
              body:
                value:
                  - id: /subscriptions/8c246e6a-cbc6-4a87-aff1-d6a886f376ef/resourceGroups/RG1-eg/providers/Microsoft.Relay/namespaces/sdk-RelayNamespace-01
                    location: West US
                    name: sdk-RelayNamespace-01
                    properties:
                      createdAt: 2017-01-23T20:34:49.4131724Z
                      metricId: 8c246e6a-cbc6-4a87-aff1-d6a886f376ef:sdk-RelayNamespace-01
                      provisioningState: Succeeded
                      serviceBusEndpoint: https://sdk-RelayNamespace-01.servicebus.windows.net:443/
                      updatedAt: 2017-01-23T20:34:59.4131724Z
                    sku:
                      name: Standard
                      tier: Standard
                    tags:
                      tag1: value1
                      tag2: value2
                    type: Microsoft.Relay/Namespaces
                  - id: /subscriptions/8c246e6a-cbc6-4a87-aff1-d6a886f376ef/resourceGroups/RG1-eg/providers/Microsoft.Relay/namespaces/sdk-RelayNamespace-02
                    location: West US
                    name: sdk-RelayNamespace-02
                    properties:
                      createdAt: 2017-01-23T20:34:39.4131724Z
                      metricId: 8c246e6a-cbc6-4a87-aff1-d6a886f376ef:sdk-RelayNamespace-02
                      provisioningState: Succeeded
                      serviceBusEndpoint: https://sdk-RelayNamespace-02.servicebus.windows.net:443/
                      updatedAt: 2017-01-23T20:34:49.4131724Z
                    sku:
                      name: Standard
                      tier: Standard
                    tags:
                      tag1: value1
                      tag2: value2
                    type: Microsoft.Relay/Namespaces
      x-ms-pageable:
        nextLinkName: nextLink
  "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Relay/Namespaces":
    get:
      description: Lists all the available namespaces within the ResourceGroup.
      operationId: Namespaces_ListByResourceGroup
      parameters:
        - $ref: "#/parameters/resourceGroupNameParameter"
        - $ref: "#/parameters/ApiVersionParameter"
        - $ref: "#/parameters/SubscriptionIdParameter"
      responses:
        "200":
          description: Namespaces by resourcegroup returned successfully
          schema:
            $ref: "#/definitions/RelayNamespaceListResult"
        default:
          description: Relay error response describing why the operation failed.
          schema:
            $ref: "#/definitions/ErrorResponse"
      tags:
        - Namespaces
      x-ms-examples:
        RelayNameSpaceListByResourceGroup:
          parameters:
            api-version: 2016-07-01
            resourceGroupName: RG-eg
            subscriptionId: 8c246e6a-cbc6-4a87-aff1-d6a886f376ef
          responses:
            "200":
              body:
                value:
                  - id: /subscriptions/8c246e6a-cbc6-4a87-aff1-d6a886f376ef/resourceGroups/RG-eg/providers/Microsoft.Relay/namespaces/sdk-RelayNamespace-01
                    location: West US
                    name: sdk-RelayNamespace-01
                    properties:
                      createdAt: 2017-01-23T20:34:49.4131724Z
                      metricId: 8c246e6a-cbc6-4a87-aff1-d6a886f376ef:sdk-RelayNamespace-01
                      provisioningState: Succeeded
                      serviceBusEndpoint: https://sdk-RelayNamespace-01.servicebus.windows.net:443/
                      updatedAt: 2017-01-23T20:34:59.4131724Z
                    sku:
                      name: Standard
                      tier: Standard
                    tags:
                      tag1: value1
                      tag2: value2
                    type: Microsoft.Relay/Namespaces
                  - id: /subscriptions/8c246e6a-cbc6-4a87-aff1-d6a886f376ef/resourceGroups/RG-eg/providers/Microsoft.Relay/namespaces/sdk-RelayNamespace-02
                    location: West US
                    name: sdk-RelayNamespace-02
                    properties:
                      createdAt: 2017-01-23T20:34:39.4131724Z
                      metricId: 8c246e6a-cbc6-4a87-aff1-d6a886f376ef:sdk-RelayNamespace-02
                      provisioningState: Succeeded
                      serviceBusEndpoint: https://sdk-RelayNamespace-02.servicebus.windows.net:443/
                      updatedAt: 2017-01-23T20:34:49.4131724Z
                    sku:
                      name: Standard
                      tier: Standard
                    tags:
                      tag1: value1
                      tag2: value2
                    type: Microsoft.Relay/Namespaces
      x-ms-pageable:
        nextLinkName: nextLink
  "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Relay/namespaces/{namespaceName}":
    delete:
      description: Deletes an existing namespace. This operation also removes all associated resources under the namespace.
      operationId: Namespaces_Delete
      parameters:
        - $ref: "#/parameters/resourceGroupNameParameter"
        - $ref: "#/parameters/namespaceNameParameter"
        - $ref: "#/parameters/ApiVersionParameter"
        - $ref: "#/parameters/SubscriptionIdParameter"
      responses:
        "200":
          description: Namespace delete Request succeeded
        "202":
          description: Namespace delete request has been accepted for processing and the operation will complete asynchronously.
        "204":
          description: Namespace delete request has been accepted, but the Namespace not found
        default:
          description: Relay error response describing why the operation failed.
          schema:
            $ref: "#/definitions/ErrorResponse"
      tags:
        - Namespaces
      x-ms-examples:
        RelayNameSpaceDelete:
          parameters:
            api-version: 2016-07-01
            namespaceName: sdk-RelayNamespace-01
            resourceGroupName: RG-eg
            subscriptionId: 8c246e6a-cbc6-4a87-aff1-d6a886f376ef
          responses:
            "200": {}
            "202": {}
            "204": {}
      x-ms-long-running-operation: true
    get:
      description: Returns the description for the specified namespace.
      operationId: Namespaces_Get
      parameters:
        - $ref: "#/parameters/resourceGroupNameParameter"
        - $ref: "#/parameters/namespaceNameParameter"
        - $ref: "#/parameters/ApiVersionParameter"
        - $ref: "#/parameters/SubscriptionIdParameter"
      responses:
        "200":
          description: Namespace returned successfully
          schema:
            $ref: "#/definitions/RelayNamespace"
        default:
          description: Relay error response describing why the operation failed.
          schema:
            $ref: "#/definitions/ErrorResponse"
      tags:
        - Namespaces
      x-ms-examples:
        RelayNameSpaceGet:
          parameters:
            api-version: 2016-07-01
            namespaceName: sdk-RelayNamespace-01
            resourceGroupName: RG-eg
            subscriptionId: 8c246e6a-cbc6-4a87-aff1-d6a886f376ef
          responses:
            "200":
              body:
                id: /subscriptions/8c246e6a-cbc6-4a87-aff1-d6a886f376ef/resourceGroups/RG-eg/providers/Microsoft.Relay/namespaces/sdk-RelayNamespace-01
                location: West US
                name: sdk-RelayNamespace-01
                properties:
                  createdAt: 2017-01-23T20:38:12.46Z
                  metricId: 8c246e6a-cbc6-4a87-aff1-d6a886f376ef:sdk-RelayNamespace-01
                  provisioningState: Succeeded
                  serviceBusEndpoint: https://sdk-RelayNamespace-01.servicebus.windows.net:443/
                  updatedAt: 2017-01-23T20:38:34.533Z
                sku:
                  name: Standard
                  tier: Standard
                tags:
                  tag1: value1
                  tag2: value2
                type: Microsoft.Relay/Namespaces
    patch:
      description: Creates or updates a namespace. Once created, this namespace's resource manifest is immutable. This operation is idempotent.
      operationId: Namespaces_Update
      parameters:
        - $ref: "#/parameters/resourceGroupNameParameter"
        - $ref: "#/parameters/namespaceNameParameter"
        - description: Parameters for updating a namespace resource.
          in: body
          name: parameters
          required: true
          schema:
            $ref: "#/definitions/RelayNamespaceUpdateParameter"
        - $ref: "#/parameters/ApiVersionParameter"
        - $ref: "#/parameters/SubscriptionIdParameter"
      responses:
        "200":
          description: Namespace successfuly updated.
          schema:
            $ref: "#/definitions/RelayNamespace"
      tags:
        - Namespaces
    put:
      description: Create Azure Relay namespace.
      operationId: Namespaces_CreateOrUpdate
      parameters:
        - $ref: "#/parameters/resourceGroupNameParameter"
        - $ref: "#/parameters/namespaceNameParameter"
        - description: Parameters supplied to create a Namespace Resource.
          in: body
          name: parameters
          required: true
          schema:
            $ref: "#/definitions/RelayNamespace"
        - $ref: "#/parameters/ApiVersionParameter"
        - $ref: "#/parameters/SubscriptionIdParameter"
      responses:
        "200":
          description: Namespace create request succeeded
          schema:
            $ref: "#/definitions/RelayNamespace"
        "202":
          description: Namespace create request accepted
        default:
          description: Relay error response describing why the operation failed.
          schema:
            $ref: "#/definitions/ErrorResponse"
      tags:
        - Namespaces
      x-ms-examples:
        RelayNamespaceCreate:
          parameters:
            api-version: 2016-07-01
            namespaceName: sdk-RelayNamespace-01
            parameters:
              location: West US
              sku:
                name: Standard
                tier: Standard
              tags:
                tag1: value1
                tag2: value2
            resourceGroupName: RG-eg
            subscriptionId: 8c246e6a-cbc6-4a87-aff1-d6a886f376ef
          responses:
            "200":
              body:
                id: /subscriptions/8c246e6a-cbc6-4a87-aff1-d6a886f376ef/resourceGroups/RG-eg/providers/Microsoft.Relay/namespaces/sdk-RelayNamespace-01
                location: West US
                name: sdk-RelayNamespace-01
                properties:
                  metricId: e2f361f0-3b27-4503-a9cc-21cfba380093:sdk-relaynamespace-01
                  provisioningState: Unknown
                sku:
                  name: Standard
                  tier: Standard
                tags:
                  tag1: value1
                  tag2: value2
                type: Microsoft.Relay/Namespaces
            "202": {}
      x-ms-long-running-operation: true
  "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Relay/namespaces/{namespaceName}/AuthorizationRules":
    get:
      description: Authorization rules for a namespace.
      operationId: Namespaces_ListAuthorizationRules
      parameters:
        - $ref: "#/parameters/resourceGroupNameParameter"
        - $ref: "#/parameters/namespaceNameParameter"
        - $ref: "#/parameters/ApiVersionParameter"
        - $ref: "#/parameters/SubscriptionIdParameter"
      responses:
        "200":
          description: Namespace Authorization rule returned successfully
          schema:
            $ref: "#/definitions/AuthorizationRuleListResult"
        default:
          description: Relay error response describing why the operation failed.
          schema:
            $ref: "#/definitions/ErrorResponse"
      tags:
        - Namespaces
      x-ms-examples:
        RelayNameSpaceAutorizationRuleListAll:
          parameters:
            api-version: 2016-07-01
            namespaceName: sdk-RelayNamespace-01
            resourceGroupName: RG-eg
            subscriptionId: 8c246e6a-cbc6-4a87-aff1-d6a886f376ef
          responses:
            "200":
              body:
                value:
                  - id: /subscriptions/8c246e6a-cbc6-4a87-aff1-d6a886f376ef/resourceGroups/RG-eg/providers/Microsoft.Relay/namespaces/sdk-RelayNamespace-01/AuthorizationRules/RootManageSharedAccessKey
                    name: RootManageSharedAccessKey
                    properties:
                      rights:
                        - Listen
                        - Manage
                        - Send
                    type: Microsoft.Relay/Namespaces/AuthorizationRules
                  - id: /subscriptions/8c246e6a-cbc6-4a87-aff1-d6a886f376ef/resourceGroups/RG-eg/providers/Microsoft.Relay/namespaces/sdk-RelayNamespace-01/AuthorizationRules/sdk-RelayAuthRules-01
                    name: sdk-RelayAuthRules-01
                    properties:
                      rights:
                        - Listen
                        - Send
                    type: Microsoft.Relay/Namespaces/AuthorizationRules
      x-ms-pageable:
        nextLinkName: nextLink
    post:
      description: Authorization rules for a namespace.
      operationId: Namespaces_ListPostAuthorizationRules
      parameters:
        - $ref: "#/parameters/resourceGroupNameParameter"
        - $ref: "#/parameters/namespaceNameParameter"
        - $ref: "#/parameters/ApiVersionParameter"
        - $ref: "#/parameters/SubscriptionIdParameter"
      responses:
        "200":
          description: Namespace Authorization rule returned successfully
          schema:
            $ref: "#/definitions/AuthorizationRuleListResult"
        default:
          description: Relay error response describing why the operation failed.
          schema:
            $ref: "#/definitions/ErrorResponse"
      tags:
        - Namespaces
      x-ms-examples:
        RelayNameSpaceAutorizationRuleListAll:
          parameters:
            api-version: 2016-07-01
            namespaceName: sdk-RelayNamespace-01
            resourceGroupName: RG-eg
            subscriptionId: 8c246e6a-cbc6-4a87-aff1-d6a886f376ef
          responses:
            "200":
              body:
                value:
                  - id: /subscriptions/8c246e6a-cbc6-4a87-aff1-d6a886f376ef/resourceGroups/RG-eg/providers/Microsoft.Relay/namespaces/sdk-RelayNamespace-01/AuthorizationRules/RootManageSharedAccessKey
                    name: RootManageSharedAccessKey
                    properties:
                      rights:
                        - Listen
                        - Manage
                        - Send
                    type: Microsoft.Relay/Namespaces/AuthorizationRules
                  - id: /subscriptions/8c246e6a-cbc6-4a87-aff1-d6a886f376ef/resourceGroups/RG-eg/providers/Microsoft.Relay/namespaces/sdk-RelayNamespace-01/AuthorizationRules/sdk-RelayAuthRules-01
                    name: sdk-RelayAuthRules-01
                    properties:
                      rights:
                        - Listen
                        - Send
                    type: Microsoft.Relay/Namespaces/AuthorizationRules
      x-ms-pageable:
        nextLinkName: nextLink
  "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Relay/namespaces/{namespaceName}/AuthorizationRules/{authorizationRuleName}":
    delete:
      description: Deletes a namespace authorization rule
      operationId: Namespaces_DeleteAuthorizationRule
      parameters:
        - $ref: "#/parameters/resourceGroupNameParameter"
        - $ref: "#/parameters/namespaceNameParameter"
        - $ref: "#/parameters/authorizationRuleNameParameter"
        - $ref: "#/parameters/ApiVersionParameter"
        - $ref: "#/parameters/SubscriptionIdParameter"
      responses:
        "200":
          description: Request to delete Namespace Authorization rule succeeded.
        "204":
          description: No Content. The request has been accepted but the Namespace Authorization rule was not found.
        default:
          description: Relay error response describing why the operation failed.
          schema:
            $ref: "#/definitions/ErrorResponse"
      tags:
        - Namespaces
      x-ms-examples:
        RelayNameSpaceAutorizationRuleDelete:
          parameters:
            api-version: 2016-07-01
            authorizationRuleName: sdk-RelayAuthRules-01
            namespaceName: sdk-RelayNamespace-01
            resourceGroupName: RG-eg
            subscriptionId: 8c246e6a-cbc6-4a87-aff1-d6a886f376ef
          responses:
            "200": {}
            "204": {}
    get:
      description: Authorization rule for a namespace by name.
      operationId: Namespaces_GetAuthorizationRule
      parameters:
        - $ref: "#/parameters/resourceGroupNameParameter"
        - $ref: "#/parameters/namespaceNameParameter"
        - $ref: "#/parameters/authorizationRuleNameParameter"
        - $ref: "#/parameters/ApiVersionParameter"
        - $ref: "#/parameters/SubscriptionIdParameter"
      responses:
        "200":
          description: Namespace Authorization rule returned successfully
          schema:
            $ref: "#/definitions/AuthorizationRule"
        default:
          description: Relay error response describing why the operation failed.
          schema:
            $ref: "#/definitions/ErrorResponse"
      tags:
        - Namespaces
      x-ms-examples:
        RelayNameSpaceAutorizationRuleGet:
          parameters:
            api-version: 2016-07-01
            authorizationRuleName: sdk-RelayAuthRules-01
            namespaceName: sdk-RelayNamespace-01
            resourceGroupName: RG-eg
            subscriptionId: 8c246e6a-cbc6-4a87-aff1-d6a886f376ef
          responses:
            "200":
              body:
                id: /subscriptions/8c246e6a-cbc6-4a87-aff1-d6a886f376ef/resourceGroups/RG-eg/providers/Microsoft.Relay/namespaces/sdk-RelayNamespace-01/AuthorizationRules/sdk-RelayAuthRules-01
                name: sdk-RelayAuthRules-01
                properties:
                  rights:
                    - Listen
                type: Microsoft.Relay/Namespaces/AuthorizationRules
    post:
      description: Authorization rule for a namespace by name.
      operationId: Namespaces_PostAuthorizationRule
      parameters:
        - $ref: "#/parameters/resourceGroupNameParameter"
        - $ref: "#/parameters/namespaceNameParameter"
        - $ref: "#/parameters/authorizationRuleNameParameter"
        - $ref: "#/parameters/ApiVersionParameter"
        - $ref: "#/parameters/SubscriptionIdParameter"
      responses:
        "200":
          description: Namespace Authorization rule returned successfully
          schema:
            $ref: "#/definitions/AuthorizationRule"
        default:
          description: Relay error response describing why the operation failed.
          schema:
            $ref: "#/definitions/ErrorResponse"
      tags:
        - Namespaces
      x-ms-examples:
        RelayNameSpaceAutorizationRuleGet:
          parameters:
            api-version: 2016-07-01
            authorizationRuleName: sdk-RelayAuthRules-01
            namespaceName: sdk-RelayNamespace-01
            resourceGroupName: RG-eg
            subscriptionId: 8c246e6a-cbc6-4a87-aff1-d6a886f376ef
          responses:
            "200":
              body:
                id: /subscriptions/8c246e6a-cbc6-4a87-aff1-d6a886f376ef/resourceGroups/RG-eg/providers/Microsoft.Relay/namespaces/sdk-RelayNamespace-01/AuthorizationRules/sdk-RelayAuthRules-01
                name: sdk-RelayAuthRules-01
                properties:
                  rights:
                    - Listen
                type: Microsoft.Relay/Namespaces/AuthorizationRules
    put:
      description: Creates or Updates an authorization rule for a namespace
      operationId: Namespaces_CreateOrUpdateAuthorizationRule
      parameters:
        - $ref: "#/parameters/resourceGroupNameParameter"
        - $ref: "#/parameters/namespaceNameParameter"
        - $ref: "#/parameters/authorizationRuleNameParameter"
        - description: The authorization rule parameters
          in: body
          name: parameters
          required: true
          schema:
            $ref: "#/definitions/AuthorizationRule"
        - $ref: "#/parameters/ApiVersionParameter"
        - $ref: "#/parameters/SubscriptionIdParameter"
      responses:
        "200":
          description: Request to create Namespace Authorization rule succeeded
          schema:
            $ref: "#/definitions/AuthorizationRule"
        default:
          description: Relay error response describing why the operation failed.
          schema:
            $ref: "#/definitions/ErrorResponse"
      tags:
        - Namespaces
      x-ms-examples:
        RelayNameSpaceAuthorizationRuleCreate:
          parameters:
            api-version: 2016-07-01
            authorizationRuleName: sdk-RelayAuthRules-01
            namespaceName: sdk-RelayNamespace-01
            parameters:
              properties:
                rights:
                  - Listen
                  - Send
            resourceGroupName: RG-eg
            subscriptionId: 8c246e6a-cbc6-4a87-aff1-d6a886f376ef
          responses:
            "200":
              body:
                id: /subscriptions/8c246e6a-cbc6-4a87-aff1-d6a886f376ef/resourceGroups/RG-eg/providers/Microsoft.Relay/namespaces/sdk-RelayNamespace-01/AuthorizationRules/sdk-RelayAuthRules-01
                name: sdk-RelayAuthRules-01
                properties:
                  rights:
                    - Listen
                    - Send
                type: Microsoft.Relay/Namespaces/AuthorizationRules
  "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Relay/namespaces/{namespaceName}/AuthorizationRules/{authorizationRuleName}/listKeys":
    post:
      description: "Primary and Secondary ConnectionStrings to the namespace "
      operationId: Namespaces_ListKeys
      parameters:
        - $ref: "#/parameters/resourceGroupNameParameter"
        - $ref: "#/parameters/namespaceNameParameter"
        - $ref: "#/parameters/authorizationRuleNameParameter"
        - $ref: "#/parameters/ApiVersionParameter"
        - $ref: "#/parameters/SubscriptionIdParameter"
      responses:
        "200":
          description: Successful
          schema:
            $ref: "#/definitions/AuthorizationRuleKeys"
        default:
          description: Relay error response describing why the operation failed.
          schema:
            $ref: "#/definitions/ErrorResponse"
      tags:
        - Namespaces
      x-ms-examples:
        RelayNameSpaceAuthorizationRuleListKey:
          parameters:
            api-version: 2016-07-01
            authorizationRuleName: sdk-RelayAuthRules-01
            namespaceName: sdk-RelayNamespace-01
            resourceGroupName: RG-eg
            subscriptionId: 8c246e6a-cbc6-4a87-aff1-d6a886f376ef
          responses:
            "200":
              body:
                keyName: sdk-RelayAuthRules-01
                primaryConnectionString: Endpoint=sb://sdk-relaynamespace-01.servicebus.windows.net/;SharedAccessKeyName=sdk-RelayAuthRules-01;SharedAccessKey=############################################
                primaryKey: "############################################"
                secondaryConnectionString: Endpoint=sb://sdk-relaynamespace-01.servicebus.windows.net/;SharedAccessKeyName=sdk-RelayAuthRules-01;SharedAccessKey=############################################
                secondaryKey: "############################################"
  "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Relay/namespaces/{namespaceName}/AuthorizationRules/{authorizationRuleName}/regenerateKeys":
    post:
      description: "Regenerates the Primary or Secondary ConnectionStrings to the namespace "
      operationId: Namespaces_RegenerateKeys
      parameters:
        - $ref: "#/parameters/resourceGroupNameParameter"
        - $ref: "#/parameters/namespaceNameParameter"
        - $ref: "#/parameters/authorizationRuleNameParameter"
        - description: Parameters supplied to regenerate Auth Rule.
          in: body
          name: parameters
          required: true
          schema:
            $ref: "#/definitions/RegenerateKeysParameters"
        - $ref: "#/parameters/ApiVersionParameter"
        - $ref: "#/parameters/SubscriptionIdParameter"
      responses:
        "200":
          description: Successful
          schema:
            $ref: "#/definitions/AuthorizationRuleKeys"
        default:
          description: Relay error response describing why the operation failed.
          schema:
            $ref: "#/definitions/ErrorResponse"
      tags:
        - Namespaces
      x-ms-examples:
        RelayNameSpaceAuthorizationRuleRegenrateKey:
          parameters:
            api-version: 2016-07-01
            authorizationRuleName: sdk-RelayAuthRules-01
            namespaceName: sdk-RelayNamespace-01
            parameters:
              policyKey: PrimaryKey
            resourceGroupName: RG-eg
            subscriptionId: 8c246e6a-cbc6-4a87-aff1-d6a886f376ef
          responses:
            "200":
              body:
                keyName: sdk-RelayAuthRules-01
                primaryConnectionString: Endpoint=sb://sdk-relaynamespace-01.servicebus.windows.net/;SharedAccessKeyName=sdk-RelayAuthRules-01;SharedAccessKey=############################################
                primaryKey: "############################################"
                secondaryConnectionString: Endpoint=sb://sdk-relaynamespace-01.servicebus.windows.net/;SharedAccessKeyName=sdk-RelayAuthRules-01;SharedAccessKey=############################################
                secondaryKey: "############################################"
  "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Relay/namespaces/{namespaceName}/HybridConnections":
    get:
      description: Lists the HybridConnection within the namespace.
      operationId: HybridConnections_ListByNamespace
      parameters:
        - $ref: "#/parameters/resourceGroupNameParameter"
        - $ref: "#/parameters/namespaceNameParameter"
        - $ref: "#/parameters/ApiVersionParameter"
        - $ref: "#/parameters/SubscriptionIdParameter"
      responses:
        "200":
          description: Request to retrieve HybridConnections by NameSpace succeeded
          schema:
            $ref: "#/definitions/HybridConnectionListResult"
        default:
          description: Relay error response describing why the operation failed.
          schema:
            $ref: "#/definitions/ErrorResponse"
      tags:
        - HybridConnections
      x-ms-examples:
        RelayHybridConnectionListAll:
          parameters:
            api-version: 2016-07-01
            hybridConnectionName: sdk-Relay-Hybrid-01
            namespaceName: sdk-RelayNamespace-01
            resourceGroupName: RG-eg
            subscriptionId: 8c246e6a-cbc6-4a87-aff1-d6a886f376ef
          responses:
            "200":
              body:
                value:
                  - id: /subscriptions/8c246e6a-cbc6-4a87-aff1-d6a886f376ef/resourceGroups/RG-eg/providers/Microsoft.Relay/namespaces/sdk-RelayNamespace-01/HybridConnections/sdk-Relay-Hybrid-01
                    name: sdk-Relay-Hybrid-01
                    properties:
                      createdAt: 2017-01-23T20:34:49.4131724Z
                      listenerCount: 1
                      requiresClientAuthorization: true
                      updatedAt: 2017-01-23T20:34:49.4131724Z
                      userMetadata: usermetadata is a placeholder to store user-defined string data for the HybridConnection endpoint.e.g. it can be used to store  descriptive data, such as list of teams and their contact information also user-defined configuration settings can be stored.
                    type: Microsoft.Relay/Namespaces/HybridConnections
      x-ms-pageable:
        nextLinkName: nextLink
  "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Relay/namespaces/{namespaceName}/HybridConnections/{hybridConnectionName}":
    delete:
      description: Deletes a HybridConnection .
      operationId: HybridConnections_Delete
      parameters:
        - $ref: "#/parameters/resourceGroupNameParameter"
        - $ref: "#/parameters/namespaceNameParameter"
        - $ref: "#/parameters/hybridConnectionNameParameter"
        - $ref: "#/parameters/ApiVersionParameter"
        - $ref: "#/parameters/SubscriptionIdParameter"
      responses:
        "200":
          description: Request to delete Hybrid Connections succeeded.
        "204":
          description: No Content. The request has been accepted but the Hybrid Connections was not found.
        default:
          description: Relay error response describing why the operation failed.
          schema:
            $ref: "#/definitions/ErrorResponse"
      tags:
        - HybridConnections
      x-ms-examples:
        RelayHybridconnectionDelete:
          parameters:
            api-version: 2016-07-01
            hybridConnectionName: sdk-Relay-Hybrid-01
            namespaceName: sdk-RelayNamespace-01
            resourceGroupName: RG-eg
            subscriptionId: 8c246e6a-cbc6-4a87-aff1-d6a886f376ef
          responses:
            "200": {}
            "204": {}
    get:
      description: Returns the description for the specified HybridConnection.
      operationId: HybridConnections_Get
      parameters:
        - $ref: "#/parameters/resourceGroupNameParameter"
        - $ref: "#/parameters/namespaceNameParameter"
        - $ref: "#/parameters/hybridConnectionNameParameter"
        - $ref: "#/parameters/ApiVersionParameter"
        - $ref: "#/parameters/SubscriptionIdParameter"
      responses:
        "200":
          description: Successfully retrieved hybridConnection description
          schema:
            $ref: "#/definitions/HybridConnection"
        default:
          description: Relay error response describing why the operation failed.
          schema:
            $ref: "#/definitions/ErrorResponse"
      tags:
        - HybridConnections
      x-ms-examples:
        RelayHybridConnectionGet:
          parameters:
            api-version: 2016-07-01
            hybridConnectionName: sdk-Relay-Hybrid-01
            namespaceName: sdk-RelayNamespace-01
            resourceGroupName: RG-eg
            subscriptionId: 8c246e6a-cbc6-4a87-aff1-d6a886f376ef
          responses:
            "200":
              body:
                id: /subscriptions/8c246e6a-cbc6-4a87-aff1-d6a886f376ef/resourceGroups/RG-eg/providers/Microsoft.Relay/namespaces/sdk-RelayNamespace-01/HybridConnections/sdk-Relay-Hybrid-01
                name: sdk-Relay-Hybrid-01
                properties:
                  createdAt: 2017-01-23T20:34:49.4131724Z
                  listenerCount: 1
                  requiresClientAuthorization: true
                  updatedAt: 2017-01-23T20:34:49.4131724Z
                  userMetadata: usermetadata is a placeholder to store user-defined string data for the HybridConnection endpoint.e.g. it can be used to store  descriptive data, such as list of teams and their contact information also user-defined configuration settings can be stored.
                type: Microsoft.Relay/Namespaces/HybridConnections
    put:
      description: Creates or Updates a service HybridConnection. This operation is idempotent.
      operationId: HybridConnections_CreateOrUpdate
      parameters:
        - $ref: "#/parameters/resourceGroupNameParameter"
        - $ref: "#/parameters/namespaceNameParameter"
        - $ref: "#/parameters/hybridConnectionNameParameter"
        - description: Parameters supplied to create a HybridConnection.
          in: body
          name: parameters
          required: true
          schema:
            $ref: "#/definitions/HybridConnection"
        - $ref: "#/parameters/ApiVersionParameter"
        - $ref: "#/parameters/SubscriptionIdParameter"
      responses:
        "200":
          description: Request to Create Hybrid Connections succeeded
          schema:
            $ref: "#/definitions/HybridConnection"
        default:
          description: Relay error response describing why the operation failed.
          schema:
            $ref: "#/definitions/ErrorResponse"
      tags:
        - HybridConnections
      x-ms-examples:
        RelayHybridConnectionCreate:
          parameters:
            api-version: 2016-07-01
            hybridConnectionName: sdk-Relay-Hybrid-01
            namespaceName: sdk-RelayNamespace-01
            parameters:
              properties:
                requiresClientAuthorization: true
            resourceGroupName: RG-eg
            subscriptionId: 8c246e6a-cbc6-4a87-aff1-d6a886f376ef
          responses:
            "200":
              body:
                id: /subscriptions/8c246e6a-cbc6-4a87-aff1-d6a886f376ef/resourceGroups/RG-eg/providers/Microsoft.Relay/namespaces/sdk-RelayNamespace-01/HybridConnections/sdk-Relay-Hybrid-01
                name: sdk-Relay-Hybrid-01
                properties:
                  createdAt: 2017-01-23T20:34:49.4131724Z
                  requiresClientAuthorization: true
                  updatedAt: 2017-01-23T20:34:49.4131724Z
                type: Microsoft.Relay/Namespaces/HybridConnections
  "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Relay/namespaces/{namespaceName}/HybridConnections/{hybridConnectionName}/authorizationRules":
    get:
      description: Authorization rules for a HybridConnection.
      operationId: HybridConnections_ListAuthorizationRules
      parameters:
        - $ref: "#/parameters/resourceGroupNameParameter"
        - $ref: "#/parameters/namespaceNameParameter"
        - $ref: "#/parameters/hybridConnectionNameParameter"
        - $ref: "#/parameters/ApiVersionParameter"
        - $ref: "#/parameters/SubscriptionIdParameter"
      responses:
        "200":
          description: Authorization rules successfully returned.
          schema:
            $ref: "#/definitions/AuthorizationRuleListResult"
      tags:
        - HybridConnections
      x-ms-examples:
        RelayHybridConnectionAutorizationRuleListAll:
          parameters:
            api-version: 2016-07-01
            hybridConnectionName: sdk-Relay-Hybrid-01
            namespaceName: sdk-RelayNamespace-01
            resourceGroupName: RG-eg
            subscriptionId: 8c246e6a-cbc6-4a87-aff1-d6a886f376ef
          responses:
            "200":
              body:
                value:
                  - id: /subscriptions/8c246e6a-cbc6-4a87-aff1-d6a886f376ef/resourceGroups/RG-eg/providers/Microsoft.Relay/namespaces/sdk-RelayNamespace-01/HybridConnections/sdk-Relay-Hybrid-01/AuthorizationRules/sdk-RelayAuthRules-01
                    name: sdk-RelayAuthRules-01
                    properties:
                      rights:
                        - Listen
                        - Send
                    type: Microsoft.Relay/Namespaces/Hybridconnections/AuthorizationRules
      x-ms-pageable:
        nextLinkName: nextLink
    post:
      description: Authorization rules for a HybridConnection.
      operationId: HybridConnections_ListPostAuthorizationRules
      parameters:
        - $ref: "#/parameters/resourceGroupNameParameter"
        - $ref: "#/parameters/namespaceNameParameter"
        - $ref: "#/parameters/hybridConnectionNameParameter"
        - $ref: "#/parameters/ApiVersionParameter"
        - $ref: "#/parameters/SubscriptionIdParameter"
      responses:
        "200":
          description: Authorization rules successfully returned.
          schema:
            $ref: "#/definitions/AuthorizationRuleListResult"
      tags:
        - HybridConnections
      x-ms-examples:
        RelayHybridConnectionAutorizationRuleListAll:
          parameters:
            api-version: 2016-07-01
            hybridConnectionName: sdk-Relay-Hybrid-01
            namespaceName: sdk-RelayNamespace-01
            resourceGroupName: RG-eg
            subscriptionId: 8c246e6a-cbc6-4a87-aff1-d6a886f376ef
          responses:
            "200":
              body:
                value:
                  - id: /subscriptions/8c246e6a-cbc6-4a87-aff1-d6a886f376ef/resourceGroups/RG-eg/providers/Microsoft.Relay/namespaces/sdk-RelayNamespace-01/HybridConnections/sdk-Relay-Hybrid-01/AuthorizationRules/sdk-RelayAuthRules-01
                    name: sdk-RelayAuthRules-01
                    properties:
                      rights:
                        - Listen
                        - Send
                    type: Microsoft.Relay/Namespaces/Hybridconnections/AuthorizationRules
      x-ms-pageable:
        nextLinkName: nextLink
  "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Relay/namespaces/{namespaceName}/HybridConnections/{hybridConnectionName}/authorizationRules/{authorizationRuleName}":
    delete:
      description: Deletes a HybridConnection authorization rule
      operationId: HybridConnections_DeleteAuthorizationRule
      parameters:
        - $ref: "#/parameters/resourceGroupNameParameter"
        - $ref: "#/parameters/namespaceNameParameter"
        - $ref: "#/parameters/hybridConnectionNameParameter"
        - $ref: "#/parameters/authorizationRuleNameParameter"
        - $ref: "#/parameters/ApiVersionParameter"
        - $ref: "#/parameters/SubscriptionIdParameter"
      responses:
        "200":
          description: HybridConnection authorizationRule deleted
        "204":
          description: Authorization rule does not exist
        default:
          description: Relay error response describing why the operation failed.
          schema:
            $ref: "#/definitions/ErrorResponse"
      tags:
        - HybridConnections
      x-ms-examples:
        RelayHybridConnectionAutorizationRuleDelete:
          parameters:
            api-version: 2016-07-01
            authorizationRuleName: sdk-RelayAuthRules-01
            hybridConnectionName: sdk-Relay-Hybrid-01
            namespaceName: sdk-RelayNamespace-01
            resourceGroupName: RG-eg
            subscriptionId: 8c246e6a-cbc6-4a87-aff1-d6a886f376ef
          responses:
            "200": {}
            "204": {}
    get:
      description: HybridConnection authorizationRule for a HybridConnection by name.
      operationId: HybridConnections_GetAuthorizationRule
      parameters:
        - $ref: "#/parameters/resourceGroupNameParameter"
        - $ref: "#/parameters/namespaceNameParameter"
        - $ref: "#/parameters/hybridConnectionNameParameter"
        - $ref: "#/parameters/authorizationRuleNameParameter"
        - $ref: "#/parameters/ApiVersionParameter"
        - $ref: "#/parameters/SubscriptionIdParameter"
      responses:
        "200":
          description: HybridConnection AuthorizationRule returned successfully
          schema:
            $ref: "#/definitions/AuthorizationRule"
        default:
          description: Relay error response describing why the operation failed.
          schema:
            $ref: "#/definitions/ErrorResponse"
      tags:
        - HybridConnections
      x-ms-examples:
        RelayHybridConnectionAutorizationRuleGet:
          parameters:
            api-version: 2016-07-01
            authorizationRuleName: sdk-RelayAuthRules-01
            hybridConnectionName: sdk-Relay-Hybrid-01
            namespaceName: sdk-RelayNamespace-01
            resourceGroupName: RG-eg
            subscriptionId: 8c246e6a-cbc6-4a87-aff1-d6a886f376ef
          responses:
            "200":
              body:
                id: /subscriptions/8c246e6a-cbc6-4a87-aff1-d6a886f376ef/resourceGroups/RG-eg/providers/Microsoft.Relay/namespaces/sdk-RelayNamespace-01/HybridConnections/sdk-Relay-Hybrid-01/AuthorizationRules/sdk-RelayAuthRules-01
                name: sdk-RelayAuthRules-01
                properties:
                  rights:
                    - Listen
                type: Microsoft.Relay/Namespaces/Hybridconnections/AuthorizationRules
    post:
      description: HybridConnection authorizationRule for a HybridConnection by name.
      operationId: HybridConnections_PostAuthorizationRule
      parameters:
        - $ref: "#/parameters/resourceGroupNameParameter"
        - $ref: "#/parameters/namespaceNameParameter"
        - $ref: "#/parameters/hybridConnectionNameParameter"
        - $ref: "#/parameters/authorizationRuleNameParameter"
        - $ref: "#/parameters/ApiVersionParameter"
        - $ref: "#/parameters/SubscriptionIdParameter"
      responses:
        "200":
          description: HybridConnection AuthorizationRule returned successfully
          schema:
            $ref: "#/definitions/AuthorizationRule"
        default:
          description: Relay error response describing why the operation failed.
          schema:
            $ref: "#/definitions/ErrorResponse"
      tags:
        - HybridConnections
      x-ms-examples:
        RelayHybridConnectionAutorizationRuleGet:
          parameters:
            api-version: 2016-07-01
            authorizationRuleName: sdk-RelayAuthRules-01
            hybridConnectionName: sdk-Relay-Hybrid-01
            namespaceName: sdk-RelayNamespace-01
            resourceGroupName: RG-eg
            subscriptionId: 8c246e6a-cbc6-4a87-aff1-d6a886f376ef
          responses:
            "200":
              body:
                id: /subscriptions/8c246e6a-cbc6-4a87-aff1-d6a886f376ef/resourceGroups/RG-eg/providers/Microsoft.Relay/namespaces/sdk-RelayNamespace-01/HybridConnections/sdk-Relay-Hybrid-01/AuthorizationRules/sdk-RelayAuthRules-01
                name: sdk-RelayAuthRules-01
                properties:
                  rights:
                    - Listen
                type: Microsoft.Relay/Namespaces/Hybridconnections/AuthorizationRules
    put:
      description: Creates or Updates an authorization rule for a HybridConnection
      operationId: HybridConnections_CreateOrUpdateAuthorizationRule
      parameters:
        - $ref: "#/parameters/resourceGroupNameParameter"
        - $ref: "#/parameters/namespaceNameParameter"
        - $ref: "#/parameters/hybridConnectionNameParameter"
        - $ref: "#/parameters/authorizationRuleNameParameter"
        - description: The authorization rule parameters
          in: body
          name: parameters
          required: true
          schema:
            $ref: "#/definitions/AuthorizationRule"
        - $ref: "#/parameters/ApiVersionParameter"
        - $ref: "#/parameters/SubscriptionIdParameter"
      responses:
        "200":
          description: HybridConnection Authorization rule created
          schema:
            $ref: "#/definitions/AuthorizationRule"
        default:
          description: Relay error response describing why the operation failed.
          schema:
            $ref: "#/definitions/ErrorResponse"
      tags:
        - HybridConnections
      x-ms-examples:
        RelayHybridConnectionAuthorizationRuleCreate:
          parameters:
            api-version: 2016-07-01
            authorizationRuleName: sdk-RelayAuthRules-01
            hybridConnectionName: sdk-Relay-Hybrid-01
            namespaceName: sdk-RelayNamespace-01
            parameters:
              properties:
                rights:
                  - Listen
                  - Send
            resourceGroupName: RG-eg
            subscriptionId: 8c246e6a-cbc6-4a87-aff1-d6a886f376ef
          responses:
            "200":
              body:
                id: /subscriptions/8c246e6a-cbc6-4a87-aff1-d6a886f376ef/resourceGroups/RG-eg/providers/Microsoft.Relay/namespaces/sdk-RelayNamespace-01/HybridConnections/sdk-Relay-Hybrid-01/AuthorizationRules/sdk-RelayAuthRules-01
                name: sdk-RelayAuthRules-01
                properties:
                  rights:
                    - Listen
                    - Send
                type: Microsoft.Relay/Namespaces/Hybridconnections/AuthorizationRules
  "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Relay/namespaces/{namespaceName}/HybridConnections/{hybridConnectionName}/authorizationRules/{authorizationRuleName}/ListKeys":
    post:
      description: Primary and Secondary ConnectionStrings to the HybridConnection.
      operationId: HybridConnections_ListKeys
      parameters:
        - $ref: "#/parameters/resourceGroupNameParameter"
        - $ref: "#/parameters/namespaceNameParameter"
        - $ref: "#/parameters/hybridConnectionNameParameter"
        - $ref: "#/parameters/authorizationRuleNameParameter"
        - $ref: "#/parameters/ApiVersionParameter"
        - $ref: "#/parameters/SubscriptionIdParameter"
      responses:
        "200":
          description: Request to retirve ConnectionStrings to the HybridConnection succeeded
          schema:
            $ref: "#/definitions/AuthorizationRuleKeys"
        default:
          description: Relay error response describing why the operation failed.
          schema:
            $ref: "#/definitions/ErrorResponse"
      tags:
        - HybridConnections
      x-ms-examples:
        RelayHybridConnectionAuthorizationRuleListKey:
          parameters:
            api-version: 2016-07-01
            authorizationRuleName: sdk-RelayAuthRules-01
            hybridConnectionName: sdk-Relay-Hybrid-01
            namespaceName: sdk-RelayNamespace-01
            resourceGroupName: RG-eg
            subscriptionId: 8c246e6a-cbc6-4a87-aff1-d6a886f376ef
          responses:
            "200":
              body:
                keyName: sdk-RelayAuthRules-01
                primaryConnectionString: Endpoint=sb://sdk-relaynamespace-01.servicebus.windows.net/;SharedAccessKeyName=sdk-RelayAuthRules-01;SharedAccessKey=############################################
                primaryKey: "############################################"
                secondaryConnectionString: Endpoint=sb://sdk-relaynamespace-01.servicebus.windows.net/;SharedAccessKeyName=sdk-RelayAuthRules-01;SharedAccessKey=############################################
                secondaryKey: "############################################"
  "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Relay/namespaces/{namespaceName}/HybridConnections/{hybridConnectionName}/authorizationRules/{authorizationRuleName}/regenerateKeys":
    post:
      description: Regenerates the Primary or Secondary ConnectionStrings to the HybridConnection
      operationId: HybridConnections_RegenerateKeys
      parameters:
        - $ref: "#/parameters/resourceGroupNameParameter"
        - $ref: "#/parameters/namespaceNameParameter"
        - $ref: "#/parameters/hybridConnectionNameParameter"
        - $ref: "#/parameters/authorizationRuleNameParameter"
        - description: Parameters supplied to regenerate Auth Rule.
          in: body
          name: parameters
          required: true
          schema:
            $ref: "#/definitions/RegenerateKeysParameters"
        - $ref: "#/parameters/ApiVersionParameter"
        - $ref: "#/parameters/SubscriptionIdParameter"
      responses:
        "200":
          description: Request to regenerate ConnectionStrings to HybridConnection succeeded
          schema:
            $ref: "#/definitions/AuthorizationRuleKeys"
        default:
          description: Relay error response describing why the operation failed.
          schema:
            $ref: "#/definitions/ErrorResponse"
      tags:
        - HybridConnections
      x-ms-examples:
        RelayHybridConnectionAuthorizationRuleRegenrateKey:
          parameters:
            api-version: 2016-07-01
            authorizationRuleName: sdk-RelayAuthRules-01
            hybridConnectionName: sdk-Relay-Hybrid-01
            namespaceName: sdk-RelayNamespace-01
            parameters:
              policyKey: PrimaryKey
            resourceGroupName: RG-eg
            subscriptionId: 8c246e6a-cbc6-4a87-aff1-d6a886f376ef
          responses:
            "200":
              body:
                keyName: sdk-RelayAuthRules-01
                primaryConnectionString: Endpoint=sb://sdk-relaynamespace-01.servicebus.windows.net/;SharedAccessKeyName=sdk-RelayAuthRules-01;SharedAccessKey=############################################
                primaryKey: "############################################"
                secondaryConnectionString: Endpoint=sb://sdk-relaynamespace-01.servicebus.windows.net/;SharedAccessKeyName=sdk-RelayAuthRules-01;SharedAccessKey=############################################
                secondaryKey: "############################################"
  "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Relay/namespaces/{namespaceName}/WcfRelays":
    get:
      description: Lists the WCFRelays within the namespace.
      operationId: WCFRelays_ListByNamespace
      parameters:
        - $ref: "#/parameters/resourceGroupNameParameter"
        - $ref: "#/parameters/namespaceNameParameter"
        - $ref: "#/parameters/ApiVersionParameter"
        - $ref: "#/parameters/SubscriptionIdParameter"
      responses:
        "200":
          description: WCF Relays returned successfully
          schema:
            $ref: "#/definitions/WcfRelaysListResult"
        default:
          description: Relay error response describing why the operation failed.
          schema:
            $ref: "#/definitions/ErrorResponse"
      tags:
        - WCFRelays
      x-ms-examples:
        RelayListAll:
          parameters:
            api-version: 2016-07-01
            namespaceName: sdk-RelayNamespace-01
            resourceGroupName: RG-eg
            subscriptionId: 8c246e6a-cbc6-4a87-aff1-d6a886f376ef
          responses:
            "200":
              body:
                value:
                  - id: /subscriptions/8c246e6a-cbc6-4a87-aff1-d6a886f376ef/resourceGroups/RG1-eg/providers/Microsoft.Relay/namespaces/sdk-RelayNamespace-01/WcfRelays/sdk-Relay-Wcf-01
                    name: sdk-Relay-Wcf-01
                    properties:
                      createdAt: 2017-01-24T00:46:27.0049983Z
                      isDynamic: false
                      relayType: NetTcp
                      requiresClientAuthorization: true
                      requiresTransportSecurity: true
                      updatedAt: 2017-01-24T00:46:27.0049983Z
                      userMetadata: usermetadata is a placeholder to store user-defined string data for the HybridConnection endpoint.e.g. it can be used to store  descriptive data, such as list of teams and their contact information also user-defined configuration settings can be stored
                    type: Microsoft.Relay/Namespaces/WcfRelays
      x-ms-pageable:
        nextLinkName: nextLink
  "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Relay/namespaces/{namespaceName}/WcfRelays/{relayName}":
    delete:
      description: Deletes a WCFRelays .
      operationId: WCFRelays_Delete
      parameters:
        - $ref: "#/parameters/resourceGroupNameParameter"
        - $ref: "#/parameters/namespaceNameParameter"
        - $ref: "#/parameters/relayNameParameter"
        - $ref: "#/parameters/ApiVersionParameter"
        - $ref: "#/parameters/SubscriptionIdParameter"
      responses:
        "200":
          description: WCFRelays deleted.
        "204":
          description: No Content
        default:
          description: Relay error response describing why the operation failed.
          schema:
            $ref: "#/definitions/ErrorResponse"
      tags:
        - WCFRelays
      x-ms-examples:
        RelayDelete:
          parameters:
            api-version: 2016-07-01
            namespaceName: sdk-RelayNamespace-01
            relayName: sdk-Relay-wcf-01
            resourceGroupName: RG-eg
            subscriptionId: e2f361f0-3b27-4503-a9cc-21cfba380093
          responses:
            "200": {}
            "204": {}
    get:
      description: Returns the description for the specified WCFRelays.
      operationId: WCFRelays_Get
      parameters:
        - $ref: "#/parameters/resourceGroupNameParameter"
        - $ref: "#/parameters/namespaceNameParameter"
        - $ref: "#/parameters/relayNameParameter"
        - $ref: "#/parameters/ApiVersionParameter"
        - $ref: "#/parameters/SubscriptionIdParameter"
      responses:
        "200":
          description: Successfully retrieved WCFRelays description
          schema:
            $ref: "#/definitions/WcfRelay"
        "204":
          description: WCFRelays not found
        default:
          description: Relay error response describing why the operation failed.
          schema:
            $ref: "#/definitions/ErrorResponse"
      tags:
        - WCFRelays
      x-ms-examples:
        RelayGet:
          parameters:
            api-version: 2016-07-01
            namespaceName: sdk-RelayNamespace-9953
            relayName: sdk-Relay-Wcf-1194
            resourceGroupName: RG-eg
            subscriptionId: 8c246e6a-cbc6-4a87-aff1-d6a886f376ef
          responses:
            "200":
              body:
                id: /subscriptions/e2f361f0-3b27-4503-a9cc-21cfba380093/resourceGroups/Default-ServiceBus-WestUS/providers/Microsoft.Relay/namespaces/sdk-RelayNamespace-9953/WcfRelays/sdk-Relay-Wcf-1194
                name: sdk-Relay-Wcf-1194
                properties:
                  createdAt: 2017-03-16T00:26:17.5014661Z
                  isDynamic: false
                  listenerCount: 0
                  relayType: NetTcp
                  requiresClientAuthorization: true
                  requiresTransportSecurity: true
                  updatedAt: 2017-03-16T00:26:17.5014661Z
                type: Microsoft.Relay/WcfRelays
            "204": {}
    put:
      description: Creates or Updates a WCFRelay. This operation is idempotent.
      operationId: WCFRelays_CreateOrUpdate
      parameters:
        - $ref: "#/parameters/resourceGroupNameParameter"
        - $ref: "#/parameters/namespaceNameParameter"
        - $ref: "#/parameters/relayNameParameter"
        - description: Parameters supplied to create a WCFRelays.
          in: body
          name: parameters
          required: true
          schema:
            $ref: "#/definitions/WcfRelay"
        - $ref: "#/parameters/ApiVersionParameter"
        - $ref: "#/parameters/SubscriptionIdParameter"
      responses:
        "200":
          description: Request to create WCFRelays succeeded
          schema:
            $ref: "#/definitions/WcfRelay"
        default:
          description: Relay error response describing why the operation failed.
          schema:
            $ref: "#/definitions/ErrorResponse"
      tags:
        - WCFRelays
      x-ms-examples:
        RelayCreate:
          parameters:
            api-version: 2016-07-01
            namespaceName: sdk-RelayNamespace-9953
            parameters:
              properties:
                relayType: NetTcp
                requiresClientAuthorization: true
                requiresTransportSecurity: true
            relayName: sdk-Relay-Wcf-1194
            resourceGroupName: RG-eg
            subscriptionId: e2f361f0-3b27-4503-a9cc-21cfba380093
          responses:
            "200":
              body:
                id: /subscriptions/e2f361f0-3b27-4503-a9cc-21cfba380093/resourceGroups/RG-eg/providers/Microsoft.Relay/namespaces/sdk-RelayNamespace-9953/WcfRelays/sdk-Relay-Wcf-1194
                name: sdk-Relay-Wcf-1194
                properties:
                  createdAt: 2017-03-16T00:26:17.5014661Z
                  isDynamic: false
                  relayType: NetTcp
                  requiresClientAuthorization: true
                  requiresTransportSecurity: true
                  updatedAt: 2017-03-16T00:26:17.5014661Z
                type: Microsoft.Relay/WcfRelays
  "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Relay/namespaces/{namespaceName}/WcfRelays/{relayName}/authorizationRules":
    get:
      description: Authorization rules for a WCFRelays.
      operationId: WCFRelays_ListAuthorizationRules
      parameters:
        - $ref: "#/parameters/resourceGroupNameParameter"
        - $ref: "#/parameters/namespaceNameParameter"
        - $ref: "#/parameters/relayNameParameter"
        - $ref: "#/parameters/ApiVersionParameter"
        - $ref: "#/parameters/SubscriptionIdParameter"
      responses:
        "200":
          description: Authorization rules successfully returned.
          schema:
            $ref: "#/definitions/AuthorizationRuleListResult"
      tags:
        - WCFRelays
      x-ms-examples:
        RelayAutorizationRuleListAll:
          parameters:
            api-version: 2016-07-01
            namespaceName: sdk-RelayNamespace-01
            relayName: sdk-Relay-Wcf-01
            resourceGroupName: RG-eg
            subscriptionId: 8c246e6a-cbc6-4a87-aff1-d6a886f376ef
          responses:
            "200":
              body:
                value:
                  - id: /subscriptions/8c246e6a-cbc6-4a87-aff1-d6a886f376ef/resourceGroups/RG-eg/providers/Microsoft.Relay/namespaces/sdk-RelayNamespace-01/WcfRelays/sdk-Relay-Wcf-01/AuthorizationRules/sdk-RelayAuthRules-01
                    name: sdk-RelayAuthRules-01
                    properties:
                      rights:
                        - Listen
                        - Send
                    type: Microsoft.Relay/Namespaces/WcfRelay/AuthorizationRules
      x-ms-pageable:
        nextLinkName: nextLink
    post:
      description: Authorization rules for a WCFRelays.
      operationId: WCFRelays_ListPostAuthorizationRules
      parameters:
        - $ref: "#/parameters/resourceGroupNameParameter"
        - $ref: "#/parameters/namespaceNameParameter"
        - $ref: "#/parameters/relayNameParameter"
        - $ref: "#/parameters/ApiVersionParameter"
        - $ref: "#/parameters/SubscriptionIdParameter"
      responses:
        "200":
          description: Authorization rules successfully returned.
          schema:
            $ref: "#/definitions/AuthorizationRuleListResult"
      tags:
        - WCFRelays
      x-ms-examples:
        RelayAutorizationRuleListAll:
          parameters:
            api-version: 2016-07-01
            namespaceName: sdk-RelayNamespace-01
            relayName: sdk-Relay-Wcf-01
            resourceGroupName: RG-eg
            subscriptionId: 8c246e6a-cbc6-4a87-aff1-d6a886f376ef
          responses:
            "200":
              body:
                value:
                  - id: /subscriptions/8c246e6a-cbc6-4a87-aff1-d6a886f376ef/resourceGroups/RG-eg/providers/Microsoft.Relay/namespaces/sdk-RelayNamespace-01/WcfRelays/sdk-Relay-Wcf-01/AuthorizationRules/sdk-RelayAuthRules-01
                    name: sdk-RelayAuthRules-01
                    properties:
                      rights:
                        - Listen
                        - Send
                    type: Microsoft.Relay/Namespaces/WcfRelay/AuthorizationRules
      x-ms-pageable:
        nextLinkName: nextLink
  "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Relay/namespaces/{namespaceName}/WcfRelays/{relayName}/authorizationRules/{authorizationRuleName}":
    delete:
      description: Deletes a WCFRelays authorization rule
      operationId: WCFRelays_DeleteAuthorizationRule
      parameters:
        - $ref: "#/parameters/resourceGroupNameParameter"
        - $ref: "#/parameters/namespaceNameParameter"
        - $ref: "#/parameters/relayNameParameter"
        - $ref: "#/parameters/authorizationRuleNameParameter"
        - $ref: "#/parameters/ApiVersionParameter"
        - $ref: "#/parameters/SubscriptionIdParameter"
      responses:
        "200":
          description: Request to delete WCFRelay authorizationRule succeeded
        "204":
          description: Request accepted but Authorization rule does not exist
        default:
          description: Relay error response describing why the operation failed.
          schema:
            $ref: "#/definitions/ErrorResponse"
      tags:
        - WCFRelays
      x-ms-examples:
        RelayAutorizationRuleDelete:
          parameters:
            api-version: 2016-07-01
            authorizationRuleName: sdk-RelayAuthRules-01
            namespaceName: sdk-RelayNamespace-01
            relayName: sdk-Relay-wcf-01
            resourceGroupName: RG-eg
            subscriptionId: 8c246e6a-cbc6-4a87-aff1-d6a886f376ef
          responses:
            "200": {}
            "204": {}
    get:
      description: Get authorizationRule for a WCFRelays by name.
      operationId: WCFRelays_GetAuthorizationRule
      parameters:
        - $ref: "#/parameters/resourceGroupNameParameter"
        - $ref: "#/parameters/namespaceNameParameter"
        - $ref: "#/parameters/relayNameParameter"
        - $ref: "#/parameters/authorizationRuleNameParameter"
        - $ref: "#/parameters/ApiVersionParameter"
        - $ref: "#/parameters/SubscriptionIdParameter"
      responses:
        "200":
          description: Request for WCFRelays AuthorizationRule succeeded
          schema:
            $ref: "#/definitions/AuthorizationRule"
        default:
          description: Relay error response describing why the operation failed.
          schema:
            $ref: "#/definitions/ErrorResponse"
      tags:
        - WCFRelays
      x-ms-examples:
        RelayAutorizationRuleGet:
          parameters:
            api-version: 2016-07-01
            authorizationRuleName: sdk-RelayAuthRules-01
            namespaceName: sdk-RelayNamespace-01
            relayName: sdk-Relay-wcf-01
            resourceGroupName: RG-eg
            subscriptionId: 8c246e6a-cbc6-4a87-aff1-d6a886f376ef
          responses:
            "200":
              body:
                id: /subscriptions/8c246e6a-cbc6-4a87-aff1-d6a886f376ef/resourceGroups/RG-eg/providers/Microsoft.Relay/namespaces/sdk-RelayNamespace-01/WcfRelays/sdk-Relay-Wcf-01/AuthorizationRules/sdk-RelayAuthRules-01
                name: sdk-RelayAuthRules-01
                properties:
                  rights:
                    - Listen
                type: Microsoft.Relay/Namespaces/WcfRelay/AuthorizationRules
    post:
      description: Get authorizationRule for a WCFRelays by name.
      operationId: WCFRelays_PostAuthorizationRule
      parameters:
        - $ref: "#/parameters/resourceGroupNameParameter"
        - $ref: "#/parameters/namespaceNameParameter"
        - $ref: "#/parameters/relayNameParameter"
        - $ref: "#/parameters/authorizationRuleNameParameter"
        - $ref: "#/parameters/ApiVersionParameter"
        - $ref: "#/parameters/SubscriptionIdParameter"
      responses:
        "200":
          description: Request for WCFRelays AuthorizationRule succeeded
          schema:
            $ref: "#/definitions/AuthorizationRule"
        default:
          description: Relay error response describing why the operation failed.
          schema:
            $ref: "#/definitions/ErrorResponse"
      tags:
        - WCFRelays
      x-ms-examples:
        RelayAutorizationRuleGet:
          parameters:
            api-version: 2016-07-01
            authorizationRuleName: sdk-RelayAuthRules-01
            namespaceName: sdk-RelayNamespace-01
            relayName: sdk-Relay-wcf-01
            resourceGroupName: RG-eg
            subscriptionId: 8c246e6a-cbc6-4a87-aff1-d6a886f376ef
          responses:
            "200":
              body:
                id: /subscriptions/8c246e6a-cbc6-4a87-aff1-d6a886f376ef/resourceGroups/RG-eg/providers/Microsoft.Relay/namespaces/sdk-RelayNamespace-01/WcfRelays/sdk-Relay-Wcf-01/AuthorizationRules/sdk-RelayAuthRules-01
                name: sdk-RelayAuthRules-01
                properties:
                  rights:
                    - Listen
                type: Microsoft.Relay/Namespaces/WcfRelay/AuthorizationRules
    put:
      description: Creates or Updates an authorization rule for a WCFRelays
      operationId: WCFRelays_CreateOrUpdateAuthorizationRule
      parameters:
        - $ref: "#/parameters/resourceGroupNameParameter"
        - $ref: "#/parameters/namespaceNameParameter"
        - $ref: "#/parameters/relayNameParameter"
        - $ref: "#/parameters/authorizationRuleNameParameter"
        - description: The authorization rule parameters.
          in: body
          name: parameters
          required: true
          schema:
            $ref: "#/definitions/AuthorizationRule"
        - $ref: "#/parameters/ApiVersionParameter"
        - $ref: "#/parameters/SubscriptionIdParameter"
      responses:
        "200":
          description: WCFRelays Authorization rule created
          schema:
            $ref: "#/definitions/AuthorizationRule"
        default:
          description: Relay error response describing why the operation failed.
          schema:
            $ref: "#/definitions/ErrorResponse"
      tags:
        - WCFRelays
      x-ms-examples:
        RelayAuthorizationRuleCreate:
          parameters:
            api-version: 2016-07-01
            authorizationRuleName: sdk-RelayAuthRules-01
            namespaceName: sdk-RelayNamespace-01
            parameters:
              properties:
                rights:
                  - Listen
                  - Send
            relayName: sdk-Relay-wcf-01
            resourceGroupName: RG-eg
            subscriptionId: 8c246e6a-cbc6-4a87-aff1-d6a886f376ef
          responses:
            "200":
              body:
                id: /subscriptions/8c246e6a-cbc6-4a87-aff1-d6a886f376ef/resourceGroups/RG-eg/providers/Microsoft.Relay/namespaces/sdk-RelayNamespace-01/WcfRelays/sdk-Relay-Wcf-01/AuthorizationRules/sdk-RelayAuthRules-01
                name: sdk-RelayAuthRules-01
                properties:
                  rights:
                    - Listen
                    - Send
                type: Microsoft.Relay/Namespaces/WcfRelay/AuthorizationRules
  "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Relay/namespaces/{namespaceName}/WcfRelays/{relayName}/authorizationRules/{authorizationRuleName}/ListKeys":
    post:
      description: Primary and Secondary ConnectionStrings to the WCFRelays.
      operationId: WCFRelays_ListKeys
      parameters:
        - $ref: "#/parameters/resourceGroupNameParameter"
        - $ref: "#/parameters/namespaceNameParameter"
        - $ref: "#/parameters/relayNameParameter"
        - $ref: "#/parameters/authorizationRuleNameParameter"
        - $ref: "#/parameters/ApiVersionParameter"
        - $ref: "#/parameters/SubscriptionIdParameter"
      responses:
        "200":
          description: Successful
          schema:
            $ref: "#/definitions/AuthorizationRuleKeys"
        default:
          description: Relay error response describing why the operation failed.
          schema:
            $ref: "#/definitions/ErrorResponse"
      tags:
        - WCFRelays
      x-ms-examples:
        RelayAuthorizationRuleListKey.json:
          parameters:
            api-version: 2016-07-01
            authorizationRuleName: sdk-RelayAuthRules-01
            namespaceName: sdk-RelayNamespace-01
            relayName: sdk-Relay-wcf-01
            resourceGroupName: RG-eg
            subscriptionId: 8c246e6a-cbc6-4a87-aff1-d6a886f376ef
          responses:
            "200":
              body:
                keyName: sdk-RelayAuthRules-01
                primaryConnectionString: Endpoint=sb://sdk-relaynamespace-01.servicebus.windows.net/;SharedAccessKeyName=sdk-RelayAuthRules-01;SharedAccessKey=############################################
                primaryKey: "############################################"
                secondaryConnectionString: Endpoint=sb://sdk-relaynamespace-01.servicebus.windows.net/;SharedAccessKeyName=sdk-RelayAuthRules-01;SharedAccessKey=############################################
                secondaryKey: "############################################"
  "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Relay/namespaces/{namespaceName}/WcfRelays/{relayName}/authorizationRules/{authorizationRuleName}/regenerateKeys":
    post:
      description: Regenerates the Primary or Secondary ConnectionStrings to the WCFRelays
      operationId: WCFRelays_RegenerateKeys
      parameters:
        - $ref: "#/parameters/resourceGroupNameParameter"
        - $ref: "#/parameters/namespaceNameParameter"
        - $ref: "#/parameters/relayNameParameter"
        - $ref: "#/parameters/authorizationRuleNameParameter"
        - description: Parameters supplied to regenerate Auth Rule.
          in: body
          name: parameters
          required: true
          schema:
            $ref: "#/definitions/RegenerateKeysParameters"
        - $ref: "#/parameters/ApiVersionParameter"
        - $ref: "#/parameters/SubscriptionIdParameter"
      responses:
        "200":
          description: Successful
          schema:
            $ref: "#/definitions/AuthorizationRuleKeys"
        default:
          description: Relay error response describing why the operation failed.
          schema:
            $ref: "#/definitions/ErrorResponse"
      tags:
        - WCFRelays
      x-ms-examples:
        RelayAuthorizationRuleRegenrateKey.json:
          parameters:
            api-version: 2016-07-01
            authorizationRuleName: sdk-RelayAuthRules-01
            namespaceName: sdk-RelayNamespace-01
            parameters:
              policyKey: PrimaryKey
            relayName: sdk-Relay-wcf-01
            resourceGroupName: RG-eg
            subscriptionId: 8c246e6a-cbc6-4a87-aff1-d6a886f376ef
          responses:
            "200":
              body:
                keyName: sdk-RelayAuthRules-01
                primaryConnectionString: Endpoint=sb://sdk-relaynamespace-01.servicebus.windows.net/;SharedAccessKeyName=sdk-RelayAuthRules-01;SharedAccessKey=############################################
                primaryKey: "############################################"
                secondaryConnectionString: Endpoint=sb://sdk-relaynamespace-01.servicebus.windows.net/;SharedAccessKeyName=sdk-RelayAuthRules-01;SharedAccessKey=############################################
                secondaryKey: "############################################"
definitions:
  AuthorizationRule:
    allOf:
      - $ref: "#/definitions/Resource"
    description: Description of a Namespace AuthorizationRules.
    properties:
      properties:
        $ref: "#/definitions/AuthorizationRuleProperties"
        description: Authorization Rule properties
        x-ms-client-flatten: true
    required:
      - properties
  AuthorizationRuleKeys:
    description: Namespace/Relay Connection String
    properties:
      keyName:
        description: A string that describes the authorization rule
        type: string
      primaryConnectionString:
        description: PrimaryConnectionString of the created Namespace AuthorizationRule.
        type: string
      primaryKey:
        description: A base64-encoded 256-bit primary key for signing and validating the SAS token
        type: string
      secondaryConnectionString:
        description: SecondaryConnectionString of the created Namespace AuthorizationRule
        type: string
      secondaryKey:
        description: A base64-encoded 256-bit secondary key for signing and validating the SAS token
        type: string
  AuthorizationRuleListResult:
    description: The response of the List Namespace operation.
    properties:
      nextLink:
        description: Link to the next set of results. Not empty if Value contains incomplete list of AuthorizationRules
        type: string
      value:
        description: Result of the List AuthorizationRules operation.
        items:
          $ref: "#/definitions/AuthorizationRule"
        type: array
  AuthorizationRuleProperties:
    description: AuthorizationRule properties.
    properties:
      rights:
        description: The rights associated with the rule.
        items:
          enum:
            - Manage
            - Send
            - Listen
          type: string
          x-ms-enum:
            modelAsString: true
            name: AccessRights
        type: array
        uniqueItems: true
    required:
      - rights
  CheckNameAvailability:
    description: Description of a Check Name availability request properties.
    properties:
      name:
        description: The Name to check the namespce name availability and The namespace name can contain only letters, numbers, and hyphens. The namespace must start with a letter, and it must end with a letter or number.
        type: string
    required:
      - name
  CheckNameAvailabilityResult:
    description: Description of a Check Name availability request properties.
    properties:
      message:
        description: The detailed info regarding the reason associated with the namespace.
        readOnly: true
        type: string
      nameAvailable:
        description: Value indicating namespace is availability, true if the namespace is available; otherwise, false.
        type: boolean
      reason:
        $ref: "#/definitions/UnavailableReason"
        description: The reason for unavailability of a namespace.
  ErrorResponse:
    description: Error reponse indicates Relay service is not able to process the incoming request. The reason is provided in the error message.
    properties:
      code:
        description: Error code.
        type: string
      message:
        description: Error message indicating why the operation failed.
        type: string
    type: object
  HybridConnection:
    allOf:
      - $ref: "#/definitions/Resource"
    description: Description of HybridConnection Resource.
    properties:
      properties:
        $ref: "#/definitions/HybridConnectionProperties"
        description: Properties of HybridConnection
        x-ms-client-flatten: true
  HybridConnectionListResult:
    description: The response of the List HybridConnection operation.
    properties:
      nextLink:
        description: Link to the next set of results. Not empty if Value contains incomplete list of HybridConnection operation
        type: string
      value:
        description: Result of the List HybridConnection .
        items:
          $ref: "#/definitions/HybridConnection"
        type: array
  HybridConnectionProperties:
    description: Properties of the HybridConnection.
    properties:
      createdAt:
        description: The time the HybridConnection was created.
        format: date-time
        readOnly: true
        type: string
      listenerCount:
        description: "The number of listeners for this HybridConnection. min : 1 and max:25 supported"
        format: int32
        maximum: 25
        minimum: 1
        readOnly: true
        type: integer
      requiresClientAuthorization:
        description: true if client authorization is needed for this HybridConnection; otherwise, false.
        type: boolean
      updatedAt:
        description: The time the namespace was updated.
        format: date-time
        readOnly: true
        type: string
      userMetadata:
        description: usermetadata is a placeholder to store user-defined string data for the HybridConnection endpoint.e.g. it can be used to store  descriptive data, such as list of teams and their contact information also user-defined configuration settings can be stored.
        type: string
  Operation:
    description: A EventHub REST API operation
    properties:
      display:
        description: The object that represents the operation.
        properties:
          operation:
            description: "Operation type: Read, write, delete, etc."
            readOnly: true
            type: string
          provider:
            description: "Service provider: Microsoft.EventHub"
            readOnly: true
            type: string
          resource:
            description: "Resource on which the operation is performed: Invoice, etc."
            readOnly: true
            type: string
      name:
        description: "Operation name: {provider}/{resource}/{operation}"
        readOnly: true
        type: string
    type: object
  OperationListResult:
    description: Result of the request to list EventHub operations. It contains a list of operations and a URL link to get the next set of results.
    properties:
      nextLink:
        description: URL to get the next set of operation list results if there are any.
        readOnly: true
        type: string
      value:
        description: List of EventHub operations supported by the Microsoft.EventHub resource provider.
        items:
          $ref: "#/definitions/Operation"
        readOnly: true
        type: array
  RegenerateKeysParameters:
    description: Parameters supplied to the Regenerate Authorization Rule operation.
    properties:
      policyKey:
        description: Key that needs to be regenerated.
        enum:
          - PrimaryKey
          - SecondaryKey
        type: string
        x-ms-enum:
          modelAsString: true
          name: policyKey
  RelayNamespace:
    allOf:
      - $ref: "#/definitions/TrackedResource"
    description: Description of a Namespace resource.
    properties:
      properties:
        $ref: "#/definitions/RelayNamespaceProperties"
        description: Description of Relay Namespace
        x-ms-client-flatten: true
      sku:
        $ref: "#/definitions/Sku"
        description: Sku of the Namespace.
  RelayNamespaceListResult:
    description: The response of the List Namespace operation.
    properties:
      nextLink:
        description: Link to the next set of results. Not empty if Value contains incomplete list of Namespaces
        type: string
      value:
        description: Result of the List Namespace operation.
        items:
          $ref: "#/definitions/RelayNamespace"
        type: array
  RelayNamespaceProperties:
    description: Properties of the Namespace.
    properties:
      createdAt:
        description: The time the namespace was created.
        format: date-time
        readOnly: true
        type: string
      metricId:
        description: Identifier for Azure Insights metrics
        readOnly: true
        type: string
      provisioningState:
        description: Provisioning state of the namespace.
        readOnly: true
        type: string
      serviceBusEndpoint:
        description: Endpoint you can use to perform Service Bus operations.
        readOnly: true
        type: string
      updatedAt:
        description: The time the namespace was updated.
        format: date-time
        readOnly: true
        type: string
  RelayNamespaceUpdateParameter:
    description: Parameters supplied to the Patch Namespace operation.
    properties:
      sku:
        $ref: "#/definitions/Sku"
        description: The sku of the created namespace
      tags:
        additionalProperties:
          type: string
        description: Resource tags
        type: object
  Resource:
    description: The Resource definition
    properties:
      id:
        description: Resource Id
        readOnly: true
        type: string
      name:
        description: Resource name
        readOnly: true
        type: string
      type:
        description: Resource type
        readOnly: true
        type: string
    x-ms-azure-resource: true
  Sku:
    description: Sku of the Namespace.
    properties:
      name:
        description: Name of this Sku
        enum:
          - Standard
        type: string
        x-ms-enum:
          modelAsString: true
          name: SkuName
      tier:
        description: The tier of this particular SKU
        enum:
          - Standard
        type: string
        x-ms-enum:
          modelAsString: true
          name: SkuTier
    required:
      - name
      - tier
    type: object
  TrackedResource:
    allOf:
      - $ref: "#/definitions/Resource"
    description: Definition of Resource
    properties:
      location:
        description: Resource location
        type: string
      tags:
        additionalProperties:
          type: string
        description: Resource tags
        type: object
    required:
      - location
  UnavailableReason:
    description: Specifies the reason for the unavailability of the service.
    enum:
      - None
      - InvalidName
      - SubscriptionIsDisabled
      - NameInUse
      - NameInLockdown
      - TooManyNamespaceInCurrentSubscription
    type: string
    x-ms-enum:
      modelAsString: false
      name: UnavailableReason
  WcfRelay:
    allOf:
      - $ref: "#/definitions/Resource"
    description: Description of WcfRelays Resource.
    properties:
      properties:
        $ref: "#/definitions/WcfRelayProperties"
        description: Properties of WcfRelay
        x-ms-client-flatten: true
  WcfRelayProperties:
    description: Properties of the WcfRelay Properties.
    properties:
      createdAt:
        description: The time the WCFRelay was created.
        format: date-time
        readOnly: true
        type: string
      isDynamic:
        description: true if the relay is dynamic; otherwise, false.
        readOnly: true
        type: boolean
      listenerCount:
        description: "The number of listeners for this relay. min : 1 and max:25 supported"
        format: int32
        readOnly: true
        type: integer
      relayType:
        description: WCFRelay Type.
        enum:
          - NetTcp
          - Http
        type: string
        x-ms-enum:
          modelAsString: true
          name: Relaytype
      requiresClientAuthorization:
        description: true if client authorization is needed for this relay; otherwise, false.
        type: boolean
      requiresTransportSecurity:
        description: true if transport security is needed for this relay; otherwise, false.
        type: boolean
      updatedAt:
        description: The time the namespace was updated.
        format: date-time
        readOnly: true
        type: string
      userMetadata:
        description: usermetadata is a placeholder to store user-defined string data for the HybridConnection endpoint.e.g. it can be used to store  descriptive data, such as list of teams and their contact information also user-defined configuration settings can be stored.
        type: string
  WcfRelaysListResult:
    description: The response of the List WcfRelays operation.
    properties:
      nextLink:
        description: Link to the next set of results. Not empty if Value contains incomplete list of WcfRelays operation
        type: string
      value:
        description: Result of the List WcfRelays .
        items:
          $ref: "#/definitions/WcfRelay"
        type: array
