Method: Falcon::RealTimeResponseApi#r_tr_check_command_status_with_http_info

Defined in:
lib/crimson-falcon/api/real_time_response_api.rb

#r_tr_check_command_status_with_http_info(cloud_request_id, sequence_id, opts = {}) ⇒ Array<(DomainStatusResponseWrapper, Integer, Hash)>

Get status of an executed command on a single host.

Parameters:

  • cloud_request_id (String)

    Cloud Request ID of the executed command to query

  • sequence_id (Integer)

    Sequence ID that we want to retrieve. Command responses are chunked across sequences

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

    the optional parameters

Returns:

  • (Array<(DomainStatusResponseWrapper, Integer, Hash)>)

    DomainStatusResponseWrapper data, response status code and response headers



629
630
631
632
633
634
635
636
637
638
639
640
641
642
643
644
645
646
647
648
649
650
651
652
653
654
655
656
657
658
659
660
661
662
663
664
665
666
667
668
669
670
671
672
673
674
675
676
677
678
679
680
681
# File 'lib/crimson-falcon/api/real_time_response_api.rb', line 629

def r_tr_check_command_status_with_http_info(cloud_request_id, sequence_id, opts = {})
  if @api_client.config.debugging
    @api_client.config.logger.debug 'Calling API: RealTimeResponseApi.r_tr_check_command_status ...'
  end
  # verify the required parameter 'cloud_request_id' is set
  if @api_client.config.client_side_validation && cloud_request_id.nil?
    fail ArgumentError, "Missing the required parameter 'cloud_request_id' when calling RealTimeResponseApi.r_tr_check_command_status"
  end
  # verify the required parameter 'sequence_id' is set
  if @api_client.config.client_side_validation && sequence_id.nil?
    fail ArgumentError, "Missing the required parameter 'sequence_id' when calling RealTimeResponseApi.r_tr_check_command_status"
  end
  # resource path
  local_var_path = '/real-time-response/entities/command/v1'

  # query parameters
  query_params = opts[:query_params] || {}
  query_params[:'cloud_request_id'] = cloud_request_id
  query_params[:'sequence_id'] = sequence_id

  # header parameters
  header_params = opts[:header_params] || {}
  # HTTP header 'Accept' (if needed)
  header_params['Accept'] = @api_client.select_header_accept(['application/json'])

  # form parameters
  form_params = opts[:form_params] || {}

  # http body (model)
  post_body = opts[:debug_body]

  # return_type
  return_type = opts[:debug_return_type] || 'DomainStatusResponseWrapper'

  # auth_names
  auth_names = opts[:debug_auth_names] || ['oauth2']

  new_options = opts.merge(
    :operation => :"RealTimeResponseApi.r_tr_check_command_status",
    :header_params => header_params,
    :query_params => query_params,
    :form_params => form_params,
    :body => post_body,
    :auth_names => auth_names,
    :return_type => return_type
  )

  data, status_code, headers = @api_client.call_api(:GET, local_var_path, new_options)
  if @api_client.config.debugging
    @api_client.config.logger.debug "API called: RealTimeResponseApi#r_tr_check_command_status\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
  end
  return data, status_code, headers
end