

翻訳は機械翻訳により提供されています。提供された翻訳内容と英語版の間で齟齬、不一致または矛盾がある場合、英語版が優先します。

# カスタムフックの更新
<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
```

アカウントでフックのデフォルトバージョンを指定するには、 [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"
```