HEX
Server: Apache/2.4.52 (Ubuntu)
System: Linux spn-python 5.15.0-89-generic #99-Ubuntu SMP Mon Oct 30 20:42:41 UTC 2023 x86_64
User: arjun (1000)
PHP: 8.1.2-1ubuntu2.20
Disabled: NONE
Upload Files
File: //home/arjun/projects/good-life-be/node_modules/aws-sdk/lib/credentials/temporary_credentials.d.ts
import {Credentials} from '../credentials';
import {AWSError} from '../error';
import STS = require('../../clients/sts');

export class TemporaryCredentials extends Credentials {
    /**
     * Creates a new temporary credentials object.
     * @param {Object} options - a map of options that are passed to the AWS.STS.assumeRole() or AWS.STS.getSessionToken() operations. If a RoleArn parameter is passed in, credentials will be based on the IAM role.
     * @param {Object} masterCredentials - The master (non-temporary) credentials used to get and refresh credentials from AWS STS.
     */
    constructor(options: TemporaryCredentials.TemporaryCredentialsOptions, masterCredentials?: Credentials);
    /**
     * Creates a new temporary credentials object.
     * @param {Object} options - a map of options that are passed to the AWS.STS.assumeRole() or AWS.STS.getSessionToken() operations. If a RoleArn parameter is passed in, credentials will be based on the IAM role.
     */
    constructor(options?: TemporaryCredentials.TemporaryCredentialsOptions);
    /**
     * Refreshes credentials using AWS.STS.assumeRole() or AWS.STS.getSessionToken(), depending on whether an IAM role ARN was passed to the credentials constructor().
     */
    refresh(callback: (err?: AWSError) => void): void;

    /**
     * The master (non-temporary) credentials used to get and refresh temporary credentials from AWS STS.
     */
    masterCredentials: Credentials
}

// Needed to expose interfaces on the class
declare namespace TemporaryCredentials {
    export type TemporaryCredentialsOptions = STS.Types.AssumeRoleRequest|STS.Types.GetSessionTokenRequest;
}