你当前正在访问 Microsoft Azure Global Edition 技术文档网站。 如果需要访问由世纪互联运营的 Microsoft Azure 中国技术文档网站,请访问 https://docs.azure.cn

New-AzStorageMoverJobDefinition

创建或更新作业定义资源,其中包含单个托管数据传输单元的配置。

语法

New-AzStorageMoverJobDefinition
   -Name <String>
   -ProjectName <String>
   -ResourceGroupName <String>
   -StorageMoverName <String>
   [-SubscriptionId <String>]
   -CopyMode <CopyMode>
   -SourceName <String>
   -TargetName <String>
   [-AgentName <String>]
   [-Description <String>]
   [-SourceSubpath <String>]
   [-TargetSubpath <String>]
   [-DefaultProfile <PSObject>]
   [-WhatIf]
   [-Confirm]
   [<CommonParameters>]
New-AzStorageMoverJobDefinition
   -Name <String>
   -ProjectName <String>
   -ResourceGroupName <String>
   -StorageMoverName <String>
   [-SubscriptionId <String>]
   -JobDefinition <IJobDefinition>
   [-DefaultProfile <PSObject>]
   [-WhatIf]
   [-Confirm]
   [<CommonParameters>]

说明

创建或更新作业定义资源,其中包含单个托管数据传输单元的配置。

示例

示例 1:创建作业定义

New-AzStorageMoverJobDefinition -Name myJob -ProjectName myProject -ResourceGroupName myResourceGroup -StorageMoverName myStorageMover -AgentName myAgent -SourceName myNfsEndpoint -TargetName myContainerEndpoint -CopyMode "Additive" -Description "job definition"

AgentName                    : myAgent
AgentResourceId              :
CopyMode                     : Additive
Description                  : job definition
Id                           : /subscriptions/xxxxxxxx-xxxx-xxxx-xxxx-xxxxxxxxxxxx/resourceGroups/myResourceGroup/providers/Microsoft.StorageMover/storageM
                               overs/myStorageMover/projects/myProject/jobDefinitions/myJob
LatestJobRunName             :
LatestJobRunResourceId       :
LatestJobRunStatus           :
Name                         : myJob
ProvisioningState            : Succeeded
SourceName                   : myNfsEndpoint
SourceResourceId             :
SourceSubpath                :
SystemDataCreatedAt          : 7/26/2022 6:14:43 AM
SystemDataCreatedBy          : xxxxxxxxxxxxxxxxxxxx
SystemDataCreatedByType      : User
SystemDataLastModifiedAt     : 7/26/2022 6:14:43 AM
SystemDataLastModifiedBy     : xxxxxxxxxxxxxxxxxxxx
SystemDataLastModifiedByType : User
TargetName                   : myContainerEndpoint
TargetResourceId             :
TargetSubpath                :
Type                         : microsoft.storagemover/storagemovers/projects/jobdefinitions

此命令创建作业定义。

参数

-AgentName

要为此作业定义的新作业运行分配的代理的名称。

类型:String
Position:Named
默认值:None
必需:False
接受管道输入:False
接受通配符:False

-Confirm

提示你在运行 cmdlet 之前进行确认。

类型:SwitchParameter
别名:cf
Position:Named
默认值:None
必需:False
接受管道输入:False
接受通配符:False

-CopyMode

用于复制的策略。

类型:CopyMode
Position:Named
默认值:None
必需:True
接受管道输入:False
接受通配符:False

-DefaultProfile

DefaultProfile 参数不起作用。 如果对其他订阅执行 cmdlet,请使用 SubscriptionId 参数。

类型:PSObject
别名:AzureRMContext, AzureCredential
Position:Named
默认值:None
必需:False
接受管道输入:False
接受通配符:False

-Description

作业定义的说明。

类型:String
Position:Named
默认值:None
必需:False
接受管道输入:False
接受通配符:False

-JobDefinition

作业定义资源。 若要构造,请参阅 JOBDEFINITION 属性的 NOTES 部分并创建哈希表。

类型:IJobDefinition
Position:Named
默认值:None
必需:True
接受管道输入:True
接受通配符:False

-Name

作业定义资源的名称。

类型:String
别名:JobDefinitionName
Position:Named
默认值:None
必需:True
接受管道输入:False
接受通配符:False

-ProjectName

Project 资源的名称。

类型:String
Position:Named
默认值:None
必需:True
接受管道输入:False
接受通配符:False

-ResourceGroupName

资源组的名称。 此名称不区分大小写。

类型:String
Position:Named
默认值:None
必需:True
接受管道输入:False
接受通配符:False

-SourceName

源终结点的名称。

类型:String
Position:Named
默认值:None
必需:True
接受管道输入:False
接受通配符:False

-SourceSubpath

从源终结点读取时要使用的子路径。

类型:String
Position:Named
默认值:None
必需:False
接受管道输入:False
接受通配符:False

-StorageMoverName

存储移动器资源的名称。

类型:String
Position:Named
默认值:None
必需:True
接受管道输入:False
接受通配符:False

-SubscriptionId

目标订阅的 ID。

类型:String
Position:Named
默认值:(Get-AzContext).Subscription.Id
必需:False
接受管道输入:False
接受通配符:False

-TargetName

目标终结点的名称。

类型:String
Position:Named
默认值:None
必需:True
接受管道输入:False
接受通配符:False

-TargetSubpath

写入目标终结点时要使用的子路径。

类型:String
Position:Named
默认值:None
必需:False
接受管道输入:False
接受通配符:False

-WhatIf

显示运行该 cmdlet 时会发生什么情况。 cmdlet 未运行。

类型:SwitchParameter
别名:wi
Position:Named
默认值:None
必需:False
接受管道输入:False
接受通配符:False

输入

IJobDefinition

输出

IJobDefinition