qingcloud-sdk

qingcloud sdk & cli

qingcloud-sdk

A node port of qingcloud.com's python SDK library.

npm install qingcloud-sdk
var qing = require('qing');
// set key_id and key
qing.access_key_id = 'access_key_id';
qing.secret_access_key = 'secret_access_key';
// call the API
qing.DescribeInstances(function(err, data){
    if(err)
        console.log(err.message);
    else
        console.log(data);
}, {zone: 'pek1'});
  • DescribeInstances
  • RunInstances
  • TerminateInstances
  • StartInstances
  • StopInstances
  • RestartInstances
  • ResetInstances
  • ResizeInstances
  • ModifyInstanceAttributes
  • DescribeVolumes
  • CreateVolumes
  • DeleteVolumes
  • AttachVolumes
  • DetachVolumes
  • ResizeVolumes
  • ModifyVolumeAttributes
  • DescribeVxnets
  • CreateVxnets
  • DeleteVxnets
  • JoinVxnet
  • LeaveVxnet
  • ModifyVxnetAttributes
  • DescribeVxnetInstances
  • DescribeRouters
  • CreateRouters
  • DeleteRouters
  • UpdateRouters
  • PowerOffRouters
  • PowerOnRouters
  • JoinRouter
  • LeaveRouter
  • ModifyRouterAttributes
  • DescribeRouterStatics
  • AddRouterStatics
  • DeleteRouterStatics
  • DescribeRouterVxnets
  • DescribeEips
  • AllocateEips
  • ReleaseEips
  • AssociateEip
  • DissociateEips
  • ChangeEipsBandwidth
  • ModifyEipAttributes
  • DescribeSecurityGroups
  • CreateSecurityGroup
  • DeleteSecurityGroups
  • ApplySecurityGroup
  • ModifySecurityGroupAttributes
  • DescribeSecurityGroupRules
  • AddSecurityGroupRules
  • DeleteSecurityGroupRules
  • ModifySecurityGroupRuleAttributes
  • DescribeKeyPairs
  • CreateKeyPair
  • DeleteKeyPairs
  • AttachKeyPairs
  • DetachKeyPairs
  • ModifyKeyPairAttributes
  • DescribeImages
  • CaptureInstance
  • DeleteImages
  • ModifyImageAttributes
  • 私钥id和密匙到控制台中添加查看
  • zone参数目前只有'pek1'
  • 目前内部使用sha256加密方式
  • 带n的参数值必须为数组
  • 具体参数参看青云官方文档

修改test/test.js 设置key_id和key

make
  • 添加参数类型(包括枚举值)检查
  • 连接池, 连接队列功能添加(参考官方SDK)
  • 测试用例

The MIT License (MIT)

Copyright (c) 2013 Pana Wang

Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files (the "Software"), to deal in the Software without restriction, including without limitation the rights to use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of the Software, and to permit persons to whom the Software is furnished to do so, subject to the following conditions:

The above copyright notice and this permission notice shall be included in all copies or substantial portions of the Software.

THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.