

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

# 停用帳戶中的第三方公有擴充功能
<a name="registry-public-deactivate-extension"></a>

當您不再需要某個已啟用的第三方公有擴充功能時，可透過下列程序在帳戶中停用。

**Topics**
+ [在您的帳戶中停用公有擴充功能 (主控台)](#registry-public-deactivate-extension-console)
+ [停用帳戶中的公有擴充功能 (AWS CLI)](#registry-public-deactivate-extension-cli)
+ [停用帳戶中的勾點 (AWS CLI)](#registry-public-deactivate-extension-cli-hook)

## 在您的帳戶中停用公有擴充功能 (主控台)
<a name="registry-public-deactivate-extension-console"></a>

**停用帳戶中的公有擴充功能**

1. 登入 AWS 管理主控台 並在 https：//[https://console.aws.amazon.com/cloudformation](https://console.aws.amazon.com/cloudformation/) 開啟 CloudFormation 主控台。

1. 在畫面上方的導覽列上，選擇 AWS 區域。

1. 在導覽窗格的**登錄檔**下方，選擇**已啟用的擴充功能**。

1. 找到要停用更新的擴充功能並選取。如需詳細資訊，請參閱[在 CloudFormation 登錄檔中檢視可用的與已啟用擴充功能](registry-view.md)。

1. 在**動作**選單中，選擇**停用**。

1. 選擇**停用**。

## 停用帳戶中的公有擴充功能 (AWS CLI)
<a name="registry-public-deactivate-extension-cli"></a>

使用下列 [https://docs.aws.amazon.com/cli/latest/reference/cloudformation/deactivate-type.html](https://docs.aws.amazon.com/cli/latest/reference/cloudformation/deactivate-type.html) 命令。

```
aws cloudformation deactivate-type --type MODULE \
  --type-name Example::Test::Type::MODULE \
  --region us-west-2
```

## 停用帳戶中的勾點 (AWS CLI)
<a name="registry-public-deactivate-extension-cli-hook"></a>

停用勾點可防止勾點在 中執行， AWS 帳戶 而不會將其移除。

使用 [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) 命令，並將 `HookInvocationStatus` 指定為 `DISABLED` 以停用勾點。

下列範例指定要停用之勾點的 AWS 區域 和 Amazon Resource Name (ARN)。

```
aws cloudformation set-type-configuration \
  --configuration "{"CloudFormationConfiguration":{"HookConfiguration":{"HookInvocationStatus": "DISABLED", "FailureMode": "FAIL", "Properties":{}}}}" \
  --type-arn "arn:aws:cloudformation:us-west-2:123456789012:type/hook/MyTestHook" --region us-west-2
```

如需詳細資訊，請參閱[CloudFormation 《 勾點使用者指南》中的停用和啟用](https://docs.aws.amazon.com/cloudformation-cli/latest/hooks-userguide/hooks-disable-enable.html)*CloudFormation 勾點*。