Share via


AccountsOperations Class

Warning

DO NOT instantiate this class directly.

Instead, you should access the following operations through

CognitiveServicesManagementClient's

<xref:accounts> attribute.

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

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

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.

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

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

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.

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) -> ItemPaged[Account]

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) -> ItemPaged[Account]

Parameters

Name Description
resource_group_name
Required
str

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

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.

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) -> ItemPaged[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.

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.

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

Default value: None

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.

Returns

Type Description

ApiKeys or the result of cls(response)

Exceptions

Type Description

Attributes

models

models = <module 'azure.mgmt.cognitiveservices.models' from 'C:\\ToolCache\\Python\\3.11.9\\x64\\Lib\\site-packages\\py2docfx\\venv\\venv86\\Lib\\site-packages\\azure\\mgmt\\cognitiveservices\\models\\__init__.py'>