From da3f1d2e389d22f2074c1966eb27dfa50eb9412f Mon Sep 17 00:00:00 2001 From: SDK Automation Date: Thu, 2 Apr 2020 17:35:44 +0000 Subject: [PATCH] Generated from 639374f2d52a90ece8d7fdb50e65a89df5a5edf1 remove wrong default error response --- sdk/monitor/arm-monitor/LICENSE.txt | 2 +- sdk/monitor/arm-monitor/README.md | 2 +- sdk/monitor/arm-monitor/src/models/index.ts | 63 ++++++++++++++++--- sdk/monitor/arm-monitor/src/models/mappers.ts | 41 ++++++++++-- .../src/monitorManagementClientContext.ts | 2 +- .../arm-monitor/src/operations/alertRules.ts | 13 ++-- 6 files changed, 100 insertions(+), 23 deletions(-) diff --git a/sdk/monitor/arm-monitor/LICENSE.txt b/sdk/monitor/arm-monitor/LICENSE.txt index b73b4a1293c3..ea8fb1516028 100644 --- a/sdk/monitor/arm-monitor/LICENSE.txt +++ b/sdk/monitor/arm-monitor/LICENSE.txt @@ -1,6 +1,6 @@ The MIT License (MIT) -Copyright (c) 2019 Microsoft +Copyright (c) 2020 Microsoft Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files (the "Software"), to deal diff --git a/sdk/monitor/arm-monitor/README.md b/sdk/monitor/arm-monitor/README.md index 04373a170952..3a3dee917dae 100644 --- a/sdk/monitor/arm-monitor/README.md +++ b/sdk/monitor/arm-monitor/README.md @@ -98,4 +98,4 @@ See https://github.com/Azure/ms-rest-browserauth to learn how to authenticate to - [Microsoft Azure SDK for Javascript](https://github.com/Azure/azure-sdk-for-js) -![Impressions](https://azure-sdk-impressions.azurewebsites.net/api/impressions/azure-sdk-for-js%2Fsdk%2Fmonitor%2Farm-monitor%2FREADME.png) +![Impressions](https://azure-sdk-impressions.azurewebsites.net/api/impressions/azure-sdk-for-js/sdk/monitor/arm-monitor/README.png) diff --git a/sdk/monitor/arm-monitor/src/models/index.ts b/sdk/monitor/arm-monitor/src/models/index.ts index 88cfd9ddd4cf..8acabfc3558a 100644 --- a/sdk/monitor/arm-monitor/src/models/index.ts +++ b/sdk/monitor/arm-monitor/src/models/index.ts @@ -2113,7 +2113,7 @@ export interface MetricAlertAction { /** * The properties of a webhook object. */ - webhookProperties?: { [propertyName: string]: string }; + webHookProperties?: { [propertyName: string]: string }; } /** @@ -2179,7 +2179,7 @@ export interface MetricAlertResource extends Resource { */ criteria: MetricAlertCriteriaUnion; /** - * the flag that indicates whether the alert should be auto resolved or not. + * the flag that indicates whether the alert should be auto resolved or not. The default is true. */ autoMitigate?: boolean; /** @@ -2242,7 +2242,7 @@ export interface MetricAlertResourcePatch { */ criteria: MetricAlertCriteriaUnion; /** - * the flag that indicates whether the alert should be auto resolved or not. + * the flag that indicates whether the alert should be auto resolved or not. The default is true. */ autoMitigate?: boolean; /** @@ -2375,9 +2375,10 @@ export interface MetricCriteria { */ dimensions?: MetricDimension[]; /** - * the criteria operator. + * the criteria operator. Possible values include: 'Equals', 'NotEquals', 'GreaterThan', + * 'GreaterThanOrEqual', 'LessThan', 'LessThanOrEqual' */ - operator: any; + operator: Operator; /** * the criteria threshold value that activates the alert. */ @@ -2398,6 +2399,24 @@ export interface MetricAlertSingleResourceMultipleMetricCriteria { allOf?: MetricCriteria[]; } +/** + * Specifies the metric alert rule criteria for a web test resource. + */ +export interface WebtestLocationAvailabilityCriteria { + /** + * The Application Insights web test Id. + */ + webTestId: string; + /** + * The Application Insights resource Id. + */ + componentId: string; + /** + * The number of failed locations. + */ + failedLocationCount: number; +} + /** * Specifies a metric dimension. */ @@ -2476,14 +2495,15 @@ export interface DynamicMetricCriteria { */ dimensions?: MetricDimension[]; /** - * The operator used to compare the metric value against the threshold. + * The operator used to compare the metric value against the threshold. Possible values include: + * 'GreaterThan', 'LessThan', 'GreaterOrLessThan' */ - operator: any; + operator: DynamicThresholdOperator; /** * The extent of deviation required to trigger an alert. This will affect how tight the threshold - * is to the metric series pattern. + * is to the metric series pattern. Possible values include: 'Low', 'Medium', 'High' */ - alertSensitivity: any; + alertSensitivity: DynamicThresholdSensitivity; /** * The minimum number of violations required within the selected lookback time window required to * raise an alert. @@ -3331,6 +3351,31 @@ export type Sensitivity = 'Low' | 'Medium' | 'High'; */ export type BaselineSensitivity = 'Low' | 'Medium' | 'High'; +/** + * Defines values for Operator. + * Possible values include: 'Equals', 'NotEquals', 'GreaterThan', 'GreaterThanOrEqual', 'LessThan', + * 'LessThanOrEqual' + * @readonly + * @enum {string} + */ +export type Operator = 'Equals' | 'NotEquals' | 'GreaterThan' | 'GreaterThanOrEqual' | 'LessThan' | 'LessThanOrEqual'; + +/** + * Defines values for DynamicThresholdOperator. + * Possible values include: 'GreaterThan', 'LessThan', 'GreaterOrLessThan' + * @readonly + * @enum {string} + */ +export type DynamicThresholdOperator = 'GreaterThan' | 'LessThan' | 'GreaterOrLessThan'; + +/** + * Defines values for DynamicThresholdSensitivity. + * Possible values include: 'Low', 'Medium', 'High' + * @readonly + * @enum {string} + */ +export type DynamicThresholdSensitivity = 'Low' | 'Medium' | 'High'; + /** * Defines values for Enabled. * Possible values include: 'true', 'false' diff --git a/sdk/monitor/arm-monitor/src/models/mappers.ts b/sdk/monitor/arm-monitor/src/models/mappers.ts index 3528feefba03..f4dc1bef5705 100644 --- a/sdk/monitor/arm-monitor/src/models/mappers.ts +++ b/sdk/monitor/arm-monitor/src/models/mappers.ts @@ -3591,8 +3591,8 @@ export const MetricAlertAction: msRest.CompositeMapper = { name: "String" } }, - webhookProperties: { - serializedName: "webhookProperties", + webHookProperties: { + serializedName: "webHookProperties", type: { name: "Dictionary", value: { @@ -4026,7 +4026,7 @@ export const MetricCriteria: msRest.CompositeMapper = { required: true, serializedName: "operator", type: { - name: "Object" + name: "String" } }, threshold: { @@ -4068,6 +4068,37 @@ export const MetricAlertSingleResourceMultipleMetricCriteria: msRest.CompositeMa } }; +export const WebtestLocationAvailabilityCriteria: msRest.CompositeMapper = { + serializedName: "Microsoft.Azure.Monitor.WebtestLocationAvailabilityCriteria", + type: { + name: "Composite", + className: "WebtestLocationAvailabilityCriteria", + modelProperties: { + webTestId: { + required: true, + serializedName: "webTestId", + type: { + name: "String" + } + }, + componentId: { + required: true, + serializedName: "componentId", + type: { + name: "String" + } + }, + failedLocationCount: { + required: true, + serializedName: "failedLocationCount", + type: { + name: "Number" + } + } + } + } +}; + export const MetricDimension: msRest.CompositeMapper = { serializedName: "MetricDimension", type: { @@ -4172,14 +4203,14 @@ export const DynamicMetricCriteria: msRest.CompositeMapper = { required: true, serializedName: "operator", type: { - name: "Object" + name: "String" } }, alertSensitivity: { required: true, serializedName: "alertSensitivity", type: { - name: "Object" + name: "String" } }, failingPeriods: { diff --git a/sdk/monitor/arm-monitor/src/monitorManagementClientContext.ts b/sdk/monitor/arm-monitor/src/monitorManagementClientContext.ts index aacdc007667d..bde825bc74ed 100644 --- a/sdk/monitor/arm-monitor/src/monitorManagementClientContext.ts +++ b/sdk/monitor/arm-monitor/src/monitorManagementClientContext.ts @@ -13,7 +13,7 @@ import * as msRest from "@azure/ms-rest-js"; import * as msRestAzure from "@azure/ms-rest-azure-js"; const packageName = "@azure/arm-monitor"; -const packageVersion = "5.4.0"; +const packageVersion = "6.0.0"; export class MonitorManagementClientContext extends msRestAzure.AzureServiceClient { credentials: msRest.ServiceClientCredentials; diff --git a/sdk/monitor/arm-monitor/src/operations/alertRules.ts b/sdk/monitor/arm-monitor/src/operations/alertRules.ts index 79429b70aaf1..b1f4c278d26b 100644 --- a/sdk/monitor/arm-monitor/src/operations/alertRules.ts +++ b/sdk/monitor/arm-monitor/src/operations/alertRules.ts @@ -27,7 +27,7 @@ export class AlertRules { } /** - * Creates or updates an alert rule. + * Creates or updates a classic metric alert rule. * @param resourceGroupName The name of the resource group. * @param ruleName The name of the rule. * @param parameters The parameters of the rule to create or update. @@ -63,7 +63,7 @@ export class AlertRules { } /** - * Deletes an alert rule + * Deletes a classic metric alert rule * @param resourceGroupName The name of the resource group. * @param ruleName The name of the rule. * @param [options] The optional parameters @@ -95,7 +95,7 @@ export class AlertRules { } /** - * Gets an alert rule + * Gets a classic metric alert rule * @param resourceGroupName The name of the resource group. * @param ruleName The name of the rule. * @param [options] The optional parameters @@ -127,7 +127,8 @@ export class AlertRules { } /** - * Updates an existing AlertRuleResource. To update other fields use the CreateOrUpdate method. + * Updates an existing classic metric AlertRuleResource. To update other fields use the + * CreateOrUpdate method. * @param resourceGroupName The name of the resource group. * @param ruleName The name of the rule. * @param alertRulesResource Parameters supplied to the operation. @@ -163,7 +164,7 @@ export class AlertRules { } /** - * List the alert rules within a resource group. + * List the classic metric alert rules within a resource group. * @param resourceGroupName The name of the resource group. * @param [options] The optional parameters * @returns Promise @@ -191,7 +192,7 @@ export class AlertRules { } /** - * List the alert rules within a subscription. + * List the classic metric alert rules within a subscription. * @param [options] The optional parameters * @returns Promise */