AWS 文档 SDK 示例
将 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此命令不生成任何输出。
有关更多信息,请参阅《Application Auto Scaling 用户指南》中的计划扩展。
-
有关 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 Reference (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 Reference (V5)》中的 DeleteScheduledAction。
-
DeleteScalingPolicy
DeregisterScalableTarget