AWS Tools for Windows PowerShell
Command Reference

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.

Synopsis

Calls the AWS Systems Manager UpdateMaintenanceWindowTask API operation.

Syntax

Update-SSMMaintenanceWindowTask
-WindowTaskId <String>
-Lambda_ClientContext <String>
-CloudWatchOutputConfig_CloudWatchLogGroupName <String>
-CloudWatchOutputConfig_CloudWatchOutputEnabled <Boolean>
-RunCommand_Comment <String>
-Description <String>
-RunCommand_DocumentHash <String>
-RunCommand_DocumentHashType <DocumentHashType>
-Automation_DocumentVersion <String>
-RunCommand_DocumentVersion <String>
-StepFunctions_Input <String>
-MaxConcurrency <String>
-MaxError <String>
-Name <String>
-StepFunctions_Name <String>
-NotificationConfig_NotificationArn <String>
-NotificationConfig_NotificationEvent <String[]>
-NotificationConfig_NotificationType <NotificationType>
-RunCommand_OutputS3BucketName <String>
-RunCommand_OutputS3KeyPrefix <String>
-Automation_Parameter <Hashtable>
-RunCommand_Parameter <Hashtable>
-Lambda_Payload <Byte[]>
-Priority <Int32>
-Lambda_Qualifier <String>
-Replace <Boolean>
-LoggingInfo_S3BucketName <String>
-LoggingInfo_S3KeyPrefix <String>
-LoggingInfo_S3Region <String>
-ServiceRoleArn <String>
-RunCommand_ServiceRoleArn <String>
-Target <Target[]>
-TaskArn <String>
-TaskParameter <Hashtable>
-RunCommand_TimeoutSecond <Int32>
-WindowId <String>
-Select <String>
-PassThru <SwitchParameter>
-Force <SwitchParameter>

Description

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
If a parameter is null, then the corresponding field is not modified. Also, if you set Replace to true, then all fields required by the RegisterTaskWithMaintenanceWindow action are required for this request. Optional fields that aren't specified are set to null.

Parameters

-Automation_DocumentVersion <String>
The version of an Automation document to use during task execution.
Required?False
Position?Named
Accept pipeline input?True (ByPropertyName)
AliasesTaskInvocationParameters_Automation_DocumentVersion
-Automation_Parameter <Hashtable>
The parameters for the AUTOMATION task.For information about specifying and updating task parameters, see RegisterTaskWithMaintenanceWindow and UpdateMaintenanceWindowTask.LoggingInfo has been deprecated. To specify an S3 bucket to contain logs, instead use the OutputS3BucketName and OutputS3KeyPrefix options in the TaskInvocationParameters structure. For information about how Systems Manager handles these options for the supported maintenance window task types, see MaintenanceWindowTaskInvocationParameters.TaskParameters has been deprecated. To specify parameters to pass to a task when it runs, instead use the Parameters option in the TaskInvocationParameters structure. For information about how Systems Manager handles these options for the supported maintenance window task types, see MaintenanceWindowTaskInvocationParameters.For AUTOMATION task types, Systems Manager ignores any values specified for these parameters.
Required?False
Position?Named
Accept pipeline input?True (ByPropertyName)
AliasesTaskInvocationParameters_Automation_Parameters
-CloudWatchOutputConfig_CloudWatchLogGroupName <String>
The name of the CloudWatch log group where you want to send command output. If you don't specify a group name, Systems Manager automatically creates a log group for you. The log group uses the following naming format: aws/ssm/SystemsManagerDocumentName.
Required?False
Position?Named
Accept pipeline input?True (ByPropertyName)
AliasesTaskInvocationParameters_RunCommand_CloudWatchOutputConfig_CloudWatchLogGroupName
-CloudWatchOutputConfig_CloudWatchOutputEnabled <Boolean>
Enables Systems Manager to send command output to CloudWatch Logs.
Required?False
Position?Named
Accept pipeline input?True (ByPropertyName)
AliasesTaskInvocationParameters_RunCommand_CloudWatchOutputConfig_CloudWatchOutputEnabled
-Description <String>
The new task description to specify.
Required?False
Position?Named
Accept pipeline input?True (ByPropertyName)
This parameter overrides confirmation prompts to force the cmdlet to continue its operation. This parameter should always be used with caution.
Required?False
Position?Named
Accept pipeline input?True (ByPropertyName)
-Lambda_ClientContext <String>
Pass client-specific information to the Lambda function that you are invoking. You can then process the client information in your Lambda function as you choose through the context variable.
Required?False
Position?Named
Accept pipeline input?True (ByPropertyName)
AliasesTaskInvocationParameters_Lambda_ClientContext
-Lambda_Payload <Byte[]>
JSON to provide to your Lambda function as input.The cmdlet will automatically convert the supplied parameter of type string, string[], System.IO.FileInfo or System.IO.Stream to byte[] before supplying it to the service.
Required?False
Position?Named
Accept pipeline input?True (ByPropertyName)
AliasesTaskInvocationParameters_Lambda_Payload
-Lambda_Qualifier <String>
(Optional) Specify a Lambda function version or alias name. If you specify a function version, the action uses the qualified function ARN to invoke a specific Lambda function. If you specify an alias name, the action uses the alias ARN to invoke the Lambda function version to which the alias points.
Required?False
Position?Named
Accept pipeline input?True (ByPropertyName)
AliasesTaskInvocationParameters_Lambda_Qualifier
-LoggingInfo_S3BucketName <String>
The name of an Amazon S3 bucket where execution logs are stored .
Required?False
Position?Named
Accept pipeline input?True (ByPropertyName)
-LoggingInfo_S3KeyPrefix <String>
(Optional) The Amazon S3 bucket subfolder.
Required?False
Position?Named
Accept pipeline input?True (ByPropertyName)
-LoggingInfo_S3Region <String>
The region where the Amazon S3 bucket is located.
Required?False
Position?Named
Accept pipeline input?True (ByPropertyName)
-MaxConcurrency <String>
The new MaxConcurrency value you want to specify. MaxConcurrency is the number of targets that are allowed to run this task in parallel.
Required?False
Position?Named
Accept pipeline input?True (ByPropertyName)
-MaxError <String>
The new MaxErrors value to specify. MaxErrors is the maximum number of errors that are allowed before the task stops being scheduled.
Required?False
Position?Named
Accept pipeline input?True (ByPropertyName)
AliasesMaxErrors
-Name <String>
The new task name to specify.
Required?False
Position?Named
Accept pipeline input?True (ByPropertyName)
-NotificationConfig_NotificationArn <String>
An Amazon Resource Name (ARN) for an Amazon Simple Notification Service (Amazon SNS) topic. Run Command pushes notifications about command status changes to this topic.
Required?False
Position?Named
Accept pipeline input?True (ByPropertyName)
AliasesTaskInvocationParameters_RunCommand_NotificationConfig_NotificationArn
-NotificationConfig_NotificationEvent <String[]>
The different events for which you can receive notifications. These events include the following: All (events), InProgress, Success, TimedOut, Cancelled, Failed. To learn more about these events, see Configuring Amazon SNS Notifications for AWS Systems Manager in the AWS Systems Manager User Guide.
Required?False
Position?Named
Accept pipeline input?True (ByPropertyName)
AliasesTaskInvocationParameters_RunCommand_NotificationConfig_NotificationEvents
-NotificationConfig_NotificationType <NotificationType>
Command: Receive notification when the status of a command changes. Invocation: For commands sent to multiple instances, receive notification on a per-instance basis when the status of a command changes.
Required?False
Position?Named
Accept pipeline input?True (ByPropertyName)
AliasesTaskInvocationParameters_RunCommand_NotificationConfig_NotificationType
-PassThru <SwitchParameter>
Changes the cmdlet behavior to return the value passed to the WindowTaskId parameter. The -PassThru parameter is deprecated, use -Select '^WindowTaskId' instead. This parameter will be removed in a future version.
Required?False
Position?Named
Accept pipeline input?True (ByPropertyName)
-Priority <Int32>
The new task priority to specify. The lower the number, the higher the priority. Tasks that have the same priority are scheduled in parallel.
Required?False
Position?Named
Accept pipeline input?True (ByPropertyName)
-Replace <Boolean>
If True, then all fields that are required by the RegisterTaskWithMaintenanceWndow action are also required for this API request. Optional fields that are not specified are set to null.
Required?False
Position?Named
Accept pipeline input?True (ByPropertyName)
-RunCommand_Comment <String>
Information about the commands to run.
Required?False
Position?Named
Accept pipeline input?True (ByPropertyName)
AliasesTaskInvocationParameters_RunCommand_Comment
-RunCommand_DocumentHash <String>
The SHA-256 or SHA-1 hash created by the system when the document was created. SHA-1 hashes have been deprecated.
Required?False
Position?Named
Accept pipeline input?True (ByPropertyName)
AliasesTaskInvocationParameters_RunCommand_DocumentHash
-RunCommand_DocumentHashType <DocumentHashType>
SHA-256 or SHA-1. SHA-1 hashes have been deprecated.
Required?False
Position?Named
Accept pipeline input?True (ByPropertyName)
AliasesTaskInvocationParameters_RunCommand_DocumentHashType
-RunCommand_DocumentVersion <String>
The SSM document version to use in the request. You can specify $DEFAULT, $LATEST, or a specific version number. If you run commands by using the AWS CLI, then you must escape the first two options by using a backslash. If you specify a version number, then you don't need to use the backslash. For example:--document-version "\$DEFAULT"--document-version "\$LATEST"--document-version "3"
Required?False
Position?Named
Accept pipeline input?True (ByPropertyName)
AliasesTaskInvocationParameters_RunCommand_DocumentVersion
-RunCommand_OutputS3BucketName <String>
The name of the Amazon S3 bucket.
Required?False
Position?Named
Accept pipeline input?True (ByPropertyName)
AliasesTaskInvocationParameters_RunCommand_OutputS3BucketName
-RunCommand_OutputS3KeyPrefix <String>
The Amazon S3 bucket subfolder.
Required?False
Position?Named
Accept pipeline input?True (ByPropertyName)
AliasesTaskInvocationParameters_RunCommand_OutputS3KeyPrefix
-RunCommand_Parameter <Hashtable>
The parameters for the RUN_COMMAND task execution.
Required?False
Position?Named
Accept pipeline input?True (ByPropertyName)
AliasesTaskInvocationParameters_RunCommand_Parameters
-RunCommand_ServiceRoleArn <String>
The ARN of the IAM service role to use to publish Amazon Simple Notification Service (Amazon SNS) notifications for maintenance window Run Command tasks.
Required?False
Position?Named
Accept pipeline input?True (ByPropertyName)
AliasesTaskInvocationParameters_RunCommand_ServiceRoleArn
-RunCommand_TimeoutSecond <Int32>
If this time is reached and the command has not already started running, it doesn't run.
Required?False
Position?Named
Accept pipeline input?True (ByPropertyName)
AliasesTaskInvocationParameters_RunCommand_TimeoutSeconds
-Select <String>
Use the -Select parameter to control the cmdlet output. The default value is '*'. Specifying -Select '*' will result in the cmdlet returning the whole service response (Amazon.SimpleSystemsManagement.Model.UpdateMaintenanceWindowTaskResponse). Specifying the name of a property of type Amazon.SimpleSystemsManagement.Model.UpdateMaintenanceWindowTaskResponse will result in that property being returned. Specifying -Select '^ParameterName' will result in the cmdlet returning the selected cmdlet parameter value.
Required?False
Position?Named
Accept pipeline input?True (ByPropertyName)
-ServiceRoleArn <String>
The ARN of the IAM service role for Systems Manager to assume when running a maintenance window task. If you do not specify a service role ARN, Systems Manager uses your account's service-linked role. If no service-linked role for Systems Manager exists in your account, it is created when you run RegisterTaskWithMaintenanceWindow.For more information, see the following topics in the in the AWS Systems Manager User Guide:
Required?False
Position?Named
Accept pipeline input?True (ByPropertyName)
-StepFunctions_Input <String>
The inputs for the STEP_FUNCTIONS task.
Required?False
Position?Named
Accept pipeline input?True (ByPropertyName)
AliasesTaskInvocationParameters_StepFunctions_Input
-StepFunctions_Name <String>
The name of the STEP_FUNCTIONS task.
Required?False
Position?Named
Accept pipeline input?True (ByPropertyName)
AliasesTaskInvocationParameters_StepFunctions_Name
-Target <Target[]>
The targets (either instances or tags) to modify. Instances are specified using Key=instanceids,Values=instanceID_1,instanceID_2. Tags are specified using Key=tag_name,Values=tag_value.
Required?False
Position?Named
Accept pipeline input?True (ByPropertyName)
AliasesTargets
-TaskArn <String>
The task ARN to modify.
Required?False
Position?Named
Accept pipeline input?True (ByPropertyName)
-TaskParameter <Hashtable>
The parameters to modify.TaskParameters has been deprecated. To specify parameters to pass to a task when it runs, instead use the Parameters option in the TaskInvocationParameters structure. For information about how Systems Manager handles these options for the supported maintenance window task types, see MaintenanceWindowTaskInvocationParameters.The map has the following format:Key: string, between 1 and 255 charactersValue: an array of strings, each string is between 1 and 255 characters
Required?False
Position?Named
Accept pipeline input?True (ByPropertyName)
AliasesTaskParameters
-WindowId <String>
The maintenance window ID that contains the task to modify.
Required?True
Position?Named
Accept pipeline input?True (ByPropertyName)
-WindowTaskId <String>
The task ID to modify.
Required?True
Position?1
Accept pipeline input?True (ByValue, ByPropertyName)

Common Credential and Region Parameters

-AccessKey <String>
The AWS access key for the user account. This can be a temporary access key if the corresponding session token is supplied to the -SessionToken parameter.
Required?False
Position?Named
Accept pipeline input?True (ByPropertyName)
AliasesAK
-Credential <AWSCredentials>
An AWSCredentials object instance containing access and secret key information, and optionally a token for session-based credentials.
Required?False
Position?Named
Accept pipeline input?True (ByValue, ByPropertyName)
-EndpointUrl <String>
The endpoint to make the call against.Note: This parameter is primarily for internal AWS use and is not required/should not be specified for normal usage. The cmdlets normally determine which endpoint to call based on the region specified to the -Region parameter or set as default in the shell (via Set-DefaultAWSRegion). Only specify this parameter if you must direct the call to a specific custom endpoint.
Required?False
Position?Named
Accept pipeline input?True (ByPropertyName)
-NetworkCredential <PSCredential>
Used with SAML-based authentication when ProfileName references a SAML role profile. Contains the network credentials to be supplied during authentication with the configured identity provider's endpoint. This parameter is not required if the user's default network identity can or should be used during authentication.
Required?False
Position?Named
Accept pipeline input?True (ByValue, ByPropertyName)
-ProfileLocation <String>
Used to specify the name and location of the ini-format credential file (shared with the AWS CLI and other AWS SDKs)If this optional parameter is omitted this cmdlet will search the encrypted credential file used by the AWS SDK for .NET and AWS Toolkit for Visual Studio first. If the profile is not found then the cmdlet will search in the ini-format credential file at the default location: (user's home directory)\.aws\credentials.If this parameter is specified then this cmdlet will only search the ini-format credential file at the location given.As the current folder can vary in a shell or during script execution it is advised that you use specify a fully qualified path instead of a relative path.
Required?False
Position?Named
Accept pipeline input?True (ByPropertyName)
AliasesAWSProfilesLocation, ProfilesLocation
-ProfileName <String>
The user-defined name of an AWS credentials or SAML-based role profile containing credential information. The profile is expected to be found in the secure credential file shared with the AWS SDK for .NET and AWS Toolkit for Visual Studio. You can also specify the name of a profile stored in the .ini-format credential file used with the AWS CLI and other AWS SDKs.
Required?False
Position?Named
Accept pipeline input?True (ByPropertyName)
AliasesStoredCredentials, AWSProfileName
-Region <Object>
The system name of an AWS region or an AWSRegion instance. This governs the endpoint that will be used when calling service operations. Note that the AWS resources referenced in a call are usually region-specific.
Required?False
Position?Named
Accept pipeline input?True (ByPropertyName)
AliasesRegionToCall
-SecretKey <String>
The AWS secret key for the user account. This can be a temporary secret key if the corresponding session token is supplied to the -SessionToken parameter.
Required?False
Position?Named
Accept pipeline input?True (ByPropertyName)
AliasesSK, SecretAccessKey
-SessionToken <String>
The session token if the access and secret keys are temporary session-based credentials.
Required?False
Position?Named
Accept pipeline input?True (ByPropertyName)
AliasesST

Outputs

This cmdlet returns an Amazon.SimpleSystemsManagement.Model.UpdateMaintenanceWindowTaskResponse object containing multiple properties. The object can also be referenced from properties attached to the cmdlet entry in the $AWSHistory stack.

Supported Version

AWS Tools for PowerShell: 2.x.y.z