AccountsOperations Class

Warning

DO NOT instantiate this class directly.

Instead, you should access the following operations through

CognitiveServicesManagementClient's

<xref:accounts> attribute.

Inheritance
builtins.object
AccountsOperations

Constructor

AccountsOperations(*args, **kwargs)

Methods

begin_create

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.

begin_delete

Deletes a Cognitive Services account from the resource group.

begin_update

Updates a Cognitive Services account.

get

Returns a Cognitive Services account specified by the parameters.

list

Returns all the resources of a particular type belonging to a subscription.

list_by_resource_group

Returns all the resources of a particular type belonging to a resource group.

list_keys

Lists the account keys for the specified Cognitive Services account.

list_models

List available Models for the requested Cognitive Services account.

list_skus

List available SKUs for the requested Cognitive Services account.

list_usages

Get usages for the requested Cognitive Services account.

regenerate_key

Regenerates the specified account key for the specified Cognitive Services account.

begin_create

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.

begin_create(resource_group_name: str, account_name: str, account: _models.Account, *, content_type: str = 'application/json', **kwargs: Any) -> LROPoller[_models.Account]

Parameters

Name Description
resource_group_name
Required
str

The name of the resource group. The name is case insensitive. Required.

account_name
Required
str

The name of Cognitive Services account. Required.

account
Required
Account or IO

The parameters to provide for the created account. Is either a Account type or a IO type. Required.

Keyword-Only Parameters

Name Description
content_type
str

Body Parameter content-type. Known values are: 'application/json'. Default value is None.

cls

A custom type or function that will be passed the direct response

continuation_token
str

A continuation token to restart a poller from a saved state.

polling

By default, your polling method will be ARMPolling. Pass in False for this operation to not poll, or pass in your own initialized polling object for a personal polling strategy.

polling_interval
int

Default waiting time between two polls for LRO operations if no Retry-After header is present.

Returns

Type Description

An instance of LROPoller that returns either Account or the result of cls(response)

Exceptions

Type Description

begin_delete

Deletes a Cognitive Services account from the resource group.

begin_delete(resource_group_name: str, account_name: str, **kwargs: Any) -> LROPoller[None]

Parameters

Name Description
resource_group_name
Required
str

The name of the resource group. The name is case insensitive. Required.

account_name
Required
str

The name of Cognitive Services account. Required.

Keyword-Only Parameters

Name Description
cls

A custom type or function that will be passed the direct response

continuation_token
str

A continuation token to restart a poller from a saved state.

polling

By default, your polling method will be ARMPolling. Pass in False for this operation to not poll, or pass in your own initialized polling object for a personal polling strategy.

polling_interval
int

Default waiting time between two polls for LRO operations if no Retry-After header is present.

Returns

Type Description

An instance of LROPoller that returns either None or the result of cls(response)

Exceptions

Type Description

begin_update

Updates a Cognitive Services account.

begin_update(resource_group_name: str, account_name: str, account: _models.Account, *, content_type: str = 'application/json', **kwargs: Any) -> LROPoller[_models.Account]

Parameters

Name Description
resource_group_name
Required
str

The name of the resource group. The name is case insensitive. Required.

account_name
Required
str

The name of Cognitive Services account. Required.

account
Required
Account or IO

The parameters to provide for the created account. Is either a Account type or a IO type. Required.

Keyword-Only Parameters

Name Description
content_type
str

Body Parameter content-type. Known values are: 'application/json'. Default value is None.

cls

A custom type or function that will be passed the direct response

continuation_token
str

A continuation token to restart a poller from a saved state.

polling

By default, your polling method will be ARMPolling. Pass in False for this operation to not poll, or pass in your own initialized polling object for a personal polling strategy.

polling_interval
int

Default waiting time between two polls for LRO operations if no Retry-After header is present.

Returns

Type Description

An instance of LROPoller that returns either Account or the result of cls(response)

Exceptions

Type Description

get

Returns a Cognitive Services account specified by the parameters.

get(resource_group_name: str, account_name: str, **kwargs: Any) -> Account

Parameters

Name Description
resource_group_name
Required
str

The name of the resource group. The name is case insensitive. Required.

account_name
Required
str

The name of Cognitive Services account. Required.

Keyword-Only Parameters

Name Description
cls

A custom type or function that will be passed the direct response

Returns

Type Description

Account or the result of cls(response)

Exceptions

Type Description

list

Returns all the resources of a particular type belonging to a subscription.

list(**kwargs: Any) -> Iterable[Account]

Keyword-Only Parameters

Name Description
cls

A custom type or function that will be passed the direct response

Returns

Type Description

An iterator like instance of either Account or the result of cls(response)

Exceptions

Type Description

list_by_resource_group

Returns all the resources of a particular type belonging to a resource group.

list_by_resource_group(resource_group_name: str, **kwargs: Any) -> Iterable[Account]

Parameters

Name Description
resource_group_name
Required
str

The name of the resource group. The name is case insensitive. Required.

Keyword-Only Parameters

Name Description
cls

A custom type or function that will be passed the direct response

Returns

Type Description

An iterator like instance of either Account or the result of cls(response)

Exceptions

Type Description

list_keys

Lists the account keys for the specified Cognitive Services account.

list_keys(resource_group_name: str, account_name: str, **kwargs: Any) -> ApiKeys

Parameters

Name Description
resource_group_name
Required
str

The name of the resource group. The name is case insensitive. Required.

account_name
Required
str

The name of Cognitive Services account. Required.

Keyword-Only Parameters

Name Description
cls

A custom type or function that will be passed the direct response

Returns

Type Description

ApiKeys or the result of cls(response)

Exceptions

Type Description

list_models

List available Models for the requested Cognitive Services account.

list_models(resource_group_name: str, account_name: str, **kwargs: Any) -> Iterable[AccountModel]

Parameters

Name Description
resource_group_name
Required
str

The name of the resource group. The name is case insensitive. Required.

account_name
Required
str

The name of Cognitive Services account. Required.

Keyword-Only Parameters

Name Description
cls

A custom type or function that will be passed the direct response

Returns

Type Description

An iterator like instance of either AccountModel or the result of cls(response)

Exceptions

Type Description

list_skus

List available SKUs for the requested Cognitive Services account.

list_skus(resource_group_name: str, account_name: str, **kwargs: Any) -> AccountSkuListResult

Parameters

Name Description
resource_group_name
Required
str

The name of the resource group. The name is case insensitive. Required.

account_name
Required
str

The name of Cognitive Services account. Required.

Keyword-Only Parameters

Name Description
cls

A custom type or function that will be passed the direct response

Returns

Type Description

AccountSkuListResult or the result of cls(response)

Exceptions

Type Description

list_usages

Get usages for the requested Cognitive Services account.

list_usages(resource_group_name: str, account_name: str, filter: str | None = None, **kwargs: Any) -> UsageListResult

Parameters

Name Description
resource_group_name
Required
str

The name of the resource group. The name is case insensitive. Required.

account_name
Required
str

The name of Cognitive Services account. Required.

filter
Required
str

An 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.

Keyword-Only Parameters

Name Description
cls

A custom type or function that will be passed the direct response

Returns

Type Description

UsageListResult or the result of cls(response)

Exceptions

Type Description

regenerate_key

Regenerates the specified account key for the specified Cognitive Services account.

regenerate_key(resource_group_name: str, account_name: str, key_name: str | KeyName, **kwargs: Any) -> ApiKeys

Parameters

Name Description
resource_group_name
Required
str

The name of the resource group. The name is case insensitive. Required.

account_name
Required
str

The name of Cognitive Services account. Required.

key_name
Required

key name to generate (Key1|Key2). Known values are: "Key1" and "Key2". Required.

Keyword-Only Parameters

Name Description
cls

A custom type or function that will be passed the direct response

Returns

Type Description

ApiKeys or the result of cls(response)

Exceptions

Type Description

Attributes

models

models = <module 'azure.mgmt.cognitiveservices.models' from 'C:\\hostedtoolcache\\windows\\Python\\3.11.9\\x64\\Lib\\site-packages\\azure\\mgmt\\cognitiveservices\\models\\__init__.py'>