From 81281fa62df3b4fc1f4f44cf02045e21bf498601 Mon Sep 17 00:00:00 2001 From: Jose Manuel Heredia Hidalgo Date: Tue, 8 Sep 2020 18:37:49 +0000 Subject: [PATCH 1/4] Update AnomalyDetector README --- .../ai-anomaly-detector/README.md | 22 +++++++++++-------- 1 file changed, 13 insertions(+), 9 deletions(-) diff --git a/sdk/anomalydetector/ai-anomaly-detector/README.md b/sdk/anomalydetector/ai-anomaly-detector/README.md index 9173e3d1e8be..7ec768d5c25c 100644 --- a/sdk/anomalydetector/ai-anomaly-detector/README.md +++ b/sdk/anomalydetector/ai-anomaly-detector/README.md @@ -5,12 +5,16 @@ [Source code](https://github.com/Azure/azure-sdk-for-js/blob/master/sdk/anomalydetector/ai-anomaly-detector/) | [Package (NPM)](https://www.npmjs.com/package/@azure/ai-anomaly-detector) | [API reference documentation](https://aka.ms/azsdk/net/docs/ref/anomalydetector) | -[Product documentation](https://docs.microsoft.com/en-us/azure/cognitive-services/anomaly-detector/) |[Samples](https://github.com/Azure/azure-sdk-for-js/tree/master/sdk/anomalydetector/ai-anomaly-detector/samples) +[Product documentation](https://docs.microsoft.com/azure/cognitive-services/anomaly-detector/) | [Samples](https://github.com/Azure/azure-sdk-for-js/tree/master/sdk/anomalydetector/ai-anomaly-detector/samples) ## Key concepts -Coming soon (#10865) +The `AnomalyDetectorClient` provides methods for anomaly detection: + +- `detectEntireSeries` - Detects anomalies on an entire data set +- `detectLastPoint` - Detects anomalies in the latest data point +- `detectChangePoint` - Evaluates change point score of every series point ## Getting started @@ -20,8 +24,8 @@ Coming soon (#10865) ### Prerequisites -- An [Azure subscription][azure_sub]. -- An existing [Cognitive Services][cognitive_resource] or Anomaly Detector resource. If you need to create the resource, you can use the [Azure Portal][azure_portal] or [Azure CLI][azure_cli]. +- An [Azure subscription](https://azure.microsoft.com/free/). +- An existing Cognitive Services or Anomaly Detector resource. If you use the Azure CLI, replace `` and `` with your own unique names: @@ -41,7 +45,7 @@ npm install @azure/ai-anomaly-detector To create a client object to access the Anomaly Detector API, you will need the `endpoint` of your Anomaly Detector resource and a `credential`. The Anomaly Detector client can use either Azure Active Directory credentials or an API key credential to authenticate. -You can find the endpoint for your Anomaly Detector resource either in the [Azure Portal][azure_portal] or by using the [Azure CLI][azure_cli] snippet below: +You can find the endpoint for your Anomaly Detector resource either in the Azure Portal or by using the Azure CLI snippet below: ```bash az cognitiveservices account show --name --resource-group --query "endpoint" @@ -49,7 +53,7 @@ az cognitiveservices account show --name --resource-group < #### Using an API Key -Use the [Azure Portal][azure_portal] to browse to your Anomaly Detector resource and retrieve an API key, or use the [Azure CLI][azure_cli] snippet below: +Use the Azure Portal to browse to your Anomaly Detector resource and retrieve an API key, or use the Azure CLI snippet below: **Note:** Sometimes the API key is referred to as a "subscription key" or "subscription API key." @@ -67,14 +71,14 @@ const client = new AnomalyDetectorClient("", new AzureKeyCredential("< #### Using an Azure Active Directory Credential -Client API key authentication is used in most of the examples, but you can also authenticate with Azure Active Directory using the [Azure Identity library][azure_identity]. To use the [DefaultAzureCredential][defaultazurecredential] provider shown below, +Client API key authentication is used in most of the examples, but you can also authenticate with Azure Active Directory using the [Azure Identity library]. To use the DefaultAzureCredential provider shown below, or other credential providers provided with the Azure SDK, please install the `@azure/identity` package: ```bash npm install @azure/identity ``` -You will also need to [register a new AAD application][register_aad_app] and grant access to Anomaly Detector by assigning the `"Cognitive Services User"` role to your service principal (note: other roles such as `"Owner"` will not grant the necessary permissions, only `"Cognitive Services User"` will suffice to run the examples and the sample code). +You will also need to register a new AAD application and grant access to Anomaly Detector by assigning the `"Cognitive Services User"` role to your service principal (note: other roles such as `"Owner"` will not grant the necessary permissions, only `"Cognitive Services User"` will suffice to run the examples and the sample code). Set the values of the client ID, tenant ID, and client secret of the AAD application as environment variables: `AZURE_CLIENT_ID`, `AZURE_TENANT_ID`, `AZURE_CLIENT_SECRET`. @@ -87,7 +91,7 @@ const client = new AnomalyDetectorClient("", new DefaultAzureCredentia ## Examples -Coming soon (#10865) +Samples can be found [here](https://github.com/Azure/azure-sdk-for-js/tree/master/sdk/anomalydetector/ai-anomaly-detector/samples) ## Troubleshooting From 50fde735416d93ac41344960f94b4cb21f59f375 Mon Sep 17 00:00:00 2001 From: Jose Manuel Heredia Hidalgo Date: Tue, 8 Sep 2020 18:45:56 +0000 Subject: [PATCH 2/4] Update pto beta --- sdk/anomalydetector/ai-anomaly-detector/package.json | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/sdk/anomalydetector/ai-anomaly-detector/package.json b/sdk/anomalydetector/ai-anomaly-detector/package.json index 59c6e9048bab..0a5085f3a86b 100644 --- a/sdk/anomalydetector/ai-anomaly-detector/package.json +++ b/sdk/anomalydetector/ai-anomaly-detector/package.json @@ -1,6 +1,6 @@ { "name": "@azure/ai-anomaly-detector", - "version": "3.0.0-preview.2", + "version": "3.0.0-beta.2", "description": "An isomorphic client library for the Azure Anomaly Detector service.", "sdk-type": "client", "main": "dist/index.js", From 60ae945db125d40bde4e5dec7fc7ea08e1ab981b Mon Sep 17 00:00:00 2001 From: Jose Manuel Heredia Hidalgo Date: Tue, 8 Sep 2020 18:49:17 +0000 Subject: [PATCH 3/4] Update changelog --- sdk/anomalydetector/ai-anomaly-detector/CHANGELOG.md | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/sdk/anomalydetector/ai-anomaly-detector/CHANGELOG.md b/sdk/anomalydetector/ai-anomaly-detector/CHANGELOG.md index c4d90d152ed9..6728e54955a9 100644 --- a/sdk/anomalydetector/ai-anomaly-detector/CHANGELOG.md +++ b/sdk/anomalydetector/ai-anomaly-detector/CHANGELOG.md @@ -1,7 +1,8 @@ # Release History -## 3.0.0-preview.2 (Unreleased) +## 3.0.0-beta.2 (Unreleased) +- Fix missing types in package [#10916](https://github.com/Azure/azure-sdk-for-js/pull/10916) ## 3.0.0-preview.1 (2020-08-27) From c622f405f08bd576b6c621a11c63b1952ea55906 Mon Sep 17 00:00:00 2001 From: Jose Manuel Heredia Hidalgo Date: Thu, 17 Sep 2020 22:42:39 +0000 Subject: [PATCH 4/4] Address PR comments --- sdk/anomalydetector/ai-anomaly-detector/CHANGELOG.md | 2 +- sdk/anomalydetector/ai-anomaly-detector/README.md | 6 +++--- .../src/generated/generatedClientContext.ts | 2 +- 3 files changed, 5 insertions(+), 5 deletions(-) diff --git a/sdk/anomalydetector/ai-anomaly-detector/CHANGELOG.md b/sdk/anomalydetector/ai-anomaly-detector/CHANGELOG.md index 6728e54955a9..39efcf7dd8aa 100644 --- a/sdk/anomalydetector/ai-anomaly-detector/CHANGELOG.md +++ b/sdk/anomalydetector/ai-anomaly-detector/CHANGELOG.md @@ -1,6 +1,6 @@ # Release History -## 3.0.0-beta.2 (Unreleased) +## 3.0.0-beta.2 (2020-09-17) - Fix missing types in package [#10916](https://github.com/Azure/azure-sdk-for-js/pull/10916) diff --git a/sdk/anomalydetector/ai-anomaly-detector/README.md b/sdk/anomalydetector/ai-anomaly-detector/README.md index 7ec768d5c25c..b8c988643af3 100644 --- a/sdk/anomalydetector/ai-anomaly-detector/README.md +++ b/sdk/anomalydetector/ai-anomaly-detector/README.md @@ -25,7 +25,7 @@ The `AnomalyDetectorClient` provides methods for anomaly detection: ### Prerequisites - An [Azure subscription](https://azure.microsoft.com/free/). -- An existing Cognitive Services or Anomaly Detector resource. +- An existing Anomaly Detector resource. If you use the Azure CLI, replace `` and `` with your own unique names: @@ -45,7 +45,7 @@ npm install @azure/ai-anomaly-detector To create a client object to access the Anomaly Detector API, you will need the `endpoint` of your Anomaly Detector resource and a `credential`. The Anomaly Detector client can use either Azure Active Directory credentials or an API key credential to authenticate. -You can find the endpoint for your Anomaly Detector resource either in the Azure Portal or by using the Azure CLI snippet below: +You can find the endpoint for your Anomaly Detector resource in the Azure Portal by clicking `Keys and Endpoint` under Resource Management in the menu or by using the Azure CLI snippet below: ```bash az cognitiveservices account show --name --resource-group --query "endpoint" @@ -53,7 +53,7 @@ az cognitiveservices account show --name --resource-group < #### Using an API Key -Use the Azure Portal to browse to your Anomaly Detector resource and retrieve an API key, or use the Azure CLI snippet below: +Use the Azure Portal to browse to your Anomaly Detector resource and retrieve an API key by clicking `Keys and Endpoint` under Resource Management, or use the Azure CLI snippet below: **Note:** Sometimes the API key is referred to as a "subscription key" or "subscription API key." diff --git a/sdk/anomalydetector/ai-anomaly-detector/src/generated/generatedClientContext.ts b/sdk/anomalydetector/ai-anomaly-detector/src/generated/generatedClientContext.ts index 9c8416d5dd9a..372fed39de45 100644 --- a/sdk/anomalydetector/ai-anomaly-detector/src/generated/generatedClientContext.ts +++ b/sdk/anomalydetector/ai-anomaly-detector/src/generated/generatedClientContext.ts @@ -10,7 +10,7 @@ import * as coreHttp from "@azure/core-http"; import { GeneratedClientOptionalParams } from "./models"; const packageName = "@azure/ai-form-recognizer"; -const packageVersion = "3.0.0-preview.2"; +const packageVersion = "3.0.0-beta.2"; export class GeneratedClientContext extends coreHttp.ServiceClient { endpoint: string;