Base on @alicloud/pop-core
npm i @alicloud/imm-2017-09-06
const IMM = require('@alicloud/imm-2017-09-06');
var client = new IMM({
endpoint:'http://imm.cn-shanghai.aliyuncs.com',
accessKeyId: 'your_app_key_id',
accessKeySecret: 'your_app_key_secret',
apiVersion: '2017-09-06'
});
try{
var params = {
MaxKeys: 10,
Marker: ''
};
var result = await client.ListProjects(params);
console.log(result);
}catch(err){
console.log(err);
}
You can also use original client.request
directly:
var params = {
Marker: '',
MaxKeys: 10
};
client.request('ListProjects', params)
client.ListProjects(params, options)
client.request('ListProjects', params, options)
options = {
timeout: 3000, // default 3000 ms
formatAction: true, // default true, format the action to Action
formatParams: true, // default true, format the parameter name to first letter upper case
method: 'GET', // set the http method, default is GET
headers: {}, // set the http request headers
}
For more details, see @alicloud/pop-core
And the API Document