

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

# 更新自訂勾點
<a name="updating-registered-hook"></a>

更新自訂勾點允許在 CloudFormation 登錄檔中提供勾點中的修訂。

若要更新自訂勾點，請透過 CloudFormation CLI [https://docs.aws.amazon.com/cloudformation-cli/latest/userguide/resource-type-cli-submit.html](https://docs.aws.amazon.com/cloudformation-cli/latest/userguide/resource-type-cli-submit.html)操作將您的修訂提交至 CloudFormation 登錄檔。

```
$ cfn submit
```

若要在帳戶中指定 Hook 的預設版本，請使用 [https://docs.aws.amazon.com/cli/latest/reference/cloudformation/set-type-default-version.html](https://docs.aws.amazon.com/cli/latest/reference/cloudformation/set-type-default-version.html)命令並指定類型、類型名稱和版本 ID。

```
$ aws cloudformation set-type-default-version \
    --type HOOK \
    --type-name {{MyCompany::Testing::MyTestHook}} \
    --version-id {{00000003}}
```

若要擷取有關勾點版本的資訊，請使用 [https://docs.aws.amazon.com/cli/latest/reference/cloudformation/list-type-versions.html](https://docs.aws.amazon.com/cli/latest/reference/cloudformation/list-type-versions.html)。

```
$ aws cloudformation list-type-versions \
  --type HOOK \
  --type-name "{{MyCompany::Testing::MyTestHook}}"
```