Ada lebih banyak contoh AWS SDK yang tersedia di repo Contoh SDK AWS Doc
Terjemahan disediakan oleh mesin penerjemah. Jika konten terjemahan yang diberikan bertentangan dengan versi bahasa Inggris aslinya, utamakan versi bahasa Inggris.
Gunakan DeleteDhcpOptions
dengan CLI
Contoh kode berikut menunjukkan cara menggunakanDeleteDhcpOptions
.
- CLI
-
- AWS CLI
-
Untuk menghapus set opsi DHCP
Contoh ini menghapus set opsi DHCP yang ditentukan. Jika perintah berhasil, tidak ada output yang akan ditampilkan.
Perintah:
aws ec2 delete-dhcp-options --dhcp-options-id
dopt-d9070ebb
-
Untuk detail API, lihat DeleteDhcpOptions
di Referensi AWS CLI Perintah.
-
- PowerShell
-
- Alat untuk PowerShell V4
-
Contoh 1: Contoh ini menghapus set opsi DHCP yang ditentukan. Anda diminta untuk konfirmasi sebelum operasi berlangsung, kecuali jika Anda juga menentukan parameter Force.
Remove-EC2DhcpOption -DhcpOptionsId dopt-1a2b3c4d
Output:
Confirm Are you sure you want to perform this action? Performing operation "Remove-EC2DhcpOption (DeleteDhcpOptions)" on Target "dopt-1a2b3c4d". [Y] Yes [A] Yes to All [N] No [L] No to All [S] Suspend [?] Help (default is "Y"):
-
Untuk detail API, lihat DeleteDhcpOptionsdi Referensi Alat AWS untuk PowerShell Cmdlet (V4).
-
- Alat untuk PowerShell V5
-
Contoh 1: Contoh ini menghapus set opsi DHCP yang ditentukan. Anda diminta untuk konfirmasi sebelum operasi berlangsung, kecuali jika Anda juga menentukan parameter Force.
Remove-EC2DhcpOption -DhcpOptionsId dopt-1a2b3c4d
Output:
Confirm Are you sure you want to perform this action? Performing operation "Remove-EC2DhcpOption (DeleteDhcpOptions)" on Target "dopt-1a2b3c4d". [Y] Yes [A] Yes to All [N] No [L] No to All [S] Suspend [?] Help (default is "Y"):
-
Untuk detail API, lihat DeleteDhcpOptionsdi Referensi Alat AWS untuk PowerShell Cmdlet (V5).
-