From 949da95031353dfd2e1ed806179e535968049a89 Mon Sep 17 00:00:00 2001 From: SDK Automation Date: Wed, 5 Aug 2020 08:59:58 +0000 Subject: [PATCH] Generated from f0feade78b3c30509df1da5cd03d026b2d14dfce [Monitor] DataCollectionRules in 2019-11-01-preview - suppress OperationsAPIImplementation --- sdk/monitor/arm-monitor/LICENSE.txt | 2 +- sdk/monitor/arm-monitor/README.md | 2 +- .../src/models/actionGroupsMappers.ts | 2 + .../src/models/activityLogAlertsMappers.ts | 2 + .../src/models/alertRulesMappers.ts | 2 + .../src/models/autoscaleSettingsMappers.ts | 2 + ...nosticSettingsCategoryOperationsMappers.ts | 2 + .../diagnosticSettingsOperationsMappers.ts | 2 + sdk/monitor/arm-monitor/src/models/index.ts | 106 ++++++++++++++++-- .../src/models/logProfilesMappers.ts | 2 + sdk/monitor/arm-monitor/src/models/mappers.ts | 100 ++++++++++++++++- .../src/models/metricAlertsMappers.ts | 2 + .../src/models/scheduledQueryRulesMappers.ts | 2 + .../src/models/vMInsightsMappers.ts | 2 + .../src/monitorManagementClientContext.ts | 2 +- .../arm-monitor/src/operations/alertRules.ts | 13 ++- 16 files changed, 221 insertions(+), 24 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/actionGroupsMappers.ts b/sdk/monitor/arm-monitor/src/models/actionGroupsMappers.ts index 11486f297d29..0cb9f400f3b9 100644 --- a/sdk/monitor/arm-monitor/src/models/actionGroupsMappers.ts +++ b/sdk/monitor/arm-monitor/src/models/actionGroupsMappers.ts @@ -76,6 +76,7 @@ export { ScaleAction, ScaleCapacity, ScaleRule, + ScaleRuleMetricDimension, Schedule, SmsReceiver, Source, @@ -86,5 +87,6 @@ export { VoiceReceiver, WebhookNotification, WebhookReceiver, + WebtestLocationAvailabilityCriteria, WorkspaceInfo } from "../models/mappers"; diff --git a/sdk/monitor/arm-monitor/src/models/activityLogAlertsMappers.ts b/sdk/monitor/arm-monitor/src/models/activityLogAlertsMappers.ts index d949c6e04f10..50255f799204 100644 --- a/sdk/monitor/arm-monitor/src/models/activityLogAlertsMappers.ts +++ b/sdk/monitor/arm-monitor/src/models/activityLogAlertsMappers.ts @@ -75,6 +75,7 @@ export { ScaleAction, ScaleCapacity, ScaleRule, + ScaleRuleMetricDimension, Schedule, SmsReceiver, Source, @@ -85,5 +86,6 @@ export { VoiceReceiver, WebhookNotification, WebhookReceiver, + WebtestLocationAvailabilityCriteria, WorkspaceInfo } from "../models/mappers"; diff --git a/sdk/monitor/arm-monitor/src/models/alertRulesMappers.ts b/sdk/monitor/arm-monitor/src/models/alertRulesMappers.ts index 91bb37022f98..73aae39d76b4 100644 --- a/sdk/monitor/arm-monitor/src/models/alertRulesMappers.ts +++ b/sdk/monitor/arm-monitor/src/models/alertRulesMappers.ts @@ -76,6 +76,7 @@ export { ScaleAction, ScaleCapacity, ScaleRule, + ScaleRuleMetricDimension, Schedule, SmsReceiver, Source, @@ -86,5 +87,6 @@ export { VoiceReceiver, WebhookNotification, WebhookReceiver, + WebtestLocationAvailabilityCriteria, WorkspaceInfo } from "../models/mappers"; diff --git a/sdk/monitor/arm-monitor/src/models/autoscaleSettingsMappers.ts b/sdk/monitor/arm-monitor/src/models/autoscaleSettingsMappers.ts index 68da5c7050e0..124abefd1d86 100644 --- a/sdk/monitor/arm-monitor/src/models/autoscaleSettingsMappers.ts +++ b/sdk/monitor/arm-monitor/src/models/autoscaleSettingsMappers.ts @@ -75,6 +75,7 @@ export { ScaleAction, ScaleCapacity, ScaleRule, + ScaleRuleMetricDimension, Schedule, SmsReceiver, Source, @@ -85,5 +86,6 @@ export { VoiceReceiver, WebhookNotification, WebhookReceiver, + WebtestLocationAvailabilityCriteria, WorkspaceInfo } from "../models/mappers"; diff --git a/sdk/monitor/arm-monitor/src/models/diagnosticSettingsCategoryOperationsMappers.ts b/sdk/monitor/arm-monitor/src/models/diagnosticSettingsCategoryOperationsMappers.ts index 7402d3661f02..b482738bb622 100644 --- a/sdk/monitor/arm-monitor/src/models/diagnosticSettingsCategoryOperationsMappers.ts +++ b/sdk/monitor/arm-monitor/src/models/diagnosticSettingsCategoryOperationsMappers.ts @@ -74,6 +74,7 @@ export { ScaleAction, ScaleCapacity, ScaleRule, + ScaleRuleMetricDimension, Schedule, SmsReceiver, Source, @@ -84,5 +85,6 @@ export { VoiceReceiver, WebhookNotification, WebhookReceiver, + WebtestLocationAvailabilityCriteria, WorkspaceInfo } from "../models/mappers"; diff --git a/sdk/monitor/arm-monitor/src/models/diagnosticSettingsOperationsMappers.ts b/sdk/monitor/arm-monitor/src/models/diagnosticSettingsOperationsMappers.ts index f0ba9bbf166f..21377792ae32 100644 --- a/sdk/monitor/arm-monitor/src/models/diagnosticSettingsOperationsMappers.ts +++ b/sdk/monitor/arm-monitor/src/models/diagnosticSettingsOperationsMappers.ts @@ -74,6 +74,7 @@ export { ScaleAction, ScaleCapacity, ScaleRule, + ScaleRuleMetricDimension, Schedule, SmsReceiver, Source, @@ -84,5 +85,6 @@ export { VoiceReceiver, WebhookNotification, WebhookReceiver, + WebtestLocationAvailabilityCriteria, WorkspaceInfo } from "../models/mappers"; diff --git a/sdk/monitor/arm-monitor/src/models/index.ts b/sdk/monitor/arm-monitor/src/models/index.ts index 88cfd9ddd4cf..1d3ac00bcc17 100644 --- a/sdk/monitor/arm-monitor/src/models/index.ts +++ b/sdk/monitor/arm-monitor/src/models/index.ts @@ -60,6 +60,26 @@ export interface ScaleCapacity { default: string; } +/** + * Specifies an auto scale rule metric dimension. + */ +export interface ScaleRuleMetricDimension { + /** + * Name of the dimension. + */ + dimensionName: string; + /** + * the dimension operator. Only 'Equals' and 'NotEquals' are supported. 'Equals' being equal to + * any of the values. 'NotEquals' being not equal to all of the values. Possible values include: + * 'Equals', 'NotEquals' + */ + operator: ScaleRuleMetricDimensionOperationType; + /** + * list of dimension values. For example: ["App1","App2"]. + */ + values: string[]; +} + /** * The trigger that results in a scaling action. */ @@ -68,6 +88,10 @@ export interface MetricTrigger { * the name of the metric that defines what the rule monitors. */ metricName: string; + /** + * the namespace of the metric that defines what the rule monitors. + */ + metricNamespace?: string; /** * the resource identifier of the resource the rule monitors. */ @@ -104,6 +128,11 @@ export interface MetricTrigger { * the threshold of the metric that triggers the scale action. */ threshold: number; + /** + * List of dimension conditions. For example: + * [{"DimensionName":"AppName","Operator":"Equals","Values":["App1"]},{"DimensionName":"Deployment","Operator":"Equals","Values":["default"]}]. + */ + dimensions?: ScaleRuleMetricDimension[]; } /** @@ -2113,13 +2142,13 @@ export interface MetricAlertAction { /** * The properties of a webhook object. */ - webhookProperties?: { [propertyName: string]: string }; + webHookProperties?: { [propertyName: string]: string }; } /** * Contains the possible cases for MetricAlertCriteria. */ -export type MetricAlertCriteriaUnion = MetricAlertCriteria | MetricAlertSingleResourceMultipleMetricCriteria | MetricAlertMultipleResourceMultipleMetricCriteria; +export type MetricAlertCriteriaUnion = MetricAlertCriteria | MetricAlertSingleResourceMultipleMetricCriteria | WebtestLocationAvailabilityCriteria | MetricAlertMultipleResourceMultipleMetricCriteria; /** * The rule criteria that defines the conditions of the alert rule. @@ -2179,7 +2208,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 +2271,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 +2404,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 +2428,28 @@ export interface MetricAlertSingleResourceMultipleMetricCriteria { allOf?: MetricCriteria[]; } +/** + * Specifies the metric alert rule criteria for a web test resource. + */ +export interface WebtestLocationAvailabilityCriteria { + /** + * Polymorphic Discriminator + */ + odatatype: "Microsoft.Azure.Monitor.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 +2528,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. @@ -3233,6 +3286,14 @@ export type TimeAggregationType = 'Average' | 'Minimum' | 'Maximum' | 'Total' | */ export type ComparisonOperationType = 'Equals' | 'NotEquals' | 'GreaterThan' | 'GreaterThanOrEqual' | 'LessThan' | 'LessThanOrEqual'; +/** + * Defines values for ScaleRuleMetricDimensionOperationType. + * Possible values include: 'Equals', 'NotEquals' + * @readonly + * @enum {string} + */ +export type ScaleRuleMetricDimensionOperationType = 'Equals' | 'NotEquals'; + /** * Defines values for ScaleDirection. * Possible values include: 'None', 'Increase', 'Decrease' @@ -3331,6 +3392,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/logProfilesMappers.ts b/sdk/monitor/arm-monitor/src/models/logProfilesMappers.ts index a1ad33c209e5..00754d76fc12 100644 --- a/sdk/monitor/arm-monitor/src/models/logProfilesMappers.ts +++ b/sdk/monitor/arm-monitor/src/models/logProfilesMappers.ts @@ -76,6 +76,7 @@ export { ScaleAction, ScaleCapacity, ScaleRule, + ScaleRuleMetricDimension, Schedule, SmsReceiver, Source, @@ -86,5 +87,6 @@ export { VoiceReceiver, WebhookNotification, WebhookReceiver, + WebtestLocationAvailabilityCriteria, WorkspaceInfo } from "../models/mappers"; diff --git a/sdk/monitor/arm-monitor/src/models/mappers.ts b/sdk/monitor/arm-monitor/src/models/mappers.ts index 3528feefba03..eba4c5d1da50 100644 --- a/sdk/monitor/arm-monitor/src/models/mappers.ts +++ b/sdk/monitor/arm-monitor/src/models/mappers.ts @@ -92,6 +92,42 @@ export const ScaleCapacity: msRest.CompositeMapper = { } }; +export const ScaleRuleMetricDimension: msRest.CompositeMapper = { + serializedName: "ScaleRuleMetricDimension", + type: { + name: "Composite", + className: "ScaleRuleMetricDimension", + modelProperties: { + dimensionName: { + required: true, + serializedName: "DimensionName", + 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 MetricTrigger: msRest.CompositeMapper = { serializedName: "MetricTrigger", type: { @@ -105,6 +141,12 @@ export const MetricTrigger: msRest.CompositeMapper = { name: "String" } }, + metricNamespace: { + serializedName: "metricNamespace", + type: { + name: "String" + } + }, metricResourceUri: { required: true, serializedName: "metricResourceUri", @@ -175,6 +217,18 @@ export const MetricTrigger: msRest.CompositeMapper = { type: { name: "Number" } + }, + dimensions: { + serializedName: "dimensions", + type: { + name: "Sequence", + element: { + type: { + name: "Composite", + className: "ScaleRuleMetricDimension" + } + } + } } } } @@ -3591,8 +3645,8 @@ export const MetricAlertAction: msRest.CompositeMapper = { name: "String" } }, - webhookProperties: { - serializedName: "webhookProperties", + webHookProperties: { + serializedName: "webHookProperties", type: { name: "Dictionary", value: { @@ -4026,7 +4080,7 @@ export const MetricCriteria: msRest.CompositeMapper = { required: true, serializedName: "operator", type: { - name: "Object" + name: "String" } }, threshold: { @@ -4068,6 +4122,41 @@ export const MetricAlertSingleResourceMultipleMetricCriteria: msRest.CompositeMa } }; +export const WebtestLocationAvailabilityCriteria: msRest.CompositeMapper = { + serializedName: "Microsoft.Azure.Monitor.WebtestLocationAvailabilityCriteria", + type: { + name: "Composite", + polymorphicDiscriminator: MetricAlertCriteria.type.polymorphicDiscriminator, + uberParent: "MetricAlertCriteria", + className: "WebtestLocationAvailabilityCriteria", + modelProperties: { + ...MetricAlertCriteria.type.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" + } + } + }, + additionalProperties: MetricAlertCriteria.type.additionalProperties + } +}; + export const MetricDimension: msRest.CompositeMapper = { serializedName: "MetricDimension", type: { @@ -4172,14 +4261,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: { @@ -5140,6 +5229,7 @@ export const discriminators = { 'MetricAlertCriteria' : MetricAlertCriteria, 'MultiMetricCriteria.StaticThresholdCriterion' : MetricCriteria, 'MetricAlertCriteria.Microsoft.Azure.Monitor.SingleResourceMultipleMetricCriteria' : MetricAlertSingleResourceMultipleMetricCriteria, + 'MetricAlertCriteria.Microsoft.Azure.Monitor.WebtestLocationAvailabilityCriteria' : WebtestLocationAvailabilityCriteria, 'MultiMetricCriteria' : MultiMetricCriteria, 'MetricAlertCriteria.Microsoft.Azure.Monitor.MultipleResourceMultipleMetricCriteria' : MetricAlertMultipleResourceMultipleMetricCriteria, 'MultiMetricCriteria.DynamicThresholdCriterion' : DynamicMetricCriteria, diff --git a/sdk/monitor/arm-monitor/src/models/metricAlertsMappers.ts b/sdk/monitor/arm-monitor/src/models/metricAlertsMappers.ts index a6d76f72efbc..35640ebfdb4f 100644 --- a/sdk/monitor/arm-monitor/src/models/metricAlertsMappers.ts +++ b/sdk/monitor/arm-monitor/src/models/metricAlertsMappers.ts @@ -76,6 +76,7 @@ export { ScaleAction, ScaleCapacity, ScaleRule, + ScaleRuleMetricDimension, Schedule, SmsReceiver, Source, @@ -86,5 +87,6 @@ export { VoiceReceiver, WebhookNotification, WebhookReceiver, + WebtestLocationAvailabilityCriteria, WorkspaceInfo } from "../models/mappers"; diff --git a/sdk/monitor/arm-monitor/src/models/scheduledQueryRulesMappers.ts b/sdk/monitor/arm-monitor/src/models/scheduledQueryRulesMappers.ts index 0fffe5f5617c..600edc999eb1 100644 --- a/sdk/monitor/arm-monitor/src/models/scheduledQueryRulesMappers.ts +++ b/sdk/monitor/arm-monitor/src/models/scheduledQueryRulesMappers.ts @@ -75,6 +75,7 @@ export { ScaleAction, ScaleCapacity, ScaleRule, + ScaleRuleMetricDimension, Schedule, SmsReceiver, Source, @@ -85,5 +86,6 @@ export { VoiceReceiver, WebhookNotification, WebhookReceiver, + WebtestLocationAvailabilityCriteria, WorkspaceInfo } from "../models/mappers"; diff --git a/sdk/monitor/arm-monitor/src/models/vMInsightsMappers.ts b/sdk/monitor/arm-monitor/src/models/vMInsightsMappers.ts index 3e0639f45f11..665ed0f4f2d2 100644 --- a/sdk/monitor/arm-monitor/src/models/vMInsightsMappers.ts +++ b/sdk/monitor/arm-monitor/src/models/vMInsightsMappers.ts @@ -74,6 +74,7 @@ export { ScaleAction, ScaleCapacity, ScaleRule, + ScaleRuleMetricDimension, Schedule, SmsReceiver, Source, @@ -84,5 +85,6 @@ export { VoiceReceiver, WebhookNotification, WebhookReceiver, + WebtestLocationAvailabilityCriteria, WorkspaceInfo } from "../models/mappers"; 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 */