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 DeleteScheduledAction
dengan CLI
Contoh kode berikut menunjukkan cara menggunakanDeleteScheduledAction
.
- CLI
-
- AWS CLI
-
Untuk menghapus tindakan terjadwal dari grup Auto Scaling
Contoh ini menghapus tindakan terjadwal yang ditentukan dari grup Auto Scaling yang ditentukan.
aws autoscaling delete-scheduled-action \ --auto-scaling-group-name
my-asg
\ --scheduled-action-namemy-scheduled-action
Perintah ini tidak menghasilkan output.
-
Untuk detail API, lihat DeleteScheduledAction
di Referensi AWS CLI Perintah.
-
- PowerShell
-
- Alat untuk PowerShell V4
-
Contoh 1: Contoh ini menghapus tindakan terjadwal yang ditentukan untuk grup Auto Scaling yang ditentukan. Anda diminta untuk konfirmasi sebelum operasi berlangsung.
Remove-ASScheduledAction -AutoScalingGroupName my-asg -ScheduledAction "myScheduledAction"
Output:
Confirm Are you sure you want to perform this action? Performing operation "Remove-ASScheduledAction (DeleteScheduledAction)" on Target "myScheduledAction". [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-ASScheduledAction -AutoScalingGroupName my-asg -ScheduledAction "myScheduledAction" -Force
-
Untuk detail API, lihat DeleteScheduledActiondi Referensi Alat AWS untuk PowerShell Cmdlet (V4).
-
- Alat untuk PowerShell V5
-
Contoh 1: Contoh ini menghapus tindakan terjadwal yang ditentukan untuk grup Auto Scaling yang ditentukan. Anda diminta untuk konfirmasi sebelum operasi berlangsung.
Remove-ASScheduledAction -AutoScalingGroupName my-asg -ScheduledAction "myScheduledAction"
Output:
Confirm Are you sure you want to perform this action? Performing operation "Remove-ASScheduledAction (DeleteScheduledAction)" on Target "myScheduledAction". [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-ASScheduledAction -AutoScalingGroupName my-asg -ScheduledAction "myScheduledAction" -Force
-
Untuk detail API, lihat DeleteScheduledActiondi Referensi Alat AWS untuk PowerShell Cmdlet (V5).
-