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 --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
The following parameters are optional, but depending on the context, one or more might become required for the command to execute successfully.
Gets or sets the move resource dependencies overrides. Support shorthand-syntax, json-file and yaml-file. Try "??" to show more.
Property | Value |
---|---|
Parameter group: | Properties Arguments |
Gets or sets the existing target ARM Id of the resource.
Property | Value |
---|---|
Parameter group: | Properties Arguments |
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.
Property | Value |
---|---|
Parameter group: | Resource Id Arguments |
The Move Collection Name.
Property | Value |
---|---|
Parameter group: | Resource Id Arguments |
The Move Resource Name.
Property | Value |
---|---|
Parameter group: | Resource Id Arguments |
Do not wait for the long-running operation to finish.
Property | Value |
---|---|
Accepted values: | 0, 1, f, false, n, no, t, true, y, yes |
Name of resource group. You can configure the default group using az configure --defaults group=<name>
.
Property | Value |
---|---|
Parameter group: | Resource Id Arguments |
The resource settings. Expected value: json-string/@json-file. Support shorthand-syntax, json-file and yaml-file. Try "??" to show more.
Gets or sets the Source ARM Id of the resource.
Property | Value |
---|---|
Parameter group: | Properties Arguments |
Name or ID of subscription. You can configure the default subscription using az account set -s NAME_OR_ID
.
Property | Value |
---|---|
Parameter group: | Resource Id Arguments |
Global Parameters
Increase logging verbosity to show all debug logs.
Property | Value |
---|---|
Default value: | False |
Show this help message and exit.
Only show errors, suppressing warnings.
Property | Value |
---|---|
Default value: | False |
Output format.
Property | Value |
---|---|
Default value: | json |
Accepted values: | json, jsonc, none, table, tsv, yaml, yamlc |
JMESPath query string. See http://jmespath.org/ for more information and examples.
Increase logging verbosity. Use --debug for full debug logs.
Property | Value |
---|---|
Default value: | False |
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 --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
The following parameters are optional, but depending on the context, one or more might become required for the command to execute successfully.
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.
Property | Value |
---|---|
Parameter group: | Resource Id Arguments |
The Move Collection Name.
Property | Value |
---|---|
Parameter group: | Resource Id Arguments |
The Move Resource Name.
Property | Value |
---|---|
Parameter group: | Resource Id Arguments |
Do not wait for the long-running operation to finish.
Property | Value |
---|---|
Accepted values: | 0, 1, f, false, n, no, t, true, y, yes |
Name of resource group. You can configure the default group using az configure --defaults group=<name>
.
Property | Value |
---|---|
Parameter group: | Resource Id Arguments |
Name or ID of subscription. You can configure the default subscription using az account set -s NAME_OR_ID
.
Property | Value |
---|---|
Parameter group: | Resource Id Arguments |
Do not prompt for confirmation.
Property | Value |
---|---|
Default value: | False |
Global Parameters
Increase logging verbosity to show all debug logs.
Property | Value |
---|---|
Default value: | False |
Show this help message and exit.
Only show errors, suppressing warnings.
Property | Value |
---|---|
Default value: | False |
Output format.
Property | Value |
---|---|
Default value: | json |
Accepted values: | json, jsonc, none, table, tsv, yaml, yamlc |
JMESPath query string. See http://jmespath.org/ for more information and examples.
Increase logging verbosity. Use --debug for full debug logs.
Property | Value |
---|---|
Default value: | False |
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 --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=<name>
.
Optional Parameters
The following parameters are optional, but depending on the context, one or more might become required for the command to execute successfully.
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.
Property | Value |
---|---|
Parameter group: | Pagination Arguments |
Token to specify where to start paginating. This is the token value from a previously truncated response.
Property | Value |
---|---|
Parameter group: | Pagination Arguments |
Global Parameters
Increase logging verbosity to show all debug logs.
Property | Value |
---|---|
Default value: | False |
Show this help message and exit.
Only show errors, suppressing warnings.
Property | Value |
---|---|
Default value: | False |
Output format.
Property | Value |
---|---|
Default value: | json |
Accepted values: | json, jsonc, none, table, tsv, yaml, yamlc |
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.
Property | Value |
---|---|
Default value: | False |
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 --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
The following parameters are optional, but depending on the context, one or more might become required for the command to execute successfully.
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.
Property | Value |
---|---|
Parameter group: | Resource Id Arguments |
The Move Collection Name.
Property | Value |
---|---|
Parameter group: | Resource Id Arguments |
The Move Resource Name.
Property | Value |
---|---|
Parameter group: | Resource Id Arguments |
Name of resource group. You can configure the default group using az configure --defaults group=<name>
.
Property | Value |
---|---|
Parameter group: | Resource Id Arguments |
Name or ID of subscription. You can configure the default subscription using az account set -s NAME_OR_ID
.
Property | Value |
---|---|
Parameter group: | Resource Id Arguments |
Global Parameters
Increase logging verbosity to show all debug logs.
Property | Value |
---|---|
Default value: | False |
Show this help message and exit.
Only show errors, suppressing warnings.
Property | Value |
---|---|
Default value: | False |
Output format.
Property | Value |
---|---|
Default value: | json |
Accepted values: | json, jsonc, none, table, tsv, yaml, yamlc |
JMESPath query string. See http://jmespath.org/ for more information and examples.
Increase logging verbosity. Use --debug for full debug logs.
Property | Value |
---|---|
Default value: | False |
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 --name]
[--resource-group]
[--subscription]
[--timeout]
[--updated]
Optional Parameters
The following parameters are optional, but depending on the context, one or more might become required for the command to execute successfully.
Wait until created with 'provisioningState' at 'Succeeded'.
Property | Value |
---|---|
Parameter group: | Wait Condition Arguments |
Default value: | False |
Wait until the condition satisfies a custom JMESPath query. E.g. provisioningState!='InProgress', instanceView.statuses[?code=='PowerState/running'].
Property | Value |
---|---|
Parameter group: | Wait Condition Arguments |
Wait until deleted.
Property | Value |
---|---|
Parameter group: | Wait Condition Arguments |
Default value: | False |
Wait until the resource exists.
Property | Value |
---|---|
Parameter group: | Wait Condition Arguments |
Default value: | False |
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.
Property | Value |
---|---|
Parameter group: | Resource Id Arguments |
Polling interval in seconds.
Property | Value |
---|---|
Parameter group: | Wait Condition Arguments |
Default value: | 30 |
The Move Collection Name.
Property | Value |
---|---|
Parameter group: | Resource Id Arguments |
The Move Resource Name.
Property | Value |
---|---|
Parameter group: | Resource Id Arguments |
Name of resource group. You can configure the default group using az configure --defaults group=<name>
.
Property | Value |
---|---|
Parameter group: | Resource Id Arguments |
Name or ID of subscription. You can configure the default subscription using az account set -s NAME_OR_ID
.
Property | Value |
---|---|
Parameter group: | Resource Id Arguments |
Maximum wait in seconds.
Property | Value |
---|---|
Parameter group: | Wait Condition Arguments |
Default value: | 3600 |
Wait until updated with provisioningState at 'Succeeded'.
Property | Value |
---|---|
Parameter group: | Wait Condition Arguments |
Default value: | False |
Global Parameters
Increase logging verbosity to show all debug logs.
Property | Value |
---|---|
Default value: | False |
Show this help message and exit.
Only show errors, suppressing warnings.
Property | Value |
---|---|
Default value: | False |
Output format.
Property | Value |
---|---|
Default value: | json |
Accepted values: | json, jsonc, none, table, tsv, yaml, yamlc |
JMESPath query string. See http://jmespath.org/ for more information and examples.
Increase logging verbosity. Use --debug for full debug logs.
Property | Value |
---|---|
Default value: | False |