Class: Aws::Partitions::Service
- Inherits:
-
Object
- Object
- Aws::Partitions::Service
- Defined in:
- lib/aws-sdk-core/partitions/service.rb
Instance Attribute Summary collapse
-
#name ⇒ String
readonly
The name of this service.
-
#partition_name ⇒ String
readonly
The partition name, e.g “aws”, “aws-cn”, “aws-us-gov”.
-
#partition_region ⇒ String?
readonly
The global patition endpoint for this service.
-
#regions ⇒ Set<String>
readonly
The regions this service is available in.
Class Method Summary collapse
Instance Method Summary collapse
-
#initialize(options = {}) ⇒ Service
constructor
private
A new instance of Service.
-
#regionalized? ⇒ Boolean
Returns ‘false` if the service operates with a single global endpoint for the current partition, returns `true` if the service is available in mutliple regions.
Constructor Details
#initialize(options = {}) ⇒ Service
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 Service.
13 14 15 16 17 18 19 20 |
# File 'lib/aws-sdk-core/partitions/service.rb', line 13 def initialize( = {}) @name = [:name] @partition_name = [:partition_name] @regions = [:regions] @regionalized = [:regionalized] @partition_region = [:partition_region] @regions << @partition_region if !@regionalized end |
Instance Attribute Details
#name ⇒ String (readonly)
Returns The name of this service. The name is the module name as used by the AWS SDK for Ruby.
24 25 26 |
# File 'lib/aws-sdk-core/partitions/service.rb', line 24 def name @name end |
#partition_name ⇒ String (readonly)
Returns The partition name, e.g “aws”, “aws-cn”, “aws-us-gov”.
27 28 29 |
# File 'lib/aws-sdk-core/partitions/service.rb', line 27 def partition_name @partition_name end |
#partition_region ⇒ String? (readonly)
Returns The global patition endpoint for this service. May be ‘nil`.
35 36 37 |
# File 'lib/aws-sdk-core/partitions/service.rb', line 35 def partition_region @partition_region end |
#regions ⇒ Set<String> (readonly)
Returns The regions this service is available in. Regions are scoped to the partition.
31 32 33 |
# File 'lib/aws-sdk-core/partitions/service.rb', line 31 def regions @regions end |
Class Method Details
.build(service_name, service, partition) ⇒ 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.
51 52 53 54 55 56 57 58 59 |
# File 'lib/aws-sdk-core/partitions/service.rb', line 51 def build(service_name, service, partition) Service.new( name: service_name, partition_name: partition['partition'], regions: regions(service, partition), regionalized: service['isRegionalized'] != false, partition_region: partition_region(service) ) end |
Instance Method Details
#regionalized? ⇒ Boolean
Returns ‘false` if the service operates with a single global endpoint for the current partition, returns `true` if the service is available in mutliple regions.
Some services have both a partition endpoint and regional endpoints.
44 45 46 |
# File 'lib/aws-sdk-core/partitions/service.rb', line 44 def regionalized? @regionalized end |