Skip to content
This repository has been archived by the owner on May 5, 2023. It is now read-only.

[AutoPR monitor/resource-manager] #5326 Fix the criteria definition #5042

Closed
Closed
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
3 changes: 1 addition & 2 deletions lib/services/monitorManagement/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -3,8 +3,7 @@ uid: azure-arm-monitor
summary: *content

---
**This SDK will be deprecated next year and will be replaced by a new TypeScript-based isomorphic SDK (found at https://www.npmjs.com/package/@azure/arm-monitor) which works on Node.js and browsers.**
**See https://aka.ms/azure-sdk-for-js-migration to learn more.**
**This SDK will be deprecated next year and will be replaced by a new TypeScript-based isomorphic SDK (found at https://github.com/Azure/azure-sdk-for-js) which works on Node.js and browsers.**
## Microsoft Azure SDK for Node.js - MonitorManagementClient

This project provides a Node.js package for accessing Azure. Right now it supports:
Expand Down
4 changes: 2 additions & 2 deletions lib/services/monitorManagement/lib/models/index.d.ts
Original file line number Diff line number Diff line change
Expand Up @@ -2359,9 +2359,9 @@ export interface Criteria {
*/
export interface LogToMetricAction extends Action {
/**
* Severity of the alert
* Criteria of Metric
*/
criteria: Criteria;
criteria: Criteria[];
}

/**
Expand Down
16 changes: 10 additions & 6 deletions lib/services/monitorManagement/lib/models/logToMetricAction.js
Original file line number Diff line number Diff line change
Expand Up @@ -20,10 +20,7 @@ const models = require('./index');
class LogToMetricAction extends models['Action'] {
/**
* Create a LogToMetricAction.
* @property {object} criteria Severity of the alert
* @property {string} [criteria.metricName] Name of the metric
* @property {array} [criteria.dimensions] List of Dimensions for creating
* metric
* @property {array} criteria Criteria of Metric
*/
constructor() {
super();
Expand Down Expand Up @@ -60,8 +57,15 @@ class LogToMetricAction extends models['Action'] {
required: true,
serializedName: 'criteria',
type: {
name: 'Composite',
className: 'Criteria'
name: 'Sequence',
element: {
required: false,
serializedName: 'CriteriaElementType',
type: {
name: 'Composite',
className: 'Criteria'
}
}
}
}
}
Expand Down
5 changes: 1 addition & 4 deletions lib/services/monitorManagement/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@
"description": "MonitorManagementClient Library with typescript type definitions for node",
"version": "5.4.0",
"dependencies": {
"ms-rest": "^2.5.0",
"ms-rest": "^2.3.3",
"ms-rest-azure": "^2.5.5"
},
"keywords": [
Expand All @@ -21,8 +21,5 @@
},
"bugs": {
"url": "https://github.com/azure/azure-sdk-for-node/issues"
},
"scripts": {
"postinstall": "node .scripts/postinstall.js"
}
}