Skip to main content

accounts

Creates, updates, deletes, gets or lists an accounts resource.

Overview

Nameaccounts
TypeResource
Idazure.cognitive_services.accounts

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.
abusePenaltyobjectThe abuse penalty.
allowProjectManagementbooleanSpecifies whether this resource support project management as child resources, used as containers for access management, data isolation and cost in AI Foundry.
allowedFqdnListarray:vartype allowed_fqdn_list: list[str]
amlWorkspaceobjectThe user owned AML account properties.
apiPropertiesobjectThe api properties for special APIs.
associatedProjectsarraySpecifies the projects, by project name, that are associated with this resource.
callRateLimitobjectThe call rate limit Cognitive Services account.
capabilitiesarrayGets the capabilities of the cognitive services account. Each item indicates the capability of a specific feature. The values are read-only and for reference only.
commitmentPlanAssociationsarrayThe commitment plan associations of Cognitive Services account.
customSubDomainNamestringOptional subdomain name used for token-based authentication.
dateCreatedstringGets the date of cognitive services account creation.
defaultProjectstringSpecifies the project, by project name, that is targeted when data plane endpoints are called without a project parameter.
deletionDatestringThe deletion date, only available for deleted account.
disableLocalAuthboolean:vartype disable_local_auth: bool
dynamicThrottlingEnabledbooleanThe flag to enable dynamic throttling.
encryptionobjectThe encryption properties for this resource.
endpointstringEndpoint of the created account.
endpointsobjectDictionary of .
etagstringResource Etag.
foundryAutoUpgradeobjectRepresents the foundry auto-upgrade configuration for a Cognitive Services account.
identityobjectIdentity for the resource.
internalIdstringThe internal identifier (deprecated, do not use this property).
isMigratedbooleanIf the resource is migrated from an existing key.
kindstringThe kind (type) of cognitive service account.
locationstringThe geo-location where the resource lives.
locationsobjectThe multiregion settings of Cognitive Services account.
migrationTokenstringResource migration token.
networkAclsobjectA collection of rules governing the accessibility from specific network locations.
networkInjectionsarray:vartype network_injections: list[~azure.mgmt.cognitiveservices.models.NetworkInjection]
privateEndpointConnectionsarrayThe private endpoint connection associated with the Cognitive Services account.
provisioningStatestringGets the status of the cognitive services account at the time the operation was called. Known values are: "Accepted", "Creating", "Deleting", "Moving", "Failed", "Succeeded", "Canceled", and "ResolvingDNS". (Accepted, Creating, Deleting, Moving, Failed, Succeeded, Canceled, ResolvingDNS)
publicNetworkAccessstringWhether or not public endpoint access is allowed for this account. Known values are: "Enabled" and "Disabled". (Enabled, Disabled)
quotaLimitobject:vartype quota_limit: ~azure.mgmt.cognitiveservices.models.QuotaLimit
raiMonitorConfigobjectCognitive Services Rai Monitor Config.
restoreboolean:vartype restore: bool
restrictOutboundNetworkAccessboolean:vartype restrict_outbound_network_access: bool
scheduledPurgeDatestringThe scheduled purge date, only available for deleted account.
skuobjectThe resource model definition representing SKU.
skuChangeInfoobjectSku change info of account.
storedCompletionsDisabledbooleanThe flag to disable stored completions.
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".
userOwnedStoragearrayThe storage accounts for this resource.

Methods

The following methods are available for this resource:

NameAccessible byRequired ParamsOptional ParamsDescription
getselectresource_group_name, account_name, subscription_idReturns a Cognitive Services account specified by the parameters.
list_by_resource_groupselectresource_group_name, subscription_idReturns all the resources of a particular type belonging to a resource group.
listselectsubscription_idReturns all the resources of a particular type belonging to a subscription.
createinsertresource_group_name, account_name, subscription_idCreate 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.
updateupdateresource_group_name, account_name, subscription_idUpdates a Cognitive Services account.
deletedeleteresource_group_name, account_name, subscription_idDeletes a Cognitive Services account from the resource group.
list_keysexecresource_group_name, account_name, subscription_idLists the account keys for the specified Cognitive Services account.
list_skusexecresource_group_name, account_name, subscription_idList available SKUs for the requested Cognitive Services account.
list_usagesexecresource_group_name, account_name, subscription_id$filterGet usages for the requested Cognitive Services account.
list_modelsexecresource_group_name, account_name, subscription_idList available Models for the requested Cognitive Services account.
regenerate_keyexecresource_group_name, account_name, subscription_id, keyNameRegenerates the specified account key for the specified Cognitive Services account.
evaluate_deployment_policiesexecresource_group_name, account_name, subscription_id, deploymentsEvaluate Azure Policy compliance for a set of hypothetical deployments without creating them.

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.
resource_group_namestringThe name of the resource group. The name is case insensitive. Required.
subscription_idstring
$filterstringAn OData filter expression that describes a subset of usages to return. The supported parameter is name.value (name of the metric, can have an or of multiple names). Default value is None.

SELECT examples

Returns a Cognitive Services account specified by the parameters.

SELECT
id,
name,
abusePenalty,
allowProjectManagement,
allowedFqdnList,
amlWorkspace,
apiProperties,
associatedProjects,
callRateLimit,
capabilities,
commitmentPlanAssociations,
customSubDomainName,
dateCreated,
defaultProject,
deletionDate,
disableLocalAuth,
dynamicThrottlingEnabled,
encryption,
endpoint,
endpoints,
etag,
foundryAutoUpgrade,
identity,
internalId,
isMigrated,
kind,
location,
locations,
migrationToken,
networkAcls,
networkInjections,
privateEndpointConnections,
provisioningState,
publicNetworkAccess,
quotaLimit,
raiMonitorConfig,
restore,
restrictOutboundNetworkAccess,
scheduledPurgeDate,
sku,
skuChangeInfo,
storedCompletionsDisabled,
systemData,
tags,
type,
userOwnedStorage
FROM azure.cognitive_services.accounts
WHERE resource_group_name = '{{ resource_group_name }}' -- required
AND account_name = '{{ account_name }}' -- required
AND subscription_id = '{{ subscription_id }}' -- required
;

INSERT examples

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 (
properties,
tags,
location,
kind,
sku,
identity,
resource_group_name,
account_name,
subscription_id
)
SELECT
'{{ properties }}',
'{{ tags }}',
'{{ location }}',
'{{ kind }}',
'{{ sku }}',
'{{ identity }}',
'{{ resource_group_name }}',
'{{ account_name }}',
'{{ subscription_id }}'
RETURNING
id,
name,
etag,
identity,
kind,
location,
properties,
sku,
systemData,
tags,
type
;

UPDATE examples

Updates a Cognitive Services account.

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

DELETE examples

Deletes a Cognitive Services account from the resource group.

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

Lifecycle Methods

Lists the account keys for the specified Cognitive Services account.

EXEC azure.cognitive_services.accounts.list_keys 
@resource_group_name='{{ resource_group_name }}' --required,
@account_name='{{ account_name }}' --required,
@subscription_id='{{ subscription_id }}' --required
;