From be9469326ccba77efe72f8c9dd3ced491edef29e Mon Sep 17 00:00:00 2001 From: SDKAuto Date: Mon, 15 Mar 2021 07:50:28 +0000 Subject: [PATCH] CodeGen from PR 13418 in Azure/azure-rest-api-specs Merge a1b9ae1cd0cb7b0826667fdf0665be093a37f0f4 into 8bfa3fbfb7afc27ccff6cd3a8bbe978f873ed673 --- sdk/monitor/arm-monitor/LICENSE.txt | 2 +- sdk/monitor/arm-monitor/README.md | 19 +- sdk/monitor/arm-monitor/rollup.config.js | 4 +- .../src/models/actionGroupsMappers.ts | 90 - .../src/models/activityLogAlertsMappers.ts | 90 +- .../src/models/activityLogsMappers.ts | 17 - .../src/models/alertRuleIncidentsMappers.ts | 15 - .../src/models/alertRulesMappers.ts | 90 - .../src/models/autoscaleSettingsMappers.ts | 89 - .../src/models/baselinesMappers.ts | 18 - ...nosticSettingsCategoryOperationsMappers.ts | 88 - .../diagnosticSettingsOperationsMappers.ts | 88 - .../src/models/eventCategoriesMappers.ts | 14 - sdk/monitor/arm-monitor/src/models/index.ts | 4464 +-------------- .../src/models/logProfilesMappers.ts | 90 - sdk/monitor/arm-monitor/src/models/mappers.ts | 5067 +---------------- .../src/models/metricAlertsMappers.ts | 90 - .../src/models/metricAlertsStatusMappers.ts | 15 - .../src/models/metricBaselineMappers.ts | 18 - .../src/models/metricDefinitionsMappers.ts | 16 - .../src/models/metricNamespacesMappers.ts | 15 - .../arm-monitor/src/models/metricsMappers.ts | 18 - .../src/models/operationsMappers.ts | 15 - .../arm-monitor/src/models/parameters.ts | 401 +- .../src/models/scheduledQueryRulesMappers.ts | 89 - .../src/models/tenantActivityLogsMappers.ts | 17 - .../src/models/vMInsightsMappers.ts | 88 - .../src/monitorManagementClient.ts | 47 +- .../src/monitorManagementClientContext.ts | 11 +- .../src/operations/actionGroups.ts | 451 -- .../src/operations/activityLogAlerts.ts | 256 +- .../src/operations/activityLogs.ts | 171 - .../src/operations/alertRuleIncidents.ts | 149 - .../arm-monitor/src/operations/alertRules.ts | 384 -- .../src/operations/autoscaleSettings.ts | 480 -- .../arm-monitor/src/operations/baselines.ts | 89 - .../diagnosticSettingsCategoryOperations.ts | 137 - .../diagnosticSettingsOperations.ts | 259 - .../src/operations/eventCategories.ts | 76 - .../arm-monitor/src/operations/index.ts | 25 +- .../arm-monitor/src/operations/logProfiles.ts | 305 - .../src/operations/metricAlerts.ts | 378 -- .../src/operations/metricAlertsStatus.ts | 149 - .../src/operations/metricBaseline.ts | 174 - .../src/operations/metricDefinitions.ts | 82 - .../src/operations/metricNamespaces.ts | 82 - .../arm-monitor/src/operations/metrics.ts | 90 - .../arm-monitor/src/operations/operations.ts | 74 - .../src/operations/scheduledQueryRules.ts | 383 -- .../src/operations/tenantActivityLogs.ts | 133 - .../arm-monitor/src/operations/vMInsights.ts | 84 - 51 files changed, 469 insertions(+), 15027 deletions(-) delete mode 100644 sdk/monitor/arm-monitor/src/models/actionGroupsMappers.ts delete mode 100644 sdk/monitor/arm-monitor/src/models/activityLogsMappers.ts delete mode 100644 sdk/monitor/arm-monitor/src/models/alertRuleIncidentsMappers.ts delete mode 100644 sdk/monitor/arm-monitor/src/models/alertRulesMappers.ts delete mode 100644 sdk/monitor/arm-monitor/src/models/autoscaleSettingsMappers.ts delete mode 100644 sdk/monitor/arm-monitor/src/models/baselinesMappers.ts delete mode 100644 sdk/monitor/arm-monitor/src/models/diagnosticSettingsCategoryOperationsMappers.ts delete mode 100644 sdk/monitor/arm-monitor/src/models/diagnosticSettingsOperationsMappers.ts delete mode 100644 sdk/monitor/arm-monitor/src/models/eventCategoriesMappers.ts delete mode 100644 sdk/monitor/arm-monitor/src/models/logProfilesMappers.ts delete mode 100644 sdk/monitor/arm-monitor/src/models/metricAlertsMappers.ts delete mode 100644 sdk/monitor/arm-monitor/src/models/metricAlertsStatusMappers.ts delete mode 100644 sdk/monitor/arm-monitor/src/models/metricBaselineMappers.ts delete mode 100644 sdk/monitor/arm-monitor/src/models/metricDefinitionsMappers.ts delete mode 100644 sdk/monitor/arm-monitor/src/models/metricNamespacesMappers.ts delete mode 100644 sdk/monitor/arm-monitor/src/models/metricsMappers.ts delete mode 100644 sdk/monitor/arm-monitor/src/models/operationsMappers.ts delete mode 100644 sdk/monitor/arm-monitor/src/models/scheduledQueryRulesMappers.ts delete mode 100644 sdk/monitor/arm-monitor/src/models/tenantActivityLogsMappers.ts delete mode 100644 sdk/monitor/arm-monitor/src/models/vMInsightsMappers.ts delete mode 100644 sdk/monitor/arm-monitor/src/operations/actionGroups.ts delete mode 100644 sdk/monitor/arm-monitor/src/operations/activityLogs.ts delete mode 100644 sdk/monitor/arm-monitor/src/operations/alertRuleIncidents.ts delete mode 100644 sdk/monitor/arm-monitor/src/operations/alertRules.ts delete mode 100644 sdk/monitor/arm-monitor/src/operations/autoscaleSettings.ts delete mode 100644 sdk/monitor/arm-monitor/src/operations/baselines.ts delete mode 100644 sdk/monitor/arm-monitor/src/operations/diagnosticSettingsCategoryOperations.ts delete mode 100644 sdk/monitor/arm-monitor/src/operations/diagnosticSettingsOperations.ts delete mode 100644 sdk/monitor/arm-monitor/src/operations/eventCategories.ts delete mode 100644 sdk/monitor/arm-monitor/src/operations/logProfiles.ts delete mode 100644 sdk/monitor/arm-monitor/src/operations/metricAlerts.ts delete mode 100644 sdk/monitor/arm-monitor/src/operations/metricAlertsStatus.ts delete mode 100644 sdk/monitor/arm-monitor/src/operations/metricBaseline.ts delete mode 100644 sdk/monitor/arm-monitor/src/operations/metricDefinitions.ts delete mode 100644 sdk/monitor/arm-monitor/src/operations/metricNamespaces.ts delete mode 100644 sdk/monitor/arm-monitor/src/operations/metrics.ts delete mode 100644 sdk/monitor/arm-monitor/src/operations/operations.ts delete mode 100644 sdk/monitor/arm-monitor/src/operations/scheduledQueryRules.ts delete mode 100644 sdk/monitor/arm-monitor/src/operations/tenantActivityLogs.ts delete mode 100644 sdk/monitor/arm-monitor/src/operations/vMInsights.ts diff --git a/sdk/monitor/arm-monitor/LICENSE.txt b/sdk/monitor/arm-monitor/LICENSE.txt index b73b4a1293c3..2d3163745319 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) 2021 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..c39af7ed866d 100644 --- a/sdk/monitor/arm-monitor/README.md +++ b/sdk/monitor/arm-monitor/README.md @@ -15,7 +15,7 @@ npm install @azure/arm-monitor ### How to use -#### nodejs - Authentication, client creation and listByResourceGroup autoscaleSettings as an example written in TypeScript. +#### nodejs - client creation and get activityLogAlerts as an example written in TypeScript. ##### Install @azure/ms-rest-nodeauth @@ -26,17 +26,17 @@ npm install @azure/ms-rest-nodeauth@"^3.0.0" ##### Sample code +While the below sample uses the interactive login, other authentication options can be found in the [README.md file of @azure/ms-rest-nodeauth](https://www.npmjs.com/package/@azure/ms-rest-nodeauth) package ```typescript -import * as msRest from "@azure/ms-rest-js"; -import * as msRestAzure from "@azure/ms-rest-azure-js"; -import * as msRestNodeAuth from "@azure/ms-rest-nodeauth"; -import { MonitorManagementClient, MonitorManagementModels, MonitorManagementMappers } from "@azure/arm-monitor"; +const msRestNodeAuth = require("@azure/ms-rest-nodeauth"); +const { MonitorManagementClient } = require("@azure/arm-monitor"); const subscriptionId = process.env["AZURE_SUBSCRIPTION_ID"]; msRestNodeAuth.interactiveLogin().then((creds) => { const client = new MonitorManagementClient(creds, subscriptionId); const resourceGroupName = "testresourceGroupName"; - client.autoscaleSettings.listByResourceGroup(resourceGroupName).then((result) => { + const activityLogAlertName = "testactivityLogAlertName"; + client.activityLogAlerts.get(resourceGroupName, activityLogAlertName).then((result) => { console.log("The result is:"); console.log(result); }); @@ -45,7 +45,7 @@ msRestNodeAuth.interactiveLogin().then((creds) => { }); ``` -#### browser - Authentication, client creation and listByResourceGroup autoscaleSettings as an example written in JavaScript. +#### browser - Authentication, client creation and get activityLogAlerts as an example written in JavaScript. ##### Install @azure/ms-rest-browserauth @@ -80,7 +80,8 @@ See https://github.com/Azure/ms-rest-browserauth to learn how to authenticate to } const client = new Azure.ArmMonitor.MonitorManagementClient(res.creds, subscriptionId); const resourceGroupName = "testresourceGroupName"; - client.autoscaleSettings.listByResourceGroup(resourceGroupName).then((result) => { + const activityLogAlertName = "testactivityLogAlertName"; + client.activityLogAlerts.get(resourceGroupName, activityLogAlertName).then((result) => { console.log("The result is:"); console.log(result); }).catch((err) => { @@ -98,4 +99,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/rollup.config.js b/sdk/monitor/arm-monitor/rollup.config.js index 60aa3b0cb549..b33f5ee53343 100644 --- a/sdk/monitor/arm-monitor/rollup.config.js +++ b/sdk/monitor/arm-monitor/rollup.config.js @@ -21,8 +21,8 @@ const config = { "@azure/ms-rest-azure-js": "msRestAzure" }, banner: `/* - * Copyright (c) Microsoft Corporation. All rights reserved. - * Licensed under the MIT License. See License.txt in the project root for license information. + * Copyright (c) Microsoft Corporation. + * Licensed under the MIT License. * * Code generated by Microsoft (R) AutoRest Code Generator. * Changes may cause incorrect behavior and will be lost if the code is regenerated. diff --git a/sdk/monitor/arm-monitor/src/models/actionGroupsMappers.ts b/sdk/monitor/arm-monitor/src/models/actionGroupsMappers.ts deleted file mode 100644 index 11486f297d29..000000000000 --- a/sdk/monitor/arm-monitor/src/models/actionGroupsMappers.ts +++ /dev/null @@ -1,90 +0,0 @@ -/* - * 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, - Action, - ActionGroupList, - ActionGroupPatchBody, - ActionGroupResource, - ActivityLogAlertActionGroup, - ActivityLogAlertActionList, - ActivityLogAlertAllOfCondition, - ActivityLogAlertLeafCondition, - ActivityLogAlertResource, - AlertingAction, - AlertRuleResource, - ArmRoleReceiver, - AutomationRunbookReceiver, - AutoscaleNotification, - AutoscaleProfile, - AutoscaleSettingResource, - AzNsActionGroup, - AzureAppPushReceiver, - AzureFunctionReceiver, - BaseResource, - Criteria, - DataContainer, - DiagnosticSettingsCategoryResource, - DiagnosticSettingsResource, - Dimension, - DynamicMetricCriteria, - DynamicThresholdFailingPeriods, - EmailNotification, - EmailReceiver, - EnableRequest, - ErrorResponse, - ItsmReceiver, - LocationThresholdRuleCondition, - LogicAppReceiver, - LogMetricTrigger, - LogProfileResource, - LogSearchRuleResource, - LogSettings, - LogToMetricAction, - ManagementEventAggregationCondition, - ManagementEventRuleCondition, - MetricAlertAction, - MetricAlertCriteria, - MetricAlertMultipleResourceMultipleMetricCriteria, - MetricAlertResource, - MetricAlertSingleResourceMultipleMetricCriteria, - MetricCriteria, - MetricDimension, - MetricSettings, - MetricTrigger, - MultiMetricCriteria, - ProxyOnlyResource, - ProxyResource, - Recurrence, - RecurrentSchedule, - Resource, - RetentionPolicy, - RuleAction, - RuleCondition, - RuleDataSource, - RuleEmailAction, - RuleManagementEventClaimsDataSource, - RuleManagementEventDataSource, - RuleMetricDataSource, - RuleWebhookAction, - ScaleAction, - ScaleCapacity, - ScaleRule, - Schedule, - SmsReceiver, - Source, - ThresholdRuleCondition, - TimeWindow, - TriggerCondition, - VMInsightsOnboardingStatus, - VoiceReceiver, - WebhookNotification, - WebhookReceiver, - 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..582f0c3eeba4 100644 --- a/sdk/monitor/arm-monitor/src/models/activityLogAlertsMappers.ts +++ b/sdk/monitor/arm-monitor/src/models/activityLogAlertsMappers.ts @@ -1,89 +1,21 @@ /* - * Copyright (c) Microsoft Corporation. All rights reserved. - * Licensed under the MIT License. See License.txt in the project root for license information. + * Copyright (c) Microsoft Corporation. + * Licensed under the MIT License. * * Code generated by Microsoft (R) AutoRest Code Generator. * Changes may cause incorrect behavior and will be lost if the code is regenerated. */ export { - discriminators, - Action, - ActionGroupResource, - ActivityLogAlertActionGroup, - ActivityLogAlertActionList, - ActivityLogAlertAllOfCondition, - ActivityLogAlertLeafCondition, - ActivityLogAlertList, - ActivityLogAlertPatchBody, + ActionGroup, + ActionList, ActivityLogAlertResource, - AlertingAction, - AlertRuleResource, - ArmRoleReceiver, - AutomationRunbookReceiver, - AutoscaleNotification, - AutoscaleProfile, - AutoscaleSettingResource, - AzNsActionGroup, - AzureAppPushReceiver, - AzureFunctionReceiver, + AlertRuleAllOfCondition, + AlertRuleAnyOfOrLeafCondition, + AlertRuleLeafCondition, + AlertRuleList, + AlertRulePatchObject, + AzureResource, BaseResource, - Criteria, - DataContainer, - DiagnosticSettingsCategoryResource, - DiagnosticSettingsResource, - Dimension, - DynamicMetricCriteria, - DynamicThresholdFailingPeriods, - EmailNotification, - EmailReceiver, - ErrorResponse, - ItsmReceiver, - LocationThresholdRuleCondition, - LogicAppReceiver, - LogMetricTrigger, - LogProfileResource, - LogSearchRuleResource, - LogSettings, - LogToMetricAction, - ManagementEventAggregationCondition, - ManagementEventRuleCondition, - MetricAlertAction, - MetricAlertCriteria, - MetricAlertMultipleResourceMultipleMetricCriteria, - MetricAlertResource, - MetricAlertSingleResourceMultipleMetricCriteria, - MetricCriteria, - MetricDimension, - MetricSettings, - MetricTrigger, - MultiMetricCriteria, - ProxyOnlyResource, - ProxyResource, - Recurrence, - RecurrentSchedule, - Resource, - RetentionPolicy, - RuleAction, - RuleCondition, - RuleDataSource, - RuleEmailAction, - RuleManagementEventClaimsDataSource, - RuleManagementEventDataSource, - RuleMetricDataSource, - RuleWebhookAction, - ScaleAction, - ScaleCapacity, - ScaleRule, - Schedule, - SmsReceiver, - Source, - ThresholdRuleCondition, - TimeWindow, - TriggerCondition, - VMInsightsOnboardingStatus, - VoiceReceiver, - WebhookNotification, - WebhookReceiver, - WorkspaceInfo + ErrorResponse } from "../models/mappers"; diff --git a/sdk/monitor/arm-monitor/src/models/activityLogsMappers.ts b/sdk/monitor/arm-monitor/src/models/activityLogsMappers.ts deleted file mode 100644 index 80edb96348be..000000000000 --- a/sdk/monitor/arm-monitor/src/models/activityLogsMappers.ts +++ /dev/null @@ -1,17 +0,0 @@ -/* - * 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, - ErrorResponse, - EventData, - EventDataCollection, - HttpRequestInfo, - LocalizableString, - SenderAuthorization -} from "../models/mappers"; diff --git a/sdk/monitor/arm-monitor/src/models/alertRuleIncidentsMappers.ts b/sdk/monitor/arm-monitor/src/models/alertRuleIncidentsMappers.ts deleted file mode 100644 index 1980277abff7..000000000000 --- a/sdk/monitor/arm-monitor/src/models/alertRuleIncidentsMappers.ts +++ /dev/null @@ -1,15 +0,0 @@ -/* - * 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, - CloudError, - ErrorResponse, - Incident, - IncidentListResult -} from "../models/mappers"; diff --git a/sdk/monitor/arm-monitor/src/models/alertRulesMappers.ts b/sdk/monitor/arm-monitor/src/models/alertRulesMappers.ts deleted file mode 100644 index 91bb37022f98..000000000000 --- a/sdk/monitor/arm-monitor/src/models/alertRulesMappers.ts +++ /dev/null @@ -1,90 +0,0 @@ -/* - * 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, - Action, - ActionGroupResource, - ActivityLogAlertActionGroup, - ActivityLogAlertActionList, - ActivityLogAlertAllOfCondition, - ActivityLogAlertLeafCondition, - ActivityLogAlertResource, - AlertingAction, - AlertRuleResource, - AlertRuleResourceCollection, - AlertRuleResourcePatch, - ArmRoleReceiver, - AutomationRunbookReceiver, - AutoscaleNotification, - AutoscaleProfile, - AutoscaleSettingResource, - AzNsActionGroup, - AzureAppPushReceiver, - AzureFunctionReceiver, - BaseResource, - CloudError, - Criteria, - DataContainer, - DiagnosticSettingsCategoryResource, - DiagnosticSettingsResource, - Dimension, - DynamicMetricCriteria, - DynamicThresholdFailingPeriods, - EmailNotification, - EmailReceiver, - ErrorResponse, - ItsmReceiver, - LocationThresholdRuleCondition, - LogicAppReceiver, - LogMetricTrigger, - LogProfileResource, - LogSearchRuleResource, - LogSettings, - LogToMetricAction, - ManagementEventAggregationCondition, - ManagementEventRuleCondition, - MetricAlertAction, - MetricAlertCriteria, - MetricAlertMultipleResourceMultipleMetricCriteria, - MetricAlertResource, - MetricAlertSingleResourceMultipleMetricCriteria, - MetricCriteria, - MetricDimension, - MetricSettings, - MetricTrigger, - MultiMetricCriteria, - ProxyOnlyResource, - ProxyResource, - Recurrence, - RecurrentSchedule, - Resource, - RetentionPolicy, - RuleAction, - RuleCondition, - RuleDataSource, - RuleEmailAction, - RuleManagementEventClaimsDataSource, - RuleManagementEventDataSource, - RuleMetricDataSource, - RuleWebhookAction, - ScaleAction, - ScaleCapacity, - ScaleRule, - Schedule, - SmsReceiver, - Source, - ThresholdRuleCondition, - TimeWindow, - TriggerCondition, - VMInsightsOnboardingStatus, - VoiceReceiver, - WebhookNotification, - WebhookReceiver, - WorkspaceInfo -} from "../models/mappers"; diff --git a/sdk/monitor/arm-monitor/src/models/autoscaleSettingsMappers.ts b/sdk/monitor/arm-monitor/src/models/autoscaleSettingsMappers.ts deleted file mode 100644 index 68da5c7050e0..000000000000 --- a/sdk/monitor/arm-monitor/src/models/autoscaleSettingsMappers.ts +++ /dev/null @@ -1,89 +0,0 @@ -/* - * 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, - Action, - ActionGroupResource, - ActivityLogAlertActionGroup, - ActivityLogAlertActionList, - ActivityLogAlertAllOfCondition, - ActivityLogAlertLeafCondition, - ActivityLogAlertResource, - AlertingAction, - AlertRuleResource, - ArmRoleReceiver, - AutomationRunbookReceiver, - AutoscaleNotification, - AutoscaleProfile, - AutoscaleSettingResource, - AutoscaleSettingResourceCollection, - AutoscaleSettingResourcePatch, - AzNsActionGroup, - AzureAppPushReceiver, - AzureFunctionReceiver, - BaseResource, - Criteria, - DataContainer, - DiagnosticSettingsCategoryResource, - DiagnosticSettingsResource, - Dimension, - DynamicMetricCriteria, - DynamicThresholdFailingPeriods, - EmailNotification, - EmailReceiver, - ErrorResponse, - ItsmReceiver, - LocationThresholdRuleCondition, - LogicAppReceiver, - LogMetricTrigger, - LogProfileResource, - LogSearchRuleResource, - LogSettings, - LogToMetricAction, - ManagementEventAggregationCondition, - ManagementEventRuleCondition, - MetricAlertAction, - MetricAlertCriteria, - MetricAlertMultipleResourceMultipleMetricCriteria, - MetricAlertResource, - MetricAlertSingleResourceMultipleMetricCriteria, - MetricCriteria, - MetricDimension, - MetricSettings, - MetricTrigger, - MultiMetricCriteria, - ProxyOnlyResource, - ProxyResource, - Recurrence, - RecurrentSchedule, - Resource, - RetentionPolicy, - RuleAction, - RuleCondition, - RuleDataSource, - RuleEmailAction, - RuleManagementEventClaimsDataSource, - RuleManagementEventDataSource, - RuleMetricDataSource, - RuleWebhookAction, - ScaleAction, - ScaleCapacity, - ScaleRule, - Schedule, - SmsReceiver, - Source, - ThresholdRuleCondition, - TimeWindow, - TriggerCondition, - VMInsightsOnboardingStatus, - VoiceReceiver, - WebhookNotification, - WebhookReceiver, - WorkspaceInfo -} from "../models/mappers"; diff --git a/sdk/monitor/arm-monitor/src/models/baselinesMappers.ts b/sdk/monitor/arm-monitor/src/models/baselinesMappers.ts deleted file mode 100644 index b49d6f14718e..000000000000 --- a/sdk/monitor/arm-monitor/src/models/baselinesMappers.ts +++ /dev/null @@ -1,18 +0,0 @@ -/* - * 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 deleted file mode 100644 index 7402d3661f02..000000000000 --- a/sdk/monitor/arm-monitor/src/models/diagnosticSettingsCategoryOperationsMappers.ts +++ /dev/null @@ -1,88 +0,0 @@ -/* - * 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, - Action, - ActionGroupResource, - ActivityLogAlertActionGroup, - ActivityLogAlertActionList, - ActivityLogAlertAllOfCondition, - ActivityLogAlertLeafCondition, - ActivityLogAlertResource, - AlertingAction, - AlertRuleResource, - ArmRoleReceiver, - AutomationRunbookReceiver, - AutoscaleNotification, - AutoscaleProfile, - AutoscaleSettingResource, - AzNsActionGroup, - AzureAppPushReceiver, - AzureFunctionReceiver, - BaseResource, - Criteria, - DataContainer, - DiagnosticSettingsCategoryResource, - DiagnosticSettingsCategoryResourceCollection, - DiagnosticSettingsResource, - Dimension, - DynamicMetricCriteria, - DynamicThresholdFailingPeriods, - EmailNotification, - EmailReceiver, - ErrorResponse, - ItsmReceiver, - LocationThresholdRuleCondition, - LogicAppReceiver, - LogMetricTrigger, - LogProfileResource, - LogSearchRuleResource, - LogSettings, - LogToMetricAction, - ManagementEventAggregationCondition, - ManagementEventRuleCondition, - MetricAlertAction, - MetricAlertCriteria, - MetricAlertMultipleResourceMultipleMetricCriteria, - MetricAlertResource, - MetricAlertSingleResourceMultipleMetricCriteria, - MetricCriteria, - MetricDimension, - MetricSettings, - MetricTrigger, - MultiMetricCriteria, - ProxyOnlyResource, - ProxyResource, - Recurrence, - RecurrentSchedule, - Resource, - RetentionPolicy, - RuleAction, - RuleCondition, - RuleDataSource, - RuleEmailAction, - RuleManagementEventClaimsDataSource, - RuleManagementEventDataSource, - RuleMetricDataSource, - RuleWebhookAction, - ScaleAction, - ScaleCapacity, - ScaleRule, - Schedule, - SmsReceiver, - Source, - ThresholdRuleCondition, - TimeWindow, - TriggerCondition, - VMInsightsOnboardingStatus, - VoiceReceiver, - WebhookNotification, - WebhookReceiver, - WorkspaceInfo -} from "../models/mappers"; diff --git a/sdk/monitor/arm-monitor/src/models/diagnosticSettingsOperationsMappers.ts b/sdk/monitor/arm-monitor/src/models/diagnosticSettingsOperationsMappers.ts deleted file mode 100644 index f0ba9bbf166f..000000000000 --- a/sdk/monitor/arm-monitor/src/models/diagnosticSettingsOperationsMappers.ts +++ /dev/null @@ -1,88 +0,0 @@ -/* - * 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, - Action, - ActionGroupResource, - ActivityLogAlertActionGroup, - ActivityLogAlertActionList, - ActivityLogAlertAllOfCondition, - ActivityLogAlertLeafCondition, - ActivityLogAlertResource, - AlertingAction, - AlertRuleResource, - ArmRoleReceiver, - AutomationRunbookReceiver, - AutoscaleNotification, - AutoscaleProfile, - AutoscaleSettingResource, - AzNsActionGroup, - AzureAppPushReceiver, - AzureFunctionReceiver, - BaseResource, - Criteria, - DataContainer, - DiagnosticSettingsCategoryResource, - DiagnosticSettingsResource, - DiagnosticSettingsResourceCollection, - Dimension, - DynamicMetricCriteria, - DynamicThresholdFailingPeriods, - EmailNotification, - EmailReceiver, - ErrorResponse, - ItsmReceiver, - LocationThresholdRuleCondition, - LogicAppReceiver, - LogMetricTrigger, - LogProfileResource, - LogSearchRuleResource, - LogSettings, - LogToMetricAction, - ManagementEventAggregationCondition, - ManagementEventRuleCondition, - MetricAlertAction, - MetricAlertCriteria, - MetricAlertMultipleResourceMultipleMetricCriteria, - MetricAlertResource, - MetricAlertSingleResourceMultipleMetricCriteria, - MetricCriteria, - MetricDimension, - MetricSettings, - MetricTrigger, - MultiMetricCriteria, - ProxyOnlyResource, - ProxyResource, - Recurrence, - RecurrentSchedule, - Resource, - RetentionPolicy, - RuleAction, - RuleCondition, - RuleDataSource, - RuleEmailAction, - RuleManagementEventClaimsDataSource, - RuleManagementEventDataSource, - RuleMetricDataSource, - RuleWebhookAction, - ScaleAction, - ScaleCapacity, - ScaleRule, - Schedule, - SmsReceiver, - Source, - ThresholdRuleCondition, - TimeWindow, - TriggerCondition, - VMInsightsOnboardingStatus, - VoiceReceiver, - WebhookNotification, - WebhookReceiver, - WorkspaceInfo -} from "../models/mappers"; diff --git a/sdk/monitor/arm-monitor/src/models/eventCategoriesMappers.ts b/sdk/monitor/arm-monitor/src/models/eventCategoriesMappers.ts deleted file mode 100644 index 3be0e41dbda8..000000000000 --- a/sdk/monitor/arm-monitor/src/models/eventCategoriesMappers.ts +++ /dev/null @@ -1,14 +0,0 @@ -/* - * 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, - ErrorResponse, - EventCategoryCollection, - LocalizableString -} 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..1eb806ba1bf1 100644 --- a/sdk/monitor/arm-monitor/src/models/index.ts +++ b/sdk/monitor/arm-monitor/src/models/index.ts @@ -1,6 +1,6 @@ /* - * Copyright (c) Microsoft Corporation. All rights reserved. - * Licensed under the MIT License. See License.txt in the project root for license information. + * Copyright (c) Microsoft Corporation. + * Licensed under the MIT License. * * Code generated by Microsoft (R) AutoRest Code Generator. * Changes may cause incorrect behavior and will be lost if the code is regenerated. @@ -12,4421 +12,197 @@ import * as msRest from "@azure/ms-rest-js"; export { BaseResource, CloudError }; /** - * An azure resource object + * An Azure resource object. */ -export interface Resource extends BaseResource { +export interface AzureResource extends BaseResource { /** - * Azure resource Id + * The resource Id. * **NOTE: This property will not be serialized. It can only be populated by the server.** */ readonly id?: string; /** - * Azure resource name + * The name of the resource. * **NOTE: This property will not be serialized. It can only be populated by the server.** */ readonly name?: string; /** - * Azure resource type + * The type of the resource. * **NOTE: This property will not be serialized. It can only be populated by the server.** */ readonly type?: string; /** - * Resource location + * The location of the resource. Since Azure Activity Log Alerts is a global service, the + * location of the rules should always be 'global'. Default value: 'global'. */ - location: string; + location?: string; /** - * Resource tags + * The tags of the resource. */ tags?: { [propertyName: string]: string }; } /** - * The number of instances that can be used during this profile. + * An Activity Log Alert rule condition that is met by comparing the field and value of an Activity + * Log event. + * This condition must contain 'field' and either 'equals' or 'containsAny'. */ -export interface ScaleCapacity { +export interface AlertRuleLeafCondition { /** - * the minimum number of instances for the resource. + * The name of the Activity Log event's field that this condition will examine. + * The possible values for this field are (case-insensitive): 'resourceId', 'category', 'caller', + * 'level', 'operationName', 'resourceGroup', 'resourceProvider', 'status', 'subStatus', + * 'resourceType', or anything beginning with 'properties'. */ - minimum: string; + field?: string; /** - * the maximum number of instances for the resource. The actual maximum number of instances is - * limited by the cores that are available in the subscription. + * The value of the event's field will be compared to this value (case-insensitive) to determine + * if the condition is met. */ - maximum: string; + equals?: string; /** - * the number of instances that will be set if metrics are not available for evaluation. The - * default is only used if the current instance count is lower than the default. + * The value of the event's field will be compared to the values in this array (case-insensitive) + * to determine if the condition is met. */ - default: string; + containsAny?: string[]; } /** - * The trigger that results in a scaling action. - */ -export interface MetricTrigger { - /** - * the name of the metric that defines what the rule monitors. - */ - metricName: string; - /** - * the resource identifier of the resource the rule monitors. - */ - metricResourceUri: string; - /** - * the granularity of metrics the rule monitors. Must be one of the predefined values returned - * from metric definitions for the metric. Must be between 12 hours and 1 minute. - */ - timeGrain: string; - /** - * the metric statistic type. How the metrics from multiple instances are combined. Possible - * values include: 'Average', 'Min', 'Max', 'Sum' - */ - statistic: MetricStatisticType; - /** - * the range of time in which instance data is collected. This value must be greater than the - * delay in metric collection, which can vary from resource-to-resource. Must be between 12 hours - * and 5 minutes. - */ - timeWindow: string; - /** - * time aggregation type. How the data that is collected should be combined over time. The - * default value is Average. Possible values include: 'Average', 'Minimum', 'Maximum', 'Total', - * 'Count', 'Last' - */ - timeAggregation: TimeAggregationType; - /** - * the operator that is used to compare the metric data and the threshold. Possible values - * include: 'Equals', 'NotEquals', 'GreaterThan', 'GreaterThanOrEqual', 'LessThan', - * 'LessThanOrEqual' - */ - operator: ComparisonOperationType; - /** - * the threshold of the metric that triggers the scale action. - */ - threshold: number; -} - -/** - * The parameters for the scaling action. - */ -export interface ScaleAction { - /** - * the scale direction. Whether the scaling action increases or decreases the number of - * instances. Possible values include: 'None', 'Increase', 'Decrease' - */ - direction: ScaleDirection; - /** - * the type of action that should occur when the scale rule fires. Possible values include: - * 'ChangeCount', 'PercentChangeCount', 'ExactCount' - */ - type: ScaleType; - /** - * the number of instances that are involved in the scaling action. This value must be 1 or - * greater. The default value is 1. Default value: '1'. - */ - value?: string; - /** - * the amount of time to wait since the last scaling action before this action occurs. It must be - * between 1 week and 1 minute in ISO 8601 format. - */ - cooldown: string; -} - -/** - * A rule that provide the triggers and parameters for the scaling action. - */ -export interface ScaleRule { - /** - * the trigger that results in a scaling action. - */ - metricTrigger: MetricTrigger; - /** - * the parameters for the scaling action. - */ - scaleAction: ScaleAction; -} - -/** - * A specific date-time for the profile. - */ -export interface TimeWindow { - /** - * the timezone of the start and end times for the profile. Some examples of valid time zones - * are: Dateline Standard Time, UTC-11, Hawaiian Standard Time, Alaskan Standard Time, Pacific - * Standard Time (Mexico), Pacific Standard Time, US Mountain Standard Time, Mountain Standard - * Time (Mexico), Mountain Standard Time, Central America Standard Time, Central Standard Time, - * Central Standard Time (Mexico), Canada Central Standard Time, SA Pacific Standard Time, - * Eastern Standard Time, US Eastern Standard Time, Venezuela Standard Time, Paraguay Standard - * Time, Atlantic Standard Time, Central Brazilian Standard Time, SA Western Standard Time, - * Pacific SA Standard Time, Newfoundland Standard Time, E. South America Standard Time, - * Argentina Standard Time, SA Eastern Standard Time, Greenland Standard Time, Montevideo - * Standard Time, Bahia Standard Time, UTC-02, Mid-Atlantic Standard Time, Azores Standard Time, - * Cape Verde Standard Time, Morocco Standard Time, UTC, GMT Standard Time, Greenwich Standard - * Time, W. Europe Standard Time, Central Europe Standard Time, Romance Standard Time, Central - * European Standard Time, W. Central Africa Standard Time, Namibia Standard Time, Jordan - * Standard Time, GTB Standard Time, Middle East Standard Time, Egypt Standard Time, Syria - * Standard Time, E. Europe Standard Time, South Africa Standard Time, FLE Standard Time, Turkey - * Standard Time, Israel Standard Time, Kaliningrad Standard Time, Libya Standard Time, Arabic - * Standard Time, Arab Standard Time, Belarus Standard Time, Russian Standard Time, E. Africa - * Standard Time, Iran Standard Time, Arabian Standard Time, Azerbaijan Standard Time, Russia - * Time Zone 3, Mauritius Standard Time, Georgian Standard Time, Caucasus Standard Time, - * Afghanistan Standard Time, West Asia Standard Time, Ekaterinburg Standard Time, Pakistan - * Standard Time, India Standard Time, Sri Lanka Standard Time, Nepal Standard Time, Central Asia - * Standard Time, Bangladesh Standard Time, N. Central Asia Standard Time, Myanmar Standard Time, - * SE Asia Standard Time, North Asia Standard Time, China Standard Time, North Asia East Standard - * Time, Singapore Standard Time, W. Australia Standard Time, Taipei Standard Time, Ulaanbaatar - * Standard Time, Tokyo Standard Time, Korea Standard Time, Yakutsk Standard Time, Cen. Australia - * Standard Time, AUS Central Standard Time, E. Australia Standard Time, AUS Eastern Standard - * Time, West Pacific Standard Time, Tasmania Standard Time, Magadan Standard Time, Vladivostok - * Standard Time, Russia Time Zone 10, Central Pacific Standard Time, Russia Time Zone 11, New - * Zealand Standard Time, UTC+12, Fiji Standard Time, Kamchatka Standard Time, Tonga Standard - * Time, Samoa Standard Time, Line Islands Standard Time - */ - timeZone?: string; - /** - * the start time for the profile in ISO 8601 format. - */ - start: Date; - /** - * the end time for the profile in ISO 8601 format. - */ - end: Date; -} - -/** - * The scheduling constraints for when the profile begins. - */ -export interface RecurrentSchedule { - /** - * the timezone for the hours of the profile. Some examples of valid time zones are: Dateline - * Standard Time, UTC-11, Hawaiian Standard Time, Alaskan Standard Time, Pacific Standard Time - * (Mexico), Pacific Standard Time, US Mountain Standard Time, Mountain Standard Time (Mexico), - * Mountain Standard Time, Central America Standard Time, Central Standard Time, Central Standard - * Time (Mexico), Canada Central Standard Time, SA Pacific Standard Time, Eastern Standard Time, - * US Eastern Standard Time, Venezuela Standard Time, Paraguay Standard Time, Atlantic Standard - * Time, Central Brazilian Standard Time, SA Western Standard Time, Pacific SA Standard Time, - * Newfoundland Standard Time, E. South America Standard Time, Argentina Standard Time, SA - * Eastern Standard Time, Greenland Standard Time, Montevideo Standard Time, Bahia Standard Time, - * UTC-02, Mid-Atlantic Standard Time, Azores Standard Time, Cape Verde Standard Time, Morocco - * Standard Time, UTC, GMT Standard Time, Greenwich Standard Time, W. Europe Standard Time, - * Central Europe Standard Time, Romance Standard Time, Central European Standard Time, W. - * Central Africa Standard Time, Namibia Standard Time, Jordan Standard Time, GTB Standard Time, - * Middle East Standard Time, Egypt Standard Time, Syria Standard Time, E. Europe Standard Time, - * South Africa Standard Time, FLE Standard Time, Turkey Standard Time, Israel Standard Time, - * Kaliningrad Standard Time, Libya Standard Time, Arabic Standard Time, Arab Standard Time, - * Belarus Standard Time, Russian Standard Time, E. Africa Standard Time, Iran Standard Time, - * Arabian Standard Time, Azerbaijan Standard Time, Russia Time Zone 3, Mauritius Standard Time, - * Georgian Standard Time, Caucasus Standard Time, Afghanistan Standard Time, West Asia Standard - * Time, Ekaterinburg Standard Time, Pakistan Standard Time, India Standard Time, Sri Lanka - * Standard Time, Nepal Standard Time, Central Asia Standard Time, Bangladesh Standard Time, N. - * Central Asia Standard Time, Myanmar Standard Time, SE Asia Standard Time, North Asia Standard - * Time, China Standard Time, North Asia East Standard Time, Singapore Standard Time, W. - * Australia Standard Time, Taipei Standard Time, Ulaanbaatar Standard Time, Tokyo Standard Time, - * Korea Standard Time, Yakutsk Standard Time, Cen. Australia Standard Time, AUS Central Standard - * Time, E. Australia Standard Time, AUS Eastern Standard Time, West Pacific Standard Time, - * Tasmania Standard Time, Magadan Standard Time, Vladivostok Standard Time, Russia Time Zone 10, - * Central Pacific Standard Time, Russia Time Zone 11, New Zealand Standard Time, UTC+12, Fiji - * Standard Time, Kamchatka Standard Time, Tonga Standard Time, Samoa Standard Time, Line Islands - * Standard Time - */ - timeZone: string; - /** - * the collection of days that the profile takes effect on. Possible values are Sunday through - * Saturday. - */ - days: string[]; - /** - * A collection of hours that the profile takes effect on. Values supported are 0 to 23 on the - * 24-hour clock (AM/PM times are not supported). - */ - hours: number[]; - /** - * A collection of minutes at which the profile takes effect at. - */ - minutes: number[]; -} - -/** - * The repeating times at which this profile begins. This element is not used if the FixedDate - * element is used. - */ -export interface Recurrence { - /** - * the recurrence frequency. How often the schedule profile should take effect. This value must - * be Week, meaning each week will have the same set of profiles. For example, to set a daily - * schedule, set **schedule** to every day of the week. The frequency property specifies that the - * schedule is repeated weekly. Possible values include: 'None', 'Second', 'Minute', 'Hour', - * 'Day', 'Week', 'Month', 'Year' - */ - frequency: RecurrenceFrequency; - /** - * the scheduling constraints for when the profile begins. - */ - schedule: RecurrentSchedule; -} - -/** - * Autoscale profile. - */ -export interface AutoscaleProfile { - /** - * the name of the profile. - */ - name: string; - /** - * the number of instances that can be used during this profile. - */ - capacity: ScaleCapacity; - /** - * the collection of rules that provide the triggers and parameters for the scaling action. A - * maximum of 10 rules can be specified. - */ - rules: ScaleRule[]; - /** - * the specific date-time for the profile. This element is not used if the Recurrence element is - * used. - */ - fixedDate?: TimeWindow; - /** - * the repeating times at which this profile begins. This element is not used if the FixedDate - * element is used. - */ - recurrence?: Recurrence; -} - -/** - * Email notification of an autoscale event. - */ -export interface EmailNotification { - /** - * a value indicating whether to send email to subscription administrator. - */ - sendToSubscriptionAdministrator?: boolean; - /** - * a value indicating whether to send email to subscription co-administrators. - */ - sendToSubscriptionCoAdministrators?: boolean; - /** - * the custom e-mails list. This value can be null or empty, in which case this attribute will be - * ignored. - */ - customEmails?: string[]; -} - -/** - * Webhook notification of an autoscale event. - */ -export interface WebhookNotification { - /** - * the service address to receive the notification. - */ - serviceUri?: string; - /** - * a property bag of settings. This value can be empty. - */ - properties?: { [propertyName: string]: string }; -} - -/** - * Autoscale notification. - */ -export interface AutoscaleNotification { - /** - * the email notification. - */ - email?: EmailNotification; - /** - * the collection of webhook notifications. - */ - webhooks?: WebhookNotification[]; -} - -/** - * The autoscale setting resource. - */ -export interface AutoscaleSettingResource extends Resource { - /** - * the collection of automatic scaling profiles that specify different scaling parameters for - * different time periods. A maximum of 20 profiles can be specified. - */ - profiles: AutoscaleProfile[]; - /** - * the collection of notifications. - */ - notifications?: AutoscaleNotification[]; - /** - * the enabled flag. Specifies whether automatic scaling is enabled for the resource. The default - * value is 'true'. Default value: true. - */ - enabled?: boolean; - /** - * the name of the autoscale setting. - */ - autoscaleSettingResourceName?: string; - /** - * the resource identifier of the resource that the autoscale setting should be added to. - */ - targetResourceUri?: string; -} - -/** - * The autoscale setting object for patch operations. - */ -export interface AutoscaleSettingResourcePatch { - /** - * Resource tags - */ - tags?: { [propertyName: string]: string }; - /** - * the collection of automatic scaling profiles that specify different scaling parameters for - * different time periods. A maximum of 20 profiles can be specified. - */ - profiles: AutoscaleProfile[]; - /** - * the collection of notifications. - */ - notifications?: AutoscaleNotification[]; - /** - * the enabled flag. Specifies whether automatic scaling is enabled for the resource. The default - * value is 'true'. Default value: true. - */ - enabled?: boolean; - /** - * the name of the autoscale setting. - */ - name?: string; - /** - * the resource identifier of the resource that the autoscale setting should be added to. - */ - targetResourceUri?: string; -} - -/** - * Describes the format of Error response. - */ -export interface ErrorResponse { - /** - * Error code - */ - code?: string; - /** - * Error message indicating why the operation failed. - */ - message?: string; -} - -/** - * Display metadata associated with the operation. - */ -export interface OperationDisplay { - /** - * Service provider: Microsoft.Insights - */ - provider?: string; - /** - * Resource on which the operation is performed: AlertRules, Autoscale, etc. - */ - resource?: string; - /** - * Operation type: Read, write, delete, etc. - */ - operation?: string; -} - -/** - * Microsoft Insights API operation definition. - */ -export interface Operation { - /** - * Operation name: {provider}/{resource}/{operation} - */ - name?: string; - /** - * Display metadata associated with the operation. - */ - display?: OperationDisplay; -} - -/** - * Result of the request to list Microsoft.Insights operations. It contains a list of operations - * and a URL link to get the next set of results. - */ -export interface OperationListResult { - /** - * List of operations supported by the Microsoft.Insights provider. - */ - value?: Operation[]; - /** - * URL to get the next set of operation list results if there are any. - */ - nextLink?: string; -} - -/** - * An alert incident indicates the activation status of an alert rule. - */ -export interface Incident { - /** - * Incident name. - * **NOTE: This property will not be serialized. It can only be populated by the server.** - */ - readonly name?: string; - /** - * Rule name that is associated with the incident. - * **NOTE: This property will not be serialized. It can only be populated by the server.** - */ - readonly ruleName?: string; - /** - * A boolean to indicate whether the incident is active or resolved. - * **NOTE: This property will not be serialized. It can only be populated by the server.** - */ - readonly isActive?: boolean; - /** - * The time at which the incident was activated in ISO8601 format. - * **NOTE: This property will not be serialized. It can only be populated by the server.** - */ - readonly activatedTime?: Date; - /** - * The time at which the incident was resolved in ISO8601 format. If null, it means the incident - * is still active. - * **NOTE: This property will not be serialized. It can only be populated by the server.** - */ - readonly resolvedTime?: Date; -} - -/** - * Contains the possible cases for RuleDataSource. - */ -export type RuleDataSourceUnion = RuleDataSource | RuleMetricDataSource | RuleManagementEventDataSource; - -/** - * The resource from which the rule collects its data. - */ -export interface RuleDataSource { - /** - * Polymorphic Discriminator - */ - odatatype: "RuleDataSource"; - /** - * the resource identifier of the resource the rule monitors. **NOTE**: this property cannot be - * updated for an existing rule. - */ - resourceUri?: string; -} - -/** - * Contains the possible cases for RuleCondition. - */ -export type RuleConditionUnion = RuleCondition | ThresholdRuleCondition | LocationThresholdRuleCondition | ManagementEventRuleCondition; - -/** - * The condition that results in the alert rule being activated. - */ -export interface RuleCondition { - /** - * Polymorphic Discriminator - */ - odatatype: "RuleCondition"; - /** - * the resource from which the rule collects its data. For this type dataSource will always be of - * type RuleMetricDataSource. - */ - dataSource?: RuleDataSourceUnion; -} - -/** - * A rule metric data source. The discriminator value is always RuleMetricDataSource in this case. - */ -export interface RuleMetricDataSource { - /** - * Polymorphic Discriminator - */ - odatatype: "Microsoft.Azure.Management.Insights.Models.RuleMetricDataSource"; - /** - * the resource identifier of the resource the rule monitors. **NOTE**: this property cannot be - * updated for an existing rule. - */ - resourceUri?: string; - /** - * the name of the metric that defines what the rule monitors. - */ - metricName?: string; -} - -/** - * The claims for a rule management event data source. - */ -export interface RuleManagementEventClaimsDataSource { - /** - * the email address. - */ - emailAddress?: string; -} - -/** - * A rule management event data source. The discriminator fields is always - * RuleManagementEventDataSource in this case. - */ -export interface RuleManagementEventDataSource { - /** - * Polymorphic Discriminator - */ - odatatype: "Microsoft.Azure.Management.Insights.Models.RuleManagementEventDataSource"; - /** - * the resource identifier of the resource the rule monitors. **NOTE**: this property cannot be - * updated for an existing rule. - */ - resourceUri?: string; - /** - * the event name. - */ - eventName?: string; - /** - * the event source. - */ - eventSource?: string; - /** - * the level. - */ - level?: string; - /** - * The name of the operation that should be checked for. If no name is provided, any operation - * will match. - */ - operationName?: string; - /** - * the resource group name. - */ - resourceGroupName?: string; - /** - * the resource provider name. - */ - resourceProviderName?: string; - /** - * The status of the operation that should be checked for. If no status is provided, any status - * will match. - */ - status?: string; - /** - * the substatus. - */ - subStatus?: string; - /** - * the claims. - */ - claims?: RuleManagementEventClaimsDataSource; -} - -/** - * A rule condition based on a metric crossing a threshold. - */ -export interface ThresholdRuleCondition { - /** - * Polymorphic Discriminator - */ - odatatype: "Microsoft.Azure.Management.Insights.Models.ThresholdRuleCondition"; - /** - * the resource from which the rule collects its data. For this type dataSource will always be of - * type RuleMetricDataSource. - */ - dataSource?: RuleDataSourceUnion; - /** - * the operator used to compare the data and the threshold. Possible values include: - * 'GreaterThan', 'GreaterThanOrEqual', 'LessThan', 'LessThanOrEqual' - */ - operator: ConditionOperator; - /** - * the threshold value that activates the alert. - */ - threshold: number; - /** - * the period of time (in ISO 8601 duration format) that is used to monitor alert activity based - * on the threshold. If specified then it must be between 5 minutes and 1 day. - */ - windowSize?: string; - /** - * the time aggregation operator. How the data that are collected should be combined over time. - * The default value is the PrimaryAggregationType of the Metric. Possible values include: - * 'Average', 'Minimum', 'Maximum', 'Total', 'Last' - */ - timeAggregation?: TimeAggregationOperator; -} - -/** - * A rule condition based on a certain number of locations failing. - */ -export interface LocationThresholdRuleCondition { - /** - * Polymorphic Discriminator - */ - odatatype: "Microsoft.Azure.Management.Insights.Models.LocationThresholdRuleCondition"; - /** - * the resource from which the rule collects its data. For this type dataSource will always be of - * type RuleMetricDataSource. - */ - dataSource?: RuleDataSourceUnion; - /** - * the period of time (in ISO 8601 duration format) that is used to monitor alert activity based - * on the threshold. If specified then it must be between 5 minutes and 1 day. - */ - windowSize?: string; - /** - * the number of locations that must fail to activate the alert. - */ - failedLocationCount: number; -} - -/** - * How the data that is collected should be combined over time. - */ -export interface ManagementEventAggregationCondition { - /** - * the condition operator. Possible values include: 'GreaterThan', 'GreaterThanOrEqual', - * 'LessThan', 'LessThanOrEqual' - */ - operator?: ConditionOperator; - /** - * The threshold value that activates the alert. - */ - threshold?: number; - /** - * the period of time (in ISO 8601 duration format) that is used to monitor alert activity based - * on the threshold. If specified then it must be between 5 minutes and 1 day. - */ - windowSize?: string; -} - -/** - * A management event rule condition. - */ -export interface ManagementEventRuleCondition { - /** - * Polymorphic Discriminator - */ - odatatype: "Microsoft.Azure.Management.Insights.Models.ManagementEventRuleCondition"; - /** - * the resource from which the rule collects its data. For this type dataSource will always be of - * type RuleMetricDataSource. - */ - dataSource?: RuleDataSourceUnion; - /** - * How the data that is collected should be combined over time and when the alert is activated. - * Note that for management event alerts aggregation is optional – if it is not provided then any - * event will cause the alert to activate. - */ - aggregation?: ManagementEventAggregationCondition; -} - -/** - * Contains the possible cases for RuleAction. - */ -export type RuleActionUnion = RuleAction | RuleEmailAction | RuleWebhookAction; - -/** - * The action that is performed when the alert rule becomes active, and when an alert condition is - * resolved. - */ -export interface RuleAction { - /** - * Polymorphic Discriminator - */ - odatatype: "RuleAction"; -} - -/** - * Specifies the action to send email when the rule condition is evaluated. The discriminator is - * always RuleEmailAction in this case. - */ -export interface RuleEmailAction { - /** - * Polymorphic Discriminator - */ - odatatype: "Microsoft.Azure.Management.Insights.Models.RuleEmailAction"; - /** - * Whether the administrators (service and co-administrators) of the service should be notified - * when the alert is activated. - */ - sendToServiceOwners?: boolean; - /** - * the list of administrator's custom email addresses to notify of the activation of the alert. - */ - customEmails?: string[]; -} - -/** - * Specifies the action to post to service when the rule condition is evaluated. The discriminator - * is always RuleWebhookAction in this case. - */ -export interface RuleWebhookAction { - /** - * Polymorphic Discriminator - */ - odatatype: "Microsoft.Azure.Management.Insights.Models.RuleWebhookAction"; - /** - * the service uri to Post the notification when the alert activates or resolves. - */ - serviceUri?: string; - /** - * the dictionary of custom properties to include with the post operation. These data are - * appended to the webhook payload. - */ - properties?: { [propertyName: string]: string }; -} - -/** - * The alert rule resource. - */ -export interface AlertRuleResource extends Resource { - /** - * the name of the alert rule. - */ - alertRuleResourceName: string; - /** - * the description of the alert rule that will be included in the alert email. - */ - description?: string; - /** - * the flag that indicates whether the alert rule is enabled. - */ - isEnabled: boolean; - /** - * the condition that results in the alert rule being activated. - */ - condition: RuleConditionUnion; - /** - * the array of actions that are performed when the alert rule becomes active, and when an alert - * condition is resolved. - */ - actions?: RuleActionUnion[]; - /** - * Last time the rule was updated in ISO8601 format. - * **NOTE: This property will not be serialized. It can only be populated by the server.** - */ - readonly lastUpdatedTime?: Date; -} - -/** - * The alert rule object for patch operations. - */ -export interface AlertRuleResourcePatch { - /** - * Resource tags - */ - tags?: { [propertyName: string]: string }; - /** - * the name of the alert rule. - */ - name: string; - /** - * the description of the alert rule that will be included in the alert email. - */ - description?: string; - /** - * the flag that indicates whether the alert rule is enabled. - */ - isEnabled: boolean; - /** - * the condition that results in the alert rule being activated. - */ - condition: RuleConditionUnion; - /** - * the array of actions that are performed when the alert rule becomes active, and when an alert - * condition is resolved. - */ - actions?: RuleActionUnion[]; - /** - * Last time the rule was updated in ISO8601 format. - * **NOTE: This property will not be serialized. It can only be populated by the server.** - */ - readonly lastUpdatedTime?: Date; -} - -/** - * Specifies the retention policy for the log. - */ -export interface RetentionPolicy { - /** - * a value indicating whether the retention policy is enabled. - */ - enabled: boolean; - /** - * the number of days for the retention in days. A value of 0 will retain the events - * indefinitely. - */ - days: number; -} - -/** - * The log profile resource. - */ -export interface LogProfileResource extends Resource { - /** - * the resource id of the storage account to which you would like to send the Activity Log. - */ - storageAccountId?: string; - /** - * The service bus rule ID of the service bus namespace in which you would like to have Event - * Hubs created for streaming the Activity Log. The rule ID is of the format: '{service bus - * resource ID}/authorizationrules/{key name}'. - */ - serviceBusRuleId?: string; - /** - * List of regions for which Activity Log events should be stored or streamed. It is a comma - * separated list of valid ARM locations including the 'global' location. - */ - locations: string[]; - /** - * the categories of the logs. These categories are created as is convenient to the user. Some - * values are: 'Write', 'Delete', and/or 'Action.' - */ - categories: string[]; - /** - * the retention policy for the events in the log. - */ - retentionPolicy: RetentionPolicy; -} - -/** - * The log profile resource for patch operations. - */ -export interface LogProfileResourcePatch { - /** - * Resource tags - */ - tags?: { [propertyName: string]: string }; - /** - * the resource id of the storage account to which you would like to send the Activity Log. - */ - storageAccountId?: string; - /** - * The service bus rule ID of the service bus namespace in which you would like to have Event - * Hubs created for streaming the Activity Log. The rule ID is of the format: '{service bus - * resource ID}/authorizationrules/{key name}'. - */ - serviceBusRuleId?: string; - /** - * List of regions for which Activity Log events should be stored or streamed. It is a comma - * separated list of valid ARM locations including the 'global' location. - */ - locations: string[]; - /** - * the categories of the logs. These categories are created as is convenient to the user. Some - * values are: 'Write', 'Delete', and/or 'Action.' - */ - categories: string[]; - /** - * the retention policy for the events in the log. - */ - retentionPolicy: RetentionPolicy; -} - -/** - * A proxy only azure resource object - */ -export interface ProxyOnlyResource extends BaseResource { - /** - * Azure resource Id - * **NOTE: This property will not be serialized. It can only be populated by the server.** - */ - readonly id?: string; - /** - * Azure resource name - * **NOTE: This property will not be serialized. It can only be populated by the server.** - */ - readonly name?: string; - /** - * Azure resource type - * **NOTE: This property will not be serialized. It can only be populated by the server.** - */ - readonly type?: string; -} - -/** - * Part of MultiTenantDiagnosticSettings. Specifies the settings for a particular metric. - */ -export interface MetricSettings { - /** - * the timegrain of the metric in ISO8601 format. - */ - timeGrain?: string; - /** - * Name of a Diagnostic Metric category for a resource type this setting is applied to. To obtain - * the list of Diagnostic metric categories for a resource, first perform a GET diagnostic - * settings operation. - */ - category?: string; - /** - * a value indicating whether this category is enabled. - */ - enabled: boolean; - /** - * the retention policy for this category. - */ - retentionPolicy?: RetentionPolicy; -} - -/** - * Part of MultiTenantDiagnosticSettings. Specifies the settings for a particular log. - */ -export interface LogSettings { - /** - * Name of a Diagnostic Log category for a resource type this setting is applied to. To obtain - * the list of Diagnostic Log categories for a resource, first perform a GET diagnostic settings - * operation. - */ - category?: string; - /** - * a value indicating whether this log is enabled. - */ - enabled: boolean; - /** - * the retention policy for this log. - */ - retentionPolicy?: RetentionPolicy; -} - -/** - * The diagnostic setting resource. - */ -export interface DiagnosticSettingsResource extends ProxyOnlyResource { - /** - * The resource ID of the storage account to which you would like to send Diagnostic Logs. - */ - storageAccountId?: string; - /** - * The service bus rule Id of the diagnostic setting. This is here to maintain backwards - * compatibility. - */ - serviceBusRuleId?: string; - /** - * The resource Id for the event hub authorization rule. - */ - eventHubAuthorizationRuleId?: string; - /** - * The name of the event hub. If none is specified, the default event hub will be selected. - */ - eventHubName?: string; - /** - * The list of metric settings. - */ - metrics?: MetricSettings[]; - /** - * The list of logs settings. - */ - logs?: LogSettings[]; - /** - * The full ARM resource ID of the Log Analytics workspace to which you would like to send - * Diagnostic Logs. Example: - * /subscriptions/4b9e8510-67ab-4e9a-95a9-e2f1e570ea9c/resourceGroups/insights-integration/providers/Microsoft.OperationalInsights/workspaces/viruela2 - */ - workspaceId?: string; - /** - * A string indicating whether the export to Log Analytics should use the default destination - * type, i.e. AzureDiagnostics, or use a destination type constructed as follows: _. Possible values are: Dedicated and null (null is - * default.) - */ - logAnalyticsDestinationType?: string; -} - -/** - * Represents a collection of alert rule resources. - */ -export interface DiagnosticSettingsResourceCollection { - /** - * The collection of diagnostic settings resources;. - */ - value?: DiagnosticSettingsResource[]; -} - -/** - * The diagnostic settings category resource. - */ -export interface DiagnosticSettingsCategoryResource extends ProxyOnlyResource { - /** - * The type of the diagnostic settings category. Possible values include: 'Metrics', 'Logs' - */ - categoryType?: CategoryType; -} - -/** - * Represents a collection of diagnostic setting category resources. - */ -export interface DiagnosticSettingsCategoryResourceCollection { - /** - * The collection of diagnostic settings category resources. - */ - value?: DiagnosticSettingsCategoryResource[]; -} - -/** - * An email receiver. - */ -export interface EmailReceiver { - /** - * The name of the email receiver. Names must be unique across all receivers within an action - * group. - */ - name: string; - /** - * The email address of this receiver. - */ - emailAddress: string; - /** - * Indicates whether to use common alert schema. - */ - useCommonAlertSchema: boolean; - /** - * The receiver status of the e-mail. Possible values include: 'NotSpecified', 'Enabled', - * 'Disabled' - * **NOTE: This property will not be serialized. It can only be populated by the server.** - */ - readonly status?: ReceiverStatus; -} - -/** - * An SMS receiver. - */ -export interface SmsReceiver { - /** - * The name of the SMS receiver. Names must be unique across all receivers within an action - * group. - */ - name: string; - /** - * The country code of the SMS receiver. - */ - countryCode: string; - /** - * The phone number of the SMS receiver. - */ - phoneNumber: string; - /** - * The status of the receiver. Possible values include: 'NotSpecified', 'Enabled', 'Disabled' - * **NOTE: This property will not be serialized. It can only be populated by the server.** - */ - readonly status?: ReceiverStatus; -} - -/** - * A webhook receiver. - */ -export interface WebhookReceiver { - /** - * The name of the webhook receiver. Names must be unique across all receivers within an action - * group. - */ - name: string; - /** - * The URI where webhooks should be sent. - */ - serviceUri: string; - /** - * 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; -} - -/** - * An Itsm receiver. - */ -export interface ItsmReceiver { - /** - * The name of the Itsm receiver. Names must be unique across all receivers within an action - * group. - */ - name: string; - /** - * OMS LA instance identifier. - */ - workspaceId: string; - /** - * Unique identification of ITSM connection among multiple defined in above workspace. - */ - connectionId: string; - /** - * JSON blob for the configurations of the ITSM action. CreateMultipleWorkItems option will be - * part of this blob as well. - */ - ticketConfiguration: string; - /** - * Region in which workspace resides. Supported - * values:'centralindia','japaneast','southeastasia','australiasoutheast','uksouth','westcentralus','canadacentral','eastus','westeurope' - */ - region: string; -} - -/** - * The Azure mobile App push notification receiver. - */ -export interface AzureAppPushReceiver { - /** - * The name of the Azure mobile app push receiver. Names must be unique across all receivers - * within an action group. - */ - name: string; - /** - * The email address registered for the Azure mobile app. - */ - emailAddress: string; -} - -/** - * The Azure Automation Runbook notification receiver. - */ -export interface AutomationRunbookReceiver { - /** - * The Azure automation account Id which holds this runbook and authenticate to Azure resource. - */ - automationAccountId: string; - /** - * The name for this runbook. - */ - runbookName: string; - /** - * The resource id for webhook linked to this runbook. - */ - webhookResourceId: string; - /** - * Indicates whether this instance is global runbook. - */ - isGlobalRunbook: boolean; - /** - * Indicates name of the webhook. - */ - name?: string; - /** - * The URI where webhooks should be sent. - */ - serviceUri?: string; - /** - * Indicates whether to use common alert schema. - */ - useCommonAlertSchema: boolean; -} - -/** - * A voice receiver. - */ -export interface VoiceReceiver { - /** - * The name of the voice receiver. Names must be unique across all receivers within an action - * group. - */ - name: string; - /** - * The country code of the voice receiver. - */ - countryCode: string; - /** - * The phone number of the voice receiver. - */ - phoneNumber: string; -} - -/** - * A logic app receiver. - */ -export interface LogicAppReceiver { - /** - * The name of the logic app receiver. Names must be unique across all receivers within an action - * group. - */ - name: string; - /** - * The azure resource id of the logic app receiver. - */ - resourceId: string; - /** - * The callback url where http request sent to. - */ - callbackUrl: string; - /** - * Indicates whether to use common alert schema. - */ - useCommonAlertSchema: boolean; -} - -/** - * An azure function receiver. - */ -export interface AzureFunctionReceiver { - /** - * The name of the azure function receiver. Names must be unique across all receivers within an - * action group. - */ - name: string; - /** - * The azure resource id of the function app. - */ - functionAppResourceId: string; - /** - * The function name in the function app. - */ - functionName: string; - /** - * The http trigger url where http request sent to. - */ - httpTriggerUrl: string; - /** - * Indicates whether to use common alert schema. - */ - useCommonAlertSchema: boolean; -} - -/** - * An arm role receiver. - */ -export interface ArmRoleReceiver { - /** - * The name of the arm role receiver. Names must be unique across all receivers within an action - * group. - */ - name: string; - /** - * The arm role id. - */ - roleId: string; - /** - * Indicates whether to use common alert schema. - */ - useCommonAlertSchema: boolean; -} - -/** - * An action group resource. - */ -export interface ActionGroupResource extends Resource { - /** - * The short name of the action group. This will be used in SMS messages. - */ - groupShortName: string; - /** - * Indicates whether this action group is enabled. If an action group is not enabled, then none - * of its receivers will receive communications. Default value: true. - */ - enabled: boolean; - /** - * The list of email receivers that are part of this action group. - */ - emailReceivers?: EmailReceiver[]; - /** - * The list of SMS receivers that are part of this action group. - */ - smsReceivers?: SmsReceiver[]; - /** - * The list of webhook receivers that are part of this action group. - */ - webhookReceivers?: WebhookReceiver[]; - /** - * The list of ITSM receivers that are part of this action group. - */ - itsmReceivers?: ItsmReceiver[]; - /** - * The list of AzureAppPush receivers that are part of this action group. - */ - azureAppPushReceivers?: AzureAppPushReceiver[]; - /** - * The list of AutomationRunbook receivers that are part of this action group. - */ - automationRunbookReceivers?: AutomationRunbookReceiver[]; - /** - * The list of voice receivers that are part of this action group. - */ - voiceReceivers?: VoiceReceiver[]; - /** - * The list of logic app receivers that are part of this action group. - */ - logicAppReceivers?: LogicAppReceiver[]; - /** - * The list of azure function receivers that are part of this action group. - */ - azureFunctionReceivers?: AzureFunctionReceiver[]; - /** - * The list of ARM role receivers that are part of this action group. Roles are Azure RBAC roles - * and only built-in roles are supported. - */ - armRoleReceivers?: ArmRoleReceiver[]; -} - -/** - * Describes a receiver that should be resubscribed. - */ -export interface EnableRequest { - /** - * The name of the receiver to resubscribe. - */ - receiverName: string; -} - -/** - * An action group object for the body of patch operations. - */ -export interface ActionGroupPatchBody { - /** - * Resource tags - */ - tags?: { [propertyName: string]: string }; - /** - * Indicates whether this action group is enabled. If an action group is not enabled, then none - * of its actions will be activated. Default value: true. - */ - enabled?: boolean; -} - -/** - * An Activity Log alert condition that is met by comparing an activity log field and value. - */ -export interface ActivityLogAlertLeafCondition { - /** - * The name of the field that this condition will examine. The possible values for this field are - * (case-insensitive): 'resourceId', 'category', 'caller', 'level', 'operationName', - * 'resourceGroup', 'resourceProvider', 'status', 'subStatus', 'resourceType', or anything - * beginning with 'properties.'. - */ - field: string; - /** - * The field value will be compared to this value (case-insensitive) to determine if the - * condition is met. - */ - equals: string; -} - -/** - * An Activity Log alert condition that is met when all its member conditions are met. - */ -export interface ActivityLogAlertAllOfCondition { - /** - * The list of activity log alert conditions. - */ - allOf: ActivityLogAlertLeafCondition[]; -} - -/** - * A pointer to an Azure Action Group. - */ -export interface ActivityLogAlertActionGroup { - /** - * The resourceId of the action group. This cannot be null or empty. - */ - actionGroupId: string; - /** - * the dictionary of custom properties to include with the post operation. These data are - * appended to the webhook payload. - */ - webhookProperties?: { [propertyName: string]: string }; -} - -/** - * A list of activity log alert actions. - */ -export interface ActivityLogAlertActionList { - /** - * The list of activity log alerts. - */ - actionGroups?: ActivityLogAlertActionGroup[]; -} - -/** - * An activity log alert resource. - */ -export interface ActivityLogAlertResource extends Resource { - /** - * A list of resourceIds that will be used as prefixes. The alert will only apply to activityLogs - * with resourceIds that fall under one of these prefixes. This list must include at least one - * item. - */ - scopes: string[]; - /** - * Indicates whether this activity log alert is enabled. If an activity log alert is not enabled, - * then none of its actions will be activated. Default value: true. - */ - enabled?: boolean; - /** - * The condition that will cause this alert to activate. - */ - condition: ActivityLogAlertAllOfCondition; - /** - * The actions that will activate when the condition is met. - */ - actions: ActivityLogAlertActionList; - /** - * A description of this activity log alert. - */ - description?: string; -} - -/** - * An activity log alert object for the body of patch operations. - */ -export interface ActivityLogAlertPatchBody { - /** - * Resource tags - */ - tags?: { [propertyName: string]: string }; - /** - * Indicates whether this activity log alert is enabled. If an activity log alert is not enabled, - * then none of its actions will be activated. Default value: true. - */ - enabled?: boolean; -} - -/** - * The localizable string class. - */ -export interface LocalizableString { - /** - * the invariant value. - */ - value: string; - /** - * the locale specific value. - */ - localizedValue?: string; -} - -/** - * the authorization used by the user who has performed the operation that led to this event. This - * captures the RBAC properties of the event. These usually include the 'action', 'role' and the - * 'scope' - */ -export interface SenderAuthorization { - /** - * the permissible actions. For instance: microsoft.support/supporttickets/write - */ - action?: string; - /** - * the role of the user. For instance: Subscription Admin - */ - role?: string; - /** - * the scope. - */ - scope?: string; -} - -/** - * The Http request info. - */ -export interface HttpRequestInfo { - /** - * the client request id. - */ - clientRequestId?: string; - /** - * the client Ip Address - */ - clientIpAddress?: string; - /** - * the Http request method. - */ - method?: string; - /** - * the Uri. - */ - uri?: string; -} - -/** - * The Azure event log entries are of type EventData - */ -export interface EventData { - /** - * The sender authorization information. - * **NOTE: This property will not be serialized. It can only be populated by the server.** - */ - readonly authorization?: SenderAuthorization; - /** - * key value pairs to identify ARM permissions. - * **NOTE: This property will not be serialized. It can only be populated by the server.** - */ - readonly claims?: { [propertyName: string]: string }; - /** - * the email address of the user who has performed the operation, the UPN claim or SPN claim - * based on availability. - * **NOTE: This property will not be serialized. It can only be populated by the server.** - */ - readonly caller?: string; - /** - * the description of the event. - * **NOTE: This property will not be serialized. It can only be populated by the server.** - */ - readonly description?: string; - /** - * the Id of this event as required by ARM for RBAC. It contains the EventDataID and a timestamp - * information. - * **NOTE: This property will not be serialized. It can only be populated by the server.** - */ - readonly id?: string; - /** - * the event data Id. This is a unique identifier for an event. - * **NOTE: This property will not be serialized. It can only be populated by the server.** - */ - readonly eventDataId?: string; - /** - * the correlation Id, usually a GUID in the string format. The correlation Id is shared among - * the events that belong to the same uber operation. - * **NOTE: This property will not be serialized. It can only be populated by the server.** - */ - readonly correlationId?: string; - /** - * the event name. This value should not be confused with OperationName. For practical purposes, - * OperationName might be more appealing to end users. - * **NOTE: This property will not be serialized. It can only be populated by the server.** - */ - readonly eventName?: LocalizableString; - /** - * the event category. - * **NOTE: This property will not be serialized. It can only be populated by the server.** - */ - readonly category?: LocalizableString; - /** - * the HTTP request info. Usually includes the 'clientRequestId', 'clientIpAddress' (IP address - * of the user who initiated the event) and 'method' (HTTP method e.g. PUT). - * **NOTE: This property will not be serialized. It can only be populated by the server.** - */ - readonly httpRequest?: HttpRequestInfo; - /** - * the event level. Possible values include: 'Critical', 'Error', 'Warning', 'Informational', - * 'Verbose' - * **NOTE: This property will not be serialized. It can only be populated by the server.** - */ - readonly level?: EventLevel; - /** - * the resource group name of the impacted resource. - * **NOTE: This property will not be serialized. It can only be populated by the server.** - */ - readonly resourceGroupName?: string; - /** - * the resource provider name of the impacted resource. - * **NOTE: This property will not be serialized. It can only be populated by the server.** - */ - readonly resourceProviderName?: LocalizableString; - /** - * the resource uri that uniquely identifies the resource that caused this event. - * **NOTE: This property will not be serialized. It can only be populated by the server.** - */ - readonly resourceId?: string; - /** - * the resource type - * **NOTE: This property will not be serialized. It can only be populated by the server.** - */ - readonly resourceType?: LocalizableString; - /** - * It is usually a GUID shared among the events corresponding to single operation. This value - * should not be confused with EventName. - * **NOTE: This property will not be serialized. It can only be populated by the server.** - */ - readonly operationId?: string; - /** - * the operation name. - * **NOTE: This property will not be serialized. It can only be populated by the server.** - */ - readonly operationName?: LocalizableString; - /** - * the set of pairs (usually a Dictionary) that includes details - * about the event. - * **NOTE: This property will not be serialized. It can only be populated by the server.** - */ - readonly properties?: { [propertyName: string]: string }; - /** - * a string describing the status of the operation. Some typical values are: Started, In - * progress, Succeeded, Failed, Resolved. - * **NOTE: This property will not be serialized. It can only be populated by the server.** - */ - readonly status?: LocalizableString; - /** - * the event sub status. Most of the time, when included, this captures the HTTP status code of - * the REST call. Common values are: OK (HTTP Status Code: 200), Created (HTTP Status Code: 201), - * Accepted (HTTP Status Code: 202), No Content (HTTP Status Code: 204), Bad Request(HTTP Status - * Code: 400), Not Found (HTTP Status Code: 404), Conflict (HTTP Status Code: 409), Internal - * Server Error (HTTP Status Code: 500), Service Unavailable (HTTP Status Code:503), Gateway - * Timeout (HTTP Status Code: 504) - * **NOTE: This property will not be serialized. It can only be populated by the server.** - */ - readonly subStatus?: LocalizableString; - /** - * the timestamp of when the event was generated by the Azure service processing the request - * corresponding the event. It in ISO 8601 format. - * **NOTE: This property will not be serialized. It can only be populated by the server.** - */ - readonly eventTimestamp?: Date; - /** - * the timestamp of when the event became available for querying via this API. It is in ISO 8601 - * format. This value should not be confused eventTimestamp. As there might be a delay between - * the occurrence time of the event, and the time that the event is submitted to the Azure - * logging infrastructure. - * **NOTE: This property will not be serialized. It can only be populated by the server.** - */ - readonly submissionTimestamp?: Date; - /** - * the Azure subscription Id usually a GUID. - * **NOTE: This property will not be serialized. It can only be populated by the server.** - */ - readonly subscriptionId?: string; - /** - * the Azure tenant Id - * **NOTE: This property will not be serialized. It can only be populated by the server.** - */ - readonly tenantId?: string; -} - -/** - * Metric availability specifies the time grain (aggregation interval or frequency) and the - * retention period for that time grain. - */ -export interface MetricAvailability { - /** - * the time grain specifies the aggregation interval for the metric. Expressed as a duration - * 'PT1M', 'P1D', etc. - */ - timeGrain?: string; - /** - * the retention period for the metric at the specified timegrain. Expressed as a duration - * 'PT1M', 'P1D', etc. - */ - retention?: string; -} - -/** - * Metric definition class specifies the metadata for a metric. - */ -export interface MetricDefinition { - /** - * Flag to indicate whether the dimension is required. - */ - isDimensionRequired?: boolean; - /** - * the resource identifier of the resource that emitted the metric. - */ - resourceId?: string; - /** - * the namespace the metric belongs to. - */ - namespace?: string; - /** - * the name and the display name of the metric, i.e. it is a localizable string. - */ - name?: LocalizableString; - /** - * the unit of the metric. Possible values include: 'Count', 'Bytes', 'Seconds', - * 'CountPerSecond', 'BytesPerSecond', 'Percent', 'MilliSeconds', 'ByteSeconds', 'Unspecified', - * 'Cores', 'MilliCores', 'NanoCores', 'BitsPerSecond' - */ - unit?: Unit; - /** - * the primary aggregation type value defining how to use the values for display. Possible values - * include: 'None', 'Average', 'Count', 'Minimum', 'Maximum', 'Total' - */ - primaryAggregationType?: AggregationType; - /** - * the collection of what aggregation types are supported. - */ - supportedAggregationTypes?: AggregationType[]; - /** - * the collection of what aggregation intervals are available to be queried. - */ - metricAvailabilities?: MetricAvailability[]; - /** - * the resource identifier of the metric definition. - */ - id?: string; - /** - * the name and the display name of the dimension, i.e. it is a localizable string. - */ - dimensions?: LocalizableString[]; -} - -/** - * Represents a metric value. - */ -export interface MetricValue { - /** - * the timestamp for the metric value in ISO 8601 format. - */ - timeStamp: Date; - /** - * the average value in the time range. - */ - average?: number; - /** - * the least value in the time range. - */ - minimum?: number; - /** - * the greatest value in the time range. - */ - maximum?: number; - /** - * the sum of all of the values in the time range. - */ - total?: number; - /** - * the number of samples in the time range. Can be used to determine the number of values that - * contributed to the average value. - */ - count?: number; -} - -/** - * Represents a metric metadata value. - */ -export interface MetadataValue { - /** - * the name of the metadata. - */ - name?: LocalizableString; - /** - * the value of the metadata. - */ - value?: string; -} - -/** - * A time series result type. The discriminator value is always TimeSeries in this case. - */ -export interface TimeSeriesElement { - /** - * the metadata values returned if $filter was specified in the call. - */ - metadatavalues?: MetadataValue[]; - /** - * An array of data points representing the metric values. This is only returned if a result - * type of data is specified. - */ - data?: MetricValue[]; -} - -/** - * The result data of a query. - */ -export interface Metric { - /** - * the metric Id. - */ - id: string; - /** - * the resource type of the metric resource. - */ - type: string; - /** - * the name and the display name of the metric, i.e. it is localizable string. - */ - name: LocalizableString; - /** - * the unit of the metric. Possible values include: 'Count', 'Bytes', 'Seconds', - * 'CountPerSecond', 'BytesPerSecond', 'Percent', 'MilliSeconds', 'ByteSeconds', 'Unspecified', - * 'Cores', 'MilliCores', 'NanoCores', 'BitsPerSecond' - */ - unit: Unit; - /** - * the time series returned when a data query is performed. - */ - timeseries: TimeSeriesElement[]; -} - -/** - * The response to a metrics query. - */ -export interface Response { - /** - * The integer value representing the cost of the query, for data case. - */ - cost?: number; - /** - * 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 region of the resource been queried for metrics. - */ - resourceregion?: string; - /** - * the value of the collection. - */ - value: Metric[]; -} - -/** - * Represents a baseline metadata value. - */ -export interface BaselineMetadataValue { - /** - * the name of the metadata. - */ - name?: LocalizableString; - /** - * the value of the metadata. - */ - value?: string; -} - -/** - * The baseline values for a single sensitivity value. - */ -export interface Baseline { - /** - * the sensitivity of the baseline. Possible values include: 'Low', 'Medium', 'High' - */ - sensitivity: Sensitivity; - /** - * The low thresholds of the baseline. - */ - lowThresholds: number[]; - /** - * The high thresholds of the baseline. - */ - highThresholds: number[]; -} - -/** - * The response to a baseline query. - */ -export interface BaselineResponse { - /** - * the metric baseline Id. - * **NOTE: This property will not be serialized. It can only be populated by the server.** - */ - readonly id?: string; - /** - * the resource type of the baseline resource. - * **NOTE: This property will not be serialized. It can only be populated by the server.** - */ - readonly type?: string; - /** - * the name and the display name of the metric, i.e. it is localizable string. - * **NOTE: This property will not be serialized. It can only be populated by the server.** - */ - readonly name?: LocalizableString; - /** - * 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 aggregation type of the metric. - */ - aggregation?: string; - /** - * the array of timestamps of the baselines. - */ - timestamps?: Date[] | string[]; - /** - * the baseline values for each sensitivity. - */ - baseline?: Baseline[]; - /** - * the baseline metadata values. - */ - metadata?: BaselineMetadataValue[]; -} - -/** - * The time series info needed for calculating the baseline. - */ -export interface TimeSeriesInformation { - /** - * the list of sensitivities for calculating the baseline. - */ - sensitivities: string[]; - /** - * The metric values to calculate the baseline. - */ - values: number[]; - /** - * the array of timestamps of the baselines. - */ - timestamps?: Date[] | string[]; -} - -/** - * The response to a calculate baseline call. - */ -export interface CalculateBaselineResponse { - /** - * the resource type of the baseline resource. - */ - type: string; - /** - * the array of timestamps of the baselines. - */ - timestamps?: Date[] | string[]; - /** - * the baseline values for each sensitivity. - */ - 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. - */ -export interface MetricAlertAction { - /** - * the id of the action group to use. - */ - actionGroupId?: string; - /** - * The properties of a webhook object. - */ - webhookProperties?: { [propertyName: string]: string }; -} - -/** - * Contains the possible cases for MetricAlertCriteria. - */ -export type MetricAlertCriteriaUnion = MetricAlertCriteria | MetricAlertSingleResourceMultipleMetricCriteria | MetricAlertMultipleResourceMultipleMetricCriteria; - -/** - * The rule criteria that defines the conditions of the alert rule. - */ -export interface MetricAlertCriteria { - /** - * Polymorphic Discriminator - */ - odatatype: "MetricAlertCriteria"; - /** - * Describes unknown properties. The value of an unknown property can be of "any" type. - */ - [property: string]: any; -} - -/** - * The metric alert resource. - */ -export interface MetricAlertResource extends Resource { - /** - * the description of the metric alert that will be included in the alert email. - */ - description: string; - /** - * Alert severity {0, 1, 2, 3, 4} - */ - severity: number; - /** - * the flag that indicates whether the metric alert is enabled. - */ - enabled: boolean; - /** - * the list of resource id's that this metric alert is scoped to. - */ - scopes?: string[]; - /** - * how often the metric alert is evaluated represented in ISO 8601 duration format. - */ - evaluationFrequency: string; - /** - * the period of time (in ISO 8601 duration format) that is used to monitor alert activity based - * on the threshold. - */ - windowSize: string; - /** - * the resource type of the target resource(s) on which the alert is created/updated. Mandatory - * for MultipleResourceMultipleMetricCriteria. - */ - targetResourceType?: string; - /** - * the region of the target resource(s) on which the alert is created/updated. Mandatory for - * MultipleResourceMultipleMetricCriteria. - */ - targetResourceRegion?: string; - /** - * defines the specific alert criteria information. - */ - criteria: MetricAlertCriteriaUnion; - /** - * the flag that indicates whether the alert should be auto resolved or not. - */ - autoMitigate?: boolean; - /** - * the array of actions that are performed when the alert rule becomes active, and when an alert - * condition is resolved. - */ - actions?: MetricAlertAction[]; - /** - * Last time the rule was updated in ISO8601 format. - * **NOTE: This property will not be serialized. It can only be populated by the server.** - */ - readonly lastUpdatedTime?: Date; -} - -/** - * The metric alert resource for patch operations. - */ -export interface MetricAlertResourcePatch { - /** - * Resource tags - */ - tags?: { [propertyName: string]: string }; - /** - * the description of the metric alert that will be included in the alert email. - */ - description: string; - /** - * Alert severity {0, 1, 2, 3, 4} - */ - severity: number; - /** - * the flag that indicates whether the metric alert is enabled. - */ - enabled: boolean; - /** - * the list of resource id's that this metric alert is scoped to. - */ - scopes?: string[]; - /** - * how often the metric alert is evaluated represented in ISO 8601 duration format. - */ - evaluationFrequency: string; - /** - * the period of time (in ISO 8601 duration format) that is used to monitor alert activity based - * on the threshold. - */ - windowSize: string; - /** - * the resource type of the target resource(s) on which the alert is created/updated. Mandatory - * for MultipleResourceMultipleMetricCriteria. - */ - targetResourceType?: string; - /** - * the region of the target resource(s) on which the alert is created/updated. Mandatory for - * MultipleResourceMultipleMetricCriteria. - */ - targetResourceRegion?: string; - /** - * defines the specific alert criteria information. - */ - criteria: MetricAlertCriteriaUnion; - /** - * the flag that indicates whether the alert should be auto resolved or not. - */ - autoMitigate?: boolean; - /** - * the array of actions that are performed when the alert rule becomes active, and when an alert - * condition is resolved. - */ - actions?: MetricAlertAction[]; - /** - * Last time the rule was updated in ISO8601 format. - * **NOTE: This property will not be serialized. It can only be populated by the server.** - */ - readonly lastUpdatedTime?: Date; -} - -/** - * An alert status properties. - */ -export interface MetricAlertStatusProperties { - /** - * An object describing the type of the dimensions. - */ - dimensions?: { [propertyName: string]: string }; - /** - * status value - */ - status?: string; - /** - * UTC time when the status was checked. - */ - timestamp?: Date; -} - -/** - * An alert status. - */ -export interface MetricAlertStatus { - /** - * The status name. - */ - name?: string; - /** - * The alert rule arm id. - */ - id?: string; - /** - * The extended resource type name. - */ - type?: string; - /** - * The alert status properties of the metric alert status. - */ - properties?: MetricAlertStatusProperties; -} - -/** - * Represents a collection of alert rule resources. - */ -export interface MetricAlertStatusCollection { - /** - * the values for the alert rule resources. - */ - value?: MetricAlertStatus[]; -} - -/** - * Contains the possible cases for MultiMetricCriteria. - */ -export type MultiMetricCriteriaUnion = MultiMetricCriteria | MetricCriteria | DynamicMetricCriteria; - -/** - * 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. - */ - [property: string]: any; -} - -/** - * Criterion to filter metrics. - */ -export interface MetricCriteria { - /** - * Polymorphic Discriminator - */ - criterionType: "StaticThresholdCriterion"; - /** - * 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 criteria operator. - */ - operator: any; - /** - * the criteria threshold value that activates the alert. - */ - threshold: number; -} - -/** - * Specifies the metric alert criteria for a single resource that has multiple metric criteria. - */ -export interface MetricAlertSingleResourceMultipleMetricCriteria { - /** - * Polymorphic Discriminator - */ - odatatype: "Microsoft.Azure.Monitor.SingleResourceMultipleMetricCriteria"; - /** - * The list of metric criteria for this 'all of' operation. - */ - 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. - */ -export interface MetricAlertMultipleResourceMultipleMetricCriteria { - /** - * Polymorphic Discriminator - */ - odatatype: "Microsoft.Azure.Monitor.MultipleResourceMultipleMetricCriteria"; - /** - * the list of multiple metric criteria for this 'all of' operation. - */ - 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. - */ -export interface Source { - /** - * Log search query. Required for action type - AlertingAction - */ - query?: string; - /** - * List of Resource referred into query - */ - authorizedResources?: string[]; - /** - * The resource uri over which log search query is to be run. - */ - dataSourceId: string; - /** - * Set value to 'ResultCount'. Possible values include: 'ResultCount' - */ - queryType?: QueryType; -} - -/** - * Defines how often to run the search and the time interval. - */ -export interface Schedule { - /** - * frequency (in minutes) at which rule condition should be evaluated. - */ - frequencyInMinutes: number; - /** - * Time window for which data needs to be fetched for query (should be greater than or equal to - * frequencyInMinutes). - */ - timeWindowInMinutes: number; -} - -/** - * Contains the possible cases for Action. - */ -export type ActionUnion = Action | AlertingAction | LogToMetricAction; - -/** - * Action descriptor. - */ -export interface Action { - /** - * Polymorphic Discriminator - */ - odatatype: "Action"; -} - -/** - * The Log Search Rule resource. - */ -export interface LogSearchRuleResource extends Resource { - /** - * The description of the Log Search rule. - */ - description?: string; - /** - * The flag which indicates whether the Log Search rule is enabled. Value should be true or - * false. Possible values include: 'true', 'false' - */ - enabled?: Enabled; - /** - * Last time the rule was updated in IS08601 format. - * **NOTE: This property will not be serialized. It can only be populated by the server.** - */ - readonly lastUpdatedTime?: Date; - /** - * Provisioning state of the scheduled query rule. Possible values include: 'Succeeded', - * 'Deploying', 'Canceled', 'Failed' - * **NOTE: This property will not be serialized. It can only be populated by the server.** - */ - readonly provisioningState?: ProvisioningState; - /** - * Data Source against which rule will Query Data - */ - source: Source; - /** - * Schedule (Frequency, Time Window) for rule. Required for action type - AlertingAction - */ - schedule?: Schedule; - /** - * Action needs to be taken on rule execution. - */ - action: ActionUnion; -} - -/** - * The log search rule resource for patch operations. - */ -export interface LogSearchRuleResourcePatch { - /** - * Resource tags - */ - tags?: { [propertyName: string]: string }; - /** - * The flag which indicates whether the Log Search rule is enabled. Value should be true or - * false. Possible values include: 'true', 'false' - */ - enabled?: Enabled; -} - -/** - * A log metrics trigger descriptor. - */ -export interface LogMetricTrigger { - /** - * Evaluation operation for Metric -'GreaterThan' or 'LessThan' or 'Equal'. Possible values - * include: 'GreaterThan', 'LessThan', 'Equal' - */ - thresholdOperator?: ConditionalOperator; - /** - * The threshold of the metric trigger. - */ - threshold?: number; - /** - * Metric Trigger Type - 'Consecutive' or 'Total'. Possible values include: 'Consecutive', - * 'Total' - */ - metricTriggerType?: MetricTriggerType; - /** - * Evaluation of metric on a particular column - */ - metricColumn?: string; -} - -/** - * The condition that results in the Log Search rule. - */ -export interface TriggerCondition { - /** - * Evaluation operation for rule - 'GreaterThan' or 'LessThan. Possible values include: - * 'GreaterThan', 'LessThan', 'Equal' - */ - thresholdOperator: ConditionalOperator; - /** - * Result or count threshold based on which rule should be triggered. - */ - threshold: number; - /** - * Trigger condition for metric query rule - */ - metricTrigger?: LogMetricTrigger; -} - -/** - * Azure action group - */ -export interface AzNsActionGroup { - /** - * Azure Action Group reference. - */ - actionGroup?: string[]; - /** - * Custom subject override for all email ids in Azure action group - */ - emailSubject?: string; - /** - * Custom payload to be sent for all webhook URI in Azure action group - */ - customWebhookPayload?: string; -} - -/** - * Specify action need to be taken when rule type is Alert - */ -export interface AlertingAction { - /** - * Polymorphic Discriminator - */ - odatatype: "Microsoft.WindowsAzure.Management.Monitoring.Alerts.Models.Microsoft.AppInsights.Nexus.DataContracts.Resources.ScheduledQueryRules.AlertingAction"; - /** - * Severity of the alert. Possible values include: '0', '1', '2', '3', '4' - */ - severity: AlertSeverity; - /** - * Azure action group reference. - */ - aznsAction?: AzNsActionGroup; - /** - * time (in minutes) for which Alerts should be throttled or suppressed. - */ - throttlingInMin?: number; - /** - * The trigger condition that results in the alert rule being. - */ - trigger: TriggerCondition; -} - -/** - * Specifies the criteria for converting log to metric. - */ -export interface Dimension { - /** - * Name of the dimension - */ - name: string; - /** - * List of dimension values - */ - values: string[]; -} - -/** - * Specifies the criteria for converting log to metric. - */ -export interface Criteria { - /** - * Name of the metric - */ - metricName: string; - /** - * List of Dimensions for creating metric - */ - dimensions?: Dimension[]; -} - -/** - * Specify action need to be taken when rule type is converting log to metric - */ -export interface LogToMetricAction { - /** - * Polymorphic Discriminator - */ - odatatype: "Microsoft.WindowsAzure.Management.Monitoring.Alerts.Models.Microsoft.AppInsights.Nexus.DataContracts.Resources.ScheduledQueryRules.LogToMetricAction"; - /** - * Criteria of Metric - */ - criteria: Criteria[]; -} - -/** - * The fully qualified metric namespace name. - */ -export interface MetricNamespaceName { - /** - * The metric namespace name. - */ - metricNamespaceName?: string; -} - -/** - * Metric namespace class specifies the metadata for a metric namespace. - */ -export interface MetricNamespace { - /** - * The ID of the metricNamespace. - */ - id?: string; - /** - * The type of the namespace. - */ - type?: string; - /** - * The name of the namespace. - */ - name?: string; - /** - * Properties which include the fully qualified namespace name. - */ - properties?: MetricNamespaceName; -} - -/** - * An azure resource object - */ -export interface ProxyResource extends BaseResource { - /** - * Azure resource Id - * **NOTE: This property will not be serialized. It can only be populated by the server.** - */ - readonly id?: string; - /** - * Azure resource name - * **NOTE: This property will not be serialized. It can only be populated by the server.** - */ - readonly name?: string; - /** - * Azure resource type - * **NOTE: This property will not be serialized. It can only be populated by the server.** - */ - readonly type?: string; -} - -/** - * Error details. - */ -export interface ErrorModel { - /** - * Error code identifying the specific error. - */ - code: string; - /** - * Error message in the caller's locale. - */ - message?: string; -} - -/** - * An error response from the API. - */ -export interface ResponseWithError { - /** - * Error information. - */ - error: ErrorModel; -} - -/** - * Information about a Log Analytics Workspace. - */ -export interface WorkspaceInfo { - /** - * Azure Resource Manager identifier of the Log Analytics Workspace. - */ - id: string; - /** - * Location of the Log Analytics workspace. - */ - location: string; - /** - * Log Analytics workspace identifier. - */ - customerId: string; -} - -/** - * Information about a container with data for a given resource. - */ -export interface DataContainer { - /** - * Log Analytics workspace information. - */ - workspace: WorkspaceInfo; -} - -/** - * VM Insights onboarding status for a resource. - */ -export interface VMInsightsOnboardingStatus extends ProxyResource { - /** - * Azure Resource Manager identifier of the resource whose onboarding status is being - * represented. - */ - resourceId: string; - /** - * The onboarding status for the resource. Note that, a higher level scope, e.g., resource group - * or subscription, is considered onboarded if at least one resource under it is onboarded. - * Possible values include: 'onboarded', 'notOnboarded', 'unknown' - */ - onboardingStatus: OnboardingStatus; - /** - * The status of VM Insights data from the resource. When reported as `present` the data array - * will contain information about the data containers to which data for the specified resource is - * being routed. Possible values include: 'present', 'notPresent' - */ - dataStatus: DataStatus; - /** - * Containers that currently store VM Insights data for the specified resource. - */ - data?: DataContainer[]; -} - -/** - * Optional Parameters. - */ -export interface ActivityLogsListOptionalParams extends msRest.RequestOptionsBase { - /** - * Used to fetch events with only the given properties.
The **$select** argument is a comma - * separated list of property names to be returned. Possible values are: *authorization*, - * *claims*, *correlationId*, *description*, *eventDataId*, *eventName*, *eventTimestamp*, - * *httpRequest*, *level*, *operationId*, *operationName*, *properties*, *resourceGroupName*, - * *resourceProviderName*, *resourceId*, *status*, *submissionTimestamp*, *subStatus*, - * *subscriptionId* - */ - select?: string; -} - -/** - * Optional Parameters. - */ -export interface TenantActivityLogsListOptionalParams extends msRest.RequestOptionsBase { - /** - * Reduces the set of data collected.
The **$filter** is very restricted and allows only the - * following patterns.
- List events for a resource group: $filter=eventTimestamp ge '' and eventTimestamp le '' and eventChannels eq 'Admin, Operation' and - * resourceGroupName eq ''.
- List events for resource: - * $filter=eventTimestamp ge '' and eventTimestamp le '' and eventChannels - * eq 'Admin, Operation' and resourceUri eq ''.
- List events for a subscription: - * $filter=eventTimestamp ge '' and eventTimestamp le '' and eventChannels - * eq 'Admin, Operation'.
- List events for a resource provider: $filter=eventTimestamp ge - * '' and eventTimestamp le '' and eventChannels eq 'Admin, Operation' and - * resourceProvider eq ''.
- List events for a correlation Id: - * api-version=2014-04-01&$filter=eventTimestamp ge '2014-07-16T04:36:37.6407898Z' and - * eventTimestamp le '2014-07-20T04:36:37.6407898Z' and eventChannels eq 'Admin, Operation' and - * correlationId eq ''.
**NOTE**: No other syntax is allowed. - */ - filter?: string; - /** - * Used to fetch events with only the given properties.
The **$select** argument is a comma - * separated list of property names to be returned. Possible values are: *authorization*, - * *claims*, *correlationId*, *description*, *eventDataId*, *eventName*, *eventTimestamp*, - * *httpRequest*, *level*, *operationId*, *operationName*, *properties*, *resourceGroupName*, - * *resourceProviderName*, *resourceId*, *status*, *submissionTimestamp*, *subStatus*, - * *subscriptionId* - */ - select?: string; -} - -/** - * Optional Parameters. - */ -export interface MetricDefinitionsListOptionalParams extends msRest.RequestOptionsBase { - /** - * Metric namespace to query metric definitions for. - */ - metricnamespace?: string; -} - -/** - * Optional Parameters. - */ -export interface MetricsListOptionalParams extends msRest.RequestOptionsBase { - /** - * 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 names of the metrics (comma separated) to retrieve. - */ - metricnames?: string; - /** - * The list of aggregation types (comma separated) to retrieve. - */ - aggregation?: string; - /** - * The maximum number of records to retrieve. - * Valid only if $filter is specified. - * Defaults to 10. - */ - top?: number; - /** - * The aggregation to use for sorting results and the direction of the sort. - * Only one order can be specified. - * Examples: sum asc. - */ - orderby?: 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; - /** - * Reduces the set of data collected. The syntax allowed depends on the operation. See the - * operation's description for details. Possible values include: 'Data', 'Metadata' - */ - resultType?: ResultType; - /** - * Metric namespace to query metric definitions for. - */ - metricnamespace?: string; -} - -/** - * Optional Parameters. - */ -export interface MetricBaselineGetOptionalParams extends msRest.RequestOptionsBase { - /** - * 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 aggregation type of the metric to retrieve the baseline for. - */ - aggregation?: string; - /** - * The list of sensitivities (comma separated) to retrieve. - */ - sensitivities?: string; - /** - * Allows retrieving only metadata of the baseline. On data request all information is retrieved. - * Possible values include: 'Data', 'Metadata' - */ - 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. - */ -export interface ScheduledQueryRulesListBySubscriptionOptionalParams extends msRest.RequestOptionsBase { - /** - * The filter to apply on the operation. For more information please see - * https://msdn.microsoft.com/en-us/library/azure/dn931934.aspx - */ - filter?: string; -} - -/** - * Optional Parameters. - */ -export interface ScheduledQueryRulesListByResourceGroupOptionalParams extends msRest.RequestOptionsBase { - /** - * The filter to apply on the operation. For more information please see - * https://msdn.microsoft.com/en-us/library/azure/dn931934.aspx - */ - filter?: string; -} - -/** - * Optional Parameters. - */ -export interface MetricNamespacesListOptionalParams extends msRest.RequestOptionsBase { - /** - * The ISO 8601 conform Date start time from which to query for metric namespaces. - */ - startTime?: string; -} - -/** - * An interface representing MonitorManagementClientOptions. - */ -export interface MonitorManagementClientOptions extends AzureServiceClientOptions { - baseUri?: string; -} - -/** - * @interface - * Represents a collection of autoscale setting resources. - * @extends Array - */ -export interface AutoscaleSettingResourceCollection extends Array { - /** - * URL to get the next set of results. - */ - nextLink?: string; -} - -/** - * @interface - * The List incidents operation response. - * @extends Array - */ -export interface IncidentListResult extends Array { -} - -/** - * @interface - * Represents a collection of alert rule resources. - * @extends Array - */ -export interface AlertRuleResourceCollection extends Array { -} - -/** - * @interface - * Represents a collection of log profiles. - * @extends Array - */ -export interface LogProfileCollection extends Array { -} - -/** - * @interface - * A list of action groups. - * @extends Array - */ -export interface ActionGroupList extends Array { - /** - * Provides the link to retrieve the next set of elements. - */ - nextLink?: string; -} - -/** - * @interface - * A list of activity log alerts. - * @extends Array - */ -export interface ActivityLogAlertList extends Array { - /** - * Provides the link to retrieve the next set of elements. - */ - nextLink?: string; -} - -/** - * @interface - * Represents collection of events. - * @extends Array - */ -export interface EventDataCollection extends Array { - /** - * Provides the link to retrieve the next set of events. - */ - nextLink?: string; -} - -/** - * @interface - * A collection of event categories. Currently possible values are: Administrative, Security, - * ServiceHealth, Alert, Recommendation, Policy. - * @extends Array - */ -export interface EventCategoryCollection extends Array { -} - -/** - * @interface - * Represents collection of metric definitions. - * @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. - * @extends Array - */ -export interface MetricAlertResourceCollection extends Array { -} - -/** - * @interface - * Represents a collection of Log Search rule resources. - * @extends Array - */ -export interface LogSearchRuleResourceCollection extends Array { -} - -/** - * @interface - * Represents collection of metric namespaces. - * @extends Array - */ -export interface MetricNamespaceCollection extends Array { -} - -/** - * Defines values for MetricStatisticType. - * Possible values include: 'Average', 'Min', 'Max', 'Sum' - * @readonly - * @enum {string} - */ -export type MetricStatisticType = 'Average' | 'Min' | 'Max' | 'Sum'; - -/** - * Defines values for TimeAggregationType. - * Possible values include: 'Average', 'Minimum', 'Maximum', 'Total', 'Count', 'Last' - * @readonly - * @enum {string} - */ -export type TimeAggregationType = 'Average' | 'Minimum' | 'Maximum' | 'Total' | 'Count' | 'Last'; - -/** - * Defines values for ComparisonOperationType. - * Possible values include: 'Equals', 'NotEquals', 'GreaterThan', 'GreaterThanOrEqual', 'LessThan', - * 'LessThanOrEqual' - * @readonly - * @enum {string} - */ -export type ComparisonOperationType = 'Equals' | 'NotEquals' | 'GreaterThan' | 'GreaterThanOrEqual' | 'LessThan' | 'LessThanOrEqual'; - -/** - * Defines values for ScaleDirection. - * Possible values include: 'None', 'Increase', 'Decrease' - * @readonly - * @enum {string} - */ -export type ScaleDirection = 'None' | 'Increase' | 'Decrease'; - -/** - * Defines values for ScaleType. - * Possible values include: 'ChangeCount', 'PercentChangeCount', 'ExactCount' - * @readonly - * @enum {string} - */ -export type ScaleType = 'ChangeCount' | 'PercentChangeCount' | 'ExactCount'; - -/** - * Defines values for RecurrenceFrequency. - * Possible values include: 'None', 'Second', 'Minute', 'Hour', 'Day', 'Week', 'Month', 'Year' - * @readonly - * @enum {string} - */ -export type RecurrenceFrequency = 'None' | 'Second' | 'Minute' | 'Hour' | 'Day' | 'Week' | 'Month' | 'Year'; - -/** - * Defines values for ConditionOperator. - * Possible values include: 'GreaterThan', 'GreaterThanOrEqual', 'LessThan', 'LessThanOrEqual' - * @readonly - * @enum {string} - */ -export type ConditionOperator = 'GreaterThan' | 'GreaterThanOrEqual' | 'LessThan' | 'LessThanOrEqual'; - -/** - * Defines values for TimeAggregationOperator. - * Possible values include: 'Average', 'Minimum', 'Maximum', 'Total', 'Last' - * @readonly - * @enum {string} - */ -export type TimeAggregationOperator = 'Average' | 'Minimum' | 'Maximum' | 'Total' | 'Last'; - -/** - * Defines values for CategoryType. - * Possible values include: 'Metrics', 'Logs' - * @readonly - * @enum {string} - */ -export type CategoryType = 'Metrics' | 'Logs'; - -/** - * Defines values for ReceiverStatus. - * Possible values include: 'NotSpecified', 'Enabled', 'Disabled' - * @readonly - * @enum {string} - */ -export type ReceiverStatus = 'NotSpecified' | 'Enabled' | 'Disabled'; - -/** - * Defines values for EventLevel. - * Possible values include: 'Critical', 'Error', 'Warning', 'Informational', 'Verbose' - * @readonly - * @enum {string} - */ -export type EventLevel = 'Critical' | 'Error' | 'Warning' | 'Informational' | 'Verbose'; - -/** - * Defines values for Unit. - * Possible values include: 'Count', 'Bytes', 'Seconds', 'CountPerSecond', 'BytesPerSecond', - * 'Percent', 'MilliSeconds', 'ByteSeconds', 'Unspecified', 'Cores', 'MilliCores', 'NanoCores', - * 'BitsPerSecond' - * @readonly - * @enum {string} - */ -export type Unit = 'Count' | 'Bytes' | 'Seconds' | 'CountPerSecond' | 'BytesPerSecond' | 'Percent' | 'MilliSeconds' | 'ByteSeconds' | 'Unspecified' | 'Cores' | 'MilliCores' | 'NanoCores' | 'BitsPerSecond'; - -/** - * Defines values for AggregationType. - * Possible values include: 'None', 'Average', 'Count', 'Minimum', 'Maximum', 'Total' - * @readonly - * @enum {string} - */ -export type AggregationType = 'None' | 'Average' | 'Count' | 'Minimum' | 'Maximum' | 'Total'; - -/** - * Defines values for Sensitivity. - * Possible values include: 'Low', 'Medium', 'High' - * @readonly - * @enum {string} - */ -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' - * @readonly - * @enum {string} - */ -export type Enabled = 'true' | 'false'; - -/** - * Defines values for ProvisioningState. - * Possible values include: 'Succeeded', 'Deploying', 'Canceled', 'Failed' - * @readonly - * @enum {string} - */ -export type ProvisioningState = 'Succeeded' | 'Deploying' | 'Canceled' | 'Failed'; - -/** - * Defines values for QueryType. - * Possible values include: 'ResultCount' - * @readonly - * @enum {string} - */ -export type QueryType = 'ResultCount'; - -/** - * Defines values for ConditionalOperator. - * Possible values include: 'GreaterThan', 'LessThan', 'Equal' - * @readonly - * @enum {string} - */ -export type ConditionalOperator = 'GreaterThan' | 'LessThan' | 'Equal'; - -/** - * Defines values for MetricTriggerType. - * Possible values include: 'Consecutive', 'Total' - * @readonly - * @enum {string} - */ -export type MetricTriggerType = 'Consecutive' | 'Total'; - -/** - * Defines values for AlertSeverity. - * Possible values include: '0', '1', '2', '3', '4' - * @readonly - * @enum {string} - */ -export type AlertSeverity = '0' | '1' | '2' | '3' | '4'; - -/** - * Defines values for OnboardingStatus. - * Possible values include: 'onboarded', 'notOnboarded', 'unknown' - * @readonly - * @enum {string} - */ -export type OnboardingStatus = 'onboarded' | 'notOnboarded' | 'unknown'; - -/** - * Defines values for DataStatus. - * Possible values include: 'present', 'notPresent' - * @readonly - * @enum {string} - */ -export type DataStatus = 'present' | 'notPresent'; - -/** - * Defines values for ResultType. - * Possible values include: 'Data', 'Metadata' - * @readonly - * @enum {string} - */ -export type ResultType = 'Data' | 'Metadata'; - -/** - * Contains response data for the listByResourceGroup operation. - */ -export type AutoscaleSettingsListByResourceGroupResponse = AutoscaleSettingResourceCollection & { - /** - * 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: AutoscaleSettingResourceCollection; - }; -}; - -/** - * Contains response data for the createOrUpdate operation. - */ -export type AutoscaleSettingsCreateOrUpdateResponse = AutoscaleSettingResource & { - /** - * 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: AutoscaleSettingResource; - }; -}; - -/** - * Contains response data for the get operation. - */ -export type AutoscaleSettingsGetResponse = AutoscaleSettingResource & { - /** - * 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: AutoscaleSettingResource; - }; -}; - -/** - * Contains response data for the update operation. - */ -export type AutoscaleSettingsUpdateResponse = AutoscaleSettingResource & { - /** - * 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: AutoscaleSettingResource; - }; -}; - -/** - * Contains response data for the listBySubscription operation. - */ -export type AutoscaleSettingsListBySubscriptionResponse = AutoscaleSettingResourceCollection & { - /** - * 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: AutoscaleSettingResourceCollection; - }; -}; - -/** - * Contains response data for the listByResourceGroupNext operation. - */ -export type AutoscaleSettingsListByResourceGroupNextResponse = AutoscaleSettingResourceCollection & { - /** - * 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: AutoscaleSettingResourceCollection; - }; -}; - -/** - * Contains response data for the listBySubscriptionNext operation. - */ -export type AutoscaleSettingsListBySubscriptionNextResponse = AutoscaleSettingResourceCollection & { - /** - * 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: AutoscaleSettingResourceCollection; - }; -}; - -/** - * Contains response data for the list operation. - */ -export type OperationsListResponse = OperationListResult & { - /** - * 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: OperationListResult; - }; -}; - -/** - * Contains response data for the get operation. - */ -export type AlertRuleIncidentsGetResponse = Incident & { - /** - * 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: Incident; - }; -}; - -/** - * Contains response data for the listByAlertRule operation. - */ -export type AlertRuleIncidentsListByAlertRuleResponse = IncidentListResult & { - /** - * 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: IncidentListResult; - }; -}; - -/** - * Contains response data for the createOrUpdate operation. - */ -export type AlertRulesCreateOrUpdateResponse = AlertRuleResource & { - /** - * 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: AlertRuleResource; - }; -}; - -/** - * Contains response data for the get operation. - */ -export type AlertRulesGetResponse = AlertRuleResource & { - /** - * 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: AlertRuleResource; - }; -}; - -/** - * Contains response data for the update operation. - */ -export type AlertRulesUpdateResponse = AlertRuleResource & { - /** - * 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: AlertRuleResource; - }; -}; - -/** - * Contains response data for the listByResourceGroup operation. - */ -export type AlertRulesListByResourceGroupResponse = AlertRuleResourceCollection & { - /** - * 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: AlertRuleResourceCollection; - }; -}; - -/** - * Contains response data for the listBySubscription operation. - */ -export type AlertRulesListBySubscriptionResponse = AlertRuleResourceCollection & { - /** - * 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: AlertRuleResourceCollection; - }; -}; - -/** - * Contains response data for the get operation. - */ -export type LogProfilesGetResponse = LogProfileResource & { - /** - * 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: LogProfileResource; - }; -}; - -/** - * Contains response data for the createOrUpdate operation. - */ -export type LogProfilesCreateOrUpdateResponse = LogProfileResource & { - /** - * 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: LogProfileResource; - }; -}; - -/** - * Contains response data for the update operation. - */ -export type LogProfilesUpdateResponse = LogProfileResource & { - /** - * 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: LogProfileResource; - }; -}; - -/** - * Contains response data for the list operation. - */ -export type LogProfilesListResponse = LogProfileCollection & { - /** - * 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: LogProfileCollection; - }; -}; - -/** - * Contains response data for the get operation. - */ -export type DiagnosticSettingsGetResponse = DiagnosticSettingsResource & { - /** - * 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: DiagnosticSettingsResource; - }; -}; - -/** - * Contains response data for the createOrUpdate operation. - */ -export type DiagnosticSettingsCreateOrUpdateResponse = DiagnosticSettingsResource & { - /** - * 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: DiagnosticSettingsResource; - }; -}; - -/** - * Contains response data for the list operation. - */ -export type DiagnosticSettingsListResponse = DiagnosticSettingsResourceCollection & { - /** - * 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: DiagnosticSettingsResourceCollection; - }; -}; - -/** - * Contains response data for the get operation. - */ -export type DiagnosticSettingsCategoryGetResponse = DiagnosticSettingsCategoryResource & { - /** - * 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: DiagnosticSettingsCategoryResource; - }; -}; - -/** - * Contains response data for the list operation. - */ -export type DiagnosticSettingsCategoryListResponse = DiagnosticSettingsCategoryResourceCollection & { - /** - * 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: DiagnosticSettingsCategoryResourceCollection; - }; -}; - -/** - * Contains response data for the createOrUpdate operation. - */ -export type ActionGroupsCreateOrUpdateResponse = ActionGroupResource & { - /** - * 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: ActionGroupResource; - }; -}; - -/** - * Contains response data for the get operation. - */ -export type ActionGroupsGetResponse = ActionGroupResource & { - /** - * 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: ActionGroupResource; - }; -}; - -/** - * Contains response data for the update operation. - */ -export type ActionGroupsUpdateResponse = ActionGroupResource & { - /** - * 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: ActionGroupResource; - }; -}; - -/** - * Contains response data for the listBySubscriptionId operation. - */ -export type ActionGroupsListBySubscriptionIdResponse = ActionGroupList & { - /** - * 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: ActionGroupList; - }; -}; - -/** - * Contains response data for the listByResourceGroup operation. - */ -export type ActionGroupsListByResourceGroupResponse = ActionGroupList & { - /** - * 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: ActionGroupList; - }; -}; - -/** - * Contains response data for the createOrUpdate operation. - */ -export type ActivityLogAlertsCreateOrUpdateResponse = ActivityLogAlertResource & { - /** - * 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: ActivityLogAlertResource; - }; -}; - -/** - * Contains response data for the get operation. - */ -export type ActivityLogAlertsGetResponse = ActivityLogAlertResource & { - /** - * 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: ActivityLogAlertResource; - }; -}; - -/** - * Contains response data for the update operation. - */ -export type ActivityLogAlertsUpdateResponse = ActivityLogAlertResource & { - /** - * 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: ActivityLogAlertResource; - }; -}; - -/** - * Contains response data for the listBySubscriptionId operation. - */ -export type ActivityLogAlertsListBySubscriptionIdResponse = ActivityLogAlertList & { - /** - * 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: ActivityLogAlertList; - }; -}; - -/** - * Contains response data for the listByResourceGroup operation. - */ -export type ActivityLogAlertsListByResourceGroupResponse = ActivityLogAlertList & { - /** - * 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: ActivityLogAlertList; - }; -}; - -/** - * Contains response data for the list operation. - */ -export type ActivityLogsListResponse = EventDataCollection & { - /** - * 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: EventDataCollection; - }; -}; - -/** - * Contains response data for the listNext operation. - */ -export type ActivityLogsListNextResponse = EventDataCollection & { - /** - * 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: EventDataCollection; - }; -}; + * An Activity Log Alert rule condition that is met when all its member conditions are met. + * Each condition can be of one of the following types: + * __Important__: Each type has its unique subset of properties. Properties from different types + * CANNOT exist in one condition. + * * __Leaf Condition -__ must contain 'field' and either 'equals' or 'containsAny'. + * _Please note, 'anyOf' should __not__ be set in a Leaf Condition._ + * * __AnyOf Condition -__ must contain __only__ 'anyOf' (which is an array of Leaf Conditions). + * _Please note, 'field', 'equals' and 'containsAny' should __not__ be set in an AnyOf Condition._ -/** - * Contains response data for the list operation. */ -export type EventCategoriesListResponse = EventCategoryCollection & { +export interface AlertRuleAnyOfOrLeafCondition extends AlertRuleLeafCondition { /** - * The underlying HTTP response. + * An Activity Log Alert rule 'anyOf' condition. An Activity Log Alert rule condition that is met + * when at least one of its member leaf conditions are met. */ - _response: msRest.HttpResponse & { - /** - * The response body as text (string format) - */ - bodyAsText: string; - - /** - * The response body as parsed JSON or XML - */ - parsedBody: EventCategoryCollection; - }; -}; + anyOf?: AlertRuleLeafCondition[]; +} /** - * Contains response data for the list operation. + * An Activity Log Alert rule condition that is met when all its member conditions are met. */ -export type TenantActivityLogsListResponse = EventDataCollection & { +export interface AlertRuleAllOfCondition { /** - * The underlying HTTP response. + * The list of Activity Log Alert rule conditions. */ - _response: msRest.HttpResponse & { - /** - * The response body as text (string format) - */ - bodyAsText: string; - - /** - * The response body as parsed JSON or XML - */ - parsedBody: EventDataCollection; - }; -}; + allOf: AlertRuleAnyOfOrLeafCondition[]; +} /** - * Contains response data for the listNext operation. + * A pointer to an Azure Action Group. */ -export type TenantActivityLogsListNextResponse = EventDataCollection & { +export interface ActionGroup { /** - * The underlying HTTP response. + * The resource ID of the Action Group. This cannot be null or empty. */ - _response: msRest.HttpResponse & { - /** - * The response body as text (string format) - */ - bodyAsText: string; - - /** - * The response body as parsed JSON or XML - */ - parsedBody: EventDataCollection; - }; -}; - -/** - * Contains response data for the list operation. - */ -export type MetricDefinitionsListResponse = MetricDefinitionCollection & { + actionGroupId: string; /** - * The underlying HTTP response. + * the dictionary of custom properties to include with the post operation. These data are + * appended to the webhook payload. */ - _response: msRest.HttpResponse & { - /** - * The response body as text (string format) - */ - bodyAsText: string; - - /** - * The response body as parsed JSON or XML - */ - parsedBody: MetricDefinitionCollection; - }; -}; + webhookProperties?: { [propertyName: string]: string }; +} /** - * Contains response data for the list operation. + * A list of Activity Log Alert rule actions. */ -export type MetricsListResponse = Response & { +export interface ActionList { /** - * The underlying HTTP response. + * The list of the Action Groups. */ - _response: msRest.HttpResponse & { - /** - * The response body as text (string format) - */ - bodyAsText: string; - - /** - * The response body as parsed JSON or XML - */ - parsedBody: Response; - }; -}; + actionGroups?: ActionGroup[]; +} /** - * Contains response data for the get operation. + * An Activity Log Alert rule resource. */ -export type MetricBaselineGetResponse = BaselineResponse & { +export interface ActivityLogAlertResource extends AzureResource { /** - * The underlying HTTP response. + * A list of resource IDs that will be used as prefixes. The alert will only apply to Activity + * Log events with resource IDs that fall under one of these prefixes. This list must include at + * least one item. */ - _response: msRest.HttpResponse & { - /** - * The response body as text (string format) - */ - bodyAsText: string; - - /** - * The response body as parsed JSON or XML - */ - parsedBody: BaselineResponse; - }; -}; - -/** - * Contains response data for the calculateBaseline operation. - */ -export type MetricBaselineCalculateBaselineResponse = CalculateBaselineResponse & { + scopes: string[]; /** - * The underlying HTTP response. + * The condition that will cause this alert to activate. */ - _response: msRest.HttpResponse & { - /** - * The response body as text (string format) - */ - bodyAsText: string; - - /** - * The response body as parsed JSON or XML - */ - parsedBody: CalculateBaselineResponse; - }; -}; - -/** - * Contains response data for the list operation. - */ -export type BaselinesListResponse = MetricBaselinesResponse & { + condition: AlertRuleAllOfCondition; /** - * The underlying HTTP response. + * The actions that will activate when the condition is met. */ - _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. - */ -export type MetricAlertsListBySubscriptionResponse = MetricAlertResourceCollection & { + actions: ActionList; /** - * The underlying HTTP response. + * Indicates whether this Activity Log Alert rule is enabled. If an Activity Log Alert rule is + * not enabled, then none of its actions will be activated. Default value: true. */ - _response: msRest.HttpResponse & { - /** - * The response body as text (string format) - */ - bodyAsText: string; - - /** - * The response body as parsed JSON or XML - */ - parsedBody: MetricAlertResourceCollection; - }; -}; - -/** - * Contains response data for the listByResourceGroup operation. - */ -export type MetricAlertsListByResourceGroupResponse = MetricAlertResourceCollection & { + enabled?: boolean; /** - * The underlying HTTP response. + * A description of this Activity Log Alert rule. */ - _response: msRest.HttpResponse & { - /** - * The response body as text (string format) - */ - bodyAsText: string; - - /** - * The response body as parsed JSON or XML - */ - parsedBody: MetricAlertResourceCollection; - }; -}; + description?: string; +} /** - * Contains response data for the get operation. + * An Activity Log Alert rule object for the body of patch operations. */ -export type MetricAlertsGetResponse = MetricAlertResource & { +export interface AlertRulePatchObject { /** - * The underlying HTTP response. + * The resource tags */ - _response: msRest.HttpResponse & { - /** - * The response body as text (string format) - */ - bodyAsText: string; - - /** - * The response body as parsed JSON or XML - */ - parsedBody: MetricAlertResource; - }; -}; - -/** - * Contains response data for the createOrUpdate operation. - */ -export type MetricAlertsCreateOrUpdateResponse = MetricAlertResource & { + tags?: { [propertyName: string]: string }; /** - * The underlying HTTP response. + * Indicates whether this Activity Log Alert rule is enabled. If an Activity Log Alert rule is + * not enabled, then none of its actions will be activated. Default value: true. */ - _response: msRest.HttpResponse & { - /** - * The response body as text (string format) - */ - bodyAsText: string; - - /** - * The response body as parsed JSON or XML - */ - parsedBody: MetricAlertResource; - }; -}; + enabled?: boolean; +} /** - * Contains response data for the update operation. + * The error response. */ -export type MetricAlertsUpdateResponse = MetricAlertResource & { +export interface ErrorResponse { /** - * The underlying HTTP response. + * The error code. + * **NOTE: This property will not be serialized. It can only be populated by the server.** */ - _response: msRest.HttpResponse & { - /** - * The response body as text (string format) - */ - bodyAsText: string; - - /** - * The response body as parsed JSON or XML - */ - parsedBody: MetricAlertResource; - }; -}; - -/** - * Contains response data for the list operation. - */ -export type MetricAlertsStatusListResponse = MetricAlertStatusCollection & { + readonly code?: string; /** - * The underlying HTTP response. + * The error message indicating why the operation failed. + * **NOTE: This property will not be serialized. It can only be populated by the server.** */ - _response: msRest.HttpResponse & { - /** - * The response body as text (string format) - */ - bodyAsText: string; + readonly message?: string; +} - /** - * The response body as parsed JSON or XML - */ - parsedBody: MetricAlertStatusCollection; - }; -}; +/** + * An interface representing MonitorManagementClientOptions. + */ +export interface MonitorManagementClientOptions extends AzureServiceClientOptions { + baseUri?: string; +} /** - * Contains response data for the listByName operation. + * @interface + * A list of Activity Log Alert rules. + * @extends Array */ -export type MetricAlertsStatusListByNameResponse = MetricAlertStatusCollection & { +export interface AlertRuleList extends Array { /** - * The underlying HTTP response. + * Provides the link to retrieve the next set of elements. */ - _response: msRest.HttpResponse & { - /** - * The response body as text (string format) - */ - bodyAsText: string; - - /** - * The response body as parsed JSON or XML - */ - parsedBody: MetricAlertStatusCollection; - }; -}; + nextLink?: string; +} /** * Contains response data for the createOrUpdate operation. */ -export type ScheduledQueryRulesCreateOrUpdateResponse = LogSearchRuleResource & { +export type ActivityLogAlertsCreateOrUpdateResponse = ActivityLogAlertResource & { /** * The underlying HTTP response. */ @@ -4439,14 +215,14 @@ export type ScheduledQueryRulesCreateOrUpdateResponse = LogSearchRuleResource & /** * The response body as parsed JSON or XML */ - parsedBody: LogSearchRuleResource; + parsedBody: ActivityLogAlertResource; }; }; /** * Contains response data for the get operation. */ -export type ScheduledQueryRulesGetResponse = LogSearchRuleResource & { +export type ActivityLogAlertsGetResponse = ActivityLogAlertResource & { /** * The underlying HTTP response. */ @@ -4459,14 +235,14 @@ export type ScheduledQueryRulesGetResponse = LogSearchRuleResource & { /** * The response body as parsed JSON or XML */ - parsedBody: LogSearchRuleResource; + parsedBody: ActivityLogAlertResource; }; }; /** * Contains response data for the update operation. */ -export type ScheduledQueryRulesUpdateResponse = LogSearchRuleResource & { +export type ActivityLogAlertsUpdateResponse = ActivityLogAlertResource & { /** * The underlying HTTP response. */ @@ -4479,14 +255,14 @@ export type ScheduledQueryRulesUpdateResponse = LogSearchRuleResource & { /** * The response body as parsed JSON or XML */ - parsedBody: LogSearchRuleResource; + parsedBody: ActivityLogAlertResource; }; }; /** - * Contains response data for the listBySubscription operation. + * Contains response data for the listBySubscriptionId operation. */ -export type ScheduledQueryRulesListBySubscriptionResponse = LogSearchRuleResourceCollection & { +export type ActivityLogAlertsListBySubscriptionIdResponse = AlertRuleList & { /** * The underlying HTTP response. */ @@ -4499,14 +275,14 @@ export type ScheduledQueryRulesListBySubscriptionResponse = LogSearchRuleResourc /** * The response body as parsed JSON or XML */ - parsedBody: LogSearchRuleResourceCollection; + parsedBody: AlertRuleList; }; }; /** * Contains response data for the listByResourceGroup operation. */ -export type ScheduledQueryRulesListByResourceGroupResponse = LogSearchRuleResourceCollection & { +export type ActivityLogAlertsListByResourceGroupResponse = AlertRuleList & { /** * The underlying HTTP response. */ @@ -4519,14 +295,14 @@ export type ScheduledQueryRulesListByResourceGroupResponse = LogSearchRuleResour /** * The response body as parsed JSON or XML */ - parsedBody: LogSearchRuleResourceCollection; + parsedBody: AlertRuleList; }; }; /** - * Contains response data for the list operation. + * Contains response data for the listBySubscriptionIdNext operation. */ -export type MetricNamespacesListResponse = MetricNamespaceCollection & { +export type ActivityLogAlertsListBySubscriptionIdNextResponse = AlertRuleList & { /** * The underlying HTTP response. */ @@ -4539,14 +315,14 @@ export type MetricNamespacesListResponse = MetricNamespaceCollection & { /** * The response body as parsed JSON or XML */ - parsedBody: MetricNamespaceCollection; + parsedBody: AlertRuleList; }; }; /** - * Contains response data for the getOnboardingStatus operation. + * Contains response data for the listByResourceGroupNext operation. */ -export type VMInsightsGetOnboardingStatusResponse = VMInsightsOnboardingStatus & { +export type ActivityLogAlertsListByResourceGroupNextResponse = AlertRuleList & { /** * The underlying HTTP response. */ @@ -4559,6 +335,6 @@ export type VMInsightsGetOnboardingStatusResponse = VMInsightsOnboardingStatus & /** * The response body as parsed JSON or XML */ - parsedBody: VMInsightsOnboardingStatus; + parsedBody: AlertRuleList; }; }; diff --git a/sdk/monitor/arm-monitor/src/models/logProfilesMappers.ts b/sdk/monitor/arm-monitor/src/models/logProfilesMappers.ts deleted file mode 100644 index a1ad33c209e5..000000000000 --- a/sdk/monitor/arm-monitor/src/models/logProfilesMappers.ts +++ /dev/null @@ -1,90 +0,0 @@ -/* - * 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, - Action, - ActionGroupResource, - ActivityLogAlertActionGroup, - ActivityLogAlertActionList, - ActivityLogAlertAllOfCondition, - ActivityLogAlertLeafCondition, - ActivityLogAlertResource, - AlertingAction, - AlertRuleResource, - ArmRoleReceiver, - AutomationRunbookReceiver, - AutoscaleNotification, - AutoscaleProfile, - AutoscaleSettingResource, - AzNsActionGroup, - AzureAppPushReceiver, - AzureFunctionReceiver, - BaseResource, - CloudError, - Criteria, - DataContainer, - DiagnosticSettingsCategoryResource, - DiagnosticSettingsResource, - Dimension, - DynamicMetricCriteria, - DynamicThresholdFailingPeriods, - EmailNotification, - EmailReceiver, - ErrorResponse, - ItsmReceiver, - LocationThresholdRuleCondition, - LogicAppReceiver, - LogMetricTrigger, - LogProfileCollection, - LogProfileResource, - LogProfileResourcePatch, - LogSearchRuleResource, - LogSettings, - LogToMetricAction, - ManagementEventAggregationCondition, - ManagementEventRuleCondition, - MetricAlertAction, - MetricAlertCriteria, - MetricAlertMultipleResourceMultipleMetricCriteria, - MetricAlertResource, - MetricAlertSingleResourceMultipleMetricCriteria, - MetricCriteria, - MetricDimension, - MetricSettings, - MetricTrigger, - MultiMetricCriteria, - ProxyOnlyResource, - ProxyResource, - Recurrence, - RecurrentSchedule, - Resource, - RetentionPolicy, - RuleAction, - RuleCondition, - RuleDataSource, - RuleEmailAction, - RuleManagementEventClaimsDataSource, - RuleManagementEventDataSource, - RuleMetricDataSource, - RuleWebhookAction, - ScaleAction, - ScaleCapacity, - ScaleRule, - Schedule, - SmsReceiver, - Source, - ThresholdRuleCondition, - TimeWindow, - TriggerCondition, - VMInsightsOnboardingStatus, - VoiceReceiver, - WebhookNotification, - WebhookReceiver, - 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..76f689ce1aa5 100644 --- a/sdk/monitor/arm-monitor/src/models/mappers.ts +++ b/sdk/monitor/arm-monitor/src/models/mappers.ts @@ -1,6 +1,6 @@ /* - * Copyright (c) Microsoft Corporation. All rights reserved. - * Licensed under the MIT License. See License.txt in the project root for license information. + * Copyright (c) Microsoft Corporation. + * Licensed under the MIT License. * * Code generated by Microsoft (R) AutoRest Code Generator. * Changes may cause incorrect behavior and will be lost if the code is regenerated. @@ -12,11 +12,11 @@ import * as msRest from "@azure/ms-rest-js"; export const CloudError = CloudErrorMapper; export const BaseResource = BaseResourceMapper; -export const Resource: msRest.CompositeMapper = { - serializedName: "Resource", +export const AzureResource: msRest.CompositeMapper = { + serializedName: "AzureResource", type: { name: "Composite", - className: "Resource", + className: "AzureResource", modelProperties: { id: { readOnly: true, @@ -40,4780 +40,52 @@ export const Resource: msRest.CompositeMapper = { } }, location: { - required: true, - serializedName: "location", - type: { - name: "String" - } - }, - tags: { - serializedName: "tags", - type: { - name: "Dictionary", - value: { - type: { - name: "String" - } - } - } - } - } - } -}; - -export const ScaleCapacity: msRest.CompositeMapper = { - serializedName: "ScaleCapacity", - type: { - name: "Composite", - className: "ScaleCapacity", - modelProperties: { - minimum: { - required: true, - serializedName: "minimum", - type: { - name: "String" - } - }, - maximum: { - required: true, - serializedName: "maximum", - type: { - name: "String" - } - }, - default: { - required: true, - serializedName: "default", - type: { - name: "String" - } - } - } - } -}; - -export const MetricTrigger: msRest.CompositeMapper = { - serializedName: "MetricTrigger", - type: { - name: "Composite", - className: "MetricTrigger", - modelProperties: { - metricName: { - required: true, - serializedName: "metricName", - type: { - name: "String" - } - }, - metricResourceUri: { - required: true, - serializedName: "metricResourceUri", - type: { - name: "String" - } - }, - timeGrain: { - required: true, - serializedName: "timeGrain", - type: { - name: "TimeSpan" - } - }, - statistic: { - required: true, - serializedName: "statistic", - type: { - name: "Enum", - allowedValues: [ - "Average", - "Min", - "Max", - "Sum" - ] - } - }, - timeWindow: { - required: true, - serializedName: "timeWindow", - type: { - name: "TimeSpan" - } - }, - timeAggregation: { - required: true, - serializedName: "timeAggregation", - type: { - name: "Enum", - allowedValues: [ - "Average", - "Minimum", - "Maximum", - "Total", - "Count", - "Last" - ] - } - }, - operator: { - required: true, - serializedName: "operator", - type: { - name: "Enum", - allowedValues: [ - "Equals", - "NotEquals", - "GreaterThan", - "GreaterThanOrEqual", - "LessThan", - "LessThanOrEqual" - ] - } - }, - threshold: { - required: true, - serializedName: "threshold", - type: { - name: "Number" - } - } - } - } -}; - -export const ScaleAction: msRest.CompositeMapper = { - serializedName: "ScaleAction", - type: { - name: "Composite", - className: "ScaleAction", - modelProperties: { - direction: { - required: true, - serializedName: "direction", - type: { - name: "Enum", - allowedValues: [ - "None", - "Increase", - "Decrease" - ] - } - }, - type: { - required: true, - serializedName: "type", - type: { - name: "Enum", - allowedValues: [ - "ChangeCount", - "PercentChangeCount", - "ExactCount" - ] - } - }, - value: { - serializedName: "value", - defaultValue: '1', - type: { - name: "String" - } - }, - cooldown: { - required: true, - serializedName: "cooldown", - type: { - name: "TimeSpan" - } - } - } - } -}; - -export const ScaleRule: msRest.CompositeMapper = { - serializedName: "ScaleRule", - type: { - name: "Composite", - className: "ScaleRule", - modelProperties: { - metricTrigger: { - required: true, - serializedName: "metricTrigger", - type: { - name: "Composite", - className: "MetricTrigger" - } - }, - scaleAction: { - required: true, - serializedName: "scaleAction", - type: { - name: "Composite", - className: "ScaleAction" - } - } - } - } -}; - -export const TimeWindow: msRest.CompositeMapper = { - serializedName: "TimeWindow", - type: { - name: "Composite", - className: "TimeWindow", - modelProperties: { - timeZone: { - serializedName: "timeZone", - type: { - name: "String" - } - }, - start: { - required: true, - serializedName: "start", - type: { - name: "DateTime" - } - }, - end: { - required: true, - serializedName: "end", - type: { - name: "DateTime" - } - } - } - } -}; - -export const RecurrentSchedule: msRest.CompositeMapper = { - serializedName: "RecurrentSchedule", - type: { - name: "Composite", - className: "RecurrentSchedule", - modelProperties: { - timeZone: { - required: true, - serializedName: "timeZone", - type: { - name: "String" - } - }, - days: { - required: true, - serializedName: "days", - type: { - name: "Sequence", - element: { - type: { - name: "String" - } - } - } - }, - hours: { - required: true, - serializedName: "hours", - type: { - name: "Sequence", - element: { - type: { - name: "Number" - } - } - } - }, - minutes: { - required: true, - serializedName: "minutes", - type: { - name: "Sequence", - element: { - type: { - name: "Number" - } - } - } - } - } - } -}; - -export const Recurrence: msRest.CompositeMapper = { - serializedName: "Recurrence", - type: { - name: "Composite", - className: "Recurrence", - modelProperties: { - frequency: { - required: true, - serializedName: "frequency", - type: { - name: "Enum", - allowedValues: [ - "None", - "Second", - "Minute", - "Hour", - "Day", - "Week", - "Month", - "Year" - ] - } - }, - schedule: { - required: true, - serializedName: "schedule", - type: { - name: "Composite", - className: "RecurrentSchedule" - } - } - } - } -}; - -export const AutoscaleProfile: msRest.CompositeMapper = { - serializedName: "AutoscaleProfile", - type: { - name: "Composite", - className: "AutoscaleProfile", - modelProperties: { - name: { - required: true, - serializedName: "name", - type: { - name: "String" - } - }, - capacity: { - required: true, - serializedName: "capacity", - type: { - name: "Composite", - className: "ScaleCapacity" - } - }, - rules: { - required: true, - serializedName: "rules", - type: { - name: "Sequence", - element: { - type: { - name: "Composite", - className: "ScaleRule" - } - } - } - }, - fixedDate: { - serializedName: "fixedDate", - type: { - name: "Composite", - className: "TimeWindow" - } - }, - recurrence: { - serializedName: "recurrence", - type: { - name: "Composite", - className: "Recurrence" - } - } - } - } -}; - -export const EmailNotification: msRest.CompositeMapper = { - serializedName: "EmailNotification", - type: { - name: "Composite", - className: "EmailNotification", - modelProperties: { - sendToSubscriptionAdministrator: { - serializedName: "sendToSubscriptionAdministrator", - type: { - name: "Boolean" - } - }, - sendToSubscriptionCoAdministrators: { - serializedName: "sendToSubscriptionCoAdministrators", - type: { - name: "Boolean" - } - }, - customEmails: { - serializedName: "customEmails", - type: { - name: "Sequence", - element: { - type: { - name: "String" - } - } - } - } - } - } -}; - -export const WebhookNotification: msRest.CompositeMapper = { - serializedName: "WebhookNotification", - type: { - name: "Composite", - className: "WebhookNotification", - modelProperties: { - serviceUri: { - serializedName: "serviceUri", - type: { - name: "String" - } - }, - properties: { - serializedName: "properties", - type: { - name: "Dictionary", - value: { - type: { - name: "String" - } - } - } - } - } - } -}; - -export const AutoscaleNotification: msRest.CompositeMapper = { - serializedName: "AutoscaleNotification", - type: { - name: "Composite", - className: "AutoscaleNotification", - modelProperties: { - operation: { - required: true, - isConstant: true, - serializedName: "operation", - defaultValue: 'Scale', - type: { - name: "String" - } - }, - email: { - serializedName: "email", - type: { - name: "Composite", - className: "EmailNotification" - } - }, - webhooks: { - serializedName: "webhooks", - type: { - name: "Sequence", - element: { - type: { - name: "Composite", - className: "WebhookNotification" - } - } - } - } - } - } -}; - -export const AutoscaleSettingResource: msRest.CompositeMapper = { - serializedName: "AutoscaleSettingResource", - type: { - name: "Composite", - className: "AutoscaleSettingResource", - modelProperties: { - ...Resource.type.modelProperties, - profiles: { - required: true, - serializedName: "properties.profiles", - constraints: { - MaxItems: 20 - }, - type: { - name: "Sequence", - element: { - type: { - name: "Composite", - className: "AutoscaleProfile" - } - } - } - }, - notifications: { - serializedName: "properties.notifications", - type: { - name: "Sequence", - element: { - type: { - name: "Composite", - className: "AutoscaleNotification" - } - } - } - }, - enabled: { - serializedName: "properties.enabled", - defaultValue: true, - type: { - name: "Boolean" - } - }, - autoscaleSettingResourceName: { - serializedName: "properties.name", - type: { - name: "String" - } - }, - targetResourceUri: { - serializedName: "properties.targetResourceUri", - type: { - name: "String" - } - } - } - } -}; - -export const AutoscaleSettingResourcePatch: msRest.CompositeMapper = { - serializedName: "AutoscaleSettingResourcePatch", - type: { - name: "Composite", - className: "AutoscaleSettingResourcePatch", - modelProperties: { - tags: { - serializedName: "tags", - type: { - name: "Dictionary", - value: { - type: { - name: "String" - } - } - } - }, - profiles: { - required: true, - serializedName: "properties.profiles", - constraints: { - MaxItems: 20 - }, - type: { - name: "Sequence", - element: { - type: { - name: "Composite", - className: "AutoscaleProfile" - } - } - } - }, - notifications: { - serializedName: "properties.notifications", - type: { - name: "Sequence", - element: { - type: { - name: "Composite", - className: "AutoscaleNotification" - } - } - } - }, - enabled: { - serializedName: "properties.enabled", - defaultValue: true, - type: { - name: "Boolean" - } - }, - name: { - serializedName: "properties.name", - type: { - name: "String" - } - }, - targetResourceUri: { - serializedName: "properties.targetResourceUri", - type: { - name: "String" - } - } - } - } -}; - -export const ErrorResponse: msRest.CompositeMapper = { - serializedName: "ErrorResponse", - type: { - name: "Composite", - className: "ErrorResponse", - modelProperties: { - code: { - serializedName: "code", - type: { - name: "String" - } - }, - message: { - serializedName: "message", - type: { - name: "String" - } - } - } - } -}; - -export const OperationDisplay: msRest.CompositeMapper = { - serializedName: "Operation_display", - type: { - name: "Composite", - className: "OperationDisplay", - modelProperties: { - provider: { - serializedName: "provider", - type: { - name: "String" - } - }, - resource: { - serializedName: "resource", - type: { - name: "String" - } - }, - operation: { - serializedName: "operation", - type: { - name: "String" - } - } - } - } -}; - -export const Operation: msRest.CompositeMapper = { - serializedName: "Operation", - type: { - name: "Composite", - className: "Operation", - modelProperties: { - name: { - serializedName: "name", - type: { - name: "String" - } - }, - display: { - serializedName: "display", - type: { - name: "Composite", - className: "OperationDisplay" - } - } - } - } -}; - -export const OperationListResult: msRest.CompositeMapper = { - serializedName: "OperationListResult", - type: { - name: "Composite", - className: "OperationListResult", - modelProperties: { - value: { - serializedName: "value", - type: { - name: "Sequence", - element: { - type: { - name: "Composite", - className: "Operation" - } - } - } - }, - nextLink: { - serializedName: "nextLink", - type: { - name: "String" - } - } - } - } -}; - -export const Incident: msRest.CompositeMapper = { - serializedName: "Incident", - type: { - name: "Composite", - className: "Incident", - modelProperties: { - name: { - readOnly: true, - serializedName: "name", - type: { - name: "String" - } - }, - ruleName: { - readOnly: true, - serializedName: "ruleName", - type: { - name: "String" - } - }, - isActive: { - readOnly: true, - serializedName: "isActive", - type: { - name: "Boolean" - } - }, - activatedTime: { - readOnly: true, - serializedName: "activatedTime", - type: { - name: "DateTime" - } - }, - resolvedTime: { - readOnly: true, - serializedName: "resolvedTime", - type: { - name: "DateTime" - } - } - } - } -}; - -export const RuleDataSource: msRest.CompositeMapper = { - serializedName: "RuleDataSource", - type: { - name: "Composite", - polymorphicDiscriminator: { - serializedName: "odata.type", - clientName: "odatatype" - }, - uberParent: "RuleDataSource", - className: "RuleDataSource", - modelProperties: { - resourceUri: { - serializedName: "resourceUri", - type: { - name: "String" - } - }, - odatatype: { - required: true, - serializedName: "odata\\.type", - type: { - name: "String" - } - } - } - } -}; - -export const RuleCondition: msRest.CompositeMapper = { - serializedName: "RuleCondition", - type: { - name: "Composite", - polymorphicDiscriminator: { - serializedName: "odata.type", - clientName: "odatatype" - }, - uberParent: "RuleCondition", - className: "RuleCondition", - modelProperties: { - dataSource: { - serializedName: "dataSource", - type: { - name: "Composite", - className: "RuleDataSource" - } - }, - odatatype: { - required: true, - serializedName: "odata\\.type", - type: { - name: "String" - } - } - } - } -}; - -export const RuleMetricDataSource: msRest.CompositeMapper = { - serializedName: "Microsoft.Azure.Management.Insights.Models.RuleMetricDataSource", - type: { - name: "Composite", - polymorphicDiscriminator: RuleDataSource.type.polymorphicDiscriminator, - uberParent: "RuleDataSource", - className: "RuleMetricDataSource", - modelProperties: { - ...RuleDataSource.type.modelProperties, - metricName: { - serializedName: "metricName", - type: { - name: "String" - } - } - } - } -}; - -export const RuleManagementEventClaimsDataSource: msRest.CompositeMapper = { - serializedName: "RuleManagementEventClaimsDataSource", - type: { - name: "Composite", - className: "RuleManagementEventClaimsDataSource", - modelProperties: { - emailAddress: { - serializedName: "emailAddress", - type: { - name: "String" - } - } - } - } -}; - -export const RuleManagementEventDataSource: msRest.CompositeMapper = { - serializedName: "Microsoft.Azure.Management.Insights.Models.RuleManagementEventDataSource", - type: { - name: "Composite", - polymorphicDiscriminator: RuleDataSource.type.polymorphicDiscriminator, - uberParent: "RuleDataSource", - className: "RuleManagementEventDataSource", - modelProperties: { - ...RuleDataSource.type.modelProperties, - eventName: { - serializedName: "eventName", - type: { - name: "String" - } - }, - eventSource: { - serializedName: "eventSource", - type: { - name: "String" - } - }, - level: { - serializedName: "level", - type: { - name: "String" - } - }, - operationName: { - serializedName: "operationName", - type: { - name: "String" - } - }, - resourceGroupName: { - serializedName: "resourceGroupName", - type: { - name: "String" - } - }, - resourceProviderName: { - serializedName: "resourceProviderName", - type: { - name: "String" - } - }, - status: { - serializedName: "status", - type: { - name: "String" - } - }, - subStatus: { - serializedName: "subStatus", - type: { - name: "String" - } - }, - claims: { - serializedName: "claims", - type: { - name: "Composite", - className: "RuleManagementEventClaimsDataSource" - } - } - } - } -}; - -export const ThresholdRuleCondition: msRest.CompositeMapper = { - serializedName: "Microsoft.Azure.Management.Insights.Models.ThresholdRuleCondition", - type: { - name: "Composite", - polymorphicDiscriminator: RuleCondition.type.polymorphicDiscriminator, - uberParent: "RuleCondition", - className: "ThresholdRuleCondition", - modelProperties: { - ...RuleCondition.type.modelProperties, - operator: { - required: true, - serializedName: "operator", - type: { - name: "Enum", - allowedValues: [ - "GreaterThan", - "GreaterThanOrEqual", - "LessThan", - "LessThanOrEqual" - ] - } - }, - threshold: { - required: true, - serializedName: "threshold", - type: { - name: "Number" - } - }, - windowSize: { - serializedName: "windowSize", - type: { - name: "TimeSpan" - } - }, - timeAggregation: { - serializedName: "timeAggregation", - type: { - name: "Enum", - allowedValues: [ - "Average", - "Minimum", - "Maximum", - "Total", - "Last" - ] - } - } - } - } -}; - -export const LocationThresholdRuleCondition: msRest.CompositeMapper = { - serializedName: "Microsoft.Azure.Management.Insights.Models.LocationThresholdRuleCondition", - type: { - name: "Composite", - polymorphicDiscriminator: RuleCondition.type.polymorphicDiscriminator, - uberParent: "RuleCondition", - className: "LocationThresholdRuleCondition", - modelProperties: { - ...RuleCondition.type.modelProperties, - windowSize: { - serializedName: "windowSize", - type: { - name: "TimeSpan" - } - }, - failedLocationCount: { - required: true, - serializedName: "failedLocationCount", - constraints: { - InclusiveMinimum: 0 - }, - type: { - name: "Number" - } - } - } - } -}; - -export const ManagementEventAggregationCondition: msRest.CompositeMapper = { - serializedName: "ManagementEventAggregationCondition", - type: { - name: "Composite", - className: "ManagementEventAggregationCondition", - modelProperties: { - operator: { - serializedName: "operator", - type: { - name: "Enum", - allowedValues: [ - "GreaterThan", - "GreaterThanOrEqual", - "LessThan", - "LessThanOrEqual" - ] - } - }, - threshold: { - serializedName: "threshold", - type: { - name: "Number" - } - }, - windowSize: { - serializedName: "windowSize", - type: { - name: "TimeSpan" - } - } - } - } -}; - -export const ManagementEventRuleCondition: msRest.CompositeMapper = { - serializedName: "Microsoft.Azure.Management.Insights.Models.ManagementEventRuleCondition", - type: { - name: "Composite", - polymorphicDiscriminator: RuleCondition.type.polymorphicDiscriminator, - uberParent: "RuleCondition", - className: "ManagementEventRuleCondition", - modelProperties: { - ...RuleCondition.type.modelProperties, - aggregation: { - serializedName: "aggregation", - type: { - name: "Composite", - className: "ManagementEventAggregationCondition" - } - } - } - } -}; - -export const RuleAction: msRest.CompositeMapper = { - serializedName: "RuleAction", - type: { - name: "Composite", - polymorphicDiscriminator: { - serializedName: "odata.type", - clientName: "odatatype" - }, - uberParent: "RuleAction", - className: "RuleAction", - modelProperties: { - odatatype: { - required: true, - serializedName: "odata\\.type", - type: { - name: "String" - } - } - } - } -}; - -export const RuleEmailAction: msRest.CompositeMapper = { - serializedName: "Microsoft.Azure.Management.Insights.Models.RuleEmailAction", - type: { - name: "Composite", - polymorphicDiscriminator: RuleAction.type.polymorphicDiscriminator, - uberParent: "RuleAction", - className: "RuleEmailAction", - modelProperties: { - ...RuleAction.type.modelProperties, - sendToServiceOwners: { - serializedName: "sendToServiceOwners", - type: { - name: "Boolean" - } - }, - customEmails: { - serializedName: "customEmails", - type: { - name: "Sequence", - element: { - type: { - name: "String" - } - } - } - } - } - } -}; - -export const RuleWebhookAction: msRest.CompositeMapper = { - serializedName: "Microsoft.Azure.Management.Insights.Models.RuleWebhookAction", - type: { - name: "Composite", - polymorphicDiscriminator: RuleAction.type.polymorphicDiscriminator, - uberParent: "RuleAction", - className: "RuleWebhookAction", - modelProperties: { - ...RuleAction.type.modelProperties, - serviceUri: { - serializedName: "serviceUri", - type: { - name: "String" - } - }, - properties: { - serializedName: "properties", - type: { - name: "Dictionary", - value: { - type: { - name: "String" - } - } - } - } - } - } -}; - -export const AlertRuleResource: msRest.CompositeMapper = { - serializedName: "AlertRuleResource", - type: { - name: "Composite", - className: "AlertRuleResource", - modelProperties: { - ...Resource.type.modelProperties, - alertRuleResourceName: { - required: true, - serializedName: "properties.name", - type: { - name: "String" - } - }, - description: { - serializedName: "properties.description", - type: { - name: "String" - } - }, - isEnabled: { - required: true, - serializedName: "properties.isEnabled", - type: { - name: "Boolean" - } - }, - condition: { - required: true, - serializedName: "properties.condition", - type: { - name: "Composite", - className: "RuleCondition" - } - }, - actions: { - serializedName: "properties.actions", - type: { - name: "Sequence", - element: { - type: { - name: "Composite", - className: "RuleAction" - } - } - } - }, - lastUpdatedTime: { - readOnly: true, - serializedName: "properties.lastUpdatedTime", - type: { - name: "DateTime" - } - } - } - } -}; - -export const AlertRuleResourcePatch: msRest.CompositeMapper = { - serializedName: "AlertRuleResourcePatch", - type: { - name: "Composite", - className: "AlertRuleResourcePatch", - modelProperties: { - tags: { - serializedName: "tags", - type: { - name: "Dictionary", - value: { - type: { - name: "String" - } - } - } - }, - name: { - required: true, - serializedName: "properties.name", - type: { - name: "String" - } - }, - description: { - serializedName: "properties.description", - type: { - name: "String" - } - }, - isEnabled: { - required: true, - serializedName: "properties.isEnabled", - type: { - name: "Boolean" - } - }, - condition: { - required: true, - serializedName: "properties.condition", - type: { - name: "Composite", - className: "RuleCondition" - } - }, - actions: { - serializedName: "properties.actions", - type: { - name: "Sequence", - element: { - type: { - name: "Composite", - className: "RuleAction" - } - } - } - }, - lastUpdatedTime: { - readOnly: true, - serializedName: "properties.lastUpdatedTime", - type: { - name: "DateTime" - } - } - } - } -}; - -export const RetentionPolicy: msRest.CompositeMapper = { - serializedName: "RetentionPolicy", - type: { - name: "Composite", - className: "RetentionPolicy", - modelProperties: { - enabled: { - required: true, - serializedName: "enabled", - type: { - name: "Boolean" - } - }, - days: { - required: true, - serializedName: "days", - constraints: { - InclusiveMinimum: 0 - }, - type: { - name: "Number" - } - } - } - } -}; - -export const LogProfileResource: msRest.CompositeMapper = { - serializedName: "LogProfileResource", - type: { - name: "Composite", - className: "LogProfileResource", - modelProperties: { - ...Resource.type.modelProperties, - storageAccountId: { - serializedName: "properties.storageAccountId", - type: { - name: "String" - } - }, - serviceBusRuleId: { - serializedName: "properties.serviceBusRuleId", - type: { - name: "String" - } - }, - locations: { - required: true, - serializedName: "properties.locations", - type: { - name: "Sequence", - element: { - type: { - name: "String" - } - } - } - }, - categories: { - required: true, - serializedName: "properties.categories", - type: { - name: "Sequence", - element: { - type: { - name: "String" - } - } - } - }, - retentionPolicy: { - required: true, - serializedName: "properties.retentionPolicy", - type: { - name: "Composite", - className: "RetentionPolicy" - } - } - } - } -}; - -export const LogProfileResourcePatch: msRest.CompositeMapper = { - serializedName: "LogProfileResourcePatch", - type: { - name: "Composite", - className: "LogProfileResourcePatch", - modelProperties: { - tags: { - serializedName: "tags", - type: { - name: "Dictionary", - value: { - type: { - name: "String" - } - } - } - }, - storageAccountId: { - serializedName: "properties.storageAccountId", - type: { - name: "String" - } - }, - serviceBusRuleId: { - serializedName: "properties.serviceBusRuleId", - type: { - name: "String" - } - }, - locations: { - required: true, - serializedName: "properties.locations", - type: { - name: "Sequence", - element: { - type: { - name: "String" - } - } - } - }, - categories: { - required: true, - serializedName: "properties.categories", - type: { - name: "Sequence", - element: { - type: { - name: "String" - } - } - } - }, - retentionPolicy: { - required: true, - serializedName: "properties.retentionPolicy", - type: { - name: "Composite", - className: "RetentionPolicy" - } - } - } - } -}; - -export const ProxyOnlyResource: msRest.CompositeMapper = { - serializedName: "ProxyOnlyResource", - type: { - name: "Composite", - className: "ProxyOnlyResource", - modelProperties: { - id: { - readOnly: true, - serializedName: "id", - type: { - name: "String" - } - }, - name: { - readOnly: true, - serializedName: "name", - type: { - name: "String" - } - }, - type: { - readOnly: true, - serializedName: "type", - type: { - name: "String" - } - } - } - } -}; - -export const MetricSettings: msRest.CompositeMapper = { - serializedName: "MetricSettings", - type: { - name: "Composite", - className: "MetricSettings", - modelProperties: { - timeGrain: { - serializedName: "timeGrain", - type: { - name: "TimeSpan" - } - }, - category: { - serializedName: "category", - type: { - name: "String" - } - }, - enabled: { - required: true, - serializedName: "enabled", - type: { - name: "Boolean" - } - }, - retentionPolicy: { - serializedName: "retentionPolicy", - type: { - name: "Composite", - className: "RetentionPolicy" - } - } - } - } -}; - -export const LogSettings: msRest.CompositeMapper = { - serializedName: "LogSettings", - type: { - name: "Composite", - className: "LogSettings", - modelProperties: { - category: { - serializedName: "category", - type: { - name: "String" - } - }, - enabled: { - required: true, - serializedName: "enabled", - type: { - name: "Boolean" - } - }, - retentionPolicy: { - serializedName: "retentionPolicy", - type: { - name: "Composite", - className: "RetentionPolicy" - } - } - } - } -}; - -export const DiagnosticSettingsResource: msRest.CompositeMapper = { - serializedName: "DiagnosticSettingsResource", - type: { - name: "Composite", - className: "DiagnosticSettingsResource", - modelProperties: { - ...ProxyOnlyResource.type.modelProperties, - storageAccountId: { - serializedName: "properties.storageAccountId", - type: { - name: "String" - } - }, - serviceBusRuleId: { - serializedName: "properties.serviceBusRuleId", - type: { - name: "String" - } - }, - eventHubAuthorizationRuleId: { - serializedName: "properties.eventHubAuthorizationRuleId", - type: { - name: "String" - } - }, - eventHubName: { - serializedName: "properties.eventHubName", - type: { - name: "String" - } - }, - metrics: { - serializedName: "properties.metrics", - type: { - name: "Sequence", - element: { - type: { - name: "Composite", - className: "MetricSettings" - } - } - } - }, - logs: { - serializedName: "properties.logs", - type: { - name: "Sequence", - element: { - type: { - name: "Composite", - className: "LogSettings" - } - } - } - }, - workspaceId: { - serializedName: "properties.workspaceId", - type: { - name: "String" - } - }, - logAnalyticsDestinationType: { - serializedName: "properties.logAnalyticsDestinationType", - type: { - name: "String" - } - } - } - } -}; - -export const DiagnosticSettingsResourceCollection: msRest.CompositeMapper = { - serializedName: "DiagnosticSettingsResourceCollection", - type: { - name: "Composite", - className: "DiagnosticSettingsResourceCollection", - modelProperties: { - value: { - serializedName: "value", - type: { - name: "Sequence", - element: { - type: { - name: "Composite", - className: "DiagnosticSettingsResource" - } - } - } - } - } - } -}; - -export const DiagnosticSettingsCategoryResource: msRest.CompositeMapper = { - serializedName: "DiagnosticSettingsCategoryResource", - type: { - name: "Composite", - className: "DiagnosticSettingsCategoryResource", - modelProperties: { - ...ProxyOnlyResource.type.modelProperties, - categoryType: { - nullable: false, - serializedName: "properties.categoryType", - type: { - name: "Enum", - allowedValues: [ - "Metrics", - "Logs" - ] - } - } - } - } -}; - -export const DiagnosticSettingsCategoryResourceCollection: msRest.CompositeMapper = { - serializedName: "DiagnosticSettingsCategoryResourceCollection", - type: { - name: "Composite", - className: "DiagnosticSettingsCategoryResourceCollection", - modelProperties: { - value: { - serializedName: "value", - type: { - name: "Sequence", - element: { - type: { - name: "Composite", - className: "DiagnosticSettingsCategoryResource" - } - } - } - } - } - } -}; - -export const EmailReceiver: msRest.CompositeMapper = { - serializedName: "EmailReceiver", - type: { - name: "Composite", - className: "EmailReceiver", - modelProperties: { - name: { - required: true, - serializedName: "name", - type: { - name: "String" - } - }, - emailAddress: { - required: true, - serializedName: "emailAddress", - type: { - name: "String" - } - }, - useCommonAlertSchema: { - required: true, - serializedName: "useCommonAlertSchema", - type: { - name: "Boolean" - } - }, - status: { - readOnly: true, - serializedName: "status", - type: { - name: "Enum", - allowedValues: [ - "NotSpecified", - "Enabled", - "Disabled" - ] - } - } - } - } -}; - -export const SmsReceiver: msRest.CompositeMapper = { - serializedName: "SmsReceiver", - type: { - name: "Composite", - className: "SmsReceiver", - modelProperties: { - name: { - required: true, - serializedName: "name", - type: { - name: "String" - } - }, - countryCode: { - required: true, - serializedName: "countryCode", - type: { - name: "String" - } - }, - phoneNumber: { - required: true, - serializedName: "phoneNumber", - type: { - name: "String" - } - }, - status: { - readOnly: true, - serializedName: "status", - type: { - name: "Enum", - allowedValues: [ - "NotSpecified", - "Enabled", - "Disabled" - ] - } - } - } - } -}; - -export const WebhookReceiver: msRest.CompositeMapper = { - serializedName: "WebhookReceiver", - type: { - name: "Composite", - className: "WebhookReceiver", - modelProperties: { - name: { - required: true, - serializedName: "name", - type: { - name: "String" - } - }, - serviceUri: { - required: true, - serializedName: "serviceUri", - type: { - name: "String" - } - }, - useCommonAlertSchema: { - required: true, - serializedName: "useCommonAlertSchema", - 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" - } - } - } - } -}; - -export const ItsmReceiver: msRest.CompositeMapper = { - serializedName: "ItsmReceiver", - type: { - name: "Composite", - className: "ItsmReceiver", - modelProperties: { - name: { - required: true, - serializedName: "name", - type: { - name: "String" - } - }, - workspaceId: { - required: true, - serializedName: "workspaceId", - type: { - name: "String" - } - }, - connectionId: { - required: true, - serializedName: "connectionId", - type: { - name: "String" - } - }, - ticketConfiguration: { - required: true, - serializedName: "ticketConfiguration", - type: { - name: "String" - } - }, - region: { - required: true, - serializedName: "region", - type: { - name: "String" - } - } - } - } -}; - -export const AzureAppPushReceiver: msRest.CompositeMapper = { - serializedName: "AzureAppPushReceiver", - type: { - name: "Composite", - className: "AzureAppPushReceiver", - modelProperties: { - name: { - required: true, - serializedName: "name", - type: { - name: "String" - } - }, - emailAddress: { - required: true, - serializedName: "emailAddress", - type: { - name: "String" - } - } - } - } -}; - -export const AutomationRunbookReceiver: msRest.CompositeMapper = { - serializedName: "AutomationRunbookReceiver", - type: { - name: "Composite", - className: "AutomationRunbookReceiver", - modelProperties: { - automationAccountId: { - required: true, - serializedName: "automationAccountId", - type: { - name: "String" - } - }, - runbookName: { - required: true, - serializedName: "runbookName", - type: { - name: "String" - } - }, - webhookResourceId: { - required: true, - serializedName: "webhookResourceId", - type: { - name: "String" - } - }, - isGlobalRunbook: { - required: true, - serializedName: "isGlobalRunbook", - type: { - name: "Boolean" - } - }, - name: { - serializedName: "name", - type: { - name: "String" - } - }, - serviceUri: { - serializedName: "serviceUri", - type: { - name: "String" - } - }, - useCommonAlertSchema: { - required: true, - serializedName: "useCommonAlertSchema", - type: { - name: "Boolean" - } - } - } - } -}; - -export const VoiceReceiver: msRest.CompositeMapper = { - serializedName: "VoiceReceiver", - type: { - name: "Composite", - className: "VoiceReceiver", - modelProperties: { - name: { - required: true, - serializedName: "name", - type: { - name: "String" - } - }, - countryCode: { - required: true, - serializedName: "countryCode", - type: { - name: "String" - } - }, - phoneNumber: { - required: true, - serializedName: "phoneNumber", - type: { - name: "String" - } - } - } - } -}; - -export const LogicAppReceiver: msRest.CompositeMapper = { - serializedName: "LogicAppReceiver", - type: { - name: "Composite", - className: "LogicAppReceiver", - modelProperties: { - name: { - required: true, - serializedName: "name", - type: { - name: "String" - } - }, - resourceId: { - required: true, - serializedName: "resourceId", - type: { - name: "String" - } - }, - callbackUrl: { - required: true, - serializedName: "callbackUrl", - type: { - name: "String" - } - }, - useCommonAlertSchema: { - required: true, - serializedName: "useCommonAlertSchema", - type: { - name: "Boolean" - } - } - } - } -}; - -export const AzureFunctionReceiver: msRest.CompositeMapper = { - serializedName: "AzureFunctionReceiver", - type: { - name: "Composite", - className: "AzureFunctionReceiver", - modelProperties: { - name: { - required: true, - serializedName: "name", - type: { - name: "String" - } - }, - functionAppResourceId: { - required: true, - serializedName: "functionAppResourceId", - type: { - name: "String" - } - }, - functionName: { - required: true, - serializedName: "functionName", - type: { - name: "String" - } - }, - httpTriggerUrl: { - required: true, - serializedName: "httpTriggerUrl", - type: { - name: "String" - } - }, - useCommonAlertSchema: { - required: true, - serializedName: "useCommonAlertSchema", - type: { - name: "Boolean" - } - } - } - } -}; - -export const ArmRoleReceiver: msRest.CompositeMapper = { - serializedName: "ArmRoleReceiver", - type: { - name: "Composite", - className: "ArmRoleReceiver", - modelProperties: { - name: { - required: true, - serializedName: "name", - type: { - name: "String" - } - }, - roleId: { - required: true, - serializedName: "roleId", - type: { - name: "String" - } - }, - useCommonAlertSchema: { - required: true, - serializedName: "useCommonAlertSchema", - type: { - name: "Boolean" - } - } - } - } -}; - -export const ActionGroupResource: msRest.CompositeMapper = { - serializedName: "ActionGroupResource", - type: { - name: "Composite", - className: "ActionGroupResource", - modelProperties: { - ...Resource.type.modelProperties, - groupShortName: { - required: true, - serializedName: "properties.groupShortName", - constraints: { - MaxLength: 12 - }, - type: { - name: "String" - } - }, - enabled: { - required: true, - serializedName: "properties.enabled", - defaultValue: true, - type: { - name: "Boolean" - } - }, - emailReceivers: { - serializedName: "properties.emailReceivers", - type: { - name: "Sequence", - element: { - type: { - name: "Composite", - className: "EmailReceiver" - } - } - } - }, - smsReceivers: { - serializedName: "properties.smsReceivers", - type: { - name: "Sequence", - element: { - type: { - name: "Composite", - className: "SmsReceiver" - } - } - } - }, - webhookReceivers: { - serializedName: "properties.webhookReceivers", - type: { - name: "Sequence", - element: { - type: { - name: "Composite", - className: "WebhookReceiver" - } - } - } - }, - itsmReceivers: { - serializedName: "properties.itsmReceivers", - type: { - name: "Sequence", - element: { - type: { - name: "Composite", - className: "ItsmReceiver" - } - } - } - }, - azureAppPushReceivers: { - serializedName: "properties.azureAppPushReceivers", - type: { - name: "Sequence", - element: { - type: { - name: "Composite", - className: "AzureAppPushReceiver" - } - } - } - }, - automationRunbookReceivers: { - serializedName: "properties.automationRunbookReceivers", - type: { - name: "Sequence", - element: { - type: { - name: "Composite", - className: "AutomationRunbookReceiver" - } - } - } - }, - voiceReceivers: { - serializedName: "properties.voiceReceivers", - type: { - name: "Sequence", - element: { - type: { - name: "Composite", - className: "VoiceReceiver" - } - } - } - }, - logicAppReceivers: { - serializedName: "properties.logicAppReceivers", - type: { - name: "Sequence", - element: { - type: { - name: "Composite", - className: "LogicAppReceiver" - } - } - } - }, - azureFunctionReceivers: { - serializedName: "properties.azureFunctionReceivers", - type: { - name: "Sequence", - element: { - type: { - name: "Composite", - className: "AzureFunctionReceiver" - } - } - } - }, - armRoleReceivers: { - serializedName: "properties.armRoleReceivers", - type: { - name: "Sequence", - element: { - type: { - name: "Composite", - className: "ArmRoleReceiver" - } - } - } - } - } - } -}; - -export const EnableRequest: msRest.CompositeMapper = { - serializedName: "EnableRequest", - type: { - name: "Composite", - className: "EnableRequest", - modelProperties: { - receiverName: { - required: true, - serializedName: "receiverName", - type: { - name: "String" - } - } - } - } -}; - -export const ActionGroupPatchBody: msRest.CompositeMapper = { - serializedName: "ActionGroupPatchBody", - type: { - name: "Composite", - className: "ActionGroupPatchBody", - modelProperties: { - tags: { - serializedName: "tags", - type: { - name: "Dictionary", - value: { - type: { - name: "String" - } - } - } - }, - enabled: { - serializedName: "properties.enabled", - defaultValue: true, - type: { - name: "Boolean" - } - } - } - } -}; - -export const ActivityLogAlertLeafCondition: msRest.CompositeMapper = { - serializedName: "ActivityLogAlertLeafCondition", - type: { - name: "Composite", - className: "ActivityLogAlertLeafCondition", - modelProperties: { - field: { - required: true, - serializedName: "field", - type: { - name: "String" - } - }, - equals: { - required: true, - serializedName: "equals", - type: { - name: "String" - } - } - } - } -}; - -export const ActivityLogAlertAllOfCondition: msRest.CompositeMapper = { - serializedName: "ActivityLogAlertAllOfCondition", - type: { - name: "Composite", - className: "ActivityLogAlertAllOfCondition", - modelProperties: { - allOf: { - required: true, - serializedName: "allOf", - type: { - name: "Sequence", - element: { - type: { - name: "Composite", - className: "ActivityLogAlertLeafCondition" - } - } - } - } - } - } -}; - -export const ActivityLogAlertActionGroup: msRest.CompositeMapper = { - serializedName: "ActivityLogAlertActionGroup", - type: { - name: "Composite", - className: "ActivityLogAlertActionGroup", - modelProperties: { - actionGroupId: { - required: true, - serializedName: "actionGroupId", - type: { - name: "String" - } - }, - webhookProperties: { - serializedName: "webhookProperties", - type: { - name: "Dictionary", - value: { - type: { - name: "String" - } - } - } - } - } - } -}; - -export const ActivityLogAlertActionList: msRest.CompositeMapper = { - serializedName: "ActivityLogAlertActionList", - type: { - name: "Composite", - className: "ActivityLogAlertActionList", - modelProperties: { - actionGroups: { - serializedName: "actionGroups", - type: { - name: "Sequence", - element: { - type: { - name: "Composite", - className: "ActivityLogAlertActionGroup" - } - } - } - } - } - } -}; - -export const ActivityLogAlertResource: msRest.CompositeMapper = { - serializedName: "ActivityLogAlertResource", - type: { - name: "Composite", - className: "ActivityLogAlertResource", - modelProperties: { - ...Resource.type.modelProperties, - scopes: { - required: true, - serializedName: "properties.scopes", - type: { - name: "Sequence", - element: { - type: { - name: "String" - } - } - } - }, - enabled: { - serializedName: "properties.enabled", - defaultValue: true, - type: { - name: "Boolean" - } - }, - condition: { - required: true, - serializedName: "properties.condition", - type: { - name: "Composite", - className: "ActivityLogAlertAllOfCondition" - } - }, - actions: { - required: true, - serializedName: "properties.actions", - type: { - name: "Composite", - className: "ActivityLogAlertActionList" - } - }, - description: { - serializedName: "properties.description", - type: { - name: "String" - } - } - } - } -}; - -export const ActivityLogAlertPatchBody: msRest.CompositeMapper = { - serializedName: "ActivityLogAlertPatchBody", - type: { - name: "Composite", - className: "ActivityLogAlertPatchBody", - modelProperties: { - tags: { - serializedName: "tags", - type: { - name: "Dictionary", - value: { - type: { - name: "String" - } - } - } - }, - enabled: { - serializedName: "properties.enabled", - defaultValue: true, - type: { - name: "Boolean" - } - } - } - } -}; - -export const LocalizableString: msRest.CompositeMapper = { - serializedName: "LocalizableString", - type: { - name: "Composite", - className: "LocalizableString", - modelProperties: { - value: { - required: true, - serializedName: "value", - type: { - name: "String" - } - }, - localizedValue: { - serializedName: "localizedValue", - type: { - name: "String" - } - } - } - } -}; - -export const SenderAuthorization: msRest.CompositeMapper = { - serializedName: "SenderAuthorization", - type: { - name: "Composite", - className: "SenderAuthorization", - modelProperties: { - action: { - serializedName: "action", - type: { - name: "String" - } - }, - role: { - serializedName: "role", - type: { - name: "String" - } - }, - scope: { - serializedName: "scope", - type: { - name: "String" - } - } - } - } -}; - -export const HttpRequestInfo: msRest.CompositeMapper = { - serializedName: "HttpRequestInfo", - type: { - name: "Composite", - className: "HttpRequestInfo", - modelProperties: { - clientRequestId: { - serializedName: "clientRequestId", - type: { - name: "String" - } - }, - clientIpAddress: { - serializedName: "clientIpAddress", - type: { - name: "String" - } - }, - method: { - serializedName: "method", - type: { - name: "String" - } - }, - uri: { - serializedName: "uri", - type: { - name: "String" - } - } - } - } -}; - -export const EventData: msRest.CompositeMapper = { - serializedName: "EventData", - type: { - name: "Composite", - className: "EventData", - modelProperties: { - authorization: { - readOnly: true, - serializedName: "authorization", - type: { - name: "Composite", - className: "SenderAuthorization" - } - }, - claims: { - readOnly: true, - serializedName: "claims", - type: { - name: "Dictionary", - value: { - type: { - name: "String" - } - } - } - }, - caller: { - readOnly: true, - serializedName: "caller", - type: { - name: "String" - } - }, - description: { - readOnly: true, - serializedName: "description", - type: { - name: "String" - } - }, - id: { - readOnly: true, - serializedName: "id", - type: { - name: "String" - } - }, - eventDataId: { - readOnly: true, - serializedName: "eventDataId", - type: { - name: "String" - } - }, - correlationId: { - readOnly: true, - serializedName: "correlationId", - type: { - name: "String" - } - }, - eventName: { - readOnly: true, - serializedName: "eventName", - type: { - name: "Composite", - className: "LocalizableString" - } - }, - category: { - readOnly: true, - serializedName: "category", - type: { - name: "Composite", - className: "LocalizableString" - } - }, - httpRequest: { - readOnly: true, - serializedName: "httpRequest", - type: { - name: "Composite", - className: "HttpRequestInfo" - } - }, - level: { - readOnly: true, - serializedName: "level", - type: { - name: "Enum", - allowedValues: [ - "Critical", - "Error", - "Warning", - "Informational", - "Verbose" - ] - } - }, - resourceGroupName: { - readOnly: true, - serializedName: "resourceGroupName", - type: { - name: "String" - } - }, - resourceProviderName: { - readOnly: true, - serializedName: "resourceProviderName", - type: { - name: "Composite", - className: "LocalizableString" - } - }, - resourceId: { - readOnly: true, - serializedName: "resourceId", - type: { - name: "String" - } - }, - resourceType: { - readOnly: true, - serializedName: "resourceType", - type: { - name: "Composite", - className: "LocalizableString" - } - }, - operationId: { - readOnly: true, - serializedName: "operationId", - type: { - name: "String" - } - }, - operationName: { - readOnly: true, - serializedName: "operationName", - type: { - name: "Composite", - className: "LocalizableString" - } - }, - properties: { - readOnly: true, - serializedName: "properties", - type: { - name: "Dictionary", - value: { - type: { - name: "String" - } - } - } - }, - status: { - readOnly: true, - serializedName: "status", - type: { - name: "Composite", - className: "LocalizableString" - } - }, - subStatus: { - readOnly: true, - serializedName: "subStatus", - type: { - name: "Composite", - className: "LocalizableString" - } - }, - eventTimestamp: { - readOnly: true, - serializedName: "eventTimestamp", - type: { - name: "DateTime" - } - }, - submissionTimestamp: { - readOnly: true, - serializedName: "submissionTimestamp", - type: { - name: "DateTime" - } - }, - subscriptionId: { - readOnly: true, - serializedName: "subscriptionId", - type: { - name: "String" - } - }, - tenantId: { - readOnly: true, - serializedName: "tenantId", - type: { - name: "String" - } - } - } - } -}; - -export const MetricAvailability: msRest.CompositeMapper = { - serializedName: "MetricAvailability", - type: { - name: "Composite", - className: "MetricAvailability", - modelProperties: { - timeGrain: { - serializedName: "timeGrain", - type: { - name: "TimeSpan" - } - }, - retention: { - serializedName: "retention", - type: { - name: "TimeSpan" - } - } - } - } -}; - -export const MetricDefinition: msRest.CompositeMapper = { - serializedName: "MetricDefinition", - type: { - name: "Composite", - className: "MetricDefinition", - modelProperties: { - isDimensionRequired: { - serializedName: "isDimensionRequired", - type: { - name: "Boolean" - } - }, - resourceId: { - serializedName: "resourceId", - type: { - name: "String" - } - }, - namespace: { - serializedName: "namespace", - type: { - name: "String" - } - }, - name: { - serializedName: "name", - type: { - name: "Composite", - className: "LocalizableString" - } - }, - unit: { - serializedName: "unit", - type: { - name: "Enum", - allowedValues: [ - "Count", - "Bytes", - "Seconds", - "CountPerSecond", - "BytesPerSecond", - "Percent", - "MilliSeconds", - "ByteSeconds", - "Unspecified", - "Cores", - "MilliCores", - "NanoCores", - "BitsPerSecond" - ] - } - }, - primaryAggregationType: { - serializedName: "primaryAggregationType", - type: { - name: "Enum", - allowedValues: [ - "None", - "Average", - "Count", - "Minimum", - "Maximum", - "Total" - ] - } - }, - supportedAggregationTypes: { - serializedName: "supportedAggregationTypes", - type: { - name: "Sequence", - element: { - type: { - name: "Enum", - allowedValues: [ - "None", - "Average", - "Count", - "Minimum", - "Maximum", - "Total" - ] - } - } - } - }, - metricAvailabilities: { - serializedName: "metricAvailabilities", - type: { - name: "Sequence", - element: { - type: { - name: "Composite", - className: "MetricAvailability" - } - } - } - }, - id: { - serializedName: "id", - type: { - name: "String" - } - }, - dimensions: { - serializedName: "dimensions", - type: { - name: "Sequence", - element: { - type: { - name: "Composite", - className: "LocalizableString" - } - } - } - } - } - } -}; - -export const MetricValue: msRest.CompositeMapper = { - serializedName: "MetricValue", - type: { - name: "Composite", - className: "MetricValue", - modelProperties: { - timeStamp: { - required: true, - serializedName: "timeStamp", - type: { - name: "DateTime" - } - }, - average: { - serializedName: "average", - type: { - name: "Number" - } - }, - minimum: { - serializedName: "minimum", - type: { - name: "Number" - } - }, - maximum: { - serializedName: "maximum", - type: { - name: "Number" - } - }, - total: { - serializedName: "total", - type: { - name: "Number" - } - }, - count: { - serializedName: "count", - type: { - name: "Number" - } - } - } - } -}; - -export const MetadataValue: msRest.CompositeMapper = { - serializedName: "MetadataValue", - type: { - name: "Composite", - className: "MetadataValue", - modelProperties: { - name: { - serializedName: "name", - type: { - name: "Composite", - className: "LocalizableString" - } - }, - value: { - serializedName: "value", - type: { - name: "String" - } - } - } - } -}; - -export const TimeSeriesElement: msRest.CompositeMapper = { - serializedName: "TimeSeriesElement", - type: { - name: "Composite", - className: "TimeSeriesElement", - modelProperties: { - metadatavalues: { - serializedName: "metadatavalues", - type: { - name: "Sequence", - element: { - type: { - name: "Composite", - className: "MetadataValue" - } - } - } - }, - data: { - serializedName: "data", - type: { - name: "Sequence", - element: { - type: { - name: "Composite", - className: "MetricValue" - } - } - } - } - } - } -}; - -export const Metric: msRest.CompositeMapper = { - serializedName: "Metric", - type: { - name: "Composite", - className: "Metric", - modelProperties: { - id: { - required: true, - serializedName: "id", - type: { - name: "String" - } - }, - type: { - required: true, - serializedName: "type", - type: { - name: "String" - } - }, - name: { - required: true, - serializedName: "name", - type: { - name: "Composite", - className: "LocalizableString" - } - }, - unit: { - required: true, - serializedName: "unit", - type: { - name: "Enum", - allowedValues: [ - "Count", - "Bytes", - "Seconds", - "CountPerSecond", - "BytesPerSecond", - "Percent", - "MilliSeconds", - "ByteSeconds", - "Unspecified", - "Cores", - "MilliCores", - "NanoCores", - "BitsPerSecond" - ] - } - }, - timeseries: { - required: true, - serializedName: "timeseries", - type: { - name: "Sequence", - element: { - type: { - name: "Composite", - className: "TimeSeriesElement" - } - } - } - } - } - } -}; - -export const Response: msRest.CompositeMapper = { - serializedName: "Response", - type: { - name: "Composite", - className: "Response", - modelProperties: { - cost: { - serializedName: "cost", - constraints: { - InclusiveMinimum: 0 - }, - type: { - name: "Number" - } - }, - timespan: { - required: true, - serializedName: "timespan", - type: { - name: "String" - } - }, - interval: { - serializedName: "interval", - type: { - name: "TimeSpan" - } - }, - namespace: { - serializedName: "namespace", - type: { - name: "String" - } - }, - resourceregion: { - serializedName: "resourceregion", - type: { - name: "String" - } - }, - value: { - required: true, - serializedName: "value", - type: { - name: "Sequence", - element: { - type: { - name: "Composite", - className: "Metric" - } - } - } - } - } - } -}; - -export const BaselineMetadataValue: msRest.CompositeMapper = { - serializedName: "BaselineMetadataValue", - type: { - name: "Composite", - className: "BaselineMetadataValue", - modelProperties: { - name: { - serializedName: "name", - type: { - name: "Composite", - className: "LocalizableString" - } - }, - value: { - serializedName: "value", - type: { - name: "String" - } - } - } - } -}; - -export const Baseline: msRest.CompositeMapper = { - serializedName: "Baseline", - type: { - name: "Composite", - className: "Baseline", - modelProperties: { - sensitivity: { - required: true, - serializedName: "sensitivity", - type: { - name: "Enum", - allowedValues: [ - "Low", - "Medium", - "High" - ] - } - }, - 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 BaselineResponse: msRest.CompositeMapper = { - serializedName: "BaselineResponse", - type: { - name: "Composite", - className: "BaselineResponse", - modelProperties: { - id: { - readOnly: true, - serializedName: "id", - type: { - name: "String" - } - }, - type: { - readOnly: true, - serializedName: "type", - type: { - name: "String" - } - }, - name: { - readOnly: true, - serializedName: "name", - type: { - name: "Composite", - className: "LocalizableString" - } - }, - timespan: { - serializedName: "properties.timespan", - type: { - name: "String" - } - }, - interval: { - serializedName: "properties.interval", - type: { - name: "TimeSpan" - } - }, - aggregation: { - serializedName: "properties.aggregation", - type: { - name: "String" - } - }, - timestamps: { - serializedName: "properties.timestamps", - type: { - name: "Sequence", - element: { - type: { - name: "DateTime" - } - } - } - }, - baseline: { - serializedName: "properties.baseline", - type: { - name: "Sequence", - element: { - type: { - name: "Composite", - className: "Baseline" - } - } - } - }, - metadata: { - serializedName: "properties.metadata", - type: { - name: "Sequence", - element: { - type: { - name: "Composite", - className: "BaselineMetadataValue" - } - } - } - } - } - } -}; - -export const TimeSeriesInformation: msRest.CompositeMapper = { - serializedName: "TimeSeriesInformation", - type: { - name: "Composite", - className: "TimeSeriesInformation", - modelProperties: { - sensitivities: { - required: true, - serializedName: "sensitivities", - type: { - name: "Sequence", - element: { - type: { - name: "String" - } - } - } - }, - values: { - required: true, - serializedName: "values", - type: { - name: "Sequence", - element: { - type: { - name: "Number" - } - } - } - }, - timestamps: { - serializedName: "timestamps", - type: { - name: "Sequence", - element: { - type: { - name: "DateTime" - } - } - } - } - } - } -}; - -export const CalculateBaselineResponse: msRest.CompositeMapper = { - serializedName: "CalculateBaselineResponse", - type: { - name: "Composite", - className: "CalculateBaselineResponse", - modelProperties: { - type: { - required: true, - serializedName: "type", - type: { - name: "String" - } - }, - timestamps: { - serializedName: "timestamps", - type: { - name: "Sequence", - element: { - type: { - name: "DateTime" - } - } - } - }, - baseline: { - required: true, - serializedName: "baseline", - type: { - name: "Sequence", - element: { - type: { - name: "Composite", - className: "Baseline" - } - } - } - } - } - } -}; - -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: { - name: "Composite", - className: "MetricAlertAction", - modelProperties: { - actionGroupId: { - serializedName: "actionGroupId", - type: { - name: "String" - } - }, - webhookProperties: { - serializedName: "webhookProperties", - type: { - name: "Dictionary", - value: { - type: { - name: "String" - } - } - } - } - } - } -}; - -export const MetricAlertCriteria: msRest.CompositeMapper = { - serializedName: "MetricAlertCriteria", - type: { - name: "Composite", - polymorphicDiscriminator: { - serializedName: "odata.type", - clientName: "odatatype" - }, - uberParent: "MetricAlertCriteria", - className: "MetricAlertCriteria", - modelProperties: { - odatatype: { - required: true, - serializedName: "odata\\.type", - type: { - name: "String" - } - } - }, - additionalProperties: { - type: { - name: "Object" - } - } - } -}; - -export const MetricAlertResource: msRest.CompositeMapper = { - serializedName: "MetricAlertResource", - type: { - name: "Composite", - className: "MetricAlertResource", - modelProperties: { - ...Resource.type.modelProperties, - description: { - required: true, - serializedName: "properties.description", - type: { - name: "String" - } - }, - severity: { - required: true, - serializedName: "properties.severity", - type: { - name: "Number" - } - }, - enabled: { - required: true, - serializedName: "properties.enabled", - type: { - name: "Boolean" - } - }, - scopes: { - serializedName: "properties.scopes", - type: { - name: "Sequence", - element: { - type: { - name: "String" - } - } - } - }, - evaluationFrequency: { - required: true, - serializedName: "properties.evaluationFrequency", - type: { - name: "TimeSpan" - } - }, - windowSize: { - required: true, - serializedName: "properties.windowSize", - type: { - name: "TimeSpan" - } - }, - targetResourceType: { - serializedName: "properties.targetResourceType", - type: { - name: "String" - } - }, - targetResourceRegion: { - serializedName: "properties.targetResourceRegion", - type: { - name: "String" - } - }, - criteria: { - required: true, - serializedName: "properties.criteria", - type: { - name: "Composite", - className: "MetricAlertCriteria", - additionalProperties: { - type: { - name: "Object" - } - } - } - }, - autoMitigate: { - serializedName: "properties.autoMitigate", - type: { - name: "Boolean" - } - }, - actions: { - serializedName: "properties.actions", - type: { - name: "Sequence", - element: { - type: { - name: "Composite", - className: "MetricAlertAction" - } - } - } - }, - lastUpdatedTime: { - readOnly: true, - serializedName: "properties.lastUpdatedTime", - type: { - name: "DateTime" - } - } - } - } -}; - -export const MetricAlertResourcePatch: msRest.CompositeMapper = { - serializedName: "MetricAlertResourcePatch", - type: { - name: "Composite", - className: "MetricAlertResourcePatch", - modelProperties: { - tags: { - serializedName: "tags", - type: { - name: "Dictionary", - value: { - type: { - name: "String" - } - } - } - }, - description: { - required: true, - serializedName: "properties.description", - type: { - name: "String" - } - }, - severity: { - required: true, - serializedName: "properties.severity", - type: { - name: "Number" - } - }, - enabled: { - required: true, - serializedName: "properties.enabled", - type: { - name: "Boolean" - } - }, - scopes: { - serializedName: "properties.scopes", - type: { - name: "Sequence", - element: { - type: { - name: "String" - } - } - } - }, - evaluationFrequency: { - required: true, - serializedName: "properties.evaluationFrequency", - type: { - name: "TimeSpan" - } - }, - windowSize: { - required: true, - serializedName: "properties.windowSize", - type: { - name: "TimeSpan" - } - }, - targetResourceType: { - serializedName: "properties.targetResourceType", - type: { - name: "String" - } - }, - targetResourceRegion: { - serializedName: "properties.targetResourceRegion", - type: { - name: "String" - } - }, - criteria: { - required: true, - serializedName: "properties.criteria", - type: { - name: "Composite", - className: "MetricAlertCriteria", - additionalProperties: { - type: { - name: "Object" - } - } - } - }, - autoMitigate: { - serializedName: "properties.autoMitigate", - type: { - name: "Boolean" - } - }, - actions: { - serializedName: "properties.actions", - type: { - name: "Sequence", - element: { - type: { - name: "Composite", - className: "MetricAlertAction" - } - } - } - }, - lastUpdatedTime: { - readOnly: true, - serializedName: "properties.lastUpdatedTime", - type: { - name: "DateTime" - } - } - } - } -}; - -export const MetricAlertStatusProperties: msRest.CompositeMapper = { - serializedName: "MetricAlertStatusProperties", - type: { - name: "Composite", - className: "MetricAlertStatusProperties", - modelProperties: { - dimensions: { - serializedName: "dimensions", - type: { - name: "Dictionary", - value: { - type: { - name: "String" - } - } - } - }, - status: { - serializedName: "status", - type: { - name: "String" - } - }, - timestamp: { - serializedName: "timestamp", - type: { - name: "DateTime" - } - } - } - } -}; - -export const MetricAlertStatus: msRest.CompositeMapper = { - serializedName: "MetricAlertStatus", - type: { - name: "Composite", - className: "MetricAlertStatus", - modelProperties: { - name: { - serializedName: "name", - type: { - name: "String" - } - }, - id: { - serializedName: "id", - type: { - name: "String" - } - }, - type: { - serializedName: "type", - type: { - name: "String" - } - }, - properties: { - serializedName: "properties", - type: { - name: "Composite", - className: "MetricAlertStatusProperties" - } - } - } - } -}; - -export const MetricAlertStatusCollection: msRest.CompositeMapper = { - serializedName: "MetricAlertStatusCollection", - type: { - name: "Composite", - className: "MetricAlertStatusCollection", - modelProperties: { - value: { - serializedName: "value", - type: { - name: "Sequence", - element: { - type: { - name: "Composite", - className: "MetricAlertStatus" - } - } - } - } - } - } -}; - -export const MultiMetricCriteria: msRest.CompositeMapper = { - serializedName: "MultiMetricCriteria", - type: { - name: "Composite", - polymorphicDiscriminator: { - serializedName: "criterionType", - clientName: "criterionType" - }, - uberParent: "MultiMetricCriteria", - className: "MultiMetricCriteria", - modelProperties: { - name: { - required: true, - serializedName: "name", - type: { - name: "String" - } - }, - metricName: { - required: true, - serializedName: "metricName", - type: { - name: "String" - } - }, - metricNamespace: { - serializedName: "metricNamespace", - type: { - name: "String" - } - }, - timeAggregation: { - required: true, - serializedName: "timeAggregation", - type: { - name: "Object" - } - }, - dimensions: { - serializedName: "dimensions", - type: { - name: "Sequence", - element: { - type: { - name: "Composite", - className: "MetricDimension" - } - } - } - }, - criterionType: { - required: true, - serializedName: "criterionType", - type: { - name: "String" - } - } - }, - additionalProperties: { - type: { - name: "Object" - } - } - } -}; - -export const MetricCriteria: msRest.CompositeMapper = { - serializedName: "StaticThresholdCriterion", - type: { - name: "Composite", - polymorphicDiscriminator: MultiMetricCriteria.type.polymorphicDiscriminator, - uberParent: "MultiMetricCriteria", - className: "MetricCriteria", - modelProperties: { - ...MultiMetricCriteria.type.modelProperties, - operator: { - required: true, - serializedName: "operator", - type: { - name: "Object" - } - }, - threshold: { - required: true, - serializedName: "threshold", - type: { - name: "Number" - } - } - }, - additionalProperties: MultiMetricCriteria.type.additionalProperties - } -}; - -export const MetricAlertSingleResourceMultipleMetricCriteria: msRest.CompositeMapper = { - serializedName: "Microsoft.Azure.Monitor.SingleResourceMultipleMetricCriteria", - type: { - name: "Composite", - polymorphicDiscriminator: MetricAlertCriteria.type.polymorphicDiscriminator, - uberParent: "MetricAlertCriteria", - className: "MetricAlertSingleResourceMultipleMetricCriteria", - modelProperties: { - ...MetricAlertCriteria.type.modelProperties, - allOf: { - serializedName: "allOf", - type: { - name: "Sequence", - element: { - type: { - name: "Composite", - className: "MetricCriteria", - additionalProperties: MultiMetricCriteria.type.additionalProperties - } - } - } - } - }, - additionalProperties: MetricAlertCriteria.type.additionalProperties - } -}; - -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: { - name: "Composite", - polymorphicDiscriminator: MetricAlertCriteria.type.polymorphicDiscriminator, - uberParent: "MetricAlertCriteria", - className: "MetricAlertMultipleResourceMultipleMetricCriteria", - modelProperties: { - ...MetricAlertCriteria.type.modelProperties, - allOf: { - serializedName: "allOf", - type: { - name: "Sequence", - element: { - type: { - name: "Composite", - className: "MultiMetricCriteria", - additionalProperties: { - type: { - name: "Object" - } - } - } - } - } - } - }, - additionalProperties: MetricAlertCriteria.type.additionalProperties - } -}; - -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: { - name: "Composite", - className: "Source", - modelProperties: { - query: { - serializedName: "query", - type: { - name: "String" - } - }, - authorizedResources: { - serializedName: "authorizedResources", - type: { - name: "Sequence", - element: { - type: { - name: "String" - } - } - } - }, - dataSourceId: { - required: true, - serializedName: "dataSourceId", - type: { - name: "String" - } - }, - queryType: { - serializedName: "queryType", - type: { - name: "String" - } - } - } - } -}; - -export const Schedule: msRest.CompositeMapper = { - serializedName: "Schedule", - type: { - name: "Composite", - className: "Schedule", - modelProperties: { - frequencyInMinutes: { - required: true, - serializedName: "frequencyInMinutes", - type: { - name: "Number" - } - }, - timeWindowInMinutes: { - required: true, - serializedName: "timeWindowInMinutes", - type: { - name: "Number" - } - } - } - } -}; - -export const Action: msRest.CompositeMapper = { - serializedName: "Action", - type: { - name: "Composite", - polymorphicDiscriminator: { - serializedName: "odata.type", - clientName: "odatatype" - }, - uberParent: "Action", - className: "Action", - modelProperties: { - odatatype: { - required: true, - serializedName: "odata\\.type", - type: { - name: "String" - } - } - } - } -}; - -export const LogSearchRuleResource: msRest.CompositeMapper = { - serializedName: "LogSearchRuleResource", - type: { - name: "Composite", - className: "LogSearchRuleResource", - modelProperties: { - ...Resource.type.modelProperties, - description: { - serializedName: "properties.description", - type: { - name: "String" - } - }, - enabled: { - serializedName: "properties.enabled", - type: { - name: "String" - } - }, - lastUpdatedTime: { - readOnly: true, - serializedName: "properties.lastUpdatedTime", - type: { - name: "DateTime" - } - }, - provisioningState: { - readOnly: true, - serializedName: "properties.provisioningState", - type: { - name: "String" - } - }, - source: { - required: true, - serializedName: "properties.source", - type: { - name: "Composite", - className: "Source" - } - }, - schedule: { - serializedName: "properties.schedule", - type: { - name: "Composite", - className: "Schedule" - } - }, - action: { - required: true, - serializedName: "properties.action", - type: { - name: "Composite", - className: "Action" - } - } - } - } -}; - -export const LogSearchRuleResourcePatch: msRest.CompositeMapper = { - serializedName: "LogSearchRuleResourcePatch", - type: { - name: "Composite", - className: "LogSearchRuleResourcePatch", - modelProperties: { - tags: { - serializedName: "tags", - type: { - name: "Dictionary", - value: { - type: { - name: "String" - } - } - } - }, - enabled: { - serializedName: "properties.enabled", - type: { - name: "String" - } - } - } - } -}; - -export const LogMetricTrigger: msRest.CompositeMapper = { - serializedName: "LogMetricTrigger", - type: { - name: "Composite", - className: "LogMetricTrigger", - modelProperties: { - thresholdOperator: { - serializedName: "thresholdOperator", - type: { - name: "String" - } - }, - threshold: { - serializedName: "threshold", - type: { - name: "Number" - } - }, - metricTriggerType: { - serializedName: "metricTriggerType", - type: { - name: "String" - } - }, - metricColumn: { - serializedName: "metricColumn", - type: { - name: "String" - } - } - } - } -}; - -export const TriggerCondition: msRest.CompositeMapper = { - serializedName: "TriggerCondition", - type: { - name: "Composite", - className: "TriggerCondition", - modelProperties: { - thresholdOperator: { - required: true, - serializedName: "thresholdOperator", - type: { - name: "String" - } - }, - threshold: { - required: true, - serializedName: "threshold", - type: { - name: "Number" - } - }, - metricTrigger: { - serializedName: "metricTrigger", - type: { - name: "Composite", - className: "LogMetricTrigger" - } - } - } - } -}; - -export const AzNsActionGroup: msRest.CompositeMapper = { - serializedName: "AzNsActionGroup", - type: { - name: "Composite", - className: "AzNsActionGroup", - modelProperties: { - actionGroup: { - serializedName: "actionGroup", - type: { - name: "Sequence", - element: { - type: { - name: "String" - } - } - } - }, - emailSubject: { - serializedName: "emailSubject", - type: { - name: "String" - } - }, - customWebhookPayload: { - serializedName: "customWebhookPayload", - type: { - name: "String" - } - } - } - } -}; - -export const AlertingAction: msRest.CompositeMapper = { - serializedName: "Microsoft.WindowsAzure.Management.Monitoring.Alerts.Models.Microsoft.AppInsights.Nexus.DataContracts.Resources.ScheduledQueryRules.AlertingAction", - type: { - name: "Composite", - polymorphicDiscriminator: Action.type.polymorphicDiscriminator, - uberParent: "Action", - className: "AlertingAction", - modelProperties: { - ...Action.type.modelProperties, - severity: { - required: true, - serializedName: "severity", - type: { - name: "String" - } - }, - aznsAction: { - serializedName: "aznsAction", - type: { - name: "Composite", - className: "AzNsActionGroup" - } - }, - throttlingInMin: { - serializedName: "throttlingInMin", - type: { - name: "Number" - } - }, - trigger: { - required: true, - serializedName: "trigger", - type: { - name: "Composite", - className: "TriggerCondition" - } - } - } - } -}; - -export const Dimension: msRest.CompositeMapper = { - serializedName: "Dimension", - type: { - name: "Composite", - className: "Dimension", - modelProperties: { - name: { - required: true, - serializedName: "name", - type: { - name: "String" - } - }, - operator: { - required: true, - isConstant: true, - serializedName: "operator", - defaultValue: 'Include', - type: { - name: "String" - } - }, - values: { - required: true, - serializedName: "values", - type: { - name: "Sequence", - element: { - type: { - name: "String" - } - } - } - } - } - } -}; - -export const Criteria: msRest.CompositeMapper = { - serializedName: "Criteria", - type: { - name: "Composite", - className: "Criteria", - modelProperties: { - metricName: { - required: true, - serializedName: "metricName", - type: { - name: "String" - } - }, - dimensions: { - serializedName: "dimensions", - type: { - name: "Sequence", - element: { - type: { - name: "Composite", - className: "Dimension" - } - } - } - } - } - } -}; - -export const LogToMetricAction: msRest.CompositeMapper = { - serializedName: "Microsoft.WindowsAzure.Management.Monitoring.Alerts.Models.Microsoft.AppInsights.Nexus.DataContracts.Resources.ScheduledQueryRules.LogToMetricAction", - type: { - name: "Composite", - polymorphicDiscriminator: Action.type.polymorphicDiscriminator, - uberParent: "Action", - className: "LogToMetricAction", - modelProperties: { - ...Action.type.modelProperties, - criteria: { - required: true, - serializedName: "criteria", - type: { - name: "Sequence", - element: { - type: { - name: "Composite", - className: "Criteria" - } - } - } - } - } - } -}; - -export const MetricNamespaceName: msRest.CompositeMapper = { - serializedName: "MetricNamespaceName", - type: { - name: "Composite", - className: "MetricNamespaceName", - modelProperties: { - metricNamespaceName: { - serializedName: "metricNamespaceName", - type: { - name: "String" - } - } - } - } -}; - -export const MetricNamespace: msRest.CompositeMapper = { - serializedName: "MetricNamespace", - type: { - name: "Composite", - className: "MetricNamespace", - modelProperties: { - id: { - serializedName: "id", - type: { - name: "String" - } - }, - type: { - serializedName: "type", - type: { - name: "String" - } - }, - name: { - serializedName: "name", - type: { - name: "String" - } - }, - properties: { - serializedName: "properties", - type: { - name: "Composite", - className: "MetricNamespaceName" - } - } - } - } -}; - -export const ProxyResource: msRest.CompositeMapper = { - serializedName: "ProxyResource", - type: { - name: "Composite", - className: "ProxyResource", - modelProperties: { - id: { - readOnly: true, - serializedName: "id", - type: { - name: "String" - } - }, - name: { - readOnly: true, - serializedName: "name", - type: { - name: "String" - } - }, - type: { - readOnly: true, - serializedName: "type", - type: { - name: "String" - } - } - } - } -}; - -export const ErrorModel: msRest.CompositeMapper = { - serializedName: "Error", - type: { - name: "Composite", - className: "ErrorModel", - modelProperties: { - code: { - required: true, - serializedName: "code", - type: { - name: "String" - } - }, - message: { - serializedName: "message", - type: { - name: "String" - } - } - } - } -}; - -export const ResponseWithError: msRest.CompositeMapper = { - serializedName: "ResponseWithError", - type: { - name: "Composite", - className: "ResponseWithError", - modelProperties: { - error: { - required: true, - serializedName: "error", - type: { - name: "Composite", - className: "ErrorModel" - } - } - } - } -}; - -export const WorkspaceInfo: msRest.CompositeMapper = { - serializedName: "WorkspaceInfo", - type: { - name: "Composite", - className: "WorkspaceInfo", - modelProperties: { - id: { - required: true, - serializedName: "id", - type: { - name: "String" - } - }, - location: { - required: true, serializedName: "location", + defaultValue: 'global', type: { name: "String" } }, - customerId: { - required: true, - serializedName: "properties.customerId", - type: { - name: "String" - } - } - } - } -}; - -export const DataContainer: msRest.CompositeMapper = { - serializedName: "DataContainer", - type: { - name: "Composite", - className: "DataContainer", - modelProperties: { - workspace: { - required: true, - serializedName: "workspace", + tags: { + serializedName: "tags", type: { - name: "Composite", - className: "WorkspaceInfo" + name: "Dictionary", + value: { + type: { + name: "String" + } + } } } } } }; -export const VMInsightsOnboardingStatus: msRest.CompositeMapper = { - serializedName: "VMInsightsOnboardingStatus", +export const AlertRuleLeafCondition: msRest.CompositeMapper = { + serializedName: "AlertRuleLeafCondition", type: { name: "Composite", - className: "VMInsightsOnboardingStatus", + className: "AlertRuleLeafCondition", modelProperties: { - ...ProxyResource.type.modelProperties, - resourceId: { - required: true, - serializedName: "properties.resourceId", - type: { - name: "String" - } - }, - onboardingStatus: { - required: true, - serializedName: "properties.onboardingStatus", + field: { + serializedName: "field", type: { name: "String" } }, - dataStatus: { - required: true, - serializedName: "properties.dataStatus", + equals: { + serializedName: "equals", type: { name: "String" } }, - data: { - serializedName: "properties.data", + containsAny: { + serializedName: "containsAny", type: { name: "Sequence", element: { type: { - name: "Composite", - className: "DataContainer" + name: "String" } } } @@ -4822,49 +94,44 @@ export const VMInsightsOnboardingStatus: msRest.CompositeMapper = { } }; -export const AutoscaleSettingResourceCollection: msRest.CompositeMapper = { - serializedName: "AutoscaleSettingResourceCollection", +export const AlertRuleAnyOfOrLeafCondition: msRest.CompositeMapper = { + serializedName: "AlertRuleAnyOfOrLeafCondition", type: { name: "Composite", - className: "AutoscaleSettingResourceCollection", + className: "AlertRuleAnyOfOrLeafCondition", modelProperties: { - value: { - required: true, - serializedName: "", + ...AlertRuleLeafCondition.type.modelProperties, + anyOf: { + serializedName: "anyOf", type: { name: "Sequence", element: { type: { name: "Composite", - className: "AutoscaleSettingResource" + className: "AlertRuleLeafCondition" } } } - }, - nextLink: { - serializedName: "nextLink", - type: { - name: "String" - } } } } }; -export const IncidentListResult: msRest.CompositeMapper = { - serializedName: "IncidentListResult", +export const AlertRuleAllOfCondition: msRest.CompositeMapper = { + serializedName: "AlertRuleAllOfCondition", type: { name: "Composite", - className: "IncidentListResult", + className: "AlertRuleAllOfCondition", modelProperties: { - value: { - serializedName: "", + allOf: { + required: true, + serializedName: "allOf", type: { name: "Sequence", element: { type: { name: "Composite", - className: "Incident" + className: "AlertRuleAnyOfOrLeafCondition" } } } @@ -4873,43 +140,26 @@ export const IncidentListResult: msRest.CompositeMapper = { } }; -export const AlertRuleResourceCollection: msRest.CompositeMapper = { - serializedName: "AlertRuleResourceCollection", +export const ActionGroup: msRest.CompositeMapper = { + serializedName: "ActionGroup", type: { name: "Composite", - className: "AlertRuleResourceCollection", + className: "ActionGroup", modelProperties: { - value: { - serializedName: "", + actionGroupId: { + required: true, + serializedName: "actionGroupId", type: { - name: "Sequence", - element: { - type: { - name: "Composite", - className: "AlertRuleResource" - } - } + name: "String" } - } - } - } -}; - -export const LogProfileCollection: msRest.CompositeMapper = { - serializedName: "LogProfileCollection", - type: { - name: "Composite", - className: "LogProfileCollection", - modelProperties: { - value: { - required: true, - serializedName: "", + }, + webhookProperties: { + serializedName: "webhookProperties", type: { - name: "Sequence", - element: { + name: "Dictionary", + value: { type: { - name: "Composite", - className: "LogProfileResource" + name: "String" } } } @@ -4918,20 +168,20 @@ export const LogProfileCollection: msRest.CompositeMapper = { } }; -export const ActionGroupList: msRest.CompositeMapper = { - serializedName: "ActionGroupList", +export const ActionList: msRest.CompositeMapper = { + serializedName: "ActionList", type: { name: "Composite", - className: "ActionGroupList", + className: "ActionList", modelProperties: { - value: { - serializedName: "", + actionGroups: { + serializedName: "actionGroups", type: { name: "Sequence", element: { type: { name: "Composite", - className: "ActionGroupResource" + className: "ActionGroup" } } } @@ -4940,49 +190,50 @@ export const ActionGroupList: msRest.CompositeMapper = { } }; -export const ActivityLogAlertList: msRest.CompositeMapper = { - serializedName: "ActivityLogAlertList", +export const ActivityLogAlertResource: msRest.CompositeMapper = { + serializedName: "ActivityLogAlertResource", type: { name: "Composite", - className: "ActivityLogAlertList", + className: "ActivityLogAlertResource", modelProperties: { - value: { - serializedName: "", + ...AzureResource.type.modelProperties, + scopes: { + required: true, + serializedName: "properties.scopes", type: { name: "Sequence", element: { type: { - name: "Composite", - className: "ActivityLogAlertResource" + name: "String" } } } - } - } - } -}; - -export const EventDataCollection: msRest.CompositeMapper = { - serializedName: "EventDataCollection", - type: { - name: "Composite", - className: "EventDataCollection", - modelProperties: { - value: { + }, + condition: { required: true, - serializedName: "", + serializedName: "properties.condition", type: { - name: "Sequence", - element: { - type: { - name: "Composite", - className: "EventData" - } - } + name: "Composite", + className: "AlertRuleAllOfCondition" } }, - nextLink: { - serializedName: "nextLink", + actions: { + required: true, + serializedName: "properties.actions", + type: { + name: "Composite", + className: "ActionList" + } + }, + enabled: { + serializedName: "properties.enabled", + defaultValue: true, + type: { + name: "Boolean" + } + }, + description: { + serializedName: "properties.description", type: { name: "String" } @@ -4991,101 +242,63 @@ export const EventDataCollection: msRest.CompositeMapper = { } }; -export const EventCategoryCollection: msRest.CompositeMapper = { - serializedName: "EventCategoryCollection", +export const AlertRulePatchObject: msRest.CompositeMapper = { + serializedName: "AlertRulePatchObject", type: { name: "Composite", - className: "EventCategoryCollection", + className: "AlertRulePatchObject", modelProperties: { - value: { - required: true, - serializedName: "", + tags: { + serializedName: "tags", type: { - name: "Sequence", - element: { + name: "Dictionary", + value: { type: { - name: "Composite", - className: "LocalizableString" + name: "String" } } } - } - } - } -}; - -export const MetricDefinitionCollection: msRest.CompositeMapper = { - serializedName: "MetricDefinitionCollection", - type: { - name: "Composite", - className: "MetricDefinitionCollection", - modelProperties: { - value: { - required: true, - serializedName: "", + }, + enabled: { + serializedName: "properties.enabled", + defaultValue: true, type: { - name: "Sequence", - element: { - type: { - name: "Composite", - className: "MetricDefinition" - } - } + name: "Boolean" } } } } }; -export const MetricBaselinesResponse: msRest.CompositeMapper = { - serializedName: "MetricBaselinesResponse", +export const ErrorResponse: msRest.CompositeMapper = { + serializedName: "ErrorResponse", type: { name: "Composite", - className: "MetricBaselinesResponse", + className: "ErrorResponse", modelProperties: { - value: { - serializedName: "", + code: { + readOnly: true, + serializedName: "code", type: { - name: "Sequence", - element: { - type: { - name: "Composite", - className: "SingleMetricBaseline" - } - } + name: "String" } - } - } - } -}; - -export const MetricAlertResourceCollection: msRest.CompositeMapper = { - serializedName: "MetricAlertResourceCollection", - type: { - name: "Composite", - className: "MetricAlertResourceCollection", - modelProperties: { - value: { - serializedName: "", + }, + message: { + readOnly: true, + serializedName: "message", type: { - name: "Sequence", - element: { - type: { - name: "Composite", - className: "MetricAlertResource" - } - } + name: "String" } } } } }; -export const LogSearchRuleResourceCollection: msRest.CompositeMapper = { - serializedName: "LogSearchRuleResourceCollection", +export const AlertRuleList: msRest.CompositeMapper = { + serializedName: "AlertRuleList", type: { name: "Composite", - className: "LogSearchRuleResourceCollection", + className: "AlertRuleList", modelProperties: { value: { serializedName: "", @@ -5094,57 +307,17 @@ export const LogSearchRuleResourceCollection: msRest.CompositeMapper = { element: { type: { name: "Composite", - className: "LogSearchRuleResource" + className: "ActivityLogAlertResource" } } } - } - } - } -}; - -export const MetricNamespaceCollection: msRest.CompositeMapper = { - serializedName: "MetricNamespaceCollection", - type: { - name: "Composite", - className: "MetricNamespaceCollection", - modelProperties: { - value: { - required: true, - serializedName: "", + }, + nextLink: { + serializedName: "nextLink", type: { - name: "Sequence", - element: { - type: { - name: "Composite", - className: "MetricNamespace" - } - } + name: "String" } } } } }; - -export const discriminators = { - 'RuleDataSource' : RuleDataSource, - 'RuleCondition' : RuleCondition, - 'RuleDataSource.Microsoft.Azure.Management.Insights.Models.RuleMetricDataSource' : RuleMetricDataSource, - 'RuleDataSource.Microsoft.Azure.Management.Insights.Models.RuleManagementEventDataSource' : RuleManagementEventDataSource, - 'RuleCondition.Microsoft.Azure.Management.Insights.Models.ThresholdRuleCondition' : ThresholdRuleCondition, - 'RuleCondition.Microsoft.Azure.Management.Insights.Models.LocationThresholdRuleCondition' : LocationThresholdRuleCondition, - 'RuleCondition.Microsoft.Azure.Management.Insights.Models.ManagementEventRuleCondition' : ManagementEventRuleCondition, - 'RuleAction' : RuleAction, - 'RuleAction.Microsoft.Azure.Management.Insights.Models.RuleEmailAction' : RuleEmailAction, - 'RuleAction.Microsoft.Azure.Management.Insights.Models.RuleWebhookAction' : RuleWebhookAction, - 'MetricAlertCriteria' : MetricAlertCriteria, - 'MultiMetricCriteria.StaticThresholdCriterion' : MetricCriteria, - '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 deleted file mode 100644 index a6d76f72efbc..000000000000 --- a/sdk/monitor/arm-monitor/src/models/metricAlertsMappers.ts +++ /dev/null @@ -1,90 +0,0 @@ -/* - * 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, - Action, - ActionGroupResource, - ActivityLogAlertActionGroup, - ActivityLogAlertActionList, - ActivityLogAlertAllOfCondition, - ActivityLogAlertLeafCondition, - ActivityLogAlertResource, - AlertingAction, - AlertRuleResource, - ArmRoleReceiver, - AutomationRunbookReceiver, - AutoscaleNotification, - AutoscaleProfile, - AutoscaleSettingResource, - AzNsActionGroup, - AzureAppPushReceiver, - AzureFunctionReceiver, - BaseResource, - CloudError, - Criteria, - DataContainer, - DiagnosticSettingsCategoryResource, - DiagnosticSettingsResource, - Dimension, - DynamicMetricCriteria, - DynamicThresholdFailingPeriods, - EmailNotification, - EmailReceiver, - ErrorResponse, - ItsmReceiver, - LocationThresholdRuleCondition, - LogicAppReceiver, - LogMetricTrigger, - LogProfileResource, - LogSearchRuleResource, - LogSettings, - LogToMetricAction, - ManagementEventAggregationCondition, - ManagementEventRuleCondition, - MetricAlertAction, - MetricAlertCriteria, - MetricAlertMultipleResourceMultipleMetricCriteria, - MetricAlertResource, - MetricAlertResourceCollection, - MetricAlertResourcePatch, - MetricAlertSingleResourceMultipleMetricCriteria, - MetricCriteria, - MetricDimension, - MetricSettings, - MetricTrigger, - MultiMetricCriteria, - ProxyOnlyResource, - ProxyResource, - Recurrence, - RecurrentSchedule, - Resource, - RetentionPolicy, - RuleAction, - RuleCondition, - RuleDataSource, - RuleEmailAction, - RuleManagementEventClaimsDataSource, - RuleManagementEventDataSource, - RuleMetricDataSource, - RuleWebhookAction, - ScaleAction, - ScaleCapacity, - ScaleRule, - Schedule, - SmsReceiver, - Source, - ThresholdRuleCondition, - TimeWindow, - TriggerCondition, - VMInsightsOnboardingStatus, - VoiceReceiver, - WebhookNotification, - WebhookReceiver, - WorkspaceInfo -} from "../models/mappers"; diff --git a/sdk/monitor/arm-monitor/src/models/metricAlertsStatusMappers.ts b/sdk/monitor/arm-monitor/src/models/metricAlertsStatusMappers.ts deleted file mode 100644 index a044e8994582..000000000000 --- a/sdk/monitor/arm-monitor/src/models/metricAlertsStatusMappers.ts +++ /dev/null @@ -1,15 +0,0 @@ -/* - * 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, - ErrorResponse, - MetricAlertStatus, - MetricAlertStatusCollection, - MetricAlertStatusProperties -} from "../models/mappers"; diff --git a/sdk/monitor/arm-monitor/src/models/metricBaselineMappers.ts b/sdk/monitor/arm-monitor/src/models/metricBaselineMappers.ts deleted file mode 100644 index 7fbb371a4578..000000000000 --- a/sdk/monitor/arm-monitor/src/models/metricBaselineMappers.ts +++ /dev/null @@ -1,18 +0,0 @@ -/* - * 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, - Baseline, - BaselineMetadataValue, - BaselineResponse, - CalculateBaselineResponse, - ErrorResponse, - LocalizableString, - TimeSeriesInformation -} from "../models/mappers"; diff --git a/sdk/monitor/arm-monitor/src/models/metricDefinitionsMappers.ts b/sdk/monitor/arm-monitor/src/models/metricDefinitionsMappers.ts deleted file mode 100644 index 31046db255a5..000000000000 --- a/sdk/monitor/arm-monitor/src/models/metricDefinitionsMappers.ts +++ /dev/null @@ -1,16 +0,0 @@ -/* - * 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, - ErrorResponse, - LocalizableString, - MetricAvailability, - MetricDefinition, - MetricDefinitionCollection -} from "../models/mappers"; diff --git a/sdk/monitor/arm-monitor/src/models/metricNamespacesMappers.ts b/sdk/monitor/arm-monitor/src/models/metricNamespacesMappers.ts deleted file mode 100644 index 2e78b28244cd..000000000000 --- a/sdk/monitor/arm-monitor/src/models/metricNamespacesMappers.ts +++ /dev/null @@ -1,15 +0,0 @@ -/* - * 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, - ErrorResponse, - MetricNamespace, - MetricNamespaceCollection, - MetricNamespaceName -} from "../models/mappers"; diff --git a/sdk/monitor/arm-monitor/src/models/metricsMappers.ts b/sdk/monitor/arm-monitor/src/models/metricsMappers.ts deleted file mode 100644 index 0796246e9fe7..000000000000 --- a/sdk/monitor/arm-monitor/src/models/metricsMappers.ts +++ /dev/null @@ -1,18 +0,0 @@ -/* - * 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, - ErrorResponse, - LocalizableString, - MetadataValue, - Metric, - MetricValue, - Response, - TimeSeriesElement -} from "../models/mappers"; diff --git a/sdk/monitor/arm-monitor/src/models/operationsMappers.ts b/sdk/monitor/arm-monitor/src/models/operationsMappers.ts deleted file mode 100644 index 65fc7dd1800a..000000000000 --- a/sdk/monitor/arm-monitor/src/models/operationsMappers.ts +++ /dev/null @@ -1,15 +0,0 @@ -/* - * 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, - CloudError, - Operation, - OperationDisplay, - OperationListResult -} from "../models/mappers"; diff --git a/sdk/monitor/arm-monitor/src/models/parameters.ts b/sdk/monitor/arm-monitor/src/models/parameters.ts index eac83a80fc9e..cf2b1d04887e 100644 --- a/sdk/monitor/arm-monitor/src/models/parameters.ts +++ b/sdk/monitor/arm-monitor/src/models/parameters.ts @@ -1,7 +1,6 @@ /* - * Copyright (c) Microsoft Corporation. All rights reserved. - * Licensed under the MIT License. See License.txt in the project root for - * license information. + * Copyright (c) Microsoft Corporation. + * Licensed under the MIT License. * * Code generated by Microsoft (R) AutoRest Code Generator. * Changes may cause incorrect behavior and will be lost if the code is @@ -20,16 +19,6 @@ export const acceptLanguage: msRest.OperationParameter = { } } }; -export const actionGroupName: msRest.OperationURLParameter = { - parameterPath: "actionGroupName", - mapper: { - required: true, - serializedName: "actionGroupName", - type: { - name: "String" - } - } -}; export const activityLogAlertName: msRest.OperationURLParameter = { parameterPath: "activityLogAlertName", mapper: { @@ -40,265 +29,14 @@ export const activityLogAlertName: msRest.OperationURLParameter = { } } }; -export const aggregation: msRest.OperationQueryParameter = { - parameterPath: [ - "options", - "aggregation" - ], - mapper: { - serializedName: "aggregation", - type: { - name: "String" - } - } -}; -export const apiVersion0: msRest.OperationQueryParameter = { - parameterPath: "apiVersion", - mapper: { - required: true, - isConstant: true, - serializedName: "api-version", - defaultValue: '2015-04-01', - type: { - name: "String" - } - } -}; -export const apiVersion1: msRest.OperationQueryParameter = { - parameterPath: "apiVersion", - mapper: { - required: true, - isConstant: true, - serializedName: "api-version", - defaultValue: '2016-03-01', - type: { - name: "String" - } - } -}; -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, - isConstant: true, - serializedName: "api-version", - defaultValue: '2018-11-27-preview', - type: { - name: "String" - } - } -}; -export const apiVersion2: msRest.OperationQueryParameter = { - parameterPath: "apiVersion", - mapper: { - required: true, - isConstant: true, - serializedName: "api-version", - defaultValue: '2017-05-01-preview', - type: { - name: "String" - } - } -}; -export const apiVersion3: msRest.OperationQueryParameter = { - parameterPath: "apiVersion", - mapper: { - required: true, - isConstant: true, - serializedName: "api-version", - defaultValue: '2019-06-01', - type: { - name: "String" - } - } -}; -export const apiVersion4: msRest.OperationQueryParameter = { - parameterPath: "apiVersion", - mapper: { - required: true, - isConstant: true, - serializedName: "api-version", - defaultValue: '2017-04-01', - type: { - name: "String" - } - } -}; -export const apiVersion5: msRest.OperationQueryParameter = { - parameterPath: "apiVersion", - mapper: { - required: true, - isConstant: true, - serializedName: "api-version", - defaultValue: '2018-01-01', - type: { - name: "String" - } - } -}; -export const apiVersion6: msRest.OperationQueryParameter = { - parameterPath: "apiVersion", - mapper: { - required: true, - isConstant: true, - serializedName: "api-version", - defaultValue: '2017-11-01-preview', - type: { - name: "String" - } - } -}; -export const apiVersion7: msRest.OperationQueryParameter = { - parameterPath: "apiVersion", - mapper: { - required: true, - isConstant: true, - serializedName: "api-version", - defaultValue: '2019-03-01', - type: { - name: "String" - } - } -}; -export const apiVersion8: msRest.OperationQueryParameter = { - parameterPath: "apiVersion", - mapper: { - required: true, - isConstant: true, - serializedName: "api-version", - defaultValue: '2018-03-01', - type: { - name: "String" - } - } -}; -export const apiVersion9: msRest.OperationQueryParameter = { +export const apiVersion: msRest.OperationQueryParameter = { parameterPath: "apiVersion", mapper: { required: true, - isConstant: true, serializedName: "api-version", - defaultValue: '2018-04-16', - type: { - name: "String" - } - } -}; -export const autoscaleSettingName: msRest.OperationURLParameter = { - parameterPath: "autoscaleSettingName", - mapper: { - required: true, - serializedName: "autoscaleSettingName", - type: { - name: "String" - } - } -}; -export const filter0: msRest.OperationQueryParameter = { - parameterPath: "filter", - mapper: { - required: true, - serializedName: "$filter", - type: { - name: "String" - } - } -}; -export const filter1: msRest.OperationQueryParameter = { - parameterPath: [ - "options", - "filter" - ], - mapper: { - serializedName: "$filter", - type: { - name: "String" - } - } -}; -export const incidentName: msRest.OperationURLParameter = { - parameterPath: "incidentName", - mapper: { - required: true, - serializedName: "incidentName", - type: { - name: "String" - } - } -}; -export const interval: msRest.OperationQueryParameter = { - parameterPath: [ - "options", - "interval" - ], - mapper: { - serializedName: "interval", - type: { - name: "TimeSpan" - } - } -}; -export const logProfileName: msRest.OperationURLParameter = { - parameterPath: "logProfileName", - mapper: { - required: true, - serializedName: "logProfileName", - type: { - name: "String" - } - } -}; -export const metricName: msRest.OperationURLParameter = { - parameterPath: "metricName", - mapper: { - required: true, - serializedName: "metricName", - type: { - name: "String" - } - } -}; -export const metricnames: msRest.OperationQueryParameter = { - parameterPath: [ - "options", - "metricnames" - ], - mapper: { - serializedName: "metricnames", - type: { - name: "String" - } - } -}; -export const metricnamespace: msRest.OperationQueryParameter = { - parameterPath: [ - "options", - "metricnamespace" - ], - mapper: { - serializedName: "metricnamespace", - type: { - name: "String" - } - } -}; -export const name: msRest.OperationURLParameter = { - parameterPath: "name", - mapper: { - required: true, - serializedName: "name", + constraints: { + MinLength: 1 + }, type: { name: "String" } @@ -315,106 +53,16 @@ export const nextPageLink: msRest.OperationURLParameter = { }, skipEncoding: true }; -export const orderby: msRest.OperationQueryParameter = { - parameterPath: [ - "options", - "orderby" - ], - mapper: { - serializedName: "orderby", - type: { - name: "String" - } - } -}; export const resourceGroupName: msRest.OperationURLParameter = { parameterPath: "resourceGroupName", mapper: { required: true, serializedName: "resourceGroupName", - type: { - name: "String" - } - } -}; -export const resourceUri: msRest.OperationURLParameter = { - parameterPath: "resourceUri", - mapper: { - required: true, - serializedName: "resourceUri", - type: { - name: "String" - } - }, - skipEncoding: true -}; -export const resultType: msRest.OperationQueryParameter = { - parameterPath: [ - "options", - "resultType" - ], - mapper: { - serializedName: "resultType", - type: { - name: "Enum", - allowedValues: [ - "Data", - "Metadata" - ] - } - } -}; -export const ruleName: msRest.OperationURLParameter = { - parameterPath: "ruleName", - mapper: { - required: true, - serializedName: "ruleName", - type: { - name: "String" - } - } -}; -export const select: msRest.OperationQueryParameter = { - parameterPath: [ - "options", - "select" - ], - mapper: { - serializedName: "$select", - type: { - name: "String" - } - } -}; -export const sensitivities: msRest.OperationQueryParameter = { - parameterPath: [ - "options", - "sensitivities" - ], - mapper: { - serializedName: "sensitivities", - type: { - name: "String" - } - } -}; -export const startTime: msRest.OperationQueryParameter = { - parameterPath: [ - "options", - "startTime" - ], - mapper: { - serializedName: "startTime", - type: { - name: "String" - } - } -}; -export const statusName: msRest.OperationURLParameter = { - parameterPath: "statusName", - mapper: { - required: true, - serializedName: "statusName", + constraints: { + MaxLength: 90, + MinLength: 1, + Pattern: /^[-\w\._\(\)]+$/ + }, type: { name: "String" } @@ -425,32 +73,11 @@ export const subscriptionId: msRest.OperationURLParameter = { mapper: { required: true, serializedName: "subscriptionId", + constraints: { + MinLength: 1 + }, type: { name: "String" } } }; -export const timespan: msRest.OperationQueryParameter = { - parameterPath: [ - "options", - "timespan" - ], - mapper: { - serializedName: "timespan", - type: { - name: "String" - } - } -}; -export const top: msRest.OperationQueryParameter = { - parameterPath: [ - "options", - "top" - ], - mapper: { - serializedName: "top", - type: { - name: "Number" - } - } -}; diff --git a/sdk/monitor/arm-monitor/src/models/scheduledQueryRulesMappers.ts b/sdk/monitor/arm-monitor/src/models/scheduledQueryRulesMappers.ts deleted file mode 100644 index 0fffe5f5617c..000000000000 --- a/sdk/monitor/arm-monitor/src/models/scheduledQueryRulesMappers.ts +++ /dev/null @@ -1,89 +0,0 @@ -/* - * 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, - Action, - ActionGroupResource, - ActivityLogAlertActionGroup, - ActivityLogAlertActionList, - ActivityLogAlertAllOfCondition, - ActivityLogAlertLeafCondition, - ActivityLogAlertResource, - AlertingAction, - AlertRuleResource, - ArmRoleReceiver, - AutomationRunbookReceiver, - AutoscaleNotification, - AutoscaleProfile, - AutoscaleSettingResource, - AzNsActionGroup, - AzureAppPushReceiver, - AzureFunctionReceiver, - BaseResource, - Criteria, - DataContainer, - DiagnosticSettingsCategoryResource, - DiagnosticSettingsResource, - Dimension, - DynamicMetricCriteria, - DynamicThresholdFailingPeriods, - EmailNotification, - EmailReceiver, - ErrorResponse, - ItsmReceiver, - LocationThresholdRuleCondition, - LogicAppReceiver, - LogMetricTrigger, - LogProfileResource, - LogSearchRuleResource, - LogSearchRuleResourceCollection, - LogSearchRuleResourcePatch, - LogSettings, - LogToMetricAction, - ManagementEventAggregationCondition, - ManagementEventRuleCondition, - MetricAlertAction, - MetricAlertCriteria, - MetricAlertMultipleResourceMultipleMetricCriteria, - MetricAlertResource, - MetricAlertSingleResourceMultipleMetricCriteria, - MetricCriteria, - MetricDimension, - MetricSettings, - MetricTrigger, - MultiMetricCriteria, - ProxyOnlyResource, - ProxyResource, - Recurrence, - RecurrentSchedule, - Resource, - RetentionPolicy, - RuleAction, - RuleCondition, - RuleDataSource, - RuleEmailAction, - RuleManagementEventClaimsDataSource, - RuleManagementEventDataSource, - RuleMetricDataSource, - RuleWebhookAction, - ScaleAction, - ScaleCapacity, - ScaleRule, - Schedule, - SmsReceiver, - Source, - ThresholdRuleCondition, - TimeWindow, - TriggerCondition, - VMInsightsOnboardingStatus, - VoiceReceiver, - WebhookNotification, - WebhookReceiver, - WorkspaceInfo -} from "../models/mappers"; diff --git a/sdk/monitor/arm-monitor/src/models/tenantActivityLogsMappers.ts b/sdk/monitor/arm-monitor/src/models/tenantActivityLogsMappers.ts deleted file mode 100644 index 80edb96348be..000000000000 --- a/sdk/monitor/arm-monitor/src/models/tenantActivityLogsMappers.ts +++ /dev/null @@ -1,17 +0,0 @@ -/* - * 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, - ErrorResponse, - EventData, - EventDataCollection, - HttpRequestInfo, - LocalizableString, - SenderAuthorization -} from "../models/mappers"; diff --git a/sdk/monitor/arm-monitor/src/models/vMInsightsMappers.ts b/sdk/monitor/arm-monitor/src/models/vMInsightsMappers.ts deleted file mode 100644 index 3e0639f45f11..000000000000 --- a/sdk/monitor/arm-monitor/src/models/vMInsightsMappers.ts +++ /dev/null @@ -1,88 +0,0 @@ -/* - * 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, - Action, - ActionGroupResource, - ActivityLogAlertActionGroup, - ActivityLogAlertActionList, - ActivityLogAlertAllOfCondition, - ActivityLogAlertLeafCondition, - ActivityLogAlertResource, - AlertingAction, - AlertRuleResource, - ArmRoleReceiver, - AutomationRunbookReceiver, - AutoscaleNotification, - AutoscaleProfile, - AutoscaleSettingResource, - AzNsActionGroup, - AzureAppPushReceiver, - AzureFunctionReceiver, - BaseResource, - Criteria, - DataContainer, - DiagnosticSettingsCategoryResource, - DiagnosticSettingsResource, - Dimension, - DynamicMetricCriteria, - DynamicThresholdFailingPeriods, - EmailNotification, - EmailReceiver, - ErrorModel, - ItsmReceiver, - LocationThresholdRuleCondition, - LogicAppReceiver, - LogMetricTrigger, - LogProfileResource, - LogSearchRuleResource, - LogSettings, - LogToMetricAction, - ManagementEventAggregationCondition, - ManagementEventRuleCondition, - MetricAlertAction, - MetricAlertCriteria, - MetricAlertMultipleResourceMultipleMetricCriteria, - MetricAlertResource, - MetricAlertSingleResourceMultipleMetricCriteria, - MetricCriteria, - MetricDimension, - MetricSettings, - MetricTrigger, - MultiMetricCriteria, - ProxyOnlyResource, - ProxyResource, - Recurrence, - RecurrentSchedule, - Resource, - ResponseWithError, - RetentionPolicy, - RuleAction, - RuleCondition, - RuleDataSource, - RuleEmailAction, - RuleManagementEventClaimsDataSource, - RuleManagementEventDataSource, - RuleMetricDataSource, - RuleWebhookAction, - ScaleAction, - ScaleCapacity, - ScaleRule, - Schedule, - SmsReceiver, - Source, - ThresholdRuleCondition, - TimeWindow, - TriggerCondition, - VMInsightsOnboardingStatus, - VoiceReceiver, - WebhookNotification, - WebhookReceiver, - WorkspaceInfo -} from "../models/mappers"; diff --git a/sdk/monitor/arm-monitor/src/monitorManagementClient.ts b/sdk/monitor/arm-monitor/src/monitorManagementClient.ts index a498d7b03d34..66b5f17ec809 100644 --- a/sdk/monitor/arm-monitor/src/monitorManagementClient.ts +++ b/sdk/monitor/arm-monitor/src/monitorManagementClient.ts @@ -1,7 +1,6 @@ /* - * Copyright (c) Microsoft Corporation. All rights reserved. - * Licensed under the MIT License. See License.txt in the project root for - * license information. + * Copyright (c) Microsoft Corporation. + * Licensed under the MIT License. * * Code generated by Microsoft (R) AutoRest Code Generator. * Changes may cause incorrect behavior and will be lost if the code is @@ -17,57 +16,17 @@ import { MonitorManagementClientContext } from "./monitorManagementClientContext class MonitorManagementClient extends MonitorManagementClientContext { // Operation groups - autoscaleSettings: operations.AutoscaleSettings; - operations: operations.Operations; - alertRuleIncidents: operations.AlertRuleIncidents; - alertRules: operations.AlertRules; - logProfiles: operations.LogProfiles; - diagnosticSettings: operations.DiagnosticSettingsOperations; - diagnosticSettingsCategory: operations.DiagnosticSettingsCategoryOperations; - actionGroups: operations.ActionGroups; activityLogAlerts: operations.ActivityLogAlerts; - activityLogs: operations.ActivityLogs; - eventCategories: operations.EventCategories; - tenantActivityLogs: operations.TenantActivityLogs; - metricDefinitions: operations.MetricDefinitions; - metrics: operations.Metrics; - metricBaseline: operations.MetricBaseline; - baselines: operations.Baselines; - metricAlerts: operations.MetricAlerts; - metricAlertsStatus: operations.MetricAlertsStatus; - scheduledQueryRules: operations.ScheduledQueryRules; - metricNamespaces: operations.MetricNamespaces; - vMInsights: operations.VMInsights; /** * Initializes a new instance of the MonitorManagementClient class. * @param credentials Credentials needed for the client to connect to Azure. - * @param subscriptionId The Azure subscription Id. + * @param subscriptionId The ID of the target subscription. * @param [options] The parameter options */ constructor(credentials: msRest.ServiceClientCredentials, subscriptionId: string, options?: Models.MonitorManagementClientOptions) { super(credentials, subscriptionId, options); - this.autoscaleSettings = new operations.AutoscaleSettings(this); - this.operations = new operations.Operations(this); - this.alertRuleIncidents = new operations.AlertRuleIncidents(this); - this.alertRules = new operations.AlertRules(this); - this.logProfiles = new operations.LogProfiles(this); - this.diagnosticSettings = new operations.DiagnosticSettingsOperations(this); - this.diagnosticSettingsCategory = new operations.DiagnosticSettingsCategoryOperations(this); - this.actionGroups = new operations.ActionGroups(this); this.activityLogAlerts = new operations.ActivityLogAlerts(this); - this.activityLogs = new operations.ActivityLogs(this); - this.eventCategories = new operations.EventCategories(this); - this.tenantActivityLogs = new operations.TenantActivityLogs(this); - 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); - this.metricNamespaces = new operations.MetricNamespaces(this); - this.vMInsights = new operations.VMInsights(this); } } diff --git a/sdk/monitor/arm-monitor/src/monitorManagementClientContext.ts b/sdk/monitor/arm-monitor/src/monitorManagementClientContext.ts index aacdc007667d..0ef8e751fb2c 100644 --- a/sdk/monitor/arm-monitor/src/monitorManagementClientContext.ts +++ b/sdk/monitor/arm-monitor/src/monitorManagementClientContext.ts @@ -1,7 +1,6 @@ /* - * Copyright (c) Microsoft Corporation. All rights reserved. - * Licensed under the MIT License. See License.txt in the project root for - * license information. + * Copyright (c) Microsoft Corporation. + * Licensed under the MIT License. * * Code generated by Microsoft (R) AutoRest Code Generator. * Changes may cause incorrect behavior and will be lost if the code is @@ -13,16 +12,17 @@ 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; + apiVersion?: string; subscriptionId: string; /** * Initializes a new instance of the MonitorManagementClient class. * @param credentials Credentials needed for the client to connect to Azure. - * @param subscriptionId The Azure subscription Id. + * @param subscriptionId The ID of the target subscription. * @param [options] The parameter options */ constructor(credentials: msRest.ServiceClientCredentials, subscriptionId: string, options?: Models.MonitorManagementClientOptions) { @@ -43,6 +43,7 @@ export class MonitorManagementClientContext extends msRestAzure.AzureServiceClie super(credentials, options); + this.apiVersion = '2020-10-01'; this.acceptLanguage = 'en-US'; this.longRunningOperationRetryTimeout = 30; this.baseUri = options.baseUri || this.baseUri || "https://management.azure.com"; diff --git a/sdk/monitor/arm-monitor/src/operations/actionGroups.ts b/sdk/monitor/arm-monitor/src/operations/actionGroups.ts deleted file mode 100644 index f0d61a682139..000000000000 --- a/sdk/monitor/arm-monitor/src/operations/actionGroups.ts +++ /dev/null @@ -1,451 +0,0 @@ -/* - * 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/actionGroupsMappers"; -import * as Parameters from "../models/parameters"; -import { MonitorManagementClientContext } from "../monitorManagementClientContext"; - -/** Class representing a ActionGroups. */ -export class ActionGroups { - private readonly client: MonitorManagementClientContext; - - /** - * Create a ActionGroups. - * @param {MonitorManagementClientContext} client Reference to the service client. - */ - constructor(client: MonitorManagementClientContext) { - this.client = client; - } - - /** - * Create a new action group or update an existing one. - * @param resourceGroupName The name of the resource group. - * @param actionGroupName The name of the action group. - * @param actionGroup The action group to create or use for the update. - * @param [options] The optional parameters - * @returns Promise - */ - createOrUpdate(resourceGroupName: string, actionGroupName: string, actionGroup: Models.ActionGroupResource, options?: msRest.RequestOptionsBase): Promise; - /** - * @param resourceGroupName The name of the resource group. - * @param actionGroupName The name of the action group. - * @param actionGroup The action group to create or use for the update. - * @param callback The callback - */ - createOrUpdate(resourceGroupName: string, actionGroupName: string, actionGroup: Models.ActionGroupResource, callback: msRest.ServiceCallback): void; - /** - * @param resourceGroupName The name of the resource group. - * @param actionGroupName The name of the action group. - * @param actionGroup The action group to create or use for the update. - * @param options The optional parameters - * @param callback The callback - */ - createOrUpdate(resourceGroupName: string, actionGroupName: string, actionGroup: Models.ActionGroupResource, options: msRest.RequestOptionsBase, callback: msRest.ServiceCallback): void; - createOrUpdate(resourceGroupName: string, actionGroupName: string, actionGroup: Models.ActionGroupResource, options?: msRest.RequestOptionsBase | msRest.ServiceCallback, callback?: msRest.ServiceCallback): Promise { - return this.client.sendOperationRequest( - { - resourceGroupName, - actionGroupName, - actionGroup, - options - }, - createOrUpdateOperationSpec, - callback) as Promise; - } - - /** - * Get an action group. - * @param resourceGroupName The name of the resource group. - * @param actionGroupName The name of the action group. - * @param [options] The optional parameters - * @returns Promise - */ - get(resourceGroupName: string, actionGroupName: string, options?: msRest.RequestOptionsBase): Promise; - /** - * @param resourceGroupName The name of the resource group. - * @param actionGroupName The name of the action group. - * @param callback The callback - */ - get(resourceGroupName: string, actionGroupName: string, callback: msRest.ServiceCallback): void; - /** - * @param resourceGroupName The name of the resource group. - * @param actionGroupName The name of the action group. - * @param options The optional parameters - * @param callback The callback - */ - get(resourceGroupName: string, actionGroupName: string, options: msRest.RequestOptionsBase, callback: msRest.ServiceCallback): void; - get(resourceGroupName: string, actionGroupName: string, options?: msRest.RequestOptionsBase | msRest.ServiceCallback, callback?: msRest.ServiceCallback): Promise { - return this.client.sendOperationRequest( - { - resourceGroupName, - actionGroupName, - options - }, - getOperationSpec, - callback) as Promise; - } - - /** - * Delete an action group. - * @param resourceGroupName The name of the resource group. - * @param actionGroupName The name of the action group. - * @param [options] The optional parameters - * @returns Promise - */ - deleteMethod(resourceGroupName: string, actionGroupName: string, options?: msRest.RequestOptionsBase): Promise; - /** - * @param resourceGroupName The name of the resource group. - * @param actionGroupName The name of the action group. - * @param callback The callback - */ - deleteMethod(resourceGroupName: string, actionGroupName: string, callback: msRest.ServiceCallback): void; - /** - * @param resourceGroupName The name of the resource group. - * @param actionGroupName The name of the action group. - * @param options The optional parameters - * @param callback The callback - */ - deleteMethod(resourceGroupName: string, actionGroupName: string, options: msRest.RequestOptionsBase, callback: msRest.ServiceCallback): void; - deleteMethod(resourceGroupName: string, actionGroupName: string, options?: msRest.RequestOptionsBase | msRest.ServiceCallback, callback?: msRest.ServiceCallback): Promise { - return this.client.sendOperationRequest( - { - resourceGroupName, - actionGroupName, - options - }, - deleteMethodOperationSpec, - callback); - } - - /** - * Updates an existing action group's tags. To update other fields use the CreateOrUpdate method. - * @param resourceGroupName The name of the resource group. - * @param actionGroupName The name of the action group. - * @param actionGroupPatch Parameters supplied to the operation. - * @param [options] The optional parameters - * @returns Promise - */ - update(resourceGroupName: string, actionGroupName: string, actionGroupPatch: Models.ActionGroupPatchBody, options?: msRest.RequestOptionsBase): Promise; - /** - * @param resourceGroupName The name of the resource group. - * @param actionGroupName The name of the action group. - * @param actionGroupPatch Parameters supplied to the operation. - * @param callback The callback - */ - update(resourceGroupName: string, actionGroupName: string, actionGroupPatch: Models.ActionGroupPatchBody, callback: msRest.ServiceCallback): void; - /** - * @param resourceGroupName The name of the resource group. - * @param actionGroupName The name of the action group. - * @param actionGroupPatch Parameters supplied to the operation. - * @param options The optional parameters - * @param callback The callback - */ - update(resourceGroupName: string, actionGroupName: string, actionGroupPatch: Models.ActionGroupPatchBody, options: msRest.RequestOptionsBase, callback: msRest.ServiceCallback): void; - update(resourceGroupName: string, actionGroupName: string, actionGroupPatch: Models.ActionGroupPatchBody, options?: msRest.RequestOptionsBase | msRest.ServiceCallback, callback?: msRest.ServiceCallback): Promise { - return this.client.sendOperationRequest( - { - resourceGroupName, - actionGroupName, - actionGroupPatch, - options - }, - updateOperationSpec, - callback) as Promise; - } - - /** - * Get a list of all action groups in a subscription. - * @param [options] The optional parameters - * @returns Promise - */ - listBySubscriptionId(options?: msRest.RequestOptionsBase): Promise; - /** - * @param callback The callback - */ - listBySubscriptionId(callback: msRest.ServiceCallback): void; - /** - * @param options The optional parameters - * @param callback The callback - */ - listBySubscriptionId(options: msRest.RequestOptionsBase, callback: msRest.ServiceCallback): void; - listBySubscriptionId(options?: msRest.RequestOptionsBase | msRest.ServiceCallback, callback?: msRest.ServiceCallback): Promise { - return this.client.sendOperationRequest( - { - options - }, - listBySubscriptionIdOperationSpec, - callback) as Promise; - } - - /** - * Get a list of all action groups in a resource group. - * @param resourceGroupName The name of the resource group. - * @param [options] The optional parameters - * @returns Promise - */ - listByResourceGroup(resourceGroupName: string, options?: msRest.RequestOptionsBase): Promise; - /** - * @param resourceGroupName The name of the resource group. - * @param callback The callback - */ - listByResourceGroup(resourceGroupName: string, callback: msRest.ServiceCallback): void; - /** - * @param resourceGroupName The name of the resource group. - * @param options The optional parameters - * @param callback The callback - */ - listByResourceGroup(resourceGroupName: string, options: msRest.RequestOptionsBase, callback: msRest.ServiceCallback): void; - listByResourceGroup(resourceGroupName: string, options?: msRest.RequestOptionsBase | msRest.ServiceCallback, callback?: msRest.ServiceCallback): Promise { - return this.client.sendOperationRequest( - { - resourceGroupName, - options - }, - listByResourceGroupOperationSpec, - callback) as Promise; - } - - /** - * Enable a receiver in an action group. This changes the receiver's status from Disabled to - * Enabled. This operation is only supported for Email or SMS receivers. - * @param resourceGroupName The name of the resource group. - * @param actionGroupName The name of the action group. - * @param receiverName The name of the receiver to resubscribe. - * @param [options] The optional parameters - * @returns Promise - */ - enableReceiver(resourceGroupName: string, actionGroupName: string, receiverName: string, options?: msRest.RequestOptionsBase): Promise; - /** - * @param resourceGroupName The name of the resource group. - * @param actionGroupName The name of the action group. - * @param receiverName The name of the receiver to resubscribe. - * @param callback The callback - */ - enableReceiver(resourceGroupName: string, actionGroupName: string, receiverName: string, callback: msRest.ServiceCallback): void; - /** - * @param resourceGroupName The name of the resource group. - * @param actionGroupName The name of the action group. - * @param receiverName The name of the receiver to resubscribe. - * @param options The optional parameters - * @param callback The callback - */ - enableReceiver(resourceGroupName: string, actionGroupName: string, receiverName: string, options: msRest.RequestOptionsBase, callback: msRest.ServiceCallback): void; - enableReceiver(resourceGroupName: string, actionGroupName: string, receiverName: string, options?: msRest.RequestOptionsBase | msRest.ServiceCallback, callback?: msRest.ServiceCallback): Promise { - return this.client.sendOperationRequest( - { - resourceGroupName, - actionGroupName, - receiverName, - options - }, - enableReceiverOperationSpec, - callback); - } -} - -// Operation Specifications -const serializer = new msRest.Serializer(Mappers); -const createOrUpdateOperationSpec: msRest.OperationSpec = { - httpMethod: "PUT", - path: "subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/microsoft.insights/actionGroups/{actionGroupName}", - urlParameters: [ - Parameters.resourceGroupName, - Parameters.actionGroupName, - Parameters.subscriptionId - ], - queryParameters: [ - Parameters.apiVersion3 - ], - headerParameters: [ - Parameters.acceptLanguage - ], - requestBody: { - parameterPath: "actionGroup", - mapper: { - ...Mappers.ActionGroupResource, - required: true - } - }, - responses: { - 200: { - bodyMapper: Mappers.ActionGroupResource - }, - 201: { - bodyMapper: Mappers.ActionGroupResource - }, - default: { - bodyMapper: Mappers.ErrorResponse - } - }, - serializer -}; - -const getOperationSpec: msRest.OperationSpec = { - httpMethod: "GET", - path: "subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/microsoft.insights/actionGroups/{actionGroupName}", - urlParameters: [ - Parameters.resourceGroupName, - Parameters.actionGroupName, - Parameters.subscriptionId - ], - queryParameters: [ - Parameters.apiVersion3 - ], - headerParameters: [ - Parameters.acceptLanguage - ], - responses: { - 200: { - bodyMapper: Mappers.ActionGroupResource - }, - default: { - bodyMapper: Mappers.ErrorResponse - } - }, - serializer -}; - -const deleteMethodOperationSpec: msRest.OperationSpec = { - httpMethod: "DELETE", - path: "subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/microsoft.insights/actionGroups/{actionGroupName}", - urlParameters: [ - Parameters.resourceGroupName, - Parameters.actionGroupName, - Parameters.subscriptionId - ], - queryParameters: [ - Parameters.apiVersion3 - ], - headerParameters: [ - Parameters.acceptLanguage - ], - responses: { - 200: {}, - 204: {}, - default: { - bodyMapper: Mappers.ErrorResponse - } - }, - serializer -}; - -const updateOperationSpec: msRest.OperationSpec = { - httpMethod: "PATCH", - path: "subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/microsoft.insights/actionGroups/{actionGroupName}", - urlParameters: [ - Parameters.subscriptionId, - Parameters.resourceGroupName, - Parameters.actionGroupName - ], - queryParameters: [ - Parameters.apiVersion3 - ], - headerParameters: [ - Parameters.acceptLanguage - ], - requestBody: { - parameterPath: "actionGroupPatch", - mapper: { - ...Mappers.ActionGroupPatchBody, - required: true - } - }, - responses: { - 200: { - bodyMapper: Mappers.ActionGroupResource - }, - default: { - bodyMapper: Mappers.ErrorResponse - } - }, - serializer -}; - -const listBySubscriptionIdOperationSpec: msRest.OperationSpec = { - httpMethod: "GET", - path: "subscriptions/{subscriptionId}/providers/microsoft.insights/actionGroups", - urlParameters: [ - Parameters.subscriptionId - ], - queryParameters: [ - Parameters.apiVersion3 - ], - headerParameters: [ - Parameters.acceptLanguage - ], - responses: { - 200: { - bodyMapper: Mappers.ActionGroupList - }, - default: { - bodyMapper: Mappers.ErrorResponse - } - }, - serializer -}; - -const listByResourceGroupOperationSpec: msRest.OperationSpec = { - httpMethod: "GET", - path: "subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/microsoft.insights/actionGroups", - urlParameters: [ - Parameters.resourceGroupName, - Parameters.subscriptionId - ], - queryParameters: [ - Parameters.apiVersion3 - ], - headerParameters: [ - Parameters.acceptLanguage - ], - responses: { - 200: { - bodyMapper: Mappers.ActionGroupList - }, - default: { - bodyMapper: Mappers.ErrorResponse - } - }, - serializer -}; - -const enableReceiverOperationSpec: msRest.OperationSpec = { - httpMethod: "POST", - path: "subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/microsoft.insights/actionGroups/{actionGroupName}/subscribe", - urlParameters: [ - Parameters.resourceGroupName, - Parameters.actionGroupName, - Parameters.subscriptionId - ], - queryParameters: [ - Parameters.apiVersion3 - ], - headerParameters: [ - Parameters.acceptLanguage - ], - requestBody: { - parameterPath: { - receiverName: "receiverName" - }, - mapper: { - ...Mappers.EnableRequest, - required: true - } - }, - responses: { - 200: {}, - 409: {}, - default: { - bodyMapper: Mappers.ErrorResponse - } - }, - serializer -}; diff --git a/sdk/monitor/arm-monitor/src/operations/activityLogAlerts.ts b/sdk/monitor/arm-monitor/src/operations/activityLogAlerts.ts index 257a6277a91e..856c8fd55a4d 100644 --- a/sdk/monitor/arm-monitor/src/operations/activityLogAlerts.ts +++ b/sdk/monitor/arm-monitor/src/operations/activityLogAlerts.ts @@ -1,7 +1,6 @@ /* - * Copyright (c) Microsoft Corporation. All rights reserved. - * Licensed under the MIT License. See License.txt in the project root for - * license information. + * Copyright (c) Microsoft Corporation. + * Licensed under the MIT License. * * Code generated by Microsoft (R) AutoRest Code Generator. * Changes may cause incorrect behavior and will be lost if the code is @@ -27,35 +26,35 @@ export class ActivityLogAlerts { } /** - * Create a new activity log alert or update an existing one. - * @param resourceGroupName The name of the resource group. - * @param activityLogAlertName The name of the activity log alert. - * @param activityLogAlert The activity log alert to create or use for the update. + * Create a new Activity Log Alert rule or update an existing one. + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param activityLogAlertName The name of the Activity Log Alert rule. + * @param activityLogAlertRule The Activity Log Alert rule to create or use for the update. * @param [options] The optional parameters * @returns Promise */ - createOrUpdate(resourceGroupName: string, activityLogAlertName: string, activityLogAlert: Models.ActivityLogAlertResource, options?: msRest.RequestOptionsBase): Promise; + createOrUpdate(resourceGroupName: string, activityLogAlertName: string, activityLogAlertRule: Models.ActivityLogAlertResource, options?: msRest.RequestOptionsBase): Promise; /** - * @param resourceGroupName The name of the resource group. - * @param activityLogAlertName The name of the activity log alert. - * @param activityLogAlert The activity log alert to create or use for the update. + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param activityLogAlertName The name of the Activity Log Alert rule. + * @param activityLogAlertRule The Activity Log Alert rule to create or use for the update. * @param callback The callback */ - createOrUpdate(resourceGroupName: string, activityLogAlertName: string, activityLogAlert: Models.ActivityLogAlertResource, callback: msRest.ServiceCallback): void; + createOrUpdate(resourceGroupName: string, activityLogAlertName: string, activityLogAlertRule: Models.ActivityLogAlertResource, callback: msRest.ServiceCallback): void; /** - * @param resourceGroupName The name of the resource group. - * @param activityLogAlertName The name of the activity log alert. - * @param activityLogAlert The activity log alert to create or use for the update. + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param activityLogAlertName The name of the Activity Log Alert rule. + * @param activityLogAlertRule The Activity Log Alert rule to create or use for the update. * @param options The optional parameters * @param callback The callback */ - createOrUpdate(resourceGroupName: string, activityLogAlertName: string, activityLogAlert: Models.ActivityLogAlertResource, options: msRest.RequestOptionsBase, callback: msRest.ServiceCallback): void; - createOrUpdate(resourceGroupName: string, activityLogAlertName: string, activityLogAlert: Models.ActivityLogAlertResource, options?: msRest.RequestOptionsBase | msRest.ServiceCallback, callback?: msRest.ServiceCallback): Promise { + createOrUpdate(resourceGroupName: string, activityLogAlertName: string, activityLogAlertRule: Models.ActivityLogAlertResource, options: msRest.RequestOptionsBase, callback: msRest.ServiceCallback): void; + createOrUpdate(resourceGroupName: string, activityLogAlertName: string, activityLogAlertRule: Models.ActivityLogAlertResource, options?: msRest.RequestOptionsBase | msRest.ServiceCallback, callback?: msRest.ServiceCallback): Promise { return this.client.sendOperationRequest( { resourceGroupName, activityLogAlertName, - activityLogAlert, + activityLogAlertRule, options }, createOrUpdateOperationSpec, @@ -63,22 +62,22 @@ export class ActivityLogAlerts { } /** - * Get an activity log alert. - * @param resourceGroupName The name of the resource group. - * @param activityLogAlertName The name of the activity log alert. + * Get an Activity Log Alert rule. + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param activityLogAlertName The name of the Activity Log Alert rule. * @param [options] The optional parameters * @returns Promise */ get(resourceGroupName: string, activityLogAlertName: string, options?: msRest.RequestOptionsBase): Promise; /** - * @param resourceGroupName The name of the resource group. - * @param activityLogAlertName The name of the activity log alert. + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param activityLogAlertName The name of the Activity Log Alert rule. * @param callback The callback */ get(resourceGroupName: string, activityLogAlertName: string, callback: msRest.ServiceCallback): void; /** - * @param resourceGroupName The name of the resource group. - * @param activityLogAlertName The name of the activity log alert. + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param activityLogAlertName The name of the Activity Log Alert rule. * @param options The optional parameters * @param callback The callback */ @@ -95,22 +94,22 @@ export class ActivityLogAlerts { } /** - * Delete an activity log alert. - * @param resourceGroupName The name of the resource group. - * @param activityLogAlertName The name of the activity log alert. + * Delete an Activity Log Alert rule. + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param activityLogAlertName The name of the Activity Log Alert rule. * @param [options] The optional parameters * @returns Promise */ deleteMethod(resourceGroupName: string, activityLogAlertName: string, options?: msRest.RequestOptionsBase): Promise; /** - * @param resourceGroupName The name of the resource group. - * @param activityLogAlertName The name of the activity log alert. + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param activityLogAlertName The name of the Activity Log Alert rule. * @param callback The callback */ deleteMethod(resourceGroupName: string, activityLogAlertName: string, callback: msRest.ServiceCallback): void; /** - * @param resourceGroupName The name of the resource group. - * @param activityLogAlertName The name of the activity log alert. + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param activityLogAlertName The name of the Activity Log Alert rule. * @param options The optional parameters * @param callback The callback */ @@ -127,36 +126,37 @@ export class ActivityLogAlerts { } /** - * Updates an existing ActivityLogAlertResource's tags. To update other fields use the - * CreateOrUpdate method. - * @param resourceGroupName The name of the resource group. - * @param activityLogAlertName The name of the activity log alert. - * @param activityLogAlertPatch Parameters supplied to the operation. + * Updates 'tags' and 'enabled' fields in an existing Alert rule. This method is used to update the + * Alert rule tags, and to enable or disable the Alert rule. To update other fields use + * CreateOrUpdate operation. + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param activityLogAlertName The name of the Activity Log Alert rule. + * @param activityLogAlertRulePatch Parameters supplied to the operation. * @param [options] The optional parameters * @returns Promise */ - update(resourceGroupName: string, activityLogAlertName: string, activityLogAlertPatch: Models.ActivityLogAlertPatchBody, options?: msRest.RequestOptionsBase): Promise; + update(resourceGroupName: string, activityLogAlertName: string, activityLogAlertRulePatch: Models.AlertRulePatchObject, options?: msRest.RequestOptionsBase): Promise; /** - * @param resourceGroupName The name of the resource group. - * @param activityLogAlertName The name of the activity log alert. - * @param activityLogAlertPatch Parameters supplied to the operation. + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param activityLogAlertName The name of the Activity Log Alert rule. + * @param activityLogAlertRulePatch Parameters supplied to the operation. * @param callback The callback */ - update(resourceGroupName: string, activityLogAlertName: string, activityLogAlertPatch: Models.ActivityLogAlertPatchBody, callback: msRest.ServiceCallback): void; + update(resourceGroupName: string, activityLogAlertName: string, activityLogAlertRulePatch: Models.AlertRulePatchObject, callback: msRest.ServiceCallback): void; /** - * @param resourceGroupName The name of the resource group. - * @param activityLogAlertName The name of the activity log alert. - * @param activityLogAlertPatch Parameters supplied to the operation. + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param activityLogAlertName The name of the Activity Log Alert rule. + * @param activityLogAlertRulePatch Parameters supplied to the operation. * @param options The optional parameters * @param callback The callback */ - update(resourceGroupName: string, activityLogAlertName: string, activityLogAlertPatch: Models.ActivityLogAlertPatchBody, options: msRest.RequestOptionsBase, callback: msRest.ServiceCallback): void; - update(resourceGroupName: string, activityLogAlertName: string, activityLogAlertPatch: Models.ActivityLogAlertPatchBody, options?: msRest.RequestOptionsBase | msRest.ServiceCallback, callback?: msRest.ServiceCallback): Promise { + update(resourceGroupName: string, activityLogAlertName: string, activityLogAlertRulePatch: Models.AlertRulePatchObject, options: msRest.RequestOptionsBase, callback: msRest.ServiceCallback): void; + update(resourceGroupName: string, activityLogAlertName: string, activityLogAlertRulePatch: Models.AlertRulePatchObject, options?: msRest.RequestOptionsBase | msRest.ServiceCallback, callback?: msRest.ServiceCallback): Promise { return this.client.sendOperationRequest( { resourceGroupName, activityLogAlertName, - activityLogAlertPatch, + activityLogAlertRulePatch, options }, updateOperationSpec, @@ -164,7 +164,7 @@ export class ActivityLogAlerts { } /** - * Get a list of all activity log alerts in a subscription. + * Get a list of all Activity Log Alert rules in a subscription. * @param [options] The optional parameters * @returns Promise */ @@ -172,13 +172,13 @@ export class ActivityLogAlerts { /** * @param callback The callback */ - listBySubscriptionId(callback: msRest.ServiceCallback): void; + listBySubscriptionId(callback: msRest.ServiceCallback): void; /** * @param options The optional parameters * @param callback The callback */ - listBySubscriptionId(options: msRest.RequestOptionsBase, callback: msRest.ServiceCallback): void; - listBySubscriptionId(options?: msRest.RequestOptionsBase | msRest.ServiceCallback, callback?: msRest.ServiceCallback): Promise { + listBySubscriptionId(options: msRest.RequestOptionsBase, callback: msRest.ServiceCallback): void; + listBySubscriptionId(options?: msRest.RequestOptionsBase | msRest.ServiceCallback, callback?: msRest.ServiceCallback): Promise { return this.client.sendOperationRequest( { options @@ -188,24 +188,24 @@ export class ActivityLogAlerts { } /** - * Get a list of all activity log alerts in a resource group. - * @param resourceGroupName The name of the resource group. + * Get a list of all Activity Log Alert rules in a resource group. + * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param [options] The optional parameters * @returns Promise */ listByResourceGroup(resourceGroupName: string, options?: msRest.RequestOptionsBase): Promise; /** - * @param resourceGroupName The name of the resource group. + * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param callback The callback */ - listByResourceGroup(resourceGroupName: string, callback: msRest.ServiceCallback): void; + listByResourceGroup(resourceGroupName: string, callback: msRest.ServiceCallback): void; /** - * @param resourceGroupName The name of the resource group. + * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param options The optional parameters * @param callback The callback */ - listByResourceGroup(resourceGroupName: string, options: msRest.RequestOptionsBase, callback: msRest.ServiceCallback): void; - listByResourceGroup(resourceGroupName: string, options?: msRest.RequestOptionsBase | msRest.ServiceCallback, callback?: msRest.ServiceCallback): Promise { + listByResourceGroup(resourceGroupName: string, options: msRest.RequestOptionsBase, callback: msRest.ServiceCallback): void; + listByResourceGroup(resourceGroupName: string, options?: msRest.RequestOptionsBase | msRest.ServiceCallback, callback?: msRest.ServiceCallback): Promise { return this.client.sendOperationRequest( { resourceGroupName, @@ -214,26 +214,82 @@ export class ActivityLogAlerts { listByResourceGroupOperationSpec, callback) as Promise; } + + /** + * Get a list of all Activity Log Alert rules in a subscription. + * @param nextPageLink The NextLink from the previous successful call to List operation. + * @param [options] The optional parameters + * @returns Promise + */ + listBySubscriptionIdNext(nextPageLink: string, options?: msRest.RequestOptionsBase): Promise; + /** + * @param nextPageLink The NextLink from the previous successful call to List operation. + * @param callback The callback + */ + listBySubscriptionIdNext(nextPageLink: string, callback: msRest.ServiceCallback): void; + /** + * @param nextPageLink The NextLink from the previous successful call to List operation. + * @param options The optional parameters + * @param callback The callback + */ + listBySubscriptionIdNext(nextPageLink: string, options: msRest.RequestOptionsBase, callback: msRest.ServiceCallback): void; + listBySubscriptionIdNext(nextPageLink: string, options?: msRest.RequestOptionsBase | msRest.ServiceCallback, callback?: msRest.ServiceCallback): Promise { + return this.client.sendOperationRequest( + { + nextPageLink, + options + }, + listBySubscriptionIdNextOperationSpec, + callback) as Promise; + } + + /** + * Get a list of all Activity Log Alert rules in a resource group. + * @param nextPageLink The NextLink from the previous successful call to List operation. + * @param [options] The optional parameters + * @returns Promise + */ + listByResourceGroupNext(nextPageLink: string, options?: msRest.RequestOptionsBase): Promise; + /** + * @param nextPageLink The NextLink from the previous successful call to List operation. + * @param callback The callback + */ + listByResourceGroupNext(nextPageLink: string, callback: msRest.ServiceCallback): void; + /** + * @param nextPageLink The NextLink from the previous successful call to List operation. + * @param options The optional parameters + * @param callback The callback + */ + listByResourceGroupNext(nextPageLink: string, options: msRest.RequestOptionsBase, callback: msRest.ServiceCallback): void; + listByResourceGroupNext(nextPageLink: string, options?: msRest.RequestOptionsBase | msRest.ServiceCallback, callback?: msRest.ServiceCallback): Promise { + return this.client.sendOperationRequest( + { + nextPageLink, + options + }, + listByResourceGroupNextOperationSpec, + callback) as Promise; + } } // Operation Specifications const serializer = new msRest.Serializer(Mappers); const createOrUpdateOperationSpec: msRest.OperationSpec = { httpMethod: "PUT", - path: "subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/microsoft.insights/activityLogAlerts/{activityLogAlertName}", + path: "subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Insights/activityLogAlerts/{activityLogAlertName}", urlParameters: [ Parameters.subscriptionId, Parameters.resourceGroupName, Parameters.activityLogAlertName ], queryParameters: [ - Parameters.apiVersion4 + Parameters.apiVersion ], headerParameters: [ Parameters.acceptLanguage ], requestBody: { - parameterPath: "activityLogAlert", + parameterPath: "activityLogAlertRule", mapper: { ...Mappers.ActivityLogAlertResource, required: true @@ -255,14 +311,14 @@ const createOrUpdateOperationSpec: msRest.OperationSpec = { const getOperationSpec: msRest.OperationSpec = { httpMethod: "GET", - path: "subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/microsoft.insights/activityLogAlerts/{activityLogAlertName}", + path: "subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Insights/activityLogAlerts/{activityLogAlertName}", urlParameters: [ Parameters.subscriptionId, Parameters.resourceGroupName, Parameters.activityLogAlertName ], queryParameters: [ - Parameters.apiVersion4 + Parameters.apiVersion ], headerParameters: [ Parameters.acceptLanguage @@ -280,14 +336,14 @@ const getOperationSpec: msRest.OperationSpec = { const deleteMethodOperationSpec: msRest.OperationSpec = { httpMethod: "DELETE", - path: "subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/microsoft.insights/activityLogAlerts/{activityLogAlertName}", + path: "subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Insights/activityLogAlerts/{activityLogAlertName}", urlParameters: [ Parameters.subscriptionId, Parameters.resourceGroupName, Parameters.activityLogAlertName ], queryParameters: [ - Parameters.apiVersion4 + Parameters.apiVersion ], headerParameters: [ Parameters.acceptLanguage @@ -304,22 +360,22 @@ const deleteMethodOperationSpec: msRest.OperationSpec = { const updateOperationSpec: msRest.OperationSpec = { httpMethod: "PATCH", - path: "subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/microsoft.insights/activityLogAlerts/{activityLogAlertName}", + path: "subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Insights/activityLogAlerts/{activityLogAlertName}", urlParameters: [ Parameters.subscriptionId, Parameters.resourceGroupName, Parameters.activityLogAlertName ], queryParameters: [ - Parameters.apiVersion4 + Parameters.apiVersion ], headerParameters: [ Parameters.acceptLanguage ], requestBody: { - parameterPath: "activityLogAlertPatch", + parameterPath: "activityLogAlertRulePatch", mapper: { - ...Mappers.ActivityLogAlertPatchBody, + ...Mappers.AlertRulePatchObject, required: true } }, @@ -336,19 +392,19 @@ const updateOperationSpec: msRest.OperationSpec = { const listBySubscriptionIdOperationSpec: msRest.OperationSpec = { httpMethod: "GET", - path: "subscriptions/{subscriptionId}/providers/microsoft.insights/activityLogAlerts", + path: "subscriptions/{subscriptionId}/providers/Microsoft.Insights/activityLogAlerts", urlParameters: [ Parameters.subscriptionId ], queryParameters: [ - Parameters.apiVersion4 + Parameters.apiVersion ], headerParameters: [ Parameters.acceptLanguage ], responses: { 200: { - bodyMapper: Mappers.ActivityLogAlertList + bodyMapper: Mappers.AlertRuleList }, default: { bodyMapper: Mappers.ErrorResponse @@ -359,20 +415,68 @@ const listBySubscriptionIdOperationSpec: msRest.OperationSpec = { const listByResourceGroupOperationSpec: msRest.OperationSpec = { httpMethod: "GET", - path: "subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/microsoft.insights/activityLogAlerts", + path: "subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Insights/activityLogAlerts", urlParameters: [ Parameters.subscriptionId, Parameters.resourceGroupName ], queryParameters: [ - Parameters.apiVersion4 + Parameters.apiVersion + ], + headerParameters: [ + Parameters.acceptLanguage + ], + responses: { + 200: { + bodyMapper: Mappers.AlertRuleList + }, + default: { + bodyMapper: Mappers.ErrorResponse + } + }, + serializer +}; + +const listBySubscriptionIdNextOperationSpec: msRest.OperationSpec = { + httpMethod: "GET", + baseUrl: "https://management.azure.com", + path: "{nextLink}", + urlParameters: [ + Parameters.nextPageLink + ], + queryParameters: [ + Parameters.apiVersion + ], + headerParameters: [ + Parameters.acceptLanguage + ], + responses: { + 200: { + bodyMapper: Mappers.AlertRuleList + }, + default: { + bodyMapper: Mappers.ErrorResponse + } + }, + serializer +}; + +const listByResourceGroupNextOperationSpec: msRest.OperationSpec = { + httpMethod: "GET", + baseUrl: "https://management.azure.com", + path: "{nextLink}", + urlParameters: [ + Parameters.nextPageLink + ], + queryParameters: [ + Parameters.apiVersion ], headerParameters: [ Parameters.acceptLanguage ], responses: { 200: { - bodyMapper: Mappers.ActivityLogAlertList + bodyMapper: Mappers.AlertRuleList }, default: { bodyMapper: Mappers.ErrorResponse diff --git a/sdk/monitor/arm-monitor/src/operations/activityLogs.ts b/sdk/monitor/arm-monitor/src/operations/activityLogs.ts deleted file mode 100644 index 561f7d7f4eba..000000000000 --- a/sdk/monitor/arm-monitor/src/operations/activityLogs.ts +++ /dev/null @@ -1,171 +0,0 @@ -/* - * 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/activityLogsMappers"; -import * as Parameters from "../models/parameters"; -import { MonitorManagementClientContext } from "../monitorManagementClientContext"; - -/** Class representing a ActivityLogs. */ -export class ActivityLogs { - private readonly client: MonitorManagementClientContext; - - /** - * Create a ActivityLogs. - * @param {MonitorManagementClientContext} client Reference to the service client. - */ - constructor(client: MonitorManagementClientContext) { - this.client = client; - } - - /** - * Provides the list of records from the activity logs. - * @param filter Reduces the set of data collected.
This argument is required and it also - * requires at least the start date/time.
The **$filter** argument is very restricted and allows - * only the following patterns.
- *List events for a resource group*: $filter=eventTimestamp ge - * '2014-07-16T04:36:37.6407898Z' and eventTimestamp le '2014-07-20T04:36:37.6407898Z' and - * resourceGroupName eq 'resourceGroupName'.
- *List events for resource*: - * $filter=eventTimestamp ge '2014-07-16T04:36:37.6407898Z' and eventTimestamp le - * '2014-07-20T04:36:37.6407898Z' and resourceUri eq 'resourceURI'.
- *List events for a - * subscription in a time range*: $filter=eventTimestamp ge '2014-07-16T04:36:37.6407898Z' and - * eventTimestamp le '2014-07-20T04:36:37.6407898Z'.
- *List events for a resource provider*: - * $filter=eventTimestamp ge '2014-07-16T04:36:37.6407898Z' and eventTimestamp le - * '2014-07-20T04:36:37.6407898Z' and resourceProvider eq 'resourceProviderName'.
- *List events - * for a correlation Id*: $filter=eventTimestamp ge '2014-07-16T04:36:37.6407898Z' and - * eventTimestamp le '2014-07-20T04:36:37.6407898Z' and correlationId eq - * 'correlationID'.

**NOTE**: No other syntax is allowed. - * @param [options] The optional parameters - * @returns Promise - */ - list(filter: string, options?: Models.ActivityLogsListOptionalParams): Promise; - /** - * @param filter Reduces the set of data collected.
This argument is required and it also - * requires at least the start date/time.
The **$filter** argument is very restricted and allows - * only the following patterns.
- *List events for a resource group*: $filter=eventTimestamp ge - * '2014-07-16T04:36:37.6407898Z' and eventTimestamp le '2014-07-20T04:36:37.6407898Z' and - * resourceGroupName eq 'resourceGroupName'.
- *List events for resource*: - * $filter=eventTimestamp ge '2014-07-16T04:36:37.6407898Z' and eventTimestamp le - * '2014-07-20T04:36:37.6407898Z' and resourceUri eq 'resourceURI'.
- *List events for a - * subscription in a time range*: $filter=eventTimestamp ge '2014-07-16T04:36:37.6407898Z' and - * eventTimestamp le '2014-07-20T04:36:37.6407898Z'.
- *List events for a resource provider*: - * $filter=eventTimestamp ge '2014-07-16T04:36:37.6407898Z' and eventTimestamp le - * '2014-07-20T04:36:37.6407898Z' and resourceProvider eq 'resourceProviderName'.
- *List events - * for a correlation Id*: $filter=eventTimestamp ge '2014-07-16T04:36:37.6407898Z' and - * eventTimestamp le '2014-07-20T04:36:37.6407898Z' and correlationId eq - * 'correlationID'.

**NOTE**: No other syntax is allowed. - * @param callback The callback - */ - list(filter: string, callback: msRest.ServiceCallback): void; - /** - * @param filter Reduces the set of data collected.
This argument is required and it also - * requires at least the start date/time.
The **$filter** argument is very restricted and allows - * only the following patterns.
- *List events for a resource group*: $filter=eventTimestamp ge - * '2014-07-16T04:36:37.6407898Z' and eventTimestamp le '2014-07-20T04:36:37.6407898Z' and - * resourceGroupName eq 'resourceGroupName'.
- *List events for resource*: - * $filter=eventTimestamp ge '2014-07-16T04:36:37.6407898Z' and eventTimestamp le - * '2014-07-20T04:36:37.6407898Z' and resourceUri eq 'resourceURI'.
- *List events for a - * subscription in a time range*: $filter=eventTimestamp ge '2014-07-16T04:36:37.6407898Z' and - * eventTimestamp le '2014-07-20T04:36:37.6407898Z'.
- *List events for a resource provider*: - * $filter=eventTimestamp ge '2014-07-16T04:36:37.6407898Z' and eventTimestamp le - * '2014-07-20T04:36:37.6407898Z' and resourceProvider eq 'resourceProviderName'.
- *List events - * for a correlation Id*: $filter=eventTimestamp ge '2014-07-16T04:36:37.6407898Z' and - * eventTimestamp le '2014-07-20T04:36:37.6407898Z' and correlationId eq - * 'correlationID'.

**NOTE**: No other syntax is allowed. - * @param options The optional parameters - * @param callback The callback - */ - list(filter: string, options: Models.ActivityLogsListOptionalParams, callback: msRest.ServiceCallback): void; - list(filter: string, options?: Models.ActivityLogsListOptionalParams | msRest.ServiceCallback, callback?: msRest.ServiceCallback): Promise { - return this.client.sendOperationRequest( - { - filter, - options - }, - listOperationSpec, - callback) as Promise; - } - - /** - * Provides the list of records from the activity logs. - * @param nextPageLink The NextLink from the previous successful call to List operation. - * @param [options] The optional parameters - * @returns Promise - */ - listNext(nextPageLink: string, options?: msRest.RequestOptionsBase): Promise; - /** - * @param nextPageLink The NextLink from the previous successful call to List operation. - * @param callback The callback - */ - listNext(nextPageLink: string, callback: msRest.ServiceCallback): void; - /** - * @param nextPageLink The NextLink from the previous successful call to List operation. - * @param options The optional parameters - * @param callback The callback - */ - listNext(nextPageLink: string, options: msRest.RequestOptionsBase, callback: msRest.ServiceCallback): void; - listNext(nextPageLink: string, options?: msRest.RequestOptionsBase | msRest.ServiceCallback, callback?: msRest.ServiceCallback): Promise { - return this.client.sendOperationRequest( - { - nextPageLink, - options - }, - listNextOperationSpec, - callback) as Promise; - } -} - -// Operation Specifications -const serializer = new msRest.Serializer(Mappers); -const listOperationSpec: msRest.OperationSpec = { - httpMethod: "GET", - path: "subscriptions/{subscriptionId}/providers/microsoft.insights/eventtypes/management/values", - urlParameters: [ - Parameters.subscriptionId - ], - queryParameters: [ - Parameters.apiVersion0, - Parameters.filter0, - Parameters.select - ], - headerParameters: [ - Parameters.acceptLanguage - ], - responses: { - 200: { - bodyMapper: Mappers.EventDataCollection - }, - default: { - bodyMapper: Mappers.ErrorResponse - } - }, - serializer -}; - -const listNextOperationSpec: msRest.OperationSpec = { - httpMethod: "GET", - baseUrl: "https://management.azure.com", - path: "{nextLink}", - urlParameters: [ - Parameters.nextPageLink - ], - headerParameters: [ - Parameters.acceptLanguage - ], - responses: { - 200: { - bodyMapper: Mappers.EventDataCollection - }, - default: { - bodyMapper: Mappers.ErrorResponse - } - }, - serializer -}; diff --git a/sdk/monitor/arm-monitor/src/operations/alertRuleIncidents.ts b/sdk/monitor/arm-monitor/src/operations/alertRuleIncidents.ts deleted file mode 100644 index 77453e3b2b0f..000000000000 --- a/sdk/monitor/arm-monitor/src/operations/alertRuleIncidents.ts +++ /dev/null @@ -1,149 +0,0 @@ -/* - * 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/alertRuleIncidentsMappers"; -import * as Parameters from "../models/parameters"; -import { MonitorManagementClientContext } from "../monitorManagementClientContext"; - -/** Class representing a AlertRuleIncidents. */ -export class AlertRuleIncidents { - private readonly client: MonitorManagementClientContext; - - /** - * Create a AlertRuleIncidents. - * @param {MonitorManagementClientContext} client Reference to the service client. - */ - constructor(client: MonitorManagementClientContext) { - this.client = client; - } - - /** - * Gets an incident associated to an alert rule - * @param resourceGroupName The name of the resource group. - * @param ruleName The name of the rule. - * @param incidentName The name of the incident to retrieve. - * @param [options] The optional parameters - * @returns Promise - */ - get(resourceGroupName: string, ruleName: string, incidentName: string, options?: msRest.RequestOptionsBase): Promise; - /** - * @param resourceGroupName The name of the resource group. - * @param ruleName The name of the rule. - * @param incidentName The name of the incident to retrieve. - * @param callback The callback - */ - get(resourceGroupName: string, ruleName: string, incidentName: string, callback: msRest.ServiceCallback): void; - /** - * @param resourceGroupName The name of the resource group. - * @param ruleName The name of the rule. - * @param incidentName The name of the incident to retrieve. - * @param options The optional parameters - * @param callback The callback - */ - get(resourceGroupName: string, ruleName: string, incidentName: string, options: msRest.RequestOptionsBase, callback: msRest.ServiceCallback): void; - get(resourceGroupName: string, ruleName: string, incidentName: string, options?: msRest.RequestOptionsBase | msRest.ServiceCallback, callback?: msRest.ServiceCallback): Promise { - return this.client.sendOperationRequest( - { - resourceGroupName, - ruleName, - incidentName, - options - }, - getOperationSpec, - callback) as Promise; - } - - /** - * Gets a list of incidents associated to an alert rule - * @param resourceGroupName The name of the resource group. - * @param ruleName The name of the rule. - * @param [options] The optional parameters - * @returns Promise - */ - listByAlertRule(resourceGroupName: string, ruleName: string, options?: msRest.RequestOptionsBase): Promise; - /** - * @param resourceGroupName The name of the resource group. - * @param ruleName The name of the rule. - * @param callback The callback - */ - listByAlertRule(resourceGroupName: string, ruleName: string, callback: msRest.ServiceCallback): void; - /** - * @param resourceGroupName The name of the resource group. - * @param ruleName The name of the rule. - * @param options The optional parameters - * @param callback The callback - */ - listByAlertRule(resourceGroupName: string, ruleName: string, options: msRest.RequestOptionsBase, callback: msRest.ServiceCallback): void; - listByAlertRule(resourceGroupName: string, ruleName: string, options?: msRest.RequestOptionsBase | msRest.ServiceCallback, callback?: msRest.ServiceCallback): Promise { - return this.client.sendOperationRequest( - { - resourceGroupName, - ruleName, - options - }, - listByAlertRuleOperationSpec, - callback) as Promise; - } -} - -// Operation Specifications -const serializer = new msRest.Serializer(Mappers); -const getOperationSpec: msRest.OperationSpec = { - httpMethod: "GET", - path: "subscriptions/{subscriptionId}/resourcegroups/{resourceGroupName}/providers/microsoft.insights/alertrules/{ruleName}/incidents/{incidentName}", - urlParameters: [ - Parameters.resourceGroupName, - Parameters.ruleName, - Parameters.incidentName, - Parameters.subscriptionId - ], - queryParameters: [ - Parameters.apiVersion1 - ], - headerParameters: [ - Parameters.acceptLanguage - ], - responses: { - 200: { - bodyMapper: Mappers.Incident - }, - default: { - bodyMapper: Mappers.ErrorResponse - } - }, - serializer -}; - -const listByAlertRuleOperationSpec: msRest.OperationSpec = { - httpMethod: "GET", - path: "subscriptions/{subscriptionId}/resourcegroups/{resourceGroupName}/providers/microsoft.insights/alertrules/{ruleName}/incidents", - urlParameters: [ - Parameters.resourceGroupName, - Parameters.ruleName, - Parameters.subscriptionId - ], - queryParameters: [ - Parameters.apiVersion1 - ], - headerParameters: [ - Parameters.acceptLanguage - ], - responses: { - 200: { - bodyMapper: Mappers.IncidentListResult - }, - default: { - bodyMapper: Mappers.CloudError - } - }, - serializer -}; diff --git a/sdk/monitor/arm-monitor/src/operations/alertRules.ts b/sdk/monitor/arm-monitor/src/operations/alertRules.ts deleted file mode 100644 index 79429b70aaf1..000000000000 --- a/sdk/monitor/arm-monitor/src/operations/alertRules.ts +++ /dev/null @@ -1,384 +0,0 @@ -/* - * 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/alertRulesMappers"; -import * as Parameters from "../models/parameters"; -import { MonitorManagementClientContext } from "../monitorManagementClientContext"; - -/** Class representing a AlertRules. */ -export class AlertRules { - private readonly client: MonitorManagementClientContext; - - /** - * Create a AlertRules. - * @param {MonitorManagementClientContext} client Reference to the service client. - */ - constructor(client: MonitorManagementClientContext) { - this.client = client; - } - - /** - * Creates or updates an 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. - * @param [options] The optional parameters - * @returns Promise - */ - createOrUpdate(resourceGroupName: string, ruleName: string, parameters: Models.AlertRuleResource, options?: msRest.RequestOptionsBase): Promise; - /** - * @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. - * @param callback The callback - */ - createOrUpdate(resourceGroupName: string, ruleName: string, parameters: Models.AlertRuleResource, callback: msRest.ServiceCallback): void; - /** - * @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. - * @param options The optional parameters - * @param callback The callback - */ - createOrUpdate(resourceGroupName: string, ruleName: string, parameters: Models.AlertRuleResource, options: msRest.RequestOptionsBase, callback: msRest.ServiceCallback): void; - createOrUpdate(resourceGroupName: string, ruleName: string, parameters: Models.AlertRuleResource, options?: msRest.RequestOptionsBase | msRest.ServiceCallback, callback?: msRest.ServiceCallback): Promise { - return this.client.sendOperationRequest( - { - resourceGroupName, - ruleName, - parameters, - options - }, - createOrUpdateOperationSpec, - callback) as Promise; - } - - /** - * Deletes an alert rule - * @param resourceGroupName The name of the resource group. - * @param ruleName The name of the rule. - * @param [options] The optional parameters - * @returns Promise - */ - deleteMethod(resourceGroupName: string, ruleName: string, options?: msRest.RequestOptionsBase): Promise; - /** - * @param resourceGroupName The name of the resource group. - * @param ruleName The name of the rule. - * @param callback The callback - */ - deleteMethod(resourceGroupName: string, ruleName: string, callback: msRest.ServiceCallback): void; - /** - * @param resourceGroupName The name of the resource group. - * @param ruleName The name of the rule. - * @param options The optional parameters - * @param callback The callback - */ - deleteMethod(resourceGroupName: string, ruleName: string, options: msRest.RequestOptionsBase, callback: msRest.ServiceCallback): void; - deleteMethod(resourceGroupName: string, ruleName: string, options?: msRest.RequestOptionsBase | msRest.ServiceCallback, callback?: msRest.ServiceCallback): Promise { - return this.client.sendOperationRequest( - { - resourceGroupName, - ruleName, - options - }, - deleteMethodOperationSpec, - callback); - } - - /** - * Gets an alert rule - * @param resourceGroupName The name of the resource group. - * @param ruleName The name of the rule. - * @param [options] The optional parameters - * @returns Promise - */ - get(resourceGroupName: string, ruleName: string, options?: msRest.RequestOptionsBase): Promise; - /** - * @param resourceGroupName The name of the resource group. - * @param ruleName The name of the rule. - * @param callback The callback - */ - get(resourceGroupName: string, ruleName: string, callback: msRest.ServiceCallback): void; - /** - * @param resourceGroupName The name of the resource group. - * @param ruleName The name of the rule. - * @param options The optional parameters - * @param callback The callback - */ - get(resourceGroupName: string, ruleName: string, options: msRest.RequestOptionsBase, callback: msRest.ServiceCallback): void; - get(resourceGroupName: string, ruleName: string, options?: msRest.RequestOptionsBase | msRest.ServiceCallback, callback?: msRest.ServiceCallback): Promise { - return this.client.sendOperationRequest( - { - resourceGroupName, - ruleName, - options - }, - getOperationSpec, - callback) as Promise; - } - - /** - * Updates an existing 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. - * @param [options] The optional parameters - * @returns Promise - */ - update(resourceGroupName: string, ruleName: string, alertRulesResource: Models.AlertRuleResourcePatch, options?: msRest.RequestOptionsBase): Promise; - /** - * @param resourceGroupName The name of the resource group. - * @param ruleName The name of the rule. - * @param alertRulesResource Parameters supplied to the operation. - * @param callback The callback - */ - update(resourceGroupName: string, ruleName: string, alertRulesResource: Models.AlertRuleResourcePatch, callback: msRest.ServiceCallback): void; - /** - * @param resourceGroupName The name of the resource group. - * @param ruleName The name of the rule. - * @param alertRulesResource Parameters supplied to the operation. - * @param options The optional parameters - * @param callback The callback - */ - update(resourceGroupName: string, ruleName: string, alertRulesResource: Models.AlertRuleResourcePatch, options: msRest.RequestOptionsBase, callback: msRest.ServiceCallback): void; - update(resourceGroupName: string, ruleName: string, alertRulesResource: Models.AlertRuleResourcePatch, options?: msRest.RequestOptionsBase | msRest.ServiceCallback, callback?: msRest.ServiceCallback): Promise { - return this.client.sendOperationRequest( - { - resourceGroupName, - ruleName, - alertRulesResource, - options - }, - updateOperationSpec, - callback) as Promise; - } - - /** - * List the alert rules within a resource group. - * @param resourceGroupName The name of the resource group. - * @param [options] The optional parameters - * @returns Promise - */ - listByResourceGroup(resourceGroupName: string, options?: msRest.RequestOptionsBase): Promise; - /** - * @param resourceGroupName The name of the resource group. - * @param callback The callback - */ - listByResourceGroup(resourceGroupName: string, callback: msRest.ServiceCallback): void; - /** - * @param resourceGroupName The name of the resource group. - * @param options The optional parameters - * @param callback The callback - */ - listByResourceGroup(resourceGroupName: string, options: msRest.RequestOptionsBase, callback: msRest.ServiceCallback): void; - listByResourceGroup(resourceGroupName: string, options?: msRest.RequestOptionsBase | msRest.ServiceCallback, callback?: msRest.ServiceCallback): Promise { - return this.client.sendOperationRequest( - { - resourceGroupName, - options - }, - listByResourceGroupOperationSpec, - callback) as Promise; - } - - /** - * List the alert rules within a subscription. - * @param [options] The optional parameters - * @returns Promise - */ - listBySubscription(options?: msRest.RequestOptionsBase): Promise; - /** - * @param callback The callback - */ - listBySubscription(callback: msRest.ServiceCallback): void; - /** - * @param options The optional parameters - * @param callback The callback - */ - listBySubscription(options: msRest.RequestOptionsBase, callback: msRest.ServiceCallback): void; - listBySubscription(options?: msRest.RequestOptionsBase | msRest.ServiceCallback, callback?: msRest.ServiceCallback): Promise { - return this.client.sendOperationRequest( - { - options - }, - listBySubscriptionOperationSpec, - callback) as Promise; - } -} - -// Operation Specifications -const serializer = new msRest.Serializer(Mappers); -const createOrUpdateOperationSpec: msRest.OperationSpec = { - httpMethod: "PUT", - path: "subscriptions/{subscriptionId}/resourcegroups/{resourceGroupName}/providers/microsoft.insights/alertrules/{ruleName}", - urlParameters: [ - Parameters.resourceGroupName, - Parameters.ruleName, - Parameters.subscriptionId - ], - queryParameters: [ - Parameters.apiVersion1 - ], - headerParameters: [ - Parameters.acceptLanguage - ], - requestBody: { - parameterPath: "parameters", - mapper: { - ...Mappers.AlertRuleResource, - required: true - } - }, - responses: { - 200: { - bodyMapper: Mappers.AlertRuleResource - }, - 201: { - bodyMapper: Mappers.AlertRuleResource - }, - default: { - bodyMapper: Mappers.ErrorResponse - } - }, - serializer -}; - -const deleteMethodOperationSpec: msRest.OperationSpec = { - httpMethod: "DELETE", - path: "subscriptions/{subscriptionId}/resourcegroups/{resourceGroupName}/providers/microsoft.insights/alertrules/{ruleName}", - urlParameters: [ - Parameters.resourceGroupName, - Parameters.ruleName, - Parameters.subscriptionId - ], - queryParameters: [ - Parameters.apiVersion1 - ], - headerParameters: [ - Parameters.acceptLanguage - ], - responses: { - 200: {}, - 204: {}, - default: { - bodyMapper: Mappers.CloudError - } - }, - serializer -}; - -const getOperationSpec: msRest.OperationSpec = { - httpMethod: "GET", - path: "subscriptions/{subscriptionId}/resourcegroups/{resourceGroupName}/providers/microsoft.insights/alertrules/{ruleName}", - urlParameters: [ - Parameters.resourceGroupName, - Parameters.ruleName, - Parameters.subscriptionId - ], - queryParameters: [ - Parameters.apiVersion1 - ], - headerParameters: [ - Parameters.acceptLanguage - ], - responses: { - 200: { - bodyMapper: Mappers.AlertRuleResource - }, - default: { - bodyMapper: Mappers.CloudError - } - }, - serializer -}; - -const updateOperationSpec: msRest.OperationSpec = { - httpMethod: "PATCH", - path: "subscriptions/{subscriptionId}/resourcegroups/{resourceGroupName}/providers/microsoft.insights/alertrules/{ruleName}", - urlParameters: [ - Parameters.subscriptionId, - Parameters.resourceGroupName, - Parameters.ruleName - ], - queryParameters: [ - Parameters.apiVersion1 - ], - headerParameters: [ - Parameters.acceptLanguage - ], - requestBody: { - parameterPath: "alertRulesResource", - mapper: { - ...Mappers.AlertRuleResourcePatch, - required: true - } - }, - responses: { - 200: { - bodyMapper: Mappers.AlertRuleResource - }, - 201: { - bodyMapper: Mappers.AlertRuleResource - }, - default: { - bodyMapper: Mappers.ErrorResponse - } - }, - serializer -}; - -const listByResourceGroupOperationSpec: msRest.OperationSpec = { - httpMethod: "GET", - path: "subscriptions/{subscriptionId}/resourcegroups/{resourceGroupName}/providers/microsoft.insights/alertrules", - urlParameters: [ - Parameters.resourceGroupName, - Parameters.subscriptionId - ], - queryParameters: [ - Parameters.apiVersion1 - ], - headerParameters: [ - Parameters.acceptLanguage - ], - responses: { - 200: { - bodyMapper: Mappers.AlertRuleResourceCollection - }, - default: { - bodyMapper: Mappers.CloudError - } - }, - serializer -}; - -const listBySubscriptionOperationSpec: msRest.OperationSpec = { - httpMethod: "GET", - path: "subscriptions/{subscriptionId}/providers/microsoft.insights/alertrules", - urlParameters: [ - Parameters.subscriptionId - ], - queryParameters: [ - Parameters.apiVersion1 - ], - headerParameters: [ - Parameters.acceptLanguage - ], - responses: { - 200: { - bodyMapper: Mappers.AlertRuleResourceCollection - }, - default: { - bodyMapper: Mappers.CloudError - } - }, - serializer -}; diff --git a/sdk/monitor/arm-monitor/src/operations/autoscaleSettings.ts b/sdk/monitor/arm-monitor/src/operations/autoscaleSettings.ts deleted file mode 100644 index fa3828276d8e..000000000000 --- a/sdk/monitor/arm-monitor/src/operations/autoscaleSettings.ts +++ /dev/null @@ -1,480 +0,0 @@ -/* - * 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/autoscaleSettingsMappers"; -import * as Parameters from "../models/parameters"; -import { MonitorManagementClientContext } from "../monitorManagementClientContext"; - -/** Class representing a AutoscaleSettings. */ -export class AutoscaleSettings { - private readonly client: MonitorManagementClientContext; - - /** - * Create a AutoscaleSettings. - * @param {MonitorManagementClientContext} client Reference to the service client. - */ - constructor(client: MonitorManagementClientContext) { - this.client = client; - } - - /** - * Lists the autoscale settings for a resource group - * @param resourceGroupName The name of the resource group. - * @param [options] The optional parameters - * @returns Promise - */ - listByResourceGroup(resourceGroupName: string, options?: msRest.RequestOptionsBase): Promise; - /** - * @param resourceGroupName The name of the resource group. - * @param callback The callback - */ - listByResourceGroup(resourceGroupName: string, callback: msRest.ServiceCallback): void; - /** - * @param resourceGroupName The name of the resource group. - * @param options The optional parameters - * @param callback The callback - */ - listByResourceGroup(resourceGroupName: string, options: msRest.RequestOptionsBase, callback: msRest.ServiceCallback): void; - listByResourceGroup(resourceGroupName: string, options?: msRest.RequestOptionsBase | msRest.ServiceCallback, callback?: msRest.ServiceCallback): Promise { - return this.client.sendOperationRequest( - { - resourceGroupName, - options - }, - listByResourceGroupOperationSpec, - callback) as Promise; - } - - /** - * Creates or updates an autoscale setting. - * @param resourceGroupName The name of the resource group. - * @param autoscaleSettingName The autoscale setting name. - * @param parameters Parameters supplied to the operation. - * @param [options] The optional parameters - * @returns Promise - */ - createOrUpdate(resourceGroupName: string, autoscaleSettingName: string, parameters: Models.AutoscaleSettingResource, options?: msRest.RequestOptionsBase): Promise; - /** - * @param resourceGroupName The name of the resource group. - * @param autoscaleSettingName The autoscale setting name. - * @param parameters Parameters supplied to the operation. - * @param callback The callback - */ - createOrUpdate(resourceGroupName: string, autoscaleSettingName: string, parameters: Models.AutoscaleSettingResource, callback: msRest.ServiceCallback): void; - /** - * @param resourceGroupName The name of the resource group. - * @param autoscaleSettingName The autoscale setting name. - * @param parameters Parameters supplied to the operation. - * @param options The optional parameters - * @param callback The callback - */ - createOrUpdate(resourceGroupName: string, autoscaleSettingName: string, parameters: Models.AutoscaleSettingResource, options: msRest.RequestOptionsBase, callback: msRest.ServiceCallback): void; - createOrUpdate(resourceGroupName: string, autoscaleSettingName: string, parameters: Models.AutoscaleSettingResource, options?: msRest.RequestOptionsBase | msRest.ServiceCallback, callback?: msRest.ServiceCallback): Promise { - return this.client.sendOperationRequest( - { - resourceGroupName, - autoscaleSettingName, - parameters, - options - }, - createOrUpdateOperationSpec, - callback) as Promise; - } - - /** - * Deletes and autoscale setting - * @param resourceGroupName The name of the resource group. - * @param autoscaleSettingName The autoscale setting name. - * @param [options] The optional parameters - * @returns Promise - */ - deleteMethod(resourceGroupName: string, autoscaleSettingName: string, options?: msRest.RequestOptionsBase): Promise; - /** - * @param resourceGroupName The name of the resource group. - * @param autoscaleSettingName The autoscale setting name. - * @param callback The callback - */ - deleteMethod(resourceGroupName: string, autoscaleSettingName: string, callback: msRest.ServiceCallback): void; - /** - * @param resourceGroupName The name of the resource group. - * @param autoscaleSettingName The autoscale setting name. - * @param options The optional parameters - * @param callback The callback - */ - deleteMethod(resourceGroupName: string, autoscaleSettingName: string, options: msRest.RequestOptionsBase, callback: msRest.ServiceCallback): void; - deleteMethod(resourceGroupName: string, autoscaleSettingName: string, options?: msRest.RequestOptionsBase | msRest.ServiceCallback, callback?: msRest.ServiceCallback): Promise { - return this.client.sendOperationRequest( - { - resourceGroupName, - autoscaleSettingName, - options - }, - deleteMethodOperationSpec, - callback); - } - - /** - * Gets an autoscale setting - * @param resourceGroupName The name of the resource group. - * @param autoscaleSettingName The autoscale setting name. - * @param [options] The optional parameters - * @returns Promise - */ - get(resourceGroupName: string, autoscaleSettingName: string, options?: msRest.RequestOptionsBase): Promise; - /** - * @param resourceGroupName The name of the resource group. - * @param autoscaleSettingName The autoscale setting name. - * @param callback The callback - */ - get(resourceGroupName: string, autoscaleSettingName: string, callback: msRest.ServiceCallback): void; - /** - * @param resourceGroupName The name of the resource group. - * @param autoscaleSettingName The autoscale setting name. - * @param options The optional parameters - * @param callback The callback - */ - get(resourceGroupName: string, autoscaleSettingName: string, options: msRest.RequestOptionsBase, callback: msRest.ServiceCallback): void; - get(resourceGroupName: string, autoscaleSettingName: string, options?: msRest.RequestOptionsBase | msRest.ServiceCallback, callback?: msRest.ServiceCallback): Promise { - return this.client.sendOperationRequest( - { - resourceGroupName, - autoscaleSettingName, - options - }, - getOperationSpec, - callback) as Promise; - } - - /** - * Updates an existing AutoscaleSettingsResource. To update other fields use the CreateOrUpdate - * method. - * @param resourceGroupName The name of the resource group. - * @param autoscaleSettingName The autoscale setting name. - * @param autoscaleSettingResource Parameters supplied to the operation. - * @param [options] The optional parameters - * @returns Promise - */ - update(resourceGroupName: string, autoscaleSettingName: string, autoscaleSettingResource: Models.AutoscaleSettingResourcePatch, options?: msRest.RequestOptionsBase): Promise; - /** - * @param resourceGroupName The name of the resource group. - * @param autoscaleSettingName The autoscale setting name. - * @param autoscaleSettingResource Parameters supplied to the operation. - * @param callback The callback - */ - update(resourceGroupName: string, autoscaleSettingName: string, autoscaleSettingResource: Models.AutoscaleSettingResourcePatch, callback: msRest.ServiceCallback): void; - /** - * @param resourceGroupName The name of the resource group. - * @param autoscaleSettingName The autoscale setting name. - * @param autoscaleSettingResource Parameters supplied to the operation. - * @param options The optional parameters - * @param callback The callback - */ - update(resourceGroupName: string, autoscaleSettingName: string, autoscaleSettingResource: Models.AutoscaleSettingResourcePatch, options: msRest.RequestOptionsBase, callback: msRest.ServiceCallback): void; - update(resourceGroupName: string, autoscaleSettingName: string, autoscaleSettingResource: Models.AutoscaleSettingResourcePatch, options?: msRest.RequestOptionsBase | msRest.ServiceCallback, callback?: msRest.ServiceCallback): Promise { - return this.client.sendOperationRequest( - { - resourceGroupName, - autoscaleSettingName, - autoscaleSettingResource, - options - }, - updateOperationSpec, - callback) as Promise; - } - - /** - * Lists the autoscale settings for a subscription - * @param [options] The optional parameters - * @returns Promise - */ - listBySubscription(options?: msRest.RequestOptionsBase): Promise; - /** - * @param callback The callback - */ - listBySubscription(callback: msRest.ServiceCallback): void; - /** - * @param options The optional parameters - * @param callback The callback - */ - listBySubscription(options: msRest.RequestOptionsBase, callback: msRest.ServiceCallback): void; - listBySubscription(options?: msRest.RequestOptionsBase | msRest.ServiceCallback, callback?: msRest.ServiceCallback): Promise { - return this.client.sendOperationRequest( - { - options - }, - listBySubscriptionOperationSpec, - callback) as Promise; - } - - /** - * Lists the autoscale settings for a resource group - * @param nextPageLink The NextLink from the previous successful call to List operation. - * @param [options] The optional parameters - * @returns Promise - */ - listByResourceGroupNext(nextPageLink: string, options?: msRest.RequestOptionsBase): Promise; - /** - * @param nextPageLink The NextLink from the previous successful call to List operation. - * @param callback The callback - */ - listByResourceGroupNext(nextPageLink: string, callback: msRest.ServiceCallback): void; - /** - * @param nextPageLink The NextLink from the previous successful call to List operation. - * @param options The optional parameters - * @param callback The callback - */ - listByResourceGroupNext(nextPageLink: string, options: msRest.RequestOptionsBase, callback: msRest.ServiceCallback): void; - listByResourceGroupNext(nextPageLink: string, options?: msRest.RequestOptionsBase | msRest.ServiceCallback, callback?: msRest.ServiceCallback): Promise { - return this.client.sendOperationRequest( - { - nextPageLink, - options - }, - listByResourceGroupNextOperationSpec, - callback) as Promise; - } - - /** - * Lists the autoscale settings for a subscription - * @param nextPageLink The NextLink from the previous successful call to List operation. - * @param [options] The optional parameters - * @returns Promise - */ - listBySubscriptionNext(nextPageLink: string, options?: msRest.RequestOptionsBase): Promise; - /** - * @param nextPageLink The NextLink from the previous successful call to List operation. - * @param callback The callback - */ - listBySubscriptionNext(nextPageLink: string, callback: msRest.ServiceCallback): void; - /** - * @param nextPageLink The NextLink from the previous successful call to List operation. - * @param options The optional parameters - * @param callback The callback - */ - listBySubscriptionNext(nextPageLink: string, options: msRest.RequestOptionsBase, callback: msRest.ServiceCallback): void; - listBySubscriptionNext(nextPageLink: string, options?: msRest.RequestOptionsBase | msRest.ServiceCallback, callback?: msRest.ServiceCallback): Promise { - return this.client.sendOperationRequest( - { - nextPageLink, - options - }, - listBySubscriptionNextOperationSpec, - callback) as Promise; - } -} - -// Operation Specifications -const serializer = new msRest.Serializer(Mappers); -const listByResourceGroupOperationSpec: msRest.OperationSpec = { - httpMethod: "GET", - path: "subscriptions/{subscriptionId}/resourcegroups/{resourceGroupName}/providers/microsoft.insights/autoscalesettings", - urlParameters: [ - Parameters.resourceGroupName, - Parameters.subscriptionId - ], - queryParameters: [ - Parameters.apiVersion0 - ], - headerParameters: [ - Parameters.acceptLanguage - ], - responses: { - 200: { - bodyMapper: Mappers.AutoscaleSettingResourceCollection - }, - default: { - bodyMapper: Mappers.ErrorResponse - } - }, - serializer -}; - -const createOrUpdateOperationSpec: msRest.OperationSpec = { - httpMethod: "PUT", - path: "subscriptions/{subscriptionId}/resourcegroups/{resourceGroupName}/providers/microsoft.insights/autoscalesettings/{autoscaleSettingName}", - urlParameters: [ - Parameters.resourceGroupName, - Parameters.autoscaleSettingName, - Parameters.subscriptionId - ], - queryParameters: [ - Parameters.apiVersion0 - ], - headerParameters: [ - Parameters.acceptLanguage - ], - requestBody: { - parameterPath: "parameters", - mapper: { - ...Mappers.AutoscaleSettingResource, - required: true - } - }, - responses: { - 200: { - bodyMapper: Mappers.AutoscaleSettingResource - }, - 201: { - bodyMapper: Mappers.AutoscaleSettingResource - }, - default: { - bodyMapper: Mappers.ErrorResponse - } - }, - serializer -}; - -const deleteMethodOperationSpec: msRest.OperationSpec = { - httpMethod: "DELETE", - path: "subscriptions/{subscriptionId}/resourcegroups/{resourceGroupName}/providers/microsoft.insights/autoscalesettings/{autoscaleSettingName}", - urlParameters: [ - Parameters.resourceGroupName, - Parameters.autoscaleSettingName, - Parameters.subscriptionId - ], - queryParameters: [ - Parameters.apiVersion0 - ], - headerParameters: [ - Parameters.acceptLanguage - ], - responses: { - 200: {}, - 204: {}, - default: { - bodyMapper: Mappers.ErrorResponse - } - }, - serializer -}; - -const getOperationSpec: msRest.OperationSpec = { - httpMethod: "GET", - path: "subscriptions/{subscriptionId}/resourcegroups/{resourceGroupName}/providers/microsoft.insights/autoscalesettings/{autoscaleSettingName}", - urlParameters: [ - Parameters.resourceGroupName, - Parameters.autoscaleSettingName, - Parameters.subscriptionId - ], - queryParameters: [ - Parameters.apiVersion0 - ], - headerParameters: [ - Parameters.acceptLanguage - ], - responses: { - 200: { - bodyMapper: Mappers.AutoscaleSettingResource - }, - default: { - bodyMapper: Mappers.ErrorResponse - } - }, - serializer -}; - -const updateOperationSpec: msRest.OperationSpec = { - httpMethod: "PATCH", - path: "subscriptions/{subscriptionId}/resourcegroups/{resourceGroupName}/providers/microsoft.insights/autoscalesettings/{autoscaleSettingName}", - urlParameters: [ - Parameters.subscriptionId, - Parameters.resourceGroupName, - Parameters.autoscaleSettingName - ], - queryParameters: [ - Parameters.apiVersion0 - ], - headerParameters: [ - Parameters.acceptLanguage - ], - requestBody: { - parameterPath: "autoscaleSettingResource", - mapper: { - ...Mappers.AutoscaleSettingResourcePatch, - required: true - } - }, - responses: { - 200: { - bodyMapper: Mappers.AutoscaleSettingResource - }, - default: { - bodyMapper: Mappers.ErrorResponse - } - }, - serializer -}; - -const listBySubscriptionOperationSpec: msRest.OperationSpec = { - httpMethod: "GET", - path: "subscriptions/{subscriptionId}/providers/microsoft.insights/autoscalesettings", - urlParameters: [ - Parameters.subscriptionId - ], - queryParameters: [ - Parameters.apiVersion0 - ], - headerParameters: [ - Parameters.acceptLanguage - ], - responses: { - 200: { - bodyMapper: Mappers.AutoscaleSettingResourceCollection - }, - default: { - bodyMapper: Mappers.ErrorResponse - } - }, - serializer -}; - -const listByResourceGroupNextOperationSpec: msRest.OperationSpec = { - httpMethod: "GET", - baseUrl: "https://management.azure.com", - path: "{nextLink}", - urlParameters: [ - Parameters.nextPageLink - ], - headerParameters: [ - Parameters.acceptLanguage - ], - responses: { - 200: { - bodyMapper: Mappers.AutoscaleSettingResourceCollection - }, - default: { - bodyMapper: Mappers.ErrorResponse - } - }, - serializer -}; - -const listBySubscriptionNextOperationSpec: msRest.OperationSpec = { - httpMethod: "GET", - baseUrl: "https://management.azure.com", - path: "{nextLink}", - urlParameters: [ - Parameters.nextPageLink - ], - headerParameters: [ - Parameters.acceptLanguage - ], - responses: { - 200: { - bodyMapper: Mappers.AutoscaleSettingResourceCollection - }, - default: { - bodyMapper: Mappers.ErrorResponse - } - }, - serializer -}; diff --git a/sdk/monitor/arm-monitor/src/operations/baselines.ts b/sdk/monitor/arm-monitor/src/operations/baselines.ts deleted file mode 100644 index 60e9fb93f39a..000000000000 --- a/sdk/monitor/arm-monitor/src/operations/baselines.ts +++ /dev/null @@ -1,89 +0,0 @@ -/* - * 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.filter1, - 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/diagnosticSettingsCategoryOperations.ts b/sdk/monitor/arm-monitor/src/operations/diagnosticSettingsCategoryOperations.ts deleted file mode 100644 index 696518269cd8..000000000000 --- a/sdk/monitor/arm-monitor/src/operations/diagnosticSettingsCategoryOperations.ts +++ /dev/null @@ -1,137 +0,0 @@ -/* - * 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/diagnosticSettingsCategoryOperationsMappers"; -import * as Parameters from "../models/parameters"; -import { MonitorManagementClientContext } from "../monitorManagementClientContext"; - -/** Class representing a DiagnosticSettingsCategoryOperations. */ -export class DiagnosticSettingsCategoryOperations { - private readonly client: MonitorManagementClientContext; - - /** - * Create a DiagnosticSettingsCategoryOperations. - * @param {MonitorManagementClientContext} client Reference to the service client. - */ - constructor(client: MonitorManagementClientContext) { - this.client = client; - } - - /** - * Gets the diagnostic settings category for the specified resource. - * @param resourceUri The identifier of the resource. - * @param name The name of the diagnostic setting. - * @param [options] The optional parameters - * @returns Promise - */ - get(resourceUri: string, name: string, options?: msRest.RequestOptionsBase): Promise; - /** - * @param resourceUri The identifier of the resource. - * @param name The name of the diagnostic setting. - * @param callback The callback - */ - get(resourceUri: string, name: string, callback: msRest.ServiceCallback): void; - /** - * @param resourceUri The identifier of the resource. - * @param name The name of the diagnostic setting. - * @param options The optional parameters - * @param callback The callback - */ - get(resourceUri: string, name: string, options: msRest.RequestOptionsBase, callback: msRest.ServiceCallback): void; - get(resourceUri: string, name: string, options?: msRest.RequestOptionsBase | msRest.ServiceCallback, callback?: msRest.ServiceCallback): Promise { - return this.client.sendOperationRequest( - { - resourceUri, - name, - options - }, - getOperationSpec, - callback) as Promise; - } - - /** - * Lists the diagnostic settings categories for the specified resource. - * @param resourceUri The identifier of the resource. - * @param [options] The optional parameters - * @returns Promise - */ - list(resourceUri: string, options?: msRest.RequestOptionsBase): 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: msRest.RequestOptionsBase, callback: msRest.ServiceCallback): void; - list(resourceUri: string, options?: msRest.RequestOptionsBase | 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 getOperationSpec: msRest.OperationSpec = { - httpMethod: "GET", - path: "{resourceUri}/providers/microsoft.insights/diagnosticSettingsCategories/{name}", - urlParameters: [ - Parameters.resourceUri, - Parameters.name - ], - queryParameters: [ - Parameters.apiVersion2 - ], - headerParameters: [ - Parameters.acceptLanguage - ], - responses: { - 200: { - bodyMapper: Mappers.DiagnosticSettingsCategoryResource - }, - default: { - bodyMapper: Mappers.ErrorResponse - } - }, - serializer -}; - -const listOperationSpec: msRest.OperationSpec = { - httpMethod: "GET", - path: "{resourceUri}/providers/microsoft.insights/diagnosticSettingsCategories", - urlParameters: [ - Parameters.resourceUri - ], - queryParameters: [ - Parameters.apiVersion2 - ], - headerParameters: [ - Parameters.acceptLanguage - ], - responses: { - 200: { - bodyMapper: Mappers.DiagnosticSettingsCategoryResourceCollection - }, - default: { - bodyMapper: Mappers.ErrorResponse - } - }, - serializer -}; diff --git a/sdk/monitor/arm-monitor/src/operations/diagnosticSettingsOperations.ts b/sdk/monitor/arm-monitor/src/operations/diagnosticSettingsOperations.ts deleted file mode 100644 index 8153aa322d65..000000000000 --- a/sdk/monitor/arm-monitor/src/operations/diagnosticSettingsOperations.ts +++ /dev/null @@ -1,259 +0,0 @@ -/* - * 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/diagnosticSettingsOperationsMappers"; -import * as Parameters from "../models/parameters"; -import { MonitorManagementClientContext } from "../monitorManagementClientContext"; - -/** Class representing a DiagnosticSettingsOperations. */ -export class DiagnosticSettingsOperations { - private readonly client: MonitorManagementClientContext; - - /** - * Create a DiagnosticSettingsOperations. - * @param {MonitorManagementClientContext} client Reference to the service client. - */ - constructor(client: MonitorManagementClientContext) { - this.client = client; - } - - /** - * Gets the active diagnostic settings for the specified resource. - * @param resourceUri The identifier of the resource. - * @param name The name of the diagnostic setting. - * @param [options] The optional parameters - * @returns Promise - */ - get(resourceUri: string, name: string, options?: msRest.RequestOptionsBase): Promise; - /** - * @param resourceUri The identifier of the resource. - * @param name The name of the diagnostic setting. - * @param callback The callback - */ - get(resourceUri: string, name: string, callback: msRest.ServiceCallback): void; - /** - * @param resourceUri The identifier of the resource. - * @param name The name of the diagnostic setting. - * @param options The optional parameters - * @param callback The callback - */ - get(resourceUri: string, name: string, options: msRest.RequestOptionsBase, callback: msRest.ServiceCallback): void; - get(resourceUri: string, name: string, options?: msRest.RequestOptionsBase | msRest.ServiceCallback, callback?: msRest.ServiceCallback): Promise { - return this.client.sendOperationRequest( - { - resourceUri, - name, - options - }, - getOperationSpec, - callback) as Promise; - } - - /** - * Creates or updates diagnostic settings for the specified resource. - * @param resourceUri The identifier of the resource. - * @param parameters Parameters supplied to the operation. - * @param name The name of the diagnostic setting. - * @param [options] The optional parameters - * @returns Promise - */ - createOrUpdate(resourceUri: string, parameters: Models.DiagnosticSettingsResource, name: string, options?: msRest.RequestOptionsBase): Promise; - /** - * @param resourceUri The identifier of the resource. - * @param parameters Parameters supplied to the operation. - * @param name The name of the diagnostic setting. - * @param callback The callback - */ - createOrUpdate(resourceUri: string, parameters: Models.DiagnosticSettingsResource, name: string, callback: msRest.ServiceCallback): void; - /** - * @param resourceUri The identifier of the resource. - * @param parameters Parameters supplied to the operation. - * @param name The name of the diagnostic setting. - * @param options The optional parameters - * @param callback The callback - */ - createOrUpdate(resourceUri: string, parameters: Models.DiagnosticSettingsResource, name: string, options: msRest.RequestOptionsBase, callback: msRest.ServiceCallback): void; - createOrUpdate(resourceUri: string, parameters: Models.DiagnosticSettingsResource, name: string, options?: msRest.RequestOptionsBase | msRest.ServiceCallback, callback?: msRest.ServiceCallback): Promise { - return this.client.sendOperationRequest( - { - resourceUri, - parameters, - name, - options - }, - createOrUpdateOperationSpec, - callback) as Promise; - } - - /** - * Deletes existing diagnostic settings for the specified resource. - * @param resourceUri The identifier of the resource. - * @param name The name of the diagnostic setting. - * @param [options] The optional parameters - * @returns Promise - */ - deleteMethod(resourceUri: string, name: string, options?: msRest.RequestOptionsBase): Promise; - /** - * @param resourceUri The identifier of the resource. - * @param name The name of the diagnostic setting. - * @param callback The callback - */ - deleteMethod(resourceUri: string, name: string, callback: msRest.ServiceCallback): void; - /** - * @param resourceUri The identifier of the resource. - * @param name The name of the diagnostic setting. - * @param options The optional parameters - * @param callback The callback - */ - deleteMethod(resourceUri: string, name: string, options: msRest.RequestOptionsBase, callback: msRest.ServiceCallback): void; - deleteMethod(resourceUri: string, name: string, options?: msRest.RequestOptionsBase | msRest.ServiceCallback, callback?: msRest.ServiceCallback): Promise { - return this.client.sendOperationRequest( - { - resourceUri, - name, - options - }, - deleteMethodOperationSpec, - callback); - } - - /** - * Gets the active diagnostic settings list for the specified resource. - * @param resourceUri The identifier of the resource. - * @param [options] The optional parameters - * @returns Promise - */ - list(resourceUri: string, options?: msRest.RequestOptionsBase): 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: msRest.RequestOptionsBase, callback: msRest.ServiceCallback): void; - list(resourceUri: string, options?: msRest.RequestOptionsBase | 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 getOperationSpec: msRest.OperationSpec = { - httpMethod: "GET", - path: "{resourceUri}/providers/microsoft.insights/diagnosticSettings/{name}", - urlParameters: [ - Parameters.resourceUri, - Parameters.name - ], - queryParameters: [ - Parameters.apiVersion2 - ], - headerParameters: [ - Parameters.acceptLanguage - ], - responses: { - 200: { - bodyMapper: Mappers.DiagnosticSettingsResource - }, - default: { - bodyMapper: Mappers.ErrorResponse - } - }, - serializer -}; - -const createOrUpdateOperationSpec: msRest.OperationSpec = { - httpMethod: "PUT", - path: "{resourceUri}/providers/microsoft.insights/diagnosticSettings/{name}", - urlParameters: [ - Parameters.resourceUri, - Parameters.name - ], - queryParameters: [ - Parameters.apiVersion2 - ], - headerParameters: [ - Parameters.acceptLanguage - ], - requestBody: { - parameterPath: "parameters", - mapper: { - ...Mappers.DiagnosticSettingsResource, - required: true - } - }, - responses: { - 200: { - bodyMapper: Mappers.DiagnosticSettingsResource - }, - default: { - bodyMapper: Mappers.ErrorResponse - } - }, - serializer -}; - -const deleteMethodOperationSpec: msRest.OperationSpec = { - httpMethod: "DELETE", - path: "{resourceUri}/providers/microsoft.insights/diagnosticSettings/{name}", - urlParameters: [ - Parameters.resourceUri, - Parameters.name - ], - queryParameters: [ - Parameters.apiVersion2 - ], - headerParameters: [ - Parameters.acceptLanguage - ], - responses: { - 200: {}, - 204: {}, - default: { - bodyMapper: Mappers.ErrorResponse - } - }, - serializer -}; - -const listOperationSpec: msRest.OperationSpec = { - httpMethod: "GET", - path: "{resourceUri}/providers/microsoft.insights/diagnosticSettings", - urlParameters: [ - Parameters.resourceUri - ], - queryParameters: [ - Parameters.apiVersion2 - ], - headerParameters: [ - Parameters.acceptLanguage - ], - responses: { - 200: { - bodyMapper: Mappers.DiagnosticSettingsResourceCollection - }, - default: { - bodyMapper: Mappers.ErrorResponse - } - }, - serializer -}; diff --git a/sdk/monitor/arm-monitor/src/operations/eventCategories.ts b/sdk/monitor/arm-monitor/src/operations/eventCategories.ts deleted file mode 100644 index 67bd8f4311b4..000000000000 --- a/sdk/monitor/arm-monitor/src/operations/eventCategories.ts +++ /dev/null @@ -1,76 +0,0 @@ -/* - * 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/eventCategoriesMappers"; -import * as Parameters from "../models/parameters"; -import { MonitorManagementClientContext } from "../monitorManagementClientContext"; - -/** Class representing a EventCategories. */ -export class EventCategories { - private readonly client: MonitorManagementClientContext; - - /** - * Create a EventCategories. - * @param {MonitorManagementClientContext} client Reference to the service client. - */ - constructor(client: MonitorManagementClientContext) { - this.client = client; - } - - /** - * Get the list of available event categories supported in the Activity Logs Service.
The - * current list includes the following: Administrative, Security, ServiceHealth, Alert, - * Recommendation, Policy. - * @param [options] The optional parameters - * @returns Promise - */ - list(options?: msRest.RequestOptionsBase): Promise; - /** - * @param callback The callback - */ - list(callback: msRest.ServiceCallback): void; - /** - * @param options The optional parameters - * @param callback The callback - */ - list(options: msRest.RequestOptionsBase, callback: msRest.ServiceCallback): void; - list(options?: msRest.RequestOptionsBase | msRest.ServiceCallback, callback?: msRest.ServiceCallback): Promise { - return this.client.sendOperationRequest( - { - options - }, - listOperationSpec, - callback) as Promise; - } -} - -// Operation Specifications -const serializer = new msRest.Serializer(Mappers); -const listOperationSpec: msRest.OperationSpec = { - httpMethod: "GET", - path: "providers/microsoft.insights/eventcategories", - queryParameters: [ - Parameters.apiVersion0 - ], - headerParameters: [ - Parameters.acceptLanguage - ], - responses: { - 200: { - bodyMapper: Mappers.EventCategoryCollection - }, - 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 a7964c5cac32..a823f9b8b6c3 100644 --- a/sdk/monitor/arm-monitor/src/operations/index.ts +++ b/sdk/monitor/arm-monitor/src/operations/index.ts @@ -1,31 +1,10 @@ /* - * Copyright (c) Microsoft Corporation. All rights reserved. - * Licensed under the MIT License. See License.txt in the project root for - * license information. + * Copyright (c) Microsoft Corporation. + * Licensed under the MIT License. * * Code generated by Microsoft (R) AutoRest Code Generator. * Changes may cause incorrect behavior and will be lost if the code is * regenerated. */ -export * from "./autoscaleSettings"; -export * from "./operations"; -export * from "./alertRuleIncidents"; -export * from "./alertRules"; -export * from "./logProfiles"; -export * from "./diagnosticSettingsOperations"; -export * from "./diagnosticSettingsCategoryOperations"; -export * from "./actionGroups"; export * from "./activityLogAlerts"; -export * from "./activityLogs"; -export * from "./eventCategories"; -export * from "./tenantActivityLogs"; -export * from "./metricDefinitions"; -export * from "./metrics"; -export * from "./metricBaseline"; -export * from "./baselines"; -export * from "./metricAlerts"; -export * from "./metricAlertsStatus"; -export * from "./scheduledQueryRules"; -export * from "./metricNamespaces"; -export * from "./vMInsights"; diff --git a/sdk/monitor/arm-monitor/src/operations/logProfiles.ts b/sdk/monitor/arm-monitor/src/operations/logProfiles.ts deleted file mode 100644 index 1ae52e5613b7..000000000000 --- a/sdk/monitor/arm-monitor/src/operations/logProfiles.ts +++ /dev/null @@ -1,305 +0,0 @@ -/* - * 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/logProfilesMappers"; -import * as Parameters from "../models/parameters"; -import { MonitorManagementClientContext } from "../monitorManagementClientContext"; - -/** Class representing a LogProfiles. */ -export class LogProfiles { - private readonly client: MonitorManagementClientContext; - - /** - * Create a LogProfiles. - * @param {MonitorManagementClientContext} client Reference to the service client. - */ - constructor(client: MonitorManagementClientContext) { - this.client = client; - } - - /** - * Deletes the log profile. - * @param logProfileName The name of the log profile. - * @param [options] The optional parameters - * @returns Promise - */ - deleteMethod(logProfileName: string, options?: msRest.RequestOptionsBase): Promise; - /** - * @param logProfileName The name of the log profile. - * @param callback The callback - */ - deleteMethod(logProfileName: string, callback: msRest.ServiceCallback): void; - /** - * @param logProfileName The name of the log profile. - * @param options The optional parameters - * @param callback The callback - */ - deleteMethod(logProfileName: string, options: msRest.RequestOptionsBase, callback: msRest.ServiceCallback): void; - deleteMethod(logProfileName: string, options?: msRest.RequestOptionsBase | msRest.ServiceCallback, callback?: msRest.ServiceCallback): Promise { - return this.client.sendOperationRequest( - { - logProfileName, - options - }, - deleteMethodOperationSpec, - callback); - } - - /** - * Gets the log profile. - * @param logProfileName The name of the log profile. - * @param [options] The optional parameters - * @returns Promise - */ - get(logProfileName: string, options?: msRest.RequestOptionsBase): Promise; - /** - * @param logProfileName The name of the log profile. - * @param callback The callback - */ - get(logProfileName: string, callback: msRest.ServiceCallback): void; - /** - * @param logProfileName The name of the log profile. - * @param options The optional parameters - * @param callback The callback - */ - get(logProfileName: string, options: msRest.RequestOptionsBase, callback: msRest.ServiceCallback): void; - get(logProfileName: string, options?: msRest.RequestOptionsBase | msRest.ServiceCallback, callback?: msRest.ServiceCallback): Promise { - return this.client.sendOperationRequest( - { - logProfileName, - options - }, - getOperationSpec, - callback) as Promise; - } - - /** - * Create or update a log profile in Azure Monitoring REST API. - * @param logProfileName The name of the log profile. - * @param parameters Parameters supplied to the operation. - * @param [options] The optional parameters - * @returns Promise - */ - createOrUpdate(logProfileName: string, parameters: Models.LogProfileResource, options?: msRest.RequestOptionsBase): Promise; - /** - * @param logProfileName The name of the log profile. - * @param parameters Parameters supplied to the operation. - * @param callback The callback - */ - createOrUpdate(logProfileName: string, parameters: Models.LogProfileResource, callback: msRest.ServiceCallback): void; - /** - * @param logProfileName The name of the log profile. - * @param parameters Parameters supplied to the operation. - * @param options The optional parameters - * @param callback The callback - */ - createOrUpdate(logProfileName: string, parameters: Models.LogProfileResource, options: msRest.RequestOptionsBase, callback: msRest.ServiceCallback): void; - createOrUpdate(logProfileName: string, parameters: Models.LogProfileResource, options?: msRest.RequestOptionsBase | msRest.ServiceCallback, callback?: msRest.ServiceCallback): Promise { - return this.client.sendOperationRequest( - { - logProfileName, - parameters, - options - }, - createOrUpdateOperationSpec, - callback) as Promise; - } - - /** - * Updates an existing LogProfilesResource. To update other fields use the CreateOrUpdate method. - * @param logProfileName The name of the log profile. - * @param logProfilesResource Parameters supplied to the operation. - * @param [options] The optional parameters - * @returns Promise - */ - update(logProfileName: string, logProfilesResource: Models.LogProfileResourcePatch, options?: msRest.RequestOptionsBase): Promise; - /** - * @param logProfileName The name of the log profile. - * @param logProfilesResource Parameters supplied to the operation. - * @param callback The callback - */ - update(logProfileName: string, logProfilesResource: Models.LogProfileResourcePatch, callback: msRest.ServiceCallback): void; - /** - * @param logProfileName The name of the log profile. - * @param logProfilesResource Parameters supplied to the operation. - * @param options The optional parameters - * @param callback The callback - */ - update(logProfileName: string, logProfilesResource: Models.LogProfileResourcePatch, options: msRest.RequestOptionsBase, callback: msRest.ServiceCallback): void; - update(logProfileName: string, logProfilesResource: Models.LogProfileResourcePatch, options?: msRest.RequestOptionsBase | msRest.ServiceCallback, callback?: msRest.ServiceCallback): Promise { - return this.client.sendOperationRequest( - { - logProfileName, - logProfilesResource, - options - }, - updateOperationSpec, - callback) as Promise; - } - - /** - * List the log profiles. - * @param [options] The optional parameters - * @returns Promise - */ - list(options?: msRest.RequestOptionsBase): Promise; - /** - * @param callback The callback - */ - list(callback: msRest.ServiceCallback): void; - /** - * @param options The optional parameters - * @param callback The callback - */ - list(options: msRest.RequestOptionsBase, callback: msRest.ServiceCallback): void; - list(options?: msRest.RequestOptionsBase | msRest.ServiceCallback, callback?: msRest.ServiceCallback): Promise { - return this.client.sendOperationRequest( - { - options - }, - listOperationSpec, - callback) as Promise; - } -} - -// Operation Specifications -const serializer = new msRest.Serializer(Mappers); -const deleteMethodOperationSpec: msRest.OperationSpec = { - httpMethod: "DELETE", - path: "subscriptions/{subscriptionId}/providers/microsoft.insights/logprofiles/{logProfileName}", - urlParameters: [ - Parameters.logProfileName, - Parameters.subscriptionId - ], - queryParameters: [ - Parameters.apiVersion1 - ], - headerParameters: [ - Parameters.acceptLanguage - ], - responses: { - 200: {}, - default: { - bodyMapper: Mappers.CloudError - } - }, - serializer -}; - -const getOperationSpec: msRest.OperationSpec = { - httpMethod: "GET", - path: "subscriptions/{subscriptionId}/providers/microsoft.insights/logprofiles/{logProfileName}", - urlParameters: [ - Parameters.logProfileName, - Parameters.subscriptionId - ], - queryParameters: [ - Parameters.apiVersion1 - ], - headerParameters: [ - Parameters.acceptLanguage - ], - responses: { - 200: { - bodyMapper: Mappers.LogProfileResource - }, - default: { - bodyMapper: Mappers.ErrorResponse - } - }, - serializer -}; - -const createOrUpdateOperationSpec: msRest.OperationSpec = { - httpMethod: "PUT", - path: "subscriptions/{subscriptionId}/providers/microsoft.insights/logprofiles/{logProfileName}", - urlParameters: [ - Parameters.logProfileName, - Parameters.subscriptionId - ], - queryParameters: [ - Parameters.apiVersion1 - ], - headerParameters: [ - Parameters.acceptLanguage - ], - requestBody: { - parameterPath: "parameters", - mapper: { - ...Mappers.LogProfileResource, - required: true - } - }, - responses: { - 200: { - bodyMapper: Mappers.LogProfileResource - }, - default: { - bodyMapper: Mappers.CloudError - } - }, - serializer -}; - -const updateOperationSpec: msRest.OperationSpec = { - httpMethod: "PATCH", - path: "subscriptions/{subscriptionId}/providers/microsoft.insights/logprofiles/{logProfileName}", - urlParameters: [ - Parameters.subscriptionId, - Parameters.logProfileName - ], - queryParameters: [ - Parameters.apiVersion1 - ], - headerParameters: [ - Parameters.acceptLanguage - ], - requestBody: { - parameterPath: "logProfilesResource", - mapper: { - ...Mappers.LogProfileResourcePatch, - required: true - } - }, - responses: { - 200: { - bodyMapper: Mappers.LogProfileResource - }, - default: { - bodyMapper: Mappers.ErrorResponse - } - }, - serializer -}; - -const listOperationSpec: msRest.OperationSpec = { - httpMethod: "GET", - path: "subscriptions/{subscriptionId}/providers/microsoft.insights/logprofiles", - urlParameters: [ - Parameters.subscriptionId - ], - queryParameters: [ - Parameters.apiVersion1 - ], - headerParameters: [ - Parameters.acceptLanguage - ], - responses: { - 200: { - bodyMapper: Mappers.LogProfileCollection - }, - default: { - bodyMapper: Mappers.CloudError - } - }, - serializer -}; diff --git a/sdk/monitor/arm-monitor/src/operations/metricAlerts.ts b/sdk/monitor/arm-monitor/src/operations/metricAlerts.ts deleted file mode 100644 index f7d435bd6048..000000000000 --- a/sdk/monitor/arm-monitor/src/operations/metricAlerts.ts +++ /dev/null @@ -1,378 +0,0 @@ -/* - * 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/metricAlertsMappers"; -import * as Parameters from "../models/parameters"; -import { MonitorManagementClientContext } from "../monitorManagementClientContext"; - -/** Class representing a MetricAlerts. */ -export class MetricAlerts { - private readonly client: MonitorManagementClientContext; - - /** - * Create a MetricAlerts. - * @param {MonitorManagementClientContext} client Reference to the service client. - */ - constructor(client: MonitorManagementClientContext) { - this.client = client; - } - - /** - * Retrieve alert rule definitions in a subscription. - * @param [options] The optional parameters - * @returns Promise - */ - listBySubscription(options?: msRest.RequestOptionsBase): Promise; - /** - * @param callback The callback - */ - listBySubscription(callback: msRest.ServiceCallback): void; - /** - * @param options The optional parameters - * @param callback The callback - */ - listBySubscription(options: msRest.RequestOptionsBase, callback: msRest.ServiceCallback): void; - listBySubscription(options?: msRest.RequestOptionsBase | msRest.ServiceCallback, callback?: msRest.ServiceCallback): Promise { - return this.client.sendOperationRequest( - { - options - }, - listBySubscriptionOperationSpec, - callback) as Promise; - } - - /** - * Retrieve alert rule definitions in a resource group. - * @param resourceGroupName The name of the resource group. - * @param [options] The optional parameters - * @returns Promise - */ - listByResourceGroup(resourceGroupName: string, options?: msRest.RequestOptionsBase): Promise; - /** - * @param resourceGroupName The name of the resource group. - * @param callback The callback - */ - listByResourceGroup(resourceGroupName: string, callback: msRest.ServiceCallback): void; - /** - * @param resourceGroupName The name of the resource group. - * @param options The optional parameters - * @param callback The callback - */ - listByResourceGroup(resourceGroupName: string, options: msRest.RequestOptionsBase, callback: msRest.ServiceCallback): void; - listByResourceGroup(resourceGroupName: string, options?: msRest.RequestOptionsBase | msRest.ServiceCallback, callback?: msRest.ServiceCallback): Promise { - return this.client.sendOperationRequest( - { - resourceGroupName, - options - }, - listByResourceGroupOperationSpec, - callback) as Promise; - } - - /** - * Retrieve an alert rule definition. - * @param resourceGroupName The name of the resource group. - * @param ruleName The name of the rule. - * @param [options] The optional parameters - * @returns Promise - */ - get(resourceGroupName: string, ruleName: string, options?: msRest.RequestOptionsBase): Promise; - /** - * @param resourceGroupName The name of the resource group. - * @param ruleName The name of the rule. - * @param callback The callback - */ - get(resourceGroupName: string, ruleName: string, callback: msRest.ServiceCallback): void; - /** - * @param resourceGroupName The name of the resource group. - * @param ruleName The name of the rule. - * @param options The optional parameters - * @param callback The callback - */ - get(resourceGroupName: string, ruleName: string, options: msRest.RequestOptionsBase, callback: msRest.ServiceCallback): void; - get(resourceGroupName: string, ruleName: string, options?: msRest.RequestOptionsBase | msRest.ServiceCallback, callback?: msRest.ServiceCallback): Promise { - return this.client.sendOperationRequest( - { - resourceGroupName, - ruleName, - options - }, - getOperationSpec, - callback) as Promise; - } - - /** - * Create or update an metric alert definition. - * @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. - * @param [options] The optional parameters - * @returns Promise - */ - createOrUpdate(resourceGroupName: string, ruleName: string, parameters: Models.MetricAlertResource, options?: msRest.RequestOptionsBase): Promise; - /** - * @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. - * @param callback The callback - */ - createOrUpdate(resourceGroupName: string, ruleName: string, parameters: Models.MetricAlertResource, callback: msRest.ServiceCallback): void; - /** - * @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. - * @param options The optional parameters - * @param callback The callback - */ - createOrUpdate(resourceGroupName: string, ruleName: string, parameters: Models.MetricAlertResource, options: msRest.RequestOptionsBase, callback: msRest.ServiceCallback): void; - createOrUpdate(resourceGroupName: string, ruleName: string, parameters: Models.MetricAlertResource, options?: msRest.RequestOptionsBase | msRest.ServiceCallback, callback?: msRest.ServiceCallback): Promise { - return this.client.sendOperationRequest( - { - resourceGroupName, - ruleName, - parameters, - options - }, - createOrUpdateOperationSpec, - callback) as Promise; - } - - /** - * Update an metric alert definition. - * @param resourceGroupName The name of the resource group. - * @param ruleName The name of the rule. - * @param parameters The parameters of the rule to update. - * @param [options] The optional parameters - * @returns Promise - */ - update(resourceGroupName: string, ruleName: string, parameters: Models.MetricAlertResourcePatch, options?: msRest.RequestOptionsBase): Promise; - /** - * @param resourceGroupName The name of the resource group. - * @param ruleName The name of the rule. - * @param parameters The parameters of the rule to update. - * @param callback The callback - */ - update(resourceGroupName: string, ruleName: string, parameters: Models.MetricAlertResourcePatch, callback: msRest.ServiceCallback): void; - /** - * @param resourceGroupName The name of the resource group. - * @param ruleName The name of the rule. - * @param parameters The parameters of the rule to update. - * @param options The optional parameters - * @param callback The callback - */ - update(resourceGroupName: string, ruleName: string, parameters: Models.MetricAlertResourcePatch, options: msRest.RequestOptionsBase, callback: msRest.ServiceCallback): void; - update(resourceGroupName: string, ruleName: string, parameters: Models.MetricAlertResourcePatch, options?: msRest.RequestOptionsBase | msRest.ServiceCallback, callback?: msRest.ServiceCallback): Promise { - return this.client.sendOperationRequest( - { - resourceGroupName, - ruleName, - parameters, - options - }, - updateOperationSpec, - callback) as Promise; - } - - /** - * Delete an alert rule definition. - * @param resourceGroupName The name of the resource group. - * @param ruleName The name of the rule. - * @param [options] The optional parameters - * @returns Promise - */ - deleteMethod(resourceGroupName: string, ruleName: string, options?: msRest.RequestOptionsBase): Promise; - /** - * @param resourceGroupName The name of the resource group. - * @param ruleName The name of the rule. - * @param callback The callback - */ - deleteMethod(resourceGroupName: string, ruleName: string, callback: msRest.ServiceCallback): void; - /** - * @param resourceGroupName The name of the resource group. - * @param ruleName The name of the rule. - * @param options The optional parameters - * @param callback The callback - */ - deleteMethod(resourceGroupName: string, ruleName: string, options: msRest.RequestOptionsBase, callback: msRest.ServiceCallback): void; - deleteMethod(resourceGroupName: string, ruleName: string, options?: msRest.RequestOptionsBase | msRest.ServiceCallback, callback?: msRest.ServiceCallback): Promise { - return this.client.sendOperationRequest( - { - resourceGroupName, - ruleName, - options - }, - deleteMethodOperationSpec, - callback); - } -} - -// Operation Specifications -const serializer = new msRest.Serializer(Mappers); -const listBySubscriptionOperationSpec: msRest.OperationSpec = { - httpMethod: "GET", - path: "subscriptions/{subscriptionId}/providers/Microsoft.Insights/metricAlerts", - urlParameters: [ - Parameters.subscriptionId - ], - queryParameters: [ - Parameters.apiVersion8 - ], - headerParameters: [ - Parameters.acceptLanguage - ], - responses: { - 200: { - bodyMapper: Mappers.MetricAlertResourceCollection - }, - default: { - bodyMapper: Mappers.ErrorResponse - } - }, - serializer -}; - -const listByResourceGroupOperationSpec: msRest.OperationSpec = { - httpMethod: "GET", - path: "subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Insights/metricAlerts", - urlParameters: [ - Parameters.subscriptionId, - Parameters.resourceGroupName - ], - queryParameters: [ - Parameters.apiVersion8 - ], - headerParameters: [ - Parameters.acceptLanguage - ], - responses: { - 200: { - bodyMapper: Mappers.MetricAlertResourceCollection - }, - default: { - bodyMapper: Mappers.ErrorResponse - } - }, - serializer -}; - -const getOperationSpec: msRest.OperationSpec = { - httpMethod: "GET", - path: "subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Insights/metricAlerts/{ruleName}", - urlParameters: [ - Parameters.subscriptionId, - Parameters.resourceGroupName, - Parameters.ruleName - ], - queryParameters: [ - Parameters.apiVersion8 - ], - headerParameters: [ - Parameters.acceptLanguage - ], - responses: { - 200: { - bodyMapper: Mappers.MetricAlertResource - }, - default: { - bodyMapper: Mappers.ErrorResponse - } - }, - serializer -}; - -const createOrUpdateOperationSpec: msRest.OperationSpec = { - httpMethod: "PUT", - path: "subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Insights/metricAlerts/{ruleName}", - urlParameters: [ - Parameters.subscriptionId, - Parameters.resourceGroupName, - Parameters.ruleName - ], - queryParameters: [ - Parameters.apiVersion8 - ], - headerParameters: [ - Parameters.acceptLanguage - ], - requestBody: { - parameterPath: "parameters", - mapper: { - ...Mappers.MetricAlertResource, - required: true - } - }, - responses: { - 200: { - bodyMapper: Mappers.MetricAlertResource - }, - default: { - bodyMapper: Mappers.ErrorResponse - } - }, - serializer -}; - -const updateOperationSpec: msRest.OperationSpec = { - httpMethod: "PATCH", - path: "subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Insights/metricAlerts/{ruleName}", - urlParameters: [ - Parameters.subscriptionId, - Parameters.resourceGroupName, - Parameters.ruleName - ], - queryParameters: [ - Parameters.apiVersion8 - ], - headerParameters: [ - Parameters.acceptLanguage - ], - requestBody: { - parameterPath: "parameters", - mapper: { - ...Mappers.MetricAlertResourcePatch, - required: true - } - }, - responses: { - 200: { - bodyMapper: Mappers.MetricAlertResource - }, - default: { - bodyMapper: Mappers.ErrorResponse - } - }, - serializer -}; - -const deleteMethodOperationSpec: msRest.OperationSpec = { - httpMethod: "DELETE", - path: "subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Insights/metricAlerts/{ruleName}", - urlParameters: [ - Parameters.subscriptionId, - Parameters.resourceGroupName, - Parameters.ruleName - ], - queryParameters: [ - Parameters.apiVersion8 - ], - headerParameters: [ - Parameters.acceptLanguage - ], - responses: { - 200: {}, - 204: {}, - default: { - bodyMapper: Mappers.CloudError - } - }, - serializer -}; diff --git a/sdk/monitor/arm-monitor/src/operations/metricAlertsStatus.ts b/sdk/monitor/arm-monitor/src/operations/metricAlertsStatus.ts deleted file mode 100644 index 018c13a6bff6..000000000000 --- a/sdk/monitor/arm-monitor/src/operations/metricAlertsStatus.ts +++ /dev/null @@ -1,149 +0,0 @@ -/* - * 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/metricAlertsStatusMappers"; -import * as Parameters from "../models/parameters"; -import { MonitorManagementClientContext } from "../monitorManagementClientContext"; - -/** Class representing a MetricAlertsStatus. */ -export class MetricAlertsStatus { - private readonly client: MonitorManagementClientContext; - - /** - * Create a MetricAlertsStatus. - * @param {MonitorManagementClientContext} client Reference to the service client. - */ - constructor(client: MonitorManagementClientContext) { - this.client = client; - } - - /** - * Retrieve an alert rule status. - * @param resourceGroupName The name of the resource group. - * @param ruleName The name of the rule. - * @param [options] The optional parameters - * @returns Promise - */ - list(resourceGroupName: string, ruleName: string, options?: msRest.RequestOptionsBase): Promise; - /** - * @param resourceGroupName The name of the resource group. - * @param ruleName The name of the rule. - * @param callback The callback - */ - list(resourceGroupName: string, ruleName: string, callback: msRest.ServiceCallback): void; - /** - * @param resourceGroupName The name of the resource group. - * @param ruleName The name of the rule. - * @param options The optional parameters - * @param callback The callback - */ - list(resourceGroupName: string, ruleName: string, options: msRest.RequestOptionsBase, callback: msRest.ServiceCallback): void; - list(resourceGroupName: string, ruleName: string, options?: msRest.RequestOptionsBase | msRest.ServiceCallback, callback?: msRest.ServiceCallback): Promise { - return this.client.sendOperationRequest( - { - resourceGroupName, - ruleName, - options - }, - listOperationSpec, - callback) as Promise; - } - - /** - * Retrieve an alert rule status. - * @param resourceGroupName The name of the resource group. - * @param ruleName The name of the rule. - * @param statusName The name of the status. - * @param [options] The optional parameters - * @returns Promise - */ - listByName(resourceGroupName: string, ruleName: string, statusName: string, options?: msRest.RequestOptionsBase): Promise; - /** - * @param resourceGroupName The name of the resource group. - * @param ruleName The name of the rule. - * @param statusName The name of the status. - * @param callback The callback - */ - listByName(resourceGroupName: string, ruleName: string, statusName: string, callback: msRest.ServiceCallback): void; - /** - * @param resourceGroupName The name of the resource group. - * @param ruleName The name of the rule. - * @param statusName The name of the status. - * @param options The optional parameters - * @param callback The callback - */ - listByName(resourceGroupName: string, ruleName: string, statusName: string, options: msRest.RequestOptionsBase, callback: msRest.ServiceCallback): void; - listByName(resourceGroupName: string, ruleName: string, statusName: string, options?: msRest.RequestOptionsBase | msRest.ServiceCallback, callback?: msRest.ServiceCallback): Promise { - return this.client.sendOperationRequest( - { - resourceGroupName, - ruleName, - statusName, - options - }, - listByNameOperationSpec, - callback) as Promise; - } -} - -// Operation Specifications -const serializer = new msRest.Serializer(Mappers); -const listOperationSpec: msRest.OperationSpec = { - httpMethod: "GET", - path: "subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Insights/metricAlerts/{ruleName}/status", - urlParameters: [ - Parameters.subscriptionId, - Parameters.resourceGroupName, - Parameters.ruleName - ], - queryParameters: [ - Parameters.apiVersion8 - ], - headerParameters: [ - Parameters.acceptLanguage - ], - responses: { - 200: { - bodyMapper: Mappers.MetricAlertStatusCollection - }, - default: { - bodyMapper: Mappers.ErrorResponse - } - }, - serializer -}; - -const listByNameOperationSpec: msRest.OperationSpec = { - httpMethod: "GET", - path: "subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Insights/metricAlerts/{ruleName}/status/{statusName}", - urlParameters: [ - Parameters.subscriptionId, - Parameters.resourceGroupName, - Parameters.ruleName, - Parameters.statusName - ], - queryParameters: [ - Parameters.apiVersion8 - ], - headerParameters: [ - Parameters.acceptLanguage - ], - responses: { - 200: { - bodyMapper: Mappers.MetricAlertStatusCollection - }, - default: { - bodyMapper: Mappers.ErrorResponse - } - }, - serializer -}; diff --git a/sdk/monitor/arm-monitor/src/operations/metricBaseline.ts b/sdk/monitor/arm-monitor/src/operations/metricBaseline.ts deleted file mode 100644 index 0cd73b9d1c3e..000000000000 --- a/sdk/monitor/arm-monitor/src/operations/metricBaseline.ts +++ /dev/null @@ -1,174 +0,0 @@ -/* - * 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/metricBaselineMappers"; -import * as Parameters from "../models/parameters"; -import { MonitorManagementClientContext } from "../monitorManagementClientContext"; - -/** Class representing a MetricBaseline. */ -export class MetricBaseline { - private readonly client: MonitorManagementClientContext; - - /** - * Create a MetricBaseline. - * @param {MonitorManagementClientContext} client Reference to the service client. - */ - constructor(client: MonitorManagementClientContext) { - this.client = client; - } - - /** - * **Gets the baseline values for a specific metric**. - * @param resourceUri The identifier of the resource. It has the following structure: - * subscriptions/{subscriptionName}/resourceGroups/{resourceGroupName}/providers/{providerName}/{resourceName}. - * For example: - * subscriptions/b368ca2f-e298-46b7-b0ab-012281956afa/resourceGroups/vms/providers/Microsoft.Compute/virtualMachines/vm1 - * @param metricName The name of the metric to retrieve the baseline for. - * @param [options] The optional parameters - * @returns Promise - */ - get(resourceUri: string, metricName: string, options?: Models.MetricBaselineGetOptionalParams): Promise; - /** - * @param resourceUri The identifier of the resource. It has the following structure: - * subscriptions/{subscriptionName}/resourceGroups/{resourceGroupName}/providers/{providerName}/{resourceName}. - * For example: - * subscriptions/b368ca2f-e298-46b7-b0ab-012281956afa/resourceGroups/vms/providers/Microsoft.Compute/virtualMachines/vm1 - * @param metricName The name of the metric to retrieve the baseline for. - * @param callback The callback - */ - get(resourceUri: string, metricName: string, callback: msRest.ServiceCallback): void; - /** - * @param resourceUri The identifier of the resource. It has the following structure: - * subscriptions/{subscriptionName}/resourceGroups/{resourceGroupName}/providers/{providerName}/{resourceName}. - * For example: - * subscriptions/b368ca2f-e298-46b7-b0ab-012281956afa/resourceGroups/vms/providers/Microsoft.Compute/virtualMachines/vm1 - * @param metricName The name of the metric to retrieve the baseline for. - * @param options The optional parameters - * @param callback The callback - */ - get(resourceUri: string, metricName: string, options: Models.MetricBaselineGetOptionalParams, callback: msRest.ServiceCallback): void; - get(resourceUri: string, metricName: string, options?: Models.MetricBaselineGetOptionalParams | msRest.ServiceCallback, callback?: msRest.ServiceCallback): Promise { - return this.client.sendOperationRequest( - { - resourceUri, - metricName, - options - }, - getOperationSpec, - callback) as Promise; - } - - /** - * **Lists the baseline values for a resource**. - * @param resourceUri The identifier of the resource. It has the following structure: - * subscriptions/{subscriptionName}/resourceGroups/{resourceGroupName}/providers/{providerName}/{resourceName}. - * For example: - * subscriptions/b368ca2f-e298-46b7-b0ab-012281956afa/resourceGroups/vms/providers/Microsoft.Compute/virtualMachines/vm1 - * @param timeSeriesInformation Information that need to be specified to calculate a baseline on a - * time series. - * @param [options] The optional parameters - * @returns Promise - */ - calculateBaseline(resourceUri: string, timeSeriesInformation: Models.TimeSeriesInformation, options?: msRest.RequestOptionsBase): Promise; - /** - * @param resourceUri The identifier of the resource. It has the following structure: - * subscriptions/{subscriptionName}/resourceGroups/{resourceGroupName}/providers/{providerName}/{resourceName}. - * For example: - * subscriptions/b368ca2f-e298-46b7-b0ab-012281956afa/resourceGroups/vms/providers/Microsoft.Compute/virtualMachines/vm1 - * @param timeSeriesInformation Information that need to be specified to calculate a baseline on a - * time series. - * @param callback The callback - */ - calculateBaseline(resourceUri: string, timeSeriesInformation: Models.TimeSeriesInformation, callback: msRest.ServiceCallback): void; - /** - * @param resourceUri The identifier of the resource. It has the following structure: - * subscriptions/{subscriptionName}/resourceGroups/{resourceGroupName}/providers/{providerName}/{resourceName}. - * For example: - * subscriptions/b368ca2f-e298-46b7-b0ab-012281956afa/resourceGroups/vms/providers/Microsoft.Compute/virtualMachines/vm1 - * @param timeSeriesInformation Information that need to be specified to calculate a baseline on a - * time series. - * @param options The optional parameters - * @param callback The callback - */ - calculateBaseline(resourceUri: string, timeSeriesInformation: Models.TimeSeriesInformation, options: msRest.RequestOptionsBase, callback: msRest.ServiceCallback): void; - calculateBaseline(resourceUri: string, timeSeriesInformation: Models.TimeSeriesInformation, options?: msRest.RequestOptionsBase | msRest.ServiceCallback, callback?: msRest.ServiceCallback): Promise { - return this.client.sendOperationRequest( - { - resourceUri, - timeSeriesInformation, - options - }, - calculateBaselineOperationSpec, - callback) as Promise; - } -} - -// Operation Specifications -const serializer = new msRest.Serializer(Mappers); -const getOperationSpec: msRest.OperationSpec = { - httpMethod: "GET", - path: "{resourceUri}/providers/microsoft.insights/baseline/{metricName}", - urlParameters: [ - Parameters.resourceUri, - Parameters.metricName - ], - queryParameters: [ - Parameters.timespan, - Parameters.interval, - Parameters.aggregation, - Parameters.sensitivities, - Parameters.resultType, - Parameters.apiVersion6 - ], - headerParameters: [ - Parameters.acceptLanguage - ], - responses: { - 200: { - bodyMapper: Mappers.BaselineResponse - }, - default: { - bodyMapper: Mappers.ErrorResponse - } - }, - serializer -}; - -const calculateBaselineOperationSpec: msRest.OperationSpec = { - httpMethod: "POST", - path: "{resourceUri}/providers/microsoft.insights/calculatebaseline", - urlParameters: [ - Parameters.resourceUri - ], - queryParameters: [ - Parameters.apiVersion6 - ], - headerParameters: [ - Parameters.acceptLanguage - ], - requestBody: { - parameterPath: "timeSeriesInformation", - mapper: { - ...Mappers.TimeSeriesInformation, - required: true - } - }, - responses: { - 200: { - bodyMapper: Mappers.CalculateBaselineResponse - }, - default: { - bodyMapper: Mappers.ErrorResponse - } - }, - serializer -}; diff --git a/sdk/monitor/arm-monitor/src/operations/metricDefinitions.ts b/sdk/monitor/arm-monitor/src/operations/metricDefinitions.ts deleted file mode 100644 index 23a9932d767b..000000000000 --- a/sdk/monitor/arm-monitor/src/operations/metricDefinitions.ts +++ /dev/null @@ -1,82 +0,0 @@ -/* - * 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/metricDefinitionsMappers"; -import * as Parameters from "../models/parameters"; -import { MonitorManagementClientContext } from "../monitorManagementClientContext"; - -/** Class representing a MetricDefinitions. */ -export class MetricDefinitions { - private readonly client: MonitorManagementClientContext; - - /** - * Create a MetricDefinitions. - * @param {MonitorManagementClientContext} client Reference to the service client. - */ - constructor(client: MonitorManagementClientContext) { - this.client = client; - } - - /** - * Lists the metric definitions for the resource. - * @param resourceUri The identifier of the resource. - * @param [options] The optional parameters - * @returns Promise - */ - list(resourceUri: string, options?: Models.MetricDefinitionsListOptionalParams): 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.MetricDefinitionsListOptionalParams, callback: msRest.ServiceCallback): void; - list(resourceUri: string, options?: Models.MetricDefinitionsListOptionalParams | 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/metricDefinitions", - urlParameters: [ - Parameters.resourceUri - ], - queryParameters: [ - Parameters.apiVersion5, - Parameters.metricnamespace - ], - headerParameters: [ - Parameters.acceptLanguage - ], - responses: { - 200: { - bodyMapper: Mappers.MetricDefinitionCollection - }, - default: { - bodyMapper: Mappers.ErrorResponse - } - }, - serializer -}; diff --git a/sdk/monitor/arm-monitor/src/operations/metricNamespaces.ts b/sdk/monitor/arm-monitor/src/operations/metricNamespaces.ts deleted file mode 100644 index 447750b8340e..000000000000 --- a/sdk/monitor/arm-monitor/src/operations/metricNamespaces.ts +++ /dev/null @@ -1,82 +0,0 @@ -/* - * 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/metricNamespacesMappers"; -import * as Parameters from "../models/parameters"; -import { MonitorManagementClientContext } from "../monitorManagementClientContext"; - -/** Class representing a MetricNamespaces. */ -export class MetricNamespaces { - private readonly client: MonitorManagementClientContext; - - /** - * Create a MetricNamespaces. - * @param {MonitorManagementClientContext} client Reference to the service client. - */ - constructor(client: MonitorManagementClientContext) { - this.client = client; - } - - /** - * Lists the metric namespaces for the resource. - * @param resourceUri The identifier of the resource. - * @param [options] The optional parameters - * @returns Promise - */ - list(resourceUri: string, options?: Models.MetricNamespacesListOptionalParams): 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.MetricNamespacesListOptionalParams, callback: msRest.ServiceCallback): void; - list(resourceUri: string, options?: Models.MetricNamespacesListOptionalParams | 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/metricNamespaces", - urlParameters: [ - Parameters.resourceUri - ], - queryParameters: [ - Parameters.apiVersion10, - Parameters.startTime - ], - headerParameters: [ - Parameters.acceptLanguage - ], - responses: { - 200: { - bodyMapper: Mappers.MetricNamespaceCollection - }, - default: { - bodyMapper: Mappers.ErrorResponse - } - }, - serializer -}; diff --git a/sdk/monitor/arm-monitor/src/operations/metrics.ts b/sdk/monitor/arm-monitor/src/operations/metrics.ts deleted file mode 100644 index 9f613ea4236f..000000000000 --- a/sdk/monitor/arm-monitor/src/operations/metrics.ts +++ /dev/null @@ -1,90 +0,0 @@ -/* - * 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/metricsMappers"; -import * as Parameters from "../models/parameters"; -import { MonitorManagementClientContext } from "../monitorManagementClientContext"; - -/** Class representing a Metrics. */ -export class Metrics { - private readonly client: MonitorManagementClientContext; - - /** - * Create a Metrics. - * @param {MonitorManagementClientContext} client Reference to the service client. - */ - constructor(client: MonitorManagementClientContext) { - this.client = client; - } - - /** - * **Lists the metric values for a resource**. - * @param resourceUri The identifier of the resource. - * @param [options] The optional parameters - * @returns Promise - */ - list(resourceUri: string, options?: Models.MetricsListOptionalParams): 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.MetricsListOptionalParams, callback: msRest.ServiceCallback): void; - list(resourceUri: string, options?: Models.MetricsListOptionalParams | 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/metrics", - urlParameters: [ - Parameters.resourceUri - ], - queryParameters: [ - Parameters.timespan, - Parameters.interval, - Parameters.metricnames, - Parameters.aggregation, - Parameters.top, - Parameters.orderby, - Parameters.filter1, - Parameters.resultType, - Parameters.apiVersion5, - Parameters.metricnamespace - ], - headerParameters: [ - Parameters.acceptLanguage - ], - responses: { - 200: { - bodyMapper: Mappers.Response - }, - default: { - bodyMapper: Mappers.ErrorResponse - } - }, - serializer -}; diff --git a/sdk/monitor/arm-monitor/src/operations/operations.ts b/sdk/monitor/arm-monitor/src/operations/operations.ts deleted file mode 100644 index a6faf8a59a89..000000000000 --- a/sdk/monitor/arm-monitor/src/operations/operations.ts +++ /dev/null @@ -1,74 +0,0 @@ -/* - * 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/operationsMappers"; -import * as Parameters from "../models/parameters"; -import { MonitorManagementClientContext } from "../monitorManagementClientContext"; - -/** Class representing a Operations. */ -export class Operations { - private readonly client: MonitorManagementClientContext; - - /** - * Create a Operations. - * @param {MonitorManagementClientContext} client Reference to the service client. - */ - constructor(client: MonitorManagementClientContext) { - this.client = client; - } - - /** - * Lists all of the available operations from Microsoft.Insights provider. - * @param [options] The optional parameters - * @returns Promise - */ - list(options?: msRest.RequestOptionsBase): Promise; - /** - * @param callback The callback - */ - list(callback: msRest.ServiceCallback): void; - /** - * @param options The optional parameters - * @param callback The callback - */ - list(options: msRest.RequestOptionsBase, callback: msRest.ServiceCallback): void; - list(options?: msRest.RequestOptionsBase | msRest.ServiceCallback, callback?: msRest.ServiceCallback): Promise { - return this.client.sendOperationRequest( - { - options - }, - listOperationSpec, - callback) as Promise; - } -} - -// Operation Specifications -const serializer = new msRest.Serializer(Mappers); -const listOperationSpec: msRest.OperationSpec = { - httpMethod: "GET", - path: "providers/microsoft.insights/operations", - queryParameters: [ - Parameters.apiVersion0 - ], - headerParameters: [ - Parameters.acceptLanguage - ], - responses: { - 200: { - bodyMapper: Mappers.OperationListResult - }, - default: { - bodyMapper: Mappers.CloudError - } - }, - serializer -}; diff --git a/sdk/monitor/arm-monitor/src/operations/scheduledQueryRules.ts b/sdk/monitor/arm-monitor/src/operations/scheduledQueryRules.ts deleted file mode 100644 index 2e49d3d94545..000000000000 --- a/sdk/monitor/arm-monitor/src/operations/scheduledQueryRules.ts +++ /dev/null @@ -1,383 +0,0 @@ -/* - * 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/scheduledQueryRulesMappers"; -import * as Parameters from "../models/parameters"; -import { MonitorManagementClientContext } from "../monitorManagementClientContext"; - -/** Class representing a ScheduledQueryRules. */ -export class ScheduledQueryRules { - private readonly client: MonitorManagementClientContext; - - /** - * Create a ScheduledQueryRules. - * @param {MonitorManagementClientContext} client Reference to the service client. - */ - constructor(client: MonitorManagementClientContext) { - this.client = client; - } - - /** - * Creates or updates an log search 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. - * @param [options] The optional parameters - * @returns Promise - */ - createOrUpdate(resourceGroupName: string, ruleName: string, parameters: Models.LogSearchRuleResource, options?: msRest.RequestOptionsBase): Promise; - /** - * @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. - * @param callback The callback - */ - createOrUpdate(resourceGroupName: string, ruleName: string, parameters: Models.LogSearchRuleResource, callback: msRest.ServiceCallback): void; - /** - * @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. - * @param options The optional parameters - * @param callback The callback - */ - createOrUpdate(resourceGroupName: string, ruleName: string, parameters: Models.LogSearchRuleResource, options: msRest.RequestOptionsBase, callback: msRest.ServiceCallback): void; - createOrUpdate(resourceGroupName: string, ruleName: string, parameters: Models.LogSearchRuleResource, options?: msRest.RequestOptionsBase | msRest.ServiceCallback, callback?: msRest.ServiceCallback): Promise { - return this.client.sendOperationRequest( - { - resourceGroupName, - ruleName, - parameters, - options - }, - createOrUpdateOperationSpec, - callback) as Promise; - } - - /** - * Gets an Log Search rule - * @param resourceGroupName The name of the resource group. - * @param ruleName The name of the rule. - * @param [options] The optional parameters - * @returns Promise - */ - get(resourceGroupName: string, ruleName: string, options?: msRest.RequestOptionsBase): Promise; - /** - * @param resourceGroupName The name of the resource group. - * @param ruleName The name of the rule. - * @param callback The callback - */ - get(resourceGroupName: string, ruleName: string, callback: msRest.ServiceCallback): void; - /** - * @param resourceGroupName The name of the resource group. - * @param ruleName The name of the rule. - * @param options The optional parameters - * @param callback The callback - */ - get(resourceGroupName: string, ruleName: string, options: msRest.RequestOptionsBase, callback: msRest.ServiceCallback): void; - get(resourceGroupName: string, ruleName: string, options?: msRest.RequestOptionsBase | msRest.ServiceCallback, callback?: msRest.ServiceCallback): Promise { - return this.client.sendOperationRequest( - { - resourceGroupName, - ruleName, - options - }, - getOperationSpec, - callback) as Promise; - } - - /** - * Update log search Rule. - * @param resourceGroupName The name of the resource group. - * @param ruleName The name of the rule. - * @param parameters The parameters of the rule to update. - * @param [options] The optional parameters - * @returns Promise - */ - update(resourceGroupName: string, ruleName: string, parameters: Models.LogSearchRuleResourcePatch, options?: msRest.RequestOptionsBase): Promise; - /** - * @param resourceGroupName The name of the resource group. - * @param ruleName The name of the rule. - * @param parameters The parameters of the rule to update. - * @param callback The callback - */ - update(resourceGroupName: string, ruleName: string, parameters: Models.LogSearchRuleResourcePatch, callback: msRest.ServiceCallback): void; - /** - * @param resourceGroupName The name of the resource group. - * @param ruleName The name of the rule. - * @param parameters The parameters of the rule to update. - * @param options The optional parameters - * @param callback The callback - */ - update(resourceGroupName: string, ruleName: string, parameters: Models.LogSearchRuleResourcePatch, options: msRest.RequestOptionsBase, callback: msRest.ServiceCallback): void; - update(resourceGroupName: string, ruleName: string, parameters: Models.LogSearchRuleResourcePatch, options?: msRest.RequestOptionsBase | msRest.ServiceCallback, callback?: msRest.ServiceCallback): Promise { - return this.client.sendOperationRequest( - { - resourceGroupName, - ruleName, - parameters, - options - }, - updateOperationSpec, - callback) as Promise; - } - - /** - * Deletes a Log Search rule - * @param resourceGroupName The name of the resource group. - * @param ruleName The name of the rule. - * @param [options] The optional parameters - * @returns Promise - */ - deleteMethod(resourceGroupName: string, ruleName: string, options?: msRest.RequestOptionsBase): Promise; - /** - * @param resourceGroupName The name of the resource group. - * @param ruleName The name of the rule. - * @param callback The callback - */ - deleteMethod(resourceGroupName: string, ruleName: string, callback: msRest.ServiceCallback): void; - /** - * @param resourceGroupName The name of the resource group. - * @param ruleName The name of the rule. - * @param options The optional parameters - * @param callback The callback - */ - deleteMethod(resourceGroupName: string, ruleName: string, options: msRest.RequestOptionsBase, callback: msRest.ServiceCallback): void; - deleteMethod(resourceGroupName: string, ruleName: string, options?: msRest.RequestOptionsBase | msRest.ServiceCallback, callback?: msRest.ServiceCallback): Promise { - return this.client.sendOperationRequest( - { - resourceGroupName, - ruleName, - options - }, - deleteMethodOperationSpec, - callback); - } - - /** - * List the Log Search rules within a subscription group. - * @param [options] The optional parameters - * @returns Promise - */ - listBySubscription(options?: Models.ScheduledQueryRulesListBySubscriptionOptionalParams): Promise; - /** - * @param callback The callback - */ - listBySubscription(callback: msRest.ServiceCallback): void; - /** - * @param options The optional parameters - * @param callback The callback - */ - listBySubscription(options: Models.ScheduledQueryRulesListBySubscriptionOptionalParams, callback: msRest.ServiceCallback): void; - listBySubscription(options?: Models.ScheduledQueryRulesListBySubscriptionOptionalParams | msRest.ServiceCallback, callback?: msRest.ServiceCallback): Promise { - return this.client.sendOperationRequest( - { - options - }, - listBySubscriptionOperationSpec, - callback) as Promise; - } - - /** - * List the Log Search rules within a resource group. - * @param resourceGroupName The name of the resource group. - * @param [options] The optional parameters - * @returns Promise - */ - listByResourceGroup(resourceGroupName: string, options?: Models.ScheduledQueryRulesListByResourceGroupOptionalParams): Promise; - /** - * @param resourceGroupName The name of the resource group. - * @param callback The callback - */ - listByResourceGroup(resourceGroupName: string, callback: msRest.ServiceCallback): void; - /** - * @param resourceGroupName The name of the resource group. - * @param options The optional parameters - * @param callback The callback - */ - listByResourceGroup(resourceGroupName: string, options: Models.ScheduledQueryRulesListByResourceGroupOptionalParams, callback: msRest.ServiceCallback): void; - listByResourceGroup(resourceGroupName: string, options?: Models.ScheduledQueryRulesListByResourceGroupOptionalParams | msRest.ServiceCallback, callback?: msRest.ServiceCallback): Promise { - return this.client.sendOperationRequest( - { - resourceGroupName, - options - }, - listByResourceGroupOperationSpec, - callback) as Promise; - } -} - -// Operation Specifications -const serializer = new msRest.Serializer(Mappers); -const createOrUpdateOperationSpec: msRest.OperationSpec = { - httpMethod: "PUT", - path: "subscriptions/{subscriptionId}/resourcegroups/{resourceGroupName}/providers/microsoft.insights/scheduledQueryRules/{ruleName}", - urlParameters: [ - Parameters.subscriptionId, - Parameters.resourceGroupName, - Parameters.ruleName - ], - queryParameters: [ - Parameters.apiVersion9 - ], - headerParameters: [ - Parameters.acceptLanguage - ], - requestBody: { - parameterPath: "parameters", - mapper: { - ...Mappers.LogSearchRuleResource, - required: true - } - }, - responses: { - 200: { - bodyMapper: Mappers.LogSearchRuleResource - }, - 201: { - bodyMapper: Mappers.LogSearchRuleResource - }, - default: { - bodyMapper: Mappers.ErrorResponse - } - }, - serializer -}; - -const getOperationSpec: msRest.OperationSpec = { - httpMethod: "GET", - path: "subscriptions/{subscriptionId}/resourcegroups/{resourceGroupName}/providers/microsoft.insights/scheduledQueryRules/{ruleName}", - urlParameters: [ - Parameters.resourceGroupName, - Parameters.ruleName, - Parameters.subscriptionId - ], - queryParameters: [ - Parameters.apiVersion9 - ], - headerParameters: [ - Parameters.acceptLanguage - ], - responses: { - 200: { - bodyMapper: Mappers.LogSearchRuleResource - }, - default: { - bodyMapper: Mappers.ErrorResponse - } - }, - serializer -}; - -const updateOperationSpec: msRest.OperationSpec = { - httpMethod: "PATCH", - path: "subscriptions/{subscriptionId}/resourcegroups/{resourceGroupName}/providers/microsoft.insights/scheduledQueryRules/{ruleName}", - urlParameters: [ - Parameters.subscriptionId, - Parameters.resourceGroupName, - Parameters.ruleName - ], - queryParameters: [ - Parameters.apiVersion9 - ], - headerParameters: [ - Parameters.acceptLanguage - ], - requestBody: { - parameterPath: "parameters", - mapper: { - ...Mappers.LogSearchRuleResourcePatch, - required: true - } - }, - responses: { - 200: { - bodyMapper: Mappers.LogSearchRuleResource - }, - default: { - bodyMapper: Mappers.ErrorResponse - } - }, - serializer -}; - -const deleteMethodOperationSpec: msRest.OperationSpec = { - httpMethod: "DELETE", - path: "subscriptions/{subscriptionId}/resourcegroups/{resourceGroupName}/providers/microsoft.insights/scheduledQueryRules/{ruleName}", - urlParameters: [ - Parameters.resourceGroupName, - Parameters.ruleName, - Parameters.subscriptionId - ], - queryParameters: [ - Parameters.apiVersion9 - ], - headerParameters: [ - Parameters.acceptLanguage - ], - responses: { - 200: {}, - 204: {}, - default: { - bodyMapper: Mappers.ErrorResponse - } - }, - serializer -}; - -const listBySubscriptionOperationSpec: msRest.OperationSpec = { - httpMethod: "GET", - path: "subscriptions/{subscriptionId}/providers/microsoft.insights/scheduledQueryRules", - urlParameters: [ - Parameters.subscriptionId - ], - queryParameters: [ - Parameters.apiVersion9, - Parameters.filter1 - ], - headerParameters: [ - Parameters.acceptLanguage - ], - responses: { - 200: { - bodyMapper: Mappers.LogSearchRuleResourceCollection - }, - default: { - bodyMapper: Mappers.ErrorResponse - } - }, - serializer -}; - -const listByResourceGroupOperationSpec: msRest.OperationSpec = { - httpMethod: "GET", - path: "subscriptions/{subscriptionId}/resourcegroups/{resourceGroupName}/providers/microsoft.insights/scheduledQueryRules", - urlParameters: [ - Parameters.resourceGroupName, - Parameters.subscriptionId - ], - queryParameters: [ - Parameters.apiVersion9, - Parameters.filter1 - ], - headerParameters: [ - Parameters.acceptLanguage - ], - responses: { - 200: { - bodyMapper: Mappers.LogSearchRuleResourceCollection - }, - default: { - bodyMapper: Mappers.ErrorResponse - } - }, - serializer -}; diff --git a/sdk/monitor/arm-monitor/src/operations/tenantActivityLogs.ts b/sdk/monitor/arm-monitor/src/operations/tenantActivityLogs.ts deleted file mode 100644 index 330e604f77f1..000000000000 --- a/sdk/monitor/arm-monitor/src/operations/tenantActivityLogs.ts +++ /dev/null @@ -1,133 +0,0 @@ -/* - * 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/tenantActivityLogsMappers"; -import * as Parameters from "../models/parameters"; -import { MonitorManagementClientContext } from "../monitorManagementClientContext"; - -/** Class representing a TenantActivityLogs. */ -export class TenantActivityLogs { - private readonly client: MonitorManagementClientContext; - - /** - * Create a TenantActivityLogs. - * @param {MonitorManagementClientContext} client Reference to the service client. - */ - constructor(client: MonitorManagementClientContext) { - this.client = client; - } - - /** - * Gets the Activity Logs for the Tenant.
Everything that is applicable to the API to get the - * Activity Logs for the subscription is applicable to this API (the parameters, $filter, - * etc.).
One thing to point out here is that this API does *not* retrieve the logs at the - * individual subscription of the tenant but only surfaces the logs that were generated at the - * tenant level. - * @param [options] The optional parameters - * @returns Promise - */ - list(options?: Models.TenantActivityLogsListOptionalParams): Promise; - /** - * @param callback The callback - */ - list(callback: msRest.ServiceCallback): void; - /** - * @param options The optional parameters - * @param callback The callback - */ - list(options: Models.TenantActivityLogsListOptionalParams, callback: msRest.ServiceCallback): void; - list(options?: Models.TenantActivityLogsListOptionalParams | msRest.ServiceCallback, callback?: msRest.ServiceCallback): Promise { - return this.client.sendOperationRequest( - { - options - }, - listOperationSpec, - callback) as Promise; - } - - /** - * Gets the Activity Logs for the Tenant.
Everything that is applicable to the API to get the - * Activity Logs for the subscription is applicable to this API (the parameters, $filter, - * etc.).
One thing to point out here is that this API does *not* retrieve the logs at the - * individual subscription of the tenant but only surfaces the logs that were generated at the - * tenant level. - * @param nextPageLink The NextLink from the previous successful call to List operation. - * @param [options] The optional parameters - * @returns Promise - */ - listNext(nextPageLink: string, options?: msRest.RequestOptionsBase): Promise; - /** - * @param nextPageLink The NextLink from the previous successful call to List operation. - * @param callback The callback - */ - listNext(nextPageLink: string, callback: msRest.ServiceCallback): void; - /** - * @param nextPageLink The NextLink from the previous successful call to List operation. - * @param options The optional parameters - * @param callback The callback - */ - listNext(nextPageLink: string, options: msRest.RequestOptionsBase, callback: msRest.ServiceCallback): void; - listNext(nextPageLink: string, options?: msRest.RequestOptionsBase | msRest.ServiceCallback, callback?: msRest.ServiceCallback): Promise { - return this.client.sendOperationRequest( - { - nextPageLink, - options - }, - listNextOperationSpec, - callback) as Promise; - } -} - -// Operation Specifications -const serializer = new msRest.Serializer(Mappers); -const listOperationSpec: msRest.OperationSpec = { - httpMethod: "GET", - path: "providers/microsoft.insights/eventtypes/management/values", - queryParameters: [ - Parameters.apiVersion0, - Parameters.filter1, - Parameters.select - ], - headerParameters: [ - Parameters.acceptLanguage - ], - responses: { - 200: { - bodyMapper: Mappers.EventDataCollection - }, - default: { - bodyMapper: Mappers.ErrorResponse - } - }, - serializer -}; - -const listNextOperationSpec: msRest.OperationSpec = { - httpMethod: "GET", - baseUrl: "https://management.azure.com", - path: "{nextLink}", - urlParameters: [ - Parameters.nextPageLink - ], - headerParameters: [ - Parameters.acceptLanguage - ], - responses: { - 200: { - bodyMapper: Mappers.EventDataCollection - }, - default: { - bodyMapper: Mappers.ErrorResponse - } - }, - serializer -}; diff --git a/sdk/monitor/arm-monitor/src/operations/vMInsights.ts b/sdk/monitor/arm-monitor/src/operations/vMInsights.ts deleted file mode 100644 index 1b0ecbdbe27e..000000000000 --- a/sdk/monitor/arm-monitor/src/operations/vMInsights.ts +++ /dev/null @@ -1,84 +0,0 @@ -/* - * 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/vMInsightsMappers"; -import * as Parameters from "../models/parameters"; -import { MonitorManagementClientContext } from "../monitorManagementClientContext"; - -/** Class representing a VMInsights. */ -export class VMInsights { - private readonly client: MonitorManagementClientContext; - - /** - * Create a VMInsights. - * @param {MonitorManagementClientContext} client Reference to the service client. - */ - constructor(client: MonitorManagementClientContext) { - this.client = client; - } - - /** - * Retrieves the VM Insights onboarding status for the specified resource or resource scope. - * @param resourceUri The fully qualified Azure Resource manager identifier of the resource, or - * scope, whose status to retrieve. - * @param [options] The optional parameters - * @returns Promise - */ - getOnboardingStatus(resourceUri: string, options?: msRest.RequestOptionsBase): Promise; - /** - * @param resourceUri The fully qualified Azure Resource manager identifier of the resource, or - * scope, whose status to retrieve. - * @param callback The callback - */ - getOnboardingStatus(resourceUri: string, callback: msRest.ServiceCallback): void; - /** - * @param resourceUri The fully qualified Azure Resource manager identifier of the resource, or - * scope, whose status to retrieve. - * @param options The optional parameters - * @param callback The callback - */ - getOnboardingStatus(resourceUri: string, options: msRest.RequestOptionsBase, callback: msRest.ServiceCallback): void; - getOnboardingStatus(resourceUri: string, options?: msRest.RequestOptionsBase | msRest.ServiceCallback, callback?: msRest.ServiceCallback): Promise { - return this.client.sendOperationRequest( - { - resourceUri, - options - }, - getOnboardingStatusOperationSpec, - callback) as Promise; - } -} - -// Operation Specifications -const serializer = new msRest.Serializer(Mappers); -const getOnboardingStatusOperationSpec: msRest.OperationSpec = { - httpMethod: "GET", - path: "{resourceUri}/providers/Microsoft.Insights/vmInsightsOnboardingStatuses/default", - urlParameters: [ - Parameters.resourceUri - ], - queryParameters: [ - Parameters.apiVersion11 - ], - headerParameters: [ - Parameters.acceptLanguage - ], - responses: { - 200: { - bodyMapper: Mappers.VMInsightsOnboardingStatus - }, - default: { - bodyMapper: Mappers.ResponseWithError - } - }, - serializer -};