Class: Aws::InstanceProfileCredentials::Token Private
- Inherits:
-
Object
- Object
- Aws::InstanceProfileCredentials::Token
- Defined in:
- lib/aws-sdk-core/instance_profile_credentials.rb
Overview
This class is part of a private API. You should avoid using this class if possible, as it may be removed or be changed in the future.
Token used to fetch IMDS profile and credentials
Instance Attribute Summary collapse
-
#value ⇒ Object
readonly
private
- String
-
token value.
Instance Method Summary collapse
- #expired? ⇒ Boolean private
-
#initialize(value, ttl) ⇒ Token
constructor
private
A new instance of Token.
Constructor Details
#initialize(value, ttl) ⇒ Token
This method is part of a private API. You should avoid using this method if possible, as it may be removed or be changed in the future.
Returns a new instance of Token.
225 226 227 228 229 |
# File 'lib/aws-sdk-core/instance_profile_credentials.rb', line 225 def initialize(value, ttl) @ttl = ttl @value = value @created_time = Time.now end |
Instance Attribute Details
#value ⇒ Object (readonly)
This method is part of a private API. You should avoid using this method if possible, as it may be removed or be changed in the future.
- String
-
token value
232 233 234 |
# File 'lib/aws-sdk-core/instance_profile_credentials.rb', line 232 def value @value end |
Instance Method Details
#expired? ⇒ Boolean
This method is part of a private API. You should avoid using this method if possible, as it may be removed or be changed in the future.
234 235 236 |
# File 'lib/aws-sdk-core/instance_profile_credentials.rb', line 234 def expired? Time.now - @created_time > @ttl end |