You are viewing documentation for version 2 of the AWS SDK for Ruby. Version 3 documentation can be found here.
Class: Aws::Partitions::Partition
- Inherits:
-
Object
- Object
- Aws::Partitions::Partition
show all
- Defined in:
- aws-sdk-core/lib/aws-sdk-core/partitions/partition.rb
Instance Attribute Summary collapse
Instance Method Summary
collapse
Instance Attribute Details
#name ⇒ String
Returns The partition name, e.g. "aws", "aws-cn", "aws-us-gov".
16
17
18
|
# File 'aws-sdk-core/lib/aws-sdk-core/partitions/partition.rb', line 16
def name
@name
end
|
Instance Method Details
#region(region_name) ⇒ Region
21
22
23
24
25
26
27
28
29
|
# File 'aws-sdk-core/lib/aws-sdk-core/partitions/partition.rb', line 21
def region(region_name)
if @regions.key?(region_name)
@regions[region_name]
else
msg = "invalid region name #{region_name.inspect}; valid region "
msg << "names include %s" % [@regions.keys.join(', ')]
raise ArgumentError, msg
end
end
|
#regions ⇒ Array<Region>
32
33
34
|
# File 'aws-sdk-core/lib/aws-sdk-core/partitions/partition.rb', line 32
def regions
@regions.values
end
|
#service(service_name) ⇒ Service
39
40
41
42
43
44
45
46
47
|
# File 'aws-sdk-core/lib/aws-sdk-core/partitions/partition.rb', line 39
def service(service_name)
if @services.key?(service_name)
@services[service_name]
else
msg = "invalid service name #{service_name.inspect}; valid service "
msg << "names include %s" % [@services.keys.join(', ')]
raise ArgumentError, msg
end
end
|
#services ⇒ Array<Service>
50
51
52
|
# File 'aws-sdk-core/lib/aws-sdk-core/partitions/partition.rb', line 50
def services
@services.values
end
|