Azure / Azure/azure-rest-api-specs
machinelearningservices: workspace API isn't returning `publicNetworkAccess`
- Dominant language
- TypeSpec
- Stars
- 3.1k
- Forks
- 5.9k
- Avg merge
- 2d 22h
- Merged PRs (30d)
- 444
Description
Service: `Machine Learning Services`
API Version: `2021-07-01`
Hello,
We want to expose the field `publicNetworkAccess` in the Terraform resource for Machine Learning Workspaces. Unfortunately this field isn't returned from the API regardless of whether it is set to `Enabled` or `Disabled` (example PUT and GET down below with IDs redacted). It also looks like setting this field doesn't do anything, when I inspect the workspace in the portal it still says that public network access is allowed for all networks.

Can you please update the API so that setting this field sets public network access properly and also that this field is returned by the API.
Thanks!
cc. @denniseik
PUT
```
{
"identity": {
"type": "SystemAssigned"
},
"location": "westeurope",
"properties": {
"allowPublicAccessWhenBehindVnet": true,
"applicationInsights": ***,
"containerRegistry": ***,
"description": "Test machine learning workspace",
"encryption": {
"status": "Enabled",
"identity": {},
"keyVaultProperties": {
"keyVaultArmId": ***,
"keyIdentifier": ***
}
},
"friendlyName": "test-workspace",
"hbiWorkspace": true,
"imageBuildCompute": "terraformCompute",
"keyVault": ***,
"publicNetworkAccess": "Enabled",
"storageAccount": ***
},
"sku": {
"name": "Basic",
"tier": "Basic"
},
"tags": {
"ENV": "Test"
}
}
```
GET
```
{
"id": ***,
"name": "acctest-MLW-2204071344164086",
"type": "Microsoft.MachineLearningServices/workspaces",
"location": "westeurope",
"tags": {
"ENV": "Test"
},
"etag": null,
"properties": {
"friendlyName": "test-workspace",
"description": "Test machine learning workspace",
"storageAccount": ***,
"keyVault": ***,
"applicationInsights": ***,
"hbiWorkspace": true,
"tenantId": ***,
"imageBuildCompute": "terraformCompute",
"provisioningState": "Succeeded",
"containerRegistry": ***,
"notebookInfo": {
"resourceId": "72c7e7d8d62c4eca8e558cb7e45cf9e0",
"fqdn": "ml-acctest-mlw--westeurope-941a184a-d1eb-4694-88ba-55126f8e17e0.notebooks.azure.net",
"isPrivateLinkEnabled": false,
"notebookPreparationError": null
},
"serviceProvisionedResourceGroup": ***,
"serviceManagedResourcesSettings": {
"cosmosDb": {
"collectionsThroughput": 8000
}
},
"storageHnsEnabled": false,
"workspaceId": "941a184a-d1eb-4694-88ba-55126f8e17e0",
"linkedModelInventoryArmId": null,
"privateLinkCount": 0,
"allowPublicAccessWhenBehindVnet": true,
"discoveryUrl": "https://westeurope.api.azureml.ms/discovery",
"mlFlowTrackingUri": ***,
"sdkTelemetryAppInsightsKey": ***,
"encryption": {
"status": "Enabled",
"identity": {
"userAssignedIdentity": null
},
"keyVaultProperties": {
"keyIdentifier": ***,
"identityClientId": null,
"keyVaultArmId": ***
},
"cosmosDbResourceId": ***,
"storageAccountResourceId": ***,
"searchAccountResourceId": ***
}
},
"identity": {
"type": "SystemAssigned",
"principalId": "5eac07d7-047c-4986-bb08-e38681b664a9",
"tenantId": "26e25406-6564-4a26-98ee-c71ba03235ad"
},
"sku": {
"name": "Basic",
"tier": "Basic"
},
"systemData": {
"createdAt": "2022-04-07T11:47:39.9199045Z",
"createdBy": "af46c99c-71b9-47cf-84f7-4f303c7596a1",
"createdByType": "Application",
"lastModifiedAt": "2022-04-07T11:47:39.9199045Z",
"lastModifiedBy": "af46c99c-71b9-47cf-84f7-4f303c7596a1",
"lastModifiedByType": "Application"
}
}
```
Contributor guide
Research direction
Start by locating the Machine Learning Services workspace definition for API version 2021-07-01 in the REST API specifications, then compare the PUT and GET property definitions with the examples in the issue. Done means publicNetworkAccess is accepted, returned by the API, and its Enabled or Disabled value controls the workspace's public network access.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- openapi
- Domain
- api, backend-api-design
- Issue type
- Bug
- Difficulty
- 3/5
- Estimated time
- 1-2 days
- Activity status
- Stale
- Clarity
- Mostly clear
- Newbie friendliness
- 35/100