class Google::Cloud::Env

def lookup_metadata type, entry, query: nil

Raises:
  • (MetadataServerNotResponding) - if the Metadata Server is not

Returns:
  • (nil) - if there is no data for the specified type and entry
  • (String) - the data

Parameters:
  • query (Hash{String => String}) -- Any additional query parameters
  • entry (String) -- Metadata entry path to look up.
  • type (String) -- Type of metadata to look up. Currently supported
def lookup_metadata type, entry, query: nil
  compute_metadata.lookup "#{type}/#{entry}", query: query
end