

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

# 在 中建立組態設定檔 AWS AppConfig
<a name="appconfig-creating-configuration-profile"></a>

*組態資料*是影響應用程式行為的設定集合。*組態描述檔*包含一個 URI，該 URI 可讓 AWS AppConfig 將組態資料定位在其儲存的位置，以及設定類型。 AWS AppConfig 支援下列類型的組態描述檔：
+ **特徵標記**：您可以使用特徵標記來啟用或停用應用程式中的功能，或使用標記屬性來設定應用程式特徵的不同特性。 會以特徵標記格式將特徵標記組態 AWS AppConfig 儲存在 AWS AppConfig 託管組態存放區中，其中包含有關標記和標記屬性的資料和中繼資料。功能旗標組態的 URI 只是 `hosted`。
+ **自由格式組態**：自由格式組態可以將資料存放在下列任何 AWS 服務 和 Systems Manager 工具中：
  + AWS AppConfig 託管組態存放區
  + Amazon Simple Storage Service
  + AWS CodePipeline
  + AWS Secrets Manager
  + AWS Systems Manager (SSM) 參數存放區
  + SSM 文件存放區

**注意**  
如果可能，我們建議您在 AWS AppConfig 託管組態存放區中託管您的組態資料，因為它提供最多的功能和增強功能。

以下是一些組態資料範例，可協助您更好地了解不同類型的組態資料，以及如何在功能旗標或不使用組態描述檔中使用它們。

 **特徵標記組態資料** 

下列功能標記組態資料會啟用或停用每個區域的行動付款和預設付款。

------
#### [ JSON ]

```
{
  "allow_mobile_payments": {
    "enabled": false
  },
  "default_payments_per_region": {
    "enabled": true
  }
}
```

------
#### [ YAML ]

```
---
allow_mobile_payments:
  enabled: false
default_payments_per_region:
  enabled: true
```

------

 **操作組態資料** 

下列自由格式組態資料會強制執行應用程式如何處理請求的限制。

------
#### [ JSON ]

```
{
  "throttle-limits": {
    "enabled": "true",
    "throttles": [
      {
        "simultaneous_connections": 12
      },
      {
        "tps_maximum": 5000
      }
    ],
    "limit-background-tasks": [
      true
    ]
  }
}
```

------
#### [ YAML ]

```
---
throttle-limits:
  enabled: 'true'
  throttles:
  - simultaneous_connections: 12
  - tps_maximum: 5000
  limit-background-tasks:
  - true
```

------

 **存取控制清單組態資料** 

下列存取控制清單自由格式組態資料會指定哪些使用者或群組可以存取應用程式。

------
#### [ JSON ]

```
{
  "allow-list": {
    "enabled": "true",
    "cohorts": [
      {
        "internal_employees": true
      },
      {
        "beta_group": false
      },
      {
        "recent_new_customers": false
      },
      {
        "user_name": "Jane_Doe"
      },
      {
        "user_name": "John_Doe"
      }
    ]
  }
}
```

------
#### [ YAML ]

```
---
allow-list:
  enabled: 'true'
  cohorts:
  - internal_employees: true
  - beta_group: false
  - recent_new_customers: false
  - user_name: Jane_Doe
  - user_name: Ashok_Kumar
```

------

**Topics**
+ [在 中建立功能標記組態描述檔 AWS AppConfig](appconfig-creating-configuration-and-profile-feature-flags.md)
+ [在 中建立自由格式組態描述檔 AWS AppConfig](appconfig-free-form-configurations-creating.md)
+ [為非原生資料來源建立組態設定檔](appconfig-creating-configuration-profile-other-data-sources.md)