UNPKG

@azure/arm-monitor

Version:
58 lines 1.82 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 Metrics operations. */ export class MetricsImpl { /** * Initialize a new instance of the class Metrics class. * @param client Reference to the service client */ constructor(client) { this.client = client; } /** * **Lists the metric values for a resource**. * @param resourceUri The identifier of the resource. * @param options The options parameters. */ list(resourceUri, options) { return this.client.sendOperationRequest({ resourceUri, options }, listOperationSpec); } } // Operation Specifications const serializer = coreClient.createSerializer(Mappers, /* isXml */ false); const listOperationSpec = { path: "/{resourceUri}/providers/Microsoft.Insights/metrics", httpMethod: "GET", responses: { 200: { bodyMapper: Mappers.Response }, default: { bodyMapper: Mappers.ErrorResponse } }, queryParameters: [ Parameters.filter1, Parameters.apiVersion4, Parameters.metricnamespace, Parameters.timespan, Parameters.interval, Parameters.metricnames, Parameters.aggregation, Parameters.top, Parameters.orderby, Parameters.resultType ], urlParameters: [Parameters.$host, Parameters.resourceUri], headerParameters: [Parameters.accept], serializer }; //# sourceMappingURL=metrics.js.map