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

api_version – Version of the API to be used with the client request. Current version is 2017-04-18. Constant value: “2017-04-18”.

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 Cognitive Services account.
  • 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 Cognitive Services 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:

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 Cognitive Services 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

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 Cognitive Services 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:

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 Cognitive Services 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:

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 Cognitive Services account.
  • 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 Cognitive Services account.
  • sku (Sku) – Gets or sets the SKU of the resource.
  • 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

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

Bases: object

AccountsOperations operations.

Parameters:
  • client – Client for service requests.
  • config – Configuration of service client.
  • serializer – An object model serializer.
  • deserializer – An objec model deserializer.
Variables:

api_version – Version of the API to be used with the client request. Current version is 2017-04-18. Constant value: “2017-04-18”.

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

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

Bases: object

Operations operations.

Parameters:
  • client – Client for service requests.
  • config – Configuration of service client.
  • serializer – An object model serializer.
  • deserializer – An objec model deserializer.
Variables:

api_version – Version of the API to be used with the client request. Current version is 2017-04-18. Constant value: “2017-04-18”.

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

Lists all the available Cognitive Services account operations.

Parameters:
Return type:

OperationEntityPaged

Raises:

CloudError

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

Bases: object

CheckSkuAvailabilityOperations operations.

Parameters:
  • client – Client for service requests.
  • config – Configuration of service client.
  • serializer – An object model serializer.
  • deserializer – An objec model deserializer.
Variables:

api_version – Version of the API to be used with the client request. Current version is 2017-04-18. Constant value: “2017-04-18”.

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

Check available SKUs.

Parameters:
  • skus (list of Sku) – The SKU of the resource.
  • kind (str or Kind) – The Kind of the resource. Possible values include: ‘Academic’, ‘Bing.Autosuggest’, ‘Bing.Search’, ‘Bing.Speech’, ‘Bing.SpellCheck’, ‘ComputerVision’, ‘ContentModerator’, ‘CustomSpeech’, ‘Emotion’, ‘Face’, ‘LUIS’, ‘Recommendations’, ‘SpeakerRecognition’, ‘Speech’, ‘SpeechTranslation’, ‘TextAnalytics’, ‘TextTranslation’, ‘WebLM’
  • type (str) – The Type of the resource.
  • 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:

CheckSkuAvailabilityResultList

Return type:

ClientRawResponse if raw=true

Raises:

CloudError