AWS文件開發套件範例
搭配使用 DeleteScheduledAction 與 CLI
下列程式碼範例示範如何使用 DeleteScheduledAction。
- CLI
-
- AWS CLI
-
刪除排程動作
下列
delete-scheduled-action範例會從指定的 Amazon AppStream 2.0 機群中刪除指定的排程動作:aws application-autoscaling delete-scheduled-action \ --service-namespaceappstream\ --scalable-dimensionappstream:fleet:DesiredCapacity\ --resource-idfleet/sample-fleet\ --scheduled-action-namemy-recurring-action此命令不會產生輸出。
如需詳細資訊,請參閱《應用程式自動擴展使用者指南》中的排程擴展。
-
如需 API 詳細資訊,請參閱《AWS CLI 命令參考》中的 DeleteScheduledAction
。
-
- PowerShell
-
- Tools for PowerShell V4
-
範例 1:此 Cmdlet 會刪除 Application Auto Scaling 可擴展目標的指定排程動作。
Remove-AASScheduledAction -ServiceNamespace AppStream -ScheduledActionName WeekDaysFleetScaling -ResourceId fleet/MyFleet -ScalableDimension appstream:fleet:DesiredCapacity輸出:
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-
如需 API 詳細資訊,請參閱《AWS Tools for PowerShell Cmdlet 參考 (V4)》中的 DeleteScheduledAction。
-
- Tools for PowerShell V5
-
範例 1:此 Cmdlet 會刪除 Application Auto Scaling 可擴展目標的指定排程動作。
Remove-AASScheduledAction -ServiceNamespace AppStream -ScheduledActionName WeekDaysFleetScaling -ResourceId fleet/MyFleet -ScalableDimension appstream:fleet:DesiredCapacity輸出:
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-
如需 API 詳細資訊,請參閱《AWS Tools for PowerShell Cmdlet 參考 (V5)》中的 DeleteScheduledAction。
-
DeleteScalingPolicy
DeregisterScalableTarget