Socket
Book a DemoInstallSign in
Socket

@serverless/tencent-cam-role

Package Overview
Dependencies
Maintainers
5
Versions
8
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

@serverless/tencent-cam-role

Tencent Cloud Serverless CAM Role

npmnpm
Version
1.0.0
Version published
Maintainers
5
Created
Source

Tencent-cam-role

Easily provision Tencent CAM roles using Serverless Components.

 

 

1. Install

$ npm install -g serverless

2. Create

Just create a serverless.yml file

$ touch serverless.yml
$ touch .env      # your Tencent api keys
# .env
TENCENT_SECRET_ID=123
TENCENT_SECRET_KEY=123

3. Configure

# serverless.yml

myFunction1:
  component: "./tencent-cam-role"
  inputs:
    service:
      - scf.qcloud.com
      - cos.qcloud.com
    policy:
      roleName: QCS_SCFExcuteRole
      # description: test # Optional
      # policyId:  # PolicyId and policyName must exist at least one
        # - 1
        # - 2
      policyName:
        - QCloudResourceFullAccess
        - QcloudAccessForCDNRole
  • The binding between policyName and policyId is bound.

4. Deploy

$ serverless

 

Test

DFOUNDERLIU-MB0:temp dfounderliu$ sls

  myFunction1: 
    name:    w9pe3ej-jzy0lsg
    roleId:  4611686018427945536
    service: 
      - scf.qcloud.com
      - cos.qcloud.com
    policy: 
      roleName:   QCS_SCFExcuteRole
      policyId: 
        - 1
        - 2
        - 16313162
      policyName: 
        - AdministratorAccess
        - QCloudResourceFullAccess
        - QcloudAccessForCDNRole

  8s › myFunction1 › done

DFOUNDERLIU-MB0:temp dfounderliu$ sls remove

  2s › myFunction1 › done


New to Components?

Checkout the Serverless Components repo for more information.

FAQs

Package last updated on 25 Oct 2019

Did you know?

Socket

Socket for GitHub automatically highlights issues in each pull request and monitors the health of all your open source dependencies. Discover the contents of your packages and block harmful activity before you install or update your dependencies.

Install

Related posts