

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

# Gunakan `DeleteLaunchConfiguration` dengan CLI
<a name="example_auto-scaling_DeleteLaunchConfiguration_section"></a>

Contoh kode berikut menunjukkan cara menggunakan`DeleteLaunchConfiguration`.

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

**AWS CLI**  
**Untuk menghapus konfigurasi peluncuran**  
Contoh ini menghapus konfigurasi peluncuran yang ditentukan.  

```
aws autoscaling delete-launch-configuration \
    --launch-configuration-name my-launch-config
```
Perintah ini tidak menghasilkan output.  
Untuk informasi selengkapnya, lihat [Menghapus infrastruktur Auto Scaling](https://docs.aws.amazon.com/autoscaling/ec2/userguide/as-process-shutdown.html) di Panduan Pengguna *Amazon EC2 Auto Scaling*.  
+  Untuk detail API, lihat [DeleteLaunchConfiguration](https://awscli.amazonaws.com/v2/documentation/api/latest/reference/autoscaling/delete-launch-configuration.html)di *Referensi AWS CLI Perintah*. 

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

**Alat untuk PowerShell V4**  
**Contoh 1: Contoh ini menghapus konfigurasi peluncuran yang ditentukan jika tidak dilampirkan ke grup Auto Scaling. Anda diminta untuk konfirmasi sebelum operasi berlangsung.**  

```
Remove-ASLaunchConfiguration -LaunchConfigurationName my-lc
```
**Output:**  

```
Confirm
Are you sure you want to perform this action?
Performing operation "Remove-ASLaunchConfiguration (DeleteLaunchConfiguration)" on Target "my-lc".
[Y] Yes  [A] Yes to All  [N] No  [L] No to All  [S] Suspend  [?] Help (default is "Y"):
```
**Contoh 2: Jika Anda menentukan parameter Force, Anda tidak diminta untuk konfirmasi sebelum operasi berlangsung.**  

```
Remove-ASLaunchConfiguration -LaunchConfigurationName my-lc -Force
```
+  Untuk detail API, lihat [DeleteLaunchConfiguration](https://docs.aws.amazon.com/powershell/v4/reference)di *Referensi Alat AWS untuk PowerShell Cmdlet (V4)*. 

**Alat untuk PowerShell V5**  
**Contoh 1: Contoh ini menghapus konfigurasi peluncuran yang ditentukan jika tidak dilampirkan ke grup Auto Scaling. Anda diminta untuk konfirmasi sebelum operasi berlangsung.**  

```
Remove-ASLaunchConfiguration -LaunchConfigurationName my-lc
```
**Output:**  

```
Confirm
Are you sure you want to perform this action?
Performing operation "Remove-ASLaunchConfiguration (DeleteLaunchConfiguration)" on Target "my-lc".
[Y] Yes  [A] Yes to All  [N] No  [L] No to All  [S] Suspend  [?] Help (default is "Y"):
```
**Contoh 2: Jika Anda menentukan parameter Force, Anda tidak diminta untuk konfirmasi sebelum operasi berlangsung.**  

```
Remove-ASLaunchConfiguration -LaunchConfigurationName my-lc -Force
```
+  Untuk detail API, lihat [DeleteLaunchConfiguration](https://docs.aws.amazon.com/powershell/v5/reference)di *Referensi Alat AWS untuk PowerShell Cmdlet (V5)*. 

------

Untuk daftar lengkap panduan pengembang AWS SDK dan contoh kode, lihat[Menggunakan layanan ini dengan AWS SDK](sdk-general-information-section.md). Topik ini juga mencakup informasi tentang memulai dan detail tentang versi SDK sebelumnya.