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 monitor/resource-manager] Updates to Scheduled Query Rule swagger #1160

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
57 changes: 38 additions & 19 deletions packages/@azure/arm-monitor/README.md
Original file line number Diff line number Diff line change
@@ -1,24 +1,34 @@
# Azure MonitorManagementClient SDK for JavaScript
## Azure MonitorManagementClient SDK for JavaScript

This package contains an isomorphic SDK for MonitorManagementClient.

## Currently supported environments
### Currently supported environments

- Node.js version 6.x.x or higher
- Browser JavaScript

## How to Install
```
### How to Install

```bash
npm install @azure/arm-monitor
```

### How to use

## How to use
#### nodejs - Authentication, client creation and listByResourceGroup autoscaleSettings as an example written in TypeScript.

##### Install @azure/ms-rest-nodeauth

```bash
npm install @azure/ms-rest-nodeauth
```

### nodejs - Authentication, client creation and listByResourceGroup autoscaleSettings as an example written in TypeScript.
##### Sample code

```ts
import * as msRest from "ms-rest-js";
import * as msRestAzure from "ms-rest-azure-js";
import * as msRestNodeAuth from "ms-rest-nodeauth";
```typescript
import * as msRest from "@azure/ms-rest-js";
import * as msRestAzure from "@azure/ms-rest-azure-js";
import * as msRestNodeAuth from "@azure/ms-rest-nodeauth";
import { MonitorManagementClient, MonitorManagementModels, MonitorManagementMappers } from "@azure/arm-monitor";
const subscriptionId = process.env["AZURE_SUBSCRIPTION_ID"];

Expand All @@ -34,7 +44,16 @@ msRestNodeAuth.interactiveLogin().then((creds) => {
});
```

### browser - Authentication, client creation and listByResourceGroup autoscaleSettings as an example written in JavaScript.
#### browser - Authentication, client creation and listByResourceGroup autoscaleSettings as an example written in JavaScript.

##### Install @azure/ms-rest-browserauth

```bash
npm install @azure/ms-rest-browserauth
```

##### Sample code

See https://github.com/Azure/ms-rest-browserauth to learn how to authenticate to Azure in the browser.

- index.html
Expand All @@ -43,11 +62,11 @@ See https://github.com/Azure/ms-rest-browserauth to learn how to authenticate to
<html lang="en">
<head>
<title>@azure/arm-monitor sample</title>
<script src="node_modules/ms-rest-js/dist/msRest.browser.js"></script>
<script src="node_modules/ms-rest-azure-js/dist/msRestAzure.js"></script>
<script src="node_modules/ms-rest-browserauth/dist/msAuth.js"></script>
<script src="node_modules/@azure/ms-rest-js/dist/msRest.browser.js"></script>
<script src="node_modules/@azure/ms-rest-azure-js/dist/msRestAzure.js"></script>
<script src="node_modules/@azure/ms-rest-browserauth/dist/msAuth.js"></script>
<script src="node_modules/@azure/arm-monitor/dist/arm-monitor.js"></script>
<script>
<script type="text/javascript">
const subscriptionId = "<Subscription_Id>";
const authManager = new msAuth.AuthManager({
clientId: "<client id for your Azure AD app>",
Expand All @@ -70,10 +89,10 @@ See https://github.com/Azure/ms-rest-browserauth to learn how to authenticate to
});
</script>
</head>
<body>
</body>
<body></body>
</html>
```

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

- [Microsoft Azure SDK for Javascript](https://github.com/Azure/azure-sdk-for-js)
8 changes: 4 additions & 4 deletions packages/@azure/arm-monitor/lib/models/index.ts
Original file line number Diff line number Diff line change
Expand Up @@ -8,8 +8,8 @@
* regenerated.
*/

import { BaseResource, CloudError, AzureServiceClientOptions } from "ms-rest-azure-js";
import * as msRest from "ms-rest-js";
import { BaseResource, CloudError, AzureServiceClientOptions } from "@azure/ms-rest-azure-js";
import * as msRest from "@azure/ms-rest-js";

export { BaseResource, CloudError };

Expand Down Expand Up @@ -3037,9 +3037,9 @@ export interface AlertingAction {
*/
severity: AlertSeverity;
/**
* @member {AzNsActionGroup} aznsAction Azure action group reference.
* @member {AzNsActionGroup} [aznsAction] Azure action group reference.
*/
aznsAction: AzNsActionGroup;
aznsAction?: AzNsActionGroup;
/**
* @member {number} [throttlingInMin] time (in minutes) for which Alerts
* should be throttled or suppressed.
Expand Down
52 changes: 2 additions & 50 deletions packages/@azure/arm-monitor/lib/models/mappers.ts
Original file line number Diff line number Diff line change
Expand Up @@ -8,8 +8,8 @@
* regenerated.
*/

import { CloudErrorMapper, BaseResourceMapper } from "ms-rest-azure-js";
import * as msRest from "ms-rest-js";
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;
Expand Down Expand Up @@ -839,11 +839,6 @@ export const RuleCondition: msRest.CompositeMapper = {
serializedName: "dataSource",
type: {
name: "Composite",
polymorphicDiscriminator: {
serializedName: "odata.type",
clientName: "odatatype"
},
uberParent: "RuleDataSource",
className: "RuleDataSource"
}
},
Expand Down Expand Up @@ -1210,11 +1205,6 @@ export const AlertRuleResource: msRest.CompositeMapper = {
serializedName: "properties.condition",
type: {
name: "Composite",
polymorphicDiscriminator: {
serializedName: "odata.type",
clientName: "odatatype"
},
uberParent: "RuleCondition",
className: "RuleCondition"
}
},
Expand All @@ -1225,11 +1215,6 @@ export const AlertRuleResource: msRest.CompositeMapper = {
element: {
type: {
name: "Composite",
polymorphicDiscriminator: {
serializedName: "odata.type",
clientName: "odatatype"
},
uberParent: "RuleAction",
className: "RuleAction"
}
}
Expand Down Expand Up @@ -1288,11 +1273,6 @@ export const AlertRuleResourcePatch: msRest.CompositeMapper = {
serializedName: "properties.condition",
type: {
name: "Composite",
polymorphicDiscriminator: {
serializedName: "odata.type",
clientName: "odatatype"
},
uberParent: "RuleCondition",
className: "RuleCondition"
}
},
Expand All @@ -1303,11 +1283,6 @@ export const AlertRuleResourcePatch: msRest.CompositeMapper = {
element: {
type: {
name: "Composite",
polymorphicDiscriminator: {
serializedName: "odata.type",
clientName: "odatatype"
},
uberParent: "RuleAction",
className: "RuleAction"
}
}
Expand Down Expand Up @@ -3430,11 +3405,6 @@ export const MetricAlertResource: msRest.CompositeMapper = {
serializedName: "properties.criteria",
type: {
name: "Composite",
polymorphicDiscriminator: {
serializedName: "odata.type",
clientName: "odatatype"
},
uberParent: "MetricAlertCriteria",
className: "MetricAlertCriteria",
additionalProperties: {
type: {
Expand Down Expand Up @@ -3552,11 +3522,6 @@ export const MetricAlertResourcePatch: msRest.CompositeMapper = {
serializedName: "properties.criteria",
type: {
name: "Composite",
polymorphicDiscriminator: {
serializedName: "odata.type",
clientName: "odatatype"
},
uberParent: "MetricAlertCriteria",
className: "MetricAlertCriteria",
additionalProperties: {
type: {
Expand Down Expand Up @@ -3830,8 +3795,6 @@ export const MetricAlertSingleResourceMultipleMetricCriteria: msRest.CompositeMa
element: {
type: {
name: "Composite",
polymorphicDiscriminator: MultiMetricCriteria.type.polymorphicDiscriminator,
uberParent: "MultiMetricCriteria",
className: "MetricCriteria",
additionalProperties: MultiMetricCriteria.type.additionalProperties
}
Expand Down Expand Up @@ -3859,11 +3822,6 @@ export const MetricAlertMultipleResourceMultipleMetricCriteria: msRest.Composite
element: {
type: {
name: "Composite",
polymorphicDiscriminator: {
serializedName: "criterionType",
clientName: "criterionType"
},
uberParent: "MultiMetricCriteria",
className: "MultiMetricCriteria",
additionalProperties: {
type: {
Expand Down Expand Up @@ -4018,11 +3976,6 @@ export const LogSearchRuleResource: msRest.CompositeMapper = {
serializedName: "properties.action",
type: {
name: "Composite",
polymorphicDiscriminator: {
serializedName: "odata.type",
clientName: "odatatype"
},
uberParent: "Action",
className: "Action"
}
}
Expand Down Expand Up @@ -4172,7 +4125,6 @@ export const AlertingAction: msRest.CompositeMapper = {
}
},
aznsAction: {
required: true,
serializedName: "aznsAction",
type: {
name: "Composite",
Expand Down
2 changes: 1 addition & 1 deletion packages/@azure/arm-monitor/lib/models/parameters.ts
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@
* regenerated.
*/

import * as msRest from "ms-rest-js";
import * as msRest from "@azure/ms-rest-js";

export const acceptLanguage: msRest.OperationParameter = {
parameterPath: "acceptLanguage",
Expand Down
2 changes: 1 addition & 1 deletion packages/@azure/arm-monitor/lib/monitorManagementClient.ts
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@
* regenerated.
*/

import * as msRest from "ms-rest-js";
import * as msRest from "@azure/ms-rest-js";
import * as Models from "./models";
import * as Mappers from "./models/mappers";
import * as operations from "./operations";
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -9,8 +9,8 @@
*/

import * as Models from "./models";
import * as msRest from "ms-rest-js";
import * as msRestAzure from "ms-rest-azure-js";
import * as msRest from "@azure/ms-rest-js";
import * as msRestAzure from "@azure/ms-rest-azure-js";

const packageName = "@azure/arm-monitor";
const packageVersion = "0.1.0";
Expand Down
2 changes: 1 addition & 1 deletion packages/@azure/arm-monitor/lib/operations/actionGroups.ts
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@
* regenerated.
*/

import * as msRest from "ms-rest-js";
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";
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@
* regenerated.
*/

import * as msRest from "ms-rest-js";
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";
Expand Down
2 changes: 1 addition & 1 deletion packages/@azure/arm-monitor/lib/operations/activityLogs.ts
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@
* regenerated.
*/

import * as msRest from "ms-rest-js";
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";
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@
* regenerated.
*/

import * as msRest from "ms-rest-js";
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";
Expand Down
2 changes: 1 addition & 1 deletion packages/@azure/arm-monitor/lib/operations/alertRules.ts
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@
* regenerated.
*/

import * as msRest from "ms-rest-js";
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";
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@
* regenerated.
*/

import * as msRest from "ms-rest-js";
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";
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@
* regenerated.
*/

import * as msRest from "ms-rest-js";
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";
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@
* regenerated.
*/

import * as msRest from "ms-rest-js";
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";
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@
* regenerated.
*/

import * as msRest from "ms-rest-js";
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";
Expand Down
2 changes: 1 addition & 1 deletion packages/@azure/arm-monitor/lib/operations/logProfiles.ts
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@
* regenerated.
*/

import * as msRest from "ms-rest-js";
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";
Expand Down
2 changes: 1 addition & 1 deletion packages/@azure/arm-monitor/lib/operations/metricAlerts.ts
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@
* regenerated.
*/

import * as msRest from "ms-rest-js";
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";
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@
* regenerated.
*/

import * as msRest from "ms-rest-js";
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";
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@
* regenerated.
*/

import * as msRest from "ms-rest-js";
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";
Expand Down
Loading