azure-cli-extensions icon indicating copy to clipboard operation
azure-cli-extensions copied to clipboard

az stream-analytics function create for an Azure ML function

Open jchomarat opened this issue 3 years ago • 6 comments

Extension name (the extension in question)

stream-analytics version 0.1.2 (latest at time of writing)

Description of issue (in as much detail as possible)

I am trying to create an Azure ML function. The Endpoint is hosted in an AKS. I can create manually in the portal the function, I just want to package this in a bash file

Command executed

az stream-analytics function create --function-name "scoring" --job-name "temp-filter" -g "my-rg" --properties @aml-function.json

aml-function.json:

{
  "type": "Scalar",
  "properties": {
    "binding": {
      "type": "Microsoft.MachineLearning/WebService",
      "properties": {
        "apiKey": "XXXX",
        "batchSize": 1,
        "numberOfParallelRequests": 1,
        "endpoint": "http://XXXX",
        "inputs": {
          "name": "input",
          "columnNames": [
            {
              "name": "data",
              "dataType": "object",
              "mapTo": 0
            }
          ]
        },
        "outputs": [
          {
            "name": null,
            "dataType": "string",
            "mapTo": 0
          }
        ]
      }
    },
    "inputs": [
      {
        "dataType": "record"
      }
    ],
    "output": {
      "dataType": "nvarchar(max)"
    }
  }
}

The endpoint is "http", and I receive the following error:

(BadRequest) The JSON provided in the request body is invalid. Only Uri scheme : 'https' is supported for property : 'endpoint' Code: BadRequest Message: The JSON provided in the request body is invalid. Only Uri scheme : 'https' is supported for property : 'endpoint'

As said above, I can register this endpoint via the Portal, so via the portal, the HTTPS is not enforced.

Expected behavior: the same as the portal i.e. being able to create endpoint in HTTP

Thanks


jchomarat avatar Apr 14 '22 14:04 jchomarat

stream-analytics

yonzhan avatar Apr 14 '22 14:04 yonzhan

I have tried with an ARM template, same error, so it is the underyling API that has this issue

jchomarat avatar Apr 14 '22 15:04 jchomarat

Thank you for your feedback. This has been routed to the support team for assistance.

ghost avatar Apr 15 '22 00:04 ghost

@jchomarat We are looking into it and get back to you for any additional information.

SaurabhSharma-MSFT avatar Apr 15 '22 16:04 SaurabhSharma-MSFT

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

Issue Details

Extension name (the extension in question)

stream-analytics version 0.1.2 (latest at time of writing)

Description of issue (in as much detail as possible)

I am trying to create an Azure ML function. The Endpoint is hosted in an AKS. I can create manually in the portal the function, I just want to package this in a bash file

Command executed

az stream-analytics function create --function-name "scoring" --job-name "temp-filter" -g "my-rg" --properties @aml-function.json

aml-function.json:

{
  "type": "Scalar",
  "properties": {
    "binding": {
      "type": "Microsoft.MachineLearning/WebService",
      "properties": {
        "apiKey": "XXXX",
        "batchSize": 1,
        "numberOfParallelRequests": 1,
        "endpoint": "http://XXXX",
        "inputs": {
          "name": "input",
          "columnNames": [
            {
              "name": "data",
              "dataType": "object",
              "mapTo": 0
            }
          ]
        },
        "outputs": [
          {
            "name": null,
            "dataType": "string",
            "mapTo": 0
          }
        ]
      }
    },
    "inputs": [
      {
        "dataType": "record"
      }
    ],
    "output": {
      "dataType": "nvarchar(max)"
    }
  }
}

The endpoint is "http", and I receive the following error:

(BadRequest) The JSON provided in the request body is invalid. Only Uri scheme : 'https' is supported for property : 'endpoint' Code: BadRequest Message: The JSON provided in the request body is invalid. Only Uri scheme : 'https' is supported for property : 'endpoint'

As said above, I can register this endpoint via the Portal, so via the portal, the HTTPS is not enforced.

Expected behavior: the same as the portal i.e. being able to create endpoint in HTTP

Thanks


Author: jchomarat
Assignees: jsntcy, SaurabhSharma-MSFT
Labels:

customer-reported, Stream Analytics, Service Attention, CXP Attention, Auto-Assign

Milestone: Backlog

ghost avatar Apr 18 '22 09:04 ghost

@atpham256 Did you get a chance to look into this issue.

SaurabhSharma-MSFT avatar May 04 '22 22:05 SaurabhSharma-MSFT

Hi jchomarat, can you provide information that the resource with endpoint in HTTP created on portal?

ZengTaoxu avatar Sep 28 '23 01:09 ZengTaoxu