

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á.

# Criar uma estratégia de implantação
<a name="appconfig-creating-deployment-strategy-create"></a>

Se não quiser utilizar uma das estratégias de implantação predefinidas, você poderá criar uma. Você pode criar um máximo de 20 estratégias de implantação. Ao implantar uma configuração, você pode escolher a estratégia de implantação mais adequada para o aplicativo e o ambiente.

## Criação de uma estratégia de AWS AppConfig implantação (console)
<a name="appconfig-creating-deployment-strategy-create-console"></a>

Use o procedimento a seguir para criar uma estratégia de AWS AppConfig implantação usando o AWS Systems Manager console.

**Como criar uma estratégia de implantação**

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 **Estratégias de implantação** e selecione **Criar estratégia de implantação**.

1. Em **Name (Nome)**, insira um nome para a estratégia de implantação.

1. Em **Description (Descrição)**, insira informações sobre a estratégia de implantação.

1. Em **Deployment type (Tipo de implantação)**, selecione um tipo.

1. Em **Step percentage (Porcentagem de etapa)**, escolha a porcentagem de chamadores a serem direcionados durante cada etapa da implantação. 

1. Em **Deployment time (Tempo de implantação)**, insira a duração total da implantação em minutos ou horas. 

1. Em **Bake time**, insira o tempo total, em minutos ou horas, para monitorar CloudWatch os alarmes da Amazon antes de prosseguir para a próxima etapa de uma implantação ou antes de considerar que a implantação foi concluída. 

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

1. Escolha **Create deployment strategy (Criar estratégia de implantação)**.

**Importante**  
Se você criou um perfil de configuração para AWS CodePipeline, deverá criar um pipeline CodePipeline que especifique AWS AppConfig como o *provedor de implantação*. Você não precisa executar [Implantar uma configuração](appconfig-deploying.md). No entanto, você deve configurar um cliente para receber atualizações de configuração do aplicativo conforme descrito em [Recuperando dados de configuração sem AWS AppConfig o Agente](about-data-plane.md). Para obter informações sobre a criação de um pipeline que especifica AWS AppConfig como provedor de implantação, consulte [Tutorial: Criar um pipeline usado AWS AppConfig como provedor de implantação](https://docs.aws.amazon.com/codepipeline/latest/userguide/tutorials-AppConfig.html) no *Guia do AWS CodePipeline usuário*. 

Vá para [Implantar uma configuração](appconfig-deploying.md).

## Criação de uma estratégia de AWS AppConfig implantação (linha de comando)
<a name="appconfig-creating-deployment-strategy-create-commandline"></a>

O procedimento a seguir descreve como usar o AWS CLI (no Linux ou no Windows) ou Ferramentas da AWS para PowerShell criar uma estratégia de AWS AppConfig implantação.

**Para criar uma estratégia de implantação passo a passo**

1. Abra AWS CLI o.

1. Execute o seguinte comando para criar uma estratégia de implantação. 

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

   ```
   aws appconfig create-deployment-strategy \
     --name A_name_for_the_deployment_strategy \
     --description A_description_of_the_deployment_strategy \
     --deployment-duration-in-minutes Total_amount_of_time_for_a_deployment_to_last \
     --final-bake-time-in-minutes Amount_of_time_AWS AppConfig_monitors_for_alarms_before_considering_the_deployment_to_be_complete \
     --growth-factor The_percentage_of_targets_to_receive_a_deployed_configuration_during_each_interval \
     --growth-type The_linear_or_exponential_algorithm_used_to_define_how_percentage_grows_over_time \
     --replicate-to To_save_the_deployment_strategy_to_a_Systems_Manager_(SSM)_document \
     --tags User_defined_key_value_pair_metadata_of_the_deployment_strategy
   ```

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

   ```
   aws appconfig create-deployment-strategy ^
     --name A_name_for_the_deployment_strategy ^
     --description A_description_of_the_deployment_strategy ^
     --deployment-duration-in-minutes Total_amount_of_time_for_a_deployment_to_last ^
     --final-bake-time-in-minutes Amount_of_time_AWS AppConfig_monitors_for_alarms_before_considering_the_deployment_to_be_complete ^
     --growth-factor The_percentage_of_targets_to_receive_a_deployed_configuration_during_each_interval ^
     --growth-type The_linear_or_exponential_algorithm_used_to_define_how_percentage_grows_over_time ^
     --name A_name_for_the_deployment_strategy ^
     --replicate-to To_save_the_deployment_strategy_to_a_Systems_Manager_(SSM)_document ^
     --tags User_defined_key_value_pair_metadata_of_the_deployment_strategy
   ```

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

   ```
   New-APPCDeploymentStrategy ` 
     --Name A_name_for_the_deployment_strategy ` 
     --Description A_description_of_the_deployment_strategy `
     --DeploymentDurationInMinutes Total_amount_of_time_for_a_deployment_to_last `
     --FinalBakeTimeInMinutes Amount_of_time_AWS AppConfig_monitors_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_grows_over_time `
     --ReplicateTo To_save_the_deployment_strategy_to_a_Systems_Manager_(SSM)_document `
     --Tag Hashtable_type_User_defined_key_value_pair_metadata_of_the_deployment_strategy
   ```

------

   O sistema retorna informações como estas.

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

   ```
   {
      "Id": "Id of the deployment strategy",
      "Name": "Name of the deployment strategy",
      "Description": "Description of the deployment strategy",
      "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 that received a deployed configuration during each interval",  
      "FinalBakeTimeInMinutes": "The amount of time AWS AppConfig monitored for alarms before considering the deployment to be complete",
      "ReplicateTo": "The Systems Manager (SSM) document where the deployment strategy is saved"
   }
   ```

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

   ```
   {
      "Id": "Id of the deployment strategy",
      "Name": "Name of the deployment strategy",
      "Description": "Description of the deployment strategy",
      "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 that received a deployed configuration during each interval",  
      "FinalBakeTimeInMinutes": "The amount of time AWS AppConfig monitored for alarms before considering the deployment to be complete",
      "ReplicateTo": "The Systems Manager (SSM) document where the deployment strategy is saved"
   }
   ```

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

   ```
   ContentLength               : Runtime of the command
   DeploymentDurationInMinutes : Total amount of time the deployment lasted
   Description                 : Description of the deployment strategy
   FinalBakeTimeInMinutes      : The amount of time AWS AppConfig monitored for alarms before considering the deployment to be complete
   GrowthFactor                : The percentage of targets that received 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
   Id                          : The deployment strategy ID
   Name                        : Name of the deployment strategy
   ReplicateTo                 : The Systems Manager (SSM) document where the deployment strategy is saved
   ResponseMetadata            : Runtime Metadata
   ```

------