lib/oci/oda/oda_client.rb
def list_work_request_logs(work_request_id, opts = {})
      logger.debug 'Calling operation OdaClient#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?

      if opts[:sort_by] && !%w[MESSAGE TIMESTAMP].include?(opts[:sort_by])
        raise 'Invalid value for "sort_by", must be one of MESSAGE, TIMESTAMP.'
      end

      if opts[:sort_order] && !%w[ASC DESC].include?(opts[:sort_order])
        raise 'Invalid value for "sort_order", must be one of ASC, DESC.'
      end
      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

      # rubocop:disable Style/NegatedIf
      # Query Params
      query_params = {}
      query_params[:page] = opts[:page] if opts[:page]
      query_params[:limit] = opts[:limit] if opts[:limit]
      query_params[:sortBy] = opts[:sort_by] if opts[:sort_by]
      query_params[:sortOrder] = opts[:sort_order] if opts[:sort_order]

      # Header Params
      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]
      # rubocop:enable Style/NegatedIf

      post_body = nil

      # rubocop:disable Metrics/BlockLength
      OCI::Retry.make_retrying_call(applicable_retry_config(opts), call_name: 'OdaClient#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: 'Array<OCI::Oda::Models::WorkRequestLogEntry>'
        )
      end
      # rubocop:enable Metrics/BlockLength
    end
# Returns a page of of log messages for a given work request.
#
# If the `opc-next-page` header appears in the response, then
# there are more items to retrieve. To get the next page in the subsequent
# GET request, include the header's value as the `page` query parameter.
#
# @param [String] work_request_id The identifier of the asynchronous 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] :opc_request_id The client request ID for tracing. This value is included in the opc-request-id response header.
# @option opts [String] :page The page at which to start retrieving results.
#
#   You get this value from the `opc-next-page` header in a previous list request.
#   To retireve the first page, omit this query parameter.
#
#   Example: `MToxMA==`
#
# @option opts [Integer] :limit The maximum number of items to return per page. (default to 100)
# @option opts [String] :sort_by The field to sort by. You can specify only one sort order. If no value is specified, then the default is `TIMESTAMP`.
#
#   The default sort order for both `TIMESTAMP` and `MESSAGE` is ascending.
#    (default to TIMESTAMP)
#   Allowed values are: MESSAGE, TIMESTAMP
# @option opts [String] :sort_order Sort the results in this order, use either `ASC` (ascending) or `DESC` (descending).
#   Allowed values are: ASC, DESC
# @return [Response] A Response object with data of type Array<{OCI::Oda::Models::WorkRequestLogEntry WorkRequestLogEntry}>
Returns a page of of log messages for a given work request.
If the `opc-next-page` header appears in the response, then
there are more items to retrieve. To get the next page in the subsequent
GET request, include the header's value as the `page` query parameter.
Returns a page of of log messages for a given work request . If the ` opc - next - page ` header appears in the response then there are more items to retrieve . To get the next page in the subsequent GET request include the header ' s value as the ` page ` query parameter .
def list_work_request_logs(work_request_id, opts = {})
      logger.debug 'Calling operation OdaClient#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?
      if opts[:sort_by] && !%w[MESSAGE TIMESTAMP].include?(opts[:sort_by])
        raise 'Invalid value for "sort_by", must be one of MESSAGE, TIMESTAMP.'
      end
      if opts[:sort_order] && !%w[ASC DESC].include?(opts[:sort_order])
        raise 'Invalid value for "sort_order", must be one of ASC, DESC.'
      end
      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]
      query_params[:sortBy] = opts[:sort_by] if opts[:sort_by]
      query_params[:sortOrder] = opts[:sort_order] if opts[:sort_order]
      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: 'OdaClient#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: 'Array<OCI::Oda::Models::WorkRequestLogEntry>'
        )
      end
    end
def list_work_request_logs ( work_request_id , opts = { } ) logger . debug 'Calling operation OdaClient#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? if opts [ :sort_by ] && ! %w[ MESSAGE TIMESTAMP ] . include? ( opts [ :sort_by ] ) raise 'Invalid value for "sort_by", must be one of MESSAGE, TIMESTAMP.' end if opts [ :sort_order ] && ! %w[ ASC DESC ] . include? ( opts [ :sort_order ] ) raise 'Invalid value for "sort_order", must be one of ASC, DESC.' end 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 ] query_params [ :sortBy ] = opts [ :sort_by ] if opts [ :sort_by ] query_params [ :sortOrder ] = opts [ :sort_order ] if opts [ :sort_order ] 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 : 'OdaClient#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 : 'Array<OCI::Oda::Models::WorkRequestLogEntry>' ) end end
Returns a page of of log messages for a given work request.
Returns a page of of log messages for a given 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 Array<{OCI::Oda::Models::WorkRequestLogEntry WorkRequestLogEntry}>
A Response object with data of type Array< { OCI :: Oda :: Models :: WorkRequestLogEntry WorkRequestLogEntry } >
Response
work_request_id
opts
:sort_order Sort the results in this order, use either `ASC` (ascending) or `DESC` (descending). Allowed values are: ASC, DESC
: sort_order Sort the results in this order use either ` ASC ` ( ascending ) or ` DESC ` ( descending ) . Allowed values are : ASC DESC
opts the optional parameters
opts the optional parameters