azure.mgmt.cognitiveservices.operations module

class azure.mgmt.cognitiveservices.operations.CognitiveServicesAccountsOperations(client, config, serializer, deserializer)[source]

Bases: object

CognitiveServicesAccountsOperations operations.

Parameters:
  • client – Client for service requests.
  • config – Configuration of service client.
  • serializer – An object model serializer.
  • deserializer – An objec model deserializer.
create(resource_group_name, account_name, parameters, custom_headers=None, raw=False, **operation_config)[source]

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.

Parameters:
  • resource_group_name (str) – The name of the resource group within the user’s subscription.
  • account_name (str) – The name of the cognitive services account within the specified resource group. Cognitive Services account names must be between 3 and 24 characters in length and use numbers and lower-case letters only.
  • parameters (CognitiveServicesAccountCreateParameters) – The parameters to provide for the created account.
  • custom_headers (dict) – headers that will be added to the request
  • raw (bool) – returns the direct response alongside the deserialized response
  • operation_configOperation configuration overrides.
Return type:

CognitiveServicesAccount

Return type:

ClientRawResponse if raw=true

Raises:

ErrorException

delete(resource_group_name, account_name, custom_headers=None, raw=False, **operation_config)[source]

Deletes a Cognitive Services account from the resource group. .

Parameters:
  • resource_group_name (str) – The name of the resource group within the user’s subscription.
  • account_name (str) – The name of the cognitive services account within the specified resource group. Cognitive Services account names must be between 3 and 24 characters in length and use numbers and lower-case letters only.
  • custom_headers (dict) – headers that will be added to the request
  • raw (bool) – returns the direct response alongside the deserialized response
  • operation_configOperation configuration overrides.
Return type:

None

Return type:

ClientRawResponse if raw=true

Raises:

ErrorException

get_properties(resource_group_name, account_name, custom_headers=None, raw=False, **operation_config)[source]

Returns a Cognitive Services account specified by the parameters.

Parameters:
  • resource_group_name (str) – The name of the resource group within the user’s subscription.
  • account_name (str) – The name of the cognitive services account within the specified resource group. Cognitive Services account names must be between 3 and 24 characters in length and use numbers and lower-case letters only.
  • custom_headers (dict) – headers that will be added to the request
  • raw (bool) – returns the direct response alongside the deserialized response
  • operation_configOperation configuration overrides.
Return type:

CognitiveServicesAccount

Return type:

ClientRawResponse if raw=true

Raises:

ErrorException

list(custom_headers=None, raw=False, **operation_config)[source]

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

Parameters:
Return type:

CognitiveServicesAccountPaged

Raises:

ErrorException

list_by_resource_group(resource_group_name, custom_headers=None, raw=False, **operation_config)[source]

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

Parameters:
  • resource_group_name (str) – The name of the resource group within the user’s subscription.
  • custom_headers (dict) – headers that will be added to the request
  • raw (bool) – returns the direct response alongside the deserialized response
  • operation_configOperation configuration overrides.
Return type:

CognitiveServicesAccountPaged

Raises:

ErrorException

list_keys(resource_group_name, account_name, custom_headers=None, raw=False, **operation_config)[source]

Lists the account keys for the specified Cognitive Services account.

Parameters:
  • resource_group_name (str) – The name of the resource group within the user’s subscription.
  • account_name (str) – The name of the cognitive services account within the specified resource group. Congitive Services account names must be between 3 and 24 characters in length and use numbers and lower-case letters only.
  • custom_headers (dict) – headers that will be added to the request
  • raw (bool) – returns the direct response alongside the deserialized response
  • operation_configOperation configuration overrides.
Return type:

CognitiveServicesAccountKeys

Return type:

ClientRawResponse if raw=true

Raises:

ErrorException

list_skus(resource_group_name, account_name, custom_headers=None, raw=False, **operation_config)[source]

List available SKUs for the requested Cognitive Services account.

Parameters:
  • resource_group_name (str) – The name of the resource group within the user’s subscription.
  • account_name (str) – The name of the cognitive services account within the specified resource group. Cognitive Services account names must be between 3 and 24 characters in length and use numbers and lower-case letters only.
  • custom_headers (dict) – headers that will be added to the request
  • raw (bool) – returns the direct response alongside the deserialized response
  • operation_configOperation configuration overrides.
Return type:

CognitiveServicesAccountEnumerateSkusResult

Return type:

ClientRawResponse if raw=true

Raises:

ErrorException

regenerate_key(resource_group_name, account_name, key_name=None, custom_headers=None, raw=False, **operation_config)[source]

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

Parameters:
  • resource_group_name (str) – The name of the resource group within the user’s subscription.
  • account_name (str) – The name of the cognitive services account within the specified resource group. Cognitive Services account names must be between 3 and 24 characters in length and use numbers and lower-case letters only.
  • key_name (str or KeyName) – key name to generate (Key1|Key2). Possible values include: ‘Key1’, ‘Key2’
  • custom_headers (dict) – headers that will be added to the request
  • raw (bool) – returns the direct response alongside the deserialized response
  • operation_configOperation configuration overrides.
Return type:

CognitiveServicesAccountKeys

Return type:

ClientRawResponse if raw=true

Raises:

ErrorException

update(resource_group_name, account_name, sku=None, tags=None, custom_headers=None, raw=False, **operation_config)[source]

Updates a Cognitive Services account.

Parameters:
  • resource_group_name (str) – The name of the resource group within the user’s subscription.
  • account_name (str) – The name of the cognitive services account within the specified resource group. Cognitive Services account names must be between 3 and 24 characters in length and use numbers and lower-case letters only.
  • sku (Sku) –
  • tags (dict) – Gets or sets a list of key value pairs that describe the resource. These tags can be used in viewing and grouping this resource (across resource groups). A maximum of 15 tags can be provided for a resource. Each tag must have a key no greater than 128 characters and value no greater than 256 characters.
  • custom_headers (dict) – headers that will be added to the request
  • raw (bool) – returns the direct response alongside the deserialized response
  • operation_configOperation configuration overrides.
Return type:

CognitiveServicesAccount

Return type:

ClientRawResponse if raw=true

Raises:

ErrorException