Skip to content
This repository was archived by the owner on May 5, 2023. It is now read-only.
Merged
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
42 changes: 42 additions & 0 deletions lib/services/monitorManagement/lib/models/index.d.ts
Original file line number Diff line number Diff line change
Expand Up @@ -2419,6 +2419,38 @@ export interface AlertingAction extends Action {
trigger: TriggerCondition;
}

/**
* @class
* Initializes a new instance of the MetricNamespaceName class.
* @constructor
* The fully qualified metric namespace name.
*
* @member {string} [metricNamespaceName] The metric namespace name.
*/
export interface MetricNamespaceName {
metricNamespaceName?: string;
}

/**
* @class
* Initializes a new instance of the MetricNamespace class.
* @constructor
* Metric namespace class specifies the metadata for a metric namespace.
*
* @member {string} [id] The ID of the metricNamespace.
* @member {string} [type] The type of the namespace.
* @member {string} [name] The name of the namespace.
* @member {object} [properties] Properties which include the fully qualified
* namespace name.
* @member {string} [properties.metricNamespaceName] The metric namespace name.
*/
export interface MetricNamespace {
id?: string;
type?: string;
name?: string;
properties?: MetricNamespaceName;
}


/**
* @class
Expand Down Expand Up @@ -2541,3 +2573,13 @@ export interface MetricAlertResourceCollection extends Array<MetricAlertResource
*/
export interface LogSearchRuleResourceCollection extends Array<LogSearchRuleResource> {
}

/**
* @class
* Initializes a new instance of the MetricNamespaceCollection class.
* @constructor
* Represents collection of metric namespaces.
*
*/
export interface MetricNamespaceCollection extends Array<MetricNamespace> {
}
3 changes: 3 additions & 0 deletions lib/services/monitorManagement/lib/models/index.js
Original file line number Diff line number Diff line change
Expand Up @@ -114,6 +114,8 @@ exports.LogMetricTrigger = require('./logMetricTrigger');
exports.TriggerCondition = require('./triggerCondition');
exports.AzNsActionGroup = require('./azNsActionGroup');
exports.AlertingAction = require('./alertingAction');
exports.MetricNamespaceName = require('./metricNamespaceName');
exports.MetricNamespace = require('./metricNamespace');
exports.AutoscaleSettingResourceCollection = require('./autoscaleSettingResourceCollection');
exports.IncidentListResult = require('./incidentListResult');
exports.AlertRuleResourceCollection = require('./alertRuleResourceCollection');
Expand All @@ -125,6 +127,7 @@ exports.EventCategoryCollection = require('./eventCategoryCollection');
exports.MetricDefinitionCollection = require('./metricDefinitionCollection');
exports.MetricAlertResourceCollection = require('./metricAlertResourceCollection');
exports.LogSearchRuleResourceCollection = require('./logSearchRuleResourceCollection');
exports.MetricNamespaceCollection = require('./metricNamespaceCollection');
exports.discriminators = {
'RuleDataSource' : exports.RuleDataSource,
'RuleCondition' : exports.RuleCondition,
Expand Down
80 changes: 80 additions & 0 deletions lib/services/monitorManagement/lib/models/metricNamespace.js
Original file line number Diff line number Diff line change
@@ -0,0 +1,80 @@
/*
* 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.
*/

'use strict';

/**
* Metric namespace class specifies the metadata for a metric namespace.
*
*/
class MetricNamespace {
/**
* Create a MetricNamespace.
* @member {string} [id] The ID of the metricNamespace.
* @member {string} [type] The type of the namespace.
* @member {string} [name] The name of the namespace.
* @member {object} [properties] Properties which include the fully qualified
* namespace name.
* @member {string} [properties.metricNamespaceName] The metric namespace
* name.
*/
constructor() {
}

/**
* Defines the metadata of MetricNamespace
*
* @returns {object} metadata of MetricNamespace
*
*/
mapper() {
return {
required: false,
serializedName: 'MetricNamespace',
type: {
name: 'Composite',
className: 'MetricNamespace',
modelProperties: {
id: {
required: false,
serializedName: 'id',
type: {
name: 'String'
}
},
type: {
required: false,
serializedName: 'type',
type: {
name: 'String'
}
},
name: {
required: false,
serializedName: 'name',
type: {
name: 'String'
}
},
properties: {
required: false,
serializedName: 'properties',
type: {
name: 'Composite',
className: 'MetricNamespaceName'
}
}
}
}
};
}
}

module.exports = MetricNamespace;
Original file line number Diff line number Diff line change
@@ -0,0 +1,59 @@
/*
* 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.
*/

'use strict';

/**
* Represents collection of metric namespaces.
*/
class MetricNamespaceCollection extends Array {
/**
* Create a MetricNamespaceCollection.
*/
constructor() {
super();
}

/**
* Defines the metadata of MetricNamespaceCollection
*
* @returns {object} metadata of MetricNamespaceCollection
*
*/
mapper() {
return {
required: false,
serializedName: 'MetricNamespaceCollection',
type: {
name: 'Composite',
className: 'MetricNamespaceCollection',
modelProperties: {
value: {
required: true,
serializedName: '',
type: {
name: 'Sequence',
element: {
required: false,
serializedName: 'MetricNamespaceElementType',
type: {
name: 'Composite',
className: 'MetricNamespace'
}
}
}
}
}
}
};
}
}

module.exports = MetricNamespaceCollection;
52 changes: 52 additions & 0 deletions lib/services/monitorManagement/lib/models/metricNamespaceName.js
Original file line number Diff line number Diff line change
@@ -0,0 +1,52 @@
/*
* 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.
*/

'use strict';

/**
* The fully qualified metric namespace name.
*
*/
class MetricNamespaceName {
/**
* Create a MetricNamespaceName.
* @member {string} [metricNamespaceName] The metric namespace name.
*/
constructor() {
}

/**
* Defines the metadata of MetricNamespaceName
*
* @returns {object} metadata of MetricNamespaceName
*
*/
mapper() {
return {
required: false,
serializedName: 'MetricNamespaceName',
type: {
name: 'Composite',
className: 'MetricNamespaceName',
modelProperties: {
metricNamespaceName: {
required: false,
serializedName: 'metricNamespaceName',
type: {
name: 'String'
}
}
}
}
};
}
}

module.exports = MetricNamespaceName;
Original file line number Diff line number Diff line change
Expand Up @@ -72,6 +72,7 @@ export default class MonitorManagementClient extends AzureServiceClient {
metricAlerts: operations.MetricAlerts;
metricAlertsStatus: operations.MetricAlertsStatus;
scheduledQueryRules: operations.ScheduledQueryRules;
metricNamespaces: operations.MetricNamespaces;
}

export { MonitorManagementClient, models as MonitorManagementModels };
Original file line number Diff line number Diff line change
Expand Up @@ -89,6 +89,7 @@ class MonitorManagementClient extends ServiceClient {
this.metricAlerts = new operations.MetricAlerts(this);
this.metricAlertsStatus = new operations.MetricAlertsStatus(this);
this.scheduledQueryRules = new operations.ScheduledQueryRules(this);
this.metricNamespaces = new operations.MetricNamespaces(this);
this.models = models;
msRest.addSerializationMixin(this);
}
Expand Down
71 changes: 71 additions & 0 deletions lib/services/monitorManagement/lib/operations/index.d.ts
Original file line number Diff line number Diff line change
Expand Up @@ -4932,3 +4932,74 @@ export interface ScheduledQueryRules {
listByResourceGroup(resourceGroupName: string, callback: ServiceCallback<models.LogSearchRuleResourceCollection>): void;
listByResourceGroup(resourceGroupName: string, options: { filter? : string, customHeaders? : { [headerName: string]: string; } }, callback: ServiceCallback<models.LogSearchRuleResourceCollection>): void;
}

/**
* @class
* MetricNamespaces
* __NOTE__: An instance of this class is automatically created for an
* instance of the MonitorManagementClient.
*/
export interface MetricNamespaces {


/**
* Lists the metric namespaces for the resource.
*
* @param {string} resourceUri The identifier of the resource.
*
* @param {object} [options] Optional Parameters.
*
* @param {string} [options.startTime] The ISO 8601 conform Date start time
* from which to query for metric namespaces.
*
* @param {object} [options.customHeaders] Headers that will be added to the
* request
*
* @returns {Promise} A promise is returned
*
* @resolve {HttpOperationResponse<MetricNamespaceCollection>} - The deserialized result object.
*
* @reject {Error|ServiceError} - The error object.
*/
listWithHttpOperationResponse(resourceUri: string, options?: { startTime? : string, customHeaders? : { [headerName: string]: string; } }): Promise<HttpOperationResponse<models.MetricNamespaceCollection>>;

/**
* Lists the metric namespaces for the resource.
*
* @param {string} resourceUri The identifier of the resource.
*
* @param {object} [options] Optional Parameters.
*
* @param {string} [options.startTime] The ISO 8601 conform Date start time
* from which to query for metric namespaces.
*
* @param {object} [options.customHeaders] Headers that will be added to the
* request
*
* @param {ServiceCallback} [optionalCallback] - The optional callback.
*
* @returns {ServiceCallback|Promise} If a callback was passed as the last
* parameter then it returns the callback else returns a Promise.
*
* {Promise} A promise is returned.
*
* @resolve {MetricNamespaceCollection} - The deserialized result object.
*
* @reject {Error|ServiceError} - The error object.
*
* {ServiceCallback} optionalCallback(err, result, request, response)
*
* {Error|ServiceError} err - The Error object if an error occurred, null otherwise.
*
* {MetricNamespaceCollection} [result] - The deserialized result object if an error did not occur.
* See {@link MetricNamespaceCollection} for more
* information.
*
* {WebResource} [request] - The HTTP Request object if an error did not occur.
*
* {http.IncomingMessage} [response] - The HTTP Response stream if an error did not occur.
*/
list(resourceUri: string, options?: { startTime? : string, customHeaders? : { [headerName: string]: string; } }): Promise<models.MetricNamespaceCollection>;
list(resourceUri: string, callback: ServiceCallback<models.MetricNamespaceCollection>): void;
list(resourceUri: string, options: { startTime? : string, customHeaders? : { [headerName: string]: string; } }, callback: ServiceCallback<models.MetricNamespaceCollection>): void;
}
1 change: 1 addition & 0 deletions lib/services/monitorManagement/lib/operations/index.js
Original file line number Diff line number Diff line change
Expand Up @@ -32,3 +32,4 @@ exports.MetricBaseline = require('./metricBaseline');
exports.MetricAlerts = require('./metricAlerts');
exports.MetricAlertsStatus = require('./metricAlertsStatus');
exports.ScheduledQueryRules = require('./scheduledQueryRules');
exports.MetricNamespaces = require('./metricNamespaces');
Loading