AWS services or capabilities described in AWS Documentation may vary by region/location. Click Getting Started with Amazon AWS to see specific differences applicable to the China (Beijing) Region.
Modifies a task assigned to a maintenance window. You can't change the task type, but you can change the following values:
TaskARN
. For example, you can change a RUN_COMMAND
task from AWS-RunPowerShellScript
to AWS-RunShellScript
.
ServiceRoleArn
TaskInvocationParameters
Priority
MaxConcurrency
MaxErrors
One or more targets must be specified for maintenance window Run Command-type tasks. Depending on the task, targets are optional for other maintenance window task types (Automation, Lambda, and Step Functions). For more information about running tasks that don't specify targets, see Registering maintenance window tasks without targets in the Amazon Web Services Systems Manager User Guide.
If the value for a parameter in UpdateMaintenanceWindowTask
is null, then the
corresponding field isn't modified. If you set Replace
to true, then all fields
required by the RegisterTaskWithMaintenanceWindow operation are required for
this request. Optional fields that aren't specified are set to null.
When you update a maintenance window task that has options specified in TaskInvocationParameters
,
you must provide again all the TaskInvocationParameters
values that you want
to retain. The values you don't specify again are removed. For example, suppose that
when you registered a Run Command task, you specified TaskInvocationParameters
values for Comment
, NotificationConfig
, and OutputS3BucketName
.
If you update the maintenance window task and specify only a different OutputS3BucketName
value, the values for Comment
and NotificationConfig
are removed.
This is an asynchronous operation using the standard naming convention for .NET 4.5 or higher. For .NET 3.5 the operation is implemented as a pair of methods using the standard naming convention of BeginUpdateMaintenanceWindowTask and EndUpdateMaintenanceWindowTask.
Namespace: Amazon.SimpleSystemsManagement
Assembly: AWSSDK.SimpleSystemsManagement.dll
Version: 3.x.y.z
public virtual Task<UpdateMaintenanceWindowTaskResponse> UpdateMaintenanceWindowTaskAsync( UpdateMaintenanceWindowTaskRequest request, CancellationToken cancellationToken )
Container for the necessary parameters to execute the UpdateMaintenanceWindowTask service method.
A cancellation token that can be used by other objects or threads to receive notice of cancellation.
Exception | Condition |
---|---|
DoesNotExistException | Error returned when the ID specified for a resource, such as a maintenance window or patch baseline, doesn't exist. For information about resource quotas in Amazon Web Services Systems Manager, see Systems Manager service quotas in the Amazon Web Services General Reference. |
InternalServerErrorException | An error occurred on the server side. |
.NET:
Supported in: 8.0 and newer, Core 3.1
.NET Standard:
Supported in: 2.0
.NET Framework:
Supported in: 4.5 and newer