

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

# 使用 記錄第三方資源 AWS Config 的組態項目 AWS CLI
<a name="add-custom-resource-type-cli"></a>

使用下列程序，記錄第三方資源或自訂資源類型的組態項目：

請確定使用相符的結構描述來註冊資源類型 `MyCustomNamespace::Testing::WordPress`。

1. 開啟命令提示或終端機視窗。

1. 輸入以下命令：

   ```
   aws configservice put-resource-config --resource-type MyCustomNamespace::Testing::WordPress --resource-id resource-001 --schema-version-id 00000001 --configuration  '{
     "Id": "resource-001",
     "Name": "My example custom resource.",
     "PublicAccess": false
   }'
   ```

**注意**  
如類型結構描述中所定義， `writeOnlyProperties`將在記錄之前從組態中移除 AWS Config。這表示從讀取 APIs 取得組態時，不會出現這些值。如需 `writeOnlyProperties` 的詳細資訊，請參閱《[資源類型結構描述](https://docs.aws.amazon.com/cloudformation-cli/latest/userguide/resource-type-schema.html)》。