accounts
Creates, updates, deletes, gets or lists an accounts
resource.
Overview
Name | accounts |
Type | Resource |
Id | azure.cognitive_services.accounts |
Fields
The following fields are returned by SELECT
queries:
- get
- list_by_resource_group
- list
The resource provider should return 200 (OK) to indicate that the operation completed successfully.
For a detailed explanation of each field in the response body, please refer to the request body description in the PUT resource section. The only GET specific properties are "name," "type" and "id."
Field Description
Kind required. String.
The API set for this API account. It can be
· a single API, for example: Face API, Vision API, Speech API.
a bundle of APIs: Face + Speech, Vision + Emotion, etc.
sku.name Required.
The pricing tier/plan of this API. Could be:
F0 - Free
B0 - Basic
S0 - Standard
P0 - Premium
Name | Datatype | Description |
---|---|---|
etag | string | Resource Etag. |
identity | object | Identity for the resource. |
kind | string | The Kind of the resource. |
location | string | The geo-location where the resource lives |
properties | object | Properties of Cognitive Services account. |
sku | object | The resource model definition representing SKU |
systemData | object | Metadata pertaining to creation and last modification of the resource. |
tags | object | Resource tags. |
The resource provider should return 200 (OK) to indicate that the operation completed successfully. For other errors (e.g. internal errors) use the appropriate HTTP error code.
The nextLink field is expected to point to the URL the client should use to fetch the next page (per server side paging). This matches the OData guidelines for paged responses here. If a resource provider does not support paging, it should return the same body (JSON object with "value" property) but omit nextLink entirely (or set to null, not empty string) for future compatibility.
The nextLink should be implemented using following query parameters:
· skipToken: opaque token that allows the resource provider to skip resources already enumerated. This value is defined and returned by the RP after first request via nextLink.
· top: the optional client query parameter which defines the maximum number of records to be returned by the server.
Implementation details:
· NextLink may include all the query parameters (specifically OData $filter) used by the client in the first query.
· Server may return less records than requested with nextLink. Returning zero records with NextLink is an acceptable response.
Clients must fetch records until the nextLink is not returned back / null. Clients should never rely on number of returned records to determinate if pagination is completed.
Name | Datatype | Description |
---|---|---|
etag | string | Resource Etag. |
identity | object | Identity for the resource. |
kind | string | The Kind of the resource. |
location | string | The geo-location where the resource lives |
properties | object | Properties of Cognitive Services account. |
sku | object | The resource model definition representing SKU |
systemData | object | Metadata pertaining to creation and last modification of the resource. |
tags | object | Resource tags. |
The resource provider should return 200 (OK) to indicate that the operation completed successfully. For other errors (e.g. internal errors) use the appropriate HTTP error code.
The nextLink field is expected to point to the URL the client should use to fetch the next page (per server side paging). This matches the OData guidelines for paged responses. If a resource provider does not support paging, it should return the same body but leave nextLink empty for future compatibility.
For a detailed explanation of each field in the response body, please refer to the request body description in the PUT resource section.
Name | Datatype | Description |
---|---|---|
etag | string | Resource Etag. |
identity | object | Identity for the resource. |
kind | string | The Kind of the resource. |
location | string | The geo-location where the resource lives |
properties | object | Properties of Cognitive Services account. |
sku | object | The resource model definition representing SKU |
systemData | object | Metadata pertaining to creation and last modification of the resource. |
tags | object | Resource tags. |
Methods
The following methods are available for this resource:
Name | Accessible by | Required Params | Optional Params | Description |
---|---|---|---|---|
get | select | resourceGroupName , accountName , subscriptionId | Returns a Cognitive Services account specified by the parameters. | |
list_by_resource_group | select | resourceGroupName , subscriptionId | Returns all the resources of a particular type belonging to a resource group | |
list | select | subscriptionId | Returns all the resources of a particular type belonging to a subscription. | |
create | insert | resourceGroupName , accountName , subscriptionId | Create Cognitive Services Account. Accounts is a resource group wide resource type. It holds the keys for developer to access intelligent APIs. It's also the resource type for billing. | |
update | update | resourceGroupName , accountName , subscriptionId | Updates a Cognitive Services account | |
delete | delete | resourceGroupName , accountName , subscriptionId | Deletes a Cognitive Services account from the resource group. | |
regenerate_key | exec | resourceGroupName , accountName , subscriptionId , keyName | Regenerates the specified account key for the specified Cognitive Services account. |
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 |
---|---|---|
accountName | string | The name of Cognitive Services account. |
resourceGroupName | string | The name of the resource group. The name is case insensitive. |
subscriptionId | string | The ID of the target subscription. |
SELECT
examples
- get
- list_by_resource_group
- list
Returns a Cognitive Services account specified by the parameters.
SELECT
etag,
identity,
kind,
location,
properties,
sku,
systemData,
tags
FROM azure.cognitive_services.accounts
WHERE resourceGroupName = '{{ resourceGroupName }}' -- required
AND accountName = '{{ accountName }}' -- required
AND subscriptionId = '{{ subscriptionId }}' -- required
;
Returns all the resources of a particular type belonging to a resource group
SELECT
etag,
identity,
kind,
location,
properties,
sku,
systemData,
tags
FROM azure.cognitive_services.accounts
WHERE resourceGroupName = '{{ resourceGroupName }}' -- required
AND subscriptionId = '{{ subscriptionId }}' -- required
;
Returns all the resources of a particular type belonging to a subscription.
SELECT
etag,
identity,
kind,
location,
properties,
sku,
systemData,
tags
FROM azure.cognitive_services.accounts
WHERE subscriptionId = '{{ subscriptionId }}' -- required
;
INSERT
examples
- create
- Manifest
Create Cognitive Services Account. Accounts is a resource group wide resource type. It holds the keys for developer to access intelligent APIs. It's also the resource type for billing.
INSERT INTO azure.cognitive_services.accounts (
data__kind,
data__sku,
data__identity,
data__tags,
data__location,
data__properties,
resourceGroupName,
accountName,
subscriptionId
)
SELECT
'{{ kind }}',
'{{ sku }}',
'{{ identity }}',
'{{ tags }}',
'{{ location }}',
'{{ properties }}',
'{{ resourceGroupName }}',
'{{ accountName }}',
'{{ subscriptionId }}'
RETURNING
etag,
identity,
kind,
location,
properties,
sku,
systemData,
tags
;
# Description fields are for documentation purposes
- name: accounts
props:
- name: resourceGroupName
value: string
description: Required parameter for the accounts resource.
- name: accountName
value: string
description: Required parameter for the accounts resource.
- name: subscriptionId
value: string
description: Required parameter for the accounts resource.
- name: kind
value: string
description: |
The Kind of the resource.
- name: sku
value: object
description: |
The resource model definition representing SKU
- name: identity
value: object
description: |
Identity for the resource.
- name: tags
value: object
description: |
Resource tags.
- name: location
value: string
description: |
The geo-location where the resource lives
- name: properties
value: object
description: |
Properties of Cognitive Services account.
UPDATE
examples
- update
Updates a Cognitive Services account
UPDATE azure.cognitive_services.accounts
SET
data__kind = '{{ kind }}',
data__sku = '{{ sku }}',
data__identity = '{{ identity }}',
data__tags = '{{ tags }}',
data__location = '{{ location }}',
data__properties = '{{ properties }}'
WHERE
resourceGroupName = '{{ resourceGroupName }}' --required
AND accountName = '{{ accountName }}' --required
AND subscriptionId = '{{ subscriptionId }}' --required
RETURNING
etag,
identity,
kind,
location,
properties,
sku,
systemData,
tags;
DELETE
examples
- delete
Deletes a Cognitive Services account from the resource group.
DELETE FROM azure.cognitive_services.accounts
WHERE resourceGroupName = '{{ resourceGroupName }}' --required
AND accountName = '{{ accountName }}' --required
AND subscriptionId = '{{ subscriptionId }}' --required
;
Lifecycle Methods
- regenerate_key
Regenerates the specified account key for the specified Cognitive Services account.
EXEC azure.cognitive_services.accounts.regenerate_key
@resourceGroupName='{{ resourceGroupName }}' --required,
@accountName='{{ accountName }}' --required,
@subscriptionId='{{ subscriptionId }}' --required
@@json=
'{
"keyName": "{{ keyName }}"
}'
;