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 34c0456e346b..8e4241f12904 100644 --- a/sdk/monitor/arm-monitor/README.md +++ b/sdk/monitor/arm-monitor/README.md @@ -1,11 +1,11 @@ -## Azure MonitorManagementClient SDK for JavaScript +## Azure MonitorClient SDK for JavaScript -This package contains an isomorphic SDK (runs both in Node.js and in browsers) for MonitorManagementClient. +This package contains an isomorphic SDK (runs both in node.js and in browsers) for MonitorClient. ### Currently supported environments - [LTS versions of Node.js](https://nodejs.org/about/releases/) -- Latest versions of Safari, Chrome, Edge, and Firefox. +- Latest versions of Safari, Chrome, Edge and Firefox. ### Prerequisites @@ -21,7 +21,6 @@ Install both packages using the below command: ```bash npm install --save @azure/arm-monitor @azure/identity ``` - > **Note**: You may have used either `@azure/ms-rest-nodeauth` or `@azure/ms-rest-browserauth` in the past. These packages are in maintenance mode receiving critical bug fixes, but no new features. If you are on a [Node.js that has LTS status](https://nodejs.org/about/releases/), or are writing a client side browser application, we strongly encourage you to upgrade to `@azure/identity` which uses the latest versions of Azure Active Directory and MSAL APIs and provides more authentication options. @@ -37,22 +36,20 @@ If you are on a [Node.js that has LTS status](https://nodejs.org/about/releases/ In the below samples, we pass the credential and the Azure subscription id to instantiate the client. Once the client is created, explore the operations on it either in your favorite editor or in our [API reference documentation](https://docs.microsoft.com/javascript/api) to get started. - -#### nodejs - Authentication, client creation, and listByResourceGroup autoscaleSettings as an example written in JavaScript. +#### nodejs - Authentication, client creation, and listBySubscription scheduledQueryRules as an example written in JavaScript. ##### Sample code ```javascript const { DefaultAzureCredential } = require("@azure/identity"); -const { MonitorManagementClient } = require("@azure/arm-monitor"); +const { MonitorClient } = require("@azure/arm-monitor"); const subscriptionId = process.env["AZURE_SUBSCRIPTION_ID"]; // Use `DefaultAzureCredential` or any other credential of your choice based on https://aka.ms/azsdk/js/identity/examples // Please note that you can also use credentials from the `@azure/ms-rest-nodeauth` package instead. const creds = new DefaultAzureCredential(); -const client = new MonitorManagementClient(creds, subscriptionId); -const resourceGroupName = "testresourceGroupName"; -client.autoscaleSettings.listByResourceGroup(resourceGroupName).then((result) => { +const client = new MonitorClient(creds, subscriptionId); +client.scheduledQueryRules.listBySubscription().then((result) => { console.log("The result is:"); console.log(result); }).catch((err) => { @@ -61,7 +58,7 @@ client.autoscaleSettings.listByResourceGroup(resourceGroupName).then((result) => }); ``` -#### browser - Authentication, client creation, and listByResourceGroup autoscaleSettings as an example written in JavaScript. +#### browser - Authentication, client creation, and listBySubscription scheduledQueryRules as an example written in JavaScript. In browser applications, we recommend using the `InteractiveBrowserCredential` that interactively authenticates using the default system browser. - See [Single-page application: App registration guide](https://docs.microsoft.com/azure/active-directory/develop/scenario-spa-app-registration) to configure your app registration for the browser. @@ -86,11 +83,10 @@ In browser applications, we recommend using the `InteractiveBrowserCredential` t const credential = new InteractiveBrowserCredential( { clientId: "", - tenantId: "" + tenant: "" }); - const client = new Azure.ArmMonitor.MonitorManagementClient(creds, subscriptionId); - const resourceGroupName = "testresourceGroupName"; - client.autoscaleSettings.listByResourceGroup(resourceGroupName).then((result) => { + const client = new Azure.ArmMonitor.MonitorClient(creds, subscriptionId); + client.scheduledQueryRules.listBySubscription().then((result) => { console.log("The result is:"); console.log(result); }).catch((err) => { diff --git a/sdk/monitor/arm-monitor/package.json b/sdk/monitor/arm-monitor/package.json index b13d9cb86e9d..738049cb5d0f 100644 --- a/sdk/monitor/arm-monitor/package.json +++ b/sdk/monitor/arm-monitor/package.json @@ -1,7 +1,7 @@ { "name": "@azure/arm-monitor", "author": "Microsoft Corporation", - "description": "MonitorManagementClient Library with typescript type definitions for node.js and browser.", + "description": "MonitorClient Library with typescript type definitions for node.js and browser.", "version": "6.1.1", "dependencies": { "@azure/ms-rest-azure-js": "^2.1.0", @@ -18,8 +18,8 @@ ], "license": "MIT", "main": "./dist/arm-monitor.js", - "module": "./esm/monitorManagementClient.js", - "types": "./esm/monitorManagementClient.d.ts", + "module": "./esm/monitorClient.js", + "types": "./esm/monitorClient.d.ts", "devDependencies": { "typescript": "^3.6.0", "rollup": "^1.18.0", @@ -27,7 +27,7 @@ "rollup-plugin-sourcemaps": "^0.4.2", "uglify-js": "^3.6.0" }, - "homepage": "https://github.com/Azure/azure-sdk-for-js/tree/feature/v4/sdk/monitor/arm-monitor", + "homepage": "https://github.com/Azure/azure-sdk-for-js/tree/master/sdk/monitor/arm-monitor", "repository": { "type": "git", "url": "https://github.com/Azure/azure-sdk-for-js.git" diff --git a/sdk/monitor/arm-monitor/rollup.config.js b/sdk/monitor/arm-monitor/rollup.config.js index 60aa3b0cb549..bcd65b87d91d 100644 --- a/sdk/monitor/arm-monitor/rollup.config.js +++ b/sdk/monitor/arm-monitor/rollup.config.js @@ -6,7 +6,7 @@ import sourcemaps from "rollup-plugin-sourcemaps"; * @type {rollup.RollupFileOptions} */ const config = { - input: "./esm/monitorManagementClient.js", + input: "./esm/monitorClient.js", external: [ "@azure/ms-rest-js", "@azure/ms-rest-azure-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 deleted file mode 100644 index d949c6e04f10..000000000000 --- a/sdk/monitor/arm-monitor/src/models/activityLogAlertsMappers.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, - ActivityLogAlertList, - ActivityLogAlertPatchBody, - 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, - 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/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..aac85526fadc 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,4283 +12,544 @@ import * as msRest from "@azure/ms-rest-js"; export { BaseResource, CloudError }; /** - * An azure resource object + * Actions to invoke when the alert fires. */ -export interface Resource 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; +export interface Actions { /** - * Resource location + * Action Group resource Ids to invoke when the alert fires. */ - location: string; + actionGroups?: string[]; /** - * Resource tags + * The properties of an alert payload. */ - tags?: { [propertyName: string]: string }; + customProperties?: { [propertyName: string]: string }; } /** - * The number of instances that can be used during this profile. + * Dimension splitting and filtering definition */ -export interface ScaleCapacity { +export interface Dimension { /** - * the minimum number of instances for the resource. + * Name of the dimension */ - minimum: string; + name: 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. + * Operator for dimension values. Possible values include: 'Include', 'Exclude' */ - maximum: string; + operator: DimensionOperator; /** - * 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. + * List of dimension values */ - default: string; + values: string[]; } /** - * The trigger that results in a scaling action. + * The minimum number of violations required within the selected lookback time window required to + * raise an alert. Relevant only for rules of the kind LogAlert. */ -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; +export interface ConditionFailingPeriods { /** - * 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' + * 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. Default + * value is 1. Default value: 1. */ - operator: ComparisonOperationType; + numberOfEvaluationPeriods?: number; /** - * the threshold of the metric that triggers the scale action. + * The number of violations to trigger an alert. Should be smaller or equal to + * numberOfEvaluationPeriods. Default value is 1. Default value: 1. */ - threshold: number; + minFailingPeriodsToAlert?: number; } /** - * The parameters for the scaling action. + * A condition of the scheduled query rule. */ -export interface ScaleAction { +export interface Condition { /** - * the scale direction. Whether the scaling action increases or decreases the number of - * instances. Possible values include: 'None', 'Increase', 'Decrease' + * Log query alert */ - direction: ScaleDirection; + query?: string; /** - * the type of action that should occur when the scale rule fires. Possible values include: - * 'ChangeCount', 'PercentChangeCount', 'ExactCount' + * Aggregation type. Relevant and required only for rules of the kind LogAlert. Possible values + * include: 'Count', 'Average', 'Minimum', 'Maximum', 'Total' */ - type: ScaleType; + timeAggregation?: TimeAggregation; /** - * 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'. + * The column containing the metric measure number. Relevant only for rules of the kind LogAlert. */ - value?: string; + metricMeasureColumn?: 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. + * The column containing the resource id. The content of the column must be a uri formatted as + * resource id. Relevant only for rules of the kind LogAlert. */ - cooldown: string; -} - -/** - * A rule that provide the triggers and parameters for the scaling action. - */ -export interface ScaleRule { + resourceIdColumn?: string; /** - * the trigger that results in a scaling action. + * List of Dimensions conditions */ - metricTrigger: MetricTrigger; + dimensions?: Dimension[]; /** - * the parameters for the scaling action. + * The criteria operator. Relevant and required only for rules of the kind LogAlert. Possible + * values include: 'Equals', 'GreaterThan', 'GreaterThanOrEqual', 'LessThan', 'LessThanOrEqual' */ - scaleAction: ScaleAction; -} - -/** - * A specific date-time for the profile. - */ -export interface TimeWindow { + operator?: ConditionOperator; /** - * 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 + * the criteria threshold value that activates the alert. Relevant and required only for rules of + * the kind LogAlert. */ - timeZone?: string; + threshold?: number; /** - * the start time for the profile in ISO 8601 format. + * The minimum number of violations required within the selected lookback time window required to + * raise an alert. Relevant only for rules of the kind LogAlert. */ - start: Date; + failingPeriods?: ConditionFailingPeriods; /** - * the end time for the profile in ISO 8601 format. + * The name of the metric to be sent. Relevant and required only for rules of the kind + * LogToMetric. */ - end: Date; + metricName?: string; } /** - * The scheduling constraints for when the profile begins. + * The rule criteria that defines the conditions of the scheduled query rule. */ -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[]; +export interface ScheduledQueryRuleCriteria { /** - * A collection of minutes at which the profile takes effect at. + * A list of conditions to evaluate against the specified scopes */ - minutes: number[]; + allOf?: Condition[]; } /** - * The repeating times at which this profile begins. This element is not used if the FixedDate - * element is used. + * Metadata pertaining to creation and last modification of the resource. */ -export interface Recurrence { +export interface SystemData { /** - * 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' + * The identity that created the resource. */ - frequency: RecurrenceFrequency; + createdBy?: string; /** - * the scheduling constraints for when the profile begins. + * The type of identity that created the resource. Possible values include: 'User', + * 'Application', 'ManagedIdentity', 'Key' */ - schedule: RecurrentSchedule; -} - -/** - * Autoscale profile. - */ -export interface AutoscaleProfile { + createdByType?: CreatedByType; /** - * the name of the profile. + * The timestamp of resource creation (UTC). */ - name: string; - /** - * the number of instances that can be used during this profile. - */ - capacity: ScaleCapacity; + createdAt?: Date; /** - * the collection of rules that provide the triggers and parameters for the scaling action. A - * maximum of 10 rules can be specified. + * The identity that last modified the resource. */ - rules: ScaleRule[]; + lastModifiedBy?: string; /** - * the specific date-time for the profile. This element is not used if the Recurrence element is - * used. + * The type of identity that last modified the resource. Possible values include: 'User', + * 'Application', 'ManagedIdentity', 'Key' */ - fixedDate?: TimeWindow; + lastModifiedByType?: CreatedByType; /** - * the repeating times at which this profile begins. This element is not used if the FixedDate - * element is used. + * The timestamp of resource last modification (UTC) */ - recurrence?: Recurrence; + lastModifiedAt?: Date; } /** - * Email notification of an autoscale event. + * Common fields that are returned in the response for all Azure Resource Manager resources + * @summary Resource */ -export interface EmailNotification { +export interface Resource extends BaseResource { /** - * a value indicating whether to send email to subscription administrator. + * Fully qualified resource ID for the resource. Ex - + * /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/{resourceProviderNamespace}/{resourceType}/{resourceName} + * **NOTE: This property will not be serialized. It can only be populated by the server.** */ - sendToSubscriptionAdministrator?: boolean; + readonly id?: string; /** - * a value indicating whether to send email to subscription co-administrators. + * The name of the resource + * **NOTE: This property will not be serialized. It can only be populated by the server.** */ - sendToSubscriptionCoAdministrators?: boolean; + readonly name?: string; /** - * the custom e-mails list. This value can be null or empty, in which case this attribute will be - * ignored. + * The type of the resource. E.g. "Microsoft.Compute/virtualMachines" or + * "Microsoft.Storage/storageAccounts" + * **NOTE: This property will not be serialized. It can only be populated by the server.** */ - customEmails?: string[]; + readonly type?: string; } /** - * Webhook notification of an autoscale event. + * The resource model definition for an Azure Resource Manager tracked top level resource which has + * 'tags' and a 'location' + * @summary Tracked Resource */ -export interface WebhookNotification { +export interface TrackedResource extends Resource { /** - * the service address to receive the notification. + * Resource tags. */ - serviceUri?: string; + tags?: { [propertyName: string]: string }; /** - * a property bag of settings. This value can be empty. + * The geo-location where the resource lives */ - properties?: { [propertyName: string]: string }; + location: string; } /** - * Autoscale notification. + * The scheduled query rule resource. */ -export interface AutoscaleNotification { +export interface ScheduledQueryRuleResource extends TrackedResource { /** - * the email notification. + * Indicates the type of scheduled query rule. The default is LogAlert. Possible values include: + * 'LogAlert', 'LogToMetric' */ - email?: EmailNotification; + kind?: Kind; /** - * 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. + * The etag field is *not* required. If it is provided in the response body, it must also be + * provided as a header per the normal etag convention. Entity tags are used for comparing two + * or more entities from the same requested resource. HTTP/1.1 uses entity tags in the etag + * (section 14.19), If-Match (section 14.24), If-None-Match (section 14.26), and If-Range + * (section 14.27) header fields. + * **NOTE: This property will not be serialized. It can only be populated by the server.** */ - profiles: AutoscaleProfile[]; + readonly etag?: string; /** - * the collection of notifications. + * SystemData of ScheduledQueryRule. + * **NOTE: This property will not be serialized. It can only be populated by the server.** */ - notifications?: AutoscaleNotification[]; + readonly systemData?: SystemData; /** - * the enabled flag. Specifies whether automatic scaling is enabled for the resource. The default - * value is 'true'. Default value: true. + * The api-version used when creating this alert rule + * **NOTE: This property will not be serialized. It can only be populated by the server.** */ - enabled?: boolean; + readonly createdWithApiVersion?: string; /** - * the name of the autoscale setting. + * True if alert rule is legacy Log Analytic rule + * **NOTE: This property will not be serialized. It can only be populated by the server.** */ - autoscaleSettingResourceName?: string; + readonly isLegacyLogAnalyticsRule?: boolean; /** - * the resource identifier of the resource that the autoscale setting should be added to. + * The description of the scheduled query rule. */ - targetResourceUri?: string; -} - -/** - * The autoscale setting object for patch operations. - */ -export interface AutoscaleSettingResourcePatch { + description?: string; /** - * Resource tags + * The display name of the alert rule */ - tags?: { [propertyName: string]: string }; + displayName?: string; /** - * the collection of automatic scaling profiles that specify different scaling parameters for - * different time periods. A maximum of 20 profiles can be specified. + * Severity of the alert. Should be an integer between [0-4]. Value of 0 is severest. Relevant + * and required only for rules of the kind LogAlert. */ - profiles: AutoscaleProfile[]; + severity?: number; /** - * the collection of notifications. + * The flag which indicates whether this scheduled query rule is enabled. Value should be true or + * false */ - notifications?: AutoscaleNotification[]; + enabled?: boolean; /** - * the enabled flag. Specifies whether automatic scaling is enabled for the resource. The default - * value is 'true'. Default value: true. + * The list of resource id's that this scheduled query rule is scoped to. */ - enabled?: boolean; + scopes?: string[]; /** - * the name of the autoscale setting. + * How often the scheduled query rule is evaluated represented in ISO 8601 duration format. + * Relevant and required only for rules of the kind LogAlert. */ - name?: string; + evaluationFrequency?: string; /** - * the resource identifier of the resource that the autoscale setting should be added to. + * The period of time (in ISO 8601 duration format) on which the Alert query will be executed + * (bin size). Relevant and required only for rules of the kind LogAlert. */ - targetResourceUri?: string; -} - -/** - * Describes the format of Error response. - */ -export interface ErrorResponse { + windowSize?: string; /** - * Error code + * If specified then overrides the query time range (default is + * WindowSize*NumberOfEvaluationPeriods). Relevant only for rules of the kind LogAlert. */ - code?: string; + overrideQueryTimeRange?: string; /** - * Error message indicating why the operation failed. + * List of resource type of the target resource(s) on which the alert is created/updated. For + * example if the scope is a resource group and targetResourceTypes is + * Microsoft.Compute/virtualMachines, then a different alert will be fired for each virtual + * machine in the resource group which meet the alert criteria. Relevant only for rules of the + * kind LogAlert */ - message?: string; -} - -/** - * Display metadata associated with the operation. - */ -export interface OperationDisplay { + targetResourceTypes?: string[]; /** - * Service provider: Microsoft.Insights + * The rule criteria that defines the conditions of the scheduled query rule. */ - provider?: string; + criteria?: ScheduledQueryRuleCriteria; /** - * Resource on which the operation is performed: AlertRules, Autoscale, etc. + * Mute actions for the chosen period of time (in ISO 8601 duration format) after the alert is + * fired. Relevant only for rules of the kind LogAlert. */ - resource?: string; + muteActionsDuration?: string; /** - * Operation type: Read, write, delete, etc. + * Actions to invoke when the alert fires. */ - operation?: string; -} - -/** - * Microsoft Insights API operation definition. - */ -export interface Operation { + actions?: Actions; /** - * Operation name: {provider}/{resource}/{operation} + * The flag which indicates whether this scheduled query rule has been configured to be stored in + * the customer's storage. The default is false. + * **NOTE: This property will not be serialized. It can only be populated by the server.** */ - name?: string; + readonly isWorkspaceAlertsStorageConfigured?: boolean; /** - * Display metadata associated with the operation. + * The flag which indicates whether this scheduled query rule should be stored in the customer's + * storage. The default is false. Relevant only for rules of the kind LogAlert. */ - 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 { + checkWorkspaceAlertsStorageConfigured?: boolean; /** - * List of operations supported by the Microsoft.Insights provider. + * The flag which indicates whether the provided query should be validated or not. The default is + * false. Relevant only for rules of the kind LogAlert. */ - value?: Operation[]; + skipQueryValidation?: boolean; /** - * URL to get the next set of operation list results if there are any. + * The flag that indicates whether the alert should be automatically resolved or not. The default + * is true. Relevant only for rules of the kind LogAlert. */ - nextLink?: string; + autoMitigate?: boolean; } /** - * An alert incident indicates the activation status of an alert rule. + * The scheduled query rule resource for patch operations. */ -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; +export interface ScheduledQueryRuleResourcePatch { /** - * 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.** + * Resource tags */ - readonly isActive?: boolean; + tags?: { [propertyName: string]: string }; /** - * The time at which the incident was activated in ISO8601 format. + * The api-version used when creating this alert rule * **NOTE: This property will not be serialized. It can only be populated by the server.** */ - readonly activatedTime?: Date; + readonly createdWithApiVersion?: string; /** - * The time at which the incident was resolved in ISO8601 format. If null, it means the incident - * is still active. + * True if alert rule is legacy Log Analytic rule * **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"; + readonly isLegacyLogAnalyticsRule?: boolean; /** - * the resource identifier of the resource the rule monitors. **NOTE**: this property cannot be - * updated for an existing rule. + * The description of the scheduled query 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 { + description?: string; /** - * Polymorphic Discriminator + * The display name of the alert rule */ - odatatype: "RuleCondition"; + displayName?: string; /** - * the resource from which the rule collects its data. For this type dataSource will always be of - * type RuleMetricDataSource. + * Severity of the alert. Should be an integer between [0-4]. Value of 0 is severest. Relevant + * and required only for rules of the kind LogAlert. */ - dataSource?: RuleDataSourceUnion; -} - -/** - * A rule metric data source. The discriminator value is always RuleMetricDataSource in this case. - */ -export interface RuleMetricDataSource { + severity?: number; /** - * Polymorphic Discriminator + * The flag which indicates whether this scheduled query rule is enabled. Value should be true or + * false */ - odatatype: "Microsoft.Azure.Management.Insights.Models.RuleMetricDataSource"; + enabled?: boolean; /** - * the resource identifier of the resource the rule monitors. **NOTE**: this property cannot be - * updated for an existing rule. + * The list of resource id's that this scheduled query rule is scoped to. */ - resourceUri?: string; + scopes?: string[]; /** - * the name of the metric that defines what the rule monitors. + * How often the scheduled query rule is evaluated represented in ISO 8601 duration format. + * Relevant and required only for rules of the kind LogAlert. */ - metricName?: string; -} - -/** - * The claims for a rule management event data source. - */ -export interface RuleManagementEventClaimsDataSource { + evaluationFrequency?: string; /** - * the email address. + * The period of time (in ISO 8601 duration format) on which the Alert query will be executed + * (bin size). Relevant and required only for rules of the kind LogAlert. */ - emailAddress?: string; -} - -/** - * A rule management event data source. The discriminator fields is always - * RuleManagementEventDataSource in this case. - */ -export interface RuleManagementEventDataSource { + windowSize?: string; /** - * Polymorphic Discriminator + * If specified then overrides the query time range (default is + * WindowSize*NumberOfEvaluationPeriods). Relevant only for rules of the kind LogAlert. */ - odatatype: "Microsoft.Azure.Management.Insights.Models.RuleManagementEventDataSource"; + overrideQueryTimeRange?: string; /** - * the resource identifier of the resource the rule monitors. **NOTE**: this property cannot be - * updated for an existing rule. + * List of resource type of the target resource(s) on which the alert is created/updated. For + * example if the scope is a resource group and targetResourceTypes is + * Microsoft.Compute/virtualMachines, then a different alert will be fired for each virtual + * machine in the resource group which meet the alert criteria. Relevant only for rules of the + * kind LogAlert */ - resourceUri?: string; + targetResourceTypes?: string[]; /** - * the event name. + * The rule criteria that defines the conditions of the scheduled query rule. */ - eventName?: string; + criteria?: ScheduledQueryRuleCriteria; /** - * the event source. + * Mute actions for the chosen period of time (in ISO 8601 duration format) after the alert is + * fired. Relevant only for rules of the kind LogAlert. */ - eventSource?: string; + muteActionsDuration?: string; /** - * the level. + * Actions to invoke when the alert fires. */ - level?: string; + actions?: Actions; /** - * The name of the operation that should be checked for. If no name is provided, any operation - * will match. + * The flag which indicates whether this scheduled query rule has been configured to be stored in + * the customer's storage. The default is false. + * **NOTE: This property will not be serialized. It can only be populated by the server.** */ - operationName?: string; + readonly isWorkspaceAlertsStorageConfigured?: boolean; /** - * the resource group name. + * The flag which indicates whether this scheduled query rule should be stored in the customer's + * storage. The default is false. Relevant only for rules of the kind LogAlert. */ - resourceGroupName?: string; + checkWorkspaceAlertsStorageConfigured?: boolean; /** - * the resource provider name. + * The flag which indicates whether the provided query should be validated or not. The default is + * false. Relevant only for rules of the kind LogAlert. */ - resourceProviderName?: string; + skipQueryValidation?: boolean; /** - * The status of the operation that should be checked for. If no status is provided, any status - * will match. + * The flag that indicates whether the alert should be automatically resolved or not. The default + * is true. Relevant only for rules of the kind LogAlert. */ - status?: string; + autoMitigate?: boolean; +} + +/** + * The resource management error additional info. + */ +export interface ErrorAdditionalInfo { /** - * the substatus. + * The additional info type. + * **NOTE: This property will not be serialized. It can only be populated by the server.** */ - subStatus?: string; + readonly type?: string; /** - * the claims. + * The additional info. + * **NOTE: This property will not be serialized. It can only be populated by the server.** */ - claims?: RuleManagementEventClaimsDataSource; + readonly info?: any; } /** - * A rule condition based on a metric crossing a threshold. + * Common error response for all Azure Resource Manager APIs to return error details for failed + * operations. (This also follows the OData error response format.) + * @summary Error Response */ -export interface ThresholdRuleCondition { - /** - * Polymorphic Discriminator - */ - odatatype: "Microsoft.Azure.Management.Insights.Models.ThresholdRuleCondition"; +export interface ErrorResponse { /** - * the resource from which the rule collects its data. For this type dataSource will always be of - * type RuleMetricDataSource. + * The error code. + * **NOTE: This property will not be serialized. It can only be populated by the server.** */ - dataSource?: RuleDataSourceUnion; + readonly code?: string; /** - * the operator used to compare the data and the threshold. Possible values include: - * 'GreaterThan', 'GreaterThanOrEqual', 'LessThan', 'LessThanOrEqual' + * The error message. + * **NOTE: This property will not be serialized. It can only be populated by the server.** */ - operator: ConditionOperator; + readonly message?: string; /** - * the threshold value that activates the alert. + * The error target. + * **NOTE: This property will not be serialized. It can only be populated by the server.** */ - threshold: number; + readonly target?: string; /** - * 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. + * The error details. + * **NOTE: This property will not be serialized. It can only be populated by the server.** */ - windowSize?: string; + readonly details?: ErrorResponse[]; /** - * 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' + * The error additional info. + * **NOTE: This property will not be serialized. It can only be populated by the server.** */ - timeAggregation?: TimeAggregationOperator; + readonly additionalInfo?: ErrorAdditionalInfo[]; } /** - * A rule condition based on a certain number of locations failing. + * Describes the format of Error response. */ -export interface LocationThresholdRuleCondition { +export interface ErrorContract { /** - * Polymorphic Discriminator + * The error details. */ - 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; + error?: ErrorResponse; } /** - * How the data that is collected should be combined over time. + * The resource model definition for a Azure Resource Manager proxy resource. It will not have tags + * and a location + * @summary Proxy Resource */ -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; +export interface ProxyResource extends Resource { } /** - * A management event rule condition. + * The resource model definition for an Azure Resource Manager resource with an etag. + * @summary Entity Resource */ -export interface ManagementEventRuleCondition { +export interface AzureEntityResource extends Resource { /** - * 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. + * Resource Etag. + * **NOTE: This property will not be serialized. It can only be populated by the server.** */ - aggregation?: ManagementEventAggregationCondition; + readonly etag?: string; } /** - * Contains the possible cases for RuleAction. + * An interface representing MonitorClientOptions. */ -export type RuleActionUnion = RuleAction | RuleEmailAction | RuleWebhookAction; +export interface MonitorClientOptions extends AzureServiceClientOptions { + baseUri?: string; +} /** - * The action that is performed when the alert rule becomes active, and when an alert condition is - * resolved. + * @interface + * Represents a collection of scheduled query rule resources. + * @extends Array */ -export interface RuleAction { +export interface ScheduledQueryRuleResourceCollection extends Array { /** - * Polymorphic Discriminator + * Provides the link to retrieve the next set of elements. + * **NOTE: This property will not be serialized. It can only be populated by the server.** */ - odatatype: "RuleAction"; + readonly nextLink?: string; } /** - * Specifies the action to send email when the rule condition is evaluated. The discriminator is - * always RuleEmailAction in this case. + * Defines values for TimeAggregation. + * Possible values include: 'Count', 'Average', 'Minimum', 'Maximum', 'Total' + * @readonly + * @enum {string} */ -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[]; -} +export type TimeAggregation = 'Count' | 'Average' | 'Minimum' | 'Maximum' | 'Total'; /** - * Specifies the action to post to service when the rule condition is evaluated. The discriminator - * is always RuleWebhookAction in this case. + * Defines values for DimensionOperator. + * Possible values include: 'Include', 'Exclude' + * @readonly + * @enum {string} */ -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 }; -} +export type DimensionOperator = 'Include' | 'Exclude'; + +/** + * Defines values for ConditionOperator. + * Possible values include: 'Equals', 'GreaterThan', 'GreaterThanOrEqual', 'LessThan', + * 'LessThanOrEqual' + * @readonly + * @enum {string} + */ +export type ConditionOperator = 'Equals' | 'GreaterThan' | 'GreaterThanOrEqual' | 'LessThan' | 'LessThanOrEqual'; /** - * The alert rule resource. + * Defines values for Kind. + * Possible values include: 'LogAlert', 'LogToMetric' + * @readonly + * @enum {string} */ -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; -} +export type Kind = 'LogAlert' | 'LogToMetric'; /** - * The alert rule object for patch operations. + * Defines values for CreatedByType. + * Possible values include: 'User', 'Application', 'ManagedIdentity', 'Key' + * @readonly + * @enum {string} */ -export interface AlertRuleResourcePatch { - /** - * Resource tags - */ - tags?: { [propertyName: string]: string }; +export type CreatedByType = 'User' | 'Application' | 'ManagedIdentity' | 'Key'; + +/** + * Contains response data for the listBySubscription operation. + */ +export type ScheduledQueryRulesListBySubscriptionResponse = ScheduledQueryRuleResourceCollection & { /** - * 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; - }; -}; - -/** - * Contains response data for the list operation. - */ -export type EventCategoriesListResponse = EventCategoryCollection & { - /** - * 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: EventCategoryCollection; - }; -}; - -/** - * Contains response data for the list operation. - */ -export type TenantActivityLogsListResponse = 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 TenantActivityLogsListNextResponse = 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 list operation. - */ -export type MetricDefinitionsListResponse = MetricDefinitionCollection & { - /** - * 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: MetricDefinitionCollection; - }; -}; - -/** - * Contains response data for the list operation. - */ -export type MetricsListResponse = Response & { - /** - * 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: Response; - }; -}; - -/** - * Contains response data for the get operation. - */ -export type MetricBaselineGetResponse = BaselineResponse & { - /** - * 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: BaselineResponse; - }; -}; - -/** - * Contains response data for the calculateBaseline operation. - */ -export type MetricBaselineCalculateBaselineResponse = CalculateBaselineResponse & { - /** - * 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: CalculateBaselineResponse; - }; -}; - -/** - * Contains response data for the list operation. - */ -export type BaselinesListResponse = MetricBaselinesResponse & { - /** - * The underlying HTTP response. - */ - _response: msRest.HttpResponse & { - /** - * The response body as text (string format) - */ - bodyAsText: string; - - /** - * The response body as parsed JSON or XML - */ - parsedBody: MetricBaselinesResponse; - }; -}; - -/** - * Contains response data for the listBySubscription operation. - */ -export type MetricAlertsListBySubscriptionResponse = MetricAlertResourceCollection & { - /** - * The underlying HTTP response. + * The underlying HTTP response. */ _response: msRest.HttpResponse & { /** @@ -4299,14 +560,14 @@ export type MetricAlertsListBySubscriptionResponse = MetricAlertResourceCollecti /** * The response body as parsed JSON or XML */ - parsedBody: MetricAlertResourceCollection; + parsedBody: ScheduledQueryRuleResourceCollection; }; }; /** * Contains response data for the listByResourceGroup operation. */ -export type MetricAlertsListByResourceGroupResponse = MetricAlertResourceCollection & { +export type ScheduledQueryRulesListByResourceGroupResponse = ScheduledQueryRuleResourceCollection & { /** * The underlying HTTP response. */ @@ -4319,94 +580,14 @@ export type MetricAlertsListByResourceGroupResponse = MetricAlertResourceCollect /** * The response body as parsed JSON or XML */ - parsedBody: MetricAlertResourceCollection; + parsedBody: ScheduledQueryRuleResourceCollection; }; }; /** * Contains response data for the get operation. */ -export type MetricAlertsGetResponse = MetricAlertResource & { - /** - * 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: MetricAlertResource; - }; -}; - -/** - * Contains response data for the createOrUpdate operation. - */ -export type MetricAlertsCreateOrUpdateResponse = MetricAlertResource & { - /** - * 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: MetricAlertResource; - }; -}; - -/** - * Contains response data for the update operation. - */ -export type MetricAlertsUpdateResponse = MetricAlertResource & { - /** - * 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: MetricAlertResource; - }; -}; - -/** - * Contains response data for the list operation. - */ -export type MetricAlertsStatusListResponse = MetricAlertStatusCollection & { - /** - * 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: MetricAlertStatusCollection; - }; -}; - -/** - * Contains response data for the listByName operation. - */ -export type MetricAlertsStatusListByNameResponse = MetricAlertStatusCollection & { +export type ScheduledQueryRulesGetResponse = ScheduledQueryRuleResource & { /** * The underlying HTTP response. */ @@ -4419,34 +600,14 @@ export type MetricAlertsStatusListByNameResponse = MetricAlertStatusCollection & /** * The response body as parsed JSON or XML */ - parsedBody: MetricAlertStatusCollection; + parsedBody: ScheduledQueryRuleResource; }; }; /** * Contains response data for the createOrUpdate operation. */ -export type ScheduledQueryRulesCreateOrUpdateResponse = LogSearchRuleResource & { - /** - * 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: LogSearchRuleResource; - }; -}; - -/** - * Contains response data for the get operation. - */ -export type ScheduledQueryRulesGetResponse = LogSearchRuleResource & { +export type ScheduledQueryRulesCreateOrUpdateResponse = ScheduledQueryRuleResource & { /** * The underlying HTTP response. */ @@ -4459,54 +620,14 @@ export type ScheduledQueryRulesGetResponse = LogSearchRuleResource & { /** * The response body as parsed JSON or XML */ - parsedBody: LogSearchRuleResource; + parsedBody: ScheduledQueryRuleResource; }; }; /** * Contains response data for the update operation. */ -export type ScheduledQueryRulesUpdateResponse = LogSearchRuleResource & { - /** - * 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: LogSearchRuleResource; - }; -}; - -/** - * Contains response data for the listBySubscription operation. - */ -export type ScheduledQueryRulesListBySubscriptionResponse = LogSearchRuleResourceCollection & { - /** - * 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: LogSearchRuleResourceCollection; - }; -}; - -/** - * Contains response data for the listByResourceGroup operation. - */ -export type ScheduledQueryRulesListByResourceGroupResponse = LogSearchRuleResourceCollection & { +export type ScheduledQueryRulesUpdateResponse = ScheduledQueryRuleResource & { /** * The underlying HTTP response. */ @@ -4519,14 +640,14 @@ export type ScheduledQueryRulesListByResourceGroupResponse = LogSearchRuleResour /** * The response body as parsed JSON or XML */ - parsedBody: LogSearchRuleResourceCollection; + parsedBody: ScheduledQueryRuleResource; }; }; /** - * Contains response data for the list operation. + * Contains response data for the listBySubscriptionNext operation. */ -export type MetricNamespacesListResponse = MetricNamespaceCollection & { +export type ScheduledQueryRulesListBySubscriptionNextResponse = ScheduledQueryRuleResourceCollection & { /** * The underlying HTTP response. */ @@ -4539,14 +660,14 @@ export type MetricNamespacesListResponse = MetricNamespaceCollection & { /** * The response body as parsed JSON or XML */ - parsedBody: MetricNamespaceCollection; + parsedBody: ScheduledQueryRuleResourceCollection; }; }; /** - * Contains response data for the getOnboardingStatus operation. + * Contains response data for the listByResourceGroupNext operation. */ -export type VMInsightsGetOnboardingStatusResponse = VMInsightsOnboardingStatus & { +export type ScheduledQueryRulesListByResourceGroupNextResponse = ScheduledQueryRuleResourceCollection & { /** * The underlying HTTP response. */ @@ -4559,6 +680,6 @@ export type VMInsightsGetOnboardingStatusResponse = VMInsightsOnboardingStatus & /** * The response body as parsed JSON or XML */ - parsedBody: VMInsightsOnboardingStatus; + parsedBody: ScheduledQueryRuleResourceCollection; }; }; 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..bad868e8f7fd 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,42 +12,25 @@ 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 Actions: msRest.CompositeMapper = { + serializedName: "Actions", type: { name: "Composite", - className: "Resource", + className: "Actions", 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" - } - }, - location: { - required: true, - serializedName: "location", + actionGroups: { + serializedName: "actionGroups", type: { - name: "String" + name: "Sequence", + element: { + type: { + name: "String" + } + } } }, - tags: { - serializedName: "tags", + customProperties: { + serializedName: "customProperties", type: { name: "Dictionary", value: { @@ -61,221 +44,197 @@ export const Resource: msRest.CompositeMapper = { } }; -export const ScaleCapacity: msRest.CompositeMapper = { - serializedName: "ScaleCapacity", +export const Dimension: msRest.CompositeMapper = { + serializedName: "Dimension", type: { name: "Composite", - className: "ScaleCapacity", + className: "Dimension", modelProperties: { - minimum: { + name: { required: true, - serializedName: "minimum", + serializedName: "name", type: { name: "String" } }, - maximum: { + operator: { required: true, - serializedName: "maximum", + serializedName: "operator", type: { name: "String" } }, - default: { + values: { required: true, - serializedName: "default", + serializedName: "values", type: { - name: "String" + name: "Sequence", + element: { + type: { + name: "String" + } + } } } } } }; -export const MetricTrigger: msRest.CompositeMapper = { - serializedName: "MetricTrigger", +export const ConditionFailingPeriods: msRest.CompositeMapper = { + serializedName: "Condition_failingPeriods", type: { name: "Composite", - className: "MetricTrigger", + className: "ConditionFailingPeriods", modelProperties: { - metricName: { - required: true, - serializedName: "metricName", + numberOfEvaluationPeriods: { + serializedName: "numberOfEvaluationPeriods", + defaultValue: 1, type: { - name: "String" + name: "Number" } }, - metricResourceUri: { - required: true, - serializedName: "metricResourceUri", + minFailingPeriodsToAlert: { + serializedName: "minFailingPeriodsToAlert", + defaultValue: 1, + type: { + name: "Number" + } + } + } + } +}; + +export const Condition: msRest.CompositeMapper = { + serializedName: "Condition", + type: { + name: "Composite", + className: "Condition", + modelProperties: { + query: { + serializedName: "query", type: { name: "String" } }, - timeGrain: { - required: true, - serializedName: "timeGrain", + timeAggregation: { + serializedName: "timeAggregation", type: { - name: "TimeSpan" + name: "String" } }, - statistic: { - required: true, - serializedName: "statistic", + metricMeasureColumn: { + serializedName: "metricMeasureColumn", type: { - name: "Enum", - allowedValues: [ - "Average", - "Min", - "Max", - "Sum" - ] + name: "String" } }, - timeWindow: { - required: true, - serializedName: "timeWindow", + resourceIdColumn: { + serializedName: "resourceIdColumn", type: { - name: "TimeSpan" + name: "String" } }, - timeAggregation: { - required: true, - serializedName: "timeAggregation", + dimensions: { + serializedName: "dimensions", type: { - name: "Enum", - allowedValues: [ - "Average", - "Minimum", - "Maximum", - "Total", - "Count", - "Last" - ] + name: "Sequence", + element: { + type: { + name: "Composite", + className: "Dimension" + } + } } }, operator: { - required: true, serializedName: "operator", type: { - name: "Enum", - allowedValues: [ - "Equals", - "NotEquals", - "GreaterThan", - "GreaterThanOrEqual", - "LessThan", - "LessThanOrEqual" - ] + name: "String" } }, 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", + failingPeriods: { + serializedName: "failingPeriods", type: { - name: "Enum", - allowedValues: [ - "ChangeCount", - "PercentChangeCount", - "ExactCount" - ] + name: "Composite", + className: "ConditionFailingPeriods" } }, - value: { - serializedName: "value", - defaultValue: '1', + metricName: { + serializedName: "metricName", type: { name: "String" } - }, - cooldown: { - required: true, - serializedName: "cooldown", - type: { - name: "TimeSpan" - } } } } }; -export const ScaleRule: msRest.CompositeMapper = { - serializedName: "ScaleRule", +export const ScheduledQueryRuleCriteria: msRest.CompositeMapper = { + serializedName: "ScheduledQueryRuleCriteria", type: { name: "Composite", - className: "ScaleRule", + className: "ScheduledQueryRuleCriteria", modelProperties: { - metricTrigger: { - required: true, - serializedName: "metricTrigger", - type: { - name: "Composite", - className: "MetricTrigger" - } - }, - scaleAction: { - required: true, - serializedName: "scaleAction", + allOf: { + serializedName: "allOf", type: { - name: "Composite", - className: "ScaleAction" + name: "Sequence", + element: { + type: { + name: "Composite", + className: "Condition" + } + } } } } } }; -export const TimeWindow: msRest.CompositeMapper = { - serializedName: "TimeWindow", +export const SystemData: msRest.CompositeMapper = { + serializedName: "systemData", type: { name: "Composite", - className: "TimeWindow", + className: "SystemData", modelProperties: { - timeZone: { - serializedName: "timeZone", + createdBy: { + serializedName: "createdBy", type: { name: "String" } }, - start: { - required: true, - serializedName: "start", + createdByType: { + serializedName: "createdByType", + type: { + name: "String" + } + }, + createdAt: { + serializedName: "createdAt", type: { name: "DateTime" } }, - end: { - required: true, - serializedName: "end", + lastModifiedBy: { + serializedName: "lastModifiedBy", + type: { + name: "String" + } + }, + lastModifiedByType: { + serializedName: "lastModifiedByType", + type: { + name: "String" + } + }, + lastModifiedAt: { + serializedName: "lastModifiedAt", type: { name: "DateTime" } @@ -284,166 +243,134 @@ export const TimeWindow: msRest.CompositeMapper = { } }; -export const RecurrentSchedule: msRest.CompositeMapper = { - serializedName: "RecurrentSchedule", +export const Resource: msRest.CompositeMapper = { + serializedName: "Resource", type: { name: "Composite", - className: "RecurrentSchedule", + className: "Resource", modelProperties: { - timeZone: { - required: true, - serializedName: "timeZone", + id: { + readOnly: true, + serializedName: "id", type: { name: "String" } }, - days: { - required: true, - serializedName: "days", - type: { - name: "Sequence", - element: { - type: { - name: "String" - } - } - } - }, - hours: { - required: true, - serializedName: "hours", + name: { + readOnly: true, + serializedName: "name", type: { - name: "Sequence", - element: { - type: { - name: "Number" - } - } + name: "String" } }, - minutes: { - required: true, - serializedName: "minutes", + type: { + readOnly: true, + serializedName: "type", type: { - name: "Sequence", - element: { - type: { - name: "Number" - } - } + name: "String" } } } } }; -export const Recurrence: msRest.CompositeMapper = { - serializedName: "Recurrence", +export const TrackedResource: msRest.CompositeMapper = { + serializedName: "TrackedResource", type: { name: "Composite", - className: "Recurrence", + className: "TrackedResource", modelProperties: { - frequency: { - required: true, - serializedName: "frequency", + ...Resource.type.modelProperties, + tags: { + serializedName: "tags", type: { - name: "Enum", - allowedValues: [ - "None", - "Second", - "Minute", - "Hour", - "Day", - "Week", - "Month", - "Year" - ] + name: "Dictionary", + value: { + type: { + name: "String" + } + } } }, - schedule: { + location: { required: true, - serializedName: "schedule", + serializedName: "location", type: { - name: "Composite", - className: "RecurrentSchedule" + name: "String" } } } } }; -export const AutoscaleProfile: msRest.CompositeMapper = { - serializedName: "AutoscaleProfile", +export const ScheduledQueryRuleResource: msRest.CompositeMapper = { + serializedName: "ScheduledQueryRuleResource", type: { name: "Composite", - className: "AutoscaleProfile", + className: "ScheduledQueryRuleResource", modelProperties: { - name: { - required: true, - serializedName: "name", + ...TrackedResource.type.modelProperties, + kind: { + serializedName: "kind", type: { name: "String" } }, - capacity: { - required: true, - serializedName: "capacity", + etag: { + readOnly: true, + serializedName: "etag", + type: { + name: "String" + } + }, + systemData: { + readOnly: true, + serializedName: "systemData", type: { name: "Composite", - className: "ScaleCapacity" + className: "SystemData" } }, - rules: { - required: true, - serializedName: "rules", + createdWithApiVersion: { + readOnly: true, + serializedName: "properties.createdWithApiVersion", type: { - name: "Sequence", - element: { - type: { - name: "Composite", - className: "ScaleRule" - } - } + name: "String" } }, - fixedDate: { - serializedName: "fixedDate", + isLegacyLogAnalyticsRule: { + readOnly: true, + serializedName: "properties.isLegacyLogAnalyticsRule", type: { - name: "Composite", - className: "TimeWindow" + name: "Boolean" } }, - recurrence: { - serializedName: "recurrence", + description: { + serializedName: "properties.description", type: { - name: "Composite", - className: "Recurrence" + name: "String" } - } - } - } -}; - -export const EmailNotification: msRest.CompositeMapper = { - serializedName: "EmailNotification", - type: { - name: "Composite", - className: "EmailNotification", - modelProperties: { - sendToSubscriptionAdministrator: { - serializedName: "sendToSubscriptionAdministrator", + }, + displayName: { + serializedName: "properties.displayName", type: { - name: "Boolean" + name: "String" + } + }, + severity: { + serializedName: "properties.severity", + type: { + name: "Number" } }, - sendToSubscriptionCoAdministrators: { - serializedName: "sendToSubscriptionCoAdministrators", + enabled: { + serializedName: "properties.enabled", type: { name: "Boolean" } }, - customEmails: { - serializedName: "customEmails", + scopes: { + serializedName: "properties.scopes", type: { name: "Sequence", element: { @@ -452,139 +379,90 @@ export const EmailNotification: msRest.CompositeMapper = { } } } - } - } - } -}; - -export const WebhookNotification: msRest.CompositeMapper = { - serializedName: "WebhookNotification", - type: { - name: "Composite", - className: "WebhookNotification", - modelProperties: { - serviceUri: { - serializedName: "serviceUri", - type: { - name: "String" - } }, - properties: { - serializedName: "properties", + evaluationFrequency: { + serializedName: "properties.evaluationFrequency", type: { - name: "Dictionary", - value: { - type: { - name: "String" - } - } + name: "TimeSpan" } - } - } - } -}; - -export const AutoscaleNotification: msRest.CompositeMapper = { - serializedName: "AutoscaleNotification", - type: { - name: "Composite", - className: "AutoscaleNotification", - modelProperties: { - operation: { - required: true, - isConstant: true, - serializedName: "operation", - defaultValue: 'Scale', + }, + windowSize: { + serializedName: "properties.windowSize", type: { - name: "String" + name: "TimeSpan" } }, - email: { - serializedName: "email", + overrideQueryTimeRange: { + serializedName: "properties.overrideQueryTimeRange", type: { - name: "Composite", - className: "EmailNotification" + name: "TimeSpan" } }, - webhooks: { - serializedName: "webhooks", + targetResourceTypes: { + serializedName: "properties.targetResourceTypes", type: { name: "Sequence", element: { type: { - name: "Composite", - className: "WebhookNotification" + name: "String" } } } - } - } - } -}; - -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 - }, + }, + criteria: { + serializedName: "properties.criteria", type: { - name: "Sequence", - element: { - type: { - name: "Composite", - className: "AutoscaleProfile" - } - } + name: "Composite", + className: "ScheduledQueryRuleCriteria" } }, - notifications: { - serializedName: "properties.notifications", + muteActionsDuration: { + serializedName: "properties.muteActionsDuration", type: { - name: "Sequence", - element: { - type: { - name: "Composite", - className: "AutoscaleNotification" - } - } + name: "TimeSpan" } }, - enabled: { - serializedName: "properties.enabled", - defaultValue: true, + actions: { + serializedName: "properties.actions", + type: { + name: "Composite", + className: "Actions" + } + }, + isWorkspaceAlertsStorageConfigured: { + readOnly: true, + serializedName: "properties.isWorkspaceAlertsStorageConfigured", type: { name: "Boolean" } }, - autoscaleSettingResourceName: { - serializedName: "properties.name", + checkWorkspaceAlertsStorageConfigured: { + serializedName: "properties.checkWorkspaceAlertsStorageConfigured", type: { - name: "String" + name: "Boolean" } }, - targetResourceUri: { - serializedName: "properties.targetResourceUri", + skipQueryValidation: { + serializedName: "properties.skipQueryValidation", type: { - name: "String" + name: "Boolean" + } + }, + autoMitigate: { + serializedName: "properties.autoMitigate", + type: { + name: "Boolean" } } } } }; -export const AutoscaleSettingResourcePatch: msRest.CompositeMapper = { - serializedName: "AutoscaleSettingResourcePatch", +export const ScheduledQueryRuleResourcePatch: msRest.CompositeMapper = { + serializedName: "ScheduledQueryRuleResourcePatch", type: { name: "Composite", - className: "AutoscaleSettingResourcePatch", + className: "ScheduledQueryRuleResourcePatch", modelProperties: { tags: { serializedName: "tags", @@ -597,4252 +475,252 @@ export const AutoscaleSettingResourcePatch: msRest.CompositeMapper = { } } }, - profiles: { - required: true, - serializedName: "properties.profiles", - constraints: { - MaxItems: 20 - }, + createdWithApiVersion: { + readOnly: true, + serializedName: "properties.createdWithApiVersion", type: { - name: "Sequence", - element: { - type: { - name: "Composite", - className: "AutoscaleProfile" - } - } + name: "String" + } + }, + isLegacyLogAnalyticsRule: { + readOnly: true, + serializedName: "properties.isLegacyLogAnalyticsRule", + type: { + name: "Boolean" } }, - notifications: { - serializedName: "properties.notifications", + description: { + serializedName: "properties.description", + type: { + name: "String" + } + }, + displayName: { + serializedName: "properties.displayName", + type: { + name: "String" + } + }, + severity: { + serializedName: "properties.severity", + type: { + name: "Number" + } + }, + enabled: { + serializedName: "properties.enabled", + type: { + name: "Boolean" + } + }, + scopes: { + serializedName: "properties.scopes", type: { name: "Sequence", element: { type: { - name: "Composite", - className: "AutoscaleNotification" + name: "String" } } } }, - enabled: { - serializedName: "properties.enabled", - defaultValue: true, + evaluationFrequency: { + serializedName: "properties.evaluationFrequency", type: { - name: "Boolean" + name: "TimeSpan" } }, - name: { - serializedName: "properties.name", + windowSize: { + serializedName: "properties.windowSize", type: { - name: "String" + name: "TimeSpan" } }, - targetResourceUri: { - serializedName: "properties.targetResourceUri", + overrideQueryTimeRange: { + serializedName: "properties.overrideQueryTimeRange", type: { - name: "String" + name: "TimeSpan" } - } - } - } -}; - -export const ErrorResponse: msRest.CompositeMapper = { - serializedName: "ErrorResponse", - type: { - name: "Composite", - className: "ErrorResponse", - modelProperties: { - code: { - serializedName: "code", + }, + targetResourceTypes: { + serializedName: "properties.targetResourceTypes", type: { - name: "String" + name: "Sequence", + element: { + type: { + name: "String" + } + } } }, - message: { - serializedName: "message", + criteria: { + serializedName: "properties.criteria", type: { - name: "String" + name: "Composite", + className: "ScheduledQueryRuleCriteria" } - } - } - } -}; - -export const OperationDisplay: msRest.CompositeMapper = { - serializedName: "Operation_display", - type: { - name: "Composite", - className: "OperationDisplay", - modelProperties: { - provider: { - serializedName: "provider", + }, + muteActionsDuration: { + serializedName: "properties.muteActionsDuration", type: { - name: "String" + name: "TimeSpan" } }, - resource: { - serializedName: "resource", + actions: { + serializedName: "properties.actions", type: { - name: "String" + name: "Composite", + className: "Actions" } }, - operation: { - serializedName: "operation", + isWorkspaceAlertsStorageConfigured: { + readOnly: true, + serializedName: "properties.isWorkspaceAlertsStorageConfigured", type: { - name: "String" + name: "Boolean" } - } - } - } -}; - -export const Operation: msRest.CompositeMapper = { - serializedName: "Operation", - type: { - name: "Composite", - className: "Operation", - modelProperties: { - name: { - serializedName: "name", + }, + checkWorkspaceAlertsStorageConfigured: { + serializedName: "properties.checkWorkspaceAlertsStorageConfigured", type: { - name: "String" + name: "Boolean" } }, - display: { - serializedName: "display", + skipQueryValidation: { + serializedName: "properties.skipQueryValidation", type: { - name: "Composite", - className: "OperationDisplay" + name: "Boolean" + } + }, + autoMitigate: { + serializedName: "properties.autoMitigate", + type: { + name: "Boolean" } } } } }; -export const OperationListResult: msRest.CompositeMapper = { - serializedName: "OperationListResult", +export const ErrorAdditionalInfo: msRest.CompositeMapper = { + serializedName: "ErrorAdditionalInfo", type: { name: "Composite", - className: "OperationListResult", + className: "ErrorAdditionalInfo", modelProperties: { - value: { - serializedName: "value", + type: { + readOnly: true, + serializedName: "type", type: { - name: "Sequence", - element: { - type: { - name: "Composite", - className: "Operation" - } - } + name: "String" } }, - nextLink: { - serializedName: "nextLink", + info: { + readOnly: true, + serializedName: "info", type: { - name: "String" + name: "Object" } } } } }; -export const Incident: msRest.CompositeMapper = { - serializedName: "Incident", +export const ErrorResponse: msRest.CompositeMapper = { + serializedName: "ErrorResponse", type: { name: "Composite", - className: "Incident", + className: "ErrorResponse", modelProperties: { - name: { + code: { readOnly: true, - serializedName: "name", + serializedName: "code", type: { name: "String" } }, - ruleName: { + message: { readOnly: true, - serializedName: "ruleName", + serializedName: "message", type: { name: "String" } }, - isActive: { + target: { readOnly: true, - serializedName: "isActive", + serializedName: "target", type: { - name: "Boolean" + name: "String" } }, - activatedTime: { + details: { readOnly: true, - serializedName: "activatedTime", + serializedName: "details", type: { - name: "DateTime" + name: "Sequence", + element: { + type: { + name: "Composite", + className: "ErrorResponse" + } + } } }, - resolvedTime: { + additionalInfo: { readOnly: true, - serializedName: "resolvedTime", + serializedName: "additionalInfo", type: { - name: "DateTime" + name: "Sequence", + element: { + type: { + name: "Composite", + className: "ErrorAdditionalInfo" + } + } } } } } }; -export const RuleDataSource: msRest.CompositeMapper = { - serializedName: "RuleDataSource", +export const ErrorContract: msRest.CompositeMapper = { + serializedName: "ErrorContract", type: { name: "Composite", - polymorphicDiscriminator: { - serializedName: "odata.type", - clientName: "odatatype" - }, - uberParent: "RuleDataSource", - className: "RuleDataSource", + className: "ErrorContract", modelProperties: { - resourceUri: { - serializedName: "resourceUri", - type: { - name: "String" - } - }, - odatatype: { - required: true, - serializedName: "odata\\.type", + error: { + serializedName: "error", type: { - name: "String" + name: "Composite", + className: "ErrorResponse" } } } } }; -export const RuleCondition: msRest.CompositeMapper = { - serializedName: "RuleCondition", +export const ProxyResource: msRest.CompositeMapper = { + serializedName: "ProxyResource", type: { name: "Composite", - polymorphicDiscriminator: { - serializedName: "odata.type", - clientName: "odatatype" - }, - uberParent: "RuleCondition", - className: "RuleCondition", + className: "ProxyResource", 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", - 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", - type: { - name: "Composite", - className: "WorkspaceInfo" - } - } - } - } -}; - -export const VMInsightsOnboardingStatus: msRest.CompositeMapper = { - serializedName: "VMInsightsOnboardingStatus", - type: { - name: "Composite", - className: "VMInsightsOnboardingStatus", - modelProperties: { - ...ProxyResource.type.modelProperties, - resourceId: { - required: true, - serializedName: "properties.resourceId", - type: { - name: "String" - } - }, - onboardingStatus: { - required: true, - serializedName: "properties.onboardingStatus", - type: { - name: "String" - } - }, - dataStatus: { - required: true, - serializedName: "properties.dataStatus", - type: { - name: "String" - } - }, - data: { - serializedName: "properties.data", - type: { - name: "Sequence", - element: { - type: { - name: "Composite", - className: "DataContainer" - } - } - } - } + ...Resource.type.modelProperties } } }; -export const AutoscaleSettingResourceCollection: msRest.CompositeMapper = { - serializedName: "AutoscaleSettingResourceCollection", +export const AzureEntityResource: msRest.CompositeMapper = { + serializedName: "AzureEntityResource", type: { name: "Composite", - className: "AutoscaleSettingResourceCollection", + className: "AzureEntityResource", modelProperties: { - value: { - required: true, - serializedName: "", - type: { - name: "Sequence", - element: { - type: { - name: "Composite", - className: "AutoscaleSettingResource" - } - } - } - }, - nextLink: { - serializedName: "nextLink", + ...Resource.type.modelProperties, + etag: { + readOnly: true, + serializedName: "etag", type: { name: "String" } @@ -4851,137 +729,26 @@ export const AutoscaleSettingResourceCollection: msRest.CompositeMapper = { } }; -export const IncidentListResult: msRest.CompositeMapper = { - serializedName: "IncidentListResult", - type: { - name: "Composite", - className: "IncidentListResult", - modelProperties: { - value: { - serializedName: "", - type: { - name: "Sequence", - element: { - type: { - name: "Composite", - className: "Incident" - } - } - } - } - } - } -}; - -export const AlertRuleResourceCollection: msRest.CompositeMapper = { - serializedName: "AlertRuleResourceCollection", - type: { - name: "Composite", - className: "AlertRuleResourceCollection", - modelProperties: { - value: { - serializedName: "", - type: { - name: "Sequence", - element: { - type: { - name: "Composite", - className: "AlertRuleResource" - } - } - } - } - } - } -}; - -export const LogProfileCollection: msRest.CompositeMapper = { - serializedName: "LogProfileCollection", - type: { - name: "Composite", - className: "LogProfileCollection", - modelProperties: { - value: { - required: true, - serializedName: "", - type: { - name: "Sequence", - element: { - type: { - name: "Composite", - className: "LogProfileResource" - } - } - } - } - } - } -}; - -export const ActionGroupList: msRest.CompositeMapper = { - serializedName: "ActionGroupList", - type: { - name: "Composite", - className: "ActionGroupList", - modelProperties: { - value: { - serializedName: "", - type: { - name: "Sequence", - element: { - type: { - name: "Composite", - className: "ActionGroupResource" - } - } - } - } - } - } -}; - -export const ActivityLogAlertList: msRest.CompositeMapper = { - serializedName: "ActivityLogAlertList", - type: { - name: "Composite", - className: "ActivityLogAlertList", - modelProperties: { - value: { - serializedName: "", - type: { - name: "Sequence", - element: { - type: { - name: "Composite", - className: "ActivityLogAlertResource" - } - } - } - } - } - } -}; - -export const EventDataCollection: msRest.CompositeMapper = { - serializedName: "EventDataCollection", +export const ScheduledQueryRuleResourceCollection: msRest.CompositeMapper = { + serializedName: "ScheduledQueryRuleResourceCollection", type: { name: "Composite", - className: "EventDataCollection", + className: "ScheduledQueryRuleResourceCollection", modelProperties: { value: { - required: true, serializedName: "", type: { name: "Sequence", element: { type: { name: "Composite", - className: "EventData" + className: "ScheduledQueryRuleResource" } } } }, nextLink: { + readOnly: true, serializedName: "nextLink", type: { name: "String" @@ -4990,161 +757,3 @@ export const EventDataCollection: msRest.CompositeMapper = { } } }; - -export const EventCategoryCollection: msRest.CompositeMapper = { - serializedName: "EventCategoryCollection", - type: { - name: "Composite", - className: "EventCategoryCollection", - modelProperties: { - value: { - required: true, - serializedName: "", - type: { - name: "Sequence", - element: { - type: { - name: "Composite", - className: "LocalizableString" - } - } - } - } - } - } -}; - -export const MetricDefinitionCollection: msRest.CompositeMapper = { - serializedName: "MetricDefinitionCollection", - type: { - name: "Composite", - className: "MetricDefinitionCollection", - modelProperties: { - value: { - required: true, - serializedName: "", - type: { - name: "Sequence", - element: { - type: { - name: "Composite", - className: "MetricDefinition" - } - } - } - } - } - } -}; - -export const MetricBaselinesResponse: msRest.CompositeMapper = { - serializedName: "MetricBaselinesResponse", - type: { - name: "Composite", - className: "MetricBaselinesResponse", - modelProperties: { - value: { - serializedName: "", - type: { - name: "Sequence", - element: { - type: { - name: "Composite", - className: "SingleMetricBaseline" - } - } - } - } - } - } -}; - -export const MetricAlertResourceCollection: msRest.CompositeMapper = { - serializedName: "MetricAlertResourceCollection", - type: { - name: "Composite", - className: "MetricAlertResourceCollection", - modelProperties: { - value: { - serializedName: "", - type: { - name: "Sequence", - element: { - type: { - name: "Composite", - className: "MetricAlertResource" - } - } - } - } - } - } -}; - -export const LogSearchRuleResourceCollection: msRest.CompositeMapper = { - serializedName: "LogSearchRuleResourceCollection", - type: { - name: "Composite", - className: "LogSearchRuleResourceCollection", - modelProperties: { - value: { - serializedName: "", - type: { - name: "Sequence", - element: { - type: { - name: "Composite", - className: "LogSearchRuleResource" - } - } - } - } - } - } -}; - -export const MetricNamespaceCollection: msRest.CompositeMapper = { - serializedName: "MetricNamespaceCollection", - type: { - name: "Composite", - className: "MetricNamespaceCollection", - modelProperties: { - value: { - required: true, - serializedName: "", - type: { - name: "Sequence", - element: { - type: { - name: "Composite", - className: "MetricNamespace" - } - } - } - } - } - } -}; - -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..bf40339d9ec6 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,285 +19,14 @@ 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: { - required: true, - serializedName: "activityLogAlertName", - type: { - name: "String" - } - } -}; -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 = { +export const apiVersion: msRest.OperationQueryParameter = { parameterPath: "apiVersion", mapper: { required: true, - isConstant: true, serializedName: "api-version", - defaultValue: '2018-03-01', - type: { - name: "String" - } - } -}; -export const apiVersion9: 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,55 +43,20 @@ 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", + constraints: { + MaxLength: 90, + MinLength: 1 + }, 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: { @@ -374,83 +67,16 @@ export const ruleName: msRest.OperationURLParameter = { } } }; -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", - type: { - name: "String" - } - } -}; export const subscriptionId: msRest.OperationURLParameter = { parameterPath: "subscriptionId", 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 index 0fffe5f5617c..fe3116fd2d23 100644 --- a/sdk/monitor/arm-monitor/src/models/scheduledQueryRulesMappers.ts +++ b/sdk/monitor/arm-monitor/src/models/scheduledQueryRulesMappers.ts @@ -1,89 +1,27 @@ /* - * 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, - ActivityLogAlertResource, - AlertingAction, - AlertRuleResource, - ArmRoleReceiver, - AutomationRunbookReceiver, - AutoscaleNotification, - AutoscaleProfile, - AutoscaleSettingResource, - AzNsActionGroup, - AzureAppPushReceiver, - AzureFunctionReceiver, + Actions, + AzureEntityResource, BaseResource, - Criteria, - DataContainer, - DiagnosticSettingsCategoryResource, - DiagnosticSettingsResource, + Condition, + ConditionFailingPeriods, Dimension, - DynamicMetricCriteria, - DynamicThresholdFailingPeriods, - EmailNotification, - EmailReceiver, + ErrorAdditionalInfo, + ErrorContract, 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 + ScheduledQueryRuleCriteria, + ScheduledQueryRuleResource, + ScheduledQueryRuleResourceCollection, + ScheduledQueryRuleResourcePatch, + SystemData, + TrackedResource } 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/monitorClient.ts b/sdk/monitor/arm-monitor/src/monitorClient.ts new file mode 100644 index 000000000000..55315190f1b7 --- /dev/null +++ b/sdk/monitor/arm-monitor/src/monitorClient.ts @@ -0,0 +1,47 @@ +/* + * 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. + */ + +import * as msRest from "@azure/ms-rest-js"; +import { TokenCredential } from "@azure/core-auth"; +import * as Models from "./models"; +import * as Mappers from "./models/mappers"; +import * as operations from "./operations"; +import { MonitorClientContext } from "./monitorClientContext"; + + +class MonitorClient extends MonitorClientContext { + // Operation groups + scheduledQueryRules: operations.ScheduledQueryRules; + + /** + * Initializes a new instance of the MonitorClient class. + * @param credentials Credentials needed for the client to connect to Azure. Credentials + * implementing the TokenCredential interface from the @azure/identity package are recommended. For + * more information about these credentials, see + * {@link https://www.npmjs.com/package/@azure/identity}. Credentials implementing the + * ServiceClientCredentials interface from the older packages @azure/ms-rest-nodeauth and + * @azure/ms-rest-browserauth are also supported. + * @param subscriptionId The ID of the target subscription. + * @param [options] The parameter options + */ + constructor(credentials: msRest.ServiceClientCredentials | TokenCredential, subscriptionId: string, options?: Models.MonitorClientOptions) { + super(credentials, subscriptionId, options); + this.scheduledQueryRules = new operations.ScheduledQueryRules(this); + } +} + +// Operation Specifications + +export { + MonitorClient, + MonitorClientContext, + Models as MonitorModels, + Mappers as MonitorMappers +}; +export * from "./operations"; diff --git a/sdk/monitor/arm-monitor/src/monitorManagementClientContext.ts b/sdk/monitor/arm-monitor/src/monitorClientContext.ts similarity index 83% rename from sdk/monitor/arm-monitor/src/monitorManagementClientContext.ts rename to sdk/monitor/arm-monitor/src/monitorClientContext.ts index 4e9bab907e7d..8e693018f388 100644 --- a/sdk/monitor/arm-monitor/src/monitorManagementClientContext.ts +++ b/sdk/monitor/arm-monitor/src/monitorClientContext.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 @@ -10,28 +9,29 @@ import * as Models from "./models"; import * as msRest from "@azure/ms-rest-js"; -import { TokenCredential } from "@azure/core-auth"; import * as msRestAzure from "@azure/ms-rest-azure-js"; +import { TokenCredential } from "@azure/core-auth"; const packageName = "@azure/arm-monitor"; const packageVersion = "6.1.1"; -export class MonitorManagementClientContext extends msRestAzure.AzureServiceClient { +export class MonitorClientContext extends msRestAzure.AzureServiceClient { credentials: msRest.ServiceClientCredentials | TokenCredential; + apiVersion?: string; subscriptionId: string; /** - * Initializes a new instance of the MonitorManagementClient class. + * Initializes a new instance of the MonitorClient class. * @param credentials Credentials needed for the client to connect to Azure. Credentials * implementing the TokenCredential interface from the @azure/identity package are recommended. For * more information about these credentials, see * {@link https://www.npmjs.com/package/@azure/identity}. Credentials implementing the * ServiceClientCredentials interface from the older packages @azure/ms-rest-nodeauth and * @azure/ms-rest-browserauth are also supported. - * @param subscriptionId The Azure subscription Id. + * @param subscriptionId The ID of the target subscription. * @param [options] The parameter options */ - constructor(credentials: msRest.ServiceClientCredentials | TokenCredential, subscriptionId: string, options?: Models.MonitorManagementClientOptions) { + constructor(credentials: msRest.ServiceClientCredentials | TokenCredential, subscriptionId: string, options?: Models.MonitorClientOptions) { if (credentials == undefined) { throw new Error('\'credentials\' cannot be null.'); } @@ -49,6 +49,7 @@ export class MonitorManagementClientContext extends msRestAzure.AzureServiceClie super(credentials, options); + this.apiVersion = '2021-08-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/monitorManagementClient.ts b/sdk/monitor/arm-monitor/src/monitorManagementClient.ts deleted file mode 100644 index 8f76eb98ccbb..000000000000 --- a/sdk/monitor/arm-monitor/src/monitorManagementClient.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. - */ - -import * as msRest from "@azure/ms-rest-js"; -import { TokenCredential } from "@azure/core-auth"; -import * as Models from "./models"; -import * as Mappers from "./models/mappers"; -import * as operations from "./operations"; -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. Credentials - * implementing the TokenCredential interface from the @azure/identity package are recommended. For - * more information about these credentials, see - * {@link https://www.npmjs.com/package/@azure/identity}. Credentials implementing the - * ServiceClientCredentials interface from the older packages @azure/ms-rest-nodeauth and - * @azure/ms-rest-browserauth are also supported. - * @param subscriptionId The Azure subscription Id. - * @param [options] The parameter options - */ - constructor(credentials: msRest.ServiceClientCredentials | TokenCredential, 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); - } -} - -// Operation Specifications - -export { - MonitorManagementClient, - MonitorManagementClientContext, - Models as MonitorManagementModels, - Mappers as MonitorManagementMappers -}; -export * from "./operations"; 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 deleted file mode 100644 index 257a6277a91e..000000000000 --- a/sdk/monitor/arm-monitor/src/operations/activityLogAlerts.ts +++ /dev/null @@ -1,382 +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/activityLogAlertsMappers"; -import * as Parameters from "../models/parameters"; -import { MonitorManagementClientContext } from "../monitorManagementClientContext"; - -/** Class representing a ActivityLogAlerts. */ -export class ActivityLogAlerts { - private readonly client: MonitorManagementClientContext; - - /** - * Create a ActivityLogAlerts. - * @param {MonitorManagementClientContext} client Reference to the service client. - */ - constructor(client: MonitorManagementClientContext) { - this.client = client; - } - - /** - * 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. - * @param [options] The optional parameters - * @returns Promise - */ - createOrUpdate(resourceGroupName: string, activityLogAlertName: string, activityLogAlert: 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 callback The callback - */ - createOrUpdate(resourceGroupName: string, activityLogAlertName: string, activityLogAlert: 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 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 { - return this.client.sendOperationRequest( - { - resourceGroupName, - activityLogAlertName, - activityLogAlert, - options - }, - createOrUpdateOperationSpec, - callback) as Promise; - } - - /** - * Get an activity log alert. - * @param resourceGroupName The name of the resource group. - * @param activityLogAlertName The name of the activity log alert. - * @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 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 options The optional parameters - * @param callback The callback - */ - get(resourceGroupName: string, activityLogAlertName: string, options: msRest.RequestOptionsBase, callback: msRest.ServiceCallback): void; - get(resourceGroupName: string, activityLogAlertName: string, options?: msRest.RequestOptionsBase | msRest.ServiceCallback, callback?: msRest.ServiceCallback): Promise { - return this.client.sendOperationRequest( - { - resourceGroupName, - activityLogAlertName, - options - }, - getOperationSpec, - callback) as Promise; - } - - /** - * Delete an activity log alert. - * @param resourceGroupName The name of the resource group. - * @param activityLogAlertName The name of the activity log alert. - * @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 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 options The optional parameters - * @param callback The callback - */ - deleteMethod(resourceGroupName: string, activityLogAlertName: string, options: msRest.RequestOptionsBase, callback: msRest.ServiceCallback): void; - deleteMethod(resourceGroupName: string, activityLogAlertName: string, options?: msRest.RequestOptionsBase | msRest.ServiceCallback, callback?: msRest.ServiceCallback): Promise { - return this.client.sendOperationRequest( - { - resourceGroupName, - activityLogAlertName, - options - }, - deleteMethodOperationSpec, - callback); - } - - /** - * 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. - * @param [options] The optional parameters - * @returns Promise - */ - update(resourceGroupName: string, activityLogAlertName: string, activityLogAlertPatch: Models.ActivityLogAlertPatchBody, 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 callback The callback - */ - update(resourceGroupName: string, activityLogAlertName: string, activityLogAlertPatch: Models.ActivityLogAlertPatchBody, 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 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 { - return this.client.sendOperationRequest( - { - resourceGroupName, - activityLogAlertName, - activityLogAlertPatch, - options - }, - updateOperationSpec, - callback) as Promise; - } - - /** - * Get a list of all activity log alerts 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 activity log alerts 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; - } -} - -// Operation Specifications -const serializer = new msRest.Serializer(Mappers); -const createOrUpdateOperationSpec: msRest.OperationSpec = { - httpMethod: "PUT", - path: "subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/microsoft.insights/activityLogAlerts/{activityLogAlertName}", - urlParameters: [ - Parameters.subscriptionId, - Parameters.resourceGroupName, - Parameters.activityLogAlertName - ], - queryParameters: [ - Parameters.apiVersion4 - ], - headerParameters: [ - Parameters.acceptLanguage - ], - requestBody: { - parameterPath: "activityLogAlert", - mapper: { - ...Mappers.ActivityLogAlertResource, - required: true - } - }, - responses: { - 200: { - bodyMapper: Mappers.ActivityLogAlertResource - }, - 201: { - bodyMapper: Mappers.ActivityLogAlertResource - }, - default: { - bodyMapper: Mappers.ErrorResponse - } - }, - serializer -}; - -const getOperationSpec: msRest.OperationSpec = { - httpMethod: "GET", - path: "subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/microsoft.insights/activityLogAlerts/{activityLogAlertName}", - urlParameters: [ - Parameters.subscriptionId, - Parameters.resourceGroupName, - Parameters.activityLogAlertName - ], - queryParameters: [ - Parameters.apiVersion4 - ], - headerParameters: [ - Parameters.acceptLanguage - ], - responses: { - 200: { - bodyMapper: Mappers.ActivityLogAlertResource - }, - default: { - bodyMapper: Mappers.ErrorResponse - } - }, - serializer -}; - -const deleteMethodOperationSpec: msRest.OperationSpec = { - httpMethod: "DELETE", - path: "subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/microsoft.insights/activityLogAlerts/{activityLogAlertName}", - urlParameters: [ - Parameters.subscriptionId, - Parameters.resourceGroupName, - Parameters.activityLogAlertName - ], - queryParameters: [ - Parameters.apiVersion4 - ], - 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/activityLogAlerts/{activityLogAlertName}", - urlParameters: [ - Parameters.subscriptionId, - Parameters.resourceGroupName, - Parameters.activityLogAlertName - ], - queryParameters: [ - Parameters.apiVersion4 - ], - headerParameters: [ - Parameters.acceptLanguage - ], - requestBody: { - parameterPath: "activityLogAlertPatch", - mapper: { - ...Mappers.ActivityLogAlertPatchBody, - required: true - } - }, - responses: { - 200: { - bodyMapper: Mappers.ActivityLogAlertResource - }, - default: { - bodyMapper: Mappers.ErrorResponse - } - }, - serializer -}; - -const listBySubscriptionIdOperationSpec: msRest.OperationSpec = { - httpMethod: "GET", - path: "subscriptions/{subscriptionId}/providers/microsoft.insights/activityLogAlerts", - urlParameters: [ - Parameters.subscriptionId - ], - queryParameters: [ - Parameters.apiVersion4 - ], - headerParameters: [ - Parameters.acceptLanguage - ], - responses: { - 200: { - bodyMapper: Mappers.ActivityLogAlertList - }, - default: { - bodyMapper: Mappers.ErrorResponse - } - }, - serializer -}; - -const listByResourceGroupOperationSpec: msRest.OperationSpec = { - httpMethod: "GET", - path: "subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/microsoft.insights/activityLogAlerts", - urlParameters: [ - Parameters.subscriptionId, - Parameters.resourceGroupName - ], - queryParameters: [ - Parameters.apiVersion4 - ], - headerParameters: [ - Parameters.acceptLanguage - ], - responses: { - 200: { - bodyMapper: Mappers.ActivityLogAlertList - }, - default: { - bodyMapper: Mappers.ErrorResponse - } - }, - serializer -}; 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..c088e30ffdb4 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 index 2e49d3d94545..8dcd1704dc7f 100644 --- a/sdk/monitor/arm-monitor/src/operations/scheduledQueryRules.ts +++ b/sdk/monitor/arm-monitor/src/operations/scheduledQueryRules.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 @@ -12,78 +11,94 @@ 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"; +import { MonitorClientContext } from "../monitorClientContext"; /** Class representing a ScheduledQueryRules. */ export class ScheduledQueryRules { - private readonly client: MonitorManagementClientContext; + private readonly client: MonitorClientContext; /** * Create a ScheduledQueryRules. - * @param {MonitorManagementClientContext} client Reference to the service client. + * @param {MonitorClientContext} client Reference to the service client. */ - constructor(client: MonitorManagementClientContext) { + constructor(client: MonitorClientContext) { 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. + * Retrieve a scheduled query rule definitions in a subscription. * @param [options] The optional parameters - * @returns Promise + * @returns Promise */ - createOrUpdate(resourceGroupName: string, ruleName: string, parameters: Models.LogSearchRuleResource, options?: msRest.RequestOptionsBase): Promise; + listBySubscription(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; + listBySubscription(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 { + 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 scheduled query rule definitions 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. The name is case insensitive. + * @param callback The callback + */ + listByResourceGroup(resourceGroupName: string, callback: msRest.ServiceCallback): void; + /** + * @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 { return this.client.sendOperationRequest( { resourceGroupName, - ruleName, - parameters, options }, - createOrUpdateOperationSpec, - callback) as Promise; + listByResourceGroupOperationSpec, + callback) as Promise; } /** - * Gets an Log Search rule - * @param resourceGroupName The name of the resource group. + * Retrieve an scheduled query rule definition. + * @param resourceGroupName The name of the resource group. The name is case insensitive. * @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 resourceGroupName The name of the resource group. The name is case insensitive. * @param ruleName The name of the rule. * @param callback The callback */ - get(resourceGroupName: string, ruleName: string, callback: msRest.ServiceCallback): void; + get(resourceGroupName: string, ruleName: 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 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 { + 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, @@ -95,30 +110,66 @@ export class ScheduledQueryRules { } /** - * Update log search Rule. - * @param resourceGroupName The name of the resource group. + * Creates or updates a scheduled query rule. + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @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.ScheduledQueryRuleResource, options?: msRest.RequestOptionsBase): Promise; + /** + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @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.ScheduledQueryRuleResource, callback: msRest.ServiceCallback): void; + /** + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @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.ScheduledQueryRuleResource, options: msRest.RequestOptionsBase, callback: msRest.ServiceCallback): void; + createOrUpdate(resourceGroupName: string, ruleName: string, parameters: Models.ScheduledQueryRuleResource, options?: msRest.RequestOptionsBase | msRest.ServiceCallback, callback?: msRest.ServiceCallback): Promise { + return this.client.sendOperationRequest( + { + resourceGroupName, + ruleName, + parameters, + options + }, + createOrUpdateOperationSpec, + callback) as Promise; + } + + /** + * Update a scheduled query rule. + * @param resourceGroupName The name of the resource group. The name is case insensitive. * @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; + update(resourceGroupName: string, ruleName: string, parameters: Models.ScheduledQueryRuleResourcePatch, 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 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; + update(resourceGroupName: string, ruleName: string, parameters: Models.ScheduledQueryRuleResourcePatch, 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 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 { + update(resourceGroupName: string, ruleName: string, parameters: Models.ScheduledQueryRuleResourcePatch, options: msRest.RequestOptionsBase, callback: msRest.ServiceCallback): void; + update(resourceGroupName: string, ruleName: string, parameters: Models.ScheduledQueryRuleResourcePatch, options?: msRest.RequestOptionsBase | msRest.ServiceCallback, callback?: msRest.ServiceCallback): Promise { return this.client.sendOperationRequest( { resourceGroupName, @@ -131,21 +182,21 @@ export class ScheduledQueryRules { } /** - * Deletes a Log Search rule - * @param resourceGroupName The name of the resource group. + * Deletes a scheduled query rule. + * @param resourceGroupName The name of the resource group. The name is case insensitive. * @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 resourceGroupName The name of the resource group. The name is case insensitive. * @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 resourceGroupName The name of the resource group. The name is case insensitive. * @param ruleName The name of the rule. * @param options The optional parameters * @param callback The callback @@ -163,90 +214,106 @@ export class ScheduledQueryRules { } /** - * List the Log Search rules within a subscription group. + * Retrieve a scheduled query rule definitions in a subscription. + * @param nextPageLink The NextLink from the previous successful call to List operation. * @param [options] The optional parameters - * @returns Promise + * @returns Promise */ - listBySubscription(options?: Models.ScheduledQueryRulesListBySubscriptionOptionalParams): Promise; + listBySubscriptionNext(nextPageLink: string, options?: msRest.RequestOptionsBase): Promise; /** + * @param nextPageLink The NextLink from the previous successful call to List operation. * @param callback The callback */ - listBySubscription(callback: msRest.ServiceCallback): void; + 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 */ - listBySubscription(options: Models.ScheduledQueryRulesListBySubscriptionOptionalParams, callback: msRest.ServiceCallback): void; - listBySubscription(options?: Models.ScheduledQueryRulesListBySubscriptionOptionalParams | msRest.ServiceCallback, callback?: msRest.ServiceCallback): Promise { + 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 }, - listBySubscriptionOperationSpec, - callback) as Promise; + listBySubscriptionNextOperationSpec, + callback) as Promise; } /** - * List the Log Search rules within a resource group. - * @param resourceGroupName The name of the resource group. + * Retrieve scheduled query rule definitions in a resource group. + * @param nextPageLink The NextLink from the previous successful call to List operation. * @param [options] The optional parameters - * @returns Promise + * @returns Promise */ - listByResourceGroup(resourceGroupName: string, options?: Models.ScheduledQueryRulesListByResourceGroupOptionalParams): Promise; + listByResourceGroupNext(nextPageLink: string, options?: msRest.RequestOptionsBase): Promise; /** - * @param resourceGroupName The name of the resource group. + * @param nextPageLink The NextLink from the previous successful call to List operation. * @param callback The callback */ - listByResourceGroup(resourceGroupName: string, callback: msRest.ServiceCallback): void; + listByResourceGroupNext(nextPageLink: string, callback: msRest.ServiceCallback): void; /** - * @param resourceGroupName The name of the resource group. + * @param nextPageLink The NextLink from the previous successful call to List operation. * @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 { + 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( { - resourceGroupName, + nextPageLink, options }, - listByResourceGroupOperationSpec, - callback) as Promise; + 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/scheduledQueryRules/{ruleName}", +const listBySubscriptionOperationSpec: msRest.OperationSpec = { + httpMethod: "GET", + path: "subscriptions/{subscriptionId}/providers/Microsoft.Insights/scheduledQueryRules", urlParameters: [ - Parameters.subscriptionId, - Parameters.resourceGroupName, - Parameters.ruleName + Parameters.subscriptionId ], queryParameters: [ - Parameters.apiVersion9 + Parameters.apiVersion ], headerParameters: [ Parameters.acceptLanguage ], - requestBody: { - parameterPath: "parameters", - mapper: { - ...Mappers.LogSearchRuleResource, - required: true + responses: { + 200: { + bodyMapper: Mappers.ScheduledQueryRuleResourceCollection + }, + default: { + bodyMapper: Mappers.ErrorContract } }, + serializer +}; + +const listByResourceGroupOperationSpec: msRest.OperationSpec = { + httpMethod: "GET", + path: "subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Insights/scheduledQueryRules", + urlParameters: [ + Parameters.subscriptionId, + Parameters.resourceGroupName + ], + queryParameters: [ + Parameters.apiVersion + ], + headerParameters: [ + Parameters.acceptLanguage + ], responses: { 200: { - bodyMapper: Mappers.LogSearchRuleResource - }, - 201: { - bodyMapper: Mappers.LogSearchRuleResource + bodyMapper: Mappers.ScheduledQueryRuleResourceCollection }, default: { - bodyMapper: Mappers.ErrorResponse + bodyMapper: Mappers.ErrorContract } }, serializer @@ -254,24 +321,59 @@ const createOrUpdateOperationSpec: msRest.OperationSpec = { const getOperationSpec: msRest.OperationSpec = { httpMethod: "GET", - path: "subscriptions/{subscriptionId}/resourcegroups/{resourceGroupName}/providers/microsoft.insights/scheduledQueryRules/{ruleName}", + path: "subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Insights/scheduledQueryRules/{ruleName}", urlParameters: [ + Parameters.subscriptionId, Parameters.resourceGroupName, - Parameters.ruleName, - Parameters.subscriptionId + Parameters.ruleName ], queryParameters: [ - Parameters.apiVersion9 + Parameters.apiVersion ], headerParameters: [ Parameters.acceptLanguage ], responses: { 200: { - bodyMapper: Mappers.LogSearchRuleResource + bodyMapper: Mappers.ScheduledQueryRuleResource }, default: { - bodyMapper: Mappers.ErrorResponse + bodyMapper: Mappers.ErrorContract + } + }, + serializer +}; + +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.apiVersion + ], + headerParameters: [ + Parameters.acceptLanguage + ], + requestBody: { + parameterPath: "parameters", + mapper: { + ...Mappers.ScheduledQueryRuleResource, + required: true + } + }, + responses: { + 200: { + bodyMapper: Mappers.ScheduledQueryRuleResource + }, + 201: { + bodyMapper: Mappers.ScheduledQueryRuleResource + }, + default: { + bodyMapper: Mappers.ErrorContract } }, serializer @@ -279,14 +381,14 @@ const getOperationSpec: msRest.OperationSpec = { const updateOperationSpec: msRest.OperationSpec = { httpMethod: "PATCH", - path: "subscriptions/{subscriptionId}/resourcegroups/{resourceGroupName}/providers/microsoft.insights/scheduledQueryRules/{ruleName}", + path: "subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Insights/scheduledQueryRules/{ruleName}", urlParameters: [ Parameters.subscriptionId, Parameters.resourceGroupName, Parameters.ruleName ], queryParameters: [ - Parameters.apiVersion9 + Parameters.apiVersion ], headerParameters: [ Parameters.acceptLanguage @@ -294,16 +396,16 @@ const updateOperationSpec: msRest.OperationSpec = { requestBody: { parameterPath: "parameters", mapper: { - ...Mappers.LogSearchRuleResourcePatch, + ...Mappers.ScheduledQueryRuleResourcePatch, required: true } }, responses: { 200: { - bodyMapper: Mappers.LogSearchRuleResource + bodyMapper: Mappers.ScheduledQueryRuleResource }, default: { - bodyMapper: Mappers.ErrorResponse + bodyMapper: Mappers.ErrorContract } }, serializer @@ -311,14 +413,14 @@ const updateOperationSpec: msRest.OperationSpec = { const deleteMethodOperationSpec: msRest.OperationSpec = { httpMethod: "DELETE", - path: "subscriptions/{subscriptionId}/resourcegroups/{resourceGroupName}/providers/microsoft.insights/scheduledQueryRules/{ruleName}", + path: "subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Insights/scheduledQueryRules/{ruleName}", urlParameters: [ + Parameters.subscriptionId, Parameters.resourceGroupName, - Parameters.ruleName, - Parameters.subscriptionId + Parameters.ruleName ], queryParameters: [ - Parameters.apiVersion9 + Parameters.apiVersion ], headerParameters: [ Parameters.acceptLanguage @@ -327,56 +429,55 @@ const deleteMethodOperationSpec: msRest.OperationSpec = { 200: {}, 204: {}, default: { - bodyMapper: Mappers.ErrorResponse + bodyMapper: Mappers.ErrorContract } }, serializer }; -const listBySubscriptionOperationSpec: msRest.OperationSpec = { +const listBySubscriptionNextOperationSpec: msRest.OperationSpec = { httpMethod: "GET", - path: "subscriptions/{subscriptionId}/providers/microsoft.insights/scheduledQueryRules", + baseUrl: "https://management.azure.com", + path: "{nextLink}", urlParameters: [ - Parameters.subscriptionId + Parameters.nextPageLink ], queryParameters: [ - Parameters.apiVersion9, - Parameters.filter1 + Parameters.apiVersion ], headerParameters: [ Parameters.acceptLanguage ], responses: { 200: { - bodyMapper: Mappers.LogSearchRuleResourceCollection + bodyMapper: Mappers.ScheduledQueryRuleResourceCollection }, default: { - bodyMapper: Mappers.ErrorResponse + bodyMapper: Mappers.ErrorContract } }, serializer }; -const listByResourceGroupOperationSpec: msRest.OperationSpec = { +const listByResourceGroupNextOperationSpec: msRest.OperationSpec = { httpMethod: "GET", - path: "subscriptions/{subscriptionId}/resourcegroups/{resourceGroupName}/providers/microsoft.insights/scheduledQueryRules", + baseUrl: "https://management.azure.com", + path: "{nextLink}", urlParameters: [ - Parameters.resourceGroupName, - Parameters.subscriptionId + Parameters.nextPageLink ], queryParameters: [ - Parameters.apiVersion9, - Parameters.filter1 + Parameters.apiVersion ], headerParameters: [ Parameters.acceptLanguage ], responses: { 200: { - bodyMapper: Mappers.LogSearchRuleResourceCollection + bodyMapper: Mappers.ScheduledQueryRuleResourceCollection }, default: { - bodyMapper: Mappers.ErrorResponse + bodyMapper: Mappers.ErrorContract } }, 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 -};