You are viewing documentation for version 3 of the AWS SDK for Ruby. Version 2 documentation can be found here.

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

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

Instance Method Summary collapse

Constructor Details

#initialize(rules, request_uri_pattern) ⇒ Endpoint

Returns a new instance of Endpoint

Parameters:



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

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

Parameters:

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

Returns:

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


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

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