/**
 * Autoscaling API
 * APIs for dynamically scaling Compute resources to meet application requirements. For more information about
autoscaling, see [Autoscaling](/Content/Compute/Tasks/autoscalinginstancepools.htm). For information about the
Compute service, see [Overview of the Compute Service](/Content/Compute/Concepts/computeoverview.htm).

**Note:** Autoscaling is not available in US Government Cloud tenancies. For more information, see
[Oracle Cloud Infrastructure US Government Cloud](/Content/General/Concepts/govoverview.htm).

 * OpenAPI spec version: 20181001
 *
 *
 * 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 { composeResponse , composeRequest , GenericRetrier } from "oci-common" ; export enum AutoScalingApiKeys { } /**
 * 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 AutoScalingClient { protected static serviceEndpointTemplate = "https://autoscaling.{region}.oci.{secondLevelDomain}" ; protected "_endpoint" : string = "" ; protected "_defaultHeaders" : any = { } ; 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 + "/20181001" ; if ( this . logger ) this . logger . info ( `AutoScalingClient 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 ( AutoScalingClient . 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 ( AutoScalingClient . serviceEndpointTemplate , regionId ) ; } param ChangeAutoScalingConfigurationCompartmentRequest return throws example Click  https to see how to use ChangeAutoScalingConfigurationCompartment API.
        public async changeAutoScalingConfigurationCompartment ( changeAutoScalingConfigurationCompartmentRequest ) { if ( this . logger ) this . logger . debug ( "Calling operation AutoScalingClient#changeAutoScalingConfigurationCompartment." ) ; const pathParams = { "{autoScalingConfigurationId}" : changeAutoScalingConfigurationCompartmentRequest . autoScalingConfigurationId } ; const queryParams = { } ; let headerParams = { "Content-Type" : common . Constants . APPLICATION_JSON , "opc-request-id" : changeAutoScalingConfigurationCompartmentRequest . opcRequestId , "if-match" : changeAutoScalingConfigurationCompartmentRequest . ifMatch , "opc-retry-token" : changeAutoScalingConfigurationCompartmentRequest . opcRetryToken } ; const specRetryConfiguration = common . NoRetryConfigurationDetails ; const retrier = GenericRetrier . createPreferredRetrier ( this . _clientConfiguration ? this . _clientConfiguration . retryConfiguration : undefined , changeAutoScalingConfigurationCompartmentRequest . retryConfiguration , specRetryConfiguration ) ; if ( this . logger ) retrier . logger = this . logger ; const request = await composeRequest ( { baseEndpoint : this . _endpoint , defaultHeaders : this . _defaultHeaders , path : "/autoScalingConfigurations/{autoScalingConfigurationId}/actions/changeCompartment" , method : "POST" , bodyContent : common . ObjectSerializer . serialize ( changeAutoScalingConfigurationCompartmentRequest . changeCompartmentDetails , "ChangeAutoScalingCompartmentDetails" , model . ChangeAutoScalingCompartmentDetails . getJsonObj ) , pathParams : pathParams , headerParams : headerParams , queryParams : queryParams } ) ; try { const response = await retrier . makeServiceCall ( this . _httpClient , request ) ; const sdkResponse = composeResponse ( { responseObject : < responses . ChangeAutoScalingConfigurationCompartmentResponse > { } , 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 CreateAutoScalingConfigurationRequest return throws example Click  https to see how to use CreateAutoScalingConfiguration API.
      public async createAutoScalingConfiguration ( createAutoScalingConfigurationRequest ) { if ( this . logger ) this . logger . debug ( "Calling operation AutoScalingClient#createAutoScalingConfiguration." ) ; const pathParams = { } ; const queryParams = { } ; let headerParams = { "Content-Type" : common . Constants . APPLICATION_JSON , "opc-request-id" : createAutoScalingConfigurationRequest . opcRequestId , "opc-retry-token" : createAutoScalingConfigurationRequest . opcRetryToken } ; const specRetryConfiguration = common . NoRetryConfigurationDetails ; const retrier = GenericRetrier . createPreferredRetrier ( this . _clientConfiguration ? this . _clientConfiguration . retryConfiguration : undefined , createAutoScalingConfigurationRequest . retryConfiguration , specRetryConfiguration ) ; if ( this . logger ) retrier . logger = this . logger ; const request = await composeRequest ( { baseEndpoint : this . _endpoint , defaultHeaders : this . _defaultHeaders , path : "/autoScalingConfigurations" , method : "POST" , bodyContent : common . ObjectSerializer . serialize ( createAutoScalingConfigurationRequest . createAutoScalingConfigurationDetails , "CreateAutoScalingConfigurationDetails" , model . CreateAutoScalingConfigurationDetails . getJsonObj ) , pathParams : pathParams , headerParams : headerParams , queryParams : queryParams } ) ; try { const response = await retrier . makeServiceCall ( this . _httpClient , request ) ; const sdkResponse = composeResponse ( { responseObject : < responses . CreateAutoScalingConfigurationResponse > { } , body : await response . json ( ) , bodyKey : "autoScalingConfiguration" , bodyModel : model . AutoScalingConfiguration , type : "model.AutoScalingConfiguration" , 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 CreateAutoScalingPolicyRequest return throws example Click  https to see how to use CreateAutoScalingPolicy API.
        public async createAutoScalingPolicy ( createAutoScalingPolicyRequest ) { if ( this . logger ) this . logger . debug ( "Calling operation AutoScalingClient#createAutoScalingPolicy." ) ; const pathParams = { "{autoScalingConfigurationId}" : createAutoScalingPolicyRequest . autoScalingConfigurationId } ; const queryParams = { } ; let headerParams = { "Content-Type" : common . Constants . APPLICATION_JSON , "opc-request-id" : createAutoScalingPolicyRequest . opcRequestId , "opc-retry-token" : createAutoScalingPolicyRequest . opcRetryToken } ; const specRetryConfiguration = common . NoRetryConfigurationDetails ; const retrier = GenericRetrier . createPreferredRetrier ( this . _clientConfiguration ? this . _clientConfiguration . retryConfiguration : undefined , createAutoScalingPolicyRequest . retryConfiguration , specRetryConfiguration ) ; if ( this . logger ) retrier . logger = this . logger ; const request = await composeRequest ( { baseEndpoint : this . _endpoint , defaultHeaders : this . _defaultHeaders , path : "/autoScalingConfigurations/{autoScalingConfigurationId}/policies" , method : "POST" , bodyContent : common . ObjectSerializer . serialize ( createAutoScalingPolicyRequest . createAutoScalingPolicyDetails , "CreateAutoScalingPolicyDetails" , model . CreateAutoScalingPolicyDetails . getJsonObj ) , pathParams : pathParams , headerParams : headerParams , queryParams : queryParams } ) ; try { const response = await retrier . makeServiceCall ( this . _httpClient , request ) ; const sdkResponse = composeResponse ( { responseObject : < responses . CreateAutoScalingPolicyResponse > { } , body : await response . json ( ) , bodyKey : "autoScalingPolicy" , bodyModel : model . AutoScalingPolicy , type : "model.AutoScalingPolicy" , 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 DeleteAutoScalingConfigurationRequest return throws example Click  https to see how to use DeleteAutoScalingConfiguration API.
      public async deleteAutoScalingConfiguration ( deleteAutoScalingConfigurationRequest ) { if ( this . logger ) this . logger . debug ( "Calling operation AutoScalingClient#deleteAutoScalingConfiguration." ) ; const pathParams = { "{autoScalingConfigurationId}" : deleteAutoScalingConfigurationRequest . autoScalingConfigurationId } ; const queryParams = { } ; let headerParams = { "Content-Type" : common . Constants . APPLICATION_JSON , "if-match" : deleteAutoScalingConfigurationRequest . ifMatch , "opc-request-id" : deleteAutoScalingConfigurationRequest . opcRequestId } ; const specRetryConfiguration = common . NoRetryConfigurationDetails ; const retrier = GenericRetrier . createPreferredRetrier ( this . _clientConfiguration ? this . _clientConfiguration . retryConfiguration : undefined , deleteAutoScalingConfigurationRequest . retryConfiguration , specRetryConfiguration ) ; if ( this . logger ) retrier . logger = this . logger ; const request = await composeRequest ( { baseEndpoint : this . _endpoint , defaultHeaders : this . _defaultHeaders , path : "/autoScalingConfigurations/{autoScalingConfigurationId}" , method : "DELETE" , pathParams : pathParams , headerParams : headerParams , queryParams : queryParams } ) ; try { const response = await retrier . makeServiceCall ( this . _httpClient , request ) ; const sdkResponse = composeResponse ( { responseObject : < responses . DeleteAutoScalingConfigurationResponse > { } , responseHeaders : [ { value : response . headers . get ( "opc-request-id" ) , key : "opcRequestId" , dataType : "string" } ] } ) ; return sdkResponse ; } catch ( err ) { throw err ; } } param DeleteAutoScalingPolicyRequest return throws example Click  https to see how to use DeleteAutoScalingPolicy API.
      public async deleteAutoScalingPolicy ( deleteAutoScalingPolicyRequest ) { if ( this . logger ) this . logger . debug ( "Calling operation AutoScalingClient#deleteAutoScalingPolicy." ) ; const pathParams = { "{autoScalingConfigurationId}" : deleteAutoScalingPolicyRequest . autoScalingConfigurationId , "{autoScalingPolicyId}" : deleteAutoScalingPolicyRequest . autoScalingPolicyId } ; const queryParams = { } ; let headerParams = { "Content-Type" : common . Constants . APPLICATION_JSON , "if-match" : deleteAutoScalingPolicyRequest . ifMatch , "opc-request-id" : deleteAutoScalingPolicyRequest . opcRequestId } ; const specRetryConfiguration = common . NoRetryConfigurationDetails ; const retrier = GenericRetrier . createPreferredRetrier ( this . _clientConfiguration ? this . _clientConfiguration . retryConfiguration : undefined , deleteAutoScalingPolicyRequest . retryConfiguration , specRetryConfiguration ) ; if ( this . logger ) retrier . logger = this . logger ; const request = await composeRequest ( { baseEndpoint : this . _endpoint , defaultHeaders : this . _defaultHeaders , path : "/autoScalingConfigurations/{autoScalingConfigurationId}/policies/{autoScalingPolicyId}" , method : "DELETE" , pathParams : pathParams , headerParams : headerParams , queryParams : queryParams } ) ; try { const response = await retrier . makeServiceCall ( this . _httpClient , request ) ; const sdkResponse = composeResponse ( { responseObject : < responses . DeleteAutoScalingPolicyResponse > { } , responseHeaders : [ { value : response . headers . get ( "opc-request-id" ) , key : "opcRequestId" , dataType : "string" } ] } ) ; return sdkResponse ; } catch ( err ) { throw err ; } } param GetAutoScalingConfigurationRequest return throws example Click  https to see how to use GetAutoScalingConfiguration API.
      public async getAutoScalingConfiguration ( getAutoScalingConfigurationRequest ) { if ( this . logger ) this . logger . debug ( "Calling operation AutoScalingClient#getAutoScalingConfiguration." ) ; const pathParams = { "{autoScalingConfigurationId}" : getAutoScalingConfigurationRequest . autoScalingConfigurationId } ; const queryParams = { } ; let headerParams = { "Content-Type" : common . Constants . APPLICATION_JSON , "opc-request-id" : getAutoScalingConfigurationRequest . opcRequestId } ; const specRetryConfiguration = common . NoRetryConfigurationDetails ; const retrier = GenericRetrier . createPreferredRetrier ( this . _clientConfiguration ? this . _clientConfiguration . retryConfiguration : undefined , getAutoScalingConfigurationRequest . retryConfiguration , specRetryConfiguration ) ; if ( this . logger ) retrier . logger = this . logger ; const request = await composeRequest ( { baseEndpoint : this . _endpoint , defaultHeaders : this . _defaultHeaders , path : "/autoScalingConfigurations/{autoScalingConfigurationId}" , method : "GET" , pathParams : pathParams , headerParams : headerParams , queryParams : queryParams } ) ; try { const response = await retrier . makeServiceCall ( this . _httpClient , request ) ; const sdkResponse = composeResponse ( { responseObject : < responses . GetAutoScalingConfigurationResponse > { } , body : await response . json ( ) , bodyKey : "autoScalingConfiguration" , bodyModel : model . AutoScalingConfiguration , type : "model.AutoScalingConfiguration" , 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 GetAutoScalingPolicyRequest return throws example Click  https to see how to use GetAutoScalingPolicy API.
      public async getAutoScalingPolicy ( getAutoScalingPolicyRequest ) { if ( this . logger ) this . logger . debug ( "Calling operation AutoScalingClient#getAutoScalingPolicy." ) ; const pathParams = { "{autoScalingConfigurationId}" : getAutoScalingPolicyRequest . autoScalingConfigurationId , "{autoScalingPolicyId}" : getAutoScalingPolicyRequest . autoScalingPolicyId } ; const queryParams = { } ; let headerParams = { "Content-Type" : common . Constants . APPLICATION_JSON , "opc-request-id" : getAutoScalingPolicyRequest . opcRequestId } ; const specRetryConfiguration = common . NoRetryConfigurationDetails ; const retrier = GenericRetrier . createPreferredRetrier ( this . _clientConfiguration ? this . _clientConfiguration . retryConfiguration : undefined , getAutoScalingPolicyRequest . retryConfiguration , specRetryConfiguration ) ; if ( this . logger ) retrier . logger = this . logger ; const request = await composeRequest ( { baseEndpoint : this . _endpoint , defaultHeaders : this . _defaultHeaders , path : "/autoScalingConfigurations/{autoScalingConfigurationId}/policies/{autoScalingPolicyId}" , method : "GET" , pathParams : pathParams , headerParams : headerParams , queryParams : queryParams } ) ; try { const response = await retrier . makeServiceCall ( this . _httpClient , request ) ; const sdkResponse = composeResponse ( { responseObject : < responses . GetAutoScalingPolicyResponse > { } , body : await response . json ( ) , bodyKey : "autoScalingPolicy" , bodyModel : model . AutoScalingPolicy , type : "model.AutoScalingPolicy" , 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 ListAutoScalingConfigurationsRequest return throws example Click  https to see how to use ListAutoScalingConfigurations API.
      public async listAutoScalingConfigurations ( listAutoScalingConfigurationsRequest ) { if ( this . logger ) this . logger . debug ( "Calling operation AutoScalingClient#listAutoScalingConfigurations." ) ; const pathParams = { } ; const queryParams = { "compartmentId" : listAutoScalingConfigurationsRequest . compartmentId , "displayName" : listAutoScalingConfigurationsRequest . displayName , "limit" : listAutoScalingConfigurationsRequest . limit , "page" : listAutoScalingConfigurationsRequest . page , "sortBy" : listAutoScalingConfigurationsRequest . sortBy , "sortOrder" : listAutoScalingConfigurationsRequest . sortOrder } ; let headerParams = { "Content-Type" : common . Constants . APPLICATION_JSON , "opc-request-id" : listAutoScalingConfigurationsRequest . opcRequestId } ; const specRetryConfiguration = common . NoRetryConfigurationDetails ; const retrier = GenericRetrier . createPreferredRetrier ( this . _clientConfiguration ? this . _clientConfiguration . retryConfiguration : undefined , listAutoScalingConfigurationsRequest . retryConfiguration , specRetryConfiguration ) ; if ( this . logger ) retrier . logger = this . logger ; const request = await composeRequest ( { baseEndpoint : this . _endpoint , defaultHeaders : this . _defaultHeaders , path : "/autoScalingConfigurations" , method : "GET" , pathParams : pathParams , headerParams : headerParams , queryParams : queryParams } ) ; try { const response = await retrier . makeServiceCall ( this . _httpClient , request ) ; const sdkResponse = composeResponse ( { responseObject : < responses . ListAutoScalingConfigurationsResponse > { } , body : await response . json ( ) , bodyKey : "items" , bodyModel : model . AutoScalingConfigurationSummary , type : "Array<model.AutoScalingConfigurationSummary>" , 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 listAllAutoScalingConfigurations ( request ) { return paginateRecords ( request , req => this . listAutoScalingConfigurations ( req ) ) ; } param request public listAllAutoScalingConfigurationsResponses ( request ) { return paginateResponses ( request , req => this . listAutoScalingConfigurations ( req ) ) ; } param request public listAutoScalingConfigurationsRecordIterator ( request ) { return paginateRecords ( request , req => this . listAutoScalingConfigurations ( req ) ) ; } param request public listAutoScalingConfigurationsResponseIterator ( request ) { return paginateResponses ( request , req => this . listAutoScalingConfigurations ( req ) ) ; } param ListAutoScalingPoliciesRequest return throws example Click  https to see how to use ListAutoScalingPolicies API.
      public async listAutoScalingPolicies ( listAutoScalingPoliciesRequest ) { if ( this . logger ) this . logger . debug ( "Calling operation AutoScalingClient#listAutoScalingPolicies." ) ; const pathParams = { "{autoScalingConfigurationId}" : listAutoScalingPoliciesRequest . autoScalingConfigurationId } ; const queryParams = { "displayName" : listAutoScalingPoliciesRequest . displayName , "limit" : listAutoScalingPoliciesRequest . limit , "page" : listAutoScalingPoliciesRequest . page , "sortBy" : listAutoScalingPoliciesRequest . sortBy , "sortOrder" : listAutoScalingPoliciesRequest . sortOrder } ; let headerParams = { "Content-Type" : common . Constants . APPLICATION_JSON , "opc-request-id" : listAutoScalingPoliciesRequest . opcRequestId } ; const specRetryConfiguration = common . NoRetryConfigurationDetails ; const retrier = GenericRetrier . createPreferredRetrier ( this . _clientConfiguration ? this . _clientConfiguration . retryConfiguration : undefined , listAutoScalingPoliciesRequest . retryConfiguration , specRetryConfiguration ) ; if ( this . logger ) retrier . logger = this . logger ; const request = await composeRequest ( { baseEndpoint : this . _endpoint , defaultHeaders : this . _defaultHeaders , path : "/autoScalingConfigurations/{autoScalingConfigurationId}/policies" , method : "GET" , pathParams : pathParams , headerParams : headerParams , queryParams : queryParams } ) ; try { const response = await retrier . makeServiceCall ( this . _httpClient , request ) ; const sdkResponse = composeResponse ( { responseObject : < responses . ListAutoScalingPoliciesResponse > { } , body : await response . json ( ) , bodyKey : "items" , bodyModel : model . AutoScalingPolicySummary , type : "Array<model.AutoScalingPolicySummary>" , 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 listAllAutoScalingPolicies ( request ) { return paginateRecords ( request , req => this . listAutoScalingPolicies ( req ) ) ; } param request public listAllAutoScalingPoliciesResponses ( request ) { return paginateResponses ( request , req => this . listAutoScalingPolicies ( req ) ) ; } param request public listAutoScalingPoliciesRecordIterator ( request ) { return paginateRecords ( request , req => this . listAutoScalingPolicies ( req ) ) ; } param request public listAutoScalingPoliciesResponseIterator ( request ) { return paginateResponses ( request , req => this . listAutoScalingPolicies ( req ) ) ; } param UpdateAutoScalingConfigurationRequest return throws example Click  https to see how to use UpdateAutoScalingConfiguration API.
      public async updateAutoScalingConfiguration ( updateAutoScalingConfigurationRequest ) { if ( this . logger ) this . logger . debug ( "Calling operation AutoScalingClient#updateAutoScalingConfiguration." ) ; const pathParams = { "{autoScalingConfigurationId}" : updateAutoScalingConfigurationRequest . autoScalingConfigurationId } ; const queryParams = { } ; let headerParams = { "Content-Type" : common . Constants . APPLICATION_JSON , "if-match" : updateAutoScalingConfigurationRequest . ifMatch , "opc-request-id" : updateAutoScalingConfigurationRequest . opcRequestId , "opc-retry-token" : updateAutoScalingConfigurationRequest . opcRetryToken } ; const specRetryConfiguration = common . NoRetryConfigurationDetails ; const retrier = GenericRetrier . createPreferredRetrier ( this . _clientConfiguration ? this . _clientConfiguration . retryConfiguration : undefined , updateAutoScalingConfigurationRequest . retryConfiguration , specRetryConfiguration ) ; if ( this . logger ) retrier . logger = this . logger ; const request = await composeRequest ( { baseEndpoint : this . _endpoint , defaultHeaders : this . _defaultHeaders , path : "/autoScalingConfigurations/{autoScalingConfigurationId}" , method : "PUT" , bodyContent : common . ObjectSerializer . serialize ( updateAutoScalingConfigurationRequest . updateAutoScalingConfigurationDetails , "UpdateAutoScalingConfigurationDetails" , model . UpdateAutoScalingConfigurationDetails . getJsonObj ) , pathParams : pathParams , headerParams : headerParams , queryParams : queryParams } ) ; try { const response = await retrier . makeServiceCall ( this . _httpClient , request ) ; const sdkResponse = composeResponse ( { responseObject : < responses . UpdateAutoScalingConfigurationResponse > { } , body : await response . json ( ) , bodyKey : "autoScalingConfiguration" , bodyModel : model . AutoScalingConfiguration , type : "model.AutoScalingConfiguration" , 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 UpdateAutoScalingPolicyRequest return throws example Click  https to see how to use UpdateAutoScalingPolicy API.
      public async updateAutoScalingPolicy ( updateAutoScalingPolicyRequest ) { if ( this . logger ) this . logger . debug ( "Calling operation AutoScalingClient#updateAutoScalingPolicy." ) ; const pathParams = { "{autoScalingConfigurationId}" : updateAutoScalingPolicyRequest . autoScalingConfigurationId , "{autoScalingPolicyId}" : updateAutoScalingPolicyRequest . autoScalingPolicyId } ; const queryParams = { } ; let headerParams = { "Content-Type" : common . Constants . APPLICATION_JSON , "if-match" : updateAutoScalingPolicyRequest . ifMatch , "opc-request-id" : updateAutoScalingPolicyRequest . opcRequestId , "opc-retry-token" : updateAutoScalingPolicyRequest . opcRetryToken } ; const specRetryConfiguration = common . NoRetryConfigurationDetails ; const retrier = GenericRetrier . createPreferredRetrier ( this . _clientConfiguration ? this . _clientConfiguration . retryConfiguration : undefined , updateAutoScalingPolicyRequest . retryConfiguration , specRetryConfiguration ) ; if ( this . logger ) retrier . logger = this . logger ; const request = await composeRequest ( { baseEndpoint : this . _endpoint , defaultHeaders : this . _defaultHeaders , path : "/autoScalingConfigurations/{autoScalingConfigurationId}/policies/{autoScalingPolicyId}" , method : "PUT" , bodyContent : common . ObjectSerializer . serialize ( updateAutoScalingPolicyRequest . updateAutoScalingPolicyDetails , "UpdateAutoScalingPolicyDetails" , model . UpdateAutoScalingPolicyDetails . getJsonObj ) , pathParams : pathParams , headerParams : headerParams , queryParams : queryParams } ) ; try { const response = await retrier . makeServiceCall ( this . _httpClient , request ) ; const sdkResponse = composeResponse ( { responseObject : < responses . UpdateAutoScalingPolicyResponse > { } , body : await response . json ( ) , bodyKey : "autoScalingPolicy" , bodyModel : model . AutoScalingPolicy , type : "model.AutoScalingPolicy" , 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 ; } } }