且构网

分享程序员开发的那些事...
且构网 - 分享程序员编程开发的那些事

如何将标签添加到AWS-CDK构造

更新时间:2023-11-24 22:50:28

根据aws-cdk文档,您可以将标记添加到所有构造/资源.标签将继承到同一树"中的构造.太酷了.

According to aws-cdk doc you can add a tag to all constructs/ressources. Tags will inherits to constructs within same "tree". That's pretty cool.

使用基于Java的aws-cdk的示例:

Example using aws-cdk based on java:

MyStack stack = new MyStack(app, "nameOfStack");
Tag.add(stack, "tag_foo", "tag_foo");

AWS-Doc CDK标记