-
Notifications
You must be signed in to change notification settings - Fork 496
/
Copy pathmove-resource.yml
282 lines (281 loc) · 13.7 KB
/
move-resource.yml
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
271
272
273
274
275
276
277
278
279
280
281
282
### YamlMime:AzureCLIGroup
uid: az_resource-mover_move-resource
name: az resource-mover move-resource
extensionInformation: >-
> [!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](https://learn.microsoft.com/cli/azure/azure-cli-extensions-overview) about extensions.
summary: |-
Manage move-resource.
status: GA
sourceType: Extension
directCommands:
- uid: az_resource-mover_move-resource_add
name: az resource-mover move-resource add
summary: |-
Create a Move Resource in the move collection.
description: |-
The 'az resource-mover move-resource add' command remains same for both 'RegionToRegion' (default) and 'RegionToZone' type move collections.
status: GA
sourceType: Extension
syntax: >-
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:
- summary: |-
Add a vNet as a move-resource to the move-collection. (RegionToRegion)
syntax: "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\" }'"
- summary: |-
Add a VM as a move-resource to the move-collection. (RegionToZone)
syntax: "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\" }'"
- summary: |-
Add a VM as a move-resource to the move-collection. (RegionToRegion)
syntax: "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] }'"
optionalParameters:
- name: --depends-on-overrides
summary: |-
Gets or sets the move resource dependencies overrides. Support shorthand-syntax, json-file and yaml-file. Try "??" to show more.
- name: --existing-target-id
summary: |-
Gets or sets the existing target ARM Id of the resource.
- name: --ids
summary: |-
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.
- name: --move-collection-name
summary: |-
The Move Collection Name.
- name: --move-resource-name --name -n
summary: |-
The Move Resource Name.
- name: --no-wait
parameterValueGroup: "0, 1, f, false, n, no, t, true, y, yes"
summary: |-
Do not wait for the long-running operation to finish.
- name: --resource-group -g
summary: |-
Name of resource group. You can configure the default group using az configure --defaults group=<name>.
- name: --resource-settings
summary: |-
The resource settings. Expected value: json-string/@json-file. Support json-file and yaml-file.
- name: --source-id
summary: |-
Gets or sets the Source ARM Id of the resource.
- name: --subscription
summary: |-
Name or ID of subscription. You can configure the default subscription using `az account set -s NAME_OR_ID`.
- uid: az_resource-mover_move-resource_delete
name: az resource-mover move-resource delete
summary: |-
Delete a Move Resource from the move collection.
description: |-
The 'az resource-mover move-resource delete' command remains same for both 'RegionToRegion' and 'RegionToZone' type move collections.
status: GA
sourceType: Extension
syntax: >-
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:
- summary: |-
Delete a move-resource from the move-collection.
syntax: az resource-mover move-resource delete --move-collection-name MyMoveCollection --name MyMoveResource --resource-group MyResourceGroup
optionalParameters:
- name: --ids
summary: |-
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.
- name: --move-collection-name
summary: |-
The Move Collection Name.
- name: --move-resource-name --name -n
summary: |-
The Move Resource Name.
- name: --no-wait
parameterValueGroup: "0, 1, f, false, n, no, t, true, y, yes"
summary: |-
Do not wait for the long-running operation to finish.
- name: --resource-group -g
summary: |-
Name of resource group. You can configure the default group using az configure --defaults group=<name>.
- name: --subscription
summary: |-
Name or ID of subscription. You can configure the default subscription using `az account set -s NAME_OR_ID`.
- name: --yes -y
defaultValue: "False"
summary: |-
Do not prompt for confirmation.
- uid: az_resource-mover_move-resource_list
name: az resource-mover move-resource list
summary: |-
List the Move Resources in the move collection.
description: |-
The 'az resource-mover move-resource list' command remains same for both 'RegionToRegion' and 'RegionToZone' type move collections.
status: GA
sourceType: Extension
syntax: >-
az resource-mover move-resource list --move-collection-name
--resource-group
[--filter]
[--max-items]
[--next-token]
examples:
- summary: |-
List the move-resources in a move-collection.
syntax: az resource-mover move-resource list --move-collection-name MyMoveCollection --resource-group MyResourceGroup
requiredParameters:
- isRequired: true
name: --move-collection-name --name -n
summary: |-
The Move Collection Name.
- isRequired: true
name: --resource-group -g
summary: |-
Name of resource group. You can configure the default group using az configure --defaults group=<name>.
optionalParameters:
- name: --filter
summary: |-
The filter to apply on the operation. For example, you can use $filter=Properties/ProvisioningState eq 'Succeeded'.
- name: --max-items
summary: |-
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.
- name: --next-token
summary: |-
Token to specify where to start paginating. This is the token value from a previously truncated response.
- uid: az_resource-mover_move-resource_show
name: az resource-mover move-resource show
summary: |-
Get the Move Resource.
description: |-
The 'az resource-mover move-resource show' command remains same for both 'RegionToRegion' and 'RegionToZone' type move collections.
status: GA
sourceType: Extension
syntax: >-
az resource-mover move-resource show [--ids]
[--move-collection-name]
[--move-resource-name]
[--resource-group]
[--subscription]
examples:
- summary: |-
Get the details of a move-resource.
syntax: az resource-mover move-resource show --move-collection-name MyMoveCollection --name MyMoveResource --resource-group MyResourceGroup
optionalParameters:
- name: --ids
summary: |-
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.
- name: --move-collection-name
summary: |-
The Move Collection Name.
- name: --move-resource-name --name -n
summary: |-
The Move Resource Name.
- name: --resource-group -g
summary: |-
Name of resource group. You can configure the default group using az configure --defaults group=<name>.
- name: --subscription
summary: |-
Name or ID of subscription. You can configure the default subscription using `az account set -s NAME_OR_ID`.
- uid: az_resource-mover_move-resource_wait
name: az resource-mover move-resource wait
summary: |-
Place the CLI in a waiting state until a condition is met.
status: GA
sourceType: Extension
syntax: >-
az resource-mover move-resource wait [--created]
[--custom]
[--deleted]
[--exists]
[--ids]
[--interval]
[--move-collection-name]
[--move-resource-name]
[--resource-group]
[--subscription]
[--timeout]
[--updated]
optionalParameters:
- name: --created
defaultValue: "False"
summary: |-
Wait until created with 'provisioningState' at 'Succeeded'.
- name: --custom
summary: |-
Wait until the condition satisfies a custom JMESPath query. E.g. provisioningState!='InProgress', instanceView.statuses[?code=='PowerState/running'].
- name: --deleted
defaultValue: "False"
summary: |-
Wait until deleted.
- name: --exists
defaultValue: "False"
summary: |-
Wait until the resource exists.
- name: --ids
summary: |-
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.
- name: --interval
defaultValue: "30"
summary: |-
Polling interval in seconds.
- name: --move-collection-name
summary: |-
The Move Collection Name.
- name: --move-resource-name --name -n
summary: |-
The Move Resource Name.
- name: --resource-group -g
summary: |-
Name of resource group. You can configure the default group using az configure --defaults group=<name>.
- name: --subscription
summary: |-
Name or ID of subscription. You can configure the default subscription using `az account set -s NAME_OR_ID`.
- name: --timeout
defaultValue: "3600"
summary: |-
Maximum wait in seconds.
- name: --updated
defaultValue: "False"
summary: |-
Wait until updated with provisioningState at 'Succeeded'.
commands:
- az_resource-mover_move-resource_add
- az_resource-mover_move-resource_delete
- az_resource-mover_move-resource_list
- az_resource-mover_move-resource_show
- az_resource-mover_move-resource_wait
globalParameters:
- name: --debug
summary: |-
Increase logging verbosity to show all debug logs.
- name: --help -h
summary: |-
Show this help message and exit.
- name: --only-show-errors
summary: |-
Only show errors, suppressing warnings.
- name: --output -o
defaultValue: "json"
parameterValueGroup: "json, jsonc, none, table, tsv, yaml, yamlc"
summary: |-
Output format.
- name: --query
summary: |-
JMESPath query string. See <a href="http://jmespath.org/">http://jmespath.org/</a> for more information and examples.
- name: --subscription
summary: |-
Name or ID of subscription. You can configure the default subscription using `az account set -s NAME_OR_ID`.
- name: --verbose
summary: |-
Increase logging verbosity. Use --debug for full debug logs.
metadata:
description: Manage move-resource.