lib/oci/monitoring/monitoring_client.rb
def update_alarm(alarm_id, update_alarm_details, opts = {})
      logger.debug 'Calling operation MonitoringClient#update_alarm.' if logger

      raise "Missing the required parameter 'alarm_id' when calling update_alarm." if alarm_id.nil?
      raise "Missing the required parameter 'update_alarm_details' when calling update_alarm." if update_alarm_details.nil?
      raise "Parameter value for 'alarm_id' must not be blank" if OCI::Internal::Util.blank_string?(alarm_id)

      path = '/alarms/{alarmId}'.sub('{alarmId}', alarm_id.to_s)
      operation_signing_strategy = :standard

      # rubocop:disable Style/NegatedIf
      # Query Params
      query_params = {}

      # Header Params
      header_params = {}
      header_params[:accept] = 'application/json'
      header_params[:'content-type'] = 'application/json'
      header_params[:'if-match'] = opts[:if_match] if opts[:if_match]
      header_params[:'opc-request-id'] = opts[:opc_request_id] if opts[:opc_request_id]
      # rubocop:enable Style/NegatedIf

      post_body = @api_client.object_to_http_body(update_alarm_details)

      # rubocop:disable Metrics/BlockLength
      OCI::Retry.make_retrying_call(applicable_retry_config(opts), call_name: 'MonitoringClient#update_alarm') do
        @api_client.call_api(
          :PUT,
          path,
          endpoint,
          header_params: header_params,
          query_params: query_params,
          operation_signing_strategy: operation_signing_strategy,
          body: post_body,
          return_type: 'OCI::Monitoring::Models::Alarm'
        )
      end
      # rubocop:enable Metrics/BlockLength
    end
# Updates the specified alarm.
# For important limits information, see [Limits on Monitoring](https://docs.cloud.oracle.com/iaas/Content/Monitoring/Concepts/monitoringoverview.htm#Limits).
#
# This call is subject to a Monitoring limit that applies to the total number of requests across all alarm operations.
# Monitoring might throttle this call to reject an otherwise valid request when the total rate of alarm operations exceeds 10 requests,
# or transactions, per second (TPS) for a given tenancy.
#
# @param [String] alarm_id The [OCID](https://docs.cloud.oracle.com/iaas/Content/General/Concepts/identifiers.htm) of an alarm.
#
# @param [OCI::Monitoring::Models::UpdateAlarmDetails] update_alarm_details Document for updating an alarm.
# @param [Hash] opts the optional parameters
# @option opts [OCI::Retry::RetryConfig] :retry_config The retry configuration to apply to this operation. If no key is provided then the service-level
#   retry configuration defined by {#retry_config} will be used. If an explicit `nil` value is provided then the operation will not retry
# @option opts [String] :if_match For optimistic concurrency control. In the PUT or DELETE call for a resource, set the `if-match`
#   parameter to the value of the etag from a previous GET or POST response for that resource.  The resource
#   will be updated or deleted only if the etag you provide matches the resource's current etag value.
#
# @option opts [String] :opc_request_id Customer part of the request identifier token. If you need to contact Oracle about a particular
#   request, please provide the complete request ID.
#
# @return [Response] A Response object with data of type {OCI::Monitoring::Models::Alarm Alarm}
# @note Click [here](https://docs.cloud.oracle.com/en-us/iaas/tools/ruby-sdk-examples/latest/monitoring/update_alarm.rb.html) to see an example of how to use update_alarm API.
Updates the specified alarm.
For important limits information, see [Limits on Monitoring].

This call is subject to a Monitoring limit that applies to the total number of requests across all alarm operations.
Monitoring might throttle this call to reject an otherwise valid request when the total rate of alarm operations exceeds 10 requests,
or transactions, per second (TPS) for a given tenancy.
Updates the specified alarm . For important limits information see [ Limits on Monitoring ] . This call is subject to a Monitoring limit that applies to the total number of requests across all alarm operations . Monitoring might throttle this call to reject an otherwise valid request when the total rate of alarm operations exceeds 10 requests or transactions per second ( TPS ) for a given tenancy .
def update_alarm(alarm_id, update_alarm_details, opts = {})
      logger.debug 'Calling operation MonitoringClient#update_alarm.' if logger
      raise "Missing the required parameter 'alarm_id' when calling update_alarm." if alarm_id.nil?
      raise "Missing the required parameter 'update_alarm_details' when calling update_alarm." if update_alarm_details.nil?
      raise "Parameter value for 'alarm_id' must not be blank" if OCI::Internal::Util.blank_string?(alarm_id)
      path = '/alarms/{alarmId}'.sub('{alarmId}', alarm_id.to_s)
      operation_signing_strategy = :standard
      query_params = {}
      header_params = {}
      header_params[:accept] = 'application/json'
      header_params[:'content-type'] = 'application/json'
      header_params[:'if-match'] = opts[:if_match] if opts[:if_match]
      header_params[:'opc-request-id'] = opts[:opc_request_id] if opts[:opc_request_id]
      post_body = @api_client.object_to_http_body(update_alarm_details)
      OCI::Retry.make_retrying_call(applicable_retry_config(opts), call_name: 'MonitoringClient#update_alarm') do
        @api_client.call_api(
          :PUT,
          path,
          endpoint,
          header_params: header_params,
          query_params: query_params,
          operation_signing_strategy: operation_signing_strategy,
          body: post_body,
          return_type: 'OCI::Monitoring::Models::Alarm'
        )
      end
    end
def update_alarm ( alarm_id , update_alarm_details , opts = { } ) logger . debug 'Calling operation MonitoringClient#update_alarm.' if logger raise "Missing the required parameter 'alarm_id' when calling update_alarm." if alarm_id . nil? raise "Missing the required parameter 'update_alarm_details' when calling update_alarm." if update_alarm_details . nil? raise "Parameter value for 'alarm_id' must not be blank" if OCI :: Internal :: Util . blank_string? ( alarm_id ) path = '/alarms/{alarmId}' . sub ( '{alarmId}' , alarm_id . to_s ) operation_signing_strategy = :standard query_params = { } header_params = { } header_params [ :accept ] = 'application/json' header_params [ :' content-type ' ] = 'application/json' header_params [ :' if-match ' ] = opts [ :if_match ] if opts [ :if_match ] header_params [ :' opc-request-id ' ] = opts [ :opc_request_id ] if opts [ :opc_request_id ] post_body = @api_client . object_to_http_body ( update_alarm_details ) OCI :: Retry . make_retrying_call ( applicable_retry_config ( opts ) , call_name : 'MonitoringClient#update_alarm' ) do @api_client . call_api ( :PUT , path , endpoint , header_params : header_params , query_params : query_params , operation_signing_strategy : operation_signing_strategy , body : post_body , return_type : 'OCI::Monitoring::Models::Alarm' ) end end
Updates the specified alarm.
Updates the specified alarm .
# rubocop:disable Style/NegatedIf # Query Params # Header Params # rubocop:enable Style/NegatedIf # rubocop:disable Metrics/BlockLength # rubocop:enable Metrics/BlockLength
A Response object with data of type {OCI::Monitoring::Models::Alarm Alarm}
A Response object with data of type { OCI :: Monitoring :: Models :: Alarm Alarm }
Response
alarm_id
update_alarm_details
opts
:opc_request_id Customer part of the request identifier token. If you need to contact Oracle about a particular request, please provide the complete request ID.
: opc_request_id Customer part of the request identifier token . If you need to contact Oracle about a particular request please provide the complete request ID .
opts the optional parameters
opts the optional parameters
note
Click [here] to see an example of how to use update_alarm API.
Click [ here ] to see an example of how to use update_alarm API .