You are viewing the documentation for an older major version of the AWS SDK for JavaScript.
The modular AWS SDK for JavaScript (v3), the latest major version of AWS SDK for JavaScript, is now stable and recommended for general use.
For more information, see the
Migration Guide and
API Reference.
Class: AWS.FileSystemCredentials
- Inherits:
-
AWS.Credentials
- Object
- AWS.Credentials
- AWS.FileSystemCredentials
- Defined in:
- lib/credentials/file_system_credentials.js
Overview
Note:
This feature is not supported in the browser environment of the SDK.
Represents credentials from a JSON file on disk. If the credentials expire, the SDK can refresh() the credentials from the file.
The format of the file should be similar to the options passed to AWS.Config:
{accessKeyId: 'akid', secretAccessKey: 'secret', sessionToken: 'optional'}
Constructor Summary collapse
-
new AWS.FileSystemCredentials(filename) ⇒ void
constructor
Creates a new FileSystemCredentials object from a filename.
Property Summary collapse
-
filename ⇒ String
readonly
The path to the JSON file on disk containing the credentials.
Properties inherited from AWS.Credentials
expired, expireTime, accessKeyId, secretAccessKey, sessionToken, expiryWindow
Method Summary collapse
-
refresh(callback) ⇒ void
Loads the credentials from the filename on disk.
Methods inherited from AWS.Credentials
needsRefresh, get, getPromise, refreshPromise
Constructor Details
new AWS.FileSystemCredentials(filename) ⇒ void
Property Details
filename ⇒ String (readonly)
Returns the path to the JSON file on disk containing the credentials.
Method Details
refresh(callback) ⇒ void
Loads the credentials from the filename on disk.