Class: AWS::STS::Client
- Inherits:
-
Core::Client
- Object
- Core::Client
- AWS::STS::Client
- Extended by:
- Core::Client::QueryXML
- Defined in:
- lib/aws/sts/client.rb
Overview
Client class for AWS Security Token Service (STS).
Constant Summary collapse
- API_VERSION =
'2011-06-15'
- REGION_US_E1 =
'sts.amazonaws.com'
Instance Attribute Summary
Attributes inherited from Core::Client
Instance Method Summary collapse
-
#get_federation_token(options = {}) ⇒ Core::Response
Calls the GetFederationToken API operation.
-
#get_session_token(options = {}) ⇒ Core::Response
Calls the GetSessionToken API operation.
-
#initialize(*args) ⇒ Client
constructor
A new instance of Client.
Methods inherited from Core::Client
#operations, #with_http_handler, #with_options
Constructor Details
#initialize(*args) ⇒ Client
Returns a new instance of Client.
29 30 31 32 33 34 35 36 |
# File 'lib/aws/sts/client.rb', line 29 def initialize *args super unless config.use_ssl? msg = 'AWS Security Token Service (STS) requires ssl but the ' + ':use_ssl option is set to false. Try passing :use_ssl => true' raise ArgumentError, msg end end |
Instance Method Details
#get_federation_token(options = {}) ⇒ Core::Response
Calls the GetFederationToken API operation.
Options:
-
:name
- required - (String) The name of the federated user associated with the session. -
:policy
- (String) A policy specifying the permissions associated with the session. The caller can delegate their own permissions by specifying a policy for the session, and both policies will be checked when a service call is made. In other words, permissions of the session credentials are the intersection of the policy specified in the API and the policies associated with the user who issued the session. -
:duration_seconds
- (Integer) The duration, in seconds, that the session should last. Acceptable durations for federation sessions range from 3600s (1 hour) to 129600s (36 hours), with 43200 as the default.
Response Structure:
-
:credentials
- (Hash)-
:access_key_id
- (String) -
:secret_access_key
- (String) -
:session_token
- (String) -
:expiration
- (Time)
-
-
:federated_user
- (Hash)-
:federated_user_id
- (String) -
:arn
- (String)
-
-
:packed_policy_size
- (Integer)
73 |
# File 'lib/aws/sts/client.rb', line 73 define_client_method :get_federation_token, 'GetFederationToken' |
#get_session_token(options = {}) ⇒ Core::Response
Calls the GetSessionToken API operation.
Options:
-
:duration_seconds
- (Integer) The duration, in seconds, that the session should last. Acceptable durations for IAM user sessions range from 3600s (1 hour) to 129600s (36 hours), with 43200 as the default. Sessions started for AWS Account owners are restricted to a maximum 3600s.
Response Structure:
-
:credentials
- (Hash)-
:access_key_id
- (String) -
:secret_access_key
- (String) -
:session_token
- (String) -
:expiration
- (Time)
-
96 |
# File 'lib/aws/sts/client.rb', line 96 define_client_method :get_session_token, 'GetSessionToken' |