How to use the tencent-component-toolkit.Cam function in tencent-component-toolkit

To help you get started, we’ve selected a few tencent-component-toolkit examples, based on popular ways it is used in public projects.

Secure your code as it's written. Use Snyk Code to scan source code in minutes - no build needed - and fix issues immediately.

github serverless-components / tencent-laravel / src / serverless.js View on Github external
async deployFunction(credentials, inputs, regionList) {
    if (!inputs.role) {
      try {
        const camClient = new Cam(credentials)
        const roleExist = await camClient.CheckSCFExcuteRole()
        if (roleExist) {
          inputs.role = 'QCS_SCFExcuteRole'
        }
      } catch (e) {
        // no op
      }
    }

    const outputs = {}
    const appId = this.getAppId()

    const funcDeployer = async (curRegion) => {
      const code = await uploadCodeToCos(this, appId, credentials, inputs, curRegion)
      const scf = new Scf(credentials, curRegion)
      const tempInputs = {