Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
26 changes: 26 additions & 0 deletions src/Migrate/Migrate.Autorest/Properties/AssemblyInfo.cs
Original file line number Diff line number Diff line change
@@ -0,0 +1,26 @@
// Copyright (c) Microsoft Corporation. All rights reserved.
// Licensed under the Apache License, Version 2.0 (the ""License"");
// you may not use this file except in compliance with the License.
// You may obtain a copy of the License at
// http://www.apache.org/licenses/LICENSE-2.0
// Unless required by applicable law or agreed to in writing, software
// distributed under the License is distributed on an ""AS IS"" BASIS,
// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
// See the License for the specific language governing permissions and
// limitations under the License.
// Code generated by Microsoft (R) AutoRest Code Generator.Changes may cause incorrect behavior and will be lost if the code
// is regenerated.

using System;
using System.Reflection;
using System.Runtime.CompilerServices;
using System.Runtime.InteropServices;

[assembly: System.Reflection.AssemblyCompanyAttribute("Microsoft")]
[assembly: System.Reflection.AssemblyCopyrightAttribute("Copyright © Microsoft")]
[assembly: System.Reflection.AssemblyProductAttribute("Microsoft Azure PowerShell")]
[assembly: System.Reflection.AssemblyTitleAttribute("Microsoft Azure PowerShell - Migrate")]
[assembly: System.Reflection.AssemblyFileVersionAttribute("2.4.0")]
[assembly: System.Reflection.AssemblyVersionAttribute("2.4.0")]
[assembly: System.Runtime.InteropServices.ComVisibleAttribute(false)]
[assembly: System.CLSCompliantAttribute(false)]
74 changes: 37 additions & 37 deletions src/Migrate/Migrate.Autorest/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -45,13 +45,13 @@ In this directory, run AutoRest:

``` yaml
skip-semantics-validation: true
commit: 0dd49a444195fef7f3555cad038cb7665cbd928c
commit: 3b19762dab3c48c857ae2355da351b32dde22eda
require:
- $(this-folder)/../../readme.azure.noprofile.md
input-file:
- $(repo)/specification/migrate/resource-manager/Microsoft.OffAzure/stable/2020-01-01/migrate.json
- $(repo)/specification/migrateprojects/resource-manager/Microsoft.Migrate/preview/2018-09-01-preview/migrate.json
- $(repo)/specification/recoveryservicessiterecovery/resource-manager/Microsoft.RecoveryServices/stable/2023-01-01/service.json
- $(repo)/specification/recoveryservicessiterecovery/resource-manager/Microsoft.RecoveryServices/stable/2024-01-01/service.json
- $(repo)/specification/recoveryservicesdatareplication/resource-manager/Microsoft.DataReplication/preview/2021-02-16-preview/recoveryservicesdatareplication.json

module-version: 1.0.1
Expand Down Expand Up @@ -120,55 +120,55 @@ directive:
- TaskModel
- TaskModelCustomProperties
# Remove variants not in scope
- from: Microsoft.RecoveryServices/stable/2023-01-01/service.json
- from: Microsoft.RecoveryServices/stable/2024-01-01/service.json
where:
verb: Test$
subject: ^ReplicationMigrationItemMigrate
variant: ^TestViaIdentity$|^TestViaIdentityExpanded$|^Test$
remove: true
- from: Microsoft.RecoveryServices/stable/2023-01-01/service.json
- from: Microsoft.RecoveryServices/stable/2024-01-01/service.json
where:
verb: Get$
subject: ReplicationFabric$|ReplicationPolicy$|ReplicationProtectionContainer$|ReplicationMigrationItem$|ReplicationJob$|ReplicationProtectionContainerMapping$|ReplicationRecoveryServicesProvider$
variant: ^GetViaIdentity$
remove: true
- from: Microsoft.RecoveryServices/stable/2023-01-01/service.json
- from: Microsoft.RecoveryServices/stable/2024-01-01/service.json
where:
verb: Remove$
subject: ^ReplicationMigrationItem
variant: ^DeleteViaIdentity$
remove: true
- from: Microsoft.RecoveryServices/stable/2023-01-01/service.json
- from: Microsoft.RecoveryServices/stable/2024-01-01/service.json
where:
verb: Move$
subject: ^ReplicationMigrationItem
variant: ^MigrateViaIdentityExpanded$|^Migrate$|^MigrateViaIdentity$
remove: true
- from: Microsoft.RecoveryServices/stable/2023-01-01/service.json
- from: Microsoft.RecoveryServices/stable/2024-01-01/service.json
where:
verb: Suspend$
subject: ^ReplicationMigrationItemReplication
variant: ^PauseViaIdentityExpanded$|^Pause$|^PauseViaIdentity$
remove: true
- from: Microsoft.RecoveryServices/stable/2023-01-01/service.json
- from: Microsoft.RecoveryServices/stable/2024-01-01/service.json
where:
verb: Resume$
subject: ^ReplicationMigrationItemReplication
variant: ^ResumeViaIdentityExpanded$|^Resume$|^ResumeViaIdentity$
remove: true
- from: Microsoft.RecoveryServices/stable/2023-01-01/service.json
- from: Microsoft.RecoveryServices/stable/2024-01-01/service.json
where:
verb: Invoke$
subject: ^ResyncReplicationMigrationItem
variant: ^ResyncViaIdentityExpanded$|^ResyncViaIdentity$|^Resync$
remove: true
- from: Microsoft.RecoveryServices/stable/2023-01-01/service.json
- from: Microsoft.RecoveryServices/stable/2024-01-01/service.json
where:
verb: New$
subject: ^ReplicationMigrationItem|ReplicationProtectionContainerMapping$|ReplicationPolicy$
variant: ^CreateViaIdentity$|^CreateViaIdentityExpanded$|^Create$
remove: true
- from: Microsoft.RecoveryServices/stable/2023-01-01/service.json
- from: Microsoft.RecoveryServices/stable/2024-01-01/service.json
where:
verb: Update$
subject: ^ReplicationMigrationItem
Expand Down Expand Up @@ -266,49 +266,49 @@ directive:
verb: Update$
subject: Project$
remove: true
- from: Microsoft.RecoveryServices/stable/2023-01-01/service.json
- from: Microsoft.RecoveryServices/stable/2024-01-01/service.json
where:
subject: ^ReplicationRecoveryPlan|ReplicationRecoveryServiceProvider$|ReplicationEvent$|ReplicationAlertSetting$|ReplicationLogicalNetwork$|^ReplicationProtectedItem|^ReplicationNetwork|^ReplicationStorage|RecoveryPoint$|ProtectableItem$|FabricGateway$|FabricToAad$|ReplicationvCenter$
remove: true
- from: Microsoft.RecoveryServices/stable/2023-01-01/service.json
- from: Microsoft.RecoveryServices/stable/2024-01-01/service.json
where:
verb: Export$|Find$|Switch$|Clear$
remove: true
- from: Microsoft.RecoveryServices/stable/2023-01-01/service.json
- from: Microsoft.RecoveryServices/stable/2024-01-01/service.json
where:
subject: ^Commit|^Renew|^Reprotect|^Unplanned|VaultHealth$|ComputeSize$|FabricConsistency$
remove: true
- from: Microsoft.RecoveryServices/stable/2023-01-01/service.json
- from: Microsoft.RecoveryServices/stable/2024-01-01/service.json
where:
verb: New$|Remove$
subject: Fabric$|ProtectionContainer$|ReplicationRecoveryServicesProvider$
remove: true
- from: Microsoft.RecoveryServices/stable/2023-01-01/service.json
- from: Microsoft.RecoveryServices/stable/2024-01-01/service.json
where:
verb: Remove$
subject: ReplicationPolicy$|ReplicationProtectionContainerMapping$
subject: ReplicationPolicy$|ReplicationProtectionContainerMapping$|ReplicationFabricInfra$
remove: true
- from: Microsoft.RecoveryServices/stable/2023-01-01/service.json
- from: Microsoft.RecoveryServices/stable/2024-01-01/service.json
where:
verb: Update$
subject: Fabric$|Policy$|ProtectionContainer$|ReplicationProtectionContainerMapping$
remove: true
- from: Microsoft.RecoveryServices/stable/2023-01-01/service.json
- from: Microsoft.RecoveryServices/stable/2024-01-01/service.json
where:
verb: Stop$|Resume$|Restart$
subject: Job$
remove: true
- from: Microsoft.RecoveryServices/stable/2023-01-01/service.json
- from: Microsoft.RecoveryServices/stable/2024-01-01/service.json
where:
verb: Get
subject: ^ReplicationAppliance|^ReplicationEligibilityResult|^ReplicationProtectionIntent
remove: true
- from: Microsoft.RecoveryServices/stable/2023-01-01/service.json
- from: Microsoft.RecoveryServices/stable/2024-01-01/service.json
where:
verb: Get
subject: ^ReplicationVaultSetting|^SupportedOperatingSystem|^ReplicationProtectionIntent
remove: true
- from: Microsoft.RecoveryServices/stable/2023-01-01/service.json
- from: Microsoft.RecoveryServices/stable/2024-01-01/service.json
where:
verb: New
subject: ^ReplicationVaultSetting|^SupportedOperatingSystem|^ReplicationProtectionIntent
Expand Down Expand Up @@ -358,7 +358,7 @@ directive:
verb: Update
subject: ^Vault
remove: true
- from: Microsoft.RecoveryServices/stable/2023-01-01/service.json
- from: Microsoft.RecoveryServices/stable/2024-01-01/service.json
where:
verb: Invoke
subject: ^PlannedReplication
Expand All @@ -376,57 +376,57 @@ directive:
verb: Set$
subject: ^Solution
hide: true
- from: Microsoft.RecoveryServices/stable/2023-01-01/service.json
- from: Microsoft.RecoveryServices/stable/2024-01-01/service.json
where:
verb: Get$
subject: ToAzureMigrate$
hide: true
- from: Microsoft.RecoveryServices/stable/2023-01-01/service.json
- from: Microsoft.RecoveryServices/stable/2024-01-01/service.json
where:
verb: Get$
subject: ReplicationMigrationItem$|ReplicationJob$
hide: true
- from: Microsoft.RecoveryServices/stable/2023-01-01/service.json
- from: Microsoft.RecoveryServices/stable/2024-01-01/service.json
where:
verb: Test$
subject: ^ReplicationMigrationItemMigrate
hide: true
- from: Microsoft.RecoveryServices/stable/2023-01-01/service.json
- from: Microsoft.RecoveryServices/stable/2024-01-01/service.json
where:
verb: New$|Remove$
subject: ^ReplicationMigrationItem
hide: true
- from: Microsoft.RecoveryServices/stable/2023-01-01/service.json
- from: Microsoft.RecoveryServices/stable/2024-01-01/service.json
where:
verb: Move$
subject: ^ReplicationMigrationItem
hide: true
- from: Microsoft.RecoveryServices/stable/2023-01-01/service.json
- from: Microsoft.RecoveryServices/stable/2024-01-01/service.json
where:
verb: Restart$
subject: ^ReplicationJob
hide: true
- from: Microsoft.RecoveryServices/stable/2023-01-01/service.json
- from: Microsoft.RecoveryServices/stable/2024-01-01/service.json
where:
verb: Invoke$
subject: ^ResyncReplicationMigrationItem
hide: true
- from: Microsoft.RecoveryServices/stable/2023-01-01/service.json
- from: Microsoft.RecoveryServices/stable/2024-01-01/service.json
where:
verb: Update$
subject: ^ReplicationMigrationItem
hide: true
- from: Microsoft.RecoveryServices/stable/2023-01-01/service.json
- from: Microsoft.RecoveryServices/stable/2024-01-01/service.json
where:
verb: Suspend$
subject: ^ReplicationMigrationItemReplication
hide: true
- from: Microsoft.RecoveryServices/stable/2023-01-01/service.json
- from: Microsoft.RecoveryServices/stable/2024-01-01/service.json
where:
verb: Resume$
subject: ^ReplicationMigrationItemReplication
hide: true
- from: Microsoft.RecoveryServices/stable/2023-01-01/service.json
- from: Microsoft.RecoveryServices/stable/2024-01-01/service.json
where:
subject: ^Planned
hide: true
Expand Down Expand Up @@ -475,17 +475,17 @@ directive:
parameter-name: Name
clear-alias: true
# Table output formatting
- from: Microsoft.RecoveryServices/stable/2023-01-01/service.json
- from: Microsoft.RecoveryServices/stable/2024-01-01/service.json
where:
model-name: MigrationItem
set:
suppress-format: true
- from: Microsoft.RecoveryServices/stable/2023-01-01/service.json
- from: Microsoft.RecoveryServices/stable/2024-01-01/service.json
where:
model-name: Job
set:
suppress-format: true
- from: Microsoft.RecoveryServices/stable/2023-01-01/service.json
- from: Microsoft.RecoveryServices/stable/2024-01-01/service.json
where:
model-name: Fabric
set:
Expand Down
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"resourceType": "vaults/replicationFabrics/replicationProtectionContainers/replicationProtectionContainerMappings",
"apiVersion": "2023-01-01",
"apiVersion": "2024-01-01",
"learnMore": {
"url": "https://learn.microsoft.com/powershell/module/az.migrate"
},
Expand Down
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"resourceType": "vaults/replicationFabrics/replicationProtectionContainers",
"apiVersion": "2023-01-01",
"apiVersion": "2024-01-01",
"learnMore": {
"url": "https://learn.microsoft.com/powershell/module/az.migrate"
},
Expand Down
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"resourceType": "vaults/replicationFabrics/replicationRecoveryServicesProviders",
"apiVersion": "2023-01-01",
"apiVersion": "2024-01-01",
"learnMore": {
"url": "https://learn.microsoft.com/powershell/module/az.migrate"
},
Expand Down
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"resourceType": "vaults/replicationPolicies",
"apiVersion": "2023-01-01",
"apiVersion": "2024-01-01",
"learnMore": {
"url": "https://learn.microsoft.com/powershell/module/az.migrate"
},
Expand Down
4 changes: 2 additions & 2 deletions src/Migrate/Migrate.Autorest/custom/Get-AzMigrateJob.ps1
Original file line number Diff line number Diff line change
Expand Up @@ -22,7 +22,7 @@ The Get-AzMigrateJob cmdlet retrives the status of an Azure Migrate job.
https://learn.microsoft.com/powershell/module/az.migrate/get-azmigratejob
#>
function Get-AzMigrateJob {
[OutputType([Microsoft.Azure.PowerShell.Cmdlets.Migrate.Models.Api202301.IJob])]
[OutputType([Microsoft.Azure.PowerShell.Cmdlets.Migrate.Models.Api202401.IJob])]
[CmdletBinding(DefaultParameterSetName = 'ListByName', PositionalBinding = $false)]
param(
[Parameter(ParameterSetName = 'GetById', Mandatory)]
Expand Down Expand Up @@ -53,7 +53,7 @@ function Get-AzMigrateJob {

[Parameter(ParameterSetName = 'GetByInputObject', Mandatory)]
[Microsoft.Azure.PowerShell.Cmdlets.Migrate.Category('Path')]
[Microsoft.Azure.PowerShell.Cmdlets.Migrate.Models.Api202301.IJob]
[Microsoft.Azure.PowerShell.Cmdlets.Migrate.Models.Api202401.IJob]
# Specifies the job object of the replicating server.
${InputObject},

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -22,7 +22,7 @@ The Get-AzMigrateServerReplication cmdlet retrieves the object for the replicati
https://learn.microsoft.com/powershell/module/az.migrate/get-azmigrateserverreplication
#>
function Get-AzMigrateServerReplication {
[OutputType([Microsoft.Azure.PowerShell.Cmdlets.Migrate.Models.Api202301.IMigrationItem])]
[OutputType([Microsoft.Azure.PowerShell.Cmdlets.Migrate.Models.Api202401.IMigrationItem])]
[CmdletBinding(DefaultParameterSetName = 'ListByName', PositionalBinding = $false)]
param(
[Parameter(ParameterSetName = 'GetBySRSID', Mandatory)]
Expand Down Expand Up @@ -53,7 +53,7 @@ function Get-AzMigrateServerReplication {

[Parameter(ParameterSetName = 'GetByInputObject', Mandatory)]
[Microsoft.Azure.PowerShell.Cmdlets.Migrate.Category('Path')]
[Microsoft.Azure.PowerShell.Cmdlets.Migrate.Models.Api202301.IMigrationItem]
[Microsoft.Azure.PowerShell.Cmdlets.Migrate.Models.Api202401.IMigrationItem]
# Specifies the machine object of the replicating server.
${InputObject},

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -542,7 +542,7 @@ public static int hashForArtifact(String artifact)
$policyName = $MigratePrefix + $SiteName + "policy"
$existingPolicyObject = Get-AzMigrateReplicationPolicy -PolicyName $policyName -ResourceGroupName $ResourceGroupName -ResourceName $VaultName -ErrorVariable notPresent -ErrorAction SilentlyContinue
if (!$existingPolicyObject) {
$providerSpecificPolicy = [Microsoft.Azure.PowerShell.Cmdlets.Migrate.Models.Api202301.VMwareCbtPolicyCreationInput]::new()
$providerSpecificPolicy = [Microsoft.Azure.PowerShell.Cmdlets.Migrate.Models.Api202401.VMwareCbtPolicyCreationInput]::new()
$providerSpecificPolicy.AppConsistentFrequencyInMinute = 240
$providerSpecificPolicy.InstanceType = "VMwareCbt"
$providerSpecificPolicy.RecoveryPointHistoryInMinute = 360
Expand All @@ -566,7 +566,7 @@ public static int hashForArtifact(String artifact)
Write-Host $mappingName, " for ", $applianceName, $LogStringSkipping
}
else {
$providerSpecificInput = [Microsoft.Azure.PowerShell.Cmdlets.Migrate.Models.Api202301.VMwareCbtContainerMappingInput]::new()
$providerSpecificInput = [Microsoft.Azure.PowerShell.Cmdlets.Migrate.Models.Api202401.VMwareCbtContainerMappingInput]::new()
$providerSpecificInput.InstanceType = "VMwareCbt"
$providerSpecificInput.TargetLocation = $TargetRegion
if ([string]::IsNullOrEmpty($CacheStorageAccountId)) {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -22,7 +22,7 @@ The New-AzMigrateDiskMapping cmdlet creates a mapping of the source disk attache
https://learn.microsoft.com/powershell/module/az.migrate/new-azmigratediskmapping
#>
function New-AzMigrateDiskMapping {
[OutputType([Microsoft.Azure.PowerShell.Cmdlets.Migrate.Models.Api202301.IVMwareCbtDiskInput])]
[OutputType([Microsoft.Azure.PowerShell.Cmdlets.Migrate.Models.Api202401.IVMwareCbtDiskInput])]
[CmdletBinding(DefaultParameterSetName = 'VMwareCbt', PositionalBinding = $false)]
param(
[Parameter(Mandatory)]
Expand Down Expand Up @@ -55,7 +55,7 @@ function New-AzMigrateDiskMapping {
)

process {
$DiskObject = [Microsoft.Azure.PowerShell.Cmdlets.Migrate.Models.Api202301.VMwareCbtDiskInput]::new()
$DiskObject = [Microsoft.Azure.PowerShell.Cmdlets.Migrate.Models.Api202401.VMwareCbtDiskInput]::new()
$DiskObject.DiskId = $DiskID

$validDiskTypeSpellings = @{
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -22,7 +22,7 @@ The New-AzMigrateNicMapping cmdlet creates a mapping of the source NIC attached
https://learn.microsoft.com/powershell/module/az.migrate/new-azmigratenicmapping
#>
function New-AzMigrateNicMapping {
[OutputType([Microsoft.Azure.PowerShell.Cmdlets.Migrate.Models.Api202301.IVMwareCbtNicInput])]
[OutputType([Microsoft.Azure.PowerShell.Cmdlets.Migrate.Models.Api202401.IVMwareCbtNicInput])]
[CmdletBinding(DefaultParameterSetName = 'VMwareCbt', PositionalBinding = $false)]
param(
[Parameter(Mandatory)]
Expand Down Expand Up @@ -71,7 +71,7 @@ function New-AzMigrateNicMapping {
)

process {
$NicObject = [Microsoft.Azure.PowerShell.Cmdlets.Migrate.Models.Api202301.VMwareCbtNicInput]::new()
$NicObject = [Microsoft.Azure.PowerShell.Cmdlets.Migrate.Models.Api202401.VMwareCbtNicInput]::new()
$NicObject.NicId = $NicID
if ($PSBoundParameters.ContainsKey('TargetNicSelectionType')) {
if ($TargetNicSelectionType -eq 'primary') {
Expand Down
Loading