class Aws::EC2Metadata
def get(path)
-
path
(String
) -- The full path to the metadata.
Other tags:
- See: https://docs.aws.amazon.com/AWSEC2/latest/UserGuide/instance-identity-documents.html -
See: https://docs.aws.amazon.com/AWSEC2/latest/UserGuide/instancedata-data-categories.html -
Other tags:
- Note: - Unlike other services, IMDS does not have a service API model. This
Note: - This implementation always returns a String and will not parse any
Other tags:
- Example: Fetching and parsing directory listings -
Example: Fetching and parsing JSON meta-data -
Example: Fetching the instance ID -
def get(path) retry_errors(max_retries: @retries) do @mutex.synchronize do fetch_token unless @token && !@token.expired? end open_connection do |conn| http_get(conn, path, @token.value) end end end