{
  "swagger": "2.0",
  "schemes": [
    "https"
  ],
  "host": "management.azure.com",
  "info": {
    "description": "Azure Event Hubs client",
    "title": "EventHubManagementClient",
    "version": "2014-09-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-origin": [
      {
        "format": "swagger",
        "url": "https://raw.githubusercontent.com/Azure/azure-rest-api-specs/master/specification/eventhub/resource-manager/Microsoft.EventHub/stable/2014-09-01/EventHub.json",
        "version": "2.0"
      }
    ],
    "x-preferred": false,
    "x-providerName": "azure.com",
    "x-serviceName": "eventhub-EventHub",
    "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 that uniquely identify a 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 authorization rule name.",
      "in": "path",
      "maxLength": 50,
      "minLength": 1,
      "name": "authorizationRuleName",
      "required": true,
      "type": "string",
      "x-ms-parameter-location": "method"
    },
    "consumerGroupNameParameter": {
      "description": "The consumer group name",
      "in": "path",
      "maxLength": 50,
      "minLength": 1,
      "name": "consumerGroupName",
      "required": true,
      "type": "string",
      "x-ms-parameter-location": "method"
    },
    "eventHubNameParameter": {
      "description": "The Event Hub name",
      "in": "path",
      "maxLength": 50,
      "minLength": 1,
      "name": "eventHubName",
      "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"
    },
    "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.EventHub/operations": {
      "get": {
        "description": "Lists all of the available Event Hub REST API operations.",
        "operationId": "Operations_List",
        "parameters": [
          {
            "$ref": "#/parameters/ApiVersionParameter"
          }
        ],
        "responses": {
          "200": {
            "description": "OK. The request has succeeded.",
            "schema": {
              "$ref": "#/definitions/OperationListResult"
            }
          }
        },
        "tags": [
          "Operations"
        ],
        "x-ms-pageable": {
          "nextLinkName": "nextLink"
        }
      }
    },
    "/subscriptions/{subscriptionId}/providers/Microsoft.EventHub/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/CheckNameAvailabilityParameter"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "check availability returned successfully.",
            "schema": {
              "$ref": "#/definitions/CheckNameAvailabilityResult"
            }
          }
        },
        "tags": [
          "Namespaces"
        ]
      }
    },
    "/subscriptions/{subscriptionId}/providers/Microsoft.EventHub/CheckNamespaceAvailability": {
      "post": {
        "description": "Check the give Namespace name availability.",
        "operationId": "Namespaces_CheckNameSpaceAvailability",
        "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/CheckNameAvailabilityParameter"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "check availability returned successfully.",
            "schema": {
              "$ref": "#/definitions/CheckNameAvailabilityResult"
            }
          }
        },
        "tags": [
          "Namespaces"
        ]
      }
    },
    "/subscriptions/{subscriptionId}/providers/Microsoft.EventHub/namespaces": {
      "get": {
        "description": "Lists all the available Namespaces within a subscription, irrespective of the resource groups.",
        "operationId": "Namespaces_ListBySubscription",
        "parameters": [
          {
            "$ref": "#/parameters/ApiVersionParameter"
          },
          {
            "$ref": "#/parameters/SubscriptionIdParameter"
          }
        ],
        "responses": {
          "200": {
            "description": "Namespaces returned successfully.",
            "schema": {
              "$ref": "#/definitions/NamespaceListResult"
            }
          }
        },
        "tags": [
          "Namespaces"
        ],
        "x-ms-pageable": {
          "nextLinkName": "nextLink"
        }
      }
    },
    "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.EventHub/namespaces": {
      "get": {
        "description": "Lists the available Namespaces within a resource group.",
        "operationId": "Namespaces_ListByResourceGroup",
        "parameters": [
          {
            "$ref": "#/parameters/resourceGroupNameParameter"
          },
          {
            "$ref": "#/parameters/ApiVersionParameter"
          },
          {
            "$ref": "#/parameters/SubscriptionIdParameter"
          }
        ],
        "responses": {
          "200": {
            "description": "Namespaces returned successfully.",
            "schema": {
              "$ref": "#/definitions/NamespaceListResult"
            }
          }
        },
        "tags": [
          "Namespaces"
        ],
        "x-ms-pageable": {
          "nextLinkName": "nextLink"
        }
      }
    },
    "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.EventHub/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 successfully deleted."
          },
          "202": {
            "description": "Namespace delete request accepted."
          },
          "204": {
            "description": "No content."
          }
        },
        "tags": [
          "Namespaces"
        ],
        "x-ms-long-running-operation": true
      },
      "get": {
        "description": "Gets the description of 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/NamespaceResource"
            }
          },
          "201": {
            "description": "Namespace update request accepted.",
            "schema": {
              "$ref": "#/definitions/NamespaceResource"
            }
          }
        },
        "tags": [
          "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/NamespaceUpdateParameter"
            }
          },
          {
            "$ref": "#/parameters/ApiVersionParameter"
          },
          {
            "$ref": "#/parameters/SubscriptionIdParameter"
          }
        ],
        "responses": {
          "200": {
            "description": "Namespace successfully updated.",
            "schema": {
              "$ref": "#/definitions/NamespaceResource"
            }
          },
          "201": {
            "description": "Namespace update request accepted.",
            "schema": {
              "$ref": "#/definitions/NamespaceResource"
            }
          },
          "202": {
            "description": "Namespace create or update request accepted."
          }
        },
        "tags": [
          "Namespaces"
        ]
      },
      "put": {
        "description": "Creates or updates a namespace. Once created, this namespace's resource manifest is immutable. This operation is idempotent.",
        "operationId": "Namespaces_CreateOrUpdate",
        "parameters": [
          {
            "$ref": "#/parameters/resourceGroupNameParameter"
          },
          {
            "$ref": "#/parameters/namespaceNameParameter"
          },
          {
            "description": "Parameters for creating a namespace resource.",
            "in": "body",
            "name": "parameters",
            "required": true,
            "schema": {
              "$ref": "#/definitions/NamespaceCreateOrUpdateParameters"
            }
          },
          {
            "$ref": "#/parameters/ApiVersionParameter"
          },
          {
            "$ref": "#/parameters/SubscriptionIdParameter"
          }
        ],
        "responses": {
          "200": {
            "description": "Namespace successfully created.",
            "schema": {
              "$ref": "#/definitions/NamespaceResource"
            }
          },
          "201": {
            "description": "Namespace create request accepted.",
            "schema": {
              "$ref": "#/definitions/NamespaceResource"
            }
          },
          "202": {
            "description": "Namespace create or update request accepted."
          }
        },
        "tags": [
          "Namespaces"
        ],
        "x-ms-long-running-operation": true
      }
    },
    "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.EventHub/namespaces/{namespaceName}/AuthorizationRules": {
      "get": {
        "description": "Gets a list of 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 AuthorizationRule successfully returned.",
            "schema": {
              "$ref": "#/definitions/SharedAccessAuthorizationRuleListResult"
            }
          }
        },
        "tags": [
          "Namespaces"
        ],
        "x-ms-pageable": {
          "nextLinkName": "nextLink"
        }
      },
      "post": {
        "description": "Gets a list of 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 AuthorizationRule successfully returned.",
            "schema": {
              "$ref": "#/definitions/SharedAccessAuthorizationRuleListResult"
            }
          }
        },
        "tags": [
          "Namespaces"
        ],
        "x-ms-pageable": {
          "nextLinkName": "nextLink"
        }
      }
    },
    "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.EventHub/namespaces/{namespaceName}/AuthorizationRules/{authorizationRuleName}": {
      "delete": {
        "description": "Deletes an AuthorizationRule for a Namespace.",
        "operationId": "Namespaces_DeleteAuthorizationRule",
        "parameters": [
          {
            "$ref": "#/parameters/resourceGroupNameParameter"
          },
          {
            "$ref": "#/parameters/namespaceNameParameter"
          },
          {
            "$ref": "#/parameters/authorizationRuleNameParameter"
          },
          {
            "$ref": "#/parameters/ApiVersionParameter"
          },
          {
            "$ref": "#/parameters/SubscriptionIdParameter"
          }
        ],
        "responses": {
          "200": {
            "description": "Namespace AuthorizationRule successfully deleted."
          },
          "204": {
            "description": "No content."
          }
        },
        "tags": [
          "Namespaces"
        ]
      },
      "get": {
        "description": "Gets an AuthorizationRule for a Namespace by rule name.",
        "operationId": "Namespaces_GetAuthorizationRule",
        "parameters": [
          {
            "$ref": "#/parameters/resourceGroupNameParameter"
          },
          {
            "$ref": "#/parameters/namespaceNameParameter"
          },
          {
            "$ref": "#/parameters/authorizationRuleNameParameter"
          },
          {
            "$ref": "#/parameters/ApiVersionParameter"
          },
          {
            "$ref": "#/parameters/SubscriptionIdParameter"
          }
        ],
        "responses": {
          "200": {
            "description": "Namespace AuthorizationRule returned successfully.",
            "schema": {
              "$ref": "#/definitions/SharedAccessAuthorizationRuleResource"
            }
          }
        },
        "tags": [
          "Namespaces"
        ]
      },
      "post": {
        "description": "Gets an AuthorizationRule for a Namespace by rule name.",
        "operationId": "Namespaces_PostAuthorizationRule",
        "parameters": [
          {
            "$ref": "#/parameters/resourceGroupNameParameter"
          },
          {
            "$ref": "#/parameters/namespaceNameParameter"
          },
          {
            "$ref": "#/parameters/authorizationRuleNameParameter"
          },
          {
            "$ref": "#/parameters/ApiVersionParameter"
          },
          {
            "$ref": "#/parameters/SubscriptionIdParameter"
          }
        ],
        "responses": {
          "200": {
            "description": "Namespace AuthorizationRule returned successfully.",
            "schema": {
              "$ref": "#/definitions/SharedAccessAuthorizationRulePostResource"
            }
          }
        },
        "tags": [
          "Namespaces"
        ]
      },
      "put": {
        "description": "Creates or updates an AuthorizationRule for a Namespace.",
        "operationId": "Namespaces_CreateOrUpdateAuthorizationRule",
        "parameters": [
          {
            "$ref": "#/parameters/resourceGroupNameParameter"
          },
          {
            "$ref": "#/parameters/namespaceNameParameter"
          },
          {
            "$ref": "#/parameters/authorizationRuleNameParameter"
          },
          {
            "description": "The shared access AuthorizationRule.",
            "in": "body",
            "name": "parameters",
            "required": true,
            "schema": {
              "$ref": "#/definitions/SharedAccessAuthorizationRuleCreateOrUpdateParameters"
            }
          },
          {
            "$ref": "#/parameters/ApiVersionParameter"
          },
          {
            "$ref": "#/parameters/SubscriptionIdParameter"
          }
        ],
        "responses": {
          "200": {
            "description": "Namespace AuthorizationRule created",
            "schema": {
              "$ref": "#/definitions/SharedAccessAuthorizationRuleResource"
            }
          }
        },
        "tags": [
          "Namespaces"
        ]
      }
    },
    "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.EventHub/namespaces/{namespaceName}/eventhubs": {
      "get": {
        "description": "Gets all the Event Hubs in a Namespace.",
        "externalDocs": {
          "url": "https://msdn.microsoft.com/en-us/library/azure/mt639493.aspx"
        },
        "operationId": "EventHubs_ListAll",
        "parameters": [
          {
            "$ref": "#/parameters/resourceGroupNameParameter"
          },
          {
            "$ref": "#/parameters/namespaceNameParameter"
          },
          {
            "$ref": "#/parameters/ApiVersionParameter"
          },
          {
            "$ref": "#/parameters/SubscriptionIdParameter"
          }
        ],
        "responses": {
          "200": {
            "description": "Successfully retrieved the list of Event Hubs.",
            "schema": {
              "$ref": "#/definitions/EventHubListResult"
            }
          }
        },
        "tags": [
          "EventHubs"
        ],
        "x-ms-pageable": {
          "nextLinkName": "nextLink"
        }
      }
    },
    "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.EventHub/namespaces/{namespaceName}/eventhubs/{eventHubName}": {
      "delete": {
        "description": "Deletes an Event Hub from the specified Namespace and resource group.",
        "externalDocs": {
          "url": "https://msdn.microsoft.com/en-us/library/azure/mt639496.aspx"
        },
        "operationId": "EventHubs_Delete",
        "parameters": [
          {
            "$ref": "#/parameters/resourceGroupNameParameter"
          },
          {
            "$ref": "#/parameters/namespaceNameParameter"
          },
          {
            "$ref": "#/parameters/eventHubNameParameter"
          },
          {
            "$ref": "#/parameters/ApiVersionParameter"
          },
          {
            "$ref": "#/parameters/SubscriptionIdParameter"
          }
        ],
        "responses": {
          "200": {
            "description": "Event Hub successfully deleted."
          },
          "204": {
            "description": "No content."
          }
        },
        "tags": [
          "EventHubs"
        ]
      },
      "get": {
        "description": "Gets an Event Hubs description for the specified Event Hub.",
        "externalDocs": {
          "url": "https://msdn.microsoft.com/en-us/library/azure/mt639501.aspx"
        },
        "operationId": "EventHubs_Get",
        "parameters": [
          {
            "$ref": "#/parameters/resourceGroupNameParameter"
          },
          {
            "$ref": "#/parameters/namespaceNameParameter"
          },
          {
            "$ref": "#/parameters/eventHubNameParameter"
          },
          {
            "$ref": "#/parameters/ApiVersionParameter"
          },
          {
            "$ref": "#/parameters/SubscriptionIdParameter"
          }
        ],
        "responses": {
          "200": {
            "description": "Successfully retrieved the Event Hub description.",
            "schema": {
              "$ref": "#/definitions/EventHubResource"
            }
          }
        },
        "tags": [
          "EventHubs"
        ]
      },
      "put": {
        "description": "Creates or updates a new Event Hub as a nested resource within a Namespace.",
        "externalDocs": {
          "url": "https://msdn.microsoft.com/en-us/library/azure/mt639497.aspx"
        },
        "operationId": "EventHubs_CreateOrUpdate",
        "parameters": [
          {
            "$ref": "#/parameters/resourceGroupNameParameter"
          },
          {
            "$ref": "#/parameters/namespaceNameParameter"
          },
          {
            "$ref": "#/parameters/eventHubNameParameter"
          },
          {
            "description": "Parameters supplied to create an Event Hub resource.",
            "in": "body",
            "name": "parameters",
            "required": true,
            "schema": {
              "$ref": "#/definitions/EventHubCreateOrUpdateParameters"
            }
          },
          {
            "$ref": "#/parameters/ApiVersionParameter"
          },
          {
            "$ref": "#/parameters/SubscriptionIdParameter"
          }
        ],
        "responses": {
          "200": {
            "description": "Event Hub successfully created.",
            "schema": {
              "$ref": "#/definitions/EventHubResource"
            }
          }
        },
        "tags": [
          "EventHubs"
        ]
      }
    },
    "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.EventHub/namespaces/{namespaceName}/eventhubs/{eventHubName}/authorizationRules": {
      "get": {
        "description": "Gets the authorization rules for an Event Hub.",
        "operationId": "EventHubs_ListAuthorizationRules",
        "parameters": [
          {
            "$ref": "#/parameters/resourceGroupNameParameter"
          },
          {
            "$ref": "#/parameters/namespaceNameParameter"
          },
          {
            "$ref": "#/parameters/eventHubNameParameter"
          },
          {
            "$ref": "#/parameters/ApiVersionParameter"
          },
          {
            "$ref": "#/parameters/SubscriptionIdParameter"
          }
        ],
        "responses": {
          "200": {
            "description": "Event Hub AuthorizationRule returned successfully.",
            "schema": {
              "$ref": "#/definitions/SharedAccessAuthorizationRuleListResult"
            }
          }
        },
        "tags": [
          "EventHubs"
        ],
        "x-ms-pageable": {
          "nextLinkName": "nextLink"
        }
      }
    },
    "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.EventHub/namespaces/{namespaceName}/eventhubs/{eventHubName}/authorizationRules/{authorizationRuleName}": {
      "delete": {
        "description": "Deletes an Event Hub AuthorizationRule.",
        "externalDocs": {
          "url": "https://msdn.microsoft.com/en-us/library/azure/mt706100.aspx"
        },
        "operationId": "EventHubs_DeleteAuthorizationRule",
        "parameters": [
          {
            "$ref": "#/parameters/resourceGroupNameParameter"
          },
          {
            "$ref": "#/parameters/namespaceNameParameter"
          },
          {
            "$ref": "#/parameters/eventHubNameParameter"
          },
          {
            "$ref": "#/parameters/authorizationRuleNameParameter"
          },
          {
            "$ref": "#/parameters/ApiVersionParameter"
          },
          {
            "$ref": "#/parameters/SubscriptionIdParameter"
          }
        ],
        "responses": {
          "200": {
            "description": "Event Hub AuthorizationRule successfully deleted."
          },
          "204": {
            "description": "No content."
          }
        },
        "tags": [
          "EventHubs"
        ]
      },
      "get": {
        "description": "Gets an AuthorizationRule for an Event Hub by rule name.",
        "externalDocs": {
          "url": "https://msdn.microsoft.com/en-us/library/azure/mt706097.aspx"
        },
        "operationId": "EventHubs_GetAuthorizationRule",
        "parameters": [
          {
            "$ref": "#/parameters/resourceGroupNameParameter"
          },
          {
            "$ref": "#/parameters/namespaceNameParameter"
          },
          {
            "$ref": "#/parameters/eventHubNameParameter"
          },
          {
            "$ref": "#/parameters/authorizationRuleNameParameter"
          },
          {
            "$ref": "#/parameters/ApiVersionParameter"
          },
          {
            "$ref": "#/parameters/SubscriptionIdParameter"
          }
        ],
        "responses": {
          "200": {
            "description": "Event Hub AuthorizationRule successfully returned.",
            "schema": {
              "$ref": "#/definitions/SharedAccessAuthorizationRuleResource"
            }
          }
        },
        "tags": [
          "EventHubs"
        ]
      },
      "post": {
        "description": "Gets an AuthorizationRule for an Event Hub by rule name.",
        "externalDocs": {
          "url": "https://msdn.microsoft.com/en-us/library/azure/mt706097.aspx"
        },
        "operationId": "EventHubs_PostAuthorizationRule",
        "parameters": [
          {
            "$ref": "#/parameters/resourceGroupNameParameter"
          },
          {
            "$ref": "#/parameters/namespaceNameParameter"
          },
          {
            "$ref": "#/parameters/eventHubNameParameter"
          },
          {
            "$ref": "#/parameters/authorizationRuleNameParameter"
          },
          {
            "$ref": "#/parameters/ApiVersionParameter"
          },
          {
            "$ref": "#/parameters/SubscriptionIdParameter"
          }
        ],
        "responses": {
          "200": {
            "description": "Event Hub AuthorizationRule successfully returned.",
            "schema": {
              "$ref": "#/definitions/SharedAccessAuthorizationRulePostResource"
            }
          }
        },
        "tags": [
          "EventHubs"
        ]
      },
      "put": {
        "description": "Creates or updates an AuthorizationRule for the specified Event Hub.",
        "externalDocs": {
          "url": "https://msdn.microsoft.com/en-us/library/azure/mt706096.aspx"
        },
        "operationId": "EventHubs_CreateOrUpdateAuthorizationRule",
        "parameters": [
          {
            "$ref": "#/parameters/resourceGroupNameParameter"
          },
          {
            "$ref": "#/parameters/namespaceNameParameter"
          },
          {
            "$ref": "#/parameters/eventHubNameParameter"
          },
          {
            "$ref": "#/parameters/authorizationRuleNameParameter"
          },
          {
            "description": "The shared access AuthorizationRule.",
            "in": "body",
            "name": "parameters",
            "required": true,
            "schema": {
              "$ref": "#/definitions/SharedAccessAuthorizationRuleCreateOrUpdateParameters"
            }
          },
          {
            "$ref": "#/parameters/ApiVersionParameter"
          },
          {
            "$ref": "#/parameters/SubscriptionIdParameter"
          }
        ],
        "responses": {
          "200": {
            "description": "Event Hub AuthorizationRule successfully created.",
            "schema": {
              "$ref": "#/definitions/SharedAccessAuthorizationRuleResource"
            }
          }
        },
        "tags": [
          "EventHubs"
        ]
      }
    },
    "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.EventHub/namespaces/{namespaceName}/eventhubs/{eventHubName}/consumergroups": {
      "get": {
        "description": "Gets all the consumer groups in a Namespace. An empty feed is returned if no consumer group exists in the Namespace.",
        "externalDocs": {
          "url": "https://msdn.microsoft.com/en-us/library/azure/mt639503.aspx"
        },
        "operationId": "ConsumerGroups_ListAll",
        "parameters": [
          {
            "$ref": "#/parameters/resourceGroupNameParameter"
          },
          {
            "$ref": "#/parameters/namespaceNameParameter"
          },
          {
            "$ref": "#/parameters/eventHubNameParameter"
          },
          {
            "$ref": "#/parameters/ApiVersionParameter"
          },
          {
            "$ref": "#/parameters/SubscriptionIdParameter"
          }
        ],
        "responses": {
          "200": {
            "description": "Successfully retrieved the list of consumer groups.",
            "schema": {
              "$ref": "#/definitions/ConsumerGroupListResult"
            }
          }
        },
        "tags": [
          "ConsumerGroups"
        ],
        "x-ms-pageable": {
          "nextLinkName": "nextLink"
        }
      }
    },
    "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.EventHub/namespaces/{namespaceName}/eventhubs/{eventHubName}/consumergroups/{consumerGroupName}": {
      "delete": {
        "description": "Deletes a consumer group from the specified Event Hub and resource group.",
        "externalDocs": {
          "url": "https://msdn.microsoft.com/en-us/library/azure/mt639491.aspx"
        },
        "operationId": "ConsumerGroups_Delete",
        "parameters": [
          {
            "$ref": "#/parameters/resourceGroupNameParameter"
          },
          {
            "$ref": "#/parameters/namespaceNameParameter"
          },
          {
            "$ref": "#/parameters/eventHubNameParameter"
          },
          {
            "$ref": "#/parameters/consumerGroupNameParameter"
          },
          {
            "$ref": "#/parameters/ApiVersionParameter"
          },
          {
            "$ref": "#/parameters/SubscriptionIdParameter"
          }
        ],
        "responses": {
          "200": {
            "description": "Consumer group deleted."
          },
          "204": {
            "description": "No content."
          }
        },
        "tags": [
          "ConsumerGroups"
        ]
      },
      "get": {
        "description": "Gets a description for the specified consumer group.",
        "externalDocs": {
          "url": "https://msdn.microsoft.com/en-us/library/azure/mt639488.aspx"
        },
        "operationId": "ConsumerGroups_Get",
        "parameters": [
          {
            "$ref": "#/parameters/resourceGroupNameParameter"
          },
          {
            "$ref": "#/parameters/namespaceNameParameter"
          },
          {
            "$ref": "#/parameters/eventHubNameParameter"
          },
          {
            "$ref": "#/parameters/consumerGroupNameParameter"
          },
          {
            "$ref": "#/parameters/ApiVersionParameter"
          },
          {
            "$ref": "#/parameters/SubscriptionIdParameter"
          }
        ],
        "responses": {
          "200": {
            "description": "Successfully retrieved the consumer group description.",
            "schema": {
              "$ref": "#/definitions/ConsumerGroupResource"
            }
          }
        },
        "tags": [
          "ConsumerGroups"
        ]
      },
      "put": {
        "description": "Creates or updates an Event Hubs consumer group as a nested resource within a Namespace.",
        "externalDocs": {
          "url": "https://msdn.microsoft.com/en-us/library/azure/mt639498.aspx"
        },
        "operationId": "ConsumerGroups_CreateOrUpdate",
        "parameters": [
          {
            "$ref": "#/parameters/resourceGroupNameParameter"
          },
          {
            "$ref": "#/parameters/namespaceNameParameter"
          },
          {
            "$ref": "#/parameters/eventHubNameParameter"
          },
          {
            "$ref": "#/parameters/consumerGroupNameParameter"
          },
          {
            "description": "Parameters supplied to create or update a consumer group resource.",
            "in": "body",
            "name": "parameters",
            "required": true,
            "schema": {
              "$ref": "#/definitions/ConsumerGroupCreateOrUpdateParameters"
            }
          },
          {
            "$ref": "#/parameters/ApiVersionParameter"
          },
          {
            "$ref": "#/parameters/SubscriptionIdParameter"
          }
        ],
        "responses": {
          "200": {
            "description": "Consumer group successfully created.",
            "schema": {
              "$ref": "#/definitions/ConsumerGroupResource"
            }
          }
        },
        "tags": [
          "ConsumerGroups"
        ]
      }
    }
  },
  "definitions": {
    "CheckNameAvailabilityParameter": {
      "description": "Parameter supplied to check Namespace name availability operation ",
      "properties": {
        "name": {
          "description": "Name to check the namespace name availability",
          "type": "string"
        }
      },
      "required": [
        "name"
      ]
    },
    "CheckNameAvailabilityResult": {
      "description": "The Result of the CheckNameAvailability operation",
      "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."
        }
      }
    },
    "ConsumerGroupCreateOrUpdateParameters": {
      "description": "Parameters supplied to the Create Or Update Consumer Group operation.",
      "properties": {
        "location": {
          "description": "Location of the resource.",
          "type": "string"
        },
        "name": {
          "description": "Name of the consumer group.",
          "type": "string"
        },
        "properties": {
          "$ref": "#/definitions/ConsumerGroupProperties",
          "x-ms-client-flatten": true
        },
        "type": {
          "description": "ARM type of the Namespace.",
          "type": "string"
        }
      },
      "required": [
        "location"
      ]
    },
    "ConsumerGroupListResult": {
      "description": "The result to the List Consumer Group operation.",
      "properties": {
        "nextLink": {
          "description": "Link to the next set of results. Not empty if Value contains incomplete list of Consumer Group",
          "type": "string"
        },
        "value": {
          "description": "Result of the List Consumer Group operation.",
          "items": {
            "$ref": "#/definitions/ConsumerGroupResource"
          },
          "type": "array"
        }
      }
    },
    "ConsumerGroupProperties": {
      "description": "Properties supplied to the Create Or Update Consumer Group operation.",
      "properties": {
        "createdAt": {
          "description": "Exact time the message was created.",
          "format": "date-time",
          "readOnly": true,
          "type": "string"
        },
        "eventHubPath": {
          "description": "The path of the Event Hub.",
          "readOnly": true,
          "type": "string"
        },
        "updatedAt": {
          "description": "The exact time the message was updated.",
          "format": "date-time",
          "readOnly": true,
          "type": "string"
        },
        "userMetadata": {
          "description": "The user metadata.",
          "type": "string"
        }
      }
    },
    "ConsumerGroupResource": {
      "allOf": [
        {
          "$ref": "#/definitions/Resource"
        }
      ],
      "description": "Single item in List or Get Consumer group operation",
      "properties": {
        "properties": {
          "$ref": "#/definitions/ConsumerGroupProperties",
          "x-ms-client-flatten": true
        }
      }
    },
    "EventHubCreateOrUpdateParameters": {
      "description": "Parameters supplied to the Create Or Update Event Hub operation.",
      "properties": {
        "location": {
          "description": "Location of the resource.",
          "type": "string"
        },
        "name": {
          "description": "Name of the Event Hub.",
          "type": "string"
        },
        "properties": {
          "$ref": "#/definitions/EventHubProperties",
          "x-ms-client-flatten": true
        },
        "type": {
          "description": "ARM type of the Namespace.",
          "type": "string"
        }
      },
      "required": [
        "location"
      ]
    },
    "EventHubListResult": {
      "description": "The result of the List EventHubs operation.",
      "properties": {
        "nextLink": {
          "description": "Link to the next set of results. Not empty if Value contains incomplete list of EventHubs.",
          "type": "string"
        },
        "value": {
          "description": "Result of the List EventHubs operation.",
          "items": {
            "$ref": "#/definitions/EventHubResource"
          },
          "type": "array"
        }
      }
    },
    "EventHubProperties": {
      "description": "Properties supplied to the Create Or Update Event Hub operation.",
      "properties": {
        "createdAt": {
          "description": "Exact time the Event Hub was created.",
          "format": "date-time",
          "readOnly": true,
          "type": "string"
        },
        "messageRetentionInDays": {
          "description": "Number of days to retain the events for this Event Hub.",
          "format": "int64",
          "type": "integer"
        },
        "partitionCount": {
          "description": "Number of partitions created for the Event Hub.",
          "format": "int64",
          "type": "integer"
        },
        "partitionIds": {
          "description": "Current number of shards on the Event Hub.",
          "items": {
            "type": "string"
          },
          "readOnly": true,
          "type": "array"
        },
        "status": {
          "description": "Enumerates the possible values for the status of the Event Hub.",
          "enum": [
            "Active",
            "Disabled",
            "Restoring",
            "SendDisabled",
            "ReceiveDisabled",
            "Creating",
            "Deleting",
            "Renaming",
            "Unknown"
          ],
          "type": "string",
          "x-ms-enum": {
            "modelAsString": false,
            "name": "EntityStatus"
          }
        },
        "updatedAt": {
          "description": "The exact time the message was updated.",
          "format": "date-time",
          "readOnly": true,
          "type": "string"
        }
      }
    },
    "EventHubResource": {
      "allOf": [
        {
          "$ref": "#/definitions/Resource"
        }
      ],
      "description": "Single item in List or Get Event Hub operation",
      "properties": {
        "properties": {
          "$ref": "#/definitions/EventHubProperties",
          "x-ms-client-flatten": true
        }
      }
    },
    "NamespaceCreateOrUpdateParameters": {
      "description": "Parameters supplied to the Create Or Update Namespace operation.",
      "properties": {
        "location": {
          "description": "Namespace location.",
          "type": "string"
        },
        "properties": {
          "$ref": "#/definitions/NamespaceProperties",
          "x-ms-client-flatten": true
        },
        "sku": {
          "$ref": "#/definitions/Sku"
        },
        "tags": {
          "additionalProperties": {
            "type": "string"
          },
          "description": "Namespace tags.",
          "type": "object"
        }
      },
      "required": [
        "location"
      ]
    },
    "NamespaceListResult": {
      "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/NamespaceResource"
          },
          "type": "array"
        }
      }
    },
    "NamespaceProperties": {
      "description": "Properties of the Namespace supplied for create or update Namespace operation",
      "properties": {
        "createdAt": {
          "description": "The time the Namespace was created.",
          "format": "date-time",
          "type": "string"
        },
        "enabled": {
          "description": "Specifies whether this instance is enabled.",
          "type": "boolean"
        },
        "metricId": {
          "description": "Identifier for Azure Insights metrics",
          "readOnly": true,
          "type": "string"
        },
        "provisioningState": {
          "description": "Provisioning state of the Namespace.",
          "type": "string"
        },
        "serviceBusEndpoint": {
          "description": "Endpoint you can use to perform Service Bus operations.",
          "externalDocs": {
            "url": "http://msdn.microsoft.com/en-us/library/windowsazure/jj873988.aspx"
          },
          "type": "string"
        },
        "status": {
          "description": "State of the Namespace.",
          "enum": [
            "Unknown",
            "Creating",
            "Created",
            "Activating",
            "Enabling",
            "Active",
            "Disabling",
            "Disabled",
            "SoftDeleting",
            "SoftDeleted",
            "Removing",
            "Removed",
            "Failed"
          ],
          "type": "string",
          "x-ms-enum": {
            "modelAsString": false,
            "name": "NamespaceState"
          }
        },
        "updatedAt": {
          "description": "The time the Namespace was updated.",
          "format": "date-time",
          "type": "string"
        }
      }
    },
    "NamespaceResource": {
      "allOf": [
        {
          "$ref": "#/definitions/TrackedResource"
        }
      ],
      "description": "Single Namespace item in List or Get Operation",
      "properties": {
        "properties": {
          "$ref": "#/definitions/NamespaceProperties",
          "x-ms-client-flatten": true
        },
        "sku": {
          "$ref": "#/definitions/Sku"
        }
      }
    },
    "NamespaceUpdateParameter": {
      "description": "Parameters supplied to the Patch/update Namespace operation.",
      "properties": {
        "sku": {
          "$ref": "#/definitions/Sku",
          "description": "The sku of the created Namespace"
        },
        "tags": {
          "additionalProperties": {
            "type": "string"
          },
          "description": "Resource tags",
          "type": "object"
        }
      }
    },
    "Operation": {
      "description": "A Event Hub 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 Event Hub 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 Event Hub operations supported by the Microsoft.EventHub resource provider.",
          "items": {
            "$ref": "#/definitions/Operation"
          },
          "readOnly": true,
          "type": "array"
        }
      }
    },
    "Resource": {
      "description": "The Resource definition",
      "properties": {
        "id": {
          "description": "Resource Id",
          "readOnly": true,
          "type": "string"
        },
        "location": {
          "description": "Resource location",
          "type": "string"
        },
        "name": {
          "description": "Resource name",
          "readOnly": true,
          "type": "string"
        },
        "type": {
          "description": "Resource type",
          "readOnly": true,
          "type": "string"
        }
      },
      "x-ms-azure-resource": true
    },
    "SharedAccessAuthorizationRuleCreateOrUpdateParameters": {
      "description": "Parameters supplied to the Create Or Update Authorization Rules operation.",
      "properties": {
        "location": {
          "description": "Data center location.",
          "type": "string"
        },
        "name": {
          "description": "Name of the AuthorizationRule.",
          "type": "string"
        },
        "properties": {
          "$ref": "#/definitions/SharedAccessAuthorizationRuleProperties",
          "x-ms-client-flatten": true
        }
      }
    },
    "SharedAccessAuthorizationRuleListResult": {
      "description": "The response from the List Namespace operation.",
      "properties": {
        "nextLink": {
          "description": "Link to the next set of results. Not empty if Value contains an incomplete list of Authorization Rules",
          "type": "string"
        },
        "value": {
          "description": "Result of the List Authorization Rules operation.",
          "items": {
            "$ref": "#/definitions/SharedAccessAuthorizationRuleResource"
          },
          "type": "array"
        }
      }
    },
    "SharedAccessAuthorizationRulePostProperties": {
      "description": "AuthorizationRule properties.",
      "properties": {
        "claimType": {
          "description": "A string that describes Claim Type for authorization rule.",
          "type": "string"
        },
        "claimValue": {
          "description": "A string that describes Claim Value of authorization rule.",
          "type": "string"
        },
        "createdTime": {
          "description": "The time the namespace was created.",
          "format": "date-time",
          "readOnly": true,
          "type": "string"
        },
        "keyName": {
          "description": "A string that describes the Key Name of authorization rule.",
          "type": "string"
        },
        "modifiedTime": {
          "description": "The time the namespace was updated.",
          "format": "date-time",
          "readOnly": true,
          "type": "string"
        },
        "primaryKey": {
          "description": "A base64-encoded 256-bit primary key for signing and validating the SAS token.",
          "type": "string"
        },
        "rights": {
          "description": "The rights associated with the rule.",
          "items": {
            "enum": [
              "Manage",
              "Send",
              "Listen"
            ],
            "type": "string",
            "x-ms-enum": {
              "modelAsString": false,
              "name": "AccessRights"
            }
          },
          "type": "array"
        },
        "secondaryKey": {
          "description": "A base64-encoded 256-bit primary key for signing and validating the SAS token.",
          "type": "string"
        }
      },
      "required": [
        "rights"
      ]
    },
    "SharedAccessAuthorizationRulePostResource": {
      "allOf": [
        {
          "$ref": "#/definitions/Resource"
        }
      ],
      "description": "Single item in a List or Get AuthorizationRule operation",
      "properties": {
        "properties": {
          "$ref": "#/definitions/SharedAccessAuthorizationRulePostProperties",
          "x-ms-client-flatten": true
        }
      }
    },
    "SharedAccessAuthorizationRuleProperties": {
      "description": "Properties supplied to create or update SharedAccessAuthorizationRule",
      "properties": {
        "rights": {
          "description": "The rights associated with the rule.",
          "items": {
            "enum": [
              "Manage",
              "Send",
              "Listen"
            ],
            "type": "string",
            "x-ms-enum": {
              "modelAsString": false,
              "name": "AccessRights"
            }
          },
          "type": "array"
        }
      },
      "required": [
        "rights"
      ]
    },
    "SharedAccessAuthorizationRuleResource": {
      "allOf": [
        {
          "$ref": "#/definitions/Resource"
        }
      ],
      "description": "Single item in a List or Get AuthorizationRule operation",
      "properties": {
        "properties": {
          "$ref": "#/definitions/SharedAccessAuthorizationRuleProperties",
          "x-ms-client-flatten": true
        }
      }
    },
    "Sku": {
      "description": "SKU parameters supplied to the create Namespace operation",
      "properties": {
        "capacity": {
          "description": "The Event Hubs throughput units.",
          "format": "int32",
          "type": "integer"
        },
        "name": {
          "description": "Name of this SKU.",
          "enum": [
            "Basic",
            "Standard"
          ],
          "type": "string",
          "x-ms-enum": {
            "modelAsString": true,
            "name": "SkuName"
          }
        },
        "tier": {
          "description": "The billing tier of this particular SKU.",
          "enum": [
            "Basic",
            "Standard",
            "Premium"
          ],
          "type": "string",
          "x-ms-enum": {
            "modelAsString": true,
            "name": "SkuTier"
          }
        }
      },
      "required": [
        "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"
      }
    }
  }
}