-
Notifications
You must be signed in to change notification settings - Fork 3.9k
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Move ResourceMover to release-2021-03-02 (#14310)
Co-authored-by: Dingmeng Xue <[email protected]>
- Loading branch information
1 parent
75e94c4
commit 8e7038c
Showing
445 changed files
with
16,466 additions
and
7,881 deletions.
There are no files selected for viewing
Large diffs are not rendered by default.
Oops, something went wrong.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
138 changes: 101 additions & 37 deletions
138
src/ResourceMover/examples/Add-AzResourceMoverMoveResource.md
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,41 +1,105 @@ | ||
### Example 1: Adding a resource to the move collection. | ||
### Example 1: Add a resource to the Move Collection. | ||
```powershell | ||
PS C:\> Add-AzResourceMoverMoveResource -ResourceGroupName RG-MoveCollection-demoRM -MoveCollectionName "PS-centralus-westcentralus-demoRM" -SourceId "/subscriptions/e80eb9fa-c996-4435-aa32-5af6f3d3077c/resourceGroups/PSDemoRM/providers/Microsoft.Compute/virtualMachines/PSDemoVM" -Name PSDemoVM -ResourceSettingResourceType "Microsoft.Compute/virtualMachines" -ResourceSettingTargetResourceName PSDemoVM | ||
Output: | ||
Code : | ||
DependsOn : {} | ||
DependsOnOverride : {} | ||
Detail : | ||
ExistingTargetId : | ||
Id : /subscriptions/e80eb9fa-c996-4435-aa32-5af6f3d3077c/resourceGroups/RG-MoveCollection-demoRM/providers/Microsoft.Migr | ||
ate/MoveCollections/PS-centralus-westcentralus-demoRM/MoveResources/PSDemoVM | ||
Message : | ||
MoveStatusCode : DependencyComputationPending | ||
MoveStatusDetail : {} | ||
MoveStatusJobName : | ||
MoveStatusJobProgress : | ||
MoveStatusMessage : The dependency computation is not completed for resource - /subscriptions/e80eb9fa-c996-4435-aa32-5af6f3d3077c/resou | ||
rceGroups/PSDemoRM/providers/Microsoft.Compute/virtualMachines/PSDemoVM. | ||
Possible Causes: Dependency computation is pending for resource. | ||
Recommended Action: Validate dependencies to compute the dependencies. | ||
MoveStatusMoveState : PreparePending | ||
MoveStatusTarget : | ||
MoveStatusTargetId : | ||
Name : PSDemoVM | ||
ProvisioningState : Succeeded | ||
ResourceSettingResourceType : Microsoft.Compute/virtualMachines | ||
ResourceSettingTargetResourceName : PSDemoVM | ||
SourceId : /subscriptions/e80eb9fa-c996-4435-aa32-5af6f3d3077c/resourceGroups/PSDemoRM/providers/Microsoft.Compute/virtualMachi | ||
nes/PSDemoVM | ||
SourceResourceSettingResourceType : Microsoft.Compute/virtualMachines | ||
SourceResourceSettingTargetResourceName : PSDemoVM | ||
Target : | ||
TargetId : | ||
Type | ||
PS C:\> Add-AzResourceMoverMoveResource -ResourceGroupName "RG-MoveCollection-demoRMS" -MoveCollectionName "PS-centralus-westcentralus-demoRMS" -SourceId "/subscriptions/xxxxxxxx-xxxx-xxxx-xxxx-xxxxxxxxxxxx/resourceGroups/PSDemoRM/providers/Microsoft.Compute/virtualMachines/PSDemoVM" -Name "PSDemoVM" -ResourceSetting $targetResourceSettingsObj | ||
DependsOn : {} | ||
DependsOnOverride : {} | ||
ErrorsPropertiesCode : | ||
ErrorsPropertiesDetail : | ||
ErrorsPropertiesMessage : | ||
ErrorsPropertiesTarget : | ||
ExistingTargetId : | ||
Id : /subscriptions/xxxxxxxx-xxxx-xxxx-xxxx-xxxxxxxxxxxx/resourceGroups/RG-MoveCollection-demoRMS/providers/Microsoft.Migrate/moveCollections/PS-centralus-westcentralus-demoRMS/moveResources/PSDemoVM | ||
IsResolveRequired : False | ||
JobStatusJobName : | ||
JobStatusJobProgress : | ||
MoveStatusErrorsPropertiesCode : DependencyComputationPending | ||
MoveStatusErrorsPropertiesDetail : {} | ||
MoveStatusErrorsPropertiesMessage : The dependency computation is not completed for resource - /subscriptions/xxxxxxxx-xxxx-xxxx-xxxx-xxxxxxxxxxxx/resourceGroups/PSDemoRM/providers/Microsoft.Compute/virtualMachines/PSDemoVM. Possible Causes: Dependency computation is pending for resource. Recommended Action: Validate dependencies to compute the dependencies. | ||
MoveStatusErrorsPropertiesTarget : | ||
MoveStatusMoveState : PreparePending | ||
Name : PSDemoVM | ||
ProvisioningState : Succeeded | ||
ResourceSetting : Microsoft.Azure.PowerShell.Cmdlets.ResourceMover.Models.Api202101.VirtualMachineResourceSettings | ||
SourceId : /subscriptions/xxxxxxxx-xxxx-xxxx-xxxx-xxxxxxxxxxxx/resourceGroups/PSDemoRM/providers/Microsoft.Compute/virtualMachines/PSDemoVM | ||
SourceResourceSetting : Microsoft.Azure.PowerShell.Cmdlets.ResourceMover.Models.Api202101.VirtualMachineResourceSettings | ||
TargetId : | ||
Type : | ||
PS C:\> $targetResourceSettingsObj = New-Object Microsoft.Azure.PowerShell.Cmdlets.ResourceMover.Models.Api202101.VirtualMachineResourceSettings | ||
PS C:\> $targetResourceSettingsObj.ResourceType = "Microsoft.Compute/virtualMachines" | ||
$targetResourceSettingsObj.TargetResourceName = "PSDemoVM" | ||
``` | ||
|
||
Add a resource to the Move Collection. | ||
|
||
### Example 2: Add a resource to the Move Collection that has existing target resource. | ||
```powershell | ||
PS C:\> Add-AzResourceMoverMoveResource -ResourceGroupName "RG-MoveCollection-demoRMS" -MoveCollectionName "PS-centralus-westcentralus-demoRMS" -SourceId "/subscriptions/xxxxxxxx-xxxx-xxxx-xxxx-xxxxxxxxxxxx/resourcegroups/psdemorm" -Name "psdemorm" -ExistingTargetId "/subscriptions/xxxxxxxx-xxxx-xxxx-xxxx-xxxxxxxxxxxx/resourcegroups/PSDemoRM-target" | ||
DependsOn : {} | ||
DependsOnOverride : {} | ||
ErrorsPropertiesCode : | ||
ErrorsPropertiesDetail : | ||
ErrorsPropertiesMessage : | ||
ErrorsPropertiesTarget : | ||
ExistingTargetId : /subscriptions/xxxxxxxx-xxxx-xxxx-xxxx-xxxxxxxxxxxx/resourcegroups/PSDemoRM-target | ||
Id : /subscriptions/xxxxxxxx-xxxx-xxxx-xxxx-xxxxxxxxxxxx/resourceGroups/RG-MoveCollection-demoRMS/providers/Microsoft.Migrate/moveCollections/PS-centralus-westcentralus-demoRMS/moveResources/psdemorm | ||
IsResolveRequired : False | ||
JobStatusJobName : | ||
JobStatusJobProgress : | ||
MoveStatusErrorsPropertiesCode : | ||
MoveStatusErrorsPropertiesDetail : | ||
MoveStatusErrorsPropertiesMessage : | ||
MoveStatusErrorsPropertiesTarget : | ||
MoveStatusMoveState : CommitPending | ||
Name : psdemorm | ||
ProvisioningState : Succeeded | ||
ResourceSetting : Microsoft.Azure.PowerShell.Cmdlets.ResourceMover.Models.Api202101.ResourceSettings | ||
SourceId : /subscriptions/xxxxxxxx-xxxx-xxxx-xxxx-xxxxxxxxxxxx/resourcegroups/psdemorm | ||
SourceResourceSetting : Microsoft.Azure.PowerShell.Cmdlets.ResourceMover.Models.Api202101.ResourceSettings | ||
TargetId : | ||
Type : | ||
``` | ||
|
||
Add a resource to the Move Collection that has existing target resource. | ||
|
||
### Example 3: Update target resource settings after the Move Resource has been added. | ||
```powershell | ||
PS C:\> Update-AzResourceMoverMoveResource -ResourceGroupName "RG-MoveCollection-demoRMS" -MoveCollectionName "PS-centralus-westcentralus-demoRMS" -SourceId "/subscriptions/xxxxxxxx-xxxx-xxxx-xxxx-xxxxxxxxxxxx/resourceGroups/PSDemoRM/providers/Microsoft.Compute/virtualMachines/PSDemoVM" -Name "PSDemoVM" -ResourceSetting $TargetResourceSettingObj | ||
DependsOn : {/subscriptions/xxxxxxxx-xxxx-xxxx-xxxx-xxxxxxxxxxxx/resourceGroups/PSDemoRM/providers/Microsoft.Network/networkInterfaces/psdemov | ||
m111, /subscriptions/xxxxxxxx-xxxx-xxxx-xxxx-xxxxxxxxxxxx/resourcegroups/PSDemoRM} | ||
DependsOnOverride : {} | ||
ErrorsPropertiesCode : | ||
ErrorsPropertiesDetail : | ||
ErrorsPropertiesMessage : | ||
ErrorsPropertiesTarget : | ||
ExistingTargetId : | ||
Id : /subscriptions/xxxxxxxx-xxxx-xxxx-xxxx-xxxxxxxxxxxx/resourceGroups/RG-MoveCollection-demoRMS/providers/Microsoft.Migrate/moveCollections/PS-centralus-westcentralus-demoRMS/moveResources/PSDemoVM | ||
IsResolveRequired : True | ||
JobStatusJobName : | ||
JobStatusJobProgress : | ||
MoveStatusErrorsPropertiesCode : | ||
MoveStatusErrorsPropertiesDetail : | ||
MoveStatusErrorsPropertiesMessage : | ||
MoveStatusErrorsPropertiesTarget : | ||
MoveStatusMoveState : PreparePending | ||
Name : PSDemoVM | ||
ProvisioningState : Succeeded | ||
ResourceSetting : Microsoft.Azure.PowerShell.Cmdlets.ResourceMover.Models.Api202101.VirtualMachineResourceSettings | ||
SourceId : /subscriptions/xxxxxxxx-xxxx-xxxx-xxxx-xxxxxxxxxxxx/resourceGroups/PSDemoRM/providers/Microsoft.Compute/virtualMachines/PSDemoVM | ||
SourceResourceSetting : Microsoft.Azure.PowerShell.Cmdlets.ResourceMover.Models.Api202101.VirtualMachineResourceSettings | ||
TargetId : | ||
Type : | ||
PS C:\> $moveResourceObj = Get-AzResourceMoverMoveResource -MoveCollectionName "PS-centralus-westcentralus-demoRMS1" -ResourceGroupName "RG-MoveCollection-demoRMS" -Name "PSDemoVM" | ||
PS C:\> $TargetResourceSettingObj = $moveResourceObj.ResourceSetting | ||
$TargetResourceSettingObj.TargetResourceName="PSDemoVM-target" | ||
``` | ||
|
||
Adding a resource to the move collection within the specified subscription. | ||
Update target resource settings after the Move Resource has been added. |
Oops, something went wrong.