

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

# Guard 挂钩
<a name="guard-hooks"></a>

要在您的账户中使用 AWS CloudFormation Guard 挂钩，您必须为要使用该挂钩的账户和区域*激活*挂钩。激活 Hook 后，它可以在激活该挂钩的账户和区域的堆栈操作中使用。

激活 Guard Hook 时， CloudFormation 会在账户的注册表中为已激活的 Hook 创建一个条目作为私有 Hook。这允许您设置 Hook 包含的任何配置属性。配置属性定义了如何为给定 AWS 账户 和区域配置挂钩。

**Topics**
+ [AWS CLI 使用防护挂钩的命令](#commonly-used-commands-guard-hooks)
+ [编写 Guard 规则来评估防护挂钩的资源](guard-hooks-write-rules.md)
+ [准备创建防护挂钩](guard-hooks-prepare-to-create-hook.md)
+ [在你的账户中激活 Guard Hook](guard-hooks-activate-hooks.md)
+ [查看您账户中防御挂钩的日志](guard-hooks-view-logs.md)
+ [在你的账户中删除防护挂钩](guard-hooks-delete-hooks.md)

## AWS CLI 使用防护挂钩的命令
<a name="commonly-used-commands-guard-hooks"></a>

使用 Guard Hook 的 AWS CLI 命令包括：
+ [https://docs.aws.amazon.com/cli/latest/reference/cloudformation/activate-type.html](https://docs.aws.amazon.com/cli/latest/reference/cloudformation/activate-type.html)开始激活 Guard Hook 的过程。
+ [https://docs.aws.amazon.com/cli/latest/reference/cloudformation/set-type-configuration.html](https://docs.aws.amazon.com/cli/latest/reference/cloudformation/set-type-configuration.html)来指定您账户中的 Hook 的配置数据。
+ [https://docs.aws.amazon.com/cli/latest/reference/cloudformation/list-types.html](https://docs.aws.amazon.com/cli/latest/reference/cloudformation/list-types.html)列出你账户中的 Hook。
+ [https://docs.aws.amazon.com/cli/latest/reference/cloudformation/describe-type.html](https://docs.aws.amazon.com/cli/latest/reference/cloudformation/describe-type.html)返回有关特定 Hook 或特定 Hook 版本的详细信息，包括当前配置数据。
+ [https://docs.aws.amazon.com/cli/latest/reference/cloudformation/deactivate-type.html](https://docs.aws.amazon.com/cli/latest/reference/cloudformation/deactivate-type.html)从您的账户中移除之前激活的 Hook。