我正在尝试使用awssum.io来删除负载均衡器监听器(http://awssum.io/amazon/elb/delete-load-balancer-listeners.html),但我无法弄清楚什么是param-set类型看起来像。我试过[1000,2000],但它没有用。这是部分代码:
var params = { LoadBalancerName: 'my_balancer_name',
LoadBalancerPorts: [2000, 3000] };
var config = {};
config.accessKeyId = 'abc';
config.awsAccountId = '123';
config.secretAccessKey = 'def';
config.region = 'us-1';
var elb = new Elb(config);
elb.DeleteLoadBalancerListeners(params, function(err, data)
{
....
});
感谢您的帮助!
答案 0 :(得分:1)
我发现这是lib bug。这是修复,文件 node_modules / awssum / lib / elb-config.js ,从类型:'param-set'更改为类型:'param -array'强>,
DeleteLoadBalancerListeners : {
url : 'http://docs.amazonwebservices.com/ElasticLoadBalancing/latest/APIReference/API_DeleteLoadBalancerListeners.html',
defaults : {
Action : 'DeleteLoadBalancerListeners'
},
args : {
Action : {
required : true,
type : 'param',
},
LoadBalancerName : {
required : true,
type : 'param',
},
LoadBalancerPorts : {
required : true,
// type : 'param-set',
type : 'param-array',
prefix : 'member',
},
},
},