Skip to main content

computes

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

Overview

Namecomputes
TypeResource
Idazure.cognitive_services.computes

Fields

The following fields are returned by SELECT queries:

NameDatatypeDescription
idstringFully qualified resource ID for the resource. Ex - /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/{resourceProviderNamespace}/{resourceType}/{resourceName}.
namestringThe name of the resource.
computeTypestringThe type of compute resource. Required. Known values are: "Cluster" and "ContainerInstance".
creationTimestring (date-time)Creation time of the compute resource.
errorsarrayError details for the compute resource.
etagstringResource Etag.
identityobjectIdentity for the resource.
kindstringThe kind (type) of compute resource.
locationstringThe location of the compute resource.
provisioningStatestringProvisioning state of the compute resource. Known values are: "Accepted", "Succeeded", "Failed", "Canceled", "Deleting", "Scaling", "Disabled", "Starting", "Stopping", "Restarting", and "Stopped". (Accepted, Succeeded, Failed, Canceled, Deleting, Scaling, Disabled, Starting, Stopping, Restarting, Stopped)
systemDataobjectAzure Resource Manager metadata containing createdBy and modifiedBy information.
tagsobjectResource tags.
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
getselectresource_group_name, account_name, compute_name, subscription_idGets the specified compute associated with the Cognitive Services account.
listselectresource_group_name, account_name, subscription_idGets the computes associated with the Cognitive Services account.
create_or_updateinsertresource_group_name, account_name, compute_name, subscription_id, propertiesCreates or updates a compute associated with the Cognitive Services account.
updateupdateresource_group_name, account_name, compute_name, subscription_id, propertiesUpdates a compute associated with the Cognitive Services account.
create_or_updatereplaceresource_group_name, account_name, compute_name, subscription_id, propertiesCreates or updates a compute associated with the Cognitive Services account.
deletedeleteresource_group_name, account_name, compute_name, subscription_idDeletes the specified compute associated with the Cognitive Services account.
startexecresource_group_name, account_name, compute_name, subscription_idStarts a stopped ContainerInstance compute resource. This is a long-running operation that returns 202 Accepted. Only applicable when computeType is ContainerInstance.
stopexecresource_group_name, account_name, compute_name, subscription_idStops a running ContainerInstance compute resource. This is a long-running operation that returns 202 Accepted. Only applicable when computeType is ContainerInstance.
restartexecresource_group_name, account_name, compute_name, subscription_idRestarts a running ContainerInstance compute resource. This is a long-running operation that returns 202 Accepted. Only applicable when computeType is ContainerInstance.

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
account_namestringThe name of Cognitive Services account. Required.
compute_namestringThe name of the compute associated with the Cognitive Services Account. Required.
resource_group_namestringThe name of the resource group. The name is case insensitive. Required.
subscription_idstring

SELECT examples

Gets the specified compute associated with the Cognitive Services account.

SELECT
id,
name,
computeType,
creationTime,
errors,
etag,
identity,
kind,
location,
provisioningState,
systemData,
tags,
type
FROM azure.cognitive_services.computes
WHERE resource_group_name = '{{ resource_group_name }}' -- required
AND account_name = '{{ account_name }}' -- required
AND compute_name = '{{ compute_name }}' -- required
AND subscription_id = '{{ subscription_id }}' -- required
;

INSERT examples

Creates or updates a compute associated with the Cognitive Services account.

INSERT INTO azure.cognitive_services.computes (
properties,
location,
tags,
kind,
identity,
resource_group_name,
account_name,
compute_name,
subscription_id
)
SELECT
'{{ properties }}' /* required */,
'{{ location }}',
'{{ tags }}',
'{{ kind }}',
'{{ identity }}',
'{{ resource_group_name }}',
'{{ account_name }}',
'{{ compute_name }}',
'{{ subscription_id }}'
RETURNING
id,
name,
etag,
identity,
kind,
location,
properties,
systemData,
tags,
type
;

UPDATE examples

Updates a compute associated with the Cognitive Services account.

UPDATE azure.cognitive_services.computes
SET
properties = '{{ properties }}',
location = '{{ location }}',
tags = '{{ tags }}',
kind = '{{ kind }}',
identity = '{{ identity }}'
WHERE
resource_group_name = '{{ resource_group_name }}' --required
AND account_name = '{{ account_name }}' --required
AND compute_name = '{{ compute_name }}' --required
AND subscription_id = '{{ subscription_id }}' --required
AND properties = '{{ properties }}' --required
RETURNING
id,
name,
etag,
identity,
kind,
location,
properties,
systemData,
tags,
type;

REPLACE examples

Creates or updates a compute associated with the Cognitive Services account.

REPLACE azure.cognitive_services.computes
SET
properties = '{{ properties }}',
location = '{{ location }}',
tags = '{{ tags }}',
kind = '{{ kind }}',
identity = '{{ identity }}'
WHERE
resource_group_name = '{{ resource_group_name }}' --required
AND account_name = '{{ account_name }}' --required
AND compute_name = '{{ compute_name }}' --required
AND subscription_id = '{{ subscription_id }}' --required
AND properties = '{{ properties }}' --required
RETURNING
id,
name,
etag,
identity,
kind,
location,
properties,
systemData,
tags,
type;

DELETE examples

Deletes the specified compute associated with the Cognitive Services account.

DELETE FROM azure.cognitive_services.computes
WHERE resource_group_name = '{{ resource_group_name }}' --required
AND account_name = '{{ account_name }}' --required
AND compute_name = '{{ compute_name }}' --required
AND subscription_id = '{{ subscription_id }}' --required
;

Lifecycle Methods

Starts a stopped ContainerInstance compute resource. This is a long-running operation that returns 202 Accepted. Only applicable when computeType is ContainerInstance.

EXEC azure.cognitive_services.computes.start 
@resource_group_name='{{ resource_group_name }}' --required,
@account_name='{{ account_name }}' --required,
@compute_name='{{ compute_name }}' --required,
@subscription_id='{{ subscription_id }}' --required
;