Skip to main content

computes

Creates, updates, deletes, gets or lists a computes resource.

Overview

Namecomputes
TypeResource
Idazure.ml_services.computes

Fields

The following fields are returned by SELECT queries:

Success.

NameDatatypeDescription
idstringFully qualified resource ID for the resource. Ex - /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/{resourceProviderNamespace}/{resourceType}/{resourceName}
namestringThe name of the resource
identityobjectManaged service identity (system assigned and/or user assigned identities)
locationstringSpecifies the location of the resource.
propertiesobjectCompute properties
skuobjectThe resource model definition representing SKU
systemDataobjectAzure Resource Manager metadata containing createdBy and modifiedBy information.
tagsobjectContains resource tags defined as key/value pairs.
typestringThe type of the resource. E.g. "Microsoft.Compute/virtualMachines" or "Microsoft.Storage/storageAccounts"

Methods

The following methods are available for this resource:

NameAccessible byRequired ParamsOptional ParamsDescription
getselectsubscriptionId, resourceGroupName, workspaceName, computeNameGets compute definition by its name. Any secrets (storage keys, service credentials, etc) are not returned - use 'keys' nested resource to get them.
listselectsubscriptionId, resourceGroupName, workspaceName$skipGets computes in specified workspace.
create_or_updateinsertsubscriptionId, resourceGroupName, workspaceName, computeNameCreates 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.
updateupdatesubscriptionId, resourceGroupName, workspaceName, computeNameUpdates properties of a compute. This call will overwrite a compute if it exists. This is a nonrecoverable operation.
deletedeletesubscriptionId, resourceGroupName, workspaceName, computeName, underlyingResourceActionDeletes specified Machine Learning compute.
startexecsubscriptionId, resourceGroupName, workspaceName, computeNamePosts a start action to a compute instance
stopexecsubscriptionId, resourceGroupName, workspaceName, computeNamePosts a stop action to a compute instance
restartexecsubscriptionId, resourceGroupName, workspaceName, computeNamePosts a restart action to a compute instance
resizeexecsubscriptionId, resourceGroupName, workspaceName, computeNameUpdates the size of a Compute Instance.

Parameters

Parameters can be passed in the WHERE clause of a query. Check the Methods section to see which parameters are required or optional for each operation.

NameDatatypeDescription
computeNamestringName of the Azure Machine Learning compute.
resourceGroupNamestringThe name of the resource group. The name is case insensitive.
subscriptionIdstringThe ID of the target subscription.
underlyingResourceActionstringDelete the underlying compute if 'Delete', or detach the underlying compute from workspace if 'Detach'.
workspaceNamestringAzure Machine Learning Workspace Name
$skipstringContinuation token for pagination.

SELECT examples

Gets compute definition by its name. Any secrets (storage keys, service credentials, etc) are not returned - use 'keys' nested resource to get them.

SELECT
id,
name,
identity,
location,
properties,
sku,
systemData,
tags,
type
FROM azure.ml_services.computes
WHERE subscriptionId = '{{ subscriptionId }}' -- required
AND resourceGroupName = '{{ resourceGroupName }}' -- required
AND workspaceName = '{{ workspaceName }}' -- required
AND computeName = '{{ computeName }}' -- required
;

INSERT examples

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.

INSERT INTO azure.ml_services.computes (
data__properties,
data__identity,
data__location,
data__tags,
data__sku,
subscriptionId,
resourceGroupName,
workspaceName,
computeName
)
SELECT
'{{ properties }}',
'{{ identity }}',
'{{ location }}',
'{{ tags }}',
'{{ sku }}',
'{{ subscriptionId }}',
'{{ resourceGroupName }}',
'{{ workspaceName }}',
'{{ computeName }}'
RETURNING
id,
name,
identity,
location,
properties,
sku,
systemData,
tags,
type
;

UPDATE examples

Updates properties of a compute. This call will overwrite a compute if it exists. This is a nonrecoverable operation.

UPDATE azure.ml_services.computes
SET
data__properties = '{{ properties }}'
WHERE
subscriptionId = '{{ subscriptionId }}' --required
AND resourceGroupName = '{{ resourceGroupName }}' --required
AND workspaceName = '{{ workspaceName }}' --required
AND computeName = '{{ computeName }}' --required
RETURNING
id,
name,
identity,
location,
properties,
sku,
systemData,
tags,
type;

DELETE examples

Deletes specified Machine Learning compute.

DELETE FROM azure.ml_services.computes
WHERE subscriptionId = '{{ subscriptionId }}' --required
AND resourceGroupName = '{{ resourceGroupName }}' --required
AND workspaceName = '{{ workspaceName }}' --required
AND computeName = '{{ computeName }}' --required
AND underlyingResourceAction = '{{ underlyingResourceAction }}' --required
;

Lifecycle Methods

Posts a start action to a compute instance

EXEC azure.ml_services.computes.start 
@subscriptionId='{{ subscriptionId }}' --required,
@resourceGroupName='{{ resourceGroupName }}' --required,
@workspaceName='{{ workspaceName }}' --required,
@computeName='{{ computeName }}' --required
;