UNPKG

azure-arm-insights

Version:

Microsoft Azure Insights Management Client Library for node

1,082 lines (1,030 loc) 58.8 kB
/* * 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 { ServiceClientOptions, RequestOptions, ServiceCallback, HttpOperationResponse } from 'ms-rest'; import * as models from '../models'; /** * @class * AutoscaleSettings * __NOTE__: An instance of this class is automatically created for an * instance of the InsightsManagementClient. */ export interface AutoscaleSettings { /** * Lists the autoscale settings for a resource group * * @param {string} resourceGroupName The name of the resource group. * * @param {object} [options] Optional Parameters. * * @param {string} [options.filter] The filter to apply on the operation. For * more information please see * https://msdn.microsoft.com/en-us/library/azure/dn931934.aspx * * @param {object} [options.customHeaders] Headers that will be added to the * request * * @returns {Promise} A promise is returned * * @resolve {HttpOperationResponse<AutoscaleSettingResourceCollection>} - The deserialized result object. * * @reject {Error|ServiceError} - The error object. */ listByResourceGroupWithHttpOperationResponse(resourceGroupName: string, options?: { filter? : string, customHeaders? : { [headerName: string]: string; } }): Promise<HttpOperationResponse<models.AutoscaleSettingResourceCollection>>; /** * Lists the autoscale settings for a resource group * * @param {string} resourceGroupName The name of the resource group. * * @param {object} [options] Optional Parameters. * * @param {string} [options.filter] The filter to apply on the operation. For * more information please see * https://msdn.microsoft.com/en-us/library/azure/dn931934.aspx * * @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 {AutoscaleSettingResourceCollection} - 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. * * {AutoscaleSettingResourceCollection} [result] - The deserialized result object if an error did not occur. * See {@link AutoscaleSettingResourceCollection} 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. */ listByResourceGroup(resourceGroupName: string, options?: { filter? : string, customHeaders? : { [headerName: string]: string; } }): Promise<models.AutoscaleSettingResourceCollection>; listByResourceGroup(resourceGroupName: string, callback: ServiceCallback<models.AutoscaleSettingResourceCollection>): void; listByResourceGroup(resourceGroupName: string, options: { filter? : string, customHeaders? : { [headerName: string]: string; } }, callback: ServiceCallback<models.AutoscaleSettingResourceCollection>): void; /** * Creates or updates an autoscale setting. * * @param {string} resourceGroupName The name of the resource group. * * @param {string} autoscaleSettingName The autoscale setting name. * * @param {object} parameters Parameters supplied to the operation. * * @param {array} parameters.profiles the collection of automatic scaling * profiles that specify different scaling parameters for different time * periods. A maximum of 20 profiles can be specified. * * @param {array} [parameters.notifications] the collection of notifications. * * @param {boolean} [parameters.enabled] the enabled flag. Specifies whether * automatic scaling is enabled for the resource. The default value is 'true'. * * @param {string} parameters.autoscaleSettingResourceName the name of the * autoscale setting. * * @param {string} [parameters.targetResourceUri] the resource identifier of * the resource that the autoscale setting should be added to. * * @param {string} [parameters.name] Azure resource name * * @param {string} parameters.location Resource location * * @param {object} [parameters.tags] Resource tags * * @param {object} [options] Optional Parameters. * * @param {object} [options.customHeaders] Headers that will be added to the * request * * @returns {Promise} A promise is returned * * @resolve {HttpOperationResponse<AutoscaleSettingResource>} - The deserialized result object. * * @reject {Error|ServiceError} - The error object. */ createOrUpdateWithHttpOperationResponse(resourceGroupName: string, autoscaleSettingName: string, parameters: models.AutoscaleSettingResource, options?: { customHeaders? : { [headerName: string]: string; } }): Promise<HttpOperationResponse<models.AutoscaleSettingResource>>; /** * Creates or updates an autoscale setting. * * @param {string} resourceGroupName The name of the resource group. * * @param {string} autoscaleSettingName The autoscale setting name. * * @param {object} parameters Parameters supplied to the operation. * * @param {array} parameters.profiles the collection of automatic scaling * profiles that specify different scaling parameters for different time * periods. A maximum of 20 profiles can be specified. * * @param {array} [parameters.notifications] the collection of notifications. * * @param {boolean} [parameters.enabled] the enabled flag. Specifies whether * automatic scaling is enabled for the resource. The default value is 'true'. * * @param {string} parameters.autoscaleSettingResourceName the name of the * autoscale setting. * * @param {string} [parameters.targetResourceUri] the resource identifier of * the resource that the autoscale setting should be added to. * * @param {string} [parameters.name] Azure resource name * * @param {string} parameters.location Resource location * * @param {object} [parameters.tags] Resource tags * * @param {object} [options] Optional Parameters. * * @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 {AutoscaleSettingResource} - 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. * * {AutoscaleSettingResource} [result] - The deserialized result object if an error did not occur. * See {@link AutoscaleSettingResource} 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. */ createOrUpdate(resourceGroupName: string, autoscaleSettingName: string, parameters: models.AutoscaleSettingResource, options?: { customHeaders? : { [headerName: string]: string; } }): Promise<models.AutoscaleSettingResource>; createOrUpdate(resourceGroupName: string, autoscaleSettingName: string, parameters: models.AutoscaleSettingResource, callback: ServiceCallback<models.AutoscaleSettingResource>): void; createOrUpdate(resourceGroupName: string, autoscaleSettingName: string, parameters: models.AutoscaleSettingResource, options: { customHeaders? : { [headerName: string]: string; } }, callback: ServiceCallback<models.AutoscaleSettingResource>): void; /** * Deletes and autoscale setting * * @param {string} resourceGroupName The name of the resource group. * * @param {string} autoscaleSettingName The autoscale setting name. * * @param {object} [options] Optional Parameters. * * @param {object} [options.customHeaders] Headers that will be added to the * request * * @returns {Promise} A promise is returned * * @resolve {HttpOperationResponse<null>} - The deserialized result object. * * @reject {Error|ServiceError} - The error object. */ deleteMethodWithHttpOperationResponse(resourceGroupName: string, autoscaleSettingName: string, options?: { customHeaders? : { [headerName: string]: string; } }): Promise<HttpOperationResponse<void>>; /** * Deletes and autoscale setting * * @param {string} resourceGroupName The name of the resource group. * * @param {string} autoscaleSettingName The autoscale setting name. * * @param {object} [options] Optional Parameters. * * @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 {null} - 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. * * {null} [result] - The deserialized result object if an error did not occur. * * {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. */ deleteMethod(resourceGroupName: string, autoscaleSettingName: string, options?: { customHeaders? : { [headerName: string]: string; } }): Promise<void>; deleteMethod(resourceGroupName: string, autoscaleSettingName: string, callback: ServiceCallback<void>): void; deleteMethod(resourceGroupName: string, autoscaleSettingName: string, options: { customHeaders? : { [headerName: string]: string; } }, callback: ServiceCallback<void>): void; /** * Gets an autoscale setting * * @param {string} resourceGroupName The name of the resource group. * * @param {string} autoscaleSettingName The autoscale setting name. * * @param {object} [options] Optional Parameters. * * @param {object} [options.customHeaders] Headers that will be added to the * request * * @returns {Promise} A promise is returned * * @resolve {HttpOperationResponse<AutoscaleSettingResource>} - The deserialized result object. * * @reject {Error|ServiceError} - The error object. */ getWithHttpOperationResponse(resourceGroupName: string, autoscaleSettingName: string, options?: { customHeaders? : { [headerName: string]: string; } }): Promise<HttpOperationResponse<models.AutoscaleSettingResource>>; /** * Gets an autoscale setting * * @param {string} resourceGroupName The name of the resource group. * * @param {string} autoscaleSettingName The autoscale setting name. * * @param {object} [options] Optional Parameters. * * @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 {AutoscaleSettingResource} - 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. * * {AutoscaleSettingResource} [result] - The deserialized result object if an error did not occur. * See {@link AutoscaleSettingResource} 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. */ get(resourceGroupName: string, autoscaleSettingName: string, options?: { customHeaders? : { [headerName: string]: string; } }): Promise<models.AutoscaleSettingResource>; get(resourceGroupName: string, autoscaleSettingName: string, callback: ServiceCallback<models.AutoscaleSettingResource>): void; get(resourceGroupName: string, autoscaleSettingName: string, options: { customHeaders? : { [headerName: string]: string; } }, callback: ServiceCallback<models.AutoscaleSettingResource>): void; /** * Lists the autoscale settings for a resource group * * @param {string} nextPageLink The NextLink from the previous successful call * to List operation. * * @param {object} [options] Optional Parameters. * * @param {object} [options.customHeaders] Headers that will be added to the * request * * @returns {Promise} A promise is returned * * @resolve {HttpOperationResponse<AutoscaleSettingResourceCollection>} - The deserialized result object. * * @reject {Error|ServiceError} - The error object. */ listByResourceGroupNextWithHttpOperationResponse(nextPageLink: string, options?: { customHeaders? : { [headerName: string]: string; } }): Promise<HttpOperationResponse<models.AutoscaleSettingResourceCollection>>; /** * Lists the autoscale settings for a resource group * * @param {string} nextPageLink The NextLink from the previous successful call * to List operation. * * @param {object} [options] Optional Parameters. * * @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 {AutoscaleSettingResourceCollection} - 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. * * {AutoscaleSettingResourceCollection} [result] - The deserialized result object if an error did not occur. * See {@link AutoscaleSettingResourceCollection} 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. */ listByResourceGroupNext(nextPageLink: string, options?: { customHeaders? : { [headerName: string]: string; } }): Promise<models.AutoscaleSettingResourceCollection>; listByResourceGroupNext(nextPageLink: string, callback: ServiceCallback<models.AutoscaleSettingResourceCollection>): void; listByResourceGroupNext(nextPageLink: string, options: { customHeaders? : { [headerName: string]: string; } }, callback: ServiceCallback<models.AutoscaleSettingResourceCollection>): void; } /** * @class * ServiceDiagnosticSettingsOperations * __NOTE__: An instance of this class is automatically created for an * instance of the InsightsManagementClient. */ export interface ServiceDiagnosticSettingsOperations { /** * Gets the active diagnostic settings for the specified resource. * * @param {string} resourceUri The identifier of the resource. * * @param {object} [options] Optional Parameters. * * @param {object} [options.customHeaders] Headers that will be added to the * request * * @returns {Promise} A promise is returned * * @resolve {HttpOperationResponse<ServiceDiagnosticSettingsResource>} - The deserialized result object. * * @reject {Error|ServiceError} - The error object. */ getWithHttpOperationResponse(resourceUri: string, options?: { customHeaders? : { [headerName: string]: string; } }): Promise<HttpOperationResponse<models.ServiceDiagnosticSettingsResource>>; /** * Gets the active diagnostic settings for the specified resource. * * @param {string} resourceUri The identifier of the resource. * * @param {object} [options] Optional Parameters. * * @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 {ServiceDiagnosticSettingsResource} - 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. * * {ServiceDiagnosticSettingsResource} [result] - The deserialized result object if an error did not occur. * See {@link ServiceDiagnosticSettingsResource} 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. */ get(resourceUri: string, options?: { customHeaders? : { [headerName: string]: string; } }): Promise<models.ServiceDiagnosticSettingsResource>; get(resourceUri: string, callback: ServiceCallback<models.ServiceDiagnosticSettingsResource>): void; get(resourceUri: string, options: { customHeaders? : { [headerName: string]: string; } }, callback: ServiceCallback<models.ServiceDiagnosticSettingsResource>): void; /** * Create or update new diagnostic settings for the specified resource. * * @param {string} resourceUri The identifier of the resource. * * @param {object} parameters Parameters supplied to the operation. * * @param {string} [parameters.storageAccountId] The resource ID of the storage * account to which you would like to send Diagnostic Logs. * * @param {string} [parameters.serviceBusRuleId] The service bus rule ID of the * service bus namespace in which you would like to have Event Hubs created for * streaming Diagnostic Logs. The rule ID is of the format: '{service bus * resource ID}/authorizationrules/{key name}'. * * @param {array} [parameters.metrics] the list of metric settings. * * @param {array} [parameters.logs] the list of logs settings. * * @param {string} [parameters.workspaceId] The workspace ID (resource ID of a * Log Analytics workspace) for a Log Analytics workspace to which you would * like to send Diagnostic Logs. Example: * /subscriptions/4b9e8510-67ab-4e9a-95a9-e2f1e570ea9c/resourceGroups/insights-integration/providers/Microsoft.OperationalInsights/workspaces/viruela2 * * @param {string} [parameters.name] Azure resource name * * @param {string} parameters.location Resource location * * @param {object} [parameters.tags] Resource tags * * @param {object} [options] Optional Parameters. * * @param {object} [options.customHeaders] Headers that will be added to the * request * * @returns {Promise} A promise is returned * * @resolve {HttpOperationResponse<ServiceDiagnosticSettingsResource>} - The deserialized result object. * * @reject {Error|ServiceError} - The error object. */ createOrUpdateWithHttpOperationResponse(resourceUri: string, parameters: models.ServiceDiagnosticSettingsResource, options?: { customHeaders? : { [headerName: string]: string; } }): Promise<HttpOperationResponse<models.ServiceDiagnosticSettingsResource>>; /** * Create or update new diagnostic settings for the specified resource. * * @param {string} resourceUri The identifier of the resource. * * @param {object} parameters Parameters supplied to the operation. * * @param {string} [parameters.storageAccountId] The resource ID of the storage * account to which you would like to send Diagnostic Logs. * * @param {string} [parameters.serviceBusRuleId] The service bus rule ID of the * service bus namespace in which you would like to have Event Hubs created for * streaming Diagnostic Logs. The rule ID is of the format: '{service bus * resource ID}/authorizationrules/{key name}'. * * @param {array} [parameters.metrics] the list of metric settings. * * @param {array} [parameters.logs] the list of logs settings. * * @param {string} [parameters.workspaceId] The workspace ID (resource ID of a * Log Analytics workspace) for a Log Analytics workspace to which you would * like to send Diagnostic Logs. Example: * /subscriptions/4b9e8510-67ab-4e9a-95a9-e2f1e570ea9c/resourceGroups/insights-integration/providers/Microsoft.OperationalInsights/workspaces/viruela2 * * @param {string} [parameters.name] Azure resource name * * @param {string} parameters.location Resource location * * @param {object} [parameters.tags] Resource tags * * @param {object} [options] Optional Parameters. * * @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 {ServiceDiagnosticSettingsResource} - 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. * * {ServiceDiagnosticSettingsResource} [result] - The deserialized result object if an error did not occur. * See {@link ServiceDiagnosticSettingsResource} 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. */ createOrUpdate(resourceUri: string, parameters: models.ServiceDiagnosticSettingsResource, options?: { customHeaders? : { [headerName: string]: string; } }): Promise<models.ServiceDiagnosticSettingsResource>; createOrUpdate(resourceUri: string, parameters: models.ServiceDiagnosticSettingsResource, callback: ServiceCallback<models.ServiceDiagnosticSettingsResource>): void; createOrUpdate(resourceUri: string, parameters: models.ServiceDiagnosticSettingsResource, options: { customHeaders? : { [headerName: string]: string; } }, callback: ServiceCallback<models.ServiceDiagnosticSettingsResource>): void; } /** * @class * AlertRules * __NOTE__: An instance of this class is automatically created for an * instance of the InsightsManagementClient. */ export interface AlertRules { /** * Creates or updates an alert rule. * Request method: PUT Request URI: * https://management.azure.com/subscriptions/{subscription-id}/resourceGroups/{resource-group-name}/providers/microsoft.insights/alertRules/{alert-rule-name}?api-version={api-version} * * @param {string} resourceGroupName The name of the resource group. * * @param {string} ruleName The name of the rule. * * @param {object} parameters The parameters of the rule to create or update. * * @param {string} parameters.alertRuleResourceName the name of the alert rule. * * @param {string} [parameters.description] the description of the alert rule * that will be included in the alert email. * * @param {boolean} parameters.isEnabled the flag that indicates whether the * alert rule is enabled. * * @param {object} [parameters.condition] the condition that results in the * alert rule being activated. * * @param {string} parameters.condition.odatatype Polymorphic Discriminator * * @param {array} [parameters.actions] the array of actions that are performed * when the alert rule becomes active, and when an alert condition is resolved. * * @param {string} [parameters.name] Azure resource name * * @param {string} parameters.location Resource location * * @param {object} [parameters.tags] Resource tags * * @param {object} [options] Optional Parameters. * * @param {object} [options.customHeaders] Headers that will be added to the * request * * @returns {Promise} A promise is returned * * @resolve {HttpOperationResponse<AlertRuleResource>} - The deserialized result object. * * @reject {Error|ServiceError} - The error object. */ createOrUpdateWithHttpOperationResponse(resourceGroupName: string, ruleName: string, parameters: models.AlertRuleResource, options?: { customHeaders? : { [headerName: string]: string; } }): Promise<HttpOperationResponse<models.AlertRuleResource>>; /** * Creates or updates an alert rule. * Request method: PUT Request URI: * https://management.azure.com/subscriptions/{subscription-id}/resourceGroups/{resource-group-name}/providers/microsoft.insights/alertRules/{alert-rule-name}?api-version={api-version} * * @param {string} resourceGroupName The name of the resource group. * * @param {string} ruleName The name of the rule. * * @param {object} parameters The parameters of the rule to create or update. * * @param {string} parameters.alertRuleResourceName the name of the alert rule. * * @param {string} [parameters.description] the description of the alert rule * that will be included in the alert email. * * @param {boolean} parameters.isEnabled the flag that indicates whether the * alert rule is enabled. * * @param {object} [parameters.condition] the condition that results in the * alert rule being activated. * * @param {string} parameters.condition.odatatype Polymorphic Discriminator * * @param {array} [parameters.actions] the array of actions that are performed * when the alert rule becomes active, and when an alert condition is resolved. * * @param {string} [parameters.name] Azure resource name * * @param {string} parameters.location Resource location * * @param {object} [parameters.tags] Resource tags * * @param {object} [options] Optional Parameters. * * @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 {AlertRuleResource} - 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. * * {AlertRuleResource} [result] - The deserialized result object if an error did not occur. * See {@link AlertRuleResource} 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. */ createOrUpdate(resourceGroupName: string, ruleName: string, parameters: models.AlertRuleResource, options?: { customHeaders? : { [headerName: string]: string; } }): Promise<models.AlertRuleResource>; createOrUpdate(resourceGroupName: string, ruleName: string, parameters: models.AlertRuleResource, callback: ServiceCallback<models.AlertRuleResource>): void; createOrUpdate(resourceGroupName: string, ruleName: string, parameters: models.AlertRuleResource, options: { customHeaders? : { [headerName: string]: string; } }, callback: ServiceCallback<models.AlertRuleResource>): void; /** * Deletes an alert rule * * @param {string} resourceGroupName The name of the resource group. * * @param {string} ruleName The name of the rule. * * @param {object} [options] Optional Parameters. * * @param {object} [options.customHeaders] Headers that will be added to the * request * * @returns {Promise} A promise is returned * * @resolve {HttpOperationResponse<null>} - The deserialized result object. * * @reject {Error|ServiceError} - The error object. */ deleteMethodWithHttpOperationResponse(resourceGroupName: string, ruleName: string, options?: { customHeaders? : { [headerName: string]: string; } }): Promise<HttpOperationResponse<void>>; /** * Deletes an alert rule * * @param {string} resourceGroupName The name of the resource group. * * @param {string} ruleName The name of the rule. * * @param {object} [options] Optional Parameters. * * @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 {null} - 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. * * {null} [result] - The deserialized result object if an error did not occur. * * {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. */ deleteMethod(resourceGroupName: string, ruleName: string, options?: { customHeaders? : { [headerName: string]: string; } }): Promise<void>; deleteMethod(resourceGroupName: string, ruleName: string, callback: ServiceCallback<void>): void; deleteMethod(resourceGroupName: string, ruleName: string, options: { customHeaders? : { [headerName: string]: string; } }, callback: ServiceCallback<void>): void; /** * Gets an alert rule * * @param {string} resourceGroupName The name of the resource group. * * @param {string} ruleName The name of the rule. * * @param {object} [options] Optional Parameters. * * @param {object} [options.customHeaders] Headers that will be added to the * request * * @returns {Promise} A promise is returned * * @resolve {HttpOperationResponse<AlertRuleResource>} - The deserialized result object. * * @reject {Error|ServiceError} - The error object. */ getWithHttpOperationResponse(resourceGroupName: string, ruleName: string, options?: { customHeaders? : { [headerName: string]: string; } }): Promise<HttpOperationResponse<models.AlertRuleResource>>; /** * Gets an alert rule * * @param {string} resourceGroupName The name of the resource group. * * @param {string} ruleName The name of the rule. * * @param {object} [options] Optional Parameters. * * @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 {AlertRuleResource} - 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. * * {AlertRuleResource} [result] - The deserialized result object if an error did not occur. * See {@link AlertRuleResource} 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. */ get(resourceGroupName: string, ruleName: string, options?: { customHeaders? : { [headerName: string]: string; } }): Promise<models.AlertRuleResource>; get(resourceGroupName: string, ruleName: string, callback: ServiceCallback<models.AlertRuleResource>): void; get(resourceGroupName: string, ruleName: string, options: { customHeaders? : { [headerName: string]: string; } }, callback: ServiceCallback<models.AlertRuleResource>): void; /** * List the alert rules within a resource group. * * @param {string} resourceGroupName The name of the resource group. * * @param {object} [options] Optional Parameters. * * @param {string} [options.filter] The filter to apply on the operation. For * more information please see * https://msdn.microsoft.com/en-us/library/azure/dn931934.aspx * * @param {object} [options.customHeaders] Headers that will be added to the * request * * @returns {Promise} A promise is returned * * @resolve {HttpOperationResponse<AlertRuleResourceCollection>} - The deserialized result object. * * @reject {Error|ServiceError} - The error object. */ listByResourceGroupWithHttpOperationResponse(resourceGroupName: string, options?: { filter? : string, customHeaders? : { [headerName: string]: string; } }): Promise<HttpOperationResponse<models.AlertRuleResourceCollection>>; /** * List the alert rules within a resource group. * * @param {string} resourceGroupName The name of the resource group. * * @param {object} [options] Optional Parameters. * * @param {string} [options.filter] The filter to apply on the operation. For * more information please see * https://msdn.microsoft.com/en-us/library/azure/dn931934.aspx * * @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 {AlertRuleResourceCollection} - 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. * * {AlertRuleResourceCollection} [result] - The deserialized result object if an error did not occur. * See {@link AlertRuleResourceCollection} 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. */ listByResourceGroup(resourceGroupName: string, options?: { filter? : string, customHeaders? : { [headerName: string]: string; } }): Promise<models.AlertRuleResourceCollection>; listByResourceGroup(resourceGroupName: string, callback: ServiceCallback<models.AlertRuleResourceCollection>): void; listByResourceGroup(resourceGroupName: string, options: { filter? : string, customHeaders? : { [headerName: string]: string; } }, callback: ServiceCallback<models.AlertRuleResourceCollection>): void; } /** * @class * AlertRuleIncidents * __NOTE__: An instance of this class is automatically created for an * instance of the InsightsManagementClient. */ export interface AlertRuleIncidents { /** * Gets an incident associated to an alert rule * * @param {string} resourceGroupName The name of the resource group. * * @param {string} ruleName The name of the rule. * * @param {string} incidentName The name of the incident to retrieve. * * @param {object} [options] Optional Parameters. * * @param {object} [options.customHeaders] Headers that will be added to the * request * * @returns {Promise} A promise is returned * * @resolve {HttpOperationResponse<Incident>} - The deserialized result object. * * @reject {Error|ServiceError} - The error object. */ getWithHttpOperationResponse(resourceGroupName: string, ruleName: string, incidentName: string, options?: { customHeaders? : { [headerName: string]: string; } }): Promise<HttpOperationResponse<models.Incident>>; /** * Gets an incident associated to an alert rule * * @param {string} resourceGroupName The name of the resource group. * * @param {string} ruleName The name of the rule. * * @param {string} incidentName The name of the incident to retrieve. * * @param {object} [options] Optional Parameters. * * @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 {Incident} - 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. * * {Incident} [result] - The deserialized result object if an error did not occur. * See {@link Incident} 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. */ get(resourceGroupName: string, ruleName: string, incidentName: string, options?: { customHeaders? : { [headerName: string]: string; } }): Promise<models.Incident>; get(resourceGroupName: string, ruleName: string, incidentName: string, callback: ServiceCallback<models.Incident>): void; get(resourceGroupName: string, ruleName: string, incidentName: string, options: { customHeaders? : { [headerName: string]: string; } }, callback: ServiceCallback<models.Incident>): void; /** * Gets a list of incidents associated to an alert rule * * @param {string} resourceGroupName The name of the resource group. * * @param {string} ruleName The name of the rule. * * @param {object} [options] Optional Parameters. * * @param {object} [options.customHeaders] Headers that will be added to the * request * * @returns {Promise} A promise is returned * * @resolve {HttpOperationResponse<IncidentListResult>} - The deserialized result object. * * @reject {Error|ServiceError} - The error object. */ listByAlertRuleWithHttpOperationResponse(resourceGroupName: string, ruleName: string, options?: { customHeaders? : { [headerName: string]: string; } }): Promise<HttpOperationResponse<models.IncidentListResult>>; /** * Gets a list of incidents associated to an alert rule * * @param {string} resourceGroupName The name of the resource group. * * @param {string} ruleName The name of the rule. * * @param {object} [options] Optional Parameters. * * @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 {IncidentListResult} - 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. * * {IncidentListResult} [result] - The deserialized result object if an error did not occur. * See {@link IncidentListResult} 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. */ listByAlertRule(resourceGroupName: string, ruleName: string, options?: { customHeaders? : { [headerName: string]: string; } }): Promise<models.IncidentListResult>; listByAlertRule(resourceGroupName: string, ruleName: string, callback: ServiceCallback<models.IncidentListResult>): void; listByAlertRule(resourceGroupName: string, ruleName: string, options: { customHeaders? : { [headerName: string]: string; } }, callback: ServiceCallback<models.IncidentListResult>): void; } /** * @class * LogProfiles * __NOTE__: An instance of this class is automatically created for an * instance of the InsightsManagementClient. */ export interface LogProfiles { /** * Deletes the log profile. * * @param {string} logProfileName The name of the log profile. * * @param {object} [options] Optional Parameters. * * @param {object} [options.customHeaders] Headers that will be added to the * request * * @returns {Promise} A promise is returned * * @resolve {HttpOperationResponse<null>} - The deserialized result object. * * @reject {Error|ServiceError} - The error object. */ deleteMethodWithHttpOperationResponse(logProfileName: string, options?: { customHeaders? : { [headerName: string]: string; } }): Promise<HttpOperationResponse<void>>; /** * Deletes the log profile. * * @param {string} logProfileName The name of the log profile. * * @param {object} [options] Optional Parameters. * * @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 {null} - 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. * * {null} [result] - The deserialized result object if an error did not occur. * * {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. */ deleteMethod(logProfileName: string, options?: { customHeaders? : { [headerName: string]: string; } }): Promise<void>; deleteMethod(logProfileName: string, callback: ServiceCallback<void>): void; deleteMethod(logProfileName: string, options: { customHeaders? : { [headerName: string]: string; } }, callback: ServiceCallback<void>): void; /** * Gets the log profile. * * @param {string} logProfileName The name of the log profile. * * @param {object} [options] Optional Parameters. * * @param {object} [options.customHeaders] Headers that will be added to the * request * * @returns {Promise} A promise is returned * * @resolve {HttpOperationResponse<LogProfileResource>} - The deserialized result object. * * @reject {Error|ServiceError} - The error object. */ getWithHttpOperationResponse(logProfileName: string, options?: { customHeaders? : { [headerName: string]: string; } }): Promise<HttpOperationResponse<models.LogProfileResource>>; /** * Gets the log profile. * * @param {string} logProfileName The name of the log profile. * * @param {object} [options] Optional Parameters. * * @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 {LogProfileResource} - 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. * * {LogProfileResource} [result] - The deserialized result object if an error did not occur. * See {@link LogProfileResource} for more information. * * {