

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

# 使用資訊清單來啟用其他擷取功能
<a name="appconfig-agent-how-to-use-additional-features"></a>

AWS AppConfig 代理程式提供下列其他功能，協助您擷取應用程式的組態。
+ [設定 AWS AppConfig 代理程式從多個帳戶擷取組態](appconfig-agent-how-to-use-additional-features-multi-account.md)：使用主要或*擷取* AWS 帳戶 中的 AWS AppConfig 代理程式，從多個廠商帳戶擷取組態資料。
+ [設定 AWS AppConfig 代理程式將組態副本寫入磁碟](appconfig-agent-how-to-use-additional-features-write-to-disk.md)：使用 AWS AppConfig 代理程式將組態資料寫入磁碟。此功能可讓具有從磁碟讀取組態資料的應用程式的客戶與 整合 AWS AppConfig。

## 了解客服人員資訊清單
<a name="appconfig-agent-how-to-use-additional-features-about-manifests"></a>

若要啟用這些 AWS AppConfig 代理程式功能，您可以建立資訊清單。資訊清單是您提供的一組組態資料，用於控制代理程式可執行的動作。資訊清單是以 JSON 撰寫。它包含一組最上層金鑰，對應至您已部署的不同組態 AWS AppConfig。

資訊清單可以包含多個組態。此外，資訊清單中的每個組態都可以識別一或多個用於指定組態的代理程式功能。資訊清單的內容使用下列格式：

```
{
    "{{application_name}}:{{environment_name}}:{{configuration_name}}": {
        "{{agent_feature_to_enable_1}}": {
            "{{feature-setting-key}}": "{{feature-setting-value}}"
        },
        "{{agent_feature_to_enable_2}}": {
            "{{feature-setting-key}}": "{{feature-setting-value}}"
        }
    }
}
```

以下是具有兩種組態的資訊清單 JSON 範例。第一個組態 ({{MyApp}}) 不會使用任何 AWS AppConfig 代理程式功能。第二個組態 ({{My2ndApp}}) 使用*寫入組態複製到磁碟*和*多帳戶擷取*功能：

```
{
        "MyApp:Test:MyAllowListConfiguration": {},
        
        "My2ndApp:Beta:MyEnableMobilePaymentsFeatureFlagConfiguration": {
            "credentials": {
                "roleArn": "arn:aws:us-west-1:iam::123456789012:role/MyTestRole",
                "roleExternalId": "00b148e2-4ea4-46a1-ab0f-c422b54d0aac",
                "roleSessionName": "AwsAppConfigAgent",
                "credentialsDuration": "2h"
            },
            "writeTo": {
                "path": "/tmp/aws-appconfig/my-2nd-app/beta/my-enable-payments-feature-flag-configuration.json"
            }
        }
    }
```

**如何提供客服人員資訊清單**  
您可以將資訊清單儲存為檔案，存放在 AWS AppConfig 客服人員可以讀取的位置。或者，您可以將資訊清單儲存為 AWS AppConfig 組態，並將代理程式指向它。若要提供代理程式資訊清單，您必須使用下列其中一個值設定`MANIFEST`環境變數：


****  

| 資訊清單位置 | 環境變數值 | 使用案例 | 
| --- | --- | --- | 
| 檔案 | file：/path/to/agent-manifest.json | 如果您的資訊清單不會經常變更，請使用此方法。 | 
| AWS AppConfig 組態 | {{application-name}}：{{environment-name}}：{{configuration-name}} | 使用此方法進行動態更新。您可以使用與存放其他 AWS AppConfig 組態相同的方式，更新和部署存放在 中 AWS AppConfig 做為組態的資訊清單。 | 
| 環境變數 | 資訊清單內容 (JSON) | 如果您的資訊清單不會經常變更，請使用此方法。此方法在容器環境中非常有用，其中設定環境變數比公開檔案更為容易。 | 

如需設定 AWS AppConfig 代理程式變數的詳細資訊，請參閱使用案例的相關主題：
+ [設定 AWS AppConfig Agent Lambda 延伸模組](appconfig-integration-lambda-extensions-config.md)
+ [搭配 Amazon EC2 使用 AWS AppConfig 代理程式](https://docs.aws.amazon.com/appconfig/latest/userguide/appconfig-integration-ec2.html#appconfig-integration-ec2-configuring)
+ [搭配 Amazon ECS 和 Amazon EKS 使用 AWS AppConfig 代理程式](https://docs.aws.amazon.com/appconfig/latest/userguide/appconfig-integration-containers-agent.html#appconfig-integration-containers-agent-configuring)