Skip to content

Commit

Permalink
Update from master
Browse files Browse the repository at this point in the history
  • Loading branch information
SDK Automation committed Aug 11, 2020
1 parent 1a11cfb commit d946a35
Show file tree
Hide file tree
Showing 16 changed files with 221 additions and 24 deletions.
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";
106 changes: 96 additions & 10 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 Down Expand Up @@ -2242,7 +2271,7 @@ export interface MetricAlertResourcePatch {
*/
criteria: MetricAlertCriteriaUnion;
/**
* the flag that indicates whether the alert should be auto resolved or not.
* the flag that indicates whether the alert should be auto resolved or not. The default is true.
*/
autoMitigate?: boolean;
/**
Expand Down Expand Up @@ -2375,9 +2404,10 @@ export interface MetricCriteria {
*/
dimensions?: MetricDimension[];
/**
* the criteria operator.
* the criteria operator. Possible values include: 'Equals', 'NotEquals', 'GreaterThan',
* 'GreaterThanOrEqual', 'LessThan', 'LessThanOrEqual'
*/
operator: any;
operator: Operator;
/**
* the criteria threshold value that activates the alert.
*/
Expand All @@ -2398,6 +2428,28 @@ export interface MetricAlertSingleResourceMultipleMetricCriteria {
allOf?: MetricCriteria[];
}

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

/**
* Specifies a metric dimension.
*/
Expand Down Expand Up @@ -2476,14 +2528,15 @@ export interface DynamicMetricCriteria {
*/
dimensions?: MetricDimension[];
/**
* The operator used to compare the metric value against the threshold.
* The operator used to compare the metric value against the threshold. Possible values include:
* 'GreaterThan', 'LessThan', 'GreaterOrLessThan'
*/
operator: any;
operator: DynamicThresholdOperator;
/**
* The extent of deviation required to trigger an alert. This will affect how tight the threshold
* is to the metric series pattern.
* is to the metric series pattern. Possible values include: 'Low', 'Medium', 'High'
*/
alertSensitivity: any;
alertSensitivity: DynamicThresholdSensitivity;
/**
* The minimum number of violations required within the selected lookback time window required to
* raise an alert.
Expand Down Expand Up @@ -3233,6 +3286,14 @@ export type TimeAggregationType = 'Average' | 'Minimum' | 'Maximum' | 'Total' |
*/
export type ComparisonOperationType = 'Equals' | 'NotEquals' | 'GreaterThan' | 'GreaterThanOrEqual' | 'LessThan' | 'LessThanOrEqual';

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

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

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

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

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

/**
* Defines values for Enabled.
* Possible values include: 'true', 'false'
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

0 comments on commit d946a35

Please sign in to comment.