@azure/arm-monitor
Version:
A generated SDK for MonitorClient.
77 lines • 4.64 kB
JavaScript
/*
* Copyright (c) Microsoft Corporation.
* Licensed under the MIT License.
*
* Code generated by Microsoft (R) AutoRest Code Generator.
* Changes may cause incorrect behavior and will be lost if the code is regenerated.
*/
import * as coreClient from "@azure/core-client";
import { AutoscaleSettingsImpl, OperationsImpl, AlertRuleIncidentsImpl, AlertRulesImpl, LogProfilesImpl, DiagnosticSettingsImpl, DiagnosticSettingsCategoryImpl, ActionGroupsImpl, ActivityLogsImpl, EventCategoriesImpl, TenantActivityLogsImpl, MetricDefinitionsImpl, MetricsImpl, BaselinesImpl, MetricAlertsImpl, MetricAlertsStatusImpl, ScheduledQueryRulesImpl, MetricNamespacesImpl, VMInsightsImpl, PrivateLinkScopesImpl, PrivateLinkScopeOperationStatusImpl, PrivateLinkResourcesImpl, PrivateEndpointConnectionsImpl, PrivateLinkScopedResourcesImpl, ActivityLogAlertsImpl, DataCollectionEndpointsImpl, DataCollectionRuleAssociationsImpl, DataCollectionRulesImpl } from "./operations";
export class MonitorClient extends coreClient.ServiceClient {
/**
* Initializes a new instance of the MonitorClient class.
* @param credentials Subscription credentials which uniquely identify client subscription.
* @param subscriptionId The ID of the target subscription.
* @param options The parameter options
*/
constructor(credentials, subscriptionId, options) {
if (credentials === undefined) {
throw new Error("'credentials' cannot be null");
}
if (subscriptionId === undefined) {
throw new Error("'subscriptionId' cannot be null");
}
// Initializing default values for options
if (!options) {
options = {};
}
const defaults = {
requestContentType: "application/json; charset=utf-8",
credential: credentials
};
const packageDetails = `azsdk-js-arm-monitor/7.0.0`;
const userAgentPrefix = options.userAgentOptions && options.userAgentOptions.userAgentPrefix
? `${options.userAgentOptions.userAgentPrefix} ${packageDetails}`
: `${packageDetails}`;
if (!options.credentialScopes) {
options.credentialScopes = ["https://management.azure.com/.default"];
}
const optionsWithDefaults = Object.assign(Object.assign(Object.assign({}, defaults), options), { userAgentOptions: {
userAgentPrefix
}, baseUri: options.endpoint || "https://management.azure.com" });
super(optionsWithDefaults);
// Parameter assignments
this.subscriptionId = subscriptionId;
// Assigning values to Constant parameters
this.$host = options.$host || "https://management.azure.com";
this.autoscaleSettings = new AutoscaleSettingsImpl(this);
this.operations = new OperationsImpl(this);
this.alertRuleIncidents = new AlertRuleIncidentsImpl(this);
this.alertRules = new AlertRulesImpl(this);
this.logProfiles = new LogProfilesImpl(this);
this.diagnosticSettings = new DiagnosticSettingsImpl(this);
this.diagnosticSettingsCategory = new DiagnosticSettingsCategoryImpl(this);
this.actionGroups = new ActionGroupsImpl(this);
this.activityLogs = new ActivityLogsImpl(this);
this.eventCategories = new EventCategoriesImpl(this);
this.tenantActivityLogs = new TenantActivityLogsImpl(this);
this.metricDefinitions = new MetricDefinitionsImpl(this);
this.metrics = new MetricsImpl(this);
this.baselines = new BaselinesImpl(this);
this.metricAlerts = new MetricAlertsImpl(this);
this.metricAlertsStatus = new MetricAlertsStatusImpl(this);
this.scheduledQueryRules = new ScheduledQueryRulesImpl(this);
this.metricNamespaces = new MetricNamespacesImpl(this);
this.vMInsights = new VMInsightsImpl(this);
this.privateLinkScopes = new PrivateLinkScopesImpl(this);
this.privateLinkScopeOperationStatus = new PrivateLinkScopeOperationStatusImpl(this);
this.privateLinkResources = new PrivateLinkResourcesImpl(this);
this.privateEndpointConnections = new PrivateEndpointConnectionsImpl(this);
this.privateLinkScopedResources = new PrivateLinkScopedResourcesImpl(this);
this.activityLogAlerts = new ActivityLogAlertsImpl(this);
this.dataCollectionEndpoints = new DataCollectionEndpointsImpl(this);
this.dataCollectionRuleAssociations = new DataCollectionRuleAssociationsImpl(this);
this.dataCollectionRules = new DataCollectionRulesImpl(this);
}
}
//# sourceMappingURL=monitorClient.js.map