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>

選項

如需與所有 CDK CLI 指令搭配使用的全域選項清單,請參閱全域選項

--help, -h BOOLEAN

顯示指令的指cdk notices令參考資訊。

範例

執行 cdk 部署命令後顯示的預設通知範例

$ 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"