lib/oci/optimizer/optimizer_client.rb
# Lists the logs associated with the specified work request.
#
# @param [String] work_request_id The OCID of the work request.
# @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] :page The value of the `opc-next-page` response header from the previous \"List\" call.
#
# @option opts [Integer] :limit The maximum number of items to return in a paginated \"List\" call. (default to 10)
# @option opts [String] :opc_request_id Unique Oracle-assigned identifier for the request.
#   If you need to contact Oracle about a particular request, please provide the request ID.
#
# @return [Response] A Response object with data of type {OCI::Optimizer::Models::WorkRequestLogEntryCollection WorkRequestLogEntryCollection}
# @note Click [here](https://docs.cloud.oracle.com/en-us/iaas/tools/ruby-sdk-examples/latest/optimizer/list_work_request_logs.rb.html) to see an example of how to use list_work_request_logs API.
Lists the logs associated with the specified work request.
Lists the logs associated with the specified work request .
def list_work_request_logs(work_request_id, opts = {})
      logger.debug 'Calling operation OptimizerClient#list_work_request_logs.' if logger
      raise "Missing the required parameter 'work_request_id' when calling list_work_request_logs." if work_request_id.nil?
      raise "Parameter value for 'work_request_id' must not be blank" if OCI::Internal::Util.blank_string?(work_request_id)
      path = '/workRequests/{workRequestId}/logs'.sub('{workRequestId}', work_request_id.to_s)
      operation_signing_strategy = :standard
      query_params = {}
      query_params[:page] = opts[:page] if opts[:page]
      query_params[:limit] = opts[:limit] if opts[:limit]
      header_params = {}
      header_params[:accept] = 'application/json'
      header_params[:'content-type'] = 'application/json'
      header_params[:'opc-request-id'] = opts[:opc_request_id] if opts[:opc_request_id]
      post_body = nil
      OCI::Retry.make_retrying_call(applicable_retry_config(opts), call_name: 'OptimizerClient#list_work_request_logs') do
        @api_client.call_api(
          :GET,
          path,
          endpoint,
          header_params: header_params,
          query_params: query_params,
          operation_signing_strategy: operation_signing_strategy,
          body: post_body,
          return_type: 'OCI::Optimizer::Models::WorkRequestLogEntryCollection'
        )
      end
    end
def list_work_request_logs ( work_request_id , opts = { } ) logger . debug 'Calling operation OptimizerClient#list_work_request_logs.' if logger raise "Missing the required parameter 'work_request_id' when calling list_work_request_logs." if work_request_id . nil? raise "Parameter value for 'work_request_id' must not be blank" if OCI :: Internal :: Util . blank_string? ( work_request_id ) path = '/workRequests/{workRequestId}/logs' . sub ( '{workRequestId}' , work_request_id . to_s ) operation_signing_strategy = :standard query_params = { } query_params [ :page ] = opts [ :page ] if opts [ :page ] query_params [ :limit ] = opts [ :limit ] if opts [ :limit ] header_params = { } header_params [ :accept ] = 'application/json' header_params [ :' content-type ' ] = 'application/json' header_params [ :' opc-request-id ' ] = opts [ :opc_request_id ] if opts [ :opc_request_id ] post_body = nil OCI :: Retry . make_retrying_call ( applicable_retry_config ( opts ) , call_name : 'OptimizerClient#list_work_request_logs' ) do @api_client . call_api ( :GET , path , endpoint , header_params : header_params , query_params : query_params , operation_signing_strategy : operation_signing_strategy , body : post_body , return_type : 'OCI::Optimizer::Models::WorkRequestLogEntryCollection' ) end end
Lists the logs associated with the specified work request.
Lists the logs associated with the specified work request .
# 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::Optimizer::Models::WorkRequestLogEntryCollection WorkRequestLogEntryCollection}
A Response object with data of type { OCI :: Optimizer :: Models :: WorkRequestLogEntryCollection WorkRequestLogEntryCollection }
Response
work_request_id
opts
:opc_request_id Unique Oracle-assigned identifier for the request. If you need to contact Oracle about a particular request, please provide the request ID.
: opc_request_id Unique Oracle - assigned identifier for the request . If you need to contact Oracle about a particular request please provide the request ID .
opts the optional parameters
opts the optional parameters
note
Click [here] to see an example of how to use list_work_request_logs API.
Click [ here ] to see an example of how to use list_work_request_logs API .