Azure.AI.AnomalyDetector 3.0.0-preview.5

The ID prefix of this package has been reserved for one of the owners of this package by NuGet.org. Prefix Reserved
This is a prerelease version of Azure.AI.AnomalyDetector.
There is a newer prerelease version of this package available.
See the version list below for details.
dotnet add package Azure.AI.AnomalyDetector --version 3.0.0-preview.5
NuGet\Install-Package Azure.AI.AnomalyDetector -Version 3.0.0-preview.5
This command is intended to be used within the Package Manager Console in Visual Studio, as it uses the NuGet module's version of Install-Package.
<PackageReference Include="Azure.AI.AnomalyDetector" Version="3.0.0-preview.5" />
For projects that support PackageReference, copy this XML node into the project file to reference the package.
paket add Azure.AI.AnomalyDetector --version 3.0.0-preview.5
#r "nuget: Azure.AI.AnomalyDetector, 3.0.0-preview.5"
#r directive can be used in F# Interactive and Polyglot Notebooks. Copy this into the interactive tool or source code of the script to reference the package.
// Install Azure.AI.AnomalyDetector as a Cake Addin
#addin nuget:?package=Azure.AI.AnomalyDetector&version=3.0.0-preview.5&prerelease

// Install Azure.AI.AnomalyDetector as a Cake Tool
#tool nuget:?package=Azure.AI.AnomalyDetector&version=3.0.0-preview.5&prerelease

Azure Cognitive Services Anomaly Detector client library for .NET

Microsoft Azure Cognitive Services Anomaly Detector API enables you to monitor and detect abnormalities in your time series data with machine learning.

Source code | Package (NuGet) | API reference documentation | Product documentation

Getting started

Install the package

Install the Azure Anomaly Detector client library for .NET with NuGet:

dotnet add package Azure.AI.AnomalyDetector --version 3.0.0-preview.3

Prerequisites

For more information about creating the resource or how to get the location and sku information see here.

Authenticate the client

In order to interact with the Anomaly Detector service, you'll need to create an instance of the AnomalyDetectorClient class. You will need an endpoint and an API key to instantiate a client object.

Get API Key

You can obtain the endpoint and API key from the resource information in the Azure Portal.

Alternatively, you can use the Azure CLI snippet below to get the API key from the Anomaly Detector resource.

az cognitiveservices account keys list --resource-group <your-resource-group-name> --name <your-resource-name>
Create AnomalyDetectorClient with AzureKeyCredential

Once you have the value for the API key, create an AzureKeyCredential. With the endpoint and key credential, you can create the AnomalyDetectorClient:

string endpoint = "<endpoint>";
string apiKey = "<apiKey>";
var credential = new AzureKeyCredential(apiKey);
var client = new AnomalyDetectorClient(new Uri(endpoint), credential);
Create AnomalyDetectorClient with Azure Active Directory Credential

AzureKeyCredential authentication is used in the examples in this getting started guide, but you can also authenticate with Azure Active Directory using the Azure Identity library. Note that regional endpoints do not support AAD authentication. Create a custom subdomain for your resource in order to use this type of authentication.

To use the DefaultAzureCredential provider shown below, or other credential providers provided with the Azure SDK, please install the Azure.Identity package:

Install-Package Azure.Identity

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.

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.

string endpoint = "<endpoint>";
var client = new AnomalyDetectorClient(new Uri(endpoint), new DefaultAzureCredential());

Key concepts

Thread safety

We guarantee that all client instance methods are thread-safe and independent of each other (guideline). This ensures that the recommendation of reusing client instances is always safe, even across threads.

Additional concepts

Client options | Accessing the response | Long-running operations | Handling failures | Diagnostics | Mocking | Client lifetime

Troubleshooting

Setting up console logging

The simplest way to see the logs is to enable the console logging. To create an Azure SDK log listener that outputs messages to console use the AzureEventSourceListener.CreateConsoleLogger method.

// Setup a listener to monitor logged events.
using AzureEventSourceListener listener = AzureEventSourceListener.CreateConsoleLogger();

To learn more about other logging mechanisms see Diagnostics Samples.

Contributing

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

Product Compatible and additional computed target framework versions.
.NET net5.0 was computed.  net5.0-windows was computed.  net6.0 was computed.  net6.0-android was computed.  net6.0-ios was computed.  net6.0-maccatalyst was computed.  net6.0-macos was computed.  net6.0-tvos was computed.  net6.0-windows was computed.  net7.0 was computed.  net7.0-android was computed.  net7.0-ios was computed.  net7.0-maccatalyst was computed.  net7.0-macos was computed.  net7.0-tvos was computed.  net7.0-windows was computed.  net8.0 was computed.  net8.0-android was computed.  net8.0-browser was computed.  net8.0-ios was computed.  net8.0-maccatalyst was computed.  net8.0-macos was computed.  net8.0-tvos was computed.  net8.0-windows was computed. 
.NET Core netcoreapp2.0 was computed.  netcoreapp2.1 was computed.  netcoreapp2.2 was computed.  netcoreapp3.0 was computed.  netcoreapp3.1 was computed. 
.NET Standard netstandard2.0 is compatible.  netstandard2.1 was computed. 
.NET Framework net461 was computed.  net462 was computed.  net463 was computed.  net47 was computed.  net471 was computed.  net472 was computed.  net48 was computed.  net481 was computed. 
MonoAndroid monoandroid was computed. 
MonoMac monomac was computed. 
MonoTouch monotouch was computed. 
Tizen tizen40 was computed.  tizen60 was computed. 
Xamarin.iOS xamarinios was computed. 
Xamarin.Mac xamarinmac was computed. 
Xamarin.TVOS xamarintvos was computed. 
Xamarin.WatchOS xamarinwatchos was computed. 
Compatible target framework(s)
Included target framework(s) (in package)
Learn more about Target Frameworks and .NET Standard.

NuGet packages

This package is not used by any NuGet packages.

GitHub repositories

This package is not used by any popular GitHub repositories.

Version Downloads Last updated
3.0.0-preview.7 1,890 5/9/2023
3.0.0-preview.6 2,030 12/9/2022
3.0.0-preview.5 2,987 1/21/2022
3.0.0-preview.4 149 1/17/2022
3.0.0-preview.3 1,398 4/16/2021
3.0.0-preview.2 1,342 9/3/2020
3.0.0-preview.1 285 8/25/2020