azure-docs-sdk-java/docs-ref-autogen/com.azure.ai.metricsadvisor...

677 строки
105 KiB
YAML

### YamlMime:JavaType
uid: "com.azure.ai.metricsadvisor.MetricsAdvisorClient"
fullName: "com.azure.ai.metricsadvisor.MetricsAdvisorClient"
name: "MetricsAdvisorClient"
nameWithType: "MetricsAdvisorClient"
summary: "This class provides a synchronous client to connect to the Metrics Advisor Azure Cognitive Service."
inheritances:
- "<xref href=\"java.lang.Object?displayProperty=fullName\" data-throw-if-not-resolved=\"False\" />"
inheritedClassMethods:
- classRef: "java.lang.<a href=\"https://docs.oracle.com/javase/8/docs/api/java/lang/Object.html\">Object</a>"
methodsRef:
- "<a href=\"https://docs.oracle.com/javase/8/docs/api/java/lang/Object.html#clone--\">clone</a>"
- "<a href=\"https://docs.oracle.com/javase/8/docs/api/java/lang/Object.html#equals-java.lang.Object-\">equals</a>"
- "<a href=\"https://docs.oracle.com/javase/8/docs/api/java/lang/Object.html#finalize--\">finalize</a>"
- "<a href=\"https://docs.oracle.com/javase/8/docs/api/java/lang/Object.html#getClass--\">getClass</a>"
- "<a href=\"https://docs.oracle.com/javase/8/docs/api/java/lang/Object.html#hashCode--\">hashCode</a>"
- "<a href=\"https://docs.oracle.com/javase/8/docs/api/java/lang/Object.html#notify--\">notify</a>"
- "<a href=\"https://docs.oracle.com/javase/8/docs/api/java/lang/Object.html#notifyAll--\">notifyAll</a>"
- "<a href=\"https://docs.oracle.com/javase/8/docs/api/java/lang/Object.html#toString--\">toString</a>"
- "<a href=\"https://docs.oracle.com/javase/8/docs/api/java/lang/Object.html#wait--\">wait</a>"
- "<a href=\"https://docs.oracle.com/javase/8/docs/api/java/lang/Object.html#wait-long-\">wait</a>"
- "<a href=\"https://docs.oracle.com/javase/8/docs/api/java/lang/Object.html#wait-long-int-\">wait</a>"
syntax: "public final class **MetricsAdvisorClient**"
methods:
- uid: "com.azure.ai.metricsadvisor.MetricsAdvisorClient.addFeedback(java.lang.String,com.azure.ai.metricsadvisor.models.MetricFeedback)"
fullName: "com.azure.ai.metricsadvisor.MetricsAdvisorClient.addFeedback(String metricId, MetricFeedback metricFeedback)"
name: "addFeedback(String metricId, MetricFeedback metricFeedback)"
nameWithType: "MetricsAdvisorClient.addFeedback(String metricId, MetricFeedback metricFeedback)"
summary: "Create a new metric feedback."
parameters:
- description: "the unique id for which the feedback needs to be submitted."
name: "metricId"
type: "<a href=\"https://docs.oracle.com/javase/8/docs/api/java/lang/String.html\">String</a>"
- description: "the actual metric feedback."
name: "metricFeedback"
type: "<xref href=\"com.azure.ai.metricsadvisor.models.MetricFeedback?alt=com.azure.ai.metricsadvisor.models.MetricFeedback&text=MetricFeedback\" data-throw-if-not-resolved=\"False\" />"
syntax: "public MetricFeedback addFeedback(String metricId, MetricFeedback metricFeedback)"
desc: "Create a new metric feedback.\n\n**Code sample**\n\n```java\nfinal String metricId = \"d3gh4i4-b804-4ab9-a70f-0da0c89cft3l\";\n final OffsetDateTime startTime = OffsetDateTime.parse(\"2020-01-01T00:00:00Z\");\n final OffsetDateTime endTime = OffsetDateTime.parse(\"2020-09-09T00:00:00Z\");\n final MetricChangePointFeedback metricChangePointFeedback\n = new MetricChangePointFeedback(startTime, endTime, ChangePointValue.AUTO_DETECT);\n\n final MetricFeedback metricFeedback\n = metricsAdvisorClient.addFeedback(metricId, metricChangePointFeedback);\n\n MetricChangePointFeedback createdMetricChangePointFeedback = (MetricChangePointFeedback) metricFeedback;\n System.out.printf(\"Data Feed Metric feedback Id: %s%n\", createdMetricChangePointFeedback.getId());\n System.out.printf(\"Data Feed Metric feedback change point value: %s%n\",\n createdMetricChangePointFeedback.getChangePointValue().toString());\n System.out.printf(\"Data Feed Metric feedback start time: %s%n\",\n createdMetricChangePointFeedback.getStartTime());\n System.out.printf(\"Data Feed Metric feedback end time: %s%n\",\n createdMetricChangePointFeedback.getEndTime());\n```"
returns:
description: "the created <xref uid=\"com.azure.ai.metricsadvisor.models.MetricFeedback\" data-throw-if-not-resolved=\"false\" data-raw-source=\"metric feedback\"></xref>."
type: "<xref href=\"com.azure.ai.metricsadvisor.models.MetricFeedback?alt=com.azure.ai.metricsadvisor.models.MetricFeedback&text=MetricFeedback\" data-throw-if-not-resolved=\"False\" />"
- uid: "com.azure.ai.metricsadvisor.MetricsAdvisorClient.addFeedbackWithResponse(java.lang.String,com.azure.ai.metricsadvisor.models.MetricFeedback,com.azure.core.util.Context)"
fullName: "com.azure.ai.metricsadvisor.MetricsAdvisorClient.addFeedbackWithResponse(String metricId, MetricFeedback metricFeedback, Context context)"
name: "addFeedbackWithResponse(String metricId, MetricFeedback metricFeedback, Context context)"
nameWithType: "MetricsAdvisorClient.addFeedbackWithResponse(String metricId, MetricFeedback metricFeedback, Context context)"
summary: "Create a new metric feedback."
parameters:
- description: "the unique id for which the feedback needs to be submitted."
name: "metricId"
type: "<a href=\"https://docs.oracle.com/javase/8/docs/api/java/lang/String.html\">String</a>"
- description: "the actual metric feedback."
name: "metricFeedback"
type: "<xref href=\"com.azure.ai.metricsadvisor.models.MetricFeedback?alt=com.azure.ai.metricsadvisor.models.MetricFeedback&text=MetricFeedback\" data-throw-if-not-resolved=\"False\" />"
- description: "Additional context that is passed through the HTTP pipeline during the service call."
name: "context"
type: "<xref href=\"com.azure.core.util.Context?alt=com.azure.core.util.Context&text=Context\" data-throw-if-not-resolved=\"False\" />"
syntax: "public Response<MetricFeedback> addFeedbackWithResponse(String metricId, MetricFeedback metricFeedback, Context context)"
desc: "Create a new metric feedback.\n\n**Code sample**\n\n```java\nfinal String metricId = \"d3gh4i4-b804-4ab9-a70f-0da0c89cft3l\";\n final OffsetDateTime startTime = OffsetDateTime.parse(\"2020-01-01T00:00:00Z\");\n final OffsetDateTime endTime = OffsetDateTime.parse(\"2020-09-09T00:00:00Z\");\n final MetricChangePointFeedback metricChangePointFeedback\n = new MetricChangePointFeedback(startTime, endTime, ChangePointValue.AUTO_DETECT);\n\n final Response<MetricFeedback> metricFeedbackResponse\n = metricsAdvisorClient.addFeedbackWithResponse(metricId, metricChangePointFeedback, Context.NONE);\n\n System.out.printf(\"Data Feed Metric feedback creation operation status %s%n\",\n metricFeedbackResponse.getStatusCode());\n MetricChangePointFeedback createdMetricChangePointFeedback\n = (MetricChangePointFeedback) metricFeedbackResponse.getValue();\n System.out.printf(\"Data Feed Metric feedback Id: %s%n\", createdMetricChangePointFeedback.getId());\n System.out.printf(\"Data Feed Metric feedback change point value: %s%n\",\n createdMetricChangePointFeedback.getChangePointValue().toString());\n System.out.printf(\"Data Feed Metric feedback start time: %s%n\",\n createdMetricChangePointFeedback.getStartTime());\n System.out.printf(\"Data Feed Metric feedback end time: %s%n\",\n createdMetricChangePointFeedback.getEndTime());\n System.out.printf(\"Data Feed Metric feedback associated dimension filter: %s%n\",\n createdMetricChangePointFeedback.getDimensionFilter().asMap());\n```"
returns:
description: "A <xref uid=\"com.azure.core.http.rest.Response\" data-throw-if-not-resolved=\"false\" data-raw-source=\"Response\"></xref> containing the created <xref uid=\"com.azure.ai.metricsadvisor.models.MetricFeedback\" data-throw-if-not-resolved=\"false\" data-raw-source=\"metric feedback\"></xref>."
type: "<xref href=\"com.azure.core.http.rest.Response?alt=com.azure.core.http.rest.Response&text=Response\" data-throw-if-not-resolved=\"False\" />&lt;<xref href=\"com.azure.ai.metricsadvisor.models.MetricFeedback?alt=com.azure.ai.metricsadvisor.models.MetricFeedback&text=MetricFeedback\" data-throw-if-not-resolved=\"False\" />&gt;"
- uid: "com.azure.ai.metricsadvisor.MetricsAdvisorClient.getFeedback(java.lang.String)"
fullName: "com.azure.ai.metricsadvisor.MetricsAdvisorClient.getFeedback(String feedbackId)"
name: "getFeedback(String feedbackId)"
nameWithType: "MetricsAdvisorClient.getFeedback(String feedbackId)"
summary: "Get a metric feedback by its id."
parameters:
- description: "The metric feedback unique id."
name: "feedbackId"
type: "<a href=\"https://docs.oracle.com/javase/8/docs/api/java/lang/String.html\">String</a>"
syntax: "public MetricFeedback getFeedback(String feedbackId)"
desc: "Get a metric feedback by its id.\n\n**Code sample**\n\n```java\nfinal String feedbackId = \"8i3h4i4-b804-4ab9-a70f-0da0c89cft3l\";\n final MetricFeedback metricFeedback = metricsAdvisorClient.getFeedback(feedbackId);\n System.out.printf(\"Data Feed Metric feedback Id: %s%n\", metricFeedback.getId());\n System.out.printf(\"Data Feed Metric feedback associated dimension filter: %s%n\",\n metricFeedback.getDimensionFilter().asMap());\n\n if (PERIOD.equals(metricFeedback.getFeedbackType())) {\n MetricPeriodFeedback createMetricPeriodFeedback\n = (MetricPeriodFeedback) metricFeedback;\n System.out.printf(\"Data Feed Metric feedback type: %s%n\",\n createMetricPeriodFeedback.getPeriodType().toString());\n System.out.printf(\"Data Feed Metric feedback period value: %d%n\",\n createMetricPeriodFeedback.getPeriodValue());\n }\n```"
returns:
description: "The metric feedback for the provided id."
type: "<xref href=\"com.azure.ai.metricsadvisor.models.MetricFeedback?alt=com.azure.ai.metricsadvisor.models.MetricFeedback&text=MetricFeedback\" data-throw-if-not-resolved=\"False\" />"
- uid: "com.azure.ai.metricsadvisor.MetricsAdvisorClient.getFeedbackWithResponse(java.lang.String,com.azure.core.util.Context)"
fullName: "com.azure.ai.metricsadvisor.MetricsAdvisorClient.getFeedbackWithResponse(String feedbackId, Context context)"
name: "getFeedbackWithResponse(String feedbackId, Context context)"
nameWithType: "MetricsAdvisorClient.getFeedbackWithResponse(String feedbackId, Context context)"
summary: "Get a metric feedback by its id."
parameters:
- description: "The metric feedback unique id."
name: "feedbackId"
type: "<a href=\"https://docs.oracle.com/javase/8/docs/api/java/lang/String.html\">String</a>"
- description: "Additional context that is passed through the HTTP pipeline during the service call."
name: "context"
type: "<xref href=\"com.azure.core.util.Context?alt=com.azure.core.util.Context&text=Context\" data-throw-if-not-resolved=\"False\" />"
syntax: "public Response<MetricFeedback> getFeedbackWithResponse(String feedbackId, Context context)"
desc: "Get a metric feedback by its id.\n\n**Code sample**\n\n```java\nfinal String feedbackId = \"8i3h4i4-b804-4ab9-a70f-0da0c89cft3l\";\n final Response<MetricFeedback> metricFeedbackResponse\n = metricsAdvisorClient.getFeedbackWithResponse(feedbackId, Context.NONE);\n final MetricFeedback metricFeedback = metricFeedbackResponse.getValue();\n System.out.printf(\"Data Feed Metric feedback Id: %s%n\", metricFeedback.getId());\n System.out.printf(\"Data Feed Metric feedback associated dimension filter: %s%n\",\n metricFeedback.getDimensionFilter().asMap());\n\n if (PERIOD.equals(metricFeedback.getFeedbackType())) {\n MetricPeriodFeedback createMetricPeriodFeedback\n = (MetricPeriodFeedback) metricFeedback;\n System.out.printf(\"Data Feed Metric feedback type: %s%n\",\n createMetricPeriodFeedback.getPeriodType().toString());\n System.out.printf(\"Data Feed Metric feedback period value: %d%n\",\n createMetricPeriodFeedback.getPeriodValue());\n }\n```"
returns:
description: "The metric feedback for the provided id."
type: "<xref href=\"com.azure.core.http.rest.Response?alt=com.azure.core.http.rest.Response&text=Response\" data-throw-if-not-resolved=\"False\" />&lt;<xref href=\"com.azure.ai.metricsadvisor.models.MetricFeedback?alt=com.azure.ai.metricsadvisor.models.MetricFeedback&text=MetricFeedback\" data-throw-if-not-resolved=\"False\" />&gt;"
- uid: "com.azure.ai.metricsadvisor.MetricsAdvisorClient.listAlerts(java.lang.String,java.time.OffsetDateTime,java.time.OffsetDateTime)"
fullName: "com.azure.ai.metricsadvisor.MetricsAdvisorClient.listAlerts(String alertConfigurationId, OffsetDateTime startTime, OffsetDateTime endTime)"
name: "listAlerts(String alertConfigurationId, OffsetDateTime startTime, OffsetDateTime endTime)"
nameWithType: "MetricsAdvisorClient.listAlerts(String alertConfigurationId, OffsetDateTime startTime, OffsetDateTime endTime)"
summary: "Fetch the alerts triggered by an anomaly alert configuration."
parameters:
- description: "The anomaly alert configuration id."
name: "alertConfigurationId"
type: "<a href=\"https://docs.oracle.com/javase/8/docs/api/java/lang/String.html\">String</a>"
- description: "The start time of the time range within which the alerts were triggered."
name: "startTime"
type: "<a href=\"https://docs.oracle.com/javase/8/docs/api/java/time/OffsetDateTime.html\">OffsetDateTime</a>"
- description: "The end time of the time range within which the alerts were triggered."
name: "endTime"
type: "<a href=\"https://docs.oracle.com/javase/8/docs/api/java/time/OffsetDateTime.html\">OffsetDateTime</a>"
syntax: "public PagedIterable<AnomalyAlert> listAlerts(String alertConfigurationId, OffsetDateTime startTime, OffsetDateTime endTime)"
desc: "Fetch the alerts triggered by an anomaly alert configuration.\n\n**Code sample**\n\n```java\nfinal String alertConfigurationId = \"ff3014a0-bbbb-41ec-a637-677e77b81299\";\n final OffsetDateTime startTime = OffsetDateTime.parse(\"2020-01-01T00:00:00Z\");\n final OffsetDateTime endTime = OffsetDateTime.parse(\"2020-09-09T00:00:00Z\");\n\n PagedIterable<AnomalyAlert> alertsIterable\n = metricsAdvisorClient.listAlerts(alertConfigurationId, startTime, endTime);\n\n for (AnomalyAlert anomalyAlert : alertsIterable) {\n System.out.printf(\"Anomaly Alert Id: %s%n\", anomalyAlert.getId());\n System.out.printf(\"Created Time: %s%n\", anomalyAlert.getCreatedTime());\n System.out.printf(\"Modified Time: %s%n\", anomalyAlert.getModifiedTime());\n }\n```"
returns:
description: "The alerts."
type: "<xref href=\"com.azure.core.http.rest.PagedIterable?alt=com.azure.core.http.rest.PagedIterable&text=PagedIterable\" data-throw-if-not-resolved=\"False\" />&lt;<xref href=\"com.azure.ai.metricsadvisor.models.AnomalyAlert?alt=com.azure.ai.metricsadvisor.models.AnomalyAlert&text=AnomalyAlert\" data-throw-if-not-resolved=\"False\" />&gt;"
- uid: "com.azure.ai.metricsadvisor.MetricsAdvisorClient.listAlerts(java.lang.String,java.time.OffsetDateTime,java.time.OffsetDateTime,com.azure.ai.metricsadvisor.models.ListAlertOptions,com.azure.core.util.Context)"
fullName: "com.azure.ai.metricsadvisor.MetricsAdvisorClient.listAlerts(String alertConfigurationId, OffsetDateTime startTime, OffsetDateTime endTime, ListAlertOptions options, Context context)"
name: "listAlerts(String alertConfigurationId, OffsetDateTime startTime, OffsetDateTime endTime, ListAlertOptions options, Context context)"
nameWithType: "MetricsAdvisorClient.listAlerts(String alertConfigurationId, OffsetDateTime startTime, OffsetDateTime endTime, ListAlertOptions options, Context context)"
summary: "Fetch the alerts triggered by an anomaly alert configuration."
parameters:
- description: "The anomaly alert configuration id."
name: "alertConfigurationId"
type: "<a href=\"https://docs.oracle.com/javase/8/docs/api/java/lang/String.html\">String</a>"
- description: "The start time of the time range within which the alerts were triggered."
name: "startTime"
type: "<a href=\"https://docs.oracle.com/javase/8/docs/api/java/time/OffsetDateTime.html\">OffsetDateTime</a>"
- description: "The end time of the time range within which the alerts were triggered."
name: "endTime"
type: "<a href=\"https://docs.oracle.com/javase/8/docs/api/java/time/OffsetDateTime.html\">OffsetDateTime</a>"
- description: "The additional parameters."
name: "options"
type: "<xref href=\"com.azure.ai.metricsadvisor.models.ListAlertOptions?alt=com.azure.ai.metricsadvisor.models.ListAlertOptions&text=ListAlertOptions\" data-throw-if-not-resolved=\"False\" />"
- description: "Additional context that is passed through the Http pipeline during the service call."
name: "context"
type: "<xref href=\"com.azure.core.util.Context?alt=com.azure.core.util.Context&text=Context\" data-throw-if-not-resolved=\"False\" />"
syntax: "public PagedIterable<AnomalyAlert> listAlerts(String alertConfigurationId, OffsetDateTime startTime, OffsetDateTime endTime, ListAlertOptions options, Context context)"
desc: "Fetch the alerts triggered by an anomaly alert configuration.\n\n**Code sample**\n\n```java\nfinal String alertConfigurationId = \"ff3014a0-bbbb-41ec-a637-677e77b81299\";\n final OffsetDateTime startTime = OffsetDateTime.parse(\"2020-01-01T00:00:00Z\");\n final OffsetDateTime endTime = OffsetDateTime.parse(\"2020-09-09T00:00:00Z\");\n final AlertQueryTimeMode timeMode = AlertQueryTimeMode.ANOMALY_TIME;\n final ListAlertOptions options = new ListAlertOptions()\n .setAlertQueryTimeMode(timeMode)\n .setMaxPageSize(10);\n\n PagedIterable<AnomalyAlert> alertsIterable\n = metricsAdvisorClient.listAlerts(alertConfigurationId, startTime, endTime, options, Context.NONE);\n\n Stream<PagedResponse<AnomalyAlert>> alertsPageStream = alertsIterable.streamByPage();\n int[] pageCount = new int[1];\n alertsPageStream.forEach(alertsPage -> {\n System.out.printf(\"Page: %d%n\", pageCount[0]++);\n IterableStream<AnomalyAlert> alertsPageItems = alertsPage.getElements();\n for (AnomalyAlert anomalyAlert : alertsPageItems) {\n System.out.printf(\"AnomalyAlert Id: %s%n\", anomalyAlert.getId());\n System.out.printf(\"Created Time: %s%n\", anomalyAlert.getCreatedTime());\n System.out.printf(\"Modified Time: %s%n\", anomalyAlert.getModifiedTime());\n }\n });\n```"
returns:
description: "The alerts."
type: "<xref href=\"com.azure.core.http.rest.PagedIterable?alt=com.azure.core.http.rest.PagedIterable&text=PagedIterable\" data-throw-if-not-resolved=\"False\" />&lt;<xref href=\"com.azure.ai.metricsadvisor.models.AnomalyAlert?alt=com.azure.ai.metricsadvisor.models.AnomalyAlert&text=AnomalyAlert\" data-throw-if-not-resolved=\"False\" />&gt;"
- uid: "com.azure.ai.metricsadvisor.MetricsAdvisorClient.listAnomaliesForAlert(java.lang.String,java.lang.String)"
fullName: "com.azure.ai.metricsadvisor.MetricsAdvisorClient.listAnomaliesForAlert(String alertConfigurationId, String alertId)"
name: "listAnomaliesForAlert(String alertConfigurationId, String alertId)"
nameWithType: "MetricsAdvisorClient.listAnomaliesForAlert(String alertConfigurationId, String alertId)"
summary: "Fetch the anomalies in an alert."
parameters:
- description: "The anomaly alert configuration id."
name: "alertConfigurationId"
type: "<a href=\"https://docs.oracle.com/javase/8/docs/api/java/lang/String.html\">String</a>"
- description: "The alert id."
name: "alertId"
type: "<a href=\"https://docs.oracle.com/javase/8/docs/api/java/lang/String.html\">String</a>"
syntax: "public PagedIterable<DataPointAnomaly> listAnomaliesForAlert(String alertConfigurationId, String alertId)"
desc: "Fetch the anomalies in an alert.\n\n**Code sample**\n\n```java\nfinal String alertConfigurationId = \"ff3014a0-bbbb-41ec-a637-677e77b81299\";\n final String alertId = \"1746b031c00\";\n PagedIterable<DataPointAnomaly> anomaliesIterable = metricsAdvisorClient.listAnomaliesForAlert(\n alertConfigurationId,\n alertId\n );\n\n for (DataPointAnomaly dataPointAnomaly : anomaliesIterable) {\n System.out.printf(\"Data Feed Metric Id: %s%n\", dataPointAnomaly.getMetricId());\n System.out.printf(\"Detection Configuration Id: %s%n\", dataPointAnomaly.getDetectionConfigurationId());\n System.out.printf(\"DataPoint Anomaly Created Time: %s%n\", dataPointAnomaly.getCreatedTime());\n System.out.printf(\"DataPoint Anomaly Modified Time: %s%n\", dataPointAnomaly.getModifiedTime());\n System.out.printf(\"DataPoint Anomaly AnomalySeverity: %s%n\", dataPointAnomaly.getSeverity());\n System.out.printf(\"DataPoint Anomaly Status: %s%n\", dataPointAnomaly.getStatus());\n System.out.printf(\"Series Key:\");\n System.out.println(dataPointAnomaly.getSeriesKey().asMap());\n }\n```"
returns:
description: "The anomalies."
type: "<xref href=\"com.azure.core.http.rest.PagedIterable?alt=com.azure.core.http.rest.PagedIterable&text=PagedIterable\" data-throw-if-not-resolved=\"False\" />&lt;<xref href=\"com.azure.ai.metricsadvisor.models.DataPointAnomaly?alt=com.azure.ai.metricsadvisor.models.DataPointAnomaly&text=DataPointAnomaly\" data-throw-if-not-resolved=\"False\" />&gt;"
- uid: "com.azure.ai.metricsadvisor.MetricsAdvisorClient.listAnomaliesForAlert(java.lang.String,java.lang.String,com.azure.ai.metricsadvisor.models.ListAnomaliesAlertedOptions,com.azure.core.util.Context)"
fullName: "com.azure.ai.metricsadvisor.MetricsAdvisorClient.listAnomaliesForAlert(String alertConfigurationId, String alertId, ListAnomaliesAlertedOptions options, Context context)"
name: "listAnomaliesForAlert(String alertConfigurationId, String alertId, ListAnomaliesAlertedOptions options, Context context)"
nameWithType: "MetricsAdvisorClient.listAnomaliesForAlert(String alertConfigurationId, String alertId, ListAnomaliesAlertedOptions options, Context context)"
summary: "Fetch the anomalies in an alert."
parameters:
- description: "The anomaly alert configuration id."
name: "alertConfigurationId"
type: "<a href=\"https://docs.oracle.com/javase/8/docs/api/java/lang/String.html\">String</a>"
- description: "The alert id."
name: "alertId"
type: "<a href=\"https://docs.oracle.com/javase/8/docs/api/java/lang/String.html\">String</a>"
- description: "The additional parameters."
name: "options"
type: "<xref href=\"com.azure.ai.metricsadvisor.models.ListAnomaliesAlertedOptions?alt=com.azure.ai.metricsadvisor.models.ListAnomaliesAlertedOptions&text=ListAnomaliesAlertedOptions\" data-throw-if-not-resolved=\"False\" />"
- description: "Additional context that is passed through the Http pipeline during the service call."
name: "context"
type: "<xref href=\"com.azure.core.util.Context?alt=com.azure.core.util.Context&text=Context\" data-throw-if-not-resolved=\"False\" />"
syntax: "public PagedIterable<DataPointAnomaly> listAnomaliesForAlert(String alertConfigurationId, String alertId, ListAnomaliesAlertedOptions options, Context context)"
desc: "Fetch the anomalies in an alert.\n\n**Code sample**\n\n```java\nfinal String alertConfigurationId = \"ff3014a0-bbbb-41ec-a637-677e77b81299\";\n final String alertId = \"1746b031c00\";\n final ListAnomaliesAlertedOptions options = new ListAnomaliesAlertedOptions()\n .setMaxPageSize(10);\n PagedIterable<DataPointAnomaly> anomaliesIterable = metricsAdvisorClient.listAnomaliesForAlert(\n alertConfigurationId,\n alertId,\n options,\n Context.NONE);\n\n Stream<PagedResponse<DataPointAnomaly>> anomaliesPageStream = anomaliesIterable.streamByPage();\n int[] pageCount = new int[1];\n anomaliesPageStream.forEach(anomaliesPage -> {\n System.out.printf(\"Page: %d%n\", pageCount[0]++);\n IterableStream<DataPointAnomaly> anomaliesPageItems = anomaliesPage.getElements();\n for (DataPointAnomaly dataPointAnomaly : anomaliesPageItems) {\n System.out.printf(\"Data Feed Metric Id: %s%n\", dataPointAnomaly.getMetricId());\n System.out.printf(\"Detection Configuration Id: %s%n\", dataPointAnomaly.getDetectionConfigurationId());\n System.out.printf(\"DataPoint Anomaly Created Time: %s%n\", dataPointAnomaly.getCreatedTime());\n System.out.printf(\"DataPoint Anomaly Modified Time: %s%n\", dataPointAnomaly.getModifiedTime());\n System.out.printf(\"DataPoint Anomaly AnomalySeverity: %s%n\", dataPointAnomaly.getSeverity());\n System.out.printf(\"DataPoint Anomaly Status: %s%n\", dataPointAnomaly.getStatus());\n System.out.printf(\"Series Key:\");\n System.out.println(dataPointAnomaly.getSeriesKey().asMap());\n }\n });\n```"
returns:
description: "The anomalies."
type: "<xref href=\"com.azure.core.http.rest.PagedIterable?alt=com.azure.core.http.rest.PagedIterable&text=PagedIterable\" data-throw-if-not-resolved=\"False\" />&lt;<xref href=\"com.azure.ai.metricsadvisor.models.DataPointAnomaly?alt=com.azure.ai.metricsadvisor.models.DataPointAnomaly&text=DataPointAnomaly\" data-throw-if-not-resolved=\"False\" />&gt;"
- uid: "com.azure.ai.metricsadvisor.MetricsAdvisorClient.listAnomaliesForDetectionConfig(java.lang.String,java.time.OffsetDateTime,java.time.OffsetDateTime)"
fullName: "com.azure.ai.metricsadvisor.MetricsAdvisorClient.listAnomaliesForDetectionConfig(String detectionConfigurationId, OffsetDateTime startTime, OffsetDateTime endTime)"
name: "listAnomaliesForDetectionConfig(String detectionConfigurationId, OffsetDateTime startTime, OffsetDateTime endTime)"
nameWithType: "MetricsAdvisorClient.listAnomaliesForDetectionConfig(String detectionConfigurationId, OffsetDateTime startTime, OffsetDateTime endTime)"
summary: "Fetch the anomalies identified by an anomaly detection configuration."
parameters:
- description: "The anomaly detection configuration id."
name: "detectionConfigurationId"
type: "<a href=\"https://docs.oracle.com/javase/8/docs/api/java/lang/String.html\">String</a>"
- description: "The start time of the time range within which the anomalies were detected."
name: "startTime"
type: "<a href=\"https://docs.oracle.com/javase/8/docs/api/java/time/OffsetDateTime.html\">OffsetDateTime</a>"
- description: "The end time of the time range within which the anomalies were detected."
name: "endTime"
type: "<a href=\"https://docs.oracle.com/javase/8/docs/api/java/time/OffsetDateTime.html\">OffsetDateTime</a>"
syntax: "public PagedIterable<DataPointAnomaly> listAnomaliesForDetectionConfig(String detectionConfigurationId, OffsetDateTime startTime, OffsetDateTime endTime)"
desc: "Fetch the anomalies identified by an anomaly detection configuration.\n\n**Code sample**\n\n```java\nfinal String detectionConfigurationId = \"c0f2539f-b804-4ab9-a70f-0da0c89c76d8\";\n final OffsetDateTime startTime = OffsetDateTime.parse(\"2020-09-09T00:00:00Z\");\n final OffsetDateTime endTime = OffsetDateTime.parse(\"2020-09-09T12:00:00Z\");\n final ListAnomaliesDetectedFilter filter = new ListAnomaliesDetectedFilter()\n .setSeverityRange(AnomalySeverity.LOW, AnomalySeverity.MEDIUM);\n final ListAnomaliesDetectedOptions options = new ListAnomaliesDetectedOptions()\n .setMaxPageSize(10)\n .setFilter(filter);\n PagedIterable<DataPointAnomaly> anomaliesIterable\n = metricsAdvisorClient.listAnomaliesForDetectionConfig(detectionConfigurationId, startTime, endTime,\n options, Context.NONE);\n\n for (DataPointAnomaly dataPointAnomaly : anomaliesIterable) {\n System.out.printf(\"DataPointAnomaly AnomalySeverity: %s%n\", dataPointAnomaly.getSeverity());\n System.out.printf(\"Series Key:\");\n DimensionKey seriesKey = dataPointAnomaly.getSeriesKey();\n for (Map.Entry<String, String> dimension : seriesKey.asMap().entrySet()) {\n System.out.printf(\"DimensionName: %s DimensionValue:%s%n\",\n dimension.getKey(), dimension.getValue());\n }\n }\n```"
returns:
description: "The anomalies."
type: "<xref href=\"com.azure.core.http.rest.PagedIterable?alt=com.azure.core.http.rest.PagedIterable&text=PagedIterable\" data-throw-if-not-resolved=\"False\" />&lt;<xref href=\"com.azure.ai.metricsadvisor.models.DataPointAnomaly?alt=com.azure.ai.metricsadvisor.models.DataPointAnomaly&text=DataPointAnomaly\" data-throw-if-not-resolved=\"False\" />&gt;"
- uid: "com.azure.ai.metricsadvisor.MetricsAdvisorClient.listAnomaliesForDetectionConfig(java.lang.String,java.time.OffsetDateTime,java.time.OffsetDateTime,com.azure.ai.metricsadvisor.models.ListAnomaliesDetectedOptions,com.azure.core.util.Context)"
fullName: "com.azure.ai.metricsadvisor.MetricsAdvisorClient.listAnomaliesForDetectionConfig(String detectionConfigurationId, OffsetDateTime startTime, OffsetDateTime endTime, ListAnomaliesDetectedOptions options, Context context)"
name: "listAnomaliesForDetectionConfig(String detectionConfigurationId, OffsetDateTime startTime, OffsetDateTime endTime, ListAnomaliesDetectedOptions options, Context context)"
nameWithType: "MetricsAdvisorClient.listAnomaliesForDetectionConfig(String detectionConfigurationId, OffsetDateTime startTime, OffsetDateTime endTime, ListAnomaliesDetectedOptions options, Context context)"
summary: "Fetch the anomalies identified by an anomaly detection configuration."
parameters:
- description: "The anomaly detection configuration id."
name: "detectionConfigurationId"
type: "<a href=\"https://docs.oracle.com/javase/8/docs/api/java/lang/String.html\">String</a>"
- description: "The start time of the time range within which the anomalies were detected."
name: "startTime"
type: "<a href=\"https://docs.oracle.com/javase/8/docs/api/java/time/OffsetDateTime.html\">OffsetDateTime</a>"
- description: "The end time of the time range within which the anomalies were detected."
name: "endTime"
type: "<a href=\"https://docs.oracle.com/javase/8/docs/api/java/time/OffsetDateTime.html\">OffsetDateTime</a>"
- description: "The additional parameters."
name: "options"
type: "<xref href=\"com.azure.ai.metricsadvisor.models.ListAnomaliesDetectedOptions?alt=com.azure.ai.metricsadvisor.models.ListAnomaliesDetectedOptions&text=ListAnomaliesDetectedOptions\" data-throw-if-not-resolved=\"False\" />"
- description: "Additional context that is passed through the Http pipeline during the service call."
name: "context"
type: "<xref href=\"com.azure.core.util.Context?alt=com.azure.core.util.Context&text=Context\" data-throw-if-not-resolved=\"False\" />"
syntax: "public PagedIterable<DataPointAnomaly> listAnomaliesForDetectionConfig(String detectionConfigurationId, OffsetDateTime startTime, OffsetDateTime endTime, ListAnomaliesDetectedOptions options, Context context)"
desc: "Fetch the anomalies identified by an anomaly detection configuration.\n\n**Code sample**\n\n```java\nfinal String detectionConfigurationId = \"c0f2539f-b804-4ab9-a70f-0da0c89c76d8\";\n final OffsetDateTime startTime = OffsetDateTime.parse(\"2020-09-09T00:00:00Z\");\n final OffsetDateTime endTime = OffsetDateTime.parse(\"2020-09-09T12:00:00Z\");\n final ListAnomaliesDetectedFilter filter = new ListAnomaliesDetectedFilter()\n .setSeverityRange(AnomalySeverity.LOW, AnomalySeverity.MEDIUM);\n final ListAnomaliesDetectedOptions options = new ListAnomaliesDetectedOptions()\n .setMaxPageSize(10)\n .setFilter(filter);\n PagedIterable<DataPointAnomaly> anomaliesIterable\n = metricsAdvisorClient.listAnomaliesForDetectionConfig(detectionConfigurationId,\n startTime, endTime, options,\n Context.NONE);\n\n Stream<PagedResponse<DataPointAnomaly>> anomaliesPageStream = anomaliesIterable.streamByPage();\n int[] pageCount = new int[1];\n anomaliesPageStream.forEach(anomaliesPage -> {\n System.out.printf(\"Page: %d%n\", pageCount[0]++);\n IterableStream<DataPointAnomaly> anomaliesPageItems = anomaliesPage.getElements();\n for (DataPointAnomaly dataPointAnomaly : anomaliesPageItems) {\n System.out.printf(\"DataPoint Anomaly AnomalySeverity: %s%n\", dataPointAnomaly.getSeverity());\n System.out.printf(\"Series Key:\");\n DimensionKey seriesKey = dataPointAnomaly.getSeriesKey();\n for (Map.Entry<String, String> dimension : seriesKey.asMap().entrySet()) {\n System.out.printf(\"DimensionName: %s DimensionValue:%s%n\",\n dimension.getKey(), dimension.getValue());\n }\n }\n });\n```"
returns:
description: "The anomalies."
type: "<xref href=\"com.azure.core.http.rest.PagedIterable?alt=com.azure.core.http.rest.PagedIterable&text=PagedIterable\" data-throw-if-not-resolved=\"False\" />&lt;<xref href=\"com.azure.ai.metricsadvisor.models.DataPointAnomaly?alt=com.azure.ai.metricsadvisor.models.DataPointAnomaly&text=DataPointAnomaly\" data-throw-if-not-resolved=\"False\" />&gt;"
- uid: "com.azure.ai.metricsadvisor.MetricsAdvisorClient.listAnomalyDimensionValues(java.lang.String,java.lang.String,java.time.OffsetDateTime,java.time.OffsetDateTime)"
fullName: "com.azure.ai.metricsadvisor.MetricsAdvisorClient.listAnomalyDimensionValues(String detectionConfigurationId, String dimensionName, OffsetDateTime startTime, OffsetDateTime endTime)"
name: "listAnomalyDimensionValues(String detectionConfigurationId, String dimensionName, OffsetDateTime startTime, OffsetDateTime endTime)"
nameWithType: "MetricsAdvisorClient.listAnomalyDimensionValues(String detectionConfigurationId, String dimensionName, OffsetDateTime startTime, OffsetDateTime endTime)"
summary: "Fetch dimension values that have anomalies."
parameters:
- description: "Identifies the configuration used to detect the anomalies."
name: "detectionConfigurationId"
type: "<a href=\"https://docs.oracle.com/javase/8/docs/api/java/lang/String.html\">String</a>"
- description: "The dimension name to retrieve the values for."
name: "dimensionName"
type: "<a href=\"https://docs.oracle.com/javase/8/docs/api/java/lang/String.html\">String</a>"
- description: "The start time of the time range within which the anomalies were identified."
name: "startTime"
type: "<a href=\"https://docs.oracle.com/javase/8/docs/api/java/time/OffsetDateTime.html\">OffsetDateTime</a>"
- description: "The end time of the time range within which the anomalies were identified."
name: "endTime"
type: "<a href=\"https://docs.oracle.com/javase/8/docs/api/java/time/OffsetDateTime.html\">OffsetDateTime</a>"
syntax: "public PagedIterable<String> listAnomalyDimensionValues(String detectionConfigurationId, String dimensionName, OffsetDateTime startTime, OffsetDateTime endTime)"
desc: "Fetch dimension values that have anomalies.\n\n**Code sample**\n\n```java\nfinal String detectionConfigurationId = \"c0f2539f-b804-4ab9-a70f-0da0c89c76d8\";\n final String dimensionName = \"Dim1\";\n final OffsetDateTime startTime = OffsetDateTime.parse(\"2020-01-01T00:00:00Z\");\n final OffsetDateTime endTime = OffsetDateTime.parse(\"2020-09-09T00:00:00Z\");\n\n PagedIterable<String> dimensionValueIterable\n = metricsAdvisorClient.listAnomalyDimensionValues(detectionConfigurationId,\n dimensionName,\n startTime, endTime);\n\n for (String dimensionValue : dimensionValueIterable) {\n System.out.printf(\"DataFeedDimension Value: %s%n\", dimensionValue);\n }\n```"
returns:
description: "The dimension values with anomalies."
type: "<xref href=\"com.azure.core.http.rest.PagedIterable?alt=com.azure.core.http.rest.PagedIterable&text=PagedIterable\" data-throw-if-not-resolved=\"False\" />&lt;<a href=\"https://docs.oracle.com/javase/8/docs/api/java/lang/String.html\">String</a>&gt;"
- uid: "com.azure.ai.metricsadvisor.MetricsAdvisorClient.listAnomalyDimensionValues(java.lang.String,java.lang.String,java.time.OffsetDateTime,java.time.OffsetDateTime,com.azure.ai.metricsadvisor.models.ListAnomalyDimensionValuesOptions,com.azure.core.util.Context)"
fullName: "com.azure.ai.metricsadvisor.MetricsAdvisorClient.listAnomalyDimensionValues(String detectionConfigurationId, String dimensionName, OffsetDateTime startTime, OffsetDateTime endTime, ListAnomalyDimensionValuesOptions options, Context context)"
name: "listAnomalyDimensionValues(String detectionConfigurationId, String dimensionName, OffsetDateTime startTime, OffsetDateTime endTime, ListAnomalyDimensionValuesOptions options, Context context)"
nameWithType: "MetricsAdvisorClient.listAnomalyDimensionValues(String detectionConfigurationId, String dimensionName, OffsetDateTime startTime, OffsetDateTime endTime, ListAnomalyDimensionValuesOptions options, Context context)"
summary: "Fetch dimension values that have anomalies."
parameters:
- description: "Identifies the configuration used to detect the anomalies."
name: "detectionConfigurationId"
type: "<a href=\"https://docs.oracle.com/javase/8/docs/api/java/lang/String.html\">String</a>"
- description: "The dimension name to retrieve the values for."
name: "dimensionName"
type: "<a href=\"https://docs.oracle.com/javase/8/docs/api/java/lang/String.html\">String</a>"
- description: "The start time of the time range within which the anomalies were identified."
name: "startTime"
type: "<a href=\"https://docs.oracle.com/javase/8/docs/api/java/time/OffsetDateTime.html\">OffsetDateTime</a>"
- description: "The end time of the time range within which the anomalies were identified."
name: "endTime"
type: "<a href=\"https://docs.oracle.com/javase/8/docs/api/java/time/OffsetDateTime.html\">OffsetDateTime</a>"
- description: "The additional parameters."
name: "options"
type: "<xref href=\"com.azure.ai.metricsadvisor.models.ListAnomalyDimensionValuesOptions?alt=com.azure.ai.metricsadvisor.models.ListAnomalyDimensionValuesOptions&text=ListAnomalyDimensionValuesOptions\" data-throw-if-not-resolved=\"False\" />"
- description: "Additional context that is passed through the Http pipeline during the service call."
name: "context"
type: "<xref href=\"com.azure.core.util.Context?alt=com.azure.core.util.Context&text=Context\" data-throw-if-not-resolved=\"False\" />"
syntax: "public PagedIterable<String> listAnomalyDimensionValues(String detectionConfigurationId, String dimensionName, OffsetDateTime startTime, OffsetDateTime endTime, ListAnomalyDimensionValuesOptions options, Context context)"
desc: "Fetch dimension values that have anomalies.\n\n**Code sample**\n\n```java\nfinal String detectionConfigurationId = \"c0f2539f-b804-4ab9-a70f-0da0c89c76d8\";\n final String dimensionName = \"Dim1\";\n final OffsetDateTime startTime = OffsetDateTime.parse(\"2020-01-01T00:00:00Z\");\n final OffsetDateTime endTime = OffsetDateTime.parse(\"2020-09-09T00:00:00Z\");\n final ListAnomalyDimensionValuesOptions options\n = new ListAnomalyDimensionValuesOptions()\n .setMaxPageSize(10);\n\n PagedIterable<String> dimensionValueIterable\n = metricsAdvisorClient.listAnomalyDimensionValues(detectionConfigurationId,\n dimensionName,\n startTime, endTime, options,\n Context.NONE);\n\n Stream<PagedResponse<String>> dimensionValuePageStream = dimensionValueIterable.streamByPage();\n int[] pageCount = new int[1];\n dimensionValuePageStream.forEach(dimensionValuePage -> {\n System.out.printf(\"Page: %d%n\", pageCount[0]++);\n IterableStream<String> dimensionValuePageItems = dimensionValuePage.getElements();\n for (String dimensionValue : dimensionValuePageItems) {\n System.out.printf(\"DataFeedDimension Value: %s%n\", dimensionValue);\n }\n });\n```"
returns:
description: "The dimension values with anomalies."
type: "<xref href=\"com.azure.core.http.rest.PagedIterable?alt=com.azure.core.http.rest.PagedIterable&text=PagedIterable\" data-throw-if-not-resolved=\"False\" />&lt;<a href=\"https://docs.oracle.com/javase/8/docs/api/java/lang/String.html\">String</a>&gt;"
- uid: "com.azure.ai.metricsadvisor.MetricsAdvisorClient.listFeedback(java.lang.String)"
fullName: "com.azure.ai.metricsadvisor.MetricsAdvisorClient.listFeedback(String metricId)"
name: "listFeedback(String metricId)"
nameWithType: "MetricsAdvisorClient.listFeedback(String metricId)"
summary: "List information of all metric feedbacks on the metrics advisor account."
parameters:
- description: "the unique metric Id."
name: "metricId"
type: "<a href=\"https://docs.oracle.com/javase/8/docs/api/java/lang/String.html\">String</a>"
syntax: "public PagedIterable<MetricFeedback> listFeedback(String metricId)"
desc: "List information of all metric feedbacks on the metrics advisor account.\n\n**Code sample**\n\n```java\nfinal String metricId = \"d3gh4i4-b804-4ab9-a70f-0da0c89cft3l\";\n metricsAdvisorClient.listFeedback(metricId)\n .forEach(metricFeedback -> {\n System.out.printf(\"Data Feed Metric feedback Id: %s%n\", metricFeedback.getId());\n System.out.printf(\"Data Feed Metric feedback associated dimension filter: %s%n\",\n metricFeedback.getDimensionFilter().asMap());\n\n if (PERIOD.equals(metricFeedback.getFeedbackType())) {\n MetricPeriodFeedback periodFeedback\n = (MetricPeriodFeedback) metricFeedback;\n System.out.printf(\"Data Feed Metric feedback type: %s%n\",\n periodFeedback.getPeriodType().toString());\n System.out.printf(\"Data Feed Metric feedback period value: %d%n\",\n periodFeedback.getPeriodValue());\n } else if (ANOMALY.equals(metricFeedback.getFeedbackType())) {\n MetricAnomalyFeedback metricAnomalyFeedback\n = (MetricAnomalyFeedback) metricFeedback;\n System.out.printf(\"Data Feed Metric feedback anomaly value: %s%n\",\n metricAnomalyFeedback.getAnomalyValue().toString());\n System.out.printf(\"Data Feed Metric feedback associated detection configuration: %s%n\",\n metricAnomalyFeedback.getDetectionConfigurationId());\n } else if (COMMENT.equals(metricFeedback.getFeedbackType())) {\n MetricCommentFeedback metricCommentFeedback\n = (MetricCommentFeedback) metricFeedback;\n System.out.printf(\"Data Feed Metric feedback comment value: %s%n\",\n metricCommentFeedback.getComment());\n }\n });\n```"
returns:
description: "A <xref uid=\"com.azure.core.http.rest.PagedIterable\" data-throw-if-not-resolved=\"false\" data-raw-source=\"PagedIterable\"></xref> containing information of all the <xref uid=\"com.azure.ai.metricsadvisor.models.MetricFeedback\" data-throw-if-not-resolved=\"false\" data-raw-source=\"metric feedbacks\"></xref>\n in the account."
type: "<xref href=\"com.azure.core.http.rest.PagedIterable?alt=com.azure.core.http.rest.PagedIterable&text=PagedIterable\" data-throw-if-not-resolved=\"False\" />&lt;<xref href=\"com.azure.ai.metricsadvisor.models.MetricFeedback?alt=com.azure.ai.metricsadvisor.models.MetricFeedback&text=MetricFeedback\" data-throw-if-not-resolved=\"False\" />&gt;"
- uid: "com.azure.ai.metricsadvisor.MetricsAdvisorClient.listFeedback(java.lang.String,com.azure.ai.metricsadvisor.models.ListMetricFeedbackOptions,com.azure.core.util.Context)"
fullName: "com.azure.ai.metricsadvisor.MetricsAdvisorClient.listFeedback(String metricId, ListMetricFeedbackOptions options, Context context)"
name: "listFeedback(String metricId, ListMetricFeedbackOptions options, Context context)"
nameWithType: "MetricsAdvisorClient.listFeedback(String metricId, ListMetricFeedbackOptions options, Context context)"
summary: "List information of all metric feedbacks on the metrics advisor account."
parameters:
- description: "the unique metric Id."
name: "metricId"
type: "<a href=\"https://docs.oracle.com/javase/8/docs/api/java/lang/String.html\">String</a>"
- description: "The configurable <xref uid=\"com.azure.ai.metricsadvisor.models.ListMetricFeedbackOptions\" data-throw-if-not-resolved=\"false\" data-raw-source=\"options\"></xref> to pass for filtering the output\n result."
name: "options"
type: "<xref href=\"com.azure.ai.metricsadvisor.models.ListMetricFeedbackOptions?alt=com.azure.ai.metricsadvisor.models.ListMetricFeedbackOptions&text=ListMetricFeedbackOptions\" data-throw-if-not-resolved=\"False\" />"
- description: "Additional context that is passed through the HTTP pipeline during the service call."
name: "context"
type: "<xref href=\"com.azure.core.util.Context?alt=com.azure.core.util.Context&text=Context\" data-throw-if-not-resolved=\"False\" />"
syntax: "public PagedIterable<MetricFeedback> listFeedback(String metricId, ListMetricFeedbackOptions options, Context context)"
desc: "List information of all metric feedbacks on the metrics advisor account.\n\n**Code sample**\n\n```java\nfinal String metricId = \"d3gh4i4-b804-4ab9-a70f-0da0c89cft3l\";\n final OffsetDateTime startTime = OffsetDateTime.parse(\"2020-01-01T00:00:00Z\");\n final OffsetDateTime endTime = OffsetDateTime.parse(\"2020-09-09T00:00:00Z\");\n\n metricsAdvisorClient.listFeedback(metricId,\n new ListMetricFeedbackOptions()\n .setFilter(new ListMetricFeedbackFilter()\n .setStartTime(startTime)\n .setTimeMode(FeedbackQueryTimeMode.FEEDBACK_CREATED_TIME)\n .setEndTime(endTime)), Context.NONE)\n .forEach(metricFeedback -> {\n System.out.printf(\"Data Feed Metric feedback Id: %s%n\", metricFeedback.getId());\n System.out.printf(\"Data Feed Metric feedback associated dimension filter: %s%n\",\n metricFeedback.getDimensionFilter().asMap());\n System.out.printf(\"Data Feed Metric feedback created time %s%n\", metricFeedback.getCreatedTime());\n\n if (PERIOD.equals(metricFeedback.getFeedbackType())) {\n MetricPeriodFeedback periodFeedback\n = (MetricPeriodFeedback) metricFeedback;\n System.out.printf(\"Data Feed Metric feedback type: %s%n\",\n periodFeedback.getPeriodType().toString());\n System.out.printf(\"Data Feed Metric feedback period value: %d%n\",\n periodFeedback.getPeriodValue());\n } else if (ANOMALY.equals(metricFeedback.getFeedbackType())) {\n MetricAnomalyFeedback metricAnomalyFeedback\n = (MetricAnomalyFeedback) metricFeedback;\n System.out.printf(\"Data Feed Metric feedback anomaly value: %s%n\",\n metricAnomalyFeedback.getAnomalyValue().toString());\n System.out.printf(\"Data Feed Metric feedback associated detection configuration: %s%n\",\n metricAnomalyFeedback.getDetectionConfigurationId());\n } else if (COMMENT.equals(metricFeedback.getFeedbackType())) {\n MetricCommentFeedback metricCommentFeedback\n = (MetricCommentFeedback) metricFeedback;\n System.out.printf(\"Data Feed Metric feedback comment value: %s%n\",\n metricCommentFeedback.getComment());\n }\n });\n```"
returns:
description: "A <xref uid=\"com.azure.core.http.rest.PagedIterable\" data-throw-if-not-resolved=\"false\" data-raw-source=\"PagedIterable\"></xref> containing information of all the <xref uid=\"com.azure.ai.metricsadvisor.models.MetricFeedback\" data-throw-if-not-resolved=\"false\" data-raw-source=\"metric feedbacks\"></xref>\n in the account."
type: "<xref href=\"com.azure.core.http.rest.PagedIterable?alt=com.azure.core.http.rest.PagedIterable&text=PagedIterable\" data-throw-if-not-resolved=\"False\" />&lt;<xref href=\"com.azure.ai.metricsadvisor.models.MetricFeedback?alt=com.azure.ai.metricsadvisor.models.MetricFeedback&text=MetricFeedback\" data-throw-if-not-resolved=\"False\" />&gt;"
- uid: "com.azure.ai.metricsadvisor.MetricsAdvisorClient.listIncidentRootCauses(com.azure.ai.metricsadvisor.models.AnomalyIncident)"
fullName: "com.azure.ai.metricsadvisor.MetricsAdvisorClient.listIncidentRootCauses(AnomalyIncident anomalyIncident)"
name: "listIncidentRootCauses(AnomalyIncident anomalyIncident)"
nameWithType: "MetricsAdvisorClient.listIncidentRootCauses(AnomalyIncident anomalyIncident)"
summary: "List the root causes for an anomaly<wbr>Incident."
parameters:
- description: "the anomalyIncident for which you want to query root causes for."
name: "anomalyIncident"
type: "<xref href=\"com.azure.ai.metricsadvisor.models.AnomalyIncident?alt=com.azure.ai.metricsadvisor.models.AnomalyIncident&text=AnomalyIncident\" data-throw-if-not-resolved=\"False\" />"
syntax: "public PagedIterable<IncidentRootCause> listIncidentRootCauses(AnomalyIncident anomalyIncident)"
desc: "List the root causes for an anomalyIncident.\n\n**Code sample**\n\n```java\nfinal String detectionConfigurationId = \"c0f2539f-b804-4ab9-a70f-0da0c89c76d8\";\n final OffsetDateTime startTime = OffsetDateTime.parse(\"2020-01-01T00:00:00Z\");\n final OffsetDateTime endTime = OffsetDateTime.parse(\"2020-09-09T00:00:00Z\");\n\n metricsAdvisorClient.listIncidentsForDetectionConfig(detectionConfigurationId, startTime, endTime)\n .forEach(incident -> {\n metricsAdvisorClient.listIncidentRootCauses(incident)\n .forEach(incidentRootCause -> {\n System.out.printf(\"Description: %s%n\", incidentRootCause.getDescription());\n System.out.printf(\"Series Key:\");\n System.out.println(incidentRootCause.getSeriesKey().asMap());\n System.out.printf(\"Confidence for the detected incident root cause %.2f%n\",\n incidentRootCause.getContributionScore());\n });\n });\n```"
returns:
description: "the list of root causes for that anomalyIncident."
type: "<xref href=\"com.azure.core.http.rest.PagedIterable?alt=com.azure.core.http.rest.PagedIterable&text=PagedIterable\" data-throw-if-not-resolved=\"False\" />&lt;<xref href=\"com.azure.ai.metricsadvisor.models.IncidentRootCause?alt=com.azure.ai.metricsadvisor.models.IncidentRootCause&text=IncidentRootCause\" data-throw-if-not-resolved=\"False\" />&gt;"
- uid: "com.azure.ai.metricsadvisor.MetricsAdvisorClient.listIncidentRootCauses(java.lang.String,java.lang.String)"
fullName: "com.azure.ai.metricsadvisor.MetricsAdvisorClient.listIncidentRootCauses(String detectionConfigurationId, String incidentId)"
name: "listIncidentRootCauses(String detectionConfigurationId, String incidentId)"
nameWithType: "MetricsAdvisorClient.listIncidentRootCauses(String detectionConfigurationId, String incidentId)"
summary: "List the root causes for an incident."
parameters:
- description: "anomaly detection configuration unique id."
name: "detectionConfigurationId"
type: "<a href=\"https://docs.oracle.com/javase/8/docs/api/java/lang/String.html\">String</a>"
- description: "the incident for which you want to query root causes for."
name: "incidentId"
type: "<a href=\"https://docs.oracle.com/javase/8/docs/api/java/lang/String.html\">String</a>"
syntax: "public PagedIterable<IncidentRootCause> listIncidentRootCauses(String detectionConfigurationId, String incidentId)"
desc: "List the root causes for an incident.\n\n**Code sample**\n\n```java\nfinal String detectionConfigurationId = \"c0dddf2539f-b804-4ab9-a70f-0da0c89c76d8\";\n final String incidentId = \"c5thh0f2539f-b804-4ab9-a70f-0da0c89c456d\";\n\n metricsAdvisorClient.listIncidentRootCauses(detectionConfigurationId, incidentId)\n .forEach(incidentRootCause -> {\n System.out.printf(\"Description: %s%n\", incidentRootCause.getDescription());\n System.out.printf(\"Series Key:\");\n System.out.println(incidentRootCause.getSeriesKey().asMap());\n System.out.printf(\"Confidence for the detected incident root cause %.2f%n\",\n incidentRootCause.getContributionScore());\n });\n```"
returns:
description: "the list of root causes for that incident."
type: "<xref href=\"com.azure.core.http.rest.PagedIterable?alt=com.azure.core.http.rest.PagedIterable&text=PagedIterable\" data-throw-if-not-resolved=\"False\" />&lt;<xref href=\"com.azure.ai.metricsadvisor.models.IncidentRootCause?alt=com.azure.ai.metricsadvisor.models.IncidentRootCause&text=IncidentRootCause\" data-throw-if-not-resolved=\"False\" />&gt;"
- uid: "com.azure.ai.metricsadvisor.MetricsAdvisorClient.listIncidentRootCauses(java.lang.String,java.lang.String,com.azure.core.util.Context)"
fullName: "com.azure.ai.metricsadvisor.MetricsAdvisorClient.listIncidentRootCauses(String detectionConfigurationId, String incidentId, Context context)"
name: "listIncidentRootCauses(String detectionConfigurationId, String incidentId, Context context)"
nameWithType: "MetricsAdvisorClient.listIncidentRootCauses(String detectionConfigurationId, String incidentId, Context context)"
summary: "List the root causes for an incident."
parameters:
- description: "anomaly detection configuration unique id."
name: "detectionConfigurationId"
type: "<a href=\"https://docs.oracle.com/javase/8/docs/api/java/lang/String.html\">String</a>"
- description: "the incident for which you want to query root causes for."
name: "incidentId"
type: "<a href=\"https://docs.oracle.com/javase/8/docs/api/java/lang/String.html\">String</a>"
- description: "Additional context that is passed through the Http pipeline during the service call."
name: "context"
type: "<xref href=\"com.azure.core.util.Context?alt=com.azure.core.util.Context&text=Context\" data-throw-if-not-resolved=\"False\" />"
syntax: "public PagedIterable<IncidentRootCause> listIncidentRootCauses(String detectionConfigurationId, String incidentId, Context context)"
desc: "List the root causes for an incident.\n\n**Code sample**\n\n```java\nfinal String detectionConfigurationId = \"c0dddf2539f-b804-4ab9-a70f-0da0c89c76d8\";\n final String incidentId = \"c5thh0f2539f-b804-4ab9-a70f-0da0c89c456d\";\n\n PagedIterable<IncidentRootCause> rootCauseIterable\n = metricsAdvisorClient.listIncidentRootCauses(detectionConfigurationId, incidentId, Context.NONE);\n Stream<PagedResponse<IncidentRootCause>> rootCausePageIterable = rootCauseIterable.streamByPage();\n rootCausePageIterable.forEach(response -> {\n System.out.printf(\"Response StatusCode: %s%n\", response.getStatusCode());\n IterableStream<IncidentRootCause> pageElements = response.getElements();\n for (IncidentRootCause incidentRootCause : pageElements) {\n System.out.printf(\"Description: %s%n\", incidentRootCause.getDescription());\n System.out.printf(\"Series Key:\");\n System.out.println(incidentRootCause.getSeriesKey().asMap());\n System.out.printf(\"Confidence for the detected incident root cause %.2f%n\",\n incidentRootCause.getContributionScore());\n }\n });\n```"
returns:
description: "the list of root causes for that incident."
type: "<xref href=\"com.azure.core.http.rest.PagedIterable?alt=com.azure.core.http.rest.PagedIterable&text=PagedIterable\" data-throw-if-not-resolved=\"False\" />&lt;<xref href=\"com.azure.ai.metricsadvisor.models.IncidentRootCause?alt=com.azure.ai.metricsadvisor.models.IncidentRootCause&text=IncidentRootCause\" data-throw-if-not-resolved=\"False\" />&gt;"
- uid: "com.azure.ai.metricsadvisor.MetricsAdvisorClient.listIncidentsForAlert(java.lang.String,java.lang.String)"
fullName: "com.azure.ai.metricsadvisor.MetricsAdvisorClient.listIncidentsForAlert(String alertConfigurationId, String alertId)"
name: "listIncidentsForAlert(String alertConfigurationId, String alertId)"
nameWithType: "MetricsAdvisorClient.listIncidentsForAlert(String alertConfigurationId, String alertId)"
summary: "Fetch the incidents in an alert."
parameters:
- description: "The anomaly alert configuration id."
name: "alertConfigurationId"
type: "<a href=\"https://docs.oracle.com/javase/8/docs/api/java/lang/String.html\">String</a>"
- description: "The alert id."
name: "alertId"
type: "<a href=\"https://docs.oracle.com/javase/8/docs/api/java/lang/String.html\">String</a>"
syntax: "public PagedIterable<AnomalyIncident> listIncidentsForAlert(String alertConfigurationId, String alertId)"
desc: "Fetch the incidents in an alert.\n\n**Code sample**\n\n```java\nfinal String alertConfigurationId = \"ff3014a0-bbbb-41ec-a637-677e77b81299\";\n final String alertId = \"1746b031c00\";\n\n PagedIterable<AnomalyIncident> incidentsIterable = metricsAdvisorClient.listIncidentsForAlert(\n alertConfigurationId,\n alertId);\n\n Stream<PagedResponse<AnomalyIncident>> incidentsPageStream = incidentsIterable.streamByPage();\n int[] pageCount = new int[1];\n incidentsPageStream.forEach(incidentsPage -> {\n System.out.printf(\"Page: %d%n\", pageCount[0]++);\n IterableStream<AnomalyIncident> incidentsPageItems = incidentsPage.getElements();\n for (AnomalyIncident anomalyIncident : incidentsPageItems) {\n System.out.printf(\"Data Feed Metric Id: %s%n\", anomalyIncident.getMetricId());\n System.out.printf(\"Detection Configuration Id: %s%n\", anomalyIncident.getDetectionConfigurationId());\n System.out.printf(\"Anomaly Incident Id: %s%n\", anomalyIncident.getId());\n System.out.printf(\"Anomaly Incident Start Time: %s%n\", anomalyIncident.getStartTime());\n System.out.printf(\"Anomaly Incident AnomalySeverity: %s%n\", anomalyIncident.getSeverity());\n System.out.printf(\"Anomaly Incident Status: %s%n\", anomalyIncident.getStatus());\n System.out.printf(\"Root DataFeedDimension Key:\");\n DimensionKey rootDimension = anomalyIncident.getRootDimensionKey();\n for (Map.Entry<String, String> dimension : rootDimension.asMap().entrySet()) {\n System.out.printf(\"DimensionKey: %s DimensionValue:%s%n\",\n dimension.getKey(), dimension.getValue());\n }\n }\n });\n```"
returns:
description: "The incidents."
type: "<xref href=\"com.azure.core.http.rest.PagedIterable?alt=com.azure.core.http.rest.PagedIterable&text=PagedIterable\" data-throw-if-not-resolved=\"False\" />&lt;<xref href=\"com.azure.ai.metricsadvisor.models.AnomalyIncident?alt=com.azure.ai.metricsadvisor.models.AnomalyIncident&text=AnomalyIncident\" data-throw-if-not-resolved=\"False\" />&gt;"
- uid: "com.azure.ai.metricsadvisor.MetricsAdvisorClient.listIncidentsForAlert(java.lang.String,java.lang.String,com.azure.ai.metricsadvisor.models.ListIncidentsAlertedOptions,com.azure.core.util.Context)"
fullName: "com.azure.ai.metricsadvisor.MetricsAdvisorClient.listIncidentsForAlert(String alertConfigurationId, String alertId, ListIncidentsAlertedOptions options, Context context)"
name: "listIncidentsForAlert(String alertConfigurationId, String alertId, ListIncidentsAlertedOptions options, Context context)"
nameWithType: "MetricsAdvisorClient.listIncidentsForAlert(String alertConfigurationId, String alertId, ListIncidentsAlertedOptions options, Context context)"
summary: "Fetch the incidents in an alert."
parameters:
- description: "The anomaly alert configuration id."
name: "alertConfigurationId"
type: "<a href=\"https://docs.oracle.com/javase/8/docs/api/java/lang/String.html\">String</a>"
- description: "The alert id."
name: "alertId"
type: "<a href=\"https://docs.oracle.com/javase/8/docs/api/java/lang/String.html\">String</a>"
- description: "The additional parameters."
name: "options"
type: "<xref href=\"com.azure.ai.metricsadvisor.models.ListIncidentsAlertedOptions?alt=com.azure.ai.metricsadvisor.models.ListIncidentsAlertedOptions&text=ListIncidentsAlertedOptions\" data-throw-if-not-resolved=\"False\" />"
- description: "Additional context that is passed through the Http pipeline during the service call."
name: "context"
type: "<xref href=\"com.azure.core.util.Context?alt=com.azure.core.util.Context&text=Context\" data-throw-if-not-resolved=\"False\" />"
syntax: "public PagedIterable<AnomalyIncident> listIncidentsForAlert(String alertConfigurationId, String alertId, ListIncidentsAlertedOptions options, Context context)"
desc: "Fetch the incidents in an alert.\n\n**Code sample**\n\n```java\nfinal String alertConfigurationId = \"ff3014a0-bbbb-41ec-a637-677e77b81299\";\n final String alertId = \"1746b031c00\";\n final ListIncidentsAlertedOptions options = new ListIncidentsAlertedOptions()\n .setMaxPageSize(10);\n\n PagedIterable<AnomalyIncident> incidentsIterable = metricsAdvisorClient.listIncidentsForAlert(\n alertConfigurationId,\n alertId,\n options,\n Context.NONE);\n\n Stream<PagedResponse<AnomalyIncident>> incidentsPageStream = incidentsIterable.streamByPage();\n int[] pageCount = new int[1];\n incidentsPageStream.forEach(incidentsPage -> {\n System.out.printf(\"Page: %d%n\", pageCount[0]++);\n IterableStream<AnomalyIncident> incidentsPageItems = incidentsPage.getElements();\n for (AnomalyIncident anomalyIncident : incidentsPageItems) {\n System.out.printf(\"Data Feed Metric Id: %s%n\", anomalyIncident.getMetricId());\n System.out.printf(\"Detection Configuration Id: %s%n\", anomalyIncident.getDetectionConfigurationId());\n System.out.printf(\"Anomaly Incident Id: %s%n\", anomalyIncident.getId());\n System.out.printf(\"Anomaly Incident Start Time: %s%n\", anomalyIncident.getStartTime());\n System.out.printf(\"Anomaly Incident AnomalySeverity: %s%n\", anomalyIncident.getSeverity());\n System.out.printf(\"Anomaly Incident Status: %s%n\", anomalyIncident.getStatus());\n System.out.printf(\"Root DataFeedDimension Key:\");\n DimensionKey rootDimension = anomalyIncident.getRootDimensionKey();\n for (Map.Entry<String, String> dimension : rootDimension.asMap().entrySet()) {\n System.out.printf(\"DimensionKey: %s DimensionValue:%s%n\",\n dimension.getKey(), dimension.getValue());\n }\n }\n });\n```"
returns:
description: "The incidents."
type: "<xref href=\"com.azure.core.http.rest.PagedIterable?alt=com.azure.core.http.rest.PagedIterable&text=PagedIterable\" data-throw-if-not-resolved=\"False\" />&lt;<xref href=\"com.azure.ai.metricsadvisor.models.AnomalyIncident?alt=com.azure.ai.metricsadvisor.models.AnomalyIncident&text=AnomalyIncident\" data-throw-if-not-resolved=\"False\" />&gt;"
- uid: "com.azure.ai.metricsadvisor.MetricsAdvisorClient.listIncidentsForDetectionConfig(java.lang.String,java.time.OffsetDateTime,java.time.OffsetDateTime)"
fullName: "com.azure.ai.metricsadvisor.MetricsAdvisorClient.listIncidentsForDetectionConfig(String detectionConfigurationId, OffsetDateTime startTime, OffsetDateTime endTime)"
name: "listIncidentsForDetectionConfig(String detectionConfigurationId, OffsetDateTime startTime, OffsetDateTime endTime)"
nameWithType: "MetricsAdvisorClient.listIncidentsForDetectionConfig(String detectionConfigurationId, OffsetDateTime startTime, OffsetDateTime endTime)"
summary: "Fetch the incidents identified by an anomaly detection configuration."
parameters:
- description: "The anomaly detection configuration id."
name: "detectionConfigurationId"
type: "<a href=\"https://docs.oracle.com/javase/8/docs/api/java/lang/String.html\">String</a>"
- description: "The start time of the time range within which the incidents were detected."
name: "startTime"
type: "<a href=\"https://docs.oracle.com/javase/8/docs/api/java/time/OffsetDateTime.html\">OffsetDateTime</a>"
- description: "The end time of the time range within which the incidents were detected."
name: "endTime"
type: "<a href=\"https://docs.oracle.com/javase/8/docs/api/java/time/OffsetDateTime.html\">OffsetDateTime</a>"
syntax: "public PagedIterable<AnomalyIncident> listIncidentsForDetectionConfig(String detectionConfigurationId, OffsetDateTime startTime, OffsetDateTime endTime)"
desc: "Fetch the incidents identified by an anomaly detection configuration.\n\n**Code sample**\n\n```java\nfinal String detectionConfigurationId = \"c0f2539f-b804-4ab9-a70f-0da0c89c76d8\";\n final OffsetDateTime startTime = OffsetDateTime.parse(\"2020-09-09T00:00:00Z\");\n final OffsetDateTime endTime = OffsetDateTime.parse(\"2020-09-09T12:00:00Z\");\n\n PagedIterable<AnomalyIncident> incidentsIterable\n = metricsAdvisorClient.listIncidentsForDetectionConfig(detectionConfigurationId, startTime, endTime);\n\n for (AnomalyIncident anomalyIncident : incidentsIterable) {\n System.out.printf(\"Data Feed Metric Id: %s%n\", anomalyIncident.getMetricId());\n System.out.printf(\"Detection Configuration Id: %s%n\", anomalyIncident.getDetectionConfigurationId());\n System.out.printf(\"Anomaly Incident Id: %s%n\", anomalyIncident.getId());\n System.out.printf(\"Anomaly Incident Start Time: %s%n\", anomalyIncident.getStartTime());\n System.out.printf(\"Anomaly Incident AnomalySeverity: %s%n\", anomalyIncident.getSeverity());\n System.out.printf(\"Anomaly Incident Status: %s%n\", anomalyIncident.getStatus());\n System.out.printf(\"Root DataFeedDimension Key: %s%n\", anomalyIncident.getRootDimensionKey().asMap());\n }\n```"
returns:
description: "The incidents."
type: "<xref href=\"com.azure.core.http.rest.PagedIterable?alt=com.azure.core.http.rest.PagedIterable&text=PagedIterable\" data-throw-if-not-resolved=\"False\" />&lt;<xref href=\"com.azure.ai.metricsadvisor.models.AnomalyIncident?alt=com.azure.ai.metricsadvisor.models.AnomalyIncident&text=AnomalyIncident\" data-throw-if-not-resolved=\"False\" />&gt;"
- uid: "com.azure.ai.metricsadvisor.MetricsAdvisorClient.listIncidentsForDetectionConfig(java.lang.String,java.time.OffsetDateTime,java.time.OffsetDateTime,com.azure.ai.metricsadvisor.models.ListIncidentsDetectedOptions,com.azure.core.util.Context)"
fullName: "com.azure.ai.metricsadvisor.MetricsAdvisorClient.listIncidentsForDetectionConfig(String detectionConfigurationId, OffsetDateTime startTime, OffsetDateTime endTime, ListIncidentsDetectedOptions options, Context context)"
name: "listIncidentsForDetectionConfig(String detectionConfigurationId, OffsetDateTime startTime, OffsetDateTime endTime, ListIncidentsDetectedOptions options, Context context)"
nameWithType: "MetricsAdvisorClient.listIncidentsForDetectionConfig(String detectionConfigurationId, OffsetDateTime startTime, OffsetDateTime endTime, ListIncidentsDetectedOptions options, Context context)"
summary: "Fetch the incidents identified by an anomaly detection configuration."
parameters:
- description: "The anomaly detection configuration id."
name: "detectionConfigurationId"
type: "<a href=\"https://docs.oracle.com/javase/8/docs/api/java/lang/String.html\">String</a>"
- description: "The start time of the time range within which the incidents were detected."
name: "startTime"
type: "<a href=\"https://docs.oracle.com/javase/8/docs/api/java/time/OffsetDateTime.html\">OffsetDateTime</a>"
- description: "The end time of the time range within which the incidents were detected."
name: "endTime"
type: "<a href=\"https://docs.oracle.com/javase/8/docs/api/java/time/OffsetDateTime.html\">OffsetDateTime</a>"
- description: "The additional parameters."
name: "options"
type: "<xref href=\"com.azure.ai.metricsadvisor.models.ListIncidentsDetectedOptions?alt=com.azure.ai.metricsadvisor.models.ListIncidentsDetectedOptions&text=ListIncidentsDetectedOptions\" data-throw-if-not-resolved=\"False\" />"
- description: "Additional context that is passed through the Http pipeline during the service call."
name: "context"
type: "<xref href=\"com.azure.core.util.Context?alt=com.azure.core.util.Context&text=Context\" data-throw-if-not-resolved=\"False\" />"
syntax: "public PagedIterable<AnomalyIncident> listIncidentsForDetectionConfig(String detectionConfigurationId, OffsetDateTime startTime, OffsetDateTime endTime, ListIncidentsDetectedOptions options, Context context)"
desc: "Fetch the incidents identified by an anomaly detection configuration.\n\n**Code sample**\n\n```java\nfinal String detectionConfigurationId = \"c0f2539f-b804-4ab9-a70f-0da0c89c76d8\";\n final OffsetDateTime startTime = OffsetDateTime.parse(\"2020-09-09T00:00:00Z\");\n final OffsetDateTime endTime = OffsetDateTime.parse(\"2020-09-09T12:00:00Z\");\n final ListIncidentsDetectedOptions options = new ListIncidentsDetectedOptions()\n .setMaxPageSize(1000);\n\n PagedIterable<AnomalyIncident> incidentsIterable\n = metricsAdvisorClient.listIncidentsForDetectionConfig(detectionConfigurationId,\n startTime, endTime, options,\n Context.NONE);\n\n Stream<PagedResponse<AnomalyIncident>> incidentsPageStream = incidentsIterable.streamByPage();\n\n int[] pageCount = new int[1];\n incidentsPageStream.forEach(incidentsPage -> {\n System.out.printf(\"Page: %d%n\", pageCount[0]++);\n IterableStream<AnomalyIncident> pageElements = incidentsPage.getElements();\n for (AnomalyIncident anomalyIncident : pageElements) {\n System.out.printf(\"Data Feed Metric Id: %s%n\", anomalyIncident.getMetricId());\n System.out.printf(\"Detection Configuration Id: %s%n\", anomalyIncident.getDetectionConfigurationId());\n System.out.printf(\"Anomaly Incident Id: %s%n\", anomalyIncident.getId());\n System.out.printf(\"Anomaly Incident Start Time: %s%n\", anomalyIncident.getStartTime());\n System.out.printf(\"Anomaly Incident AnomalySeverity: %s%n\", anomalyIncident.getSeverity());\n System.out.printf(\"Anomaly Incident Status: %s%n\", anomalyIncident.getStatus());\n System.out.printf(\"Root DataFeedDimension Key:\");\n System.out.printf(\"Root DataFeedDimension Key: %s%n\", anomalyIncident.getRootDimensionKey().asMap());\n }\n });\n```"
returns:
description: "The incidents."
type: "<xref href=\"com.azure.core.http.rest.PagedIterable?alt=com.azure.core.http.rest.PagedIterable&text=PagedIterable\" data-throw-if-not-resolved=\"False\" />&lt;<xref href=\"com.azure.ai.metricsadvisor.models.AnomalyIncident?alt=com.azure.ai.metricsadvisor.models.AnomalyIncident&text=AnomalyIncident\" data-throw-if-not-resolved=\"False\" />&gt;"
- uid: "com.azure.ai.metricsadvisor.MetricsAdvisorClient.listMetricDimensionValues(java.lang.String,java.lang.String)"
fullName: "com.azure.ai.metricsadvisor.MetricsAdvisorClient.listMetricDimensionValues(String metricId, String dimensionName)"
name: "listMetricDimensionValues(String metricId, String dimensionName)"
nameWithType: "MetricsAdvisorClient.listMetricDimensionValues(String metricId, String dimensionName)"
summary: "List dimension values from certain metric."
parameters:
- description: "metric unique id."
name: "metricId"
type: "<a href=\"https://docs.oracle.com/javase/8/docs/api/java/lang/String.html\">String</a>"
- description: "the query dimension name."
name: "dimensionName"
type: "<a href=\"https://docs.oracle.com/javase/8/docs/api/java/lang/String.html\">String</a>"
syntax: "public PagedIterable<String> listMetricDimensionValues(String metricId, String dimensionName)"
desc: "List dimension values from certain metric.\n\n**Code sample**\n\n```java\nfinal String metricId = \"gh3014a0-41ec-a637-677e77b81455\";\n metricsAdvisorClient.listMetricDimensionValues(metricId, \"category\")\n .forEach(System.out::println);\n```"
returns:
description: "the <xref uid=\"com.azure.core.http.rest.PagedIterable\" data-throw-if-not-resolved=\"false\" data-raw-source=\"PagedIterable\"></xref> of the dimension values for that metric."
type: "<xref href=\"com.azure.core.http.rest.PagedIterable?alt=com.azure.core.http.rest.PagedIterable&text=PagedIterable\" data-throw-if-not-resolved=\"False\" />&lt;<a href=\"https://docs.oracle.com/javase/8/docs/api/java/lang/String.html\">String</a>&gt;"
- uid: "com.azure.ai.metricsadvisor.MetricsAdvisorClient.listMetricDimensionValues(java.lang.String,java.lang.String,com.azure.ai.metricsadvisor.models.ListMetricDimensionValuesOptions,com.azure.core.util.Context)"
fullName: "com.azure.ai.metricsadvisor.MetricsAdvisorClient.listMetricDimensionValues(String metricId, String dimensionName, ListMetricDimensionValuesOptions options, Context context)"
name: "listMetricDimensionValues(String metricId, String dimensionName, ListMetricDimensionValuesOptions options, Context context)"
nameWithType: "MetricsAdvisorClient.listMetricDimensionValues(String metricId, String dimensionName, ListMetricDimensionValuesOptions options, Context context)"
summary: "List dimension values from certain metric."
parameters:
- description: "metric unique id."
name: "metricId"
type: "<a href=\"https://docs.oracle.com/javase/8/docs/api/java/lang/String.html\">String</a>"
- description: "the query dimension name."
name: "dimensionName"
type: "<a href=\"https://docs.oracle.com/javase/8/docs/api/java/lang/String.html\">String</a>"
- description: "the additional parameters to specify while querying."
name: "options"
type: "<xref href=\"com.azure.ai.metricsadvisor.models.ListMetricDimensionValuesOptions?alt=com.azure.ai.metricsadvisor.models.ListMetricDimensionValuesOptions&text=ListMetricDimensionValuesOptions\" data-throw-if-not-resolved=\"False\" />"
- description: "Additional context that is passed through the HTTP pipeline during the service call."
name: "context"
type: "<xref href=\"com.azure.core.util.Context?alt=com.azure.core.util.Context&text=Context\" data-throw-if-not-resolved=\"False\" />"
syntax: "public PagedIterable<String> listMetricDimensionValues(String metricId, String dimensionName, ListMetricDimensionValuesOptions options, Context context)"
desc: "List dimension values from certain metric.\n\n**Code sample**\n\n```java\nfinal String metricId = \"gh3014a0-41ec-a637-677e77b81455\";\n metricsAdvisorClient.listMetricDimensionValues(metricId, \"category\",\n new ListMetricDimensionValuesOptions().setDimensionValueToFilter(\"Electronics\")\n .setMaxPageSize(3), Context.NONE)\n .forEach(System.out::println);\n```"
returns:
description: "the <xref uid=\"com.azure.core.http.rest.PagedIterable\" data-throw-if-not-resolved=\"false\" data-raw-source=\"PagedIterable\"></xref> of the dimension values for that metric."
type: "<xref href=\"com.azure.core.http.rest.PagedIterable?alt=com.azure.core.http.rest.PagedIterable&text=PagedIterable\" data-throw-if-not-resolved=\"False\" />&lt;<a href=\"https://docs.oracle.com/javase/8/docs/api/java/lang/String.html\">String</a>&gt;"
- uid: "com.azure.ai.metricsadvisor.MetricsAdvisorClient.listMetricEnrichedSeriesData(java.lang.String,java.util.List<com.azure.ai.metricsadvisor.models.DimensionKey>,java.time.OffsetDateTime,java.time.OffsetDateTime)"
fullName: "com.azure.ai.metricsadvisor.MetricsAdvisorClient.listMetricEnrichedSeriesData(String detectionConfigurationId, List<DimensionKey> seriesKeys, OffsetDateTime startTime, OffsetDateTime endTime)"
name: "listMetricEnrichedSeriesData(String detectionConfigurationId, List<DimensionKey> seriesKeys, OffsetDateTime startTime, OffsetDateTime endTime)"
nameWithType: "MetricsAdvisorClient.listMetricEnrichedSeriesData(String detectionConfigurationId, List<DimensionKey> seriesKeys, OffsetDateTime startTime, OffsetDateTime endTime)"
summary: "Given a list of time series keys, retrieve time series version enriched using a detection configuration."
parameters:
- description: "The id of the configuration used to enrich the time series\n identified by the keys in <code>seriesKeys</code>."
name: "detectionConfigurationId"
type: "<a href=\"https://docs.oracle.com/javase/8/docs/api/java/lang/String.html\">String</a>"
- description: "The time series key list, each key identifies a specific time series."
name: "seriesKeys"
type: "<a href=\"https://docs.oracle.com/javase/8/docs/api/java/util/List.html\">List</a>&lt;<xref href=\"com.azure.ai.metricsadvisor.models.DimensionKey?alt=com.azure.ai.metricsadvisor.models.DimensionKey&text=DimensionKey\" data-throw-if-not-resolved=\"False\" />&gt;"
- description: "The start time."
name: "startTime"
type: "<a href=\"https://docs.oracle.com/javase/8/docs/api/java/time/OffsetDateTime.html\">OffsetDateTime</a>"
- description: "The end time."
name: "endTime"
type: "<a href=\"https://docs.oracle.com/javase/8/docs/api/java/time/OffsetDateTime.html\">OffsetDateTime</a>"
syntax: "public PagedIterable<MetricEnrichedSeriesData> listMetricEnrichedSeriesData(String detectionConfigurationId, List<DimensionKey> seriesKeys, OffsetDateTime startTime, OffsetDateTime endTime)"
desc: "Given a list of time series keys, retrieve time series version enriched using a detection configuration.\n\n**Code sample**\n\n```java\nfinal String detectionConfigurationId = \"e87d899d-a5a0-4259-b752-11aea34d5e34\";\n final DimensionKey seriesKey = new DimensionKey()\n .put(\"Dim1\", \"Common Lime\")\n .put(\"Dim2\", \"Antelope\");\n final OffsetDateTime startTime = OffsetDateTime.parse(\"2020-08-12T00:00:00Z\");\n final OffsetDateTime endTime = OffsetDateTime.parse(\"2020-09-12T00:00:00Z\");\n\n PagedIterable<MetricEnrichedSeriesData> enrichedDataIterable\n = metricsAdvisorClient.listMetricEnrichedSeriesData(detectionConfigurationId,\n Arrays.asList(seriesKey),\n startTime,\n endTime);\n\n for (MetricEnrichedSeriesData enrichedData : enrichedDataIterable) {\n System.out.printf(\"Series Key %s%n:\", enrichedData.getSeriesKey().asMap());\n System.out.println(\"List of data points for this series\");\n System.out.println(enrichedData.getMetricValues());\n System.out.println(\"Timestamps of the data related to this time series:\");\n System.out.println(enrichedData.getTimestamps());\n System.out.println(\"The expected values of the data points calculated by the smart detector:\");\n System.out.println(enrichedData.getExpectedMetricValues());\n System.out.println(\"The lower boundary values of the data points calculated by smart detector:\");\n System.out.println(enrichedData.getLowerBoundaryValues());\n System.out.println(\"the periods calculated for the data points in the time series:\");\n System.out.println(enrichedData.getPeriods());\n }\n```"
returns:
description: "The enriched time series."
type: "<xref href=\"com.azure.core.http.rest.PagedIterable?alt=com.azure.core.http.rest.PagedIterable&text=PagedIterable\" data-throw-if-not-resolved=\"False\" />&lt;<xref href=\"com.azure.ai.metricsadvisor.models.MetricEnrichedSeriesData?alt=com.azure.ai.metricsadvisor.models.MetricEnrichedSeriesData&text=MetricEnrichedSeriesData\" data-throw-if-not-resolved=\"False\" />&gt;"
- uid: "com.azure.ai.metricsadvisor.MetricsAdvisorClient.listMetricEnrichedSeriesData(java.lang.String,java.util.List<com.azure.ai.metricsadvisor.models.DimensionKey>,java.time.OffsetDateTime,java.time.OffsetDateTime,com.azure.core.util.Context)"
fullName: "com.azure.ai.metricsadvisor.MetricsAdvisorClient.listMetricEnrichedSeriesData(String detectionConfigurationId, List<DimensionKey> seriesKeys, OffsetDateTime startTime, OffsetDateTime endTime, Context context)"
name: "listMetricEnrichedSeriesData(String detectionConfigurationId, List<DimensionKey> seriesKeys, OffsetDateTime startTime, OffsetDateTime endTime, Context context)"
nameWithType: "MetricsAdvisorClient.listMetricEnrichedSeriesData(String detectionConfigurationId, List<DimensionKey> seriesKeys, OffsetDateTime startTime, OffsetDateTime endTime, Context context)"
summary: "Given a list of time series keys, retrieve time series version enriched using a detection configuration."
parameters:
- description: "The id of the configuration used to enrich the time series\n identified by the keys in <code>seriesKeys</code>."
name: "detectionConfigurationId"
type: "<a href=\"https://docs.oracle.com/javase/8/docs/api/java/lang/String.html\">String</a>"
- description: "The time series key list, each key identifies a specific time series."
name: "seriesKeys"
type: "<a href=\"https://docs.oracle.com/javase/8/docs/api/java/util/List.html\">List</a>&lt;<xref href=\"com.azure.ai.metricsadvisor.models.DimensionKey?alt=com.azure.ai.metricsadvisor.models.DimensionKey&text=DimensionKey\" data-throw-if-not-resolved=\"False\" />&gt;"
- description: "The start time of the time range within which the enriched data is returned."
name: "startTime"
type: "<a href=\"https://docs.oracle.com/javase/8/docs/api/java/time/OffsetDateTime.html\">OffsetDateTime</a>"
- description: "The end time of the time range within which the enriched data is returned."
name: "endTime"
type: "<a href=\"https://docs.oracle.com/javase/8/docs/api/java/time/OffsetDateTime.html\">OffsetDateTime</a>"
- description: "Additional context that is passed through the Http pipeline during the service call."
name: "context"
type: "<xref href=\"com.azure.core.util.Context?alt=com.azure.core.util.Context&text=Context\" data-throw-if-not-resolved=\"False\" />"
syntax: "public PagedIterable<MetricEnrichedSeriesData> listMetricEnrichedSeriesData(String detectionConfigurationId, List<DimensionKey> seriesKeys, OffsetDateTime startTime, OffsetDateTime endTime, Context context)"
desc: "Given a list of time series keys, retrieve time series version enriched using a detection configuration.\n\n**Code sample**\n\n```java\nfinal String detectionConfigurationId = \"e87d899d-a5a0-4259-b752-11aea34d5e34\";\n final DimensionKey seriesKey = new DimensionKey()\n .put(\"Dim1\", \"Common Lime\")\n .put(\"Dim2\", \"Antelope\");\n final OffsetDateTime startTime = OffsetDateTime.parse(\"2020-08-12T00:00:00Z\");\n final OffsetDateTime endTime = OffsetDateTime.parse(\"2020-09-12T00:00:00Z\");\n\n PagedIterable<MetricEnrichedSeriesData> enrichedDataIterable\n = metricsAdvisorClient.listMetricEnrichedSeriesData(detectionConfigurationId,\n Arrays.asList(seriesKey),\n startTime,\n endTime);\n\n Stream<PagedResponse<MetricEnrichedSeriesData>> enrichedDataPageStream\n = enrichedDataIterable.streamByPage();\n int[] pageCount = new int[1];\n enrichedDataPageStream.forEach(enrichedDataPage -> {\n System.out.printf(\"Page: %d%n\", pageCount[0]++);\n IterableStream<MetricEnrichedSeriesData> pageElements = enrichedDataPage.getElements();\n for (MetricEnrichedSeriesData enrichedData : pageElements) {\n System.out.printf(\"Series Key %s%n:\", enrichedData.getSeriesKey().asMap());\n System.out.println(\"List of data points for this series\");\n System.out.println(enrichedData.getMetricValues());\n System.out.println(\"Timestamps of the data related to this time series:\");\n System.out.println(enrichedData.getTimestamps());\n System.out.println(\"The expected values of the data points calculated by the smart detector:\");\n System.out.println(enrichedData.getExpectedMetricValues());\n System.out.println(\"The lower boundary values of the data points calculated by smart detector:\");\n System.out.println(enrichedData.getLowerBoundaryValues());\n System.out.println(\"the periods calculated for the data points in the time series:\");\n System.out.println(enrichedData.getPeriods());\n }\n });\n```"
returns:
description: "The enriched time series."
type: "<xref href=\"com.azure.core.http.rest.PagedIterable?alt=com.azure.core.http.rest.PagedIterable&text=PagedIterable\" data-throw-if-not-resolved=\"False\" />&lt;<xref href=\"com.azure.ai.metricsadvisor.models.MetricEnrichedSeriesData?alt=com.azure.ai.metricsadvisor.models.MetricEnrichedSeriesData&text=MetricEnrichedSeriesData\" data-throw-if-not-resolved=\"False\" />&gt;"
- uid: "com.azure.ai.metricsadvisor.MetricsAdvisorClient.listMetricEnrichmentStatus(java.lang.String,java.time.OffsetDateTime,java.time.OffsetDateTime)"
fullName: "com.azure.ai.metricsadvisor.MetricsAdvisorClient.listMetricEnrichmentStatus(String metricId, OffsetDateTime startTime, OffsetDateTime endTime)"
name: "listMetricEnrichmentStatus(String metricId, OffsetDateTime startTime, OffsetDateTime endTime)"
nameWithType: "MetricsAdvisorClient.listMetricEnrichmentStatus(String metricId, OffsetDateTime startTime, OffsetDateTime endTime)"
summary: "List the enrichment status for a metric."
parameters:
- description: "metric unique id."
name: "metricId"
type: "<a href=\"https://docs.oracle.com/javase/8/docs/api/java/lang/String.html\">String</a>"
- description: "The start time for querying the time series data."
name: "startTime"
type: "<a href=\"https://docs.oracle.com/javase/8/docs/api/java/time/OffsetDateTime.html\">OffsetDateTime</a>"
- description: "The end time for querying the time series data."
name: "endTime"
type: "<a href=\"https://docs.oracle.com/javase/8/docs/api/java/time/OffsetDateTime.html\">OffsetDateTime</a>"
syntax: "public PagedIterable<EnrichmentStatus> listMetricEnrichmentStatus(String metricId, OffsetDateTime startTime, OffsetDateTime endTime)"
desc: "List the enrichment status for a metric.\n\n**Code sample**\n\n```java\nfinal OffsetDateTime startTime = OffsetDateTime.parse(\"2020-01-01T00:00:00Z\");\n final OffsetDateTime endTime = OffsetDateTime.parse(\"2020-09-09T00:00:00Z\");\n final String metricId = \"d3gh4i4-b804-4ab9-a70f-0da0c89cft3l\";\n\n metricsAdvisorClient.listMetricEnrichmentStatus(metricId, startTime, endTime)\n .forEach(enrichmentStatus -> {\n System.out.printf(\"Data Feed Metric enrichment status : %s%n\", enrichmentStatus.getStatus());\n System.out.printf(\"Data Feed Metric enrichment status message: %s%n\", enrichmentStatus.getMessage());\n System.out.printf(\"Data Feed Metric enrichment status data slice timestamp : %s%n\",\n enrichmentStatus.getTimestamp());\n });\n```"
returns:
description: "the list of enrichment status's for the specified metric."
type: "<xref href=\"com.azure.core.http.rest.PagedIterable?alt=com.azure.core.http.rest.PagedIterable&text=PagedIterable\" data-throw-if-not-resolved=\"False\" />&lt;<xref href=\"com.azure.ai.metricsadvisor.models.EnrichmentStatus?alt=com.azure.ai.metricsadvisor.models.EnrichmentStatus&text=EnrichmentStatus\" data-throw-if-not-resolved=\"False\" />&gt;"
- uid: "com.azure.ai.metricsadvisor.MetricsAdvisorClient.listMetricEnrichmentStatus(java.lang.String,java.time.OffsetDateTime,java.time.OffsetDateTime,com.azure.ai.metricsadvisor.models.ListMetricEnrichmentStatusOptions,com.azure.core.util.Context)"
fullName: "com.azure.ai.metricsadvisor.MetricsAdvisorClient.listMetricEnrichmentStatus(String metricId, OffsetDateTime startTime, OffsetDateTime endTime, ListMetricEnrichmentStatusOptions options, Context context)"
name: "listMetricEnrichmentStatus(String metricId, OffsetDateTime startTime, OffsetDateTime endTime, ListMetricEnrichmentStatusOptions options, Context context)"
nameWithType: "MetricsAdvisorClient.listMetricEnrichmentStatus(String metricId, OffsetDateTime startTime, OffsetDateTime endTime, ListMetricEnrichmentStatusOptions options, Context context)"
summary: "List the enrichment status for a metric."
parameters:
- description: "metric unique id."
name: "metricId"
type: "<a href=\"https://docs.oracle.com/javase/8/docs/api/java/lang/String.html\">String</a>"
- description: "The start time for querying the time series data."
name: "startTime"
type: "<a href=\"https://docs.oracle.com/javase/8/docs/api/java/time/OffsetDateTime.html\">OffsetDateTime</a>"
- description: "The end time for querying the time series data."
name: "endTime"
type: "<a href=\"https://docs.oracle.com/javase/8/docs/api/java/time/OffsetDateTime.html\">OffsetDateTime</a>"
- description: "the additional configurable options to specify when querying the result."
name: "options"
type: "<xref href=\"com.azure.ai.metricsadvisor.models.ListMetricEnrichmentStatusOptions?alt=com.azure.ai.metricsadvisor.models.ListMetricEnrichmentStatusOptions&text=ListMetricEnrichmentStatusOptions\" data-throw-if-not-resolved=\"False\" />"
- description: "Additional context that is passed through the Http pipeline during the service call."
name: "context"
type: "<xref href=\"com.azure.core.util.Context?alt=com.azure.core.util.Context&text=Context\" data-throw-if-not-resolved=\"False\" />"
syntax: "public PagedIterable<EnrichmentStatus> listMetricEnrichmentStatus(String metricId, OffsetDateTime startTime, OffsetDateTime endTime, ListMetricEnrichmentStatusOptions options, Context context)"
desc: "List the enrichment status for a metric.\n\n**Code sample**\n\n```java\nfinal OffsetDateTime startTime = OffsetDateTime.parse(\"2020-01-01T00:00:00Z\");\n final OffsetDateTime endTime = OffsetDateTime.parse(\"2020-09-09T00:00:00Z\");\n final String metricId = \"d3gh4i4-b804-4ab9-a70f-0da0c89cft3l\";\n final ListMetricEnrichmentStatusOptions options = new ListMetricEnrichmentStatusOptions().setMaxPageSize(10);\n\n metricsAdvisorClient.listMetricEnrichmentStatus(metricId, startTime, endTime, options, Context.NONE)\n .forEach(enrichmentStatus -> {\n System.out.printf(\"Data Feed Metric enrichment status : %s%n\", enrichmentStatus.getStatus());\n System.out.printf(\"Data Feed Metric enrichment status message: %s%n\", enrichmentStatus.getMessage());\n System.out.printf(\"Data Feed Metric enrichment status data slice timestamp : %s%n\",\n enrichmentStatus.getTimestamp());\n });\n```"
returns:
description: "the list of enrichment status's for the specified metric."
type: "<xref href=\"com.azure.core.http.rest.PagedIterable?alt=com.azure.core.http.rest.PagedIterable&text=PagedIterable\" data-throw-if-not-resolved=\"False\" />&lt;<xref href=\"com.azure.ai.metricsadvisor.models.EnrichmentStatus?alt=com.azure.ai.metricsadvisor.models.EnrichmentStatus&text=EnrichmentStatus\" data-throw-if-not-resolved=\"False\" />&gt;"
- uid: "com.azure.ai.metricsadvisor.MetricsAdvisorClient.listMetricSeriesData(java.lang.String,java.util.List<com.azure.ai.metricsadvisor.models.DimensionKey>,java.time.OffsetDateTime,java.time.OffsetDateTime)"
fullName: "com.azure.ai.metricsadvisor.MetricsAdvisorClient.listMetricSeriesData(String metricId, List<DimensionKey> seriesKeys, OffsetDateTime startTime, OffsetDateTime endTime)"
name: "listMetricSeriesData(String metricId, List<DimensionKey> seriesKeys, OffsetDateTime startTime, OffsetDateTime endTime)"
nameWithType: "MetricsAdvisorClient.listMetricSeriesData(String metricId, List<DimensionKey> seriesKeys, OffsetDateTime startTime, OffsetDateTime endTime)"
summary: "Get time series data from metric."
parameters:
- description: "metric unique id."
name: "metricId"
type: "<a href=\"https://docs.oracle.com/javase/8/docs/api/java/lang/String.html\">String</a>"
- description: "the series key to filter.\n <p>This enables additional filtering of dimension values being queried.\n For example, let's say we've the dimensions 'category' and 'city',\n so the api can query value of the dimension 'category', with series key as 'city=redmond'.\n </p>"
name: "seriesKeys"
type: "<a href=\"https://docs.oracle.com/javase/8/docs/api/java/util/List.html\">List</a>&lt;<xref href=\"com.azure.ai.metricsadvisor.models.DimensionKey?alt=com.azure.ai.metricsadvisor.models.DimensionKey&text=DimensionKey\" data-throw-if-not-resolved=\"False\" />&gt;"
- description: "The start time for querying the time series data."
name: "startTime"
type: "<a href=\"https://docs.oracle.com/javase/8/docs/api/java/time/OffsetDateTime.html\">OffsetDateTime</a>"
- description: "The end time for querying the time series data."
name: "endTime"
type: "<a href=\"https://docs.oracle.com/javase/8/docs/api/java/time/OffsetDateTime.html\">OffsetDateTime</a>"
syntax: "public PagedIterable<MetricSeriesData> listMetricSeriesData(String metricId, List<DimensionKey> seriesKeys, OffsetDateTime startTime, OffsetDateTime endTime)"
desc: "Get time series data from metric.\n\n**Code sample**\n\n```java\nfinal OffsetDateTime startTime = OffsetDateTime.parse(\"2020-09-09T00:00:00Z\");\n final OffsetDateTime endTime = OffsetDateTime.parse(\"2020-09-09T12:00:00Z\");\n\n metricsAdvisorClient.listMetricSeriesData(\"metricId\",\n Arrays.asList(new DimensionKey(new HashMap<String, String>() {{\n put(\"Dim1\", \"value1\");\n }})), startTime, endTime)\n .forEach(metricSeriesData -> {\n System.out.println(\"List of data points for this series:\");\n System.out.println(metricSeriesData.getMetricValues());\n System.out.println(\"Timestamps of the data related to this time series:\");\n System.out.println(metricSeriesData.getTimestamps());\n System.out.printf(\"Series Key:\");\n System.out.println(metricSeriesData.getSeriesKey().asMap());\n });\n```"
returns:
description: "A <xref uid=\"com.azure.core.http.rest.PagedIterable\" data-throw-if-not-resolved=\"false\" data-raw-source=\"PagedIterable\"></xref> of the <xref uid=\"com.azure.ai.metricsadvisor.models.MetricSeriesData\" data-throw-if-not-resolved=\"false\" data-raw-source=\"metric series data points\"></xref>."
type: "<xref href=\"com.azure.core.http.rest.PagedIterable?alt=com.azure.core.http.rest.PagedIterable&text=PagedIterable\" data-throw-if-not-resolved=\"False\" />&lt;<xref href=\"com.azure.ai.metricsadvisor.models.MetricSeriesData?alt=com.azure.ai.metricsadvisor.models.MetricSeriesData&text=MetricSeriesData\" data-throw-if-not-resolved=\"False\" />&gt;"
- uid: "com.azure.ai.metricsadvisor.MetricsAdvisorClient.listMetricSeriesData(java.lang.String,java.util.List<com.azure.ai.metricsadvisor.models.DimensionKey>,java.time.OffsetDateTime,java.time.OffsetDateTime,com.azure.core.util.Context)"
fullName: "com.azure.ai.metricsadvisor.MetricsAdvisorClient.listMetricSeriesData(String metricId, List<DimensionKey> seriesKeys, OffsetDateTime startTime, OffsetDateTime endTime, Context context)"
name: "listMetricSeriesData(String metricId, List<DimensionKey> seriesKeys, OffsetDateTime startTime, OffsetDateTime endTime, Context context)"
nameWithType: "MetricsAdvisorClient.listMetricSeriesData(String metricId, List<DimensionKey> seriesKeys, OffsetDateTime startTime, OffsetDateTime endTime, Context context)"
summary: "Get time series data from metric."
parameters:
- description: "metric unique id."
name: "metricId"
type: "<a href=\"https://docs.oracle.com/javase/8/docs/api/java/lang/String.html\">String</a>"
- description: "the series key to filter.\n <p>This enables additional filtering of dimension values being queried.\n For example, let's say we've the dimensions 'category' and 'city',\n so the api can query value of the dimension 'category', with series key as 'city=redmond'.\n </p>"
name: "seriesKeys"
type: "<a href=\"https://docs.oracle.com/javase/8/docs/api/java/util/List.html\">List</a>&lt;<xref href=\"com.azure.ai.metricsadvisor.models.DimensionKey?alt=com.azure.ai.metricsadvisor.models.DimensionKey&text=DimensionKey\" data-throw-if-not-resolved=\"False\" />&gt;"
- description: "The start time for querying the time series data."
name: "startTime"
type: "<a href=\"https://docs.oracle.com/javase/8/docs/api/java/time/OffsetDateTime.html\">OffsetDateTime</a>"
- description: "The end time for querying the time series data."
name: "endTime"
type: "<a href=\"https://docs.oracle.com/javase/8/docs/api/java/time/OffsetDateTime.html\">OffsetDateTime</a>"
- description: "Additional context that is passed through the Http pipeline during the service call."
name: "context"
type: "<xref href=\"com.azure.core.util.Context?alt=com.azure.core.util.Context&text=Context\" data-throw-if-not-resolved=\"False\" />"
syntax: "public PagedIterable<MetricSeriesData> listMetricSeriesData(String metricId, List<DimensionKey> seriesKeys, OffsetDateTime startTime, OffsetDateTime endTime, Context context)"
desc: "Get time series data from metric.\n\n**Code sample**\n\n```java\nfinal OffsetDateTime startTime = OffsetDateTime.parse(\"2020-09-09T00:00:00Z\");\n final OffsetDateTime endTime = OffsetDateTime.parse(\"2020-09-09T12:00:00Z\");\n metricsAdvisorClient.listMetricSeriesData(\"metricId\",\n Arrays.asList(new DimensionKey(new HashMap<String, String>() {{\n put(\"Dim1\", \"value1\");\n }})), startTime, endTime)\n .forEach(metricSeriesData -> {\n System.out.printf(\"Data feed Id: %s%n\", metricSeriesData.getMetricId());\n System.out.printf(\"Data feed description: %s%n\", metricSeriesData.getSeriesKey());\n System.out.printf(\"Data feed source type: %.2f%n\", metricSeriesData.getTimestamps());\n System.out.printf(\"Data feed creator: %.2f%n\", metricSeriesData.getMetricValues());\n });\n```"
returns:
description: "A <xref uid=\"com.azure.core.http.rest.PagedIterable\" data-throw-if-not-resolved=\"false\" data-raw-source=\"PagedIterable\"></xref> of the <xref uid=\"com.azure.ai.metricsadvisor.models.MetricSeriesData\" data-throw-if-not-resolved=\"false\" data-raw-source=\"metric series data points\"></xref>."
type: "<xref href=\"com.azure.core.http.rest.PagedIterable?alt=com.azure.core.http.rest.PagedIterable&text=PagedIterable\" data-throw-if-not-resolved=\"False\" />&lt;<xref href=\"com.azure.ai.metricsadvisor.models.MetricSeriesData?alt=com.azure.ai.metricsadvisor.models.MetricSeriesData&text=MetricSeriesData\" data-throw-if-not-resolved=\"False\" />&gt;"
- uid: "com.azure.ai.metricsadvisor.MetricsAdvisorClient.listMetricSeriesDefinitions(java.lang.String,java.time.OffsetDateTime)"
fullName: "com.azure.ai.metricsadvisor.MetricsAdvisorClient.listMetricSeriesDefinitions(String metricId, OffsetDateTime activeSince)"
name: "listMetricSeriesDefinitions(String metricId, OffsetDateTime activeSince)"
nameWithType: "MetricsAdvisorClient.listMetricSeriesDefinitions(String metricId, OffsetDateTime activeSince)"
summary: "List series (dimension combinations) from metric."
parameters:
- description: "metric unique id."
name: "metricId"
type: "<a href=\"https://docs.oracle.com/javase/8/docs/api/java/lang/String.html\">String</a>"
- description: "the start time for querying series ingested after this time."
name: "activeSince"
type: "<a href=\"https://docs.oracle.com/javase/8/docs/api/java/time/OffsetDateTime.html\">OffsetDateTime</a>"
syntax: "public PagedIterable<MetricSeriesDefinition> listMetricSeriesDefinitions(String metricId, OffsetDateTime activeSince)"
desc: "List series (dimension combinations) from metric.\n\n**Code sample**\n\n```java\nfinal OffsetDateTime activeSince = OffsetDateTime.parse(\"2020-07-10T00:00:00Z\");\n metricsAdvisorClient.listMetricSeriesDefinitions(\n \"metricId\",\n activeSince)\n .forEach(metricSeriesDefinition -> {\n System.out.printf(\"Data Feed Metric id for the retrieved series definition : %s%n\",\n metricSeriesDefinition.getMetricId());\n System.out.printf(\"Data Feed Metric dimension: %s%n\", metricSeriesDefinition.getSeriesKey().asMap());\n });\n```"
returns:
description: "A <xref uid=\"com.azure.core.http.rest.PagedIterable\" data-throw-if-not-resolved=\"false\" data-raw-source=\"PagedIterable\"></xref> of the <xref uid=\"com.azure.ai.metricsadvisor.models.MetricSeriesDefinition\" data-throw-if-not-resolved=\"false\" data-raw-source=\"metric series definitions\"></xref>."
type: "<xref href=\"com.azure.core.http.rest.PagedIterable?alt=com.azure.core.http.rest.PagedIterable&text=PagedIterable\" data-throw-if-not-resolved=\"False\" />&lt;<xref href=\"com.azure.ai.metricsadvisor.models.MetricSeriesDefinition?alt=com.azure.ai.metricsadvisor.models.MetricSeriesDefinition&text=MetricSeriesDefinition\" data-throw-if-not-resolved=\"False\" />&gt;"
- uid: "com.azure.ai.metricsadvisor.MetricsAdvisorClient.listMetricSeriesDefinitions(java.lang.String,java.time.OffsetDateTime,com.azure.ai.metricsadvisor.models.ListMetricSeriesDefinitionOptions,com.azure.core.util.Context)"
fullName: "com.azure.ai.metricsadvisor.MetricsAdvisorClient.listMetricSeriesDefinitions(String metricId, OffsetDateTime activeSince, ListMetricSeriesDefinitionOptions options, Context context)"
name: "listMetricSeriesDefinitions(String metricId, OffsetDateTime activeSince, ListMetricSeriesDefinitionOptions options, Context context)"
nameWithType: "MetricsAdvisorClient.listMetricSeriesDefinitions(String metricId, OffsetDateTime activeSince, ListMetricSeriesDefinitionOptions options, Context context)"
summary: "List series (dimension combinations) from metric."
parameters:
- description: "metric unique id."
name: "metricId"
type: "<a href=\"https://docs.oracle.com/javase/8/docs/api/java/lang/String.html\">String</a>"
- description: "the start time for querying series ingested after this time."
name: "activeSince"
type: "<a href=\"https://docs.oracle.com/javase/8/docs/api/java/time/OffsetDateTime.html\">OffsetDateTime</a>"
- description: "the additional filtering attributes that can be provided to query the series."
name: "options"
type: "<xref href=\"com.azure.ai.metricsadvisor.models.ListMetricSeriesDefinitionOptions?alt=com.azure.ai.metricsadvisor.models.ListMetricSeriesDefinitionOptions&text=ListMetricSeriesDefinitionOptions\" data-throw-if-not-resolved=\"False\" />"
- description: "Additional context that is passed through the HTTP pipeline during the service call."
name: "context"
type: "<xref href=\"com.azure.core.util.Context?alt=com.azure.core.util.Context&text=Context\" data-throw-if-not-resolved=\"False\" />"
syntax: "public PagedIterable<MetricSeriesDefinition> listMetricSeriesDefinitions(String metricId, OffsetDateTime activeSince, ListMetricSeriesDefinitionOptions options, Context context)"
desc: "List series (dimension combinations) from metric.\n\n**Code sample**\n\n```java\nString metricId = \"b460abfc-7a58-47d7-9d99-21ee21fdfc6e\";\n final OffsetDateTime activeSince = OffsetDateTime.parse(\"2020-07-10T00:00:00Z\");\n final ListMetricSeriesDefinitionOptions options\n = new ListMetricSeriesDefinitionOptions()\n .setMaxPageSize(10)\n .setDimensionCombinationToFilter(new HashMap<String, List<String>>() {{\n put(\"Dim2\", Collections.singletonList(\"Angelfish\"));\n }});\n\n metricsAdvisorClient.listMetricSeriesDefinitions(metricId, activeSince, options, Context.NONE)\n .forEach(metricSeriesDefinition -> {\n System.out.printf(\"Data Feed Metric id for the retrieved series definition : %s%n\",\n metricSeriesDefinition.getMetricId());\n System.out.printf(\"Series Key:\");\n System.out.println(metricSeriesDefinition.getSeriesKey().asMap());\n });\n```"
returns:
description: "A <xref uid=\"com.azure.core.http.rest.PagedIterable\" data-throw-if-not-resolved=\"false\" data-raw-source=\"PagedIterable\"></xref> of the <xref uid=\"com.azure.ai.metricsadvisor.models.MetricSeriesDefinition\" data-throw-if-not-resolved=\"false\" data-raw-source=\"metric series definitions\"></xref>."
type: "<xref href=\"com.azure.core.http.rest.PagedIterable?alt=com.azure.core.http.rest.PagedIterable&text=PagedIterable\" data-throw-if-not-resolved=\"False\" />&lt;<xref href=\"com.azure.ai.metricsadvisor.models.MetricSeriesDefinition?alt=com.azure.ai.metricsadvisor.models.MetricSeriesDefinition&text=MetricSeriesDefinition\" data-throw-if-not-resolved=\"False\" />&gt;"
type: "class"
desc: "This class provides a synchronous client to connect to the Metrics Advisor Azure Cognitive Service.\n\nThis client provides synchronous methods to perform:\n\n1. Analyze root cause into specific dimension using the <xref uid=\"com.azure.ai.metricsadvisor.MetricsAdvisorClient.listIncidentRootCauses*\" data-throw-if-not-resolved=\"false\" data-raw-source=\"com.azure.ai.metricsadvisor.MetricsAdvisorClient#listIncidentRootCauses(String, String, Context)\"></xref> method with your respective data source.\n2. Fetch incidents triggered for a particular detection configuration using the <xref uid=\"com.azure.ai.metricsadvisor.MetricsAdvisorClient.listIncidentsForDetectionConfig*\" data-throw-if-not-resolved=\"false\" data-raw-source=\"com.azure.ai.metricsadvisor.MetricsAdvisorClient#listIncidentsForDetectionConfig(String, OffsetDateTime, OffsetDateTime, ListIncidentsDetectedOptions, Context)\"></xref> method.\n3. Fetch all the anomalies detected for a particular detection configuration using the <xref uid=\"com.azure.ai.metricsadvisor.MetricsAdvisorClient.listAnomaliesForDetectionConfig*\" data-throw-if-not-resolved=\"false\" data-raw-source=\"com.azure.ai.metricsadvisor.MetricsAdvisorClient#listAnomaliesForDetectionConfig(String, OffsetDateTime, OffsetDateTime)\"></xref> method./li>\n\nService clients are the point of interaction for developers to use Azure Metrics Advisor. <xref uid=\"com.azure.ai.metricsadvisor.MetricsAdvisorClient\" data-throw-if-not-resolved=\"false\" data-raw-source=\"com.azure.ai.metricsadvisor.MetricsAdvisorClient\"></xref> is the synchronous service client and <xref uid=\"com.azure.ai.metricsadvisor.MetricsAdvisorAsyncClient\" data-throw-if-not-resolved=\"false\" data-raw-source=\"com.azure.ai.metricsadvisor.MetricsAdvisorAsyncClient\"></xref> is the asynchronous service client. The examples shown in this document use a credential object named DefaultAzureCredential for authentication, which is appropriate for most scenarios, including local development and production environments. Additionally, we recommend using [managed identity][] for authentication in production environments. You can find more information on different ways of authenticating and their corresponding credential types in the [Azure Identity documentation\"][Azure Identity documentation].\n\n**Sample: Construct a MetricsAdvisorClient with DefaultAzureCredential**\n\nThe following code sample demonstrates the creation of a <xref uid=\"com.azure.ai.metricsadvisor.MetricsAdvisorClient\" data-throw-if-not-resolved=\"false\" data-raw-source=\"com.azure.ai.metricsadvisor.MetricsAdvisorClient\"></xref>, using the \\`DefaultAzureCredentialBuilder\\` to configure it.\n\n```java\nMetricsAdvisorClient metricsAdvisorClient =\n new MetricsAdvisorClientBuilder()\n .credential(new DefaultAzureCredentialBuilder().build())\n .endpoint(\"{endpoint}\")\n .buildClient();\n```\n\nFurther, see the code sample below to use <xref uid=\"com.azure.ai.metricsadvisor.models.MetricsAdvisorKeyCredential\" data-throw-if-not-resolved=\"false\" data-raw-source=\"MetricsAdvisorKeyCredential\"></xref> for client creation.\n\n```java\nMetricsAdvisorClient metricsAdvisorClient =\n new MetricsAdvisorClientBuilder()\n .credential(new MetricsAdvisorKeyCredential(\"{subscription_key}\", \"{api_key}\"))\n .endpoint(\"{endpoint}\")\n .buildClient();\n```\n\n\n[managed identity]: https://learn.microsoft.com/azure/active-directory/managed-identities-azure-resources/\n[Azure Identity documentation]: https://learn.microsoft.com/java/api/overview/azure/identity-readme"
metadata: {}
package: "com.azure.ai.metricsadvisor"
artifact: com.azure:azure-ai-metricsadvisor:1.2.1