

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

# 从注册表中取消注册自定义 Hook CloudFormation
<a name="deregistering-hooks"></a>

取消注册自定义 Hook 会将扩展或扩展版本标记为 CloudFormation 注册表`DEPRECATED`中的版本，这会将其从活动使用中删除。自定义 Hook 一旦被弃用，就无法在 CloudFormation 操作中使用。

**注意**  
在取消注册 Hook 之前，必须单独取消注册该扩展的所有先前活动版本。有关更多信息，请参阅 [https://docs.aws.amazon.com/AWSCloudFormation/latest/APIReference/API_DeregisterType.html](https://docs.aws.amazon.com/AWSCloudFormation/latest/APIReference/API_DeregisterType.html)。

要取消注册挂钩，请使用[https://docs.aws.amazon.com/cli/latest/reference/cloudformation/deregister-type.html](https://docs.aws.amazon.com/cli/latest/reference/cloudformation/deregister-type.html)操作并指定您的挂钩 ARN。

```
$ aws cloudformation deregister-type \
    --arn {{HOOK_TYPE_ARN}}
```

此命令不产生输出。