

翻訳は機械翻訳により提供されています。提供された翻訳内容と英語版の間で齟齬、不一致または矛盾がある場合、英語版が優先します。

# 構成のデプロイ
<a name="appconfig-deploying"></a>

機能フラグとフリーフォーム設定データを操作する[ために必要なアーティファクトを作成](https://docs.aws.amazon.com/appconfig/latest/userguide/creating-feature-flags-and-configuration-data.html)したら、 AWS マネジメントコンソール、、 AWS CLIまたは SDK を使用して新しいデプロイを作成できます。でデプロイを開始すると、[StartDeployment](https://docs.aws.amazon.com/appconfig/2019-10-09/APIReference/API_StartDeployment.html) API オペレーションが AWS AppConfig 呼び出されます。この呼び出しには、デプロイする AWS AppConfig アプリケーションの ID、環境、構成プロファイル、および構成データバージョン （オプショナル） が含まれます。この呼び出しには、使用するデプロイ戦略の ID も含まれます。ID は、構成データのデプロイ方法を決定します。

に保存されているシークレット AWS Secrets Manager、カスタマーマネージドキーで暗号化された Amazon Simple Storage Service (Amazon S3) オブジェクト、またはカスタマーマネージドキーで暗号化された Parameter Store AWS Systems Manager に保存されている安全な文字列パラメータをデプロイする場合は、 `KmsKeyIdentifier` パラメータの値を指定する必要があります。設定が暗号化されていない場合、または で暗号化されている場合は AWS マネージドキー、 `KmsKeyIdentifier`パラメータの値を指定する必要はありません。

**注記**  
`KmsKeyIdentifier` に指定する値は、カスタマーマネージド型キーである必要があります。これは設定の暗号化に使用したキーと同じである必要はありません。  
を使用してデプロイを開始する場合`KmsKeyIdentifier`、 AWS Identity and Access Management (IAM) プリンシパルにアタッチされたアクセス許可ポリシーで `kms:GenerateDataKey`オペレーションを許可する必要があります。

AWS AppConfig はすべてのホストへのディストリビューションをモニタリングし、ステータスを報告します。ディストリビューションが失敗した場合、 は設定を AWS AppConfig ロールバックします。

**注記**  
環境には、一度に 1 つの設定のみデプロイできます。ただし、1 つの設定をそれぞれ異なる環境に同時にデプロイすることができます。

## 設定をデプロイする (コンソール)
<a name="appconfig-deploying-console"></a>

コンソールを使用して AWS AppConfig 設定を AWS Systems Manager デプロイするには、次の手順に従います。

**コンソールを使用して設定をデプロイするには**

1. [https://console.aws.amazon.com/systems-manager/appconfig/](https://console.aws.amazon.com/systems-manager/appconfig/) で AWS Systems Manager コンソールを開きます。

1. ナビゲーションペインで、**[アプリケーション]** を選択し、[でのアプリケーションの名前空間の作成 AWS AppConfig](appconfig-creating-namespace.md) で作成したアプリケーションを選択します。

1. **[環境]** タブで環境のラジオボタンを入力し、**[詳細を表示]** を選択します。

1. **デプロイの開始** を選択します。

1. **設定** で、リストから設定を選択します。

1. 設定のソースに応じて、バージョンリストを使用して、デプロイするバージョンを選択します。

1. **デプロイ戦略** で、リストから戦略を選択します。

1. (オプション)**[デプロイの説明]** に説明を入力します。

1. **その他の暗号化オプション**については、リストから AWS Key Management Service キーを選択します。

1. (オプション) **[タグ]** セクションで **[新しいタグを追加]** を選択し、キーとオプションの値を入力します。1 つのリソースに対して最大 50 個のタグを指定できます。

1. **デプロイの開始** を選択します。

## 設定をデプロイする (コマンドライン)
<a name="appconfig-deploying-commandline"></a>

次の手順では、 AWS CLI (Linux または Windows) または AWS Tools for PowerShell を使用して AWS AppConfig 設定をデプロイする方法について説明します。

**設定をステップバイステップでデプロイする**

1. を開きます AWS CLI。

1. 次のコマンドを実行して、設定をデプロイします。

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

   ```
   aws appconfig start-deployment \
     --application-id The_application_ID \
     --environment-id The_environment_ID \
     --deployment-strategy-id The_deployment_strategy_ID \
     --configuration-profile-id The_configuration_profile_ID \
     --configuration-version The_configuration_version_to_deploy \
     --description A_description_of_the_deployment \
     --tags User_defined_key_value_pair_metadata_of_the_deployment
   ```

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

   ```
   aws appconfig start-deployment ^
     --application-id The_application_ID ^
     --environment-id The_environment_ID ^
     --deployment-strategy-id The_deployment_strategy_ID ^
     --configuration-profile-id The_configuration_profile_ID ^
     --configuration-version The_configuration_version_to_deploy ^
     --description A_description_of_the_deployment ^
     --tags User_defined_key_value_pair_metadata_of_the_deployment
   ```

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

   ```
   Start-APPCDeployment `
     -ApplicationId The_application_ID `
     -ConfigurationProfileId The_configuration_profile_ID `
     -ConfigurationVersion The_configuration_version_to_deploy `
     -DeploymentStrategyId The_deployment_strategy_ID `
     -Description A_description_of_the_deployment `
     -EnvironmentId The_environment_ID `
     -Tag Hashtable_type_user_defined_key_value_pair_metadata_of_the_deployment
   ```

------

   システムが以下のような情報をレスポンスします。

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

   ```
   {   
      "ApplicationId": "The ID of the application that was deployed",
      "EnvironmentId" : "The ID of the environment",
      "DeploymentStrategyId": "The ID of the deployment strategy that was deployed",
      "ConfigurationProfileId": "The ID of the configuration profile that was deployed",
      "DeploymentNumber": The sequence number of the deployment,
      "ConfigurationName": "The name of the configuration",
      "ConfigurationLocationUri": "Information about the source location of the configuration",
      "ConfigurationVersion": "The configuration version that was deployed",
      "Description": "The description of the deployment",
      "DeploymentDurationInMinutes": Total amount of time the deployment lasted,
      "GrowthType": "The linear or exponential algorithm used to define how percentage grew over time",
      "GrowthFactor": The percentage of targets to receive a deployed configuration during each interval,
      "FinalBakeTimeInMinutes": Time AWS AppConfig monitored for alarms before considering the deployment to be complete,
      "State": "The state of the deployment",  
   
      "EventLog": [ 
         { 
            "Description": "A description of the deployment event",
            "EventType": "The type of deployment event",
            "OccurredAt": The date and time the event occurred,
            "TriggeredBy": "The entity that triggered the deployment event"
         }
      ],
   
      "PercentageComplete": The percentage of targets for which the deployment is available,
      "StartedAt": The time the deployment started,
      "CompletedAt": The time the deployment completed   
   }
   ```

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

   ```
   {
      "ApplicationId": "The ID of the application that was deployed",
      "EnvironmentId" : "The ID of the environment",
      "DeploymentStrategyId": "The ID of the deployment strategy that was deployed",
      "ConfigurationProfileId": "The ID of the configuration profile that was deployed",
      "DeploymentNumber": The sequence number of the deployment,
      "ConfigurationName": "The name of the configuration",
      "ConfigurationLocationUri": "Information about the source location of the configuration",
      "ConfigurationVersion": "The configuration version that was deployed",
      "Description": "The description of the deployment",
      "DeploymentDurationInMinutes": Total amount of time the deployment lasted,
      "GrowthType": "The linear or exponential algorithm used to define how percentage grew over time",
      "GrowthFactor": The percentage of targets to receive a deployed configuration during each interval,
      "FinalBakeTimeInMinutes": Time AWS AppConfig monitored for alarms before considering the deployment to be complete,
      "State": "The state of the deployment",  
   
      "EventLog": [ 
         { 
            "Description": "A description of the deployment event",
            "EventType": "The type of deployment event",
            "OccurredAt": The date and time the event occurred,
            "TriggeredBy": "The entity that triggered the deployment event"
         }
      ],
   
      "PercentageComplete": The percentage of targets for which the deployment is available,
      "StartedAt": The time the deployment started,
      "CompletedAt": The time the deployment completed 
   }
   ```

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

   ```
   ApplicationId               : The ID of the application that was deployed
   CompletedAt                 : The time the deployment completed
   ConfigurationLocationUri    : Information about the source location of the configuration
   ConfigurationName           : The name of the configuration
   ConfigurationProfileId      : The ID of the configuration profile that was deployed
   ConfigurationVersion        : The configuration version that was deployed
   ContentLength               : Runtime of the deployment 
   DeploymentDurationInMinutes : Total amount of time the deployment lasted
   DeploymentNumber            : The sequence number of the deployment
   DeploymentStrategyId        : The ID of the deployment strategy that was deployed
   Description                 : The description of the deployment
   EnvironmentId               : The ID of the environment that was deployed
   EventLog                    : {Description : A description of the deployment event, EventType : The type of deployment event, OccurredAt : The date and time the event occurred,
            TriggeredBy : The entity that triggered the deployment event}
   FinalBakeTimeInMinutes      : Time AWS AppConfig monitored for alarms before considering the deployment to be complete
   GrowthFactor                : The percentage of targets to receive a deployed configuration during each interval
   GrowthType                  : The linear or exponential algorithm used to define how percentage grew over time
   HttpStatusCode              : HTTP Status of the runtime
   PercentageComplete          : The percentage of targets for which the deployment is available
   ResponseMetadata            : Runtime Metadata
   StartedAt                   : The time the deployment started
   State                       : The state of the deployment
   ```

------