class Aws::EC2Metadata::Token
@api private
Attributes
- String
-
Returns the token value.
Public Class Methods
Source
# File lib/aws-sdk-core/ec2_metadata.rb, line 223 def initialize(options = {}) @ttl = options[:ttl] @value = options[:value] @created_time = options[:created_time] || Time.now end
Public Instance Methods
Source
# File lib/aws-sdk-core/ec2_metadata.rb, line 233 def expired? Time.now - @created_time > @ttl end
- Boolean
-
Returns true if the token expired.