Given a valid region name, return a boto.sts.connection.STSConnection.
Type: | str |
---|---|
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.
Return type: | list |
---|---|
Returns: | A list of boto.regioninfo.RegionInfo instances |
Parameters: |
---|
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.
Parameters: |
|
---|
Variables: |
|
---|
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.
Variables: |
|
---|