比官方 SDK 更好用的阿里云 SDK。
Minimum, Flexible, Scalable.
支持 Lazy Require。
国际惯例:
npm install waliyun --save
公共参数:
jsvar options = {
AccessKeyId: 'xxxx-xxxx-xxxx-xxxx',
AccessKeySecret: 'xxxx-xxxx-xxxx-xxxx',
// 选填,不同接口类型注意版本日期
Version: '2014-05-26',
// 选填
SignatureMethod: 'HMAC-SHA1',
Format: 'json',
SignatureVersion: '1.0',
// 每次请求都会自动重新生成
SignatureNonce: Math.random(),
Timestamp: new Date().toISOString()
};
ES5:
jsvar WALIYUN = require('waliyun');
// 加载全部方法
var ecs = WALIYUN.ECS(options);
// 或加载某些方法
var ecs = WALIYUN.ECS(options, ['DescribeInstances', 'DescribeInstanceStatus']);
// 或加载某个方法
var ecs = WALIYUN.ECS(options, 'DescribeInstances');
ecs
.describeInstances({
RegionId: 'cn-hangzhou'
})
.then(function (instances) {
// xxxx
});
ES6:
jsimport { ECS } from 'waliyun';
const ecs = ECS(options);
// Within Async Func
async () => {
const instances = await ecs.describeInstances({
RegionId: 'cn-hangzhou'
});
// xxxx
};
Github 主页上检查最新版本: https://github.com/willin/waliyun
API 文档参考:
https://help.aliyun.com/document_detail/cdn/api-reference/overview.html
API 文档参考:
https://help.aliyun.com/document_detail/ecs/open-api/apisummary.html
API 文档参考:
API 文档参考:
https://help.aliyun.com/document_detail/ram/ram-api-reference/intro/intro.html
API 文档参考:
https://help.aliyun.com/document_detail/rds/OpenAPI-manual/RDS-OpenAPI-Invoke/API-catalog.html
API 文档参考:
https://help.aliyun.com/document_detail/ram/sts-api-reference/intro.html