Skip to content

Commit

Permalink
Adding Create, Delete and List Namespaces Endpoints for Event Hubs Cl…
Browse files Browse the repository at this point in the history
…uster Resource (#5565)

* Adding ClusterPut.json example

* Create ListNamespaceInClusterPost.json

* Create ClusterDelete.json

* Update EventHub-preview.json

* Adding valid responses to Cluster PUT example.

* Update specification/eventhub/resource-manager/Microsoft.EventHub/preview/2018-01-01-preview/EventHub-preview.json

Co-Authored-By: FBettati <franco.d.bettati@gmail.com>

* Adding Available Regions API

* Adding ListAvailableClusters POST example.

* Modifying response in AvailableClusterList

* Updating LIstAvailableClustersPost.json example

* Delete ListAvailableClustersPost.json

* Create ListAvailableClustersGet.json

* Delete ListNamespaceInClusterPost.json

* Create ListNamespacesInClusterGet.json

* Update EventHub-preview.json

* Modify availableClusters API to have a valid ARM collection response

* Updating AvailableClusters collection response example

* Updating /cluster/namespaces and /availableClusters calls

* Adding parameters to ListAvailableClusters example.

* Adding extra layer to namespace IDs in ListNamespacesInCluster example.

* Removing comma from ListAvailableClusters example
  • Loading branch information
FBettati authored and lmazuel committed Apr 29, 2019
1 parent 9c6e59b commit 0c33653
Show file tree
Hide file tree
Showing 5 changed files with 352 additions and 18 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -70,6 +70,42 @@
}
}
},
"/subscriptions/{subscriptionId}/providers/Microsoft.EventHub/availableClusters": {
"get": {
"tags": [
"Event Hubs Clusters"
],
"operationId": "Clusters_ListAvailableClusters",
"x-ms-examples": {
"ListAvailableClusters": {
"$ref": "./examples/Clusters/ListAvailableClustersGet.json"
}
},
"description": "List the quantity of available pre-provisioned Event Hubs Clusters, indexed by Azure region.",
"parameters": [
{
"$ref": "#/parameters/subscriptionIdParameter"
},
{
"$ref": "#/parameters/apiVersionParameter"
}
],
"responses": {
"200": {
"description": "Available clusters listed successfully.",
"schema": {
"$ref": "#/definitions/AvailableClustersList"
}
},
"default": {
"description": "Error response describing why available clusters could not be successfully listed.",
"schema": {
"$ref": "#/definitions/ErrorResponse"
}
}
}
}
},
"/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.EventHub/clusters": {
"get": {
"tags": [
Expand Down Expand Up @@ -153,6 +189,56 @@
}
}
},
"put": {
"tags": [
"Event Hubs Cluster"
],
"operationId": "Clusters_Put",
"x-ms-examples": {
"ClusterPut": {
"$ref": "./examples/Clusters/ClusterPut.json"
}
},
"description": "Creates or updates an instance of an Event Hubs Cluster.",
"parameters": [
{
"$ref": "#/parameters/subscriptionIdParameter"
},
{
"$ref": "#/parameters/resourceGroupNameParameter"
},
{
"$ref": "#/parameters/clusterNameParameter"
},
{
"$ref": "#/parameters/apiVersionParameter"
}
],
"responses": {
"200": {
"description": "Event Hubs Cluster successfully created or updated.",
"schema": {
"$ref": "#/definitions/Cluster"
}
},
"201": {
"description": "Event Hubs Cluster create or update request accepted.",
"schema": {
"$ref": "#/definitions/Cluster"
}
},
"202": {
"description": "Event Hubs Cluster create or update request accepted."
},
"default": {
"description": "Event Hubs error response detailing why the Event Hubs Cluster create or update operation failed.",
"schema": {
"$ref": "#/definitions/ErrorResponse"
}
}
},
"x-ms-long-running-operation": true
},
"patch": {
"tags": [
"Event Hubs Cluster"
Expand Down Expand Up @@ -211,6 +297,92 @@
}
},
"x-ms-long-running-operation": true
},
"delete": {
"tags": [
"Event Hubs Cluster"
],
"operationId": "Clusters_Delete",
"x-ms-examples": {
"ClusterDelete": {
"$ref": "./examples/Clusters/ClusterDelete.json"
}
},
"description": "Deletes an existing Event Hubs Cluster. This operation is idempotent.",
"parameters": [
{
"$ref": "#/parameters/subscriptionIdParameter"
},
{
"$ref": "#/parameters/resourceGroupNameParameter"
},
{
"$ref": "#/parameters/clusterNameParameter"
},
{
"$ref": "#/parameters/apiVersionParameter"
}
],
"responses": {
"200": {
"description": "Event Hubs Cluster successfully deleted."
},
"202": {
"description": "Event Hubs Cluster delete request accepted."
},
"204": {
"description": "No content."
},
"default": {
"description": "Event Hubs error response describing why the operation failed.",
"schema": {
"$ref": "#/definitions/ErrorResponse"
}
}
},
"x-ms-long-running-operation": true
}
},
"/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.EventHub/clusters/{clusterName}/namespaces": {
"get": {
"tags": [
"Event Hubs Namespace Enumeration in Cluster"
],
"operationId": "Clusters_ListNamespaces",
"parameters": [
{
"$ref": "#/parameters/subscriptionIdParameter"
},
{
"$ref": "#/parameters/resourceGroupNameParameter"
},
{
"$ref": "#/parameters/clusterNameParameter"
},
{
"$ref": "#/parameters/apiVersionParameter"
}
],
"description": "List all Event Hubs Namespace IDs in an Event Hubs Dedicated Cluster.",
"x-ms-examples": {
"ListNamespacesInCluster": {
"$ref": "./examples/Clusters/ListNamespacesInClusterGet.json"
}
},
"responses": {
"200": {
"description": "List of Namespace IDs in Cluster successfully delivered.",
"schema": {
"$ref": "#/definitions/EHNamespaceIdListResult"
}
},
"default": {
"description": "Event Hubs Cluster error response detailing why this operation failed.",
"schema": {
"$ref": "#/definitions/ErrorResponse"
}
}
}
}
},
"/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.EventHub/clusters/{clusterName}/quotaConfiguration/default": {
Expand Down Expand Up @@ -436,14 +608,14 @@
}
],
"responses": {
"201": {
"description": "Namespace create request accepted.",
"200": {
"description": "Namespace successfully created.",
"schema": {
"$ref": "#/definitions/EHNamespace"
}
},
"200": {
"description": "Namespace successfully created.",
"201": {
"description": "Namespace create request accepted.",
"schema": {
"$ref": "#/definitions/EHNamespace"
}
Expand Down Expand Up @@ -486,15 +658,15 @@
}
],
"responses": {
"204": {
"description": "No content."
},
"200": {
"description": "Namespace successfully deleted."
},
"202": {
"description": "Namespace delete request accepted."
},
"204": {
"description": "No content."
},
"default": {
"description": "Eventhub error response describing why the operation failed.",
"schema": {
Expand Down Expand Up @@ -585,14 +757,14 @@
}
],
"responses": {
"201": {
"description": "Namespace update request accepted.",
"200": {
"description": "Namespace successfully updated.",
"schema": {
"$ref": "#/definitions/EHNamespace"
}
},
"200": {
"description": "Namespace successfully updated.",
"201": {
"description": "Namespace update request accepted.",
"schema": {
"$ref": "#/definitions/EHNamespace"
}
Expand Down Expand Up @@ -736,12 +908,12 @@
}
],
"responses": {
"204": {
"description": "No content."
},
"200": {
"description": "Namespace IpFilterRule successfully deleted."
},
"204": {
"description": "No content."
},
"default": {
"description": "Eventhub error response describing why the operation failed.",
"schema": {
Expand Down Expand Up @@ -921,12 +1093,12 @@
}
],
"responses": {
"204": {
"description": "No content."
},
"200": {
"description": "Namespace VirtualNetworkRule successfully deleted."
},
"204": {
"description": "No content."
},
"default": {
"description": "Eventhub error response describing why the operation failed.",
"schema": {
Expand Down Expand Up @@ -1156,6 +1328,25 @@
],
"description": "Single Event Hubs Cluster resource in List or Get operations."
},
"AvailableClustersList": {
"properties": {
"value": {
"type": "array",
"items": {
"$ref": "#/definitions/AvailableCluster"
},
"description": "The count of readily available and pre-provisioned Event Hubs Clusters per region."
}
},
"description": "The response of the List Available Clusters operation."
},
"AvailableCluster": {
"type": "object",
"additionalProperties": {
"type": "integer"
},
"description": "Pre-provisioned and readily available Event Hubs Cluster count per region."
},
"ClusterListResult": {
"properties": {
"value": {
Expand Down Expand Up @@ -1276,6 +1467,27 @@
],
"description": "SKU parameters particular to a cluster instance."
},
"EHNamespaceIdListResult": {
"properties": {
"value": {
"type": "array",
"items": {
"$ref": "#/definitions/EHNamespaceIdContainer"
},
"description": "Result of the List Namespace IDs operation"
}
},
"description": "The response of the List Namespace IDs operation"
},
"EHNamespaceIdContainer": {
"type": "object",
"properties": {
"id": {
"type": "string"
}
},
"description": "The full ARM ID of an Event Hubs Namespace"
},
"EHNamespaceListResult": {
"properties": {
"value": {
Expand Down Expand Up @@ -1676,4 +1888,4 @@
"x-ms-parameter-location": "method"
}
}
}
}
Original file line number Diff line number Diff line change
@@ -0,0 +1,13 @@
{
"parameters": {
"clusterName": "testCluster",
"resourceGroupName": "myResourceGroup",
"api-version": "2018-01-01-preview",
"subscriptionId": "5f750a97-50d9-4e36-8081-c9ee4c0210d4"
},
"responses": {
"200": {},
"202": {},
"204": {}
}
}
Loading

0 comments on commit 0c33653

Please sign in to comment.