lib/oci/resource_search/resource_search_client.rb
def search_resources(search_details, opts = {})
      logger.debug 'Calling operation ResourceSearchClient#search_resources.' if logger

      raise "Missing the required parameter 'search_details' when calling search_resources." if search_details.nil?

      path = '/resources'
      operation_signing_strategy = :standard

      # rubocop:disable Style/NegatedIf
      # Query Params
      query_params = {}
      query_params[:limit] = opts[:limit] if opts[:limit]
      query_params[:page] = opts[:page] if opts[:page]
      query_params[:tenantId] = opts[:tenant_id] if opts[:tenant_id]

      # 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 = @api_client.object_to_http_body(search_details)

      # rubocop:disable Metrics/BlockLength
      OCI::Retry.make_retrying_call(applicable_retry_config(opts), call_name: 'ResourceSearchClient#search_resources') 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::ResourceSearch::Models::ResourceSummaryCollection'
        )
      end
      # rubocop:enable Metrics/BlockLength
    end
# Queries any and all compartments in the specified tenancy to find resources that match the specified criteria.
# Results include resources that you have permission to view and can span different resource types.
# You can also sort results based on a specified resource attribute.
#
# @param [OCI::ResourceSearch::Models::SearchDetails] search_details Request parameters that describe query criteria. For more information, see {#search_details search_details}.
#
# @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 [Integer] :limit The maximum number of items to return. The value must be between 1 and 1000. (default to 1000)
# @option opts [String] :page The page at which to start retrieving results.
# @option opts [String] :tenant_id The tenancy ID, which can be used to specify a different tenancy (for cross-tenancy authorization) when searching for resources in a different tenancy.
#
# @option opts [String] :opc_request_id The unique Oracle-assigned identifier for the request. 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::ResourceSearch::Models::ResourceSummaryCollection ResourceSummaryCollection}
# @note Click [here](https://docs.cloud.oracle.com/en-us/iaas/tools/ruby-sdk-examples/latest/resourcesearch/search_resources.rb.html) to see an example of how to use search_resources API.
Queries any and all compartments in the specified tenancy to find resources that match the specified criteria.
Results include resources that you have permission to view and can span different resource types.
You can also sort results based on a specified resource attribute.
Queries any and all compartments in the specified tenancy to find resources that match the specified criteria . Results include resources that you have permission to view and can span different resource types . You can also sort results based on a specified resource attribute .
def search_resources(search_details, opts = {})
      logger.debug 'Calling operation ResourceSearchClient#search_resources.' if logger
      raise "Missing the required parameter 'search_details' when calling search_resources." if search_details.nil?
      path = '/resources'
      operation_signing_strategy = :standard
      query_params = {}
      query_params[:limit] = opts[:limit] if opts[:limit]
      query_params[:page] = opts[:page] if opts[:page]
      query_params[:tenantId] = opts[:tenant_id] if opts[:tenant_id]
      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_details)
      OCI::Retry.make_retrying_call(applicable_retry_config(opts), call_name: 'ResourceSearchClient#search_resources') 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::ResourceSearch::Models::ResourceSummaryCollection'
        )
      end
    end
def search_resources ( search_details , opts = { } ) logger . debug 'Calling operation ResourceSearchClient#search_resources.' if logger raise "Missing the required parameter 'search_details' when calling search_resources." if search_details . nil? path = '/resources' operation_signing_strategy = :standard query_params = { } query_params [ :limit ] = opts [ :limit ] if opts [ :limit ] query_params [ :page ] = opts [ :page ] if opts [ :page ] query_params [ :tenantId ] = opts [ :tenant_id ] if opts [ :tenant_id ] 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_details ) OCI :: Retry . make_retrying_call ( applicable_retry_config ( opts ) , call_name : 'ResourceSearchClient#search_resources' ) 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::ResourceSearch::Models::ResourceSummaryCollection' ) end end
Queries any and all compartments in the specified tenancy to find resources that match the specified criteria.
Queries any and all compartments in the specified tenancy to find resources that match the specified criteria .
# 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::ResourceSearch::Models::ResourceSummaryCollection ResourceSummaryCollection}
A Response object with data of type { OCI :: ResourceSearch :: Models :: ResourceSummaryCollection ResourceSummaryCollection }
Response
search_details
opts
:opc_request_id The unique Oracle-assigned identifier for the request. If you need to contact Oracle about a particular request, please provide the complete request ID.
: opc_request_id The unique Oracle - assigned identifier for the request . 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 search_resources API.
Click [ here ] to see an example of how to use search_resources API .