There are more AWS SDK examples available in the AWS Doc SDK Examples
Use DeregisterTaskFromMaintenanceWindow with a CLI
The following code examples show how to use DeregisterTaskFromMaintenanceWindow.
- CLI
-
- AWS CLI
-
To remove a task from a maintenance window
The following
deregister-task-from-maintenance-windowexample removes the specified task from the specified maintenance window.aws ssm deregister-task-from-maintenance-window \ --window-id"mw-ab12cd34efEXAMPLE"\ --window-task-id"a1b2c3d4-5678-90ab-cdef-EXAMPLE11111"Output:
{ "WindowTaskId":"a1b2c3d4-5678-90ab-cdef-EXAMPLE11111", "WindowId":"mw-ab12cd34efEXAMPLE" }For more information, see Systems Manager Maintenance Windows Tutorials (AWS CLI) in the AWS Systems Manager User Guide.
-
For API details, see DeregisterTaskFromMaintenanceWindow
in AWS CLI Command Reference.
-
- PowerShell
-
- Tools for PowerShell V4
-
Example 1: This example removes a task from a maintenance window.
Unregister-SSMTaskFromMaintenanceWindow -WindowTaskId "f34a2c47-ddfd-4c85-a88d-72366b69af1b" -WindowId "mw-03a342e62c96d31b0"Output:
WindowId WindowTaskId -------- ------------ mw-03a342e62c96d31b0 f34a2c47-ddfd-4c85-a88d-72366b69af1b-
For API details, see DeregisterTaskFromMaintenanceWindow in AWS Tools for PowerShell Cmdlet Reference (V4).
-
- Tools for PowerShell V5
-
Example 1: This example removes a task from a maintenance window.
Unregister-SSMTaskFromMaintenanceWindow -WindowTaskId "f34a2c47-ddfd-4c85-a88d-72366b69af1b" -WindowId "mw-03a342e62c96d31b0"Output:
WindowId WindowTaskId -------- ------------ mw-03a342e62c96d31b0 f34a2c47-ddfd-4c85-a88d-72366b69af1b-
For API details, see DeregisterTaskFromMaintenanceWindow in AWS Tools for PowerShell Cmdlet Reference (V5).
-