Skip to content

Commit f8084f5

Browse files
committed
feat: support usage plan & auth
1 parent 9f1cf70 commit f8084f5

File tree

1 file changed

+14
-0
lines changed

1 file changed

+14
-0
lines changed

src/utils.js

Lines changed: 14 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -289,6 +289,20 @@ const prepareInputs = async (instance, credentials, inputs = {}) => {
289289
}
290290
}
291291
]
292+
if (apigatewayConf.usagePlan) {
293+
apigatewayConf.endpoints[0].usagePlan = {
294+
usagePlanId: apigatewayConf.usagePlan.usagePlanId,
295+
usagePlanName: apigatewayConf.usagePlan.usagePlanName,
296+
usagePlanDesc: apigatewayConf.usagePlan.usagePlanDesc,
297+
maxRequestNum: apigatewayConf.usagePlan.maxRequestNum
298+
}
299+
}
300+
if (apigatewayConf.auth) {
301+
apigatewayConf.endpoints[0].auth = {
302+
secretName: apigatewayConf.auth.secretName,
303+
secretIds: apigatewayConf.auth.secretIds
304+
}
305+
}
292306

293307
// 对cns inputs进行标准化
294308
const tempCnsConf = {}

0 commit comments

Comments
 (0)