

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

# 在 中為您的應用程式建立命名空間 AWS AppConfig
<a name="appconfig-creating-namespace"></a>

本節中的程序可協助您建立名為 應用程式的 AWS AppConfig 成品。應用程式只是一個組織建構，就像識別應用程式命名空間的資料夾。這種組織建構與某些可執行程式碼之間存在關係。例如，您可以建立名為 MyMobileApp 的應用程式，以組織和管理使用者所安裝之行動應用程式的組態資料。您必須建立這些成品，才能使用 AWS AppConfig 來部署和擷取功能旗標或自由格式組態資料。

下列程序可讓您選擇將延伸項目與功能旗標組態描述檔建立關聯。*擴充*功能可增強您在建立或部署組態 AWS AppConfig 工作流程期間，在不同時間點注入邏輯或行為的能力。如需詳細資訊，請參閱[了解 AWS AppConfig 擴充功能](working-with-appconfig-extensions-about.md)。

**注意**  
您可以使用 AWS CloudFormation 建立 AWS AppConfig 成品，包括應用程式、環境、組態描述檔、部署、部署策略和託管組態版本。如需詳細資訊，請參閱《AWS CloudFormation 使用者指南》**中的 [AWS AppConfig 資源類型參考](https://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/AWS_AppConfig.html)。

**Topics**
+ [

## 建立 AWS AppConfig 應用程式 （主控台）
](#appconfig-creating-application-console)
+ [

## 建立 AWS AppConfig 應用程式 （命令列）
](#appconfig-creating-application-commandline)

## 建立 AWS AppConfig 應用程式 （主控台）
<a name="appconfig-creating-application-console"></a>

使用下列程序，透過 AWS Systems Manager 主控台建立 AWS AppConfig 應用程式。

**建立應用程式**

1. 在 https：//[https://console.aws.amazon.com/systems-manager/appconfig/](https://console.aws.amazon.com/systems-manager/appconfig/) 開啟 AWS Systems Manager 主控台。

1. 在導覽窗格中，選擇 **Applications** (應用程式)，然後選擇 **Create application** (建立應用程式)。

1. 對於 **Name (名稱)**，輸入應用程式的名稱。

1. 對於 **Description (描述)**，輸入有關應用程式的資訊。

1. （選用） 在**延伸**項目區段中，從清單中選擇延伸項目。如需詳細資訊，請參閱[了解 AWS AppConfig 擴充功能](working-with-appconfig-extensions-about.md)。

1. （選用） 在**標籤**區段中，輸入索引鍵和選用值。您可以為資源指定最多 50 個標籤。

1. 選擇**建立應用程式**。

AWS AppConfig 會建立應用程式，然後顯示**環境**索引標籤。繼續執行「[在 中為您的應用程式建立環境 AWS AppConfig](appconfig-creating-environment.md)」。

## 建立 AWS AppConfig 應用程式 （命令列）
<a name="appconfig-creating-application-commandline"></a>

下列程序說明如何使用 AWS CLI （在 Linux 或 Windows 上） 或 AWS Tools for PowerShell 來建立 AWS AppConfig 應用程式。

**逐步建立應用程式**

1. 開啟 AWS CLI。

1. 執行下列命令來建立應用程式。

------
#### [ Linux ]

   ```
   aws appconfig create-application \
     --name A_name_for_the_application \
     --description A_description_of_the_application \  
     --tags User_defined_key_value_pair_metadata_for_the_application
   ```

------
#### [ Windows ]

   ```
   aws appconfig create-application ^
     --name A_name_for_the_application ^
     --description A_description_of_the_application ^
     --tags User_defined_key_value_pair_metadata_for_the_application
   ```

------
#### [ PowerShell ]

   ```
   New-APPCApplication `
     -Name Name_for_the_application `
     -Description Description_of_the_application `
     -Tag Hashtable_type_user_defined_key_value_pair_metadata_for_the_application
   ```

------

   系統會傳回如下資訊。

------
#### [ Linux ]

   ```
   {
      "Id": "Application ID",
      "Name": "Application name",
      "Description": "Description of the application"
   }
   ```

------
#### [ Windows ]

   ```
   {
      "Id": "Application ID",
      "Name": "Application name",
      "Description": "Description of the application"
   }
   ```

------
#### [ PowerShell ]

   ```
   ContentLength    : Runtime of the command
   Description      : Description of the application
   HttpStatusCode   : HTTP Status of the runtime
   Id               : Application ID
   Name             : Application name
   ResponseMetadata : Runtime Metadata
   ```

------