From 6a10f54bcd74237286ad342cf4c51db0d01c09ce Mon Sep 17 00:00:00 2001 From: Azure SDK for Python bot Date: Sun, 2 Dec 2018 22:21:27 -0800 Subject: [PATCH 1/2] Generated from 5738fd21af734dc48d88f275b73a2c7fe3e504e4 (#669) typo: monitor/resource-manager/microsoft.insights - datatimes ->datetimes - calcualte -> calculate - timezones -> time zones - blongs -> belongs - defintions -> definitions - definitons -> definitions - defitinitons -> definitions - Speficies -> Specifies - webook -> webhook - Acount -> Account - scheduledquery -> scheduled query - Frequnecy -> Frequency - Specifiy -> Specify --- packages/@azure/arm-monitor/README.md | 53 ++++++------------- .../@azure/arm-monitor/lib/models/index.ts | 42 +++++++-------- .../@azure/arm-monitor/lib/models/mappers.ts | 51 +++++++++++++++++- .../arm-monitor/lib/models/parameters.ts | 2 +- .../lib/monitorManagementClient.ts | 2 +- .../lib/monitorManagementClientContext.ts | 4 +- .../lib/operations/actionGroups.ts | 2 +- .../lib/operations/activityLogAlerts.ts | 2 +- .../lib/operations/activityLogs.ts | 2 +- .../lib/operations/alertRuleIncidents.ts | 2 +- .../arm-monitor/lib/operations/alertRules.ts | 2 +- .../lib/operations/autoscaleSettings.ts | 2 +- .../diagnosticSettingsCategoryOperations.ts | 2 +- .../diagnosticSettingsOperations.ts | 2 +- .../lib/operations/eventCategories.ts | 2 +- .../arm-monitor/lib/operations/logProfiles.ts | 2 +- .../lib/operations/metricAlerts.ts | 8 +-- .../lib/operations/metricAlertsStatus.ts | 2 +- .../lib/operations/metricBaseline.ts | 2 +- .../lib/operations/metricDefinitions.ts | 2 +- .../lib/operations/metricNamespaces.ts | 2 +- .../arm-monitor/lib/operations/metrics.ts | 2 +- .../arm-monitor/lib/operations/operations.ts | 2 +- .../lib/operations/scheduledQueryRules.ts | 2 +- .../lib/operations/tenantActivityLogs.ts | 2 +- packages/@azure/arm-monitor/package.json | 4 +- packages/@azure/arm-monitor/rollup.config.js | 6 +-- packages/@azure/arm-monitor/tsconfig.json | 2 +- 28 files changed, 119 insertions(+), 91 deletions(-) diff --git a/packages/@azure/arm-monitor/README.md b/packages/@azure/arm-monitor/README.md index aa0df7909916..f8e01dc6d432 100644 --- a/packages/@azure/arm-monitor/README.md +++ b/packages/@azure/arm-monitor/README.md @@ -1,34 +1,24 @@ -## 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 ``` npm install @azure/arm-monitor ``` -### How to use - -#### nodejs - Authentication, client creation and listByResourceGroup autoscaleSettings as an example written in TypeScript. -##### Install @azure/ms-rest-nodeauth - -``` -npm install @azure/ms-rest-nodeauth -``` +## How to use -##### Sample code +### nodejs - Authentication, client creation and listByResourceGroup autoscaleSettings as an example written in TypeScript. ```ts -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 * as msRest from "ms-rest-js"; +import * as msRestAzure from "ms-rest-azure-js"; +import * as msRestNodeAuth from "ms-rest-nodeauth"; import { MonitorManagementClient, MonitorManagementModels, MonitorManagementMappers } from "@azure/arm-monitor"; const subscriptionId = process.env["AZURE_SUBSCRIPTION_ID"]; @@ -44,16 +34,7 @@ msRestNodeAuth.interactiveLogin().then((creds) => { }); ``` -#### browser - Authentication, client creation and listByResourceGroup autoscaleSettings as an example written in JavaScript. - -##### Install @azure/ms-rest-browserauth - -``` -npm install @azure/ms-rest-browserauth -``` - -##### Sample code - +### browser - Authentication, client creation and listByResourceGroup autoscaleSettings as an example written in JavaScript. See https://github.com/Azure/ms-rest-browserauth to learn how to authenticate to Azure in the browser. - index.html @@ -62,11 +43,11 @@ See https://github.com/Azure/ms-rest-browserauth to learn how to authenticate to @azure/arm-monitor sample - - - + + + - - + + ``` -## 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) diff --git a/packages/@azure/arm-monitor/lib/models/index.ts b/packages/@azure/arm-monitor/lib/models/index.ts index b0ece4296e60..53887b774446 100644 --- a/packages/@azure/arm-monitor/lib/models/index.ts +++ b/packages/@azure/arm-monitor/lib/models/index.ts @@ -8,8 +8,8 @@ * regenerated. */ -import { BaseResource, CloudError, AzureServiceClientOptions } from "@azure/ms-rest-azure-js"; -import * as msRest from "@azure/ms-rest-js"; +import { BaseResource, CloudError, AzureServiceClientOptions } from "ms-rest-azure-js"; +import * as msRest from "ms-rest-js"; export { BaseResource, CloudError }; @@ -192,14 +192,14 @@ export interface ScaleRule { export interface TimeWindow { /** * @member {string} [timeZone] the timezone of the start and end times for - * the profile. Some examples of valid timezones 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 + * 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 @@ -250,7 +250,7 @@ export interface TimeWindow { export interface RecurrentSchedule { /** * @member {string} timeZone the timezone for the hours of the profile. Some - * examples of valid timezones are: Dateline Standard Time, UTC-11, Hawaiian + * 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 @@ -2098,7 +2098,7 @@ export interface MetricDefinition { */ resourceId?: string; /** - * @member {string} [namespace] the namespace the metric blongs to. + * @member {string} [namespace] the namespace the metric belongs to. */ namespace?: string; /** @@ -2260,7 +2260,7 @@ export interface Response { cost?: number; /** * @member {string} timespan The timespan for which the data was retrieved. - * Its value consists of two datatimes concatenated, separated by '/'. This + * Its value consists of two datetimes concatenated, separated by '/'. This * may be adjusted in the future and returned back from what was originally * requested. */ @@ -2354,7 +2354,7 @@ export interface BaselineResponse { readonly name?: LocalizableString; /** * @member {string} [timespan] The timespan for which the data was retrieved. - * Its value consists of two datatimes concatenated, separated by '/'. This + * Its value consists of two datetimes concatenated, separated by '/'. This * may be adjusted in the future and returned back from what was originally * requested. */ @@ -2411,7 +2411,7 @@ export interface TimeSeriesInformation { /** * @interface * An interface representing CalculateBaselineResponse. - * The response to a calcualte baseline call. + * The response to a calculate baseline call. * */ export interface CalculateBaselineResponse { @@ -2793,7 +2793,7 @@ export interface MetricAlertSingleResourceMultipleMetricCriteria { /** * @interface * An interface representing MetricAlertMultipleResourceMultipleMetricCriteria. - * Speficies the metric alert criteria for multiple resource that has multiple + * Specifies the metric alert criteria for multiple resource that has multiple * metric criteria. * */ @@ -2903,7 +2903,7 @@ export interface LogSearchRuleResource extends Resource { readonly lastUpdatedTime?: Date; /** * @member {ProvisioningState} [provisioningState] Provisioning state of the - * scheduledquery rule. Possible values include: 'Succeeded', 'Deploying', + * 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.** @@ -2914,7 +2914,7 @@ export interface LogSearchRuleResource extends Resource { */ source: Source; /** - * @member {Schedule} [schedule] Schedule (Frequnecy, Time Window) for rule. + * @member {Schedule} [schedule] Schedule (Frequency, Time Window) for rule. * Required for action type - AlertingAction */ schedule?: Schedule; @@ -3015,7 +3015,7 @@ export interface AzNsActionGroup { emailSubject?: string; /** * @member {string} [customWebhookPayload] Custom payload to be sent for all - * webook URI in Azure action group + * webhook URI in Azure action group */ customWebhookPayload?: string; } @@ -3023,7 +3023,7 @@ export interface AzNsActionGroup { /** * @interface * An interface representing AlertingAction. - * Specifiy action need to be taken when rule type is Alert + * Specify action need to be taken when rule type is Alert * */ export interface AlertingAction { @@ -3089,7 +3089,7 @@ export interface Criteria { /** * @interface * An interface representing LogToMetricAction. - * Specifiy action need to be taken when rule type is converting log to metric + * Specify action need to be taken when rule type is converting log to metric * */ export interface LogToMetricAction { diff --git a/packages/@azure/arm-monitor/lib/models/mappers.ts b/packages/@azure/arm-monitor/lib/models/mappers.ts index e7b3f4382861..ce345c4239d3 100644 --- a/packages/@azure/arm-monitor/lib/models/mappers.ts +++ b/packages/@azure/arm-monitor/lib/models/mappers.ts @@ -8,8 +8,8 @@ * regenerated. */ -import { CloudErrorMapper, BaseResourceMapper } from "@azure/ms-rest-azure-js"; -import * as msRest from "@azure/ms-rest-js"; +import { CloudErrorMapper, BaseResourceMapper } from "ms-rest-azure-js"; +import * as msRest from "ms-rest-js"; export const CloudError = CloudErrorMapper; export const BaseResource = BaseResourceMapper; @@ -839,6 +839,11 @@ export const RuleCondition: msRest.CompositeMapper = { serializedName: "dataSource", type: { name: "Composite", + polymorphicDiscriminator: { + serializedName: "odata.type", + clientName: "odatatype" + }, + uberParent: "RuleDataSource", className: "RuleDataSource" } }, @@ -1205,6 +1210,11 @@ export const AlertRuleResource: msRest.CompositeMapper = { serializedName: "properties.condition", type: { name: "Composite", + polymorphicDiscriminator: { + serializedName: "odata.type", + clientName: "odatatype" + }, + uberParent: "RuleCondition", className: "RuleCondition" } }, @@ -1215,6 +1225,11 @@ export const AlertRuleResource: msRest.CompositeMapper = { element: { type: { name: "Composite", + polymorphicDiscriminator: { + serializedName: "odata.type", + clientName: "odatatype" + }, + uberParent: "RuleAction", className: "RuleAction" } } @@ -1273,6 +1288,11 @@ export const AlertRuleResourcePatch: msRest.CompositeMapper = { serializedName: "properties.condition", type: { name: "Composite", + polymorphicDiscriminator: { + serializedName: "odata.type", + clientName: "odatatype" + }, + uberParent: "RuleCondition", className: "RuleCondition" } }, @@ -1283,6 +1303,11 @@ export const AlertRuleResourcePatch: msRest.CompositeMapper = { element: { type: { name: "Composite", + polymorphicDiscriminator: { + serializedName: "odata.type", + clientName: "odatatype" + }, + uberParent: "RuleAction", className: "RuleAction" } } @@ -3405,6 +3430,11 @@ export const MetricAlertResource: msRest.CompositeMapper = { serializedName: "properties.criteria", type: { name: "Composite", + polymorphicDiscriminator: { + serializedName: "odata.type", + clientName: "odatatype" + }, + uberParent: "MetricAlertCriteria", className: "MetricAlertCriteria", additionalProperties: { type: { @@ -3522,6 +3552,11 @@ export const MetricAlertResourcePatch: msRest.CompositeMapper = { serializedName: "properties.criteria", type: { name: "Composite", + polymorphicDiscriminator: { + serializedName: "odata.type", + clientName: "odatatype" + }, + uberParent: "MetricAlertCriteria", className: "MetricAlertCriteria", additionalProperties: { type: { @@ -3795,6 +3830,8 @@ export const MetricAlertSingleResourceMultipleMetricCriteria: msRest.CompositeMa element: { type: { name: "Composite", + polymorphicDiscriminator: MultiMetricCriteria.type.polymorphicDiscriminator, + uberParent: "MultiMetricCriteria", className: "MetricCriteria", additionalProperties: MultiMetricCriteria.type.additionalProperties } @@ -3822,6 +3859,11 @@ export const MetricAlertMultipleResourceMultipleMetricCriteria: msRest.Composite element: { type: { name: "Composite", + polymorphicDiscriminator: { + serializedName: "criterionType", + clientName: "criterionType" + }, + uberParent: "MultiMetricCriteria", className: "MultiMetricCriteria", additionalProperties: { type: { @@ -3976,6 +4018,11 @@ export const LogSearchRuleResource: msRest.CompositeMapper = { serializedName: "properties.action", type: { name: "Composite", + polymorphicDiscriminator: { + serializedName: "odata.type", + clientName: "odatatype" + }, + uberParent: "Action", className: "Action" } } diff --git a/packages/@azure/arm-monitor/lib/models/parameters.ts b/packages/@azure/arm-monitor/lib/models/parameters.ts index 5ef95f30f0cf..c87d05523625 100644 --- a/packages/@azure/arm-monitor/lib/models/parameters.ts +++ b/packages/@azure/arm-monitor/lib/models/parameters.ts @@ -8,7 +8,7 @@ * regenerated. */ -import * as msRest from "@azure/ms-rest-js"; +import * as msRest from "ms-rest-js"; export const acceptLanguage: msRest.OperationParameter = { parameterPath: "acceptLanguage", diff --git a/packages/@azure/arm-monitor/lib/monitorManagementClient.ts b/packages/@azure/arm-monitor/lib/monitorManagementClient.ts index e43e7ec70640..bb19131e29d4 100644 --- a/packages/@azure/arm-monitor/lib/monitorManagementClient.ts +++ b/packages/@azure/arm-monitor/lib/monitorManagementClient.ts @@ -8,7 +8,7 @@ * regenerated. */ -import * as msRest from "@azure/ms-rest-js"; +import * as msRest from "ms-rest-js"; import * as Models from "./models"; import * as Mappers from "./models/mappers"; import * as operations from "./operations"; diff --git a/packages/@azure/arm-monitor/lib/monitorManagementClientContext.ts b/packages/@azure/arm-monitor/lib/monitorManagementClientContext.ts index 0d616b0c98e0..ea31015d4ea9 100644 --- a/packages/@azure/arm-monitor/lib/monitorManagementClientContext.ts +++ b/packages/@azure/arm-monitor/lib/monitorManagementClientContext.ts @@ -9,8 +9,8 @@ */ import * as Models from "./models"; -import * as msRest from "@azure/ms-rest-js"; -import * as msRestAzure from "@azure/ms-rest-azure-js"; +import * as msRest from "ms-rest-js"; +import * as msRestAzure from "ms-rest-azure-js"; const packageName = "@azure/arm-monitor"; const packageVersion = "0.1.0"; diff --git a/packages/@azure/arm-monitor/lib/operations/actionGroups.ts b/packages/@azure/arm-monitor/lib/operations/actionGroups.ts index f0d61a682139..b02c4512f0f5 100644 --- a/packages/@azure/arm-monitor/lib/operations/actionGroups.ts +++ b/packages/@azure/arm-monitor/lib/operations/actionGroups.ts @@ -8,7 +8,7 @@ * regenerated. */ -import * as msRest from "@azure/ms-rest-js"; +import * as msRest from "ms-rest-js"; import * as Models from "../models"; import * as Mappers from "../models/actionGroupsMappers"; import * as Parameters from "../models/parameters"; diff --git a/packages/@azure/arm-monitor/lib/operations/activityLogAlerts.ts b/packages/@azure/arm-monitor/lib/operations/activityLogAlerts.ts index 257a6277a91e..8b2c7bbf30a8 100644 --- a/packages/@azure/arm-monitor/lib/operations/activityLogAlerts.ts +++ b/packages/@azure/arm-monitor/lib/operations/activityLogAlerts.ts @@ -8,7 +8,7 @@ * regenerated. */ -import * as msRest from "@azure/ms-rest-js"; +import * as msRest from "ms-rest-js"; import * as Models from "../models"; import * as Mappers from "../models/activityLogAlertsMappers"; import * as Parameters from "../models/parameters"; diff --git a/packages/@azure/arm-monitor/lib/operations/activityLogs.ts b/packages/@azure/arm-monitor/lib/operations/activityLogs.ts index 9bda4449cc43..4cddbfac8137 100644 --- a/packages/@azure/arm-monitor/lib/operations/activityLogs.ts +++ b/packages/@azure/arm-monitor/lib/operations/activityLogs.ts @@ -8,7 +8,7 @@ * regenerated. */ -import * as msRest from "@azure/ms-rest-js"; +import * as msRest from "ms-rest-js"; import * as Models from "../models"; import * as Mappers from "../models/activityLogsMappers"; import * as Parameters from "../models/parameters"; diff --git a/packages/@azure/arm-monitor/lib/operations/alertRuleIncidents.ts b/packages/@azure/arm-monitor/lib/operations/alertRuleIncidents.ts index 77453e3b2b0f..521af17741b1 100644 --- a/packages/@azure/arm-monitor/lib/operations/alertRuleIncidents.ts +++ b/packages/@azure/arm-monitor/lib/operations/alertRuleIncidents.ts @@ -8,7 +8,7 @@ * regenerated. */ -import * as msRest from "@azure/ms-rest-js"; +import * as msRest from "ms-rest-js"; import * as Models from "../models"; import * as Mappers from "../models/alertRuleIncidentsMappers"; import * as Parameters from "../models/parameters"; diff --git a/packages/@azure/arm-monitor/lib/operations/alertRules.ts b/packages/@azure/arm-monitor/lib/operations/alertRules.ts index 79429b70aaf1..f2cef180438f 100644 --- a/packages/@azure/arm-monitor/lib/operations/alertRules.ts +++ b/packages/@azure/arm-monitor/lib/operations/alertRules.ts @@ -8,7 +8,7 @@ * regenerated. */ -import * as msRest from "@azure/ms-rest-js"; +import * as msRest from "ms-rest-js"; import * as Models from "../models"; import * as Mappers from "../models/alertRulesMappers"; import * as Parameters from "../models/parameters"; diff --git a/packages/@azure/arm-monitor/lib/operations/autoscaleSettings.ts b/packages/@azure/arm-monitor/lib/operations/autoscaleSettings.ts index fa3828276d8e..531f8b567e96 100644 --- a/packages/@azure/arm-monitor/lib/operations/autoscaleSettings.ts +++ b/packages/@azure/arm-monitor/lib/operations/autoscaleSettings.ts @@ -8,7 +8,7 @@ * regenerated. */ -import * as msRest from "@azure/ms-rest-js"; +import * as msRest from "ms-rest-js"; import * as Models from "../models"; import * as Mappers from "../models/autoscaleSettingsMappers"; import * as Parameters from "../models/parameters"; diff --git a/packages/@azure/arm-monitor/lib/operations/diagnosticSettingsCategoryOperations.ts b/packages/@azure/arm-monitor/lib/operations/diagnosticSettingsCategoryOperations.ts index 696518269cd8..569fbcd426bb 100644 --- a/packages/@azure/arm-monitor/lib/operations/diagnosticSettingsCategoryOperations.ts +++ b/packages/@azure/arm-monitor/lib/operations/diagnosticSettingsCategoryOperations.ts @@ -8,7 +8,7 @@ * regenerated. */ -import * as msRest from "@azure/ms-rest-js"; +import * as msRest from "ms-rest-js"; import * as Models from "../models"; import * as Mappers from "../models/diagnosticSettingsCategoryOperationsMappers"; import * as Parameters from "../models/parameters"; diff --git a/packages/@azure/arm-monitor/lib/operations/diagnosticSettingsOperations.ts b/packages/@azure/arm-monitor/lib/operations/diagnosticSettingsOperations.ts index 8153aa322d65..f1f458c21d54 100644 --- a/packages/@azure/arm-monitor/lib/operations/diagnosticSettingsOperations.ts +++ b/packages/@azure/arm-monitor/lib/operations/diagnosticSettingsOperations.ts @@ -8,7 +8,7 @@ * regenerated. */ -import * as msRest from "@azure/ms-rest-js"; +import * as msRest from "ms-rest-js"; import * as Models from "../models"; import * as Mappers from "../models/diagnosticSettingsOperationsMappers"; import * as Parameters from "../models/parameters"; diff --git a/packages/@azure/arm-monitor/lib/operations/eventCategories.ts b/packages/@azure/arm-monitor/lib/operations/eventCategories.ts index 67bd8f4311b4..d5e7eeb88a86 100644 --- a/packages/@azure/arm-monitor/lib/operations/eventCategories.ts +++ b/packages/@azure/arm-monitor/lib/operations/eventCategories.ts @@ -8,7 +8,7 @@ * regenerated. */ -import * as msRest from "@azure/ms-rest-js"; +import * as msRest from "ms-rest-js"; import * as Models from "../models"; import * as Mappers from "../models/eventCategoriesMappers"; import * as Parameters from "../models/parameters"; diff --git a/packages/@azure/arm-monitor/lib/operations/logProfiles.ts b/packages/@azure/arm-monitor/lib/operations/logProfiles.ts index 1ae52e5613b7..6523a864e798 100644 --- a/packages/@azure/arm-monitor/lib/operations/logProfiles.ts +++ b/packages/@azure/arm-monitor/lib/operations/logProfiles.ts @@ -8,7 +8,7 @@ * regenerated. */ -import * as msRest from "@azure/ms-rest-js"; +import * as msRest from "ms-rest-js"; import * as Models from "../models"; import * as Mappers from "../models/logProfilesMappers"; import * as Parameters from "../models/parameters"; diff --git a/packages/@azure/arm-monitor/lib/operations/metricAlerts.ts b/packages/@azure/arm-monitor/lib/operations/metricAlerts.ts index 1c3a4c9573f8..824f0b6d87d9 100644 --- a/packages/@azure/arm-monitor/lib/operations/metricAlerts.ts +++ b/packages/@azure/arm-monitor/lib/operations/metricAlerts.ts @@ -8,7 +8,7 @@ * regenerated. */ -import * as msRest from "@azure/ms-rest-js"; +import * as msRest from "ms-rest-js"; import * as Models from "../models"; import * as Mappers from "../models/metricAlertsMappers"; import * as Parameters from "../models/parameters"; @@ -51,7 +51,7 @@ export class MetricAlerts { } /** - * Retrieve alert rule defintions in a resource group. + * Retrieve alert rule definitions in a resource group. * @param resourceGroupName The name of the resource group. * @param [options] The optional parameters * @returns Promise @@ -79,7 +79,7 @@ export class MetricAlerts { } /** - * Retrieve an alert rule definiton. + * 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 @@ -183,7 +183,7 @@ export class MetricAlerts { } /** - * Delete an alert rule defitiniton. + * 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 diff --git a/packages/@azure/arm-monitor/lib/operations/metricAlertsStatus.ts b/packages/@azure/arm-monitor/lib/operations/metricAlertsStatus.ts index 6eb83cdd009a..6f913fb5103c 100644 --- a/packages/@azure/arm-monitor/lib/operations/metricAlertsStatus.ts +++ b/packages/@azure/arm-monitor/lib/operations/metricAlertsStatus.ts @@ -8,7 +8,7 @@ * regenerated. */ -import * as msRest from "@azure/ms-rest-js"; +import * as msRest from "ms-rest-js"; import * as Models from "../models"; import * as Mappers from "../models/metricAlertsStatusMappers"; import * as Parameters from "../models/parameters"; diff --git a/packages/@azure/arm-monitor/lib/operations/metricBaseline.ts b/packages/@azure/arm-monitor/lib/operations/metricBaseline.ts index 0cd73b9d1c3e..e3b61d02975e 100644 --- a/packages/@azure/arm-monitor/lib/operations/metricBaseline.ts +++ b/packages/@azure/arm-monitor/lib/operations/metricBaseline.ts @@ -8,7 +8,7 @@ * regenerated. */ -import * as msRest from "@azure/ms-rest-js"; +import * as msRest from "ms-rest-js"; import * as Models from "../models"; import * as Mappers from "../models/metricBaselineMappers"; import * as Parameters from "../models/parameters"; diff --git a/packages/@azure/arm-monitor/lib/operations/metricDefinitions.ts b/packages/@azure/arm-monitor/lib/operations/metricDefinitions.ts index 23a9932d767b..9fe4766f6c8b 100644 --- a/packages/@azure/arm-monitor/lib/operations/metricDefinitions.ts +++ b/packages/@azure/arm-monitor/lib/operations/metricDefinitions.ts @@ -8,7 +8,7 @@ * regenerated. */ -import * as msRest from "@azure/ms-rest-js"; +import * as msRest from "ms-rest-js"; import * as Models from "../models"; import * as Mappers from "../models/metricDefinitionsMappers"; import * as Parameters from "../models/parameters"; diff --git a/packages/@azure/arm-monitor/lib/operations/metricNamespaces.ts b/packages/@azure/arm-monitor/lib/operations/metricNamespaces.ts index 7c9bb71069fe..c87c060be5f4 100644 --- a/packages/@azure/arm-monitor/lib/operations/metricNamespaces.ts +++ b/packages/@azure/arm-monitor/lib/operations/metricNamespaces.ts @@ -8,7 +8,7 @@ * regenerated. */ -import * as msRest from "@azure/ms-rest-js"; +import * as msRest from "ms-rest-js"; import * as Models from "../models"; import * as Mappers from "../models/metricNamespacesMappers"; import * as Parameters from "../models/parameters"; diff --git a/packages/@azure/arm-monitor/lib/operations/metrics.ts b/packages/@azure/arm-monitor/lib/operations/metrics.ts index 0a6f29b9680e..7cd489206d36 100644 --- a/packages/@azure/arm-monitor/lib/operations/metrics.ts +++ b/packages/@azure/arm-monitor/lib/operations/metrics.ts @@ -8,7 +8,7 @@ * regenerated. */ -import * as msRest from "@azure/ms-rest-js"; +import * as msRest from "ms-rest-js"; import * as Models from "../models"; import * as Mappers from "../models/metricsMappers"; import * as Parameters from "../models/parameters"; diff --git a/packages/@azure/arm-monitor/lib/operations/operations.ts b/packages/@azure/arm-monitor/lib/operations/operations.ts index a6faf8a59a89..aff8e6ae8253 100644 --- a/packages/@azure/arm-monitor/lib/operations/operations.ts +++ b/packages/@azure/arm-monitor/lib/operations/operations.ts @@ -8,7 +8,7 @@ * regenerated. */ -import * as msRest from "@azure/ms-rest-js"; +import * as msRest from "ms-rest-js"; import * as Models from "../models"; import * as Mappers from "../models/operationsMappers"; import * as Parameters from "../models/parameters"; diff --git a/packages/@azure/arm-monitor/lib/operations/scheduledQueryRules.ts b/packages/@azure/arm-monitor/lib/operations/scheduledQueryRules.ts index 5acc255f18d7..ad81c5b6d00e 100644 --- a/packages/@azure/arm-monitor/lib/operations/scheduledQueryRules.ts +++ b/packages/@azure/arm-monitor/lib/operations/scheduledQueryRules.ts @@ -8,7 +8,7 @@ * regenerated. */ -import * as msRest from "@azure/ms-rest-js"; +import * as msRest from "ms-rest-js"; import * as Models from "../models"; import * as Mappers from "../models/scheduledQueryRulesMappers"; import * as Parameters from "../models/parameters"; diff --git a/packages/@azure/arm-monitor/lib/operations/tenantActivityLogs.ts b/packages/@azure/arm-monitor/lib/operations/tenantActivityLogs.ts index 30986812843b..7d1e2dde902f 100644 --- a/packages/@azure/arm-monitor/lib/operations/tenantActivityLogs.ts +++ b/packages/@azure/arm-monitor/lib/operations/tenantActivityLogs.ts @@ -8,7 +8,7 @@ * regenerated. */ -import * as msRest from "@azure/ms-rest-js"; +import * as msRest from "ms-rest-js"; import * as Models from "../models"; import * as Mappers from "../models/tenantActivityLogsMappers"; import * as Parameters from "../models/parameters"; diff --git a/packages/@azure/arm-monitor/package.json b/packages/@azure/arm-monitor/package.json index fad916557df9..58c3226d5cd1 100644 --- a/packages/@azure/arm-monitor/package.json +++ b/packages/@azure/arm-monitor/package.json @@ -4,8 +4,8 @@ "description": "MonitorManagementClient Library with typescript type definitions for node.js and browser.", "version": "0.1.0", "dependencies": { - "@azure/ms-rest-azure-js": "^1.1.0", - "@azure/ms-rest-js": "^1.1.0", + "ms-rest-azure-js": "^1.0.181", + "ms-rest-js": "^1.0.460", "tslib": "^1.9.3" }, "keywords": [ diff --git a/packages/@azure/arm-monitor/rollup.config.js b/packages/@azure/arm-monitor/rollup.config.js index e555311a8a69..7f4f681c7ceb 100644 --- a/packages/@azure/arm-monitor/rollup.config.js +++ b/packages/@azure/arm-monitor/rollup.config.js @@ -4,15 +4,15 @@ import nodeResolve from "rollup-plugin-node-resolve"; */ const config = { input: './esm/monitorManagementClient.js', - external: ["@azure/ms-rest-js", "@azure/ms-rest-azure-js"], + external: ["ms-rest-js", "ms-rest-azure-js"], output: { file: "./dist/arm-monitor.js", format: "umd", name: "Azure.ArmMonitor", sourcemap: true, globals: { - "@azure/ms-rest-js": "msRest", - "@azure/ms-rest-azure-js": "msRestAzure" + "ms-rest-js": "msRest", + "ms-rest-azure-js": "msRestAzure" }, banner: `/* * Copyright (c) Microsoft Corporation. All rights reserved. diff --git a/packages/@azure/arm-monitor/tsconfig.json b/packages/@azure/arm-monitor/tsconfig.json index 51ea90961ce5..f32d1664f320 100644 --- a/packages/@azure/arm-monitor/tsconfig.json +++ b/packages/@azure/arm-monitor/tsconfig.json @@ -14,6 +14,6 @@ "outDir": "./esm", "importHelpers": true }, - "include": ["./lib/**/*.ts"], + "include": ["./lib/**/*"], "exclude": ["node_modules"] } From c8ba8185db4436edb976ceb4d610278f7a5dfcea Mon Sep 17 00:00:00 2001 From: Azure SDK for Python bot Date: Mon, 14 Jan 2019 10:51:03 -0800 Subject: [PATCH 2/2] [AutoPR monitor/resource-manager] [Hub Generated] Review request for Microsoft.Insights to add version 2018-11-27-preview (#898) * Generated from 0be37eb03c8233b5ffac681528d5de5f424c4f2e Fix readme * Generated from 9771d96d4a2f4caa435cd59ae81736e910b8ee89 Update Python version --- packages/@azure/arm-monitor/LICENSE.txt | 2 +- .../lib/models/actionGroupsMappers.ts | 4 + .../lib/models/activityLogAlertsMappers.ts | 4 + .../lib/models/alertRulesMappers.ts | 6 +- .../lib/models/autoscaleSettingsMappers.ts | 4 + ...nosticSettingsCategoryOperationsMappers.ts | 4 + .../diagnosticSettingsOperationsMappers.ts | 4 + .../@azure/arm-monitor/lib/models/index.ts | 162 +++++++++++++++++ .../lib/models/logProfilesMappers.ts | 4 + .../@azure/arm-monitor/lib/models/mappers.ts | 165 ++++++++++++++++++ .../lib/models/metricAlertsMappers.ts | 4 + .../arm-monitor/lib/models/parameters.ts | 12 ++ .../lib/models/scheduledQueryRulesMappers.ts | 4 + .../lib/models/vMInsightsMappers.ts | 89 ++++++++++ .../lib/monitorManagementClient.ts | 2 + .../arm-monitor/lib/operations/index.ts | 1 + .../arm-monitor/lib/operations/vMInsights.ts | 84 +++++++++ 17 files changed, 553 insertions(+), 2 deletions(-) create mode 100644 packages/@azure/arm-monitor/lib/models/vMInsightsMappers.ts create mode 100644 packages/@azure/arm-monitor/lib/operations/vMInsights.ts diff --git a/packages/@azure/arm-monitor/LICENSE.txt b/packages/@azure/arm-monitor/LICENSE.txt index 5431ba98b936..8f3d856145c5 100644 --- a/packages/@azure/arm-monitor/LICENSE.txt +++ b/packages/@azure/arm-monitor/LICENSE.txt @@ -1,6 +1,6 @@ The MIT License (MIT) -Copyright (c) 2018 Microsoft +Copyright (c) 2019 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 diff --git a/packages/@azure/arm-monitor/lib/models/actionGroupsMappers.ts b/packages/@azure/arm-monitor/lib/models/actionGroupsMappers.ts index 53d5695a1c78..f82386176f02 100644 --- a/packages/@azure/arm-monitor/lib/models/actionGroupsMappers.ts +++ b/packages/@azure/arm-monitor/lib/models/actionGroupsMappers.ts @@ -74,6 +74,10 @@ export { LogToMetricAction, Criteria, Dimension, + ProxyResource, + VMInsightsOnboardingStatus, + DataContainer, + WorkspaceInfo, RuleMetricDataSource, RuleManagementEventDataSource, RuleManagementEventClaimsDataSource, diff --git a/packages/@azure/arm-monitor/lib/models/activityLogAlertsMappers.ts b/packages/@azure/arm-monitor/lib/models/activityLogAlertsMappers.ts index e4cc468d09ea..67f2f8620315 100644 --- a/packages/@azure/arm-monitor/lib/models/activityLogAlertsMappers.ts +++ b/packages/@azure/arm-monitor/lib/models/activityLogAlertsMappers.ts @@ -73,6 +73,10 @@ export { LogToMetricAction, Criteria, Dimension, + ProxyResource, + VMInsightsOnboardingStatus, + DataContainer, + WorkspaceInfo, RuleMetricDataSource, RuleManagementEventDataSource, RuleManagementEventClaimsDataSource, diff --git a/packages/@azure/arm-monitor/lib/models/alertRulesMappers.ts b/packages/@azure/arm-monitor/lib/models/alertRulesMappers.ts index bbe7045ea932..6bc1621bff66 100644 --- a/packages/@azure/arm-monitor/lib/models/alertRulesMappers.ts +++ b/packages/@azure/arm-monitor/lib/models/alertRulesMappers.ts @@ -82,6 +82,10 @@ export { LogMetricTrigger, LogToMetricAction, Criteria, - Dimension + Dimension, + ProxyResource, + VMInsightsOnboardingStatus, + DataContainer, + WorkspaceInfo } from "../models/mappers"; diff --git a/packages/@azure/arm-monitor/lib/models/autoscaleSettingsMappers.ts b/packages/@azure/arm-monitor/lib/models/autoscaleSettingsMappers.ts index 8c7d0ba811f5..2bc95305002c 100644 --- a/packages/@azure/arm-monitor/lib/models/autoscaleSettingsMappers.ts +++ b/packages/@azure/arm-monitor/lib/models/autoscaleSettingsMappers.ts @@ -73,6 +73,10 @@ export { LogToMetricAction, Criteria, Dimension, + ProxyResource, + VMInsightsOnboardingStatus, + DataContainer, + WorkspaceInfo, RuleMetricDataSource, RuleManagementEventDataSource, RuleManagementEventClaimsDataSource, diff --git a/packages/@azure/arm-monitor/lib/models/diagnosticSettingsCategoryOperationsMappers.ts b/packages/@azure/arm-monitor/lib/models/diagnosticSettingsCategoryOperationsMappers.ts index 950be5c454e8..f07e074b42e6 100644 --- a/packages/@azure/arm-monitor/lib/models/diagnosticSettingsCategoryOperationsMappers.ts +++ b/packages/@azure/arm-monitor/lib/models/diagnosticSettingsCategoryOperationsMappers.ts @@ -72,6 +72,10 @@ export { LogToMetricAction, Criteria, Dimension, + ProxyResource, + VMInsightsOnboardingStatus, + DataContainer, + WorkspaceInfo, RuleMetricDataSource, RuleManagementEventDataSource, RuleManagementEventClaimsDataSource, diff --git a/packages/@azure/arm-monitor/lib/models/diagnosticSettingsOperationsMappers.ts b/packages/@azure/arm-monitor/lib/models/diagnosticSettingsOperationsMappers.ts index 789ae57fee33..863aeb561391 100644 --- a/packages/@azure/arm-monitor/lib/models/diagnosticSettingsOperationsMappers.ts +++ b/packages/@azure/arm-monitor/lib/models/diagnosticSettingsOperationsMappers.ts @@ -72,6 +72,10 @@ export { LogToMetricAction, Criteria, Dimension, + ProxyResource, + VMInsightsOnboardingStatus, + DataContainer, + WorkspaceInfo, RuleMetricDataSource, RuleManagementEventDataSource, RuleManagementEventClaimsDataSource, diff --git a/packages/@azure/arm-monitor/lib/models/index.ts b/packages/@azure/arm-monitor/lib/models/index.ts index 53887b774446..ee408cf7f166 100644 --- a/packages/@azure/arm-monitor/lib/models/index.ts +++ b/packages/@azure/arm-monitor/lib/models/index.ts @@ -3142,6 +3142,133 @@ export interface MetricNamespace { 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. @@ -3702,6 +3829,22 @@ export type MetricTriggerType = 'Consecutive' | 'Total'; */ 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' @@ -4773,3 +4916,22 @@ export type MetricNamespacesListResponse = MetricNamespaceCollection & { 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/packages/@azure/arm-monitor/lib/models/logProfilesMappers.ts b/packages/@azure/arm-monitor/lib/models/logProfilesMappers.ts index 9070b1ac4fca..ead70ba0e22f 100644 --- a/packages/@azure/arm-monitor/lib/models/logProfilesMappers.ts +++ b/packages/@azure/arm-monitor/lib/models/logProfilesMappers.ts @@ -74,6 +74,10 @@ export { LogToMetricAction, Criteria, Dimension, + ProxyResource, + VMInsightsOnboardingStatus, + DataContainer, + WorkspaceInfo, RuleMetricDataSource, RuleManagementEventDataSource, RuleManagementEventClaimsDataSource, diff --git a/packages/@azure/arm-monitor/lib/models/mappers.ts b/packages/@azure/arm-monitor/lib/models/mappers.ts index ce345c4239d3..1e67ed855fd3 100644 --- a/packages/@azure/arm-monitor/lib/models/mappers.ts +++ b/packages/@azure/arm-monitor/lib/models/mappers.ts @@ -4336,6 +4336,171 @@ export const MetricNamespace: msRest.CompositeMapper = { } }; +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: { diff --git a/packages/@azure/arm-monitor/lib/models/metricAlertsMappers.ts b/packages/@azure/arm-monitor/lib/models/metricAlertsMappers.ts index e0f90d85c3a2..6a82999404da 100644 --- a/packages/@azure/arm-monitor/lib/models/metricAlertsMappers.ts +++ b/packages/@azure/arm-monitor/lib/models/metricAlertsMappers.ts @@ -74,6 +74,10 @@ export { LogToMetricAction, Criteria, Dimension, + ProxyResource, + VMInsightsOnboardingStatus, + DataContainer, + WorkspaceInfo, RuleMetricDataSource, RuleManagementEventDataSource, RuleManagementEventClaimsDataSource, diff --git a/packages/@azure/arm-monitor/lib/models/parameters.ts b/packages/@azure/arm-monitor/lib/models/parameters.ts index c87d05523625..e9af116f5cbc 100644 --- a/packages/@azure/arm-monitor/lib/models/parameters.ts +++ b/packages/@azure/arm-monitor/lib/models/parameters.ts @@ -76,6 +76,18 @@ export const apiVersion1: msRest.OperationQueryParameter = { } } }; +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: { diff --git a/packages/@azure/arm-monitor/lib/models/scheduledQueryRulesMappers.ts b/packages/@azure/arm-monitor/lib/models/scheduledQueryRulesMappers.ts index 5e0f5a7ca486..8ec8287c4650 100644 --- a/packages/@azure/arm-monitor/lib/models/scheduledQueryRulesMappers.ts +++ b/packages/@azure/arm-monitor/lib/models/scheduledQueryRulesMappers.ts @@ -73,6 +73,10 @@ export { LogToMetricAction, Criteria, Dimension, + ProxyResource, + VMInsightsOnboardingStatus, + DataContainer, + WorkspaceInfo, RuleMetricDataSource, RuleManagementEventDataSource, RuleManagementEventClaimsDataSource, diff --git a/packages/@azure/arm-monitor/lib/models/vMInsightsMappers.ts b/packages/@azure/arm-monitor/lib/models/vMInsightsMappers.ts new file mode 100644 index 000000000000..09baeb99f62e --- /dev/null +++ b/packages/@azure/arm-monitor/lib/models/vMInsightsMappers.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. + */ + +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, + 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/packages/@azure/arm-monitor/lib/monitorManagementClient.ts b/packages/@azure/arm-monitor/lib/monitorManagementClient.ts index bb19131e29d4..260e58d979a8 100644 --- a/packages/@azure/arm-monitor/lib/monitorManagementClient.ts +++ b/packages/@azure/arm-monitor/lib/monitorManagementClient.ts @@ -36,6 +36,7 @@ class MonitorManagementClient extends MonitorManagementClientContext { metricAlertsStatus: operations.MetricAlertsStatus; scheduledQueryRules: operations.ScheduledQueryRules; metricNamespaces: operations.MetricNamespaces; + vMInsights: operations.VMInsights; /** * Initializes a new instance of the MonitorManagementClient class. @@ -64,6 +65,7 @@ class MonitorManagementClient extends MonitorManagementClientContext { this.metricAlertsStatus = new operations.MetricAlertsStatus(this); this.scheduledQueryRules = new operations.ScheduledQueryRules(this); this.metricNamespaces = new operations.MetricNamespaces(this); + this.vMInsights = new operations.VMInsights(this); } } diff --git a/packages/@azure/arm-monitor/lib/operations/index.ts b/packages/@azure/arm-monitor/lib/operations/index.ts index 31be4b8d015e..52167a43fd1b 100644 --- a/packages/@azure/arm-monitor/lib/operations/index.ts +++ b/packages/@azure/arm-monitor/lib/operations/index.ts @@ -27,3 +27,4 @@ export * from "./metricAlerts"; export * from "./metricAlertsStatus"; export * from "./scheduledQueryRules"; export * from "./metricNamespaces"; +export * from "./vMInsights"; diff --git a/packages/@azure/arm-monitor/lib/operations/vMInsights.ts b/packages/@azure/arm-monitor/lib/operations/vMInsights.ts new file mode 100644 index 000000000000..919033d46311 --- /dev/null +++ b/packages/@azure/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 "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 +};