

Ada lebih banyak contoh AWS SDK yang tersedia di repo Contoh [SDK AWS Doc](https://github.com/awsdocs/aws-doc-sdk-examples). GitHub 

Terjemahan disediakan oleh mesin penerjemah. Jika konten terjemahan yang diberikan bertentangan dengan versi bahasa Inggris aslinya, utamakan versi bahasa Inggris.

# Gunakan `StopDeployment` dengan CLI
<a name="codedeploy_example_codedeploy_StopDeployment_section"></a>

Contoh kode berikut menunjukkan cara menggunakan`StopDeployment`.

------
#### [ CLI ]

**AWS CLI**  
**Untuk mencoba menghentikan penerapan**  
`stop-deployment`Contoh berikut mencoba menghentikan penerapan yang sedang berlangsung yang terkait dengan akun pengguna. AWS   
aws menyebarkan stop-deployment --deployment-id d-A1b2c3111  
Output:  

```
{
    "status": "Succeeded",
    "statusMessage": "No more commands will be scheduled for execution in the deployment instances"
}
```
+  Untuk detail API, lihat [StopDeployment](https://awscli.amazonaws.com/v2/documentation/api/latest/reference/deploy/stop-deployment.html)di *Referensi AWS CLI Perintah*. 

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

**Alat untuk PowerShell V4**  
**Contoh 1: Contoh ini mencoba menghentikan penerapan dengan ID penerapan yang ditentukan.**  

```
Stop-CDDeployment -DeploymentId d-LJQNREYEX
```
**Output:**  

```
Status     StatusMessage
------     -------------
Pending    Stopping Pending. Stopping to schedule commands in the deployment instances
```
+  Untuk detail API, lihat [StopDeployment](https://docs.aws.amazon.com/powershell/v4/reference)di *Referensi Alat AWS untuk PowerShell Cmdlet (V4)*. 

**Alat untuk PowerShell V5**  
**Contoh 1: Contoh ini mencoba menghentikan penerapan dengan ID penerapan yang ditentukan.**  

```
Stop-CDDeployment -DeploymentId d-LJQNREYEX
```
**Output:**  

```
Status     StatusMessage
------     -------------
Pending    Stopping Pending. Stopping to schedule commands in the deployment instances
```
+  Untuk detail API, lihat [StopDeployment](https://docs.aws.amazon.com/powershell/v5/reference)di *Referensi Alat AWS untuk PowerShell Cmdlet (V5)*. 

------