Method: OCI::Streaming::StreamClient#get_group

Defined in:
lib/oci/streaming/stream_client.rb

#get_group(stream_id, group_name, opts = {}) ⇒ Response

Returns the current state of a consumer group.

Parameters:

  • stream_id (String)

    The OCID of the stream, on which the group is operating.

  • group_name (String)

    The name of the consumer group.

  • opts (Hash) (defaults to: {})

    the optional parameters

Options Hash (opts):

  • :retry_config (OCI::Retry::RetryConfig)

    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

  • :opc_request_id (String)

    The unique Oracle-assigned identifier for the request. If you need to contact Oracle about a particular request, please provide the request ID.

Returns:



363
364
365
366
367
368
369
370
371
372
373
374
375
376
377
378
379
380
381
382
383
384
385
386
387
388
389
390
391
392
393
394
395
396
397
398
399
400
401
# File 'lib/oci/streaming/stream_client.rb', line 363

def get_group(stream_id, group_name, opts = {})
  logger.debug 'Calling operation StreamClient#get_group.' if logger

  raise "Missing the required parameter 'stream_id' when calling get_group." if stream_id.nil?
  raise "Missing the required parameter 'group_name' when calling get_group." if group_name.nil?
  raise "Parameter value for 'stream_id' must not be blank" if OCI::Internal::Util.blank_string?(stream_id)
  raise "Parameter value for 'group_name' must not be blank" if OCI::Internal::Util.blank_string?(group_name)

  path = '/streams/{streamId}/groups/{groupName}'.sub('{streamId}', stream_id.to_s).sub('{groupName}', group_name.to_s)
  operation_signing_strategy = :standard

  # rubocop:disable Style/NegatedIf
  # Query Params
  query_params = {}

  # 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: 'StreamClient#get_group') 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::Streaming::Models::Group'
    )
  end
  # rubocop:enable Metrics/BlockLength
end