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>
-S3_Subdirectory <String>
-Tag <TagListEntry[]>
-Select <String>
-PassThru <SwitchParameter>
-Force <SwitchParameter>
-ClientConfig <AmazonDataSyncConfig>

Description

Configures a transfer task, which defines where and how DataSync moves your data. A task includes a source location, destination location, and the options for how and when you want to transfer your data (such as bandwidth limits, scheduling, among other options). 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>
The Amazon Resource Name (ARN) of the Amazon CloudWatch log group that is used to monitor and log events in the task.
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>
The Amazon Resource Name (ARN) of an Amazon Web Services storage resource's location.
Required?True
Position?Named
Accept pipeline input?True (ByPropertyName)
-Exclude <FilterRule[]>
Specifies a list of filter rules that exclude specific data during your transfer. For more information and examples, see Filtering data transferred by DataSync.
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 a list of filter rules that include specific data during your transfer. For more information and examples, see Filtering data transferred by DataSync.
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>
The name of a task. This value is a text reference that is used to identify the task in the console.
Required?False
Position?Named
Accept pipeline input?True (ByPropertyName)
-Option <Options>
Specifies the configuration options for a task. Some options include preserving file or object metadata and verifying data integrity.You can also override these options before starting an individual run of a task (also known as a task execution). For more information, see StartTaskExecution.
Required?False
Position?Named
Accept pipeline input?True (ByPropertyName)
AliasesOptions
-PassThru <SwitchParameter>
Changes the cmdlet behavior to return the value passed to the SourceLocationArn parameter. The -PassThru parameter is deprecated, use -Select '^SourceLocationArn' instead. This parameter will be removed in a future version.
Required?False
Position?Named
Accept pipeline input?True (ByPropertyName)
-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>
A cron expression that specifies when DataSync initiates a scheduled transfer from a source to a destination location.
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>
The Amazon Resource Name (ARN) of the source location for the task.
Required?True
Position?1
Accept pipeline input?True (ByValue, ByPropertyName)
Specifies the tags that you want to apply to the Amazon Resource Name (ARN) representing the task.Tags are key-value pairs that help you manage, filter, and search for your DataSync resources.
Required?False
Position?Named
Accept pipeline input?True (ByPropertyName)
AliasesTags
-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 also be referenced from properties attached to the cmdlet entry in the $AWSHistory stack.

Supported Version

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