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

Harshini K S 21 Reputation points
2020-06-03T10:58:22.55+00:00

Problem with https://learn.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://learn.microsoft.com/en-us/cli/azure/ext/azure-cli-ml/ml/workspace?view=azure-cli-latest

Azure Machine Learning
Azure Machine Learning
An Azure machine learning service for building and deploying models.
2,579 questions
0 comments No comments
{count} votes

Accepted answer
  1. romungi-MSFT 42,296 Reputation points Microsoft Employee
    2020-06-04T10:32:12.953+00:00

    Hi @Harshini K S ,

    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.

    0 comments No comments

0 additional answers

Sort by: Most helpful