diff --git a/sdk/monitor/arm-monitor/lib/models/actionGroupsMappers.ts b/sdk/monitor/arm-monitor/lib/models/actionGroupsMappers.ts new file mode 100644 index 000000000000..97ef773ce9ae --- /dev/null +++ b/sdk/monitor/arm-monitor/lib/models/actionGroupsMappers.ts @@ -0,0 +1,93 @@ +/* + * 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, + ActionGroupResource, + Resource, + BaseResource, + EmailReceiver, + SmsReceiver, + WebhookReceiver, + ItsmReceiver, + AzureAppPushReceiver, + AutomationRunbookReceiver, + VoiceReceiver, + LogicAppReceiver, + AzureFunctionReceiver, + ArmRoleReceiver, + ErrorResponse, + ActionGroupPatchBody, + ActionGroupList, + EnableRequest, + AutoscaleSettingResource, + AutoscaleProfile, + ScaleCapacity, + ScaleRule, + MetricTrigger, + ScaleAction, + TimeWindow, + Recurrence, + RecurrentSchedule, + AutoscaleNotification, + EmailNotification, + WebhookNotification, + AlertRuleResource, + RuleCondition, + RuleDataSource, + RuleAction, + LogProfileResource, + RetentionPolicy, + ProxyOnlyResource, + DiagnosticSettingsResource, + MetricSettings, + LogSettings, + DiagnosticSettingsCategoryResource, + ActivityLogAlertResource, + ActivityLogAlertAllOfCondition, + ActivityLogAlertLeafCondition, + ActivityLogAlertActionList, + ActivityLogAlertActionGroup, + MetricAlertResource, + MetricAlertCriteria, + MetricAlertAction, + MetricAlertSingleResourceMultipleMetricCriteria, + MetricCriteria, + MultiMetricCriteria, + MetricDimension, + MetricAlertMultipleResourceMultipleMetricCriteria, + DynamicMetricCriteria, + DynamicThresholdFailingPeriods, + LogSearchRuleResource, + Source, + Schedule, + Action, + AlertingAction, + AzNsActionGroup, + TriggerCondition, + LogMetricTrigger, + LogToMetricAction, + Criteria, + Dimension, + ProxyResource, + VMInsightsOnboardingStatus, + DataContainer, + WorkspaceInfo, + RuleMetricDataSource, + RuleManagementEventDataSource, + RuleManagementEventClaimsDataSource, + ThresholdRuleCondition, + LocationThresholdRuleCondition, + ManagementEventRuleCondition, + ManagementEventAggregationCondition, + RuleEmailAction, + RuleWebhookAction +} from "../models/mappers"; + diff --git a/sdk/monitor/arm-monitor/lib/models/activityLogAlertsMappers.ts b/sdk/monitor/arm-monitor/lib/models/activityLogAlertsMappers.ts new file mode 100644 index 000000000000..f1b11745a091 --- /dev/null +++ b/sdk/monitor/arm-monitor/lib/models/activityLogAlertsMappers.ts @@ -0,0 +1,92 @@ +/* + * 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, + ActivityLogAlertResource, + Resource, + BaseResource, + ActivityLogAlertAllOfCondition, + ActivityLogAlertLeafCondition, + ActivityLogAlertActionList, + ActivityLogAlertActionGroup, + ErrorResponse, + ActivityLogAlertPatchBody, + ActivityLogAlertList, + AutoscaleSettingResource, + AutoscaleProfile, + ScaleCapacity, + ScaleRule, + MetricTrigger, + ScaleAction, + TimeWindow, + Recurrence, + RecurrentSchedule, + AutoscaleNotification, + EmailNotification, + WebhookNotification, + AlertRuleResource, + RuleCondition, + RuleDataSource, + RuleAction, + LogProfileResource, + RetentionPolicy, + ProxyOnlyResource, + DiagnosticSettingsResource, + MetricSettings, + LogSettings, + DiagnosticSettingsCategoryResource, + ActionGroupResource, + EmailReceiver, + SmsReceiver, + WebhookReceiver, + ItsmReceiver, + AzureAppPushReceiver, + AutomationRunbookReceiver, + VoiceReceiver, + LogicAppReceiver, + AzureFunctionReceiver, + ArmRoleReceiver, + MetricAlertResource, + MetricAlertCriteria, + MetricAlertAction, + MetricAlertSingleResourceMultipleMetricCriteria, + MetricCriteria, + MultiMetricCriteria, + MetricDimension, + MetricAlertMultipleResourceMultipleMetricCriteria, + DynamicMetricCriteria, + DynamicThresholdFailingPeriods, + LogSearchRuleResource, + Source, + Schedule, + Action, + AlertingAction, + AzNsActionGroup, + TriggerCondition, + LogMetricTrigger, + LogToMetricAction, + Criteria, + Dimension, + ProxyResource, + VMInsightsOnboardingStatus, + DataContainer, + WorkspaceInfo, + RuleMetricDataSource, + RuleManagementEventDataSource, + RuleManagementEventClaimsDataSource, + ThresholdRuleCondition, + LocationThresholdRuleCondition, + ManagementEventRuleCondition, + ManagementEventAggregationCondition, + RuleEmailAction, + RuleWebhookAction +} from "../models/mappers"; + diff --git a/sdk/monitor/arm-monitor/lib/models/activityLogsMappers.ts b/sdk/monitor/arm-monitor/lib/models/activityLogsMappers.ts new file mode 100644 index 000000000000..d8566b13f281 --- /dev/null +++ b/sdk/monitor/arm-monitor/lib/models/activityLogsMappers.ts @@ -0,0 +1,20 @@ +/* + * 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, + EventDataCollection, + EventData, + SenderAuthorization, + LocalizableString, + HttpRequestInfo, + ErrorResponse +} from "../models/mappers"; + diff --git a/sdk/monitor/arm-monitor/lib/models/alertRuleIncidentsMappers.ts b/sdk/monitor/arm-monitor/lib/models/alertRuleIncidentsMappers.ts new file mode 100644 index 000000000000..2b85b971dca6 --- /dev/null +++ b/sdk/monitor/arm-monitor/lib/models/alertRuleIncidentsMappers.ts @@ -0,0 +1,18 @@ +/* + * Copyright (c) Microsoft Corporation. All rights reserved. + * Licensed under the MIT License. See License.txt in the project root for + * license information. + * + * Code generated by Microsoft (R) AutoRest Code Generator. + * Changes may cause incorrect behavior and will be lost if the code is + * regenerated. + */ + +export { + discriminators, + Incident, + ErrorResponse, + IncidentListResult, + CloudError +} from "../models/mappers"; + diff --git a/sdk/monitor/arm-monitor/lib/models/alertRulesMappers.ts b/sdk/monitor/arm-monitor/lib/models/alertRulesMappers.ts new file mode 100644 index 000000000000..b9de3a60a610 --- /dev/null +++ b/sdk/monitor/arm-monitor/lib/models/alertRulesMappers.ts @@ -0,0 +1,93 @@ +/* + * 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, + AlertRuleResource, + Resource, + BaseResource, + RuleCondition, + RuleDataSource, + RuleAction, + ErrorResponse, + CloudError, + AlertRuleResourcePatch, + AlertRuleResourceCollection, + AutoscaleSettingResource, + AutoscaleProfile, + ScaleCapacity, + ScaleRule, + MetricTrigger, + ScaleAction, + TimeWindow, + Recurrence, + RecurrentSchedule, + AutoscaleNotification, + EmailNotification, + WebhookNotification, + RuleMetricDataSource, + RuleManagementEventDataSource, + RuleManagementEventClaimsDataSource, + ThresholdRuleCondition, + LocationThresholdRuleCondition, + ManagementEventRuleCondition, + ManagementEventAggregationCondition, + RuleEmailAction, + RuleWebhookAction, + LogProfileResource, + RetentionPolicy, + ProxyOnlyResource, + DiagnosticSettingsResource, + MetricSettings, + LogSettings, + DiagnosticSettingsCategoryResource, + ActionGroupResource, + EmailReceiver, + SmsReceiver, + WebhookReceiver, + ItsmReceiver, + AzureAppPushReceiver, + AutomationRunbookReceiver, + VoiceReceiver, + LogicAppReceiver, + AzureFunctionReceiver, + ArmRoleReceiver, + ActivityLogAlertResource, + ActivityLogAlertAllOfCondition, + ActivityLogAlertLeafCondition, + ActivityLogAlertActionList, + ActivityLogAlertActionGroup, + MetricAlertResource, + MetricAlertCriteria, + MetricAlertAction, + MetricAlertSingleResourceMultipleMetricCriteria, + MetricCriteria, + MultiMetricCriteria, + MetricDimension, + MetricAlertMultipleResourceMultipleMetricCriteria, + DynamicMetricCriteria, + DynamicThresholdFailingPeriods, + LogSearchRuleResource, + Source, + Schedule, + Action, + AlertingAction, + AzNsActionGroup, + TriggerCondition, + LogMetricTrigger, + LogToMetricAction, + Criteria, + Dimension, + ProxyResource, + VMInsightsOnboardingStatus, + DataContainer, + WorkspaceInfo +} from "../models/mappers"; + diff --git a/sdk/monitor/arm-monitor/lib/models/autoscaleSettingsMappers.ts b/sdk/monitor/arm-monitor/lib/models/autoscaleSettingsMappers.ts new file mode 100644 index 000000000000..b0e4a4ba4d4e --- /dev/null +++ b/sdk/monitor/arm-monitor/lib/models/autoscaleSettingsMappers.ts @@ -0,0 +1,92 @@ +/* + * 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, + AutoscaleSettingResourceCollection, + AutoscaleSettingResource, + Resource, + BaseResource, + AutoscaleProfile, + ScaleCapacity, + ScaleRule, + MetricTrigger, + ScaleAction, + TimeWindow, + Recurrence, + RecurrentSchedule, + AutoscaleNotification, + EmailNotification, + WebhookNotification, + ErrorResponse, + AutoscaleSettingResourcePatch, + AlertRuleResource, + RuleCondition, + RuleDataSource, + RuleAction, + LogProfileResource, + RetentionPolicy, + ProxyOnlyResource, + DiagnosticSettingsResource, + MetricSettings, + LogSettings, + DiagnosticSettingsCategoryResource, + ActionGroupResource, + EmailReceiver, + SmsReceiver, + WebhookReceiver, + ItsmReceiver, + AzureAppPushReceiver, + AutomationRunbookReceiver, + VoiceReceiver, + LogicAppReceiver, + AzureFunctionReceiver, + ArmRoleReceiver, + ActivityLogAlertResource, + ActivityLogAlertAllOfCondition, + ActivityLogAlertLeafCondition, + ActivityLogAlertActionList, + ActivityLogAlertActionGroup, + MetricAlertResource, + MetricAlertCriteria, + MetricAlertAction, + MetricAlertSingleResourceMultipleMetricCriteria, + MetricCriteria, + MultiMetricCriteria, + MetricDimension, + MetricAlertMultipleResourceMultipleMetricCriteria, + DynamicMetricCriteria, + DynamicThresholdFailingPeriods, + LogSearchRuleResource, + Source, + Schedule, + Action, + AlertingAction, + AzNsActionGroup, + TriggerCondition, + LogMetricTrigger, + LogToMetricAction, + Criteria, + Dimension, + ProxyResource, + VMInsightsOnboardingStatus, + DataContainer, + WorkspaceInfo, + RuleMetricDataSource, + RuleManagementEventDataSource, + RuleManagementEventClaimsDataSource, + ThresholdRuleCondition, + LocationThresholdRuleCondition, + ManagementEventRuleCondition, + ManagementEventAggregationCondition, + RuleEmailAction, + RuleWebhookAction +} from "../models/mappers"; + diff --git a/sdk/monitor/arm-monitor/lib/models/baselinesMappers.ts b/sdk/monitor/arm-monitor/lib/models/baselinesMappers.ts new file mode 100644 index 000000000000..d7f5beff7b92 --- /dev/null +++ b/sdk/monitor/arm-monitor/lib/models/baselinesMappers.ts @@ -0,0 +1,21 @@ +/* + * 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, + MetricBaselinesResponse, + SingleMetricBaseline, + TimeSeriesBaseline, + MetricSingleDimension, + SingleBaseline, + BaselineMetadata, + ErrorResponse +} from "../models/mappers"; + diff --git a/sdk/monitor/arm-monitor/lib/models/diagnosticSettingsCategoryOperationsMappers.ts b/sdk/monitor/arm-monitor/lib/models/diagnosticSettingsCategoryOperationsMappers.ts new file mode 100644 index 000000000000..9920efef2dde --- /dev/null +++ b/sdk/monitor/arm-monitor/lib/models/diagnosticSettingsCategoryOperationsMappers.ts @@ -0,0 +1,91 @@ +/* + * 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, + DiagnosticSettingsCategoryResource, + ProxyOnlyResource, + BaseResource, + ErrorResponse, + DiagnosticSettingsCategoryResourceCollection, + Resource, + AutoscaleSettingResource, + AutoscaleProfile, + ScaleCapacity, + ScaleRule, + MetricTrigger, + ScaleAction, + TimeWindow, + Recurrence, + RecurrentSchedule, + AutoscaleNotification, + EmailNotification, + WebhookNotification, + AlertRuleResource, + RuleCondition, + RuleDataSource, + RuleAction, + LogProfileResource, + RetentionPolicy, + DiagnosticSettingsResource, + MetricSettings, + LogSettings, + ActionGroupResource, + EmailReceiver, + SmsReceiver, + WebhookReceiver, + ItsmReceiver, + AzureAppPushReceiver, + AutomationRunbookReceiver, + VoiceReceiver, + LogicAppReceiver, + AzureFunctionReceiver, + ArmRoleReceiver, + ActivityLogAlertResource, + ActivityLogAlertAllOfCondition, + ActivityLogAlertLeafCondition, + ActivityLogAlertActionList, + ActivityLogAlertActionGroup, + MetricAlertResource, + MetricAlertCriteria, + MetricAlertAction, + MetricAlertSingleResourceMultipleMetricCriteria, + MetricCriteria, + MultiMetricCriteria, + MetricDimension, + MetricAlertMultipleResourceMultipleMetricCriteria, + DynamicMetricCriteria, + DynamicThresholdFailingPeriods, + LogSearchRuleResource, + Source, + Schedule, + Action, + AlertingAction, + AzNsActionGroup, + TriggerCondition, + LogMetricTrigger, + LogToMetricAction, + Criteria, + Dimension, + ProxyResource, + VMInsightsOnboardingStatus, + DataContainer, + WorkspaceInfo, + RuleMetricDataSource, + RuleManagementEventDataSource, + RuleManagementEventClaimsDataSource, + ThresholdRuleCondition, + LocationThresholdRuleCondition, + ManagementEventRuleCondition, + ManagementEventAggregationCondition, + RuleEmailAction, + RuleWebhookAction +} from "../models/mappers"; + diff --git a/sdk/monitor/arm-monitor/lib/models/diagnosticSettingsOperationsMappers.ts b/sdk/monitor/arm-monitor/lib/models/diagnosticSettingsOperationsMappers.ts new file mode 100644 index 000000000000..3e123952d3ff --- /dev/null +++ b/sdk/monitor/arm-monitor/lib/models/diagnosticSettingsOperationsMappers.ts @@ -0,0 +1,91 @@ +/* + * 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, + DiagnosticSettingsResource, + ProxyOnlyResource, + BaseResource, + MetricSettings, + RetentionPolicy, + LogSettings, + ErrorResponse, + DiagnosticSettingsResourceCollection, + Resource, + AutoscaleSettingResource, + AutoscaleProfile, + ScaleCapacity, + ScaleRule, + MetricTrigger, + ScaleAction, + TimeWindow, + Recurrence, + RecurrentSchedule, + AutoscaleNotification, + EmailNotification, + WebhookNotification, + AlertRuleResource, + RuleCondition, + RuleDataSource, + RuleAction, + LogProfileResource, + DiagnosticSettingsCategoryResource, + ActionGroupResource, + EmailReceiver, + SmsReceiver, + WebhookReceiver, + ItsmReceiver, + AzureAppPushReceiver, + AutomationRunbookReceiver, + VoiceReceiver, + LogicAppReceiver, + AzureFunctionReceiver, + ArmRoleReceiver, + ActivityLogAlertResource, + ActivityLogAlertAllOfCondition, + ActivityLogAlertLeafCondition, + ActivityLogAlertActionList, + ActivityLogAlertActionGroup, + MetricAlertResource, + MetricAlertCriteria, + MetricAlertAction, + MetricAlertSingleResourceMultipleMetricCriteria, + MetricCriteria, + MultiMetricCriteria, + MetricDimension, + MetricAlertMultipleResourceMultipleMetricCriteria, + DynamicMetricCriteria, + DynamicThresholdFailingPeriods, + LogSearchRuleResource, + Source, + Schedule, + Action, + AlertingAction, + AzNsActionGroup, + TriggerCondition, + LogMetricTrigger, + LogToMetricAction, + Criteria, + Dimension, + ProxyResource, + VMInsightsOnboardingStatus, + DataContainer, + WorkspaceInfo, + RuleMetricDataSource, + RuleManagementEventDataSource, + RuleManagementEventClaimsDataSource, + ThresholdRuleCondition, + LocationThresholdRuleCondition, + ManagementEventRuleCondition, + ManagementEventAggregationCondition, + RuleEmailAction, + RuleWebhookAction +} from "../models/mappers"; + diff --git a/sdk/monitor/arm-monitor/lib/models/eventCategoriesMappers.ts b/sdk/monitor/arm-monitor/lib/models/eventCategoriesMappers.ts new file mode 100644 index 000000000000..4245939c2192 --- /dev/null +++ b/sdk/monitor/arm-monitor/lib/models/eventCategoriesMappers.ts @@ -0,0 +1,17 @@ +/* + * 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, + EventCategoryCollection, + LocalizableString, + ErrorResponse +} from "../models/mappers"; + diff --git a/sdk/monitor/arm-monitor/lib/models/index.ts b/sdk/monitor/arm-monitor/lib/models/index.ts new file mode 100644 index 000000000000..06140263cb8a --- /dev/null +++ b/sdk/monitor/arm-monitor/lib/models/index.ts @@ -0,0 +1,5292 @@ +/* + * 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 { BaseResource, CloudError, AzureServiceClientOptions } from "@azure/ms-rest-azure-js"; +import * as msRest from "@azure/ms-rest-js"; + +export { BaseResource, CloudError }; + + +/** + * @interface + * An interface representing Resource. + * An azure resource object + * + * @extends BaseResource + */ +export interface Resource extends BaseResource { + /** + * @member {string} [id] Azure resource Id + * **NOTE: This property will not be serialized. It can only be populated by + * the server.** + */ + readonly id?: string; + /** + * @member {string} [name] Azure resource name + * **NOTE: This property will not be serialized. It can only be populated by + * the server.** + */ + readonly name?: string; + /** + * @member {string} [type] Azure resource type + * **NOTE: This property will not be serialized. It can only be populated by + * the server.** + */ + readonly type?: string; + /** + * @member {string} location Resource location + */ + location: string; + /** + * @member {{ [propertyName: string]: string }} [tags] Resource tags + */ + tags?: { [propertyName: string]: string }; +} + +/** + * @interface + * An interface representing ScaleCapacity. + * The number of instances that can be used during this profile. + * + */ +export interface ScaleCapacity { + /** + * @member {string} minimum the minimum number of instances for the resource. + */ + minimum: string; + /** + * @member {string} maximum 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. + */ + maximum: string; + /** + * @member {string} default 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. + */ + default: string; +} + +/** + * @interface + * An interface representing MetricTrigger. + * The trigger that results in a scaling action. + * + */ +export interface MetricTrigger { + /** + * @member {string} metricName the name of the metric that defines what the + * rule monitors. + */ + metricName: string; + /** + * @member {string} metricResourceUri the resource identifier of the resource + * the rule monitors. + */ + metricResourceUri: string; + /** + * @member {string} timeGrain 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; + /** + * @member {MetricStatisticType} statistic the metric statistic type. How the + * metrics from multiple instances are combined. Possible values include: + * 'Average', 'Min', 'Max', 'Sum' + */ + statistic: MetricStatisticType; + /** + * @member {string} timeWindow 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; + /** + * @member {TimeAggregationType} timeAggregation 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; + /** + * @member {ComparisonOperationType} operator the operator that is used to + * compare the metric data and the threshold. Possible values include: + * 'Equals', 'NotEquals', 'GreaterThan', 'GreaterThanOrEqual', 'LessThan', + * 'LessThanOrEqual' + */ + operator: ComparisonOperationType; + /** + * @member {number} threshold the threshold of the metric that triggers the + * scale action. + */ + threshold: number; +} + +/** + * @interface + * An interface representing ScaleAction. + * The parameters for the scaling action. + * + */ +export interface ScaleAction { + /** + * @member {ScaleDirection} direction the scale direction. Whether the + * scaling action increases or decreases the number of instances. Possible + * values include: 'None', 'Increase', 'Decrease' + */ + direction: ScaleDirection; + /** + * @member {ScaleType} type the type of action that should occur when the + * scale rule fires. Possible values include: 'ChangeCount', + * 'PercentChangeCount', 'ExactCount' + */ + type: ScaleType; + /** + * @member {string} [value] the number of instances that are involved in the + * scaling action. This value must be 1 or greater. The default value is 1. + * Default value: '1' . + */ + value?: string; + /** + * @member {string} cooldown the amount of time to wait since the last + * scaling action before this action occurs. It must be between 1 week and 1 + * minute in ISO 8601 format. + */ + cooldown: string; +} + +/** + * @interface + * An interface representing ScaleRule. + * A rule that provide the triggers and parameters for the scaling action. + * + */ +export interface ScaleRule { + /** + * @member {MetricTrigger} metricTrigger the trigger that results in a + * scaling action. + */ + metricTrigger: MetricTrigger; + /** + * @member {ScaleAction} scaleAction the parameters for the scaling action. + */ + scaleAction: ScaleAction; +} + +/** + * @interface + * An interface representing TimeWindow. + * A specific date-time for the profile. + * + */ +export interface TimeWindow { + /** + * @member {string} [timeZone] the timezone of the start and end times for + * the profile. Some examples of valid time zones are: Dateline Standard + * Time, UTC-11, Hawaiian Standard Time, Alaskan Standard Time, Pacific + * Standard Time (Mexico), Pacific Standard Time, US Mountain Standard Time, + * Mountain Standard Time (Mexico), Mountain Standard Time, Central America + * Standard Time, Central Standard Time, Central Standard Time (Mexico), + * Canada Central Standard Time, SA Pacific Standard Time, Eastern Standard + * Time, US Eastern Standard Time, Venezuela Standard Time, Paraguay Standard + * Time, Atlantic Standard Time, Central Brazilian Standard Time, SA Western + * Standard Time, Pacific SA Standard Time, Newfoundland Standard Time, E. + * South America Standard Time, Argentina Standard Time, SA Eastern Standard + * Time, Greenland Standard Time, Montevideo Standard Time, Bahia Standard + * Time, UTC-02, Mid-Atlantic Standard Time, Azores Standard Time, Cape Verde + * Standard Time, Morocco Standard Time, UTC, GMT Standard Time, Greenwich + * Standard Time, W. Europe Standard Time, Central Europe Standard Time, + * Romance Standard Time, Central European Standard Time, W. Central Africa + * Standard Time, Namibia Standard Time, Jordan Standard Time, GTB Standard + * Time, Middle East Standard Time, Egypt Standard Time, Syria Standard Time, + * E. Europe Standard Time, South Africa Standard Time, FLE Standard Time, + * Turkey Standard Time, Israel Standard Time, Kaliningrad Standard Time, + * Libya Standard Time, Arabic Standard Time, Arab Standard Time, Belarus + * Standard Time, Russian Standard Time, E. Africa Standard Time, Iran + * Standard Time, Arabian Standard Time, Azerbaijan Standard Time, Russia + * Time Zone 3, Mauritius Standard Time, Georgian Standard Time, Caucasus + * Standard Time, Afghanistan Standard Time, West Asia Standard Time, + * Ekaterinburg Standard Time, Pakistan Standard Time, India Standard Time, + * Sri Lanka Standard Time, Nepal Standard Time, Central Asia Standard Time, + * Bangladesh Standard Time, N. Central Asia Standard Time, Myanmar Standard + * Time, SE Asia Standard Time, North Asia Standard Time, China Standard + * Time, North Asia East Standard Time, Singapore Standard Time, W. Australia + * Standard Time, Taipei Standard Time, Ulaanbaatar Standard Time, Tokyo + * Standard Time, Korea Standard Time, Yakutsk Standard Time, Cen. Australia + * Standard Time, AUS Central Standard Time, E. Australia Standard Time, AUS + * Eastern Standard Time, West Pacific Standard Time, Tasmania Standard Time, + * Magadan Standard Time, Vladivostok Standard Time, Russia Time Zone 10, + * Central Pacific Standard Time, Russia Time Zone 11, New Zealand Standard + * Time, UTC+12, Fiji Standard Time, Kamchatka Standard Time, Tonga Standard + * Time, Samoa Standard Time, Line Islands Standard Time + */ + timeZone?: string; + /** + * @member {Date} start the start time for the profile in ISO 8601 format. + */ + start: Date; + /** + * @member {Date} end the end time for the profile in ISO 8601 format. + */ + end: Date; +} + +/** + * @interface + * An interface representing RecurrentSchedule. + * The scheduling constraints for when the profile begins. + * + */ +export interface RecurrentSchedule { + /** + * @member {string} timeZone 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; + /** + * @member {string[]} days the collection of days that the profile takes + * effect on. Possible values are Sunday through Saturday. + */ + days: string[]; + /** + * @member {number[]} hours 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[]; + /** + * @member {number[]} minutes A collection of minutes at which the profile + * takes effect at. + */ + minutes: number[]; +} + +/** + * @interface + * An interface representing Recurrence. + * The repeating times at which this profile begins. This element is not used + * if the FixedDate element is used. + * + */ +export interface Recurrence { + /** + * @member {RecurrenceFrequency} frequency the recurrence frequency. How + * often the schedule profile should take effect. This value must be Week, + * meaning each week will have the same set of profiles. For example, to set + * a daily schedule, set **schedule** to every day of the week. The frequency + * property specifies that the schedule is repeated weekly. Possible values + * include: 'None', 'Second', 'Minute', 'Hour', 'Day', 'Week', 'Month', + * 'Year' + */ + frequency: RecurrenceFrequency; + /** + * @member {RecurrentSchedule} schedule the scheduling constraints for when + * the profile begins. + */ + schedule: RecurrentSchedule; +} + +/** + * @interface + * An interface representing AutoscaleProfile. + * Autoscale profile. + * + */ +export interface AutoscaleProfile { + /** + * @member {string} name the name of the profile. + */ + name: string; + /** + * @member {ScaleCapacity} capacity the number of instances that can be used + * during this profile. + */ + capacity: ScaleCapacity; + /** + * @member {ScaleRule[]} rules the collection of rules that provide the + * triggers and parameters for the scaling action. A maximum of 10 rules can + * be specified. + */ + rules: ScaleRule[]; + /** + * @member {TimeWindow} [fixedDate] the specific date-time for the profile. + * This element is not used if the Recurrence element is used. + */ + fixedDate?: TimeWindow; + /** + * @member {Recurrence} [recurrence] the repeating times at which this + * profile begins. This element is not used if the FixedDate element is used. + */ + recurrence?: Recurrence; +} + +/** + * @interface + * An interface representing EmailNotification. + * Email notification of an autoscale event. + * + */ +export interface EmailNotification { + /** + * @member {boolean} [sendToSubscriptionAdministrator] a value indicating + * whether to send email to subscription administrator. + */ + sendToSubscriptionAdministrator?: boolean; + /** + * @member {boolean} [sendToSubscriptionCoAdministrators] a value indicating + * whether to send email to subscription co-administrators. + */ + sendToSubscriptionCoAdministrators?: boolean; + /** + * @member {string[]} [customEmails] the custom e-mails list. This value can + * be null or empty, in which case this attribute will be ignored. + */ + customEmails?: string[]; +} + +/** + * @interface + * An interface representing WebhookNotification. + * Webhook notification of an autoscale event. + * + */ +export interface WebhookNotification { + /** + * @member {string} [serviceUri] the service address to receive the + * notification. + */ + serviceUri?: string; + /** + * @member {{ [propertyName: string]: string }} [properties] a property bag + * of settings. This value can be empty. + */ + properties?: { [propertyName: string]: string }; +} + +/** + * @interface + * An interface representing AutoscaleNotification. + * Autoscale notification. + * + */ +export interface AutoscaleNotification { + /** + * @member {EmailNotification} [email] the email notification. + */ + email?: EmailNotification; + /** + * @member {WebhookNotification[]} [webhooks] the collection of webhook + * notifications. + */ + webhooks?: WebhookNotification[]; +} + +/** + * @interface + * An interface representing AutoscaleSettingResource. + * The autoscale setting resource. + * + * @extends Resource + */ +export interface AutoscaleSettingResource extends Resource { + /** + * @member {AutoscaleProfile[]} profiles the collection of automatic scaling + * profiles that specify different scaling parameters for different time + * periods. A maximum of 20 profiles can be specified. + */ + profiles: AutoscaleProfile[]; + /** + * @member {AutoscaleNotification[]} [notifications] the collection of + * notifications. + */ + notifications?: AutoscaleNotification[]; + /** + * @member {boolean} [enabled] the enabled flag. Specifies whether automatic + * scaling is enabled for the resource. The default value is 'true'. Default + * value: true . + */ + enabled?: boolean; + /** + * @member {string} [autoscaleSettingResourceName] the name of the autoscale + * setting. + */ + autoscaleSettingResourceName?: string; + /** + * @member {string} [targetResourceUri] the resource identifier of the + * resource that the autoscale setting should be added to. + */ + targetResourceUri?: string; +} + +/** + * @interface + * An interface representing AutoscaleSettingResourcePatch. + * The autoscale setting object for patch operations. + * + */ +export interface AutoscaleSettingResourcePatch { + /** + * @member {{ [propertyName: string]: string }} [tags] Resource tags + */ + tags?: { [propertyName: string]: string }; + /** + * @member {AutoscaleProfile[]} profiles the collection of automatic scaling + * profiles that specify different scaling parameters for different time + * periods. A maximum of 20 profiles can be specified. + */ + profiles: AutoscaleProfile[]; + /** + * @member {AutoscaleNotification[]} [notifications] the collection of + * notifications. + */ + notifications?: AutoscaleNotification[]; + /** + * @member {boolean} [enabled] the enabled flag. Specifies whether automatic + * scaling is enabled for the resource. The default value is 'true'. Default + * value: true . + */ + enabled?: boolean; + /** + * @member {string} [name] the name of the autoscale setting. + */ + name?: string; + /** + * @member {string} [targetResourceUri] the resource identifier of the + * resource that the autoscale setting should be added to. + */ + targetResourceUri?: string; +} + +/** + * @interface + * An interface representing ErrorResponse. + * Describes the format of Error response. + * + */ +export interface ErrorResponse { + /** + * @member {string} [code] Error code + */ + code?: string; + /** + * @member {string} [message] Error message indicating why the operation + * failed. + */ + message?: string; +} + +/** + * @interface + * An interface representing OperationDisplay. + * Display metadata associated with the operation. + * + */ +export interface OperationDisplay { + /** + * @member {string} [provider] Service provider: Microsoft.Insights + */ + provider?: string; + /** + * @member {string} [resource] Resource on which the operation is performed: + * AlertRules, Autoscale, etc. + */ + resource?: string; + /** + * @member {string} [operation] Operation type: Read, write, delete, etc. + */ + operation?: string; +} + +/** + * @interface + * An interface representing Operation. + * Microsoft Insights API operation definition. + * + */ +export interface Operation { + /** + * @member {string} [name] Operation name: {provider}/{resource}/{operation} + */ + name?: string; + /** + * @member {OperationDisplay} [display] Display metadata associated with the + * operation. + */ + display?: OperationDisplay; +} + +/** + * @interface + * An interface representing OperationListResult. + * 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 { + /** + * @member {Operation[]} [value] List of operations supported by the + * Microsoft.Insights provider. + */ + value?: Operation[]; + /** + * @member {string} [nextLink] URL to get the next set of operation list + * results if there are any. + */ + nextLink?: string; +} + +/** + * @interface + * An interface representing Incident. + * An alert incident indicates the activation status of an alert rule. + * + */ +export interface Incident { + /** + * @member {string} [name] Incident name. + * **NOTE: This property will not be serialized. It can only be populated by + * the server.** + */ + readonly name?: string; + /** + * @member {string} [ruleName] 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; + /** + * @member {boolean} [isActive] A boolean to indicate whether the incident is + * active or resolved. + * **NOTE: This property will not be serialized. It can only be populated by + * the server.** + */ + readonly isActive?: boolean; + /** + * @member {Date} [activatedTime] The time at which the incident was + * activated in ISO8601 format. + * **NOTE: This property will not be serialized. It can only be populated by + * the server.** + */ + readonly activatedTime?: Date; + /** + * @member {Date} [resolvedTime] The time at which the incident was resolved + * in ISO8601 format. If null, it means the incident is still active. + * **NOTE: This property will not be serialized. It can only be populated by + * the server.** + */ + readonly resolvedTime?: Date; +} + +/** + * Contains the possible cases for RuleDataSource. + */ +export type RuleDataSourceUnion = RuleDataSource | RuleMetricDataSource | RuleManagementEventDataSource; + +/** + * @interface + * An interface representing RuleDataSource. + * The resource from which the rule collects its data. + * + */ +export interface RuleDataSource { + /** + * @member {string} odatatype Polymorphic Discriminator + */ + odatatype: "RuleDataSource"; + /** + * @member {string} [resourceUri] the resource identifier of the resource the + * rule monitors. **NOTE**: this property cannot be updated for an existing + * rule. + */ + resourceUri?: string; +} + +/** + * Contains the possible cases for RuleCondition. + */ +export type RuleConditionUnion = RuleCondition | ThresholdRuleCondition | LocationThresholdRuleCondition | ManagementEventRuleCondition; + +/** + * @interface + * An interface representing RuleCondition. + * The condition that results in the alert rule being activated. + * + */ +export interface RuleCondition { + /** + * @member {string} odatatype Polymorphic Discriminator + */ + odatatype: "RuleCondition"; + /** + * @member {RuleDataSourceUnion} [dataSource] the resource from which the + * rule collects its data. For this type dataSource will always be of type + * RuleMetricDataSource. + */ + dataSource?: RuleDataSourceUnion; +} + +/** + * @interface + * An interface representing RuleMetricDataSource. + * A rule metric data source. The discriminator value is always + * RuleMetricDataSource in this case. + * + */ +export interface RuleMetricDataSource { + /** + * @member {string} odatatype Polymorphic Discriminator + */ + odatatype: "Microsoft.Azure.Management.Insights.Models.RuleMetricDataSource"; + /** + * @member {string} [resourceUri] the resource identifier of the resource the + * rule monitors. **NOTE**: this property cannot be updated for an existing + * rule. + */ + resourceUri?: string; + /** + * @member {string} [metricName] the name of the metric that defines what the + * rule monitors. + */ + metricName?: string; +} + +/** + * @interface + * An interface representing RuleManagementEventClaimsDataSource. + * The claims for a rule management event data source. + * + */ +export interface RuleManagementEventClaimsDataSource { + /** + * @member {string} [emailAddress] the email address. + */ + emailAddress?: string; +} + +/** + * @interface + * An interface representing RuleManagementEventDataSource. + * A rule management event data source. The discriminator fields is always + * RuleManagementEventDataSource in this case. + * + */ +export interface RuleManagementEventDataSource { + /** + * @member {string} odatatype Polymorphic Discriminator + */ + odatatype: "Microsoft.Azure.Management.Insights.Models.RuleManagementEventDataSource"; + /** + * @member {string} [resourceUri] the resource identifier of the resource the + * rule monitors. **NOTE**: this property cannot be updated for an existing + * rule. + */ + resourceUri?: string; + /** + * @member {string} [eventName] the event name. + */ + eventName?: string; + /** + * @member {string} [eventSource] the event source. + */ + eventSource?: string; + /** + * @member {string} [level] the level. + */ + level?: string; + /** + * @member {string} [operationName] The name of the operation that should be + * checked for. If no name is provided, any operation will match. + */ + operationName?: string; + /** + * @member {string} [resourceGroupName] the resource group name. + */ + resourceGroupName?: string; + /** + * @member {string} [resourceProviderName] the resource provider name. + */ + resourceProviderName?: string; + /** + * @member {string} [status] The status of the operation that should be + * checked for. If no status is provided, any status will match. + */ + status?: string; + /** + * @member {string} [subStatus] the substatus. + */ + subStatus?: string; + /** + * @member {RuleManagementEventClaimsDataSource} [claims] the claims. + */ + claims?: RuleManagementEventClaimsDataSource; +} + +/** + * @interface + * An interface representing ThresholdRuleCondition. + * A rule condition based on a metric crossing a threshold. + * + */ +export interface ThresholdRuleCondition { + /** + * @member {string} odatatype Polymorphic Discriminator + */ + odatatype: "Microsoft.Azure.Management.Insights.Models.ThresholdRuleCondition"; + /** + * @member {RuleDataSourceUnion} [dataSource] the resource from which the + * rule collects its data. For this type dataSource will always be of type + * RuleMetricDataSource. + */ + dataSource?: RuleDataSourceUnion; + /** + * @member {ConditionOperator} operator the operator used to compare the data + * and the threshold. Possible values include: 'GreaterThan', + * 'GreaterThanOrEqual', 'LessThan', 'LessThanOrEqual' + */ + operator: ConditionOperator; + /** + * @member {number} threshold the threshold value that activates the alert. + */ + threshold: number; + /** + * @member {string} [windowSize] 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; + /** + * @member {TimeAggregationOperator} [timeAggregation] the time aggregation + * operator. How the data that are collected should be combined over time. + * The default value is the PrimaryAggregationType of the Metric. Possible + * values include: 'Average', 'Minimum', 'Maximum', 'Total', 'Last' + */ + timeAggregation?: TimeAggregationOperator; +} + +/** + * @interface + * An interface representing LocationThresholdRuleCondition. + * A rule condition based on a certain number of locations failing. + * + */ +export interface LocationThresholdRuleCondition { + /** + * @member {string} odatatype Polymorphic Discriminator + */ + odatatype: "Microsoft.Azure.Management.Insights.Models.LocationThresholdRuleCondition"; + /** + * @member {RuleDataSourceUnion} [dataSource] the resource from which the + * rule collects its data. For this type dataSource will always be of type + * RuleMetricDataSource. + */ + dataSource?: RuleDataSourceUnion; + /** + * @member {string} [windowSize] 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; + /** + * @member {number} failedLocationCount the number of locations that must + * fail to activate the alert. + */ + failedLocationCount: number; +} + +/** + * @interface + * An interface representing ManagementEventAggregationCondition. + * How the data that is collected should be combined over time. + * + */ +export interface ManagementEventAggregationCondition { + /** + * @member {ConditionOperator} [operator] the condition operator. Possible + * values include: 'GreaterThan', 'GreaterThanOrEqual', 'LessThan', + * 'LessThanOrEqual' + */ + operator?: ConditionOperator; + /** + * @member {number} [threshold] The threshold value that activates the alert. + */ + threshold?: number; + /** + * @member {string} [windowSize] 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; +} + +/** + * @interface + * An interface representing ManagementEventRuleCondition. + * A management event rule condition. + * + */ +export interface ManagementEventRuleCondition { + /** + * @member {string} odatatype Polymorphic Discriminator + */ + odatatype: "Microsoft.Azure.Management.Insights.Models.ManagementEventRuleCondition"; + /** + * @member {RuleDataSourceUnion} [dataSource] the resource from which the + * rule collects its data. For this type dataSource will always be of type + * RuleMetricDataSource. + */ + dataSource?: RuleDataSourceUnion; + /** + * @member {ManagementEventAggregationCondition} [aggregation] How the data + * that is collected should be combined over time and when the alert is + * activated. Note that for management event alerts aggregation is optional – + * if it is not provided then any event will cause the alert to activate. + */ + aggregation?: ManagementEventAggregationCondition; +} + +/** + * Contains the possible cases for RuleAction. + */ +export type RuleActionUnion = RuleAction | RuleEmailAction | RuleWebhookAction; + +/** + * @interface + * An interface representing RuleAction. + * The action that is performed when the alert rule becomes active, and when an + * alert condition is resolved. + * + */ +export interface RuleAction { + /** + * @member {string} odatatype Polymorphic Discriminator + */ + odatatype: "RuleAction"; +} + +/** + * @interface + * An interface representing RuleEmailAction. + * Specifies the action to send email when the rule condition is evaluated. The + * discriminator is always RuleEmailAction in this case. + * + */ +export interface RuleEmailAction { + /** + * @member {string} odatatype Polymorphic Discriminator + */ + odatatype: "Microsoft.Azure.Management.Insights.Models.RuleEmailAction"; + /** + * @member {boolean} [sendToServiceOwners] Whether the administrators + * (service and co-administrators) of the service should be notified when the + * alert is activated. + */ + sendToServiceOwners?: boolean; + /** + * @member {string[]} [customEmails] the list of administrator's custom email + * addresses to notify of the activation of the alert. + */ + customEmails?: string[]; +} + +/** + * @interface + * An interface representing RuleWebhookAction. + * Specifies the action to post to service when the rule condition is + * evaluated. The discriminator is always RuleWebhookAction in this case. + * + */ +export interface RuleWebhookAction { + /** + * @member {string} odatatype Polymorphic Discriminator + */ + odatatype: "Microsoft.Azure.Management.Insights.Models.RuleWebhookAction"; + /** + * @member {string} [serviceUri] the service uri to Post the notification + * when the alert activates or resolves. + */ + serviceUri?: string; + /** + * @member {{ [propertyName: string]: string }} [properties] the dictionary + * of custom properties to include with the post operation. These data are + * appended to the webhook payload. + */ + properties?: { [propertyName: string]: string }; +} + +/** + * @interface + * An interface representing AlertRuleResource. + * The alert rule resource. + * + * @extends Resource + */ +export interface AlertRuleResource extends Resource { + /** + * @member {string} alertRuleResourceName the name of the alert rule. + */ + alertRuleResourceName: string; + /** + * @member {string} [description] the description of the alert rule that will + * be included in the alert email. + */ + description?: string; + /** + * @member {boolean} isEnabled the flag that indicates whether the alert rule + * is enabled. + */ + isEnabled: boolean; + /** + * @member {RuleConditionUnion} condition the condition that results in the + * alert rule being activated. + */ + condition: RuleConditionUnion; + /** + * @member {RuleActionUnion[]} [actions] the array of actions that are + * performed when the alert rule becomes active, and when an alert condition + * is resolved. + */ + actions?: RuleActionUnion[]; + /** + * @member {Date} [lastUpdatedTime] 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; +} + +/** + * @interface + * An interface representing AlertRuleResourcePatch. + * The alert rule object for patch operations. + * + */ +export interface AlertRuleResourcePatch { + /** + * @member {{ [propertyName: string]: string }} [tags] Resource tags + */ + tags?: { [propertyName: string]: string }; + /** + * @member {string} name the name of the alert rule. + */ + name: string; + /** + * @member {string} [description] the description of the alert rule that will + * be included in the alert email. + */ + description?: string; + /** + * @member {boolean} isEnabled the flag that indicates whether the alert rule + * is enabled. + */ + isEnabled: boolean; + /** + * @member {RuleConditionUnion} condition the condition that results in the + * alert rule being activated. + */ + condition: RuleConditionUnion; + /** + * @member {RuleActionUnion[]} [actions] the array of actions that are + * performed when the alert rule becomes active, and when an alert condition + * is resolved. + */ + actions?: RuleActionUnion[]; + /** + * @member {Date} [lastUpdatedTime] 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; +} + +/** + * @interface + * An interface representing RetentionPolicy. + * Specifies the retention policy for the log. + * + */ +export interface RetentionPolicy { + /** + * @member {boolean} enabled a value indicating whether the retention policy + * is enabled. + */ + enabled: boolean; + /** + * @member {number} days the number of days for the retention in days. A + * value of 0 will retain the events indefinitely. + */ + days: number; +} + +/** + * @interface + * An interface representing LogProfileResource. + * The log profile resource. + * + * @extends Resource + */ +export interface LogProfileResource extends Resource { + /** + * @member {string} [storageAccountId] the resource id of the storage account + * to which you would like to send the Activity Log. + */ + storageAccountId?: string; + /** + * @member {string} [serviceBusRuleId] 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; + /** + * @member {string[]} locations 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[]; + /** + * @member {string[]} categories 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[]; + /** + * @member {RetentionPolicy} retentionPolicy the retention policy for the + * events in the log. + */ + retentionPolicy: RetentionPolicy; +} + +/** + * @interface + * An interface representing LogProfileResourcePatch. + * The log profile resource for patch operations. + * + */ +export interface LogProfileResourcePatch { + /** + * @member {{ [propertyName: string]: string }} [tags] Resource tags + */ + tags?: { [propertyName: string]: string }; + /** + * @member {string} [storageAccountId] the resource id of the storage account + * to which you would like to send the Activity Log. + */ + storageAccountId?: string; + /** + * @member {string} [serviceBusRuleId] 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; + /** + * @member {string[]} locations 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[]; + /** + * @member {string[]} categories 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[]; + /** + * @member {RetentionPolicy} retentionPolicy the retention policy for the + * events in the log. + */ + retentionPolicy: RetentionPolicy; +} + +/** + * @interface + * An interface representing ProxyOnlyResource. + * A proxy only azure resource object + * + * @extends BaseResource + */ +export interface ProxyOnlyResource extends BaseResource { + /** + * @member {string} [id] Azure resource Id + * **NOTE: This property will not be serialized. It can only be populated by + * the server.** + */ + readonly id?: string; + /** + * @member {string} [name] Azure resource name + * **NOTE: This property will not be serialized. It can only be populated by + * the server.** + */ + readonly name?: string; + /** + * @member {string} [type] Azure resource type + * **NOTE: This property will not be serialized. It can only be populated by + * the server.** + */ + readonly type?: string; +} + +/** + * @interface + * An interface representing MetricSettings. + * Part of MultiTenantDiagnosticSettings. Specifies the settings for a + * particular metric. + * + */ +export interface MetricSettings { + /** + * @member {string} [timeGrain] the timegrain of the metric in ISO8601 + * format. + */ + timeGrain?: string; + /** + * @member {string} [category] 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; + /** + * @member {boolean} enabled a value indicating whether this category is + * enabled. + */ + enabled: boolean; + /** + * @member {RetentionPolicy} [retentionPolicy] the retention policy for this + * category. + */ + retentionPolicy?: RetentionPolicy; +} + +/** + * @interface + * An interface representing LogSettings. + * Part of MultiTenantDiagnosticSettings. Specifies the settings for a + * particular log. + * + */ +export interface LogSettings { + /** + * @member {string} [category] 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; + /** + * @member {boolean} enabled a value indicating whether this log is enabled. + */ + enabled: boolean; + /** + * @member {RetentionPolicy} [retentionPolicy] the retention policy for this + * log. + */ + retentionPolicy?: RetentionPolicy; +} + +/** + * @interface + * An interface representing DiagnosticSettingsResource. + * The diagnostic setting resource. + * + * @extends ProxyOnlyResource + */ +export interface DiagnosticSettingsResource extends ProxyOnlyResource { + /** + * @member {string} [storageAccountId] The resource ID of the storage account + * to which you would like to send Diagnostic Logs. + */ + storageAccountId?: string; + /** + * @member {string} [serviceBusRuleId] The service bus rule Id of the + * diagnostic setting. This is here to maintain backwards compatibility. + */ + serviceBusRuleId?: string; + /** + * @member {string} [eventHubAuthorizationRuleId] The resource Id for the + * event hub authorization rule. + */ + eventHubAuthorizationRuleId?: string; + /** + * @member {string} [eventHubName] The name of the event hub. If none is + * specified, the default event hub will be selected. + */ + eventHubName?: string; + /** + * @member {MetricSettings[]} [metrics] the list of metric settings. + */ + metrics?: MetricSettings[]; + /** + * @member {LogSettings[]} [logs] the list of logs settings. + */ + logs?: LogSettings[]; + /** + * @member {string} [workspaceId] The workspace ID (resource ID of a Log + * Analytics workspace) for a 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; +} + +/** + * @interface + * An interface representing DiagnosticSettingsResourceCollection. + * Represents a collection of alert rule resources. + * + */ +export interface DiagnosticSettingsResourceCollection { + /** + * @member {DiagnosticSettingsResource[]} [value] The collection of + * diagnostic settings resources;. + */ + value?: DiagnosticSettingsResource[]; +} + +/** + * @interface + * An interface representing DiagnosticSettingsCategoryResource. + * The diagnostic settings category resource. + * + * @extends ProxyOnlyResource + */ +export interface DiagnosticSettingsCategoryResource extends ProxyOnlyResource { + /** + * @member {CategoryType} [categoryType] The type of the diagnostic settings + * category. Possible values include: 'Metrics', 'Logs' + */ + categoryType?: CategoryType; +} + +/** + * @interface + * An interface representing DiagnosticSettingsCategoryResourceCollection. + * Represents a collection of diagnostic setting category resources. + * + */ +export interface DiagnosticSettingsCategoryResourceCollection { + /** + * @member {DiagnosticSettingsCategoryResource[]} [value] The collection of + * diagnostic settings category resources. + */ + value?: DiagnosticSettingsCategoryResource[]; +} + +/** + * @interface + * An interface representing EmailReceiver. + * An email receiver. + * + */ +export interface EmailReceiver { + /** + * @member {string} name The name of the email receiver. Names must be unique + * across all receivers within an action group. + */ + name: string; + /** + * @member {string} emailAddress The email address of this receiver. + */ + emailAddress: string; + /** + * @member {boolean} useCommonAlertSchema Indicates whether to use common + * alert schema. + */ + useCommonAlertSchema: boolean; + /** + * @member {ReceiverStatus} [status] 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; +} + +/** + * @interface + * An interface representing SmsReceiver. + * An SMS receiver. + * + */ +export interface SmsReceiver { + /** + * @member {string} name The name of the SMS receiver. Names must be unique + * across all receivers within an action group. + */ + name: string; + /** + * @member {string} countryCode The country code of the SMS receiver. + */ + countryCode: string; + /** + * @member {string} phoneNumber The phone number of the SMS receiver. + */ + phoneNumber: string; + /** + * @member {ReceiverStatus} [status] 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; +} + +/** + * @interface + * An interface representing WebhookReceiver. + * A webhook receiver. + * + */ +export interface WebhookReceiver { + /** + * @member {string} name The name of the webhook receiver. Names must be + * unique across all receivers within an action group. + */ + name: string; + /** + * @member {string} serviceUri The URI where webhooks should be sent. + */ + serviceUri: string; + /** + * @member {boolean} useCommonAlertSchema Indicates whether to use common + * alert schema. + */ + useCommonAlertSchema: boolean; +} + +/** + * @interface + * An interface representing ItsmReceiver. + * An Itsm receiver. + * + */ +export interface ItsmReceiver { + /** + * @member {string} name The name of the Itsm receiver. Names must be unique + * across all receivers within an action group. + */ + name: string; + /** + * @member {string} workspaceId OMS LA instance identifier. + */ + workspaceId: string; + /** + * @member {string} connectionId Unique identification of ITSM connection + * among multiple defined in above workspace. + */ + connectionId: string; + /** + * @member {string} ticketConfiguration JSON blob for the configurations of + * the ITSM action. CreateMultipleWorkItems option will be part of this blob + * as well. + */ + ticketConfiguration: string; + /** + * @member {string} region Region in which workspace resides. Supported + * values:'centralindia','japaneast','southeastasia','australiasoutheast','uksouth','westcentralus','canadacentral','eastus','westeurope' + */ + region: string; +} + +/** + * @interface + * An interface representing AzureAppPushReceiver. + * The Azure mobile App push notification receiver. + * + */ +export interface AzureAppPushReceiver { + /** + * @member {string} name The name of the Azure mobile app push receiver. + * Names must be unique across all receivers within an action group. + */ + name: string; + /** + * @member {string} emailAddress The email address registered for the Azure + * mobile app. + */ + emailAddress: string; +} + +/** + * @interface + * An interface representing AutomationRunbookReceiver. + * The Azure Automation Runbook notification receiver. + * + */ +export interface AutomationRunbookReceiver { + /** + * @member {string} automationAccountId The Azure automation account Id which + * holds this runbook and authenticate to Azure resource. + */ + automationAccountId: string; + /** + * @member {string} runbookName The name for this runbook. + */ + runbookName: string; + /** + * @member {string} webhookResourceId The resource id for webhook linked to + * this runbook. + */ + webhookResourceId: string; + /** + * @member {boolean} isGlobalRunbook Indicates whether this instance is + * global runbook. + */ + isGlobalRunbook: boolean; + /** + * @member {string} [name] Indicates name of the webhook. + */ + name?: string; + /** + * @member {string} [serviceUri] The URI where webhooks should be sent. + */ + serviceUri?: string; + /** + * @member {boolean} useCommonAlertSchema Indicates whether to use common + * alert schema. + */ + useCommonAlertSchema: boolean; +} + +/** + * @interface + * An interface representing VoiceReceiver. + * A voice receiver. + * + */ +export interface VoiceReceiver { + /** + * @member {string} name The name of the voice receiver. Names must be unique + * across all receivers within an action group. + */ + name: string; + /** + * @member {string} countryCode The country code of the voice receiver. + */ + countryCode: string; + /** + * @member {string} phoneNumber The phone number of the voice receiver. + */ + phoneNumber: string; +} + +/** + * @interface + * An interface representing LogicAppReceiver. + * A logic app receiver. + * + */ +export interface LogicAppReceiver { + /** + * @member {string} name The name of the logic app receiver. Names must be + * unique across all receivers within an action group. + */ + name: string; + /** + * @member {string} resourceId The azure resource id of the logic app + * receiver. + */ + resourceId: string; + /** + * @member {string} callbackUrl The callback url where http request sent to. + */ + callbackUrl: string; + /** + * @member {boolean} useCommonAlertSchema Indicates whether to use common + * alert schema. + */ + useCommonAlertSchema: boolean; +} + +/** + * @interface + * An interface representing AzureFunctionReceiver. + * An azure function receiver. + * + */ +export interface AzureFunctionReceiver { + /** + * @member {string} name The name of the azure function receiver. Names must + * be unique across all receivers within an action group. + */ + name: string; + /** + * @member {string} functionAppResourceId The azure resource id of the + * function app. + */ + functionAppResourceId: string; + /** + * @member {string} functionName The function name in the function app. + */ + functionName: string; + /** + * @member {string} httpTriggerUrl The http trigger url where http request + * sent to. + */ + httpTriggerUrl: string; + /** + * @member {boolean} useCommonAlertSchema Indicates whether to use common + * alert schema. + */ + useCommonAlertSchema: boolean; +} + +/** + * @interface + * An interface representing ArmRoleReceiver. + * An arm role receiver. + * + */ +export interface ArmRoleReceiver { + /** + * @member {string} name The name of the arm role receiver. Names must be + * unique across all receivers within an action group. + */ + name: string; + /** + * @member {string} roleId The arm role id. + */ + roleId: string; + /** + * @member {boolean} useCommonAlertSchema Indicates whether to use common + * alert schema. + */ + useCommonAlertSchema: boolean; +} + +/** + * @interface + * An interface representing ActionGroupResource. + * An action group resource. + * + * @extends Resource + */ +export interface ActionGroupResource extends Resource { + /** + * @member {string} groupShortName The short name of the action group. This + * will be used in SMS messages. + */ + groupShortName: string; + /** + * @member {boolean} enabled 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; + /** + * @member {EmailReceiver[]} [emailReceivers] The list of email receivers + * that are part of this action group. + */ + emailReceivers?: EmailReceiver[]; + /** + * @member {SmsReceiver[]} [smsReceivers] The list of SMS receivers that are + * part of this action group. + */ + smsReceivers?: SmsReceiver[]; + /** + * @member {WebhookReceiver[]} [webhookReceivers] The list of webhook + * receivers that are part of this action group. + */ + webhookReceivers?: WebhookReceiver[]; + /** + * @member {ItsmReceiver[]} [itsmReceivers] The list of ITSM receivers that + * are part of this action group. + */ + itsmReceivers?: ItsmReceiver[]; + /** + * @member {AzureAppPushReceiver[]} [azureAppPushReceivers] The list of + * AzureAppPush receivers that are part of this action group. + */ + azureAppPushReceivers?: AzureAppPushReceiver[]; + /** + * @member {AutomationRunbookReceiver[]} [automationRunbookReceivers] The + * list of AutomationRunbook receivers that are part of this action group. + */ + automationRunbookReceivers?: AutomationRunbookReceiver[]; + /** + * @member {VoiceReceiver[]} [voiceReceivers] The list of voice receivers + * that are part of this action group. + */ + voiceReceivers?: VoiceReceiver[]; + /** + * @member {LogicAppReceiver[]} [logicAppReceivers] The list of logic app + * receivers that are part of this action group. + */ + logicAppReceivers?: LogicAppReceiver[]; + /** + * @member {AzureFunctionReceiver[]} [azureFunctionReceivers] The list of + * azure function receivers that are part of this action group. + */ + azureFunctionReceivers?: AzureFunctionReceiver[]; + /** + * @member {ArmRoleReceiver[]} [armRoleReceivers] 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[]; +} + +/** + * @interface + * An interface representing EnableRequest. + * Describes a receiver that should be resubscribed. + * + */ +export interface EnableRequest { + /** + * @member {string} receiverName The name of the receiver to resubscribe. + */ + receiverName: string; +} + +/** + * @interface + * An interface representing ActionGroupPatchBody. + * An action group object for the body of patch operations. + * + */ +export interface ActionGroupPatchBody { + /** + * @member {{ [propertyName: string]: string }} [tags] Resource tags + */ + tags?: { [propertyName: string]: string }; + /** + * @member {boolean} [enabled] 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; +} + +/** + * @interface + * An interface representing ActivityLogAlertLeafCondition. + * An Activity Log alert condition that is met by comparing an activity log + * field and value. + * + */ +export interface ActivityLogAlertLeafCondition { + /** + * @member {string} field 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; + /** + * @member {string} equals The field value will be compared to this value + * (case-insensitive) to determine if the condition is met. + */ + equals: string; +} + +/** + * @interface + * An interface representing ActivityLogAlertAllOfCondition. + * An Activity Log alert condition that is met when all its member conditions + * are met. + * + */ +export interface ActivityLogAlertAllOfCondition { + /** + * @member {ActivityLogAlertLeafCondition[]} allOf The list of activity log + * alert conditions. + */ + allOf: ActivityLogAlertLeafCondition[]; +} + +/** + * @interface + * An interface representing ActivityLogAlertActionGroup. + * A pointer to an Azure Action Group. + * + */ +export interface ActivityLogAlertActionGroup { + /** + * @member {string} actionGroupId The resourceId of the action group. This + * cannot be null or empty. + */ + actionGroupId: string; + /** + * @member {{ [propertyName: string]: string }} [webhookProperties] the + * dictionary of custom properties to include with the post operation. These + * data are appended to the webhook payload. + */ + webhookProperties?: { [propertyName: string]: string }; +} + +/** + * @interface + * An interface representing ActivityLogAlertActionList. + * A list of activity log alert actions. + * + */ +export interface ActivityLogAlertActionList { + /** + * @member {ActivityLogAlertActionGroup[]} [actionGroups] The list of + * activity log alerts. + */ + actionGroups?: ActivityLogAlertActionGroup[]; +} + +/** + * @interface + * An interface representing ActivityLogAlertResource. + * An activity log alert resource. + * + * @extends Resource + */ +export interface ActivityLogAlertResource extends Resource { + /** + * @member {string[]} scopes 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[]; + /** + * @member {boolean} [enabled] 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; + /** + * @member {ActivityLogAlertAllOfCondition} condition The condition that will + * cause this alert to activate. + */ + condition: ActivityLogAlertAllOfCondition; + /** + * @member {ActivityLogAlertActionList} actions The actions that will + * activate when the condition is met. + */ + actions: ActivityLogAlertActionList; + /** + * @member {string} [description] A description of this activity log alert. + */ + description?: string; +} + +/** + * @interface + * An interface representing ActivityLogAlertPatchBody. + * An activity log alert object for the body of patch operations. + * + */ +export interface ActivityLogAlertPatchBody { + /** + * @member {{ [propertyName: string]: string }} [tags] Resource tags + */ + tags?: { [propertyName: string]: string }; + /** + * @member {boolean} [enabled] 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; +} + +/** + * @interface + * An interface representing LocalizableString. + * The localizable string class. + * + */ +export interface LocalizableString { + /** + * @member {string} value the invariant value. + */ + value: string; + /** + * @member {string} [localizedValue] the locale specific value. + */ + localizedValue?: string; +} + +/** + * @interface + * An interface representing SenderAuthorization. + * 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 { + /** + * @member {string} [action] the permissible actions. For instance: + * microsoft.support/supporttickets/write + */ + action?: string; + /** + * @member {string} [role] the role of the user. For instance: Subscription + * Admin + */ + role?: string; + /** + * @member {string} [scope] the scope. + */ + scope?: string; +} + +/** + * @interface + * An interface representing HttpRequestInfo. + * The Http request info. + * + */ +export interface HttpRequestInfo { + /** + * @member {string} [clientRequestId] the client request id. + */ + clientRequestId?: string; + /** + * @member {string} [clientIpAddress] the client Ip Address + */ + clientIpAddress?: string; + /** + * @member {string} [method] the Http request method. + */ + method?: string; + /** + * @member {string} [uri] the Uri. + */ + uri?: string; +} + +/** + * @interface + * An interface representing EventData. + * The Azure event log entries are of type EventData + * + */ +export interface EventData { + /** + * @member {SenderAuthorization} [authorization] The sender authorization + * information. + * **NOTE: This property will not be serialized. It can only be populated by + * the server.** + */ + readonly authorization?: SenderAuthorization; + /** + * @member {{ [propertyName: string]: string }} [claims] 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 }; + /** + * @member {string} [caller] 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; + /** + * @member {string} [description] the description of the event. + * **NOTE: This property will not be serialized. It can only be populated by + * the server.** + */ + readonly description?: string; + /** + * @member {string} [id] 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; + /** + * @member {string} [eventDataId] 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; + /** + * @member {string} [correlationId] 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; + /** + * @member {LocalizableString} [eventName] 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; + /** + * @member {LocalizableString} [category] the event category. + * **NOTE: This property will not be serialized. It can only be populated by + * the server.** + */ + readonly category?: LocalizableString; + /** + * @member {HttpRequestInfo} [httpRequest] 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; + /** + * @member {EventLevel} [level] 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; + /** + * @member {string} [resourceGroupName] 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; + /** + * @member {LocalizableString} [resourceProviderName] 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; + /** + * @member {string} [resourceId] 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; + /** + * @member {LocalizableString} [resourceType] the resource type + * **NOTE: This property will not be serialized. It can only be populated by + * the server.** + */ + readonly resourceType?: LocalizableString; + /** + * @member {string} [operationId] 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; + /** + * @member {LocalizableString} [operationName] the operation name. + * **NOTE: This property will not be serialized. It can only be populated by + * the server.** + */ + readonly operationName?: LocalizableString; + /** + * @member {{ [propertyName: string]: string }} [properties] 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 }; + /** + * @member {LocalizableString} [status] 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; + /** + * @member {LocalizableString} [subStatus] 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; + /** + * @member {Date} [eventTimestamp] 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; + /** + * @member {Date} [submissionTimestamp] 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; + /** + * @member {string} [subscriptionId] 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; + /** + * @member {string} [tenantId] the Azure tenant Id + * **NOTE: This property will not be serialized. It can only be populated by + * the server.** + */ + readonly tenantId?: string; +} + +/** + * @interface + * An interface representing MetricAvailability. + * Metric availability specifies the time grain (aggregation interval or + * frequency) and the retention period for that time grain. + * + */ +export interface MetricAvailability { + /** + * @member {string} [timeGrain] the time grain specifies the aggregation + * interval for the metric. Expressed as a duration 'PT1M', 'P1D', etc. + */ + timeGrain?: string; + /** + * @member {string} [retention] the retention period for the metric at the + * specified timegrain. Expressed as a duration 'PT1M', 'P1D', etc. + */ + retention?: string; +} + +/** + * @interface + * An interface representing MetricDefinition. + * Metric definition class specifies the metadata for a metric. + * + */ +export interface MetricDefinition { + /** + * @member {boolean} [isDimensionRequired] Flag to indicate whether the + * dimension is required. + */ + isDimensionRequired?: boolean; + /** + * @member {string} [resourceId] the resource identifier of the resource that + * emitted the metric. + */ + resourceId?: string; + /** + * @member {string} [namespace] the namespace the metric belongs to. + */ + namespace?: string; + /** + * @member {LocalizableString} [name] the name and the display name of the + * metric, i.e. it is a localizable string. + */ + name?: LocalizableString; + /** + * @member {Unit} [unit] the unit of the metric. Possible values include: + * 'Count', 'Bytes', 'Seconds', 'CountPerSecond', 'BytesPerSecond', + * 'Percent', 'MilliSeconds', 'ByteSeconds', 'Unspecified' + */ + unit?: Unit; + /** + * @member {AggregationType} [primaryAggregationType] the primary aggregation + * type value defining how to use the values for display. Possible values + * include: 'None', 'Average', 'Count', 'Minimum', 'Maximum', 'Total' + */ + primaryAggregationType?: AggregationType; + /** + * @member {AggregationType[]} [supportedAggregationTypes] the collection of + * what aggregation types are supported. + */ + supportedAggregationTypes?: AggregationType[]; + /** + * @member {MetricAvailability[]} [metricAvailabilities] the collection of + * what aggregation intervals are available to be queried. + */ + metricAvailabilities?: MetricAvailability[]; + /** + * @member {string} [id] the resource identifier of the metric definition. + */ + id?: string; + /** + * @member {LocalizableString[]} [dimensions] the name and the display name + * of the dimension, i.e. it is a localizable string. + */ + dimensions?: LocalizableString[]; +} + +/** + * @interface + * An interface representing MetricValue. + * Represents a metric value. + * + */ +export interface MetricValue { + /** + * @member {Date} timeStamp the timestamp for the metric value in ISO 8601 + * format. + */ + timeStamp: Date; + /** + * @member {number} [average] the average value in the time range. + */ + average?: number; + /** + * @member {number} [minimum] the least value in the time range. + */ + minimum?: number; + /** + * @member {number} [maximum] the greatest value in the time range. + */ + maximum?: number; + /** + * @member {number} [total] the sum of all of the values in the time range. + */ + total?: number; + /** + * @member {number} [count] 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; +} + +/** + * @interface + * An interface representing MetadataValue. + * Represents a metric metadata value. + * + */ +export interface MetadataValue { + /** + * @member {LocalizableString} [name] the name of the metadata. + */ + name?: LocalizableString; + /** + * @member {string} [value] the value of the metadata. + */ + value?: string; +} + +/** + * @interface + * An interface representing TimeSeriesElement. + * A time series result type. The discriminator value is always TimeSeries in + * this case. + * + */ +export interface TimeSeriesElement { + /** + * @member {MetadataValue[]} [metadatavalues] the metadata values returned if + * $filter was specified in the call. + */ + metadatavalues?: MetadataValue[]; + /** + * @member {MetricValue[]} [data] An array of data points representing the + * metric values. This is only returned if a result type of data is + * specified. + */ + data?: MetricValue[]; +} + +/** + * @interface + * An interface representing Metric. + * The result data of a query. + * + */ +export interface Metric { + /** + * @member {string} id the metric Id. + */ + id: string; + /** + * @member {string} type the resource type of the metric resource. + */ + type: string; + /** + * @member {LocalizableString} name the name and the display name of the + * metric, i.e. it is localizable string. + */ + name: LocalizableString; + /** + * @member {Unit} unit the unit of the metric. Possible values include: + * 'Count', 'Bytes', 'Seconds', 'CountPerSecond', 'BytesPerSecond', + * 'Percent', 'MilliSeconds', 'ByteSeconds', 'Unspecified' + */ + unit: Unit; + /** + * @member {TimeSeriesElement[]} timeseries the time series returned when a + * data query is performed. + */ + timeseries: TimeSeriesElement[]; +} + +/** + * @interface + * An interface representing Response. + * The response to a metrics query. + * + */ +export interface Response { + /** + * @member {number} [cost] The integer value representing the cost of the + * query, for data case. + */ + cost?: number; + /** + * @member {string} timespan 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; + /** + * @member {string} [interval] 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; + /** + * @member {string} [namespace] The namespace of the metrics been queried + */ + namespace?: string; + /** + * @member {string} [resourceregion] The region of the resource been queried + * for metrics. + */ + resourceregion?: string; + /** + * @member {Metric[]} value the value of the collection. + */ + value: Metric[]; +} + +/** + * @interface + * An interface representing BaselineMetadataValue. + * Represents a baseline metadata value. + * + */ +export interface BaselineMetadataValue { + /** + * @member {LocalizableString} [name] the name of the metadata. + */ + name?: LocalizableString; + /** + * @member {string} [value] the value of the metadata. + */ + value?: string; +} + +/** + * @interface + * An interface representing Baseline. + * The baseline values for a single sensitivity value. + * + */ +export interface Baseline { + /** + * @member {Sensitivity} sensitivity the sensitivity of the baseline. + * Possible values include: 'Low', 'Medium', 'High' + */ + sensitivity: Sensitivity; + /** + * @member {number[]} lowThresholds The low thresholds of the baseline. + */ + lowThresholds: number[]; + /** + * @member {number[]} highThresholds The high thresholds of the baseline. + */ + highThresholds: number[]; +} + +/** + * @interface + * An interface representing BaselineResponse. + * The response to a baseline query. + * + */ +export interface BaselineResponse { + /** + * @member {string} [id] the metric baseline Id. + * **NOTE: This property will not be serialized. It can only be populated by + * the server.** + */ + readonly id?: string; + /** + * @member {string} [type] 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; + /** + * @member {LocalizableString} [name] 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; + /** + * @member {string} [timespan] 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; + /** + * @member {string} [interval] 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; + /** + * @member {string} [aggregation] The aggregation type of the metric. + */ + aggregation?: string; + /** + * @member {Date[] | string[]} [timestamps] the array of timestamps of the + * baselines. + */ + timestamps?: Date[] | string[]; + /** + * @member {Baseline[]} [baseline] the baseline values for each sensitivity. + */ + baseline?: Baseline[]; + /** + * @member {BaselineMetadataValue[]} [metadata] the baseline metadata values. + */ + metadata?: BaselineMetadataValue[]; +} + +/** + * @interface + * An interface representing TimeSeriesInformation. + * The time series info needed for calculating the baseline. + * + */ +export interface TimeSeriesInformation { + /** + * @member {string[]} sensitivities the list of sensitivities for calculating + * the baseline. + */ + sensitivities: string[]; + /** + * @member {number[]} values The metric values to calculate the baseline. + */ + values: number[]; + /** + * @member {Date[] | string[]} [timestamps] the array of timestamps of the + * baselines. + */ + timestamps?: Date[] | string[]; +} + +/** + * @interface + * An interface representing CalculateBaselineResponse. + * The response to a calculate baseline call. + * + */ +export interface CalculateBaselineResponse { + /** + * @member {string} type the resource type of the baseline resource. + */ + type: string; + /** + * @member {Date[] | string[]} [timestamps] the array of timestamps of the + * baselines. + */ + timestamps?: Date[] | string[]; + /** + * @member {Baseline[]} baseline the baseline values for each sensitivity. + */ + baseline: Baseline[]; +} + +/** + * @interface + * An interface representing MetricSingleDimension. + * The metric dimension name and value. + * + */ +export interface MetricSingleDimension { + /** + * @member {string} name Name of the dimension. + */ + name: string; + /** + * @member {string} value Value of the dimension. + */ + value: string; +} + +/** + * @interface + * An interface representing SingleBaseline. + * The baseline values for a single sensitivity value. + * + */ +export interface SingleBaseline { + /** + * @member {BaselineSensitivity} sensitivity the sensitivity of the baseline. + * Possible values include: 'Low', 'Medium', 'High' + */ + sensitivity: BaselineSensitivity; + /** + * @member {number[]} lowThresholds The low thresholds of the baseline. + */ + lowThresholds: number[]; + /** + * @member {number[]} highThresholds The high thresholds of the baseline. + */ + highThresholds: number[]; +} + +/** + * @interface + * An interface representing BaselineMetadata. + * Represents a baseline metadata value. + * + */ +export interface BaselineMetadata { + /** + * @member {string} name Name of the baseline metadata. + */ + name: string; + /** + * @member {string} value Value of the baseline metadata. + */ + value: string; +} + +/** + * @interface + * An interface representing TimeSeriesBaseline. + * The baseline values for a single time series. + * + */ +export interface TimeSeriesBaseline { + /** + * @member {string} aggregation The aggregation type of the metric. + */ + aggregation: string; + /** + * @member {MetricSingleDimension[]} [dimensions] The dimensions of this time + * series. + */ + dimensions?: MetricSingleDimension[]; + /** + * @member {Date[] | string[]} timestamps The list of timestamps of the + * baselines. + */ + timestamps: Date[] | string[]; + /** + * @member {SingleBaseline[]} data The baseline values for each sensitivity. + */ + data: SingleBaseline[]; + /** + * @member {BaselineMetadata[]} [metadata] The baseline metadata values. + */ + metadata?: BaselineMetadata[]; +} + +/** + * @interface + * An interface representing SingleMetricBaseline. + * The baseline results of a single metric. + * + */ +export interface SingleMetricBaseline { + /** + * @member {string} id The metric baseline Id. + */ + id: string; + /** + * @member {string} type The resource type of the metric baseline resource. + */ + type: string; + /** + * @member {string} name The name of the metric for which the baselines were + * retrieved. + */ + name: string; + /** + * @member {string} timespan 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; + /** + * @member {string} interval 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; + /** + * @member {string} [namespace] The namespace of the metrics been queried. + */ + namespace?: string; + /** + * @member {TimeSeriesBaseline[]} baselines The baseline for each time series + * that was queried. + */ + baselines: TimeSeriesBaseline[]; +} + +/** + * @interface + * An interface representing MetricAlertAction. + * An alert action. + * + */ +export interface MetricAlertAction { + /** + * @member {string} [actionGroupId] the id of the action group to use. + */ + actionGroupId?: string; + /** + * @member {{ [propertyName: string]: string }} [webhookProperties] The + * properties of a webhook object. + */ + webhookProperties?: { [propertyName: string]: string }; +} + +/** + * Contains the possible cases for MetricAlertCriteria. + */ +export type MetricAlertCriteriaUnion = MetricAlertCriteria | MetricAlertSingleResourceMultipleMetricCriteria | MetricAlertMultipleResourceMultipleMetricCriteria; + +/** + * @interface + * An interface representing MetricAlertCriteria. + * The rule criteria that defines the conditions of the alert rule. + * + */ +export interface MetricAlertCriteria { + /** + * @member {string} odatatype Polymorphic Discriminator + */ + odatatype: "MetricAlertCriteria"; + /** + * @property Describes unknown properties. The value of an unknown property + * can be of "any" type. + */ + [property: string]: any; +} + +/** + * @interface + * An interface representing MetricAlertResource. + * The metric alert resource. + * + * @extends Resource + */ +export interface MetricAlertResource extends Resource { + /** + * @member {string} description the description of the metric alert that will + * be included in the alert email. + */ + description: string; + /** + * @member {number} severity Alert severity {0, 1, 2, 3, 4} + */ + severity: number; + /** + * @member {boolean} enabled the flag that indicates whether the metric alert + * is enabled. + */ + enabled: boolean; + /** + * @member {string[]} [scopes] the list of resource id's that this metric + * alert is scoped to. + */ + scopes?: string[]; + /** + * @member {string} evaluationFrequency how often the metric alert is + * evaluated represented in ISO 8601 duration format. + */ + evaluationFrequency: string; + /** + * @member {string} windowSize the period of time (in ISO 8601 duration + * format) that is used to monitor alert activity based on the threshold. + */ + windowSize: string; + /** + * @member {string} [targetResourceType] the resource type of the target + * resource(s) on which the alert is created/updated. Mandatory for + * MultipleResourceMultipleMetricCriteria. + */ + targetResourceType?: string; + /** + * @member {string} [targetResourceRegion] the region of the target + * resource(s) on which the alert is created/updated. Mandatory for + * MultipleResourceMultipleMetricCriteria. + */ + targetResourceRegion?: string; + /** + * @member {MetricAlertCriteriaUnion} criteria defines the specific alert + * criteria information. + */ + criteria: MetricAlertCriteriaUnion; + /** + * @member {boolean} [autoMitigate] the flag that indicates whether the alert + * should be auto resolved or not. + */ + autoMitigate?: boolean; + /** + * @member {MetricAlertAction[]} [actions] the array of actions that are + * performed when the alert rule becomes active, and when an alert condition + * is resolved. + */ + actions?: MetricAlertAction[]; + /** + * @member {Date} [lastUpdatedTime] 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; +} + +/** + * @interface + * An interface representing MetricAlertResourcePatch. + * The metric alert resource for patch operations. + * + */ +export interface MetricAlertResourcePatch { + /** + * @member {{ [propertyName: string]: string }} [tags] Resource tags + */ + tags?: { [propertyName: string]: string }; + /** + * @member {string} description the description of the metric alert that will + * be included in the alert email. + */ + description: string; + /** + * @member {number} severity Alert severity {0, 1, 2, 3, 4} + */ + severity: number; + /** + * @member {boolean} enabled the flag that indicates whether the metric alert + * is enabled. + */ + enabled: boolean; + /** + * @member {string[]} [scopes] the list of resource id's that this metric + * alert is scoped to. + */ + scopes?: string[]; + /** + * @member {string} evaluationFrequency how often the metric alert is + * evaluated represented in ISO 8601 duration format. + */ + evaluationFrequency: string; + /** + * @member {string} windowSize the period of time (in ISO 8601 duration + * format) that is used to monitor alert activity based on the threshold. + */ + windowSize: string; + /** + * @member {string} [targetResourceType] the resource type of the target + * resource(s) on which the alert is created/updated. Mandatory for + * MultipleResourceMultipleMetricCriteria. + */ + targetResourceType?: string; + /** + * @member {string} [targetResourceRegion] the region of the target + * resource(s) on which the alert is created/updated. Mandatory for + * MultipleResourceMultipleMetricCriteria. + */ + targetResourceRegion?: string; + /** + * @member {MetricAlertCriteriaUnion} criteria defines the specific alert + * criteria information. + */ + criteria: MetricAlertCriteriaUnion; + /** + * @member {boolean} [autoMitigate] the flag that indicates whether the alert + * should be auto resolved or not. + */ + autoMitigate?: boolean; + /** + * @member {MetricAlertAction[]} [actions] the array of actions that are + * performed when the alert rule becomes active, and when an alert condition + * is resolved. + */ + actions?: MetricAlertAction[]; + /** + * @member {Date} [lastUpdatedTime] 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; +} + +/** + * @interface + * An interface representing MetricAlertStatusProperties. + * An alert status properties. + * + */ +export interface MetricAlertStatusProperties { + /** + * @member {{ [propertyName: string]: string }} [dimensions] An object + * describing the type of the dimensions. + */ + dimensions?: { [propertyName: string]: string }; + /** + * @member {string} [status] status value + */ + status?: string; + /** + * @member {Date} [timestamp] UTC time when the status was checked. + */ + timestamp?: Date; +} + +/** + * @interface + * An interface representing MetricAlertStatus. + * An alert status. + * + */ +export interface MetricAlertStatus { + /** + * @member {string} [name] The status name. + */ + name?: string; + /** + * @member {string} [id] The alert rule arm id. + */ + id?: string; + /** + * @member {string} [type] The extended resource type name. + */ + type?: string; + /** + * @member {MetricAlertStatusProperties} [properties] The alert status + * properties of the metric alert status. + */ + properties?: MetricAlertStatusProperties; +} + +/** + * @interface + * An interface representing MetricAlertStatusCollection. + * Represents a collection of alert rule resources. + * + */ +export interface MetricAlertStatusCollection { + /** + * @member {MetricAlertStatus[]} [value] the values for the alert rule + * resources. + */ + value?: MetricAlertStatus[]; +} + +/** + * Contains the possible cases for MultiMetricCriteria. + */ +export type MultiMetricCriteriaUnion = MultiMetricCriteria | MetricCriteria | DynamicMetricCriteria; + +/** + * @interface + * An interface representing MultiMetricCriteria. + * The types of conditions for a multi resource alert. + * + */ +export interface MultiMetricCriteria { + /** + * @member {string} criterionType Polymorphic Discriminator + */ + criterionType: "MultiMetricCriteria"; + /** + * @member {string} name Name of the criteria. + */ + name: string; + /** + * @member {string} metricName Name of the metric. + */ + metricName: string; + /** + * @member {string} [metricNamespace] Namespace of the metric. + */ + metricNamespace?: string; + /** + * @member {any} timeAggregation the criteria time aggregation types. + */ + timeAggregation: any; + /** + * @member {MetricDimension[]} [dimensions] List of dimension conditions. + */ + dimensions?: MetricDimension[]; + /** + * @property Describes unknown properties. The value of an unknown property + * can be of "any" type. + */ + [property: string]: any; +} + +/** + * @interface + * An interface representing MetricCriteria. + * Criterion to filter metrics. + * + */ +export interface MetricCriteria { + /** + * @member {string} criterionType Polymorphic Discriminator + */ + criterionType: "StaticThresholdCriterion"; + /** + * @member {string} name Name of the criteria. + */ + name: string; + /** + * @member {string} metricName Name of the metric. + */ + metricName: string; + /** + * @member {string} [metricNamespace] Namespace of the metric. + */ + metricNamespace?: string; + /** + * @member {any} timeAggregation the criteria time aggregation types. + */ + timeAggregation: any; + /** + * @member {MetricDimension[]} [dimensions] List of dimension conditions. + */ + dimensions?: MetricDimension[]; + /** + * @member {any} operator the criteria operator. + */ + operator: any; + /** + * @member {number} threshold the criteria threshold value that activates the + * alert. + */ + threshold: number; +} + +/** + * @interface + * An interface representing MetricAlertSingleResourceMultipleMetricCriteria. + * Specifies the metric alert criteria for a single resource that has multiple + * metric criteria. + * + */ +export interface MetricAlertSingleResourceMultipleMetricCriteria { + /** + * @member {string} odatatype Polymorphic Discriminator + */ + odatatype: "Microsoft.Azure.Monitor.SingleResourceMultipleMetricCriteria"; + /** + * @member {MetricCriteria[]} [allOf] The list of metric criteria for this + * 'all of' operation. + */ + allOf?: MetricCriteria[]; +} + +/** + * @interface + * An interface representing MetricDimension. + * Specifies a metric dimension. + * + */ +export interface MetricDimension { + /** + * @member {string} name Name of the dimension. + */ + name: string; + /** + * @member {string} operator the dimension operator. Only 'Include' and + * 'Exclude' are supported + */ + operator: string; + /** + * @member {string[]} values list of dimension values. + */ + values: string[]; +} + +/** + * @interface + * An interface representing MetricAlertMultipleResourceMultipleMetricCriteria. + * Specifies the metric alert criteria for multiple resource that has multiple + * metric criteria. + * + */ +export interface MetricAlertMultipleResourceMultipleMetricCriteria { + /** + * @member {string} odatatype Polymorphic Discriminator + */ + odatatype: "Microsoft.Azure.Monitor.MultipleResourceMultipleMetricCriteria"; + /** + * @member {MultiMetricCriteriaUnion[]} [allOf] the list of multiple metric + * criteria for this 'all of' operation. + */ + allOf?: MultiMetricCriteriaUnion[]; +} + +/** + * @interface + * An interface representing DynamicThresholdFailingPeriods. + * The minimum number of violations required within the selected lookback time + * window required to raise an alert. + * + */ +export interface DynamicThresholdFailingPeriods { + /** + * @member {number} numberOfEvaluationPeriods 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; + /** + * @member {number} minFailingPeriodsToAlert The number of violations to + * trigger an alert. Should be smaller or equal to numberOfEvaluationPeriods. + */ + minFailingPeriodsToAlert: number; +} + +/** + * @interface + * An interface representing DynamicMetricCriteria. + * Criterion for dynamic threshold. + * + */ +export interface DynamicMetricCriteria { + /** + * @member {string} criterionType Polymorphic Discriminator + */ + criterionType: "DynamicThresholdCriterion"; + /** + * @member {string} name Name of the criteria. + */ + name: string; + /** + * @member {string} metricName Name of the metric. + */ + metricName: string; + /** + * @member {string} [metricNamespace] Namespace of the metric. + */ + metricNamespace?: string; + /** + * @member {any} timeAggregation the criteria time aggregation types. + */ + timeAggregation: any; + /** + * @member {MetricDimension[]} [dimensions] List of dimension conditions. + */ + dimensions?: MetricDimension[]; + /** + * @member {any} operator The operator used to compare the metric value + * against the threshold. + */ + operator: any; + /** + * @member {any} alertSensitivity The extent of deviation required to trigger + * an alert. This will affect how tight the threshold is to the metric series + * pattern. + */ + alertSensitivity: any; + /** + * @member {DynamicThresholdFailingPeriods} failingPeriods The minimum number + * of violations required within the selected lookback time window required + * to raise an alert. + */ + failingPeriods: DynamicThresholdFailingPeriods; + /** + * @member {Date} [ignoreDataBefore] 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; +} + +/** + * @interface + * An interface representing Source. + * Specifies the log search query. + * + */ +export interface Source { + /** + * @member {string} [query] Log search query. Required for action type - + * AlertingAction + */ + query?: string; + /** + * @member {string[]} [authorizedResources] List of Resource referred into + * query + */ + authorizedResources?: string[]; + /** + * @member {string} dataSourceId The resource uri over which log search query + * is to be run. + */ + dataSourceId: string; + /** + * @member {QueryType} [queryType] Set value to 'ResultCount'. Possible + * values include: 'ResultCount' + */ + queryType?: QueryType; +} + +/** + * @interface + * An interface representing Schedule. + * Defines how often to run the search and the time interval. + * + */ +export interface Schedule { + /** + * @member {number} frequencyInMinutes frequency (in minutes) at which rule + * condition should be evaluated. + */ + frequencyInMinutes: number; + /** + * @member {number} timeWindowInMinutes 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; + +/** + * @interface + * An interface representing Action. + * Action descriptor. + * + */ +export interface Action { + /** + * @member {string} odatatype Polymorphic Discriminator + */ + odatatype: "Action"; +} + +/** + * @interface + * An interface representing LogSearchRuleResource. + * The Log Search Rule resource. + * + * @extends Resource + */ +export interface LogSearchRuleResource extends Resource { + /** + * @member {string} [description] The description of the Log Search rule. + */ + description?: string; + /** + * @member {Enabled} [enabled] The flag which indicates whether the Log + * Search rule is enabled. Value should be true or false. Possible values + * include: 'true', 'false' + */ + enabled?: Enabled; + /** + * @member {Date} [lastUpdatedTime] 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; + /** + * @member {ProvisioningState} [provisioningState] 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; + /** + * @member {Source} source Data Source against which rule will Query Data + */ + source: Source; + /** + * @member {Schedule} [schedule] Schedule (Frequency, Time Window) for rule. + * Required for action type - AlertingAction + */ + schedule?: Schedule; + /** + * @member {ActionUnion} action Action needs to be taken on rule execution. + */ + action: ActionUnion; +} + +/** + * @interface + * An interface representing LogSearchRuleResourcePatch. + * The log search rule resource for patch operations. + * + */ +export interface LogSearchRuleResourcePatch { + /** + * @member {{ [propertyName: string]: string }} [tags] Resource tags + */ + tags?: { [propertyName: string]: string }; + /** + * @member {Enabled} [enabled] The flag which indicates whether the Log + * Search rule is enabled. Value should be true or false. Possible values + * include: 'true', 'false' + */ + enabled?: Enabled; +} + +/** + * @interface + * An interface representing LogMetricTrigger. + * A log metrics trigger descriptor. + * + */ +export interface LogMetricTrigger { + /** + * @member {ConditionalOperator} [thresholdOperator] Evaluation operation for + * Metric -'GreaterThan' or 'LessThan' or 'Equal'. Possible values include: + * 'GreaterThan', 'LessThan', 'Equal' + */ + thresholdOperator?: ConditionalOperator; + /** + * @member {number} [threshold] The threshold of the metric trigger. + */ + threshold?: number; + /** + * @member {MetricTriggerType} [metricTriggerType] Metric Trigger Type - + * 'Consecutive' or 'Total'. Possible values include: 'Consecutive', 'Total' + */ + metricTriggerType?: MetricTriggerType; + /** + * @member {string} [metricColumn] Evaluation of metric on a particular + * column + */ + metricColumn?: string; +} + +/** + * @interface + * An interface representing TriggerCondition. + * The condition that results in the Log Search rule. + * + */ +export interface TriggerCondition { + /** + * @member {ConditionalOperator} thresholdOperator Evaluation operation for + * rule - 'GreaterThan' or 'LessThan. Possible values include: 'GreaterThan', + * 'LessThan', 'Equal' + */ + thresholdOperator: ConditionalOperator; + /** + * @member {number} threshold Result or count threshold based on which rule + * should be triggered. + */ + threshold: number; + /** + * @member {LogMetricTrigger} [metricTrigger] Trigger condition for metric + * query rule + */ + metricTrigger?: LogMetricTrigger; +} + +/** + * @interface + * An interface representing AzNsActionGroup. + * Azure action group + * + */ +export interface AzNsActionGroup { + /** + * @member {string[]} [actionGroup] Azure Action Group reference. + */ + actionGroup?: string[]; + /** + * @member {string} [emailSubject] Custom subject override for all email ids + * in Azure action group + */ + emailSubject?: string; + /** + * @member {string} [customWebhookPayload] Custom payload to be sent for all + * webhook URI in Azure action group + */ + customWebhookPayload?: string; +} + +/** + * @interface + * An interface representing AlertingAction. + * Specify action need to be taken when rule type is Alert + * + */ +export interface AlertingAction { + /** + * @member {string} odatatype Polymorphic Discriminator + */ + odatatype: "Microsoft.WindowsAzure.Management.Monitoring.Alerts.Models.Microsoft.AppInsights.Nexus.DataContracts.Resources.ScheduledQueryRules.AlertingAction"; + /** + * @member {AlertSeverity} severity Severity of the alert. Possible values + * include: '0', '1', '2', '3', '4' + */ + severity: AlertSeverity; + /** + * @member {AzNsActionGroup} [aznsAction] Azure action group reference. + */ + aznsAction?: AzNsActionGroup; + /** + * @member {number} [throttlingInMin] time (in minutes) for which Alerts + * should be throttled or suppressed. + */ + throttlingInMin?: number; + /** + * @member {TriggerCondition} trigger The trigger condition that results in + * the alert rule being. + */ + trigger: TriggerCondition; +} + +/** + * @interface + * An interface representing Dimension. + * Specifies the criteria for converting log to metric. + * + */ +export interface Dimension { + /** + * @member {string} name Name of the dimension + */ + name: string; + /** + * @member {string[]} values List of dimension values + */ + values: string[]; +} + +/** + * @interface + * An interface representing Criteria. + * Specifies the criteria for converting log to metric. + * + */ +export interface Criteria { + /** + * @member {string} metricName Name of the metric + */ + metricName: string; + /** + * @member {Dimension[]} [dimensions] List of Dimensions for creating metric + */ + dimensions?: Dimension[]; +} + +/** + * @interface + * An interface representing LogToMetricAction. + * Specify action need to be taken when rule type is converting log to metric + * + */ +export interface LogToMetricAction { + /** + * @member {string} odatatype Polymorphic Discriminator + */ + odatatype: "Microsoft.WindowsAzure.Management.Monitoring.Alerts.Models.Microsoft.AppInsights.Nexus.DataContracts.Resources.ScheduledQueryRules.LogToMetricAction"; + /** + * @member {Criteria[]} criteria Criteria of Metric + */ + criteria: Criteria[]; +} + +/** + * @interface + * An interface representing MetricNamespaceName. + * The fully qualified metric namespace name. + * + */ +export interface MetricNamespaceName { + /** + * @member {string} [metricNamespaceName] The metric namespace name. + */ + metricNamespaceName?: string; +} + +/** + * @interface + * An interface representing MetricNamespace. + * Metric namespace class specifies the metadata for a metric namespace. + * + */ +export interface MetricNamespace { + /** + * @member {string} [id] The ID of the metricNamespace. + */ + id?: string; + /** + * @member {string} [type] The type of the namespace. + */ + type?: string; + /** + * @member {string} [name] The name of the namespace. + */ + name?: string; + /** + * @member {MetricNamespaceName} [properties] Properties which include the + * fully qualified namespace name. + */ + properties?: MetricNamespaceName; +} + +/** + * @interface + * An interface representing ProxyResource. + * An azure resource object + * + * @extends BaseResource + */ +export interface ProxyResource extends BaseResource { + /** + * @member {string} [id] Azure resource Id + * **NOTE: This property will not be serialized. It can only be populated by + * the server.** + */ + readonly id?: string; + /** + * @member {string} [name] Azure resource name + * **NOTE: This property will not be serialized. It can only be populated by + * the server.** + */ + readonly name?: string; + /** + * @member {string} [type] Azure resource type + * **NOTE: This property will not be serialized. It can only be populated by + * the server.** + */ + readonly type?: string; +} + +/** + * @interface + * An interface representing ErrorModel. + * Error details. + * + */ +export interface ErrorModel { + /** + * @member {string} code Error code identifying the specific error. + */ + code: string; + /** + * @member {string} [message] Error message in the caller's locale. + */ + message?: string; +} + +/** + * @interface + * An interface representing ResponseWithError. + * An error response from the API. + * + */ +export interface ResponseWithError { + /** + * @member {ErrorModel} error Error information. + */ + error: ErrorModel; +} + +/** + * @interface + * An interface representing WorkspaceInfo. + * Information about a Log Analytics Workspace. + * + */ +export interface WorkspaceInfo { + /** + * @member {string} id Azure Resource Manager identifier of the Log Analytics + * Workspace. + */ + id: string; + /** + * @member {string} location Location of the Log Analytics workspace. + */ + location: string; + /** + * @member {string} customerId Log Analytics workspace identifier. + */ + customerId: string; +} + +/** + * @interface + * An interface representing DataContainer. + * Information about a container with data for a given resource. + * + */ +export interface DataContainer { + /** + * @member {WorkspaceInfo} workspace Log Analytics workspace information. + */ + workspace: WorkspaceInfo; +} + +/** + * @interface + * An interface representing VMInsightsOnboardingStatus. + * VM Insights onboarding status for a resource. + * + * @extends ProxyResource + */ +export interface VMInsightsOnboardingStatus extends ProxyResource { + /** + * @member {string} resourceId Azure Resource Manager identifier of the + * resource whose onboarding status is being represented. + */ + resourceId: string; + /** + * @member {OnboardingStatus} onboardingStatus 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; + /** + * @member {DataStatus} dataStatus 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; + /** + * @member {DataContainer[]} [data] Containers that currently store VM + * Insights data for the specified resource. + */ + data?: DataContainer[]; +} + +/** + * @interface + * An interface representing ActivityLogsListOptionalParams. + * Optional Parameters. + * + * @extends RequestOptionsBase + */ +export interface ActivityLogsListOptionalParams extends msRest.RequestOptionsBase { + /** + * @member {string} [filter] Reduces the set of data collected.
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. + */ + filter?: string; + /** + * @member {string} [select] 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; +} + +/** + * @interface + * An interface representing TenantActivityLogsListOptionalParams. + * Optional Parameters. + * + * @extends RequestOptionsBase + */ +export interface TenantActivityLogsListOptionalParams extends msRest.RequestOptionsBase { + /** + * @member {string} [filter] 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; + /** + * @member {string} [select] 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; +} + +/** + * @interface + * An interface representing MetricDefinitionsListOptionalParams. + * Optional Parameters. + * + * @extends RequestOptionsBase + */ +export interface MetricDefinitionsListOptionalParams extends msRest.RequestOptionsBase { + /** + * @member {string} [metricnamespace] Metric namespace to query metric + * definitions for. + */ + metricnamespace?: string; +} + +/** + * @interface + * An interface representing MetricsListOptionalParams. + * Optional Parameters. + * + * @extends RequestOptionsBase + */ +export interface MetricsListOptionalParams extends msRest.RequestOptionsBase { + /** + * @member {string} [timespan] The timespan of the query. It is a string with + * the following format 'startDateTime_ISO/endDateTime_ISO'. + */ + timespan?: string; + /** + * @member {string} [interval] The interval (i.e. timegrain) of the query. + */ + interval?: string; + /** + * @member {string} [metricnames] The names of the metrics (comma separated) + * to retrieve. + */ + metricnames?: string; + /** + * @member {string} [aggregation] The list of aggregation types (comma + * separated) to retrieve. + */ + aggregation?: string; + /** + * @member {number} [top] The maximum number of records to retrieve. + * Valid only if $filter is specified. + * Defaults to 10. + */ + top?: number; + /** + * @member {string} [orderby] The aggregation to use for sorting results and + * the direction of the sort. + * Only one order can be specified. + * Examples: sum asc. + */ + orderby?: string; + /** + * @member {string} [filter] 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; + /** + * @member {ResultType} [resultType] 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; + /** + * @member {string} [metricnamespace] Metric namespace to query metric + * definitions for. + */ + metricnamespace?: string; +} + +/** + * @interface + * An interface representing MetricBaselineGetOptionalParams. + * Optional Parameters. + * + * @extends RequestOptionsBase + */ +export interface MetricBaselineGetOptionalParams extends msRest.RequestOptionsBase { + /** + * @member {string} [timespan] The timespan of the query. It is a string with + * the following format 'startDateTime_ISO/endDateTime_ISO'. + */ + timespan?: string; + /** + * @member {string} [interval] The interval (i.e. timegrain) of the query. + */ + interval?: string; + /** + * @member {string} [aggregation] The aggregation type of the metric to + * retrieve the baseline for. + */ + aggregation?: string; + /** + * @member {string} [sensitivities] The list of sensitivities (comma + * separated) to retrieve. + */ + sensitivities?: string; + /** + * @member {ResultType} [resultType] Allows retrieving only metadata of the + * baseline. On data request all information is retrieved. Possible values + * include: 'Data', 'Metadata' + */ + resultType?: ResultType; +} + +/** + * @interface + * An interface representing BaselinesListOptionalParams. + * Optional Parameters. + * + * @extends RequestOptionsBase + */ +export interface BaselinesListOptionalParams extends msRest.RequestOptionsBase { + /** + * @member {string} [metricnames] The names of the metrics (comma separated) + * to retrieve. + */ + metricnames?: string; + /** + * @member {string} [metricnamespace] Metric namespace to query metric + * definitions for. + */ + metricnamespace?: string; + /** + * @member {string} [timespan] The timespan of the query. It is a string with + * the following format 'startDateTime_ISO/endDateTime_ISO'. + */ + timespan?: string; + /** + * @member {string} [interval] The interval (i.e. timegrain) of the query. + */ + interval?: string; + /** + * @member {string} [aggregation] The list of aggregation types (comma + * separated) to retrieve. + */ + aggregation?: string; + /** + * @member {string} [sensitivities] The list of sensitivities (comma + * separated) to retrieve. + */ + sensitivities?: string; + /** + * @member {string} [filter] 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; + /** + * @member {ResultType} [resultType] Allows retrieving only metadata of the + * baseline. On data request all information is retrieved. Possible values + * include: 'Data', 'Metadata' + */ + resultType?: ResultType; +} + +/** + * @interface + * An interface representing ScheduledQueryRulesListBySubscriptionOptionalParams. + * Optional Parameters. + * + * @extends RequestOptionsBase + */ +export interface ScheduledQueryRulesListBySubscriptionOptionalParams extends msRest.RequestOptionsBase { + /** + * @member {string} [filter] The filter to apply on the operation. For more + * information please see + * https://msdn.microsoft.com/en-us/library/azure/dn931934.aspx + */ + filter?: string; +} + +/** + * @interface + * An interface representing ScheduledQueryRulesListByResourceGroupOptionalParams. + * Optional Parameters. + * + * @extends RequestOptionsBase + */ +export interface ScheduledQueryRulesListByResourceGroupOptionalParams extends msRest.RequestOptionsBase { + /** + * @member {string} [filter] The filter to apply on the operation. For more + * information please see + * https://msdn.microsoft.com/en-us/library/azure/dn931934.aspx + */ + filter?: string; +} + +/** + * @interface + * An interface representing MetricNamespacesListOptionalParams. + * Optional Parameters. + * + * @extends RequestOptionsBase + */ +export interface MetricNamespacesListOptionalParams extends msRest.RequestOptionsBase { + /** + * @member {string} [startTime] The ISO 8601 conform Date start time from + * which to query for metric namespaces. + */ + startTime?: string; +} + +/** + * @interface + * An interface representing MonitorManagementClientOptions. + * @extends AzureServiceClientOptions + */ +export interface MonitorManagementClientOptions extends AzureServiceClientOptions { + /** + * @member {string} [baseUri] + */ + baseUri?: string; +} + + +/** + * @interface + * An interface representing the AutoscaleSettingResourceCollection. + * Represents a collection of autoscale setting resources. + * + * @extends Array + */ +export interface AutoscaleSettingResourceCollection extends Array { + /** + * @member {string} [nextLink] URL to get the next set of results. + */ + nextLink?: string; +} + +/** + * @interface + * An interface representing the IncidentListResult. + * The List incidents operation response. + * + * @extends Array + */ +export interface IncidentListResult extends Array { +} + +/** + * @interface + * An interface representing the AlertRuleResourceCollection. + * Represents a collection of alert rule resources. + * + * @extends Array + */ +export interface AlertRuleResourceCollection extends Array { +} + +/** + * @interface + * An interface representing the LogProfileCollection. + * Represents a collection of log profiles. + * + * @extends Array + */ +export interface LogProfileCollection extends Array { +} + +/** + * @interface + * An interface representing the ActionGroupList. + * A list of action groups. + * + * @extends Array + */ +export interface ActionGroupList extends Array { + /** + * @member {string} [nextLink] Provides the link to retrieve the next set of + * elements. + */ + nextLink?: string; +} + +/** + * @interface + * An interface representing the ActivityLogAlertList. + * A list of activity log alerts. + * + * @extends Array + */ +export interface ActivityLogAlertList extends Array { + /** + * @member {string} [nextLink] Provides the link to retrieve the next set of + * elements. + */ + nextLink?: string; +} + +/** + * @interface + * An interface representing the EventDataCollection. + * Represents collection of events. + * + * @extends Array + */ +export interface EventDataCollection extends Array { + /** + * @member {string} [nextLink] Provides the link to retrieve the next set of + * events. + */ + nextLink?: string; +} + +/** + * @interface + * An interface representing the EventCategoryCollection. + * A collection of event categories. Currently possible values are: + * Administrative, Security, ServiceHealth, Alert, Recommendation, Policy. + * + * @extends Array + */ +export interface EventCategoryCollection extends Array { +} + +/** + * @interface + * An interface representing the MetricDefinitionCollection. + * Represents collection of metric definitions. + * + * @extends Array + */ +export interface MetricDefinitionCollection extends Array { +} + +/** + * @interface + * An interface representing the MetricBaselinesResponse. + * A list of metric baselines. + * + * @extends Array + */ +export interface MetricBaselinesResponse extends Array { +} + +/** + * @interface + * An interface representing the MetricAlertResourceCollection. + * Represents a collection of alert rule resources. + * + * @extends Array + */ +export interface MetricAlertResourceCollection extends Array { +} + +/** + * @interface + * An interface representing the LogSearchRuleResourceCollection. + * Represents a collection of Log Search rule resources. + * + * @extends Array + */ +export interface LogSearchRuleResourceCollection extends Array { +} + +/** + * @interface + * An interface representing the MetricNamespaceCollection. + * 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' + * @readonly + * @enum {string} + */ +export type Unit = 'Count' | 'Bytes' | 'Seconds' | 'CountPerSecond' | 'BytesPerSecond' | 'Percent' | 'MilliSeconds' | 'ByteSeconds' | 'Unspecified'; + +/** + * 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. + */ + _response: msRest.HttpResponse & { + /** + * The response body as text (string format) + */ + bodyAsText: string; + /** + * The response body as parsed JSON or XML + */ + parsedBody: MetricAlertResourceCollection; + }; +}; + +/** + * Contains response data for the listByResourceGroup operation. + */ +export type MetricAlertsListByResourceGroupResponse = MetricAlertResourceCollection & { + /** + * 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: MetricAlertResourceCollection; + }; +}; + +/** + * 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 & { + /** + * 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 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 & { + /** + * 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 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 & { + /** + * 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 list operation. + */ +export type MetricNamespacesListResponse = MetricNamespaceCollection & { + /** + * 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: MetricNamespaceCollection; + }; +}; + +/** + * Contains response data for the getOnboardingStatus operation. + */ +export type VMInsightsGetOnboardingStatusResponse = VMInsightsOnboardingStatus & { + /** + * 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: VMInsightsOnboardingStatus; + }; +}; diff --git a/sdk/monitor/arm-monitor/lib/models/logProfilesMappers.ts b/sdk/monitor/arm-monitor/lib/models/logProfilesMappers.ts new file mode 100644 index 000000000000..d7e6e717a1db --- /dev/null +++ b/sdk/monitor/arm-monitor/lib/models/logProfilesMappers.ts @@ -0,0 +1,93 @@ +/* + * 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, + LogProfileResource, + Resource, + BaseResource, + RetentionPolicy, + ErrorResponse, + LogProfileResourcePatch, + LogProfileCollection, + AutoscaleSettingResource, + AutoscaleProfile, + ScaleCapacity, + ScaleRule, + MetricTrigger, + ScaleAction, + TimeWindow, + Recurrence, + RecurrentSchedule, + AutoscaleNotification, + EmailNotification, + WebhookNotification, + AlertRuleResource, + RuleCondition, + RuleDataSource, + RuleAction, + ProxyOnlyResource, + DiagnosticSettingsResource, + MetricSettings, + LogSettings, + DiagnosticSettingsCategoryResource, + ActionGroupResource, + EmailReceiver, + SmsReceiver, + WebhookReceiver, + ItsmReceiver, + AzureAppPushReceiver, + AutomationRunbookReceiver, + VoiceReceiver, + LogicAppReceiver, + AzureFunctionReceiver, + ArmRoleReceiver, + ActivityLogAlertResource, + ActivityLogAlertAllOfCondition, + ActivityLogAlertLeafCondition, + ActivityLogAlertActionList, + ActivityLogAlertActionGroup, + MetricAlertResource, + MetricAlertCriteria, + MetricAlertAction, + MetricAlertSingleResourceMultipleMetricCriteria, + MetricCriteria, + MultiMetricCriteria, + MetricDimension, + MetricAlertMultipleResourceMultipleMetricCriteria, + DynamicMetricCriteria, + DynamicThresholdFailingPeriods, + LogSearchRuleResource, + Source, + Schedule, + Action, + AlertingAction, + AzNsActionGroup, + TriggerCondition, + LogMetricTrigger, + LogToMetricAction, + Criteria, + Dimension, + ProxyResource, + VMInsightsOnboardingStatus, + DataContainer, + WorkspaceInfo, + RuleMetricDataSource, + RuleManagementEventDataSource, + RuleManagementEventClaimsDataSource, + ThresholdRuleCondition, + LocationThresholdRuleCondition, + ManagementEventRuleCondition, + ManagementEventAggregationCondition, + RuleEmailAction, + RuleWebhookAction +} from "../models/mappers"; + diff --git a/sdk/monitor/arm-monitor/lib/models/mappers.ts b/sdk/monitor/arm-monitor/lib/models/mappers.ts new file mode 100644 index 000000000000..687c697f94bb --- /dev/null +++ b/sdk/monitor/arm-monitor/lib/models/mappers.ts @@ -0,0 +1,5112 @@ +/* + * 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 { CloudErrorMapper, BaseResourceMapper } from "@azure/ms-rest-azure-js"; +import * as msRest from "@azure/ms-rest-js"; + +export const CloudError = CloudErrorMapper; +export const BaseResource = BaseResourceMapper; + +export const Resource: msRest.CompositeMapper = { + serializedName: "Resource", + type: { + name: "Composite", + className: "Resource", + 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", + type: { + name: "String" + } + }, + tags: { + serializedName: "tags", + type: { + name: "Dictionary", + value: { + type: { + name: "String" + } + } + } + } + } + } +}; + +export const ScaleCapacity: msRest.CompositeMapper = { + serializedName: "ScaleCapacity", + type: { + name: "Composite", + className: "ScaleCapacity", + modelProperties: { + minimum: { + required: true, + serializedName: "minimum", + type: { + name: "String" + } + }, + maximum: { + required: true, + serializedName: "maximum", + type: { + name: "String" + } + }, + default: { + required: true, + serializedName: "default", + type: { + name: "String" + } + } + } + } +}; + +export const MetricTrigger: msRest.CompositeMapper = { + serializedName: "MetricTrigger", + type: { + name: "Composite", + className: "MetricTrigger", + modelProperties: { + metricName: { + required: true, + serializedName: "metricName", + type: { + name: "String" + } + }, + metricResourceUri: { + required: true, + serializedName: "metricResourceUri", + type: { + name: "String" + } + }, + timeGrain: { + required: true, + serializedName: "timeGrain", + type: { + name: "TimeSpan" + } + }, + statistic: { + required: true, + serializedName: "statistic", + type: { + name: "Enum", + allowedValues: [ + "Average", + "Min", + "Max", + "Sum" + ] + } + }, + timeWindow: { + required: true, + serializedName: "timeWindow", + type: { + name: "TimeSpan" + } + }, + timeAggregation: { + required: true, + serializedName: "timeAggregation", + type: { + name: "Enum", + allowedValues: [ + "Average", + "Minimum", + "Maximum", + "Total", + "Count", + "Last" + ] + } + }, + operator: { + required: true, + serializedName: "operator", + type: { + name: "Enum", + allowedValues: [ + "Equals", + "NotEquals", + "GreaterThan", + "GreaterThanOrEqual", + "LessThan", + "LessThanOrEqual" + ] + } + }, + threshold: { + required: true, + serializedName: "threshold", + type: { + name: "Number" + } + } + } + } +}; + +export const ScaleAction: msRest.CompositeMapper = { + serializedName: "ScaleAction", + type: { + name: "Composite", + className: "ScaleAction", + modelProperties: { + direction: { + required: true, + serializedName: "direction", + type: { + name: "Enum", + allowedValues: [ + "None", + "Increase", + "Decrease" + ] + } + }, + type: { + required: true, + serializedName: "type", + type: { + name: "Enum", + allowedValues: [ + "ChangeCount", + "PercentChangeCount", + "ExactCount" + ] + } + }, + value: { + serializedName: "value", + defaultValue: '1', + type: { + name: "String" + } + }, + cooldown: { + required: true, + serializedName: "cooldown", + type: { + name: "TimeSpan" + } + } + } + } +}; + +export const ScaleRule: msRest.CompositeMapper = { + serializedName: "ScaleRule", + type: { + name: "Composite", + className: "ScaleRule", + modelProperties: { + metricTrigger: { + required: true, + serializedName: "metricTrigger", + type: { + name: "Composite", + className: "MetricTrigger" + } + }, + scaleAction: { + required: true, + serializedName: "scaleAction", + type: { + name: "Composite", + className: "ScaleAction" + } + } + } + } +}; + +export const TimeWindow: msRest.CompositeMapper = { + serializedName: "TimeWindow", + type: { + name: "Composite", + className: "TimeWindow", + modelProperties: { + timeZone: { + serializedName: "timeZone", + type: { + name: "String" + } + }, + start: { + required: true, + serializedName: "start", + type: { + name: "DateTime" + } + }, + end: { + required: true, + serializedName: "end", + type: { + name: "DateTime" + } + } + } + } +}; + +export const RecurrentSchedule: msRest.CompositeMapper = { + serializedName: "RecurrentSchedule", + type: { + name: "Composite", + className: "RecurrentSchedule", + modelProperties: { + timeZone: { + required: true, + serializedName: "timeZone", + type: { + name: "String" + } + }, + days: { + required: true, + serializedName: "days", + type: { + name: "Sequence", + element: { + type: { + name: "String" + } + } + } + }, + hours: { + required: true, + serializedName: "hours", + type: { + name: "Sequence", + element: { + type: { + name: "Number" + } + } + } + }, + minutes: { + required: true, + serializedName: "minutes", + type: { + name: "Sequence", + element: { + type: { + name: "Number" + } + } + } + } + } + } +}; + +export const Recurrence: msRest.CompositeMapper = { + serializedName: "Recurrence", + type: { + name: "Composite", + className: "Recurrence", + modelProperties: { + frequency: { + required: true, + serializedName: "frequency", + type: { + name: "Enum", + allowedValues: [ + "None", + "Second", + "Minute", + "Hour", + "Day", + "Week", + "Month", + "Year" + ] + } + }, + schedule: { + required: true, + serializedName: "schedule", + type: { + name: "Composite", + className: "RecurrentSchedule" + } + } + } + } +}; + +export const AutoscaleProfile: msRest.CompositeMapper = { + serializedName: "AutoscaleProfile", + type: { + name: "Composite", + className: "AutoscaleProfile", + modelProperties: { + name: { + required: true, + serializedName: "name", + type: { + name: "String" + } + }, + capacity: { + required: true, + serializedName: "capacity", + type: { + name: "Composite", + className: "ScaleCapacity" + } + }, + rules: { + required: true, + serializedName: "rules", + type: { + name: "Sequence", + element: { + type: { + name: "Composite", + className: "ScaleRule" + } + } + } + }, + fixedDate: { + serializedName: "fixedDate", + type: { + name: "Composite", + className: "TimeWindow" + } + }, + recurrence: { + serializedName: "recurrence", + type: { + name: "Composite", + className: "Recurrence" + } + } + } + } +}; + +export const EmailNotification: msRest.CompositeMapper = { + serializedName: "EmailNotification", + type: { + name: "Composite", + className: "EmailNotification", + modelProperties: { + sendToSubscriptionAdministrator: { + serializedName: "sendToSubscriptionAdministrator", + type: { + name: "Boolean" + } + }, + sendToSubscriptionCoAdministrators: { + serializedName: "sendToSubscriptionCoAdministrators", + type: { + name: "Boolean" + } + }, + customEmails: { + serializedName: "customEmails", + type: { + name: "Sequence", + element: { + type: { + name: "String" + } + } + } + } + } + } +}; + +export const WebhookNotification: msRest.CompositeMapper = { + serializedName: "WebhookNotification", + type: { + name: "Composite", + className: "WebhookNotification", + modelProperties: { + serviceUri: { + serializedName: "serviceUri", + type: { + name: "String" + } + }, + properties: { + serializedName: "properties", + type: { + name: "Dictionary", + value: { + type: { + name: "String" + } + } + } + } + } + } +}; + +export const AutoscaleNotification: msRest.CompositeMapper = { + serializedName: "AutoscaleNotification", + type: { + name: "Composite", + className: "AutoscaleNotification", + modelProperties: { + operation: { + required: true, + isConstant: true, + serializedName: "operation", + defaultValue: 'Scale', + type: { + name: "String" + } + }, + email: { + serializedName: "email", + type: { + name: "Composite", + className: "EmailNotification" + } + }, + webhooks: { + serializedName: "webhooks", + type: { + name: "Sequence", + element: { + type: { + name: "Composite", + className: "WebhookNotification" + } + } + } + } + } + } +}; + +export const AutoscaleSettingResource: msRest.CompositeMapper = { + serializedName: "AutoscaleSettingResource", + type: { + name: "Composite", + className: "AutoscaleSettingResource", + modelProperties: { + ...Resource.type.modelProperties, + profiles: { + required: true, + serializedName: "properties.profiles", + constraints: { + MaxItems: 20 + }, + type: { + name: "Sequence", + element: { + type: { + name: "Composite", + className: "AutoscaleProfile" + } + } + } + }, + notifications: { + serializedName: "properties.notifications", + type: { + name: "Sequence", + element: { + type: { + name: "Composite", + className: "AutoscaleNotification" + } + } + } + }, + enabled: { + serializedName: "properties.enabled", + defaultValue: true, + type: { + name: "Boolean" + } + }, + autoscaleSettingResourceName: { + serializedName: "properties.name", + type: { + name: "String" + } + }, + targetResourceUri: { + serializedName: "properties.targetResourceUri", + type: { + name: "String" + } + } + } + } +}; + +export const AutoscaleSettingResourcePatch: msRest.CompositeMapper = { + serializedName: "AutoscaleSettingResourcePatch", + type: { + name: "Composite", + className: "AutoscaleSettingResourcePatch", + modelProperties: { + tags: { + serializedName: "tags", + type: { + name: "Dictionary", + value: { + type: { + name: "String" + } + } + } + }, + profiles: { + required: true, + serializedName: "properties.profiles", + constraints: { + MaxItems: 20 + }, + type: { + name: "Sequence", + element: { + type: { + name: "Composite", + className: "AutoscaleProfile" + } + } + } + }, + notifications: { + serializedName: "properties.notifications", + type: { + name: "Sequence", + element: { + type: { + name: "Composite", + className: "AutoscaleNotification" + } + } + } + }, + enabled: { + serializedName: "properties.enabled", + defaultValue: true, + type: { + name: "Boolean" + } + }, + name: { + serializedName: "properties.name", + type: { + name: "String" + } + }, + targetResourceUri: { + serializedName: "properties.targetResourceUri", + type: { + name: "String" + } + } + } + } +}; + +export const ErrorResponse: msRest.CompositeMapper = { + serializedName: "ErrorResponse", + type: { + name: "Composite", + className: "ErrorResponse", + modelProperties: { + code: { + serializedName: "code", + type: { + name: "String" + } + }, + message: { + serializedName: "message", + type: { + name: "String" + } + } + } + } +}; + +export const OperationDisplay: msRest.CompositeMapper = { + serializedName: "Operation_display", + type: { + name: "Composite", + className: "OperationDisplay", + modelProperties: { + provider: { + serializedName: "provider", + type: { + name: "String" + } + }, + resource: { + serializedName: "resource", + type: { + name: "String" + } + }, + operation: { + serializedName: "operation", + type: { + name: "String" + } + } + } + } +}; + +export const Operation: msRest.CompositeMapper = { + serializedName: "Operation", + type: { + name: "Composite", + className: "Operation", + modelProperties: { + name: { + serializedName: "name", + type: { + name: "String" + } + }, + display: { + serializedName: "display", + type: { + name: "Composite", + className: "OperationDisplay" + } + } + } + } +}; + +export const OperationListResult: msRest.CompositeMapper = { + serializedName: "OperationListResult", + type: { + name: "Composite", + className: "OperationListResult", + modelProperties: { + value: { + serializedName: "value", + type: { + name: "Sequence", + element: { + type: { + name: "Composite", + className: "Operation" + } + } + } + }, + nextLink: { + serializedName: "nextLink", + type: { + name: "String" + } + } + } + } +}; + +export const Incident: msRest.CompositeMapper = { + serializedName: "Incident", + type: { + name: "Composite", + className: "Incident", + modelProperties: { + name: { + readOnly: true, + serializedName: "name", + type: { + name: "String" + } + }, + ruleName: { + readOnly: true, + serializedName: "ruleName", + type: { + name: "String" + } + }, + isActive: { + readOnly: true, + serializedName: "isActive", + type: { + name: "Boolean" + } + }, + activatedTime: { + readOnly: true, + serializedName: "activatedTime", + type: { + name: "DateTime" + } + }, + resolvedTime: { + readOnly: true, + serializedName: "resolvedTime", + type: { + name: "DateTime" + } + } + } + } +}; + +export const RuleDataSource: msRest.CompositeMapper = { + serializedName: "RuleDataSource", + type: { + name: "Composite", + polymorphicDiscriminator: { + serializedName: "odata.type", + clientName: "odatatype" + }, + uberParent: "RuleDataSource", + className: "RuleDataSource", + modelProperties: { + resourceUri: { + serializedName: "resourceUri", + type: { + name: "String" + } + }, + odatatype: { + required: true, + serializedName: "odata\\.type", + type: { + name: "String" + } + } + } + } +}; + +export const RuleCondition: msRest.CompositeMapper = { + serializedName: "RuleCondition", + type: { + name: "Composite", + polymorphicDiscriminator: { + serializedName: "odata.type", + clientName: "odatatype" + }, + uberParent: "RuleCondition", + className: "RuleCondition", + modelProperties: { + dataSource: { + serializedName: "dataSource", + type: { + name: "Composite", + className: "RuleDataSource" + } + }, + odatatype: { + required: true, + serializedName: "odata\\.type", + type: { + name: "String" + } + } + } + } +}; + +export const RuleMetricDataSource: msRest.CompositeMapper = { + serializedName: "Microsoft.Azure.Management.Insights.Models.RuleMetricDataSource", + type: { + name: "Composite", + polymorphicDiscriminator: RuleDataSource.type.polymorphicDiscriminator, + uberParent: "RuleDataSource", + className: "RuleMetricDataSource", + modelProperties: { + ...RuleDataSource.type.modelProperties, + metricName: { + serializedName: "metricName", + type: { + name: "String" + } + } + } + } +}; + +export const RuleManagementEventClaimsDataSource: msRest.CompositeMapper = { + serializedName: "RuleManagementEventClaimsDataSource", + type: { + name: "Composite", + className: "RuleManagementEventClaimsDataSource", + modelProperties: { + emailAddress: { + serializedName: "emailAddress", + type: { + name: "String" + } + } + } + } +}; + +export const RuleManagementEventDataSource: msRest.CompositeMapper = { + serializedName: "Microsoft.Azure.Management.Insights.Models.RuleManagementEventDataSource", + type: { + name: "Composite", + polymorphicDiscriminator: RuleDataSource.type.polymorphicDiscriminator, + uberParent: "RuleDataSource", + className: "RuleManagementEventDataSource", + modelProperties: { + ...RuleDataSource.type.modelProperties, + eventName: { + serializedName: "eventName", + type: { + name: "String" + } + }, + eventSource: { + serializedName: "eventSource", + type: { + name: "String" + } + }, + level: { + serializedName: "level", + type: { + name: "String" + } + }, + operationName: { + serializedName: "operationName", + type: { + name: "String" + } + }, + resourceGroupName: { + serializedName: "resourceGroupName", + type: { + name: "String" + } + }, + resourceProviderName: { + serializedName: "resourceProviderName", + type: { + name: "String" + } + }, + status: { + serializedName: "status", + type: { + name: "String" + } + }, + subStatus: { + serializedName: "subStatus", + type: { + name: "String" + } + }, + claims: { + serializedName: "claims", + type: { + name: "Composite", + className: "RuleManagementEventClaimsDataSource" + } + } + } + } +}; + +export const ThresholdRuleCondition: msRest.CompositeMapper = { + serializedName: "Microsoft.Azure.Management.Insights.Models.ThresholdRuleCondition", + type: { + name: "Composite", + polymorphicDiscriminator: RuleCondition.type.polymorphicDiscriminator, + uberParent: "RuleCondition", + className: "ThresholdRuleCondition", + modelProperties: { + ...RuleCondition.type.modelProperties, + operator: { + required: true, + serializedName: "operator", + type: { + name: "Enum", + allowedValues: [ + "GreaterThan", + "GreaterThanOrEqual", + "LessThan", + "LessThanOrEqual" + ] + } + }, + threshold: { + required: true, + serializedName: "threshold", + type: { + name: "Number" + } + }, + windowSize: { + serializedName: "windowSize", + type: { + name: "TimeSpan" + } + }, + timeAggregation: { + serializedName: "timeAggregation", + type: { + name: "Enum", + allowedValues: [ + "Average", + "Minimum", + "Maximum", + "Total", + "Last" + ] + } + } + } + } +}; + +export const LocationThresholdRuleCondition: msRest.CompositeMapper = { + serializedName: "Microsoft.Azure.Management.Insights.Models.LocationThresholdRuleCondition", + type: { + name: "Composite", + polymorphicDiscriminator: RuleCondition.type.polymorphicDiscriminator, + uberParent: "RuleCondition", + className: "LocationThresholdRuleCondition", + modelProperties: { + ...RuleCondition.type.modelProperties, + windowSize: { + serializedName: "windowSize", + type: { + name: "TimeSpan" + } + }, + failedLocationCount: { + required: true, + serializedName: "failedLocationCount", + constraints: { + InclusiveMinimum: 0 + }, + type: { + name: "Number" + } + } + } + } +}; + +export const ManagementEventAggregationCondition: msRest.CompositeMapper = { + serializedName: "ManagementEventAggregationCondition", + type: { + name: "Composite", + className: "ManagementEventAggregationCondition", + modelProperties: { + operator: { + serializedName: "operator", + type: { + name: "Enum", + allowedValues: [ + "GreaterThan", + "GreaterThanOrEqual", + "LessThan", + "LessThanOrEqual" + ] + } + }, + threshold: { + serializedName: "threshold", + type: { + name: "Number" + } + }, + windowSize: { + serializedName: "windowSize", + type: { + name: "TimeSpan" + } + } + } + } +}; + +export const ManagementEventRuleCondition: msRest.CompositeMapper = { + serializedName: "Microsoft.Azure.Management.Insights.Models.ManagementEventRuleCondition", + type: { + name: "Composite", + polymorphicDiscriminator: RuleCondition.type.polymorphicDiscriminator, + uberParent: "RuleCondition", + className: "ManagementEventRuleCondition", + modelProperties: { + ...RuleCondition.type.modelProperties, + aggregation: { + serializedName: "aggregation", + type: { + name: "Composite", + className: "ManagementEventAggregationCondition" + } + } + } + } +}; + +export const RuleAction: msRest.CompositeMapper = { + serializedName: "RuleAction", + type: { + name: "Composite", + polymorphicDiscriminator: { + serializedName: "odata.type", + clientName: "odatatype" + }, + uberParent: "RuleAction", + className: "RuleAction", + modelProperties: { + odatatype: { + required: true, + serializedName: "odata\\.type", + type: { + name: "String" + } + } + } + } +}; + +export const RuleEmailAction: msRest.CompositeMapper = { + serializedName: "Microsoft.Azure.Management.Insights.Models.RuleEmailAction", + type: { + name: "Composite", + polymorphicDiscriminator: RuleAction.type.polymorphicDiscriminator, + uberParent: "RuleAction", + className: "RuleEmailAction", + modelProperties: { + ...RuleAction.type.modelProperties, + sendToServiceOwners: { + serializedName: "sendToServiceOwners", + type: { + name: "Boolean" + } + }, + customEmails: { + serializedName: "customEmails", + type: { + name: "Sequence", + element: { + type: { + name: "String" + } + } + } + } + } + } +}; + +export const RuleWebhookAction: msRest.CompositeMapper = { + serializedName: "Microsoft.Azure.Management.Insights.Models.RuleWebhookAction", + type: { + name: "Composite", + polymorphicDiscriminator: RuleAction.type.polymorphicDiscriminator, + uberParent: "RuleAction", + className: "RuleWebhookAction", + modelProperties: { + ...RuleAction.type.modelProperties, + serviceUri: { + serializedName: "serviceUri", + type: { + name: "String" + } + }, + properties: { + serializedName: "properties", + type: { + name: "Dictionary", + value: { + type: { + name: "String" + } + } + } + } + } + } +}; + +export const AlertRuleResource: msRest.CompositeMapper = { + serializedName: "AlertRuleResource", + type: { + name: "Composite", + className: "AlertRuleResource", + modelProperties: { + ...Resource.type.modelProperties, + alertRuleResourceName: { + required: true, + serializedName: "properties.name", + type: { + name: "String" + } + }, + description: { + serializedName: "properties.description", + type: { + name: "String" + } + }, + isEnabled: { + required: true, + serializedName: "properties.isEnabled", + type: { + name: "Boolean" + } + }, + condition: { + required: true, + serializedName: "properties.condition", + type: { + name: "Composite", + className: "RuleCondition" + } + }, + actions: { + serializedName: "properties.actions", + type: { + name: "Sequence", + element: { + type: { + name: "Composite", + className: "RuleAction" + } + } + } + }, + lastUpdatedTime: { + readOnly: true, + serializedName: "properties.lastUpdatedTime", + type: { + name: "DateTime" + } + } + } + } +}; + +export const AlertRuleResourcePatch: msRest.CompositeMapper = { + serializedName: "AlertRuleResourcePatch", + type: { + name: "Composite", + className: "AlertRuleResourcePatch", + modelProperties: { + tags: { + serializedName: "tags", + type: { + name: "Dictionary", + value: { + type: { + name: "String" + } + } + } + }, + name: { + required: true, + serializedName: "properties.name", + type: { + name: "String" + } + }, + description: { + serializedName: "properties.description", + type: { + name: "String" + } + }, + isEnabled: { + required: true, + serializedName: "properties.isEnabled", + type: { + name: "Boolean" + } + }, + condition: { + required: true, + serializedName: "properties.condition", + type: { + name: "Composite", + className: "RuleCondition" + } + }, + actions: { + serializedName: "properties.actions", + type: { + name: "Sequence", + element: { + type: { + name: "Composite", + className: "RuleAction" + } + } + } + }, + lastUpdatedTime: { + readOnly: true, + serializedName: "properties.lastUpdatedTime", + type: { + name: "DateTime" + } + } + } + } +}; + +export const RetentionPolicy: msRest.CompositeMapper = { + serializedName: "RetentionPolicy", + type: { + name: "Composite", + className: "RetentionPolicy", + modelProperties: { + enabled: { + required: true, + serializedName: "enabled", + type: { + name: "Boolean" + } + }, + days: { + required: true, + serializedName: "days", + constraints: { + InclusiveMinimum: 0 + }, + type: { + name: "Number" + } + } + } + } +}; + +export const LogProfileResource: msRest.CompositeMapper = { + serializedName: "LogProfileResource", + type: { + name: "Composite", + className: "LogProfileResource", + modelProperties: { + ...Resource.type.modelProperties, + storageAccountId: { + serializedName: "properties.storageAccountId", + type: { + name: "String" + } + }, + serviceBusRuleId: { + serializedName: "properties.serviceBusRuleId", + type: { + name: "String" + } + }, + locations: { + required: true, + serializedName: "properties.locations", + type: { + name: "Sequence", + element: { + type: { + name: "String" + } + } + } + }, + categories: { + required: true, + serializedName: "properties.categories", + type: { + name: "Sequence", + element: { + type: { + name: "String" + } + } + } + }, + retentionPolicy: { + required: true, + serializedName: "properties.retentionPolicy", + type: { + name: "Composite", + className: "RetentionPolicy" + } + } + } + } +}; + +export const LogProfileResourcePatch: msRest.CompositeMapper = { + serializedName: "LogProfileResourcePatch", + type: { + name: "Composite", + className: "LogProfileResourcePatch", + modelProperties: { + tags: { + serializedName: "tags", + type: { + name: "Dictionary", + value: { + type: { + name: "String" + } + } + } + }, + storageAccountId: { + serializedName: "properties.storageAccountId", + type: { + name: "String" + } + }, + serviceBusRuleId: { + serializedName: "properties.serviceBusRuleId", + type: { + name: "String" + } + }, + locations: { + required: true, + serializedName: "properties.locations", + type: { + name: "Sequence", + element: { + type: { + name: "String" + } + } + } + }, + categories: { + required: true, + serializedName: "properties.categories", + type: { + name: "Sequence", + element: { + type: { + name: "String" + } + } + } + }, + retentionPolicy: { + required: true, + serializedName: "properties.retentionPolicy", + type: { + name: "Composite", + className: "RetentionPolicy" + } + } + } + } +}; + +export const ProxyOnlyResource: msRest.CompositeMapper = { + serializedName: "ProxyOnlyResource", + type: { + name: "Composite", + className: "ProxyOnlyResource", + modelProperties: { + id: { + readOnly: true, + serializedName: "id", + type: { + name: "String" + } + }, + name: { + readOnly: true, + serializedName: "name", + type: { + name: "String" + } + }, + type: { + readOnly: true, + serializedName: "type", + type: { + name: "String" + } + } + } + } +}; + +export const MetricSettings: msRest.CompositeMapper = { + serializedName: "MetricSettings", + type: { + name: "Composite", + className: "MetricSettings", + modelProperties: { + timeGrain: { + serializedName: "timeGrain", + type: { + name: "TimeSpan" + } + }, + category: { + serializedName: "category", + type: { + name: "String" + } + }, + enabled: { + required: true, + serializedName: "enabled", + type: { + name: "Boolean" + } + }, + retentionPolicy: { + serializedName: "retentionPolicy", + type: { + name: "Composite", + className: "RetentionPolicy" + } + } + } + } +}; + +export const LogSettings: msRest.CompositeMapper = { + serializedName: "LogSettings", + type: { + name: "Composite", + className: "LogSettings", + modelProperties: { + category: { + serializedName: "category", + type: { + name: "String" + } + }, + enabled: { + required: true, + serializedName: "enabled", + type: { + name: "Boolean" + } + }, + retentionPolicy: { + serializedName: "retentionPolicy", + type: { + name: "Composite", + className: "RetentionPolicy" + } + } + } + } +}; + +export const DiagnosticSettingsResource: msRest.CompositeMapper = { + serializedName: "DiagnosticSettingsResource", + type: { + name: "Composite", + className: "DiagnosticSettingsResource", + modelProperties: { + ...ProxyOnlyResource.type.modelProperties, + storageAccountId: { + serializedName: "properties.storageAccountId", + type: { + name: "String" + } + }, + serviceBusRuleId: { + serializedName: "properties.serviceBusRuleId", + type: { + name: "String" + } + }, + eventHubAuthorizationRuleId: { + serializedName: "properties.eventHubAuthorizationRuleId", + type: { + name: "String" + } + }, + eventHubName: { + serializedName: "properties.eventHubName", + type: { + name: "String" + } + }, + metrics: { + serializedName: "properties.metrics", + type: { + name: "Sequence", + element: { + type: { + name: "Composite", + className: "MetricSettings" + } + } + } + }, + logs: { + serializedName: "properties.logs", + type: { + name: "Sequence", + element: { + type: { + name: "Composite", + className: "LogSettings" + } + } + } + }, + workspaceId: { + serializedName: "properties.workspaceId", + type: { + name: "String" + } + } + } + } +}; + +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" + } + } + } + } +}; + +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" + ] + } + }, + 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" + ] + } + }, + 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" + } + } + } + } + } + } +}; + +export const AutoscaleSettingResourceCollection: msRest.CompositeMapper = { + serializedName: "AutoscaleSettingResourceCollection", + type: { + name: "Composite", + className: "AutoscaleSettingResourceCollection", + modelProperties: { + value: { + required: true, + serializedName: "", + type: { + name: "Sequence", + element: { + type: { + name: "Composite", + className: "AutoscaleSettingResource" + } + } + } + }, + nextLink: { + serializedName: "nextLink", + type: { + name: "String" + } + } + } + } +}; + +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", + type: { + name: "Composite", + className: "EventDataCollection", + modelProperties: { + value: { + required: true, + serializedName: "", + type: { + name: "Sequence", + element: { + type: { + name: "Composite", + className: "EventData" + } + } + } + }, + nextLink: { + serializedName: "nextLink", + type: { + name: "String" + } + } + } + } +}; + +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/lib/models/metricAlertsMappers.ts b/sdk/monitor/arm-monitor/lib/models/metricAlertsMappers.ts new file mode 100644 index 000000000000..e90710d48c4e --- /dev/null +++ b/sdk/monitor/arm-monitor/lib/models/metricAlertsMappers.ts @@ -0,0 +1,93 @@ +/* + * 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, + MetricAlertResourceCollection, + MetricAlertResource, + Resource, + BaseResource, + MetricAlertCriteria, + MetricAlertAction, + ErrorResponse, + MetricAlertResourcePatch, + CloudError, + AutoscaleSettingResource, + AutoscaleProfile, + ScaleCapacity, + ScaleRule, + MetricTrigger, + ScaleAction, + TimeWindow, + Recurrence, + RecurrentSchedule, + AutoscaleNotification, + EmailNotification, + WebhookNotification, + AlertRuleResource, + RuleCondition, + RuleDataSource, + RuleAction, + LogProfileResource, + RetentionPolicy, + ProxyOnlyResource, + DiagnosticSettingsResource, + MetricSettings, + LogSettings, + DiagnosticSettingsCategoryResource, + ActionGroupResource, + EmailReceiver, + SmsReceiver, + WebhookReceiver, + ItsmReceiver, + AzureAppPushReceiver, + AutomationRunbookReceiver, + VoiceReceiver, + LogicAppReceiver, + AzureFunctionReceiver, + ArmRoleReceiver, + ActivityLogAlertResource, + ActivityLogAlertAllOfCondition, + ActivityLogAlertLeafCondition, + ActivityLogAlertActionList, + ActivityLogAlertActionGroup, + MetricAlertSingleResourceMultipleMetricCriteria, + MetricCriteria, + MultiMetricCriteria, + MetricDimension, + MetricAlertMultipleResourceMultipleMetricCriteria, + DynamicMetricCriteria, + DynamicThresholdFailingPeriods, + LogSearchRuleResource, + Source, + Schedule, + Action, + AlertingAction, + AzNsActionGroup, + TriggerCondition, + LogMetricTrigger, + LogToMetricAction, + Criteria, + Dimension, + ProxyResource, + VMInsightsOnboardingStatus, + DataContainer, + WorkspaceInfo, + RuleMetricDataSource, + RuleManagementEventDataSource, + RuleManagementEventClaimsDataSource, + ThresholdRuleCondition, + LocationThresholdRuleCondition, + ManagementEventRuleCondition, + ManagementEventAggregationCondition, + RuleEmailAction, + RuleWebhookAction +} from "../models/mappers"; + diff --git a/sdk/monitor/arm-monitor/lib/models/metricAlertsStatusMappers.ts b/sdk/monitor/arm-monitor/lib/models/metricAlertsStatusMappers.ts new file mode 100644 index 000000000000..4fad043d034d --- /dev/null +++ b/sdk/monitor/arm-monitor/lib/models/metricAlertsStatusMappers.ts @@ -0,0 +1,18 @@ +/* + * Copyright (c) Microsoft Corporation. All rights reserved. + * Licensed under the MIT License. See License.txt in the project root for + * license information. + * + * Code generated by Microsoft (R) AutoRest Code Generator. + * Changes may cause incorrect behavior and will be lost if the code is + * regenerated. + */ + +export { + discriminators, + MetricAlertStatusCollection, + MetricAlertStatus, + MetricAlertStatusProperties, + ErrorResponse +} from "../models/mappers"; + diff --git a/sdk/monitor/arm-monitor/lib/models/metricBaselineMappers.ts b/sdk/monitor/arm-monitor/lib/models/metricBaselineMappers.ts new file mode 100644 index 000000000000..c70ba6543590 --- /dev/null +++ b/sdk/monitor/arm-monitor/lib/models/metricBaselineMappers.ts @@ -0,0 +1,21 @@ +/* + * 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, + BaselineResponse, + LocalizableString, + Baseline, + BaselineMetadataValue, + ErrorResponse, + TimeSeriesInformation, + CalculateBaselineResponse +} from "../models/mappers"; + diff --git a/sdk/monitor/arm-monitor/lib/models/metricDefinitionsMappers.ts b/sdk/monitor/arm-monitor/lib/models/metricDefinitionsMappers.ts new file mode 100644 index 000000000000..d1134e0ae106 --- /dev/null +++ b/sdk/monitor/arm-monitor/lib/models/metricDefinitionsMappers.ts @@ -0,0 +1,19 @@ +/* + * 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, + MetricDefinitionCollection, + MetricDefinition, + LocalizableString, + MetricAvailability, + ErrorResponse +} from "../models/mappers"; + diff --git a/sdk/monitor/arm-monitor/lib/models/metricNamespacesMappers.ts b/sdk/monitor/arm-monitor/lib/models/metricNamespacesMappers.ts new file mode 100644 index 000000000000..d7fea3f0fa2e --- /dev/null +++ b/sdk/monitor/arm-monitor/lib/models/metricNamespacesMappers.ts @@ -0,0 +1,18 @@ +/* + * Copyright (c) Microsoft Corporation. All rights reserved. + * Licensed under the MIT License. See License.txt in the project root for + * license information. + * + * Code generated by Microsoft (R) AutoRest Code Generator. + * Changes may cause incorrect behavior and will be lost if the code is + * regenerated. + */ + +export { + discriminators, + MetricNamespaceCollection, + MetricNamespace, + MetricNamespaceName, + ErrorResponse +} from "../models/mappers"; + diff --git a/sdk/monitor/arm-monitor/lib/models/metricsMappers.ts b/sdk/monitor/arm-monitor/lib/models/metricsMappers.ts new file mode 100644 index 000000000000..950c2c7c6470 --- /dev/null +++ b/sdk/monitor/arm-monitor/lib/models/metricsMappers.ts @@ -0,0 +1,21 @@ +/* + * 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, + Response, + Metric, + LocalizableString, + TimeSeriesElement, + MetadataValue, + MetricValue, + ErrorResponse +} from "../models/mappers"; + diff --git a/sdk/monitor/arm-monitor/lib/models/operationsMappers.ts b/sdk/monitor/arm-monitor/lib/models/operationsMappers.ts new file mode 100644 index 000000000000..19f09b391246 --- /dev/null +++ b/sdk/monitor/arm-monitor/lib/models/operationsMappers.ts @@ -0,0 +1,18 @@ +/* + * Copyright (c) Microsoft Corporation. All rights reserved. + * Licensed under the MIT License. See License.txt in the project root for + * license information. + * + * Code generated by Microsoft (R) AutoRest Code Generator. + * Changes may cause incorrect behavior and will be lost if the code is + * regenerated. + */ + +export { + discriminators, + OperationListResult, + Operation, + OperationDisplay, + CloudError +} from "../models/mappers"; + diff --git a/sdk/monitor/arm-monitor/lib/models/parameters.ts b/sdk/monitor/arm-monitor/lib/models/parameters.ts new file mode 100644 index 000000000000..87c3b9d92a89 --- /dev/null +++ b/sdk/monitor/arm-monitor/lib/models/parameters.ts @@ -0,0 +1,434 @@ +/* + * 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"; + +export const acceptLanguage: msRest.OperationParameter = { + parameterPath: "acceptLanguage", + mapper: { + serializedName: "accept-language", + defaultValue: 'en-US', + type: { + name: "String" + } + } +}; +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: '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-03-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: '2018-03-01', + type: { + name: "String" + } + } +}; +export const apiVersion8: msRest.OperationQueryParameter = { + parameterPath: "apiVersion", + mapper: { + required: true, + isConstant: true, + serializedName: "api-version", + defaultValue: '2018-04-16', + type: { + name: "String" + } + } +}; +export const apiVersion9: msRest.OperationQueryParameter = { + parameterPath: "apiVersion", + mapper: { + required: true, + isConstant: true, + serializedName: "api-version", + defaultValue: '2017-12-01-preview', + type: { + name: "String" + } + } +}; +export const autoscaleSettingName: msRest.OperationURLParameter = { + parameterPath: "autoscaleSettingName", + mapper: { + required: true, + serializedName: "autoscaleSettingName", + type: { + name: "String" + } + } +}; +export const filter: 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", + type: { + name: "String" + } + } +}; +export const nextPageLink: msRest.OperationURLParameter = { + parameterPath: "nextPageLink", + mapper: { + required: true, + serializedName: "nextLink", + type: { + name: "String" + } + }, + skipEncoding: true +}; +export const orderby: msRest.OperationQueryParameter = { + parameterPath: [ + "options", + "orderby" + ], + mapper: { + serializedName: "orderby", + type: { + name: "String" + } + } +}; +export const resourceGroupName: msRest.OperationURLParameter = { + parameterPath: "resourceGroupName", + mapper: { + required: true, + serializedName: "resourceGroupName", + type: { + name: "String" + } + } +}; +export const resourceUri: msRest.OperationURLParameter = { + parameterPath: "resourceUri", + mapper: { + required: true, + serializedName: "resourceUri", + type: { + name: "String" + } + }, + skipEncoding: true +}; +export const resultType: msRest.OperationQueryParameter = { + parameterPath: [ + "options", + "resultType" + ], + mapper: { + serializedName: "resultType", + type: { + name: "Enum", + allowedValues: [ + "Data", + "Metadata" + ] + } + } +}; +export const ruleName: msRest.OperationURLParameter = { + parameterPath: "ruleName", + mapper: { + required: true, + serializedName: "ruleName", + type: { + name: "String" + } + } +}; +export const select: msRest.OperationQueryParameter = { + parameterPath: [ + "options", + "select" + ], + mapper: { + serializedName: "$select", + type: { + name: "String" + } + } +}; +export const sensitivities: msRest.OperationQueryParameter = { + parameterPath: [ + "options", + "sensitivities" + ], + mapper: { + serializedName: "sensitivities", + type: { + name: "String" + } + } +}; +export const startTime: msRest.OperationQueryParameter = { + parameterPath: [ + "options", + "startTime" + ], + mapper: { + serializedName: "startTime", + type: { + name: "String" + } + } +}; +export const statusName: msRest.OperationURLParameter = { + parameterPath: "statusName", + mapper: { + required: true, + serializedName: "statusName", + type: { + name: "String" + } + } +}; +export const subscriptionId: msRest.OperationURLParameter = { + parameterPath: "subscriptionId", + mapper: { + required: true, + serializedName: "subscriptionId", + 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/lib/models/scheduledQueryRulesMappers.ts b/sdk/monitor/arm-monitor/lib/models/scheduledQueryRulesMappers.ts new file mode 100644 index 000000000000..bc7c16468c95 --- /dev/null +++ b/sdk/monitor/arm-monitor/lib/models/scheduledQueryRulesMappers.ts @@ -0,0 +1,92 @@ +/* + * 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, + LogSearchRuleResource, + Resource, + BaseResource, + Source, + Schedule, + Action, + ErrorResponse, + LogSearchRuleResourcePatch, + LogSearchRuleResourceCollection, + AutoscaleSettingResource, + AutoscaleProfile, + ScaleCapacity, + ScaleRule, + MetricTrigger, + ScaleAction, + TimeWindow, + Recurrence, + RecurrentSchedule, + AutoscaleNotification, + EmailNotification, + WebhookNotification, + AlertRuleResource, + RuleCondition, + RuleDataSource, + RuleAction, + LogProfileResource, + RetentionPolicy, + ProxyOnlyResource, + DiagnosticSettingsResource, + MetricSettings, + LogSettings, + DiagnosticSettingsCategoryResource, + ActionGroupResource, + EmailReceiver, + SmsReceiver, + WebhookReceiver, + ItsmReceiver, + AzureAppPushReceiver, + AutomationRunbookReceiver, + VoiceReceiver, + LogicAppReceiver, + AzureFunctionReceiver, + ArmRoleReceiver, + ActivityLogAlertResource, + ActivityLogAlertAllOfCondition, + ActivityLogAlertLeafCondition, + ActivityLogAlertActionList, + ActivityLogAlertActionGroup, + MetricAlertResource, + MetricAlertCriteria, + MetricAlertAction, + MetricAlertSingleResourceMultipleMetricCriteria, + MetricCriteria, + MultiMetricCriteria, + MetricDimension, + MetricAlertMultipleResourceMultipleMetricCriteria, + DynamicMetricCriteria, + DynamicThresholdFailingPeriods, + AlertingAction, + AzNsActionGroup, + TriggerCondition, + LogMetricTrigger, + LogToMetricAction, + Criteria, + Dimension, + ProxyResource, + VMInsightsOnboardingStatus, + DataContainer, + WorkspaceInfo, + RuleMetricDataSource, + RuleManagementEventDataSource, + RuleManagementEventClaimsDataSource, + ThresholdRuleCondition, + LocationThresholdRuleCondition, + ManagementEventRuleCondition, + ManagementEventAggregationCondition, + RuleEmailAction, + RuleWebhookAction +} from "../models/mappers"; + diff --git a/sdk/monitor/arm-monitor/lib/models/tenantActivityLogsMappers.ts b/sdk/monitor/arm-monitor/lib/models/tenantActivityLogsMappers.ts new file mode 100644 index 000000000000..d8566b13f281 --- /dev/null +++ b/sdk/monitor/arm-monitor/lib/models/tenantActivityLogsMappers.ts @@ -0,0 +1,20 @@ +/* + * 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, + EventDataCollection, + EventData, + SenderAuthorization, + LocalizableString, + HttpRequestInfo, + ErrorResponse +} from "../models/mappers"; + diff --git a/sdk/monitor/arm-monitor/lib/models/vMInsightsMappers.ts b/sdk/monitor/arm-monitor/lib/models/vMInsightsMappers.ts new file mode 100644 index 000000000000..9e34edea2157 --- /dev/null +++ b/sdk/monitor/arm-monitor/lib/models/vMInsightsMappers.ts @@ -0,0 +1,91 @@ +/* + * 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, + VMInsightsOnboardingStatus, + ProxyResource, + BaseResource, + DataContainer, + WorkspaceInfo, + ResponseWithError, + ErrorModel, + Resource, + AutoscaleSettingResource, + AutoscaleProfile, + ScaleCapacity, + ScaleRule, + MetricTrigger, + ScaleAction, + TimeWindow, + Recurrence, + RecurrentSchedule, + AutoscaleNotification, + EmailNotification, + WebhookNotification, + AlertRuleResource, + RuleCondition, + RuleDataSource, + RuleAction, + LogProfileResource, + RetentionPolicy, + ProxyOnlyResource, + DiagnosticSettingsResource, + MetricSettings, + LogSettings, + DiagnosticSettingsCategoryResource, + ActionGroupResource, + EmailReceiver, + SmsReceiver, + WebhookReceiver, + ItsmReceiver, + AzureAppPushReceiver, + AutomationRunbookReceiver, + VoiceReceiver, + LogicAppReceiver, + AzureFunctionReceiver, + ArmRoleReceiver, + ActivityLogAlertResource, + ActivityLogAlertAllOfCondition, + ActivityLogAlertLeafCondition, + ActivityLogAlertActionList, + ActivityLogAlertActionGroup, + MetricAlertResource, + MetricAlertCriteria, + MetricAlertAction, + MetricAlertSingleResourceMultipleMetricCriteria, + MetricCriteria, + MultiMetricCriteria, + MetricDimension, + MetricAlertMultipleResourceMultipleMetricCriteria, + DynamicMetricCriteria, + DynamicThresholdFailingPeriods, + LogSearchRuleResource, + Source, + Schedule, + Action, + AlertingAction, + AzNsActionGroup, + TriggerCondition, + LogMetricTrigger, + LogToMetricAction, + Criteria, + Dimension, + RuleMetricDataSource, + RuleManagementEventDataSource, + RuleManagementEventClaimsDataSource, + ThresholdRuleCondition, + LocationThresholdRuleCondition, + ManagementEventRuleCondition, + ManagementEventAggregationCondition, + RuleEmailAction, + RuleWebhookAction +} from "../models/mappers"; + diff --git a/sdk/monitor/arm-monitor/lib/monitorManagementClient.ts b/sdk/monitor/arm-monitor/lib/monitorManagementClient.ts new file mode 100644 index 000000000000..a498d7b03d34 --- /dev/null +++ b/sdk/monitor/arm-monitor/lib/monitorManagementClient.ts @@ -0,0 +1,82 @@ +/* + * 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/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. + * @param subscriptionId The Azure subscription Id. + * @param [options] The parameter options + */ + constructor(credentials: msRest.ServiceClientCredentials, subscriptionId: string, options?: Models.MonitorManagementClientOptions) { + super(credentials, subscriptionId, options); + this.autoscaleSettings = new operations.AutoscaleSettings(this); + this.operations = new operations.Operations(this); + this.alertRuleIncidents = new operations.AlertRuleIncidents(this); + this.alertRules = new operations.AlertRules(this); + this.logProfiles = new operations.LogProfiles(this); + this.diagnosticSettings = new operations.DiagnosticSettingsOperations(this); + this.diagnosticSettingsCategory = new operations.DiagnosticSettingsCategoryOperations(this); + this.actionGroups = new operations.ActionGroups(this); + this.activityLogAlerts = new operations.ActivityLogAlerts(this); + this.activityLogs = new operations.ActivityLogs(this); + this.eventCategories = new operations.EventCategories(this); + this.tenantActivityLogs = new operations.TenantActivityLogs(this); + this.metricDefinitions = new operations.MetricDefinitions(this); + this.metrics = new operations.Metrics(this); + this.metricBaseline = new operations.MetricBaseline(this); + this.baselines = new operations.Baselines(this); + this.metricAlerts = new operations.MetricAlerts(this); + this.metricAlertsStatus = new operations.MetricAlertsStatus(this); + this.scheduledQueryRules = new operations.ScheduledQueryRules(this); + this.metricNamespaces = new operations.MetricNamespaces(this); + this.vMInsights = new operations.VMInsights(this); + } +} + +// Operation Specifications + +export { + MonitorManagementClient, + MonitorManagementClientContext, + Models as MonitorManagementModels, + Mappers as MonitorManagementMappers +}; +export * from "./operations"; diff --git a/sdk/monitor/arm-monitor/lib/monitorManagementClientContext.ts b/sdk/monitor/arm-monitor/lib/monitorManagementClientContext.ts new file mode 100644 index 000000000000..aacdc007667d --- /dev/null +++ b/sdk/monitor/arm-monitor/lib/monitorManagementClientContext.ts @@ -0,0 +1,60 @@ +/* + * 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 Models from "./models"; +import * as msRest from "@azure/ms-rest-js"; +import * as msRestAzure from "@azure/ms-rest-azure-js"; + +const packageName = "@azure/arm-monitor"; +const packageVersion = "5.4.0"; + +export class MonitorManagementClientContext extends msRestAzure.AzureServiceClient { + credentials: msRest.ServiceClientCredentials; + subscriptionId: string; + + /** + * Initializes a new instance of the MonitorManagementClient class. + * @param credentials Credentials needed for the client to connect to Azure. + * @param subscriptionId The Azure subscription Id. + * @param [options] The parameter options + */ + constructor(credentials: msRest.ServiceClientCredentials, subscriptionId: string, options?: Models.MonitorManagementClientOptions) { + if (credentials == undefined) { + throw new Error('\'credentials\' cannot be null.'); + } + if (subscriptionId == undefined) { + throw new Error('\'subscriptionId\' cannot be null.'); + } + + if (!options) { + options = {}; + } + if(!options.userAgent) { + const defaultUserAgent = msRestAzure.getDefaultUserAgentValue(); + options.userAgent = `${packageName}/${packageVersion} ${defaultUserAgent}`; + } + + super(credentials, options); + + this.acceptLanguage = 'en-US'; + this.longRunningOperationRetryTimeout = 30; + this.baseUri = options.baseUri || this.baseUri || "https://management.azure.com"; + this.requestContentType = "application/json; charset=utf-8"; + this.credentials = credentials; + this.subscriptionId = subscriptionId; + + if(options.acceptLanguage !== null && options.acceptLanguage !== undefined) { + this.acceptLanguage = options.acceptLanguage; + } + if(options.longRunningOperationRetryTimeout !== null && options.longRunningOperationRetryTimeout !== undefined) { + this.longRunningOperationRetryTimeout = options.longRunningOperationRetryTimeout; + } + } +} diff --git a/sdk/monitor/arm-monitor/lib/operations/actionGroups.ts b/sdk/monitor/arm-monitor/lib/operations/actionGroups.ts new file mode 100644 index 000000000000..f0d61a682139 --- /dev/null +++ b/sdk/monitor/arm-monitor/lib/operations/actionGroups.ts @@ -0,0 +1,451 @@ +/* + * 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/lib/operations/activityLogAlerts.ts b/sdk/monitor/arm-monitor/lib/operations/activityLogAlerts.ts new file mode 100644 index 000000000000..257a6277a91e --- /dev/null +++ b/sdk/monitor/arm-monitor/lib/operations/activityLogAlerts.ts @@ -0,0 +1,382 @@ +/* + * 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/lib/operations/activityLogs.ts b/sdk/monitor/arm-monitor/lib/operations/activityLogs.ts new file mode 100644 index 000000000000..9bda4449cc43 --- /dev/null +++ b/sdk/monitor/arm-monitor/lib/operations/activityLogs.ts @@ -0,0 +1,128 @@ +/* + * 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 [options] The optional parameters + * @returns Promise + */ + list(options?: Models.ActivityLogsListOptionalParams): Promise; + /** + * @param callback The callback + */ + list(callback: msRest.ServiceCallback): void; + /** + * @param options The optional parameters + * @param callback The callback + */ + list(options: Models.ActivityLogsListOptionalParams, callback: msRest.ServiceCallback): void; + list(options?: Models.ActivityLogsListOptionalParams | msRest.ServiceCallback, callback?: msRest.ServiceCallback): Promise { + return this.client.sendOperationRequest( + { + 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.filter, + 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/lib/operations/alertRuleIncidents.ts b/sdk/monitor/arm-monitor/lib/operations/alertRuleIncidents.ts new file mode 100644 index 000000000000..77453e3b2b0f --- /dev/null +++ b/sdk/monitor/arm-monitor/lib/operations/alertRuleIncidents.ts @@ -0,0 +1,149 @@ +/* + * 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/lib/operations/alertRules.ts b/sdk/monitor/arm-monitor/lib/operations/alertRules.ts new file mode 100644 index 000000000000..79429b70aaf1 --- /dev/null +++ b/sdk/monitor/arm-monitor/lib/operations/alertRules.ts @@ -0,0 +1,384 @@ +/* + * 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/lib/operations/autoscaleSettings.ts b/sdk/monitor/arm-monitor/lib/operations/autoscaleSettings.ts new file mode 100644 index 000000000000..fa3828276d8e --- /dev/null +++ b/sdk/monitor/arm-monitor/lib/operations/autoscaleSettings.ts @@ -0,0 +1,480 @@ +/* + * 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/lib/operations/baselines.ts b/sdk/monitor/arm-monitor/lib/operations/baselines.ts new file mode 100644 index 000000000000..a5646a8e42c1 --- /dev/null +++ b/sdk/monitor/arm-monitor/lib/operations/baselines.ts @@ -0,0 +1,89 @@ +/* + * Copyright (c) Microsoft Corporation. All rights reserved. + * Licensed under the MIT License. See License.txt in the project root for + * license information. + * + * Code generated by Microsoft (R) AutoRest Code Generator. + * Changes may cause incorrect behavior and will be lost if the code is + * regenerated. + */ + +import * as msRest from "@azure/ms-rest-js"; +import * as Models from "../models"; +import * as Mappers from "../models/baselinesMappers"; +import * as Parameters from "../models/parameters"; +import { MonitorManagementClientContext } from "../monitorManagementClientContext"; + +/** Class representing a Baselines. */ +export class Baselines { + private readonly client: MonitorManagementClientContext; + + /** + * Create a Baselines. + * @param {MonitorManagementClientContext} client Reference to the service client. + */ + constructor(client: MonitorManagementClientContext) { + this.client = client; + } + + /** + * **Lists the metric baseline values for a resource**. + * @param resourceUri The identifier of the resource. + * @param [options] The optional parameters + * @returns Promise + */ + list(resourceUri: string, options?: Models.BaselinesListOptionalParams): Promise; + /** + * @param resourceUri The identifier of the resource. + * @param callback The callback + */ + list(resourceUri: string, callback: msRest.ServiceCallback): void; + /** + * @param resourceUri The identifier of the resource. + * @param options The optional parameters + * @param callback The callback + */ + list(resourceUri: string, options: Models.BaselinesListOptionalParams, callback: msRest.ServiceCallback): void; + list(resourceUri: string, options?: Models.BaselinesListOptionalParams | msRest.ServiceCallback, callback?: msRest.ServiceCallback): Promise { + return this.client.sendOperationRequest( + { + resourceUri, + options + }, + listOperationSpec, + callback) as Promise; + } +} + +// Operation Specifications +const serializer = new msRest.Serializer(Mappers); +const listOperationSpec: msRest.OperationSpec = { + httpMethod: "GET", + path: "{resourceUri}/providers/microsoft.insights/metricBaselines", + urlParameters: [ + Parameters.resourceUri + ], + queryParameters: [ + Parameters.metricnames, + Parameters.metricnamespace, + Parameters.timespan, + Parameters.interval, + Parameters.aggregation, + Parameters.sensitivities, + Parameters.filter, + Parameters.resultType, + Parameters.apiVersion3 + ], + headerParameters: [ + Parameters.acceptLanguage + ], + responses: { + 200: { + bodyMapper: Mappers.MetricBaselinesResponse + }, + default: { + bodyMapper: Mappers.ErrorResponse + } + }, + serializer +}; diff --git a/sdk/monitor/arm-monitor/lib/operations/diagnosticSettingsCategoryOperations.ts b/sdk/monitor/arm-monitor/lib/operations/diagnosticSettingsCategoryOperations.ts new file mode 100644 index 000000000000..696518269cd8 --- /dev/null +++ b/sdk/monitor/arm-monitor/lib/operations/diagnosticSettingsCategoryOperations.ts @@ -0,0 +1,137 @@ +/* + * 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/lib/operations/diagnosticSettingsOperations.ts b/sdk/monitor/arm-monitor/lib/operations/diagnosticSettingsOperations.ts new file mode 100644 index 000000000000..8153aa322d65 --- /dev/null +++ b/sdk/monitor/arm-monitor/lib/operations/diagnosticSettingsOperations.ts @@ -0,0 +1,259 @@ +/* + * 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/lib/operations/eventCategories.ts b/sdk/monitor/arm-monitor/lib/operations/eventCategories.ts new file mode 100644 index 000000000000..67bd8f4311b4 --- /dev/null +++ b/sdk/monitor/arm-monitor/lib/operations/eventCategories.ts @@ -0,0 +1,76 @@ +/* + * 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/lib/operations/index.ts b/sdk/monitor/arm-monitor/lib/operations/index.ts new file mode 100644 index 000000000000..a7964c5cac32 --- /dev/null +++ b/sdk/monitor/arm-monitor/lib/operations/index.ts @@ -0,0 +1,31 @@ +/* + * 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 * 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/lib/operations/logProfiles.ts b/sdk/monitor/arm-monitor/lib/operations/logProfiles.ts new file mode 100644 index 000000000000..1ae52e5613b7 --- /dev/null +++ b/sdk/monitor/arm-monitor/lib/operations/logProfiles.ts @@ -0,0 +1,305 @@ +/* + * 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/lib/operations/metricAlerts.ts b/sdk/monitor/arm-monitor/lib/operations/metricAlerts.ts new file mode 100644 index 000000000000..8811518243f1 --- /dev/null +++ b/sdk/monitor/arm-monitor/lib/operations/metricAlerts.ts @@ -0,0 +1,378 @@ +/* + * 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.apiVersion7 + ], + 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.apiVersion7 + ], + 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.apiVersion7 + ], + 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.apiVersion7 + ], + 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.apiVersion7 + ], + 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.apiVersion7 + ], + headerParameters: [ + Parameters.acceptLanguage + ], + responses: { + 200: {}, + 204: {}, + default: { + bodyMapper: Mappers.CloudError + } + }, + serializer +}; diff --git a/sdk/monitor/arm-monitor/lib/operations/metricAlertsStatus.ts b/sdk/monitor/arm-monitor/lib/operations/metricAlertsStatus.ts new file mode 100644 index 000000000000..6eb83cdd009a --- /dev/null +++ b/sdk/monitor/arm-monitor/lib/operations/metricAlertsStatus.ts @@ -0,0 +1,149 @@ +/* + * 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.apiVersion7 + ], + 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.apiVersion7 + ], + headerParameters: [ + Parameters.acceptLanguage + ], + responses: { + 200: { + bodyMapper: Mappers.MetricAlertStatusCollection + }, + default: { + bodyMapper: Mappers.ErrorResponse + } + }, + serializer +}; diff --git a/sdk/monitor/arm-monitor/lib/operations/metricBaseline.ts b/sdk/monitor/arm-monitor/lib/operations/metricBaseline.ts new file mode 100644 index 000000000000..0cd73b9d1c3e --- /dev/null +++ b/sdk/monitor/arm-monitor/lib/operations/metricBaseline.ts @@ -0,0 +1,174 @@ +/* + * 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/lib/operations/metricDefinitions.ts b/sdk/monitor/arm-monitor/lib/operations/metricDefinitions.ts new file mode 100644 index 000000000000..23a9932d767b --- /dev/null +++ b/sdk/monitor/arm-monitor/lib/operations/metricDefinitions.ts @@ -0,0 +1,82 @@ +/* + * 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/lib/operations/metricNamespaces.ts b/sdk/monitor/arm-monitor/lib/operations/metricNamespaces.ts new file mode 100644 index 000000000000..7c9bb71069fe --- /dev/null +++ b/sdk/monitor/arm-monitor/lib/operations/metricNamespaces.ts @@ -0,0 +1,82 @@ +/* + * 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.apiVersion9, + Parameters.startTime + ], + headerParameters: [ + Parameters.acceptLanguage + ], + responses: { + 200: { + bodyMapper: Mappers.MetricNamespaceCollection + }, + default: { + bodyMapper: Mappers.ErrorResponse + } + }, + serializer +}; diff --git a/sdk/monitor/arm-monitor/lib/operations/metrics.ts b/sdk/monitor/arm-monitor/lib/operations/metrics.ts new file mode 100644 index 000000000000..0a6f29b9680e --- /dev/null +++ b/sdk/monitor/arm-monitor/lib/operations/metrics.ts @@ -0,0 +1,90 @@ +/* + * 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.filter, + 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/lib/operations/operations.ts b/sdk/monitor/arm-monitor/lib/operations/operations.ts new file mode 100644 index 000000000000..a6faf8a59a89 --- /dev/null +++ b/sdk/monitor/arm-monitor/lib/operations/operations.ts @@ -0,0 +1,74 @@ +/* + * 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/lib/operations/scheduledQueryRules.ts b/sdk/monitor/arm-monitor/lib/operations/scheduledQueryRules.ts new file mode 100644 index 000000000000..5acc255f18d7 --- /dev/null +++ b/sdk/monitor/arm-monitor/lib/operations/scheduledQueryRules.ts @@ -0,0 +1,383 @@ +/* + * Copyright (c) Microsoft Corporation. All rights reserved. + * Licensed under the MIT License. See License.txt in the project root for + * license information. + * + * Code generated by Microsoft (R) AutoRest Code Generator. + * Changes may cause incorrect behavior and will be lost if the code is + * regenerated. + */ + +import * as msRest from "@azure/ms-rest-js"; +import * as Models from "../models"; +import * as Mappers from "../models/scheduledQueryRulesMappers"; +import * as Parameters from "../models/parameters"; +import { MonitorManagementClientContext } from "../monitorManagementClientContext"; + +/** Class representing a ScheduledQueryRules. */ +export class ScheduledQueryRules { + private readonly client: MonitorManagementClientContext; + + /** + * Create a ScheduledQueryRules. + * @param {MonitorManagementClientContext} client Reference to the service client. + */ + constructor(client: MonitorManagementClientContext) { + this.client = client; + } + + /** + * Creates or updates an log search rule. + * @param resourceGroupName The name of the resource group. + * @param ruleName The name of the rule. + * @param parameters The parameters of the rule to create or update. + * @param [options] The optional parameters + * @returns Promise + */ + createOrUpdate(resourceGroupName: string, ruleName: string, parameters: Models.LogSearchRuleResource, options?: msRest.RequestOptionsBase): Promise; + /** + * @param resourceGroupName The name of the resource group. + * @param ruleName The name of the rule. + * @param parameters The parameters of the rule to create or update. + * @param callback The callback + */ + createOrUpdate(resourceGroupName: string, ruleName: string, parameters: Models.LogSearchRuleResource, callback: msRest.ServiceCallback): void; + /** + * @param resourceGroupName The name of the resource group. + * @param ruleName The name of the rule. + * @param parameters The parameters of the rule to create or update. + * @param options The optional parameters + * @param callback The callback + */ + createOrUpdate(resourceGroupName: string, ruleName: string, parameters: Models.LogSearchRuleResource, options: msRest.RequestOptionsBase, callback: msRest.ServiceCallback): void; + createOrUpdate(resourceGroupName: string, ruleName: string, parameters: Models.LogSearchRuleResource, options?: msRest.RequestOptionsBase | msRest.ServiceCallback, callback?: msRest.ServiceCallback): Promise { + return this.client.sendOperationRequest( + { + resourceGroupName, + ruleName, + parameters, + options + }, + createOrUpdateOperationSpec, + callback) as Promise; + } + + /** + * Gets an Log Search rule + * @param resourceGroupName The name of the resource group. + * @param ruleName The name of the rule. + * @param [options] The optional parameters + * @returns Promise + */ + get(resourceGroupName: string, ruleName: string, options?: msRest.RequestOptionsBase): Promise; + /** + * @param resourceGroupName The name of the resource group. + * @param ruleName The name of the rule. + * @param callback The callback + */ + get(resourceGroupName: string, ruleName: string, callback: msRest.ServiceCallback): void; + /** + * @param resourceGroupName The name of the resource group. + * @param ruleName The name of the rule. + * @param options The optional parameters + * @param callback The callback + */ + get(resourceGroupName: string, ruleName: string, options: msRest.RequestOptionsBase, callback: msRest.ServiceCallback): void; + get(resourceGroupName: string, ruleName: string, options?: msRest.RequestOptionsBase | msRest.ServiceCallback, callback?: msRest.ServiceCallback): Promise { + return this.client.sendOperationRequest( + { + resourceGroupName, + ruleName, + options + }, + getOperationSpec, + callback) as Promise; + } + + /** + * Update log search Rule. + * @param resourceGroupName The name of the resource group. + * @param ruleName The name of the rule. + * @param parameters The parameters of the rule to update. + * @param [options] The optional parameters + * @returns Promise + */ + update(resourceGroupName: string, ruleName: string, parameters: Models.LogSearchRuleResourcePatch, options?: msRest.RequestOptionsBase): Promise; + /** + * @param resourceGroupName The name of the resource group. + * @param ruleName The name of the rule. + * @param parameters The parameters of the rule to update. + * @param callback The callback + */ + update(resourceGroupName: string, ruleName: string, parameters: Models.LogSearchRuleResourcePatch, callback: msRest.ServiceCallback): void; + /** + * @param resourceGroupName The name of the resource group. + * @param ruleName The name of the rule. + * @param parameters The parameters of the rule to update. + * @param options The optional parameters + * @param callback The callback + */ + update(resourceGroupName: string, ruleName: string, parameters: Models.LogSearchRuleResourcePatch, options: msRest.RequestOptionsBase, callback: msRest.ServiceCallback): void; + update(resourceGroupName: string, ruleName: string, parameters: Models.LogSearchRuleResourcePatch, options?: msRest.RequestOptionsBase | msRest.ServiceCallback, callback?: msRest.ServiceCallback): Promise { + return this.client.sendOperationRequest( + { + resourceGroupName, + ruleName, + parameters, + options + }, + updateOperationSpec, + callback) as Promise; + } + + /** + * Deletes a Log Search rule + * @param resourceGroupName The name of the resource group. + * @param ruleName The name of the rule. + * @param [options] The optional parameters + * @returns Promise + */ + deleteMethod(resourceGroupName: string, ruleName: string, options?: msRest.RequestOptionsBase): Promise; + /** + * @param resourceGroupName The name of the resource group. + * @param ruleName The name of the rule. + * @param callback The callback + */ + deleteMethod(resourceGroupName: string, ruleName: string, callback: msRest.ServiceCallback): void; + /** + * @param resourceGroupName The name of the resource group. + * @param ruleName The name of the rule. + * @param options The optional parameters + * @param callback The callback + */ + deleteMethod(resourceGroupName: string, ruleName: string, options: msRest.RequestOptionsBase, callback: msRest.ServiceCallback): void; + deleteMethod(resourceGroupName: string, ruleName: string, options?: msRest.RequestOptionsBase | msRest.ServiceCallback, callback?: msRest.ServiceCallback): Promise { + return this.client.sendOperationRequest( + { + resourceGroupName, + ruleName, + options + }, + deleteMethodOperationSpec, + callback); + } + + /** + * List the Log Search rules within a subscription group. + * @param [options] The optional parameters + * @returns Promise + */ + listBySubscription(options?: Models.ScheduledQueryRulesListBySubscriptionOptionalParams): Promise; + /** + * @param callback The callback + */ + listBySubscription(callback: msRest.ServiceCallback): void; + /** + * @param options The optional parameters + * @param callback The callback + */ + listBySubscription(options: Models.ScheduledQueryRulesListBySubscriptionOptionalParams, callback: msRest.ServiceCallback): void; + listBySubscription(options?: Models.ScheduledQueryRulesListBySubscriptionOptionalParams | msRest.ServiceCallback, callback?: msRest.ServiceCallback): Promise { + return this.client.sendOperationRequest( + { + options + }, + listBySubscriptionOperationSpec, + callback) as Promise; + } + + /** + * List the Log Search rules within a resource group. + * @param resourceGroupName The name of the resource group. + * @param [options] The optional parameters + * @returns Promise + */ + listByResourceGroup(resourceGroupName: string, options?: Models.ScheduledQueryRulesListByResourceGroupOptionalParams): Promise; + /** + * @param resourceGroupName The name of the resource group. + * @param callback The callback + */ + listByResourceGroup(resourceGroupName: string, callback: msRest.ServiceCallback): void; + /** + * @param resourceGroupName The name of the resource group. + * @param options The optional parameters + * @param callback The callback + */ + listByResourceGroup(resourceGroupName: string, options: Models.ScheduledQueryRulesListByResourceGroupOptionalParams, callback: msRest.ServiceCallback): void; + listByResourceGroup(resourceGroupName: string, options?: Models.ScheduledQueryRulesListByResourceGroupOptionalParams | msRest.ServiceCallback, callback?: msRest.ServiceCallback): Promise { + return this.client.sendOperationRequest( + { + resourceGroupName, + options + }, + listByResourceGroupOperationSpec, + callback) as Promise; + } +} + +// Operation Specifications +const serializer = new msRest.Serializer(Mappers); +const createOrUpdateOperationSpec: msRest.OperationSpec = { + httpMethod: "PUT", + path: "subscriptions/{subscriptionId}/resourcegroups/{resourceGroupName}/providers/microsoft.insights/scheduledQueryRules/{ruleName}", + urlParameters: [ + Parameters.subscriptionId, + Parameters.resourceGroupName, + Parameters.ruleName + ], + queryParameters: [ + Parameters.apiVersion8 + ], + headerParameters: [ + Parameters.acceptLanguage + ], + requestBody: { + parameterPath: "parameters", + mapper: { + ...Mappers.LogSearchRuleResource, + required: true + } + }, + responses: { + 200: { + bodyMapper: Mappers.LogSearchRuleResource + }, + 201: { + bodyMapper: Mappers.LogSearchRuleResource + }, + default: { + bodyMapper: Mappers.ErrorResponse + } + }, + serializer +}; + +const getOperationSpec: msRest.OperationSpec = { + httpMethod: "GET", + path: "subscriptions/{subscriptionId}/resourcegroups/{resourceGroupName}/providers/microsoft.insights/scheduledQueryRules/{ruleName}", + urlParameters: [ + Parameters.resourceGroupName, + Parameters.ruleName, + Parameters.subscriptionId + ], + queryParameters: [ + Parameters.apiVersion8 + ], + headerParameters: [ + Parameters.acceptLanguage + ], + responses: { + 200: { + bodyMapper: Mappers.LogSearchRuleResource + }, + default: { + bodyMapper: Mappers.ErrorResponse + } + }, + serializer +}; + +const updateOperationSpec: msRest.OperationSpec = { + httpMethod: "PATCH", + path: "subscriptions/{subscriptionId}/resourcegroups/{resourceGroupName}/providers/microsoft.insights/scheduledQueryRules/{ruleName}", + urlParameters: [ + Parameters.subscriptionId, + Parameters.resourceGroupName, + Parameters.ruleName + ], + queryParameters: [ + Parameters.apiVersion8 + ], + headerParameters: [ + Parameters.acceptLanguage + ], + requestBody: { + parameterPath: "parameters", + mapper: { + ...Mappers.LogSearchRuleResourcePatch, + required: true + } + }, + responses: { + 200: { + bodyMapper: Mappers.LogSearchRuleResource + }, + default: { + bodyMapper: Mappers.ErrorResponse + } + }, + serializer +}; + +const deleteMethodOperationSpec: msRest.OperationSpec = { + httpMethod: "DELETE", + path: "subscriptions/{subscriptionId}/resourcegroups/{resourceGroupName}/providers/microsoft.insights/scheduledQueryRules/{ruleName}", + urlParameters: [ + Parameters.resourceGroupName, + Parameters.ruleName, + Parameters.subscriptionId + ], + queryParameters: [ + Parameters.apiVersion8 + ], + headerParameters: [ + Parameters.acceptLanguage + ], + responses: { + 200: {}, + 204: {}, + default: { + bodyMapper: Mappers.ErrorResponse + } + }, + serializer +}; + +const listBySubscriptionOperationSpec: msRest.OperationSpec = { + httpMethod: "GET", + path: "subscriptions/{subscriptionId}/providers/microsoft.insights/scheduledQueryRules", + urlParameters: [ + Parameters.subscriptionId + ], + queryParameters: [ + Parameters.apiVersion8, + Parameters.filter + ], + headerParameters: [ + Parameters.acceptLanguage + ], + responses: { + 200: { + bodyMapper: Mappers.LogSearchRuleResourceCollection + }, + default: { + bodyMapper: Mappers.ErrorResponse + } + }, + serializer +}; + +const listByResourceGroupOperationSpec: msRest.OperationSpec = { + httpMethod: "GET", + path: "subscriptions/{subscriptionId}/resourcegroups/{resourceGroupName}/providers/microsoft.insights/scheduledQueryRules", + urlParameters: [ + Parameters.resourceGroupName, + Parameters.subscriptionId + ], + queryParameters: [ + Parameters.apiVersion8, + Parameters.filter + ], + headerParameters: [ + Parameters.acceptLanguage + ], + responses: { + 200: { + bodyMapper: Mappers.LogSearchRuleResourceCollection + }, + default: { + bodyMapper: Mappers.ErrorResponse + } + }, + serializer +}; diff --git a/sdk/monitor/arm-monitor/lib/operations/tenantActivityLogs.ts b/sdk/monitor/arm-monitor/lib/operations/tenantActivityLogs.ts new file mode 100644 index 000000000000..30986812843b --- /dev/null +++ b/sdk/monitor/arm-monitor/lib/operations/tenantActivityLogs.ts @@ -0,0 +1,133 @@ +/* + * 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.filter, + 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/lib/operations/vMInsights.ts b/sdk/monitor/arm-monitor/lib/operations/vMInsights.ts new file mode 100644 index 000000000000..056e5a7bf6a4 --- /dev/null +++ b/sdk/monitor/arm-monitor/lib/operations/vMInsights.ts @@ -0,0 +1,84 @@ +/* + * 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.apiVersion10 + ], + headerParameters: [ + Parameters.acceptLanguage + ], + responses: { + 200: { + bodyMapper: Mappers.VMInsightsOnboardingStatus + }, + default: { + bodyMapper: Mappers.ResponseWithError + } + }, + serializer +}; diff --git a/sdk/monitor/arm-monitor/package.json b/sdk/monitor/arm-monitor/package.json index bacf43996648..9b1138c15013 100644 --- a/sdk/monitor/arm-monitor/package.json +++ b/sdk/monitor/arm-monitor/package.json @@ -4,8 +4,8 @@ "description": "MonitorManagementClient Library with typescript type definitions for node.js and browser.", "version": "5.4.0", "dependencies": { - "@azure/ms-rest-azure-js": "^1.3.2", - "@azure/ms-rest-js": "^1.6.0", + "@azure/ms-rest-azure-js": "^1.2.0", + "@azure/ms-rest-js": "^1.2.0", "tslib": "^1.9.3" }, "keywords": [ @@ -26,7 +26,7 @@ "rollup-plugin-sourcemaps": "^0.4.2", "uglify-js": "^3.4.9" }, - "homepage": "https://github.com/azure/azure-sdk-for-js/tree/master/sdk/monitor/arm-monitor", + "homepage": "https://github.com/azure/azure-sdk-for-js", "repository": { "type": "git", "url": "https://github.com/azure/azure-sdk-for-js.git" @@ -43,8 +43,7 @@ "esm/**/*.js.map", "esm/**/*.d.ts", "esm/**/*.d.ts.map", - "src/**/*.ts", - "README.md", + "lib/**/*.ts", "rollup.config.js", "tsconfig.json" ], @@ -53,6 +52,5 @@ "minify": "uglifyjs -c -m --comments --source-map \"content='./dist/arm-monitor.js.map'\" -o ./dist/arm-monitor.min.js ./dist/arm-monitor.js", "prepack": "npm install && npm run build" }, - "sideEffects": false, - "autoPublish": true + "sideEffects": false } diff --git a/sdk/monitor/arm-monitor/tsconfig.json b/sdk/monitor/arm-monitor/tsconfig.json index 87bbf5b5fa49..51ea90961ce5 100644 --- a/sdk/monitor/arm-monitor/tsconfig.json +++ b/sdk/monitor/arm-monitor/tsconfig.json @@ -14,6 +14,6 @@ "outDir": "./esm", "importHelpers": true }, - "include": ["./src/**/*.ts"], + "include": ["./lib/**/*.ts"], "exclude": ["node_modules"] }