Gunakan DeleteScheduledAction dengan AWS SDK atau CLI - AWS SDKContoh Kode

Ada lebih banyak AWS SDK contoh yang tersedia di GitHub repo SDKContoh AWS Dokumen.

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

Gunakan DeleteScheduledAction dengan AWS SDK atau CLI

Contoh kode berikut menunjukkan cara menggunakanDeleteScheduledAction.

CLI
AWS CLI

Untuk menghapus tindakan terjadwal

delete-scheduled-actionContoh berikut menghapus tindakan terjadwal yang ditentukan dari armada Amazon AppStream 2.0 yang ditentukan:

aws application-autoscaling delete-scheduled-action \ --service-namespace appstream \ --scalable-dimension appstream:fleet:DesiredCapacity \ --resource-id fleet/sample-fleet \ --scheduled-action-name my-recurring-action

Perintah ini tidak menghasilkan output.

Untuk informasi selengkapnya, lihat Penskalaan Terjadwal di Panduan Pengguna Application Auto Scaling.

PowerShell
Alat untuk PowerShell

Contoh 1: Cmdlet ini menghapus tindakan terjadwal yang ditentukan untuk target scalable Application Auto Scaling.

Remove-AASScheduledAction -ServiceNamespace AppStream -ScheduledActionName WeekDaysFleetScaling -ResourceId fleet/MyFleet -ScalableDimension appstream:fleet:DesiredCapacity

Output:

Confirm Are you sure you want to perform this action? Performing the operation "Remove-AASScheduledAction (DeleteScheduledAction)" on target "WeekDaysFleetScaling". [Y] Yes [A] Yes to All [N] No [L] No to All [S] Suspend [?] Help (default is "Y"): Y