computes
Creates, updates, deletes, gets or lists a computes resource.
Overview
| Name | computes |
| Type | Resource |
| Id | azure.cognitive_services.computes |
Fields
The following fields are returned by SELECT queries:
- get
- list
| 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. |
computeType | string | The type of compute resource. Required. Known values are: "Cluster" and "ContainerInstance". |
creationTime | string (date-time) | Creation time of the compute resource. |
errors | array | Error details for the compute resource. |
etag | string | Resource Etag. |
identity | object | Identity for the resource. |
kind | string | The kind (type) of compute resource. |
location | string | The location of the compute resource. |
provisioningState | string | Provisioning 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) |
systemData | object | Azure Resource Manager metadata containing createdBy and modifiedBy information. |
tags | object | Resource tags. |
type | string | The type of the resource. E.g. "Microsoft.Compute/virtualMachines" or "Microsoft.Storage/storageAccounts". |
| 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. |
computeType | string | The type of compute resource. Required. Known values are: "Cluster" and "ContainerInstance". |
creationTime | string (date-time) | Creation time of the compute resource. |
errors | array | Error details for the compute resource. |
etag | string | Resource Etag. |
identity | object | Identity for the resource. |
kind | string | The kind (type) of compute resource. |
location | string | The location of the compute resource. |
provisioningState | string | Provisioning 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) |
systemData | object | Azure Resource Manager metadata containing createdBy and modifiedBy information. |
tags | object | Resource tags. |
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 | resource_group_name, account_name, compute_name, subscription_id | Gets the specified compute associated with the Cognitive Services account. | |
list | select | resource_group_name, account_name, subscription_id | Gets the computes associated with the Cognitive Services account. | |
create_or_update | insert | resource_group_name, account_name, compute_name, subscription_id, properties | Creates or updates a compute associated with the Cognitive Services account. | |
update | update | resource_group_name, account_name, compute_name, subscription_id, properties | Updates a compute associated with the Cognitive Services account. | |
create_or_update | replace | resource_group_name, account_name, compute_name, subscription_id, properties | Creates or updates a compute associated with the Cognitive Services account. | |
delete | delete | resource_group_name, account_name, compute_name, subscription_id | Deletes the specified compute associated with the Cognitive Services account. | |
start | exec | resource_group_name, account_name, compute_name, subscription_id | Starts a stopped ContainerInstance compute resource. This is a long-running operation that returns 202 Accepted. Only applicable when computeType is ContainerInstance. | |
stop | exec | resource_group_name, account_name, compute_name, subscription_id | Stops a running ContainerInstance compute resource. This is a long-running operation that returns 202 Accepted. Only applicable when computeType is ContainerInstance. | |
restart | exec | resource_group_name, account_name, compute_name, subscription_id | Restarts 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.
| Name | Datatype | Description |
|---|---|---|
account_name | string | The name of Cognitive Services account. Required. |
compute_name | string | The name of the compute associated with the Cognitive Services Account. Required. |
resource_group_name | string | The name of the resource group. The name is case insensitive. Required. |
subscription_id | string |
SELECT examples
- get
- list
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
;
Gets the computes 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 subscription_id = '{{ subscription_id }}' -- required
;
INSERT examples
- create_or_update
- Manifest
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
;
# Description fields are for documentation purposes
- name: computes
props:
- name: resource_group_name
value: "{{ resource_group_name }}"
description: Required parameter for the computes resource.
- name: account_name
value: "{{ account_name }}"
description: Required parameter for the computes resource.
- name: compute_name
value: "{{ compute_name }}"
description: Required parameter for the computes resource.
- name: subscription_id
value: "{{ subscription_id }}"
description: Required parameter for the computes resource.
- name: properties
description: |
Polymorphic properties of the compute resource. Use computeType to select Cluster or ContainerInstance. Required.
value:
computeType: "{{ computeType }}"
provisioningState: "{{ provisioningState }}"
errors:
- code: "{{ code }}"
message: "{{ message }}"
target: "{{ target }}"
details: "{{ details }}"
additionalInfo: "{{ additionalInfo }}"
creationTime: "{{ creationTime }}"
- name: location
value: "{{ location }}"
description: |
The location of the compute resource.
- name: tags
value: "{{ tags }}"
description: |
Resource tags.
- name: kind
value: "{{ kind }}"
description: |
The kind (type) of compute resource.
- name: identity
description: |
Identity for the resource.
value:
type: "{{ type }}"
tenantId: "{{ tenantId }}"
principalId: "{{ principalId }}"
userAssignedIdentities: "{{ userAssignedIdentities }}"
UPDATE examples
- update
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
- create_or_update
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
- delete
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
- start
- stop
- restart
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
;
Stops a running ContainerInstance compute resource. This is a long-running operation that returns 202 Accepted. Only applicable when computeType is ContainerInstance.
EXEC azure.cognitive_services.computes.stop
@resource_group_name='{{ resource_group_name }}' --required,
@account_name='{{ account_name }}' --required,
@compute_name='{{ compute_name }}' --required,
@subscription_id='{{ subscription_id }}' --required
;
Restarts a running ContainerInstance compute resource. This is a long-running operation that returns 202 Accepted. Only applicable when computeType is ContainerInstance.
EXEC azure.cognitive_services.computes.restart
@resource_group_name='{{ resource_group_name }}' --required,
@account_name='{{ account_name }}' --required,
@compute_name='{{ compute_name }}' --required,
@subscription_id='{{ subscription_id }}' --required
;