computes
Creates, updates, deletes, gets or lists a computes
resource.
Overview
Name | computes |
Type | Resource |
Id | azure.ml_services.computes |
Fields
The following fields are returned by SELECT
queries:
- get
- list
Success.
Name | Datatype | Description |
---|---|---|
id | string | Fully qualified resource ID for the resource. Ex - /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/{resourceProviderNamespace}/{resourceType}/{resourceName} |
name | string | The name of the resource |
identity | object | Managed service identity (system assigned and/or user assigned identities) |
location | string | Specifies the location of the resource. |
properties | object | Compute properties |
sku | object | The resource model definition representing SKU |
systemData | object | Azure Resource Manager metadata containing createdBy and modifiedBy information. |
tags | object | Contains resource tags defined as key/value pairs. |
type | string | The type of the resource. E.g. "Microsoft.Compute/virtualMachines" or "Microsoft.Storage/storageAccounts" |
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/.
Name | Datatype | Description |
---|---|---|
id | string | Fully qualified resource ID for the resource. Ex - /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/{resourceProviderNamespace}/{resourceType}/{resourceName} |
name | string | The name of the resource |
identity | object | Managed service identity (system assigned and/or user assigned identities) |
location | string | Specifies the location of the resource. |
properties | object | Compute properties |
sku | object | The resource model definition representing SKU |
systemData | object | Azure Resource Manager metadata containing createdBy and modifiedBy information. |
tags | object | Contains resource tags defined as key/value pairs. |
type | string | The type of the resource. E.g. "Microsoft.Compute/virtualMachines" or "Microsoft.Storage/storageAccounts" |
Methods
The following methods are available for this resource:
Name | Accessible by | Required Params | Optional Params | Description |
---|---|---|---|---|
get | select | subscriptionId , resourceGroupName , workspaceName , computeName | Gets compute definition by its name. Any secrets (storage keys, service credentials, etc) are not returned - use 'keys' nested resource to get them. | |
list | select | subscriptionId , resourceGroupName , workspaceName | $skip | Gets computes in specified workspace. |
create_or_update | insert | subscriptionId , resourceGroupName , workspaceName , computeName | 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. | |
update | update | subscriptionId , resourceGroupName , workspaceName , computeName | Updates properties of a compute. This call will overwrite a compute if it exists. This is a nonrecoverable operation. | |
delete | delete | subscriptionId , resourceGroupName , workspaceName , computeName , underlyingResourceAction | Deletes specified Machine Learning compute. | |
start | exec | subscriptionId , resourceGroupName , workspaceName , computeName | Posts a start action to a compute instance | |
stop | exec | subscriptionId , resourceGroupName , workspaceName , computeName | Posts a stop action to a compute instance | |
restart | exec | subscriptionId , resourceGroupName , workspaceName , computeName | Posts a restart action to a compute instance | |
resize | exec | subscriptionId , resourceGroupName , workspaceName , computeName | Updates 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.
Name | Datatype | Description |
---|---|---|
computeName | string | Name of the Azure Machine Learning compute. |
resourceGroupName | string | The name of the resource group. The name is case insensitive. |
subscriptionId | string | The ID of the target subscription. |
underlyingResourceAction | string | Delete the underlying compute if 'Delete', or detach the underlying compute from workspace if 'Detach'. |
workspaceName | string | Azure Machine Learning Workspace Name |
$skip | string | Continuation token for pagination. |
SELECT
examples
- get
- list
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
;
Gets computes in specified workspace.
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 $skip = '{{ $skip }}'
;
INSERT
examples
- create_or_update
- Manifest
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
;
# Description fields are for documentation purposes
- name: computes
props:
- name: subscriptionId
value: string
description: Required parameter for the computes resource.
- name: resourceGroupName
value: string
description: Required parameter for the computes resource.
- name: workspaceName
value: string
description: Required parameter for the computes resource.
- name: computeName
value: string
description: Required parameter for the computes resource.
- name: properties
value: object
description: |
Compute properties
- name: identity
value: object
description: |
Managed service identity (system assigned and/or user assigned identities)
- name: location
value: string
description: |
Specifies the location of the resource.
- name: tags
value: object
description: |
Contains resource tags defined as key/value pairs.
- name: sku
value: object
description: |
The resource model definition representing SKU
UPDATE
examples
- update
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
- delete
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
- start
- stop
- restart
- resize
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
;
Posts a stop action to a compute instance
EXEC azure.ml_services.computes.stop
@subscriptionId='{{ subscriptionId }}' --required,
@resourceGroupName='{{ resourceGroupName }}' --required,
@workspaceName='{{ workspaceName }}' --required,
@computeName='{{ computeName }}' --required
;
Posts a restart action to a compute instance
EXEC azure.ml_services.computes.restart
@subscriptionId='{{ subscriptionId }}' --required,
@resourceGroupName='{{ resourceGroupName }}' --required,
@workspaceName='{{ workspaceName }}' --required,
@computeName='{{ computeName }}' --required
;
Updates the size of a Compute Instance.
EXEC azure.ml_services.computes.resize
@subscriptionId='{{ subscriptionId }}' --required,
@resourceGroupName='{{ resourceGroupName }}' --required,
@workspaceName='{{ workspaceName }}' --required,
@computeName='{{ computeName }}' --required
@@json=
'{
"targetVMSize": "{{ targetVMSize }}"
}'
;