Git Product home page Git Product logo

aliyun-openapi-nodejs-sdk's Introduction

English | 简体中文

Alibaba Cloud SDK for Node.js

The Alibaba Cloud SDK for Node.js allows you to access Alibaba Cloud services such as Elastic Compute Service (ECS), Server Load Balancer (SLB), and CloudMonitor. You can access Alibaba Cloud services without the need to handle API related tasks, such as signing and constructing your requests.

Online Demo

OpenAPI Developer Portal provides the ability to call the cloud product OpenAPI online, and dynamically generate SDK Example code and quick retrieval interface, which can significantly reduce the difficulty of using the cloud API.

Installation

You must install the SDK with npm, such as:

npm install @alicloud/iot-2017-04-20

Quick Examples

At the beginning, you need to sign up for an Alibaba Cloud account and retrieve your Credentials.

const IotClient = require('@alicloud/iot-2017-04-20');

async function demo() {
  const client = new IotClient({
    endpoint: '******',
    accessKeyId: 'your access key id',
    accessKeySecret: 'your access key secret'
  });

  const res = await client.applyDeviceWithNames({
    DeviceName: 'demo', 
    ProductKey: 'your publick key'
  });
}

demo();

SDK Standard

The standard SDK is the SDK that is automatically generated with the OpenAPI information, which corresponding to the OpenAPI that is provided by the Alibaba Cloud POP gateway.

Core SDK

The core SDK implements the basic signature function. The OpenAPI which POP gateway provided can be called through the core SDK. Users who use the core SDK should care about the OpenAPI information of the product and pass the parameters themselves.

Extended SDK

The Extension SDK is an SDK that is automatically generated with the OpenAPI metadata. Following are the generated product SDKs:

  Product Name   Version Npm Package Reference
RAM(access control) 2015-05-01 @alicloud/ram-2015-05-01 https://github.com/aliyun/aliyun-openapi-nodejs-sdk/tree/master/Ram-2015-05-01
SLB(load balance) 2014-05-15 @alicloud/slb-2014-05-15 https://github.com/aliyun/aliyun-openapi-nodejs-sdk/tree/master/Slb-2014-05-15
RDS(cloud db) 2014-08-15 @alicloud/rds-2014-08-15 https://github.com/aliyun/aliyun-openapi-nodejs-sdk/tree/master/Rds-2014-08-15
ROS(resource management) 2015-09-01 @alicloud/ros-2015-09-01 https://github.com/aliyun/aliyun-openapi-nodejs-sdk/tree/master/ROS-2015-09-01
CS(docker) 2016-08-01 @alicloud/cs-2016-08-01 https://github.com/aliyun/aliyun-openapi-nodejs-sdk/tree/master/CS-2015-12-15
Dds(MongoDB) 2015-12-01 @alicloud/dds-2015-12-01 https://github.com/aliyun/aliyun-openapi-nodejs-sdk/tree/master/Dds-2015-12-01
ImageSearch 2018-01-20 @alicloud/imagesearch-2018-01-20 https://github.com/aliyun/aliyun-openapi-nodejs-sdk/tree/master/ImageSearch-2018-01-20
imm 2017-09-06 @alicloud/imm-2017-09-06 https://github.com/aliyun/aliyun-openapi-nodejs-sdk/tree/master/imm-2017-09-06
Iot 2017-04-20 @alicloud/iot-2017-04-20
Push 2016-08-01 @alicloud/push-2016-08-01 https://github.com/aliyun/aliyun-openapi-nodejs-sdk/tree/master/Push-2016-08-01
Dm(mail push) 2017-06-22 @alicloud/dm-2017-06-22 https://github.com/aliyun/aliyun-openapi-nodejs-sdk/tree/master/Dm-2017-06-22
Nlp(natural language) 2018-04-08 @alicloud/nlp-2018-04-08 https://github.com/aliyun/aliyun-openapi-nodejs-sdk/tree/master/Nlp-2018-04-08
rtc 2018-01-11 @alicloud/rtc-2018-01-11 https://github.com/aliyun/aliyun-openapi-nodejs-sdk/tree/master/rtc-2018-01-11

If the cloud product you need is provided by the POP gateway, but the product or version you need does not exist in the above product list, please open [issue](https://github.com/aliyun/aliyun-openapi- Nodejs-sdk/issues/new), tell us the product name and version you needed, we will generate it and published to the NPM.

Custom SDK

The custom SDK is the OpenAPI not exposed by the POP gateway. Due to the special logic, it isn't suitable for the POP gateway. So we can't generate SDK automatically, and the OpenAPI metadata is provided by the products themselves or third parties.

Custom SDK list:

  Product Name   Version NPM Package Reference
FC(function compute) 2016-08-15 @alicloud/fc https://github.com/aliyun/fc-nodejs-sdk
OSS(object storage service) ali-oss https://github.com/ali-sdk/ali-oss

If the product you needed is not in the above list, please open an [issue] (https://github.com/aliyun/aliyun-openapi-nodejs-sdk/issues/new) and we will provide it as soon as possible.

Issues

Opening an Issue, Issues not conforming to the guidelines may be closed immediately.

Changelog

Detailed changes for each release are documented in the release notes.

API Reference

You can visit the API and its parameters in Product List

License

MIT

aliyun-openapi-nodejs-sdk's People

Contributors

aliguyong avatar hyj1991 avatar jacksontian avatar peze avatar ql434 avatar wenzuochao avatar yuanyaoqi avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

aliyun-openapi-nodejs-sdk's Issues

TypeScript types

We're using TypeScript in our project, and it would be very convenient if these API's have corresponding TypeScript typings.

I noticed that @alicloud/pop-core already has typings.

It seems these SDKs are auto-generated. Would it be possible to also emit *.d.ts files for each of them?

有关 DM 使用的问题

使用国内的杭州节点的话,API版本不匹配。目前没有办法修改它,应调整(判断http,https协议?)
已经严重影响使用。

如何自定义http请求的超时时间?

程序在执行期间,偶尔会抛出如下错误:

{ RequestTimeoutError: Timeout(3000). POST http://mt.cn-hangzhou.aliyuncs.com/api/translate/web/general failed.
    at Timeout.setTimeout [as _onTimeout] (~/node_modules/httpx/lib/index.js:113:17)
    at ontimeout (timers.js:436:11)
    at tryOnTimeout (timers.js:300:5)
    at listOnTimeout (timers.js:263:5)
    at Timer.processTimers (timers.js:223:10)
  name: 'RequestTimeoutError',
  message:
   'Timeout(3000). POST http://mt.cn-hangzhou.aliyuncs.com/api/translate/web/general failed.' }

客户端默认的超时时间是3秒,请问如何自定义http请求的超时时间?

如何安装?@alicloud/ons?

npm install @alicloud/ons-2019-02-14
调用该命令时返回
npm ERR! code E404
npm ERR! 404 Not Found - GET https://registry.npmjs.org/@alicloud%2fons-2019-02-14 - Not found
npm ERR! 404
npm ERR! 404 '@alicloud/ons-2019-02-14@latest' is not in the npm registry.
npm ERR! 404 You should bug the author to publish it (or use the name yourself!)
npm ERR! 404
npm ERR! 404 Note that you can also install from a
npm ERR! 404 tarball, folder, http url, or git url.

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.