Method: OCI::ResourceManager::ResourceManagerClient#get_stack

Defined in:
lib/oci/resource_manager/resource_manager_client.rb

#get_stack(stack_id, opts = {}) ⇒ Response

Gets a stack using the stack ID.

Parameters:

  • stack_id (String)

    The stack OCID.

  • 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)

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

Returns:

  • (Response)

    A Response object with data of type Stack



840
841
842
843
844
845
846
847
848
849
850
851
852
853
854
855
856
857
858
859
860
861
862
863
864
865
866
867
868
869
870
871
872
873
874
875
876
# File 'lib/oci/resource_manager/resource_manager_client.rb', line 840

def get_stack(stack_id, opts = {})
  logger.debug 'Calling operation ResourceManagerClient#get_stack.' if logger

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

  path = '/stacks/{stackId}'.sub('{stackId}', stack_id.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: 'ResourceManagerClient#get_stack') 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::ResourceManager::Models::Stack'
    )
  end
  # rubocop:enable Metrics/BlockLength
end