@datafire/azure_cognitiveservices
Client library for CognitiveServicesManagementClient
Installation and Usage
npm install --save @datafire/azure_cognitiveservices
let azure_cognitiveservices = require('@datafire/azure_cognitiveservices').create({
access_token: "",
refresh_token: "",
client_id: "",
client_secret: "",
redirect_uri: ""
});
.then(data => {
console.log(data);
});
Description
Cognitive Services Management Client
Actions
Operations_List
Lists all the available Cognitive Services account operations.
azure_cognitiveservices.Operations_List({
"api-version": ""
}, context)
Input
- input
object
- api-version required
string
: Version of the API to be used with the client request. Current version is 2017-04-18
- api-version required
Output
- output OperationEntityListResult
Accounts_List
Returns all the resources of a particular type belonging to a subscription.
azure_cognitiveservices.Accounts_List({
"api-version": "",
"subscriptionId": ""
}, context)
Input
- input
object
- api-version required
string
: Version of the API to be used with the client request. Current version is 2017-04-18 - subscriptionId required
string
: Azure Subscription ID.
- api-version required
Output
CheckDomainAvailability
Check whether a domain is available.
azure_cognitiveservices.CheckDomainAvailability({
"subscriptionId": "",
"api-version": "",
"parameters": null
}, context)
Input
- input
object
- subscriptionId required
string
: Azure Subscription ID. - api-version required
string
: Version of the API to be used with the client request. Current version is 2017-04-18 - parameters required CheckDomainAvailabilityParameter
- subscriptionId required
Output
CheckSkuAvailability
Check available SKUs.
azure_cognitiveservices.CheckSkuAvailability({
"subscriptionId": "",
"api-version": "",
"location": "",
"parameters": null
}, context)
Input
- input
object
- subscriptionId required
string
: Azure Subscription ID. - api-version required
string
: Version of the API to be used with the client request. Current version is 2017-04-18 - location required
string
: Resource location. - parameters required CheckSkuAvailabilityParameter
- subscriptionId required
Output
ResourceSkus_List
Gets the list of Microsoft.CognitiveServices SKUs available for your Subscription.
azure_cognitiveservices.ResourceSkus_List({
"api-version": "",
"subscriptionId": ""
}, context)
Input
- input
object
- api-version required
string
: Version of the API to be used with the client request. Current version is 2017-04-18 - subscriptionId required
string
: Azure Subscription ID.
- api-version required
Output
- output ResourceSkusResult
Accounts_ListByResourceGroup
Returns all the resources of a particular type belonging to a resource group
azure_cognitiveservices.Accounts_ListByResourceGroup({
"resourceGroupName": "",
"subscriptionId": "",
"api-version": ""
}, context)
Input
- input
object
- resourceGroupName required
string
: The name of the resource group within the user's subscription. - subscriptionId required
string
: Azure Subscription ID. - api-version required
string
: Version of the API to be used with the client request. Current version is 2017-04-18
- resourceGroupName required
Output
Accounts_Delete
Deletes a Cognitive Services account from the resource group.
azure_cognitiveservices.Accounts_Delete({
"resourceGroupName": "",
"accountName": "",
"api-version": "",
"subscriptionId": ""
}, context)
Input
- input
object
- resourceGroupName required
string
: The name of the resource group within the user's subscription. - accountName required
string
: The name of Cognitive Services account. - api-version required
string
: Version of the API to be used with the client request. Current version is 2017-04-18 - subscriptionId required
string
: Azure Subscription ID.
- resourceGroupName required
Output
Output schema unknown
Accounts_GetProperties
Returns a Cognitive Services account specified by the parameters.
azure_cognitiveservices.Accounts_GetProperties({
"resourceGroupName": "",
"accountName": "",
"api-version": "",
"subscriptionId": ""
}, context)
Input
- input
object
- resourceGroupName required
string
: The name of the resource group within the user's subscription. - accountName required
string
: The name of Cognitive Services account. - api-version required
string
: Version of the API to be used with the client request. Current version is 2017-04-18 - subscriptionId required
string
: Azure Subscription ID.
- resourceGroupName required
Output
- output CognitiveServicesAccount
Accounts_Update
Updates a Cognitive Services account
azure_cognitiveservices.Accounts_Update({
"resourceGroupName": "",
"accountName": "",
"account": {},
"api-version": "",
"subscriptionId": ""
}, context)
Input
- input
object
- resourceGroupName required
string
: The name of the resource group within the user's subscription. - accountName required
string
: The name of Cognitive Services account. - account required CognitiveServicesAccount
- api-version required
string
: Version of the API to be used with the client request. Current version is 2017-04-18 - subscriptionId required
string
: Azure Subscription ID.
- resourceGroupName required
Output
- output CognitiveServicesAccount
Accounts_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.
azure_cognitiveservices.Accounts_Create({
"resourceGroupName": "",
"accountName": "",
"account": {},
"api-version": "",
"subscriptionId": ""
}, context)
Input
- input
object
- resourceGroupName required
string
: The name of the resource group within the user's subscription. - accountName required
string
: The name of Cognitive Services account. - account required CognitiveServicesAccount
- api-version required
string
: Version of the API to be used with the client request. Current version is 2017-04-18 - subscriptionId required
string
: Azure Subscription ID.
- resourceGroupName required
Output
- output CognitiveServicesAccount
Accounts_ListKeys
Lists the account keys for the specified Cognitive Services account.
azure_cognitiveservices.Accounts_ListKeys({
"resourceGroupName": "",
"accountName": "",
"api-version": "",
"subscriptionId": ""
}, context)
Input
- input
object
- resourceGroupName required
string
: The name of the resource group within the user's subscription. - accountName required
string
: The name of Cognitive Services account. - api-version required
string
: Version of the API to be used with the client request. Current version is 2017-04-18 - subscriptionId required
string
: Azure Subscription ID.
- resourceGroupName required
Output
- output CognitiveServicesAccountKeys
Accounts_RegenerateKey
Regenerates the specified account key for the specified Cognitive Services account.
azure_cognitiveservices.Accounts_RegenerateKey({
"resourceGroupName": "",
"accountName": "",
"parameters": null,
"api-version": "",
"subscriptionId": ""
}, context)
Input
- input
object
- resourceGroupName required
string
: The name of the resource group within the user's subscription. - accountName required
string
: The name of Cognitive Services account. - parameters required RegenerateKeyParameters
- api-version required
string
: Version of the API to be used with the client request. Current version is 2017-04-18 - subscriptionId required
string
: Azure Subscription ID.
- resourceGroupName required
Output
- output CognitiveServicesAccountKeys
Accounts_ListSkus
List available SKUs for the requested Cognitive Services account
azure_cognitiveservices.Accounts_ListSkus({
"resourceGroupName": "",
"accountName": "",
"api-version": "",
"subscriptionId": ""
}, context)
Input
- input
object
- resourceGroupName required
string
: The name of the resource group within the user's subscription. - accountName required
string
: The name of Cognitive Services account. - api-version required
string
: Version of the API to be used with the client request. Current version is 2017-04-18 - subscriptionId required
string
: Azure Subscription ID.
- resourceGroupName required
Output
Accounts_GetUsages
Get usages for the requested Cognitive Services account
azure_cognitiveservices.Accounts_GetUsages({
"resourceGroupName": "",
"accountName": "",
"api-version": "",
"subscriptionId": ""
}, context)
Input
- input
object
- resourceGroupName required
string
: The name of the resource group within the user's subscription. - accountName required
string
: The name of Cognitive Services account. - api-version required
string
: Version of the API to be used with the client request. Current version is 2017-04-18 - subscriptionId required
string
: Azure Subscription ID. - $filter
string
: 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).
- resourceGroupName required
Output
- output UsagesResult
Definitions
CheckDomainAvailabilityParameter
- CheckDomainAvailabilityParameter
object
: Check Domain availability parameter.- subdomainName required
string
: The subdomain name to use. - type required
string
: The Type of the resource.
- subdomainName required
CheckDomainAvailabilityResult
- CheckDomainAvailabilityResult
object
: Check Domain availability result.- isSubdomainAvailable
boolean
: Indicates the given SKU is available or not. - reason
string
: Reason why the SKU is not available. - subdomainName
string
: The subdomain name to use. - type
string
: The Type of the resource.
- isSubdomainAvailable
CheckSkuAvailabilityParameter
- CheckSkuAvailabilityParameter
object
: Check SKU availability parameter.- kind required CognitiveServicesAccountKind
- skus required
array
: The SKU of the resource.- items SkuName
- type required
string
: The Type of the resource.
CheckSkuAvailabilityResult
- CheckSkuAvailabilityResult
object
: Check SKU availability result.- kind CognitiveServicesAccountKind
- message
string
: Additional error message. - reason
string
: Reason why the SKU is not available. - skuAvailable
boolean
: Indicates the given SKU is available or not. - skuName SkuName
- type
string
: The Type of the resource.
CheckSkuAvailabilityResultList
- CheckSkuAvailabilityResultList
object
: Check SKU availability result list.- value
array
: Check SKU availability result list.
- value
CognitiveServicesAccount
- CognitiveServicesAccount
object
: Cognitive Services Account is an Azure resource representing the provisioned account, its type, location and SKU.- etag
string
: Entity Tag - id
string
: The id of the created account - kind CognitiveServicesAccountKind
- location
string
: The location of the resource - name
string
: The name of the created account - properties CognitiveServicesAccountProperties
- sku Sku
- tags
object
: 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. - type
string
: Resource type
- etag
CognitiveServicesAccountApiProperties
- CognitiveServicesAccountApiProperties
object
: The api properties for special APIs.- eventHubConnectionString
string
: (Personalization Only) The flag to enable statistics of Bing Search. - qnaRuntimeEndpoint
string
: (QnAMaker Only) The runtime endpoint of QnAMaker. - statisticsEnabled
boolean
: (Bing Search Only) The flag to enable statistics of Bing Search. - storageAccountConnectionString
string
: (Personalization Only) The storage account connection string.
- eventHubConnectionString
CognitiveServicesAccountEnumerateSkusResult
- CognitiveServicesAccountEnumerateSkusResult
object
: The list of cognitive services accounts operation response.- value
array
: Gets the list of Cognitive Services accounts and their properties.
- value
CognitiveServicesAccountKeys
- CognitiveServicesAccountKeys
object
: The access keys for the cognitive services account.- key1
string
: Gets the value of key 1. - key2
string
: Gets the value of key 2.
- key1
CognitiveServicesAccountKind
- CognitiveServicesAccountKind
string
: Required. Indicates the type of cognitive service account.
CognitiveServicesAccountListResult
- CognitiveServicesAccountListResult
object
: The list of cognitive services accounts operation response.- nextLink
string
: The link used to get the next page of accounts. - value
array
: Gets the list of Cognitive Services accounts and their properties.- items CognitiveServicesAccount
- nextLink
CognitiveServicesAccountProperties
- CognitiveServicesAccountProperties
object
: Properties of Cognitive Services account.- apiProperties CognitiveServicesAccountApiProperties
- customSubDomainName
string
: Optional subdomain name used for token-based authentication. - endpoint
string
: Endpoint of the created account. - internalId
string
: The internal identifier. - networkAcls NetworkRuleSet
- provisioningState
string
(values: Creating, ResolvingDNS, Moving, Deleting, Succeeded, Failed): Gets the status of the cognitive services account at the time the operation was called.
CognitiveServicesResourceAndSku
- CognitiveServicesResourceAndSku
object
: Cognitive Services resource type and SKU.- resourceType
string
: Resource Namespace and Type - sku Sku
- resourceType
Error
- Error
object
: Cognitive Services error object.- error ErrorBody
ErrorBody
- ErrorBody
object
: Cognitive Services error body.- code required
string
: error code - message required
string
: error message
- code required
IpRule
- IpRule
object
: A rule governing the accessibility from a specific ip address or ip range.- value required
string
: An IPv4 address range in CIDR notation, such as '124.56.78.91' (simple IP address) or '124.56.78.0/24' (all addresses that start with 124.56.78).
- value required
MetricName
- MetricName
object
: A metric name.- localizedValue
string
: The friendly name of the metric. - value
string
: The name of the metric.
- localizedValue
NetworkRuleSet
- NetworkRuleSet
object
: A set of rules governing the network accessibility.- defaultAction
string
(values: Allow, Deny): The default action when no rule from ipRules and from virtualNetworkRules match. This is only used after the bypass property has been evaluated. - ipRules
array
: The list of IP address rules.- items IpRule
- virtualNetworkRules
array
: The list of virtual network rules.- items VirtualNetworkRule
- defaultAction
OperationDisplayInfo
- OperationDisplayInfo
object
: The operation supported by Cognitive Services.- description
string
: The description of the operation. - operation
string
: The action that users can perform, based on their permission level. - provider
string
: Service provider: Microsoft Cognitive Services. - resource
string
: Resource on which the operation is performed.
- description
OperationEntity
- OperationEntity
object
: The operation supported by Cognitive Services.- display OperationDisplayInfo
- name
string
: Operation name: {provider}/{resource}/{operation}. - origin
string
: The origin of the operation. - properties
object
: Additional properties.
OperationEntityListResult
- OperationEntityListResult
object
: The list of cognitive services accounts operation response.- nextLink
string
: The link used to get the next page of operations. - value
array
: The list of operations.- items OperationEntity
- nextLink
RegenerateKeyParameters
- RegenerateKeyParameters
object
: Regenerate key parameters.- keyName required
string
(values: Key1, Key2): key name to generate (Key1|Key2)
- keyName required
ResourceSku
- ResourceSku
object
: Describes an available Cognitive Services SKU.- kind
string
: The Kind of resources that are supported in this SKU. - locations
array
: The set of locations that the SKU is available.- items
string
- items
- name
string
: The name of SKU. - resourceType
string
: The type of resource the SKU applies to. - restrictions
array
: The restrictions because of which SKU cannot be used. This is empty if there are no restrictions.- items ResourceSkuRestrictions
- tier
string
: Specifies the tier of Cognitive Services account.
- kind
ResourceSkuRestrictionInfo
- ResourceSkuRestrictionInfo
object
- locations
array
: Locations where the SKU is restricted- items
string
- items
- zones
array
: List of availability zones where the SKU is restricted.- items
string
- items
- locations
ResourceSkuRestrictions
- ResourceSkuRestrictions
object
: Describes restrictions of a SKU.- reasonCode
string
(values: QuotaId, NotAvailableForSubscription): The reason for restriction. - restrictionInfo ResourceSkuRestrictionInfo
- type
string
(values: Location, Zone): The type of restrictions. - values
array
: The value of restrictions. If the restriction type is set to location. This would be different locations where the SKU is restricted.- items
string
- items
- reasonCode
ResourceSkusResult
- ResourceSkusResult
object
: The Get Skus operation response.- nextLink
string
: The uri to fetch the next page of Skus. - value required
array
: The list of skus available for the subscription.- items ResourceSku
- nextLink
Sku
- Sku
object
: The SKU of the cognitive services account.- name required SkuName
- tier
string
(values: Free, Standard, Premium): Gets the sku tier. This is based on the SKU name.
SkuName
- SkuName
string
: The name of SKU.
UnitType
- UnitType
string
(values: Count, Bytes, Seconds, Percent, CountPerSecond, BytesPerSecond, Milliseconds): The unit of the metric.
Usage
- Usage
object
: The usage data for a usage request.- currentValue
number
: Current value for this metric. - limit
number
: Maximum value for this metric. - name MetricName
- nextResetTime
string
: Next reset time for current quota. - quotaPeriod
string
: The quota period used to summarize the usage values. - status
string
(values: Included, Blocked, InOverage, Unknown): Cognitive Services account quota usage status. - unit UnitType
- currentValue
UsagesResult
- UsagesResult
object
: The response to a list usage request.- value
array
: The list of usages for Cognitive Service account.- items Usage
- value
VirtualNetworkRule
- VirtualNetworkRule
object
: A rule governing the accessibility from a specific virtual network.- id required
string
: Full resource id of a vnet subnet, such as '/subscriptions/subid/resourceGroups/rg1/providers/Microsoft.Network/virtualNetworks/test-vnet/subnets/subnet1'. - ignoreMissingVnetServiceEndpoint
boolean
: Ignore missing vnet service endpoint or not. - state
string
: Gets the state of virtual network rule.
- id required