diff --git a/sdk/monitor/arm-monitor/package.json b/sdk/monitor/arm-monitor/package.json
index bacf43996648..91a6f81293a8 100644
--- a/sdk/monitor/arm-monitor/package.json
+++ b/sdk/monitor/arm-monitor/package.json
@@ -5,7 +5,7 @@
"version": "5.4.0",
"dependencies": {
"@azure/ms-rest-azure-js": "^1.3.2",
- "@azure/ms-rest-js": "^1.6.0",
+ "@azure/ms-rest-js": "^1.8.1",
"tslib": "^1.9.3"
},
"keywords": [
@@ -26,7 +26,7 @@
"rollup-plugin-sourcemaps": "^0.4.2",
"uglify-js": "^3.4.9"
},
- "homepage": "https://github.com/azure/azure-sdk-for-js/tree/master/sdk/monitor/arm-monitor",
+ "homepage": "https://github.com/azure/azure-sdk-for-js",
"repository": {
"type": "git",
"url": "https://github.com/azure/azure-sdk-for-js.git"
diff --git a/sdk/monitor/arm-monitor/src/models/actionGroupsMappers.ts b/sdk/monitor/arm-monitor/src/models/actionGroupsMappers.ts
index a1a4a94394eb..11486f297d29 100644
--- a/sdk/monitor/arm-monitor/src/models/actionGroupsMappers.ts
+++ b/sdk/monitor/arm-monitor/src/models/actionGroupsMappers.ts
@@ -33,6 +33,8 @@ export {
DiagnosticSettingsCategoryResource,
DiagnosticSettingsResource,
Dimension,
+ DynamicMetricCriteria,
+ DynamicThresholdFailingPeriods,
EmailNotification,
EmailReceiver,
EnableRequest,
diff --git a/sdk/monitor/arm-monitor/src/models/activityLogAlertsMappers.ts b/sdk/monitor/arm-monitor/src/models/activityLogAlertsMappers.ts
index 116ac91bc880..d949c6e04f10 100644
--- a/sdk/monitor/arm-monitor/src/models/activityLogAlertsMappers.ts
+++ b/sdk/monitor/arm-monitor/src/models/activityLogAlertsMappers.ts
@@ -33,6 +33,8 @@ export {
DiagnosticSettingsCategoryResource,
DiagnosticSettingsResource,
Dimension,
+ DynamicMetricCriteria,
+ DynamicThresholdFailingPeriods,
EmailNotification,
EmailReceiver,
ErrorResponse,
diff --git a/sdk/monitor/arm-monitor/src/models/alertRulesMappers.ts b/sdk/monitor/arm-monitor/src/models/alertRulesMappers.ts
index ebb564bc0f59..91bb37022f98 100644
--- a/sdk/monitor/arm-monitor/src/models/alertRulesMappers.ts
+++ b/sdk/monitor/arm-monitor/src/models/alertRulesMappers.ts
@@ -34,6 +34,8 @@ export {
DiagnosticSettingsCategoryResource,
DiagnosticSettingsResource,
Dimension,
+ DynamicMetricCriteria,
+ DynamicThresholdFailingPeriods,
EmailNotification,
EmailReceiver,
ErrorResponse,
diff --git a/sdk/monitor/arm-monitor/src/models/autoscaleSettingsMappers.ts b/sdk/monitor/arm-monitor/src/models/autoscaleSettingsMappers.ts
index be88d17158e4..68da5c7050e0 100644
--- a/sdk/monitor/arm-monitor/src/models/autoscaleSettingsMappers.ts
+++ b/sdk/monitor/arm-monitor/src/models/autoscaleSettingsMappers.ts
@@ -33,6 +33,8 @@ export {
DiagnosticSettingsCategoryResource,
DiagnosticSettingsResource,
Dimension,
+ DynamicMetricCriteria,
+ DynamicThresholdFailingPeriods,
EmailNotification,
EmailReceiver,
ErrorResponse,
diff --git a/sdk/monitor/arm-monitor/src/models/baselinesMappers.ts b/sdk/monitor/arm-monitor/src/models/baselinesMappers.ts
new file mode 100644
index 000000000000..b49d6f14718e
--- /dev/null
+++ b/sdk/monitor/arm-monitor/src/models/baselinesMappers.ts
@@ -0,0 +1,18 @@
+/*
+ * Copyright (c) Microsoft Corporation. All rights reserved.
+ * Licensed under the MIT License. See License.txt in the project root for license information.
+ *
+ * Code generated by Microsoft (R) AutoRest Code Generator.
+ * Changes may cause incorrect behavior and will be lost if the code is regenerated.
+ */
+
+export {
+ discriminators,
+ BaselineMetadata,
+ ErrorResponse,
+ MetricBaselinesResponse,
+ MetricSingleDimension,
+ SingleBaseline,
+ SingleMetricBaseline,
+ TimeSeriesBaseline
+} from "../models/mappers";
diff --git a/sdk/monitor/arm-monitor/src/models/diagnosticSettingsCategoryOperationsMappers.ts b/sdk/monitor/arm-monitor/src/models/diagnosticSettingsCategoryOperationsMappers.ts
index 69ea5f6576f6..7402d3661f02 100644
--- a/sdk/monitor/arm-monitor/src/models/diagnosticSettingsCategoryOperationsMappers.ts
+++ b/sdk/monitor/arm-monitor/src/models/diagnosticSettingsCategoryOperationsMappers.ts
@@ -32,6 +32,8 @@ export {
DiagnosticSettingsCategoryResourceCollection,
DiagnosticSettingsResource,
Dimension,
+ DynamicMetricCriteria,
+ DynamicThresholdFailingPeriods,
EmailNotification,
EmailReceiver,
ErrorResponse,
diff --git a/sdk/monitor/arm-monitor/src/models/diagnosticSettingsOperationsMappers.ts b/sdk/monitor/arm-monitor/src/models/diagnosticSettingsOperationsMappers.ts
index ce2aa63c0e1e..f0ba9bbf166f 100644
--- a/sdk/monitor/arm-monitor/src/models/diagnosticSettingsOperationsMappers.ts
+++ b/sdk/monitor/arm-monitor/src/models/diagnosticSettingsOperationsMappers.ts
@@ -32,6 +32,8 @@ export {
DiagnosticSettingsResource,
DiagnosticSettingsResourceCollection,
Dimension,
+ DynamicMetricCriteria,
+ DynamicThresholdFailingPeriods,
EmailNotification,
EmailReceiver,
ErrorResponse,
diff --git a/sdk/monitor/arm-monitor/src/models/index.ts b/sdk/monitor/arm-monitor/src/models/index.ts
index 1976dec154d0..f5b23fae1743 100644
--- a/sdk/monitor/arm-monitor/src/models/index.ts
+++ b/sdk/monitor/arm-monitor/src/models/index.ts
@@ -1118,6 +1118,22 @@ export interface WebhookReceiver {
* Indicates whether to use common alert schema.
*/
useCommonAlertSchema: boolean;
+ /**
+ * Indicates whether or not use AAD authentication. Default value: false.
+ */
+ useAadAuth?: boolean;
+ /**
+ * Indicates the webhook app object Id for aad auth.
+ */
+ objectId?: string;
+ /**
+ * Indicates the identifier uri for aad auth.
+ */
+ identifierUri?: string;
+ /**
+ * Indicates the tenant id for aad auth.
+ */
+ tenantId?: string;
}
/**
@@ -1967,6 +1983,116 @@ export interface CalculateBaselineResponse {
baseline: Baseline[];
}
+/**
+ * The metric dimension name and value.
+ */
+export interface MetricSingleDimension {
+ /**
+ * Name of the dimension.
+ */
+ name: string;
+ /**
+ * Value of the dimension.
+ */
+ value: string;
+}
+
+/**
+ * The baseline values for a single sensitivity value.
+ */
+export interface SingleBaseline {
+ /**
+ * the sensitivity of the baseline. Possible values include: 'Low', 'Medium', 'High'
+ */
+ sensitivity: BaselineSensitivity;
+ /**
+ * The low thresholds of the baseline.
+ */
+ lowThresholds: number[];
+ /**
+ * The high thresholds of the baseline.
+ */
+ highThresholds: number[];
+}
+
+/**
+ * Represents a baseline metadata value.
+ */
+export interface BaselineMetadata {
+ /**
+ * Name of the baseline metadata.
+ */
+ name: string;
+ /**
+ * Value of the baseline metadata.
+ */
+ value: string;
+}
+
+/**
+ * The baseline values for a single time series.
+ */
+export interface TimeSeriesBaseline {
+ /**
+ * The aggregation type of the metric.
+ */
+ aggregation: string;
+ /**
+ * The dimensions of this time series.
+ */
+ dimensions?: MetricSingleDimension[];
+ /**
+ * The list of timestamps of the baselines.
+ */
+ timestamps: Date[] | string[];
+ /**
+ * The baseline values for each sensitivity.
+ */
+ data: SingleBaseline[];
+ /**
+ * The baseline metadata values.
+ */
+ metadata?: BaselineMetadata[];
+}
+
+/**
+ * The baseline results of a single metric.
+ */
+export interface SingleMetricBaseline {
+ /**
+ * The metric baseline Id.
+ */
+ id: string;
+ /**
+ * The resource type of the metric baseline resource.
+ */
+ type: string;
+ /**
+ * The name of the metric for which the baselines were retrieved.
+ */
+ name: string;
+ /**
+ * The timespan for which the data was retrieved. Its value consists of two datetimes
+ * concatenated, separated by '/'. This may be adjusted in the future and returned back from
+ * what was originally requested.
+ */
+ timespan: string;
+ /**
+ * The interval (window size) for which the metric data was returned in. This may be adjusted in
+ * the future and returned back from what was originally requested. This is not present if a
+ * metadata request was made.
+ */
+ interval: string;
+ /**
+ * The namespace of the metrics been queried.
+ */
+ namespace?: string;
+ /**
+ * The baseline for each time series that was queried.
+ */
+ baselines: TimeSeriesBaseline[];
+}
+
/**
* An alert action.
*/
@@ -2172,37 +2298,39 @@ export interface MetricAlertStatusCollection {
value?: MetricAlertStatus[];
}
-/**
- * Specifies a metric dimension.
- */
-export interface MetricDimension {
- /**
- * Name of the dimension.
- */
- name: string;
- /**
- * the dimension operator. Only 'Include' and 'Exclude' are supported
- */
- operator: string;
- /**
- * list of dimension values.
- */
- values: string[];
-}
-
/**
* Contains the possible cases for MultiMetricCriteria.
*/
-export type MultiMetricCriteriaUnion = MultiMetricCriteria | MetricCriteria;
+export type MultiMetricCriteriaUnion = MultiMetricCriteria | MetricCriteria | DynamicMetricCriteria;
/**
- * The types of conditions for a multi resource alert
+ * The types of conditions for a multi resource alert.
*/
export interface MultiMetricCriteria {
/**
* Polymorphic Discriminator
*/
criterionType: "MultiMetricCriteria";
+ /**
+ * Name of the criteria.
+ */
+ name: string;
+ /**
+ * Name of the metric.
+ */
+ metricName: string;
+ /**
+ * Namespace of the metric.
+ */
+ metricNamespace?: string;
+ /**
+ * the criteria time aggregation types.
+ */
+ timeAggregation: any;
+ /**
+ * List of dimension conditions.
+ */
+ dimensions?: MetricDimension[];
/**
* Describes unknown properties. The value of an unknown property can be of "any" type.
*/
@@ -2229,22 +2357,22 @@ export interface MetricCriteria {
* Namespace of the metric.
*/
metricNamespace?: string;
- /**
- * the criteria operator.
- */
- operator: any;
/**
* the criteria time aggregation types.
*/
timeAggregation: any;
- /**
- * the criteria threshold value that activates the alert.
- */
- threshold: number;
/**
* List of dimension conditions.
*/
dimensions?: MetricDimension[];
+ /**
+ * the criteria operator.
+ */
+ operator: any;
+ /**
+ * the criteria threshold value that activates the alert.
+ */
+ threshold: number;
}
/**
@@ -2261,6 +2389,24 @@ export interface MetricAlertSingleResourceMultipleMetricCriteria {
allOf?: MetricCriteria[];
}
+/**
+ * Specifies a metric dimension.
+ */
+export interface MetricDimension {
+ /**
+ * Name of the dimension.
+ */
+ name: string;
+ /**
+ * the dimension operator. Only 'Include' and 'Exclude' are supported
+ */
+ operator: string;
+ /**
+ * list of dimension values.
+ */
+ values: string[];
+}
+
/**
* Specifies the metric alert criteria for multiple resource that has multiple metric criteria.
*/
@@ -2275,6 +2421,72 @@ export interface MetricAlertMultipleResourceMultipleMetricCriteria {
allOf?: MultiMetricCriteriaUnion[];
}
+/**
+ * The minimum number of violations required within the selected lookback time window required to
+ * raise an alert.
+ */
+export interface DynamicThresholdFailingPeriods {
+ /**
+ * The number of aggregated lookback points. The lookback time window is calculated based on the
+ * aggregation granularity (windowSize) and the selected number of aggregated points.
+ */
+ numberOfEvaluationPeriods: number;
+ /**
+ * The number of violations to trigger an alert. Should be smaller or equal to
+ * numberOfEvaluationPeriods.
+ */
+ minFailingPeriodsToAlert: number;
+}
+
+/**
+ * Criterion for dynamic threshold.
+ */
+export interface DynamicMetricCriteria {
+ /**
+ * Polymorphic Discriminator
+ */
+ criterionType: "DynamicThresholdCriterion";
+ /**
+ * Name of the criteria.
+ */
+ name: string;
+ /**
+ * Name of the metric.
+ */
+ metricName: string;
+ /**
+ * Namespace of the metric.
+ */
+ metricNamespace?: string;
+ /**
+ * the criteria time aggregation types.
+ */
+ timeAggregation: any;
+ /**
+ * List of dimension conditions.
+ */
+ dimensions?: MetricDimension[];
+ /**
+ * The operator used to compare the metric value against the threshold.
+ */
+ operator: any;
+ /**
+ * The extent of deviation required to trigger an alert. This will affect how tight the threshold
+ * is to the metric series pattern.
+ */
+ alertSensitivity: any;
+ /**
+ * The minimum number of violations required within the selected lookback time window required to
+ * raise an alert.
+ */
+ failingPeriods: DynamicThresholdFailingPeriods;
+ /**
+ * Use this option to set the date from which to start learning the metric historical data and
+ * calculate the dynamic thresholds (in ISO8601 format)
+ */
+ ignoreDataBefore?: Date;
+}
+
/**
* Specifies the log search query.
*/
@@ -2504,9 +2716,9 @@ export interface LogToMetricAction {
*/
odatatype: "Microsoft.WindowsAzure.Management.Monitoring.Alerts.Models.Microsoft.AppInsights.Nexus.DataContracts.Resources.ScheduledQueryRules.LogToMetricAction";
/**
- * Severity of the alert
+ * Criteria of Metric
*/
- criteria: Criteria;
+ criteria: Criteria[];
}
/**
@@ -2796,6 +3008,53 @@ export interface MetricBaselineGetOptionalParams extends msRest.RequestOptionsBa
resultType?: ResultType;
}
+/**
+ * Optional Parameters.
+ */
+export interface BaselinesListOptionalParams extends msRest.RequestOptionsBase {
+ /**
+ * The names of the metrics (comma separated) to retrieve.
+ */
+ metricnames?: string;
+ /**
+ * Metric namespace to query metric definitions for.
+ */
+ metricnamespace?: string;
+ /**
+ * The timespan of the query. It is a string with the following format
+ * 'startDateTime_ISO/endDateTime_ISO'.
+ */
+ timespan?: string;
+ /**
+ * The interval (i.e. timegrain) of the query.
+ */
+ interval?: string;
+ /**
+ * The list of aggregation types (comma separated) to retrieve.
+ */
+ aggregation?: string;
+ /**
+ * The list of sensitivities (comma separated) to retrieve.
+ */
+ sensitivities?: string;
+ /**
+ * The **$filter** is used to reduce the set of metric data returned.
Example:
Metric
+ * contains metadata A, B and C.
- Return all time series of C where A = a1 and B = b1 or
+ * b2
**$filter=A eq ‘a1’ and B eq ‘b1’ or B eq ‘b2’ and C eq ‘*’**
- Invalid
+ * variant:
**$filter=A eq ‘a1’ and B eq ‘b1’ and C eq ‘*’ or B = ‘b2’**
This is invalid
+ * because the logical or operator cannot separate two different metadata names.
- Return all
+ * time series where A = a1, B = b1 and C = c1:
**$filter=A eq ‘a1’ and B eq ‘b1’ and C eq
+ * ‘c1’**
- Return all time series where A = a1
**$filter=A eq ‘a1’ and B eq ‘*’ and C eq
+ * ‘*’**.
+ */
+ filter?: string;
+ /**
+ * Allows retrieving only metadata of the baseline. On data request all information is retrieved.
+ * Possible values include: 'Data', 'Metadata'
+ */
+ resultType?: ResultType;
+}
+
/**
* Optional Parameters.
*/
@@ -2924,6 +3183,14 @@ export interface EventCategoryCollection extends Array {
export interface MetricDefinitionCollection extends Array {
}
+/**
+ * @interface
+ * A list of metric baselines.
+ * @extends Array
+ */
+export interface MetricBaselinesResponse extends Array {
+}
+
/**
* @interface
* Represents a collection of alert rule resources.
@@ -3062,6 +3329,14 @@ export type AggregationType = 'None' | 'Average' | 'Count' | 'Minimum' | 'Maximu
*/
export type Sensitivity = 'Low' | 'Medium' | 'High';
+/**
+ * Defines values for BaselineSensitivity.
+ * Possible values include: 'Low', 'Medium', 'High'
+ * @readonly
+ * @enum {string}
+ */
+export type BaselineSensitivity = 'Low' | 'Medium' | 'High';
+
/**
* Defines values for Enabled.
* Possible values include: 'true', 'false'
@@ -3994,6 +4269,26 @@ export type MetricBaselineCalculateBaselineResponse = CalculateBaselineResponse
};
};
+/**
+ * Contains response data for the list operation.
+ */
+export type BaselinesListResponse = MetricBaselinesResponse & {
+ /**
+ * The underlying HTTP response.
+ */
+ _response: msRest.HttpResponse & {
+ /**
+ * The response body as text (string format)
+ */
+ bodyAsText: string;
+
+ /**
+ * The response body as parsed JSON or XML
+ */
+ parsedBody: MetricBaselinesResponse;
+ };
+};
+
/**
* Contains response data for the listBySubscription operation.
*/
diff --git a/sdk/monitor/arm-monitor/src/models/logProfilesMappers.ts b/sdk/monitor/arm-monitor/src/models/logProfilesMappers.ts
index 7535e7ef7fb1..a1ad33c209e5 100644
--- a/sdk/monitor/arm-monitor/src/models/logProfilesMappers.ts
+++ b/sdk/monitor/arm-monitor/src/models/logProfilesMappers.ts
@@ -32,6 +32,8 @@ export {
DiagnosticSettingsCategoryResource,
DiagnosticSettingsResource,
Dimension,
+ DynamicMetricCriteria,
+ DynamicThresholdFailingPeriods,
EmailNotification,
EmailReceiver,
ErrorResponse,
diff --git a/sdk/monitor/arm-monitor/src/models/mappers.ts b/sdk/monitor/arm-monitor/src/models/mappers.ts
index eb039fab3d0a..80d2fce1ac18 100644
--- a/sdk/monitor/arm-monitor/src/models/mappers.ts
+++ b/sdk/monitor/arm-monitor/src/models/mappers.ts
@@ -1784,6 +1784,31 @@ export const WebhookReceiver: msRest.CompositeMapper = {
type: {
name: "Boolean"
}
+ },
+ useAadAuth: {
+ serializedName: "useAadAuth",
+ defaultValue: false,
+ type: {
+ name: "Boolean"
+ }
+ },
+ objectId: {
+ serializedName: "objectId",
+ type: {
+ name: "String"
+ }
+ },
+ identifierUri: {
+ serializedName: "identifierUri",
+ type: {
+ name: "String"
+ }
+ },
+ tenantId: {
+ serializedName: "tenantId",
+ type: {
+ name: "String"
+ }
}
}
}
@@ -3321,6 +3346,225 @@ export const CalculateBaselineResponse: msRest.CompositeMapper = {
}
};
+export const MetricSingleDimension: msRest.CompositeMapper = {
+ serializedName: "MetricSingleDimension",
+ type: {
+ name: "Composite",
+ className: "MetricSingleDimension",
+ modelProperties: {
+ name: {
+ required: true,
+ serializedName: "name",
+ type: {
+ name: "String"
+ }
+ },
+ value: {
+ required: true,
+ serializedName: "value",
+ type: {
+ name: "String"
+ }
+ }
+ }
+ }
+};
+
+export const SingleBaseline: msRest.CompositeMapper = {
+ serializedName: "SingleBaseline",
+ type: {
+ name: "Composite",
+ className: "SingleBaseline",
+ modelProperties: {
+ sensitivity: {
+ required: true,
+ serializedName: "sensitivity",
+ type: {
+ name: "String"
+ }
+ },
+ lowThresholds: {
+ required: true,
+ serializedName: "lowThresholds",
+ type: {
+ name: "Sequence",
+ element: {
+ type: {
+ name: "Number"
+ }
+ }
+ }
+ },
+ highThresholds: {
+ required: true,
+ serializedName: "highThresholds",
+ type: {
+ name: "Sequence",
+ element: {
+ type: {
+ name: "Number"
+ }
+ }
+ }
+ }
+ }
+ }
+};
+
+export const BaselineMetadata: msRest.CompositeMapper = {
+ serializedName: "BaselineMetadata",
+ type: {
+ name: "Composite",
+ className: "BaselineMetadata",
+ modelProperties: {
+ name: {
+ required: true,
+ serializedName: "name",
+ type: {
+ name: "String"
+ }
+ },
+ value: {
+ required: true,
+ serializedName: "value",
+ type: {
+ name: "String"
+ }
+ }
+ }
+ }
+};
+
+export const TimeSeriesBaseline: msRest.CompositeMapper = {
+ serializedName: "TimeSeriesBaseline",
+ type: {
+ name: "Composite",
+ className: "TimeSeriesBaseline",
+ modelProperties: {
+ aggregation: {
+ required: true,
+ serializedName: "aggregation",
+ type: {
+ name: "String"
+ }
+ },
+ dimensions: {
+ serializedName: "dimensions",
+ type: {
+ name: "Sequence",
+ element: {
+ type: {
+ name: "Composite",
+ className: "MetricSingleDimension"
+ }
+ }
+ }
+ },
+ timestamps: {
+ required: true,
+ serializedName: "timestamps",
+ type: {
+ name: "Sequence",
+ element: {
+ type: {
+ name: "DateTime"
+ }
+ }
+ }
+ },
+ data: {
+ required: true,
+ serializedName: "data",
+ type: {
+ name: "Sequence",
+ element: {
+ type: {
+ name: "Composite",
+ className: "SingleBaseline"
+ }
+ }
+ }
+ },
+ metadata: {
+ serializedName: "metadata",
+ type: {
+ name: "Sequence",
+ element: {
+ type: {
+ name: "Composite",
+ className: "BaselineMetadata"
+ }
+ }
+ }
+ }
+ }
+ }
+};
+
+export const SingleMetricBaseline: msRest.CompositeMapper = {
+ serializedName: "SingleMetricBaseline",
+ type: {
+ name: "Composite",
+ className: "SingleMetricBaseline",
+ modelProperties: {
+ id: {
+ required: true,
+ serializedName: "id",
+ type: {
+ name: "String"
+ }
+ },
+ type: {
+ required: true,
+ serializedName: "type",
+ type: {
+ name: "String"
+ }
+ },
+ name: {
+ required: true,
+ serializedName: "name",
+ type: {
+ name: "String"
+ }
+ },
+ timespan: {
+ required: true,
+ serializedName: "properties.timespan",
+ type: {
+ name: "String"
+ }
+ },
+ interval: {
+ required: true,
+ serializedName: "properties.interval",
+ type: {
+ name: "TimeSpan"
+ }
+ },
+ namespace: {
+ serializedName: "properties.namespace",
+ type: {
+ name: "String"
+ }
+ },
+ baselines: {
+ required: true,
+ serializedName: "properties.baselines",
+ type: {
+ name: "Sequence",
+ element: {
+ type: {
+ name: "Composite",
+ className: "TimeSeriesBaseline"
+ }
+ }
+ }
+ }
+ }
+ }
+};
+
export const MetricAlertAction: msRest.CompositeMapper = {
serializedName: "MetricAlertAction",
type: {
@@ -3689,11 +3933,16 @@ export const MetricAlertStatusCollection: msRest.CompositeMapper = {
}
};
-export const MetricDimension: msRest.CompositeMapper = {
- serializedName: "MetricDimension",
+export const MultiMetricCriteria: msRest.CompositeMapper = {
+ serializedName: "MultiMetricCriteria",
type: {
name: "Composite",
- className: "MetricDimension",
+ polymorphicDiscriminator: {
+ serializedName: "criterionType",
+ clientName: "criterionType"
+ },
+ uberParent: "MultiMetricCriteria",
+ className: "MultiMetricCriteria",
modelProperties: {
name: {
required: true,
@@ -3702,40 +3951,38 @@ export const MetricDimension: msRest.CompositeMapper = {
name: "String"
}
},
- operator: {
+ metricName: {
required: true,
- serializedName: "operator",
+ serializedName: "metricName",
type: {
name: "String"
}
},
- values: {
+ metricNamespace: {
+ serializedName: "metricNamespace",
+ type: {
+ name: "String"
+ }
+ },
+ timeAggregation: {
required: true,
- serializedName: "values",
+ serializedName: "timeAggregation",
+ type: {
+ name: "Object"
+ }
+ },
+ dimensions: {
+ serializedName: "dimensions",
type: {
name: "Sequence",
element: {
type: {
- name: "String"
+ name: "Composite",
+ className: "MetricDimension"
}
}
}
- }
- }
- }
-};
-
-export const MultiMetricCriteria: msRest.CompositeMapper = {
- serializedName: "MultiMetricCriteria",
- type: {
- name: "Composite",
- polymorphicDiscriminator: {
- serializedName: "criterionType",
- clientName: "criterionType"
- },
- uberParent: "MultiMetricCriteria",
- className: "MultiMetricCriteria",
- modelProperties: {
+ },
criterionType: {
required: true,
serializedName: "criterionType",
@@ -3761,26 +4008,6 @@ export const MetricCriteria: msRest.CompositeMapper = {
className: "MetricCriteria",
modelProperties: {
...MultiMetricCriteria.type.modelProperties,
- name: {
- required: true,
- serializedName: "name",
- type: {
- name: "String"
- }
- },
- metricName: {
- required: true,
- serializedName: "metricName",
- type: {
- name: "String"
- }
- },
- metricNamespace: {
- serializedName: "metricNamespace",
- type: {
- name: "String"
- }
- },
operator: {
required: true,
serializedName: "operator",
@@ -3788,31 +4015,12 @@ export const MetricCriteria: msRest.CompositeMapper = {
name: "Object"
}
},
- timeAggregation: {
- required: true,
- serializedName: "timeAggregation",
- type: {
- name: "Object"
- }
- },
threshold: {
required: true,
serializedName: "threshold",
type: {
name: "Number"
}
- },
- dimensions: {
- serializedName: "dimensions",
- type: {
- name: "Sequence",
- element: {
- type: {
- name: "Composite",
- className: "MetricDimension"
- }
- }
- }
}
},
additionalProperties: MultiMetricCriteria.type.additionalProperties
@@ -3846,6 +4054,42 @@ export const MetricAlertSingleResourceMultipleMetricCriteria: msRest.CompositeMa
}
};
+export const MetricDimension: msRest.CompositeMapper = {
+ serializedName: "MetricDimension",
+ type: {
+ name: "Composite",
+ className: "MetricDimension",
+ modelProperties: {
+ name: {
+ required: true,
+ serializedName: "name",
+ type: {
+ name: "String"
+ }
+ },
+ operator: {
+ required: true,
+ serializedName: "operator",
+ type: {
+ name: "String"
+ }
+ },
+ values: {
+ required: true,
+ serializedName: "values",
+ type: {
+ name: "Sequence",
+ element: {
+ type: {
+ name: "String"
+ }
+ }
+ }
+ }
+ }
+ }
+};
+
export const MetricAlertMultipleResourceMultipleMetricCriteria: msRest.CompositeMapper = {
serializedName: "Microsoft.Azure.Monitor.MultipleResourceMultipleMetricCriteria",
type: {
@@ -3877,6 +4121,72 @@ export const MetricAlertMultipleResourceMultipleMetricCriteria: msRest.Composite
}
};
+export const DynamicThresholdFailingPeriods: msRest.CompositeMapper = {
+ serializedName: "DynamicThresholdFailingPeriods",
+ type: {
+ name: "Composite",
+ className: "DynamicThresholdFailingPeriods",
+ modelProperties: {
+ numberOfEvaluationPeriods: {
+ required: true,
+ serializedName: "numberOfEvaluationPeriods",
+ type: {
+ name: "Number"
+ }
+ },
+ minFailingPeriodsToAlert: {
+ required: true,
+ serializedName: "minFailingPeriodsToAlert",
+ type: {
+ name: "Number"
+ }
+ }
+ }
+ }
+};
+
+export const DynamicMetricCriteria: msRest.CompositeMapper = {
+ serializedName: "DynamicThresholdCriterion",
+ type: {
+ name: "Composite",
+ polymorphicDiscriminator: MultiMetricCriteria.type.polymorphicDiscriminator,
+ uberParent: "MultiMetricCriteria",
+ className: "DynamicMetricCriteria",
+ modelProperties: {
+ ...MultiMetricCriteria.type.modelProperties,
+ operator: {
+ required: true,
+ serializedName: "operator",
+ type: {
+ name: "Object"
+ }
+ },
+ alertSensitivity: {
+ required: true,
+ serializedName: "alertSensitivity",
+ type: {
+ name: "Object"
+ }
+ },
+ failingPeriods: {
+ required: true,
+ serializedName: "failingPeriods",
+ type: {
+ name: "Composite",
+ className: "DynamicThresholdFailingPeriods"
+ }
+ },
+ ignoreDataBefore: {
+ serializedName: "ignoreDataBefore",
+ type: {
+ name: "DateTime"
+ }
+ }
+ },
+ additionalProperties: MultiMetricCriteria.type.additionalProperties
+ }
+};
+
export const Source: msRest.CompositeMapper = {
serializedName: "Source",
type: {
@@ -4269,8 +4579,13 @@ export const LogToMetricAction: msRest.CompositeMapper = {
required: true,
serializedName: "criteria",
type: {
- name: "Composite",
- className: "Criteria"
+ name: "Sequence",
+ element: {
+ type: {
+ name: "Composite",
+ className: "Criteria"
+ }
+ }
}
}
}
@@ -4708,6 +5023,28 @@ export const MetricDefinitionCollection: msRest.CompositeMapper = {
}
};
+export const MetricBaselinesResponse: msRest.CompositeMapper = {
+ serializedName: "MetricBaselinesResponse",
+ type: {
+ name: "Composite",
+ className: "MetricBaselinesResponse",
+ modelProperties: {
+ value: {
+ serializedName: "",
+ type: {
+ name: "Sequence",
+ element: {
+ type: {
+ name: "Composite",
+ className: "SingleMetricBaseline"
+ }
+ }
+ }
+ }
+ }
+ }
+};
+
export const MetricAlertResourceCollection: msRest.CompositeMapper = {
serializedName: "MetricAlertResourceCollection",
type: {
@@ -4791,6 +5128,7 @@ export const discriminators = {
'MetricAlertCriteria.Microsoft.Azure.Monitor.SingleResourceMultipleMetricCriteria' : MetricAlertSingleResourceMultipleMetricCriteria,
'MultiMetricCriteria' : MultiMetricCriteria,
'MetricAlertCriteria.Microsoft.Azure.Monitor.MultipleResourceMultipleMetricCriteria' : MetricAlertMultipleResourceMultipleMetricCriteria,
+ 'MultiMetricCriteria.DynamicThresholdCriterion' : DynamicMetricCriteria,
'Action' : Action,
'Action.Microsoft.WindowsAzure.Management.Monitoring.Alerts.Models.Microsoft.AppInsights.Nexus.DataContracts.Resources.ScheduledQueryRules.AlertingAction' : AlertingAction,
'Action.Microsoft.WindowsAzure.Management.Monitoring.Alerts.Models.Microsoft.AppInsights.Nexus.DataContracts.Resources.ScheduledQueryRules.LogToMetricAction' : LogToMetricAction
diff --git a/sdk/monitor/arm-monitor/src/models/metricAlertsMappers.ts b/sdk/monitor/arm-monitor/src/models/metricAlertsMappers.ts
index 943c974071e4..a6d76f72efbc 100644
--- a/sdk/monitor/arm-monitor/src/models/metricAlertsMappers.ts
+++ b/sdk/monitor/arm-monitor/src/models/metricAlertsMappers.ts
@@ -32,6 +32,8 @@ export {
DiagnosticSettingsCategoryResource,
DiagnosticSettingsResource,
Dimension,
+ DynamicMetricCriteria,
+ DynamicThresholdFailingPeriods,
EmailNotification,
EmailReceiver,
ErrorResponse,
diff --git a/sdk/monitor/arm-monitor/src/models/parameters.ts b/sdk/monitor/arm-monitor/src/models/parameters.ts
index 87c3b9d92a89..30e7c95a9aa4 100644
--- a/sdk/monitor/arm-monitor/src/models/parameters.ts
+++ b/sdk/monitor/arm-monitor/src/models/parameters.ts
@@ -77,6 +77,18 @@ export const apiVersion1: msRest.OperationQueryParameter = {
}
};
export const apiVersion10: msRest.OperationQueryParameter = {
+ parameterPath: "apiVersion",
+ mapper: {
+ required: true,
+ isConstant: true,
+ serializedName: "api-version",
+ defaultValue: '2017-12-01-preview',
+ type: {
+ name: "String"
+ }
+ }
+};
+export const apiVersion11: msRest.OperationQueryParameter = {
parameterPath: "apiVersion",
mapper: {
required: true,
@@ -106,7 +118,7 @@ export const apiVersion3: msRest.OperationQueryParameter = {
required: true,
isConstant: true,
serializedName: "api-version",
- defaultValue: '2019-03-01',
+ defaultValue: '2019-06-01',
type: {
name: "String"
}
@@ -154,7 +166,7 @@ export const apiVersion7: msRest.OperationQueryParameter = {
required: true,
isConstant: true,
serializedName: "api-version",
- defaultValue: '2018-03-01',
+ defaultValue: '2019-03-01',
type: {
name: "String"
}
@@ -166,7 +178,7 @@ export const apiVersion8: msRest.OperationQueryParameter = {
required: true,
isConstant: true,
serializedName: "api-version",
- defaultValue: '2018-04-16',
+ defaultValue: '2018-03-01',
type: {
name: "String"
}
@@ -178,7 +190,7 @@ export const apiVersion9: msRest.OperationQueryParameter = {
required: true,
isConstant: true,
serializedName: "api-version",
- defaultValue: '2017-12-01-preview',
+ defaultValue: '2018-04-16',
type: {
name: "String"
}
diff --git a/sdk/monitor/arm-monitor/src/models/scheduledQueryRulesMappers.ts b/sdk/monitor/arm-monitor/src/models/scheduledQueryRulesMappers.ts
index 0eca9aa4e361..0fffe5f5617c 100644
--- a/sdk/monitor/arm-monitor/src/models/scheduledQueryRulesMappers.ts
+++ b/sdk/monitor/arm-monitor/src/models/scheduledQueryRulesMappers.ts
@@ -31,6 +31,8 @@ export {
DiagnosticSettingsCategoryResource,
DiagnosticSettingsResource,
Dimension,
+ DynamicMetricCriteria,
+ DynamicThresholdFailingPeriods,
EmailNotification,
EmailReceiver,
ErrorResponse,
diff --git a/sdk/monitor/arm-monitor/src/models/vMInsightsMappers.ts b/sdk/monitor/arm-monitor/src/models/vMInsightsMappers.ts
index 257346a9d360..3e0639f45f11 100644
--- a/sdk/monitor/arm-monitor/src/models/vMInsightsMappers.ts
+++ b/sdk/monitor/arm-monitor/src/models/vMInsightsMappers.ts
@@ -31,6 +31,8 @@ export {
DiagnosticSettingsCategoryResource,
DiagnosticSettingsResource,
Dimension,
+ DynamicMetricCriteria,
+ DynamicThresholdFailingPeriods,
EmailNotification,
EmailReceiver,
ErrorModel,
diff --git a/sdk/monitor/arm-monitor/src/monitorManagementClient.ts b/sdk/monitor/arm-monitor/src/monitorManagementClient.ts
index a689edcfdd71..a498d7b03d34 100644
--- a/sdk/monitor/arm-monitor/src/monitorManagementClient.ts
+++ b/sdk/monitor/arm-monitor/src/monitorManagementClient.ts
@@ -32,6 +32,7 @@ class MonitorManagementClient extends MonitorManagementClientContext {
metricDefinitions: operations.MetricDefinitions;
metrics: operations.Metrics;
metricBaseline: operations.MetricBaseline;
+ baselines: operations.Baselines;
metricAlerts: operations.MetricAlerts;
metricAlertsStatus: operations.MetricAlertsStatus;
scheduledQueryRules: operations.ScheduledQueryRules;
@@ -61,6 +62,7 @@ class MonitorManagementClient extends MonitorManagementClientContext {
this.metricDefinitions = new operations.MetricDefinitions(this);
this.metrics = new operations.Metrics(this);
this.metricBaseline = new operations.MetricBaseline(this);
+ this.baselines = new operations.Baselines(this);
this.metricAlerts = new operations.MetricAlerts(this);
this.metricAlertsStatus = new operations.MetricAlertsStatus(this);
this.scheduledQueryRules = new operations.ScheduledQueryRules(this);
diff --git a/sdk/monitor/arm-monitor/src/operations/baselines.ts b/sdk/monitor/arm-monitor/src/operations/baselines.ts
new file mode 100644
index 000000000000..b3d4b1640bdb
--- /dev/null
+++ b/sdk/monitor/arm-monitor/src/operations/baselines.ts
@@ -0,0 +1,89 @@
+/*
+ * Copyright (c) Microsoft Corporation. All rights reserved.
+ * Licensed under the MIT License. See License.txt in the project root for
+ * license information.
+ *
+ * Code generated by Microsoft (R) AutoRest Code Generator.
+ * Changes may cause incorrect behavior and will be lost if the code is
+ * regenerated.
+ */
+
+import * as msRest from "@azure/ms-rest-js";
+import * as Models from "../models";
+import * as Mappers from "../models/baselinesMappers";
+import * as Parameters from "../models/parameters";
+import { MonitorManagementClientContext } from "../monitorManagementClientContext";
+
+/** Class representing a Baselines. */
+export class Baselines {
+ private readonly client: MonitorManagementClientContext;
+
+ /**
+ * Create a Baselines.
+ * @param {MonitorManagementClientContext} client Reference to the service client.
+ */
+ constructor(client: MonitorManagementClientContext) {
+ this.client = client;
+ }
+
+ /**
+ * **Lists the metric baseline values for a resource**.
+ * @param resourceUri The identifier of the resource.
+ * @param [options] The optional parameters
+ * @returns Promise
+ */
+ list(resourceUri: string, options?: Models.BaselinesListOptionalParams): Promise;
+ /**
+ * @param resourceUri The identifier of the resource.
+ * @param callback The callback
+ */
+ list(resourceUri: string, callback: msRest.ServiceCallback): void;
+ /**
+ * @param resourceUri The identifier of the resource.
+ * @param options The optional parameters
+ * @param callback The callback
+ */
+ list(resourceUri: string, options: Models.BaselinesListOptionalParams, callback: msRest.ServiceCallback): void;
+ list(resourceUri: string, options?: Models.BaselinesListOptionalParams | msRest.ServiceCallback, callback?: msRest.ServiceCallback): Promise {
+ return this.client.sendOperationRequest(
+ {
+ resourceUri,
+ options
+ },
+ listOperationSpec,
+ callback) as Promise;
+ }
+}
+
+// Operation Specifications
+const serializer = new msRest.Serializer(Mappers);
+const listOperationSpec: msRest.OperationSpec = {
+ httpMethod: "GET",
+ path: "{resourceUri}/providers/microsoft.insights/metricBaselines",
+ urlParameters: [
+ Parameters.resourceUri
+ ],
+ queryParameters: [
+ Parameters.metricnames,
+ Parameters.metricnamespace,
+ Parameters.timespan,
+ Parameters.interval,
+ Parameters.aggregation,
+ Parameters.sensitivities,
+ Parameters.filter,
+ Parameters.resultType,
+ Parameters.apiVersion7
+ ],
+ headerParameters: [
+ Parameters.acceptLanguage
+ ],
+ responses: {
+ 200: {
+ bodyMapper: Mappers.MetricBaselinesResponse
+ },
+ default: {
+ bodyMapper: Mappers.ErrorResponse
+ }
+ },
+ serializer
+};
diff --git a/sdk/monitor/arm-monitor/src/operations/index.ts b/sdk/monitor/arm-monitor/src/operations/index.ts
index 52167a43fd1b..a7964c5cac32 100644
--- a/sdk/monitor/arm-monitor/src/operations/index.ts
+++ b/sdk/monitor/arm-monitor/src/operations/index.ts
@@ -23,6 +23,7 @@ export * from "./tenantActivityLogs";
export * from "./metricDefinitions";
export * from "./metrics";
export * from "./metricBaseline";
+export * from "./baselines";
export * from "./metricAlerts";
export * from "./metricAlertsStatus";
export * from "./scheduledQueryRules";
diff --git a/sdk/monitor/arm-monitor/src/operations/metricAlerts.ts b/sdk/monitor/arm-monitor/src/operations/metricAlerts.ts
index 8811518243f1..f7d435bd6048 100644
--- a/sdk/monitor/arm-monitor/src/operations/metricAlerts.ts
+++ b/sdk/monitor/arm-monitor/src/operations/metricAlerts.ts
@@ -224,7 +224,7 @@ const listBySubscriptionOperationSpec: msRest.OperationSpec = {
Parameters.subscriptionId
],
queryParameters: [
- Parameters.apiVersion7
+ Parameters.apiVersion8
],
headerParameters: [
Parameters.acceptLanguage
@@ -248,7 +248,7 @@ const listByResourceGroupOperationSpec: msRest.OperationSpec = {
Parameters.resourceGroupName
],
queryParameters: [
- Parameters.apiVersion7
+ Parameters.apiVersion8
],
headerParameters: [
Parameters.acceptLanguage
@@ -273,7 +273,7 @@ const getOperationSpec: msRest.OperationSpec = {
Parameters.ruleName
],
queryParameters: [
- Parameters.apiVersion7
+ Parameters.apiVersion8
],
headerParameters: [
Parameters.acceptLanguage
@@ -298,7 +298,7 @@ const createOrUpdateOperationSpec: msRest.OperationSpec = {
Parameters.ruleName
],
queryParameters: [
- Parameters.apiVersion7
+ Parameters.apiVersion8
],
headerParameters: [
Parameters.acceptLanguage
@@ -330,7 +330,7 @@ const updateOperationSpec: msRest.OperationSpec = {
Parameters.ruleName
],
queryParameters: [
- Parameters.apiVersion7
+ Parameters.apiVersion8
],
headerParameters: [
Parameters.acceptLanguage
@@ -362,7 +362,7 @@ const deleteMethodOperationSpec: msRest.OperationSpec = {
Parameters.ruleName
],
queryParameters: [
- Parameters.apiVersion7
+ Parameters.apiVersion8
],
headerParameters: [
Parameters.acceptLanguage
diff --git a/sdk/monitor/arm-monitor/src/operations/metricAlertsStatus.ts b/sdk/monitor/arm-monitor/src/operations/metricAlertsStatus.ts
index 6eb83cdd009a..018c13a6bff6 100644
--- a/sdk/monitor/arm-monitor/src/operations/metricAlertsStatus.ts
+++ b/sdk/monitor/arm-monitor/src/operations/metricAlertsStatus.ts
@@ -106,7 +106,7 @@ const listOperationSpec: msRest.OperationSpec = {
Parameters.ruleName
],
queryParameters: [
- Parameters.apiVersion7
+ Parameters.apiVersion8
],
headerParameters: [
Parameters.acceptLanguage
@@ -132,7 +132,7 @@ const listByNameOperationSpec: msRest.OperationSpec = {
Parameters.statusName
],
queryParameters: [
- Parameters.apiVersion7
+ Parameters.apiVersion8
],
headerParameters: [
Parameters.acceptLanguage
diff --git a/sdk/monitor/arm-monitor/src/operations/metricNamespaces.ts b/sdk/monitor/arm-monitor/src/operations/metricNamespaces.ts
index 7c9bb71069fe..447750b8340e 100644
--- a/sdk/monitor/arm-monitor/src/operations/metricNamespaces.ts
+++ b/sdk/monitor/arm-monitor/src/operations/metricNamespaces.ts
@@ -64,7 +64,7 @@ const listOperationSpec: msRest.OperationSpec = {
Parameters.resourceUri
],
queryParameters: [
- Parameters.apiVersion9,
+ Parameters.apiVersion10,
Parameters.startTime
],
headerParameters: [
diff --git a/sdk/monitor/arm-monitor/src/operations/scheduledQueryRules.ts b/sdk/monitor/arm-monitor/src/operations/scheduledQueryRules.ts
index 5acc255f18d7..67ccef2ca21c 100644
--- a/sdk/monitor/arm-monitor/src/operations/scheduledQueryRules.ts
+++ b/sdk/monitor/arm-monitor/src/operations/scheduledQueryRules.ts
@@ -226,7 +226,7 @@ const createOrUpdateOperationSpec: msRest.OperationSpec = {
Parameters.ruleName
],
queryParameters: [
- Parameters.apiVersion8
+ Parameters.apiVersion9
],
headerParameters: [
Parameters.acceptLanguage
@@ -261,7 +261,7 @@ const getOperationSpec: msRest.OperationSpec = {
Parameters.subscriptionId
],
queryParameters: [
- Parameters.apiVersion8
+ Parameters.apiVersion9
],
headerParameters: [
Parameters.acceptLanguage
@@ -286,7 +286,7 @@ const updateOperationSpec: msRest.OperationSpec = {
Parameters.ruleName
],
queryParameters: [
- Parameters.apiVersion8
+ Parameters.apiVersion9
],
headerParameters: [
Parameters.acceptLanguage
@@ -318,7 +318,7 @@ const deleteMethodOperationSpec: msRest.OperationSpec = {
Parameters.subscriptionId
],
queryParameters: [
- Parameters.apiVersion8
+ Parameters.apiVersion9
],
headerParameters: [
Parameters.acceptLanguage
@@ -340,7 +340,7 @@ const listBySubscriptionOperationSpec: msRest.OperationSpec = {
Parameters.subscriptionId
],
queryParameters: [
- Parameters.apiVersion8,
+ Parameters.apiVersion9,
Parameters.filter
],
headerParameters: [
@@ -365,7 +365,7 @@ const listByResourceGroupOperationSpec: msRest.OperationSpec = {
Parameters.subscriptionId
],
queryParameters: [
- Parameters.apiVersion8,
+ Parameters.apiVersion9,
Parameters.filter
],
headerParameters: [
diff --git a/sdk/monitor/arm-monitor/src/operations/vMInsights.ts b/sdk/monitor/arm-monitor/src/operations/vMInsights.ts
index 056e5a7bf6a4..1b0ecbdbe27e 100644
--- a/sdk/monitor/arm-monitor/src/operations/vMInsights.ts
+++ b/sdk/monitor/arm-monitor/src/operations/vMInsights.ts
@@ -67,7 +67,7 @@ const getOnboardingStatusOperationSpec: msRest.OperationSpec = {
Parameters.resourceUri
],
queryParameters: [
- Parameters.apiVersion10
+ Parameters.apiVersion11
],
headerParameters: [
Parameters.acceptLanguage