AWS services or capabilities described in AWS Documentation may vary by region/location. Click
Getting Started with Amazon AWS to see specific differences applicable to the China (Beijing) Region.
Class: Aws::Partitions::Partition
- Inherits:
-
Object
- Object
- Aws::Partitions::Partition
show all
- Defined in:
- gems/aws-partitions/lib/aws-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".
17
18
19
|
# File 'gems/aws-partitions/lib/aws-partitions/partition.rb', line 17
def name
@name
end
|
Instance Method Details
#region(region_name) ⇒ Region
22
23
24
25
26
27
28
29
30
|
# File 'gems/aws-partitions/lib/aws-partitions/partition.rb', line 22
def region(region_name)
if @regions.key?(region_name)
@regions[region_name]
else
msg = "invalid region name #{region_name.inspect}; valid region "\
"names include #{@regions.keys.join(', ')}"
raise ArgumentError, msg
end
end
|
#region?(region_name) ⇒ Boolean
Returns true if the region is in the partition.
39
40
41
|
# File 'gems/aws-partitions/lib/aws-partitions/partition.rb', line 39
def region?(region_name)
@regions.key?(region_name)
end
|
#regions ⇒ Array<Region>
33
34
35
|
# File 'gems/aws-partitions/lib/aws-partitions/partition.rb', line 33
def regions
@regions.values
end
|
#service(service_name) ⇒ Service
46
47
48
49
50
51
52
53
54
|
# File 'gems/aws-partitions/lib/aws-partitions/partition.rb', line 46
def service(service_name)
if @services.key?(service_name)
@services[service_name]
else
msg = "invalid service name #{service_name.inspect}; valid service "\
"names include #{@services.keys.join(', ')}"
raise ArgumentError, msg
end
end
|
#service?(service_name) ⇒ Boolean
Returns true if the service is in the partition.
63
64
65
|
# File 'gems/aws-partitions/lib/aws-partitions/partition.rb', line 63
def service?(service_name)
@services.key?(service_name)
end
|
#services ⇒ Array<Service>
57
58
59
|
# File 'gems/aws-partitions/lib/aws-partitions/partition.rb', line 57
def services
@services.values
end
|