Class: Aws::Partitions::Region

Inherits:
Object
  • Object
show all
Defined in:
lib/aws-sdk-core/partitions/region.rb

Instance Attribute Summary collapse

Class Method Summary collapse

Instance Method Summary collapse

Constructor Details

#initialize(options = {}) ⇒ Region

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 Region.

Parameters:

  • options (Hash) (defaults to: {})

    a customizable set of options

Options Hash (options):

  • :name (required, String)
  • :description (required, String)
  • :partition_name (required, String)
  • :services (required, Set<String>)


12
13
14
15
16
17
# File 'lib/aws-sdk-core/partitions/region.rb', line 12

def initialize(options = {})
  @name = options[:name]
  @description = options[:description]
  @partition_name = options[:partition_name]
  @services = options[:services]
end

Instance Attribute Details

#descriptionString (readonly)

Returns A short description of this region.

Returns:

  • (String)

    A short description of this region.



23
24
25
# File 'lib/aws-sdk-core/partitions/region.rb', line 23

def description
  @description
end

#nameString (readonly)

Returns The name of this region, e.g. “us-east-1”.

Returns:

  • (String)

    The name of this region, e.g. “us-east-1”.



20
21
22
# File 'lib/aws-sdk-core/partitions/region.rb', line 20

def name
  @name
end

#partition_nameString (readonly)

Returns The partition this region exists in, e.g. “aws”, “aws-cn”, “aws-us-gov”.

Returns:

  • (String)

    The partition this region exists in, e.g. “aws”, “aws-cn”, “aws-us-gov”.



27
28
29
# File 'lib/aws-sdk-core/partitions/region.rb', line 27

def partition_name
  @partition_name
end

#servicesSet<String> (readonly)

Returns The list of services available in this region. Service names are the module names as used by the AWS SDK for Ruby.

Returns:

  • (Set<String>)

    The list of services available in this region. Service names are the module names as used by the AWS SDK for Ruby.



32
33
34
# File 'lib/aws-sdk-core/partitions/region.rb', line 32

def services
  @services
end

Class Method Details

.build(region_name, region, 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.



37
38
39
40
41
42
43
44
# File 'lib/aws-sdk-core/partitions/region.rb', line 37

def build(region_name, region, partition)
  Region.new(
    name: region_name,
    description: region['description'],
    partition_name: partition['partition'],
    services: region_services(region_name, partition)
  )
end