async updateCredential()

in src/ram_role_arn_credential.ts [41:55]


  async updateCredential() {
    const params: {[key: string]: any} = {
      accessKeyId: this.accessKeyId,
      securityToken: this.securityToken,
      roleArn: this.roleArn,
      action: 'AssumeRole',
      durationSeconds: this.durationSeconds,
      roleSessionName: this.roleSessionName
    };
    if (this.policy) {
      params.policy = this.policy;
    }
    const json = await request(this.host, params, this.runtime, this.accessKeySecret);
    this.sessionCredential = json.Credentials;
  }