lib/oci/loggingsearch/log_search_client.rb
# Submit a query to search logs.
#
# @param [OCI::Loggingsearch::Models::SearchLogsDetails] search_logs_details Search 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 Unique Oracle-assigned identifier for the request. If you need to contact Oracle about
#   a particular request, please provide the request ID.
#
# @option opts [Integer] :limit The maximum number of items to return in a response. Pagination is not supported in this API.
#    (default to 100)
# @option opts [String] :page Reserved for future use. Pagination is not supported in this API.
#
# @return [Response] A Response object with data of type {OCI::Loggingsearch::Models::SearchResponse SearchResponse}
# @note Click [here](https://docs.cloud.oracle.com/en-us/iaas/tools/ruby-sdk-examples/latest/loggingsearch/search_logs.rb.html) to see an example of how to use search_logs API.
Submit a query to search logs.
Submit a query to search logs .
def search_logs(search_logs_details, opts = {})
      logger.debug 'Calling operation LogSearchClient#search_logs.' if logger
      raise "Missing the required parameter 'search_logs_details' when calling search_logs." if search_logs_details.nil?
      path = '/search'
      operation_signing_strategy = :standard
      query_params = {}
      query_params[:limit] = opts[:limit] if opts[:limit]
      query_params[:page] = opts[:page] if opts[:page]
      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 = @api_client.object_to_http_body(search_logs_details)
      OCI::Retry.make_retrying_call(applicable_retry_config(opts), call_name: 'LogSearchClient#search_logs') do
        @api_client.call_api(
          :POST,
          path,
          endpoint,
          header_params: header_params,
          query_params: query_params,
          operation_signing_strategy: operation_signing_strategy,
          body: post_body,
          return_type: 'OCI::Loggingsearch::Models::SearchResponse'
        )
      end
    end
def search_logs ( search_logs_details , opts = { } ) logger . debug 'Calling operation LogSearchClient#search_logs.' if logger raise "Missing the required parameter 'search_logs_details' when calling search_logs." if search_logs_details . nil? path = '/search' operation_signing_strategy = :standard query_params = { } query_params [ :limit ] = opts [ :limit ] if opts [ :limit ] query_params [ :page ] = opts [ :page ] if opts [ :page ] 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 = @api_client . object_to_http_body ( search_logs_details ) OCI :: Retry . make_retrying_call ( applicable_retry_config ( opts ) , call_name : 'LogSearchClient#search_logs' ) do @api_client . call_api ( :POST , path , endpoint , header_params : header_params , query_params : query_params , operation_signing_strategy : operation_signing_strategy , body : post_body , return_type : 'OCI::Loggingsearch::Models::SearchResponse' ) end end
Submit a query to search logs.
Submit a query to search logs .
# 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::Loggingsearch::Models::SearchResponse SearchResponse}
A Response object with data of type { OCI :: Loggingsearch :: Models :: SearchResponse SearchResponse }
Response
search_logs_details
opts
:page Reserved for future use. Pagination is not supported in this API.
: page Reserved for future use . Pagination is not supported in this API .
opts the optional parameters
opts the optional parameters
note
Click [here] to see an example of how to use search_logs API.
Click [ here ] to see an example of how to use search_logs API .