cdk notices - AWS Cloud Development Kit (AWS CDK) v2

这是 AWS CDK v2 开发者指南。较旧的 CDK v1 于 2022 年 6 月 1 日进入维护阶段,并于 2023 年 6 月 1 日终止支持。

本文属于机器翻译版本。若本译文内容与英语原文存在差异,则一律以英文原文为准。

cdk notices

显示您的 CDK 应用程序的通知。

通知可能包括有关安全漏洞、回归和不支持版本使用情况的重要消息。

无论相关通知是否已被确认,此命令都会显示相关通知。默认情况下,相关通知也可能出现在每个命令之后。

您可以通过以下方式取消通知:

  • 通过命令选项。以下是 示例:

    $ cdk deploy --no-notices
  • 通过项目文件中的上下文无限期地隐藏所有通知:cdk.json

    { "notices": false, "context": { // ... } }
  • 使用cdk acknowledge命令确认每条通知。

使用量

$ cdk notices <options>

Options

有关适用于所有 CDK CLI 命令的全局选项的列表,请参阅全球期权

--help, -h BOOLEAN

显示该命令的cdk notices命令参考信息。

示例

运行 cdk deploy 命令后显示的默认通知示例

$ cdk deploy ... # Normal output of the command NOTICES 16603 Toggling off auto_delete_objects for Bucket empties the bucket Overview: If a stack is deployed with an S3 bucket with auto_delete_objects=True, and then re-deployed with auto_delete_objects=False, all the objects in the bucket will be deleted. Affected versions: <1.126.0. More information at: https://github.com/aws/aws-cdk/issues/16603 17061 Error when building EKS cluster with monocdk import Overview: When using monocdk/aws-eks to build a stack containing an EKS cluster, error is thrown about missing lambda-layer-node-proxy-agent/layer/package.json. Affected versions: >=1.126.0 <=1.130.0. More information at: https://github.com/aws/aws-cdk/issues/17061 If you don’t want to see an notice anymore, use "cdk acknowledge ID". For example, "cdk acknowledge 16603"

运行 cdk 通知命令的简单示例

$ cdk notices NOTICES 16603 Toggling off auto_delete_objects for Bucket empties the bucket Overview: if a stack is deployed with an S3 bucket with auto_delete_objects=True, and then re-deployed with auto_delete_objects=False, all the objects in the bucket will be deleted. Affected versions: framework: <=2.15.0 >=2.10.0 More information at: https://github.com/aws/aws-cdk/issues/16603 If you don’t want to see a notice anymore, use "cdk acknowledge <id>". For example, "cdk acknowledge 16603"