Migrate.Autorest/custom/Set-AzMigrateServerReplication.ps1
# ---------------------------------------------------------------------------------- # # Copyright Microsoft Corporation # 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. # ---------------------------------------------------------------------------------- <# .Synopsis Updates the target properties for the replicating server. .Description The Set-AzMigrateServerReplication cmdlet updates the target properties for the replicating server. .Link https://learn.microsoft.com/powershell/module/az.migrate/set-azmigrateserverreplication #> function Set-AzMigrateServerReplication { [OutputType([Microsoft.Azure.PowerShell.Cmdlets.Migrate.Models.Api202301.IJob])] [CmdletBinding(DefaultParameterSetName = 'ByIDVMwareCbt', PositionalBinding = $false)] param( [Parameter(ParameterSetName = 'ByIDVMwareCbt', Mandatory)] [Microsoft.Azure.PowerShell.Cmdlets.Migrate.Category('Path')] [System.String] # Specifies the replcating server for which the properties need to be updated. The ID should be retrieved using the Get-AzMigrateServerReplication cmdlet. ${TargetObjectID}, [Parameter(ParameterSetName = 'ByInputObjectVMwareCbt', Mandatory)] [Microsoft.Azure.PowerShell.Cmdlets.Migrate.Category('Path')] [Microsoft.Azure.PowerShell.Cmdlets.Migrate.Models.Api202301.IMigrationItem] # Specifies the replicating server for which the properties need to be updated. The server object can be retrieved using the Get-AzMigrateServerReplication cmdlet. ${InputObject}, [Parameter()] [Microsoft.Azure.PowerShell.Cmdlets.Migrate.Category('Path')] [System.String] # Specifies the replcating server for which the properties need to be updated. The ID should be retrieved using the Get-AzMigrateServerReplication cmdlet. ${TargetVMName}, [Parameter()] [Microsoft.Azure.PowerShell.Cmdlets.Migrate.Category('Path')] [System.String] # Specifies the name of the Azure VM to be created. ${TargetDiskName}, [Parameter()] [Microsoft.Azure.PowerShell.Cmdlets.Migrate.Category('Path')] [System.String] # Updates the SKU of the Azure VM to be created. ${TargetVMSize}, [Parameter()] [Microsoft.Azure.PowerShell.Cmdlets.Migrate.Category('Path')] [System.String] # Updates the Virtual Network id within the destination Azure subscription to which the server needs to be migrated. ${TargetNetworkId}, [Parameter()] [Microsoft.Azure.PowerShell.Cmdlets.Migrate.Category('Path')] [System.String] # Updates the Virtual Network id within the destination Azure subscription to which the server needs to be test migrated. ${TestNetworkId}, [Parameter()] [Microsoft.Azure.PowerShell.Cmdlets.Migrate.Category('Path')] [System.String] # Updates the Resource Group id within the destination Azure subscription to which the server needs to be migrated. ${TargetResourceGroupID}, [Parameter()] [Microsoft.Azure.PowerShell.Cmdlets.Migrate.Category('Path')] [Microsoft.Azure.PowerShell.Cmdlets.Migrate.Models.Api202301.IVMwareCbtNicInput[]] # Updates the NIC for the Azure VM to be created. ${NicToUpdate}, [Parameter()] [Microsoft.Azure.PowerShell.Cmdlets.Migrate.Category('Path')] [Microsoft.Azure.PowerShell.Cmdlets.Migrate.Models.Api202301.IVMwareCbtUpdateDiskInput[]] # Updates the disk for the Azure VM to be created. ${DiskToUpdate}, [Parameter()] [Microsoft.Azure.PowerShell.Cmdlets.Migrate.Category('Path')] [System.String] # Specifies the Availability Set to be used for VM creation. ${TargetAvailabilitySet}, [Parameter()] [Microsoft.Azure.PowerShell.Cmdlets.Migrate.Category('Path')] [System.String] # Specifies the Availability Zone to be used for VM creation. ${TargetAvailabilityZone}, [Parameter()] [ValidateSet("NoLicenseType" , "PAYG" , "AHUB")] [ArgumentCompleter( { "NoLicenseType" , "PAYG" , "AHUB" })] [Microsoft.Azure.PowerShell.Cmdlets.Migrate.Category('Path')] [System.String] # Specifies if Azure Hybrid benefit for SQL Server is applicable for the server to be migrated. ${SqlServerLicenseType}, [Parameter()] [Microsoft.Azure.PowerShell.Cmdlets.Migrate.Category('Path')] [System.Collections.Hashtable] # Specifies the tag to be used for Resource creation. ${UpdateTag}, [Parameter()] [ValidateSet("Merge" , "Replace" , "Delete")] [ArgumentCompleter( { "Merge" , "Replace" , "Delete" })] [Microsoft.Azure.PowerShell.Cmdlets.Migrate.Category('Path')] [System.String] # Specifies update tag operation. ${UpdateTagOperation}, [Parameter()] [Microsoft.Azure.PowerShell.Cmdlets.Migrate.Category('Path')] [Microsoft.Azure.PowerShell.Cmdlets.Migrate.Models.Api202301.IVMwareCbtEnableMigrationInputTargetVmtags] # Specifies the tag to be used for VM creation. ${UpdateVMTag}, [Parameter()] [ValidateSet("Merge" , "Replace" , "Delete")] [ArgumentCompleter( { "Merge" , "Replace" , "Delete" })] [Microsoft.Azure.PowerShell.Cmdlets.Migrate.Category('Path')] [System.String] # Specifies update VM tag operation. ${UpdateVMTagOperation}, [Parameter()] [Microsoft.Azure.PowerShell.Cmdlets.Migrate.Category('Path')] [Microsoft.Azure.PowerShell.Cmdlets.Migrate.Models.Api202301.IVMwareCbtEnableMigrationInputTargetNicTags] # Specifies the tag to be used for NIC creation. ${UpdateNicTag}, [Parameter()] [ValidateSet("Merge" , "Replace" , "Delete")] [ArgumentCompleter( { "Merge" , "Replace" , "Delete" })] [Microsoft.Azure.PowerShell.Cmdlets.Migrate.Category('Path')] [System.String] # Specifies update NIC tag operation. ${UpdateNicTagOperation}, [Parameter()] [Microsoft.Azure.PowerShell.Cmdlets.Migrate.Category('Path')] [Microsoft.Azure.PowerShell.Cmdlets.Migrate.Models.Api202301.IVMwareCbtEnableMigrationInputTargetDiskTags] # Specifies the tag to be used for disk creation. ${UpdateDiskTag}, [Parameter()] [ValidateSet("Merge" , "Replace" , "Delete")] [ArgumentCompleter( { "Merge" , "Replace" , "Delete" })] [Microsoft.Azure.PowerShell.Cmdlets.Migrate.Category('Path')] [System.String] # Specifies update disk tag operation. ${UpdateDiskTagOperation}, [Parameter()] [Microsoft.Azure.PowerShell.Cmdlets.Migrate.Category('Path')] [System.String] # Specifies the storage account to be used for boot diagnostics. ${TargetBootDiagnosticsStorageAccount}, [Parameter()] [Microsoft.Azure.PowerShell.Cmdlets.Migrate.Category('Path')] [Microsoft.Azure.PowerShell.Cmdlets.Migrate.Runtime.DefaultInfo(Script = '(Get-AzContext).Subscription.Id')] [System.String] # The subscription Id. ${SubscriptionId}, [Parameter()] [Alias('AzureRMContext', 'AzureCredential')] [ValidateNotNull()] [Microsoft.Azure.PowerShell.Cmdlets.Migrate.Category('Azure')] [System.Management.Automation.PSObject] # The credentials, account, tenant, and subscription used for communication with Azure. ${DefaultProfile}, [Parameter(DontShow)] [Microsoft.Azure.PowerShell.Cmdlets.Migrate.Category('Runtime')] [System.Management.Automation.SwitchParameter] # Wait for .NET debugger to attach ${Break}, [Parameter(DontShow)] [ValidateNotNull()] [Microsoft.Azure.PowerShell.Cmdlets.Migrate.Category('Runtime')] [Microsoft.Azure.PowerShell.Cmdlets.Migrate.Runtime.SendAsyncStep[]] # SendAsync Pipeline Steps to be appended to the front of the pipeline ${HttpPipelineAppend}, [Parameter(DontShow)] [ValidateNotNull()] [Microsoft.Azure.PowerShell.Cmdlets.Migrate.Category('Runtime')] [Microsoft.Azure.PowerShell.Cmdlets.Migrate.Runtime.SendAsyncStep[]] # SendAsync Pipeline Steps to be prepended to the front of the pipeline ${HttpPipelinePrepend}, [Parameter(DontShow)] [Microsoft.Azure.PowerShell.Cmdlets.Migrate.Category('Runtime')] [System.Uri] # The URI for the proxy server to use ${Proxy}, [Parameter(DontShow)] [ValidateNotNull()] [Microsoft.Azure.PowerShell.Cmdlets.Migrate.Category('Runtime')] [System.Management.Automation.PSCredential] # Credentials for a proxy server to use for the remote call ${ProxyCredential}, [Parameter(DontShow)] [Microsoft.Azure.PowerShell.Cmdlets.Migrate.Category('Runtime')] [System.Management.Automation.SwitchParameter] # Use the default credentials for the proxy ${ProxyUseDefaultCredentials} ) process { $HasTargetVMName = $PSBoundParameters.ContainsKey('TargetVMName') $HasTargetDiskName = $PSBoundParameters.ContainsKey('TargetDiskName') $HasTargetVmSize = $PSBoundParameters.ContainsKey('TargetVMSize') $HasTargetNetworkId = $PSBoundParameters.ContainsKey('TargetNetworkId') $HasTestNetworkId = $PSBoundParameters.ContainsKey('TestNetworkId') $HasTargetResourceGroupID = $PSBoundParameters.ContainsKey('TargetResourceGroupID') $HasNicToUpdate = $PSBoundParameters.ContainsKey('NicToUpdate') $HasDiskToUpdate = $PSBoundParameters.ContainsKey('DiskToUpdate') $HasTargetAvailabilitySet = $PSBoundParameters.ContainsKey('TargetAvailabilitySet') $HasTargetAvailabilityZone = $PSBoundParameters.ContainsKey('TargetAvailabilityZone') $HasSqlServerLicenseType = $PSBoundParameters.ContainsKey('SqlServerLicenseType') $HasUpdateTag = $PSBoundParameters.ContainsKey('UpdateTag') $HasUpdateTagOperation = $PSBoundParameters.ContainsKey('UpdateTagOperation') $HasUpdateVMTag = $PSBoundParameters.ContainsKey('UpdateVMTag') $HasUpdateVMTagOperation = $PSBoundParameters.ContainsKey('UpdateVMTagOperation') $HasUpdateNicTag = $PSBoundParameters.ContainsKey('UpdateNicTag') $HasUpdateNicTagOperation = $PSBoundParameters.ContainsKey('UpdateNicTagOperation') $HasUpdateDiskTag = $PSBoundParameters.ContainsKey('UpdateDiskTag') $HasUpdateDiskTagOperation = $PSBoundParameters.ContainsKey('UpdateDiskTagOperation') $HasTargetBootDignosticStorageAccount = $PSBoundParameters.ContainsKey('TargetBootDiagnosticsStorageAccount') $null = $PSBoundParameters.Remove('TargetObjectID') $null = $PSBoundParameters.Remove('TargetVMName') $null = $PSBoundParameters.Remove('TargetDiskName') $null = $PSBoundParameters.Remove('TargetVMSize') $null = $PSBoundParameters.Remove('TargetNetworkId') $null = $PSBoundParameters.Remove('TestNetworkId') $null = $PSBoundParameters.Remove('TargetResourceGroupID') $null = $PSBoundParameters.Remove('NicToUpdate') $null = $PSBoundParameters.Remove('DiskToUpdate') $null = $PSBoundParameters.Remove('TargetAvailabilitySet') $null = $PSBoundParameters.Remove('TargetAvailabilityZone') $null = $PSBoundParameters.Remove('SqlServerLicenseType') $null = $PSBoundParameters.Remove('UpdateTag') $null = $PSBoundParameters.Remove('UpdateTagOperation') $null = $PSBoundParameters.Remove('UpdateVMTag') $null = $PSBoundParameters.Remove('UpdateVMTagOperation') $null = $PSBoundParameters.Remove('UpdateNicTag') $null = $PSBoundParameters.Remove('UpdateNicTagOperation') $null = $PSBoundParameters.Remove('UpdateDiskTag') $null = $PSBoundParameters.Remove('UpdateDiskTagOperation') $null = $PSBoundParameters.Remove('InputObject') $null = $PSBoundParameters.Remove('TargetBootDiagnosticsStorageAccount') $parameterSet = $PSCmdlet.ParameterSetName if ($parameterSet -eq 'ByInputObjectVMwareCbt') { $TargetObjectID = $InputObject.Id } $MachineIdArray = $TargetObjectID.Split("/") $ResourceGroupName = $MachineIdArray[4] $VaultName = $MachineIdArray[8] $FabricName = $MachineIdArray[10] $ProtectionContainerName = $MachineIdArray[12] $MachineName = $MachineIdArray[14] $null = $PSBoundParameters.Add("ResourceGroupName", $ResourceGroupName) $null = $PSBoundParameters.Add("ResourceName", $VaultName) $null = $PSBoundParameters.Add("FabricName", $FabricName) $null = $PSBoundParameters.Add("MigrationItemName", $MachineName) $null = $PSBoundParameters.Add("ProtectionContainerName", $ProtectionContainerName) $ReplicationMigrationItem = Az.Migrate.internal\Get-AzMigrateReplicationMigrationItem @PSBoundParameters if ($ReplicationMigrationItem -and ($ReplicationMigrationItem.ProviderSpecificDetail.InstanceType -eq 'VMwarecbt')) { $ProviderSpecificDetails = [Microsoft.Azure.PowerShell.Cmdlets.Migrate.Models.Api202301.VMwareCbtUpdateMigrationItemInput]::new() # Auto fill unchanged parameters $ProviderSpecificDetails.InstanceType = 'VMwareCbt' $ProviderSpecificDetails.LicenseType = $ReplicationMigrationItem.ProviderSpecificDetail.LicenseType $ProviderSpecificDetails.PerformAutoResync = $ReplicationMigrationItem.ProviderSpecificDetail.PerformAutoResync if ($HasTargetAvailabilitySet) { $ProviderSpecificDetails.TargetAvailabilitySetId = $TargetAvailabilitySet } else { $ProviderSpecificDetails.TargetAvailabilitySetId = $ReplicationMigrationItem.ProviderSpecificDetail.TargetAvailabilitySetId } if ($HasTargetAvailabilityZone) { $ProviderSpecificDetails.TargetAvailabilityZone = $TargetAvailabilityZone } else { $ProviderSpecificDetails.TargetAvailabilityZone = $ReplicationMigrationItem.ProviderSpecificDetail.TargetAvailabilityZone } if ($HasSqlServerLicenseType) { $validSqlLicenseSpellings = @{ NoLicenseType = "NoLicenseType"; PAYG = "PAYG"; AHUB = "AHUB" } $SqlServerLicenseType = $validSqlLicenseSpellings[$SqlServerLicenseType] $ProviderSpecificDetails.SqlServerLicenseType = $SqlServerLicenseType } else { $ProviderSpecificDetails.SqlServerLicenseType = $ReplicationMigrationItem.ProviderSpecificDetail.SqlServerLicenseType } $UserProvidedTag = $null if ($HasUpdateTag -And $HasUpdateTagOperation -And $UpdateTag) { $operation = @("UpdateTag", $UpdateTagOperation) $UserProvidedTag += @{$operation = $UpdateTag } } if ($HasUpdateVMTag -And $HasUpdateVMTagOperation -And $UpdateVMTag) { $operation = @("UpdateVMTag", $UpdateVMTagOperation) $UserProvidedTag += @{$operation = $UpdateVMTag } } else { $ProviderSpecificDetails.TargetVmTag = $ReplicationMigrationItem.ProviderSpecificDetail.TargetVmTag } if ($HasUpdateNicTag -And $HasUpdateNicTagOperation -And $UpdateNicTag) { $operation = @("UpdateNicTag", $UpdateNicTagOperation) $UserProvidedTag += @{$operation = $UpdateNicTag } } else { $ProviderSpecificDetails.TargetNicTag = $ReplicationMigrationItem.ProviderSpecificDetail.TargetNicTag } if ($HasUpdateDiskTag -And $HasUpdateDiskTagOperation -And $UpdateDiskTag) { $operation = @("UpdateDiskTag", $UpdateDiskTagOperation) $UserProvidedTag += @{$operation = $UpdateDiskTag } } else { $ProviderSpecificDetails.TargetDiskTag = $ReplicationMigrationItem.ProviderSpecificDetail.TargetDiskTag } foreach ($tag in $UserProvidedTag.Keys) { $IllegalCharKey = New-Object Collections.Generic.List[String] $ExceededLengthKey = New-Object Collections.Generic.List[String] $ExceededLengthValue = New-Object Collections.Generic.List[String] $ResourceTag = $($UserProvidedTag.Item($tag)) foreach ($key in $ResourceTag.Keys) { if ($key.length -eq 0) { throw "InvalidTagName : The tag name must be non-null, non-empty and non-whitespace only. Please provide an actual value." } if ($key.length -gt 512) { $ExceededLengthKey.add($key) } if ($key -match "[<>%&\?/.]") { $IllegalCharKey.add($key) } if ($($ResourceTag.Item($key)).length -gt 256) { $ExceededLengthValue.add($($ResourceTag.Item($key))) } } if ($IllegalCharKey.Count -gt 0) { throw "InvalidTagNameCharacters : The tag names '$($IllegalCharKey -join ', ')' have reserved characters '<,>,%,&,\,?,/' or control characters." } if ($ExceededLengthKey.Count -gt 0) { throw "InvalidTagName : Tag key too large. Following tag name '$($ExceededLengthKey -join ', ')' exceeded the maximum length. Maximum allowed length for tag name - '512' characters." } if ($ExceededLengthValue.Count -gt 0) { throw "InvalidTagValueLength : Tag value too large. Following tag value '$($ExceededLengthValue -join ', ')' exceeded the maximum length. Maximum allowed length for tag value - '256' characters." } if ($tag[1] -eq "Merge") { foreach ($key in $ResourceTag.Keys) { if ($ReplicationMigrationItem.ProviderSpecificDetail.TargetVmTag.ContainsKey($key) -And ` ($tag[0] -eq "UpdateVMTag" -or $tag[0] -eq "UpdateTag")) { $ReplicationMigrationItem.ProviderSpecificDetail.TargetVmTag.Remove($key) } if ($ReplicationMigrationItem.ProviderSpecificDetail.TargetNicTag.ContainsKey($key) -And ` ($tag[0] -eq "UpdateNicTag" -or $tag[0] -eq "UpdateTag")) { $ReplicationMigrationItem.ProviderSpecificDetail.TargetNicTag.Remove($key) } if ($ReplicationMigrationItem.ProviderSpecificDetail.TargetDiskTag.ContainsKey($key) -And ` ($tag[0] -eq "UpdateDiskTag" -or $tag[0] -eq "UpdateTag")) { $ReplicationMigrationItem.ProviderSpecificDetail.TargetDiskTag.Remove($key) } if ($tag[0] -eq "UpdateVMTag" -or $tag[0] -eq "UpdateTag") { $ReplicationMigrationItem.ProviderSpecificDetail.TargetVmTag.Add($key, $($ResourceTag.Item($key))) } if ($tag[0] -eq "UpdateNicTag" -or $tag[0] -eq "UpdateTag") { $ReplicationMigrationItem.ProviderSpecificDetail.TargetNicTag.Add($key, $($ResourceTag.Item($key))) } if ($tag[0] -eq "UpdateDiskTag" -or $tag[0] -eq "UpdateTag") { $ReplicationMigrationItem.ProviderSpecificDetail.TargetDiskTag.Add($key, $($ResourceTag.Item($key))) } } $ProviderSpecificDetails.TargetVmTag = $ReplicationMigrationItem.ProviderSpecificDetail.TargetVmTag $ProviderSpecificDetails.TargetNicTag = $ReplicationMigrationItem.ProviderSpecificDetail.TargetNicTag $ProviderSpecificDetails.TargetDiskTag = $ReplicationMigrationItem.ProviderSpecificDetail.TargetDiskTag } elseif ($tag[1] -eq "Replace") { if ($tag[0] -eq "UpdateVMTag" -or $tag[0] -eq "UpdateTag") { $ProviderSpecificDetails.TargetVmTag = $ResourceTag } if ($tag[0] -eq "UpdateNicTag" -or $tag[0] -eq "UpdateTag") { $ProviderSpecificDetails.TargetNicTag = $ResourceTag } if ($tag[0] -eq "UpdateDiskTag" -or $tag[0] -eq "UpdateTag") { $ProviderSpecificDetails.TargetDiskTag = $ResourceTag } } else { foreach ($key in $ResourceTag.Keys) { if (($tag[0] -eq "UpdateVMTag" -or $tag[0] -eq "UpdateTag") ` -And $ReplicationMigrationItem.ProviderSpecificDetail.TargetVmTag.ContainsKey($key) ` -And ($($ReplicationMigrationItem.ProviderSpecificDetail.TargetVmTag.Item($key)) ` -eq $($ResourceTag.Item($key)))) { $ReplicationMigrationItem.ProviderSpecificDetail.TargetVmTag.Remove($key) } if (($tag[0] -eq "UpdateNicTag" -or $tag[0] -eq "UpdateTag") ` -And $ReplicationMigrationItem.ProviderSpecificDetail.TargetNicTag.ContainsKey($key) ` -And ($($ReplicationMigrationItem.ProviderSpecificDetail.TargetNicTag.Item($key)) ` -eq $($ResourceTag.Item($key)))) { $ReplicationMigrationItem.ProviderSpecificDetail.TargetNicTag.Remove($key) } if (($tag[0] -eq "UpdateDiskTag" -or $tag[0] -eq "UpdateTag") ` -And $ReplicationMigrationItem.ProviderSpecificDetail.TargetDiskTag.ContainsKey($key) ` -And ($($ReplicationMigrationItem.ProviderSpecificDetail.TargetDiskTag.Item($key)) ` -eq $($ResourceTag.Item($key)))) { $ReplicationMigrationItem.ProviderSpecificDetail.TargetDiskTag.Remove($key) } } $ProviderSpecificDetails.TargetVmTag = $ReplicationMigrationItem.ProviderSpecificDetail.TargetVmTag $ProviderSpecificDetails.TargetNicTag = $ReplicationMigrationItem.ProviderSpecificDetail.TargetNicTag $ProviderSpecificDetails.TargetDiskTag = $ReplicationMigrationItem.ProviderSpecificDetail.TargetDiskTag } if ($ProviderSpecificDetails.TargetVmTag.Count -gt 50) { throw "InvalidTags : Too many tags specified. Requested tag count - '$($ProviderSpecificDetails.TargetVmTag.Count)'. Maximum number of tags allowed - '50'." } if ($ProviderSpecificDetails.TargetNicTag.Count -gt 50) { throw "InvalidTags : Too many tags specified. Requested tag count - '$($ProviderSpecificDetails.TargetNicTag.Count)'. Maximum number of tags allowed - '50'." } if ($ProviderSpecificDetails.TargetDiskTag.Count -gt 50) { throw "InvalidTags : Too many tags specified. Requested tag count - '$($ProviderSpecificDetails.TargetDiskTag.Count)'. Maximum number of tags allowed - '50'." } } if ($HasTargetNetworkId) { $ProviderSpecificDetails.TargetNetworkId = $TargetNetworkId } else { $ProviderSpecificDetails.TargetNetworkId = $ReplicationMigrationItem.ProviderSpecificDetail.TargetNetworkId } if ($HasTestNetworkId) { $ProviderSpecificDetails.TestNetworkId = $TestNetworkId } else { $ProviderSpecificDetails.TestNetworkId = $ReplicationMigrationItem.ProviderSpecificDetail.VMNic[0].TestNetworkId } if ($HasTargetResourceGroupID) { $ProviderSpecificDetails.TargetResourceGroupId = $TargetResourceGroupID } else { $ProviderSpecificDetails.TargetResourceGroupId = $ReplicationMigrationItem.ProviderSpecificDetail.TargetResourceGroupId } if ($HasTargetVmSize) { $ProviderSpecificDetails.TargetVMSize = $TargetVmSize } else { $ProviderSpecificDetails.TargetVMSize = $ReplicationMigrationItem.ProviderSpecificDetail.TargetVmSize } if ($HasTargetBootDignosticStorageAccount) { $ProviderSpecificDetails.TargetBootDiagnosticsStorageAccountId = $TargetBootDiagnosticsStorageAccount } else { $ProviderSpecificDetails.TargetBootDiagnosticsStorageAccountId = $ReplicationMigrationItem.ProviderSpecificDetail.TargetBootDiagnosticsStorageAccountId } # Storage accounts need to be in the same subscription as that of the VM. if (($null -ne $ProviderSpecificDetails.TargetBootDiagnosticsStorageAccountId) -and ($ProviderSpecificDetails.TargetBootDiagnosticsStorageAccountId.length -gt 1)) { $TargetBDSASubscriptionId = $ProviderSpecificDetails.TargetBootDiagnosticsStorageAccountId.Split('/')[2] $TargetSubscriptionId = $ProviderSpecificDetails.TargetResourceGroupId.Split('/')[2] if ($TargetBDSASubscriptionId -ne $TargetSubscriptionId) { $ProviderSpecificDetails.TargetBootDiagnosticsStorageAccountId = $null } } if ($HasTargetVMName) { if ($TargetVMName.length -gt 64 -or $TargetVMName.length -eq 0) { throw "The target virtual machine name must be between 1 and 64 characters long." } $vmId = $ProviderSpecificDetails.TargetResourceGroupId + "/providers/Microsoft.Compute/virtualMachines/" + $TargetVMName $VMNamePresentinRg = Get-AzResource -ResourceId $vmId -ErrorVariable notPresent -ErrorAction SilentlyContinue if ($VMNamePresentinRg) { throw "The target virtual machine name must be unique in the target resource group." } if ($TargetVMName -notmatch "^[^_\W][a-zA-Z0-9\-]{0,63}(?<![-._])$") { throw "The target virtual machine name must begin with a letter or number, and can contain only letters, numbers, or hyphens(-). The names cannot contain special characters \/""[]:|<>+=;,?*@&, whitespace, or begin with '_' or end with '.' or '-'." } $ProviderSpecificDetails.TargetVMName = $TargetVMName } else { $ProviderSpecificDetails.TargetVMName = $ReplicationMigrationItem.ProviderSpecificDetail.TargetVMName } if ($HasDiskToUpdate) { $diskIdDiskTypeMap = @{} $originalDisks = $ReplicationMigrationItem.ProviderSpecificDetail.ProtectedDisk foreach($DiskObject in $originalDisks) { if ($DiskObject.IsOSDisk -and $DiskObject.IsOSDisk -eq "True") { $previousOsDiskId = $DiskObject.DiskId Break } } $diskNamePresentinRg = New-Object Collections.Generic.List[String] $duplicateDiskName = New-Object System.Collections.Generic.HashSet[String] $uniqueDiskUuids = [System.Collections.Generic.HashSet[String]]::new([StringComparer]::InvariantCultureIgnoreCase) $osDiskCount = 0 foreach($DiskObject in $DiskToUpdate) { if ($DiskObject.IsOSDisk -eq "True") { $osDiskCount++ $changeOsDiskId = $DiskObject.DiskId if ($osDiskCount -gt 1) { throw "Multiple disks have been selected as OS Disk." } } $matchingUserInputDisk = $null $originalDisks = $ReplicationMigrationItem.ProviderSpecificDetail.ProtectedDisk foreach ($orgDisk in $originalDisks) { if ($orgDisk.DiskId -eq $DiskObject.DiskId) { $matchingUserInputDisk = $orgDisk break } } if ($matchingUserInputDisk -ne $null -and [string]::IsNullOrEmpty($DiskObject.TargetDiskName)) { $DiskObject.TargetDiskName = $matchingUserInputDisk.TargetDiskName } if ($matchingUserInputDisk -ne $null -and [string]::IsNullOrEmpty($DiskObject.IsOSDisk)) { $DiskObject.IsOSDisk = $matchingUserInputDisk.IsOSDisk } $diskId = $ProviderSpecificDetails.TargetResourceGroupId + "/providers/Microsoft.Compute/disks/" + $DiskObject.TargetDiskName $diskNamePresent = Get-AzResource -ResourceId $diskId -ErrorVariable notPresent -ErrorAction SilentlyContinue if ($diskNamePresent) { $diskNamePresentinRg.Add($DiskObject.TargetDiskName) } if ($uniqueDiskUuids.Contains($DiskObject.DiskId)) { throw "The disk uuid '$($DiskObject.DiskId)' is already taken." } $res = $uniqueDiskUuids.Add($DiskObject.DiskId) if ($duplicateDiskName.Contains($DiskObject.TargetDiskName)) { throw "The disk name '$($DiskObject.TargetDiskName)' is already taken." } $res = $duplicateDiskName.Add($DiskObject.TargetDiskName) } if ($diskNamePresentinRg) { throw "Disks with name $($diskNamePresentinRg -join ', ')' already exists in the target resource group." } foreach($DiskObject in $DiskToUpdate) { if ($DiskObject.IsOSDisk) { $diskIdDiskTypeMap.Add($DiskObject.DiskId, $DiskObject.IsOSDisk) } } if ($changeOsDiskId -ne $null -and $changeOsDiskId -ne $previousOsDiskId) { if ($diskIdDiskTypeMap.ContainsKey($previousOsDiskId)) { $rem = $diskIdDiskTypeMap.Remove($previousOsDiskId) foreach($DiskObject in $DiskToUpdate) { if ($DiskObject.DiskId -eq $previousOsDiskId) { $DiskObject.IsOsDisk = "False" } } } else { $updateDisk = [Microsoft.Azure.PowerShell.Cmdlets.Migrate.Models.Api202301.VMwareCbtUpdateDiskInput]::new() $updateDisk.DiskId = $previousOsDiskId $updateDisk.IsOSDisk = "False" $originalDisks = $ReplicationMigrationItem.ProviderSpecificDetail.ProtectedDisk foreach ($orgDisk in $originalDisks) { if ($orgDisk.DiskId -eq $previousOsDiskId) { $updateDisk.TargetDiskName = $orgDisk.TargetDiskName break } } $DiskToUpdate += $updateDisk } $diskIdDiskTypeMap.Add($previousOsDiskId, "False") } $osDiskCount = 0 foreach ($DiskObject in $originalDisks) { if ($diskIdDiskTypeMap.Contains($DiskObject.DiskId)) { if ($diskIdDiskTypeMap.($DiskObject.DiskId) -eq "True") { $osDiskCount++ } } elseif ($DiskObject.IsOSDisk -eq "True") { $osDiskCount++ } } if ($osDiskCount -eq 0) { throw "OS disk cannot be excluded from migration." } elseif ($osDiskCount -ne 1) { throw "Multiple disks have been selected as OS Disk." } $ProviderSpecificDetails.VMDisK = $DiskToUpdate } if ($HasTargetDiskName) { if ($TargetDiskName.length -gt 80 -or $TargetDiskName.length -eq 0) { throw "The disk name must be between 1 and 80 characters long." } if ($TargetDiskName -notmatch "^[^_\W][a-zA-Z0-9_\-\.]{0,79}(?<![-.])$") { throw "The disk name must begin with a letter or number, end with a letter, number or underscore, and may contain only letters, numbers, underscores, periods, or hyphens." } $diskId = $ProviderSpecificDetails.TargetResourceGroupId + "/providers/Microsoft.Compute/disks/" + $TargetDiskName $diskNamePresent = Get-AzResource -ResourceId $diskId -ErrorVariable notPresent -ErrorAction SilentlyContinue if ($diskNamePresent) { throw "A disk with name $($TargetDiskName)' already exists in the target resource group." } [Microsoft.Azure.PowerShell.Cmdlets.Migrate.Models.Api202301.IVMwareCbtUpdateDiskInput[]]$updateDisksArray = @() $originalDisks = $ReplicationMigrationItem.ProviderSpecificDetail.ProtectedDisk foreach ($DiskObject in $originalDisks) { if ( $DiskObject.IsOSDisk) { $updateDisk = [Microsoft.Azure.PowerShell.Cmdlets.Migrate.Models.Api202301.VMwareCbtUpdateDiskInput]::new() $updateDisk.DiskId = $DiskObject.DiskId $updateDisk.TargetDiskName = $TargetDiskName $updateDisksArray += $updateDisk $ProviderSpecificDetails.VMDisk = $updateDisksArray break } } } $originalNics = $ReplicationMigrationItem.ProviderSpecificDetail.VMNic [Microsoft.Azure.PowerShell.Cmdlets.Migrate.Models.Api202301.IVMwareCbtNicInput[]]$updateNicsArray = @() $nicNamePresentinRg = New-Object Collections.Generic.List[String] $duplicateNicName = New-Object System.Collections.Generic.HashSet[String] foreach ($storedNic in $originalNics) { $updateNic = [Microsoft.Azure.PowerShell.Cmdlets.Migrate.Models.Api202301.VMwareCbtNicInput]::new() $updateNic.IsPrimaryNic = $storedNic.IsPrimaryNic $updateNic.IsSelectedForMigration = $storedNic.IsSelectedForMigration $updateNic.NicId = $storedNic.NicId $updateNic.TargetStaticIPAddress = $storedNic.TargetIPAddress $updateNic.TestStaticIPAddress = $storedNic.TestIPAddress $updateNic.TargetSubnetName = $storedNic.TargetSubnetName $updateNic.TestSubnetName = $storedNic.TestSubnetName $updateNic.TargetNicName = $storedNic.TargetNicName $matchingUserInputNic = $null if ($HasNicToUpdate) { foreach ($userInputNic in $NicToUpdate) { if ($userInputNic.NicId -eq $storedNic.NicId) { $matchingUserInputNic = $userInputNic break } } } if ($null -ne $matchingUserInputNic) { if ($null -ne $matchingUserInputNic.IsPrimaryNic) { $updateNic.IsPrimaryNic = $matchingUserInputNic.IsPrimaryNic $updateNic.IsSelectedForMigration = $matchingUserInputNic.IsSelectedForMigration if ($updateNic.IsSelectedForMigration -eq "false") { $updateNic.TargetSubnetName = "" $updateNic.TargetStaticIPAddress = "" } } if ($null -ne $matchingUserInputNic.TargetSubnetName) { $updateNic.TargetSubnetName = $matchingUserInputNic.TargetSubnetName } if ($null -ne $matchingUserInputNic.TestSubnetName) { $updateNic.TestSubnetName = $matchingUserInputNic.TestSubnetName } if ($null -ne $matchingUserInputNic.TargetNicName) { $nicId = $ProviderSpecificDetails.TargetResourceGroupId + "/providers/Microsoft.Network/networkInterfaces/" + $matchingUserInputNic.TargetNicName $nicNamePresent = Get-AzResource -ResourceId $nicId -ErrorVariable notPresent -ErrorAction SilentlyContinue if ($nicNamePresent) { $nicNamePresentinRg.Add($matchingUserInputNic.TargetNicName) } $updateNic.TargetNicName = $matchingUserInputNic.TargetNicName if ($duplicateNicName.Contains($matchingUserInputNic.TargetNicName)) { throw "The NIC name '$($matchingUserInputNic.TargetNicName)' is already taken." } $res = $duplicateNicName.Add($matchingUserInputNic.TargetNicName) } if ($null -ne $matchingUserInputNic.TargetStaticIPAddress) { if ($matchingUserInputNic.TargetStaticIPAddress -eq "auto") { $updateNic.TargetStaticIPAddress = $null } else { $isValidIpAddress = [ipaddress]::TryParse($matchingUserInputNic.TargetStaticIPAddress,[ref][ipaddress]::Loopback) if(!$isValidIpAddress) { throw "(InvalidPrivateIPAddressFormat) Static IP address value '$($matchingUserInputNic.TargetStaticIPAddress)' is invalid." } $updateNic.TargetStaticIPAddress = $matchingUserInputNic.TargetStaticIPAddress } } if ($null -ne $matchingUserInputNic.TestStaticIPAddress) { if ($matchingUserInputNic.TestStaticIPAddress -eq "auto") { $updateNic.TestStaticIPAddress = $null } else { $isValidIpAddress = [ipaddress]::TryParse($matchingUserInputNic.TestStaticIPAddress,[ref][ipaddress]::Loopback) if(!$isValidIpAddress) { throw "(InvalidPrivateIPAddressFormat) Static IP address value '$($matchingUserInputNic.TestStaticIPAddress)' is invalid." } $updateNic.TestStaticIPAddress = $matchingUserInputNic.TestStaticIPAddress } } } $updateNicsArray += $updateNic } # validate there is exactly one primary nic $primaryNicCountInUpdate = 0 foreach ($nic in $updateNicsArray) { if ($nic.IsPrimaryNic -eq "true") { $primaryNicCountInUpdate += 1 } } if ($primaryNicCountInUpdate -ne 1) { throw "One NIC has to be Primary." } if ($nicNamePresentinRg) { throw "NIC name '$($nicNamePresentinRg -join ', ')' must be unique in the target resource group." } $ProviderSpecificDetails.VMNic = $updateNicsArray $null = $PSBoundParameters.Add('ProviderSpecificDetail', $ProviderSpecificDetails) $null = $PSBoundParameters.Add('NoWait', $true) $output = Az.Migrate.internal\Update-AzMigrateReplicationMigrationItem @PSBoundParameters $JobName = $output.Target.Split("/")[12].Split("?")[0] $null = $PSBoundParameters.Remove('NoWait') $null = $PSBoundParameters.Remove('ProviderSpecificDetail') $null = $PSBoundParameters.Remove("ResourceGroupName") $null = $PSBoundParameters.Remove("ResourceName") $null = $PSBoundParameters.Remove("FabricName") $null = $PSBoundParameters.Remove("MigrationItemName") $null = $PSBoundParameters.Remove("ProtectionContainerName") $null = $PSBoundParameters.Add('JobName', $JobName) $null = $PSBoundParameters.Add('ResourceName', $VaultName) $null = $PSBoundParameters.Add('ResourceGroupName', $ResourceGroupName) return Az.Migrate.internal\Get-AzMigrateReplicationJob @PSBoundParameters } else { throw "Either machine doesn't exist or provider/action isn't supported for this machine" } } } # SIG # Begin signature block # MIIn0QYJKoZIhvcNAQcCoIInwjCCJ74CAQExDzANBglghkgBZQMEAgEFADB5Bgor # BgEEAYI3AgEEoGswaTA0BgorBgEEAYI3AgEeMCYCAwEAAAQQH8w7YFlLCE63JNLG # KX7zUQIBAAIBAAIBAAIBAAIBADAxMA0GCWCGSAFlAwQCAQUABCBsRK2yyQd0eLuC # 2qF7rs/7N5iJQ9mF74PK5efOLfLlRqCCDYUwggYDMIID66ADAgECAhMzAAADri01 # UchTj1UdAAAAAAOuMA0GCSqGSIb3DQEBCwUAMH4xCzAJBgNVBAYTAlVTMRMwEQYD # VQQIEwpXYXNoaW5ndG9uMRAwD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