Class: Aws::Endpoints::EndpointRule Private
- Defined in:
- lib/aws-sdk-core/endpoints/endpoint_rule.rb
Overview
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.
This class is deprecated. It is used by the Runtime endpoint resolution approach. It has been replaced by a code generated approach in each service gem. It can be removed in a new major version. It has to exist because old service gems can use a new core version. # @api private
Instance Attribute Summary collapse
- #conditions ⇒ Object readonly private
- #documentation ⇒ Object readonly private
- #endpoint ⇒ Object readonly private
- #type ⇒ Object readonly private
Instance Method Summary collapse
-
#initialize(type: 'endpoint', conditions:, endpoint:, documentation: nil) ⇒ EndpointRule
constructor
private
A new instance of EndpointRule.
- #match(parameters, assigned = {}) ⇒ Object private
- #resolved_endpoint(parameters, assigns) ⇒ Object private
Methods inherited from Rule
Constructor Details
#initialize(type: 'endpoint', conditions:, endpoint:, documentation: nil) ⇒ EndpointRule
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 EndpointRule.
11 12 13 14 15 16 17 |
# File 'lib/aws-sdk-core/endpoints/endpoint_rule.rb', line 11 def initialize(type: 'endpoint', conditions:, endpoint:, documentation: nil) @type = type @conditions = Condition.from_json(conditions) @endpoint = endpoint @documentation = documentation end |
Instance Attribute Details
#conditions ⇒ Object (readonly)
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.
20 21 22 |
# File 'lib/aws-sdk-core/endpoints/endpoint_rule.rb', line 20 def conditions @conditions end |
#documentation ⇒ Object (readonly)
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.
22 23 24 |
# File 'lib/aws-sdk-core/endpoints/endpoint_rule.rb', line 22 def documentation @documentation end |
#endpoint ⇒ Object (readonly)
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.
21 22 23 |
# File 'lib/aws-sdk-core/endpoints/endpoint_rule.rb', line 21 def endpoint @endpoint end |
#type ⇒ Object (readonly)
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.
19 20 21 |
# File 'lib/aws-sdk-core/endpoints/endpoint_rule.rb', line 19 def type @type end |
Instance Method Details
#match(parameters, assigned = {}) ⇒ Object
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.
24 25 26 27 28 29 30 31 32 |
# File 'lib/aws-sdk-core/endpoints/endpoint_rule.rb', line 24 def match(parameters, assigned = {}) assigns = assigned.dup matched = conditions.all? do |condition| output = condition.match?(parameters, assigns) assigns = assigns.merge(condition.assigned) if condition.assign output end resolved_endpoint(parameters, assigns) if matched end |
#resolved_endpoint(parameters, assigns) ⇒ Object
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.
34 35 36 37 38 39 40 41 42 43 44 |
# File 'lib/aws-sdk-core/endpoints/endpoint_rule.rb', line 34 def resolved_endpoint(parameters, assigns) Endpoint.new( url: resolve_value(@endpoint['url'], parameters, assigns), properties: resolve_properties( @endpoint['properties'] || {}, parameters, assigns ), headers: resolve_headers(parameters, assigns) ) end |