Class: Aws::Rest::Request::Endpoint Private

Inherits:
Object
  • Object
show all
Defined in:
lib/aws-sdk-core/rest/request/endpoint.rb

This class is part of a private API. You should avoid using this class if possible, as it may be removed or be changed in the future.

Instance Method Summary collapse

Constructor Details

#initialize(rules, request_uri_pattern) ⇒ Endpoint

This method is part of a private API. You should avoid using this method if possible, as it may be removed or be changed in the future.

Returns a new instance of Endpoint.

Parameters:



12
13
14
15
16
17
18
# File 'lib/aws-sdk-core/rest/request/endpoint.rb', line 12

def initialize(rules, request_uri_pattern)
  @rules = rules
  request_uri_pattern.split('?').tap do |path_part, query_part|
    @path_pattern = path_part
    @query_prefix = query_part
  end
end

Instance Method Details

#uri(base_uri, params) ⇒ URI::HTTPS, URI::HTTP

This method is part of a private API. You should avoid using this method if possible, as it may be removed or be changed in the future.

Parameters:

  • base_uri (URI::HTTPS, URI::HTTP)
  • params (Hash, Struct)

Returns:

  • (URI::HTTPS, URI::HTTP)


23
24
25
26
27
28
# File 'lib/aws-sdk-core/rest/request/endpoint.rb', line 23

def uri(base_uri, params)
  uri = URI.parse(base_uri.to_s)
  apply_path_params(uri, params)
  apply_querystring_params(uri, params)
  uri
end