Creates an instance of MetricsAdvisorAdministrationClient.
Example usage:
import { MetricsAdvisorAdministrationClient, MetricsAdvisorKeyCredential } from "@azure/ai-metrics-advisor";
const client = new MetricsAdvisorAdministrationClient(
"<service endpoint>",
new MetricsAdvisorKeyCredential("<subscription key>", "<api key>")
);
Url to an Azure Metrics Advisor service endpoint
Used to authenticate requests to the service.
Used to configure the Metrics Advisor client.
Url to service endpoint
Creates anomaly alerting configuration for a given metric
The alert configuration object to create
Response with Alert object
Adds a new data feed for a specific data source and provided settings
the data feed object to create
Response with Datafeed object
Creates data source credential for the given id
the credential entity object to create
The options parameter
Creates an anomaly detection configuration for a given metric
The detection configuration object to create
The options parameter
Response with Detection Config object
Adds a new hook
Information for the new hook consists of the hook type, name, description, external link and hook parameter
The options parameter.
Response with Hook object
Deletes metric anomaly alert configuration for the given configuration id
id of the anomaly alert configuration to delete
The options parameter.
Deletes a data feed for the given data feed id
id of the data feed to delete
The options parameter.
Deletes data source credential for the given id
id of the credential entity to delete
The options parameter
Deletes a metric anomaly detection configuration for the given configuration id
id of the detection configuration to delete
The options parameter.
Deletes hook for the given hook id
id of the hook to delete
The options parameter
Retrieves metric anomaly alert configuration for the given configuration id
id of the anomaly alert configuration to retrieve
The options parameter.
Retrieves data feed for the given data feed id
id for the data feed to retrieve
The options parameter.
Retrieves data feed ingestion progress for the given data feed id
data feed id for the ingestion progress to retrieve
The options parameter.
Retrieves data source credential for the given id
id of the credential entity to retrieve
The options parameter
Retrieves metric anomaly detection configuration for the given configuration id
id of the detection configuration to retrieve
The options parameter.
Retrieves hook for the given hook id
id for the hook to retrieve
The options parameter.
Returns an async iterable iterator to list anamoly alert configurations associated with the given detection configuration.
.byPage()
returns an async iterable iterator to list the alert configurations in pages.
Example using for await
syntax:
const client = new MetricsAdvisorAdministrationClient(endpoint,
new MetricsAdvisorKeyCredential(subscriptionKey, apiKey));
const alertConfigurations = client.listAlertConfigs(detectionConfigurationId);
let i = 1;
for await (const alertConfiguration of alertConfigurations){
console.log(`alertConfiguration ${i++}:`);
console.log(alertConfiguration);
}
Example using iter.next()
:
let iter = client.listAlertConfigs(detectionConfigurationId);
let result = await iter.next();
while (!result.done) {
console.log(` alert - ${result.value.id}, ${result.value.name}`);
result = await iter.next();
}
Example using byPage()
:
const pages = client.listAlertConfigs(detectionConfigurationId)
.byPage();
let page = await pages.next();
let i = 1;
while (!page.done) {
if (page.value.alertConfigurations) {
console.log(`-- page ${i++}`);
for (const alert of page.value) {
console.log(`${alert}`);
}
}
page = await pages.next();
}
anomaly detection configuration unique id
The options parameter.
Returns an async iterable iterator to list data feed ingestion status based on options
.byPage()
returns an async iterable iterator to list the data feed ingestion status in pages.
Example using for await
syntax:
const client = new MetricsAdvisorAdministrationClient(endpoint,
new MetricsAdvisorKeyCredential(subscriptionKey, apiKey));
const ingestionStatusList = client.listDataFeedIngestionStatus(dataFeedId);
let i = 1;
for await (const ingestionStatus of ingestionStatusList){
console.log(`ingestionStatus ${i++}:`);
console.log(ingestionStatus);
}
Example using iter.next()
:
let iter = client.listDataFeedIngestionStatus(dataFeedId);
let result = await iter.next();
while (!result.done) {
console.log(` anomaly - ${result.value.timestamp}, ${result.value.status}, ${result.value.mesage}`);
result = await iter.next();
}
Example using byPage()
:
const pages = client.listDataFeedIngestionStatus(dataFeedId).byPage({ maxPageSize: 2 });
let page = await pages.next();
let i = 1;
while (!page.done) {
if (page.value) {
console.log(`-- page ${i++}`);
for (const status of page.value) {
console.log("ingestion status-");
console.dir(status);
}
}
page = await pages.next();
}
data feed id for list of data feed ingestion status
The start point of time range to query data ingestion status
The end point of time range to query data ingestion status
The options parameter.
Returns an async iterable iterator to list data feeds based on options
.byPage()
returns an async iterable iterator to list the blobs in pages.
Example using for await
syntax:
const client = new MetricsAdvisorAdministrationClient(endpoint,
new MetricsAdvisorKeyCredential(subscriptionKey, apiKey));
const dataFeedList = client.listDataFeeds({
filter: { // filter
dataFeedName: "js-blob-datafeed"
}
});
let i = 1;
for await (const datafeed of dataFeedList){
console.log(`datafeed ${i++}:`);
console.log(datafeed);
}
Example using iter.next()
:
let iter = client.listDataFeeds();
let dataFeedItem = await iter.next();
while (!dataFeedItem.done) {
console.log(`id :${dataFeedItem.value.id}, name: ${dataFeedItem.value.name}`);
dataFeedItem = await iter.next();
}
Example using byPage()
:
const pages = client.listDataFeeds().byPage({ maxPageSize: 10 });
let page = await pages.next();
let i = 1;
while (!page.done) {
if (page.value) {
console.log(`-- page ${i++}`);
for (const feed of page.value) {
console.log(` ${feed.id} - ${feed.name}`);
}
}
page = await pages.next();
}
The options parameter.
Returns an async iterable iterator to list data source credentials based on options
.byPage()
returns an async iterable iterator to list the credentials in pages.
Example using for await
syntax:
const client = new MetricsAdvisorAdministrationClient(endpoint,
new MetricsAdvisorKeyCredential(subscriptionKey, apiKey));
const datasourceCredentialList = client.listDatasourceCredential();
let i = 1;
for await (const datasourceCredential of datasourceCredentialList){
console.log(`datasourceCredential ${i++}:`);
console.log(datasourceCredential);
}
Example using iter.next()
:
let iter = client.listDatasourceCredential();
let result = await iter.next();
while (!result.done) {
console.dir(result);
result = await iter.next();
}
Example using byPage()
:
const pages = client.listDatasourceCredential().byPage({ maxPageSize: 2 });
let page = await pages.next();
let i = 1;
while (!page.done) {
if (page.value) {
console.log(`-- page ${i++}`);
for (const credential of page.value) {
console.log("datasource credential-");
console.dir(credential);
}
}
page = await pages.next();
}
Returns an async iterable iterator to list anomaly detection configurations based on options
.byPage()
returns an async iterable iterator to list the anomaly detection configurations in pages.
Example using for await
syntax:
const client = new MetricsAdvisorAdministrationClient(endpoint,
new MetricsAdvisorKeyCredential(subscriptionKey, apiKey));
const anomalyDetectionList = client.listDetectionConfigs(metricId);
let i = 1;
for await (const anomaly of anomalyDetectionList){
console.log(`anomaly ${i++}:`);
console.log(anomaly);
}
Example using iter.next()
:
let iter = client.listDetectionConfigs(metricId);
let result = await iter.next();
while (!result.done) {
console.log(` anomaly - ${result.value.id}, ${result.value.name}`);
result = await iter.next();
}
Example using byPage()
:
const pages = client.listDetectionConfigs(metricId)
.byPage();
let page = await pages.next();
let i = 1;
while (!page.done) {
if (page.value) {
console.log(`-- page ${i++}`);
for (const detectionConfiguration of page.value) {
console.log("detection configuration-");
console.dir(detectionConfiguration);
}
}
page = await pages.next();
}
metric id for list of anomaly detection configurations
The options parameter.
Returns an async iterable iterator to list hooks based on options
.byPage()
returns an async iterable iterator to list the hooks in pages.
Example using for await
syntax:
const client = new MetricsAdvisorAdministrationClient(endpoint,
new MetricsAdvisorKeyCredential(subscriptionKey, apiKey));
const hookList = client.listHooks();
let i = 1;
for await (const hook of hookList){
console.log(`hook ${i++}:`);
console.log(hook);
}
Example using iter.next()
:
let iter = client.listHooks();
let result = await iter.next();
while (!result.done) {
console.log(` hook - ${result.value.id}`);
result = await iter.next();
}
Example using byPage()
:
const pages = client.listHooks().byPage({ maxPageSize: 2 });
let page = await pages.next();
let i = 1;
while (!page.done) {
if (page.value) {
console.log(`-- page ${i++}`);
for (const hook of page.value) {
console.log("hook-");
console.dir(hook);
}
}
page = await pages.next();
}
The options parameter.
Refreshes or resets data feed ingestion progress for the given data feed id
The data feed id for the ingestion progress to refresh or reset
The start point of time range to query data ingestion status
The end point of time range to query data ingestion status
The options parameter.
Updates an anomaly alert configuration for the given configuration id
id of the anomaly alert configuration to update
Input to the update anomaly alert configuration operation {@link AnomalyAlertConfigurationPatch}
The options parameter
Updates a data feed given its id
id of the data feed to update
Input to the update data feed operation DataFeedPatch
The options parameter.
Updates data source credential for the given id
id of the credential entity to update
Input to the update credential entity operation DataSourceCredentialPatch
The options parameter
Updates a metric anomaly detection configuration for the given configuration id
id of the detection configuration for metric anomaly to update
Input to the update anomaly detection configuration operation AnomalyDetectionConfigurationPatch
The options parameter.
Updates hook for the given hook id
id of the hook to update
Input to the update hook of type Email {@link EmailHookPatch} or WebHook {@link WebhookHookPatch}
The options parameter
Generated using TypeDoc
Client class for interacting with Azure Metrics Advisor Service to perform management operations