Given a valid region name, return a boto.sts.connection.STSConnection.
|Parameters:||region_name – The name of the region to connect to.|
|Return type:||boto.sts.connection.STSConnection or None|
|Returns:||A connection to the given region, or None if an invalid region name is given|
Get all available regions for the STS service.
|Returns:||A list of boto.regioninfo.RegionInfo instances|
Returns a set of temporary credentials that the caller can use to access resources that are allowed by the temporary credentials. The credentials are valid for the duration that the caller specified, which can be from 15 minutes (900 seconds) to 1 hour (3600 seconds)
An instance of boto.sts.credentials.AssumedRole
Return a valid session token. Because retrieving new tokens from the Secure Token Service is a fairly heavyweight operation this module caches previously retrieved tokens and returns them when appropriate. Each token is cached with a key consisting of the region name of the STS endpoint concatenated with the requesting user’s access id. If there is a token in the cache meeting with this key, the session expiration is checked to make sure it is still valid and if so, the cached token is returned. Otherwise, a new session token is requested from STS and it is placed into the cache and returned.
Create and return a new Session Token based on the contents of a JSON document.
|Parameters:||json_doc (str) – A string containing a JSON document with a previously saved Credentials object.|
Checks to see if the Session Token is expired or not. By default it will check to see if the Session Token is expired as of the moment the method is called. However, you can supply an optional parameter which is the number of seconds of offset into the future for the check. For example, if you supply a value of 5, this method will return a True if the Session Token will be expired 5 seconds from this moment.
|Parameters:||time_offset_seconds (int) – The number of seconds into the future to test the Session Token for expiration.|
Create and return a new Session Token based on the contents of a previously saved JSON-format file.
|Parameters:||file_path (str) – The fully qualified path to the JSON-format file containing the previously saved Session Token information.|
Persist a Session Token to a file in JSON format.
|Parameters:||path (str) – The fully qualified path to the file where the the Session Token data should be written. Any previous data in the file will be overwritten. To help protect the credentials contained in the file, the permissions of the file will be set to readable/writable by owner only.|
Return a Python dict containing the important information about this Session Token.