public build()

in src/providers/static_sts.ts [28:54]


  public build(): StaticSTSCredentialsProvider {
    if (!this.accessKeyId) {
      this.accessKeyId = process.env['ALIBABA_CLOUD_ACCESS_KEY_ID'];
    }

    if (!this.accessKeyId) {
      throw new Error('the access key id is empty');
    }

    if (!this.accessKeySecret) {
      this.accessKeySecret = process.env['ALIBABA_CLOUD_ACCESS_KEY_SECRET'];
    }

    if (!this.accessKeySecret) {
      throw new Error('the access key secret is empty');
    }

    if (!this.securityToken) {
      this.securityToken = process.env['ALIBABA_CLOUD_SECURITY_TOKEN'];
    }

    if (!this.securityToken) {
      throw new Error('the security token is empty');
    }

    return new StaticSTSCredentialsProvider(this);
  }