lib/oci/streaming/stream_admin_client.rb
def list_streams(opts = {})
      logger.debug 'Calling operation StreamAdminClient#list_streams.' if logger


      if opts[:sort_by] && !%w[NAME TIMECREATED].include?(opts[:sort_by])
        raise 'Invalid value for "sort_by", must be one of NAME, TIMECREATED.'
      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[:lifecycle_state] && !OCI::Streaming::Models::Stream::LIFECYCLE_STATE_ENUM.include?(opts[:lifecycle_state])
        raise 'Invalid value for "lifecycle_state", must be one of the values in OCI::Streaming::Models::Stream::LIFECYCLE_STATE_ENUM.'
      end

      path = '/streams'
      operation_signing_strategy = :standard

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

      # 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: 'StreamAdminClient#list_streams') 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::Streaming::Models::StreamSummary>'
        )
      end
      # rubocop:enable Metrics/BlockLength
    end
# Lists the streams in the given compartment id.
# If the compartment id is specified, it will list streams in the compartment, regardless of their stream pool.
# If the stream pool id is specified, the action will be scoped to that stream pool.
# The compartment id and stream pool id cannot be specified at the same time.
#
# @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 OCID of the compartment. Is exclusive with the `streamPoolId` parameter. One of them is required.
# @option opts [String] :stream_pool_id The OCID of the stream pool. Is exclusive with the `compartmentId` parameter. One of them is required.
# @option opts [String] :id A filter to return only resources that match the given ID exactly.
#
# @option opts [String] :name A filter to return only resources that match the given name exactly.
#
# @option opts [Integer] :limit The maximum number of items to return. The value must be between 1 and 50. The default is 10. (default to 5)
# @option opts [String] :page The page at which to start retrieving results.
# @option opts [String] :sort_by The field to sort by. You can provide no more than one sort order. By default, `TIMECREATED` sorts results in descending order and `NAME` sorts results in ascending order.
#
#   Allowed values are: NAME, TIMECREATED
# @option opts [String] :sort_order The sort order to use, either 'asc' or 'desc'.
#
#   Allowed values are: ASC, DESC
# @option opts [String] :lifecycle_state A filter to only return resources that match the given lifecycle state. The state value is case-insensitive.
#
# @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 request ID.
#
# @return [Response] A Response object with data of type Array<{OCI::Streaming::Models::StreamSummary StreamSummary}>
# @note Click [here](https://docs.cloud.oracle.com/en-us/iaas/tools/ruby-sdk-examples/latest/streaming/list_streams.rb.html) to see an example of how to use list_streams API.
Lists the streams in the given compartment id.
If the compartment id is specified, it will list streams in the compartment, regardless of their stream pool.
If the stream pool id is specified, the action will be scoped to that stream pool.
The compartment id and stream pool id cannot be specified at the same time.
Lists the streams in the given compartment id . If the compartment id is specified it will list streams in the compartment regardless of their stream pool . If the stream pool id is specified the action will be scoped to that stream pool . The compartment id and stream pool id cannot be specified at the same time .
def list_streams(opts = {})
      logger.debug 'Calling operation StreamAdminClient#list_streams.' if logger
      if opts[:sort_by] && !%w[NAME TIMECREATED].include?(opts[:sort_by])
        raise 'Invalid value for "sort_by", must be one of NAME, TIMECREATED.'
      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[:lifecycle_state] && !OCI::Streaming::Models::Stream::LIFECYCLE_STATE_ENUM.include?(opts[:lifecycle_state])
        raise 'Invalid value for "lifecycle_state", must be one of the values in OCI::Streaming::Models::Stream::LIFECYCLE_STATE_ENUM.'
      end
      path = '/streams'
      operation_signing_strategy = :standard
      query_params = {}
      query_params[:compartmentId] = opts[:compartment_id] if opts[:compartment_id]
      query_params[:streamPoolId] = opts[:stream_pool_id] if opts[:stream_pool_id]
      query_params[:id] = opts[:id] if opts[:id]
      query_params[:name] = opts[:name] if opts[:name]
      query_params[:limit] = opts[:limit] if opts[:limit]
      query_params[:page] = opts[:page] if opts[:page]
      query_params[:sortBy] = opts[:sort_by] if opts[:sort_by]
      query_params[:sortOrder] = opts[:sort_order] if opts[:sort_order]
      query_params[:lifecycleState] = opts[:lifecycle_state] if opts[:lifecycle_state]
      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: 'StreamAdminClient#list_streams') 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::Streaming::Models::StreamSummary>'
        )
      end
    end
def list_streams ( opts = { } ) logger . debug 'Calling operation StreamAdminClient#list_streams.' if logger if opts [ :sort_by ] && ! %w[ NAME TIMECREATED ] . include? ( opts [ :sort_by ] ) raise 'Invalid value for "sort_by", must be one of NAME, TIMECREATED.' 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 [ :lifecycle_state ] && ! OCI :: Streaming :: Models :: Stream :: LIFECYCLE_STATE_ENUM . include? ( opts [ :lifecycle_state ] ) raise 'Invalid value for "lifecycle_state", must be one of the values in OCI::Streaming::Models::Stream::LIFECYCLE_STATE_ENUM.' end path = '/streams' operation_signing_strategy = :standard query_params = { } query_params [ :compartmentId ] = opts [ :compartment_id ] if opts [ :compartment_id ] query_params [ :streamPoolId ] = opts [ :stream_pool_id ] if opts [ :stream_pool_id ] query_params [ :id ] = opts [ :id ] if opts [ :id ] query_params [ :name ] = opts [ :name ] if opts [ :name ] query_params [ :limit ] = opts [ :limit ] if opts [ :limit ] query_params [ :page ] = opts [ :page ] if opts [ :page ] query_params [ :sortBy ] = opts [ :sort_by ] if opts [ :sort_by ] query_params [ :sortOrder ] = opts [ :sort_order ] if opts [ :sort_order ] query_params [ :lifecycleState ] = opts [ :lifecycle_state ] if opts [ :lifecycle_state ] 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 : 'StreamAdminClient#list_streams' ) 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::Streaming::Models::StreamSummary>' ) end end
Lists the streams in the given compartment id.
Lists the streams in the given compartment id .
# 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::Streaming::Models::StreamSummary StreamSummary}>
A Response object with data of type Array< { OCI :: Streaming :: Models :: StreamSummary StreamSummary } >
Response
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 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 request ID .
opts the optional parameters
opts the optional parameters
note
Click [here] to see an example of how to use list_streams API.
Click [ here ] to see an example of how to use list_streams API .