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 DeleteFlowLogs
dengan CLI
Contoh kode berikut menunjukkan cara menggunakanDeleteFlowLogs
.
- CLI
-
- AWS CLI
-
Untuk menghapus log aliran
delete-flow-logs
Contoh berikut menghapus log aliran yang ditentukan.aws ec2 delete-flow-logs --flow-log-id
fl-11223344556677889
Output:
{ "Unsuccessful": [] }
-
Untuk detail API, lihat DeleteFlowLogs
di Referensi AWS CLI Perintah.
-
- PowerShell
-
- Alat untuk PowerShell V4
-
Contoh 1: Contoh ini menghapus FlowLogId fl-01a2b3456a789c01 yang diberikan
Remove-EC2FlowLog -FlowLogId fl-01a2b3456a789c01
Output:
Confirm Are you sure you want to perform this action? Performing the operation "Remove-EC2FlowLog (DeleteFlowLogs)" on target "fl-01a2b3456a789c01". [Y] Yes [A] Yes to All [N] No [L] No to All [S] Suspend [?] Help (default is "Y"): Y
-
Untuk detail API, lihat DeleteFlowLogsdi Referensi Alat AWS untuk PowerShell Cmdlet (V4).
-
- Alat untuk PowerShell V5
-
Contoh 1: Contoh ini menghapus FlowLogId fl-01a2b3456a789c01 yang diberikan
Remove-EC2FlowLog -FlowLogId fl-01a2b3456a789c01
Output:
Confirm Are you sure you want to perform this action? Performing the operation "Remove-EC2FlowLog (DeleteFlowLogs)" on target "fl-01a2b3456a789c01". [Y] Yes [A] Yes to All [N] No [L] No to All [S] Suspend [?] Help (default is "Y"): Y
-
Untuk detail API, lihat DeleteFlowLogsdi Referensi Alat AWS untuk PowerShell Cmdlet (V5).
-