UpdateTask
Updates the metadata associated with a task.
Request Syntax
{
"CloudWatchLogGroupArn": "string
",
"Excludes": [
{
"FilterType": "string
",
"Value": "string
"
}
],
"Includes": [
{
"FilterType": "string
",
"Value": "string
"
}
],
"Name": "string
",
"Options": {
"Atime": "string
",
"BytesPerSecond": number
,
"Gid": "string
",
"LogLevel": "string
",
"Mtime": "string
",
"ObjectTags": "string
",
"OverwriteMode": "string
",
"PosixPermissions": "string
",
"PreserveDeletedFiles": "string
",
"PreserveDevices": "string
",
"SecurityDescriptorCopyFlags": "string
",
"TaskQueueing": "string
",
"TransferMode": "string
",
"Uid": "string
",
"VerifyMode": "string
"
},
"Schedule": {
"ScheduleExpression": "string
"
},
"TaskArn": "string
"
}
Request Parameters
For information about the parameters that are common to all actions, see Common Parameters.
The request accepts the following data in JSON format.
- CloudWatchLogGroupArn
-
The Amazon Resource Name (ARN) of the resource name of the Amazon CloudWatch log group.
Type: String
Length Constraints: Maximum length of 562.
Pattern:
^arn:(aws|aws-cn|aws-us-gov|aws-iso|aws-iso-b):logs:[a-z\-0-9]*:[0-9]{12}:log-group:([^:\*]*)(:\*)?$
Required: No
- Excludes
-
A list of filter rules that determines which files to exclude from a task. The list should contain a single filter string that consists of the patterns to exclude. The patterns are delimited by "|" (that is, a pipe), for example,
"/folder1|/folder2"
.Type: Array of FilterRule objects
Array Members: Minimum number of 0 items. Maximum number of 1 item.
Required: No
- Includes
-
A list of filter rules that determines which files to include when running a task. The pattern contains a single filter string that consists of the patterns to include. The patterns are delimited by "|" (that is, a pipe), for example,
"/folder1|/folder2"
.Type: Array of FilterRule objects
Array Members: Minimum number of 0 items. Maximum number of 1 item.
Required: No
- Name
-
The name of the task to update.
Type: String
Length Constraints: Minimum length of 1. Maximum length of 256.
Pattern:
^[a-zA-Z0-9\s+=._:@/-]+$
Required: No
- Options
-
Represents the options that are available to control the behavior of a StartTaskExecution operation. Behavior includes preserving metadata such as user ID (UID), group ID (GID), and file permissions, and also overwriting files in the destination, data integrity verification, and so on.
A task has a set of default options associated with it. If you don't specify an option in StartTaskExecution, the default value is used. You can override the defaults options on each task execution by specifying an overriding
Options
value to StartTaskExecution.Type: Options object
Required: No
- Schedule
-
Specifies a schedule used to periodically transfer files from a source to a destination location. You can configure your task to execute hourly, daily, weekly or on specific days of the week. You control when in the day or hour you want the task to execute. The time you specify is UTC time. For more information, see Scheduling your task.
Type: TaskSchedule object
Required: No
- TaskArn
-
The Amazon Resource Name (ARN) of the resource name of the task to update.
Type: String
Length Constraints: Maximum length of 128.
Pattern:
^arn:(aws|aws-cn|aws-us-gov|aws-iso|aws-iso-b):datasync:[a-z\-0-9]*:[0-9]{12}:task/task-[0-9a-f]{17}$
Required: Yes
Response Elements
If the action is successful, the service sends back an HTTP 200 response with an empty HTTP body.
Errors
For information about the errors that are common to all actions, see Common Errors.
- InternalException
-
This exception is thrown when an error occurs in the AWS DataSync service.
HTTP Status Code: 500
- InvalidRequestException
-
This exception is thrown when the client submits a malformed request.
HTTP Status Code: 400
See Also
For more information about using this API in one of the language-specific AWS SDKs, see the following: