Samples

Last Updated: Jul 03, 2017

  1. ALY = require("aliyun-sdk")
  2. // Construct an Aliyun Client for initiating a request
  3. // Set AccessKeyID and AccessKeySevcret when constructing the Aliyun Client
  4. // RAM is a Global Service, and its API ingress is located in the East China 1 (Hangzhou) region. The master IP address of RAM API is used
  5. var ram = new ALY.RAM({
  6. accessKeyId: "<access-key-id>",
  7. secretAccessKey: "<access-key-secret>",
  8. endpoint: 'https://ram.aliyuncs.com',
  9. apiVersion: '2015-05-01'
  10. });
  11. // Construct a "CreateUser" request
  12. ram.createUser({
  13. Action: 'CreateUser',
  14. UserName: "alice"
  15. }, function (err, res) {
  16. console.log(err, res);
  17. });
Thank you! We've received your feedback.