

本文属于机器翻译版本。若本译文内容与英语原文存在差异，则一律以英文原文为准。

# 在中创建配置文件 AWS AppConfig
<a name="appconfig-creating-configuration-profile"></a>

*配置数据* 是一组会影响应用程序行为的设置。除其他外，*配置文件*包括一个 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)