Skip to content

Commit 8d29ef3

Browse files
svishnusivasaiS Vishnu Sanagapalli
andauthored
Powershell Migrate changes for Capacity Reservation (#28754)
Co-authored-by: S Vishnu Sanagapalli <ssanagapalli@microsoft.com>
1 parent 36fe8e3 commit 8d29ef3

File tree

90 files changed

+554
-403
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

90 files changed

+554
-403
lines changed

src/Migrate/Migrate.Autorest/Properties/AssemblyInfo.cs

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -20,7 +20,7 @@
2020
[assembly: System.Reflection.AssemblyCopyrightAttribute("Copyright © Microsoft")]
2121
[assembly: System.Reflection.AssemblyProductAttribute("Microsoft Azure PowerShell")]
2222
[assembly: System.Reflection.AssemblyTitleAttribute("Microsoft Azure PowerShell - Migrate")]
23-
[assembly: System.Reflection.AssemblyFileVersionAttribute("2.9.0")]
24-
[assembly: System.Reflection.AssemblyVersionAttribute("2.9.0")]
23+
[assembly: System.Reflection.AssemblyFileVersionAttribute("2.10.1")]
24+
[assembly: System.Reflection.AssemblyVersionAttribute("2.10.1")]
2525
[assembly: System.Runtime.InteropServices.ComVisibleAttribute(false)]
2626
[assembly: System.CLSCompliantAttribute(false)]

src/Migrate/Migrate.Autorest/README.md

Lines changed: 62 additions & 52 deletions
Original file line numberDiff line numberDiff line change
@@ -45,16 +45,16 @@ In this directory, run AutoRest:
4545
4646
``` yaml
4747
skip-semantics-validation: true
48-
commit: 473d98be4cc2fb14db8bddbba8d3184d0aa49636
48+
commit: ca9d05ed67fe556197b01fe795e80e4e2dc41e86
4949
require:
5050
- $(this-folder)/../../readme.azure.noprofile.md
5151
input-file:
5252
- $(repo)/specification/migrate/resource-manager/Microsoft.OffAzure/stable/2020-01-01/migrate.json
5353
- $(repo)/specification/migrateprojects/resource-manager/Microsoft.Migrate/preview/2018-09-01-preview/migrate.json
54-
- $(repo)/specification/recoveryservicessiterecovery/resource-manager/Microsoft.RecoveryServices/stable/2024-01-01/service.json
55-
- $(repo)/specification/recoveryservicesdatareplication/resource-manager/Microsoft.DataReplication/stable/2024-09-01/recoveryservicesdatareplication.json
54+
- $(repo)/specification/recoveryservicessiterecovery/resource-manager/Microsoft.RecoveryServices/SiteRecovery/stable/2025-08-01/service.json
55+
- $(repo)/specification/recoveryservicesdatareplication/resource-manager/Microsoft.DataReplication/DataReplication/stable/2024-09-01/recoveryservicesdatareplication.json
5656

57-
module-version: 3.0.13
57+
module-version: 3.0.14
5858
title: Migrate
5959
subject-prefix: 'Migrate'
6060

@@ -127,55 +127,55 @@ directive:
127127
- FabricAgentModelCustomProperties
128128
- VaultModelProperties
129129
# Remove variants not in scope
130-
- from: Microsoft.RecoveryServices/stable/2024-01-01/service.json
130+
- from: Microsoft.RecoveryServices/SiteRecovery/stable/2025-08-01/service.json
131131
where:
132132
verb: Test$
133133
subject: ^ReplicationMigrationItemMigrate
134134
variant: ^TestViaIdentity$|^TestViaIdentityExpanded$|^Test$
135135
remove: true
136-
- from: Microsoft.RecoveryServices/stable/2024-01-01/service.json
136+
- from: Microsoft.RecoveryServices/SiteRecovery/stable/2025-08-01/service.json
137137
where:
138138
verb: Get$
139139
subject: ReplicationFabric$|ReplicationPolicy$|ReplicationProtectionContainer$|ReplicationMigrationItem$|ReplicationJob$|ReplicationProtectionContainerMapping$|ReplicationRecoveryServicesProvider$
140140
variant: ^GetViaIdentity$
141141
remove: true
142-
- from: Microsoft.RecoveryServices/stable/2024-01-01/service.json
142+
- from: Microsoft.RecoveryServices/SiteRecovery/stable/2025-08-01/service.json
143143
where:
144144
verb: Remove$
145145
subject: ^ReplicationMigrationItem
146146
variant: ^DeleteViaIdentity$
147147
remove: true
148-
- from: Microsoft.RecoveryServices/stable/2024-01-01/service.json
148+
- from: Microsoft.RecoveryServices/SiteRecovery/stable/2025-08-01/service.json
149149
where:
150150
verb: Move$
151151
subject: ^ReplicationMigrationItem
152152
variant: ^MigrateViaIdentityExpanded$|^Migrate$|^MigrateViaIdentity$
153153
remove: true
154-
- from: Microsoft.RecoveryServices/stable/2024-01-01/service.json
154+
- from: Microsoft.RecoveryServices/SiteRecovery/stable/2025-08-01/service.json
155155
where:
156156
verb: Suspend$
157157
subject: ^ReplicationMigrationItemReplication
158158
variant: ^PauseViaIdentityExpanded$|^Pause$|^PauseViaIdentity$
159159
remove: true
160-
- from: Microsoft.RecoveryServices/stable/2024-01-01/service.json
160+
- from: Microsoft.RecoveryServices/SiteRecovery/stable/2025-08-01/service.json
161161
where:
162162
verb: Resume$
163163
subject: ^ReplicationMigrationItemReplication
164164
variant: ^ResumeViaIdentityExpanded$|^Resume$|^ResumeViaIdentity$
165165
remove: true
166-
- from: Microsoft.RecoveryServices/stable/2024-01-01/service.json
166+
- from: Microsoft.RecoveryServices/SiteRecovery/stable/2025-08-01/service.json
167167
where:
168168
verb: Invoke$
169169
subject: ^ResyncReplicationMigrationItem
170170
variant: ^ResyncViaIdentityExpanded$|^ResyncViaIdentity$|^Resync$
171171
remove: true
172-
- from: Microsoft.RecoveryServices/stable/2024-01-01/service.json
172+
- from: Microsoft.RecoveryServices/SiteRecovery/stable/2025-08-01/service.json
173173
where:
174174
verb: New$
175175
subject: ^ReplicationMigrationItem|ReplicationProtectionContainerMapping$|ReplicationPolicy$
176176
variant: ^CreateViaIdentity$|^CreateViaIdentityExpanded$|^Create$
177177
remove: true
178-
- from: Microsoft.RecoveryServices/stable/2024-01-01/service.json
178+
- from: Microsoft.RecoveryServices/SiteRecovery/stable/2025-08-01/service.json
179179
where:
180180
verb: Update$
181181
subject: ^ReplicationMigrationItem
@@ -273,53 +273,63 @@ directive:
273273
verb: Update$
274274
subject: Project$
275275
remove: true
276-
- from: Microsoft.RecoveryServices/stable/2024-01-01/service.json
276+
- from: Microsoft.RecoveryServices/SiteRecovery/stable/2025-08-01/service.json
277277
where:
278278
subject: ^ReplicationRecoveryPlan|ReplicationRecoveryServiceProvider$|ReplicationEvent$|ReplicationAlertSetting$|ReplicationLogicalNetwork$|^ReplicationProtectedItem|^ReplicationNetwork|^ReplicationStorage|RecoveryPoint$|ProtectableItem$|FabricGateway$|FabricToAad$|ReplicationvCenter$
279279
remove: true
280-
- from: Microsoft.RecoveryServices/stable/2024-01-01/service.json
280+
- from: Microsoft.RecoveryServices/SiteRecovery/stable/2025-08-01/service.json
281281
where:
282282
verb: Export$|Find$|Switch$|Clear$
283283
remove: true
284-
- from: Microsoft.RecoveryServices/stable/2024-01-01/service.json
284+
- from: Microsoft.RecoveryServices/SiteRecovery/stable/2025-08-01/service.json
285285
where:
286286
subject: ^Commit|^Renew|^Reprotect|^Unplanned|VaultHealth$|ComputeSize$|FabricConsistency$
287287
remove: true
288-
- from: Microsoft.RecoveryServices/stable/2024-01-01/service.json
288+
- from: Microsoft.RecoveryServices/SiteRecovery/stable/2025-08-01/service.json
289289
where:
290290
verb: New$|Remove$
291-
subject: Fabric$|ProtectionContainer$|ReplicationRecoveryServicesProvider$
291+
subject: Fabric$|ProtectionContainer$|ReplicationRecoveryServicesProvider$|ReplicationProtectionCluster$
292292
remove: true
293-
- from: Microsoft.RecoveryServices/stable/2024-01-01/service.json
293+
- from: Microsoft.RecoveryServices/SiteRecovery/stable/2025-08-01/service.json
294294
where:
295295
verb: Remove$
296296
subject: ReplicationPolicy$|ReplicationProtectionContainerMapping$|ReplicationFabricInfra$
297297
remove: true
298-
- from: Microsoft.RecoveryServices/stable/2024-01-01/service.json
298+
- from: Microsoft.RecoveryServices/SiteRecovery/stable/2025-08-01/service.json
299299
where:
300300
verb: Update$
301301
subject: Fabric$|Policy$|ProtectionContainer$|ReplicationProtectionContainerMapping$
302302
remove: true
303-
- from: Microsoft.RecoveryServices/stable/2024-01-01/service.json
303+
- from: Microsoft.RecoveryServices/SiteRecovery/stable/2025-08-01/service.json
304304
where:
305305
verb: Stop$|Resume$|Restart$
306306
subject: Job$
307307
remove: true
308-
- from: Microsoft.RecoveryServices/stable/2024-01-01/service.json
308+
- from: Microsoft.RecoveryServices/SiteRecovery/stable/2025-08-01/service.json
309309
where:
310310
verb: Get
311311
subject: ^ReplicationAppliance|^ReplicationEligibilityResult|^ReplicationProtectionIntent
312312
remove: true
313-
- from: Microsoft.RecoveryServices/stable/2024-01-01/service.json
313+
- from: Microsoft.RecoveryServices/SiteRecovery/stable/2025-08-01/service.json
314314
where:
315315
verb: Get
316316
subject: ^ReplicationVaultSetting|^SupportedOperatingSystem|^ReplicationProtectionIntent
317317
remove: true
318-
- from: Microsoft.RecoveryServices/stable/2024-01-01/service.json
318+
- from: Microsoft.RecoveryServices/SiteRecovery/stable/2025-08-01/service.json
319319
where:
320320
verb: New
321321
subject: ^ReplicationVaultSetting|^SupportedOperatingSystem|^ReplicationProtectionIntent
322322
remove: true
323+
- from: Microsoft.RecoveryServices/SiteRecovery/stable/2025-08-01/service.json
324+
where:
325+
verb: Test$
326+
subject: ReplicationProtectionClusterFailover$|ReplicationProtectionClusterFailoverCleanup$
327+
remove: true
328+
- from: Microsoft.RecoveryServices/SiteRecovery/stable/2025-08-01/service.json
329+
where:
330+
verb: Repair
331+
subject: ReplicationProtectionClusterReplication$
332+
remove: true
323333
- from: Microsoft.OffAzure/stable/2020-01-01/migrate.json
324334
where:
325335
verb: Get
@@ -335,57 +345,57 @@ directive:
335345
verb: New|Remove|Update
336346
subject: ^HyperV
337347
remove: true
338-
- from: Microsoft.DataReplication/stable/2024-09-01/recoveryservicesdatareplication.json
348+
- from: Microsoft.DataReplication/DataReplication/stable/2024-09-01/recoveryservicesdatareplication.json
339349
where:
340350
verb: Test|Invoke
341351
subject: NameAvailability$|DeploymentPreflight
342352
remove: true
343-
- from: Microsoft.DataReplication/stable/2024-09-01/recoveryservicesdatareplication.json
353+
- from: Microsoft.DataReplication/DataReplication/stable/2024-09-01/recoveryservicesdatareplication.json
344354
where:
345355
verb: Get|New
346356
subject: ^EmailConfiguration
347357
remove: true
348-
- from: Microsoft.DataReplication/stable/2024-09-01/recoveryservicesdatareplication.json
358+
- from: Microsoft.DataReplication/DataReplication/stable/2024-09-01/recoveryservicesdatareplication.json
349359
where:
350360
verb: Get
351361
subject: ^(FabricAgent|ProtectedItem|Vault|Job)OperationStatus$
352362
remove: true
353-
- from: Microsoft.DataReplication/stable/2024-09-01/recoveryservicesdatareplication.json
363+
- from: Microsoft.DataReplication/DataReplication/stable/2024-09-01/recoveryservicesdatareplication.json
354364
where:
355365
verb: Get
356366
subject: ^FabricOperationsStatus$
357367
remove: true
358-
- from: Microsoft.DataReplication/stable/2024-09-01/recoveryservicesdatareplication.json
368+
- from: Microsoft.DataReplication/DataReplication/stable/2024-09-01/recoveryservicesdatareplication.json
359369
where:
360370
verb: New
361371
subject: ^(FabricAgent|Vault)
362372
remove: true
363-
- from: Microsoft.DataReplication/stable/2024-09-01/recoveryservicesdatareplication.json
373+
- from: Microsoft.DataReplication/DataReplication/stable/2024-09-01/recoveryservicesdatareplication.json
364374
where:
365375
verb: Update
366376
subject: ^Vault
367377
remove: true
368-
- from: Microsoft.DataReplication/stable/2024-09-01/recoveryservicesdatareplication.json
378+
- from: Microsoft.DataReplication/DataReplication/stable/2024-09-01/recoveryservicesdatareplication.json
369379
where:
370380
subject: PrivateEndpointConnection|PrivateLinkResource
371381
remove: true
372-
- from: Microsoft.DataReplication/stable/2024-09-01/recoveryservicesdatareplication.json
382+
- from: Microsoft.DataReplication/DataReplication/stable/2024-09-01/recoveryservicesdatareplication.json
373383
where:
374384
subject: OperationResult
375385
remove: true
376-
- from: Microsoft.RecoveryServices/stable/2024-01-01/service.json
386+
- from: Microsoft.RecoveryServices/SiteRecovery/stable/2025-08-01/service.json
377387
where:
378388
verb: Invoke
379389
subject: ^PlannedReplication
380390
remove: true
381391
# Rename cmdlets for Azure Local
382-
- from: Microsoft.DataReplication/stable/2024-09-01/recoveryservicesdatareplication.json
392+
- from: Microsoft.DataReplication/DataReplication/stable/2024-09-01/recoveryservicesdatareplication.json
383393
where:
384394
verb: Get
385395
subject: ^Fabric$
386396
set:
387397
subject: LocalReplicationFabric
388-
- from: Microsoft.DataReplication/stable/2024-09-01/recoveryservicesdatareplication.json
398+
- from: Microsoft.DataReplication/DataReplication/stable/2024-09-01/recoveryservicesdatareplication.json
389399
where:
390400
verb: Get
391401
subject: ^Job$
@@ -397,57 +407,57 @@ directive:
397407
verb: Set$
398408
subject: ^Solution
399409
hide: true
400-
- from: Microsoft.RecoveryServices/stable/2024-01-01/service.json
410+
- from: Microsoft.RecoveryServices/SiteRecovery/stable/2025-08-01/service.json
401411
where:
402412
verb: Get$
403413
subject: ToAzureMigrate$
404414
hide: true
405-
- from: Microsoft.RecoveryServices/stable/2024-01-01/service.json
415+
- from: Microsoft.RecoveryServices/SiteRecovery/stable/2025-08-01/service.json
406416
where:
407417
verb: Get$
408-
subject: ReplicationMigrationItem$|ReplicationJob$
418+
subject: ReplicationMigrationItem$|ReplicationJob$|ReplicationProtectionCluster$|ReplicationProtectionClusterOperationResult$|LocationBasedOperationResult$
409419
hide: true
410-
- from: Microsoft.RecoveryServices/stable/2024-01-01/service.json
420+
- from: Microsoft.RecoveryServices/SiteRecovery/stable/2025-08-01/service.json
411421
where:
412422
verb: Test$
413423
subject: ^ReplicationMigrationItemMigrate
414424
hide: true
415-
- from: Microsoft.RecoveryServices/stable/2024-01-01/service.json
425+
- from: Microsoft.RecoveryServices/SiteRecovery/stable/2025-08-01/service.json
416426
where:
417427
verb: New$|Remove$
418428
subject: ^ReplicationMigrationItem
419429
hide: true
420-
- from: Microsoft.RecoveryServices/stable/2024-01-01/service.json
430+
- from: Microsoft.RecoveryServices/SiteRecovery/stable/2025-08-01/service.json
421431
where:
422432
verb: Move$
423433
subject: ^ReplicationMigrationItem
424434
hide: true
425-
- from: Microsoft.RecoveryServices/stable/2024-01-01/service.json
435+
- from: Microsoft.RecoveryServices/SiteRecovery/stable/2025-08-01/service.json
426436
where:
427437
verb: Restart$
428438
subject: ^ReplicationJob
429439
hide: true
430-
- from: Microsoft.RecoveryServices/stable/2024-01-01/service.json
440+
- from: Microsoft.RecoveryServices/SiteRecovery/stable/2025-08-01/service.json
431441
where:
432442
verb: Invoke$
433-
subject: ^ResyncReplicationMigrationItem
443+
subject: ^ResyncReplicationMigrationItem|ReinstallReplicationProtectedItemMobilityService$
434444
hide: true
435-
- from: Microsoft.RecoveryServices/stable/2024-01-01/service.json
445+
- from: Microsoft.RecoveryServices/SiteRecovery/stable/2025-08-01/service.json
436446
where:
437447
verb: Update$
438448
subject: ^ReplicationMigrationItem
439449
hide: true
440-
- from: Microsoft.RecoveryServices/stable/2024-01-01/service.json
450+
- from: Microsoft.RecoveryServices/SiteRecovery/stable/2025-08-01/service.json
441451
where:
442452
verb: Suspend$
443453
subject: ^ReplicationMigrationItemReplication
444454
hide: true
445-
- from: Microsoft.RecoveryServices/stable/2024-01-01/service.json
455+
- from: Microsoft.RecoveryServices/SiteRecovery/stable/2025-08-01/service.json
446456
where:
447457
verb: Resume$
448458
subject: ^ReplicationMigrationItemReplication
449459
hide: true
450-
- from: Microsoft.RecoveryServices/stable/2024-01-01/service.json
460+
- from: Microsoft.RecoveryServices/SiteRecovery/stable/2025-08-01/service.json
451461
where:
452462
subject: ^Planned
453463
hide: true
@@ -490,7 +500,7 @@ directive:
490500
verb: New$
491501
variant: ^CreateViaIdentity
492502
hide: true
493-
- from: Microsoft.DataReplication/stable/2024-09-01/recoveryservicesdatareplication.json
503+
- from: Microsoft.DataReplication/DataReplication/stable/2024-09-01/recoveryservicesdatareplication.json
494504
where:
495505
verb: Get$|Invoke$|New$|Remove$|Test$|Update$
496506
subject: ^FabricAgent|^Fabric|^Policy|^EmailConfiguration|^ProtectedItem|^ReplicationExtension|^Vault
@@ -501,17 +511,17 @@ directive:
501511
parameter-name: Name
502512
clear-alias: true
503513
# Table output formatting
504-
- from: Microsoft.RecoveryServices/stable/2024-01-01/service.json
514+
- from: Microsoft.RecoveryServices/SiteRecovery/stable/2025-08-01/service.json
505515
where:
506516
model-name: MigrationItem
507517
set:
508518
suppress-format: true
509-
- from: Microsoft.RecoveryServices/stable/2024-01-01/service.json
519+
- from: Microsoft.RecoveryServices/SiteRecovery/stable/2025-08-01/service.json
510520
where:
511521
model-name: Job
512522
set:
513523
suppress-format: true
514-
- from: Microsoft.RecoveryServices/stable/2024-01-01/service.json
524+
- from: Microsoft.RecoveryServices/SiteRecovery/stable/2025-08-01/service.json
515525
where:
516526
model-name: Fabric
517527
set:

src/Migrate/Migrate.Autorest/UX/Microsoft.RecoveryServices/vaults-replicationFabrics-replicationProtectionContainers-replicationProtectionContainerMappings.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
{
22
"resourceType": "vaults/replicationFabrics/replicationProtectionContainers/replicationProtectionContainerMappings",
3-
"apiVersion": "2024-01-01",
3+
"apiVersion": "2025-08-01",
44
"learnMore": {
55
"url": "https://learn.microsoft.com/powershell/module/az.migrate"
66
},

src/Migrate/Migrate.Autorest/UX/Microsoft.RecoveryServices/vaults-replicationFabrics-replicationProtectionContainers.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
{
22
"resourceType": "vaults/replicationFabrics/replicationProtectionContainers",
3-
"apiVersion": "2024-01-01",
3+
"apiVersion": "2025-08-01",
44
"learnMore": {
55
"url": "https://learn.microsoft.com/powershell/module/az.migrate"
66
},

src/Migrate/Migrate.Autorest/UX/Microsoft.RecoveryServices/vaults-replicationFabrics-replicationRecoveryServicesProviders.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
{
22
"resourceType": "vaults/replicationFabrics/replicationRecoveryServicesProviders",
3-
"apiVersion": "2024-01-01",
3+
"apiVersion": "2025-08-01",
44
"learnMore": {
55
"url": "https://learn.microsoft.com/powershell/module/az.migrate"
66
},

src/Migrate/Migrate.Autorest/UX/Microsoft.RecoveryServices/vaults-replicationPolicies.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
{
22
"resourceType": "vaults/replicationPolicies",
3-
"apiVersion": "2024-01-01",
3+
"apiVersion": "2025-08-01",
44
"learnMore": {
55
"url": "https://learn.microsoft.com/powershell/module/az.migrate"
66
},

src/Migrate/Migrate.Autorest/custom/Get-AzMigrateJob.ps1

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -22,7 +22,7 @@ The Get-AzMigrateJob cmdlet retrieves the status of an Azure Migrate job.
2222
https://learn.microsoft.com/powershell/module/az.migrate/get-azmigratejob
2323
#>
2424
function Get-AzMigrateJob {
25-
[OutputType([Microsoft.Azure.PowerShell.Cmdlets.Migrate.Models.Api202401.IJob])]
25+
[OutputType([Microsoft.Azure.PowerShell.Cmdlets.Migrate.Models.Api20250801.IJob])]
2626
[CmdletBinding(DefaultParameterSetName = 'ListByName', PositionalBinding = $false)]
2727
param(
2828
[Parameter(ParameterSetName = 'GetById', Mandatory)]
@@ -53,7 +53,7 @@ function Get-AzMigrateJob {
5353

5454
[Parameter(ParameterSetName = 'GetByInputObject', Mandatory)]
5555
[Microsoft.Azure.PowerShell.Cmdlets.Migrate.Category('Path')]
56-
[Microsoft.Azure.PowerShell.Cmdlets.Migrate.Models.Api202401.IJob]
56+
[Microsoft.Azure.PowerShell.Cmdlets.Migrate.Models.Api20250801.IJob]
5757
# Specifies the job object of the replicating server.
5858
${InputObject},
5959

0 commit comments

Comments
 (0)