Class: Aws::Partitions::EndpointProvider Private
- Inherits:
-
Object
- Object
- Aws::Partitions::EndpointProvider
- Defined in:
- lib/aws-partitions/endpoint_provider.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.
Class Method Summary collapse
- .dns_suffix_for(region) ⇒ Object private
- .resolve(region, service) ⇒ Object private
- .signing_region(region, service) ⇒ Object private
Instance Method Summary collapse
- #dns_suffix_for(region) ⇒ Object
-
#initialize(rules) ⇒ EndpointProvider
constructor
private
Intentionally marked private.
- #resolve(region, service) ⇒ Object
- #signing_region(region, service) ⇒ Object
Constructor Details
#initialize(rules) ⇒ EndpointProvider
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.
Intentionally marked private. The format of the endpoint rules is an implementation detail.
9 10 11 |
# File 'lib/aws-partitions/endpoint_provider.rb', line 9 def initialize(rules) @rules = rules end |
Class Method Details
.dns_suffix_for(region) ⇒ 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.
102 103 104 |
# File 'lib/aws-partitions/endpoint_provider.rb', line 102 def dns_suffix_for(region) default_provider.dns_suffix_for(region) end |
.resolve(region, service) ⇒ 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.
94 95 96 |
# File 'lib/aws-partitions/endpoint_provider.rb', line 94 def resolve(region, service) default_provider.resolve(region, service) end |
.signing_region(region, service) ⇒ 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.
98 99 100 |
# File 'lib/aws-partitions/endpoint_provider.rb', line 98 def signing_region(region, service) default_provider.signing_region(region, service) end |
Instance Method Details
#dns_suffix_for(region) ⇒ Object
33 34 35 36 |
# File 'lib/aws-partitions/endpoint_provider.rb', line 33 def dns_suffix_for(region) partition = get_partition(region) partition['dnsSuffix'] end |
#resolve(region, service) ⇒ Object
17 18 19 |
# File 'lib/aws-partitions/endpoint_provider.rb', line 17 def resolve(region, service) "https://" + endpoint_for(region, service) end |
#signing_region(region, service) ⇒ Object
22 23 24 25 26 27 28 29 30 |
# File 'lib/aws-partitions/endpoint_provider.rb', line 22 def signing_region(region, service) get_partition(region). fetch("services", {}). fetch(service, {}). fetch("endpoints", {}). fetch(region, {}). fetch("credentialScope", {}). fetch("region", region) end |