lib/oci/nosql/nosql_client.rb
def list_indexes(table_name_or_id, opts = {})
      logger.debug 'Calling operation NosqlClient#list_indexes.' if logger

      raise "Missing the required parameter 'table_name_or_id' when calling list_indexes." if table_name_or_id.nil?

      if opts[:lifecycle_state] && !%w[ALL CREATING UPDATING ACTIVE DELETING DELETED FAILED INACTIVE].include?(opts[:lifecycle_state])
        raise 'Invalid value for "lifecycle_state", must be one of ALL, CREATING, UPDATING, ACTIVE, DELETING, DELETED, FAILED, INACTIVE.'
      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

      if opts[:sort_by] && !%w[timeCreated name].include?(opts[:sort_by])
        raise 'Invalid value for "sort_by", must be one of timeCreated, name.'
      end
      raise "Parameter value for 'table_name_or_id' must not be blank" if OCI::Internal::Util.blank_string?(table_name_or_id)

      path = '/tables/{tableNameOrId}/indexes'.sub('{tableNameOrId}', table_name_or_id.to_s)
      operation_signing_strategy = :standard

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

      # 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: 'NosqlClient#list_indexes') 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::Nosql::Models::IndexCollection'
        )
      end
      # rubocop:enable Metrics/BlockLength
    end
# Get a list of indexes on a table.
# @param [String] table_name_or_id A table name within the compartment, or a table OCID.
# @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] :compartment_id The ID of a table's compartment. When a table is identified
#   by name, the compartmentId is often needed to provide
#   context for interpreting the name.
#
# @option opts [String] :name A shell-globbing-style (*?[]) filter for names. (default to *)
# @option opts [String] :lifecycle_state Filter list by the lifecycle state of the item. (default to ALL)
#   Allowed values are: ALL, CREATING, UPDATING, ACTIVE, DELETING, DELETED, FAILED, INACTIVE
# @option opts [Integer] :limit The maximum number of items to return. (default to 1000)
# @option opts [String] :page The page token representing the page at which to start
#   retrieving results. This is usually retrieved from a previous
#   list call.
#
# @option opts [String] :sort_order The sort order to use, either 'ASC' or 'DESC'. (default to DESC)
#   Allowed values are: ASC, DESC
# @option opts [String] :sort_by The field to sort by. Only one sort order may be
#   provided. Default order for timeCreated is descending. Default
#   order for name is ascending. If no value is specified
#   timeCreated is default.
#    (default to timeCreated)
#   Allowed values are: timeCreated, name
# @option opts [String] :opc_request_id The client request ID for tracing.
# @return [Response] A Response object with data of type {OCI::Nosql::Models::IndexCollection IndexCollection}
# @note Click [here](https://docs.cloud.oracle.com/en-us/iaas/tools/ruby-sdk-examples/latest/nosql/list_indexes.rb.html) to see an example of how to use list_indexes API.
Get a list of indexes on a table.
Get a list of indexes on a table .
def list_indexes(table_name_or_id, opts = {})
      logger.debug 'Calling operation NosqlClient#list_indexes.' if logger
      raise "Missing the required parameter 'table_name_or_id' when calling list_indexes." if table_name_or_id.nil?
      if opts[:lifecycle_state] && !%w[ALL CREATING UPDATING ACTIVE DELETING DELETED FAILED INACTIVE].include?(opts[:lifecycle_state])
        raise 'Invalid value for "lifecycle_state", must be one of ALL, CREATING, UPDATING, ACTIVE, DELETING, DELETED, FAILED, INACTIVE.'
      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
      if opts[:sort_by] && !%w[timeCreated name].include?(opts[:sort_by])
        raise 'Invalid value for "sort_by", must be one of timeCreated, name.'
      end
      raise "Parameter value for 'table_name_or_id' must not be blank" if OCI::Internal::Util.blank_string?(table_name_or_id)
      path = '/tables/{tableNameOrId}/indexes'.sub('{tableNameOrId}', table_name_or_id.to_s)
      operation_signing_strategy = :standard
      query_params = {}
      query_params[:compartmentId] = opts[:compartment_id] if opts[:compartment_id]
      query_params[:name] = opts[:name] if opts[:name]
      query_params[:lifecycleState] = opts[:lifecycle_state] if opts[:lifecycle_state]
      query_params[:limit] = opts[:limit] if opts[:limit]
      query_params[:page] = opts[:page] if opts[:page]
      query_params[:sortOrder] = opts[:sort_order] if opts[:sort_order]
      query_params[:sortBy] = opts[:sort_by] if opts[:sort_by]
      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: 'NosqlClient#list_indexes') 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::Nosql::Models::IndexCollection'
        )
      end
    end
def list_indexes ( table_name_or_id , opts = { } ) logger . debug 'Calling operation NosqlClient#list_indexes.' if logger raise "Missing the required parameter 'table_name_or_id' when calling list_indexes." if table_name_or_id . nil? if opts [ :lifecycle_state ] && ! %w[ ALL CREATING UPDATING ACTIVE DELETING DELETED FAILED INACTIVE ] . include? ( opts [ :lifecycle_state ] ) raise 'Invalid value for "lifecycle_state", must be one of ALL, CREATING, UPDATING, ACTIVE, DELETING, DELETED, FAILED, INACTIVE.' 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 if opts [ :sort_by ] && ! %w[ timeCreated name ] . include? ( opts [ :sort_by ] ) raise 'Invalid value for "sort_by", must be one of timeCreated, name.' end raise "Parameter value for 'table_name_or_id' must not be blank" if OCI :: Internal :: Util . blank_string? ( table_name_or_id ) path = '/tables/{tableNameOrId}/indexes' . sub ( '{tableNameOrId}' , table_name_or_id . to_s ) operation_signing_strategy = :standard query_params = { } query_params [ :compartmentId ] = opts [ :compartment_id ] if opts [ :compartment_id ] query_params [ :name ] = opts [ :name ] if opts [ :name ] query_params [ :lifecycleState ] = opts [ :lifecycle_state ] if opts [ :lifecycle_state ] query_params [ :limit ] = opts [ :limit ] if opts [ :limit ] query_params [ :page ] = opts [ :page ] if opts [ :page ] query_params [ :sortOrder ] = opts [ :sort_order ] if opts [ :sort_order ] query_params [ :sortBy ] = opts [ :sort_by ] if opts [ :sort_by ] 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 : 'NosqlClient#list_indexes' ) 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::Nosql::Models::IndexCollection' ) end end
Get a list of indexes on a table.
Get a list of indexes on a table .
# 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::Nosql::Models::IndexCollection IndexCollection}
A Response object with data of type { OCI :: Nosql :: Models :: IndexCollection IndexCollection }
Response
table_name_or_id
opts
:opc_request_id The client request ID for tracing.
: opc_request_id The client request ID for tracing .
opts the optional parameters
opts the optional parameters
note
Click [here] to see an example of how to use list_indexes API.
Click [ here ] to see an example of how to use list_indexes API .