class Aws::EC2Metadata
def initialize(options = {})
(**options)
-
:backoff
(Integer, Proc
) -- A backoff used for retryable -
:http_debug_output
(IO
) -- An output stream for debugging. Do -
:http_read_timeout
(Integer
) -- The number of seconds for -
:http_open_timeout
(Integer
) -- The number of seconds to -
:port
(Integer
) -- The IMDS endpoint port. -
:endpoint_mode
(String
) -- The endpoint mode for -
:endpoint
(String
) -- The IMDS -
:retries
(Integer
) -- The number of retries for failed -
:token_ttl
(Integer
) -- The session token's TTL,
Parameters:
-
options
(Hash
) --
Other tags:
- See: https://docs.aws.amazon.com/AWSEC2/latest/UserGuide/configuring-instance-metadata-service.html#instance-metadata-transition-to-version-2 -
Other tags:
- Note: - Customers using containers may need to increase their hop limit
def initialize(options = {}) @token_ttl = options[:token_ttl] || 21_600 @retries = options[:retries] || 3 @backoff = backoff(options[:backoff]) endpoint_mode = options[:endpoint_mode] || 'IPv4' @endpoint = resolve_endpoint(options[:endpoint], endpoint_mode) @port = options[:port] || 80 @http_open_timeout = options[:http_open_timeout] || 1 @http_read_timeout = options[:http_read_timeout] || 1 @http_debug_output = options[:http_debug_output] @token = nil @mutex = Mutex.new end