UNPKG

@azure/arm-monitor

Version:
85 lines 3.05 kB
/* * 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 * as Mappers from "../models/mappers"; import * as Parameters from "../models/parameters"; /** Class containing MetricAlertsStatus operations. */ export class MetricAlertsStatusImpl { /** * Initialize a new instance of the class MetricAlertsStatus class. * @param client Reference to the service client */ constructor(client) { this.client = client; } /** * Retrieve an alert rule status. * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param ruleName The name of the rule. * @param options The options parameters. */ list(resourceGroupName, ruleName, options) { return this.client.sendOperationRequest({ resourceGroupName, ruleName, options }, listOperationSpec); } /** * Retrieve an alert rule status. * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param ruleName The name of the rule. * @param statusName The name of the status. * @param options The options parameters. */ listByName(resourceGroupName, ruleName, statusName, options) { return this.client.sendOperationRequest({ resourceGroupName, ruleName, statusName, options }, listByNameOperationSpec); } } // Operation Specifications const serializer = coreClient.createSerializer(Mappers, /* isXml */ false); const listOperationSpec = { path: "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Insights/metricAlerts/{ruleName}/status", httpMethod: "GET", responses: { 200: { bodyMapper: Mappers.MetricAlertStatusCollection }, default: { bodyMapper: Mappers.ErrorResponse } }, queryParameters: [Parameters.apiVersion6], urlParameters: [ Parameters.$host, Parameters.resourceGroupName, Parameters.subscriptionId, Parameters.ruleName ], headerParameters: [Parameters.accept], serializer }; const listByNameOperationSpec = { path: "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Insights/metricAlerts/{ruleName}/status/{statusName}", httpMethod: "GET", responses: { 200: { bodyMapper: Mappers.MetricAlertStatusCollection }, default: { bodyMapper: Mappers.ErrorResponse } }, queryParameters: [Parameters.apiVersion6], urlParameters: [ Parameters.$host, Parameters.resourceGroupName, Parameters.subscriptionId, Parameters.ruleName, Parameters.statusName ], headerParameters: [Parameters.accept], serializer }; //# sourceMappingURL=metricAlertsStatus.js.map