

As traduções são geradas por tradução automática. Em caso de conflito entre o conteúdo da tradução e da versão original em inglês, a versão em inglês prevalecerá.

# Implantar uma configuração
<a name="appconfig-deploying"></a>

Depois de [criar os artefatos necessários](https://docs.aws.amazon.com/appconfig/latest/userguide/creating-feature-flags-and-configuration-data.html) para trabalhar com sinalizadores de recursos e dados de configuração de formato livre, você pode criar uma nova implantação usando o Console de gerenciamento da AWS, o ou o AWS CLI SDK. Iniciar uma implantação em AWS AppConfig chama a operação [StartDeployment](https://docs.aws.amazon.com/appconfig/2019-10-09/APIReference/API_StartDeployment.html)da API. Essa chamada inclui o AWS AppConfig aplicativo, o ambiente, o perfil IDs de configuração e (opcionalmente) a versão dos dados de configuração a serem implantados. A chamada também inclui o ID da estratégia de implantação a ser usada, que determina como os dados de configuração são implantados.

Se você implantar segredos armazenados em AWS Secrets Manager objetos do Amazon Simple Storage Service (Amazon S3) criptografados com uma chave gerenciada pelo cliente ou parâmetros de cadeia de caracteres seguros armazenados AWS Systems Manager no Parameter Store criptografados com uma chave gerenciada pelo cliente, você deverá especificar um valor para o parâmetro. `KmsKeyIdentifier` Se sua configuração não estiver criptografada ou estiver criptografada com um Chave gerenciada pela AWS, não é necessário especificar um valor para o `KmsKeyIdentifier` parâmetro.

**nota**  
O valor especificado para `KmsKeyIdentifier` deve ser uma chave gerenciada pelo cliente. Não precisa ser a mesma chave que você usou para criptografar sua configuração.  
Quando você inicia uma implantação com um`KmsKeyIdentifier`, a política de permissão anexada ao seu diretor AWS Identity and Access Management (IAM) deve permitir a `kms:GenerateDataKey` operação.

AWS AppConfig monitora a distribuição para todos os hosts e relata o status. Se uma distribuição falhar, AWS AppConfig reverte a configuração.

**nota**  
Você só pode implantar uma única configuração por vez em determinado ambiente. No entanto, pode implantar uma única configuração em ambientes diferentes ao mesmo tempo.

## Implantar uma configuração (console)
<a name="appconfig-deploying-console"></a>

Use o procedimento a seguir para implantar uma AWS AppConfig configuração usando o AWS Systems Manager console.

**Como implantar uma configuração usando o console**

1. Abra o AWS Systems Manager console em [https://console.aws.amazon.com/systems-manager/appconfig/](https://console.aws.amazon.com/systems-manager/appconfig/).

1. No painel de navegação, escolha **Aplicações** e selecione uma aplicação que você criou em [Criando um namespace para seu aplicativo no AWS AppConfig](appconfig-creating-namespace.md).

1. Na guia **Ambientes**, use o botão de opção para escolher um ambiente e, depois, selecione **Visualizar detalhes**.

1. Selecione **Iniciar implantação**.

1. Em **Configuration (Configuração)**, escolha uma configuração na lista.

1. Dependendo da origem da configuração, use a lista de versões para escolher a versão que deseja implantar. 

1. Em **Deployment strategy (Estratégia de implantação)**, escolha uma estratégia da lista.

1. (Opcional) Em **Descrição da implantação**, insira uma descrição. 

1. Para **opções adicionais de criptografia**, escolha uma AWS Key Management Service chave na lista.

1. (Opcional) Na seção **Tags**, escolha **Adicionar nova tag** e insira uma chave e um valor opcional. Você pode especificar um máximo de 50 tags para um recurso. 

1. Selecione **Iniciar implantação**.

## Implantar uma configuração (linha de comando)
<a name="appconfig-deploying-commandline"></a>

O procedimento a seguir descreve como usar o AWS CLI (no Linux ou no Windows) ou Ferramentas da AWS para PowerShell implantar uma AWS AppConfig configuração.

**Para implantar uma configuração passo a passo**

1. Abra AWS CLI o.

1. Execute o comando a seguir para implantar uma configuração. 

------
#### [ 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
   ```

------

   O sistema retorna informações como estas.

------
#### [ 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
   ```

------