azure.mgmt.cognitiveservices.operations module

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

Returns

CognitiveServicesAccount or ClientRawResponse if raw=true

Return type

CognitiveServicesAccount or ClientRawResponse

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.

Returns

None or ClientRawResponse if raw=true

Return type

None or ClientRawResponse

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.

Returns

CognitiveServicesAccount or ClientRawResponse if raw=true

Return type

CognitiveServicesAccount or ClientRawResponse

Raises

ErrorException

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

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

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

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

Returns

UsagesResult or ClientRawResponse if raw=true

Return type

UsagesResult or ClientRawResponse

Raises

ErrorException

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

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

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

Returns

An iterator like instance of CognitiveServicesAccount

Return type

CognitiveServicesAccountPaged[CognitiveServicesAccount]

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.

Returns

An iterator like instance of CognitiveServicesAccount

Return type

CognitiveServicesAccountPaged[CognitiveServicesAccount]

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.

Returns

CognitiveServicesAccountKeys or ClientRawResponse if raw=true

Return type

CognitiveServicesAccountKeys or ClientRawResponse

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.

Returns

CognitiveServicesAccountEnumerateSkusResult or ClientRawResponse if raw=true

Return type

CognitiveServicesAccountEnumerateSkusResult or ClientRawResponse

Raises

ErrorException

models = <module 'azure.mgmt.cognitiveservices.models' from '/usr/lib/python3.7/site-packages/azure/mgmt/cognitiveservices/models/__init__.py'>
regenerate_key(resource_group_name, account_name, key_name, 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.

Returns

CognitiveServicesAccountKeys or ClientRawResponse if raw=true

Return type

CognitiveServicesAccountKeys or ClientRawResponse

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[str, str]) – 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.

Returns

CognitiveServicesAccount or ClientRawResponse if raw=true

Return type

CognitiveServicesAccount or ClientRawResponse

Raises

ErrorException

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

Bases: object

ResourceSkusOperations operations.

Parameters
  • client – Client for service requests.

  • config – Configuration of service client.

  • serializer – An object model serializer.

  • deserializer – An object 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]

Gets the list of Microsoft.CognitiveServices SKUs available for your Subscription.

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

Returns

An iterator like instance of ResourceSku

Return type

ResourceSkuPaged[ResourceSku]

Raises

CloudError

models = <module 'azure.mgmt.cognitiveservices.models' from '/usr/lib/python3.7/site-packages/azure/mgmt/cognitiveservices/models/__init__.py'>
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 object 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
  • 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.

Returns

An iterator like instance of OperationEntity

Return type

OperationEntityPaged[OperationEntity]

Raises

CloudError

models = <module 'azure.mgmt.cognitiveservices.models' from '/usr/lib/python3.7/site-packages/azure/mgmt/cognitiveservices/models/__init__.py'>
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 object 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(location, skus, kind, type, custom_headers=None, raw=False, **operation_config)[source]

Check available SKUs.

Parameters
  • location (str) – Resource location.

  • skus (list[str or SkuName]) – The SKU of the resource.

  • kind (str or Kind) – The Kind of the resource. Possible values include: ‘Bing.Autosuggest.v7’, ‘Bing.CustomSearch’, ‘Bing.Search.v7’, ‘Bing.Speech’, ‘Bing.SpellCheck.v7’, ‘ComputerVision’, ‘ContentModerator’, ‘CustomSpeech’, ‘CustomVision.Prediction’, ‘CustomVision.Training’, ‘Emotion’, ‘Face’, ‘LUIS’, ‘QnAMaker’, ‘SpeakerRecognition’, ‘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.

Returns

CheckSkuAvailabilityResultList or ClientRawResponse if raw=true

Return type

CheckSkuAvailabilityResultList or ClientRawResponse

Raises

CloudError

models = <module 'azure.mgmt.cognitiveservices.models' from '/usr/lib/python3.7/site-packages/azure/mgmt/cognitiveservices/models/__init__.py'>