@lap v0.3
# Machine-readable API spec. Each @endpoint block is one API call.
@api Azure Machine Learning Workspaces
@base https://management.azure.com
@version 2019-06-01
@auth OAuth2
@common_fields {api-version: any # Version of Azure Machine Learning resource provider API., subscriptionId: any # Azure subscription identifier.}
@endpoints 20
@toc providers(1), subscriptions(19)

@group providers
@endpoint GET /providers/Microsoft.MachineLearningServices/operations
@desc Lists all of the available Azure Machine Learning Workspaces REST API operations.
@returns(200) The request was successful; the request was well-formed and received properly.

@endgroup

@group subscriptions
@endpoint GET /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.MachineLearningServices/workspaces/{workspaceName}
@desc Gets the properties of the specified machine learning workspace.
@required {resourceGroupName: any # Name of the resource group in which workspace is located., workspaceName: any # Name of Azure Machine Learning workspace.}
@returns(200) The request was successful; the request was well-formed and received properly.

@endpoint PUT /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.MachineLearningServices/workspaces/{workspaceName}
@desc Creates or updates a workspace with the specified parameters.
@required {resourceGroupName: any # Name of the resource group in which workspace is located., workspaceName: any # Name of Azure Machine Learning workspace., parameters: map # The parameters for creating or updating a machine learning workspace.}
@returns(200) The request was successful; the request was well-formed and received properly.
@returns(201) The request was successful; the request was well-formed and received properly.
@returns(202) The request was successful; the request was well-formed and received properly.

@endpoint DELETE /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.MachineLearningServices/workspaces/{workspaceName}
@desc Deletes a machine learning workspace.
@required {resourceGroupName: any # Name of the resource group in which workspace is located., workspaceName: any # Name of Azure Machine Learning workspace.}
@returns(200) The request was successful; the request was well-formed and received properly.
@returns(202) The request was accepted; the request was well-formed and received properly.
@returns(204) The machine learning workspace does not exist in the subscription.

@endpoint PATCH /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.MachineLearningServices/workspaces/{workspaceName}
@desc Updates a machine learning workspace with the specified parameters.
@required {resourceGroupName: any # Name of the resource group in which workspace is located., workspaceName: any # Name of Azure Machine Learning workspace., parameters: any # The parameters for updating a machine learning workspace.}
@returns(200) The request was successful; the request was well-formed and received properly.

@endpoint GET /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.MachineLearningServices/workspaces
@desc Lists all the available machine learning workspaces under the specified resource group.
@required {resourceGroupName: any # Name of the resource group in which workspace is located.}
@optional {$skiptoken: any # Continuation token for pagination.}
@returns(200) The request was successful; the request was well-formed and received properly.

@endpoint POST /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.MachineLearningServices/workspaces/{workspaceName}/listKeys
@desc Lists all the keys associated with this workspace. This includes keys for the storage account, app insights and password for container registry
@required {resourceGroupName: any # Name of the resource group in which workspace is located., workspaceName: any # Name of Azure Machine Learning workspace.}
@returns(200) The request was successful; the request was well-formed and received properly.

@endpoint POST /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.MachineLearningServices/workspaces/{workspaceName}/resyncKeys
@desc Resync all the keys associated with this workspace. This includes keys for the storage account, app insights and password for container registry
@required {resourceGroupName: any # Name of the resource group in which workspace is located., workspaceName: any # Name of Azure Machine Learning workspace.}
@returns(200) The request was successful; the request was well-formed and received properly.

@endpoint GET /subscriptions/{subscriptionId}/providers/Microsoft.MachineLearningServices/locations/{location}/usages
@desc Gets the current usage information as well as limits for AML resources for given subscription and location.
@required {location: any # The location for which resource usage is queried.}
@optional {expandChildren: any # Specifies if detailed usages of child resources are required.}
@returns(200) OK

@endpoint GET /subscriptions/{subscriptionId}/providers/Microsoft.MachineLearningServices/locations/{location}/vmSizes
@desc Returns supported VM Sizes in a location
@required {location: any # The location upon which virtual-machine-sizes is queried.}
@returns(200) OK

@endpoint POST /subscriptions/{subscriptionId}/providers/Microsoft.MachineLearningServices/locations/{location}/updateQuotas
@desc Update quota for each VM family in workspace.
@required {location: any # The location for update quota is queried., parameters: any # Quota update parameters.}
@returns(200) The operation was successful.

@endpoint GET /subscriptions/{subscriptionId}/providers/Microsoft.MachineLearningServices/locations/{location}/Quotas
@desc Gets the currently assigned Workspace Quotas based on VMFamily.
@required {location: any # The location for which resource usage is queried.}
@returns(200) OK

@endpoint GET /subscriptions/{subscriptionId}/providers/Microsoft.MachineLearningServices/workspaces
@desc Lists all the available machine learning workspaces under the specified subscription.
@optional {$skiptoken: any # Continuation token for pagination.}
@returns(200) The request was successful; the request was well-formed and received properly.

@endpoint GET /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.MachineLearningServices/workspaces/{workspaceName}/computes
@desc Gets computes in specified workspace.
@required {resourceGroupName: any # Name of the resource group in which workspace is located., workspaceName: any # Name of Azure Machine Learning workspace.}
@optional {$skiptoken: any # Continuation token for pagination.}
@returns(200) The response includes a paginated array of Machine Learning computes and a URI to the next set of results, if any. For the more information the limits of the number of items in a resource group, see https://azure.microsoft.com/en-us/documentation/articles/azure-subscription-service-limits/.

@endpoint GET /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.MachineLearningServices/workspaces/{workspaceName}/computes/{computeName}
@desc Gets compute definition by its name. Any secrets (storage keys, service credentials, etc) are not returned - use 'keys' nested resource to get them.
@required {resourceGroupName: any # Name of the resource group in which workspace is located., workspaceName: any # Name of Azure Machine Learning workspace., computeName: any # Name of the Azure Machine Learning compute.}
@returns(200) Success.

@endpoint PUT /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.MachineLearningServices/workspaces/{workspaceName}/computes/{computeName}
@desc Creates or updates compute. This call will overwrite a compute if it exists. This is a nonrecoverable operation. If your intent is to create a new compute, do a GET first to verify that it does not exist yet.
@required {resourceGroupName: any # Name of the resource group in which workspace is located., workspaceName: any # Name of Azure Machine Learning workspace., computeName: any # Name of the Azure Machine Learning compute., parameters: map # Payload with Machine Learning compute definition.}
@returns(200) Compute creation or update initiated.
@returns(201) Compute creation or update initiated.

@endpoint PATCH /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.MachineLearningServices/workspaces/{workspaceName}/computes/{computeName}
@desc Updates properties of a compute. This call will overwrite a compute if it exists. This is a nonrecoverable operation.
@required {resourceGroupName: any # Name of the resource group in which workspace is located., workspaceName: any # Name of Azure Machine Learning workspace., computeName: any # Name of the Azure Machine Learning compute., parameters: any # Additional parameters for cluster update.}
@returns(200) Compute update initiated.

@endpoint DELETE /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.MachineLearningServices/workspaces/{workspaceName}/computes/{computeName}
@desc Deletes specified Machine Learning compute.
@required {resourceGroupName: any # Name of the resource group in which workspace is located., workspaceName: any # Name of Azure Machine Learning workspace., computeName: any # Name of the Azure Machine Learning compute., underlyingResourceAction: any # Delete the underlying compute if 'Delete', or detach the underlying compute from workspace if 'Detach'.}
@returns(200) The request was successful; the request was well-formed and received properly.
@returns(202) Compute deletion initiated.

@endpoint POST /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.MachineLearningServices/workspaces/{workspaceName}/computes/{computeName}/listNodes
@desc Get the details (e.g IP address, port etc) of all the compute nodes in the compute.
@required {resourceGroupName: any # Name of the resource group in which workspace is located., workspaceName: any # Name of Azure Machine Learning workspace., computeName: any # Name of the Azure Machine Learning compute.}
@returns(200) The operation was successful. The response contains the list of IP addresses.

@endpoint POST /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.MachineLearningServices/workspaces/{workspaceName}/computes/{computeName}/listKeys
@desc Gets secrets related to Machine Learning compute (storage keys, service credentials, etc).
@required {resourceGroupName: any # Name of the resource group in which workspace is located., workspaceName: any # Name of Azure Machine Learning workspace., computeName: any # Name of the Azure Machine Learning compute.}
@returns(200) Success.

@endgroup

@end
