Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[AutoPR @azure/arm-monitor] [Hub Generated] Review request for Microsoft.Insights to add version stable/2018-03-01 #1831

Open
wants to merge 1 commit into
base: master
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion sdk/monitor/arm-monitor/LICENSE.txt
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
The MIT License (MIT)

Copyright (c) 2019 Microsoft
Copyright (c) 2020 Microsoft

Permission is hereby granted, free of charge, to any person obtaining a copy
of this software and associated documentation files (the "Software"), to deal
Expand Down
2 changes: 1 addition & 1 deletion sdk/monitor/arm-monitor/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -98,4 +98,4 @@ See https://github.com/Azure/ms-rest-browserauth to learn how to authenticate to

- [Microsoft Azure SDK for Javascript](https://github.com/Azure/azure-sdk-for-js)

![Impressions](https://azure-sdk-impressions.azurewebsites.net/api/impressions/azure-sdk-for-js%2Fsdk%2Fmonitor%2Farm-monitor%2FREADME.png)
![Impressions](https://azure-sdk-impressions.azurewebsites.net/api/impressions/azure-sdk-for-js/sdk/monitor/arm-monitor/README.png)
2 changes: 2 additions & 0 deletions sdk/monitor/arm-monitor/src/models/actionGroupsMappers.ts
Original file line number Diff line number Diff line change
Expand Up @@ -76,6 +76,7 @@ export {
ScaleAction,
ScaleCapacity,
ScaleRule,
ScaleRuleMetricDimension,
Schedule,
SmsReceiver,
Source,
Expand All @@ -86,5 +87,6 @@ export {
VoiceReceiver,
WebhookNotification,
WebhookReceiver,
WebtestLocationAvailabilityCriteria,
WorkspaceInfo
} from "../models/mappers";
Original file line number Diff line number Diff line change
Expand Up @@ -75,6 +75,7 @@ export {
ScaleAction,
ScaleCapacity,
ScaleRule,
ScaleRuleMetricDimension,
Schedule,
SmsReceiver,
Source,
Expand All @@ -85,5 +86,6 @@ export {
VoiceReceiver,
WebhookNotification,
WebhookReceiver,
WebtestLocationAvailabilityCriteria,
WorkspaceInfo
} from "../models/mappers";
2 changes: 2 additions & 0 deletions sdk/monitor/arm-monitor/src/models/alertRulesMappers.ts
Original file line number Diff line number Diff line change
Expand Up @@ -76,6 +76,7 @@ export {
ScaleAction,
ScaleCapacity,
ScaleRule,
ScaleRuleMetricDimension,
Schedule,
SmsReceiver,
Source,
Expand All @@ -86,5 +87,6 @@ export {
VoiceReceiver,
WebhookNotification,
WebhookReceiver,
WebtestLocationAvailabilityCriteria,
WorkspaceInfo
} from "../models/mappers";
Original file line number Diff line number Diff line change
Expand Up @@ -75,6 +75,7 @@ export {
ScaleAction,
ScaleCapacity,
ScaleRule,
ScaleRuleMetricDimension,
Schedule,
SmsReceiver,
Source,
Expand All @@ -85,5 +86,6 @@ export {
VoiceReceiver,
WebhookNotification,
WebhookReceiver,
WebtestLocationAvailabilityCriteria,
WorkspaceInfo
} from "../models/mappers";
Original file line number Diff line number Diff line change
Expand Up @@ -74,6 +74,7 @@ export {
ScaleAction,
ScaleCapacity,
ScaleRule,
ScaleRuleMetricDimension,
Schedule,
SmsReceiver,
Source,
Expand All @@ -84,5 +85,6 @@ export {
VoiceReceiver,
WebhookNotification,
WebhookReceiver,
WebtestLocationAvailabilityCriteria,
WorkspaceInfo
} from "../models/mappers";
Original file line number Diff line number Diff line change
Expand Up @@ -74,6 +74,7 @@ export {
ScaleAction,
ScaleCapacity,
ScaleRule,
ScaleRuleMetricDimension,
Schedule,
SmsReceiver,
Source,
Expand All @@ -84,5 +85,6 @@ export {
VoiceReceiver,
WebhookNotification,
WebhookReceiver,
WebtestLocationAvailabilityCriteria,
WorkspaceInfo
} from "../models/mappers";
133 changes: 117 additions & 16 deletions sdk/monitor/arm-monitor/src/models/index.ts
Original file line number Diff line number Diff line change
Expand Up @@ -60,6 +60,26 @@ export interface ScaleCapacity {
default: string;
}

/**
* Specifies an auto scale rule metric dimension.
*/
export interface ScaleRuleMetricDimension {
/**
* Name of the dimension.
*/
dimensionName: string;
/**
* the dimension operator. Only 'Equals' and 'NotEquals' are supported. 'Equals' being equal to
* any of the values. 'NotEquals' being not equal to all of the values. Possible values include:
* 'Equals', 'NotEquals'
*/
operator: ScaleRuleMetricDimensionOperationType;
/**
* list of dimension values. For example: ["App1","App2"].
*/
values: string[];
}

/**
* The trigger that results in a scaling action.
*/
Expand All @@ -68,6 +88,10 @@ export interface MetricTrigger {
* the name of the metric that defines what the rule monitors.
*/
metricName: string;
/**
* the namespace of the metric that defines what the rule monitors.
*/
metricNamespace?: string;
/**
* the resource identifier of the resource the rule monitors.
*/
Expand Down Expand Up @@ -104,6 +128,11 @@ export interface MetricTrigger {
* the threshold of the metric that triggers the scale action.
*/
threshold: number;
/**
* List of dimension conditions. For example:
* [{"DimensionName":"AppName","Operator":"Equals","Values":["App1"]},{"DimensionName":"Deployment","Operator":"Equals","Values":["default"]}].
*/
dimensions?: ScaleRuleMetricDimension[];
}

/**
Expand Down Expand Up @@ -2113,13 +2142,13 @@ export interface MetricAlertAction {
/**
* The properties of a webhook object.
*/
webhookProperties?: { [propertyName: string]: string };
webHookProperties?: { [propertyName: string]: string };
}

/**
* Contains the possible cases for MetricAlertCriteria.
*/
export type MetricAlertCriteriaUnion = MetricAlertCriteria | MetricAlertSingleResourceMultipleMetricCriteria | MetricAlertMultipleResourceMultipleMetricCriteria;
export type MetricAlertCriteriaUnion = MetricAlertCriteria | MetricAlertSingleResourceMultipleMetricCriteria | WebtestLocationAvailabilityCriteria | MetricAlertMultipleResourceMultipleMetricCriteria;

/**
* The rule criteria that defines the conditions of the alert rule.
Expand Down Expand Up @@ -2179,7 +2208,7 @@ export interface MetricAlertResource extends Resource {
*/
criteria: MetricAlertCriteriaUnion;
/**
* the flag that indicates whether the alert should be auto resolved or not.
* the flag that indicates whether the alert should be auto resolved or not. The default is true.
*/
autoMitigate?: boolean;
/**
Expand All @@ -2205,28 +2234,28 @@ export interface MetricAlertResourcePatch {
/**
* the description of the metric alert that will be included in the alert email.
*/
description: string;
description?: string;
/**
* Alert severity {0, 1, 2, 3, 4}
*/
severity: number;
severity?: number;
/**
* the flag that indicates whether the metric alert is enabled.
*/
enabled: boolean;
enabled?: boolean;
/**
* the list of resource id's that this metric alert is scoped to.
*/
scopes?: string[];
/**
* how often the metric alert is evaluated represented in ISO 8601 duration format.
*/
evaluationFrequency: string;
evaluationFrequency?: string;
/**
* the period of time (in ISO 8601 duration format) that is used to monitor alert activity based
* on the threshold.
*/
windowSize: string;
windowSize?: string;
/**
* the resource type of the target resource(s) on which the alert is created/updated. Mandatory
* for MultipleResourceMultipleMetricCriteria.
Expand All @@ -2240,9 +2269,9 @@ export interface MetricAlertResourcePatch {
/**
* defines the specific alert criteria information.
*/
criteria: MetricAlertCriteriaUnion;
criteria?: MetricAlertCriteriaUnion;
/**
* the flag that indicates whether the alert should be auto resolved or not.
* the flag that indicates whether the alert should be auto resolved or not. The default is true.
*/
autoMitigate?: boolean;
/**
Expand Down Expand Up @@ -2340,6 +2369,11 @@ export interface MultiMetricCriteria {
* List of dimension conditions.
*/
dimensions?: MetricDimension[];
/**
* Allows creating an alert rule on a custom metric that isn't yet emitted, by causing the metric
* validation to be skipped.
*/
skipMetricValidation?: boolean;
/**
* Describes unknown properties. The value of an unknown property can be of "any" type.
*/
Expand Down Expand Up @@ -2375,9 +2409,15 @@ export interface MetricCriteria {
*/
dimensions?: MetricDimension[];
/**
* the criteria operator.
* Allows creating an alert rule on a custom metric that isn't yet emitted, by causing the metric
* validation to be skipped.
*/
skipMetricValidation?: boolean;
/**
* the criteria operator. Possible values include: 'Equals', 'NotEquals', 'GreaterThan',
* 'GreaterThanOrEqual', 'LessThan', 'LessThanOrEqual'
*/
operator: any;
operator: Operator;
/**
* the criteria threshold value that activates the alert.
*/
Expand All @@ -2398,6 +2438,28 @@ export interface MetricAlertSingleResourceMultipleMetricCriteria {
allOf?: MetricCriteria[];
}

/**
* Specifies the metric alert rule criteria for a web test resource.
*/
export interface WebtestLocationAvailabilityCriteria {
/**
* Polymorphic Discriminator
*/
odatatype: "Microsoft.Azure.Monitor.WebtestLocationAvailabilityCriteria";
/**
* The Application Insights web test Id.
*/
webTestId: string;
/**
* The Application Insights resource Id.
*/
componentId: string;
/**
* The number of failed locations.
*/
failedLocationCount: number;
}

/**
* Specifies a metric dimension.
*/
Expand Down Expand Up @@ -2476,14 +2538,20 @@ export interface DynamicMetricCriteria {
*/
dimensions?: MetricDimension[];
/**
* The operator used to compare the metric value against the threshold.
* Allows creating an alert rule on a custom metric that isn't yet emitted, by causing the metric
* validation to be skipped.
*/
skipMetricValidation?: boolean;
/**
* The operator used to compare the metric value against the threshold. Possible values include:
* 'GreaterThan', 'LessThan', 'GreaterOrLessThan'
*/
operator: any;
operator: DynamicThresholdOperator;
/**
* The extent of deviation required to trigger an alert. This will affect how tight the threshold
* is to the metric series pattern.
* is to the metric series pattern. Possible values include: 'Low', 'Medium', 'High'
*/
alertSensitivity: any;
alertSensitivity: DynamicThresholdSensitivity;
/**
* The minimum number of violations required within the selected lookback time window required to
* raise an alert.
Expand Down Expand Up @@ -3233,6 +3301,14 @@ export type TimeAggregationType = 'Average' | 'Minimum' | 'Maximum' | 'Total' |
*/
export type ComparisonOperationType = 'Equals' | 'NotEquals' | 'GreaterThan' | 'GreaterThanOrEqual' | 'LessThan' | 'LessThanOrEqual';

/**
* Defines values for ScaleRuleMetricDimensionOperationType.
* Possible values include: 'Equals', 'NotEquals'
* @readonly
* @enum {string}
*/
export type ScaleRuleMetricDimensionOperationType = 'Equals' | 'NotEquals';

/**
* Defines values for ScaleDirection.
* Possible values include: 'None', 'Increase', 'Decrease'
Expand Down Expand Up @@ -3331,6 +3407,31 @@ export type Sensitivity = 'Low' | 'Medium' | 'High';
*/
export type BaselineSensitivity = 'Low' | 'Medium' | 'High';

/**
* Defines values for Operator.
* Possible values include: 'Equals', 'NotEquals', 'GreaterThan', 'GreaterThanOrEqual', 'LessThan',
* 'LessThanOrEqual'
* @readonly
* @enum {string}
*/
export type Operator = 'Equals' | 'NotEquals' | 'GreaterThan' | 'GreaterThanOrEqual' | 'LessThan' | 'LessThanOrEqual';

/**
* Defines values for DynamicThresholdOperator.
* Possible values include: 'GreaterThan', 'LessThan', 'GreaterOrLessThan'
* @readonly
* @enum {string}
*/
export type DynamicThresholdOperator = 'GreaterThan' | 'LessThan' | 'GreaterOrLessThan';

/**
* Defines values for DynamicThresholdSensitivity.
* Possible values include: 'Low', 'Medium', 'High'
* @readonly
* @enum {string}
*/
export type DynamicThresholdSensitivity = 'Low' | 'Medium' | 'High';

/**
* Defines values for Enabled.
* Possible values include: 'true', 'false'
Expand Down
2 changes: 2 additions & 0 deletions sdk/monitor/arm-monitor/src/models/logProfilesMappers.ts
Original file line number Diff line number Diff line change
Expand Up @@ -76,6 +76,7 @@ export {
ScaleAction,
ScaleCapacity,
ScaleRule,
ScaleRuleMetricDimension,
Schedule,
SmsReceiver,
Source,
Expand All @@ -86,5 +87,6 @@ export {
VoiceReceiver,
WebhookNotification,
WebhookReceiver,
WebtestLocationAvailabilityCriteria,
WorkspaceInfo
} from "../models/mappers";
Loading