2012-12-06 66 views
1

我試圖使用awssum.io來刪除負載平衡器偵聽器(http://awssum.io/amazon/elb/delete-load-balancer-listeners.html)但我不能找出參數集的類型。我試過[1000,2000],但沒有奏效。這裏是部分代碼:參數集類型爲LoadBalancerPorts

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) 
{ 
    .... 
}); 

感謝您的幫助!

回答

1

我發現這是lib bug。這裏是修復程序,文件node_modules/awssum/LIB/ELB-config.js,改變從類型: 'PARAM設定'類型: 'PARAM陣列'

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', 
     }, 
    }, 
},