az resource-mover move-resource
Note
This reference is part of the resource-mover extension for the Azure CLI (version 2.50.0 or higher). The extension will automatically install the first time you run an az resource-mover move-resource command. Learn more about extensions.
Manage move-resource.
Commands
Name | Description | Type | Status |
---|---|---|---|
az resource-mover move-resource add |
Create a Move Resource in the move collection. |
Extension | GA |
az resource-mover move-resource delete |
Delete a Move Resource from the move collection. |
Extension | GA |
az resource-mover move-resource list |
List the Move Resources in the move collection. |
Extension | GA |
az resource-mover move-resource show |
Get the Move Resource. |
Extension | GA |
az resource-mover move-resource wait |
Place the CLI in a waiting state until a condition is met. |
Extension | GA |
az resource-mover move-resource add
Create a Move Resource in the move collection.
The 'az resource-mover move-resource add' command remains same for both 'RegionToRegion' (default) and 'RegionToZone' type move collections.
az resource-mover move-resource add [--depends-on-overrides]
[--existing-target-id]
[--ids]
[--move-collection-name]
[--move-resource-name]
[--no-wait {0, 1, f, false, n, no, t, true, y, yes}]
[--resource-group]
[--resource-settings]
[--source-id]
[--subscription]
Examples
Add a vNet as a move-resource to the move-collection. (RegionToRegion)
az resource-mover move-resource add --resource-group MyResourceGroup --move-collection-name MyMoveCollection --name MoveResourceName --source-id "/subscriptions/subID/resourceGroups/myRG/providers/Microsoft.Network/virtualNetworks/MyVNet" --resource-settings '{ "resourceType": "Microsoft.Network/virtualNetworks", "targetResourceName": "MyVNet-target" }'
Add a VM as a move-resource to the move-collection. (RegionToZone)
az resource-mover move-resource add --resource-group MyResourceGroup --move-collection-name MyZonalMoveCollection --name MyVMMoveResource --source-id "/subscriptions/subID/resourceGroups/MyResourceGroup/providers/Microsoft.Compute/virtualMachines/MyVM" --resource-settings '{ "resourceType": "Microsoft.Compute/virtualMachines", "targetResourceName": "MyVM", "targetAvailabilityZone": "2", "targetVmSize": "Standard_B2s" }'
Add a VM as a move-resource to the move-collection. (RegionToRegion)
az resource-mover move-resource add --resource-group MyResourceGroup --move-collection-name MyMoveCollection --name MoveResourceName --source-id "/subscriptions/subID/resourceGroups/eastusRG/providers/Microsoft.Compute/virtualMachines/MyVM" --depends-on-overrides id="/subscriptions/subID/resourceGroups/eastusRG/providers/Microsoft.Network/networkInterfaces/MyNIC" target-id="/subscriptions/subID/resourceGroups/westusRG/providers/Microsoft.Network/networkInterfaces/MyNIC" --resource-settings '{ "resourceType": "Microsoft.Compute/virtualMachines", "targetAvailabilitySetId": "/subscriptions/subID/resourceGroups/eastusRG/providers/Microsoft.Compute/availabilitySets/MyAVSet", "targetAvailabilityZone": "2", "targetResourceName": "MyVM-target", "targetVmSize": null, "userManagedIdentities": [/subscriptions/subid/resourceGroups/eastusRG/providers/Microsoft.ManagedIdentity/userAssignedIdentities/umi1] }'
Optional Parameters
Gets or sets the move resource dependencies overrides. Support shorthand-syntax, json-file and yaml-file. Try "??" to show more.
Gets or sets the existing target ARM Id of the resource.
One or more resource IDs (space-delimited). It should be a complete resource ID containing all information of 'Resource Id' arguments. You should provide either --ids or other 'Resource Id' arguments.
The Move Collection Name.
The Move Resource Name.
Do not wait for the long-running operation to finish.
Name of resource group. You can configure the default group using az configure --defaults group=.
The resource settings. Expected value: json-string/@json-file. Support json-file and yaml-file.
Gets or sets the Source ARM Id of the resource.
Name or ID of subscription. You can configure the default subscription using az account set -s NAME_OR_ID
.
Global Parameters
Increase logging verbosity to show all debug logs.
Show this help message and exit.
Only show errors, suppressing warnings.
Output format.
JMESPath query string. See http://jmespath.org/ for more information and examples.
Name or ID of subscription. You can configure the default subscription using az account set -s NAME_OR_ID
.
Increase logging verbosity. Use --debug for full debug logs.
az resource-mover move-resource delete
Delete a Move Resource from the move collection.
The 'az resource-mover move-resource delete' command remains same for both 'RegionToRegion' and 'RegionToZone' type move collections.
az resource-mover move-resource delete [--ids]
[--move-collection-name]
[--move-resource-name]
[--no-wait {0, 1, f, false, n, no, t, true, y, yes}]
[--resource-group]
[--subscription]
[--yes]
Examples
Delete a move-resource from the move-collection.
az resource-mover move-resource delete --move-collection-name MyMoveCollection --name MyMoveResource --resource-group MyResourceGroup
Optional Parameters
One or more resource IDs (space-delimited). It should be a complete resource ID containing all information of 'Resource Id' arguments. You should provide either --ids or other 'Resource Id' arguments.
The Move Collection Name.
The Move Resource Name.
Do not wait for the long-running operation to finish.
Name of resource group. You can configure the default group using az configure --defaults group=.
Name or ID of subscription. You can configure the default subscription using az account set -s NAME_OR_ID
.
Do not prompt for confirmation.
Global Parameters
Increase logging verbosity to show all debug logs.
Show this help message and exit.
Only show errors, suppressing warnings.
Output format.
JMESPath query string. See http://jmespath.org/ for more information and examples.
Name or ID of subscription. You can configure the default subscription using az account set -s NAME_OR_ID
.
Increase logging verbosity. Use --debug for full debug logs.
az resource-mover move-resource list
List the Move Resources in the move collection.
The 'az resource-mover move-resource list' command remains same for both 'RegionToRegion' and 'RegionToZone' type move collections.
az resource-mover move-resource list --move-collection-name
--resource-group
[--filter]
[--max-items]
[--next-token]
Examples
List the move-resources in a move-collection.
az resource-mover move-resource list --move-collection-name MyMoveCollection --resource-group MyResourceGroup
Required Parameters
The Move Collection Name.
Name of resource group. You can configure the default group using az configure --defaults group=.
Optional Parameters
The filter to apply on the operation. For example, you can use $filter=Properties/ProvisioningState eq 'Succeeded'.
Total number of items to return in the command's output. If the total number of items available is more than the value specified, a token is provided in the command's output. To resume pagination, provide the token value in --next-token
argument of a subsequent command.
Token to specify where to start paginating. This is the token value from a previously truncated response.
Global Parameters
Increase logging verbosity to show all debug logs.
Show this help message and exit.
Only show errors, suppressing warnings.
Output format.
JMESPath query string. See http://jmespath.org/ for more information and examples.
Name or ID of subscription. You can configure the default subscription using az account set -s NAME_OR_ID
.
Increase logging verbosity. Use --debug for full debug logs.
az resource-mover move-resource show
Get the Move Resource.
The 'az resource-mover move-resource show' command remains same for both 'RegionToRegion' and 'RegionToZone' type move collections.
az resource-mover move-resource show [--ids]
[--move-collection-name]
[--move-resource-name]
[--resource-group]
[--subscription]
Examples
Get the details of a move-resource.
az resource-mover move-resource show --move-collection-name MyMoveCollection --name MyMoveResource --resource-group MyResourceGroup
Optional Parameters
One or more resource IDs (space-delimited). It should be a complete resource ID containing all information of 'Resource Id' arguments. You should provide either --ids or other 'Resource Id' arguments.
The Move Collection Name.
The Move Resource Name.
Name of resource group. You can configure the default group using az configure --defaults group=.
Name or ID of subscription. You can configure the default subscription using az account set -s NAME_OR_ID
.
Global Parameters
Increase logging verbosity to show all debug logs.
Show this help message and exit.
Only show errors, suppressing warnings.
Output format.
JMESPath query string. See http://jmespath.org/ for more information and examples.
Name or ID of subscription. You can configure the default subscription using az account set -s NAME_OR_ID
.
Increase logging verbosity. Use --debug for full debug logs.
az resource-mover move-resource wait
Place the CLI in a waiting state until a condition is met.
az resource-mover move-resource wait [--created]
[--custom]
[--deleted]
[--exists]
[--ids]
[--interval]
[--move-collection-name]
[--move-resource-name]
[--resource-group]
[--subscription]
[--timeout]
[--updated]
Optional Parameters
Wait until created with 'provisioningState' at 'Succeeded'.
Wait until the condition satisfies a custom JMESPath query. E.g. provisioningState!='InProgress', instanceView.statuses[?code=='PowerState/running'].
Wait until deleted.
Wait until the resource exists.
One or more resource IDs (space-delimited). It should be a complete resource ID containing all information of 'Resource Id' arguments. You should provide either --ids or other 'Resource Id' arguments.
Polling interval in seconds.
The Move Collection Name.
The Move Resource Name.
Name of resource group. You can configure the default group using az configure --defaults group=.
Name or ID of subscription. You can configure the default subscription using az account set -s NAME_OR_ID
.
Maximum wait in seconds.
Wait until updated with provisioningState at 'Succeeded'.
Global Parameters
Increase logging verbosity to show all debug logs.
Show this help message and exit.
Only show errors, suppressing warnings.
Output format.
JMESPath query string. See http://jmespath.org/ for more information and examples.
Name or ID of subscription. You can configure the default subscription using az account set -s NAME_OR_ID
.
Increase logging verbosity. Use --debug for full debug logs.