refresh()

in index.js [19:38]


  refresh(callback) {
    if (!callback) callback = AWS.util.fn.callback;

    if ('ssmCredentials' in this.httpProvider &&
        this.httpProvider.ssmCredentials &&
        'accessKeyId' in this.httpProvider.ssmCredentials &&
        'secretAccessKey' in this.httpProvider.ssmCredentials) {
      this.accessKeyId = this.httpProvider.ssmCredentials.accessKeyId;
      this.secretAccessKey = this.httpProvider.ssmCredentials.secretAccessKey;
    } else {
      callback(AWS.util.error(
        new Error('ssmCredentials not set'),
        { code: 'SsmCredentialsProviderFailure' }
      ))
      return;
    }
  
    this.expired = false;
    callback();
  }