

本文為英文版的機器翻譯版本，如內容有任何歧義或不一致之處，概以英文版為準。

# 使用 CloudFormation 建立 Security Hub CSPM 資源
<a name="creating-resources-with-cloudformation"></a>

AWS Security Hub CSPM 與 整合 AWS CloudFormation，這項服務可協助您模型化和設定 AWS 資源，以減少建立和管理資源和基礎設施的時間。您可以建立範本來描述您想要的所有 AWS 資源 （例如自動化規則），並為您 CloudFormation 佈建和設定這些資源。

使用 時 CloudFormation，您可以重複使用範本來一致且重複地設定 Security Hub CSPM 資源。描述您的資源一次，然後在多個 AWS 帳戶 和 區域中逐一佈建相同的資源。

## Security Hub CSPM 和 CloudFormation 範本
<a name="working-with-templates"></a>

若要佈建和設定 Security Hub CSPM 和相關服務的資源，您必須了解[CloudFormation 範本](https://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/template-guide.html)的運作方式。範本是 JSON 或 YAML 格式的文字檔案。這些範本說明您要在 CloudFormation 堆疊中佈建的資源。

如果您不熟悉 JSON 或 YAML，您可以使用 CloudFormation 設計工具來協助您開始使用 CloudFormation 範本。如需詳細資訊，請參閱*AWS CloudFormation 《 使用者指南*》中的[什麼是 CloudFormation 設計工具？](https://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/working-with-templates-cfn-designer.html)。

您可以為下列類型的 Security Hub CSPM 資源建立 CloudFormation 範本：
+ 啟用 Security Hub CSPM
+ 指定組織的委派 Security Hub CSPM 管理員
+ 指定您的組織在 Security Hub CSPM 中的設定方式
+ 啟用安全標準
+ 啟用跨區域彙總
+ 建立中央組態政策，並將其與帳戶、組織單位 (OUs) 或根帳戶建立關聯
+ 建立自訂洞見
+ 建立自動化規則
+ 自訂控制參數
+ 訂閱第三方產品整合

如需詳細資訊，包括資源的 JSON 和 YAML 範本範例，請參閱*AWS CloudFormation 《 使用者指南*》中的 [AWS Security Hub CSPM 資源類型參考](https://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/AWS_SecurityHub.html)。

## 進一步了解 CloudFormation
<a name="learn-more-cloudformation"></a>

若要進一步了解 CloudFormation，請參閱下列資源：
+ [AWS CloudFormation](https://aws.amazon.com/cloudformation/)
+ [AWS CloudFormation 使用者指南](https://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/Welcome.html)
+ [CloudFormation API 參考](https://docs.aws.amazon.com/AWSCloudFormation/latest/APIReference/Welcome.html)
+ [AWS CloudFormation 命令列界面使用者指南](https://docs.aws.amazon.com/cloudformation-cli/latest/userguide/what-is-cloudformation-cli.html)