Important: This documentation covers Yarn 1 (Classic).
For Yarn 2+ docs and migration guide, see yarnpkg.com.

Package detail

@azure/arm-cognitiveservices

Azure35.3kMIT7.6.0TypeScript support: included

A generated SDK for CognitiveServicesManagementClient.

node, azure, typescript, browser, isomorphic

readme

Azure SDK for JavaScript

Packages Dependencies DependencyGraph

This repository is for the Azure SDK for JavaScript (Node.js & Browser). It contains libraries for the breadth of Azure services. Management libraries are packages that you would use to provision and manage Azure resources. Client libraries are packages that you would use to consume these resources and interact with them.

Getting started

A few helpful resources to get started are:

  • The readme for each package contains code samples and package information. This readme can be found in the corresponding package folder under the folder of the service of your choice in the /sdk folder of this repository. The same readme file can be found on the landing page for the package in npm.
  • The API reference documentation of the latest versions of these packages, can be found at our public developer docs.
  • The API reference documentation of older versions, can be found in our versioned developer docs.

Each service might have a number of libraries available from each of the following categories:

NOTE: Some of these packages have beta versions. If you need to ensure your code is ready for production, use one of the stable, non-beta packages.

Client

Given an Azure resource already exists, you would use the client libraries to consume it and interact with it. Most of these libraries follow the Azure SDK Design Guidelines for JavaScript & TypeScript and share a number of core functionalities such as retries, logging, transport protocols, authentication protocols, etc. Others will be updated in the near future to follow the guidelines as well.

To get a list of all client libraries that follow the new guidelines, please visit our Azure SDK releases page.

Management

Management libraries enable you to provision and manage Azure resources via the Azure Resource Manager i.e. ARM. You can recognize these libraries by @azure/arm- in their package names. These are purely auto-generated based on the swagger files that represent the APIs for resource management.

Newer versions of these libraries follow the Azure SDK Design Guidelines for TypeScript. These new versions provide a number of core capabilities that are shared amongst all Azure SDKs, including the intuitive Azure Identity library, an HTTP Pipeline with custom policies, error-handling, distributed tracing, and much more. A few helpful resources to get started with these are:

NOTE: If you are experiencing authentication issues with the management libraries after upgrading certain packages, it's possible that you upgraded to the new versions of SDK without changing the authentication code, please refer to the migration guide mentioned above for proper instructions.

Need help?

Data Collection

The software may collect information about you and your use of the software and send it to Microsoft. Microsoft may use this information to provide services and improve our products and services. You may turn off the telemetry as described below. You can learn more about data collection and use in the help documentation and Microsoft’s privacy statement. For more information on the data collected by the Azure SDK, please visit the Telemetry Guidelines page.

Telemetry Configuration

Telemetry collection is on by default.

To opt out, you can disable telemetry at client construction. Create a custom HTTP pipeline policy that removes the user agent string, and then pass that policy into the additionalPolicies option during client creation. This will disable telemetry for all methods in the client. Do this for every new client.

The example below uses the @azure/keyvault-secrets package. In your code, you can replace @azure/keyvault-secrets with the package you are using.

import { SecretClient } from "@azure/keyvault-secrets";
import { ManagedIdentityCredential } from "@azure/identity";

function removeUserAgentPolicy() {
  return {
    name: "removeUserAgentPolicy",
    sendRequest(request, next) {
      request.headers.delete("User-Agent");
      return next(request);
    },
  };
}

/**
 * Creates a SecretClient with managed identity authentication and empty user agent
 * @param keyvaultUri - The URI of the Azure Key Vault
 * @returns configured SecretClient instance
 */
function createSecretClientWithManagedIdentity(
  keyvaultUri: string
): SecretClient {
  // Create ManagedIdentityCredential for managed identity authentication
  const credential = new ManagedIdentityCredential();

  // Create secret client with managed identity and empty user agent
  const secretClient = new SecretClient(keyvaultUri, credential, {
    additionalPolicies: [
      {
        position: "perCall",
        policy: removeUserAgentPolicy(),
      },
    ],
  });

  return secretClient;
}

// Usage example
const keyvaultUri = "https://your-keyvault-name.vault.azure.net";
const secretClient = createSecretClientWithManagedIdentity(keyvaultUri);

// Now you can use the secret client to perform operations
// For example:
// const secretValue = await secretClient.getSecret("your-secret-name");

Community

Try our community resources.

Reporting security issues and security bugs

Security issues and bugs should be reported privately, via email, to the Microsoft Security Response Center (MSRC) secure@microsoft.com. You should receive a response within 24 hours. If for some reason you do not, please follow up via email to ensure we received your original message. Further information, including the MSRC PGP key, can be found in the Security TechCenter.

Contributing

For details on contributing to this repository, see the contributing guide.

This project welcomes contributions and suggestions. Most contributions require you to agree to a Contributor License Agreement (CLA) declaring that you have the right to, and actually do, grant us the rights to use your contribution. For details, visit https://cla.microsoft.com.

When you submit a pull request, a CLA-bot will automatically determine whether you need to provide a CLA and decorate the PR appropriately (e.g., label, comment). Simply follow the instructions provided by the bot. You will only need to do this once across all repositories using our CLA.

This project has adopted the Microsoft Open Source Code of Conduct. For more information, see the Code of Conduct FAQ or contact opencode@microsoft.com with any additional questions or comments.

changelog

Release History

7.6.0 (2024-12-20)

Features Added

  • Added operation group DefenderForAISettings
  • Added operation group EncryptionScopes
  • Added operation group LocationBasedModelCapacities
  • Added operation group ModelCapacities
  • Added operation group NetworkSecurityPerimeterConfigurations
  • Added operation group RaiBlocklistItems
  • Added operation group RaiBlocklists
  • Added operation group RaiContentFilters
  • Added operation group RaiPolicies
  • Added operation Deployments.beginUpdate
  • Added operation Deployments.beginUpdateAndWait
  • Added operation Deployments.listSkus
  • Added Interface BillingMeterInfo
  • Added Interface CalculateModelCapacityOptionalParams
  • Added Interface CalculateModelCapacityParameter
  • Added Interface CalculateModelCapacityResult
  • Added Interface CalculateModelCapacityResultEstimatedCapacity
  • Added Interface CustomBlocklistConfig
  • Added Interface DefenderForAISetting
  • Added Interface DefenderForAISettingResult
  • Added Interface DefenderForAISettingsCreateOrUpdateOptionalParams
  • Added Interface DefenderForAISettingsGetOptionalParams
  • Added Interface DefenderForAISettingsListNextOptionalParams
  • Added Interface DefenderForAISettingsListOptionalParams
  • Added Interface DefenderForAISettingsUpdateOptionalParams
  • Added Interface DeploymentCapacitySettings
  • Added Interface DeploymentSkuListResult
  • Added Interface DeploymentsListSkusNextOptionalParams
  • Added Interface DeploymentsListSkusOptionalParams
  • Added Interface DeploymentsUpdateHeaders
  • Added Interface DeploymentsUpdateOptionalParams
  • Added Interface EncryptionScope
  • Added Interface EncryptionScopeListResult
  • Added Interface EncryptionScopeProperties
  • Added Interface EncryptionScopesCreateOrUpdateOptionalParams
  • Added Interface EncryptionScopesDeleteHeaders
  • Added Interface EncryptionScopesDeleteOptionalParams
  • Added Interface EncryptionScopesGetOptionalParams
  • Added Interface EncryptionScopesListNextOptionalParams
  • Added Interface EncryptionScopesListOptionalParams
  • Added Interface LocationBasedModelCapacitiesListNextOptionalParams
  • Added Interface LocationBasedModelCapacitiesListOptionalParams
  • Added Interface ModelCapacitiesListNextOptionalParams
  • Added Interface ModelCapacitiesListOptionalParams
  • Added Interface ModelCapacityCalculatorWorkload
  • Added Interface ModelCapacityCalculatorWorkloadRequestParam
  • Added Interface ModelCapacityListResult
  • Added Interface ModelCapacityListResultValueItem
  • Added Interface ModelSkuCapacityProperties
  • Added Interface NetworkSecurityPerimeter
  • Added Interface NetworkSecurityPerimeterAccessRule
  • Added Interface NetworkSecurityPerimeterAccessRuleProperties
  • Added Interface NetworkSecurityPerimeterAccessRulePropertiesSubscriptionsItem
  • Added Interface NetworkSecurityPerimeterConfiguration
  • Added Interface NetworkSecurityPerimeterConfigurationAssociationInfo
  • Added Interface NetworkSecurityPerimeterConfigurationList
  • Added Interface NetworkSecurityPerimeterConfigurationProperties
  • Added Interface NetworkSecurityPerimeterConfigurationsGetOptionalParams
  • Added Interface NetworkSecurityPerimeterConfigurationsListNextOptionalParams
  • Added Interface NetworkSecurityPerimeterConfigurationsListOptionalParams
  • Added Interface NetworkSecurityPerimeterConfigurationsReconcileHeaders
  • Added Interface NetworkSecurityPerimeterConfigurationsReconcileOptionalParams
  • Added Interface NetworkSecurityPerimeterProfileInfo
  • Added Interface ProvisioningIssue
  • Added Interface ProvisioningIssueProperties
  • Added Interface RaiBlocklist
  • Added Interface RaiBlocklistConfig
  • Added Interface RaiBlocklistItem
  • Added Interface RaiBlocklistItemBulkRequest
  • Added Interface RaiBlocklistItemProperties
  • Added Interface RaiBlocklistItemsBatchAddOptionalParams
  • Added Interface RaiBlocklistItemsBatchDeleteOptionalParams
  • Added Interface RaiBlocklistItemsCreateOrUpdateOptionalParams
  • Added Interface RaiBlocklistItemsDeleteHeaders
  • Added Interface RaiBlocklistItemsDeleteOptionalParams
  • Added Interface RaiBlocklistItemsGetOptionalParams
  • Added Interface RaiBlocklistItemsListNextOptionalParams
  • Added Interface RaiBlocklistItemsListOptionalParams
  • Added Interface RaiBlockListItemsResult
  • Added Interface RaiBlocklistProperties
  • Added Interface RaiBlockListResult
  • Added Interface RaiBlocklistsCreateOrUpdateOptionalParams
  • Added Interface RaiBlocklistsDeleteHeaders
  • Added Interface RaiBlocklistsDeleteOptionalParams
  • Added Interface RaiBlocklistsGetOptionalParams
  • Added Interface RaiBlocklistsListNextOptionalParams
  • Added Interface RaiBlocklistsListOptionalParams
  • Added Interface RaiContentFilter
  • Added Interface RaiContentFilterListResult
  • Added Interface RaiContentFilterProperties
  • Added Interface RaiContentFiltersGetOptionalParams
  • Added Interface RaiContentFiltersListNextOptionalParams
  • Added Interface RaiContentFiltersListOptionalParams
  • Added Interface RaiMonitorConfig
  • Added Interface RaiPoliciesCreateOrUpdateOptionalParams
  • Added Interface RaiPoliciesDeleteHeaders
  • Added Interface RaiPoliciesDeleteOptionalParams
  • Added Interface RaiPoliciesGetOptionalParams
  • Added Interface RaiPoliciesListNextOptionalParams
  • Added Interface RaiPoliciesListOptionalParams
  • Added Interface RaiPolicy
  • Added Interface RaiPolicyContentFilter
  • Added Interface RaiPolicyListResult
  • Added Interface RaiPolicyProperties
  • Added Interface SkuResource
  • Added Interface UserOwnedAmlWorkspace
  • Added Type Alias ByPassSelection
  • Added Type Alias CalculateModelCapacityResponse
  • Added Type Alias ContentLevel
  • Added Type Alias DefenderForAISettingsCreateOrUpdateResponse
  • Added Type Alias DefenderForAISettingsGetResponse
  • Added Type Alias DefenderForAISettingsListNextResponse
  • Added Type Alias DefenderForAISettingsListResponse
  • Added Type Alias DefenderForAISettingState
  • Added Type Alias DefenderForAISettingsUpdateResponse
  • Added Type Alias DeploymentsListSkusNextResponse
  • Added Type Alias DeploymentsListSkusResponse
  • Added Type Alias DeploymentsUpdateResponse
  • Added Type Alias EncryptionScopeProvisioningState
  • Added Type Alias EncryptionScopesCreateOrUpdateResponse
  • Added Type Alias EncryptionScopesDeleteResponse
  • Added Type Alias EncryptionScopesGetResponse
  • Added Type Alias EncryptionScopesListNextResponse
  • Added Type Alias EncryptionScopesListResponse
  • Added Type Alias EncryptionScopeState
  • Added Type Alias LocationBasedModelCapacitiesListNextResponse
  • Added Type Alias LocationBasedModelCapacitiesListResponse
  • Added Type Alias ModelCapacitiesListNextResponse
  • Added Type Alias ModelCapacitiesListResponse
  • Added Type Alias NetworkSecurityPerimeterConfigurationsGetResponse
  • Added Type Alias NetworkSecurityPerimeterConfigurationsListNextResponse
  • Added Type Alias NetworkSecurityPerimeterConfigurationsListResponse
  • Added Type Alias NetworkSecurityPerimeterConfigurationsReconcileResponse
  • Added Type Alias NspAccessRuleDirection
  • Added Type Alias RaiBlocklistItemsBatchAddResponse
  • Added Type Alias RaiBlocklistItemsCreateOrUpdateResponse
  • Added Type Alias RaiBlocklistItemsDeleteResponse
  • Added Type Alias RaiBlocklistItemsGetResponse
  • Added Type Alias RaiBlocklistItemsListNextResponse
  • Added Type Alias RaiBlocklistItemsListResponse
  • Added Type Alias RaiBlocklistsCreateOrUpdateResponse
  • Added Type Alias RaiBlocklistsDeleteResponse
  • Added Type Alias RaiBlocklistsGetResponse
  • Added Type Alias RaiBlocklistsListNextResponse
  • Added Type Alias RaiBlocklistsListResponse
  • Added Type Alias RaiContentFiltersGetResponse
  • Added Type Alias RaiContentFiltersListNextResponse
  • Added Type Alias RaiContentFiltersListResponse
  • Added Type Alias RaiPoliciesCreateOrUpdateResponse
  • Added Type Alias RaiPoliciesDeleteResponse
  • Added Type Alias RaiPoliciesGetResponse
  • Added Type Alias RaiPoliciesListNextResponse
  • Added Type Alias RaiPoliciesListResponse
  • Added Type Alias RaiPolicyContentSource
  • Added Type Alias RaiPolicyMode
  • Added Type Alias RaiPolicyType
  • Interface AccountProperties has a new optional parameter amlWorkspace
  • Interface AccountProperties has a new optional parameter raiMonitorConfig
  • Interface CapacityConfig has a new optional parameter allowedValues
  • Interface CommitmentPlanAccountAssociation has a new optional parameter tags
  • Interface Deployment has a new optional parameter tags
  • Interface DeploymentModel has a new optional parameter publisher
  • Interface DeploymentModel has a new optional parameter sourceAccount
  • Interface DeploymentProperties has a new optional parameter capacitySettings
  • Interface DeploymentProperties has a new optional parameter currentCapacity
  • Interface DeploymentProperties has a new optional parameter dynamicThrottlingEnabled
  • Interface DeploymentProperties has a new optional parameter parentDeploymentName
  • Interface Model has a new optional parameter description
  • Interface ModelSku has a new optional parameter cost
  • Interface NetworkRuleSet has a new optional parameter bypass
  • Added Enum KnownByPassSelection
  • Added Enum KnownContentLevel
  • Added Enum KnownDefenderForAISettingState
  • Added Enum KnownEncryptionScopeProvisioningState
  • Added Enum KnownEncryptionScopeState
  • Added Enum KnownNspAccessRuleDirection
  • Added Enum KnownRaiPolicyContentSource
  • Added Enum KnownRaiPolicyMode
  • Added Enum KnownRaiPolicyType
  • Enum KnownModelLifecycleStatus has a new value Deprecated
  • Enum KnownModelLifecycleStatus has a new value Deprecating
  • Enum KnownModelLifecycleStatus has a new value Stable

7.5.0 (2023-07-06)

Features Added

  • Added operation group Models
  • Added operation group Usages
  • Added Interface AbusePenalty
  • Added Interface CapacityConfig
  • Added Interface Model
  • Added Interface ModelListResult
  • Added Interface ModelSku
  • Added Interface ModelsListNextOptionalParams
  • Added Interface ModelsListOptionalParams
  • Added Interface UsagesListNextOptionalParams
  • Added Interface UsagesListOptionalParams
  • Added Type Alias AbusePenaltyAction
  • Added Type Alias DeploymentModelVersionUpgradeOption
  • Added Type Alias ModelsListNextResponse
  • Added Type Alias ModelsListResponse
  • Added Type Alias UsagesListNextResponse
  • Added Type Alias UsagesListResponse
  • Interface AccountModel has a new optional parameter isDefaultVersion
  • Interface AccountModel has a new optional parameter skus
  • Interface AccountProperties has a new optional parameter abusePenalty
  • Interface CommitmentPlanProperties has a new optional parameter provisioningIssues
  • Interface Deployment has a new optional parameter sku
  • Interface DeploymentModel has a new optional parameter source
  • Interface DeploymentProperties has a new optional parameter rateLimits
  • Interface DeploymentProperties has a new optional parameter versionUpgradeOption
  • Interface UsageListResult has a new optional parameter nextLink
  • Added Enum KnownAbusePenaltyAction
  • Added Enum KnownDeploymentModelVersionUpgradeOption
  • Enum KnownDeploymentProvisioningState has a new value Canceled
  • Enum KnownDeploymentProvisioningState has a new value Disabled
  • Enum KnownHostingModel has a new value ProvisionedWeb

7.4.0 (2023-02-06)

Features Added

  • Added operation CommitmentPlans.beginCreateOrUpdateAssociation
  • Added operation CommitmentPlans.beginCreateOrUpdateAssociationAndWait
  • Added operation CommitmentPlans.beginCreateOrUpdatePlan
  • Added operation CommitmentPlans.beginCreateOrUpdatePlanAndWait
  • Added operation CommitmentPlans.beginDeleteAssociation
  • Added operation CommitmentPlans.beginDeleteAssociationAndWait
  • Added operation CommitmentPlans.beginDeletePlan
  • Added operation CommitmentPlans.beginDeletePlanAndWait
  • Added operation CommitmentPlans.beginUpdatePlan
  • Added operation CommitmentPlans.beginUpdatePlanAndWait
  • Added operation CommitmentPlans.getAssociation
  • Added operation CommitmentPlans.getPlan
  • Added operation CommitmentPlans.listAssociations
  • Added operation CommitmentPlans.listPlansByResourceGroup
  • Added operation CommitmentPlans.listPlansBySubscription
  • Added Interface CommitmentPlanAccountAssociation
  • Added Interface CommitmentPlanAccountAssociationListResult
  • Added Interface CommitmentPlanAssociation
  • Added Interface CommitmentPlansCreateOrUpdateAssociationOptionalParams
  • Added Interface CommitmentPlansCreateOrUpdatePlanOptionalParams
  • Added Interface CommitmentPlansDeleteAssociationHeaders
  • Added Interface CommitmentPlansDeleteAssociationOptionalParams
  • Added Interface CommitmentPlansDeletePlanHeaders
  • Added Interface CommitmentPlansDeletePlanOptionalParams
  • Added Interface CommitmentPlansGetAssociationOptionalParams
  • Added Interface CommitmentPlansGetPlanOptionalParams
  • Added Interface CommitmentPlansListAssociationsNextOptionalParams
  • Added Interface CommitmentPlansListAssociationsOptionalParams
  • Added Interface CommitmentPlansListPlansByResourceGroupNextOptionalParams
  • Added Interface CommitmentPlansListPlansByResourceGroupOptionalParams
  • Added Interface CommitmentPlansListPlansBySubscriptionNextOptionalParams
  • Added Interface CommitmentPlansListPlansBySubscriptionOptionalParams
  • Added Interface CommitmentPlansUpdatePlanHeaders
  • Added Interface CommitmentPlansUpdatePlanOptionalParams
  • Added Interface MultiRegionSettings
  • Added Interface PatchResourceTags
  • Added Interface PatchResourceTagsAndSku
  • Added Interface RegionSetting
  • Added Type Alias CommitmentPlanProvisioningState
  • Added Type Alias CommitmentPlansCreateOrUpdateAssociationResponse
  • Added Type Alias CommitmentPlansCreateOrUpdatePlanResponse
  • Added Type Alias CommitmentPlansGetAssociationResponse
  • Added Type Alias CommitmentPlansGetPlanResponse
  • Added Type Alias CommitmentPlansListAssociationsNextResponse
  • Added Type Alias CommitmentPlansListAssociationsResponse
  • Added Type Alias CommitmentPlansListPlansByResourceGroupNextResponse
  • Added Type Alias CommitmentPlansListPlansByResourceGroupResponse
  • Added Type Alias CommitmentPlansListPlansBySubscriptionNextResponse
  • Added Type Alias CommitmentPlansListPlansBySubscriptionResponse
  • Added Type Alias CommitmentPlansUpdatePlanResponse
  • Added Type Alias ModelLifecycleStatus
  • Added Type Alias RoutingMethods
  • Interface AccountModel has a new optional parameter finetuneCapabilities
  • Interface AccountModel has a new optional parameter lifecycleStatus
  • Interface AccountProperties has a new optional parameter commitmentPlanAssociations
  • Interface AccountProperties has a new optional parameter locations
  • Interface CommitmentPlan has a new optional parameter kind
  • Interface CommitmentPlan has a new optional parameter location
  • Interface CommitmentPlan has a new optional parameter sku
  • Interface CommitmentPlan has a new optional parameter tags
  • Interface CommitmentPlanProperties has a new optional parameter commitmentPlanGuid
  • Interface CommitmentPlanProperties has a new optional parameter provisioningState
  • Added Enum KnownCommitmentPlanProvisioningState
  • Added Enum KnownModelLifecycleStatus
  • Added Enum KnownRoutingMethods

7.3.1 (2022-11-21)

Features Added

  • Exposes getContinuationToken helper function to extract continuation token

Bugs Fixed

  • A series of small bug fixs relevant to authentication and apiVersion policy

7.3.0 (2022-10-31)

Features Added

  • Added Interface Account
  • Added Interface AccountModel
  • Added Interface AzureEntityResource
  • Added Interface CommitmentPlan
  • Added Interface Deployment
  • Added Interface PrivateEndpointConnection
  • Added Interface PrivateLinkResource
  • Added Interface ProxyResource
  • Interface DeploymentModel has a new optional parameter callRateLimit
  • Interface DeploymentProperties has a new optional parameter callRateLimit
  • Interface DeploymentProperties has a new optional parameter capabilities
  • Interface DeploymentProperties has a new optional parameter raiPolicyName

7.2.0 (2022-06-10)

Features Added

  • Enum KnownDeploymentScaleType has a new value Standard

7.1.0 (2022-04-06)

Features Added

  • Added operation Accounts.listModels
  • Added Interface AccountModelListResult
  • Added Interface AccountsListModelsNextOptionalParams
  • Added Interface AccountsListModelsOptionalParams
  • Added Interface ModelDeprecationInfo
  • Added Type Alias AccountModel
  • Added Type Alias AccountsListModelsNextResponse
  • Added Type Alias AccountsListModelsResponse
  • Interface AccountProperties has a new optional parameter deletionDate
  • Interface AccountProperties has a new optional parameter dynamicThrottlingEnabled
  • Interface AccountProperties has a new optional parameter scheduledPurgeDate
  • Interface DeploymentScaleSettings has a new optional parameter activeCapacity

7.0.0 (2021-12-20)

The package of @azure/arm-cognitiveservices is using our next generation design principles since version 7.0.0, which contains breaking changes.

To understand the detail of the change, please refer to Changelog.

To migrate the existing applications to the latest version, please refer to Migration Guide.

To learn more, please refer to our documentation Quick Start.