From e2ba837e9831b2b4f1e2714e85dba2c70951410c Mon Sep 17 00:00:00 2001 From: brycewwang <865689594@qq.com> Date: Tue, 23 Apr 2024 14:43:01 +0800 Subject: [PATCH] feat: aaaa --- src/modules/apigw/index.ts | 17 +++++++++++++++++ 1 file changed, 17 insertions(+) diff --git a/src/modules/apigw/index.ts b/src/modules/apigw/index.ts index cff92c1..4885223 100644 --- a/src/modules/apigw/index.ts +++ b/src/modules/apigw/index.ts @@ -151,6 +151,23 @@ export default class Apigw { outputs.usagePlan = usagePlan; } + try { + const { tags } = inputs; + if (tags) { + await this.tagClient.deployResourceTags({ + tags: tags.map(({ key, value }) => ({ TagKey: key, TagValue: value })), + resourceId: serviceId, + serviceType: ApiServiceType.apigw, + resourcePrefix: 'service', + }); + if (tags.length > 0) { + outputs.tags = tags; + } + } + } catch (e) { + console.log(`[TAG] ${e.message}`); + } + // return this.formatApigwOutputs(outputs); return outputs; }