module Awsmeta

Awsmeta retrieves metadata from AWS EC2 instances

Constants

VERSION

Public Instance Methods

credentials() click to toggle source
# File lib/awsmeta.rb, line 14
def credentials
  path = ResourcePaths::Metadata::CREDENTIALS_PATH
  result = Query.fetch("#{path}/#{role}")
  Helpers::Hash.symbolize_and_underscore_keys(result)
end
document() click to toggle source
# File lib/awsmeta.rb, line 20
def document
  path = ResourcePaths::Dynamic::INSTANCE_IDENTITY_PATH
  result = Query.fetch(path, true)
  Helpers::Hash.symbolize_and_underscore_keys(result)
end
instance_id() click to toggle source
# File lib/awsmeta.rb, line 26
def instance_id
  Query.fetch(ResourcePaths::Metadata::INSTANCE_ID_PATH)
end
role() click to toggle source
# File lib/awsmeta.rb, line 30
def role
  Query.fetch(ResourcePaths::Metadata::CREDENTIALS_PATH)
end