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 DataSync CreateTask API operation.

Syntax

New-DSYNTask
-SourceLocationArn <String>
-ManifestConfig_Action <ManifestAction>
-ManifestConfig_Source_S3_BucketAccessRoleArn <String>
-TaskReportConfig_Destination_S3_BucketAccessRoleArn <String>
-CloudWatchLogGroupArn <String>
-DestinationLocationArn <String>
-Exclude <FilterRule[]>
-ManifestConfig_Format <ManifestFormat>
-Include <FilterRule[]>
-S3_ManifestObjectPath <String>
-S3_ManifestObjectVersionId <String>
-Name <String>
-TaskReportConfig_ObjectVersionId <ObjectVersionIds>
-Option <Options>
-TaskReportConfig_OutputType <ReportOutputType>
-Deleted_ReportLevel <ReportLevel>
-Skipped_ReportLevel <ReportLevel>
-Transferred_ReportLevel <ReportLevel>
-Verified_ReportLevel <ReportLevel>
-TaskReportConfig_ReportLevel <ReportLevel>
-ManifestConfig_Source_S3_S3BucketArn <String>
-TaskReportConfig_Destination_S3_S3BucketArn <String>
-Schedule_ScheduleExpression <String>
-Schedule_Status <ScheduleStatus>
-S3_Subdirectory <String>
-Tag <TagListEntry[]>
-TaskMode <TaskMode>
-Select <String>
-Force <SwitchParameter>
-ClientConfig <AmazonDataSyncConfig>

Description

Configures a task, which defines where and how DataSync transfers your data. A task includes a source location, destination location, and transfer options (such as bandwidth limits, scheduling, and more). If you're planning to transfer data to or from an Amazon S3 location, review how DataSync can affect your S3 request charges and the DataSync pricing page before you begin.

Parameters

-ClientConfig <AmazonDataSyncConfig>
Amazon.PowerShell.Cmdlets.DSYN.AmazonDataSyncClientCmdlet.ClientConfig
Required?False
Position?Named
Accept pipeline input?True (ByPropertyName)
-CloudWatchLogGroupArn <String>
Specifies the Amazon Resource Name (ARN) of an Amazon CloudWatch log group for monitoring your task.For Enhanced mode tasks, you don't need to specify anything. DataSync automatically sends logs to a CloudWatch log group named /aws/datasync.
Required?False
Position?Named
Accept pipeline input?True (ByPropertyName)
-Deleted_ReportLevel <ReportLevel>
Specifies whether your task report includes errors only or successes and errors.For example, your report might mostly include only what didn't go well in your transfer (ERRORS_ONLY). At the same time, you want to verify that your task filter is working correctly. In this situation, you can get a list of what files DataSync successfully skipped and if something transferred that you didn't to transfer (SUCCESSES_AND_ERRORS).
Required?False
Position?Named
Accept pipeline input?True (ByPropertyName)
AliasesTaskReportConfig_Overrides_Deleted_ReportLevel
-DestinationLocationArn <String>
Specifies the ARN of your transfer's destination location.
Required?True
Position?Named
Accept pipeline input?True (ByPropertyName)
-Exclude <FilterRule[]>
Specifies exclude filters that define the files, objects, and folders in your source location that you don't want DataSync to transfer. For more information and examples, see Specifying what DataSync transfers by using filters. Starting with version 4 of the SDK this property will default to null. If no data for this property is returned from the service the property will also be null. This was changed to improve performance and allow the SDK and caller to distinguish between a property not set or a property being empty to clear out a value. To retain the previous SDK behavior set the AWSConfigs.InitializeCollections static property to true.
Required?False
Position?Named
Accept pipeline input?True (ByPropertyName)
AliasesExcludes
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)
-Include <FilterRule[]>
Specifies include filters that define the files, objects, and folders in your source location that you want DataSync to transfer. For more information and examples, see Specifying what DataSync transfers by using filters. Starting with version 4 of the SDK this property will default to null. If no data for this property is returned from the service the property will also be null. This was changed to improve performance and allow the SDK and caller to distinguish between a property not set or a property being empty to clear out a value. To retain the previous SDK behavior set the AWSConfigs.InitializeCollections static property to true.
Required?False
Position?Named
Accept pipeline input?True (ByPropertyName)
AliasesIncludes
-ManifestConfig_Action <ManifestAction>
Specifies what DataSync uses the manifest for.
Required?False
Position?Named
Accept pipeline input?True (ByPropertyName)
-ManifestConfig_Format <ManifestFormat>
Specifies the file format of your manifest. For more information, see Creating a manifest.
Required?False
Position?Named
Accept pipeline input?True (ByPropertyName)
-ManifestConfig_Source_S3_BucketAccessRoleArn <String>
Specifies the Identity and Access Management (IAM) role that allows DataSync to access your manifest. For more information, see Providing DataSync access to your manifest.
Required?False
Position?Named
Accept pipeline input?True (ByPropertyName)
-ManifestConfig_Source_S3_S3BucketArn <String>
Specifies the Amazon Resource Name (ARN) of the S3 bucket where you're hosting your manifest.
Required?False
Position?Named
Accept pipeline input?True (ByPropertyName)
-Name <String>
Specifies the name of your task.
Required?False
Position?Named
Accept pipeline input?True (ByPropertyName)
-Option <Options>
Specifies your task's settings, such as preserving file metadata, verifying data integrity, among other options.
Required?False
Position?Named
Accept pipeline input?True (ByPropertyName)
AliasesOptions
-S3_ManifestObjectPath <String>
Specifies the Amazon S3 object key of your manifest. This can include a prefix (for example, prefix/my-manifest.csv).
Required?False
Position?Named
Accept pipeline input?True (ByPropertyName)
AliasesManifestConfig_Source_S3_ManifestObjectPath
-S3_ManifestObjectVersionId <String>
Specifies the object version ID of the manifest that you want DataSync to use. If you don't set this, DataSync uses the latest version of the object.
Required?False
Position?Named
Accept pipeline input?True (ByPropertyName)
AliasesManifestConfig_Source_S3_ManifestObjectVersionId
-S3_Subdirectory <String>
Specifies a bucket prefix for your report.
Required?False
Position?Named
Accept pipeline input?True (ByPropertyName)
AliasesTaskReportConfig_Destination_S3_Subdirectory
-Schedule_ScheduleExpression <String>
Specifies your task schedule by using a cron or rate expression.Use cron expressions for task schedules that run on a specific time and day. For example, the following cron expression creates a task schedule that runs at 8 AM on the first Wednesday of every month:cron(0 8 * * 3#1)Use rate expressions for task schedules that run on a regular interval. For example, the following rate expression creates a task schedule that runs every 12 hours:rate(12 hours)For information about cron and rate expression syntax, see the Amazon EventBridge User Guide.
Required?False
Position?Named
Accept pipeline input?True (ByPropertyName)
-Schedule_Status <ScheduleStatus>
Specifies whether to enable or disable your task schedule. Your schedule is enabled by default, but there can be situations where you need to disable it. For example, you might need to pause a recurring transfer to fix an issue with your task or perform maintenance on your storage system.DataSync might disable your schedule automatically if your task fails repeatedly with the same error. For more information, see TaskScheduleDetails.
Required?False
Position?Named
Accept pipeline input?True (ByPropertyName)
-Select <String>
Use the -Select parameter to control the cmdlet output. The default value is 'TaskArn'. Specifying -Select '*' will result in the cmdlet returning the whole service response (Amazon.DataSync.Model.CreateTaskResponse). Specifying the name of a property of type Amazon.DataSync.Model.CreateTaskResponse 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)
-Skipped_ReportLevel <ReportLevel>
Specifies whether your task report includes errors only or successes and errors.For example, your report might mostly include only what didn't go well in your transfer (ERRORS_ONLY). At the same time, you want to verify that your task filter is working correctly. In this situation, you can get a list of what files DataSync successfully skipped and if something transferred that you didn't to transfer (SUCCESSES_AND_ERRORS).
Required?False
Position?Named
Accept pipeline input?True (ByPropertyName)
AliasesTaskReportConfig_Overrides_Skipped_ReportLevel
-SourceLocationArn <String>
Specifies the ARN of your transfer's source location.
Required?True
Position?1
Accept pipeline input?True (ByValue, ByPropertyName)
Specifies the tags that you want to apply to your task.Tags are key-value pairs that help you manage, filter, and search for your DataSync resources. Starting with version 4 of the SDK this property will default to null. If no data for this property is returned from the service the property will also be null. This was changed to improve performance and allow the SDK and caller to distinguish between a property not set or a property being empty to clear out a value. To retain the previous SDK behavior set the AWSConfigs.InitializeCollections static property to true.
Required?False
Position?Named
Accept pipeline input?True (ByPropertyName)
AliasesTags
-TaskMode <TaskMode>
Specifies one of the following task modes for your data transfer:
  • ENHANCED - Transfer virtually unlimited numbers of objects with higher performance than Basic mode. Enhanced mode tasks optimize the data transfer process by listing, preparing, transferring, and verifying data in parallel. Enhanced mode is currently available for transfers between Amazon S3 locations, transfers between Azure Blob and Amazon S3 without an agent, and transfers between other clouds and Amazon S3 without an agent.To create an Enhanced mode task, the IAM role that you use to call the CreateTask operation must have the iam:CreateServiceLinkedRole permission.
  • BASIC (default) - Transfer files or objects between Amazon Web Services storage and all other supported DataSync locations. Basic mode tasks are subject to quotas on the number of files, objects, and directories in a dataset. Basic mode sequentially prepares, transfers, and verifies data, making it slower than Enhanced mode for most workloads.
For more information, see Understanding task mode differences.
Required?False
Position?Named
Accept pipeline input?True (ByPropertyName)
-TaskReportConfig_Destination_S3_BucketAccessRoleArn <String>
Specifies the Amazon Resource Name (ARN) of the IAM policy that allows DataSync to upload a task report to your S3 bucket. For more information, see Allowing DataSync to upload a task report to an Amazon S3 bucket.
Required?False
Position?Named
Accept pipeline input?True (ByPropertyName)
-TaskReportConfig_Destination_S3_S3BucketArn <String>
Specifies the ARN of the S3 bucket where DataSync uploads your report.
Required?False
Position?Named
Accept pipeline input?True (ByPropertyName)
-TaskReportConfig_ObjectVersionId <ObjectVersionIds>
Specifies whether your task report includes the new version of each object transferred into an S3 bucket. This only applies if you enable versioning on your bucket. Keep in mind that setting this to INCLUDE can increase the duration of your task execution.
Required?False
Position?Named
Accept pipeline input?True (ByPropertyName)
AliasesTaskReportConfig_ObjectVersionIds
-TaskReportConfig_OutputType <ReportOutputType>
Specifies the type of task report that you want:
  • SUMMARY_ONLY: Provides necessary details about your task, including the number of files, objects, and directories transferred and transfer duration.
  • STANDARD: Provides complete details about your task, including a full list of files, objects, and directories that were transferred, skipped, verified, and more.
Required?False
Position?Named
Accept pipeline input?True (ByPropertyName)
-TaskReportConfig_ReportLevel <ReportLevel>
Specifies whether you want your task report to include only what went wrong with your transfer or a list of what succeeded and didn't.
  • ERRORS_ONLY: A report shows what DataSync was unable to transfer, skip, verify, and delete.
  • SUCCESSES_AND_ERRORS: A report shows what DataSync was able and unable to transfer, skip, verify, and delete.
Required?False
Position?Named
Accept pipeline input?True (ByPropertyName)
-Transferred_ReportLevel <ReportLevel>
Specifies whether your task report includes errors only or successes and errors.For example, your report might mostly include only what didn't go well in your transfer (ERRORS_ONLY). At the same time, you want to verify that your task filter is working correctly. In this situation, you can get a list of what files DataSync successfully skipped and if something transferred that you didn't to transfer (SUCCESSES_AND_ERRORS).
Required?False
Position?Named
Accept pipeline input?True (ByPropertyName)
AliasesTaskReportConfig_Overrides_Transferred_ReportLevel
-Verified_ReportLevel <ReportLevel>
Specifies whether your task report includes errors only or successes and errors.For example, your report might mostly include only what didn't go well in your transfer (ERRORS_ONLY). At the same time, you want to verify that your task filter is working correctly. In this situation, you can get a list of what files DataSync successfully skipped and if something transferred that you didn't to transfer (SUCCESSES_AND_ERRORS).
Required?False
Position?Named
Accept pipeline input?True (ByPropertyName)
AliasesTaskReportConfig_Overrides_Verified_ReportLevel

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 a System.String object. The service call response (type Amazon.DataSync.Model.CreateTaskResponse) can be returned by specifying '-Select *'.

Supported Version

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