npm package discovery and stats viewer.

Discover Tips

  • General search

    [free text search, go nuts!]

  • Package details

    pkg:[package-name]

  • User packages

    @[username]

Sponsor

Optimize Toolset

I’ve always been into building performant and accessible sites, but lately I’ve been taking it extremely seriously. So much so that I’ve been building a tool to help me optimize and monitor the sites that I build to make sure that I’m making an attempt to offer the best experience to those who visit them. If you’re into performant, accessible and SEO friendly sites, you might like it too! You can check it out at Optimize Toolset.

About

Hi, 👋, I’m Ryan Hefner  and I built this site for me, and you! The goal of this site was to provide an easy way for me to check the stats on my npm packages, both for prioritizing issues and updates, and to give me a little kick in the pants to keep up on stuff.

As I was building it, I realized that I was actually using the tool to build the tool, and figured I might as well put this out there and hopefully others will find it to be a fast and useful way to search and browse npm packages as I have.

If you’re interested in other things I’m working on, follow me on Twitter or check out the open source projects I’ve been publishing on GitHub.

I am also working on a Twitter bot for this site to tweet the most popular, newest, random packages from npm. Please follow that account now and it will start sending out packages soon–ish.

Open Software & Tools

This site wouldn’t be possible without the immense generosity and tireless efforts from the people who make contributions to the world and share their work via open source initiatives. Thank you 🙏

© 2025 – Pkg Stats / Ryan Hefner

@alicloud/console-bench-core

v1.0.0

Published

alibabacloud console bench sdk core

Readme

安装

安装依赖,并写入 package.json

npm install @alicloud/console-bench-core -S

环境要求

  • Node.js >= 8.x
  • 找阿里云企业工作台团队,提供 OpenAPI 访问凭证,示例如下:
{
  "appName": "my-app", // 应用的唯一标识
  "arnPostfix": "my-role", // 角色定义
  "consoleKey": "xxx",
  "consoleSecret": "xxx",
  "openapiList": [ // OpenAPI调用白名单
    {
      "product": "ecs",
      "actions": [
        "DescribeInstances",
        "xxxx"
      ]   
    } 
  ]
}

快速使用

const Core = require('@alicloud/console-bench-core');

var client = new Core({
  consoleKey: ${consoleKey},
  consoleSecret: ${consoleSecret},
  endpoint: 'console-work.aliyuncs.com',
  product: 'Ecs',
  apiVersion: '2014-05-26'
});

var params = {
  RegionId: "cn-zhangjiakou",
  AliUid: "xxx",
  IdToken : 'xxx' // AliUid 或 IdToken
}

var requestOption = {
  method: 'GET'
};

client
	.request('DescribeInstances', params, requestOption)
	.then((result) => {
  		console.log(JSON.stringify(result));
		}, (ex) => {
  		console.log(ex);
	})

说明:

  • endpoint: 测试环境下需要 host 绑定 114.55.202.134 console-work.aliyuncs.com

关于 OpenAPI 调用权限的配置说明

添加服务角色

首先登录阿里云 RAM控制台 ,创建服务角色

修改角色信任策略

角色的权限主体设置成企业工作台:

{
    "Statement": [
        {
            "Action": "sts:AssumeRole",
            "Effect": "Allow",
            "Principal": {
                "Service": [
                    "console.aliyuncs.com"
                ]
            }
        }
    ],
    "Version": "1"
}

添加角色权限

按需给该角色添加您应用的权限:

整理调用的OpenAPI

把您产品需要的 OpenAPI 整理处理,按照如下格式提交给企业工作台团队:

[
  {
    "product": "ecs",
    "actions": [
      "DescribeInstances",
      "DescribeRegions"
      "..."
    ] 
  },
  {
    ...
  }
]

完成配置

经过上述步骤,就可以基于企业工作台提供的 SDK ,进行OpenAPI的调用测试。

许可证

Apache-2.0

Copyright (c) 2009-present, Alibaba Cloud All rights reserved.