2016-12-07 52 views

回答

5

類似的功能這段代碼做魔術:

var params = { 
    keyId: 'STRING_VALUE', /* required */ 
    keyType: 'STRING_VALUE', /* required */ 
    usagePlanId: 'STRING_VALUE' /* required */ 
}; 
apigateway.createUsagePlanKey(params, function(err, data) { 
    if (err) console.log(err, err.stack); // an error occurred 
    else  console.log(data);   // successful response 
}); 

我缺少的是keyType必須是「API_KEY」