Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Event hubs cluster should support passing parameters with “sku” and “location” #9525

Closed
neil-yechenwei opened this issue May 20, 2020 · 8 comments
Assignees
Labels
Event Hubs Service Attention Workflow: This issue is responsible by Azure service team.

Comments

@neil-yechenwei
Copy link

neil-yechenwei commented May 20, 2020

Per the example of rest apis spec, seems passing “parameters” with “sku” and “location” is supported by “Clusters_Put" API. However, after I also checked rest api, seems event hubs cluster actually doesn’t support passing parameters with “sku” and “location” as http request body. So I am confused. If it doesn’t support to send http request body, then I cannot specify “sku” and “location” while creating event hub cluster. So I suppose passing http request body should be supported.

@ghost ghost added the needs-triage Workflow: This is a new issue that needs to be triaged to the appropriate team. label May 20, 2020
@leni-msft leni-msft added Event Hubs Service Attention Workflow: This issue is responsible by Azure service team. labels May 20, 2020
@ghost
Copy link

ghost commented May 20, 2020

Thanks for the feedback! We are routing this to the appropriate team for follow-up. cc @jfggdl.

@ghost ghost removed the needs-triage Workflow: This is a new issue that needs to be triaged to the appropriate team. label May 20, 2020
@serkantkaraca
Copy link
Member

serkantkaraca commented May 20, 2020

It seems the sample should use a different name for SKU as below.

"sku": { "name": "Dedicated", "capacity": 1 }

REST API swagger definition is pointing to correct name.

"ClusterSku": {
  "type": "object",
  "properties": {
    "name": {
      "type": "string",
      "description": "Name of this SKU.",
      "enum": [
        "Dedicated"
      ],
      "x-ms-enum": {
        "name": "ClusterSkuName",
        "modelAsString": true
      }
    },
    "capacity": {
      "format": "int32",
      "maximum": 32,
      "minimum": 1,
      "type": "integer",
      "description": "The quantity of Event Hubs Cluster Capacity Units contained in this cluster."
    }
  },
  "required": [
    "name"
  ],
  "description": "SKU parameters particular to a cluster instance."
},

@neil-yechenwei
Copy link
Author

neil-yechenwei commented May 27, 2020

@serkantkaraca , and seems Clusters_Put API doesn't support to send paramters as http request body. May I know is there any ETA for fixing this issue?

@serkantkaraca
Copy link
Member

serkantkaraca commented May 27, 2020

@neil-yechenwei I don't understand what you mean by not supporting request body. Entire JSON document is the body and you provide those in the JSON object. Did you try running the sample?

@serkantkaraca
Copy link
Member

OK, just informed the API is being fixed right now. Sorry for misunderstanding.

@neil-yechenwei
Copy link
Author

neil-yechenwei commented May 28, 2020

@serkantkaraca , Sorry for making you confuse. After checked latest code, seems the bug I proposed still hasn't been fixed. I mean parameters (I call it http request body) is missing in Cluster_PUT API, right? I think below code ("parameters") should be added into Cluster_PUT section. So could you help to fix it asap since we're blocked now? Thanks.

The code needs to be added into "Cluster_PUT" section:

{
     "name": "parameters",
     "in": "body",
     "required": true,
     "schema": {
     "$ref": "#/definitions/Cluster"
},

After applied the fix, it should be like below sample code:

"put": {
        "tags": [
          "Event Hubs Clusters"
        ],
        "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": "../../common/v1/definitions.json#/parameters/SubscriptionIdParameter"
          },
          {
            "$ref": "../../common/v1/definitions.json#/parameters/ResourceGroupNameParameter"
          },
          {
            "$ref": "../../common/v1/definitions.json#/parameters/ClusterNameParameter"
          },
          {
            "$ref": "../../common/v1/definitions.json#/parameters/ApiVersionParameter"
          },
          {
            "name": "parameters",
            "in": "body",
            "required": true,
            "schema": {
              "$ref": "#/definitions/Cluster"
            },
            "description": "The properties of the Event Hubs Cluster which should be updated."
          }
        ],

@serkantkaraca
Copy link
Member

Here is the PR for fix - #9596

@neil-yechenwei
Copy link
Author

Seems the issue has been fixed. So closed it. THanks so much.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Event Hubs Service Attention Workflow: This issue is responsible by Azure service team.
Projects
None yet
Development

No branches or pull requests

4 participants