question

HarshiniKS-4497 avatar image
0 Votes"
HarshiniKS-4497 asked azure-cxp-api edited

Rest api to create or update azure ML workspace doesn't create dependant resources

Problem with https://docs.microsoft.com/en-gb/rest/api/azureml/workspacesandcomputes/workspaces/createorupdate API... In the request body, Is it mandatory to create storage account, app insights, key vault, registration resources before? Ideally since these are dependent resources, shouldn’t it be created as part of workflow creation?
I get below response when dependent resources are not created prior.

 `{
   “error”: {
     “code”: “ValidationError”,
     “message”: “One or more validation errors occured.“,
     “messageFormat”: null,
     “messageParameters”: null,
     “referenceCode”: null,
     “detailsUri”: null,
     “target”: “Can not perform requested operation on nested resource. Parent resource ‘<resourceid>’ not found.“,
     “details”: [],
     “innerError”: null,
     “debugInfo”: null
   },
   “correlation”: {
     “operation”: “<opid>“,
     “request”: “<reqid>”
   },
   “environment”: “westus”,
   “location”: “westus”,
   “time”: “2020-06-03T07:13:14.6463577+00:00"
 }`


I need an API which works similar to https://docs.microsoft.com/en-us/cli/azure/ext/azure-cli-ml/ml/workspace?view=azure-cli-latest

azure-machine-learning
5 |1600 characters needed characters left characters exceeded

Up to 10 attachments (including images) can be used with a maximum of 3.0 MiB each and 30.0 MiB total.

1 Answer

romungi-MSFT avatar image
0 Votes"
romungi-MSFT answered

Hi @HarshiniKS-4497,

Yes, the REST API needs the other resource ids to be mentioned in the request body or they need to be created prior to this call unlike azure cli which provides the option to create them in a single request with input parameters. You could also try to use ARM template to create all the resources by calling this action from PS or cli.


5 |1600 characters needed characters left characters exceeded

Up to 10 attachments (including images) can be used with a maximum of 3.0 MiB each and 30.0 MiB total.