Class: Tagenv::Ec2::Tag
- Inherits:
-
Object
- Object
- Tagenv::Ec2::Tag
- Defined in:
- lib/tagenv/ec2/tag.rb
Instance Method Summary collapse
- #get_tag_hash ⇒ Object
-
#initialize(prefix: '', instance_id: nil) ⇒ Tag
constructor
A new instance of Tag.
Constructor Details
#initialize(prefix: '', instance_id: nil) ⇒ Tag
Returns a new instance of Tag.
7 8 9 10 11 12 13 |
# File 'lib/tagenv/ec2/tag.rb', line 7 def initialize(prefix: '', instance_id: nil) @logger = Logger.new(STDOUT) region = ENV['AWS_REGION'] || Metadata.get_document['region'] @ec2 = Aws::EC2::Client.new(region: region) @prefix = prefix @instance_id = instance_id end |
Instance Method Details
#get_tag_hash ⇒ Object
15 16 17 |
# File 'lib/tagenv/ec2/tag.rb', line 15 def get_tag_hash instances_tag_with_id end |