lib/oci/logging/logging_management_client.rb
# Lists Logging Saved Searches for this compartment.
#
# @param [String] compartment_id Compartment OCID to list resources in. See compartmentIdInSubtree
#        for nested compartments traversal.
#
# @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] :log_saved_search_id OCID of the LogSavedSearch
#
# @option opts [String] :name Resource name
# @option opts [String] :page For list pagination. The value of the `opc-next-page` or `opc-previous-page` response header from the previous \"List\" call.
#   For important details about how pagination works, see [List Pagination](https://docs.cloud.oracle.com/iaas/Content/API/Concepts/usingapi.htm#nine).
#
# @option opts [Integer] :limit The maximum number of items to return in a paginated \"List\" call.
#    (default to 100)
# @option opts [String] :sort_by The field to sort by (one column only). Default sort order is
#   ascending exception of `timeCreated` and `timeLastModified` columns (descending).
#
#   Allowed values are: timeCreated, displayName
# @option opts [String] :sort_order The sort order to use, whether 'asc' or 'desc'.
#
#   Allowed values are: ASC, DESC
# @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::Logging::Models::LogSavedSearchSummaryCollection LogSavedSearchSummaryCollection}
# @note Click [here](https://docs.cloud.oracle.com/en-us/iaas/tools/ruby-sdk-examples/latest/logging/list_log_saved_searches.rb.html) to see an example of how to use list_log_saved_searches API.
Lists Logging Saved Searches for this compartment.
Lists Logging Saved Searches for this compartment .
def list_log_saved_searches(compartment_id, opts = {})
      logger.debug 'Calling operation LoggingManagementClient#list_log_saved_searches.' if logger
      raise "Missing the required parameter 'compartment_id' when calling list_log_saved_searches." if compartment_id.nil?
      if opts[:sort_by] && !%w[timeCreated displayName].include?(opts[:sort_by])
        raise 'Invalid value for "sort_by", must be one of timeCreated, displayName.'
      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
      path = '/logSavedSearches'
      operation_signing_strategy = :standard
      query_params = {}
      query_params[:compartmentId] = compartment_id
      query_params[:logSavedSearchId] = opts[:log_saved_search_id] if opts[:log_saved_search_id]
      query_params[:name] = opts[:name] if opts[:name]
      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: 'LoggingManagementClient#list_log_saved_searches') 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::Logging::Models::LogSavedSearchSummaryCollection'
        )
      end
    end
def list_log_saved_searches ( compartment_id , opts = { } ) logger . debug 'Calling operation LoggingManagementClient#list_log_saved_searches.' if logger raise "Missing the required parameter 'compartment_id' when calling list_log_saved_searches." if compartment_id . nil? if opts [ :sort_by ] && ! %w[ timeCreated displayName ] . include? ( opts [ :sort_by ] ) raise 'Invalid value for "sort_by", must be one of timeCreated, displayName.' 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 path = '/logSavedSearches' operation_signing_strategy = :standard query_params = { } query_params [ :compartmentId ] = compartment_id query_params [ :logSavedSearchId ] = opts [ :log_saved_search_id ] if opts [ :log_saved_search_id ] query_params [ :name ] = opts [ :name ] if opts [ :name ] 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 : 'LoggingManagementClient#list_log_saved_searches' ) 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::Logging::Models::LogSavedSearchSummaryCollection' ) end end
Lists Logging Saved Searches for this compartment.
Lists Logging Saved Searches for this compartment .
# 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::Logging::Models::LogSavedSearchSummaryCollection LogSavedSearchSummaryCollection}
A Response object with data of type { OCI :: Logging :: Models :: LogSavedSearchSummaryCollection LogSavedSearchSummaryCollection }
Response
compartment_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_log_saved_searches API.
Click [ here ] to see an example of how to use list_log_saved_searches API .