Class: AWS::STS::Session
- Inherits:
-
Object
- Object
- AWS::STS::Session
- Defined in:
- lib/aws/sts/session.rb
Overview
Represents a session using temporary AWS credentials. Use #new_session or #new_federated_session to get a new set of temporary credentials.
Direct Known Subclasses
Instance Attribute Summary collapse
-
#credentials ⇒ Hash
readonly
A hash containing the following keys:.
-
#expires_at ⇒ Time
readonly
The date on which these credentials expire.
Instance Method Summary collapse
-
#initialize(opts = {}) ⇒ Session
constructor
A new instance of Session.
Constructor Details
#initialize(opts = {}) ⇒ Session
Returns a new instance of Session.
41 42 43 44 |
# File 'lib/aws/sts/session.rb', line 41 def initialize(opts = {}) @credentials = opts[:credentials] @expires_at = opts[:expires_at] end |
Instance Attribute Details
#credentials ⇒ Hash (readonly)
A hash containing the following keys:
-
:access_key_id
-
:secret_access_key
-
:session_token
This hash may be passed as-is to AWS.config or to the constructor of any service interface that supports temporary security credentials from the AWS Security Token Service.
33 34 35 |
# File 'lib/aws/sts/session.rb', line 33 def credentials @credentials end |
#expires_at ⇒ Time (readonly)
The date on which these credentials expire.
38 39 40 |
# File 'lib/aws/sts/session.rb', line 38 def expires_at @expires_at end |