/**
 * Monitoring API
 * Use the Monitoring API to manage metric queries and alarms for assessing the health, capacity, and performance of your cloud resources.
Endpoints vary by operation. For PostMetric, use the `telemetry-ingestion` endpoints; for all other operations, use the `telemetry` endpoints.
For information about monitoring, see [Monitoring Overview](/iaas/Content/Monitoring/Concepts/monitoringoverview.htm).

 * OpenAPI spec version: 20180401
 *
 *
 * NOTE: This class is auto generated by OracleSDKGenerator.
 * Do not edit the class manually.
 *
 * Copyright (c) 2020, 2022, Oracle and/or its affiliates.  All rights reserved.
 * This software is dual-licensed to you under the Universal Permissive License (UPL) 1.0 as shown at https://oss.oracle.com/licenses/upl or Apache License 2.0 as shown at http://www.apache.org/licenses/LICENSE-2.0. You may choose either license.
 */ import common = require ( "oci-common" ) ; import * as requests from "./request" ; import * as model from "./model" ; import * as responses from "./response" ; import { paginateRecords , paginateResponses } from "oci-common" ; import { MonitoringWaiter } from "./monitoring-waiter" ; import { composeResponse , composeRequest , GenericRetrier } from "oci-common" ; export enum MonitoringApiKeys { } /**
 * This service client uses  common . CircuitBreaker . DefaultConfiguration for all the operations by default if no circuit breaker configuration is defined by the user.
  export class MonitoringClient { protected static serviceEndpointTemplate = "https://telemetry.{region}.{secondLevelDomain}" ; protected "_endpoint" : string = "" ; protected "_defaultHeaders" : any = { } ; protected "_waiters" : MonitoringWaiter ; protected "_clientConfiguration" : common . ClientConfiguration ; protected _circuitBreaker = null ; protected _httpClient : common . HttpClient ; constructor ( params , clientConfiguration ? ) { const requestSigner = params . authenticationDetailsProvider ? new common . DefaultRequestSigner ( params . authenticationDetailsProvider ) : null ; if ( clientConfiguration ) { this . _clientConfiguration = clientConfiguration ; this . _circuitBreaker = clientConfiguration . circuitBreaker ? clientConfiguration . circuitBreaker ! . circuit : null ; } const specCircuitBreakerEnabled = true ; if ( ! this . _circuitBreaker && common . utils . isCircuitBreakerSystemEnabled ( clientConfiguration ! ) && ( specCircuitBreakerEnabled || common . CircuitBreaker . DefaultCircuitBreakerOverriden ) ) { this . _circuitBreaker = new common . CircuitBreaker ( ) . circuit ; } this . _httpClient = params . httpClient || new common . FetchHttpClient ( requestSigner , this . _circuitBreaker ) ; if ( params . authenticationDetailsProvider && common . isRegionProvider ( params . authenticationDetailsProvider ) ) { const provider = params . authenticationDetailsProvider ; if ( provider . getRegion ( ) ) { this . region = provider . getRegion ( ) ; } } } /**
     * Get the endpoint that is being used to call (ex, https://www.example.com).
     */ public get endpoint ( ) { return this . _endpoint ; } param endpoint public set endpoint ( endpoint ) { this . _endpoint = endpoint ; this . _endpoint = this . _endpoint + "/20180401" ; if ( this . logger ) this . logger . info ( `MonitoringClient endpoint set to ${ this . _endpoint }` ) ; } public get logger ( ) { return common . LOG . logger ; } /**
     * Sets the region to call (ex, Region.US_PHOENIX_1).
     * Note, this will call  {@link #endpoint(String) endpoint} after resolving the endpoint.
     *  param region public set region ( region ) { this . endpoint = common . EndpointBuilder . createEndpointFromRegion ( MonitoringClient . serviceEndpointTemplate , region ) ; } /**
     * Sets the regionId to call (ex, 'us-phoenix-1').
     *
     * Note, this will first try to map the region ID to a known Region and call  {@link #region(Region) region} .
     * If no known Region could be determined, it will create an endpoint assuming its in default Realm OC1
     * and then call  {@link #endpoint(String) endpoint} .
     *  param regionId public set regionId ( regionId ) { this . endpoint = common . EndpointBuilder . createEndpointFromRegionId ( MonitoringClient . serviceEndpointTemplate , regionId ) ; } param config return public createWaiters ( config ? ) { this . _waiters = new MonitoringWaiter ( this , config ) ; return this . _waiters ; } return public getWaiters ( ) { if ( this . _waiters ) { return this . _waiters ; } throw Error ( "Waiters do not exist. Please create waiters." ) ; } param ChangeAlarmCompartmentRequest return throws example Click  https to see how to use ChangeAlarmCompartment API.
        public async changeAlarmCompartment ( changeAlarmCompartmentRequest ) { if ( this . logger ) this . logger . debug ( "Calling operation MonitoringClient#changeAlarmCompartment." ) ; const pathParams = { "{alarmId}" : changeAlarmCompartmentRequest . alarmId } ; const queryParams = { } ; let headerParams = { "Content-Type" : common . Constants . APPLICATION_JSON , "if-match" : changeAlarmCompartmentRequest . ifMatch , "opc-request-id" : changeAlarmCompartmentRequest . opcRequestId , "opc-retry-token" : changeAlarmCompartmentRequest . opcRetryToken } ; const specRetryConfiguration = common . NoRetryConfigurationDetails ; const retrier = GenericRetrier . createPreferredRetrier ( this . _clientConfiguration ? this . _clientConfiguration . retryConfiguration : undefined , changeAlarmCompartmentRequest . retryConfiguration , specRetryConfiguration ) ; if ( this . logger ) retrier . logger = this . logger ; const request = await composeRequest ( { baseEndpoint : this . _endpoint , defaultHeaders : this . _defaultHeaders , path : "/alarms/{alarmId}/actions/changeCompartment" , method : "POST" , bodyContent : common . ObjectSerializer . serialize ( changeAlarmCompartmentRequest . changeAlarmCompartmentDetails , "ChangeAlarmCompartmentDetails" , model . ChangeAlarmCompartmentDetails . getJsonObj ) , pathParams : pathParams , headerParams : headerParams , queryParams : queryParams } ) ; try { const response = await retrier . makeServiceCall ( this . _httpClient , request ) ; const sdkResponse = composeResponse ( { responseObject : < responses . ChangeAlarmCompartmentResponse > { } , responseHeaders : [ { value : response . headers . get ( "opc-request-id" ) , key : "opcRequestId" , dataType : "string" } ] } ) ; return sdkResponse ; } catch ( err ) { throw err ; } } param CreateAlarmRequest return throws example Click  https to see how to use CreateAlarm API.
        public async createAlarm ( createAlarmRequest ) { if ( this . logger ) this . logger . debug ( "Calling operation MonitoringClient#createAlarm." ) ; const pathParams = { } ; const queryParams = { } ; let headerParams = { "Content-Type" : common . Constants . APPLICATION_JSON , "opc-request-id" : createAlarmRequest . opcRequestId , "opc-retry-token" : createAlarmRequest . opcRetryToken } ; const specRetryConfiguration = common . NoRetryConfigurationDetails ; const retrier = GenericRetrier . createPreferredRetrier ( this . _clientConfiguration ? this . _clientConfiguration . retryConfiguration : undefined , createAlarmRequest . retryConfiguration , specRetryConfiguration ) ; if ( this . logger ) retrier . logger = this . logger ; const request = await composeRequest ( { baseEndpoint : this . _endpoint , defaultHeaders : this . _defaultHeaders , path : "/alarms" , method : "POST" , bodyContent : common . ObjectSerializer . serialize ( createAlarmRequest . createAlarmDetails , "CreateAlarmDetails" , model . CreateAlarmDetails . getJsonObj ) , pathParams : pathParams , headerParams : headerParams , queryParams : queryParams } ) ; try { const response = await retrier . makeServiceCall ( this . _httpClient , request ) ; const sdkResponse = composeResponse ( { responseObject : < responses . CreateAlarmResponse > { } , body : await response . json ( ) , bodyKey : "alarm" , bodyModel : model . Alarm , type : "model.Alarm" , responseHeaders : [ { value : response . headers . get ( "etag" ) , key : "etag" , dataType : "string" } , { value : response . headers . get ( "opc-request-id" ) , key : "opcRequestId" , dataType : "string" } ] } ) ; return sdkResponse ; } catch ( err ) { throw err ; } } param DeleteAlarmRequest return throws example Click  https to see how to use DeleteAlarm API.
        public async deleteAlarm ( deleteAlarmRequest ) { if ( this . logger ) this . logger . debug ( "Calling operation MonitoringClient#deleteAlarm." ) ; const pathParams = { "{alarmId}" : deleteAlarmRequest . alarmId } ; const queryParams = { } ; let headerParams = { "Content-Type" : common . Constants . APPLICATION_JSON , "if-match" : deleteAlarmRequest . ifMatch , "opc-request-id" : deleteAlarmRequest . opcRequestId } ; const specRetryConfiguration = common . NoRetryConfigurationDetails ; const retrier = GenericRetrier . createPreferredRetrier ( this . _clientConfiguration ? this . _clientConfiguration . retryConfiguration : undefined , deleteAlarmRequest . retryConfiguration , specRetryConfiguration ) ; if ( this . logger ) retrier . logger = this . logger ; const request = await composeRequest ( { baseEndpoint : this . _endpoint , defaultHeaders : this . _defaultHeaders , path : "/alarms/{alarmId}" , method : "DELETE" , pathParams : pathParams , headerParams : headerParams , queryParams : queryParams } ) ; try { const response = await retrier . makeServiceCall ( this . _httpClient , request ) ; const sdkResponse = composeResponse ( { responseObject : < responses . DeleteAlarmResponse > { } , responseHeaders : [ { value : response . headers . get ( "opc-request-id" ) , key : "opcRequestId" , dataType : "string" } ] } ) ; return sdkResponse ; } catch ( err ) { throw err ; } } param GetAlarmRequest return throws example Click  https to see how to use GetAlarm API.
        public async getAlarm ( getAlarmRequest ) { if ( this . logger ) this . logger . debug ( "Calling operation MonitoringClient#getAlarm." ) ; const pathParams = { "{alarmId}" : getAlarmRequest . alarmId } ; const queryParams = { } ; let headerParams = { "Content-Type" : common . Constants . APPLICATION_JSON , "opc-request-id" : getAlarmRequest . opcRequestId } ; const specRetryConfiguration = common . NoRetryConfigurationDetails ; const retrier = GenericRetrier . createPreferredRetrier ( this . _clientConfiguration ? this . _clientConfiguration . retryConfiguration : undefined , getAlarmRequest . retryConfiguration , specRetryConfiguration ) ; if ( this . logger ) retrier . logger = this . logger ; const request = await composeRequest ( { baseEndpoint : this . _endpoint , defaultHeaders : this . _defaultHeaders , path : "/alarms/{alarmId}" , method : "GET" , pathParams : pathParams , headerParams : headerParams , queryParams : queryParams } ) ; try { const response = await retrier . makeServiceCall ( this . _httpClient , request ) ; const sdkResponse = composeResponse ( { responseObject : < responses . GetAlarmResponse > { } , body : await response . json ( ) , bodyKey : "alarm" , bodyModel : model . Alarm , type : "model.Alarm" , responseHeaders : [ { value : response . headers . get ( "etag" ) , key : "etag" , dataType : "string" } , { value : response . headers . get ( "opc-request-id" ) , key : "opcRequestId" , dataType : "string" } ] } ) ; return sdkResponse ; } catch ( err ) { throw err ; } } param GetAlarmHistoryRequest return throws example Click  https to see how to use GetAlarmHistory API.
        public async getAlarmHistory ( getAlarmHistoryRequest ) { if ( this . logger ) this . logger . debug ( "Calling operation MonitoringClient#getAlarmHistory." ) ; const pathParams = { "{alarmId}" : getAlarmHistoryRequest . alarmId } ; const queryParams = { "alarmHistorytype" : getAlarmHistoryRequest . alarmHistorytype , "page" : getAlarmHistoryRequest . page , "limit" : getAlarmHistoryRequest . limit , "timestampGreaterThanOrEqualTo" : getAlarmHistoryRequest . timestampGreaterThanOrEqualTo , "timestampLessThan" : getAlarmHistoryRequest . timestampLessThan } ; let headerParams = { "Content-Type" : common . Constants . APPLICATION_JSON , "opc-request-id" : getAlarmHistoryRequest . opcRequestId } ; const specRetryConfiguration = common . NoRetryConfigurationDetails ; const retrier = GenericRetrier . createPreferredRetrier ( this . _clientConfiguration ? this . _clientConfiguration . retryConfiguration : undefined , getAlarmHistoryRequest . retryConfiguration , specRetryConfiguration ) ; if ( this . logger ) retrier . logger = this . logger ; const request = await composeRequest ( { baseEndpoint : this . _endpoint , defaultHeaders : this . _defaultHeaders , path : "/alarms/{alarmId}/history" , method : "GET" , pathParams : pathParams , headerParams : headerParams , queryParams : queryParams } ) ; try { const response = await retrier . makeServiceCall ( this . _httpClient , request ) ; const sdkResponse = composeResponse ( { responseObject : < responses . GetAlarmHistoryResponse > { } , body : await response . json ( ) , bodyKey : "alarmHistoryCollection" , bodyModel : model . AlarmHistoryCollection , type : "model.AlarmHistoryCollection" , responseHeaders : [ { value : response . headers . get ( "opc-request-id" ) , key : "opcRequestId" , dataType : "string" } , { value : response . headers . get ( "opc-next-page" ) , key : "opcNextPage" , dataType : "string" } ] } ) ; return sdkResponse ; } catch ( err ) { throw err ; } } param ListAlarmsRequest return throws example Click  https to see how to use ListAlarms API.
        public async listAlarms ( listAlarmsRequest ) { if ( this . logger ) this . logger . debug ( "Calling operation MonitoringClient#listAlarms." ) ; const pathParams = { } ; const queryParams = { "compartmentId" : listAlarmsRequest . compartmentId , "page" : listAlarmsRequest . page , "limit" : listAlarmsRequest . limit , "displayName" : listAlarmsRequest . displayName , "lifecycleState" : listAlarmsRequest . lifecycleState , "sortBy" : listAlarmsRequest . sortBy , "sortOrder" : listAlarmsRequest . sortOrder , "compartmentIdInSubtree" : listAlarmsRequest . compartmentIdInSubtree } ; let headerParams = { "Content-Type" : common . Constants . APPLICATION_JSON , "opc-request-id" : listAlarmsRequest . opcRequestId } ; const specRetryConfiguration = common . NoRetryConfigurationDetails ; const retrier = GenericRetrier . createPreferredRetrier ( this . _clientConfiguration ? this . _clientConfiguration . retryConfiguration : undefined , listAlarmsRequest . retryConfiguration , specRetryConfiguration ) ; if ( this . logger ) retrier . logger = this . logger ; const request = await composeRequest ( { baseEndpoint : this . _endpoint , defaultHeaders : this . _defaultHeaders , path : "/alarms" , method : "GET" , pathParams : pathParams , headerParams : headerParams , queryParams : queryParams } ) ; try { const response = await retrier . makeServiceCall ( this . _httpClient , request ) ; const sdkResponse = composeResponse ( { responseObject : < responses . ListAlarmsResponse > { } , body : await response . json ( ) , bodyKey : "items" , bodyModel : model . AlarmSummary , type : "Array<model.AlarmSummary>" , responseHeaders : [ { value : response . headers . get ( "opc-next-page" ) , key : "opcNextPage" , dataType : "string" } , { value : response . headers . get ( "opc-request-id" ) , key : "opcRequestId" , dataType : "string" } ] } ) ; return sdkResponse ; } catch ( err ) { throw err ; } } param request public listAllAlarms ( request ) { return paginateRecords ( request , req => this . listAlarms ( req ) ) ; } param request public listAllAlarmsResponses ( request ) { return paginateResponses ( request , req => this . listAlarms ( req ) ) ; } param request public listAlarmsRecordIterator ( request ) { return paginateRecords ( request , req => this . listAlarms ( req ) ) ; } param request public listAlarmsResponseIterator ( request ) { return paginateResponses ( request , req => this . listAlarms ( req ) ) ; } param ListAlarmsStatusRequest return throws example Click  https to see how to use ListAlarmsStatus API.
        public async listAlarmsStatus ( listAlarmsStatusRequest ) { if ( this . logger ) this . logger . debug ( "Calling operation MonitoringClient#listAlarmsStatus." ) ; const pathParams = { } ; const queryParams = { "compartmentId" : listAlarmsStatusRequest . compartmentId , "compartmentIdInSubtree" : listAlarmsStatusRequest . compartmentIdInSubtree , "page" : listAlarmsStatusRequest . page , "limit" : listAlarmsStatusRequest . limit , "displayName" : listAlarmsStatusRequest . displayName , "sortBy" : listAlarmsStatusRequest . sortBy , "sortOrder" : listAlarmsStatusRequest . sortOrder } ; let headerParams = { "Content-Type" : common . Constants . APPLICATION_JSON , "opc-request-id" : listAlarmsStatusRequest . opcRequestId } ; const specRetryConfiguration = common . NoRetryConfigurationDetails ; const retrier = GenericRetrier . createPreferredRetrier ( this . _clientConfiguration ? this . _clientConfiguration . retryConfiguration : undefined , listAlarmsStatusRequest . retryConfiguration , specRetryConfiguration ) ; if ( this . logger ) retrier . logger = this . logger ; const request = await composeRequest ( { baseEndpoint : this . _endpoint , defaultHeaders : this . _defaultHeaders , path : "/alarms/status" , method : "GET" , pathParams : pathParams , headerParams : headerParams , queryParams : queryParams } ) ; try { const response = await retrier . makeServiceCall ( this . _httpClient , request ) ; const sdkResponse = composeResponse ( { responseObject : < responses . ListAlarmsStatusResponse > { } , body : await response . json ( ) , bodyKey : "items" , bodyModel : model . AlarmStatusSummary , type : "Array<model.AlarmStatusSummary>" , responseHeaders : [ { value : response . headers . get ( "opc-next-page" ) , key : "opcNextPage" , dataType : "string" } , { value : response . headers . get ( "opc-request-id" ) , key : "opcRequestId" , dataType : "string" } ] } ) ; return sdkResponse ; } catch ( err ) { throw err ; } } param request public listAllAlarmsStatus ( request ) { return paginateRecords ( request , req => this . listAlarmsStatus ( req ) ) ; } param request public listAllAlarmsStatusResponses ( request ) { return paginateResponses ( request , req => this . listAlarmsStatus ( req ) ) ; } param request public listAlarmsStatusRecordIterator ( request ) { return paginateRecords ( request , req => this . listAlarmsStatus ( req ) ) ; } param request public listAlarmsStatusResponseIterator ( request ) { return paginateResponses ( request , req => this . listAlarmsStatus ( req ) ) ; } param ListMetricsRequest return throws example Click  https to see how to use ListMetrics API.
        public async listMetrics ( listMetricsRequest ) { if ( this . logger ) this . logger . debug ( "Calling operation MonitoringClient#listMetrics." ) ; const pathParams = { } ; const queryParams = { "compartmentId" : listMetricsRequest . compartmentId , "page" : listMetricsRequest . page , "limit" : listMetricsRequest . limit , "compartmentIdInSubtree" : listMetricsRequest . compartmentIdInSubtree } ; let headerParams = { "Content-Type" : common . Constants . APPLICATION_JSON , "opc-request-id" : listMetricsRequest . opcRequestId } ; const specRetryConfiguration = common . NoRetryConfigurationDetails ; const retrier = GenericRetrier . createPreferredRetrier ( this . _clientConfiguration ? this . _clientConfiguration . retryConfiguration : undefined , listMetricsRequest . retryConfiguration , specRetryConfiguration ) ; if ( this . logger ) retrier . logger = this . logger ; const request = await composeRequest ( { baseEndpoint : this . _endpoint , defaultHeaders : this . _defaultHeaders , path : "/metrics/actions/listMetrics" , method : "POST" , bodyContent : common . ObjectSerializer . serialize ( listMetricsRequest . listMetricsDetails , "ListMetricsDetails" , model . ListMetricsDetails . getJsonObj ) , pathParams : pathParams , headerParams : headerParams , queryParams : queryParams } ) ; try { const response = await retrier . makeServiceCall ( this . _httpClient , request ) ; const sdkResponse = composeResponse ( { responseObject : < responses . ListMetricsResponse > { } , body : await response . json ( ) , bodyKey : "items" , bodyModel : model . Metric , type : "Array<model.Metric>" , responseHeaders : [ { value : response . headers . get ( "opc-next-page" ) , key : "opcNextPage" , dataType : "string" } , { value : response . headers . get ( "opc-request-id" ) , key : "opcRequestId" , dataType : "string" } ] } ) ; return sdkResponse ; } catch ( err ) { throw err ; } } param request public listAllMetrics ( request ) { return paginateRecords ( request , req => this . listMetrics ( req ) ) ; } param request public listAllMetricsResponses ( request ) { return paginateResponses ( request , req => this . listMetrics ( req ) ) ; } param request public listMetricsRecordIterator ( request ) { return paginateRecords ( request , req => this . listMetrics ( req ) ) ; } param request public listMetricsResponseIterator ( request ) { return paginateResponses ( request , req => this . listMetrics ( req ) ) ; } param PostMetricDataRequest return throws example Click  https to see how to use PostMetricData API.
        public async postMetricData ( postMetricDataRequest ) { if ( this . logger ) this . logger . debug ( "Calling operation MonitoringClient#postMetricData." ) ; const pathParams = { } ; const queryParams = { } ; let headerParams = { "Content-Type" : common . Constants . APPLICATION_JSON , "opc-request-id" : postMetricDataRequest . opcRequestId } ; const specRetryConfiguration = common . NoRetryConfigurationDetails ; const retrier = GenericRetrier . createPreferredRetrier ( this . _clientConfiguration ? this . _clientConfiguration . retryConfiguration : undefined , postMetricDataRequest . retryConfiguration , specRetryConfiguration ) ; if ( this . logger ) retrier . logger = this . logger ; const request = await composeRequest ( { baseEndpoint : this . _endpoint , defaultHeaders : this . _defaultHeaders , path : "/metrics" , method : "POST" , bodyContent : common . ObjectSerializer . serialize ( postMetricDataRequest . postMetricDataDetails , "PostMetricDataDetails" , model . PostMetricDataDetails . getJsonObj ) , pathParams : pathParams , headerParams : headerParams , queryParams : queryParams } ) ; try { const response = await retrier . makeServiceCall ( this . _httpClient , request ) ; const sdkResponse = composeResponse ( { responseObject : < responses . PostMetricDataResponse > { } , body : await response . json ( ) , bodyKey : "postMetricDataResponseDetails" , bodyModel : model . PostMetricDataResponseDetails , type : "model.PostMetricDataResponseDetails" , responseHeaders : [ { value : response . headers . get ( "opc-request-id" ) , key : "opcRequestId" , dataType : "string" } ] } ) ; return sdkResponse ; } catch ( err ) { throw err ; } } param RemoveAlarmSuppressionRequest return throws example Click  https to see how to use RemoveAlarmSuppression API.
        public async removeAlarmSuppression ( removeAlarmSuppressionRequest ) { if ( this . logger ) this . logger . debug ( "Calling operation MonitoringClient#removeAlarmSuppression." ) ; const pathParams = { "{alarmId}" : removeAlarmSuppressionRequest . alarmId } ; const queryParams = { } ; let headerParams = { "Content-Type" : common . Constants . APPLICATION_JSON , "if-match" : removeAlarmSuppressionRequest . ifMatch , "opc-request-id" : removeAlarmSuppressionRequest . opcRequestId } ; const specRetryConfiguration = common . NoRetryConfigurationDetails ; const retrier = GenericRetrier . createPreferredRetrier ( this . _clientConfiguration ? this . _clientConfiguration . retryConfiguration : undefined , removeAlarmSuppressionRequest . retryConfiguration , specRetryConfiguration ) ; if ( this . logger ) retrier . logger = this . logger ; const request = await composeRequest ( { baseEndpoint : this . _endpoint , defaultHeaders : this . _defaultHeaders , path : "/alarms/{alarmId}/actions/removeSuppression" , method : "POST" , pathParams : pathParams , headerParams : headerParams , queryParams : queryParams } ) ; try { const response = await retrier . makeServiceCall ( this . _httpClient , request ) ; const sdkResponse = composeResponse ( { responseObject : < responses . RemoveAlarmSuppressionResponse > { } , responseHeaders : [ { value : response . headers . get ( "opc-request-id" ) , key : "opcRequestId" , dataType : "string" } ] } ) ; return sdkResponse ; } catch ( err ) { throw err ; } } param SummarizeMetricsDataRequest return throws example Click  https to see how to use SummarizeMetricsData API.
        public async summarizeMetricsData ( summarizeMetricsDataRequest ) { if ( this . logger ) this . logger . debug ( "Calling operation MonitoringClient#summarizeMetricsData." ) ; const pathParams = { } ; const queryParams = { "compartmentId" : summarizeMetricsDataRequest . compartmentId , "compartmentIdInSubtree" : summarizeMetricsDataRequest . compartmentIdInSubtree } ; let headerParams = { "Content-Type" : common . Constants . APPLICATION_JSON , "opc-request-id" : summarizeMetricsDataRequest . opcRequestId } ; const specRetryConfiguration = common . NoRetryConfigurationDetails ; const retrier = GenericRetrier . createPreferredRetrier ( this . _clientConfiguration ? this . _clientConfiguration . retryConfiguration : undefined , summarizeMetricsDataRequest . retryConfiguration , specRetryConfiguration ) ; if ( this . logger ) retrier . logger = this . logger ; const request = await composeRequest ( { baseEndpoint : this . _endpoint , defaultHeaders : this . _defaultHeaders , path : "/metrics/actions/summarizeMetricsData" , method : "POST" , bodyContent : common . ObjectSerializer . serialize ( summarizeMetricsDataRequest . summarizeMetricsDataDetails , "SummarizeMetricsDataDetails" , model . SummarizeMetricsDataDetails . getJsonObj ) , pathParams : pathParams , headerParams : headerParams , queryParams : queryParams } ) ; try { const response = await retrier . makeServiceCall ( this . _httpClient , request ) ; const sdkResponse = composeResponse ( { responseObject : < responses . SummarizeMetricsDataResponse > { } , body : await response . json ( ) , bodyKey : "items" , bodyModel : model . MetricData , type : "Array<model.MetricData>" , responseHeaders : [ { value : response . headers . get ( "opc-request-id" ) , key : "opcRequestId" , dataType : "string" } ] } ) ; return sdkResponse ; } catch ( err ) { throw err ; } } param UpdateAlarmRequest return throws example Click  https to see how to use UpdateAlarm API.
        public async updateAlarm ( updateAlarmRequest ) { if ( this . logger ) this . logger . debug ( "Calling operation MonitoringClient#updateAlarm." ) ; const pathParams = { "{alarmId}" : updateAlarmRequest . alarmId } ; const queryParams = { } ; let headerParams = { "Content-Type" : common . Constants . APPLICATION_JSON , "if-match" : updateAlarmRequest . ifMatch , "opc-request-id" : updateAlarmRequest . opcRequestId } ; const specRetryConfiguration = common . NoRetryConfigurationDetails ; const retrier = GenericRetrier . createPreferredRetrier ( this . _clientConfiguration ? this . _clientConfiguration . retryConfiguration : undefined , updateAlarmRequest . retryConfiguration , specRetryConfiguration ) ; if ( this . logger ) retrier . logger = this . logger ; const request = await composeRequest ( { baseEndpoint : this . _endpoint , defaultHeaders : this . _defaultHeaders , path : "/alarms/{alarmId}" , method : "PUT" , bodyContent : common . ObjectSerializer . serialize ( updateAlarmRequest . updateAlarmDetails , "UpdateAlarmDetails" , model . UpdateAlarmDetails . getJsonObj ) , pathParams : pathParams , headerParams : headerParams , queryParams : queryParams } ) ; try { const response = await retrier . makeServiceCall ( this . _httpClient , request ) ; const sdkResponse = composeResponse ( { responseObject : < responses . UpdateAlarmResponse > { } , body : await response . json ( ) , bodyKey : "alarm" , bodyModel : model . Alarm , type : "model.Alarm" , responseHeaders : [ { value : response . headers . get ( "etag" ) , key : "etag" , dataType : "string" } , { value : response . headers . get ( "opc-request-id" ) , key : "opcRequestId" , dataType : "string" } ] } ) ; return sdkResponse ; } catch ( err ) { throw err ; } } }