From 55f0be8a95b3be1e171fbfb19f177a753d9a89df Mon Sep 17 00:00:00 2001 From: Yabo Hu Date: Mon, 22 Feb 2021 15:33:54 +0800 Subject: [PATCH] GA Az.Migrate (#14265) * Move Migrate to master * Az.Migrate OOB release Co-authored-by: azurepowershell --- src/Migrate/Az.Migrate.psd1 | 267 +++++---- src/Migrate/Changelog.md | 7 + src/Migrate/Properties/AssemblyInfo.cs | 4 +- .../custom/Get-AzMigrateDiscoveredServer.ps1 | 37 +- src/Migrate/custom/Get-AzMigrateJob.ps1 | 129 +++-- .../custom/Get-AzMigrateServerReplication.ps1 | 248 ++++---- ...ize-AzMigrateReplicationInfrastructure.ps1 | 505 ++++++++++++++++ .../custom/New-AzMigrateDiskMapping.ps1 | 28 +- .../custom/New-AzMigrateNicMapping.ps1 | 20 +- src/Migrate/custom/New-AzMigrateProject.ps1 | 2 +- .../custom/New-AzMigrateServerReplication.ps1 | 544 ++++++++++-------- .../Remove-AzMigrateServerReplication.ps1 | 86 +-- .../Restart-AzMigrateServerReplication.ps1 | 99 ++-- .../custom/Set-AzMigrateServerReplication.ps1 | 313 +++++----- .../custom/Start-AzMigrateServerMigration.ps1 | 114 ++-- .../custom/Start-AzMigrateTestMigration.ps1 | 107 ++-- .../Start-AzMigrateTestMigrationCleanup.ps1 | 97 ++-- ...lize-AzMigrateReplicationInfrastructure.md | 10 + .../exports/Get-AzMigrateDiscoveredServer.ps1 | 2 +- src/Migrate/exports/Get-AzMigrateJob.ps1 | 2 +- src/Migrate/exports/Get-AzMigrateProject.ps1 | 2 +- .../Get-AzMigrateReplicationFabric.ps1 | 2 +- .../Get-AzMigrateReplicationPolicy.ps1 | 2 +- ...zMigrateReplicationProtectionContainer.ps1 | 2 +- ...eReplicationProtectionContainerMapping.ps1 | 2 +- ...ateReplicationRecoveryServicesProvider.ps1 | 2 +- .../exports/Get-AzMigrateRunAsAccount.ps1 | 2 +- .../Get-AzMigrateServerReplication.ps1 | 2 +- src/Migrate/exports/Get-AzMigrateSite.ps1 | 2 +- src/Migrate/exports/Get-AzMigrateSolution.ps1 | 2 +- ...ize-AzMigrateReplicationInfrastructure.ps1 | 155 +++++ .../exports/New-AzMigrateDiskMapping.ps1 | 6 +- .../exports/New-AzMigrateNicMapping.ps1 | 3 +- src/Migrate/exports/New-AzMigrateProject.ps1 | 2 +- .../New-AzMigrateReplicationPolicy.ps1 | 2 +- ...eReplicationProtectionContainerMapping.ps1 | 2 +- .../New-AzMigrateServerReplication.ps1 | 9 +- .../exports/ProxyCmdletDefinitions.ps1 | 219 ++++++- .../exports/Register-AzMigrateProjectTool.ps1 | 2 +- .../exports/Remove-AzMigrateProject.ps1 | 2 +- .../Remove-AzMigrateServerReplication.ps1 | 2 +- .../Restart-AzMigrateServerReplication.ps1 | 2 +- .../Set-AzMigrateServerReplication.ps1 | 2 +- .../Start-AzMigrateServerMigration.ps1 | 2 +- .../exports/Start-AzMigrateTestMigration.ps1 | 2 +- .../Start-AzMigrateTestMigrationCleanup.ps1 | 2 +- src/Migrate/generate-info.json | 8 +- src/Migrate/generated/api/Migrate.cs | 14 +- .../Api20180110/A2AApplyRecoveryPointInput.cs | 2 +- .../Api20180110/A2AContainerCreationInput.cs | 2 +- .../Api20180110/A2AContainerMappingInput.cs | 2 +- .../Api20180110/A2AEnableProtectionInput.cs | 2 +- .../Api20180110/A2AFailoverProviderInput.cs | 2 +- .../Api20180110/A2APolicyCreationInput.cs | 2 +- .../Models/Api20180110/A2AReprotectInput.cs | 2 +- .../Api20180110/A2ASwitchProtectionInput.cs | 2 +- .../A2AUpdateContainerMappingInput.cs | 2 +- .../A2AUpdateReplicationProtectedItemInput.cs | 2 +- .../generated/api/Models/Api20180110/Alert.cs | 2 +- .../api/Models/Api20180110/AsrJobDetails.cs | 2 +- .../AutomationRunbookTaskDetails.cs | 2 +- .../Api20180110/AzureFabricCreationInput.cs | 2 +- .../AzureToAzureCreateNetworkMappingInput.cs | 2 +- .../AzureToAzureUpdateNetworkMappingInput.cs | 2 +- .../ConsistencyCheckTaskDetails.cs | 2 +- .../generated/api/Models/Api20180110/Event.cs | 2 +- .../Models/Api20180110/ExportJobDetails.cs | 2 +- .../api/Models/Api20180110/Fabric.cs | 2 +- .../FabricReplicationGroupTaskDetails.cs | 2 +- .../Models/Api20180110/FailoverJobDetails.cs | 2 +- ...perVReplicaAzureApplyRecoveryPointInput.cs | 2 +- ...HyperVReplicaAzureEnableProtectionInput.cs | 2 +- ...HyperVReplicaAzureFailbackProviderInput.cs | 2 +- ...HyperVReplicaAzureFailoverProviderInput.cs | 2 +- .../HyperVReplicaAzurePolicyInput.cs | 2 +- .../HyperVReplicaAzureReprotectInput.cs | 2 +- ...zureUpdateReplicationProtectedItemInput.cs | 2 +- .../HyperVReplicaBluePolicyInput.cs | 2 +- .../Api20180110/HyperVReplicaPolicyInput.cs | 2 +- .../InMageAzureV2ApplyRecoveryPointInput.cs | 2 +- .../InMageAzureV2EnableProtectionInput.cs | 2 +- .../InMageAzureV2FailoverProviderInput.cs | 2 +- .../Api20180110/InMageAzureV2PolicyInput.cs | 2 +- .../InMageAzureV2ReprotectInput.cs | 2 +- ...reV2UpdateReplicationProtectedItemInput.cs | 2 +- ...eDisableProtectionProviderSpecificInput.cs | 2 +- .../InMageEnableProtectionInput.cs | 2 +- .../InMageFailoverProviderInput.cs | 2 +- .../Models/Api20180110/InMagePolicyInput.cs | 2 +- .../Api20180110/InMageReprotectInput.cs | 2 +- .../Api20180110/InlineWorkflowTaskDetails.cs | 4 +- .../generated/api/Models/Api20180110/Job.cs | 2 +- .../api/Models/Api20180110/JobTaskDetails.cs | 2 +- .../api/Models/Api20180110/LogicalNetwork.cs | 2 +- .../Api20180110/ManualActionTaskDetails.cs | 2 +- .../api/Models/Api20180110/MigrationItem.cs | 2 +- .../Api20180110/MigrationRecoveryPoint.cs | 2 +- .../api/Models/Api20180110/Network.cs | 2 +- .../api/Models/Api20180110/NetworkMapping.cs | 2 +- .../api/Models/Api20180110/Policy.cs | 2 +- .../api/Models/Api20180110/ProtectableItem.cs | 2 +- .../Models/Api20180110/ProtectionContainer.cs | 2 +- .../Api20180110/ProtectionContainerMapping.cs | 2 +- .../api/Models/Api20180110/RecoveryPlan.cs | 2 +- .../RecoveryPlanA2AFailoverInput.cs | 2 +- .../RecoveryPlanGroupTaskDetails.cs | 4 +- ...veryPlanHyperVReplicaAzureFailbackInput.cs | 2 +- ...veryPlanHyperVReplicaAzureFailoverInput.cs | 2 +- .../RecoveryPlanInMageAzureV2FailoverInput.cs | 2 +- .../RecoveryPlanInMageFailoverInput.cs | 2 +- .../RecoveryPlanShutdownGroupTaskDetails.cs | 4 +- .../api/Models/Api20180110/RecoveryPoint.cs | 2 +- .../Api20180110/RecoveryServicesProvider.cs | 2 +- .../Api20180110/ReplicationProtectedItem.cs | 2 +- .../Api20180110/SanEnableProtectionInput.cs | 2 +- .../Api20180110/ScriptActionTaskDetails.cs | 2 +- .../Api20180110/StorageClassification.cs | 2 +- .../StorageClassificationMapping.cs | 2 +- .../Api20180110/SwitchProtectionJobDetails.cs | 2 +- .../Api20180110/TestFailoverJobDetails.cs | 2 +- .../Api20180110/VCenterAutoGenerated.cs | 2 +- .../Api20180110/VMNicUpdatesTaskDetails.cs | 2 +- .../VMwareCbtContainerCreationInput.cs | 2 +- .../VMwareCbtContainerMappingInput.cs | 2 +- .../VMwareCbtEnableMigrationInput.cs | 2 +- .../Api20180110/VMwareCbtMigrateInput.cs | 2 +- .../VMwareCbtPolicyCreationInput.cs | 2 +- .../Api20180110/VMwareCbtResyncInput.cs | 2 +- .../Api20180110/VMwareCbtTestMigrateInput.cs | 2 +- .../VMwareCbtUpdateMigrationItemInput.cs | 2 +- .../VMwareV2FabricCreationInput.cs | 2 +- .../Models/Api20180110/VaultHealthDetails.cs | 2 +- .../Api20180110/VirtualMachineTaskDetails.cs | 2 +- .../VmmToAzureCreateNetworkMappingInput.cs | 2 +- .../VmmToAzureUpdateNetworkMappingInput.cs | 2 +- .../VmmToVmmCreateNetworkMappingInput.cs | 2 +- .../VmmToVmmUpdateNetworkMappingInput.cs | 2 +- .../DatabaseMigrateEventProperties.cs | 12 +- .../DatabaseProjectSummary.cs | 6 +- .../MachineMigrateEventProperties.cs | 12 +- .../ServersProjectSummary.cs | 6 +- .../runtime/BuildTime/Cmdlets/ExportPsd1.cs | 2 +- .../BuildTime/Models/PsHelpMarkdownOutputs.cs | 2 +- .../runtime/BuildTime/Models/PsProxyTypes.cs | 2 +- src/Migrate/help/Az.Migrate.md | 3 + ...lize-AzMigrateReplicationInfrastructure.md | 172 ++++++ src/Migrate/help/New-AzMigrateDiskMapping.md | 4 +- .../help/New-AzMigrateServerReplication.md | 30 +- src/Migrate/internal/Get-AzMigrateMachine.ps1 | 2 +- .../internal/Get-AzMigrateOperation.ps1 | 2 +- .../internal/Get-AzMigrateReplicationJob.ps1 | 2 +- .../Get-AzMigrateReplicationMigrationItem.ps1 | 2 +- ...zMigrateResyncReplicationMigrationItem.ps1 | 2 +- ...Move-AzMigrateReplicationMigrationItem.ps1 | 2 +- .../New-AzMigrateReplicationMigrationItem.ps1 | 2 +- .../internal/ProxyCmdletDefinitions.ps1 | 26 +- ...move-AzMigrateReplicationMigrationItem.ps1 | 2 +- src/Migrate/internal/Set-AzMigrateProject.ps1 | 2 +- src/Migrate/internal/Set-AzMigrateSite.ps1 | 2 +- ...MigrateReplicationMigrationItemMigrate.ps1 | 2 +- ...ReplicationMigrationItemMigrateCleanup.ps1 | 2 +- ...date-AzMigrateReplicationMigrationItem.ps1 | 2 +- src/Migrate/readme.md | 2 +- ...MigrateReplicationInfrastructure.Tests.ps1 | 19 + src/Migrate/test/env.json | 85 +-- src/Migrate/test/localEnv.json | 6 +- src/Migrate/test/utils.ps1 | 6 +- tools/Az/Az.psd1 | 1 + 168 files changed, 2433 insertions(+), 1250 deletions(-) create mode 100644 src/Migrate/custom/Initialize-AzMigrateReplicationInfrastructure.ps1 create mode 100644 src/Migrate/examples/Initialize-AzMigrateReplicationInfrastructure.md create mode 100644 src/Migrate/exports/Initialize-AzMigrateReplicationInfrastructure.ps1 create mode 100644 src/Migrate/help/Initialize-AzMigrateReplicationInfrastructure.md create mode 100644 src/Migrate/test/Initialize-AzMigrateReplicationInfrastructure.Tests.ps1 diff --git a/src/Migrate/Az.Migrate.psd1 b/src/Migrate/Az.Migrate.psd1 index b3a1e05df4bf..05c77e83b4ab 100644 --- a/src/Migrate/Az.Migrate.psd1 +++ b/src/Migrate/Az.Migrate.psd1 @@ -3,135 +3,150 @@ # # Generated by: Microsoft Corporation # -# Generated on: 1/13/2021 +# Generated on: 2/19/2021 # @{ - # Script module or binary module file associated with this manifest. - RootModule = './Az.Migrate.psm1' - - # Version number of this module. - ModuleVersion = '0.2.0' - - # Supported PSEditions - CompatiblePSEditions = 'Core', 'Desktop' - - # ID used to uniquely identify this module - GUID = 'c638312b-9fd1-4611-a5cc-11a8caa5b698' - - # Author of this module - Author = 'Microsoft Corporation' - - # Company or vendor of this module - CompanyName = 'Microsoft Corporation' - - # Copyright statement for this module - Copyright = 'Microsoft Corporation. All rights reserved.' - - # Description of the functionality provided by this module - Description = 'Microsoft Azure PowerShell: Migrate cmdlets' - - # Minimum version of the PowerShell engine required by this module - PowerShellVersion = '5.1' - - # Name of the PowerShell host required by this module - # PowerShellHostName = '' - - # Minimum version of the PowerShell host required by this module - # PowerShellHostVersion = '' - - # Minimum version of Microsoft .NET Framework required by this module. This prerequisite is valid for the PowerShell Desktop edition only. - DotNetFrameworkVersion = '4.7.2' - - # Minimum version of the common language runtime (CLR) required by this module. This prerequisite is valid for the PowerShell Desktop edition only. - # ClrVersion = '' - - # Processor architecture (None, X86, Amd64) required by this module - # ProcessorArchitecture = '' - - # Modules that must be imported into the global environment prior to importing this module - RequiredModules = @(@{ModuleName = 'Az.Accounts'; ModuleVersion = '2.2.5'; }) - - # Assemblies that must be loaded prior to importing this module - RequiredAssemblies = './bin/Az.Migrate.private.dll' - - # Script files (.ps1) that are run in the caller's environment prior to importing this module. - # ScriptsToProcess = @() - - # Type files (.ps1xml) to be loaded when importing this module - # TypesToProcess = @() - - # Format files (.ps1xml) to be loaded when importing this module - FormatsToProcess = './Az.Migrate.format.ps1xml' - - # Modules to import as nested modules of the module specified in RootModule/ModuleToProcess - # NestedModules = @() - - # Functions to export from this module, for best performance, do not use wildcards and do not delete the entry, use an empty array if there are no functions to export. - FunctionsToExport = 'Get-AzMigrateDiscoveredServer', 'Get-AzMigrateJob', 'Get-AzMigrateProject', 'Get-AzMigrateReplicationFabric', 'Get-AzMigrateReplicationPolicy', 'Get-AzMigrateReplicationProtectionContainer', 'Get-AzMigrateReplicationProtectionContainerMapping', 'Get-AzMigrateReplicationRecoveryServicesProvider', 'Get-AzMigrateRunAsAccount', 'Get-AzMigrateServerReplication', 'Get-AzMigrateSite', 'Get-AzMigrateSolution', 'New-AzMigrateDiskMapping', 'New-AzMigrateNicMapping', 'New-AzMigrateProject', 'New-AzMigrateReplicationPolicy', 'New-AzMigrateReplicationProtectionContainerMapping', 'New-AzMigrateServerReplication', 'Register-AzMigrateProjectTool', 'Remove-AzMigrateProject', 'Remove-AzMigrateServerReplication', 'Restart-AzMigrateServerReplication', 'Set-AzMigrateServerReplication', 'Start-AzMigrateServerMigration', 'Start-AzMigrateTestMigration', 'Start-AzMigrateTestMigrationCleanup' - - # Cmdlets to export from this module, for best performance, do not use wildcards and do not delete the entry, use an empty array if there are no cmdlets to export. - CmdletsToExport = @() - - # Variables to export from this module - # VariablesToExport = @() - - # Aliases to export from this module, for best performance, do not use wildcards and do not delete the entry, use an empty array if there are no aliases to export. - AliasesToExport = '*' - - # DSC resources to export from this module - # DscResourcesToExport = @() - - # List of all modules packaged with this module - # ModuleList = @() - - # List of all files packaged with this module - # FileList = @() - - # Private data to pass to the module specified in RootModule/ModuleToProcess. This may also contain a PSData hashtable with additional module metadata used by PowerShell. - PrivateData = @{ - - PSData = @{ - - # Tags applied to this module. These help with module discovery in online galleries. - Tags = 'Azure','ResourceManager','ARM','PSModule','Migrate' - - # A URL to the license for this module. - LicenseUri = 'https://aka.ms/azps-license' - - # A URL to the main website for this project. - ProjectUri = 'https://github.com/Azure/azure-powershell' - - # A URL to an icon representing this module. - # IconUri = '' - - # ReleaseNotes of this module - ReleaseNotes = '* Bug fixed in update replication migration item to pass all properties (changed/unchanged) to service, and not just the changed ones. -* Bug fixed in enable migrate to pick correct run as account id for VMware Cbt provider. -* Added new parameter (MachineName) in get replication migration item, to get replication migration item by friendly name. -* Bug fixed in enable migrate to stop passing Target Boot Diagnostic Storage Account if it is in a different subscription id than the target VM. -* Fix to in online URLs of existing code doc.' - - - # Prerelease string of this module - # Prerelease = '' - - # Flag to indicate whether the module requires explicit user acceptance for install/update/save - # RequireLicenseAcceptance = $false - - # External dependent modules of this module - # ExternalModuleDependencies = @() - - } # End of PSData hashtable - - } # End of PrivateData hashtable - - # HelpInfo URI of this module - # HelpInfoURI = '' - - # Default prefix for commands exported from this module. Override the default prefix using Import-Module -Prefix. - # DefaultCommandPrefix = '' - +# Script module or binary module file associated with this manifest. +RootModule = './Az.Migrate.psm1' + +# Version number of this module. +ModuleVersion = '1.0.0' + +# Supported PSEditions +CompatiblePSEditions = 'Core', 'Desktop' + +# ID used to uniquely identify this module +GUID = 'c638312b-9fd1-4611-a5cc-11a8caa5b698' + +# Author of this module +Author = 'Microsoft Corporation' + +# Company or vendor of this module +CompanyName = 'Microsoft Corporation' + +# Copyright statement for this module +Copyright = 'Microsoft Corporation. All rights reserved.' + +# Description of the functionality provided by this module +Description = 'Microsoft Azure PowerShell: Migrate cmdlets' + +# Minimum version of the PowerShell engine required by this module +PowerShellVersion = '5.1' + +# Name of the PowerShell host required by this module +# PowerShellHostName = '' + +# Minimum version of the PowerShell host required by this module +# PowerShellHostVersion = '' + +# Minimum version of Microsoft .NET Framework required by this module. This prerequisite is valid for the PowerShell Desktop edition only. +DotNetFrameworkVersion = '4.7.2' + +# Minimum version of the common language runtime (CLR) required by this module. This prerequisite is valid for the PowerShell Desktop edition only. +# CLRVersion = '' + +# Processor architecture (None, X86, Amd64) required by this module +# ProcessorArchitecture = '' + +# Modules that must be imported into the global environment prior to importing this module +RequiredModules = @(@{ModuleName = 'Az.Accounts'; ModuleVersion = '2.2.5'; }) + +# Assemblies that must be loaded prior to importing this module +RequiredAssemblies = './bin/Az.Migrate.private.dll' + +# Script files (.ps1) that are run in the caller's environment prior to importing this module. +# ScriptsToProcess = @() + +# Type files (.ps1xml) to be loaded when importing this module +# TypesToProcess = @() + +# Format files (.ps1xml) to be loaded when importing this module +FormatsToProcess = './Az.Migrate.format.ps1xml' + +# Modules to import as nested modules of the module specified in RootModule/ModuleToProcess +# NestedModules = @() + +# Functions to export from this module, for best performance, do not use wildcards and do not delete the entry, use an empty array if there are no functions to export. +FunctionsToExport = 'Get-AzMigrateDiscoveredServer', 'Get-AzMigrateJob', + 'Get-AzMigrateProject', 'Get-AzMigrateReplicationFabric', + 'Get-AzMigrateReplicationPolicy', + 'Get-AzMigrateReplicationProtectionContainer', + 'Get-AzMigrateReplicationProtectionContainerMapping', + 'Get-AzMigrateReplicationRecoveryServicesProvider', + 'Get-AzMigrateRunAsAccount', 'Get-AzMigrateServerReplication', + 'Get-AzMigrateSite', 'Get-AzMigrateSolution', + 'Initialize-AzMigrateReplicationInfrastructure', + 'New-AzMigrateDiskMapping', 'New-AzMigrateNicMapping', + 'New-AzMigrateProject', 'New-AzMigrateReplicationPolicy', + 'New-AzMigrateReplicationProtectionContainerMapping', + 'New-AzMigrateServerReplication', 'Register-AzMigrateProjectTool', + 'Remove-AzMigrateProject', 'Remove-AzMigrateServerReplication', + 'Restart-AzMigrateServerReplication', + 'Set-AzMigrateServerReplication', 'Start-AzMigrateServerMigration', + 'Start-AzMigrateTestMigration', + 'Start-AzMigrateTestMigrationCleanup' + +# Cmdlets to export from this module, for best performance, do not use wildcards and do not delete the entry, use an empty array if there are no cmdlets to export. +CmdletsToExport = @() + +# Variables to export from this module +# VariablesToExport = @() + +# Aliases to export from this module, for best performance, do not use wildcards and do not delete the entry, use an empty array if there are no aliases to export. +AliasesToExport = '*' + +# DSC resources to export from this module +# DscResourcesToExport = @() + +# List of all modules packaged with this module +# ModuleList = @() + +# List of all files packaged with this module +# FileList = @() + +# Private data to pass to the module specified in RootModule/ModuleToProcess. This may also contain a PSData hashtable with additional module metadata used by PowerShell. +PrivateData = @{ + + PSData = @{ + + # Tags applied to this module. These help with module discovery in online galleries. + Tags = 'Azure','ResourceManager','ARM','PSModule','Migrate' + + # A URL to the license for this module. + LicenseUri = 'https://aka.ms/azps-license' + + # A URL to the main website for this project. + ProjectUri = 'https://github.com/Azure/azure-powershell' + + # A URL to an icon representing this module. + # IconUri = '' + + # ReleaseNotes of this module + ReleaseNotes = '* Az.Migrate GA +* Incorporated Initialize-AzMigrateReplicationInfrastructure as a cmdlet in the Az.Migrate module, from the external script that is run currently today. +* Made some parameters of New-AzMigrateServerReplication, New-AzMigrateDiskMapping case insensitive. +* Added support for scale appliance change, to handle new V3 keys.' + + # Prerelease string of this module + # Prerelease = '' + + # Flag to indicate whether the module requires explicit user acceptance for install/update/save + # RequireLicenseAcceptance = $false + + # External dependent modules of this module + # ExternalModuleDependencies = @() + + } # End of PSData hashtable + + } # End of PrivateData hashtable + +# HelpInfo URI of this module +# HelpInfoURI = '' + +# Default prefix for commands exported from this module. Override the default prefix using Import-Module -Prefix. +# DefaultCommandPrefix = '' + } diff --git a/src/Migrate/Changelog.md b/src/Migrate/Changelog.md index 5c0f3f716f28..1999103f2fc4 100644 --- a/src/Migrate/Changelog.md +++ b/src/Migrate/Changelog.md @@ -18,6 +18,13 @@ - Additional information about change #1 --> ## Upcoming Release + +## Version 1.0.0 +* Az.Migrate GA +* Incorporated Initialize-AzMigrateReplicationInfrastructure as a cmdlet in the Az.Migrate module, from the external script that is run currently today. +* Made some parameters of New-AzMigrateServerReplication, New-AzMigrateDiskMapping case insensitive. +* Added support for scale appliance change, to handle new V3 keys. + ## Version 0.2.0 * Bug fixed in update replication migration item to pass all properties (changed/unchanged) to service, and not just the changed ones. * Bug fixed in enable migrate to pick correct run as account id for VMware Cbt provider. diff --git a/src/Migrate/Properties/AssemblyInfo.cs b/src/Migrate/Properties/AssemblyInfo.cs index cb5c46b479bc..ee0b1280c993 100644 --- a/src/Migrate/Properties/AssemblyInfo.cs +++ b/src/Migrate/Properties/AssemblyInfo.cs @@ -24,5 +24,5 @@ [assembly: ComVisible(false)] [assembly: CLSCompliant(false)] [assembly: Guid("49de559e-8965-4e80-ba75-d2f2266a0abd")] -[assembly: AssemblyVersion("0.2.0")] -[assembly: AssemblyFileVersion("0.2.0")] +[assembly: AssemblyVersion("1.0.0")] +[assembly: AssemblyFileVersion("1.0.0")] diff --git a/src/Migrate/custom/Get-AzMigrateDiscoveredServer.ps1 b/src/Migrate/custom/Get-AzMigrateDiscoveredServer.ps1 index f0daab6d99ff..e5f820e715e3 100644 --- a/src/Migrate/custom/Get-AzMigrateDiscoveredServer.ps1 +++ b/src/Migrate/custom/Get-AzMigrateDiscoveredServer.ps1 @@ -19,7 +19,7 @@ Get All discovered servers in a migrate project. .Description Get Azure migrate server commandlet fetches all servers in a migrate project. .Link -https://docs.microsoft.com/en-us/powershell/module/az.migrate/get-azmigratediscoveredserver +https://docs.microsoft.com/powershell/module/az.migrate/get-azmigratediscoveredserver #> function Get-AzMigrateDiscoveredServer { @@ -76,18 +76,29 @@ function Get-AzMigrateDiscoveredServer { throw "Server Discovery Solution not found." } - $extendedDetails = $discoverySolution.DetailExtendedDetail["applianceNameToSiteIdMapV2"] | ConvertFrom-Json + $appMapV2 = $discoverySolution.DetailExtendedDetail["applianceNameToSiteIdMapV2"] | ConvertFrom-Json + $appMapV3 = $discoverySolution.DetailExtendedDetail["applianceNameToSiteIdMapV3"] | ConvertFrom-Json + $appMap = @{} + + # Fetch all appliance from V2 map first. Then these can be updated if found again in V3 map. + foreach ($item in $appMapV2) { + $appMap[$item.ApplianceName] = $item.SiteId + } + + foreach ($item in $appMapV3) { + $t = $item.psobject.properties + $appMap[$t.Name] = $t.Value.SiteId + } # Regex to match site name. $r = '(?<=/Microsoft.OffAzure/VMwareSites/).*$' - $siteNameTmp = "" - if ($parameterSet.Contains("Site")) { + if ($parameterSet -match "Site") { #Fetch by site scenario. This is when site name filter is provided. $siteFound = 0 - foreach ($det in $extendedDetails) { - if ($det.ApplianceName -eq $ApplianceName) { - $siteArmId = $det.SiteId + foreach ($kvp in $appMap.GetEnumerator()) { + if ($kvp.Key -eq $ApplianceName) { + $siteArmId = $kvp.Value if ($siteArmId -match $r) { $siteNameTmp = $Matches[0] $siteFound = 1 @@ -98,7 +109,7 @@ function Get-AzMigrateDiscoveredServer { $siteMachines = Get-AzMigrateMachine -ResourceGroupName $ResourceGroupName -SiteName $siteNameTmp -SubscriptionId $SubscriptionId if ($DisplayName) { - $filteredMachines = $siteMachines | Where-Object {$_.DisplayName.Contains($DisplayName)} + $filteredMachines = $siteMachines | Where-Object {$_.DisplayName -match $DisplayName} return $filteredMachines } else { @@ -118,8 +129,8 @@ function Get-AzMigrateDiscoveredServer { $projectSdsMachines = [System.Collections.ArrayList]::new() if ($parameterSet -eq 'List') { - foreach ($det in $extendedDetails) { - $siteArmId = $det.SiteId + foreach ($kvp in $appMap.GetEnumerator()) { + $siteArmId = $kvp.Value if ($siteArmId -match $r) { $siteNameTmp = $Matches[0] @@ -131,7 +142,7 @@ function Get-AzMigrateDiscoveredServer { } if ($DisplayName) { - $filteredMachines = $projectSdsMachines | Where-Object {$_.DisplayName.Contains($DisplayName)} + $filteredMachines = $projectSdsMachines | Where-Object {$_.DisplayName -match $DisplayName} return $filteredMachines } else { @@ -139,8 +150,8 @@ function Get-AzMigrateDiscoveredServer { } } elseif ($parameterSet -eq 'Get') { - foreach ($det in $extendedDetails) { - $siteArmId = $det.SiteId + foreach ($kvp in $appMap.GetEnumerator()) { + $siteArmId = $kvp.Value if ($siteArmId -match $r) { $siteNameTmp = $Matches[0] diff --git a/src/Migrate/custom/Get-AzMigrateJob.ps1 b/src/Migrate/custom/Get-AzMigrateJob.ps1 index 605d37e91fc1..1f32ff133a39 100644 --- a/src/Migrate/custom/Get-AzMigrateJob.ps1 +++ b/src/Migrate/custom/Get-AzMigrateJob.ps1 @@ -19,58 +19,58 @@ Retrieves the status of an Azure Migrate job. .Description The Get-AzMigrateJob cmdlet retrives the status of an Azure Migrate job. .Link -https://docs.microsoft.com/en-us/powershell/module/az.migrate/get-azmigratejob +https://docs.microsoft.com/powershell/module/az.migrate/get-azmigratejob #> function Get-AzMigrateJob { [OutputType([Microsoft.Azure.PowerShell.Cmdlets.Migrate.Models.Api20180110.IJob])] - [CmdletBinding(DefaultParameterSetName='ListByName', PositionalBinding=$false)] + [CmdletBinding(DefaultParameterSetName = 'ListByName', PositionalBinding = $false)] param( - [Parameter(ParameterSetName='GetById', Mandatory)] + [Parameter(ParameterSetName = 'GetById', Mandatory)] [Microsoft.Azure.PowerShell.Cmdlets.Migrate.Category('Path')] [System.String] # Specifies the job id for which the details needs to be retrieved. ${JobID}, - [Parameter(ParameterSetName='GetByName', Mandatory)] - [Parameter(ParameterSetName='ListByName', Mandatory)] + [Parameter(ParameterSetName = 'GetByName', Mandatory)] + [Parameter(ParameterSetName = 'ListByName', Mandatory)] [Microsoft.Azure.PowerShell.Cmdlets.Migrate.Category('Path')] [System.String] # The name of the resource group where the recovery services vault is present. ${ResourceGroupName}, - [Parameter(ParameterSetName='GetByName', Mandatory)] - [Parameter(ParameterSetName='ListByName', Mandatory)] + [Parameter(ParameterSetName = 'GetByName', Mandatory)] + [Parameter(ParameterSetName = 'ListByName', Mandatory)] [Microsoft.Azure.PowerShell.Cmdlets.Migrate.Category('Path')] [System.String] # The name of the migrate project. ${ProjectName}, - [Parameter(ParameterSetName='GetByName', Mandatory)] + [Parameter(ParameterSetName = 'GetByName', Mandatory)] [Microsoft.Azure.PowerShell.Cmdlets.Migrate.Category('Path')] [System.String] # Job identifier ${JobName}, - [Parameter(ParameterSetName='GetByInputObject', Mandatory)] + [Parameter(ParameterSetName = 'GetByInputObject', Mandatory)] [Microsoft.Azure.PowerShell.Cmdlets.Migrate.Category('Path')] [Microsoft.Azure.PowerShell.Cmdlets.Migrate.Models.Api20180110.IJob] # Specifies the job object of the replicating server. ${InputObject}, - [Parameter(ParameterSetName='ListById', Mandatory)] + [Parameter(ParameterSetName = 'ListById', Mandatory)] [Microsoft.Azure.PowerShell.Cmdlets.Migrate.Category('Path')] [System.String] # Specifies the Resource Group of the Azure Migrate Project in the current subscription. ${ResourceGroupID}, - [Parameter(ParameterSetName='ListById', Mandatory)] + [Parameter(ParameterSetName = 'ListById', Mandatory)] [Microsoft.Azure.PowerShell.Cmdlets.Migrate.Category('Path')] [System.String] # Specifies the Azure Migrate Project in which servers are replicating. ${ProjectID}, - [Parameter(ParameterSetName='ListByName')] - [Parameter(ParameterSetName='ListById')] + [Parameter(ParameterSetName = 'ListByName')] + [Parameter(ParameterSetName = 'ListById')] [Microsoft.Azure.PowerShell.Cmdlets.Migrate.Category('Query')] [System.String] # OData filter options. @@ -78,7 +78,7 @@ function Get-AzMigrateJob { [Parameter()] [Microsoft.Azure.PowerShell.Cmdlets.Migrate.Category('Path')] - [Microsoft.Azure.PowerShell.Cmdlets.Migrate.Runtime.DefaultInfo(Script='(Get-AzContext).Subscription.Id')] + [Microsoft.Azure.PowerShell.Cmdlets.Migrate.Runtime.DefaultInfo(Script = '(Get-AzContext).Subscription.Id')] [System.String] # Azure Subscription ID. ${SubscriptionId}, @@ -132,61 +132,64 @@ function Get-AzMigrateJob { ) process { - $parameterSet = $PSCmdlet.ParameterSetName - $null = $PSBoundParameters.Remove('JobID') - $null = $PSBoundParameters.Remove('ResourceGroupName') - $null = $PSBoundParameters.Remove('ProjectName') - $null = $PSBoundParameters.Remove('JobName') - $null = $PSBoundParameters.Remove('InputObject') - $null = $PSBoundParameters.Remove('InputServerObject') - $null = $PSBoundParameters.Remove('ResourceGroupID') - $null = $PSBoundParameters.Remove('ProjectID') - $HasFilter = $PSBoundParameters.ContainsKey('Filter') - $null = $PSBoundParameters.Remove('Filter') + $parameterSet = $PSCmdlet.ParameterSetName + $null = $PSBoundParameters.Remove('JobID') + $null = $PSBoundParameters.Remove('ResourceGroupName') + $null = $PSBoundParameters.Remove('ProjectName') + $null = $PSBoundParameters.Remove('JobName') + $null = $PSBoundParameters.Remove('InputObject') + $null = $PSBoundParameters.Remove('InputServerObject') + $null = $PSBoundParameters.Remove('ResourceGroupID') + $null = $PSBoundParameters.Remove('ProjectID') + $HasFilter = $PSBoundParameters.ContainsKey('Filter') + $null = $PSBoundParameters.Remove('Filter') - if(($parameterSet -match 'Name') -or ($parameterSet -eq 'ListById')){ - if($parameterSet -eq 'ListById'){ - $ProjectName = $ProjectID.Split("/")[8] - $ResourceGroupName = $ResourceGroupID.Split("/")[4] - } - $null = $PSBoundParameters.Add("ResourceGroupName", $ResourceGroupName) - $null = $PSBoundParameters.Add("Name", "Servers-Migration-ServerMigration") - $null = $PSBoundParameters.Add("MigrateProjectName", $ProjectName) + if (($parameterSet -match 'Name') -or ($parameterSet -eq 'ListById')) { + if ($parameterSet -eq 'ListById') { + $ProjectName = $ProjectID.Split("/")[8] + $ResourceGroupName = $ResourceGroupID.Split("/")[4] + } + $null = $PSBoundParameters.Add("ResourceGroupName", $ResourceGroupName) + $null = $PSBoundParameters.Add("Name", "Servers-Migration-ServerMigration") + $null = $PSBoundParameters.Add("MigrateProjectName", $ProjectName) - $solution = Az.Migrate\Get-AzMigrateSolution @PSBoundParameters - if($solution -and ($solution.Count -ge 1)){ - $ResourceName = $solution.DetailExtendedDetail.AdditionalProperties.vaultId.Split("/")[8] - }else{ - throw "Solution not found." - } - $null = $PSBoundParameters.Remove("Name") - $null = $PSBoundParameters.Remove("MigrateProjectName") - $null = $PSBoundParameters.Remove("ResourceGroupName") - }else{ - if($parameterSet -eq 'GetByInputObject'){ - $JobID = $InputObject.Id - } - $JobIdArray = $JobID.split('/') - $JobName = $JobIdArray[10] - $ResourceName = $JobIdArray[8] - $ResourceGroupName = $JobIdArray[4] + $solution = Az.Migrate\Get-AzMigrateSolution @PSBoundParameters + if ($solution -and ($solution.Count -ge 1)) { + $ResourceName = $solution.DetailExtendedDetail.AdditionalProperties.vaultId.Split("/")[8] + } + else { + throw "Solution not found." } + $null = $PSBoundParameters.Remove("Name") + $null = $PSBoundParameters.Remove("MigrateProjectName") + $null = $PSBoundParameters.Remove("ResourceGroupName") + } + else { + if ($parameterSet -eq 'GetByInputObject') { + $JobID = $InputObject.Id + } + $JobIdArray = $JobID.split('/') + $JobName = $JobIdArray[10] + $ResourceName = $JobIdArray[8] + $ResourceGroupName = $JobIdArray[4] + } - if($parameterSet -match 'Get'){ - $null = $PSBoundParameters.Add('JobName', $JobName) - $null = $PSBoundParameters.Add('ResourceName', $ResourceName) - $null = $PSBoundParameters.Add('ResourceGroupName', $ResourceGroupName) + if ($parameterSet -match 'Get') { + $null = $PSBoundParameters.Add('JobName', $JobName) + $null = $PSBoundParameters.Add('ResourceName', $ResourceName) + $null = $PSBoundParameters.Add('ResourceGroupName', $ResourceGroupName) - return Az.Migrate.internal\Get-AzMigrateReplicationJob @PSBoundParameters - }else{ - $null = $PSBoundParameters.Add('ResourceName', $ResourceName) - $null = $PSBoundParameters.Add('ResourceGroupName', $ResourceGroupName) - if($HasFilter){$null = $PSBoundParameters.Add('Filter', $Filter)} - - return Az.Migrate.internal\Get-AzMigrateReplicationJob @PSBoundParameters + return Az.Migrate.internal\Get-AzMigrateReplicationJob @PSBoundParameters + } + else { + $null = $PSBoundParameters.Add('ResourceName', $ResourceName) + $null = $PSBoundParameters.Add('ResourceGroupName', $ResourceGroupName) + if ($HasFilter) { + $null = $PSBoundParameters.Add('Filter', $Filter) } - - + + return Az.Migrate.internal\Get-AzMigrateReplicationJob @PSBoundParameters + } } } \ No newline at end of file diff --git a/src/Migrate/custom/Get-AzMigrateServerReplication.ps1 b/src/Migrate/custom/Get-AzMigrateServerReplication.ps1 index 7d69215ad9e8..99e5470b80cf 100644 --- a/src/Migrate/custom/Get-AzMigrateServerReplication.ps1 +++ b/src/Migrate/custom/Get-AzMigrateServerReplication.ps1 @@ -19,71 +19,71 @@ Retrieves the details of the replicating server. .Description The Get-AzMigrateServerReplication cmdlet retrieves the object for the replicating server. .Link -https://docs.microsoft.com/en-us/powershell/module/az.migrate/get-azmigrateserverreplication +https://docs.microsoft.com/powershell/module/az.migrate/get-azmigrateserverreplication #> function Get-AzMigrateServerReplication { [OutputType([Microsoft.Azure.PowerShell.Cmdlets.Migrate.Models.Api20180110.IMigrationItem])] - [CmdletBinding(DefaultParameterSetName='ListByName', PositionalBinding=$false)] + [CmdletBinding(DefaultParameterSetName = 'ListByName', PositionalBinding = $false)] param( - [Parameter(ParameterSetName='GetBySRSID', Mandatory)] + [Parameter(ParameterSetName = 'GetBySRSID', Mandatory)] [Microsoft.Azure.PowerShell.Cmdlets.Migrate.Category('Path')] [System.String] # Specifies the replicating server. ${TargetObjectID}, - [Parameter(ParameterSetName='ListByName', Mandatory)] - [Parameter(ParameterSetName='GetByMachineName', Mandatory)] + [Parameter(ParameterSetName = 'ListByName', Mandatory)] + [Parameter(ParameterSetName = 'GetByMachineName', Mandatory)] [Microsoft.Azure.PowerShell.Cmdlets.Migrate.Category('Path')] [System.String] # Specifies the Resource Group of the Azure Migrate Project in the current subscription. ${ResourceGroupName}, - [Parameter(ParameterSetName='ListByName', Mandatory)] - [Parameter(ParameterSetName='GetByMachineName', Mandatory)] + [Parameter(ParameterSetName = 'ListByName', Mandatory)] + [Parameter(ParameterSetName = 'GetByMachineName', Mandatory)] [Microsoft.Azure.PowerShell.Cmdlets.Migrate.Category('Path')] [System.String] # Specifies the Azure Migrate project in the current subscription. ${ProjectName}, - [Parameter(ParameterSetName='GetBySDSID', Mandatory)] + [Parameter(ParameterSetName = 'GetBySDSID', Mandatory)] [Microsoft.Azure.PowerShell.Cmdlets.Migrate.Category('Path')] [System.String] # Specifies the machine ID of the discovered server. ${DiscoveredMachineId}, - [Parameter(ParameterSetName='GetByInputObject', Mandatory)] + [Parameter(ParameterSetName = 'GetByInputObject', Mandatory)] [Microsoft.Azure.PowerShell.Cmdlets.Migrate.Category('Path')] [Microsoft.Azure.PowerShell.Cmdlets.Migrate.Models.Api20180110.IMigrationItem] # Specifies the machine object of the replicating server. ${InputObject}, - [Parameter(ParameterSetName='ListById', Mandatory)] + [Parameter(ParameterSetName = 'ListById', Mandatory)] [Microsoft.Azure.PowerShell.Cmdlets.Migrate.Category('Path')] [System.String] # Specifies the Resource Group of the Azure Migrate Project in the current subscription. ${ResourceGroupID}, - [Parameter(ParameterSetName='ListById', Mandatory)] + [Parameter(ParameterSetName = 'ListById', Mandatory)] [Microsoft.Azure.PowerShell.Cmdlets.Migrate.Category('Path')] [System.String] # Specifies the Azure Migrate Project in which servers are replicating. ${ProjectID}, - [Parameter(ParameterSetName='GetByMachineName', Mandatory)] + [Parameter(ParameterSetName = 'GetByMachineName', Mandatory)] [Microsoft.Azure.PowerShell.Cmdlets.Migrate.Category('Path')] [System.String] # Specifies the display name of the replicating machine. ${MachineName}, - [Parameter(ParameterSetName='ListByName')] - [Parameter(ParameterSetName='ListById')] + [Parameter(ParameterSetName = 'ListByName')] + [Parameter(ParameterSetName = 'ListById')] [Microsoft.Azure.PowerShell.Cmdlets.Migrate.Category('Query')] [System.String] # OData filter options. ${Filter}, - [Parameter(ParameterSetName='ListByName')] - [Parameter(ParameterSetName='ListById')] + [Parameter(ParameterSetName = 'ListByName')] + [Parameter(ParameterSetName = 'ListById')] [Microsoft.Azure.PowerShell.Cmdlets.Migrate.Category('Query')] [System.String] # The pagination token. @@ -91,7 +91,7 @@ function Get-AzMigrateServerReplication { [Parameter()] [Microsoft.Azure.PowerShell.Cmdlets.Migrate.Category('Path')] - [Microsoft.Azure.PowerShell.Cmdlets.Migrate.Runtime.DefaultInfo(Script='(Get-AzContext).Subscription.Id')] + [Microsoft.Azure.PowerShell.Cmdlets.Migrate.Runtime.DefaultInfo(Script = '(Get-AzContext).Subscription.Id')] [System.String] # Azure Subscription ID. ${SubscriptionId}, @@ -145,129 +145,135 @@ function Get-AzMigrateServerReplication { ) process { - $parameterSet = $PSCmdlet.ParameterSetName - $null = $PSBoundParameters.Remove('TargetObjectID') - $null = $PSBoundParameters.Remove('ResourceGroupName') - $null = $PSBoundParameters.Remove('ProjectName') - $null = $PSBoundParameters.Remove('DiscoveredMachineId') - $null = $PSBoundParameters.Remove('InputObject') - $null = $PSBoundParameters.Remove('ResourceGroupID') - $null = $PSBoundParameters.Remove('ProjectID') - $HasFilter = $PSBoundParameters.ContainsKey('Filter') - $HasSkipToken = $PSBoundParameters.ContainsKey('SkipToken') - $null = $PSBoundParameters.Remove('Filter') - $null = $PSBoundParameters.Remove('SkipToken') - $null = $PSBoundParameters.Remove('MachineName') + $parameterSet = $PSCmdlet.ParameterSetName + $null = $PSBoundParameters.Remove('TargetObjectID') + $null = $PSBoundParameters.Remove('ResourceGroupName') + $null = $PSBoundParameters.Remove('ProjectName') + $null = $PSBoundParameters.Remove('DiscoveredMachineId') + $null = $PSBoundParameters.Remove('InputObject') + $null = $PSBoundParameters.Remove('ResourceGroupID') + $null = $PSBoundParameters.Remove('ProjectID') + $HasFilter = $PSBoundParameters.ContainsKey('Filter') + $HasSkipToken = $PSBoundParameters.ContainsKey('SkipToken') + $null = $PSBoundParameters.Remove('Filter') + $null = $PSBoundParameters.Remove('SkipToken') + $null = $PSBoundParameters.Remove('MachineName') - if ($parameterSet -eq "GetBySDSID"){ - $MachineIdArray = $DiscoveredMachineId.Split("/") - $SiteType = $MachineIdArray[7] - $SiteName = $MachineIdArray[8] - $ResourceGroupName = $MachineIdArray[4] - $MachineName = $MachineIdArray[10] + if ($parameterSet -eq "GetBySDSID") { + $MachineIdArray = $DiscoveredMachineId.Split("/") + $SiteType = $MachineIdArray[7] + $SiteName = $MachineIdArray[8] + $ResourceGroupName = $MachineIdArray[4] + $MachineName = $MachineIdArray[10] - if ($SiteType -ne "VMwareSites"){ - throw "Provider not supported." - } + if ($SiteType -ne "VMwareSites") { + throw "Provider not supported." + } - $null = $PSBoundParameters.Add('ResourceGroupName', $ResourceGroupName) - $null = $PSBoundParameters.Add('SiteName', $SiteName) - $siteObject = Az.Migrate\Get-AzMigrateSite @PSBoundParameters - $ProjectName = $siteObject.DiscoverySolutionId.Split("/")[8] + $null = $PSBoundParameters.Add('ResourceGroupName', $ResourceGroupName) + $null = $PSBoundParameters.Add('SiteName', $SiteName) + $siteObject = Az.Migrate\Get-AzMigrateSite @PSBoundParameters + $ProjectName = $siteObject.DiscoverySolutionId.Split("/")[8] - $null = $PSBoundParameters.Remove('SiteName') + $null = $PSBoundParameters.Remove('SiteName') - $null = $PSBoundParameters.Add("Name", "Servers-Migration-ServerMigration") - $null = $PSBoundParameters.Add("MigrateProjectName", $ProjectName) + $null = $PSBoundParameters.Add("Name", "Servers-Migration-ServerMigration") + $null = $PSBoundParameters.Add("MigrateProjectName", $ProjectName) - $solution = Az.Migrate\Get-AzMigrateSolution @PSBoundParameters - if($solution -and ($solution.Count -ge 1)){ - $VaultName = $solution.DetailExtendedDetail.AdditionalProperties.vaultId.Split("/")[8] + $solution = Az.Migrate\Get-AzMigrateSolution @PSBoundParameters + if ($solution -and ($solution.Count -ge 1)) { + $VaultName = $solution.DetailExtendedDetail.AdditionalProperties.vaultId.Split("/")[8] - $null = $PSBoundParameters.Remove("Name") - $null = $PSBoundParameters.Remove("MigrateProjectName") - $null = $PSBoundParameters.Add('ResourceName', $VaultName) - $allFabrics = Az.Migrate\Get-AzMigrateReplicationFabric @PSBoundParameters - $FabricName = "" - if($allFabrics -and ($allFabrics.length -gt 0)){ - foreach ($fabric in $allFabrics) { - if(($fabric.Property.CustomDetail.InstanceType -ceq "VMwareV2") -and ($fabric.Property.CustomDetail.VmwareSiteId.Split("/")[8] -ceq $SiteName)){ - $FabricName = $fabric.Name - break - } + $null = $PSBoundParameters.Remove("Name") + $null = $PSBoundParameters.Remove("MigrateProjectName") + $null = $PSBoundParameters.Add('ResourceName', $VaultName) + $allFabrics = Az.Migrate\Get-AzMigrateReplicationFabric @PSBoundParameters + $FabricName = "" + if ($allFabrics -and ($allFabrics.length -gt 0)) { + foreach ($fabric in $allFabrics) { + if (($fabric.Property.CustomDetail.InstanceType -ceq "VMwareV2") -and ($fabric.Property.CustomDetail.VmwareSiteId.Split("/")[8] -ceq $SiteName)) { + $FabricName = $fabric.Name + break } } - if($FabricName -eq ""){ - throw "Fabric not found for given resource group" - } + } + if ($FabricName -eq "") { + throw "Fabric not found for given resource group" + } - $null = $PSBoundParameters.Add('FabricName', $FabricName) - $peContainers = Az.Migrate\Get-AzMigrateReplicationProtectionContainer @PSBoundParameters - $ProtectionContainerName = "" - if($peContainers -and ($peContainers.length -gt 0)){ - $ProtectionContainerName = $peContainers[0].Name - } + $null = $PSBoundParameters.Add('FabricName', $FabricName) + $peContainers = Az.Migrate\Get-AzMigrateReplicationProtectionContainer @PSBoundParameters + $ProtectionContainerName = "" + if ($peContainers -and ($peContainers.length -gt 0)) { + $ProtectionContainerName = $peContainers[0].Name + } - if($ProtectionContainerName -eq ""){ - throw "Container not found for given resource group" - } + if ($ProtectionContainerName -eq "") { + throw "Container not found for given resource group" + } - $null = $PSBoundParameters.Add("MigrationItemName", $MachineName) - $null = $PSBoundParameters.Add("ProtectionContainerName", $ProtectionContainerName) + $null = $PSBoundParameters.Add("MigrationItemName", $MachineName) + $null = $PSBoundParameters.Add("ProtectionContainerName", $ProtectionContainerName) - return Az.Migrate.internal\Get-AzMigrateReplicationMigrationItem @PSBoundParameters - }else{ - throw "Solution not found." - } + return Az.Migrate.internal\Get-AzMigrateReplicationMigrationItem @PSBoundParameters + } + else { + throw "Solution not found." } + } - if(($parameterSet -match 'List') -or ($parameterSet -eq "GetByMachineName")){ - if($parameterSet -eq 'ListById'){ - $ProjectName = $ProjectID.Split("/")[8] - $ResourceGroupName = $ResourceGroupID.Split("/")[4] - } - $null = $PSBoundParameters.Add("ResourceGroupName", $ResourceGroupName) - $null = $PSBoundParameters.Add("Name", "Servers-Migration-ServerMigration") - $null = $PSBoundParameters.Add("MigrateProjectName", $ProjectName) + if (($parameterSet -match 'List') -or ($parameterSet -eq "GetByMachineName")) { + if ($parameterSet -eq 'ListById') { + $ProjectName = $ProjectID.Split("/")[8] + $ResourceGroupName = $ResourceGroupID.Split("/")[4] + } + $null = $PSBoundParameters.Add("ResourceGroupName", $ResourceGroupName) + $null = $PSBoundParameters.Add("Name", "Servers-Migration-ServerMigration") + $null = $PSBoundParameters.Add("MigrateProjectName", $ProjectName) - $solution = Az.Migrate\Get-AzMigrateSolution @PSBoundParameters - if($solution -and ($solution.Count -ge 1)){ - $VaultName = $solution.DetailExtendedDetail.AdditionalProperties.vaultId.Split("/")[8] - }else{ - throw "Solution not found." - } + $solution = Az.Migrate\Get-AzMigrateSolution @PSBoundParameters + if ($solution -and ($solution.Count -ge 1)) { + $VaultName = $solution.DetailExtendedDetail.AdditionalProperties.vaultId.Split("/")[8] + } + else { + throw "Solution not found." + } - $null = $PSBoundParameters.Remove("Name") - $null = $PSBoundParameters.Remove("MigrateProjectName") - $null = $PSBoundParameters.Add('ResourceName', $VaultName) + $null = $PSBoundParameters.Remove("Name") + $null = $PSBoundParameters.Remove("MigrateProjectName") + $null = $PSBoundParameters.Add('ResourceName', $VaultName) - if($HasFilter){$null = $PSBoundParameters.Add("Filter", $Filter)} - if($HasSkipToken){$null = $PSBoundParameters.Add("SkipToken", $SkipToken)} + if ($HasFilter) { + $null = $PSBoundParameters.Add("Filter", $Filter) + } + if ($HasSkipToken) { + $null = $PSBoundParameters.Add("SkipToken", $SkipToken) + } - $replicatingItems = Az.Migrate.internal\Get-AzMigrateReplicationMigrationItem @PSBoundParameters - if($parameterSet -eq "GetByMachineName"){ - $replicatingItems = $replicatingItems | Where-Object {$_.MachineName -eq $MachineName} - } - return $replicatingItems + $replicatingItems = Az.Migrate.internal\Get-AzMigrateReplicationMigrationItem @PSBoundParameters + if ($parameterSet -eq "GetByMachineName") { + $replicatingItems = $replicatingItems | Where-Object { $_.MachineName -eq $MachineName } } + return $replicatingItems + } - if (($parameterSet -eq "GetByInputObject") -or ($parameterSet -eq "GetBySRSID")){ - if($parameterSet -eq 'GetByInputObject'){ - $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) + if (($parameterSet -eq "GetByInputObject") -or ($parameterSet -eq "GetBySRSID")) { + if ($parameterSet -eq 'GetByInputObject') { + $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) - return Az.Migrate.internal\Get-AzMigrateReplicationMigrationItem @PSBoundParameters - } - } -} \ No newline at end of file + return Az.Migrate.internal\Get-AzMigrateReplicationMigrationItem @PSBoundParameters + } + } +} \ No newline at end of file diff --git a/src/Migrate/custom/Initialize-AzMigrateReplicationInfrastructure.ps1 b/src/Migrate/custom/Initialize-AzMigrateReplicationInfrastructure.ps1 new file mode 100644 index 000000000000..fa0554057890 --- /dev/null +++ b/src/Migrate/custom/Initialize-AzMigrateReplicationInfrastructure.ps1 @@ -0,0 +1,505 @@ + +# ---------------------------------------------------------------------------------- +# +# 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 +Initialises the infrastructure for the migrate project. +.Description +The Initialize-AzMigrateReplicationInfrastructure cmdlet initialises the infrastructure for the migrate project. +.Link +https://docs.microsoft.com/powershell/module/az.migrate/initialize-azmigratereplicationinfrastructure +#> +function Initialize-AzMigrateReplicationInfrastructure { + [OutputType([System.Boolean])] + [CmdletBinding(DefaultParameterSetName = 'agentlessVMware', PositionalBinding = $false, SupportsShouldProcess, ConfirmImpact = 'Medium')] + + param( + [Parameter(Mandatory)] + [ValidateNotNull()] + [Microsoft.Azure.PowerShell.Cmdlets.Migrate.Category('Path')] + [System.String] + # Specifies the Resource Group of the Azure Migrate Project in the current subscription. + ${ResourceGroupName}, + + [Parameter(Mandatory)] + [ValidateNotNull()] + [Microsoft.Azure.PowerShell.Cmdlets.Migrate.Category('Path')] + [System.String] + # Specifies the name of the Azure Migrate project to be used for server migration. + ${ProjectName}, + + [Parameter(Mandatory)] + [ValidateSet("agentlessVMware")] + [ArgumentCompleter({"agentlessVMware"})] + [Microsoft.Azure.PowerShell.Cmdlets.Migrate.Category('Path')] + [System.String] + # Specifies the server migration scenario for which the replication infrastructure needs to be initialized. + ${Scenario}, + + [Parameter(Mandatory)] + [ValidateNotNull()] + [Microsoft.Azure.PowerShell.Cmdlets.Migrate.Category('Path')] + [System.String] + # Specifies the target Azure region for server migrations. + ${TargetRegion}, + + [Parameter()] + [System.String] + [Microsoft.Azure.PowerShell.Cmdlets.Migrate.Runtime.DefaultInfo(Script = '(Get-AzContext).Subscription.Id')] + # Azure 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 { + Import-Module Az.Resources + Import-Module Az.KeyVault + Import-Module Az.Storage + Import-Module Az.ServiceBus + + # Validate user specified target region + $TargetRegion = $TargetRegion.ToLower() + $allAvailableAzureLocations = Get-AzLocation + $matchingLocationByLocationName = $allAvailableAzureLocations | Where-Object { $_.Location -eq $TargetRegion } + $matchingLocationByDisplayName = $allAvailableAzureLocations | Where-Object { $_.DisplayName -eq $TargetRegion } + + if ($matchingLocationByLocationName) { + $TargetRegion = $matchingLocationByLocationName.Location + } + elseif ($matchingLocationByDisplayName) { + $TargetRegion = $matchingLocationByDisplayName.Location + } + elseif ($TargetRegion -match "euap") { + } + else { + throw "Creation of resources required for replication failed due to invalid location. Run Get-AzLocation to verify the validity of the location and retry this step." + } + + # Get/Set SubscriptionId + if (($null -eq $SubscriptionId) -or ($SubscriptionId -eq "")) { + $context = Get-AzContext + $SubscriptionId = $context.Subscription.Id + if (($null -eq $SubscriptionId) -or ($SubscriptionId -eq "")) { + throw "Please login to Azure to select a subscription." + } + } + else { + Select-AzSubscription -SubscriptionId $SubscriptionId + } + $context = Get-AzContext + Write-Host "Using Subscription Id: ", $SubscriptionId + Write-Host "Selected Target Region: ", $TargetRegion + + $rg = Get-AzResourceGroup -Name $ResourceGroupName -ErrorVariable notPresent -ErrorAction SilentlyContinue + if (!$rg) { + Write-Host "Creating Resource Group ", $ResourceGroupName + $output = New-AzResourceGroup -Name $ResourceGroupName -Location $TargetRegion + Write-Host $ResourceGroupName, " created." + } + Write-Host "Selected resource group : ", $ResourceGroupName + + $LogStringCreated = "Created : " + $LogStringSkipping = " already exists." + + # Hash code source code + $Source = @" +using System; +public class HashFunctions +{ +public static int hashForArtifact(String artifact) +{ + int hash = 0; + int al = artifact.Length; + int tl = 0; + char[] ac = artifact.ToCharArray(); + while (tl < al) + { + hash = ((hash << 5) - hash) + ac[tl++] | 0; + } + return Math.Abs(hash); +} +} +"@ + + # Get all appliances and sites in the project + $solution = Get-AzMigrateSolution -MigrateProjectName $ProjectName -ResourceGroupName $ResourceGroupName -Name "Servers-Migration-ServerMigration" + $VaultName = $solution.DetailExtendedDetail.AdditionalProperties.vaultId.Split("/")[8] + $appMapV2 = $solution.DetailExtendedDetail.AdditionalProperties["applianceNameToSiteIdMapV2"] | ConvertFrom-Json + $appMapV3 = $solution.DetailExtendedDetail.AdditionalProperties["applianceNameToSiteIdMapV3"] | ConvertFrom-Json + $appMap = @{} + + # Fetch all appliance from V2 map first. Then these can be updated if found again in V3 map. + foreach ($item in $appMapV2) { + $appMap[$item.ApplianceName] = $item.SiteId + } + + foreach ($item in $appMapV3) { + $t = $item.psobject.properties + $appMap[$t.Name] = $t.Value.SiteId + } + + foreach ($eachApp in $appMap.GetEnumerator()) { + $SiteName = $eachApp.Value.Split("/")[8] + $applianceName = $eachApp.Key + $HashCodeInput = $SiteName + $TargetRegion + + # User cannot change location if it's already set in mapping. + $mappingName = "containermapping" + $allFabrics = Get-AzMigrateReplicationFabric -ResourceGroupName $ResourceGroupName -ResourceName $VaultName + + foreach ($fabric in $allFabrics) { + if (($fabric.Property.CustomDetail.InstanceType -ceq "VMwareV2") -and ($fabric.Property.CustomDetail.VmwareSiteId.Split("/")[8] -ceq $SiteName)) { + $peContainers = Get-AzMigrateReplicationProtectionContainer -FabricName $fabric.Name -ResourceGroupName $ResourceGroupName -ResourceName $VaultName + $peContainer = $peContainers[0] + $existingMapping = Get-AzMigrateReplicationProtectionContainerMapping -ResourceGroupName $ResourceGroupName -ResourceName $VaultName -FabricName $fabric.Name -ProtectionContainerName $peContainer.Name -MappingName $mappingName -ErrorVariable notPresent -ErrorAction SilentlyContinue + if (($existingMapping) -and ($existingMapping.ProviderSpecificDetail.TargetLocation -ne $TargetRegion)) { + $targetRegionMismatchExceptionMsg = $ProjectName + " is already configured for migrating servers to " + $TargetRegion + ". Target Region cannot be modified once configured." + throw $targetRegionMismatchExceptionMsg + } + } + } + + $job = Start-Job -ScriptBlock { + Add-Type -TypeDefinition $args[0] -Language CSharp + $hash = [HashFunctions]::hashForArtifact($args[1]) + $hash + } -ArgumentList $Source, $HashCodeInput + Wait-Job $job + $hash = Receive-Job $job + + Write-Host "Initiating Artifact Creation for Appliance: ", $applianceName + + # Phase 1 + # Storage account + $MigratePrefix = "migrate" + $LogStorageAcName = $MigratePrefix + "lsa" + $hash + $GateWayStorageAcName = $MigratePrefix + "gwsa" + $hash + $StorageType = "Microsoft.Storage/storageAccounts" + $StorageApiVersion = "2017-10-01" + $LogStorageProperties = @{ + encryption = @{ + services = @{ + blob = @{enabled = $true }; + file = @{enabled = $true }; + table = @{enabled = $true }; + queue = @{enabled = $true } + }; + keySource = "Microsoft.Storage" + }; + supportsHttpsTrafficOnly = $true + } + $ResourceTag = @{"Migrate Project" = $ProjectName } + $StorageSku = @{name = "Standard_LRS" } + $ResourceKind = "Storage" + + $lsaStorageAccount = Get-AzResource -ResourceGroupName $ResourceGroupName -Name $LogStorageAcName -ErrorVariable notPresent -ErrorAction SilentlyContinue + if (!$lsaStorageAccount) { + $output = New-AzResource -ResourceGroupName $ResourceGroupName -Location $TargetRegion -Properties $LogStorageProperties -ResourceName $LogStorageAcName -ResourceType $StorageType -ApiVersion $StorageApiVersion -Kind $ResourceKind -Sku $StorageSku -Tag $ResourceTag -Force + Write-Host $LogStringCreated, $LogStorageAcName + } + else { + Write-Host $LogStorageAcName, $LogStringSkipping + } + + $gwyStorageAccount = Get-AzResource -ResourceGroupName $ResourceGroupName -Name $GateWayStorageAcName -ErrorVariable notPresent -ErrorAction SilentlyContinue + if (!$gwyStorageAccount) { + $output = New-AzResource -ResourceGroupName $ResourceGroupName -Location $TargetRegion -Properties $LogStorageProperties -ResourceName $GateWayStorageAcName -ResourceType $StorageType -ApiVersion $StorageApiVersion -Kind $ResourceKind -Sku $StorageSku -Tag $ResourceTag -Force + Write-Host $LogStringCreated, $GateWayStorageAcName + } + else { + Write-Host $GateWayStorageAcName, $LogStringSkipping + } + + # Service bus namespace + $ServiceBusNamespace = $MigratePrefix + "sbns" + $hash + $ServiceBusType = "Microsoft.ServiceBus/namespaces" + $ServiceBusApiVersion = "2017-04-01" + $ServiceBusSku = @{ + name = "Standard"; + tier = "Standard" + } + $ServiceBusProperties = @{} + $ServieBusKind = "ServiceBusNameSpace" + + $serviceBusAccount = Get-AzResource -ResourceGroupName $ResourceGroupName -Name $ServiceBusNamespace -ErrorVariable notPresent -ErrorAction SilentlyContinue + if (!$serviceBusAccount) { + $output = New-AzResource -ResourceGroupName $ResourceGroupName -Location $TargetRegion -Properties $ServiceBusProperties -ResourceName $ServiceBusNamespace -ResourceType $ServiceBusType -ApiVersion $ServiceBusApiVersion -Kind $ServieBusKind -Sku $ServiceBusSku -Tag $ResourceTag -Force + Write-Host $LogStringCreated, $ServiceBusNamespace + } + else { + Write-Host $ServiceBusNamespace, $LogStringSkipping + } + + # Key vault + $KeyVaultName = $MigratePrefix + "kv" + $hash + $KeyVaultType = "Microsoft.KeyVault/vaults" + $KeyVaultApiVersion = "2016-10-01" + $KeyVaultKind = "KeyVault" + + $existingKeyVaultAccount = Get-AzResource -ResourceGroupName $ResourceGroupName -Name $KeyVaultName -ErrorVariable notPresent -ErrorAction SilentlyContinue + if ($existingKeyVaultAccount) { + Write-Host $KeyVaultName, $LogStringSkipping + } + else { + $tenantID = $context.Tenant.TenantId + + $KeyVaultPermissions = @{ + keys = @("Get", "List", "Create", "Update", "Delete"); + secrets = @("Get", "Set", "List", "Delete"); + certificates = @("Get", "List"); + storage = @("get", "list", "delete", "set", "update", "regeneratekey", "getsas", + "listsas", "deletesas", "setsas", "recover", "backup", "restore", "purge") + } + + $CloudEnvironMent = $context.Environment.Name + $HyperVManagerAppId = "b8340c3b-9267-498f-b21a-15d5547fd85e" + if ($CloudEnvironMent -eq "AzureUSGovernment") { + $HyperVManagerAppId = "AFAE2AF7-62E0-4AA4-8F66-B11F74F56326" + } + $hyperVManagerObject = Get-AzADServicePrincipal -ApplicationID $HyperVManagerAppId + $userObject = Get-AzADUser -UserPrincipalName $context.Subscription.ExtendedProperties.Account + $accessPolicies = @() + $userAccessPolicy = @{ + "tenantId" = $tenantID; + "objectId" = $userObject.Id; + "permissions" = $KeyVaultPermissions + } + $hyperVAccessPolicy = @{ + "tenantId" = $tenantID; + "objectId" = $hyperVManagerObject.Id; + "permissions" = $KeyVaultPermissions + } + $accessPolicies += $userAccessPolicy + $accessPolicies += $hyperVAccessPolicy + + $allFabrics = Get-AzMigrateReplicationFabric -ResourceGroupName $ResourceGroupName -ResourceName $VaultName + $selectedFabricName = "" + foreach ($fabric in $allFabrics) { + if (($fabric.Property.CustomDetail.InstanceType -ceq "VMwareV2") -and ($fabric.Property.CustomDetail.VmwareSiteId.Split("/")[8] -ceq $SiteName)) { + $projectRSPObject = Get-AzMigrateReplicationRecoveryServicesProvider -ResourceGroupName $ResourceGroupName -ResourceName $VaultName + foreach ($projectRSP in $projectRSPObject) { + $projectRSPFabricName = $projectRSP.Id.Split("/")[10] + if (($projectRSP.FabricType -eq "VMwareV2") -and ($fabric.Name -eq $projectRSPFabricName)) { + $projectAccessPolicy = @{ + "tenantId" = $tenantID; + "objectId" = $projectRSP.ResourceAccessIdentityDetailObjectId; + "permissions" = $KeyVaultPermissions + } + $accessPolicies += $projectAccessPolicy + } + } + } + } + + $keyVaultProperties = @{ + sku = @{ + family = "A"; + name = "standard" + }; + tenantId = $tenantID; + enabledForDeployment = $true; + enabledForDiskEncryption = $false; + enabledForTemplateDeployment = $true; + enableSoftDelete = $true; + accessPolicies = $accessPolicies + } + + $output = New-AzResource -ResourceGroupName $ResourceGroupName -Location $TargetRegion -Properties $keyVaultProperties -ResourceName $KeyVaultName -ResourceType $KeyVaultType -ApiVersion $KeyVaultApiVersion -Kind $KeyVaultKind -Tag $ResourceTag -Force + Write-Host $LogStringCreated, $KeyVaultName + } + + # Locks + $CommonLockName = $ProjectName + "lock" + $lockNotes = "This is in use by Azure Migrate project" + $lsaLock = Get-AzResourceLock -LockName $CommonLockName -ResourceName $LogStorageAcName -ResourceType $StorageType -ResourceGroupName $ResourceGroupName -ErrorVariable notPresent -ErrorAction SilentlyContinue + if (!$lsaLock) { + $output = New-AzResourceLock -LockLevel CanNotDelete -LockName $CommonLockName -ResourceName $LogStorageAcName -ResourceType $StorageType -ResourceGroupName $ResourceGroupName -LockNotes $lockNotes -Force + Write-Host $LogStringCreated, $CommonLockName, " for ", $LogStorageAcName + } + else { + Write-Host $CommonLockName, " for ", $LogStorageAcName, $LogStringSkipping + } + + $gwyLock = Get-AzResourceLock -LockName $CommonLockName -ResourceName $GateWayStorageAcName -ResourceType $StorageType -ResourceGroupName $ResourceGroupName -ErrorVariable notPresent -ErrorAction SilentlyContinue + if (!$gwyLock) { + $output = New-AzResourceLock -LockLevel CanNotDelete -LockName $CommonLockName -ResourceName $GateWayStorageAcName -ResourceType $StorageType -ResourceGroupName $ResourceGroupName -LockNotes $lockNotes -Force + Write-Host $LogStringCreated, $CommonLockName, " for ", $GateWayStorageAcName + } + else { + Write-Host $CommonLockName, " for ", $LogStorageAcName, $LogStringSkipping + } + + $sbsnsLock = Get-AzResourceLock -LockName $CommonLockName -ResourceName $ServiceBusNamespace -ResourceType $ServiceBusType -ResourceGroupName $ResourceGroupName -ErrorVariable notPresent -ErrorAction SilentlyContinue + if (!$sbsnsLock) { + $output = New-AzResourceLock -LockLevel CanNotDelete -LockName $CommonLockName -ResourceName $ServiceBusNamespace -ResourceType $ServiceBusType -ResourceGroupName $ResourceGroupName -LockNotes $lockNotes -Force + Write-Host $LogStringCreated, $CommonLockName, " for ", $ServiceBusNamespace + } + else { + Write-Host $CommonLockName, " for ", $ServiceBusNamespace, $LogStringSkipping + } + + $kvLock = Get-AzResourceLock -LockName $CommonLockName -ResourceName $KeyVaultName -ResourceType $KeyVaultType -ResourceGroupName $ResourceGroupName -ErrorVariable notPresent -ErrorAction SilentlyContinue + if (!$kvLock) { + $output = New-AzResourceLock -LockLevel CanNotDelete -LockName $CommonLockName -ResourceName $KeyVaultName -ResourceType $KeyVaultType -ResourceGroupName $ResourceGroupName -LockNotes $lockNotes -Force + Write-Host $LogStringCreated, $CommonLockName, " for ", $KeyVaultName + } + else { + Write-Host $CommonLockName, " for ", $KeyVaultName, $LogStringSkipping + } + + + # Intermediate phase + # RoleAssignments + + $roleDefinitionId = "81a9662b-bebf-436f-a333-f67b29880f12" + $kvspnid = (Get-AzADServicePrincipal -DisplayName "Azure Key Vault" )[0].Id + $gwyStorageAccount = Get-AzResource -ResourceName $GateWayStorageAcName -ResourceGroupName $ResourceGroupName + $lsaStorageAccount = Get-AzResource -ResourceName $LogStorageAcName -ResourceGroupName $ResourceGroupName + $gwyRoleAssignments = Get-AzRoleAssignment -ObjectId $kvspnid -Scope $gwyStorageAccount.Id -ErrorVariable notPresent -ErrorAction SilentlyContinue + $lsaRoleAssignments = Get-AzRoleAssignment -ObjectId $kvspnid -Scope $lsaStorageAccount.Id -ErrorVariable notPresent -ErrorAction SilentlyContinue + if (!$lsaRoleAssignments) { + $output = New-AzRoleAssignment -ObjectId $kvspnid -Scope $lsaStorageAccount.Id -RoleDefinitionId $roleDefinitionId + } + if (!$gwyRoleAssignments) { + $output = New-AzRoleAssignment -ObjectId $kvspnid -Scope $gwyStorageAccount.Id -RoleDefinitionId $roleDefinitionId + } + + # SA. SAS definition + + $gatewayStorageAccountSasSecretName = "gwySas" + $cacheStorageAccountSasSecretName = "cacheSas" + $regenerationPeriod = [System.Timespan]::FromDays(30) + $keyName = 'Key2' + Add-AzKeyVaultManagedStorageAccount -VaultName $KeyVaultName -AccountName $LogStorageAcName -AccountResourceId $lsaStorageAccount.Id -ActiveKeyName $keyName -RegenerationPeriod $regenerationPeriod + Add-AzKeyVaultManagedStorageAccount -VaultName $KeyVaultName -AccountName $GateWayStorageAcName -AccountResourceId $gwyStorageAccount.Id -ActiveKeyName $keyName -RegenerationPeriod $regenerationPeriod + + $lsasctx = New-AzStorageContext -StorageAccountName $LogStorageAcName -Protocol Https -StorageAccountKey $keyName + $gwysctx = New-AzStorageContext -StorageAccountName $GateWayStorageAcName -Protocol Https -StorageAccountKey $keyName + + $lsaat = New-AzStorageAccountSasToken -Service blob, file, Table, Queue -ResourceType Service, Container, Object -Permission "racwdlup" -Protocol HttpsOnly -Context $lsasctx + $gwyat = New-AzStorageAccountSasToken -Service blob, file, Table, Queue -ResourceType Service, Container, Object -Permission "racwdlup" -Protocol HttpsOnly -Context $gwysctx + + Set-AzKeyVaultManagedStorageSasDefinition -AccountName $LogStorageAcName -VaultName $KeyVaultName -Name $cacheStorageAccountSasSecretName -TemplateUri $lsaat -SasType 'account' -ValidityPeriod ([System.Timespan]::FromDays(30)) + Set-AzKeyVaultManagedStorageSasDefinition -AccountName $GateWayStorageAcName -VaultName $KeyVaultName -Name $gatewayStorageAccountSasSecretName -TemplateUri $gwyat -SasType 'account' -ValidityPeriod ([System.Timespan]::FromDays(30)) + + # Phase 2 + + # ServiceBusConnectionString + $serviceBusConnString = "ServiceBusConnectionString" + $serviceBusSecretObject = Get-AzKeyVaultSecret -VaultName $KeyVaultName -Name $serviceBusConnString -ErrorVariable notPresent -ErrorAction SilentlyContinue + if ($serviceBusSecretObject) { + Write-Host $serviceBusConnString, " for ", $applianceName, $LogStringSkipping + } + else { + $serviceBusRootKey = Get-AzServiceBusKey -ResourceGroupName $ResourceGroupName -Namespace $ServiceBusNamespace -Name "RootManageSharedAccessKey" + $secret = ConvertTo-SecureString -String $serviceBusRootKey.PrimaryConnectionString -AsPlainText -Force + $output = Set-AzKeyVaultSecret -VaultName $KeyVaultName -Name $serviceBusConnString -SecretValue $secret + Write-Host $LogStringCreated, $serviceBusConnString, " for ", $applianceName + } + + # Policy + $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.Api20180110.VMwareCbtPolicyCreationInput]::new() + $providerSpecificPolicy.AppConsistentFrequencyInMinute = 240 + $providerSpecificPolicy.InstanceType = "VMwareCbt" + $providerSpecificPolicy.RecoveryPointHistoryInMinute = 4320 + $providerSpecificPolicy.CrashConsistentFrequencyInMinute = 60 + $existingPolicyObject = New-AzMigrateReplicationPolicy -PolicyName $policyName -ResourceGroupName $ResourceGroupName -ResourceName $VaultName -ProviderSpecificInput $providerSpecificPolicy + Write-Host $LogStringCreated, $policyName + } + else { + Write-Host $policyName, $LogStringSkipping + } + + # Policy-container mapping + $mappingName = "containermapping" + $allFabrics = Get-AzMigrateReplicationFabric -ResourceGroupName $ResourceGroupName -ResourceName $VaultName + foreach ($fabric in $allFabrics) { + if (($fabric.Property.CustomDetail.InstanceType -ceq "VMwareV2") -and ($fabric.Property.CustomDetail.VmwareSiteId.Split("/")[8] -ceq $SiteName)) { + $peContainers = Get-AzMigrateReplicationProtectionContainer -FabricName $fabric.Name -ResourceGroupName $ResourceGroupName -ResourceName $VaultName + $peContainer = $peContainers[0] + $existingMapping = Get-AzMigrateReplicationProtectionContainerMapping -ResourceGroupName $ResourceGroupName -ResourceName $VaultName -FabricName $fabric.Name -ProtectionContainerName $peContainer.Name -MappingName $mappingName -ErrorVariable notPresent -ErrorAction SilentlyContinue + if ($existingMapping) { + Write-Host $mappingName, " for ", $applianceName, $LogStringSkipping + } + else { + $keyVaultAccountDetails = Get-AzKeyVault -ResourceGroupName $ResourceGroupName -Name $KeyVaultName + $gwyStorageAccount = Get-AzResource -ResourceGroupName $ResourceGroupName -ResourceName $GateWayStorageAcName + $providerSpecificInput = [Microsoft.Azure.PowerShell.Cmdlets.Migrate.Models.Api20180110.VMwareCbtContainerMappingInput]::new() + $providerSpecificInput.InstanceType = "VMwareCbt" + $providerSpecificInput.KeyVaultId = $keyVaultAccountDetails.ResourceId + $providerSpecificInput.KeyVaultUri = $keyVaultAccountDetails.VaultUri + $providerSpecificInput.ServiceBusConnectionStringSecretName = $serviceBusConnString + $providerSpecificInput.StorageAccountId = $gwyStorageAccount.Id + $providerSpecificInput.StorageAccountSasSecretName = $GateWayStorageAcName + "-gwySas" + $providerSpecificInput.TargetLocation = $TargetRegion + $output = New-AzMigrateReplicationProtectionContainerMapping -FabricName $fabric.Name -MappingName $mappingName -ProtectionContainerName $peContainer.Name -ResourceGroupName $ResourceGroupName -ResourceName $VaultName -PolicyId $existingPolicyObject.Id -ProviderSpecificInput $providerSpecificInput -TargetProtectionContainerId "Microsoft Azure" + Write-Host $LogStringCreated, $mappingName, " for ", $applianceName + } + } + } + } + Write-Host "Finished successfully." + return $true + } +} \ No newline at end of file diff --git a/src/Migrate/custom/New-AzMigrateDiskMapping.ps1 b/src/Migrate/custom/New-AzMigrateDiskMapping.ps1 index 934776366b5b..013def34aebe 100644 --- a/src/Migrate/custom/New-AzMigrateDiskMapping.ps1 +++ b/src/Migrate/custom/New-AzMigrateDiskMapping.ps1 @@ -19,11 +19,11 @@ Creates a new disk mapping .Description The New-AzMigrateDiskMapping cmdlet creates a mapping of the source disk attached to the server to be migrated .Link -https://docs.microsoft.com/en-us/powershell/module/az.migrate/new-azmigratediskmapping +https://docs.microsoft.com/powershell/module/az.migrate/new-azmigratediskmapping #> function New-AzMigrateDiskMapping { [OutputType([Microsoft.Azure.PowerShell.Cmdlets.Migrate.Models.Api20180110.IVMwareCbtDiskInput])] - [CmdletBinding(DefaultParameterSetName='VMwareCbt', PositionalBinding=$false)] + [CmdletBinding(DefaultParameterSetName = 'VMwareCbt', PositionalBinding = $false)] param( [Parameter(Mandatory)] [Microsoft.Azure.PowerShell.Cmdlets.Migrate.Category('Path')] @@ -32,14 +32,18 @@ function New-AzMigrateDiskMapping { ${DiskID}, [Parameter(Mandatory)] + [ValidateSet("true" , "false")] + [ArgumentCompleter( { "true" , "false" })] [Microsoft.Azure.PowerShell.Cmdlets.Migrate.Category('Path')] [System.String] # Specifies whether the disk contains the Operating System for the source server to be migrated. ${IsOSDisk}, [Parameter(Mandatory)] + [ValidateSet("Standard_LRS", "Premium_LRS", "StandardSSD_LRS")] + [ArgumentCompleter( { "Standard_LRS", "Premium_LRS", "StandardSSD_LRS" })] [Microsoft.Azure.PowerShell.Cmdlets.Migrate.Category('Path')] - [Microsoft.Azure.PowerShell.Cmdlets.Migrate.Support.DiskAccountType] + [System.String] # Specifies the type of disks to be used for the Azure VM. ${DiskType}, @@ -51,12 +55,22 @@ function New-AzMigrateDiskMapping { ) process { - $DiskObject = [Microsoft.Azure.PowerShell.Cmdlets.Migrate.Models.Api20180110.VMwareCbtDiskInput]::new() $DiskObject.DiskId = $DiskID - $DiskObject.DiskType = $DiskType - $DiskObject.IsOSDisk = $IsOSDisk - if($PSBoundParameters.ContainsKey('DiskEncryptionSetID')){ + + $validDiskTypeSpellings = @{ + Standard_LRS = "Standard_LRS"; + Premium_LRS = "Premium_LRS"; + StandardSSD_LRS = "StandardSSD_LRS" + } + $DiskObject.DiskType = $validDiskTypeSpellings[$DiskType] + + $validBooleanSpellings = @{ + true = "true"; + false = "false" + } + $DiskObject.IsOSDisk = $validBooleanSpellings[$IsOSDisk] + if ($PSBoundParameters.ContainsKey('DiskEncryptionSetID')) { $DiskObject.DiskEncryptionSetId = $DiskEncryptionSetID } return $DiskObject diff --git a/src/Migrate/custom/New-AzMigrateNicMapping.ps1 b/src/Migrate/custom/New-AzMigrateNicMapping.ps1 index e7dc59fe1c74..87158fee9194 100644 --- a/src/Migrate/custom/New-AzMigrateNicMapping.ps1 +++ b/src/Migrate/custom/New-AzMigrateNicMapping.ps1 @@ -19,11 +19,11 @@ Creates an object to update NIC properties of a replicating server. .Description The New-AzMigrateNicMapping cmdlet creates a mapping of the source NIC attached to the server to be migrated. This object is provided as an input to the Set-AzMigrateServerReplication cmdlet to update the NIC and its properties for a replicating server. .Link -https://docs.microsoft.com/en-us/powershell/module/az.migrate/new-azmigratenicmapping +https://docs.microsoft.com/powershell/module/az.migrate/new-azmigratenicmapping #> function New-AzMigrateNicMapping { [OutputType([Microsoft.Azure.PowerShell.Cmdlets.Migrate.Models.Api20180110.IVMwareCbtNicInput])] - [CmdletBinding(DefaultParameterSetName='VMwareCbt', PositionalBinding=$false)] + [CmdletBinding(DefaultParameterSetName = 'VMwareCbt', PositionalBinding = $false)] param( [Parameter(Mandatory)] [Microsoft.Azure.PowerShell.Cmdlets.Migrate.Category('Path')] @@ -32,6 +32,8 @@ function New-AzMigrateNicMapping { ${NicID}, [Parameter()] + [ValidateSet("primary" , "secondary", "donotcreate")] + [ArgumentCompleter({"primary" , "secondary", "donotcreate"})] [Microsoft.Azure.PowerShell.Cmdlets.Migrate.Category('Path')] [System.String] # Specifies whether the NIC to be updated will be the primary, secondary or not migrated. @@ -53,23 +55,25 @@ function New-AzMigrateNicMapping { process { $NicObject = [Microsoft.Azure.PowerShell.Cmdlets.Migrate.Models.Api20180110.VMwareCbtNicInput]::new() $NicObject.NicId = $NicID - if($PSBoundParameters.ContainsKey('TargetNicSelectionType')){ - if($TargetNicSelectionType -eq 'primary'){ + if ($PSBoundParameters.ContainsKey('TargetNicSelectionType')) { + if ($TargetNicSelectionType -eq 'primary') { $NicObject.IsPrimaryNic = "true" $NicObject.IsSelectedForMigration = "true" - }elseif($TargetNicSelectionType -eq 'secondary'){ + } + elseif ($TargetNicSelectionType -eq 'secondary') { $NicObject.IsPrimaryNic = "false" $NicObject.IsSelectedForMigration = "true" - }elseif($TargetNicSelectionType -eq 'donotcreate'){ + } + elseif ($TargetNicSelectionType -eq 'donotcreate') { $NicObject.IsPrimaryNic = "false" $NicObject.IsSelectedForMigration = "false" } } - if($PSBoundParameters.ContainsKey('TargetNicSubnet')){ + if ($PSBoundParameters.ContainsKey('TargetNicSubnet')) { $NicObject.TargetSubnetName = $TargetNicSubnet } - if($PSBoundParameters.ContainsKey('TargetNicIP')){ + if ($PSBoundParameters.ContainsKey('TargetNicIP')) { $NicObject.TargetStaticIPAddress = $TargetNicIP } return $NicObject diff --git a/src/Migrate/custom/New-AzMigrateProject.ps1 b/src/Migrate/custom/New-AzMigrateProject.ps1 index 5416dfa2c26e..9e44efef27c1 100644 --- a/src/Migrate/custom/New-AzMigrateProject.ps1 +++ b/src/Migrate/custom/New-AzMigrateProject.ps1 @@ -19,7 +19,7 @@ Creates a new Migrate project. .Description Creates a new Migrate project. .Link -https://docs.microsoft.com/en-us/powershell/module/az.migrate/new-azmigrateproject +https://docs.microsoft.com/powershell/module/az.migrate/new-azmigrateproject #> function New-AzMigrateProject { diff --git a/src/Migrate/custom/New-AzMigrateServerReplication.ps1 b/src/Migrate/custom/New-AzMigrateServerReplication.ps1 index f8910312a3c6..d13d92726a00 100644 --- a/src/Migrate/custom/New-AzMigrateServerReplication.ps1 +++ b/src/Migrate/custom/New-AzMigrateServerReplication.ps1 @@ -19,36 +19,38 @@ Starts replication for the specified server. .Description The New-AzMigrateServerReplication cmdlet starts the replication for a particular discovered server in the Azure Migrate project. .Link -https://docs.microsoft.com/en-us/powershell/module/az.migrate/new-azmigrateserverreplication +https://docs.microsoft.com/powershell/module/az.migrate/new-azmigrateserverreplication #> function New-AzMigrateServerReplication { [OutputType([Microsoft.Azure.PowerShell.Cmdlets.Migrate.Models.Api20180110.IJob])] - [CmdletBinding(DefaultParameterSetName='ByIdDefaultUser', PositionalBinding=$false)] + [CmdletBinding(DefaultParameterSetName = 'ByIdDefaultUser', PositionalBinding = $false)] param( - [Parameter(ParameterSetName='ByIdDefaultUser', Mandatory)] - [Parameter(ParameterSetName='ByIdPowerUser', Mandatory)] + [Parameter(ParameterSetName = 'ByIdDefaultUser', Mandatory)] + [Parameter(ParameterSetName = 'ByIdPowerUser', Mandatory)] [Microsoft.Azure.PowerShell.Cmdlets.Migrate.Category('Path')] [System.String] # Specifies the machine ID of the discovered server to be migrated. ${MachineId}, - [Parameter(ParameterSetName='ByInputObjectDefaultUser', Mandatory)] - [Parameter(ParameterSetName='ByInputObjectPowerUser', Mandatory)] + [Parameter(ParameterSetName = 'ByInputObjectDefaultUser', Mandatory)] + [Parameter(ParameterSetName = 'ByInputObjectPowerUser', Mandatory)] [Microsoft.Azure.PowerShell.Cmdlets.Migrate.Category('Path')] [Microsoft.Azure.PowerShell.Cmdlets.Migrate.Models.Api202001.IVMwareMachine] # Specifies the discovered server to be migrated. The server object can be retrieved using the Get-AzMigrateServer cmdlet. ${InputObject}, - [Parameter(ParameterSetName='ByIdPowerUser', Mandatory)] - [Parameter(ParameterSetName='ByInputObjectPowerUser', Mandatory)] + [Parameter(ParameterSetName = 'ByIdPowerUser', Mandatory)] + [Parameter(ParameterSetName = 'ByInputObjectPowerUser', Mandatory)] [Microsoft.Azure.PowerShell.Cmdlets.Migrate.Category('Path')] [Microsoft.Azure.PowerShell.Cmdlets.Migrate.Models.Api20180110.IVMwareCbtDiskInput[]] # Specifies the disks on the source server to be included for replication. ${DiskToInclude}, [Parameter(Mandatory)] + [ValidateSet("NoLicenseType" , "WindowsServer")] + [ArgumentCompleter( { "NoLicenseType" , "WindowsServer" })] [Microsoft.Azure.PowerShell.Cmdlets.Migrate.Category('Path')] - [Microsoft.Azure.PowerShell.Cmdlets.Migrate.Support.LicenseType] + [System.String] # Specifies if Azure Hybrid benefit is applicable for the source server to be migrated. ${LicenseType}, @@ -94,10 +96,12 @@ function New-AzMigrateServerReplication { # Specifies the SKU of the Azure VM to be created. ${TargetVMSize}, - [Parameter(ParameterSetName='ByIdDefaultUser')] - [Parameter(ParameterSetName='ByInputObjectDefaultUser')] - [Parameter(ParameterSetName='ByIdPowerUser')] - [Parameter(ParameterSetName='ByInputObjectPowerUser')] + [Parameter(ParameterSetName = 'ByIdDefaultUser')] + [Parameter(ParameterSetName = 'ByInputObjectDefaultUser')] + [Parameter(ParameterSetName = 'ByIdPowerUser')] + [Parameter(ParameterSetName = 'ByInputObjectPowerUser')] + [ValidateSet("true" , "false")] + [ArgumentCompleter( { "true" , "false" })] [Microsoft.Azure.PowerShell.Cmdlets.Migrate.Category('Path')] [System.String] # Specifies if replication be auto-repaired in case change tracking is lost for the source server under replication. @@ -121,22 +125,24 @@ function New-AzMigrateServerReplication { # Specifies the storage account to be used for boot diagnostics. ${TargetBootDiagnosticsStorageAccount}, - [Parameter(ParameterSetName='ByIdDefaultUser', Mandatory)] - [Parameter(ParameterSetName='ByInputObjectDefaultUser', Mandatory)] + [Parameter(ParameterSetName = 'ByIdDefaultUser', Mandatory)] + [Parameter(ParameterSetName = 'ByInputObjectDefaultUser', Mandatory)] + [ValidateSet("Standard_LRS" , "Premium_LRS", "StandardSSD_LRS")] + [ArgumentCompleter( { "Standard_LRS" , "Premium_LRS", "StandardSSD_LRS" })] [Microsoft.Azure.PowerShell.Cmdlets.Migrate.Category('Path')] - [Microsoft.Azure.PowerShell.Cmdlets.Migrate.Support.DiskAccountType] + [System.String] # Specifies the type of disks to be used for the Azure VM. ${DiskType}, - [Parameter(ParameterSetName='ByIdDefaultUser', Mandatory)] - [Parameter(ParameterSetName='ByInputObjectDefaultUser', Mandatory)] + [Parameter(ParameterSetName = 'ByIdDefaultUser', Mandatory)] + [Parameter(ParameterSetName = 'ByInputObjectDefaultUser', Mandatory)] [Microsoft.Azure.PowerShell.Cmdlets.Migrate.Category('Path')] [System.String] # Specifies the Operating System disk for the source server to be migrated. ${OSDiskID}, - [Parameter(ParameterSetName='ByIdDefaultUser')] - [Parameter(ParameterSetName='ByInputObjectDefaultUser')] + [Parameter(ParameterSetName = 'ByIdDefaultUser')] + [Parameter(ParameterSetName = 'ByInputObjectDefaultUser')] [Microsoft.Azure.PowerShell.Cmdlets.Migrate.Category('Path')] [System.String] # Specifies the disk encyption set to be used. @@ -144,7 +150,7 @@ function New-AzMigrateServerReplication { [Parameter()] [Microsoft.Azure.PowerShell.Cmdlets.Migrate.Category('Path')] - [Microsoft.Azure.PowerShell.Cmdlets.Migrate.Runtime.DefaultInfo(Script='(Get-AzContext).Subscription.Id')] + [Microsoft.Azure.PowerShell.Cmdlets.Migrate.Runtime.DefaultInfo(Script = '(Get-AzContext).Subscription.Id')] [System.String] # Azure Subscription ID. ${SubscriptionId}, @@ -198,152 +204,206 @@ function New-AzMigrateServerReplication { ) process { - $parameterSet = $PSCmdlet.ParameterSetName - $HasRunAsAccountId = $PSBoundParameters.ContainsKey('VMWarerunasaccountID') - $HasTargetAVSet = $PSBoundParameters.ContainsKey('TargetAvailabilitySet') - $HasTargetAVZone = $PSBoundParameters.ContainsKey('TargetAvailabilityZone') - $HasTargetBDStorage = $PSBoundParameters.ContainsKey('TargetBootDiagnosticsStorageAccount') - $HasResync = $PSBoundParameters.ContainsKey('PerformAutoResync') - $HasDiskEncryptionSetID = $PSBoundParameters.ContainsKey('DiskEncryptionSetID') - $HasTargetVMSize = $PSBoundParameters.ContainsKey('TargetVMSize') - - $null = $PSBoundParameters.Remove('ReplicationContainerMapping') - $null = $PSBoundParameters.Remove('VMWarerunasaccountID') - $null = $PSBoundParameters.Remove('TargetAvailabilitySet') - $null = $PSBoundParameters.Remove('TargetAvailabilityZone') - $null = $PSBoundParameters.Remove('TargetBootDiagnosticsStorageAccount') - $null = $PSBoundParameters.Remove('MachineId') - $null = $PSBoundParameters.Remove('DiskToInclude') - $null = $PSBoundParameters.Remove('TargetResourceGroupId') - $null = $PSBoundParameters.Remove('TargetNetworkId') - $null = $PSBoundParameters.Remove('TargetSubnetName') - $null = $PSBoundParameters.Remove('TargetVMName') - $null = $PSBoundParameters.Remove('TargetVMSize') - $null = $PSBoundParameters.Remove('PerformAutoResync') - $null = $PSBoundParameters.Remove('DiskType') - $null = $PSBoundParameters.Remove('OSDiskID') - $null = $PSBoundParameters.Remove('LicenseType') - $null = $PSBoundParameters.Remove('DiskEncryptionSetID') - - $null = $PSBoundParameters.Remove('MachineId') - $null = $PSBoundParameters.Remove('InputObject') - - if(($parameterSet -match 'Id') -or ($parameterSet -match 'InputObject')){ - if(($parameterSet -match 'InputObject')){ - $MachineId = $InputObject.Id - } - $MachineIdArray = $MachineId.Split("/") - $SiteType = $MachineIdArray[7] - $SiteName = $MachineIdArray[8] - $ResourceGroupName = $MachineIdArray[4] - $MachineName = $MachineIdArray[10] - - $null = $PSBoundParameters.Add('ResourceGroupName', $ResourceGroupName) - $null = $PSBoundParameters.Add('SiteName', $SiteName) - $siteObject = Az.Migrate\Get-AzMigrateSite @PSBoundParameters - if($siteObject -and ($siteObject.Count -ge 1)){ - $ProjectName = $siteObject.DiscoverySolutionId.Split("/")[8] - }else{ - throw "Site not found" - } - - $null = $PSBoundParameters.Remove('ResourceGroupName') - $null = $PSBoundParameters.Remove('SiteName') + + $parameterSet = $PSCmdlet.ParameterSetName + $HasRunAsAccountId = $PSBoundParameters.ContainsKey('VMWarerunasaccountID') + $HasTargetAVSet = $PSBoundParameters.ContainsKey('TargetAvailabilitySet') + $HasTargetAVZone = $PSBoundParameters.ContainsKey('TargetAvailabilityZone') + $HasTargetBDStorage = $PSBoundParameters.ContainsKey('TargetBootDiagnosticsStorageAccount') + $HasResync = $PSBoundParameters.ContainsKey('PerformAutoResync') + $HasDiskEncryptionSetID = $PSBoundParameters.ContainsKey('DiskEncryptionSetID') + $HasTargetVMSize = $PSBoundParameters.ContainsKey('TargetVMSize') + + $null = $PSBoundParameters.Remove('ReplicationContainerMapping') + $null = $PSBoundParameters.Remove('VMWarerunasaccountID') + $null = $PSBoundParameters.Remove('TargetAvailabilitySet') + $null = $PSBoundParameters.Remove('TargetAvailabilityZone') + $null = $PSBoundParameters.Remove('TargetBootDiagnosticsStorageAccount') + $null = $PSBoundParameters.Remove('MachineId') + $null = $PSBoundParameters.Remove('DiskToInclude') + $null = $PSBoundParameters.Remove('TargetResourceGroupId') + $null = $PSBoundParameters.Remove('TargetNetworkId') + $null = $PSBoundParameters.Remove('TargetSubnetName') + $null = $PSBoundParameters.Remove('TargetVMName') + $null = $PSBoundParameters.Remove('TargetVMSize') + $null = $PSBoundParameters.Remove('PerformAutoResync') + $null = $PSBoundParameters.Remove('DiskType') + $null = $PSBoundParameters.Remove('OSDiskID') + $null = $PSBoundParameters.Remove('LicenseType') + $null = $PSBoundParameters.Remove('DiskEncryptionSetID') + + $null = $PSBoundParameters.Remove('MachineId') + $null = $PSBoundParameters.Remove('InputObject') + + $validLicenseSpellings = @{ + NoLicenseType = "NoLicenseType"; + WindowsServer = "WindowsServer" + } + $LicenseType = $validLicenseSpellings[$LicenseType] - $null = $PSBoundParameters.Add("ResourceGroupName", $ResourceGroupName) - $null = $PSBoundParameters.Add("Name", "Servers-Migration-ServerMigration") - $null = $PSBoundParameters.Add("MigrateProjectName", $ProjectName) - - $solution = Az.Migrate\Get-AzMigrateSolution @PSBoundParameters - $VaultName = $solution.DetailExtendedDetail.AdditionalProperties.vaultId.Split("/")[8] - - $null = $PSBoundParameters.Remove('ResourceGroupName') - $null = $PSBoundParameters.Remove("Name") - $null = $PSBoundParameters.Remove("MigrateProjectName") - } - if ($SiteType -ne "VMwareSites"){ - throw "Provider not supported" + if ($parameterSet -match "DefaultUser") { + $validDiskTypeSpellings = @{ + Standard_LRS = "Standard_LRS"; + Premium_LRS = "Premium_LRS"; + StandardSSD_LRS = "StandardSSD_LRS" } - - # in case if the credential type is null which is in case of older appliances or - # in case if the credential type is vmwarefabric type which is for newer appliances - # send that run as account id only. - # for vCenter there will be always one credential so returning the first one which matches it. - # when multiple vCenter support comes then this might not work and need to redesign this. - if(!$HasRunAsAccountId){ - $null = $PSBoundParameters.Add('ResourceGroupName', $ResourceGroupName) - $null = $PSBoundParameters.Add('SiteName', $SiteName) - $runAsAccounts = Az.Migrate\Get-AzMigrateRunAsAccount @PSBoundParameters - $VMWarerunasaccountID = "" - foreach($account in $runAsAccounts){ - if(($null -eq $account.CredentialType) -or ($account.CredentialType -eq "VMwareFabric")){ - $VMWarerunasaccountID = $account.Id + $DiskType = $validDiskTypeSpellings[$DiskType] + + if ($parameterSet -eq "ByInputObjectDefaultUser") { + foreach ($onPremDisk in $InputObject.Disk) { + if ($onPremDisk.Uuid -eq $OSDiskID) { + $OSDiskID = $onPremDisk.Uuid break } } - if($VMWarerunasaccountID -eq ""){ - throw "Run As Account missing" - } - - $null = $PSBoundParameters.Remove('ResourceGroupName') - $null = $PSBoundParameters.Remove('SiteName') } - - $policyName = "migrate" + $SiteName + "policy" + } + + if (($parameterSet -match 'Id') -or ($parameterSet -match 'InputObject')) { + if (($parameterSet -match 'InputObject')) { + $MachineId = $InputObject.Id + } + $MachineIdArray = $MachineId.Split("/") + $SiteType = $MachineIdArray[7] + $SiteName = $MachineIdArray[8] + $ResourceGroupName = $MachineIdArray[4] + $MachineName = $MachineIdArray[10] + $null = $PSBoundParameters.Add('ResourceGroupName', $ResourceGroupName) - $null = $PSBoundParameters.Add('ResourceName', $VaultName) - $null = $PSBoundParameters.Add('PolicyName', $policyName) - $policyObj = Az.Migrate\Get-AzMigrateReplicationPolicy @PSBoundParameters -ErrorVariable notPresent -ErrorAction SilentlyContinue - if($policyObj -and ($policyObj.Count -ge 1)){ - $PolicyId = $policyObj.Id - }else{ - throw "The replication infrastructure is not initialized. Run the initialize-azmigratereplicationinfrastructure script again." + $null = $PSBoundParameters.Add('SiteName', $SiteName) + $siteObject = Az.Migrate\Get-AzMigrateSite @PSBoundParameters + if ($siteObject -and ($siteObject.Count -ge 1)) { + $ProjectName = $siteObject.DiscoverySolutionId.Split("/")[8] + } + else { + throw "Site not found" } + $null = $PSBoundParameters.Remove('ResourceGroupName') - $null = $PSBoundParameters.Remove('ResourceName') - $null = $PSBoundParameters.Remove('PolicyName') + $null = $PSBoundParameters.Remove('SiteName') + $null = $PSBoundParameters.Add("ResourceGroupName", $ResourceGroupName) + $null = $PSBoundParameters.Add("Name", "Servers-Migration-ServerMigration") + $null = $PSBoundParameters.Add("MigrateProjectName", $ProjectName) + + $solution = Az.Migrate\Get-AzMigrateSolution @PSBoundParameters + $VaultName = $solution.DetailExtendedDetail.AdditionalProperties.vaultId.Split("/")[8] + + $null = $PSBoundParameters.Remove('ResourceGroupName') + $null = $PSBoundParameters.Remove("Name") + $null = $PSBoundParameters.Remove("MigrateProjectName") + } + if ($SiteType -ne "VMwareSites") { + throw "Provider not supported" + } + + # in case if the credential type is null which is in case of older appliances or + # in case if the credential type is vmwarefabric type which is for newer appliances + # send that run as account id only. + # for vCenter there will be always one credential so returning the first one which matches it. + # when multiple vCenter support comes then this might not work and need to redesign this. + if (!$HasRunAsAccountId) { $null = $PSBoundParameters.Add('ResourceGroupName', $ResourceGroupName) - $null = $PSBoundParameters.Add('ResourceName', $VaultName) - $allFabrics = Az.Migrate\Get-AzMigrateReplicationFabric @PSBoundParameters - $FabricName = "" - if($allFabrics -and ($allFabrics.length -gt 0)){ - foreach ($fabric in $allFabrics) { - if(($fabric.Property.CustomDetail.InstanceType -ceq "VMwareV2") -and ($fabric.Property.CustomDetail.VmwareSiteId.Split("/")[8] -ceq $SiteName)){ - $FabricName = $fabric.Name - break - } + $null = $PSBoundParameters.Add('SiteName', $SiteName) + $runAsAccounts = Az.Migrate\Get-AzMigrateRunAsAccount @PSBoundParameters + $VMWarerunasaccountID = "" + foreach ($account in $runAsAccounts) { + if (($null -eq $account.CredentialType) -or ($account.CredentialType -eq "VMwareFabric")) { + $VMWarerunasaccountID = $account.Id + break } } - if($FabricName -eq ""){ - throw "Fabric not found for given resource group." - } - - $null = $PSBoundParameters.Add('FabricName', $FabricName) - $peContainers = Az.Migrate\Get-AzMigrateReplicationProtectionContainer @PSBoundParameters - $ProtectionContainerName = "" - if($peContainers -and ($peContainers.length -gt 0)){ - $ProtectionContainerName = $peContainers[0].Name + if ($VMWarerunasaccountID -eq "") { + throw "Run As Account missing" } - if($ProtectionContainerName -eq ""){ - throw "Container not found for given resource group." + $null = $PSBoundParameters.Remove('ResourceGroupName') + $null = $PSBoundParameters.Remove('SiteName') + } + + $policyName = "migrate" + $SiteName + "policy" + $null = $PSBoundParameters.Add('ResourceGroupName', $ResourceGroupName) + $null = $PSBoundParameters.Add('ResourceName', $VaultName) + $null = $PSBoundParameters.Add('PolicyName', $policyName) + $policyObj = Az.Migrate\Get-AzMigrateReplicationPolicy @PSBoundParameters -ErrorVariable notPresent -ErrorAction SilentlyContinue + if ($policyObj -and ($policyObj.Count -ge 1)) { + $PolicyId = $policyObj.Id + } + else { + throw "The replication infrastructure is not initialized. Run the initialize-azmigratereplicationinfrastructure script again." + } + $null = $PSBoundParameters.Remove('ResourceGroupName') + $null = $PSBoundParameters.Remove('ResourceName') + $null = $PSBoundParameters.Remove('PolicyName') + + $null = $PSBoundParameters.Add('ResourceGroupName', $ResourceGroupName) + $null = $PSBoundParameters.Add('ResourceName', $VaultName) + $allFabrics = Az.Migrate\Get-AzMigrateReplicationFabric @PSBoundParameters + $FabricName = "" + if ($allFabrics -and ($allFabrics.length -gt 0)) { + foreach ($fabric in $allFabrics) { + if (($fabric.Property.CustomDetail.InstanceType -ceq "VMwareV2") -and ($fabric.Property.CustomDetail.VmwareSiteId.Split("/")[8] -ceq $SiteName)) { + $FabricName = $fabric.Name + break + } } + } + if ($FabricName -eq "") { + throw "Fabric not found for given resource group." + } + + $null = $PSBoundParameters.Add('FabricName', $FabricName) + $peContainers = Az.Migrate\Get-AzMigrateReplicationProtectionContainer @PSBoundParameters + $ProtectionContainerName = "" + if ($peContainers -and ($peContainers.length -gt 0)) { + $ProtectionContainerName = $peContainers[0].Name + } - $mappingName = "containermapping" - $null = $PSBoundParameters.Add('MappingName', $mappingName) - $null = $PSBoundParameters.Add("ProtectionContainerName", $ProtectionContainerName) + if ($ProtectionContainerName -eq "") { + throw "Container not found for given resource group." + } + + $mappingName = "containermapping" + $null = $PSBoundParameters.Add('MappingName', $mappingName) + $null = $PSBoundParameters.Add("ProtectionContainerName", $ProtectionContainerName) - $mappingObject = Az.Migrate\Get-AzMigrateReplicationProtectionContainerMapping @PSBoundParameters -ErrorVariable notPresent -ErrorAction SilentlyContinue - if($mappingObject -and ($mappingObject.Count -ge 1)){ - $TargetRegion = $mappingObject.ProviderSpecificDetail.TargetLocation - }else{ - throw "The replication infrastructure is not initialized. Run the initialize-azmigratereplicationinfrastructure script again." + $mappingObject = Az.Migrate\Get-AzMigrateReplicationProtectionContainerMapping @PSBoundParameters -ErrorVariable notPresent -ErrorAction SilentlyContinue + if ($mappingObject -and ($mappingObject.Count -ge 1)) { + $TargetRegion = $mappingObject.ProviderSpecificDetail.TargetLocation + } + else { + throw "The replication infrastructure is not initialized. Run the initialize-azmigratereplicationinfrastructure script again." + } + $null = $PSBoundParameters.Remove('MappingName') + + # Validate sku size + $hasAzComputeModule = $true + try { Import-Module Az.Compute }catch { $hasAzComputeModule = $false } + if ($hasAzComputeModule -and $HasTargetVMSize) { + $null = $PSBoundParameters.Remove("ProtectionContainerName") + $null = $PSBoundParameters.Remove("FabricName") + $null = $PSBoundParameters.Remove('ResourceGroupName') + $null = $PSBoundParameters.Remove('ResourceName') + $null = $PSBoundParameters.Remove('SubscriptionId') + $null = $PSBoundParameters.Add('Location', $TargetRegion) + $allAvailableSkus = Get-AzVMSize @PSBoundParameters -ErrorVariable notPresent -ErrorAction SilentlyContinue + if ($null -ne $allAvailableSkus) { + $matchingComputeSku = $allAvailableSkus | Where-Object { $_.Name -eq $TargetVMSize } + if ($null -ne $matchingComputeSku) { + $TargetVMSize = $matchingComputeSku.Name + } } - $null = $PSBoundParameters.Remove('MappingName') - $HashCodeInput = $SiteName + $TargetRegion - $Source = @" + $null = $PSBoundParameters.Remove('Location') + $null = $PSBoundParameters.Add("ProtectionContainerName", $ProtectionContainerName) + $null = $PSBoundParameters.Add('FabricName', $FabricName) + $null = $PSBoundParameters.Add("ResourceGroupName", $ResourceGroupName) + $null = $PSBoundParameters.Add('ResourceName', $VaultName) + $null = $PSBoundParameters.Add('SubscriptionId', $SubscriptionId) + } + + $HashCodeInput = $SiteName + $TargetRegion + $Source = @" using System; public class HashFunctions { @@ -361,108 +421,116 @@ public static int hashForArtifact(String artifact) } } "@ - Add-Type -TypeDefinition $Source -Language CSharp - $hash = [HashFunctions]::hashForArtifact($HashCodeInput) - - $LogStorageAccountID = "/subscriptions/" + $SubscriptionId + "/resourceGroups/" + - $ResourceGroupName + "/providers/Microsoft.Storage/storageAccounts/migratelsa" + $hash - $LogStorageAccountSas = "migratelsa" + $hash + '-cacheSas' - if(!$HasTargetBDStorage){ - $TargetBootDiagnosticsStorageAccount = $LogStorageAccountID - } + Add-Type -TypeDefinition $Source -Language CSharp + $hash = [HashFunctions]::hashForArtifact($HashCodeInput) + + $LogStorageAccountID = "/subscriptions/" + $SubscriptionId + "/resourceGroups/" + + $ResourceGroupName + "/providers/Microsoft.Storage/storageAccounts/migratelsa" + $hash + $LogStorageAccountSas = "migratelsa" + $hash + '-cacheSas' + if (!$HasTargetBDStorage) { + $TargetBootDiagnosticsStorageAccount = $LogStorageAccountID + } - # Storage accounts need to be in the same subscription as that of the VM. - if (($null -ne $TargetBootDiagnosticsStorageAccount) -and ($TargetBootDiagnosticsStorageAccount.length -gt 1)){ - $TargetBDSASubscriptionId = $TargetBootDiagnosticsStorageAccount.Split('/')[2] - $TargetSubscriptionId = $TargetResourceGroupId.Split('/')[2] - if($TargetBDSASubscriptionId -ne $TargetSubscriptionId){ - $TargetBootDiagnosticsStorageAccount = $null - } + # Storage accounts need to be in the same subscription as that of the VM. + if (($null -ne $TargetBootDiagnosticsStorageAccount) -and ($TargetBootDiagnosticsStorageAccount.length -gt 1)) { + $TargetBDSASubscriptionId = $TargetBootDiagnosticsStorageAccount.Split('/')[2] + $TargetSubscriptionId = $TargetResourceGroupId.Split('/')[2] + if ($TargetBDSASubscriptionId -ne $TargetSubscriptionId) { + $TargetBootDiagnosticsStorageAccount = $null } + } - if(!$HasResync){ - $PerformAutoResync = "true" - } - $null = $PSBoundParameters.Add("MigrationItemName", $MachineName) - $null = $PSBoundParameters.Add("PolicyId", $PolicyId) - - $ProviderSpecificDetails = [Microsoft.Azure.PowerShell.Cmdlets.Migrate.Models.Api20180110.VMwareCbtEnableMigrationInput]::new() - $ProviderSpecificDetails.DataMoverRunAsAccountId = $VMWarerunasaccountID - $ProviderSpecificDetails.SnapshotRunAsAccountId = $VMWarerunasaccountID - $ProviderSpecificDetails.InstanceType = 'VMwareCbt' - $ProviderSpecificDetails.LicenseType = $LicenseType - $ProviderSpecificDetails.PerformAutoResync = $PerformAutoResync - if($HasTargetAVSet){ - $ProviderSpecificDetails.TargetAvailabilitySetId = $TargetAvailabilitySet - } - if($HasTargetAVZone){ - $ProviderSpecificDetails.TargetAvailabilityZone = $TargetAvailabilityZone - } - $ProviderSpecificDetails.TargetBootDiagnosticsStorageAccountId = $TargetBootDiagnosticsStorageAccount - $ProviderSpecificDetails.TargetNetworkId = $TargetNetworkId - $ProviderSpecificDetails.TargetResourceGroupId = $TargetResourceGroupId - $ProviderSpecificDetails.TargetSubnetName = $TargetSubnetName - $ProviderSpecificDetails.TargetVMName = $TargetVMName - if($HasTargetVMSize){$ProviderSpecificDetails.TargetVMSize = $TargetVMSize} - $ProviderSpecificDetails.VmwareMachineId = $MachineId - - - if ($parameterSet -match 'DefaultUser'){ - [Microsoft.Azure.PowerShell.Cmdlets.Migrate.Models.Api20180110.IVMwareCbtDiskInput[]]$DiskToInclude = @() - if($parameterSet -eq 'ByInputObjectDefaultUser'){ - foreach($onPremDisk in $InputObject.Disk){ - if($onPremDisk.Uuid -ne $OSDiskID){ - $DiskObject = [Microsoft.Azure.PowerShell.Cmdlets.Migrate.Models.Api20180110.VMwareCbtDiskInput]::new() - $DiskObject.DiskId = $onPremDisk.Uuid - $DiskObject.DiskType = "Standard_LRS" - $DiskObject.IsOSDisk = "false" - $DiskObject.LogStorageAccountSasSecretName = $LogStorageAccountSas - $DiskObject.LogStorageAccountId = $LogStorageAccountID - if($HasDiskEncryptionSetID){ - $DiskObject.DiskEncryptionSetId = $DiskEncryptionSetID - } - $DiskToInclude+=$DiskObject + if (!$HasResync) { + $PerformAutoResync = "true" + } + $validBooleanSpellings = @{ + true = "true"; + false = "false" + } + $PerformAutoResync = $validBooleanSpellings[$PerformAutoResync] + + $null = $PSBoundParameters.Add("MigrationItemName", $MachineName) + $null = $PSBoundParameters.Add("PolicyId", $PolicyId) + + $ProviderSpecificDetails = [Microsoft.Azure.PowerShell.Cmdlets.Migrate.Models.Api20180110.VMwareCbtEnableMigrationInput]::new() + $ProviderSpecificDetails.DataMoverRunAsAccountId = $VMWarerunasaccountID + $ProviderSpecificDetails.SnapshotRunAsAccountId = $VMWarerunasaccountID + $ProviderSpecificDetails.InstanceType = 'VMwareCbt' + $ProviderSpecificDetails.LicenseType = $LicenseType + $ProviderSpecificDetails.PerformAutoResync = $PerformAutoResync + if ($HasTargetAVSet) { + $ProviderSpecificDetails.TargetAvailabilitySetId = $TargetAvailabilitySet + } + if ($HasTargetAVZone) { + $ProviderSpecificDetails.TargetAvailabilityZone = $TargetAvailabilityZone + } + $ProviderSpecificDetails.TargetBootDiagnosticsStorageAccountId = $TargetBootDiagnosticsStorageAccount + $ProviderSpecificDetails.TargetNetworkId = $TargetNetworkId + $ProviderSpecificDetails.TargetResourceGroupId = $TargetResourceGroupId + $ProviderSpecificDetails.TargetSubnetName = $TargetSubnetName + $ProviderSpecificDetails.TargetVMName = $TargetVMName + if ($HasTargetVMSize) { $ProviderSpecificDetails.TargetVMSize = $TargetVMSize } + $ProviderSpecificDetails.VmwareMachineId = $MachineId + + + if ($parameterSet -match 'DefaultUser') { + [Microsoft.Azure.PowerShell.Cmdlets.Migrate.Models.Api20180110.IVMwareCbtDiskInput[]]$DiskToInclude = @() + if ($parameterSet -eq 'ByInputObjectDefaultUser') { + foreach ($onPremDisk in $InputObject.Disk) { + if ($onPremDisk.Uuid -ne $OSDiskID) { + $DiskObject = [Microsoft.Azure.PowerShell.Cmdlets.Migrate.Models.Api20180110.VMwareCbtDiskInput]::new() + $DiskObject.DiskId = $onPremDisk.Uuid + $DiskObject.DiskType = "Standard_LRS" + $DiskObject.IsOSDisk = "false" + $DiskObject.LogStorageAccountSasSecretName = $LogStorageAccountSas + $DiskObject.LogStorageAccountId = $LogStorageAccountID + if ($HasDiskEncryptionSetID) { + $DiskObject.DiskEncryptionSetId = $DiskEncryptionSetID } + $DiskToInclude += $DiskObject } } - $DiskObject = [Microsoft.Azure.PowerShell.Cmdlets.Migrate.Models.Api20180110.VMwareCbtDiskInput]::new() - $DiskObject.DiskId = $OSDiskID - $DiskObject.DiskType = $DiskType - $DiskObject.IsOSDisk = "true" - $DiskObject.LogStorageAccountSasSecretName = $LogStorageAccountSas - $DiskObject.LogStorageAccountId = $LogStorageAccountID - if($HasDiskEncryptionSetID){ - $DiskObject.DiskEncryptionSetId = $DiskEncryptionSetID - } + } + $DiskObject = [Microsoft.Azure.PowerShell.Cmdlets.Migrate.Models.Api20180110.VMwareCbtDiskInput]::new() + $DiskObject.DiskId = $OSDiskID + $DiskObject.DiskType = $DiskType + $DiskObject.IsOSDisk = "true" + $DiskObject.LogStorageAccountSasSecretName = $LogStorageAccountSas + $DiskObject.LogStorageAccountId = $LogStorageAccountID + if ($HasDiskEncryptionSetID) { + $DiskObject.DiskEncryptionSetId = $DiskEncryptionSetID + } - $DiskToInclude+=$DiskObject - $ProviderSpecificDetails.DisksToInclude = $DiskToInclude + $DiskToInclude += $DiskObject + $ProviderSpecificDetails.DisksToInclude = $DiskToInclude - }else{ - foreach ($DiskObject in $DiskToInclude) { - $DiskObject.LogStorageAccountSasSecretName = $LogStorageAccountSas - $DiskObject.LogStorageAccountId = $LogStorageAccountID - } - $ProviderSpecificDetails.DisksToInclude = $DiskToInclude + } + else { + foreach ($DiskObject in $DiskToInclude) { + $DiskObject.LogStorageAccountSasSecretName = $LogStorageAccountSas + $DiskObject.LogStorageAccountId = $LogStorageAccountID } - $null = $PSBoundParameters.add('ProviderSpecificDetail', $ProviderSpecificDetails) - $null = $PSBoundParameters.Add('NoWait', $true) - $output = Az.Migrate.internal\New-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.Remove("PolicyId") + $ProviderSpecificDetails.DisksToInclude = $DiskToInclude + } - $null = $PSBoundParameters.Add('JobName', $JobName) - $null = $PSBoundParameters.Add('ResourceName', $VaultName) - $null = $PSBoundParameters.Add('ResourceGroupName', $ResourceGroupName) + $null = $PSBoundParameters.add('ProviderSpecificDetail', $ProviderSpecificDetails) + $null = $PSBoundParameters.Add('NoWait', $true) + $output = Az.Migrate.internal\New-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.Remove("PolicyId") + + $null = $PSBoundParameters.Add('JobName', $JobName) + $null = $PSBoundParameters.Add('ResourceName', $VaultName) + $null = $PSBoundParameters.Add('ResourceGroupName', $ResourceGroupName) - return Az.Migrate.internal\Get-AzMigrateReplicationJob @PSBoundParameters + return Az.Migrate.internal\Get-AzMigrateReplicationJob @PSBoundParameters } diff --git a/src/Migrate/custom/Remove-AzMigrateServerReplication.ps1 b/src/Migrate/custom/Remove-AzMigrateServerReplication.ps1 index 52a460f2e4d7..700b53bd693e 100644 --- a/src/Migrate/custom/Remove-AzMigrateServerReplication.ps1 +++ b/src/Migrate/custom/Remove-AzMigrateServerReplication.ps1 @@ -19,19 +19,19 @@ Stops replication for the migrated server. .Description The Remove-AzMigrateServerReplication cmdlet stops the replication for a migrated server. .Link -https://docs.microsoft.com/en-us/powershell/module/az.migrate/remove-azmigrateserverreplication +https://docs.microsoft.com/powershell/module/az.migrate/remove-azmigrateserverreplication #> function Remove-AzMigrateServerReplication { [OutputType([Microsoft.Azure.PowerShell.Cmdlets.Migrate.Models.Api20180110.IJob])] - [CmdletBinding(DefaultParameterSetName='ByIDVMwareCbt', PositionalBinding=$false)] + [CmdletBinding(DefaultParameterSetName = 'ByIDVMwareCbt', PositionalBinding = $false)] param( - [Parameter(ParameterSetName='ByIDVMwareCbt', Mandatory)] + [Parameter(ParameterSetName = 'ByIDVMwareCbt', Mandatory)] [Microsoft.Azure.PowerShell.Cmdlets.Migrate.Category('Path')] [System.String] # Specifies the replcating server for which the replicatio needs to be disabled. The ID should be retrieved using the Get-AzMigrateServerReplication cmdlet. ${TargetObjectID}, - [Parameter(ParameterSetName='ByInputObjectVMwareCbt', Mandatory)] + [Parameter(ParameterSetName = 'ByInputObjectVMwareCbt', Mandatory)] [Microsoft.Azure.PowerShell.Cmdlets.Migrate.Category('Path')] [Microsoft.Azure.PowerShell.Cmdlets.Migrate.Models.Api20180110.IMigrationItem] # Specifies the machine object of the replicating server. @@ -45,7 +45,7 @@ function Remove-AzMigrateServerReplication { [Parameter()] [Microsoft.Azure.PowerShell.Cmdlets.Migrate.Category('Path')] - [Microsoft.Azure.PowerShell.Cmdlets.Migrate.Runtime.DefaultInfo(Script='(Get-AzContext).Subscription.Id')] + [Microsoft.Azure.PowerShell.Cmdlets.Migrate.Runtime.DefaultInfo(Script = '(Get-AzContext).Subscription.Id')] [System.String] # Azure Subscription ID. ${SubscriptionId}, @@ -99,46 +99,46 @@ function Remove-AzMigrateServerReplication { ) process { - $hasDeleteOption = $PSBoundParameters.ContainsKey('ForceRemove') - $null = $PSBoundParameters.Remove('ForceRemove') - $null = $PSBoundParameters.Remove('TargetObjectID') - $null = $PSBoundParameters.Remove('ResourceGroupName') - $null = $PSBoundParameters.Remove('ProjectName') - $null = $PSBoundParameters.Remove('MachineName') - $null = $PSBoundParameters.Remove('InputObject') - $parameterSet = $PSCmdlet.ParameterSetName + $hasDeleteOption = $PSBoundParameters.ContainsKey('ForceRemove') + $null = $PSBoundParameters.Remove('ForceRemove') + $null = $PSBoundParameters.Remove('TargetObjectID') + $null = $PSBoundParameters.Remove('ResourceGroupName') + $null = $PSBoundParameters.Remove('ProjectName') + $null = $PSBoundParameters.Remove('MachineName') + $null = $PSBoundParameters.Remove('InputObject') + $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] + 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) - if($hasDeleteOption){$null = $PSBoundParameters.Add('DeleteOption', $ForceRemove)} - $null = $PSBoundParameters.Add('NoWait', $true) - $output = Az.Migrate.internal\Remove-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("ResourceGroupName", $ResourceGroupName) + $null = $PSBoundParameters.Add("ResourceName", $VaultName) + $null = $PSBoundParameters.Add("FabricName", $FabricName) + $null = $PSBoundParameters.Add("MigrationItemName", $MachineName) + $null = $PSBoundParameters.Add("ProtectionContainerName", $ProtectionContainerName) + if ($hasDeleteOption) { $null = $PSBoundParameters.Add('DeleteOption', $ForceRemove) } + $null = $PSBoundParameters.Add('NoWait', $true) + $output = Az.Migrate.internal\Remove-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) + $null = $PSBoundParameters.Add('JobName', $JobName) + $null = $PSBoundParameters.Add('ResourceName', $VaultName) + $null = $PSBoundParameters.Add('ResourceGroupName', $ResourceGroupName) - return Az.Migrate.internal\Get-AzMigrateReplicationJob @PSBoundParameters - } + return Az.Migrate.internal\Get-AzMigrateReplicationJob @PSBoundParameters + } } \ No newline at end of file diff --git a/src/Migrate/custom/Restart-AzMigrateServerReplication.ps1 b/src/Migrate/custom/Restart-AzMigrateServerReplication.ps1 index 1b6442fdd057..51db01b4b1ae 100644 --- a/src/Migrate/custom/Restart-AzMigrateServerReplication.ps1 +++ b/src/Migrate/custom/Restart-AzMigrateServerReplication.ps1 @@ -19,19 +19,19 @@ Restarts the replication for specified server. .Description The Restart-AzMigrateServerReplication cmdlet repairs the replication for the specified server. .Link -https://docs.microsoft.com/en-us/powershell/module/az.migrate/restart-azmigrateserverreplication +https://docs.microsoft.com/powershell/module/az.migrate/restart-azmigrateserverreplication #> -function Restart-AzMigrateServerReplication{ +function Restart-AzMigrateServerReplication { [OutputType([Microsoft.Azure.PowerShell.Cmdlets.Migrate.Models.Api20180110.IJob])] - [CmdletBinding(DefaultParameterSetName='ByIDVMwareCbt', PositionalBinding=$false)] + [CmdletBinding(DefaultParameterSetName = 'ByIDVMwareCbt', PositionalBinding = $false)] param( - [Parameter(ParameterSetName='ByIDVMwareCbt', Mandatory)] + [Parameter(ParameterSetName = 'ByIDVMwareCbt', Mandatory)] [Microsoft.Azure.PowerShell.Cmdlets.Migrate.Category('Path')] [System.String] # Specifies the replcating server for which the resync needs to be initiated. The ID should be retrieved using the Get-AzMigrateServerReplication cmdlet. ${TargetObjectID}, - [Parameter(ParameterSetName='ByInputObjectVMwareCbt', Mandatory)] + [Parameter(ParameterSetName = 'ByInputObjectVMwareCbt', Mandatory)] [Microsoft.Azure.PowerShell.Cmdlets.Migrate.Category('Path')] [Microsoft.Azure.PowerShell.Cmdlets.Migrate.Models.Api20180110.IMigrationItem] # Specifies the machine object of the replicating server. @@ -39,7 +39,7 @@ function Restart-AzMigrateServerReplication{ [Parameter()] [Microsoft.Azure.PowerShell.Cmdlets.Migrate.Category('Path')] - [Microsoft.Azure.PowerShell.Cmdlets.Migrate.Runtime.DefaultInfo(Script='(Get-AzContext).Subscription.Id')] + [Microsoft.Azure.PowerShell.Cmdlets.Migrate.Runtime.DefaultInfo(Script = '(Get-AzContext).Subscription.Id')] [System.String] # Azure Subscription ID. ${SubscriptionId}, @@ -93,54 +93,55 @@ function Restart-AzMigrateServerReplication{ ) process { - $null = $PSBoundParameters.Remove('TargetObjectID') - $null = $PSBoundParameters.Remove('ResourceGroupName') - $null = $PSBoundParameters.Remove('ProjectName') - $null = $PSBoundParameters.Remove('MachineName') - $null = $PSBoundParameters.Remove('InputObject') - $parameterSet = $PSCmdlet.ParameterSetName + $null = $PSBoundParameters.Remove('TargetObjectID') + $null = $PSBoundParameters.Remove('ResourceGroupName') + $null = $PSBoundParameters.Remove('ProjectName') + $null = $PSBoundParameters.Remove('MachineName') + $null = $PSBoundParameters.Remove('InputObject') + $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] + 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) + $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')){ - $ProviderSepcificDetail = [Microsoft.Azure.PowerShell.Cmdlets.Migrate.Models.Api20180110.VMwareCbtResyncInput]::new() - $ProviderSepcificDetail.InstanceType = 'VMwareCbt' - $ProviderSepcificDetail.SkipCbtReset = 'true' - $null = $PSBoundParameters.Add('ProviderSpecificDetail', $ProviderSepcificDetail) - $null = $PSBoundParameters.Add('NoWait', $true) - $output = Az.Migrate.internal\Invoke-AzMigrateResyncReplicationMigrationItem @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") + $ReplicationMigrationItem = Az.Migrate.internal\Get-AzMigrateReplicationMigrationItem @PSBoundParameters + if ($ReplicationMigrationItem -and ($ReplicationMigrationItem.ProviderSpecificDetail.InstanceType -eq 'VMwarecbt')) { + $ProviderSepcificDetail = [Microsoft.Azure.PowerShell.Cmdlets.Migrate.Models.Api20180110.VMwareCbtResyncInput]::new() + $ProviderSepcificDetail.InstanceType = 'VMwareCbt' + $ProviderSepcificDetail.SkipCbtReset = 'true' + $null = $PSBoundParameters.Add('ProviderSpecificDetail', $ProviderSepcificDetail) + $null = $PSBoundParameters.Add('NoWait', $true) + $output = Az.Migrate.internal\Invoke-AzMigrateResyncReplicationMigrationItem @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) + $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" - } + return Az.Migrate.internal\Get-AzMigrateReplicationJob @PSBoundParameters + } + else { + throw "Either machine doesn't exist or provider/action isn't supported for this machine" + } } } \ No newline at end of file diff --git a/src/Migrate/custom/Set-AzMigrateServerReplication.ps1 b/src/Migrate/custom/Set-AzMigrateServerReplication.ps1 index d2a83bfd20b0..6d47030b9d84 100644 --- a/src/Migrate/custom/Set-AzMigrateServerReplication.ps1 +++ b/src/Migrate/custom/Set-AzMigrateServerReplication.ps1 @@ -19,19 +19,19 @@ Updates the target properties for the replicating server. .Description The Set-AzMigrateServerReplication cmdlet updates the target properties for the replicating server. .Link -https://docs.microsoft.com/en-us/powershell/module/az.migrate/set-azmigrateserverreplication +https://docs.microsoft.com/powershell/module/az.migrate/set-azmigrateserverreplication #> function Set-AzMigrateServerReplication { [OutputType([Microsoft.Azure.PowerShell.Cmdlets.Migrate.Models.Api20180110.IJob])] - [CmdletBinding(DefaultParameterSetName='ByIDVMwareCbt', PositionalBinding=$false)] + [CmdletBinding(DefaultParameterSetName = 'ByIDVMwareCbt', PositionalBinding = $false)] param( - [Parameter(ParameterSetName='ByIDVMwareCbt', Mandatory)] + [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)] + [Parameter(ParameterSetName = 'ByInputObjectVMwareCbt', Mandatory)] [Microsoft.Azure.PowerShell.Cmdlets.Migrate.Category('Path')] [Microsoft.Azure.PowerShell.Cmdlets.Migrate.Models.Api20180110.IMigrationItem] # Specifies the replicating server for which the properties need to be updated. The server object can be retrieved using the Get-AzMigrateServerReplication cmdlet. @@ -87,7 +87,7 @@ function Set-AzMigrateServerReplication { [Parameter()] [Microsoft.Azure.PowerShell.Cmdlets.Migrate.Category('Path')] - [Microsoft.Azure.PowerShell.Cmdlets.Migrate.Runtime.DefaultInfo(Script='(Get-AzContext).Subscription.Id')] + [Microsoft.Azure.PowerShell.Cmdlets.Migrate.Runtime.DefaultInfo(Script = '(Get-AzContext).Subscription.Id')] [System.String] # The subscription Id. ${SubscriptionId}, @@ -142,181 +142,188 @@ function Set-AzMigrateServerReplication { process { - $HasTargetVMName = $PSBoundParameters.ContainsKey('TargetVMName') - $HasTargetVmSize = $PSBoundParameters.ContainsKey('TargetVMSize') - $HasTargetNetworkId = $PSBoundParameters.ContainsKey('TargetNetworkId') - $HasTargetResourceGroupID = $PSBoundParameters.ContainsKey('TargetResourceGroupID') - $HasNicToUpdate = $PSBoundParameters.ContainsKey('NicToUpdate') - $HasTargetAvailabilitySet = $PSBoundParameters.ContainsKey('TargetAvailabilitySet') - $HasTargetAvailabilityZone = $PSBoundParameters.ContainsKey('TargetAvailabilityZone') - $HasTargetBootDignosticStorageAccount = $PSBoundParameters.ContainsKey('TargetBootDiagnosticsStorageAccount') + $HasTargetVMName = $PSBoundParameters.ContainsKey('TargetVMName') + $HasTargetVmSize = $PSBoundParameters.ContainsKey('TargetVMSize') + $HasTargetNetworkId = $PSBoundParameters.ContainsKey('TargetNetworkId') + $HasTargetResourceGroupID = $PSBoundParameters.ContainsKey('TargetResourceGroupID') + $HasNicToUpdate = $PSBoundParameters.ContainsKey('NicToUpdate') + $HasTargetAvailabilitySet = $PSBoundParameters.ContainsKey('TargetAvailabilitySet') + $HasTargetAvailabilityZone = $PSBoundParameters.ContainsKey('TargetAvailabilityZone') + $HasTargetBootDignosticStorageAccount = $PSBoundParameters.ContainsKey('TargetBootDiagnosticsStorageAccount') - $null = $PSBoundParameters.Remove('TargetObjectID') - $null = $PSBoundParameters.Remove('TargetVMName') - $null = $PSBoundParameters.Remove('TargetVMSize') - $null = $PSBoundParameters.Remove('TargetNetworkId') - $null = $PSBoundParameters.Remove('TargetResourceGroupID') - $null = $PSBoundParameters.Remove('NicToUpdate') - $null = $PSBoundParameters.Remove('TargetAvailabilitySet') - $null = $PSBoundParameters.Remove('TargetAvailabilityZone') - $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.Remove('TargetObjectID') + $null = $PSBoundParameters.Remove('TargetVMName') + $null = $PSBoundParameters.Remove('TargetVMSize') + $null = $PSBoundParameters.Remove('TargetNetworkId') + $null = $PSBoundParameters.Remove('TargetResourceGroupID') + $null = $PSBoundParameters.Remove('NicToUpdate') + $null = $PSBoundParameters.Remove('TargetAvailabilitySet') + $null = $PSBoundParameters.Remove('TargetAvailabilityZone') + $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) + $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.Api20180110.VMwareCbtUpdateMigrationItemInput]::new() + $ReplicationMigrationItem = Az.Migrate.internal\Get-AzMigrateReplicationMigrationItem @PSBoundParameters + if ($ReplicationMigrationItem -and ($ReplicationMigrationItem.ProviderSpecificDetail.InstanceType -eq 'VMwarecbt')) { + $ProviderSpecificDetails = [Microsoft.Azure.PowerShell.Cmdlets.Migrate.Models.Api20180110.VMwareCbtUpdateMigrationItemInput]::new() - # Auto fill unchanged parameters - $ProviderSpecificDetails.InstanceType = 'VMwareCbt' - $ProviderSpecificDetails.LicenseType = $ReplicationMigrationItem.ProviderSpecificDetail.LicenseType - $ProviderSpecificDetails.PerformAutoResync = $ReplicationMigrationItem.ProviderSpecificDetail.PerformAutoResync + # 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 ($HasTargetAvailabilitySet) { + $ProviderSpecificDetails.TargetAvailabilitySetId = $TargetAvailabilitySet + } + else { + $ProviderSpecificDetails.TargetAvailabilitySetId = $ReplicationMigrationItem.ProviderSpecificDetail.TargetAvailabilitySetId + } - if($HasTargetAvailabilityZone){ - $ProviderSpecificDetails.TargetAvailabilityZone = $TargetAvailabilityZone - }else{ - $ProviderSpecificDetails.TargetAvailabilityZone = $ReplicationMigrationItem.ProviderSpecificDetail.TargetAvailabilityZone - } + if ($HasTargetAvailabilityZone) { + $ProviderSpecificDetails.TargetAvailabilityZone = $TargetAvailabilityZone + } + else { + $ProviderSpecificDetails.TargetAvailabilityZone = $ReplicationMigrationItem.ProviderSpecificDetail.TargetAvailabilityZone + } - if($HasTargetNetworkId){ - $ProviderSpecificDetails.TargetNetworkId = $TargetNetworkId - }else{ - $ProviderSpecificDetails.TargetNetworkId = $ReplicationMigrationItem.ProviderSpecificDetail.TargetNetworkId - } + if ($HasTargetNetworkId) { + $ProviderSpecificDetails.TargetNetworkId = $TargetNetworkId + } + else { + $ProviderSpecificDetails.TargetNetworkId = $ReplicationMigrationItem.ProviderSpecificDetail.TargetNetworkId + } - if($HasTargetVMName){ - $ProviderSpecificDetails.TargetVMName = $TargetVMName - }else{ - $ProviderSpecificDetails.TargetVMName = $ReplicationMigrationItem.ProviderSpecificDetail.TargetVMName - } + if ($HasTargetVMName) { + $ProviderSpecificDetails.TargetVMName = $TargetVMName + } + else { + $ProviderSpecificDetails.TargetVMName = $ReplicationMigrationItem.ProviderSpecificDetail.TargetVMName + } - if($HasTargetResourceGroupID){ - $ProviderSpecificDetails.TargetResourceGroupId = $TargetResourceGroupID - }else{ - $ProviderSpecificDetails.TargetResourceGroupId = $ReplicationMigrationItem.ProviderSpecificDetail.TargetResourceGroupId - } + if ($HasTargetResourceGroupID) { + $ProviderSpecificDetails.TargetResourceGroupId = $TargetResourceGroupID + } + else { + $ProviderSpecificDetails.TargetResourceGroupId = $ReplicationMigrationItem.ProviderSpecificDetail.TargetResourceGroupId + } - if($HasTargetVmSize){ - $ProviderSpecificDetails.TargetVMSize = $TargetVmSize - }else{ - $ProviderSpecificDetails.TargetVMSize = $ReplicationMigrationItem.ProviderSpecificDetail.TargetVmSize - } + if ($HasTargetVmSize) { + $ProviderSpecificDetails.TargetVMSize = $TargetVmSize + } + else { + $ProviderSpecificDetails.TargetVMSize = $ReplicationMigrationItem.ProviderSpecificDetail.TargetVmSize + } - if($HasTargetBootDignosticStorageAccount){ - $ProviderSpecificDetails.TargetBootDiagnosticsStorageAccountId = $TargetBootDiagnosticsStorageAccount - }else{ - $ProviderSpecificDetails.TargetBootDiagnosticsStorageAccountId = $ReplicationMigrationItem.ProviderSpecificDetail.TargetBootDiagnosticsStorageAccountId - } + 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 - } + # 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 } + } - $originalNics = $ReplicationMigrationItem.ProviderSpecificDetail.VMNic - [Microsoft.Azure.PowerShell.Cmdlets.Migrate.Models.Api20180110.IVMwareCbtNicInput[]]$updateNicsArray = @() + $originalNics = $ReplicationMigrationItem.ProviderSpecificDetail.VMNic + [Microsoft.Azure.PowerShell.Cmdlets.Migrate.Models.Api20180110.IVMwareCbtNicInput[]]$updateNicsArray = @() - foreach ($storedNic in $originalNics) { - $updateNic = [Microsoft.Azure.PowerShell.Cmdlets.Migrate.Models.Api20180110.VMwareCbtNicInput]::new() - $updateNic.IsPrimaryNic = $storedNic.IsPrimaryNic - $updateNic.IsSelectedForMigration = $storedNic.IsSelectedForMigration - $updateNic.NicId = $storedNic.NicId - $updateNic.TargetStaticIPAddress = $storedNic.TargetIPAddress - $updateNic.TargetSubnetName = $storedNic.TargetSubnetName + foreach ($storedNic in $originalNics) { + $updateNic = [Microsoft.Azure.PowerShell.Cmdlets.Migrate.Models.Api20180110.VMwareCbtNicInput]::new() + $updateNic.IsPrimaryNic = $storedNic.IsPrimaryNic + $updateNic.IsSelectedForMigration = $storedNic.IsSelectedForMigration + $updateNic.NicId = $storedNic.NicId + $updateNic.TargetStaticIPAddress = $storedNic.TargetIPAddress + $updateNic.TargetSubnetName = $storedNic.TargetSubnetName - $matchingUserInputNic = $null - if($HasNicToUpdate){ - foreach ($userInputNic in $NicToUpdate) { - if($userInputNic.NicId -eq $storedNic.NicId){ - $matchingUserInputNic = $userInputNic - break - } + $matchingUserInputNic = $null + if ($HasNicToUpdate) { + foreach ($userInputNic in $NicToUpdate) { + if ($userInputNic.NicId -eq $storedNic.NicId) { + $matchingUserInputNic = $userInputNic + break } } - if($matchingUserInputNic -ne $null){ - if($matchingUserInputNic.IsPrimaryNic -ne $null){ - $updateNic.IsPrimaryNic = $matchingUserInputNic.IsPrimaryNic - $updateNic.IsSelectedForMigration = $matchingUserInputNic.IsSelectedForMigration - if($updateNic.IsSelectedForMigration -eq "false"){ - $updateNic.TargetSubnetName = "" - $updateNic.TargetStaticIPAddress = "" - } + } + 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($matchingUserInputNic.TargetSubnetName -ne $null){ - $updateNic.TargetSubnetName = $matchingUserInputNic.TargetSubnetName + } + if ($null -ne $matchingUserInputNic.TargetSubnetName) { + $updateNic.TargetSubnetName = $matchingUserInputNic.TargetSubnetName + } + if ($null -ne $matchingUserInputNic.TargetStaticIPAddress) { + if ($matchingUserInputNic.TargetStaticIPAddress -eq "auto") { + $updateNic.TargetStaticIPAddress = $null } - if($matchingUserInputNic.TargetStaticIPAddress -ne $null){ - if($matchingUserInputNic.TargetStaticIPAddress -eq "auto"){ - $updateNic.TargetStaticIPAddress = $null - }else{ - $updateNic.TargetStaticIPAddress = $matchingUserInputNic.TargetStaticIPAddress - } + else { + $updateNic.TargetStaticIPAddress = $matchingUserInputNic.TargetStaticIPAddress } } - $updateNicsArray += $updateNic } + $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." + # 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." + } - $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) + $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" - } - + return Az.Migrate.internal\Get-AzMigrateReplicationJob @PSBoundParameters + } + else { + throw "Either machine doesn't exist or provider/action isn't supported for this machine" + } } - } \ No newline at end of file diff --git a/src/Migrate/custom/Start-AzMigrateServerMigration.ps1 b/src/Migrate/custom/Start-AzMigrateServerMigration.ps1 index 2e46deb04a0d..85684ed4231e 100644 --- a/src/Migrate/custom/Start-AzMigrateServerMigration.ps1 +++ b/src/Migrate/custom/Start-AzMigrateServerMigration.ps1 @@ -19,19 +19,19 @@ Starts the migration for the replicating server. .Description Starts the migration for the replicating server. .Link -https://docs.microsoft.com/en-us/powershell/module/az.migrate/start-azmigrateservermigration +https://docs.microsoft.com/powershell/module/az.migrate/start-azmigrateservermigration #> function Start-AzMigrateServerMigration { [OutputType([Microsoft.Azure.PowerShell.Cmdlets.Migrate.Models.Api20180110.IJob])] - [CmdletBinding(DefaultParameterSetName='ByIDVMwareCbt', PositionalBinding=$false)] + [CmdletBinding(DefaultParameterSetName = 'ByIDVMwareCbt', PositionalBinding = $false)] param( - [Parameter(ParameterSetName='ByIDVMwareCbt', Mandatory)] + [Parameter(ParameterSetName = 'ByIDVMwareCbt', Mandatory)] [Microsoft.Azure.PowerShell.Cmdlets.Migrate.Category('Path')] [System.String] # Specifies the replcating server for which migration needs to be initiated. The ID should be retrieved using the Get-AzMigrateServerReplication cmdlet. ${TargetObjectID}, - [Parameter(ParameterSetName='ByInputObjectVMwareCbt', Mandatory)] + [Parameter(ParameterSetName = 'ByInputObjectVMwareCbt', Mandatory)] [Microsoft.Azure.PowerShell.Cmdlets.Migrate.Category('Path')] [Microsoft.Azure.PowerShell.Cmdlets.Migrate.Models.Api20180110.IMigrationItem] # Specifies the replicating server for which migration needs to be initiated. The server object can be retrieved using the Get-AzMigrateServerReplication cmdlet. @@ -45,7 +45,7 @@ function Start-AzMigrateServerMigration { [Parameter()] [Microsoft.Azure.PowerShell.Cmdlets.Migrate.Category('Path')] - [Microsoft.Azure.PowerShell.Cmdlets.Migrate.Runtime.DefaultInfo(Script='(Get-AzContext).Subscription.Id')] + [Microsoft.Azure.PowerShell.Cmdlets.Migrate.Runtime.DefaultInfo(Script = '(Get-AzContext).Subscription.Id')] [System.String] # Azure Subscription ID. ${SubscriptionId}, @@ -99,62 +99,64 @@ function Start-AzMigrateServerMigration { ) process { - if($TurnOffSourceServer.IsPresent){ - $PerformShutDown = "true" - }else{ - $PerformShutDown = "false" - } - $null = $PSBoundParameters.Remove('TurnOffSourceServer') - $null = $PSBoundParameters.Remove('TargetObjectID') - $null = $PSBoundParameters.Remove('ResourceGroupName') - $null = $PSBoundParameters.Remove('ProjectName') - $null = $PSBoundParameters.Remove('MachineName') - $null = $PSBoundParameters.Remove('InputObject') - $parameterSet = $PSCmdlet.ParameterSetName + if ($TurnOffSourceServer.IsPresent) { + $PerformShutDown = "true" + } + else { + $PerformShutDown = "false" + } + $null = $PSBoundParameters.Remove('TurnOffSourceServer') + $null = $PSBoundParameters.Remove('TargetObjectID') + $null = $PSBoundParameters.Remove('ResourceGroupName') + $null = $PSBoundParameters.Remove('ProjectName') + $null = $PSBoundParameters.Remove('MachineName') + $null = $PSBoundParameters.Remove('InputObject') + $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] + 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) + $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') -and ($ReplicationMigrationItem.AllowedOperation -contains 'Migrate' )){ - $ProviderSpecificDetailInput = [Microsoft.Azure.PowerShell.Cmdlets.Migrate.Models.Api20180110.VMwareCbtMigrateInput]::new() - $ProviderSpecificDetailInput.InstanceType = 'VMwareCbt' - $ProviderSpecificDetailInput.PerformShutdown = $PerformShutDown + $ReplicationMigrationItem = Az.Migrate.internal\Get-AzMigrateReplicationMigrationItem @PSBoundParameters + if ($ReplicationMigrationItem -and ($ReplicationMigrationItem.ProviderSpecificDetail.InstanceType -eq 'VMwarecbt') -and ($ReplicationMigrationItem.AllowedOperation -contains 'Migrate' )) { + $ProviderSpecificDetailInput = [Microsoft.Azure.PowerShell.Cmdlets.Migrate.Models.Api20180110.VMwareCbtMigrateInput]::new() + $ProviderSpecificDetailInput.InstanceType = 'VMwareCbt' + $ProviderSpecificDetailInput.PerformShutdown = $PerformShutDown - $null = $PSBoundParameters.Add('ProviderSpecificDetail', $ProviderSpecificDetailInput) - $null = $PSBoundParameters.Add('NoWait', $true) - $output = Az.Migrate.internal\Move-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('ProviderSpecificDetail', $ProviderSpecificDetailInput) + $null = $PSBoundParameters.Add('NoWait', $true) + $output = Az.Migrate.internal\Move-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" - } + $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" + } } -} \ No newline at end of file +} \ No newline at end of file diff --git a/src/Migrate/custom/Start-AzMigrateTestMigration.ps1 b/src/Migrate/custom/Start-AzMigrateTestMigration.ps1 index e59b720b05ef..c1c37cfcbeef 100644 --- a/src/Migrate/custom/Start-AzMigrateTestMigration.ps1 +++ b/src/Migrate/custom/Start-AzMigrateTestMigration.ps1 @@ -19,19 +19,19 @@ Starts the test migration for the replicating server. .Description The Start-AzMigrateTestMigration cmdlet initiates the test migration for the replicating server. .Link -https://docs.microsoft.com/en-us/powershell/module/az.migrate/start-azmigratetestmigration +https://docs.microsoft.com/powershell/module/az.migrate/start-azmigratetestmigration #> function Start-AzMigrateTestMigration { [OutputType([Microsoft.Azure.PowerShell.Cmdlets.Migrate.Models.Api20180110.IJob])] - [CmdletBinding(DefaultParameterSetName='ByIDVMwareCbt', PositionalBinding=$false)] + [CmdletBinding(DefaultParameterSetName = 'ByIDVMwareCbt', PositionalBinding = $false)] param( - [Parameter(ParameterSetName='ByIDVMwareCbt', Mandatory)] + [Parameter(ParameterSetName = 'ByIDVMwareCbt', Mandatory)] [Microsoft.Azure.PowerShell.Cmdlets.Migrate.Category('Path')] [System.String] # Specifies the replicating server for which the test migration needs to be initiated. The ID should be retrieved using the Get-AzMigrateServerReplication cmdlet. ${TargetObjectID}, - [Parameter(ParameterSetName='ByInputObjectVMwareCbt', Mandatory)] + [Parameter(ParameterSetName = 'ByInputObjectVMwareCbt', Mandatory)] [Microsoft.Azure.PowerShell.Cmdlets.Migrate.Category('Path')] [Microsoft.Azure.PowerShell.Cmdlets.Migrate.Models.Api20180110.IMigrationItem] # Specifies the replicating server for which the test migration needs to be initiated. The server object can be retrieved using the Get-AzMigrateServerReplication cmdlet. @@ -45,7 +45,7 @@ function Start-AzMigrateTestMigration { [Parameter()] [Microsoft.Azure.PowerShell.Cmdlets.Migrate.Category('Path')] - [Microsoft.Azure.PowerShell.Cmdlets.Migrate.Runtime.DefaultInfo(Script='(Get-AzContext).Subscription.Id')] + [Microsoft.Azure.PowerShell.Cmdlets.Migrate.Runtime.DefaultInfo(Script = '(Get-AzContext).Subscription.Id')] [System.String] # Azure Subscription ID. ${SubscriptionId}, @@ -99,60 +99,59 @@ function Start-AzMigrateTestMigration { ) process { - $null = $PSBoundParameters.Remove('TargetObjectID') - $null = $PSBoundParameters.Remove('TestNetworkID') - $null = $PSBoundParameters.Remove('ResourceGroupName') - $null = $PSBoundParameters.Remove('ProjectName') - $null = $PSBoundParameters.Remove('MachineName') - $null = $PSBoundParameters.Remove('InputObject') - $parameterSet = $PSCmdlet.ParameterSetName + $null = $PSBoundParameters.Remove('TargetObjectID') + $null = $PSBoundParameters.Remove('TestNetworkID') + $null = $PSBoundParameters.Remove('ResourceGroupName') + $null = $PSBoundParameters.Remove('ProjectName') + $null = $PSBoundParameters.Remove('MachineName') + $null = $PSBoundParameters.Remove('InputObject') + $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] + 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) + $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') -and ($ReplicationMigrationItem.AllowedOperation -contains 'TestMigrate' )){ - $ProviderSpecificDetailInput = [Microsoft.Azure.PowerShell.Cmdlets.Migrate.Models.Api20180110.VMwareCbtTestMigrateInput]::new() - $ProviderSpecificDetailInput.InstanceType = 'VMwareCbt' - $ProviderSpecificDetailInput.NetworkId = $TestNetworkID - $ProviderSpecificDetailInput.RecoveryPointId = $ReplicationMigrationItem.ProviderSpecificDetail.LastRecoveryPointId + $ReplicationMigrationItem = Az.Migrate.internal\Get-AzMigrateReplicationMigrationItem @PSBoundParameters + if ($ReplicationMigrationItem -and ($ReplicationMigrationItem.ProviderSpecificDetail.InstanceType -eq 'VMwarecbt') -and ($ReplicationMigrationItem.AllowedOperation -contains 'TestMigrate' )) { + $ProviderSpecificDetailInput = [Microsoft.Azure.PowerShell.Cmdlets.Migrate.Models.Api20180110.VMwareCbtTestMigrateInput]::new() + $ProviderSpecificDetailInput.InstanceType = 'VMwareCbt' + $ProviderSpecificDetailInput.NetworkId = $TestNetworkID + $ProviderSpecificDetailInput.RecoveryPointId = $ReplicationMigrationItem.ProviderSpecificDetail.LastRecoveryPointId - $null = $PSBoundParameters.Add('ProviderSpecificDetail', $ProviderSpecificDetailInput) - $null = $PSBoundParameters.Add('NoWait', $true) - $output = Az.Migrate.internal\Test-AzMigrateReplicationMigrationItemMigrate @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('ProviderSpecificDetail', $ProviderSpecificDetailInput) + $null = $PSBoundParameters.Add('NoWait', $true) + $output = Az.Migrate.internal\Test-AzMigrateReplicationMigrationItemMigrate @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" - } - - } + $null = $PSBoundParameters.Add('JobName', $JobName) + $null = $PSBoundParameters.Add('ResourceName', $VaultName) + $null = $PSBoundParameters.Add('ResourceGroupName', $ResourceGroupName) -} \ No newline at end of file + return Az.Migrate.internal\Get-AzMigrateReplicationJob @PSBoundParameters + } + else { + throw "Either machine doesn't exist or provider/action isn't supported for this machine" + } + } +} \ No newline at end of file diff --git a/src/Migrate/custom/Start-AzMigrateTestMigrationCleanup.ps1 b/src/Migrate/custom/Start-AzMigrateTestMigrationCleanup.ps1 index 60b4b177c987..3b57e77213b0 100644 --- a/src/Migrate/custom/Start-AzMigrateTestMigrationCleanup.ps1 +++ b/src/Migrate/custom/Start-AzMigrateTestMigrationCleanup.ps1 @@ -19,19 +19,19 @@ Cleans up the test migration for the replicating server. .Description The Start-AzMigrateTestMigrationCleanup cmdlet initiates the clean up of the test migration for the replicating server. .Link -https://docs.microsoft.com/en-us/powershell/module/az.migrate/start-azmigratetestmigrationcleanup +https://docs.microsoft.com/powershell/module/az.migrate/start-azmigratetestmigrationcleanup #> function Start-AzMigrateTestMigrationCleanup { [OutputType([Microsoft.Azure.PowerShell.Cmdlets.Migrate.Models.Api20180110.IJob])] - [CmdletBinding(DefaultParameterSetName='ByIDVMwareCbt', PositionalBinding=$false)] + [CmdletBinding(DefaultParameterSetName = 'ByIDVMwareCbt', PositionalBinding = $false)] param( - [Parameter(ParameterSetName='ByIDVMwareCbt', Mandatory)] + [Parameter(ParameterSetName = 'ByIDVMwareCbt', Mandatory)] [Microsoft.Azure.PowerShell.Cmdlets.Migrate.Category('Path')] [System.String] # Specifies the replicating server for which the test migration cleanup needs to be initiated. The ID should be retrieved using the Get-AzMigrateServerReplication cmdlet. ${TargetObjectID}, - [Parameter(ParameterSetName='ByInputObjectVMwareCbt', Mandatory)] + [Parameter(ParameterSetName = 'ByInputObjectVMwareCbt', Mandatory)] [Microsoft.Azure.PowerShell.Cmdlets.Migrate.Category('Path')] [Microsoft.Azure.PowerShell.Cmdlets.Migrate.Models.Api20180110.IMigrationItem] # Specifies the replicating server for which the test migration cleanup needs to be initiated. The server object can be retrieved using the Get-AzMigrateServerReplication cmdlet @@ -39,7 +39,7 @@ function Start-AzMigrateTestMigrationCleanup { [Parameter()] [Microsoft.Azure.PowerShell.Cmdlets.Migrate.Category('Path')] - [Microsoft.Azure.PowerShell.Cmdlets.Migrate.Runtime.DefaultInfo(Script='(Get-AzContext).Subscription.Id')] + [Microsoft.Azure.PowerShell.Cmdlets.Migrate.Runtime.DefaultInfo(Script = '(Get-AzContext).Subscription.Id')] [System.String] # Azure Subscription ID. ${SubscriptionId}, @@ -93,54 +93,55 @@ function Start-AzMigrateTestMigrationCleanup { ) process { - $null = $PSBoundParameters.Remove('TargetObjectID') - $null = $PSBoundParameters.Remove('ResourceGroupName') - $null = $PSBoundParameters.Remove('ProjectName') - $null = $PSBoundParameters.Remove('MachineName') - $null = $PSBoundParameters.Remove('InputObject') - $parameterSet = $PSCmdlet.ParameterSetName + $null = $PSBoundParameters.Remove('TargetObjectID') + $null = $PSBoundParameters.Remove('ResourceGroupName') + $null = $PSBoundParameters.Remove('ProjectName') + $null = $PSBoundParameters.Remove('MachineName') + $null = $PSBoundParameters.Remove('InputObject') + $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] + 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) + $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')){ + $ReplicationMigrationItem = Az.Migrate.internal\Get-AzMigrateReplicationMigrationItem @PSBoundParameters + if ($ReplicationMigrationItem -and ($ReplicationMigrationItem.ProviderSpecificDetail.InstanceType -eq 'VMwarecbt')) { - $null = $PSBoundParameters.Add('Comment', "Test migrate cleanup from powershell") - $null = $PSBoundParameters.Add('NoWait', $true) - $output = Az.Migrate.internal\Test-AzMigrateReplicationMigrationItemMigrateCleanup @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.Remove('Comment') + $null = $PSBoundParameters.Add('Comment', "Test migrate cleanup from powershell") + $null = $PSBoundParameters.Add('NoWait', $true) + $output = Az.Migrate.internal\Test-AzMigrateReplicationMigrationItemMigrateCleanup @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.Remove('Comment') - $null = $PSBoundParameters.Add('JobName', $JobName) - $null = $PSBoundParameters.Add('ResourceName', $VaultName) - $null = $PSBoundParameters.Add('ResourceGroupName', $ResourceGroupName) - - return Az.Migrate.internal\Get-AzMigrateReplicationJob @PSBoundParameters - }else{ - throw "Operation Not supported" - } + $null = $PSBoundParameters.Add('JobName', $JobName) + $null = $PSBoundParameters.Add('ResourceName', $VaultName) + $null = $PSBoundParameters.Add('ResourceGroupName', $ResourceGroupName) + + return Az.Migrate.internal\Get-AzMigrateReplicationJob @PSBoundParameters + } + else { + throw "Operation Not supported" + } } -} \ No newline at end of file +} \ No newline at end of file diff --git a/src/Migrate/examples/Initialize-AzMigrateReplicationInfrastructure.md b/src/Migrate/examples/Initialize-AzMigrateReplicationInfrastructure.md new file mode 100644 index 000000000000..8348ff3a4254 --- /dev/null +++ b/src/Migrate/examples/Initialize-AzMigrateReplicationInfrastructure.md @@ -0,0 +1,10 @@ +### Example 1: Initialises the infrastructure for the migrate project. +```powershell +PS C:\> Initialize-AzMigrateReplicationInfrastructure.ps1 -ResourceGroupName TestRG -ProjectName TestProject -Vmwareagentless -TargetRegion centralus + +True +``` + +Initialises the infrastructure for the migrate project. + + diff --git a/src/Migrate/exports/Get-AzMigrateDiscoveredServer.ps1 b/src/Migrate/exports/Get-AzMigrateDiscoveredServer.ps1 index 92317a07be4f..0fd512f25ca7 100644 --- a/src/Migrate/exports/Get-AzMigrateDiscoveredServer.ps1 +++ b/src/Migrate/exports/Get-AzMigrateDiscoveredServer.ps1 @@ -94,7 +94,7 @@ Contoso-DataTier3 10-150-8-52-b090bef3-b733-5e34-bc8f-eb6f2701432a_5 .Outputs Microsoft.Azure.PowerShell.Cmdlets.Migrate.Models.Api202001.IVMwareMachine .Link -https://docs.microsoft.com/en-us/powershell/module/az.migrate/get-azmigratediscoveredserver +https://docs.microsoft.com/powershell/module/az.migrate/get-azmigratediscoveredserver #> function Get-AzMigrateDiscoveredServer { [OutputType([Microsoft.Azure.PowerShell.Cmdlets.Migrate.Models.Api202001.IVMwareMachine])] diff --git a/src/Migrate/exports/Get-AzMigrateJob.ps1 b/src/Migrate/exports/Get-AzMigrateJob.ps1 index 3b72d8428715..47a6b1be48fe 100644 --- a/src/Migrate/exports/Get-AzMigrateJob.ps1 +++ b/src/Migrate/exports/Get-AzMigrateJob.ps1 @@ -139,7 +139,7 @@ INPUTOBJECT : Specifies the job object of the replicating server. [TaskId ]: The Id. [TaskType ]: The type of task. Details in CustomDetails property depend on this type. .Link -https://docs.microsoft.com/en-us/powershell/module/az.migrate/get-azmigratejob +https://docs.microsoft.com/powershell/module/az.migrate/get-azmigratejob #> function Get-AzMigrateJob { [OutputType([Microsoft.Azure.PowerShell.Cmdlets.Migrate.Models.Api20180110.IJob])] diff --git a/src/Migrate/exports/Get-AzMigrateProject.ps1 b/src/Migrate/exports/Get-AzMigrateProject.ps1 index 1d7e2ed30ef7..d0695365d79a 100644 --- a/src/Migrate/exports/Get-AzMigrateProject.ps1 +++ b/src/Migrate/exports/Get-AzMigrateProject.ps1 @@ -28,7 +28,7 @@ ETag Location Name Type .Outputs Microsoft.Azure.PowerShell.Cmdlets.Migrate.Models.Api20180901Preview.IMigrateProject .Link -https://docs.microsoft.com/en-us/powershell/module/az.migrate/get-azmigrateproject +https://docs.microsoft.com/powershell/module/az.migrate/get-azmigrateproject #> function Get-AzMigrateProject { [OutputType([Microsoft.Azure.PowerShell.Cmdlets.Migrate.Models.Api20180901Preview.IMigrateProject])] diff --git a/src/Migrate/exports/Get-AzMigrateReplicationFabric.ps1 b/src/Migrate/exports/Get-AzMigrateReplicationFabric.ps1 index cb6a6382f8ad..f64fdc0ae643 100644 --- a/src/Migrate/exports/Get-AzMigrateReplicationFabric.ps1 +++ b/src/Migrate/exports/Get-AzMigrateReplicationFabric.ps1 @@ -64,7 +64,7 @@ Type : Microsoft.RecoveryServices/vaults/re .Outputs Microsoft.Azure.PowerShell.Cmdlets.Migrate.Models.Api20180110.IFabric .Link -https://docs.microsoft.com/en-us/powershell/module/az.migrate/get-azmigratereplicationfabric +https://docs.microsoft.com/powershell/module/az.migrate/get-azmigratereplicationfabric #> function Get-AzMigrateReplicationFabric { [OutputType([Microsoft.Azure.PowerShell.Cmdlets.Migrate.Models.Api20180110.IFabric])] diff --git a/src/Migrate/exports/Get-AzMigrateReplicationPolicy.ps1 b/src/Migrate/exports/Get-AzMigrateReplicationPolicy.ps1 index d785d6df08f8..30af671689e2 100644 --- a/src/Migrate/exports/Get-AzMigrateReplicationPolicy.ps1 +++ b/src/Migrate/exports/Get-AzMigrateReplicationPolicy.ps1 @@ -37,7 +37,7 @@ Location Name Type .Outputs Microsoft.Azure.PowerShell.Cmdlets.Migrate.Models.Api20180110.IPolicy .Link -https://docs.microsoft.com/en-us/powershell/module/az.migrate/get-azmigratereplicationpolicy +https://docs.microsoft.com/powershell/module/az.migrate/get-azmigratereplicationpolicy #> function Get-AzMigrateReplicationPolicy { [OutputType([Microsoft.Azure.PowerShell.Cmdlets.Migrate.Models.Api20180110.IPolicy])] diff --git a/src/Migrate/exports/Get-AzMigrateReplicationProtectionContainer.ps1 b/src/Migrate/exports/Get-AzMigrateReplicationProtectionContainer.ps1 index 8bd1eca843cb..3174843c6d62 100644 --- a/src/Migrate/exports/Get-AzMigrateReplicationProtectionContainer.ps1 +++ b/src/Migrate/exports/Get-AzMigrateReplicationProtectionContainer.ps1 @@ -34,7 +34,7 @@ Location Name Type .Outputs Microsoft.Azure.PowerShell.Cmdlets.Migrate.Models.Api20180110.IProtectionContainer .Link -https://docs.microsoft.com/en-us/powershell/module/az.migrate/get-azmigratereplicationprotectioncontainer +https://docs.microsoft.com/powershell/module/az.migrate/get-azmigratereplicationprotectioncontainer #> function Get-AzMigrateReplicationProtectionContainer { [OutputType([Microsoft.Azure.PowerShell.Cmdlets.Migrate.Models.Api20180110.IProtectionContainer])] diff --git a/src/Migrate/exports/Get-AzMigrateReplicationProtectionContainerMapping.ps1 b/src/Migrate/exports/Get-AzMigrateReplicationProtectionContainerMapping.ps1 index eb242baf3ede..7704b697afec 100644 --- a/src/Migrate/exports/Get-AzMigrateReplicationProtectionContainerMapping.ps1 +++ b/src/Migrate/exports/Get-AzMigrateReplicationProtectionContainerMapping.ps1 @@ -28,7 +28,7 @@ Location Name Type .Outputs Microsoft.Azure.PowerShell.Cmdlets.Migrate.Models.Api20180110.IProtectionContainerMapping .Link -https://docs.microsoft.com/en-us/powershell/module/az.migrate/get-azmigratereplicationprotectioncontainermapping +https://docs.microsoft.com/powershell/module/az.migrate/get-azmigratereplicationprotectioncontainermapping #> function Get-AzMigrateReplicationProtectionContainerMapping { [OutputType([Microsoft.Azure.PowerShell.Cmdlets.Migrate.Models.Api20180110.IProtectionContainerMapping])] diff --git a/src/Migrate/exports/Get-AzMigrateReplicationRecoveryServicesProvider.ps1 b/src/Migrate/exports/Get-AzMigrateReplicationRecoveryServicesProvider.ps1 index 009666d97d9d..609a2d485e5e 100644 --- a/src/Migrate/exports/Get-AzMigrateReplicationRecoveryServicesProvider.ps1 +++ b/src/Migrate/exports/Get-AzMigrateReplicationRecoveryServicesProvider.ps1 @@ -28,7 +28,7 @@ Location Name Type .Outputs Microsoft.Azure.PowerShell.Cmdlets.Migrate.Models.Api20180110.IRecoveryServicesProvider .Link -https://docs.microsoft.com/en-us/powershell/module/az.migrate/get-azmigratereplicationrecoveryservicesprovider +https://docs.microsoft.com/powershell/module/az.migrate/get-azmigratereplicationrecoveryservicesprovider #> function Get-AzMigrateReplicationRecoveryServicesProvider { [OutputType([Microsoft.Azure.PowerShell.Cmdlets.Migrate.Models.Api20180110.IRecoveryServicesProvider])] diff --git a/src/Migrate/exports/Get-AzMigrateRunAsAccount.ps1 b/src/Migrate/exports/Get-AzMigrateRunAsAccount.ps1 index 1af23852b7ed..add7fc181349 100644 --- a/src/Migrate/exports/Get-AzMigrateRunAsAccount.ps1 +++ b/src/Migrate/exports/Get-AzMigrateRunAsAccount.ps1 @@ -34,7 +34,7 @@ b090bef3-b733-5e34-bc8f-eb6f2701432a Microsoft.OffAzure/VMwareSites/runasaccount .Outputs Microsoft.Azure.PowerShell.Cmdlets.Migrate.Models.Api202001.IVMwareRunAsAccount .Link -https://docs.microsoft.com/en-us/powershell/module/az.migrate/get-azmigraterunasaccount +https://docs.microsoft.com/powershell/module/az.migrate/get-azmigraterunasaccount #> function Get-AzMigrateRunAsAccount { [OutputType([Microsoft.Azure.PowerShell.Cmdlets.Migrate.Models.Api202001.IVMwareRunAsAccount])] diff --git a/src/Migrate/exports/Get-AzMigrateServerReplication.ps1 b/src/Migrate/exports/Get-AzMigrateServerReplication.ps1 index 6013b5d146c7..4dd29dc856e8 100644 --- a/src/Migrate/exports/Get-AzMigrateServerReplication.ps1 +++ b/src/Migrate/exports/Get-AzMigrateServerReplication.ps1 @@ -174,7 +174,7 @@ INPUTOBJECT : Specifies the machine object of the replicating se [CurrentJobStartTime ]: The start time of the job. [ProviderSpecificDetail ]: The migration provider custom settings. .Link -https://docs.microsoft.com/en-us/powershell/module/az.migrate/get-azmigrateserverreplication +https://docs.microsoft.com/powershell/module/az.migrate/get-azmigrateserverreplication #> function Get-AzMigrateServerReplication { [OutputType([Microsoft.Azure.PowerShell.Cmdlets.Migrate.Models.Api20180110.IMigrationItem])] diff --git a/src/Migrate/exports/Get-AzMigrateSite.ps1 b/src/Migrate/exports/Get-AzMigrateSite.ps1 index 664d9ceea76e..25acd176a13e 100644 --- a/src/Migrate/exports/Get-AzMigrateSite.ps1 +++ b/src/Migrate/exports/Get-AzMigrateSite.ps1 @@ -29,7 +29,7 @@ ETag Location Name Type .Outputs Microsoft.Azure.PowerShell.Cmdlets.Migrate.Models.Api202001.IVMwareSite .Link -https://docs.microsoft.com/en-us/powershell/module/az.migrate/get-azmigratesite +https://docs.microsoft.com/powershell/module/az.migrate/get-azmigratesite #> function Get-AzMigrateSite { [OutputType([Microsoft.Azure.PowerShell.Cmdlets.Migrate.Models.Api202001.IVMwareSite])] diff --git a/src/Migrate/exports/Get-AzMigrateSolution.ps1 b/src/Migrate/exports/Get-AzMigrateSolution.ps1 index 0d80c7940159..e12a2dda58e8 100644 --- a/src/Migrate/exports/Get-AzMigrateSolution.ps1 +++ b/src/Migrate/exports/Get-AzMigrateSolution.ps1 @@ -28,7 +28,7 @@ Etag Name Type .Outputs Microsoft.Azure.PowerShell.Cmdlets.Migrate.Models.Api20180901Preview.ISolution .Link -https://docs.microsoft.com/en-us/powershell/module/az.migrate/get-azmigratesolution +https://docs.microsoft.com/powershell/module/az.migrate/get-azmigratesolution #> function Get-AzMigrateSolution { [OutputType([Microsoft.Azure.PowerShell.Cmdlets.Migrate.Models.Api20180901Preview.ISolution])] diff --git a/src/Migrate/exports/Initialize-AzMigrateReplicationInfrastructure.ps1 b/src/Migrate/exports/Initialize-AzMigrateReplicationInfrastructure.ps1 new file mode 100644 index 000000000000..505c2ff967b6 --- /dev/null +++ b/src/Migrate/exports/Initialize-AzMigrateReplicationInfrastructure.ps1 @@ -0,0 +1,155 @@ + +# ---------------------------------------------------------------------------------- +# +# 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 +Initialises the infrastructure for the migrate project. +.Description +The Initialize-AzMigrateReplicationInfrastructure cmdlet initialises the infrastructure for the migrate project. +.Example +PS C:\> Initialize-AzMigrateReplicationInfrastructure.ps1 -ResourceGroupName TestRG -ProjectName TestProject -Vmwareagentless -TargetRegion centralus + +True + +.Outputs +System.Boolean +.Link +https://docs.microsoft.com/powershell/module/az.migrate/initialize-azmigratereplicationinfrastructure +#> +function Initialize-AzMigrateReplicationInfrastructure { +[OutputType([System.Boolean])] +[CmdletBinding(DefaultParameterSetName='agentlessVMware', PositionalBinding=$false, SupportsShouldProcess, ConfirmImpact='Medium')] +param( + [Parameter(Mandatory)] + [ValidateNotNull()] + [Microsoft.Azure.PowerShell.Cmdlets.Migrate.Category('Path')] + [System.String] + # Specifies the Resource Group of the Azure Migrate Project in the current subscription. + ${ResourceGroupName}, + + [Parameter(Mandatory)] + [ValidateNotNull()] + [Microsoft.Azure.PowerShell.Cmdlets.Migrate.Category('Path')] + [System.String] + # Specifies the name of the Azure Migrate project to be used for server migration. + ${ProjectName}, + + [Parameter(Mandatory)] + [ArgumentCompleter({"agentlessVMware"})] + [Microsoft.Azure.PowerShell.Cmdlets.Migrate.Category('Path')] + [System.String] + # Specifies the server migration scenario for which the replication infrastructure needs to be initialized. + ${Scenario}, + + [Parameter(Mandatory)] + [ValidateNotNull()] + [Microsoft.Azure.PowerShell.Cmdlets.Migrate.Category('Path')] + [System.String] + # Specifies the target Azure region for server migrations. + ${TargetRegion}, + + [Parameter()] + [Microsoft.Azure.PowerShell.Cmdlets.Migrate.Category('Body')] + [Microsoft.Azure.PowerShell.Cmdlets.Migrate.Runtime.DefaultInfo(Script='(Get-AzContext).Subscription.Id')] + [System.String] + # Azure 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} +) + +begin { + try { + $outBuffer = $null + if ($PSBoundParameters.TryGetValue('OutBuffer', [ref]$outBuffer)) { + $PSBoundParameters['OutBuffer'] = 1 + } + $parameterSet = $PSCmdlet.ParameterSetName + $mapping = @{ + agentlessVMware = 'Az.Migrate.custom\Initialize-AzMigrateReplicationInfrastructure'; + } + if (('agentlessVMware') -contains $parameterSet -and -not $PSBoundParameters.ContainsKey('SubscriptionId')) { + $PSBoundParameters['SubscriptionId'] = (Get-AzContext).Subscription.Id + } + $wrappedCmd = $ExecutionContext.InvokeCommand.GetCommand(($mapping[$parameterSet]), [System.Management.Automation.CommandTypes]::Cmdlet) + $scriptCmd = {& $wrappedCmd @PSBoundParameters} + $steppablePipeline = $scriptCmd.GetSteppablePipeline($MyInvocation.CommandOrigin) + $steppablePipeline.Begin($PSCmdlet) + } catch { + throw + } +} + +process { + try { + $steppablePipeline.Process($_) + } catch { + throw + } +} + +end { + try { + $steppablePipeline.End() + } catch { + throw + } +} +} diff --git a/src/Migrate/exports/New-AzMigrateDiskMapping.ps1 b/src/Migrate/exports/New-AzMigrateDiskMapping.ps1 index 282835decfe2..d1a6fd07e88c 100644 --- a/src/Migrate/exports/New-AzMigrateDiskMapping.ps1 +++ b/src/Migrate/exports/New-AzMigrateDiskMapping.ps1 @@ -28,7 +28,7 @@ DiskEncryptionSetId DiskId DiskType IsOSDisk LogStorageAccountId LogStorageAc .Outputs Microsoft.Azure.PowerShell.Cmdlets.Migrate.Models.Api20180110.IVMwareCbtDiskInput .Link -https://docs.microsoft.com/en-us/powershell/module/az.migrate/new-azmigratediskmapping +https://docs.microsoft.com/powershell/module/az.migrate/new-azmigratediskmapping #> function New-AzMigrateDiskMapping { [OutputType([Microsoft.Azure.PowerShell.Cmdlets.Migrate.Models.Api20180110.IVMwareCbtDiskInput])] @@ -41,14 +41,16 @@ param( ${DiskID}, [Parameter(Mandatory)] + [ArgumentCompleter({ "true" , "false" })] [Microsoft.Azure.PowerShell.Cmdlets.Migrate.Category('Path')] [System.String] # Specifies whether the disk contains the Operating System for the source server to be migrated. ${IsOSDisk}, [Parameter(Mandatory)] + [ArgumentCompleter({ "Standard_LRS", "Premium_LRS", "StandardSSD_LRS" })] [Microsoft.Azure.PowerShell.Cmdlets.Migrate.Category('Path')] - [Microsoft.Azure.PowerShell.Cmdlets.Migrate.Support.DiskAccountType] + [System.String] # Specifies the type of disks to be used for the Azure VM. ${DiskType}, diff --git a/src/Migrate/exports/New-AzMigrateNicMapping.ps1 b/src/Migrate/exports/New-AzMigrateNicMapping.ps1 index 578bc14478ba..ec92a9ae667e 100644 --- a/src/Migrate/exports/New-AzMigrateNicMapping.ps1 +++ b/src/Migrate/exports/New-AzMigrateNicMapping.ps1 @@ -29,7 +29,7 @@ false false a2399354-653a-464e-a567-d30ef5467a31 .Outputs Microsoft.Azure.PowerShell.Cmdlets.Migrate.Models.Api20180110.IVMwareCbtNicInput .Link -https://docs.microsoft.com/en-us/powershell/module/az.migrate/new-azmigratenicmapping +https://docs.microsoft.com/powershell/module/az.migrate/new-azmigratenicmapping #> function New-AzMigrateNicMapping { [OutputType([Microsoft.Azure.PowerShell.Cmdlets.Migrate.Models.Api20180110.IVMwareCbtNicInput])] @@ -42,6 +42,7 @@ param( ${NicID}, [Parameter()] + [ArgumentCompleter({"primary" , "secondary", "donotcreate"})] [Microsoft.Azure.PowerShell.Cmdlets.Migrate.Category('Path')] [System.String] # Specifies whether the NIC to be updated will be the primary, secondary or not migrated. diff --git a/src/Migrate/exports/New-AzMigrateProject.ps1 b/src/Migrate/exports/New-AzMigrateProject.ps1 index bbe79540314c..3af2bb7ef613 100644 --- a/src/Migrate/exports/New-AzMigrateProject.ps1 +++ b/src/Migrate/exports/New-AzMigrateProject.ps1 @@ -35,7 +35,7 @@ PROPERTY : Specifies the project properties. [ProvisioningState ]: Provisioning state of the migrate project. [RegisteredTool ]: Gets or sets the list of tools registered with the migrate project. .Link -https://docs.microsoft.com/en-us/powershell/module/az.migrate/new-azmigrateproject +https://docs.microsoft.com/powershell/module/az.migrate/new-azmigrateproject #> function New-AzMigrateProject { [CmdletBinding(DefaultParameterSetName='PutExpandedCustom', PositionalBinding=$false, SupportsShouldProcess, ConfirmImpact='Medium')] diff --git a/src/Migrate/exports/New-AzMigrateReplicationPolicy.ps1 b/src/Migrate/exports/New-AzMigrateReplicationPolicy.ps1 index aee3861370b7..3436e283b373 100644 --- a/src/Migrate/exports/New-AzMigrateReplicationPolicy.ps1 +++ b/src/Migrate/exports/New-AzMigrateReplicationPolicy.ps1 @@ -41,7 +41,7 @@ To create the parameters described below, construct a hash table containing the PROVIDERSPECIFICINPUT : The ReplicationProviderSettings. [InstanceType ]: The class type. .Link -https://docs.microsoft.com/en-us/powershell/module/az.migrate/new-azmigratereplicationpolicy +https://docs.microsoft.com/powershell/module/az.migrate/new-azmigratereplicationpolicy #> function New-AzMigrateReplicationPolicy { [OutputType([Microsoft.Azure.PowerShell.Cmdlets.Migrate.Models.Api20180110.IPolicy])] diff --git a/src/Migrate/exports/New-AzMigrateReplicationProtectionContainerMapping.ps1 b/src/Migrate/exports/New-AzMigrateReplicationProtectionContainerMapping.ps1 index 7e9e3f264168..f08965a43c55 100644 --- a/src/Migrate/exports/New-AzMigrateReplicationProtectionContainerMapping.ps1 +++ b/src/Migrate/exports/New-AzMigrateReplicationProtectionContainerMapping.ps1 @@ -44,7 +44,7 @@ To create the parameters described below, construct a hash table containing the PROVIDERSPECIFICINPUT : Provider specific input for pairing. [InstanceType ]: The class type. .Link -https://docs.microsoft.com/en-us/powershell/module/az.migrate/new-azmigratereplicationprotectioncontainermapping +https://docs.microsoft.com/powershell/module/az.migrate/new-azmigratereplicationprotectioncontainermapping #> function New-AzMigrateReplicationProtectionContainerMapping { [OutputType([Microsoft.Azure.PowerShell.Cmdlets.Migrate.Models.Api20180110.IProtectionContainerMapping])] diff --git a/src/Migrate/exports/New-AzMigrateServerReplication.ps1 b/src/Migrate/exports/New-AzMigrateServerReplication.ps1 index 8666b8162109..062d569d7ca8 100644 --- a/src/Migrate/exports/New-AzMigrateServerReplication.ps1 +++ b/src/Migrate/exports/New-AzMigrateServerReplication.ps1 @@ -87,15 +87,16 @@ DISKTOINCLUDE : Specifies the disks on the source server INPUTOBJECT : Specifies the discovered server to be migrated. The server object can be retrieved using the Get-AzMigrateServer cmdlet. [GuestOSDetailOstype ]: Type of the operating system. .Link -https://docs.microsoft.com/en-us/powershell/module/az.migrate/new-azmigrateserverreplication +https://docs.microsoft.com/powershell/module/az.migrate/new-azmigrateserverreplication #> function New-AzMigrateServerReplication { [OutputType([Microsoft.Azure.PowerShell.Cmdlets.Migrate.Models.Api20180110.IJob])] [CmdletBinding(DefaultParameterSetName='ByIdDefaultUser', PositionalBinding=$false)] param( [Parameter(Mandatory)] + [ArgumentCompleter({ "NoLicenseType" , "WindowsServer" })] [Microsoft.Azure.PowerShell.Cmdlets.Migrate.Category('Path')] - [Microsoft.Azure.PowerShell.Cmdlets.Migrate.Support.LicenseType] + [System.String] # Specifies if Azure Hybrid benefit is applicable for the source server to be migrated. ${LicenseType}, @@ -132,8 +133,9 @@ param( [Parameter(ParameterSetName='ByIdDefaultUser', Mandatory)] [Parameter(ParameterSetName='ByInputObjectDefaultUser', Mandatory)] + [ArgumentCompleter({ "Standard_LRS" , "Premium_LRS", "StandardSSD_LRS" })] [Microsoft.Azure.PowerShell.Cmdlets.Migrate.Category('Path')] - [Microsoft.Azure.PowerShell.Cmdlets.Migrate.Support.DiskAccountType] + [System.String] # Specifies the type of disks to be used for the Azure VM. ${DiskType}, @@ -163,6 +165,7 @@ param( ${TargetVMSize}, [Parameter()] + [ArgumentCompleter({ "true" , "false" })] [Microsoft.Azure.PowerShell.Cmdlets.Migrate.Category('Path')] [System.String] # Specifies if replication be auto-repaired in case change tracking is lost for the source server under replication. diff --git a/src/Migrate/exports/ProxyCmdletDefinitions.ps1 b/src/Migrate/exports/ProxyCmdletDefinitions.ps1 index b757f6ff5336..8e97e35261ec 100644 --- a/src/Migrate/exports/ProxyCmdletDefinitions.ps1 +++ b/src/Migrate/exports/ProxyCmdletDefinitions.ps1 @@ -28,7 +28,7 @@ ETag Location Name Type .Outputs Microsoft.Azure.PowerShell.Cmdlets.Migrate.Models.Api20180901Preview.IMigrateProject .Link -https://docs.microsoft.com/en-us/powershell/module/az.migrate/get-azmigrateproject +https://docs.microsoft.com/powershell/module/az.migrate/get-azmigrateproject #> function Get-AzMigrateProject { [OutputType([Microsoft.Azure.PowerShell.Cmdlets.Migrate.Models.Api20180901Preview.IMigrateProject])] @@ -206,7 +206,7 @@ Type : Microsoft.RecoveryServices/vaults/re .Outputs Microsoft.Azure.PowerShell.Cmdlets.Migrate.Models.Api20180110.IFabric .Link -https://docs.microsoft.com/en-us/powershell/module/az.migrate/get-azmigratereplicationfabric +https://docs.microsoft.com/powershell/module/az.migrate/get-azmigratereplicationfabric #> function Get-AzMigrateReplicationFabric { [OutputType([Microsoft.Azure.PowerShell.Cmdlets.Migrate.Models.Api20180110.IFabric])] @@ -363,7 +363,7 @@ Location Name Type .Outputs Microsoft.Azure.PowerShell.Cmdlets.Migrate.Models.Api20180110.IPolicy .Link -https://docs.microsoft.com/en-us/powershell/module/az.migrate/get-azmigratereplicationpolicy +https://docs.microsoft.com/powershell/module/az.migrate/get-azmigratereplicationpolicy #> function Get-AzMigrateReplicationPolicy { [OutputType([Microsoft.Azure.PowerShell.Cmdlets.Migrate.Models.Api20180110.IPolicy])] @@ -511,7 +511,7 @@ Location Name Type .Outputs Microsoft.Azure.PowerShell.Cmdlets.Migrate.Models.Api20180110.IProtectionContainerMapping .Link -https://docs.microsoft.com/en-us/powershell/module/az.migrate/get-azmigratereplicationprotectioncontainermapping +https://docs.microsoft.com/powershell/module/az.migrate/get-azmigratereplicationprotectioncontainermapping #> function Get-AzMigrateReplicationProtectionContainerMapping { [OutputType([Microsoft.Azure.PowerShell.Cmdlets.Migrate.Models.Api20180110.IProtectionContainerMapping])] @@ -680,7 +680,7 @@ Location Name Type .Outputs Microsoft.Azure.PowerShell.Cmdlets.Migrate.Models.Api20180110.IProtectionContainer .Link -https://docs.microsoft.com/en-us/powershell/module/az.migrate/get-azmigratereplicationprotectioncontainer +https://docs.microsoft.com/powershell/module/az.migrate/get-azmigratereplicationprotectioncontainer #> function Get-AzMigrateReplicationProtectionContainer { [OutputType([Microsoft.Azure.PowerShell.Cmdlets.Migrate.Models.Api20180110.IProtectionContainer])] @@ -836,7 +836,7 @@ Location Name Type .Outputs Microsoft.Azure.PowerShell.Cmdlets.Migrate.Models.Api20180110.IRecoveryServicesProvider .Link -https://docs.microsoft.com/en-us/powershell/module/az.migrate/get-azmigratereplicationrecoveryservicesprovider +https://docs.microsoft.com/powershell/module/az.migrate/get-azmigratereplicationrecoveryservicesprovider #> function Get-AzMigrateReplicationRecoveryServicesProvider { [OutputType([Microsoft.Azure.PowerShell.Cmdlets.Migrate.Models.Api20180110.IRecoveryServicesProvider])] @@ -996,7 +996,7 @@ b090bef3-b733-5e34-bc8f-eb6f2701432a Microsoft.OffAzure/VMwareSites/runasaccount .Outputs Microsoft.Azure.PowerShell.Cmdlets.Migrate.Models.Api202001.IVMwareRunAsAccount .Link -https://docs.microsoft.com/en-us/powershell/module/az.migrate/get-azmigraterunasaccount +https://docs.microsoft.com/powershell/module/az.migrate/get-azmigraterunasaccount #> function Get-AzMigrateRunAsAccount { [OutputType([Microsoft.Azure.PowerShell.Cmdlets.Migrate.Models.Api202001.IVMwareRunAsAccount])] @@ -1146,7 +1146,7 @@ ETag Location Name Type .Outputs Microsoft.Azure.PowerShell.Cmdlets.Migrate.Models.Api202001.IVMwareSite .Link -https://docs.microsoft.com/en-us/powershell/module/az.migrate/get-azmigratesite +https://docs.microsoft.com/powershell/module/az.migrate/get-azmigratesite #> function Get-AzMigrateSite { [OutputType([Microsoft.Azure.PowerShell.Cmdlets.Migrate.Models.Api202001.IVMwareSite])] @@ -1289,7 +1289,7 @@ Etag Name Type .Outputs Microsoft.Azure.PowerShell.Cmdlets.Migrate.Models.Api20180901Preview.ISolution .Link -https://docs.microsoft.com/en-us/powershell/module/az.migrate/get-azmigratesolution +https://docs.microsoft.com/powershell/module/az.migrate/get-azmigratesolution #> function Get-AzMigrateSolution { [OutputType([Microsoft.Azure.PowerShell.Cmdlets.Migrate.Models.Api20180901Preview.ISolution])] @@ -1450,7 +1450,7 @@ To create the parameters described below, construct a hash table containing the PROVIDERSPECIFICINPUT : The ReplicationProviderSettings. [InstanceType ]: The class type. .Link -https://docs.microsoft.com/en-us/powershell/module/az.migrate/new-azmigratereplicationpolicy +https://docs.microsoft.com/powershell/module/az.migrate/new-azmigratereplicationpolicy #> function New-AzMigrateReplicationPolicy { [OutputType([Microsoft.Azure.PowerShell.Cmdlets.Migrate.Models.Api20180110.IPolicy])] @@ -1632,7 +1632,7 @@ To create the parameters described below, construct a hash table containing the PROVIDERSPECIFICINPUT : Provider specific input for pairing. [InstanceType ]: The class type. .Link -https://docs.microsoft.com/en-us/powershell/module/az.migrate/new-azmigratereplicationprotectioncontainermapping +https://docs.microsoft.com/powershell/module/az.migrate/new-azmigratereplicationprotectioncontainermapping #> function New-AzMigrateReplicationProtectionContainerMapping { [OutputType([Microsoft.Azure.PowerShell.Cmdlets.Migrate.Models.Api20180110.IProtectionContainerMapping])] @@ -1820,7 +1820,7 @@ True .Outputs System.Boolean .Link -https://docs.microsoft.com/en-us/powershell/module/az.migrate/register-azmigrateprojecttool +https://docs.microsoft.com/powershell/module/az.migrate/register-azmigrateprojecttool #> function Register-AzMigrateProjectTool { [OutputType([System.Boolean])] @@ -1974,7 +1974,7 @@ PS C:\> Remove-AzMigrateProject -SubscriptionId xxx-xxx-xxx -ResourceGroupName B .Outputs System.Boolean .Link -https://docs.microsoft.com/en-us/powershell/module/az.migrate/remove-azmigrateproject +https://docs.microsoft.com/powershell/module/az.migrate/remove-azmigrateproject #> function Remove-AzMigrateProject { [OutputType([System.Boolean])] @@ -2195,7 +2195,7 @@ Contoso-DataTier3 10-150-8-52-b090bef3-b733-5e34-bc8f-eb6f2701432a_5 .Outputs Microsoft.Azure.PowerShell.Cmdlets.Migrate.Models.Api202001.IVMwareMachine .Link -https://docs.microsoft.com/en-us/powershell/module/az.migrate/get-azmigratediscoveredserver +https://docs.microsoft.com/powershell/module/az.migrate/get-azmigratediscoveredserver #> function Get-AzMigrateDiscoveredServer { [OutputType([Microsoft.Azure.PowerShell.Cmdlets.Migrate.Models.Api202001.IVMwareMachine])] @@ -2427,7 +2427,7 @@ INPUTOBJECT : Specifies the job object of the replicating server. [TaskId ]: The Id. [TaskType ]: The type of task. Details in CustomDetails property depend on this type. .Link -https://docs.microsoft.com/en-us/powershell/module/az.migrate/get-azmigratejob +https://docs.microsoft.com/powershell/module/az.migrate/get-azmigratejob #> function Get-AzMigrateJob { [OutputType([Microsoft.Azure.PowerShell.Cmdlets.Migrate.Models.Api20180110.IJob])] @@ -2758,7 +2758,7 @@ INPUTOBJECT : Specifies the machine object of the replicating se [CurrentJobStartTime ]: The start time of the job. [ProviderSpecificDetail ]: The migration provider custom settings. .Link -https://docs.microsoft.com/en-us/powershell/module/az.migrate/get-azmigrateserverreplication +https://docs.microsoft.com/powershell/module/az.migrate/get-azmigrateserverreplication #> function Get-AzMigrateServerReplication { [OutputType([Microsoft.Azure.PowerShell.Cmdlets.Migrate.Models.Api20180110.IMigrationItem])] @@ -2942,6 +2942,161 @@ end { # limitations under the License. # ---------------------------------------------------------------------------------- +<# +.Synopsis +Initialises the infrastructure for the migrate project. +.Description +The Initialize-AzMigrateReplicationInfrastructure cmdlet initialises the infrastructure for the migrate project. +.Example +PS C:\> Initialize-AzMigrateReplicationInfrastructure.ps1 -ResourceGroupName TestRG -ProjectName TestProject -Vmwareagentless -TargetRegion centralus + +True + +.Outputs +System.Boolean +.Link +https://docs.microsoft.com/powershell/module/az.migrate/initialize-azmigratereplicationinfrastructure +#> +function Initialize-AzMigrateReplicationInfrastructure { +[OutputType([System.Boolean])] +[CmdletBinding(DefaultParameterSetName='agentlessVMware', PositionalBinding=$false, SupportsShouldProcess, ConfirmImpact='Medium')] +param( + [Parameter(Mandatory)] + [ValidateNotNull()] + [Microsoft.Azure.PowerShell.Cmdlets.Migrate.Category('Path')] + [System.String] + # Specifies the Resource Group of the Azure Migrate Project in the current subscription. + ${ResourceGroupName}, + + [Parameter(Mandatory)] + [ValidateNotNull()] + [Microsoft.Azure.PowerShell.Cmdlets.Migrate.Category('Path')] + [System.String] + # Specifies the name of the Azure Migrate project to be used for server migration. + ${ProjectName}, + + [Parameter(Mandatory)] + [ArgumentCompleter({"agentlessVMware"})] + [Microsoft.Azure.PowerShell.Cmdlets.Migrate.Category('Path')] + [System.String] + # Specifies the server migration scenario for which the replication infrastructure needs to be initialized. + ${Scenario}, + + [Parameter(Mandatory)] + [ValidateNotNull()] + [Microsoft.Azure.PowerShell.Cmdlets.Migrate.Category('Path')] + [System.String] + # Specifies the target Azure region for server migrations. + ${TargetRegion}, + + [Parameter()] + [Microsoft.Azure.PowerShell.Cmdlets.Migrate.Category('Body')] + [Microsoft.Azure.PowerShell.Cmdlets.Migrate.Runtime.DefaultInfo(Script='(Get-AzContext).Subscription.Id')] + [System.String] + # Azure 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} +) + +begin { + try { + $outBuffer = $null + if ($PSBoundParameters.TryGetValue('OutBuffer', [ref]$outBuffer)) { + $PSBoundParameters['OutBuffer'] = 1 + } + $parameterSet = $PSCmdlet.ParameterSetName + $mapping = @{ + agentlessVMware = 'Az.Migrate.custom\Initialize-AzMigrateReplicationInfrastructure'; + } + if (('agentlessVMware') -contains $parameterSet -and -not $PSBoundParameters.ContainsKey('SubscriptionId')) { + $PSBoundParameters['SubscriptionId'] = (Get-AzContext).Subscription.Id + } + $wrappedCmd = $ExecutionContext.InvokeCommand.GetCommand(($mapping[$parameterSet]), [System.Management.Automation.CommandTypes]::Cmdlet) + $scriptCmd = {& $wrappedCmd @PSBoundParameters} + $steppablePipeline = $scriptCmd.GetSteppablePipeline($MyInvocation.CommandOrigin) + $steppablePipeline.Begin($PSCmdlet) + } catch { + throw + } +} + +process { + try { + $steppablePipeline.Process($_) + } catch { + throw + } +} + +end { + try { + $steppablePipeline.End() + } catch { + throw + } +} +} + +# ---------------------------------------------------------------------------------- +# +# 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 Creates a new disk mapping @@ -2957,7 +3112,7 @@ DiskEncryptionSetId DiskId DiskType IsOSDisk LogStorageAccountId LogStorageAc .Outputs Microsoft.Azure.PowerShell.Cmdlets.Migrate.Models.Api20180110.IVMwareCbtDiskInput .Link -https://docs.microsoft.com/en-us/powershell/module/az.migrate/new-azmigratediskmapping +https://docs.microsoft.com/powershell/module/az.migrate/new-azmigratediskmapping #> function New-AzMigrateDiskMapping { [OutputType([Microsoft.Azure.PowerShell.Cmdlets.Migrate.Models.Api20180110.IVMwareCbtDiskInput])] @@ -2970,14 +3125,16 @@ param( ${DiskID}, [Parameter(Mandatory)] + [ArgumentCompleter({ "true" , "false" })] [Microsoft.Azure.PowerShell.Cmdlets.Migrate.Category('Path')] [System.String] # Specifies whether the disk contains the Operating System for the source server to be migrated. ${IsOSDisk}, [Parameter(Mandatory)] + [ArgumentCompleter({ "Standard_LRS", "Premium_LRS", "StandardSSD_LRS" })] [Microsoft.Azure.PowerShell.Cmdlets.Migrate.Category('Path')] - [Microsoft.Azure.PowerShell.Cmdlets.Migrate.Support.DiskAccountType] + [System.String] # Specifies the type of disks to be used for the Azure VM. ${DiskType}, @@ -3054,7 +3211,7 @@ false false a2399354-653a-464e-a567-d30ef5467a31 .Outputs Microsoft.Azure.PowerShell.Cmdlets.Migrate.Models.Api20180110.IVMwareCbtNicInput .Link -https://docs.microsoft.com/en-us/powershell/module/az.migrate/new-azmigratenicmapping +https://docs.microsoft.com/powershell/module/az.migrate/new-azmigratenicmapping #> function New-AzMigrateNicMapping { [OutputType([Microsoft.Azure.PowerShell.Cmdlets.Migrate.Models.Api20180110.IVMwareCbtNicInput])] @@ -3067,6 +3224,7 @@ param( ${NicID}, [Parameter()] + [ArgumentCompleter({"primary" , "secondary", "donotcreate"})] [Microsoft.Azure.PowerShell.Cmdlets.Migrate.Category('Path')] [System.String] # Specifies whether the NIC to be updated will be the primary, secondary or not migrated. @@ -3157,7 +3315,7 @@ PROPERTY : Specifies the project properties. [ProvisioningState ]: Provisioning state of the migrate project. [RegisteredTool ]: Gets or sets the list of tools registered with the migrate project. .Link -https://docs.microsoft.com/en-us/powershell/module/az.migrate/new-azmigrateproject +https://docs.microsoft.com/powershell/module/az.migrate/new-azmigrateproject #> function New-AzMigrateProject { [CmdletBinding(DefaultParameterSetName='PutExpandedCustom', PositionalBinding=$false, SupportsShouldProcess, ConfirmImpact='Medium')] @@ -3328,15 +3486,16 @@ DISKTOINCLUDE : Specifies the disks on the source server INPUTOBJECT : Specifies the discovered server to be migrated. The server object can be retrieved using the Get-AzMigrateServer cmdlet. [GuestOSDetailOstype ]: Type of the operating system. .Link -https://docs.microsoft.com/en-us/powershell/module/az.migrate/new-azmigrateserverreplication +https://docs.microsoft.com/powershell/module/az.migrate/new-azmigrateserverreplication #> function New-AzMigrateServerReplication { [OutputType([Microsoft.Azure.PowerShell.Cmdlets.Migrate.Models.Api20180110.IJob])] [CmdletBinding(DefaultParameterSetName='ByIdDefaultUser', PositionalBinding=$false)] param( [Parameter(Mandatory)] + [ArgumentCompleter({ "NoLicenseType" , "WindowsServer" })] [Microsoft.Azure.PowerShell.Cmdlets.Migrate.Category('Path')] - [Microsoft.Azure.PowerShell.Cmdlets.Migrate.Support.LicenseType] + [System.String] # Specifies if Azure Hybrid benefit is applicable for the source server to be migrated. ${LicenseType}, @@ -3373,8 +3532,9 @@ param( [Parameter(ParameterSetName='ByIdDefaultUser', Mandatory)] [Parameter(ParameterSetName='ByInputObjectDefaultUser', Mandatory)] + [ArgumentCompleter({ "Standard_LRS" , "Premium_LRS", "StandardSSD_LRS" })] [Microsoft.Azure.PowerShell.Cmdlets.Migrate.Category('Path')] - [Microsoft.Azure.PowerShell.Cmdlets.Migrate.Support.DiskAccountType] + [System.String] # Specifies the type of disks to be used for the Azure VM. ${DiskType}, @@ -3404,6 +3564,7 @@ param( ${TargetVMSize}, [Parameter()] + [ArgumentCompleter({ "true" , "false" })] [Microsoft.Azure.PowerShell.Cmdlets.Migrate.Category('Path')] [System.String] # Specifies if replication be auto-repaired in case change tracking is lost for the source server under replication. @@ -3631,7 +3792,7 @@ INPUTOBJECT : Specifies the machine object of the replicating se [CurrentJobStartTime ]: The start time of the job. [ProviderSpecificDetail ]: The migration provider custom settings. .Link -https://docs.microsoft.com/en-us/powershell/module/az.migrate/remove-azmigrateserverreplication +https://docs.microsoft.com/powershell/module/az.migrate/remove-azmigrateserverreplication #> function Remove-AzMigrateServerReplication { [OutputType([Microsoft.Azure.PowerShell.Cmdlets.Migrate.Models.Api20180110.IJob])] @@ -3832,7 +3993,7 @@ INPUTOBJECT : Specifies the machine object of the replicating se [CurrentJobStartTime ]: The start time of the job. [ProviderSpecificDetail ]: The migration provider custom settings. .Link -https://docs.microsoft.com/en-us/powershell/module/az.migrate/restart-azmigrateserverreplication +https://docs.microsoft.com/powershell/module/az.migrate/restart-azmigrateserverreplication #> function Restart-AzMigrateServerReplication { [OutputType([Microsoft.Azure.PowerShell.Cmdlets.Migrate.Models.Api20180110.IJob])] @@ -4011,7 +4172,7 @@ NICTOUPDATE : Updates the NIC for the Azure VM to be creat [TargetStaticIPAddress ]: The static IP address. [TargetSubnetName ]: Target subnet name. .Link -https://docs.microsoft.com/en-us/powershell/module/az.migrate/set-azmigrateserverreplication +https://docs.microsoft.com/powershell/module/az.migrate/set-azmigrateserverreplication #> function Set-AzMigrateServerReplication { [OutputType([Microsoft.Azure.PowerShell.Cmdlets.Migrate.Models.Api20180110.IJob])] @@ -4234,7 +4395,7 @@ INPUTOBJECT : Specifies the replicating server for which migrati [CurrentJobStartTime ]: The start time of the job. [ProviderSpecificDetail ]: The migration provider custom settings. .Link -https://docs.microsoft.com/en-us/powershell/module/az.migrate/start-azmigrateservermigration +https://docs.microsoft.com/powershell/module/az.migrate/start-azmigrateservermigration #> function Start-AzMigrateServerMigration { [OutputType([Microsoft.Azure.PowerShell.Cmdlets.Migrate.Models.Api20180110.IJob])] @@ -4441,7 +4602,7 @@ INPUTOBJECT : Specifies the replicating server for which the tes [CurrentJobStartTime ]: The start time of the job. [ProviderSpecificDetail ]: The migration provider custom settings. .Link -https://docs.microsoft.com/en-us/powershell/module/az.migrate/start-azmigratetestmigration +https://docs.microsoft.com/powershell/module/az.migrate/start-azmigratetestmigration #> function Start-AzMigrateTestMigration { [OutputType([Microsoft.Azure.PowerShell.Cmdlets.Migrate.Models.Api20180110.IJob])] @@ -4650,7 +4811,7 @@ INPUTOBJECT : Specifies the replicating server for which the tes [CurrentJobStartTime ]: The start time of the job. [ProviderSpecificDetail ]: The migration provider custom settings. .Link -https://docs.microsoft.com/en-us/powershell/module/az.migrate/start-azmigratetestmigrationcleanup +https://docs.microsoft.com/powershell/module/az.migrate/start-azmigratetestmigrationcleanup #> function Start-AzMigrateTestMigrationCleanup { [OutputType([Microsoft.Azure.PowerShell.Cmdlets.Migrate.Models.Api20180110.IJob])] diff --git a/src/Migrate/exports/Register-AzMigrateProjectTool.ps1 b/src/Migrate/exports/Register-AzMigrateProjectTool.ps1 index 7bf895ce97fc..3b44d3057d9a 100644 --- a/src/Migrate/exports/Register-AzMigrateProjectTool.ps1 +++ b/src/Migrate/exports/Register-AzMigrateProjectTool.ps1 @@ -26,7 +26,7 @@ True .Outputs System.Boolean .Link -https://docs.microsoft.com/en-us/powershell/module/az.migrate/register-azmigrateprojecttool +https://docs.microsoft.com/powershell/module/az.migrate/register-azmigrateprojecttool #> function Register-AzMigrateProjectTool { [OutputType([System.Boolean])] diff --git a/src/Migrate/exports/Remove-AzMigrateProject.ps1 b/src/Migrate/exports/Remove-AzMigrateProject.ps1 index b4305e7ff4f6..8bff998df325 100644 --- a/src/Migrate/exports/Remove-AzMigrateProject.ps1 +++ b/src/Migrate/exports/Remove-AzMigrateProject.ps1 @@ -28,7 +28,7 @@ PS C:\> Remove-AzMigrateProject -SubscriptionId xxx-xxx-xxx -ResourceGroupName B .Outputs System.Boolean .Link -https://docs.microsoft.com/en-us/powershell/module/az.migrate/remove-azmigrateproject +https://docs.microsoft.com/powershell/module/az.migrate/remove-azmigrateproject #> function Remove-AzMigrateProject { [OutputType([System.Boolean])] diff --git a/src/Migrate/exports/Remove-AzMigrateServerReplication.ps1 b/src/Migrate/exports/Remove-AzMigrateServerReplication.ps1 index 3b1f0e7ecae6..ffac93d02f90 100644 --- a/src/Migrate/exports/Remove-AzMigrateServerReplication.ps1 +++ b/src/Migrate/exports/Remove-AzMigrateServerReplication.ps1 @@ -82,7 +82,7 @@ INPUTOBJECT : Specifies the machine object of the replicating se [CurrentJobStartTime ]: The start time of the job. [ProviderSpecificDetail ]: The migration provider custom settings. .Link -https://docs.microsoft.com/en-us/powershell/module/az.migrate/remove-azmigrateserverreplication +https://docs.microsoft.com/powershell/module/az.migrate/remove-azmigrateserverreplication #> function Remove-AzMigrateServerReplication { [OutputType([Microsoft.Azure.PowerShell.Cmdlets.Migrate.Models.Api20180110.IJob])] diff --git a/src/Migrate/exports/Restart-AzMigrateServerReplication.ps1 b/src/Migrate/exports/Restart-AzMigrateServerReplication.ps1 index 6373b3d99254..3e0d53320ce2 100644 --- a/src/Migrate/exports/Restart-AzMigrateServerReplication.ps1 +++ b/src/Migrate/exports/Restart-AzMigrateServerReplication.ps1 @@ -79,7 +79,7 @@ INPUTOBJECT : Specifies the machine object of the replicating se [CurrentJobStartTime ]: The start time of the job. [ProviderSpecificDetail ]: The migration provider custom settings. .Link -https://docs.microsoft.com/en-us/powershell/module/az.migrate/restart-azmigrateserverreplication +https://docs.microsoft.com/powershell/module/az.migrate/restart-azmigrateserverreplication #> function Restart-AzMigrateServerReplication { [OutputType([Microsoft.Azure.PowerShell.Cmdlets.Migrate.Models.Api20180110.IJob])] diff --git a/src/Migrate/exports/Set-AzMigrateServerReplication.ps1 b/src/Migrate/exports/Set-AzMigrateServerReplication.ps1 index 2cb762a652b3..ecee415ac739 100644 --- a/src/Migrate/exports/Set-AzMigrateServerReplication.ps1 +++ b/src/Migrate/exports/Set-AzMigrateServerReplication.ps1 @@ -63,7 +63,7 @@ NICTOUPDATE : Updates the NIC for the Azure VM to be creat [TargetStaticIPAddress ]: The static IP address. [TargetSubnetName ]: Target subnet name. .Link -https://docs.microsoft.com/en-us/powershell/module/az.migrate/set-azmigrateserverreplication +https://docs.microsoft.com/powershell/module/az.migrate/set-azmigrateserverreplication #> function Set-AzMigrateServerReplication { [OutputType([Microsoft.Azure.PowerShell.Cmdlets.Migrate.Models.Api20180110.IJob])] diff --git a/src/Migrate/exports/Start-AzMigrateServerMigration.ps1 b/src/Migrate/exports/Start-AzMigrateServerMigration.ps1 index 503668415421..51e48a9dc470 100644 --- a/src/Migrate/exports/Start-AzMigrateServerMigration.ps1 +++ b/src/Migrate/exports/Start-AzMigrateServerMigration.ps1 @@ -56,7 +56,7 @@ INPUTOBJECT : Specifies the replicating server for which migrati [CurrentJobStartTime ]: The start time of the job. [ProviderSpecificDetail ]: The migration provider custom settings. .Link -https://docs.microsoft.com/en-us/powershell/module/az.migrate/start-azmigrateservermigration +https://docs.microsoft.com/powershell/module/az.migrate/start-azmigrateservermigration #> function Start-AzMigrateServerMigration { [OutputType([Microsoft.Azure.PowerShell.Cmdlets.Migrate.Models.Api20180110.IJob])] diff --git a/src/Migrate/exports/Start-AzMigrateTestMigration.ps1 b/src/Migrate/exports/Start-AzMigrateTestMigration.ps1 index a845c65f30bb..864ca654a781 100644 --- a/src/Migrate/exports/Start-AzMigrateTestMigration.ps1 +++ b/src/Migrate/exports/Start-AzMigrateTestMigration.ps1 @@ -84,7 +84,7 @@ INPUTOBJECT : Specifies the replicating server for which the tes [CurrentJobStartTime ]: The start time of the job. [ProviderSpecificDetail ]: The migration provider custom settings. .Link -https://docs.microsoft.com/en-us/powershell/module/az.migrate/start-azmigratetestmigration +https://docs.microsoft.com/powershell/module/az.migrate/start-azmigratetestmigration #> function Start-AzMigrateTestMigration { [OutputType([Microsoft.Azure.PowerShell.Cmdlets.Migrate.Models.Api20180110.IJob])] diff --git a/src/Migrate/exports/Start-AzMigrateTestMigrationCleanup.ps1 b/src/Migrate/exports/Start-AzMigrateTestMigrationCleanup.ps1 index a920d1f64aa6..8fd23013a857 100644 --- a/src/Migrate/exports/Start-AzMigrateTestMigrationCleanup.ps1 +++ b/src/Migrate/exports/Start-AzMigrateTestMigrationCleanup.ps1 @@ -86,7 +86,7 @@ INPUTOBJECT : Specifies the replicating server for which the tes [CurrentJobStartTime ]: The start time of the job. [ProviderSpecificDetail ]: The migration provider custom settings. .Link -https://docs.microsoft.com/en-us/powershell/module/az.migrate/start-azmigratetestmigrationcleanup +https://docs.microsoft.com/powershell/module/az.migrate/start-azmigratetestmigrationcleanup #> function Start-AzMigrateTestMigrationCleanup { [OutputType([Microsoft.Azure.PowerShell.Cmdlets.Migrate.Models.Api20180110.IJob])] diff --git a/src/Migrate/generate-info.json b/src/Migrate/generate-info.json index 6c4d21f404c2..372501e8f59a 100644 --- a/src/Migrate/generate-info.json +++ b/src/Migrate/generate-info.json @@ -1,8 +1,8 @@ { - "autorest_powershell": "3.0.414", + "autorest_modelerfour": "4.15.414", + "autorest_core": "3.0.6373", "node": "v10.16.0", - "swagger_commit": "715ad8152fc6a2970d4f7c712eda3000b49b326f", "autorest": "`-- (empty)", - "autorest_core": "3.0.6351", - "autorest_modelerfour": "4.15.414" + "swagger_commit": "a8c959366fec1621befcbbd333c05581c21a5cda", + "autorest_powershell": "3.0.417" } diff --git a/src/Migrate/generated/api/Migrate.cs b/src/Migrate/generated/api/Migrate.cs index fd27d5740d04..3089ae68b7b0 100644 --- a/src/Migrate/generated/api/Migrate.cs +++ b/src/Migrate/generated/api/Migrate.cs @@ -1432,7 +1432,7 @@ public partial class Migrate case global::System.Net.HttpStatusCode.Accepted: { await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.Migrate.Runtime.Events.BeforeResponseDispatch, _response); if( eventListener.Token.IsCancellationRequested ) { return; } - await onAccepted(_response,null /* deserializeFromResponse doesn't support '-header-' C:\Users\VssAdministrator\.autorest\@autorest_powershell@3.0.414\node_modules\@autorest\powershell\dist\llcsharp\schema\object.js*/); + await onAccepted(_response,null /* deserializeFromResponse doesn't support '-header-' C:\Users\VssAdministrator\.autorest\@autorest_powershell@3.0.417\node_modules\@autorest\powershell\dist\llcsharp\schema\object.js*/); break; } default: @@ -1945,7 +1945,7 @@ public partial class Migrate case global::System.Net.HttpStatusCode.Accepted: { await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.Migrate.Runtime.Events.BeforeResponseDispatch, _response); if( eventListener.Token.IsCancellationRequested ) { return; } - await onAccepted(_response,null /* deserializeFromResponse doesn't support '-header-' C:\Users\VssAdministrator\.autorest\@autorest_powershell@3.0.414\node_modules\@autorest\powershell\dist\llcsharp\schema\object.js*/); + await onAccepted(_response,null /* deserializeFromResponse doesn't support '-header-' C:\Users\VssAdministrator\.autorest\@autorest_powershell@3.0.417\node_modules\@autorest\powershell\dist\llcsharp\schema\object.js*/); break; } default: @@ -4443,7 +4443,7 @@ public partial class Migrate case global::System.Net.HttpStatusCode.Accepted: { await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.Migrate.Runtime.Events.BeforeResponseDispatch, _response); if( eventListener.Token.IsCancellationRequested ) { return; } - await onAccepted(_response,null /* deserializeFromResponse doesn't support '-header-' C:\Users\VssAdministrator\.autorest\@autorest_powershell@3.0.414\node_modules\@autorest\powershell\dist\llcsharp\schema\object.js*/); + await onAccepted(_response,null /* deserializeFromResponse doesn't support '-header-' C:\Users\VssAdministrator\.autorest\@autorest_powershell@3.0.417\node_modules\@autorest\powershell\dist\llcsharp\schema\object.js*/); break; } default: @@ -5815,7 +5815,7 @@ public partial class Migrate case global::System.Net.HttpStatusCode.Accepted: { await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.Migrate.Runtime.Events.BeforeResponseDispatch, _response); if( eventListener.Token.IsCancellationRequested ) { return; } - await onAccepted(_response,null /* deserializeFromResponse doesn't support '-header-' C:\Users\VssAdministrator\.autorest\@autorest_powershell@3.0.414\node_modules\@autorest\powershell\dist\llcsharp\schema\object.js*/); + await onAccepted(_response,null /* deserializeFromResponse doesn't support '-header-' C:\Users\VssAdministrator\.autorest\@autorest_powershell@3.0.417\node_modules\@autorest\powershell\dist\llcsharp\schema\object.js*/); break; } default: @@ -5983,7 +5983,7 @@ public partial class Migrate case global::System.Net.HttpStatusCode.Accepted: { await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.Migrate.Runtime.Events.BeforeResponseDispatch, _response); if( eventListener.Token.IsCancellationRequested ) { return; } - await onAccepted(_response,null /* deserializeFromResponse doesn't support '-header-' C:\Users\VssAdministrator\.autorest\@autorest_powershell@3.0.414\node_modules\@autorest\powershell\dist\llcsharp\schema\object.js*/); + await onAccepted(_response,null /* deserializeFromResponse doesn't support '-header-' C:\Users\VssAdministrator\.autorest\@autorest_powershell@3.0.417\node_modules\@autorest\powershell\dist\llcsharp\schema\object.js*/); break; } default: @@ -35910,7 +35910,7 @@ public partial class Migrate case global::System.Net.HttpStatusCode.Accepted: { await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.Migrate.Runtime.Events.BeforeResponseDispatch, _response); if( eventListener.Token.IsCancellationRequested ) { return; } - await onAccepted(_response,null /* deserializeFromResponse doesn't support '-header-' C:\Users\VssAdministrator\.autorest\@autorest_powershell@3.0.414\node_modules\@autorest\powershell\dist\llcsharp\schema\object.js*/); + await onAccepted(_response,null /* deserializeFromResponse doesn't support '-header-' C:\Users\VssAdministrator\.autorest\@autorest_powershell@3.0.417\node_modules\@autorest\powershell\dist\llcsharp\schema\object.js*/); break; } default: @@ -37665,7 +37665,7 @@ public partial class Migrate case global::System.Net.HttpStatusCode.Accepted: { await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.Migrate.Runtime.Events.BeforeResponseDispatch, _response); if( eventListener.Token.IsCancellationRequested ) { return; } - await onAccepted(_response,null /* deserializeFromResponse doesn't support '-header-' C:\Users\VssAdministrator\.autorest\@autorest_powershell@3.0.414\node_modules\@autorest\powershell\dist\llcsharp\schema\object.js*/); + await onAccepted(_response,null /* deserializeFromResponse doesn't support '-header-' C:\Users\VssAdministrator\.autorest\@autorest_powershell@3.0.417\node_modules\@autorest\powershell\dist\llcsharp\schema\object.js*/); break; } default: diff --git a/src/Migrate/generated/api/Models/Api20180110/A2AApplyRecoveryPointInput.cs b/src/Migrate/generated/api/Models/Api20180110/A2AApplyRecoveryPointInput.cs index fdebc5cd6955..e04b15b12686 100644 --- a/src/Migrate/generated/api/Models/Api20180110/A2AApplyRecoveryPointInput.cs +++ b/src/Migrate/generated/api/Models/Api20180110/A2AApplyRecoveryPointInput.cs @@ -16,7 +16,7 @@ public partial class A2AApplyRecoveryPointInput : /// The class type. [Microsoft.Azure.PowerShell.Cmdlets.Migrate.Origin(Microsoft.Azure.PowerShell.Cmdlets.Migrate.PropertyOrigin.Inherited)] - public string InstanceType { get => ((Microsoft.Azure.PowerShell.Cmdlets.Migrate.Models.Api20180110.IApplyRecoveryPointProviderSpecificInputInternal)__applyRecoveryPointProviderSpecificInput).InstanceType; set => ((Microsoft.Azure.PowerShell.Cmdlets.Migrate.Models.Api20180110.IApplyRecoveryPointProviderSpecificInputInternal)__applyRecoveryPointProviderSpecificInput).InstanceType = value; } + public string InstanceType { get => ((Microsoft.Azure.PowerShell.Cmdlets.Migrate.Models.Api20180110.IApplyRecoveryPointProviderSpecificInputInternal)__applyRecoveryPointProviderSpecificInput).InstanceType; set => ((Microsoft.Azure.PowerShell.Cmdlets.Migrate.Models.Api20180110.IApplyRecoveryPointProviderSpecificInputInternal)__applyRecoveryPointProviderSpecificInput).InstanceType = value ?? null; } /// Creates an new instance. public A2AApplyRecoveryPointInput() diff --git a/src/Migrate/generated/api/Models/Api20180110/A2AContainerCreationInput.cs b/src/Migrate/generated/api/Models/Api20180110/A2AContainerCreationInput.cs index 014195f05cbd..428593cd352b 100644 --- a/src/Migrate/generated/api/Models/Api20180110/A2AContainerCreationInput.cs +++ b/src/Migrate/generated/api/Models/Api20180110/A2AContainerCreationInput.cs @@ -16,7 +16,7 @@ public partial class A2AContainerCreationInput : /// The class type. [Microsoft.Azure.PowerShell.Cmdlets.Migrate.Origin(Microsoft.Azure.PowerShell.Cmdlets.Migrate.PropertyOrigin.Inherited)] - public string InstanceType { get => ((Microsoft.Azure.PowerShell.Cmdlets.Migrate.Models.Api20180110.IReplicationProviderSpecificContainerCreationInputInternal)__replicationProviderSpecificContainerCreationInput).InstanceType; set => ((Microsoft.Azure.PowerShell.Cmdlets.Migrate.Models.Api20180110.IReplicationProviderSpecificContainerCreationInputInternal)__replicationProviderSpecificContainerCreationInput).InstanceType = value; } + public string InstanceType { get => ((Microsoft.Azure.PowerShell.Cmdlets.Migrate.Models.Api20180110.IReplicationProviderSpecificContainerCreationInputInternal)__replicationProviderSpecificContainerCreationInput).InstanceType; set => ((Microsoft.Azure.PowerShell.Cmdlets.Migrate.Models.Api20180110.IReplicationProviderSpecificContainerCreationInputInternal)__replicationProviderSpecificContainerCreationInput).InstanceType = value ?? null; } /// Creates an new instance. public A2AContainerCreationInput() diff --git a/src/Migrate/generated/api/Models/Api20180110/A2AContainerMappingInput.cs b/src/Migrate/generated/api/Models/Api20180110/A2AContainerMappingInput.cs index cfd7a90d6adb..4c2eb88a1a87 100644 --- a/src/Migrate/generated/api/Models/Api20180110/A2AContainerMappingInput.cs +++ b/src/Migrate/generated/api/Models/Api20180110/A2AContainerMappingInput.cs @@ -30,7 +30,7 @@ public partial class A2AContainerMappingInput : /// The class type. [Microsoft.Azure.PowerShell.Cmdlets.Migrate.Origin(Microsoft.Azure.PowerShell.Cmdlets.Migrate.PropertyOrigin.Inherited)] - public string InstanceType { get => ((Microsoft.Azure.PowerShell.Cmdlets.Migrate.Models.Api20180110.IReplicationProviderSpecificContainerMappingInputInternal)__replicationProviderSpecificContainerMappingInput).InstanceType; set => ((Microsoft.Azure.PowerShell.Cmdlets.Migrate.Models.Api20180110.IReplicationProviderSpecificContainerMappingInputInternal)__replicationProviderSpecificContainerMappingInput).InstanceType = value; } + public string InstanceType { get => ((Microsoft.Azure.PowerShell.Cmdlets.Migrate.Models.Api20180110.IReplicationProviderSpecificContainerMappingInputInternal)__replicationProviderSpecificContainerMappingInput).InstanceType; set => ((Microsoft.Azure.PowerShell.Cmdlets.Migrate.Models.Api20180110.IReplicationProviderSpecificContainerMappingInputInternal)__replicationProviderSpecificContainerMappingInput).InstanceType = value ?? null; } /// Creates an new instance. public A2AContainerMappingInput() diff --git a/src/Migrate/generated/api/Models/Api20180110/A2AEnableProtectionInput.cs b/src/Migrate/generated/api/Models/Api20180110/A2AEnableProtectionInput.cs index fdfec9a2f680..f4ee2f9349b6 100644 --- a/src/Migrate/generated/api/Models/Api20180110/A2AEnableProtectionInput.cs +++ b/src/Migrate/generated/api/Models/Api20180110/A2AEnableProtectionInput.cs @@ -38,7 +38,7 @@ public partial class A2AEnableProtectionInput : /// The class type. [Microsoft.Azure.PowerShell.Cmdlets.Migrate.Origin(Microsoft.Azure.PowerShell.Cmdlets.Migrate.PropertyOrigin.Inherited)] - public string InstanceType { get => ((Microsoft.Azure.PowerShell.Cmdlets.Migrate.Models.Api20180110.IEnableProtectionProviderSpecificInputInternal)__enableProtectionProviderSpecificInput).InstanceType; set => ((Microsoft.Azure.PowerShell.Cmdlets.Migrate.Models.Api20180110.IEnableProtectionProviderSpecificInputInternal)__enableProtectionProviderSpecificInput).InstanceType = value; } + public string InstanceType { get => ((Microsoft.Azure.PowerShell.Cmdlets.Migrate.Models.Api20180110.IEnableProtectionProviderSpecificInputInternal)__enableProtectionProviderSpecificInput).InstanceType; set => ((Microsoft.Azure.PowerShell.Cmdlets.Migrate.Models.Api20180110.IEnableProtectionProviderSpecificInputInternal)__enableProtectionProviderSpecificInput).InstanceType = value ?? null; } /// The key url / identifier. [Microsoft.Azure.PowerShell.Cmdlets.Migrate.Origin(Microsoft.Azure.PowerShell.Cmdlets.Migrate.PropertyOrigin.Inlined)] diff --git a/src/Migrate/generated/api/Models/Api20180110/A2AFailoverProviderInput.cs b/src/Migrate/generated/api/Models/Api20180110/A2AFailoverProviderInput.cs index 29766c6db5b7..d6f0f1c6ef84 100644 --- a/src/Migrate/generated/api/Models/Api20180110/A2AFailoverProviderInput.cs +++ b/src/Migrate/generated/api/Models/Api20180110/A2AFailoverProviderInput.cs @@ -23,7 +23,7 @@ public partial class A2AFailoverProviderInput : /// The class type. [Microsoft.Azure.PowerShell.Cmdlets.Migrate.Origin(Microsoft.Azure.PowerShell.Cmdlets.Migrate.PropertyOrigin.Inherited)] - public string InstanceType { get => ((Microsoft.Azure.PowerShell.Cmdlets.Migrate.Models.Api20180110.IProviderSpecificFailoverInputInternal)__providerSpecificFailoverInput).InstanceType; set => ((Microsoft.Azure.PowerShell.Cmdlets.Migrate.Models.Api20180110.IProviderSpecificFailoverInputInternal)__providerSpecificFailoverInput).InstanceType = value; } + public string InstanceType { get => ((Microsoft.Azure.PowerShell.Cmdlets.Migrate.Models.Api20180110.IProviderSpecificFailoverInputInternal)__providerSpecificFailoverInput).InstanceType; set => ((Microsoft.Azure.PowerShell.Cmdlets.Migrate.Models.Api20180110.IProviderSpecificFailoverInputInternal)__providerSpecificFailoverInput).InstanceType = value ?? null; } /// Backing field for property. private string _recoveryPointId; diff --git a/src/Migrate/generated/api/Models/Api20180110/A2APolicyCreationInput.cs b/src/Migrate/generated/api/Models/Api20180110/A2APolicyCreationInput.cs index 331d699df118..eb1b0aa02d70 100644 --- a/src/Migrate/generated/api/Models/Api20180110/A2APolicyCreationInput.cs +++ b/src/Migrate/generated/api/Models/Api20180110/A2APolicyCreationInput.cs @@ -30,7 +30,7 @@ public partial class A2APolicyCreationInput : /// The class type. [Microsoft.Azure.PowerShell.Cmdlets.Migrate.Origin(Microsoft.Azure.PowerShell.Cmdlets.Migrate.PropertyOrigin.Inherited)] - public string InstanceType { get => ((Microsoft.Azure.PowerShell.Cmdlets.Migrate.Models.Api20180110.IPolicyProviderSpecificInputInternal)__policyProviderSpecificInput).InstanceType; set => ((Microsoft.Azure.PowerShell.Cmdlets.Migrate.Models.Api20180110.IPolicyProviderSpecificInputInternal)__policyProviderSpecificInput).InstanceType = value; } + public string InstanceType { get => ((Microsoft.Azure.PowerShell.Cmdlets.Migrate.Models.Api20180110.IPolicyProviderSpecificInputInternal)__policyProviderSpecificInput).InstanceType; set => ((Microsoft.Azure.PowerShell.Cmdlets.Migrate.Models.Api20180110.IPolicyProviderSpecificInputInternal)__policyProviderSpecificInput).InstanceType = value ?? null; } /// Backing field for property. private Microsoft.Azure.PowerShell.Cmdlets.Migrate.Support.SetMultiVMSyncStatus _multiVMSyncStatus; diff --git a/src/Migrate/generated/api/Models/Api20180110/A2AReprotectInput.cs b/src/Migrate/generated/api/Models/Api20180110/A2AReprotectInput.cs index b7a33319de92..05be10b051be 100644 --- a/src/Migrate/generated/api/Models/Api20180110/A2AReprotectInput.cs +++ b/src/Migrate/generated/api/Models/Api20180110/A2AReprotectInput.cs @@ -16,7 +16,7 @@ public partial class A2AReprotectInput : /// The class type. [Microsoft.Azure.PowerShell.Cmdlets.Migrate.Origin(Microsoft.Azure.PowerShell.Cmdlets.Migrate.PropertyOrigin.Inherited)] - public string InstanceType { get => ((Microsoft.Azure.PowerShell.Cmdlets.Migrate.Models.Api20180110.IReverseReplicationProviderSpecificInputInternal)__reverseReplicationProviderSpecificInput).InstanceType; set => ((Microsoft.Azure.PowerShell.Cmdlets.Migrate.Models.Api20180110.IReverseReplicationProviderSpecificInputInternal)__reverseReplicationProviderSpecificInput).InstanceType = value; } + public string InstanceType { get => ((Microsoft.Azure.PowerShell.Cmdlets.Migrate.Models.Api20180110.IReverseReplicationProviderSpecificInputInternal)__reverseReplicationProviderSpecificInput).InstanceType; set => ((Microsoft.Azure.PowerShell.Cmdlets.Migrate.Models.Api20180110.IReverseReplicationProviderSpecificInputInternal)__reverseReplicationProviderSpecificInput).InstanceType = value ?? null; } /// Backing field for property. private string _policyId; diff --git a/src/Migrate/generated/api/Models/Api20180110/A2ASwitchProtectionInput.cs b/src/Migrate/generated/api/Models/Api20180110/A2ASwitchProtectionInput.cs index 5a229f97b078..f2ae10ed1886 100644 --- a/src/Migrate/generated/api/Models/Api20180110/A2ASwitchProtectionInput.cs +++ b/src/Migrate/generated/api/Models/Api20180110/A2ASwitchProtectionInput.cs @@ -31,7 +31,7 @@ public partial class A2ASwitchProtectionInput : /// Gets the Instance type. [Microsoft.Azure.PowerShell.Cmdlets.Migrate.Origin(Microsoft.Azure.PowerShell.Cmdlets.Migrate.PropertyOrigin.Inherited)] - public string InstanceType { get => ((Microsoft.Azure.PowerShell.Cmdlets.Migrate.Models.Api20180110.ISwitchProtectionProviderSpecificInputInternal)__switchProtectionProviderSpecificInput).InstanceType; set => ((Microsoft.Azure.PowerShell.Cmdlets.Migrate.Models.Api20180110.ISwitchProtectionProviderSpecificInputInternal)__switchProtectionProviderSpecificInput).InstanceType = value; } + public string InstanceType { get => ((Microsoft.Azure.PowerShell.Cmdlets.Migrate.Models.Api20180110.ISwitchProtectionProviderSpecificInputInternal)__switchProtectionProviderSpecificInput).InstanceType; set => ((Microsoft.Azure.PowerShell.Cmdlets.Migrate.Models.Api20180110.ISwitchProtectionProviderSpecificInputInternal)__switchProtectionProviderSpecificInput).InstanceType = value ?? null; } /// The key url / identifier. [Microsoft.Azure.PowerShell.Cmdlets.Migrate.Origin(Microsoft.Azure.PowerShell.Cmdlets.Migrate.PropertyOrigin.Inlined)] diff --git a/src/Migrate/generated/api/Models/Api20180110/A2AUpdateContainerMappingInput.cs b/src/Migrate/generated/api/Models/Api20180110/A2AUpdateContainerMappingInput.cs index a74085547ad1..e3f5c694211b 100644 --- a/src/Migrate/generated/api/Models/Api20180110/A2AUpdateContainerMappingInput.cs +++ b/src/Migrate/generated/api/Models/Api20180110/A2AUpdateContainerMappingInput.cs @@ -30,7 +30,7 @@ public partial class A2AUpdateContainerMappingInput : /// The class type. [Microsoft.Azure.PowerShell.Cmdlets.Migrate.Origin(Microsoft.Azure.PowerShell.Cmdlets.Migrate.PropertyOrigin.Inherited)] - public string InstanceType { get => ((Microsoft.Azure.PowerShell.Cmdlets.Migrate.Models.Api20180110.IReplicationProviderSpecificUpdateContainerMappingInputInternal)__replicationProviderSpecificUpdateContainerMappingInput).InstanceType; set => ((Microsoft.Azure.PowerShell.Cmdlets.Migrate.Models.Api20180110.IReplicationProviderSpecificUpdateContainerMappingInputInternal)__replicationProviderSpecificUpdateContainerMappingInput).InstanceType = value; } + public string InstanceType { get => ((Microsoft.Azure.PowerShell.Cmdlets.Migrate.Models.Api20180110.IReplicationProviderSpecificUpdateContainerMappingInputInternal)__replicationProviderSpecificUpdateContainerMappingInput).InstanceType; set => ((Microsoft.Azure.PowerShell.Cmdlets.Migrate.Models.Api20180110.IReplicationProviderSpecificUpdateContainerMappingInputInternal)__replicationProviderSpecificUpdateContainerMappingInput).InstanceType = value ?? null; } /// Creates an new instance. public A2AUpdateContainerMappingInput() diff --git a/src/Migrate/generated/api/Models/Api20180110/A2AUpdateReplicationProtectedItemInput.cs b/src/Migrate/generated/api/Models/Api20180110/A2AUpdateReplicationProtectedItemInput.cs index bee56195fc13..b97ec85ff40a 100644 --- a/src/Migrate/generated/api/Models/Api20180110/A2AUpdateReplicationProtectedItemInput.cs +++ b/src/Migrate/generated/api/Models/Api20180110/A2AUpdateReplicationProtectedItemInput.cs @@ -31,7 +31,7 @@ public partial class A2AUpdateReplicationProtectedItemInput : /// The class type. [Microsoft.Azure.PowerShell.Cmdlets.Migrate.Origin(Microsoft.Azure.PowerShell.Cmdlets.Migrate.PropertyOrigin.Inherited)] - public string InstanceType { get => ((Microsoft.Azure.PowerShell.Cmdlets.Migrate.Models.Api20180110.IUpdateReplicationProtectedItemProviderInputInternal)__updateReplicationProtectedItemProviderInput).InstanceType; set => ((Microsoft.Azure.PowerShell.Cmdlets.Migrate.Models.Api20180110.IUpdateReplicationProtectedItemProviderInputInternal)__updateReplicationProtectedItemProviderInput).InstanceType = value; } + public string InstanceType { get => ((Microsoft.Azure.PowerShell.Cmdlets.Migrate.Models.Api20180110.IUpdateReplicationProtectedItemProviderInputInternal)__updateReplicationProtectedItemProviderInput).InstanceType; set => ((Microsoft.Azure.PowerShell.Cmdlets.Migrate.Models.Api20180110.IUpdateReplicationProtectedItemProviderInputInternal)__updateReplicationProtectedItemProviderInput).InstanceType = value ?? null; } /// The key url / identifier. [Microsoft.Azure.PowerShell.Cmdlets.Migrate.Origin(Microsoft.Azure.PowerShell.Cmdlets.Migrate.PropertyOrigin.Inlined)] diff --git a/src/Migrate/generated/api/Models/Api20180110/Alert.cs b/src/Migrate/generated/api/Models/Api20180110/Alert.cs index 6ac852f1e24f..ef4446100475 100644 --- a/src/Migrate/generated/api/Models/Api20180110/Alert.cs +++ b/src/Migrate/generated/api/Models/Api20180110/Alert.cs @@ -28,7 +28,7 @@ public partial class Alert : /// Resource Location [Microsoft.Azure.PowerShell.Cmdlets.Migrate.Origin(Microsoft.Azure.PowerShell.Cmdlets.Migrate.PropertyOrigin.Inherited)] - public string Location { get => ((Microsoft.Azure.PowerShell.Cmdlets.Migrate.Models.Api20180110.IResourceInternal)__resource).Location; set => ((Microsoft.Azure.PowerShell.Cmdlets.Migrate.Models.Api20180110.IResourceInternal)__resource).Location = value; } + public string Location { get => ((Microsoft.Azure.PowerShell.Cmdlets.Migrate.Models.Api20180110.IResourceInternal)__resource).Location; set => ((Microsoft.Azure.PowerShell.Cmdlets.Migrate.Models.Api20180110.IResourceInternal)__resource).Location = value ?? null; } /// Internal Acessors for Property Microsoft.Azure.PowerShell.Cmdlets.Migrate.Models.Api20180110.IAlertProperties Microsoft.Azure.PowerShell.Cmdlets.Migrate.Models.Api20180110.IAlertInternal.Property { get => (this._property = this._property ?? new Microsoft.Azure.PowerShell.Cmdlets.Migrate.Models.Api20180110.AlertProperties()); set { {_property = value;} } } diff --git a/src/Migrate/generated/api/Models/Api20180110/AsrJobDetails.cs b/src/Migrate/generated/api/Models/Api20180110/AsrJobDetails.cs index 017feebf8b9c..8e36a9fa2872 100644 --- a/src/Migrate/generated/api/Models/Api20180110/AsrJobDetails.cs +++ b/src/Migrate/generated/api/Models/Api20180110/AsrJobDetails.cs @@ -19,7 +19,7 @@ public partial class AsrJobDetails : /// object details. /// [Microsoft.Azure.PowerShell.Cmdlets.Migrate.Origin(Microsoft.Azure.PowerShell.Cmdlets.Migrate.PropertyOrigin.Inherited)] - public Microsoft.Azure.PowerShell.Cmdlets.Migrate.Models.Api20180110.IJobDetailsAffectedObjectDetails AffectedObjectDetail { get => ((Microsoft.Azure.PowerShell.Cmdlets.Migrate.Models.Api20180110.IJobDetailsInternal)__jobDetails).AffectedObjectDetail; set => ((Microsoft.Azure.PowerShell.Cmdlets.Migrate.Models.Api20180110.IJobDetailsInternal)__jobDetails).AffectedObjectDetail = value; } + public Microsoft.Azure.PowerShell.Cmdlets.Migrate.Models.Api20180110.IJobDetailsAffectedObjectDetails AffectedObjectDetail { get => ((Microsoft.Azure.PowerShell.Cmdlets.Migrate.Models.Api20180110.IJobDetailsInternal)__jobDetails).AffectedObjectDetail; set => ((Microsoft.Azure.PowerShell.Cmdlets.Migrate.Models.Api20180110.IJobDetailsInternal)__jobDetails).AffectedObjectDetail = value ?? null /* model class */; } /// Gets the type of job details (see JobDetailsTypes enum for possible values). [Microsoft.Azure.PowerShell.Cmdlets.Migrate.Origin(Microsoft.Azure.PowerShell.Cmdlets.Migrate.PropertyOrigin.Inherited)] diff --git a/src/Migrate/generated/api/Models/Api20180110/AutomationRunbookTaskDetails.cs b/src/Migrate/generated/api/Models/Api20180110/AutomationRunbookTaskDetails.cs index 08ac9a948cef..904a56df38c8 100644 --- a/src/Migrate/generated/api/Models/Api20180110/AutomationRunbookTaskDetails.cs +++ b/src/Migrate/generated/api/Models/Api20180110/AutomationRunbookTaskDetails.cs @@ -30,7 +30,7 @@ public partial class AutomationRunbookTaskDetails : /// The type of task details. [Microsoft.Azure.PowerShell.Cmdlets.Migrate.Origin(Microsoft.Azure.PowerShell.Cmdlets.Migrate.PropertyOrigin.Inherited)] - public string InstanceType { get => ((Microsoft.Azure.PowerShell.Cmdlets.Migrate.Models.Api20180110.ITaskTypeDetailsInternal)__taskTypeDetails).InstanceType; set => ((Microsoft.Azure.PowerShell.Cmdlets.Migrate.Models.Api20180110.ITaskTypeDetailsInternal)__taskTypeDetails).InstanceType = value; } + public string InstanceType { get => ((Microsoft.Azure.PowerShell.Cmdlets.Migrate.Models.Api20180110.ITaskTypeDetailsInternal)__taskTypeDetails).InstanceType; set => ((Microsoft.Azure.PowerShell.Cmdlets.Migrate.Models.Api20180110.ITaskTypeDetailsInternal)__taskTypeDetails).InstanceType = value ?? null; } /// Backing field for property. private bool? _isPrimarySideScript; diff --git a/src/Migrate/generated/api/Models/Api20180110/AzureFabricCreationInput.cs b/src/Migrate/generated/api/Models/Api20180110/AzureFabricCreationInput.cs index 1b38fa84c753..8bbe871a88aa 100644 --- a/src/Migrate/generated/api/Models/Api20180110/AzureFabricCreationInput.cs +++ b/src/Migrate/generated/api/Models/Api20180110/AzureFabricCreationInput.cs @@ -16,7 +16,7 @@ public partial class AzureFabricCreationInput : /// Gets the class type. [Microsoft.Azure.PowerShell.Cmdlets.Migrate.Origin(Microsoft.Azure.PowerShell.Cmdlets.Migrate.PropertyOrigin.Inherited)] - public string InstanceType { get => ((Microsoft.Azure.PowerShell.Cmdlets.Migrate.Models.Api20180110.IFabricSpecificCreationInputInternal)__fabricSpecificCreationInput).InstanceType; set => ((Microsoft.Azure.PowerShell.Cmdlets.Migrate.Models.Api20180110.IFabricSpecificCreationInputInternal)__fabricSpecificCreationInput).InstanceType = value; } + public string InstanceType { get => ((Microsoft.Azure.PowerShell.Cmdlets.Migrate.Models.Api20180110.IFabricSpecificCreationInputInternal)__fabricSpecificCreationInput).InstanceType; set => ((Microsoft.Azure.PowerShell.Cmdlets.Migrate.Models.Api20180110.IFabricSpecificCreationInputInternal)__fabricSpecificCreationInput).InstanceType = value ?? null; } /// Backing field for property. private string _location; diff --git a/src/Migrate/generated/api/Models/Api20180110/AzureToAzureCreateNetworkMappingInput.cs b/src/Migrate/generated/api/Models/Api20180110/AzureToAzureCreateNetworkMappingInput.cs index 1f475a7e24c9..ddf1be310b31 100644 --- a/src/Migrate/generated/api/Models/Api20180110/AzureToAzureCreateNetworkMappingInput.cs +++ b/src/Migrate/generated/api/Models/Api20180110/AzureToAzureCreateNetworkMappingInput.cs @@ -18,7 +18,7 @@ public partial class AzureToAzureCreateNetworkMappingInput : /// The instance type. [Microsoft.Azure.PowerShell.Cmdlets.Migrate.Origin(Microsoft.Azure.PowerShell.Cmdlets.Migrate.PropertyOrigin.Inherited)] - public string InstanceType { get => ((Microsoft.Azure.PowerShell.Cmdlets.Migrate.Models.Api20180110.IFabricSpecificCreateNetworkMappingInputInternal)__fabricSpecificCreateNetworkMappingInput).InstanceType; set => ((Microsoft.Azure.PowerShell.Cmdlets.Migrate.Models.Api20180110.IFabricSpecificCreateNetworkMappingInputInternal)__fabricSpecificCreateNetworkMappingInput).InstanceType = value; } + public string InstanceType { get => ((Microsoft.Azure.PowerShell.Cmdlets.Migrate.Models.Api20180110.IFabricSpecificCreateNetworkMappingInputInternal)__fabricSpecificCreateNetworkMappingInput).InstanceType; set => ((Microsoft.Azure.PowerShell.Cmdlets.Migrate.Models.Api20180110.IFabricSpecificCreateNetworkMappingInputInternal)__fabricSpecificCreateNetworkMappingInput).InstanceType = value ?? null; } /// Backing field for property. private string _primaryNetworkId; diff --git a/src/Migrate/generated/api/Models/Api20180110/AzureToAzureUpdateNetworkMappingInput.cs b/src/Migrate/generated/api/Models/Api20180110/AzureToAzureUpdateNetworkMappingInput.cs index db59674c91a1..91afbde0164d 100644 --- a/src/Migrate/generated/api/Models/Api20180110/AzureToAzureUpdateNetworkMappingInput.cs +++ b/src/Migrate/generated/api/Models/Api20180110/AzureToAzureUpdateNetworkMappingInput.cs @@ -16,7 +16,7 @@ public partial class AzureToAzureUpdateNetworkMappingInput : /// The instance type. [Microsoft.Azure.PowerShell.Cmdlets.Migrate.Origin(Microsoft.Azure.PowerShell.Cmdlets.Migrate.PropertyOrigin.Inherited)] - public string InstanceType { get => ((Microsoft.Azure.PowerShell.Cmdlets.Migrate.Models.Api20180110.IFabricSpecificUpdateNetworkMappingInputInternal)__fabricSpecificUpdateNetworkMappingInput).InstanceType; set => ((Microsoft.Azure.PowerShell.Cmdlets.Migrate.Models.Api20180110.IFabricSpecificUpdateNetworkMappingInputInternal)__fabricSpecificUpdateNetworkMappingInput).InstanceType = value; } + public string InstanceType { get => ((Microsoft.Azure.PowerShell.Cmdlets.Migrate.Models.Api20180110.IFabricSpecificUpdateNetworkMappingInputInternal)__fabricSpecificUpdateNetworkMappingInput).InstanceType; set => ((Microsoft.Azure.PowerShell.Cmdlets.Migrate.Models.Api20180110.IFabricSpecificUpdateNetworkMappingInputInternal)__fabricSpecificUpdateNetworkMappingInput).InstanceType = value ?? null; } /// Backing field for property. private string _primaryNetworkId; diff --git a/src/Migrate/generated/api/Models/Api20180110/ConsistencyCheckTaskDetails.cs b/src/Migrate/generated/api/Models/Api20180110/ConsistencyCheckTaskDetails.cs index 3fdc12d5cbd6..20bfd428afb1 100644 --- a/src/Migrate/generated/api/Models/Api20180110/ConsistencyCheckTaskDetails.cs +++ b/src/Migrate/generated/api/Models/Api20180110/ConsistencyCheckTaskDetails.cs @@ -18,7 +18,7 @@ public partial class ConsistencyCheckTaskDetails : /// The type of task details. [Microsoft.Azure.PowerShell.Cmdlets.Migrate.Origin(Microsoft.Azure.PowerShell.Cmdlets.Migrate.PropertyOrigin.Inherited)] - public string InstanceType { get => ((Microsoft.Azure.PowerShell.Cmdlets.Migrate.Models.Api20180110.ITaskTypeDetailsInternal)__taskTypeDetails).InstanceType; set => ((Microsoft.Azure.PowerShell.Cmdlets.Migrate.Models.Api20180110.ITaskTypeDetailsInternal)__taskTypeDetails).InstanceType = value; } + public string InstanceType { get => ((Microsoft.Azure.PowerShell.Cmdlets.Migrate.Models.Api20180110.ITaskTypeDetailsInternal)__taskTypeDetails).InstanceType; set => ((Microsoft.Azure.PowerShell.Cmdlets.Migrate.Models.Api20180110.ITaskTypeDetailsInternal)__taskTypeDetails).InstanceType = value ?? null; } /// Backing field for property. private Microsoft.Azure.PowerShell.Cmdlets.Migrate.Models.Api20180110.IInconsistentVMDetails[] _vMDetail; diff --git a/src/Migrate/generated/api/Models/Api20180110/Event.cs b/src/Migrate/generated/api/Models/Api20180110/Event.cs index a14fd72d674e..eb9323709891 100644 --- a/src/Migrate/generated/api/Models/Api20180110/Event.cs +++ b/src/Migrate/generated/api/Models/Api20180110/Event.cs @@ -50,7 +50,7 @@ public partial class Event : /// Resource Location [Microsoft.Azure.PowerShell.Cmdlets.Migrate.Origin(Microsoft.Azure.PowerShell.Cmdlets.Migrate.PropertyOrigin.Inherited)] - public string Location { get => ((Microsoft.Azure.PowerShell.Cmdlets.Migrate.Models.Api20180110.IResourceInternal)__resource).Location; set => ((Microsoft.Azure.PowerShell.Cmdlets.Migrate.Models.Api20180110.IResourceInternal)__resource).Location = value; } + public string Location { get => ((Microsoft.Azure.PowerShell.Cmdlets.Migrate.Models.Api20180110.IResourceInternal)__resource).Location; set => ((Microsoft.Azure.PowerShell.Cmdlets.Migrate.Models.Api20180110.IResourceInternal)__resource).Location = value ?? null; } /// Internal Acessors for AffectedObjectCorrelationId string Microsoft.Azure.PowerShell.Cmdlets.Migrate.Models.Api20180110.IEventInternal.AffectedObjectCorrelationId { get => ((Microsoft.Azure.PowerShell.Cmdlets.Migrate.Models.Api20180110.IEventPropertiesInternal)Property).AffectedObjectCorrelationId; set => ((Microsoft.Azure.PowerShell.Cmdlets.Migrate.Models.Api20180110.IEventPropertiesInternal)Property).AffectedObjectCorrelationId = value; } diff --git a/src/Migrate/generated/api/Models/Api20180110/ExportJobDetails.cs b/src/Migrate/generated/api/Models/Api20180110/ExportJobDetails.cs index 35014a77af8b..cd6dfcc3ed2d 100644 --- a/src/Migrate/generated/api/Models/Api20180110/ExportJobDetails.cs +++ b/src/Migrate/generated/api/Models/Api20180110/ExportJobDetails.cs @@ -19,7 +19,7 @@ public partial class ExportJobDetails : /// object details. /// [Microsoft.Azure.PowerShell.Cmdlets.Migrate.Origin(Microsoft.Azure.PowerShell.Cmdlets.Migrate.PropertyOrigin.Inherited)] - public Microsoft.Azure.PowerShell.Cmdlets.Migrate.Models.Api20180110.IJobDetailsAffectedObjectDetails AffectedObjectDetail { get => ((Microsoft.Azure.PowerShell.Cmdlets.Migrate.Models.Api20180110.IJobDetailsInternal)__jobDetails).AffectedObjectDetail; set => ((Microsoft.Azure.PowerShell.Cmdlets.Migrate.Models.Api20180110.IJobDetailsInternal)__jobDetails).AffectedObjectDetail = value; } + public Microsoft.Azure.PowerShell.Cmdlets.Migrate.Models.Api20180110.IJobDetailsAffectedObjectDetails AffectedObjectDetail { get => ((Microsoft.Azure.PowerShell.Cmdlets.Migrate.Models.Api20180110.IJobDetailsInternal)__jobDetails).AffectedObjectDetail; set => ((Microsoft.Azure.PowerShell.Cmdlets.Migrate.Models.Api20180110.IJobDetailsInternal)__jobDetails).AffectedObjectDetail = value ?? null /* model class */; } /// Backing field for property. private string _blobUri; diff --git a/src/Migrate/generated/api/Models/Api20180110/Fabric.cs b/src/Migrate/generated/api/Models/Api20180110/Fabric.cs index 914933861a93..8018593daeef 100644 --- a/src/Migrate/generated/api/Models/Api20180110/Fabric.cs +++ b/src/Migrate/generated/api/Models/Api20180110/Fabric.cs @@ -21,7 +21,7 @@ public partial class Fabric : /// Resource Location [Microsoft.Azure.PowerShell.Cmdlets.Migrate.Origin(Microsoft.Azure.PowerShell.Cmdlets.Migrate.PropertyOrigin.Inherited)] - public string Location { get => ((Microsoft.Azure.PowerShell.Cmdlets.Migrate.Models.Api20180110.IResourceInternal)__resource).Location; set => ((Microsoft.Azure.PowerShell.Cmdlets.Migrate.Models.Api20180110.IResourceInternal)__resource).Location = value; } + public string Location { get => ((Microsoft.Azure.PowerShell.Cmdlets.Migrate.Models.Api20180110.IResourceInternal)__resource).Location; set => ((Microsoft.Azure.PowerShell.Cmdlets.Migrate.Models.Api20180110.IResourceInternal)__resource).Location = value ?? null; } /// Internal Acessors for Id string Microsoft.Azure.PowerShell.Cmdlets.Migrate.Models.Api20180110.IResourceInternal.Id { get => ((Microsoft.Azure.PowerShell.Cmdlets.Migrate.Models.Api20180110.IResourceInternal)__resource).Id; set => ((Microsoft.Azure.PowerShell.Cmdlets.Migrate.Models.Api20180110.IResourceInternal)__resource).Id = value; } diff --git a/src/Migrate/generated/api/Models/Api20180110/FabricReplicationGroupTaskDetails.cs b/src/Migrate/generated/api/Models/Api20180110/FabricReplicationGroupTaskDetails.cs index 14ec64a44d06..f64b174f4b65 100644 --- a/src/Migrate/generated/api/Models/Api20180110/FabricReplicationGroupTaskDetails.cs +++ b/src/Migrate/generated/api/Models/Api20180110/FabricReplicationGroupTaskDetails.cs @@ -16,7 +16,7 @@ public partial class FabricReplicationGroupTaskDetails : /// The type of task details. [Microsoft.Azure.PowerShell.Cmdlets.Migrate.Origin(Microsoft.Azure.PowerShell.Cmdlets.Migrate.PropertyOrigin.Inherited)] - public string InstanceType { get => ((Microsoft.Azure.PowerShell.Cmdlets.Migrate.Models.Api20180110.ITaskTypeDetailsInternal)__taskTypeDetails).InstanceType; set => ((Microsoft.Azure.PowerShell.Cmdlets.Migrate.Models.Api20180110.ITaskTypeDetailsInternal)__taskTypeDetails).InstanceType = value; } + public string InstanceType { get => ((Microsoft.Azure.PowerShell.Cmdlets.Migrate.Models.Api20180110.ITaskTypeDetailsInternal)__taskTypeDetails).InstanceType; set => ((Microsoft.Azure.PowerShell.Cmdlets.Migrate.Models.Api20180110.ITaskTypeDetailsInternal)__taskTypeDetails).InstanceType = value ?? null; } /// Backing field for property. private Microsoft.Azure.PowerShell.Cmdlets.Migrate.Models.Api20180110.IJobEntity _jobTask; diff --git a/src/Migrate/generated/api/Models/Api20180110/FailoverJobDetails.cs b/src/Migrate/generated/api/Models/Api20180110/FailoverJobDetails.cs index 3521a8a3009a..bbfff966c808 100644 --- a/src/Migrate/generated/api/Models/Api20180110/FailoverJobDetails.cs +++ b/src/Migrate/generated/api/Models/Api20180110/FailoverJobDetails.cs @@ -19,7 +19,7 @@ public partial class FailoverJobDetails : /// object details. /// [Microsoft.Azure.PowerShell.Cmdlets.Migrate.Origin(Microsoft.Azure.PowerShell.Cmdlets.Migrate.PropertyOrigin.Inherited)] - public Microsoft.Azure.PowerShell.Cmdlets.Migrate.Models.Api20180110.IJobDetailsAffectedObjectDetails AffectedObjectDetail { get => ((Microsoft.Azure.PowerShell.Cmdlets.Migrate.Models.Api20180110.IJobDetailsInternal)__jobDetails).AffectedObjectDetail; set => ((Microsoft.Azure.PowerShell.Cmdlets.Migrate.Models.Api20180110.IJobDetailsInternal)__jobDetails).AffectedObjectDetail = value; } + public Microsoft.Azure.PowerShell.Cmdlets.Migrate.Models.Api20180110.IJobDetailsAffectedObjectDetails AffectedObjectDetail { get => ((Microsoft.Azure.PowerShell.Cmdlets.Migrate.Models.Api20180110.IJobDetailsInternal)__jobDetails).AffectedObjectDetail; set => ((Microsoft.Azure.PowerShell.Cmdlets.Migrate.Models.Api20180110.IJobDetailsInternal)__jobDetails).AffectedObjectDetail = value ?? null /* model class */; } /// Gets the type of job details (see JobDetailsTypes enum for possible values). [Microsoft.Azure.PowerShell.Cmdlets.Migrate.Origin(Microsoft.Azure.PowerShell.Cmdlets.Migrate.PropertyOrigin.Inherited)] diff --git a/src/Migrate/generated/api/Models/Api20180110/HyperVReplicaAzureApplyRecoveryPointInput.cs b/src/Migrate/generated/api/Models/Api20180110/HyperVReplicaAzureApplyRecoveryPointInput.cs index 8bf7bc797aa0..d6e00b08ac69 100644 --- a/src/Migrate/generated/api/Models/Api20180110/HyperVReplicaAzureApplyRecoveryPointInput.cs +++ b/src/Migrate/generated/api/Models/Api20180110/HyperVReplicaAzureApplyRecoveryPointInput.cs @@ -16,7 +16,7 @@ public partial class HyperVReplicaAzureApplyRecoveryPointInput : /// The class type. [Microsoft.Azure.PowerShell.Cmdlets.Migrate.Origin(Microsoft.Azure.PowerShell.Cmdlets.Migrate.PropertyOrigin.Inherited)] - public string InstanceType { get => ((Microsoft.Azure.PowerShell.Cmdlets.Migrate.Models.Api20180110.IApplyRecoveryPointProviderSpecificInputInternal)__applyRecoveryPointProviderSpecificInput).InstanceType; set => ((Microsoft.Azure.PowerShell.Cmdlets.Migrate.Models.Api20180110.IApplyRecoveryPointProviderSpecificInputInternal)__applyRecoveryPointProviderSpecificInput).InstanceType = value; } + public string InstanceType { get => ((Microsoft.Azure.PowerShell.Cmdlets.Migrate.Models.Api20180110.IApplyRecoveryPointProviderSpecificInputInternal)__applyRecoveryPointProviderSpecificInput).InstanceType; set => ((Microsoft.Azure.PowerShell.Cmdlets.Migrate.Models.Api20180110.IApplyRecoveryPointProviderSpecificInputInternal)__applyRecoveryPointProviderSpecificInput).InstanceType = value ?? null; } /// Backing field for property. private string _primaryKekCertificatePfx; diff --git a/src/Migrate/generated/api/Models/Api20180110/HyperVReplicaAzureEnableProtectionInput.cs b/src/Migrate/generated/api/Models/Api20180110/HyperVReplicaAzureEnableProtectionInput.cs index 37937bede40b..0bf8349b5a54 100644 --- a/src/Migrate/generated/api/Models/Api20180110/HyperVReplicaAzureEnableProtectionInput.cs +++ b/src/Migrate/generated/api/Models/Api20180110/HyperVReplicaAzureEnableProtectionInput.cs @@ -40,7 +40,7 @@ public partial class HyperVReplicaAzureEnableProtectionInput : /// The class type. [Microsoft.Azure.PowerShell.Cmdlets.Migrate.Origin(Microsoft.Azure.PowerShell.Cmdlets.Migrate.PropertyOrigin.Inherited)] - public string InstanceType { get => ((Microsoft.Azure.PowerShell.Cmdlets.Migrate.Models.Api20180110.IEnableProtectionProviderSpecificInputInternal)__enableProtectionProviderSpecificInput).InstanceType; set => ((Microsoft.Azure.PowerShell.Cmdlets.Migrate.Models.Api20180110.IEnableProtectionProviderSpecificInputInternal)__enableProtectionProviderSpecificInput).InstanceType = value; } + public string InstanceType { get => ((Microsoft.Azure.PowerShell.Cmdlets.Migrate.Models.Api20180110.IEnableProtectionProviderSpecificInputInternal)__enableProtectionProviderSpecificInput).InstanceType; set => ((Microsoft.Azure.PowerShell.Cmdlets.Migrate.Models.Api20180110.IEnableProtectionProviderSpecificInputInternal)__enableProtectionProviderSpecificInput).InstanceType = value ?? null; } /// Backing field for property. private string _logStorageAccountId; diff --git a/src/Migrate/generated/api/Models/Api20180110/HyperVReplicaAzureFailbackProviderInput.cs b/src/Migrate/generated/api/Models/Api20180110/HyperVReplicaAzureFailbackProviderInput.cs index 2501a3a6b8cc..7ff798e82b85 100644 --- a/src/Migrate/generated/api/Models/Api20180110/HyperVReplicaAzureFailbackProviderInput.cs +++ b/src/Migrate/generated/api/Models/Api20180110/HyperVReplicaAzureFailbackProviderInput.cs @@ -23,7 +23,7 @@ public partial class HyperVReplicaAzureFailbackProviderInput : /// The class type. [Microsoft.Azure.PowerShell.Cmdlets.Migrate.Origin(Microsoft.Azure.PowerShell.Cmdlets.Migrate.PropertyOrigin.Inherited)] - public string InstanceType { get => ((Microsoft.Azure.PowerShell.Cmdlets.Migrate.Models.Api20180110.IProviderSpecificFailoverInputInternal)__providerSpecificFailoverInput).InstanceType; set => ((Microsoft.Azure.PowerShell.Cmdlets.Migrate.Models.Api20180110.IProviderSpecificFailoverInputInternal)__providerSpecificFailoverInput).InstanceType = value; } + public string InstanceType { get => ((Microsoft.Azure.PowerShell.Cmdlets.Migrate.Models.Api20180110.IProviderSpecificFailoverInputInternal)__providerSpecificFailoverInput).InstanceType; set => ((Microsoft.Azure.PowerShell.Cmdlets.Migrate.Models.Api20180110.IProviderSpecificFailoverInputInternal)__providerSpecificFailoverInput).InstanceType = value ?? null; } /// Backing field for property. private string _providerIdForAlternateRecovery; diff --git a/src/Migrate/generated/api/Models/Api20180110/HyperVReplicaAzureFailoverProviderInput.cs b/src/Migrate/generated/api/Models/Api20180110/HyperVReplicaAzureFailoverProviderInput.cs index c62c855a7694..692b43faa939 100644 --- a/src/Migrate/generated/api/Models/Api20180110/HyperVReplicaAzureFailoverProviderInput.cs +++ b/src/Migrate/generated/api/Models/Api20180110/HyperVReplicaAzureFailoverProviderInput.cs @@ -16,7 +16,7 @@ public partial class HyperVReplicaAzureFailoverProviderInput : /// The class type. [Microsoft.Azure.PowerShell.Cmdlets.Migrate.Origin(Microsoft.Azure.PowerShell.Cmdlets.Migrate.PropertyOrigin.Inherited)] - public string InstanceType { get => ((Microsoft.Azure.PowerShell.Cmdlets.Migrate.Models.Api20180110.IProviderSpecificFailoverInputInternal)__providerSpecificFailoverInput).InstanceType; set => ((Microsoft.Azure.PowerShell.Cmdlets.Migrate.Models.Api20180110.IProviderSpecificFailoverInputInternal)__providerSpecificFailoverInput).InstanceType = value; } + public string InstanceType { get => ((Microsoft.Azure.PowerShell.Cmdlets.Migrate.Models.Api20180110.IProviderSpecificFailoverInputInternal)__providerSpecificFailoverInput).InstanceType; set => ((Microsoft.Azure.PowerShell.Cmdlets.Migrate.Models.Api20180110.IProviderSpecificFailoverInputInternal)__providerSpecificFailoverInput).InstanceType = value ?? null; } /// Backing field for property. private string _primaryKekCertificatePfx; diff --git a/src/Migrate/generated/api/Models/Api20180110/HyperVReplicaAzurePolicyInput.cs b/src/Migrate/generated/api/Models/Api20180110/HyperVReplicaAzurePolicyInput.cs index 4f8ff4c2964e..034b02879028 100644 --- a/src/Migrate/generated/api/Models/Api20180110/HyperVReplicaAzurePolicyInput.cs +++ b/src/Migrate/generated/api/Models/Api20180110/HyperVReplicaAzurePolicyInput.cs @@ -27,7 +27,7 @@ public partial class HyperVReplicaAzurePolicyInput : /// The class type. [Microsoft.Azure.PowerShell.Cmdlets.Migrate.Origin(Microsoft.Azure.PowerShell.Cmdlets.Migrate.PropertyOrigin.Inherited)] - public string InstanceType { get => ((Microsoft.Azure.PowerShell.Cmdlets.Migrate.Models.Api20180110.IPolicyProviderSpecificInputInternal)__policyProviderSpecificInput).InstanceType; set => ((Microsoft.Azure.PowerShell.Cmdlets.Migrate.Models.Api20180110.IPolicyProviderSpecificInputInternal)__policyProviderSpecificInput).InstanceType = value; } + public string InstanceType { get => ((Microsoft.Azure.PowerShell.Cmdlets.Migrate.Models.Api20180110.IPolicyProviderSpecificInputInternal)__policyProviderSpecificInput).InstanceType; set => ((Microsoft.Azure.PowerShell.Cmdlets.Migrate.Models.Api20180110.IPolicyProviderSpecificInputInternal)__policyProviderSpecificInput).InstanceType = value ?? null; } /// Backing field for property. private string _onlineReplicationStartTime; diff --git a/src/Migrate/generated/api/Models/Api20180110/HyperVReplicaAzureReprotectInput.cs b/src/Migrate/generated/api/Models/Api20180110/HyperVReplicaAzureReprotectInput.cs index ed052fa04305..51a6fd263763 100644 --- a/src/Migrate/generated/api/Models/Api20180110/HyperVReplicaAzureReprotectInput.cs +++ b/src/Migrate/generated/api/Models/Api20180110/HyperVReplicaAzureReprotectInput.cs @@ -23,7 +23,7 @@ public partial class HyperVReplicaAzureReprotectInput : /// The class type. [Microsoft.Azure.PowerShell.Cmdlets.Migrate.Origin(Microsoft.Azure.PowerShell.Cmdlets.Migrate.PropertyOrigin.Inherited)] - public string InstanceType { get => ((Microsoft.Azure.PowerShell.Cmdlets.Migrate.Models.Api20180110.IReverseReplicationProviderSpecificInputInternal)__reverseReplicationProviderSpecificInput).InstanceType; set => ((Microsoft.Azure.PowerShell.Cmdlets.Migrate.Models.Api20180110.IReverseReplicationProviderSpecificInputInternal)__reverseReplicationProviderSpecificInput).InstanceType = value; } + public string InstanceType { get => ((Microsoft.Azure.PowerShell.Cmdlets.Migrate.Models.Api20180110.IReverseReplicationProviderSpecificInputInternal)__reverseReplicationProviderSpecificInput).InstanceType; set => ((Microsoft.Azure.PowerShell.Cmdlets.Migrate.Models.Api20180110.IReverseReplicationProviderSpecificInputInternal)__reverseReplicationProviderSpecificInput).InstanceType = value ?? null; } /// Backing field for property. private string _logStorageAccountId; diff --git a/src/Migrate/generated/api/Models/Api20180110/HyperVReplicaAzureUpdateReplicationProtectedItemInput.cs b/src/Migrate/generated/api/Models/Api20180110/HyperVReplicaAzureUpdateReplicationProtectedItemInput.cs index 1243c969be0f..11d4582838ba 100644 --- a/src/Migrate/generated/api/Models/Api20180110/HyperVReplicaAzureUpdateReplicationProtectedItemInput.cs +++ b/src/Migrate/generated/api/Models/Api20180110/HyperVReplicaAzureUpdateReplicationProtectedItemInput.cs @@ -16,7 +16,7 @@ public partial class HyperVReplicaAzureUpdateReplicationProtectedItemInput : /// The class type. [Microsoft.Azure.PowerShell.Cmdlets.Migrate.Origin(Microsoft.Azure.PowerShell.Cmdlets.Migrate.PropertyOrigin.Inherited)] - public string InstanceType { get => ((Microsoft.Azure.PowerShell.Cmdlets.Migrate.Models.Api20180110.IUpdateReplicationProtectedItemProviderInputInternal)__updateReplicationProtectedItemProviderInput).InstanceType; set => ((Microsoft.Azure.PowerShell.Cmdlets.Migrate.Models.Api20180110.IUpdateReplicationProtectedItemProviderInputInternal)__updateReplicationProtectedItemProviderInput).InstanceType = value; } + public string InstanceType { get => ((Microsoft.Azure.PowerShell.Cmdlets.Migrate.Models.Api20180110.IUpdateReplicationProtectedItemProviderInputInternal)__updateReplicationProtectedItemProviderInput).InstanceType; set => ((Microsoft.Azure.PowerShell.Cmdlets.Migrate.Models.Api20180110.IUpdateReplicationProtectedItemProviderInputInternal)__updateReplicationProtectedItemProviderInput).InstanceType = value ?? null; } /// Backing field for property. private string _recoveryAzureV1ResourceGroupId; diff --git a/src/Migrate/generated/api/Models/Api20180110/HyperVReplicaBluePolicyInput.cs b/src/Migrate/generated/api/Models/Api20180110/HyperVReplicaBluePolicyInput.cs index 3c38783b546d..1ee33132f9c9 100644 --- a/src/Migrate/generated/api/Models/Api20180110/HyperVReplicaBluePolicyInput.cs +++ b/src/Migrate/generated/api/Models/Api20180110/HyperVReplicaBluePolicyInput.cs @@ -46,7 +46,7 @@ public partial class HyperVReplicaBluePolicyInput : /// The class type. [Microsoft.Azure.PowerShell.Cmdlets.Migrate.Origin(Microsoft.Azure.PowerShell.Cmdlets.Migrate.PropertyOrigin.Inherited)] - public string InstanceType { get => ((Microsoft.Azure.PowerShell.Cmdlets.Migrate.Models.Api20180110.IPolicyProviderSpecificInputInternal)__policyProviderSpecificInput).InstanceType; set => ((Microsoft.Azure.PowerShell.Cmdlets.Migrate.Models.Api20180110.IPolicyProviderSpecificInputInternal)__policyProviderSpecificInput).InstanceType = value; } + public string InstanceType { get => ((Microsoft.Azure.PowerShell.Cmdlets.Migrate.Models.Api20180110.IPolicyProviderSpecificInputInternal)__policyProviderSpecificInput).InstanceType; set => ((Microsoft.Azure.PowerShell.Cmdlets.Migrate.Models.Api20180110.IPolicyProviderSpecificInputInternal)__policyProviderSpecificInput).InstanceType = value ?? null; } /// Backing field for property. private string _offlineReplicationExportPath; diff --git a/src/Migrate/generated/api/Models/Api20180110/HyperVReplicaPolicyInput.cs b/src/Migrate/generated/api/Models/Api20180110/HyperVReplicaPolicyInput.cs index 2f9a7bd30539..610836e08689 100644 --- a/src/Migrate/generated/api/Models/Api20180110/HyperVReplicaPolicyInput.cs +++ b/src/Migrate/generated/api/Models/Api20180110/HyperVReplicaPolicyInput.cs @@ -46,7 +46,7 @@ public partial class HyperVReplicaPolicyInput : /// The class type. [Microsoft.Azure.PowerShell.Cmdlets.Migrate.Origin(Microsoft.Azure.PowerShell.Cmdlets.Migrate.PropertyOrigin.Inherited)] - public string InstanceType { get => ((Microsoft.Azure.PowerShell.Cmdlets.Migrate.Models.Api20180110.IPolicyProviderSpecificInputInternal)__policyProviderSpecificInput).InstanceType; set => ((Microsoft.Azure.PowerShell.Cmdlets.Migrate.Models.Api20180110.IPolicyProviderSpecificInputInternal)__policyProviderSpecificInput).InstanceType = value; } + public string InstanceType { get => ((Microsoft.Azure.PowerShell.Cmdlets.Migrate.Models.Api20180110.IPolicyProviderSpecificInputInternal)__policyProviderSpecificInput).InstanceType; set => ((Microsoft.Azure.PowerShell.Cmdlets.Migrate.Models.Api20180110.IPolicyProviderSpecificInputInternal)__policyProviderSpecificInput).InstanceType = value ?? null; } /// Backing field for property. private string _offlineReplicationExportPath; diff --git a/src/Migrate/generated/api/Models/Api20180110/InMageAzureV2ApplyRecoveryPointInput.cs b/src/Migrate/generated/api/Models/Api20180110/InMageAzureV2ApplyRecoveryPointInput.cs index d2f8ad23362b..f1b07dbcc80d 100644 --- a/src/Migrate/generated/api/Models/Api20180110/InMageAzureV2ApplyRecoveryPointInput.cs +++ b/src/Migrate/generated/api/Models/Api20180110/InMageAzureV2ApplyRecoveryPointInput.cs @@ -16,7 +16,7 @@ public partial class InMageAzureV2ApplyRecoveryPointInput : /// The class type. [Microsoft.Azure.PowerShell.Cmdlets.Migrate.Origin(Microsoft.Azure.PowerShell.Cmdlets.Migrate.PropertyOrigin.Inherited)] - public string InstanceType { get => ((Microsoft.Azure.PowerShell.Cmdlets.Migrate.Models.Api20180110.IApplyRecoveryPointProviderSpecificInputInternal)__applyRecoveryPointProviderSpecificInput).InstanceType; set => ((Microsoft.Azure.PowerShell.Cmdlets.Migrate.Models.Api20180110.IApplyRecoveryPointProviderSpecificInputInternal)__applyRecoveryPointProviderSpecificInput).InstanceType = value; } + public string InstanceType { get => ((Microsoft.Azure.PowerShell.Cmdlets.Migrate.Models.Api20180110.IApplyRecoveryPointProviderSpecificInputInternal)__applyRecoveryPointProviderSpecificInput).InstanceType; set => ((Microsoft.Azure.PowerShell.Cmdlets.Migrate.Models.Api20180110.IApplyRecoveryPointProviderSpecificInputInternal)__applyRecoveryPointProviderSpecificInput).InstanceType = value ?? null; } /// Backing field for property. private string _vaultLocation; diff --git a/src/Migrate/generated/api/Models/Api20180110/InMageAzureV2EnableProtectionInput.cs b/src/Migrate/generated/api/Models/Api20180110/InMageAzureV2EnableProtectionInput.cs index eeaf4e31a88f..8ca2b8c954a1 100644 --- a/src/Migrate/generated/api/Models/Api20180110/InMageAzureV2EnableProtectionInput.cs +++ b/src/Migrate/generated/api/Models/Api20180110/InMageAzureV2EnableProtectionInput.cs @@ -33,7 +33,7 @@ public partial class InMageAzureV2EnableProtectionInput : /// The class type. [Microsoft.Azure.PowerShell.Cmdlets.Migrate.Origin(Microsoft.Azure.PowerShell.Cmdlets.Migrate.PropertyOrigin.Inherited)] - public string InstanceType { get => ((Microsoft.Azure.PowerShell.Cmdlets.Migrate.Models.Api20180110.IEnableProtectionProviderSpecificInputInternal)__enableProtectionProviderSpecificInput).InstanceType; set => ((Microsoft.Azure.PowerShell.Cmdlets.Migrate.Models.Api20180110.IEnableProtectionProviderSpecificInputInternal)__enableProtectionProviderSpecificInput).InstanceType = value; } + public string InstanceType { get => ((Microsoft.Azure.PowerShell.Cmdlets.Migrate.Models.Api20180110.IEnableProtectionProviderSpecificInputInternal)__enableProtectionProviderSpecificInput).InstanceType; set => ((Microsoft.Azure.PowerShell.Cmdlets.Migrate.Models.Api20180110.IEnableProtectionProviderSpecificInputInternal)__enableProtectionProviderSpecificInput).InstanceType = value ?? null; } /// Backing field for property. private string _logStorageAccountId; diff --git a/src/Migrate/generated/api/Models/Api20180110/InMageAzureV2FailoverProviderInput.cs b/src/Migrate/generated/api/Models/Api20180110/InMageAzureV2FailoverProviderInput.cs index 5ccfa7fd7d88..f4f41b538a2b 100644 --- a/src/Migrate/generated/api/Models/Api20180110/InMageAzureV2FailoverProviderInput.cs +++ b/src/Migrate/generated/api/Models/Api20180110/InMageAzureV2FailoverProviderInput.cs @@ -16,7 +16,7 @@ public partial class InMageAzureV2FailoverProviderInput : /// The class type. [Microsoft.Azure.PowerShell.Cmdlets.Migrate.Origin(Microsoft.Azure.PowerShell.Cmdlets.Migrate.PropertyOrigin.Inherited)] - public string InstanceType { get => ((Microsoft.Azure.PowerShell.Cmdlets.Migrate.Models.Api20180110.IProviderSpecificFailoverInputInternal)__providerSpecificFailoverInput).InstanceType; set => ((Microsoft.Azure.PowerShell.Cmdlets.Migrate.Models.Api20180110.IProviderSpecificFailoverInputInternal)__providerSpecificFailoverInput).InstanceType = value; } + public string InstanceType { get => ((Microsoft.Azure.PowerShell.Cmdlets.Migrate.Models.Api20180110.IProviderSpecificFailoverInputInternal)__providerSpecificFailoverInput).InstanceType; set => ((Microsoft.Azure.PowerShell.Cmdlets.Migrate.Models.Api20180110.IProviderSpecificFailoverInputInternal)__providerSpecificFailoverInput).InstanceType = value ?? null; } /// Backing field for property. private string _recoveryPointId; diff --git a/src/Migrate/generated/api/Models/Api20180110/InMageAzureV2PolicyInput.cs b/src/Migrate/generated/api/Models/Api20180110/InMageAzureV2PolicyInput.cs index 57c688f443c3..60b740f77621 100644 --- a/src/Migrate/generated/api/Models/Api20180110/InMageAzureV2PolicyInput.cs +++ b/src/Migrate/generated/api/Models/Api20180110/InMageAzureV2PolicyInput.cs @@ -30,7 +30,7 @@ public partial class InMageAzureV2PolicyInput : /// The class type. [Microsoft.Azure.PowerShell.Cmdlets.Migrate.Origin(Microsoft.Azure.PowerShell.Cmdlets.Migrate.PropertyOrigin.Inherited)] - public string InstanceType { get => ((Microsoft.Azure.PowerShell.Cmdlets.Migrate.Models.Api20180110.IPolicyProviderSpecificInputInternal)__policyProviderSpecificInput).InstanceType; set => ((Microsoft.Azure.PowerShell.Cmdlets.Migrate.Models.Api20180110.IPolicyProviderSpecificInputInternal)__policyProviderSpecificInput).InstanceType = value; } + public string InstanceType { get => ((Microsoft.Azure.PowerShell.Cmdlets.Migrate.Models.Api20180110.IPolicyProviderSpecificInputInternal)__policyProviderSpecificInput).InstanceType; set => ((Microsoft.Azure.PowerShell.Cmdlets.Migrate.Models.Api20180110.IPolicyProviderSpecificInputInternal)__policyProviderSpecificInput).InstanceType = value ?? null; } /// Backing field for property. private Microsoft.Azure.PowerShell.Cmdlets.Migrate.Support.SetMultiVMSyncStatus _multiVMSyncStatus; diff --git a/src/Migrate/generated/api/Models/Api20180110/InMageAzureV2ReprotectInput.cs b/src/Migrate/generated/api/Models/Api20180110/InMageAzureV2ReprotectInput.cs index 0f7c71c346fa..749d99a9150a 100644 --- a/src/Migrate/generated/api/Models/Api20180110/InMageAzureV2ReprotectInput.cs +++ b/src/Migrate/generated/api/Models/Api20180110/InMageAzureV2ReprotectInput.cs @@ -23,7 +23,7 @@ public partial class InMageAzureV2ReprotectInput : /// The class type. [Microsoft.Azure.PowerShell.Cmdlets.Migrate.Origin(Microsoft.Azure.PowerShell.Cmdlets.Migrate.PropertyOrigin.Inherited)] - public string InstanceType { get => ((Microsoft.Azure.PowerShell.Cmdlets.Migrate.Models.Api20180110.IReverseReplicationProviderSpecificInputInternal)__reverseReplicationProviderSpecificInput).InstanceType; set => ((Microsoft.Azure.PowerShell.Cmdlets.Migrate.Models.Api20180110.IReverseReplicationProviderSpecificInputInternal)__reverseReplicationProviderSpecificInput).InstanceType = value; } + public string InstanceType { get => ((Microsoft.Azure.PowerShell.Cmdlets.Migrate.Models.Api20180110.IReverseReplicationProviderSpecificInputInternal)__reverseReplicationProviderSpecificInput).InstanceType; set => ((Microsoft.Azure.PowerShell.Cmdlets.Migrate.Models.Api20180110.IReverseReplicationProviderSpecificInputInternal)__reverseReplicationProviderSpecificInput).InstanceType = value ?? null; } /// Backing field for property. private string _logStorageAccountId; diff --git a/src/Migrate/generated/api/Models/Api20180110/InMageAzureV2UpdateReplicationProtectedItemInput.cs b/src/Migrate/generated/api/Models/Api20180110/InMageAzureV2UpdateReplicationProtectedItemInput.cs index caba440db2a8..3f8b1ff1bbe3 100644 --- a/src/Migrate/generated/api/Models/Api20180110/InMageAzureV2UpdateReplicationProtectedItemInput.cs +++ b/src/Migrate/generated/api/Models/Api20180110/InMageAzureV2UpdateReplicationProtectedItemInput.cs @@ -16,7 +16,7 @@ public partial class InMageAzureV2UpdateReplicationProtectedItemInput : /// The class type. [Microsoft.Azure.PowerShell.Cmdlets.Migrate.Origin(Microsoft.Azure.PowerShell.Cmdlets.Migrate.PropertyOrigin.Inherited)] - public string InstanceType { get => ((Microsoft.Azure.PowerShell.Cmdlets.Migrate.Models.Api20180110.IUpdateReplicationProtectedItemProviderInputInternal)__updateReplicationProtectedItemProviderInput).InstanceType; set => ((Microsoft.Azure.PowerShell.Cmdlets.Migrate.Models.Api20180110.IUpdateReplicationProtectedItemProviderInputInternal)__updateReplicationProtectedItemProviderInput).InstanceType = value; } + public string InstanceType { get => ((Microsoft.Azure.PowerShell.Cmdlets.Migrate.Models.Api20180110.IUpdateReplicationProtectedItemProviderInputInternal)__updateReplicationProtectedItemProviderInput).InstanceType; set => ((Microsoft.Azure.PowerShell.Cmdlets.Migrate.Models.Api20180110.IUpdateReplicationProtectedItemProviderInputInternal)__updateReplicationProtectedItemProviderInput).InstanceType = value ?? null; } /// Backing field for property. private string _recoveryAzureV1ResourceGroupId; diff --git a/src/Migrate/generated/api/Models/Api20180110/InMageDisableProtectionProviderSpecificInput.cs b/src/Migrate/generated/api/Models/Api20180110/InMageDisableProtectionProviderSpecificInput.cs index e76a6e68718a..d282771be922 100644 --- a/src/Migrate/generated/api/Models/Api20180110/InMageDisableProtectionProviderSpecificInput.cs +++ b/src/Migrate/generated/api/Models/Api20180110/InMageDisableProtectionProviderSpecificInput.cs @@ -16,7 +16,7 @@ public partial class InMageDisableProtectionProviderSpecificInput : /// The class type. [Microsoft.Azure.PowerShell.Cmdlets.Migrate.Origin(Microsoft.Azure.PowerShell.Cmdlets.Migrate.PropertyOrigin.Inherited)] - public string InstanceType { get => ((Microsoft.Azure.PowerShell.Cmdlets.Migrate.Models.Api20180110.IDisableProtectionProviderSpecificInputInternal)__disableProtectionProviderSpecificInput).InstanceType; set => ((Microsoft.Azure.PowerShell.Cmdlets.Migrate.Models.Api20180110.IDisableProtectionProviderSpecificInputInternal)__disableProtectionProviderSpecificInput).InstanceType = value; } + public string InstanceType { get => ((Microsoft.Azure.PowerShell.Cmdlets.Migrate.Models.Api20180110.IDisableProtectionProviderSpecificInputInternal)__disableProtectionProviderSpecificInput).InstanceType; set => ((Microsoft.Azure.PowerShell.Cmdlets.Migrate.Models.Api20180110.IDisableProtectionProviderSpecificInputInternal)__disableProtectionProviderSpecificInput).InstanceType = value ?? null; } /// Backing field for property. private string _replicaVMDeletionStatus; diff --git a/src/Migrate/generated/api/Models/Api20180110/InMageEnableProtectionInput.cs b/src/Migrate/generated/api/Models/Api20180110/InMageEnableProtectionInput.cs index cb667347f7af..01b9b4915097 100644 --- a/src/Migrate/generated/api/Models/Api20180110/InMageEnableProtectionInput.cs +++ b/src/Migrate/generated/api/Models/Api20180110/InMageEnableProtectionInput.cs @@ -45,7 +45,7 @@ public partial class InMageEnableProtectionInput : /// The class type. [Microsoft.Azure.PowerShell.Cmdlets.Migrate.Origin(Microsoft.Azure.PowerShell.Cmdlets.Migrate.PropertyOrigin.Inherited)] - public string InstanceType { get => ((Microsoft.Azure.PowerShell.Cmdlets.Migrate.Models.Api20180110.IEnableProtectionProviderSpecificInputInternal)__enableProtectionProviderSpecificInput).InstanceType; set => ((Microsoft.Azure.PowerShell.Cmdlets.Migrate.Models.Api20180110.IEnableProtectionProviderSpecificInputInternal)__enableProtectionProviderSpecificInput).InstanceType = value; } + public string InstanceType { get => ((Microsoft.Azure.PowerShell.Cmdlets.Migrate.Models.Api20180110.IEnableProtectionProviderSpecificInputInternal)__enableProtectionProviderSpecificInput).InstanceType; set => ((Microsoft.Azure.PowerShell.Cmdlets.Migrate.Models.Api20180110.IEnableProtectionProviderSpecificInputInternal)__enableProtectionProviderSpecificInput).InstanceType = value ?? null; } /// Backing field for property. private string _masterTargetId; diff --git a/src/Migrate/generated/api/Models/Api20180110/InMageFailoverProviderInput.cs b/src/Migrate/generated/api/Models/Api20180110/InMageFailoverProviderInput.cs index c65716ce2305..0c8914ca2475 100644 --- a/src/Migrate/generated/api/Models/Api20180110/InMageFailoverProviderInput.cs +++ b/src/Migrate/generated/api/Models/Api20180110/InMageFailoverProviderInput.cs @@ -16,7 +16,7 @@ public partial class InMageFailoverProviderInput : /// The class type. [Microsoft.Azure.PowerShell.Cmdlets.Migrate.Origin(Microsoft.Azure.PowerShell.Cmdlets.Migrate.PropertyOrigin.Inherited)] - public string InstanceType { get => ((Microsoft.Azure.PowerShell.Cmdlets.Migrate.Models.Api20180110.IProviderSpecificFailoverInputInternal)__providerSpecificFailoverInput).InstanceType; set => ((Microsoft.Azure.PowerShell.Cmdlets.Migrate.Models.Api20180110.IProviderSpecificFailoverInputInternal)__providerSpecificFailoverInput).InstanceType = value; } + public string InstanceType { get => ((Microsoft.Azure.PowerShell.Cmdlets.Migrate.Models.Api20180110.IProviderSpecificFailoverInputInternal)__providerSpecificFailoverInput).InstanceType; set => ((Microsoft.Azure.PowerShell.Cmdlets.Migrate.Models.Api20180110.IProviderSpecificFailoverInputInternal)__providerSpecificFailoverInput).InstanceType = value ?? null; } /// Backing field for property. private string _recoveryPointId; diff --git a/src/Migrate/generated/api/Models/Api20180110/InMagePolicyInput.cs b/src/Migrate/generated/api/Models/Api20180110/InMagePolicyInput.cs index fdb277f28307..d8f18ea8e0a1 100644 --- a/src/Migrate/generated/api/Models/Api20180110/InMagePolicyInput.cs +++ b/src/Migrate/generated/api/Models/Api20180110/InMagePolicyInput.cs @@ -23,7 +23,7 @@ public partial class InMagePolicyInput : /// The class type. [Microsoft.Azure.PowerShell.Cmdlets.Migrate.Origin(Microsoft.Azure.PowerShell.Cmdlets.Migrate.PropertyOrigin.Inherited)] - public string InstanceType { get => ((Microsoft.Azure.PowerShell.Cmdlets.Migrate.Models.Api20180110.IPolicyProviderSpecificInputInternal)__policyProviderSpecificInput).InstanceType; set => ((Microsoft.Azure.PowerShell.Cmdlets.Migrate.Models.Api20180110.IPolicyProviderSpecificInputInternal)__policyProviderSpecificInput).InstanceType = value; } + public string InstanceType { get => ((Microsoft.Azure.PowerShell.Cmdlets.Migrate.Models.Api20180110.IPolicyProviderSpecificInputInternal)__policyProviderSpecificInput).InstanceType; set => ((Microsoft.Azure.PowerShell.Cmdlets.Migrate.Models.Api20180110.IPolicyProviderSpecificInputInternal)__policyProviderSpecificInput).InstanceType = value ?? null; } /// Backing field for property. private Microsoft.Azure.PowerShell.Cmdlets.Migrate.Support.SetMultiVMSyncStatus _multiVMSyncStatus; diff --git a/src/Migrate/generated/api/Models/Api20180110/InMageReprotectInput.cs b/src/Migrate/generated/api/Models/Api20180110/InMageReprotectInput.cs index 18ba2781e713..82370426ea06 100644 --- a/src/Migrate/generated/api/Models/Api20180110/InMageReprotectInput.cs +++ b/src/Migrate/generated/api/Models/Api20180110/InMageReprotectInput.cs @@ -45,7 +45,7 @@ public partial class InMageReprotectInput : /// The class type. [Microsoft.Azure.PowerShell.Cmdlets.Migrate.Origin(Microsoft.Azure.PowerShell.Cmdlets.Migrate.PropertyOrigin.Inherited)] - public string InstanceType { get => ((Microsoft.Azure.PowerShell.Cmdlets.Migrate.Models.Api20180110.IReverseReplicationProviderSpecificInputInternal)__reverseReplicationProviderSpecificInput).InstanceType; set => ((Microsoft.Azure.PowerShell.Cmdlets.Migrate.Models.Api20180110.IReverseReplicationProviderSpecificInputInternal)__reverseReplicationProviderSpecificInput).InstanceType = value; } + public string InstanceType { get => ((Microsoft.Azure.PowerShell.Cmdlets.Migrate.Models.Api20180110.IReverseReplicationProviderSpecificInputInternal)__reverseReplicationProviderSpecificInput).InstanceType; set => ((Microsoft.Azure.PowerShell.Cmdlets.Migrate.Models.Api20180110.IReverseReplicationProviderSpecificInputInternal)__reverseReplicationProviderSpecificInput).InstanceType = value ?? null; } /// Backing field for property. private string _masterTargetId; diff --git a/src/Migrate/generated/api/Models/Api20180110/InlineWorkflowTaskDetails.cs b/src/Migrate/generated/api/Models/Api20180110/InlineWorkflowTaskDetails.cs index 7e84fa3d0a47..a19295993d2c 100644 --- a/src/Migrate/generated/api/Models/Api20180110/InlineWorkflowTaskDetails.cs +++ b/src/Migrate/generated/api/Models/Api20180110/InlineWorkflowTaskDetails.cs @@ -16,11 +16,11 @@ public partial class InlineWorkflowTaskDetails : /// The child tasks. [Microsoft.Azure.PowerShell.Cmdlets.Migrate.Origin(Microsoft.Azure.PowerShell.Cmdlets.Migrate.PropertyOrigin.Inherited)] - public Microsoft.Azure.PowerShell.Cmdlets.Migrate.Models.Api20180110.IAsrTask[] ChildTask { get => ((Microsoft.Azure.PowerShell.Cmdlets.Migrate.Models.Api20180110.IGroupTaskDetailsInternal)__groupTaskDetails).ChildTask; set => ((Microsoft.Azure.PowerShell.Cmdlets.Migrate.Models.Api20180110.IGroupTaskDetailsInternal)__groupTaskDetails).ChildTask = value; } + public Microsoft.Azure.PowerShell.Cmdlets.Migrate.Models.Api20180110.IAsrTask[] ChildTask { get => ((Microsoft.Azure.PowerShell.Cmdlets.Migrate.Models.Api20180110.IGroupTaskDetailsInternal)__groupTaskDetails).ChildTask; set => ((Microsoft.Azure.PowerShell.Cmdlets.Migrate.Models.Api20180110.IGroupTaskDetailsInternal)__groupTaskDetails).ChildTask = value ?? null /* arrayOf */; } /// The type of task details. [Microsoft.Azure.PowerShell.Cmdlets.Migrate.Origin(Microsoft.Azure.PowerShell.Cmdlets.Migrate.PropertyOrigin.Inherited)] - public string InstanceType { get => ((Microsoft.Azure.PowerShell.Cmdlets.Migrate.Models.Api20180110.IGroupTaskDetailsInternal)__groupTaskDetails).InstanceType; set => ((Microsoft.Azure.PowerShell.Cmdlets.Migrate.Models.Api20180110.IGroupTaskDetailsInternal)__groupTaskDetails).InstanceType = value; } + public string InstanceType { get => ((Microsoft.Azure.PowerShell.Cmdlets.Migrate.Models.Api20180110.IGroupTaskDetailsInternal)__groupTaskDetails).InstanceType; set => ((Microsoft.Azure.PowerShell.Cmdlets.Migrate.Models.Api20180110.IGroupTaskDetailsInternal)__groupTaskDetails).InstanceType = value ?? null; } /// Backing field for property. private string[] _workflowId; diff --git a/src/Migrate/generated/api/Models/Api20180110/Job.cs b/src/Migrate/generated/api/Models/Api20180110/Job.cs index e64c9145a6a2..381ed4a9c748 100644 --- a/src/Migrate/generated/api/Models/Api20180110/Job.cs +++ b/src/Migrate/generated/api/Models/Api20180110/Job.cs @@ -52,7 +52,7 @@ public partial class Job : /// Resource Location [Microsoft.Azure.PowerShell.Cmdlets.Migrate.Origin(Microsoft.Azure.PowerShell.Cmdlets.Migrate.PropertyOrigin.Inherited)] - public string Location { get => ((Microsoft.Azure.PowerShell.Cmdlets.Migrate.Models.Api20180110.IResourceInternal)__resource).Location; set => ((Microsoft.Azure.PowerShell.Cmdlets.Migrate.Models.Api20180110.IResourceInternal)__resource).Location = value; } + public string Location { get => ((Microsoft.Azure.PowerShell.Cmdlets.Migrate.Models.Api20180110.IResourceInternal)__resource).Location; set => ((Microsoft.Azure.PowerShell.Cmdlets.Migrate.Models.Api20180110.IResourceInternal)__resource).Location = value ?? null; } /// Internal Acessors for CustomDetail Microsoft.Azure.PowerShell.Cmdlets.Migrate.Models.Api20180110.IJobDetails Microsoft.Azure.PowerShell.Cmdlets.Migrate.Models.Api20180110.IJobInternal.CustomDetail { get => ((Microsoft.Azure.PowerShell.Cmdlets.Migrate.Models.Api20180110.IJobPropertiesAutoGeneratedInternal)Property).CustomDetail; set => ((Microsoft.Azure.PowerShell.Cmdlets.Migrate.Models.Api20180110.IJobPropertiesAutoGeneratedInternal)Property).CustomDetail = value; } diff --git a/src/Migrate/generated/api/Models/Api20180110/JobTaskDetails.cs b/src/Migrate/generated/api/Models/Api20180110/JobTaskDetails.cs index e5305368e369..e8fdb06ad0ee 100644 --- a/src/Migrate/generated/api/Models/Api20180110/JobTaskDetails.cs +++ b/src/Migrate/generated/api/Models/Api20180110/JobTaskDetails.cs @@ -18,7 +18,7 @@ public partial class JobTaskDetails : /// The type of task details. [Microsoft.Azure.PowerShell.Cmdlets.Migrate.Origin(Microsoft.Azure.PowerShell.Cmdlets.Migrate.PropertyOrigin.Inherited)] - public string InstanceType { get => ((Microsoft.Azure.PowerShell.Cmdlets.Migrate.Models.Api20180110.ITaskTypeDetailsInternal)__taskTypeDetails).InstanceType; set => ((Microsoft.Azure.PowerShell.Cmdlets.Migrate.Models.Api20180110.ITaskTypeDetailsInternal)__taskTypeDetails).InstanceType = value; } + public string InstanceType { get => ((Microsoft.Azure.PowerShell.Cmdlets.Migrate.Models.Api20180110.ITaskTypeDetailsInternal)__taskTypeDetails).InstanceType; set => ((Microsoft.Azure.PowerShell.Cmdlets.Migrate.Models.Api20180110.ITaskTypeDetailsInternal)__taskTypeDetails).InstanceType = value ?? null; } /// Backing field for property. private Microsoft.Azure.PowerShell.Cmdlets.Migrate.Models.Api20180110.IJobEntity _jobTask; diff --git a/src/Migrate/generated/api/Models/Api20180110/LogicalNetwork.cs b/src/Migrate/generated/api/Models/Api20180110/LogicalNetwork.cs index 979b1338d6a2..3260db98762d 100644 --- a/src/Migrate/generated/api/Models/Api20180110/LogicalNetwork.cs +++ b/src/Migrate/generated/api/Models/Api20180110/LogicalNetwork.cs @@ -28,7 +28,7 @@ public partial class LogicalNetwork : /// Resource Location [Microsoft.Azure.PowerShell.Cmdlets.Migrate.Origin(Microsoft.Azure.PowerShell.Cmdlets.Migrate.PropertyOrigin.Inherited)] - public string Location { get => ((Microsoft.Azure.PowerShell.Cmdlets.Migrate.Models.Api20180110.IResourceInternal)__resource).Location; set => ((Microsoft.Azure.PowerShell.Cmdlets.Migrate.Models.Api20180110.IResourceInternal)__resource).Location = value; } + public string Location { get => ((Microsoft.Azure.PowerShell.Cmdlets.Migrate.Models.Api20180110.IResourceInternal)__resource).Location; set => ((Microsoft.Azure.PowerShell.Cmdlets.Migrate.Models.Api20180110.IResourceInternal)__resource).Location = value ?? null; } /// Internal Acessors for Property Microsoft.Azure.PowerShell.Cmdlets.Migrate.Models.Api20180110.ILogicalNetworkProperties Microsoft.Azure.PowerShell.Cmdlets.Migrate.Models.Api20180110.ILogicalNetworkInternal.Property { get => (this._property = this._property ?? new Microsoft.Azure.PowerShell.Cmdlets.Migrate.Models.Api20180110.LogicalNetworkProperties()); set { {_property = value;} } } diff --git a/src/Migrate/generated/api/Models/Api20180110/ManualActionTaskDetails.cs b/src/Migrate/generated/api/Models/Api20180110/ManualActionTaskDetails.cs index f3de7e836159..129c614bc2ec 100644 --- a/src/Migrate/generated/api/Models/Api20180110/ManualActionTaskDetails.cs +++ b/src/Migrate/generated/api/Models/Api20180110/ManualActionTaskDetails.cs @@ -16,7 +16,7 @@ public partial class ManualActionTaskDetails : /// The type of task details. [Microsoft.Azure.PowerShell.Cmdlets.Migrate.Origin(Microsoft.Azure.PowerShell.Cmdlets.Migrate.PropertyOrigin.Inherited)] - public string InstanceType { get => ((Microsoft.Azure.PowerShell.Cmdlets.Migrate.Models.Api20180110.ITaskTypeDetailsInternal)__taskTypeDetails).InstanceType; set => ((Microsoft.Azure.PowerShell.Cmdlets.Migrate.Models.Api20180110.ITaskTypeDetailsInternal)__taskTypeDetails).InstanceType = value; } + public string InstanceType { get => ((Microsoft.Azure.PowerShell.Cmdlets.Migrate.Models.Api20180110.ITaskTypeDetailsInternal)__taskTypeDetails).InstanceType; set => ((Microsoft.Azure.PowerShell.Cmdlets.Migrate.Models.Api20180110.ITaskTypeDetailsInternal)__taskTypeDetails).InstanceType = value ?? null; } /// Backing field for property. private string _instruction; diff --git a/src/Migrate/generated/api/Models/Api20180110/MigrationItem.cs b/src/Migrate/generated/api/Models/Api20180110/MigrationItem.cs index 24710bd87966..347bfd72d25e 100644 --- a/src/Migrate/generated/api/Models/Api20180110/MigrationItem.cs +++ b/src/Migrate/generated/api/Models/Api20180110/MigrationItem.cs @@ -59,7 +59,7 @@ public partial class MigrationItem : /// Resource Location [Microsoft.Azure.PowerShell.Cmdlets.Migrate.Origin(Microsoft.Azure.PowerShell.Cmdlets.Migrate.PropertyOrigin.Inherited)] - public string Location { get => ((Microsoft.Azure.PowerShell.Cmdlets.Migrate.Models.Api20180110.IResourceInternal)__resource).Location; set => ((Microsoft.Azure.PowerShell.Cmdlets.Migrate.Models.Api20180110.IResourceInternal)__resource).Location = value; } + public string Location { get => ((Microsoft.Azure.PowerShell.Cmdlets.Migrate.Models.Api20180110.IResourceInternal)__resource).Location; set => ((Microsoft.Azure.PowerShell.Cmdlets.Migrate.Models.Api20180110.IResourceInternal)__resource).Location = value ?? null; } /// The on-premise virtual machine name. [Microsoft.Azure.PowerShell.Cmdlets.Migrate.Origin(Microsoft.Azure.PowerShell.Cmdlets.Migrate.PropertyOrigin.Inlined)] diff --git a/src/Migrate/generated/api/Models/Api20180110/MigrationRecoveryPoint.cs b/src/Migrate/generated/api/Models/Api20180110/MigrationRecoveryPoint.cs index ff1846ebb8f3..c531c1cf4a18 100644 --- a/src/Migrate/generated/api/Models/Api20180110/MigrationRecoveryPoint.cs +++ b/src/Migrate/generated/api/Models/Api20180110/MigrationRecoveryPoint.cs @@ -20,7 +20,7 @@ public partial class MigrationRecoveryPoint : /// Resource Location [Microsoft.Azure.PowerShell.Cmdlets.Migrate.Origin(Microsoft.Azure.PowerShell.Cmdlets.Migrate.PropertyOrigin.Inherited)] - public string Location { get => ((Microsoft.Azure.PowerShell.Cmdlets.Migrate.Models.Api20180110.IResourceInternal)__resource).Location; set => ((Microsoft.Azure.PowerShell.Cmdlets.Migrate.Models.Api20180110.IResourceInternal)__resource).Location = value; } + public string Location { get => ((Microsoft.Azure.PowerShell.Cmdlets.Migrate.Models.Api20180110.IResourceInternal)__resource).Location; set => ((Microsoft.Azure.PowerShell.Cmdlets.Migrate.Models.Api20180110.IResourceInternal)__resource).Location = value ?? null; } /// Internal Acessors for Property Microsoft.Azure.PowerShell.Cmdlets.Migrate.Models.Api20180110.IMigrationRecoveryPointProperties Microsoft.Azure.PowerShell.Cmdlets.Migrate.Models.Api20180110.IMigrationRecoveryPointInternal.Property { get => (this._property = this._property ?? new Microsoft.Azure.PowerShell.Cmdlets.Migrate.Models.Api20180110.MigrationRecoveryPointProperties()); set { {_property = value;} } } diff --git a/src/Migrate/generated/api/Models/Api20180110/Network.cs b/src/Migrate/generated/api/Models/Api20180110/Network.cs index c7cba8d2e80d..a6190444f202 100644 --- a/src/Migrate/generated/api/Models/Api20180110/Network.cs +++ b/src/Migrate/generated/api/Models/Api20180110/Network.cs @@ -28,7 +28,7 @@ public partial class Network : /// Resource Location [Microsoft.Azure.PowerShell.Cmdlets.Migrate.Origin(Microsoft.Azure.PowerShell.Cmdlets.Migrate.PropertyOrigin.Inherited)] - public string Location { get => ((Microsoft.Azure.PowerShell.Cmdlets.Migrate.Models.Api20180110.IResourceInternal)__resource).Location; set => ((Microsoft.Azure.PowerShell.Cmdlets.Migrate.Models.Api20180110.IResourceInternal)__resource).Location = value; } + public string Location { get => ((Microsoft.Azure.PowerShell.Cmdlets.Migrate.Models.Api20180110.IResourceInternal)__resource).Location; set => ((Microsoft.Azure.PowerShell.Cmdlets.Migrate.Models.Api20180110.IResourceInternal)__resource).Location = value ?? null; } /// Internal Acessors for Property Microsoft.Azure.PowerShell.Cmdlets.Migrate.Models.Api20180110.INetworkProperties Microsoft.Azure.PowerShell.Cmdlets.Migrate.Models.Api20180110.INetworkInternal.Property { get => (this._property = this._property ?? new Microsoft.Azure.PowerShell.Cmdlets.Migrate.Models.Api20180110.NetworkProperties()); set { {_property = value;} } } diff --git a/src/Migrate/generated/api/Models/Api20180110/NetworkMapping.cs b/src/Migrate/generated/api/Models/Api20180110/NetworkMapping.cs index 72f72065614c..d7e089539ca7 100644 --- a/src/Migrate/generated/api/Models/Api20180110/NetworkMapping.cs +++ b/src/Migrate/generated/api/Models/Api20180110/NetworkMapping.cs @@ -29,7 +29,7 @@ public partial class NetworkMapping : /// Resource Location [Microsoft.Azure.PowerShell.Cmdlets.Migrate.Origin(Microsoft.Azure.PowerShell.Cmdlets.Migrate.PropertyOrigin.Inherited)] - public string Location { get => ((Microsoft.Azure.PowerShell.Cmdlets.Migrate.Models.Api20180110.IResourceInternal)__resource).Location; set => ((Microsoft.Azure.PowerShell.Cmdlets.Migrate.Models.Api20180110.IResourceInternal)__resource).Location = value; } + public string Location { get => ((Microsoft.Azure.PowerShell.Cmdlets.Migrate.Models.Api20180110.IResourceInternal)__resource).Location; set => ((Microsoft.Azure.PowerShell.Cmdlets.Migrate.Models.Api20180110.IResourceInternal)__resource).Location = value ?? null; } /// Internal Acessors for FabricSpecificSetting Microsoft.Azure.PowerShell.Cmdlets.Migrate.Models.Api20180110.INetworkMappingFabricSpecificSettings Microsoft.Azure.PowerShell.Cmdlets.Migrate.Models.Api20180110.INetworkMappingInternal.FabricSpecificSetting { get => ((Microsoft.Azure.PowerShell.Cmdlets.Migrate.Models.Api20180110.INetworkMappingPropertiesInternal)Property).FabricSpecificSetting; set => ((Microsoft.Azure.PowerShell.Cmdlets.Migrate.Models.Api20180110.INetworkMappingPropertiesInternal)Property).FabricSpecificSetting = value; } diff --git a/src/Migrate/generated/api/Models/Api20180110/Policy.cs b/src/Migrate/generated/api/Models/Api20180110/Policy.cs index 4ed500e13a0a..de874b6dbd3a 100644 --- a/src/Migrate/generated/api/Models/Api20180110/Policy.cs +++ b/src/Migrate/generated/api/Models/Api20180110/Policy.cs @@ -24,7 +24,7 @@ public partial class Policy : /// Resource Location [Microsoft.Azure.PowerShell.Cmdlets.Migrate.Origin(Microsoft.Azure.PowerShell.Cmdlets.Migrate.PropertyOrigin.Inherited)] - public string Location { get => ((Microsoft.Azure.PowerShell.Cmdlets.Migrate.Models.Api20180110.IResourceInternal)__resource).Location; set => ((Microsoft.Azure.PowerShell.Cmdlets.Migrate.Models.Api20180110.IResourceInternal)__resource).Location = value; } + public string Location { get => ((Microsoft.Azure.PowerShell.Cmdlets.Migrate.Models.Api20180110.IResourceInternal)__resource).Location; set => ((Microsoft.Azure.PowerShell.Cmdlets.Migrate.Models.Api20180110.IResourceInternal)__resource).Location = value ?? null; } /// Internal Acessors for Property Microsoft.Azure.PowerShell.Cmdlets.Migrate.Models.Api20180110.IPolicyProperties Microsoft.Azure.PowerShell.Cmdlets.Migrate.Models.Api20180110.IPolicyInternal.Property { get => (this._property = this._property ?? new Microsoft.Azure.PowerShell.Cmdlets.Migrate.Models.Api20180110.PolicyProperties()); set { {_property = value;} } } diff --git a/src/Migrate/generated/api/Models/Api20180110/ProtectableItem.cs b/src/Migrate/generated/api/Models/Api20180110/ProtectableItem.cs index 2dd13ef1ec70..0d423d976610 100644 --- a/src/Migrate/generated/api/Models/Api20180110/ProtectableItem.cs +++ b/src/Migrate/generated/api/Models/Api20180110/ProtectableItem.cs @@ -28,7 +28,7 @@ public partial class ProtectableItem : /// Resource Location [Microsoft.Azure.PowerShell.Cmdlets.Migrate.Origin(Microsoft.Azure.PowerShell.Cmdlets.Migrate.PropertyOrigin.Inherited)] - public string Location { get => ((Microsoft.Azure.PowerShell.Cmdlets.Migrate.Models.Api20180110.IResourceInternal)__resource).Location; set => ((Microsoft.Azure.PowerShell.Cmdlets.Migrate.Models.Api20180110.IResourceInternal)__resource).Location = value; } + public string Location { get => ((Microsoft.Azure.PowerShell.Cmdlets.Migrate.Models.Api20180110.IResourceInternal)__resource).Location; set => ((Microsoft.Azure.PowerShell.Cmdlets.Migrate.Models.Api20180110.IResourceInternal)__resource).Location = value ?? null; } /// Internal Acessors for CustomDetail Microsoft.Azure.PowerShell.Cmdlets.Migrate.Models.Api20180110.IConfigurationSettings Microsoft.Azure.PowerShell.Cmdlets.Migrate.Models.Api20180110.IProtectableItemInternal.CustomDetail { get => ((Microsoft.Azure.PowerShell.Cmdlets.Migrate.Models.Api20180110.IProtectableItemPropertiesInternal)Property).CustomDetail; set => ((Microsoft.Azure.PowerShell.Cmdlets.Migrate.Models.Api20180110.IProtectableItemPropertiesInternal)Property).CustomDetail = value; } diff --git a/src/Migrate/generated/api/Models/Api20180110/ProtectionContainer.cs b/src/Migrate/generated/api/Models/Api20180110/ProtectionContainer.cs index 5c2f16203283..ac511b1311a7 100644 --- a/src/Migrate/generated/api/Models/Api20180110/ProtectionContainer.cs +++ b/src/Migrate/generated/api/Models/Api20180110/ProtectionContainer.cs @@ -36,7 +36,7 @@ public partial class ProtectionContainer : /// Resource Location [Microsoft.Azure.PowerShell.Cmdlets.Migrate.Origin(Microsoft.Azure.PowerShell.Cmdlets.Migrate.PropertyOrigin.Inherited)] - public string Location { get => ((Microsoft.Azure.PowerShell.Cmdlets.Migrate.Models.Api20180110.IResourceInternal)__resource).Location; set => ((Microsoft.Azure.PowerShell.Cmdlets.Migrate.Models.Api20180110.IResourceInternal)__resource).Location = value; } + public string Location { get => ((Microsoft.Azure.PowerShell.Cmdlets.Migrate.Models.Api20180110.IResourceInternal)__resource).Location; set => ((Microsoft.Azure.PowerShell.Cmdlets.Migrate.Models.Api20180110.IResourceInternal)__resource).Location = value ?? null; } /// Internal Acessors for FabricSpecificDetail Microsoft.Azure.PowerShell.Cmdlets.Migrate.Models.Api20180110.IProtectionContainerFabricSpecificDetails Microsoft.Azure.PowerShell.Cmdlets.Migrate.Models.Api20180110.IProtectionContainerInternal.FabricSpecificDetail { get => ((Microsoft.Azure.PowerShell.Cmdlets.Migrate.Models.Api20180110.IProtectionContainerPropertiesInternal)Property).FabricSpecificDetail; set => ((Microsoft.Azure.PowerShell.Cmdlets.Migrate.Models.Api20180110.IProtectionContainerPropertiesInternal)Property).FabricSpecificDetail = value; } diff --git a/src/Migrate/generated/api/Models/Api20180110/ProtectionContainerMapping.cs b/src/Migrate/generated/api/Models/Api20180110/ProtectionContainerMapping.cs index df7458f69531..8773e8f8fab6 100644 --- a/src/Migrate/generated/api/Models/Api20180110/ProtectionContainerMapping.cs +++ b/src/Migrate/generated/api/Models/Api20180110/ProtectionContainerMapping.cs @@ -28,7 +28,7 @@ public partial class ProtectionContainerMapping : /// Resource Location [Microsoft.Azure.PowerShell.Cmdlets.Migrate.Origin(Microsoft.Azure.PowerShell.Cmdlets.Migrate.PropertyOrigin.Inherited)] - public string Location { get => ((Microsoft.Azure.PowerShell.Cmdlets.Migrate.Models.Api20180110.IResourceInternal)__resource).Location; set => ((Microsoft.Azure.PowerShell.Cmdlets.Migrate.Models.Api20180110.IResourceInternal)__resource).Location = value; } + public string Location { get => ((Microsoft.Azure.PowerShell.Cmdlets.Migrate.Models.Api20180110.IResourceInternal)__resource).Location; set => ((Microsoft.Azure.PowerShell.Cmdlets.Migrate.Models.Api20180110.IResourceInternal)__resource).Location = value ?? null; } /// Internal Acessors for Property Microsoft.Azure.PowerShell.Cmdlets.Migrate.Models.Api20180110.IProtectionContainerMappingProperties Microsoft.Azure.PowerShell.Cmdlets.Migrate.Models.Api20180110.IProtectionContainerMappingInternal.Property { get => (this._property = this._property ?? new Microsoft.Azure.PowerShell.Cmdlets.Migrate.Models.Api20180110.ProtectionContainerMappingProperties()); set { {_property = value;} } } diff --git a/src/Migrate/generated/api/Models/Api20180110/RecoveryPlan.cs b/src/Migrate/generated/api/Models/Api20180110/RecoveryPlan.cs index 74b174ba83b0..0ee58f1e7ba8 100644 --- a/src/Migrate/generated/api/Models/Api20180110/RecoveryPlan.cs +++ b/src/Migrate/generated/api/Models/Api20180110/RecoveryPlan.cs @@ -68,7 +68,7 @@ public partial class RecoveryPlan : /// Resource Location [Microsoft.Azure.PowerShell.Cmdlets.Migrate.Origin(Microsoft.Azure.PowerShell.Cmdlets.Migrate.PropertyOrigin.Inherited)] - public string Location { get => ((Microsoft.Azure.PowerShell.Cmdlets.Migrate.Models.Api20180110.IResourceInternal)__resource).Location; set => ((Microsoft.Azure.PowerShell.Cmdlets.Migrate.Models.Api20180110.IResourceInternal)__resource).Location = value; } + public string Location { get => ((Microsoft.Azure.PowerShell.Cmdlets.Migrate.Models.Api20180110.IResourceInternal)__resource).Location; set => ((Microsoft.Azure.PowerShell.Cmdlets.Migrate.Models.Api20180110.IResourceInternal)__resource).Location = value ?? null; } /// Internal Acessors for CurrentScenario Microsoft.Azure.PowerShell.Cmdlets.Migrate.Models.Api20180110.ICurrentScenarioDetails Microsoft.Azure.PowerShell.Cmdlets.Migrate.Models.Api20180110.IRecoveryPlanInternal.CurrentScenario { get => ((Microsoft.Azure.PowerShell.Cmdlets.Migrate.Models.Api20180110.IRecoveryPlanPropertiesInternal)Property).CurrentScenario; set => ((Microsoft.Azure.PowerShell.Cmdlets.Migrate.Models.Api20180110.IRecoveryPlanPropertiesInternal)Property).CurrentScenario = value; } diff --git a/src/Migrate/generated/api/Models/Api20180110/RecoveryPlanA2AFailoverInput.cs b/src/Migrate/generated/api/Models/Api20180110/RecoveryPlanA2AFailoverInput.cs index 56053d55b962..9f07333b0879 100644 --- a/src/Migrate/generated/api/Models/Api20180110/RecoveryPlanA2AFailoverInput.cs +++ b/src/Migrate/generated/api/Models/Api20180110/RecoveryPlanA2AFailoverInput.cs @@ -23,7 +23,7 @@ public partial class RecoveryPlanA2AFailoverInput : /// The class type. [Microsoft.Azure.PowerShell.Cmdlets.Migrate.Origin(Microsoft.Azure.PowerShell.Cmdlets.Migrate.PropertyOrigin.Inherited)] - public string InstanceType { get => ((Microsoft.Azure.PowerShell.Cmdlets.Migrate.Models.Api20180110.IRecoveryPlanProviderSpecificFailoverInputInternal)__recoveryPlanProviderSpecificFailoverInput).InstanceType; set => ((Microsoft.Azure.PowerShell.Cmdlets.Migrate.Models.Api20180110.IRecoveryPlanProviderSpecificFailoverInputInternal)__recoveryPlanProviderSpecificFailoverInput).InstanceType = value; } + public string InstanceType { get => ((Microsoft.Azure.PowerShell.Cmdlets.Migrate.Models.Api20180110.IRecoveryPlanProviderSpecificFailoverInputInternal)__recoveryPlanProviderSpecificFailoverInput).InstanceType; set => ((Microsoft.Azure.PowerShell.Cmdlets.Migrate.Models.Api20180110.IRecoveryPlanProviderSpecificFailoverInputInternal)__recoveryPlanProviderSpecificFailoverInput).InstanceType = value ?? null; } /// Backing field for property. private Microsoft.Azure.PowerShell.Cmdlets.Migrate.Support.MultiVMSyncPointOption? _multiVMSyncPointOption; diff --git a/src/Migrate/generated/api/Models/Api20180110/RecoveryPlanGroupTaskDetails.cs b/src/Migrate/generated/api/Models/Api20180110/RecoveryPlanGroupTaskDetails.cs index dd8621926a9d..00ec705d203f 100644 --- a/src/Migrate/generated/api/Models/Api20180110/RecoveryPlanGroupTaskDetails.cs +++ b/src/Migrate/generated/api/Models/Api20180110/RecoveryPlanGroupTaskDetails.cs @@ -16,7 +16,7 @@ public partial class RecoveryPlanGroupTaskDetails : /// The child tasks. [Microsoft.Azure.PowerShell.Cmdlets.Migrate.Origin(Microsoft.Azure.PowerShell.Cmdlets.Migrate.PropertyOrigin.Inherited)] - public Microsoft.Azure.PowerShell.Cmdlets.Migrate.Models.Api20180110.IAsrTask[] ChildTask { get => ((Microsoft.Azure.PowerShell.Cmdlets.Migrate.Models.Api20180110.IGroupTaskDetailsInternal)__groupTaskDetails).ChildTask; set => ((Microsoft.Azure.PowerShell.Cmdlets.Migrate.Models.Api20180110.IGroupTaskDetailsInternal)__groupTaskDetails).ChildTask = value; } + public Microsoft.Azure.PowerShell.Cmdlets.Migrate.Models.Api20180110.IAsrTask[] ChildTask { get => ((Microsoft.Azure.PowerShell.Cmdlets.Migrate.Models.Api20180110.IGroupTaskDetailsInternal)__groupTaskDetails).ChildTask; set => ((Microsoft.Azure.PowerShell.Cmdlets.Migrate.Models.Api20180110.IGroupTaskDetailsInternal)__groupTaskDetails).ChildTask = value ?? null /* arrayOf */; } /// Backing field for property. private string _groupId; @@ -27,7 +27,7 @@ public partial class RecoveryPlanGroupTaskDetails : /// The type of task details. [Microsoft.Azure.PowerShell.Cmdlets.Migrate.Origin(Microsoft.Azure.PowerShell.Cmdlets.Migrate.PropertyOrigin.Inherited)] - public string InstanceType { get => ((Microsoft.Azure.PowerShell.Cmdlets.Migrate.Models.Api20180110.IGroupTaskDetailsInternal)__groupTaskDetails).InstanceType; set => ((Microsoft.Azure.PowerShell.Cmdlets.Migrate.Models.Api20180110.IGroupTaskDetailsInternal)__groupTaskDetails).InstanceType = value; } + public string InstanceType { get => ((Microsoft.Azure.PowerShell.Cmdlets.Migrate.Models.Api20180110.IGroupTaskDetailsInternal)__groupTaskDetails).InstanceType; set => ((Microsoft.Azure.PowerShell.Cmdlets.Migrate.Models.Api20180110.IGroupTaskDetailsInternal)__groupTaskDetails).InstanceType = value ?? null; } /// Backing field for property. private string _name; diff --git a/src/Migrate/generated/api/Models/Api20180110/RecoveryPlanHyperVReplicaAzureFailbackInput.cs b/src/Migrate/generated/api/Models/Api20180110/RecoveryPlanHyperVReplicaAzureFailbackInput.cs index dca8436dfb80..2a5019bb72fc 100644 --- a/src/Migrate/generated/api/Models/Api20180110/RecoveryPlanHyperVReplicaAzureFailbackInput.cs +++ b/src/Migrate/generated/api/Models/Api20180110/RecoveryPlanHyperVReplicaAzureFailbackInput.cs @@ -23,7 +23,7 @@ public partial class RecoveryPlanHyperVReplicaAzureFailbackInput : /// The class type. [Microsoft.Azure.PowerShell.Cmdlets.Migrate.Origin(Microsoft.Azure.PowerShell.Cmdlets.Migrate.PropertyOrigin.Inherited)] - public string InstanceType { get => ((Microsoft.Azure.PowerShell.Cmdlets.Migrate.Models.Api20180110.IRecoveryPlanProviderSpecificFailoverInputInternal)__recoveryPlanProviderSpecificFailoverInput).InstanceType; set => ((Microsoft.Azure.PowerShell.Cmdlets.Migrate.Models.Api20180110.IRecoveryPlanProviderSpecificFailoverInputInternal)__recoveryPlanProviderSpecificFailoverInput).InstanceType = value; } + public string InstanceType { get => ((Microsoft.Azure.PowerShell.Cmdlets.Migrate.Models.Api20180110.IRecoveryPlanProviderSpecificFailoverInputInternal)__recoveryPlanProviderSpecificFailoverInput).InstanceType; set => ((Microsoft.Azure.PowerShell.Cmdlets.Migrate.Models.Api20180110.IRecoveryPlanProviderSpecificFailoverInputInternal)__recoveryPlanProviderSpecificFailoverInput).InstanceType = value ?? null; } /// Backing field for property. private Microsoft.Azure.PowerShell.Cmdlets.Migrate.Support.AlternateLocationRecoveryOption _recoveryVMCreationOption; diff --git a/src/Migrate/generated/api/Models/Api20180110/RecoveryPlanHyperVReplicaAzureFailoverInput.cs b/src/Migrate/generated/api/Models/Api20180110/RecoveryPlanHyperVReplicaAzureFailoverInput.cs index 06890dd44be8..205ef5f8d9f6 100644 --- a/src/Migrate/generated/api/Models/Api20180110/RecoveryPlanHyperVReplicaAzureFailoverInput.cs +++ b/src/Migrate/generated/api/Models/Api20180110/RecoveryPlanHyperVReplicaAzureFailoverInput.cs @@ -16,7 +16,7 @@ public partial class RecoveryPlanHyperVReplicaAzureFailoverInput : /// The class type. [Microsoft.Azure.PowerShell.Cmdlets.Migrate.Origin(Microsoft.Azure.PowerShell.Cmdlets.Migrate.PropertyOrigin.Inherited)] - public string InstanceType { get => ((Microsoft.Azure.PowerShell.Cmdlets.Migrate.Models.Api20180110.IRecoveryPlanProviderSpecificFailoverInputInternal)__recoveryPlanProviderSpecificFailoverInput).InstanceType; set => ((Microsoft.Azure.PowerShell.Cmdlets.Migrate.Models.Api20180110.IRecoveryPlanProviderSpecificFailoverInputInternal)__recoveryPlanProviderSpecificFailoverInput).InstanceType = value; } + public string InstanceType { get => ((Microsoft.Azure.PowerShell.Cmdlets.Migrate.Models.Api20180110.IRecoveryPlanProviderSpecificFailoverInputInternal)__recoveryPlanProviderSpecificFailoverInput).InstanceType; set => ((Microsoft.Azure.PowerShell.Cmdlets.Migrate.Models.Api20180110.IRecoveryPlanProviderSpecificFailoverInputInternal)__recoveryPlanProviderSpecificFailoverInput).InstanceType = value ?? null; } /// Backing field for property. private string _primaryKekCertificatePfx; diff --git a/src/Migrate/generated/api/Models/Api20180110/RecoveryPlanInMageAzureV2FailoverInput.cs b/src/Migrate/generated/api/Models/Api20180110/RecoveryPlanInMageAzureV2FailoverInput.cs index 65582a9560ee..cc1028ea705f 100644 --- a/src/Migrate/generated/api/Models/Api20180110/RecoveryPlanInMageAzureV2FailoverInput.cs +++ b/src/Migrate/generated/api/Models/Api20180110/RecoveryPlanInMageAzureV2FailoverInput.cs @@ -16,7 +16,7 @@ public partial class RecoveryPlanInMageAzureV2FailoverInput : /// The class type. [Microsoft.Azure.PowerShell.Cmdlets.Migrate.Origin(Microsoft.Azure.PowerShell.Cmdlets.Migrate.PropertyOrigin.Inherited)] - public string InstanceType { get => ((Microsoft.Azure.PowerShell.Cmdlets.Migrate.Models.Api20180110.IRecoveryPlanProviderSpecificFailoverInputInternal)__recoveryPlanProviderSpecificFailoverInput).InstanceType; set => ((Microsoft.Azure.PowerShell.Cmdlets.Migrate.Models.Api20180110.IRecoveryPlanProviderSpecificFailoverInputInternal)__recoveryPlanProviderSpecificFailoverInput).InstanceType = value; } + public string InstanceType { get => ((Microsoft.Azure.PowerShell.Cmdlets.Migrate.Models.Api20180110.IRecoveryPlanProviderSpecificFailoverInputInternal)__recoveryPlanProviderSpecificFailoverInput).InstanceType; set => ((Microsoft.Azure.PowerShell.Cmdlets.Migrate.Models.Api20180110.IRecoveryPlanProviderSpecificFailoverInputInternal)__recoveryPlanProviderSpecificFailoverInput).InstanceType = value ?? null; } /// Backing field for property. private Microsoft.Azure.PowerShell.Cmdlets.Migrate.Support.InMageV2RpRecoveryPointType _recoveryPointType; diff --git a/src/Migrate/generated/api/Models/Api20180110/RecoveryPlanInMageFailoverInput.cs b/src/Migrate/generated/api/Models/Api20180110/RecoveryPlanInMageFailoverInput.cs index 989ae6f6d6bf..aec6198f3c4e 100644 --- a/src/Migrate/generated/api/Models/Api20180110/RecoveryPlanInMageFailoverInput.cs +++ b/src/Migrate/generated/api/Models/Api20180110/RecoveryPlanInMageFailoverInput.cs @@ -16,7 +16,7 @@ public partial class RecoveryPlanInMageFailoverInput : /// The class type. [Microsoft.Azure.PowerShell.Cmdlets.Migrate.Origin(Microsoft.Azure.PowerShell.Cmdlets.Migrate.PropertyOrigin.Inherited)] - public string InstanceType { get => ((Microsoft.Azure.PowerShell.Cmdlets.Migrate.Models.Api20180110.IRecoveryPlanProviderSpecificFailoverInputInternal)__recoveryPlanProviderSpecificFailoverInput).InstanceType; set => ((Microsoft.Azure.PowerShell.Cmdlets.Migrate.Models.Api20180110.IRecoveryPlanProviderSpecificFailoverInputInternal)__recoveryPlanProviderSpecificFailoverInput).InstanceType = value; } + public string InstanceType { get => ((Microsoft.Azure.PowerShell.Cmdlets.Migrate.Models.Api20180110.IRecoveryPlanProviderSpecificFailoverInputInternal)__recoveryPlanProviderSpecificFailoverInput).InstanceType; set => ((Microsoft.Azure.PowerShell.Cmdlets.Migrate.Models.Api20180110.IRecoveryPlanProviderSpecificFailoverInputInternal)__recoveryPlanProviderSpecificFailoverInput).InstanceType = value ?? null; } /// Backing field for property. private Microsoft.Azure.PowerShell.Cmdlets.Migrate.Support.RpInMageRecoveryPointType _recoveryPointType; diff --git a/src/Migrate/generated/api/Models/Api20180110/RecoveryPlanShutdownGroupTaskDetails.cs b/src/Migrate/generated/api/Models/Api20180110/RecoveryPlanShutdownGroupTaskDetails.cs index d29ef07b3015..b7486f32d729 100644 --- a/src/Migrate/generated/api/Models/Api20180110/RecoveryPlanShutdownGroupTaskDetails.cs +++ b/src/Migrate/generated/api/Models/Api20180110/RecoveryPlanShutdownGroupTaskDetails.cs @@ -16,7 +16,7 @@ public partial class RecoveryPlanShutdownGroupTaskDetails : /// The child tasks. [Microsoft.Azure.PowerShell.Cmdlets.Migrate.Origin(Microsoft.Azure.PowerShell.Cmdlets.Migrate.PropertyOrigin.Inherited)] - public Microsoft.Azure.PowerShell.Cmdlets.Migrate.Models.Api20180110.IAsrTask[] ChildTask { get => ((Microsoft.Azure.PowerShell.Cmdlets.Migrate.Models.Api20180110.IGroupTaskDetailsInternal)__groupTaskDetails).ChildTask; set => ((Microsoft.Azure.PowerShell.Cmdlets.Migrate.Models.Api20180110.IGroupTaskDetailsInternal)__groupTaskDetails).ChildTask = value; } + public Microsoft.Azure.PowerShell.Cmdlets.Migrate.Models.Api20180110.IAsrTask[] ChildTask { get => ((Microsoft.Azure.PowerShell.Cmdlets.Migrate.Models.Api20180110.IGroupTaskDetailsInternal)__groupTaskDetails).ChildTask; set => ((Microsoft.Azure.PowerShell.Cmdlets.Migrate.Models.Api20180110.IGroupTaskDetailsInternal)__groupTaskDetails).ChildTask = value ?? null /* arrayOf */; } /// Backing field for property. private string _groupId; @@ -27,7 +27,7 @@ public partial class RecoveryPlanShutdownGroupTaskDetails : /// The type of task details. [Microsoft.Azure.PowerShell.Cmdlets.Migrate.Origin(Microsoft.Azure.PowerShell.Cmdlets.Migrate.PropertyOrigin.Inherited)] - public string InstanceType { get => ((Microsoft.Azure.PowerShell.Cmdlets.Migrate.Models.Api20180110.IGroupTaskDetailsInternal)__groupTaskDetails).InstanceType; set => ((Microsoft.Azure.PowerShell.Cmdlets.Migrate.Models.Api20180110.IGroupTaskDetailsInternal)__groupTaskDetails).InstanceType = value; } + public string InstanceType { get => ((Microsoft.Azure.PowerShell.Cmdlets.Migrate.Models.Api20180110.IGroupTaskDetailsInternal)__groupTaskDetails).InstanceType; set => ((Microsoft.Azure.PowerShell.Cmdlets.Migrate.Models.Api20180110.IGroupTaskDetailsInternal)__groupTaskDetails).InstanceType = value ?? null; } /// Backing field for property. private string _name; diff --git a/src/Migrate/generated/api/Models/Api20180110/RecoveryPoint.cs b/src/Migrate/generated/api/Models/Api20180110/RecoveryPoint.cs index 4fe2fb35f0cf..41c349830029 100644 --- a/src/Migrate/generated/api/Models/Api20180110/RecoveryPoint.cs +++ b/src/Migrate/generated/api/Models/Api20180110/RecoveryPoint.cs @@ -20,7 +20,7 @@ public partial class RecoveryPoint : /// Resource Location [Microsoft.Azure.PowerShell.Cmdlets.Migrate.Origin(Microsoft.Azure.PowerShell.Cmdlets.Migrate.PropertyOrigin.Inherited)] - public string Location { get => ((Microsoft.Azure.PowerShell.Cmdlets.Migrate.Models.Api20180110.IResourceInternal)__resource).Location; set => ((Microsoft.Azure.PowerShell.Cmdlets.Migrate.Models.Api20180110.IResourceInternal)__resource).Location = value; } + public string Location { get => ((Microsoft.Azure.PowerShell.Cmdlets.Migrate.Models.Api20180110.IResourceInternal)__resource).Location; set => ((Microsoft.Azure.PowerShell.Cmdlets.Migrate.Models.Api20180110.IResourceInternal)__resource).Location = value ?? null; } /// Internal Acessors for Property Microsoft.Azure.PowerShell.Cmdlets.Migrate.Models.Api20180110.IRecoveryPointProperties Microsoft.Azure.PowerShell.Cmdlets.Migrate.Models.Api20180110.IRecoveryPointInternal.Property { get => (this._property = this._property ?? new Microsoft.Azure.PowerShell.Cmdlets.Migrate.Models.Api20180110.RecoveryPointProperties()); set { {_property = value;} } } diff --git a/src/Migrate/generated/api/Models/Api20180110/RecoveryServicesProvider.cs b/src/Migrate/generated/api/Models/Api20180110/RecoveryServicesProvider.cs index 725ea18138f2..2df96dad3846 100644 --- a/src/Migrate/generated/api/Models/Api20180110/RecoveryServicesProvider.cs +++ b/src/Migrate/generated/api/Models/Api20180110/RecoveryServicesProvider.cs @@ -84,7 +84,7 @@ public partial class RecoveryServicesProvider : /// Resource Location [Microsoft.Azure.PowerShell.Cmdlets.Migrate.Origin(Microsoft.Azure.PowerShell.Cmdlets.Migrate.PropertyOrigin.Inherited)] - public string Location { get => ((Microsoft.Azure.PowerShell.Cmdlets.Migrate.Models.Api20180110.IResourceInternal)__resource).Location; set => ((Microsoft.Azure.PowerShell.Cmdlets.Migrate.Models.Api20180110.IResourceInternal)__resource).Location = value; } + public string Location { get => ((Microsoft.Azure.PowerShell.Cmdlets.Migrate.Models.Api20180110.IResourceInternal)__resource).Location; set => ((Microsoft.Azure.PowerShell.Cmdlets.Migrate.Models.Api20180110.IResourceInternal)__resource).Location = value ?? null; } /// Internal Acessors for AuthenticationIdentityDetail Microsoft.Azure.PowerShell.Cmdlets.Migrate.Models.Api20180110.IIdentityProviderDetails Microsoft.Azure.PowerShell.Cmdlets.Migrate.Models.Api20180110.IRecoveryServicesProviderInternal.AuthenticationIdentityDetail { get => ((Microsoft.Azure.PowerShell.Cmdlets.Migrate.Models.Api20180110.IRecoveryServicesProviderPropertiesInternal)Property).AuthenticationIdentityDetail; set => ((Microsoft.Azure.PowerShell.Cmdlets.Migrate.Models.Api20180110.IRecoveryServicesProviderPropertiesInternal)Property).AuthenticationIdentityDetail = value; } diff --git a/src/Migrate/generated/api/Models/Api20180110/ReplicationProtectedItem.cs b/src/Migrate/generated/api/Models/Api20180110/ReplicationProtectedItem.cs index 0fdf7b4bde02..975a7dfabff3 100644 --- a/src/Migrate/generated/api/Models/Api20180110/ReplicationProtectedItem.cs +++ b/src/Migrate/generated/api/Models/Api20180110/ReplicationProtectedItem.cs @@ -64,7 +64,7 @@ public partial class ReplicationProtectedItem : /// Resource Location [Microsoft.Azure.PowerShell.Cmdlets.Migrate.Origin(Microsoft.Azure.PowerShell.Cmdlets.Migrate.PropertyOrigin.Inherited)] - public string Location { get => ((Microsoft.Azure.PowerShell.Cmdlets.Migrate.Models.Api20180110.IResourceInternal)__resource).Location; set => ((Microsoft.Azure.PowerShell.Cmdlets.Migrate.Models.Api20180110.IResourceInternal)__resource).Location = value; } + public string Location { get => ((Microsoft.Azure.PowerShell.Cmdlets.Migrate.Models.Api20180110.IResourceInternal)__resource).Location; set => ((Microsoft.Azure.PowerShell.Cmdlets.Migrate.Models.Api20180110.IResourceInternal)__resource).Location = value ?? null; } /// Internal Acessors for CurrentScenario Microsoft.Azure.PowerShell.Cmdlets.Migrate.Models.Api20180110.ICurrentScenarioDetails Microsoft.Azure.PowerShell.Cmdlets.Migrate.Models.Api20180110.IReplicationProtectedItemInternal.CurrentScenario { get => ((Microsoft.Azure.PowerShell.Cmdlets.Migrate.Models.Api20180110.IReplicationProtectedItemPropertiesInternal)Property).CurrentScenario; set => ((Microsoft.Azure.PowerShell.Cmdlets.Migrate.Models.Api20180110.IReplicationProtectedItemPropertiesInternal)Property).CurrentScenario = value; } diff --git a/src/Migrate/generated/api/Models/Api20180110/SanEnableProtectionInput.cs b/src/Migrate/generated/api/Models/Api20180110/SanEnableProtectionInput.cs index e5d45fe2e272..94a5d260f91c 100644 --- a/src/Migrate/generated/api/Models/Api20180110/SanEnableProtectionInput.cs +++ b/src/Migrate/generated/api/Models/Api20180110/SanEnableProtectionInput.cs @@ -16,7 +16,7 @@ public partial class SanEnableProtectionInput : /// The class type. [Microsoft.Azure.PowerShell.Cmdlets.Migrate.Origin(Microsoft.Azure.PowerShell.Cmdlets.Migrate.PropertyOrigin.Inherited)] - public string InstanceType { get => ((Microsoft.Azure.PowerShell.Cmdlets.Migrate.Models.Api20180110.IEnableProtectionProviderSpecificInputInternal)__enableProtectionProviderSpecificInput).InstanceType; set => ((Microsoft.Azure.PowerShell.Cmdlets.Migrate.Models.Api20180110.IEnableProtectionProviderSpecificInputInternal)__enableProtectionProviderSpecificInput).InstanceType = value; } + public string InstanceType { get => ((Microsoft.Azure.PowerShell.Cmdlets.Migrate.Models.Api20180110.IEnableProtectionProviderSpecificInputInternal)__enableProtectionProviderSpecificInput).InstanceType; set => ((Microsoft.Azure.PowerShell.Cmdlets.Migrate.Models.Api20180110.IEnableProtectionProviderSpecificInputInternal)__enableProtectionProviderSpecificInput).InstanceType = value ?? null; } /// Creates an new instance. public SanEnableProtectionInput() diff --git a/src/Migrate/generated/api/Models/Api20180110/ScriptActionTaskDetails.cs b/src/Migrate/generated/api/Models/Api20180110/ScriptActionTaskDetails.cs index c189e5102800..87f3187319e7 100644 --- a/src/Migrate/generated/api/Models/Api20180110/ScriptActionTaskDetails.cs +++ b/src/Migrate/generated/api/Models/Api20180110/ScriptActionTaskDetails.cs @@ -16,7 +16,7 @@ public partial class ScriptActionTaskDetails : /// The type of task details. [Microsoft.Azure.PowerShell.Cmdlets.Migrate.Origin(Microsoft.Azure.PowerShell.Cmdlets.Migrate.PropertyOrigin.Inherited)] - public string InstanceType { get => ((Microsoft.Azure.PowerShell.Cmdlets.Migrate.Models.Api20180110.ITaskTypeDetailsInternal)__taskTypeDetails).InstanceType; set => ((Microsoft.Azure.PowerShell.Cmdlets.Migrate.Models.Api20180110.ITaskTypeDetailsInternal)__taskTypeDetails).InstanceType = value; } + public string InstanceType { get => ((Microsoft.Azure.PowerShell.Cmdlets.Migrate.Models.Api20180110.ITaskTypeDetailsInternal)__taskTypeDetails).InstanceType; set => ((Microsoft.Azure.PowerShell.Cmdlets.Migrate.Models.Api20180110.ITaskTypeDetailsInternal)__taskTypeDetails).InstanceType = value ?? null; } /// Backing field for property. private bool? _isPrimarySideScript; diff --git a/src/Migrate/generated/api/Models/Api20180110/StorageClassification.cs b/src/Migrate/generated/api/Models/Api20180110/StorageClassification.cs index 5214df8267e8..6bd69f5b6f69 100644 --- a/src/Migrate/generated/api/Models/Api20180110/StorageClassification.cs +++ b/src/Migrate/generated/api/Models/Api20180110/StorageClassification.cs @@ -24,7 +24,7 @@ public partial class StorageClassification : /// Resource Location [Microsoft.Azure.PowerShell.Cmdlets.Migrate.Origin(Microsoft.Azure.PowerShell.Cmdlets.Migrate.PropertyOrigin.Inherited)] - public string Location { get => ((Microsoft.Azure.PowerShell.Cmdlets.Migrate.Models.Api20180110.IResourceInternal)__resource).Location; set => ((Microsoft.Azure.PowerShell.Cmdlets.Migrate.Models.Api20180110.IResourceInternal)__resource).Location = value; } + public string Location { get => ((Microsoft.Azure.PowerShell.Cmdlets.Migrate.Models.Api20180110.IResourceInternal)__resource).Location; set => ((Microsoft.Azure.PowerShell.Cmdlets.Migrate.Models.Api20180110.IResourceInternal)__resource).Location = value ?? null; } /// Internal Acessors for Id string Microsoft.Azure.PowerShell.Cmdlets.Migrate.Models.Api20180110.IResourceInternal.Id { get => ((Microsoft.Azure.PowerShell.Cmdlets.Migrate.Models.Api20180110.IResourceInternal)__resource).Id; set => ((Microsoft.Azure.PowerShell.Cmdlets.Migrate.Models.Api20180110.IResourceInternal)__resource).Id = value; } diff --git a/src/Migrate/generated/api/Models/Api20180110/StorageClassificationMapping.cs b/src/Migrate/generated/api/Models/Api20180110/StorageClassificationMapping.cs index d9d32c97f0b5..193ffbddc280 100644 --- a/src/Migrate/generated/api/Models/Api20180110/StorageClassificationMapping.cs +++ b/src/Migrate/generated/api/Models/Api20180110/StorageClassificationMapping.cs @@ -20,7 +20,7 @@ public partial class StorageClassificationMapping : /// Resource Location [Microsoft.Azure.PowerShell.Cmdlets.Migrate.Origin(Microsoft.Azure.PowerShell.Cmdlets.Migrate.PropertyOrigin.Inherited)] - public string Location { get => ((Microsoft.Azure.PowerShell.Cmdlets.Migrate.Models.Api20180110.IResourceInternal)__resource).Location; set => ((Microsoft.Azure.PowerShell.Cmdlets.Migrate.Models.Api20180110.IResourceInternal)__resource).Location = value; } + public string Location { get => ((Microsoft.Azure.PowerShell.Cmdlets.Migrate.Models.Api20180110.IResourceInternal)__resource).Location; set => ((Microsoft.Azure.PowerShell.Cmdlets.Migrate.Models.Api20180110.IResourceInternal)__resource).Location = value ?? null; } /// Internal Acessors for Id string Microsoft.Azure.PowerShell.Cmdlets.Migrate.Models.Api20180110.IResourceInternal.Id { get => ((Microsoft.Azure.PowerShell.Cmdlets.Migrate.Models.Api20180110.IResourceInternal)__resource).Id; set => ((Microsoft.Azure.PowerShell.Cmdlets.Migrate.Models.Api20180110.IResourceInternal)__resource).Id = value; } diff --git a/src/Migrate/generated/api/Models/Api20180110/SwitchProtectionJobDetails.cs b/src/Migrate/generated/api/Models/Api20180110/SwitchProtectionJobDetails.cs index 8ba2bfe3c584..e05d5cf8d661 100644 --- a/src/Migrate/generated/api/Models/Api20180110/SwitchProtectionJobDetails.cs +++ b/src/Migrate/generated/api/Models/Api20180110/SwitchProtectionJobDetails.cs @@ -19,7 +19,7 @@ public partial class SwitchProtectionJobDetails : /// object details. /// [Microsoft.Azure.PowerShell.Cmdlets.Migrate.Origin(Microsoft.Azure.PowerShell.Cmdlets.Migrate.PropertyOrigin.Inherited)] - public Microsoft.Azure.PowerShell.Cmdlets.Migrate.Models.Api20180110.IJobDetailsAffectedObjectDetails AffectedObjectDetail { get => ((Microsoft.Azure.PowerShell.Cmdlets.Migrate.Models.Api20180110.IJobDetailsInternal)__jobDetails).AffectedObjectDetail; set => ((Microsoft.Azure.PowerShell.Cmdlets.Migrate.Models.Api20180110.IJobDetailsInternal)__jobDetails).AffectedObjectDetail = value; } + public Microsoft.Azure.PowerShell.Cmdlets.Migrate.Models.Api20180110.IJobDetailsAffectedObjectDetails AffectedObjectDetail { get => ((Microsoft.Azure.PowerShell.Cmdlets.Migrate.Models.Api20180110.IJobDetailsInternal)__jobDetails).AffectedObjectDetail; set => ((Microsoft.Azure.PowerShell.Cmdlets.Migrate.Models.Api20180110.IJobDetailsInternal)__jobDetails).AffectedObjectDetail = value ?? null /* model class */; } /// Gets the type of job details (see JobDetailsTypes enum for possible values). [Microsoft.Azure.PowerShell.Cmdlets.Migrate.Origin(Microsoft.Azure.PowerShell.Cmdlets.Migrate.PropertyOrigin.Inherited)] diff --git a/src/Migrate/generated/api/Models/Api20180110/TestFailoverJobDetails.cs b/src/Migrate/generated/api/Models/Api20180110/TestFailoverJobDetails.cs index 09efc0d0c79f..a5ee6884e781 100644 --- a/src/Migrate/generated/api/Models/Api20180110/TestFailoverJobDetails.cs +++ b/src/Migrate/generated/api/Models/Api20180110/TestFailoverJobDetails.cs @@ -19,7 +19,7 @@ public partial class TestFailoverJobDetails : /// object details. /// [Microsoft.Azure.PowerShell.Cmdlets.Migrate.Origin(Microsoft.Azure.PowerShell.Cmdlets.Migrate.PropertyOrigin.Inherited)] - public Microsoft.Azure.PowerShell.Cmdlets.Migrate.Models.Api20180110.IJobDetailsAffectedObjectDetails AffectedObjectDetail { get => ((Microsoft.Azure.PowerShell.Cmdlets.Migrate.Models.Api20180110.IJobDetailsInternal)__jobDetails).AffectedObjectDetail; set => ((Microsoft.Azure.PowerShell.Cmdlets.Migrate.Models.Api20180110.IJobDetailsInternal)__jobDetails).AffectedObjectDetail = value; } + public Microsoft.Azure.PowerShell.Cmdlets.Migrate.Models.Api20180110.IJobDetailsAffectedObjectDetails AffectedObjectDetail { get => ((Microsoft.Azure.PowerShell.Cmdlets.Migrate.Models.Api20180110.IJobDetailsInternal)__jobDetails).AffectedObjectDetail; set => ((Microsoft.Azure.PowerShell.Cmdlets.Migrate.Models.Api20180110.IJobDetailsInternal)__jobDetails).AffectedObjectDetail = value ?? null /* model class */; } /// Backing field for property. private string _comment; diff --git a/src/Migrate/generated/api/Models/Api20180110/VCenterAutoGenerated.cs b/src/Migrate/generated/api/Models/Api20180110/VCenterAutoGenerated.cs index 2b77732eec98..6c56045bf4d6 100644 --- a/src/Migrate/generated/api/Models/Api20180110/VCenterAutoGenerated.cs +++ b/src/Migrate/generated/api/Models/Api20180110/VCenterAutoGenerated.cs @@ -52,7 +52,7 @@ public partial class VCenterAutoGenerated : /// Resource Location [Microsoft.Azure.PowerShell.Cmdlets.Migrate.Origin(Microsoft.Azure.PowerShell.Cmdlets.Migrate.PropertyOrigin.Inherited)] - public string Location { get => ((Microsoft.Azure.PowerShell.Cmdlets.Migrate.Models.Api20180110.IResourceInternal)__resource).Location; set => ((Microsoft.Azure.PowerShell.Cmdlets.Migrate.Models.Api20180110.IResourceInternal)__resource).Location = value; } + public string Location { get => ((Microsoft.Azure.PowerShell.Cmdlets.Migrate.Models.Api20180110.IResourceInternal)__resource).Location; set => ((Microsoft.Azure.PowerShell.Cmdlets.Migrate.Models.Api20180110.IResourceInternal)__resource).Location = value ?? null; } /// Internal Acessors for Id string Microsoft.Azure.PowerShell.Cmdlets.Migrate.Models.Api20180110.IResourceInternal.Id { get => ((Microsoft.Azure.PowerShell.Cmdlets.Migrate.Models.Api20180110.IResourceInternal)__resource).Id; set => ((Microsoft.Azure.PowerShell.Cmdlets.Migrate.Models.Api20180110.IResourceInternal)__resource).Id = value; } diff --git a/src/Migrate/generated/api/Models/Api20180110/VMNicUpdatesTaskDetails.cs b/src/Migrate/generated/api/Models/Api20180110/VMNicUpdatesTaskDetails.cs index ab24a3cb6b6c..7b68d81a0bec 100644 --- a/src/Migrate/generated/api/Models/Api20180110/VMNicUpdatesTaskDetails.cs +++ b/src/Migrate/generated/api/Models/Api20180110/VMNicUpdatesTaskDetails.cs @@ -16,7 +16,7 @@ public partial class VMNicUpdatesTaskDetails : /// The type of task details. [Microsoft.Azure.PowerShell.Cmdlets.Migrate.Origin(Microsoft.Azure.PowerShell.Cmdlets.Migrate.PropertyOrigin.Inherited)] - public string InstanceType { get => ((Microsoft.Azure.PowerShell.Cmdlets.Migrate.Models.Api20180110.ITaskTypeDetailsInternal)__taskTypeDetails).InstanceType; set => ((Microsoft.Azure.PowerShell.Cmdlets.Migrate.Models.Api20180110.ITaskTypeDetailsInternal)__taskTypeDetails).InstanceType = value; } + public string InstanceType { get => ((Microsoft.Azure.PowerShell.Cmdlets.Migrate.Models.Api20180110.ITaskTypeDetailsInternal)__taskTypeDetails).InstanceType; set => ((Microsoft.Azure.PowerShell.Cmdlets.Migrate.Models.Api20180110.ITaskTypeDetailsInternal)__taskTypeDetails).InstanceType = value ?? null; } /// Backing field for property. private string _name; diff --git a/src/Migrate/generated/api/Models/Api20180110/VMwareCbtContainerCreationInput.cs b/src/Migrate/generated/api/Models/Api20180110/VMwareCbtContainerCreationInput.cs index 13f702af1105..311a64cde22c 100644 --- a/src/Migrate/generated/api/Models/Api20180110/VMwareCbtContainerCreationInput.cs +++ b/src/Migrate/generated/api/Models/Api20180110/VMwareCbtContainerCreationInput.cs @@ -16,7 +16,7 @@ public partial class VMwareCbtContainerCreationInput : /// The class type. [Microsoft.Azure.PowerShell.Cmdlets.Migrate.Origin(Microsoft.Azure.PowerShell.Cmdlets.Migrate.PropertyOrigin.Inherited)] - public string InstanceType { get => ((Microsoft.Azure.PowerShell.Cmdlets.Migrate.Models.Api20180110.IReplicationProviderSpecificContainerCreationInputInternal)__replicationProviderSpecificContainerCreationInput).InstanceType; set => ((Microsoft.Azure.PowerShell.Cmdlets.Migrate.Models.Api20180110.IReplicationProviderSpecificContainerCreationInputInternal)__replicationProviderSpecificContainerCreationInput).InstanceType = value; } + public string InstanceType { get => ((Microsoft.Azure.PowerShell.Cmdlets.Migrate.Models.Api20180110.IReplicationProviderSpecificContainerCreationInputInternal)__replicationProviderSpecificContainerCreationInput).InstanceType; set => ((Microsoft.Azure.PowerShell.Cmdlets.Migrate.Models.Api20180110.IReplicationProviderSpecificContainerCreationInputInternal)__replicationProviderSpecificContainerCreationInput).InstanceType = value ?? null; } /// Creates an new instance. public VMwareCbtContainerCreationInput() diff --git a/src/Migrate/generated/api/Models/Api20180110/VMwareCbtContainerMappingInput.cs b/src/Migrate/generated/api/Models/Api20180110/VMwareCbtContainerMappingInput.cs index f79c14705d78..15ad70aada4f 100644 --- a/src/Migrate/generated/api/Models/Api20180110/VMwareCbtContainerMappingInput.cs +++ b/src/Migrate/generated/api/Models/Api20180110/VMwareCbtContainerMappingInput.cs @@ -16,7 +16,7 @@ public partial class VMwareCbtContainerMappingInput : /// The class type. [Microsoft.Azure.PowerShell.Cmdlets.Migrate.Origin(Microsoft.Azure.PowerShell.Cmdlets.Migrate.PropertyOrigin.Inherited)] - public string InstanceType { get => ((Microsoft.Azure.PowerShell.Cmdlets.Migrate.Models.Api20180110.IReplicationProviderSpecificContainerMappingInputInternal)__replicationProviderSpecificContainerMappingInput).InstanceType; set => ((Microsoft.Azure.PowerShell.Cmdlets.Migrate.Models.Api20180110.IReplicationProviderSpecificContainerMappingInputInternal)__replicationProviderSpecificContainerMappingInput).InstanceType = value; } + public string InstanceType { get => ((Microsoft.Azure.PowerShell.Cmdlets.Migrate.Models.Api20180110.IReplicationProviderSpecificContainerMappingInputInternal)__replicationProviderSpecificContainerMappingInput).InstanceType; set => ((Microsoft.Azure.PowerShell.Cmdlets.Migrate.Models.Api20180110.IReplicationProviderSpecificContainerMappingInputInternal)__replicationProviderSpecificContainerMappingInput).InstanceType = value ?? null; } /// Backing field for property. private string _keyVaultId; diff --git a/src/Migrate/generated/api/Models/Api20180110/VMwareCbtEnableMigrationInput.cs b/src/Migrate/generated/api/Models/Api20180110/VMwareCbtEnableMigrationInput.cs index 572906c65c8c..67303d9c10ac 100644 --- a/src/Migrate/generated/api/Models/Api20180110/VMwareCbtEnableMigrationInput.cs +++ b/src/Migrate/generated/api/Models/Api20180110/VMwareCbtEnableMigrationInput.cs @@ -30,7 +30,7 @@ public partial class VMwareCbtEnableMigrationInput : /// The class type. [Microsoft.Azure.PowerShell.Cmdlets.Migrate.Origin(Microsoft.Azure.PowerShell.Cmdlets.Migrate.PropertyOrigin.Inherited)] - public string InstanceType { get => ((Microsoft.Azure.PowerShell.Cmdlets.Migrate.Models.Api20180110.IEnableMigrationProviderSpecificInputInternal)__enableMigrationProviderSpecificInput).InstanceType; set => ((Microsoft.Azure.PowerShell.Cmdlets.Migrate.Models.Api20180110.IEnableMigrationProviderSpecificInputInternal)__enableMigrationProviderSpecificInput).InstanceType = value; } + public string InstanceType { get => ((Microsoft.Azure.PowerShell.Cmdlets.Migrate.Models.Api20180110.IEnableMigrationProviderSpecificInputInternal)__enableMigrationProviderSpecificInput).InstanceType; set => ((Microsoft.Azure.PowerShell.Cmdlets.Migrate.Models.Api20180110.IEnableMigrationProviderSpecificInputInternal)__enableMigrationProviderSpecificInput).InstanceType = value ; } /// Backing field for property. private Microsoft.Azure.PowerShell.Cmdlets.Migrate.Support.LicenseType? _licenseType; diff --git a/src/Migrate/generated/api/Models/Api20180110/VMwareCbtMigrateInput.cs b/src/Migrate/generated/api/Models/Api20180110/VMwareCbtMigrateInput.cs index 9adb89ae2175..c59f1cb6c18c 100644 --- a/src/Migrate/generated/api/Models/Api20180110/VMwareCbtMigrateInput.cs +++ b/src/Migrate/generated/api/Models/Api20180110/VMwareCbtMigrateInput.cs @@ -16,7 +16,7 @@ public partial class VMwareCbtMigrateInput : /// The class type. [Microsoft.Azure.PowerShell.Cmdlets.Migrate.Origin(Microsoft.Azure.PowerShell.Cmdlets.Migrate.PropertyOrigin.Inherited)] - public string InstanceType { get => ((Microsoft.Azure.PowerShell.Cmdlets.Migrate.Models.Api20180110.IMigrateProviderSpecificInputInternal)__migrateProviderSpecificInput).InstanceType; set => ((Microsoft.Azure.PowerShell.Cmdlets.Migrate.Models.Api20180110.IMigrateProviderSpecificInputInternal)__migrateProviderSpecificInput).InstanceType = value; } + public string InstanceType { get => ((Microsoft.Azure.PowerShell.Cmdlets.Migrate.Models.Api20180110.IMigrateProviderSpecificInputInternal)__migrateProviderSpecificInput).InstanceType; set => ((Microsoft.Azure.PowerShell.Cmdlets.Migrate.Models.Api20180110.IMigrateProviderSpecificInputInternal)__migrateProviderSpecificInput).InstanceType = value ; } /// Backing field for property. private string _performShutdown; diff --git a/src/Migrate/generated/api/Models/Api20180110/VMwareCbtPolicyCreationInput.cs b/src/Migrate/generated/api/Models/Api20180110/VMwareCbtPolicyCreationInput.cs index b086cdbfc765..42384f9c3554 100644 --- a/src/Migrate/generated/api/Models/Api20180110/VMwareCbtPolicyCreationInput.cs +++ b/src/Migrate/generated/api/Models/Api20180110/VMwareCbtPolicyCreationInput.cs @@ -30,7 +30,7 @@ public partial class VMwareCbtPolicyCreationInput : /// The class type. [Microsoft.Azure.PowerShell.Cmdlets.Migrate.Origin(Microsoft.Azure.PowerShell.Cmdlets.Migrate.PropertyOrigin.Inherited)] - public string InstanceType { get => ((Microsoft.Azure.PowerShell.Cmdlets.Migrate.Models.Api20180110.IPolicyProviderSpecificInputInternal)__policyProviderSpecificInput).InstanceType; set => ((Microsoft.Azure.PowerShell.Cmdlets.Migrate.Models.Api20180110.IPolicyProviderSpecificInputInternal)__policyProviderSpecificInput).InstanceType = value; } + public string InstanceType { get => ((Microsoft.Azure.PowerShell.Cmdlets.Migrate.Models.Api20180110.IPolicyProviderSpecificInputInternal)__policyProviderSpecificInput).InstanceType; set => ((Microsoft.Azure.PowerShell.Cmdlets.Migrate.Models.Api20180110.IPolicyProviderSpecificInputInternal)__policyProviderSpecificInput).InstanceType = value ?? null; } /// Backing field for property. private int? _recoveryPointHistoryInMinute; diff --git a/src/Migrate/generated/api/Models/Api20180110/VMwareCbtResyncInput.cs b/src/Migrate/generated/api/Models/Api20180110/VMwareCbtResyncInput.cs index 13393fbdd6cd..fecf3170e2f4 100644 --- a/src/Migrate/generated/api/Models/Api20180110/VMwareCbtResyncInput.cs +++ b/src/Migrate/generated/api/Models/Api20180110/VMwareCbtResyncInput.cs @@ -16,7 +16,7 @@ public partial class VMwareCbtResyncInput : /// The class type. [Microsoft.Azure.PowerShell.Cmdlets.Migrate.Origin(Microsoft.Azure.PowerShell.Cmdlets.Migrate.PropertyOrigin.Inherited)] - public string InstanceType { get => ((Microsoft.Azure.PowerShell.Cmdlets.Migrate.Models.Api20180110.IResyncProviderSpecificInputInternal)__resyncProviderSpecificInput).InstanceType; set => ((Microsoft.Azure.PowerShell.Cmdlets.Migrate.Models.Api20180110.IResyncProviderSpecificInputInternal)__resyncProviderSpecificInput).InstanceType = value; } + public string InstanceType { get => ((Microsoft.Azure.PowerShell.Cmdlets.Migrate.Models.Api20180110.IResyncProviderSpecificInputInternal)__resyncProviderSpecificInput).InstanceType; set => ((Microsoft.Azure.PowerShell.Cmdlets.Migrate.Models.Api20180110.IResyncProviderSpecificInputInternal)__resyncProviderSpecificInput).InstanceType = value ; } /// Backing field for property. private string _skipCbtReset; diff --git a/src/Migrate/generated/api/Models/Api20180110/VMwareCbtTestMigrateInput.cs b/src/Migrate/generated/api/Models/Api20180110/VMwareCbtTestMigrateInput.cs index d397f919fcea..f2e92daf0cef 100644 --- a/src/Migrate/generated/api/Models/Api20180110/VMwareCbtTestMigrateInput.cs +++ b/src/Migrate/generated/api/Models/Api20180110/VMwareCbtTestMigrateInput.cs @@ -16,7 +16,7 @@ public partial class VMwareCbtTestMigrateInput : /// The class type. [Microsoft.Azure.PowerShell.Cmdlets.Migrate.Origin(Microsoft.Azure.PowerShell.Cmdlets.Migrate.PropertyOrigin.Inherited)] - public string InstanceType { get => ((Microsoft.Azure.PowerShell.Cmdlets.Migrate.Models.Api20180110.ITestMigrateProviderSpecificInputInternal)__testMigrateProviderSpecificInput).InstanceType; set => ((Microsoft.Azure.PowerShell.Cmdlets.Migrate.Models.Api20180110.ITestMigrateProviderSpecificInputInternal)__testMigrateProviderSpecificInput).InstanceType = value; } + public string InstanceType { get => ((Microsoft.Azure.PowerShell.Cmdlets.Migrate.Models.Api20180110.ITestMigrateProviderSpecificInputInternal)__testMigrateProviderSpecificInput).InstanceType; set => ((Microsoft.Azure.PowerShell.Cmdlets.Migrate.Models.Api20180110.ITestMigrateProviderSpecificInputInternal)__testMigrateProviderSpecificInput).InstanceType = value ; } /// Backing field for property. private string _networkId; diff --git a/src/Migrate/generated/api/Models/Api20180110/VMwareCbtUpdateMigrationItemInput.cs b/src/Migrate/generated/api/Models/Api20180110/VMwareCbtUpdateMigrationItemInput.cs index 462b5e7e6428..5c23a7e9f68e 100644 --- a/src/Migrate/generated/api/Models/Api20180110/VMwareCbtUpdateMigrationItemInput.cs +++ b/src/Migrate/generated/api/Models/Api20180110/VMwareCbtUpdateMigrationItemInput.cs @@ -16,7 +16,7 @@ public partial class VMwareCbtUpdateMigrationItemInput : /// The class type. [Microsoft.Azure.PowerShell.Cmdlets.Migrate.Origin(Microsoft.Azure.PowerShell.Cmdlets.Migrate.PropertyOrigin.Inherited)] - public string InstanceType { get => ((Microsoft.Azure.PowerShell.Cmdlets.Migrate.Models.Api20180110.IUpdateMigrationItemProviderSpecificInputInternal)__updateMigrationItemProviderSpecificInput).InstanceType; set => ((Microsoft.Azure.PowerShell.Cmdlets.Migrate.Models.Api20180110.IUpdateMigrationItemProviderSpecificInputInternal)__updateMigrationItemProviderSpecificInput).InstanceType = value; } + public string InstanceType { get => ((Microsoft.Azure.PowerShell.Cmdlets.Migrate.Models.Api20180110.IUpdateMigrationItemProviderSpecificInputInternal)__updateMigrationItemProviderSpecificInput).InstanceType; set => ((Microsoft.Azure.PowerShell.Cmdlets.Migrate.Models.Api20180110.IUpdateMigrationItemProviderSpecificInputInternal)__updateMigrationItemProviderSpecificInput).InstanceType = value ?? null; } /// Backing field for property. private Microsoft.Azure.PowerShell.Cmdlets.Migrate.Support.LicenseType? _licenseType; diff --git a/src/Migrate/generated/api/Models/Api20180110/VMwareV2FabricCreationInput.cs b/src/Migrate/generated/api/Models/Api20180110/VMwareV2FabricCreationInput.cs index fb1780145834..4577f226277a 100644 --- a/src/Migrate/generated/api/Models/Api20180110/VMwareV2FabricCreationInput.cs +++ b/src/Migrate/generated/api/Models/Api20180110/VMwareV2FabricCreationInput.cs @@ -16,7 +16,7 @@ public partial class VMwareV2FabricCreationInput : /// Gets the class type. [Microsoft.Azure.PowerShell.Cmdlets.Migrate.Origin(Microsoft.Azure.PowerShell.Cmdlets.Migrate.PropertyOrigin.Inherited)] - public string InstanceType { get => ((Microsoft.Azure.PowerShell.Cmdlets.Migrate.Models.Api20180110.IFabricSpecificCreationInputInternal)__fabricSpecificCreationInput).InstanceType; set => ((Microsoft.Azure.PowerShell.Cmdlets.Migrate.Models.Api20180110.IFabricSpecificCreationInputInternal)__fabricSpecificCreationInput).InstanceType = value; } + public string InstanceType { get => ((Microsoft.Azure.PowerShell.Cmdlets.Migrate.Models.Api20180110.IFabricSpecificCreationInputInternal)__fabricSpecificCreationInput).InstanceType; set => ((Microsoft.Azure.PowerShell.Cmdlets.Migrate.Models.Api20180110.IFabricSpecificCreationInputInternal)__fabricSpecificCreationInput).InstanceType = value ?? null; } /// Backing field for property. private string _migrationSolutionId; diff --git a/src/Migrate/generated/api/Models/Api20180110/VaultHealthDetails.cs b/src/Migrate/generated/api/Models/Api20180110/VaultHealthDetails.cs index 3926560321e8..1d7384184b60 100644 --- a/src/Migrate/generated/api/Models/Api20180110/VaultHealthDetails.cs +++ b/src/Migrate/generated/api/Models/Api20180110/VaultHealthDetails.cs @@ -44,7 +44,7 @@ public partial class VaultHealthDetails : /// Resource Location [Microsoft.Azure.PowerShell.Cmdlets.Migrate.Origin(Microsoft.Azure.PowerShell.Cmdlets.Migrate.PropertyOrigin.Inherited)] - public string Location { get => ((Microsoft.Azure.PowerShell.Cmdlets.Migrate.Models.Api20180110.IResourceInternal)__resource).Location; set => ((Microsoft.Azure.PowerShell.Cmdlets.Migrate.Models.Api20180110.IResourceInternal)__resource).Location = value; } + public string Location { get => ((Microsoft.Azure.PowerShell.Cmdlets.Migrate.Models.Api20180110.IResourceInternal)__resource).Location; set => ((Microsoft.Azure.PowerShell.Cmdlets.Migrate.Models.Api20180110.IResourceInternal)__resource).Location = value ?? null; } /// Internal Acessors for Id string Microsoft.Azure.PowerShell.Cmdlets.Migrate.Models.Api20180110.IResourceInternal.Id { get => ((Microsoft.Azure.PowerShell.Cmdlets.Migrate.Models.Api20180110.IResourceInternal)__resource).Id; set => ((Microsoft.Azure.PowerShell.Cmdlets.Migrate.Models.Api20180110.IResourceInternal)__resource).Id = value; } diff --git a/src/Migrate/generated/api/Models/Api20180110/VirtualMachineTaskDetails.cs b/src/Migrate/generated/api/Models/Api20180110/VirtualMachineTaskDetails.cs index a96e553f2a63..be2656752d85 100644 --- a/src/Migrate/generated/api/Models/Api20180110/VirtualMachineTaskDetails.cs +++ b/src/Migrate/generated/api/Models/Api20180110/VirtualMachineTaskDetails.cs @@ -16,7 +16,7 @@ public partial class VirtualMachineTaskDetails : /// The type of task details. [Microsoft.Azure.PowerShell.Cmdlets.Migrate.Origin(Microsoft.Azure.PowerShell.Cmdlets.Migrate.PropertyOrigin.Inherited)] - public string InstanceType { get => ((Microsoft.Azure.PowerShell.Cmdlets.Migrate.Models.Api20180110.ITaskTypeDetailsInternal)__taskTypeDetails).InstanceType; set => ((Microsoft.Azure.PowerShell.Cmdlets.Migrate.Models.Api20180110.ITaskTypeDetailsInternal)__taskTypeDetails).InstanceType = value; } + public string InstanceType { get => ((Microsoft.Azure.PowerShell.Cmdlets.Migrate.Models.Api20180110.ITaskTypeDetailsInternal)__taskTypeDetails).InstanceType; set => ((Microsoft.Azure.PowerShell.Cmdlets.Migrate.Models.Api20180110.ITaskTypeDetailsInternal)__taskTypeDetails).InstanceType = value ?? null; } /// Backing field for property. private Microsoft.Azure.PowerShell.Cmdlets.Migrate.Models.Api20180110.IJobEntity _jobTask; diff --git a/src/Migrate/generated/api/Models/Api20180110/VmmToAzureCreateNetworkMappingInput.cs b/src/Migrate/generated/api/Models/Api20180110/VmmToAzureCreateNetworkMappingInput.cs index f26d35320ceb..bf977e34cf44 100644 --- a/src/Migrate/generated/api/Models/Api20180110/VmmToAzureCreateNetworkMappingInput.cs +++ b/src/Migrate/generated/api/Models/Api20180110/VmmToAzureCreateNetworkMappingInput.cs @@ -18,7 +18,7 @@ public partial class VmmToAzureCreateNetworkMappingInput : /// The instance type. [Microsoft.Azure.PowerShell.Cmdlets.Migrate.Origin(Microsoft.Azure.PowerShell.Cmdlets.Migrate.PropertyOrigin.Inherited)] - public string InstanceType { get => ((Microsoft.Azure.PowerShell.Cmdlets.Migrate.Models.Api20180110.IFabricSpecificCreateNetworkMappingInputInternal)__fabricSpecificCreateNetworkMappingInput).InstanceType; set => ((Microsoft.Azure.PowerShell.Cmdlets.Migrate.Models.Api20180110.IFabricSpecificCreateNetworkMappingInputInternal)__fabricSpecificCreateNetworkMappingInput).InstanceType = value; } + public string InstanceType { get => ((Microsoft.Azure.PowerShell.Cmdlets.Migrate.Models.Api20180110.IFabricSpecificCreateNetworkMappingInputInternal)__fabricSpecificCreateNetworkMappingInput).InstanceType; set => ((Microsoft.Azure.PowerShell.Cmdlets.Migrate.Models.Api20180110.IFabricSpecificCreateNetworkMappingInputInternal)__fabricSpecificCreateNetworkMappingInput).InstanceType = value ?? null; } /// Validates that this object meets the validation criteria. /// an instance that will receive validation diff --git a/src/Migrate/generated/api/Models/Api20180110/VmmToAzureUpdateNetworkMappingInput.cs b/src/Migrate/generated/api/Models/Api20180110/VmmToAzureUpdateNetworkMappingInput.cs index 0b55ebdc0e07..734338b76afc 100644 --- a/src/Migrate/generated/api/Models/Api20180110/VmmToAzureUpdateNetworkMappingInput.cs +++ b/src/Migrate/generated/api/Models/Api20180110/VmmToAzureUpdateNetworkMappingInput.cs @@ -16,7 +16,7 @@ public partial class VmmToAzureUpdateNetworkMappingInput : /// The instance type. [Microsoft.Azure.PowerShell.Cmdlets.Migrate.Origin(Microsoft.Azure.PowerShell.Cmdlets.Migrate.PropertyOrigin.Inherited)] - public string InstanceType { get => ((Microsoft.Azure.PowerShell.Cmdlets.Migrate.Models.Api20180110.IFabricSpecificUpdateNetworkMappingInputInternal)__fabricSpecificUpdateNetworkMappingInput).InstanceType; set => ((Microsoft.Azure.PowerShell.Cmdlets.Migrate.Models.Api20180110.IFabricSpecificUpdateNetworkMappingInputInternal)__fabricSpecificUpdateNetworkMappingInput).InstanceType = value; } + public string InstanceType { get => ((Microsoft.Azure.PowerShell.Cmdlets.Migrate.Models.Api20180110.IFabricSpecificUpdateNetworkMappingInputInternal)__fabricSpecificUpdateNetworkMappingInput).InstanceType; set => ((Microsoft.Azure.PowerShell.Cmdlets.Migrate.Models.Api20180110.IFabricSpecificUpdateNetworkMappingInputInternal)__fabricSpecificUpdateNetworkMappingInput).InstanceType = value ?? null; } /// Validates that this object meets the validation criteria. /// an instance that will receive validation diff --git a/src/Migrate/generated/api/Models/Api20180110/VmmToVmmCreateNetworkMappingInput.cs b/src/Migrate/generated/api/Models/Api20180110/VmmToVmmCreateNetworkMappingInput.cs index 1c3fa67580ee..626f4fe8b10f 100644 --- a/src/Migrate/generated/api/Models/Api20180110/VmmToVmmCreateNetworkMappingInput.cs +++ b/src/Migrate/generated/api/Models/Api20180110/VmmToVmmCreateNetworkMappingInput.cs @@ -18,7 +18,7 @@ public partial class VmmToVmmCreateNetworkMappingInput : /// The instance type. [Microsoft.Azure.PowerShell.Cmdlets.Migrate.Origin(Microsoft.Azure.PowerShell.Cmdlets.Migrate.PropertyOrigin.Inherited)] - public string InstanceType { get => ((Microsoft.Azure.PowerShell.Cmdlets.Migrate.Models.Api20180110.IFabricSpecificCreateNetworkMappingInputInternal)__fabricSpecificCreateNetworkMappingInput).InstanceType; set => ((Microsoft.Azure.PowerShell.Cmdlets.Migrate.Models.Api20180110.IFabricSpecificCreateNetworkMappingInputInternal)__fabricSpecificCreateNetworkMappingInput).InstanceType = value; } + public string InstanceType { get => ((Microsoft.Azure.PowerShell.Cmdlets.Migrate.Models.Api20180110.IFabricSpecificCreateNetworkMappingInputInternal)__fabricSpecificCreateNetworkMappingInput).InstanceType; set => ((Microsoft.Azure.PowerShell.Cmdlets.Migrate.Models.Api20180110.IFabricSpecificCreateNetworkMappingInputInternal)__fabricSpecificCreateNetworkMappingInput).InstanceType = value ?? null; } /// Validates that this object meets the validation criteria. /// an instance that will receive validation diff --git a/src/Migrate/generated/api/Models/Api20180110/VmmToVmmUpdateNetworkMappingInput.cs b/src/Migrate/generated/api/Models/Api20180110/VmmToVmmUpdateNetworkMappingInput.cs index cf99c95790f5..0bb9c8142a20 100644 --- a/src/Migrate/generated/api/Models/Api20180110/VmmToVmmUpdateNetworkMappingInput.cs +++ b/src/Migrate/generated/api/Models/Api20180110/VmmToVmmUpdateNetworkMappingInput.cs @@ -16,7 +16,7 @@ public partial class VmmToVmmUpdateNetworkMappingInput : /// The instance type. [Microsoft.Azure.PowerShell.Cmdlets.Migrate.Origin(Microsoft.Azure.PowerShell.Cmdlets.Migrate.PropertyOrigin.Inherited)] - public string InstanceType { get => ((Microsoft.Azure.PowerShell.Cmdlets.Migrate.Models.Api20180110.IFabricSpecificUpdateNetworkMappingInputInternal)__fabricSpecificUpdateNetworkMappingInput).InstanceType; set => ((Microsoft.Azure.PowerShell.Cmdlets.Migrate.Models.Api20180110.IFabricSpecificUpdateNetworkMappingInputInternal)__fabricSpecificUpdateNetworkMappingInput).InstanceType = value; } + public string InstanceType { get => ((Microsoft.Azure.PowerShell.Cmdlets.Migrate.Models.Api20180110.IFabricSpecificUpdateNetworkMappingInputInternal)__fabricSpecificUpdateNetworkMappingInput).InstanceType; set => ((Microsoft.Azure.PowerShell.Cmdlets.Migrate.Models.Api20180110.IFabricSpecificUpdateNetworkMappingInputInternal)__fabricSpecificUpdateNetworkMappingInput).InstanceType = value ?? null; } /// Validates that this object meets the validation criteria. /// an instance that will receive validation diff --git a/src/Migrate/generated/api/Models/Api20180901Preview/DatabaseMigrateEventProperties.cs b/src/Migrate/generated/api/Models/Api20180901Preview/DatabaseMigrateEventProperties.cs index 6cd721900322..49dbb1a9b97d 100644 --- a/src/Migrate/generated/api/Models/Api20180901Preview/DatabaseMigrateEventProperties.cs +++ b/src/Migrate/generated/api/Models/Api20180901Preview/DatabaseMigrateEventProperties.cs @@ -18,7 +18,7 @@ public partial class DatabaseMigrateEventProperties : /// Gets or sets the client request Id of the payload for which the event is being reported. /// [Microsoft.Azure.PowerShell.Cmdlets.Migrate.Origin(Microsoft.Azure.PowerShell.Cmdlets.Migrate.PropertyOrigin.Inherited)] - public string ClientRequestId { get => ((Microsoft.Azure.PowerShell.Cmdlets.Migrate.Models.Api20180901Preview.IMigrateEventPropertiesInternal)__migrateEventProperties).ClientRequestId; set => ((Microsoft.Azure.PowerShell.Cmdlets.Migrate.Models.Api20180901Preview.IMigrateEventPropertiesInternal)__migrateEventProperties).ClientRequestId = value; } + public string ClientRequestId { get => ((Microsoft.Azure.PowerShell.Cmdlets.Migrate.Models.Api20180901Preview.IMigrateEventPropertiesInternal)__migrateEventProperties).ClientRequestId; set => ((Microsoft.Azure.PowerShell.Cmdlets.Migrate.Models.Api20180901Preview.IMigrateEventPropertiesInternal)__migrateEventProperties).ClientRequestId = value ?? null; } /// Backing field for property. private string _database; @@ -36,11 +36,11 @@ public partial class DatabaseMigrateEventProperties : /// Gets or sets the error code. [Microsoft.Azure.PowerShell.Cmdlets.Migrate.Origin(Microsoft.Azure.PowerShell.Cmdlets.Migrate.PropertyOrigin.Inherited)] - public string ErrorCode { get => ((Microsoft.Azure.PowerShell.Cmdlets.Migrate.Models.Api20180901Preview.IMigrateEventPropertiesInternal)__migrateEventProperties).ErrorCode; set => ((Microsoft.Azure.PowerShell.Cmdlets.Migrate.Models.Api20180901Preview.IMigrateEventPropertiesInternal)__migrateEventProperties).ErrorCode = value; } + public string ErrorCode { get => ((Microsoft.Azure.PowerShell.Cmdlets.Migrate.Models.Api20180901Preview.IMigrateEventPropertiesInternal)__migrateEventProperties).ErrorCode; set => ((Microsoft.Azure.PowerShell.Cmdlets.Migrate.Models.Api20180901Preview.IMigrateEventPropertiesInternal)__migrateEventProperties).ErrorCode = value ?? null; } /// Gets or sets the error message. [Microsoft.Azure.PowerShell.Cmdlets.Migrate.Origin(Microsoft.Azure.PowerShell.Cmdlets.Migrate.PropertyOrigin.Inherited)] - public string ErrorMessage { get => ((Microsoft.Azure.PowerShell.Cmdlets.Migrate.Models.Api20180901Preview.IMigrateEventPropertiesInternal)__migrateEventProperties).ErrorMessage; set => ((Microsoft.Azure.PowerShell.Cmdlets.Migrate.Models.Api20180901Preview.IMigrateEventPropertiesInternal)__migrateEventProperties).ErrorMessage = value; } + public string ErrorMessage { get => ((Microsoft.Azure.PowerShell.Cmdlets.Migrate.Models.Api20180901Preview.IMigrateEventPropertiesInternal)__migrateEventProperties).ErrorMessage; set => ((Microsoft.Azure.PowerShell.Cmdlets.Migrate.Models.Api20180901Preview.IMigrateEventPropertiesInternal)__migrateEventProperties).ErrorMessage = value ?? null; } /// Gets the Instance type. [Microsoft.Azure.PowerShell.Cmdlets.Migrate.Origin(Microsoft.Azure.PowerShell.Cmdlets.Migrate.PropertyOrigin.Inherited)] @@ -51,15 +51,15 @@ public partial class DatabaseMigrateEventProperties : /// Gets or sets the possible causes for the error. [Microsoft.Azure.PowerShell.Cmdlets.Migrate.Origin(Microsoft.Azure.PowerShell.Cmdlets.Migrate.PropertyOrigin.Inherited)] - public string PossibleCaus { get => ((Microsoft.Azure.PowerShell.Cmdlets.Migrate.Models.Api20180901Preview.IMigrateEventPropertiesInternal)__migrateEventProperties).PossibleCaus; set => ((Microsoft.Azure.PowerShell.Cmdlets.Migrate.Models.Api20180901Preview.IMigrateEventPropertiesInternal)__migrateEventProperties).PossibleCaus = value; } + public string PossibleCaus { get => ((Microsoft.Azure.PowerShell.Cmdlets.Migrate.Models.Api20180901Preview.IMigrateEventPropertiesInternal)__migrateEventProperties).PossibleCaus; set => ((Microsoft.Azure.PowerShell.Cmdlets.Migrate.Models.Api20180901Preview.IMigrateEventPropertiesInternal)__migrateEventProperties).PossibleCaus = value ?? null; } /// Gets or sets the recommendation for the error. [Microsoft.Azure.PowerShell.Cmdlets.Migrate.Origin(Microsoft.Azure.PowerShell.Cmdlets.Migrate.PropertyOrigin.Inherited)] - public string Recommendation { get => ((Microsoft.Azure.PowerShell.Cmdlets.Migrate.Models.Api20180901Preview.IMigrateEventPropertiesInternal)__migrateEventProperties).Recommendation; set => ((Microsoft.Azure.PowerShell.Cmdlets.Migrate.Models.Api20180901Preview.IMigrateEventPropertiesInternal)__migrateEventProperties).Recommendation = value; } + public string Recommendation { get => ((Microsoft.Azure.PowerShell.Cmdlets.Migrate.Models.Api20180901Preview.IMigrateEventPropertiesInternal)__migrateEventProperties).Recommendation; set => ((Microsoft.Azure.PowerShell.Cmdlets.Migrate.Models.Api20180901Preview.IMigrateEventPropertiesInternal)__migrateEventProperties).Recommendation = value ?? null; } /// Gets or sets the solution for which the error is being reported. [Microsoft.Azure.PowerShell.Cmdlets.Migrate.Origin(Microsoft.Azure.PowerShell.Cmdlets.Migrate.PropertyOrigin.Inherited)] - public string Solution { get => ((Microsoft.Azure.PowerShell.Cmdlets.Migrate.Models.Api20180901Preview.IMigrateEventPropertiesInternal)__migrateEventProperties).Solution; set => ((Microsoft.Azure.PowerShell.Cmdlets.Migrate.Models.Api20180901Preview.IMigrateEventPropertiesInternal)__migrateEventProperties).Solution = value; } + public string Solution { get => ((Microsoft.Azure.PowerShell.Cmdlets.Migrate.Models.Api20180901Preview.IMigrateEventPropertiesInternal)__migrateEventProperties).Solution; set => ((Microsoft.Azure.PowerShell.Cmdlets.Migrate.Models.Api20180901Preview.IMigrateEventPropertiesInternal)__migrateEventProperties).Solution = value ?? null; } /// Creates an new instance. public DatabaseMigrateEventProperties() diff --git a/src/Migrate/generated/api/Models/Api20180901Preview/DatabaseProjectSummary.cs b/src/Migrate/generated/api/Models/Api20180901Preview/DatabaseProjectSummary.cs index b78f7b52c486..9c4b8ce31707 100644 --- a/src/Migrate/generated/api/Models/Api20180901Preview/DatabaseProjectSummary.cs +++ b/src/Migrate/generated/api/Models/Api20180901Preview/DatabaseProjectSummary.cs @@ -16,7 +16,7 @@ public partial class DatabaseProjectSummary : /// Gets or sets the extended summary. [Microsoft.Azure.PowerShell.Cmdlets.Migrate.Origin(Microsoft.Azure.PowerShell.Cmdlets.Migrate.PropertyOrigin.Inherited)] - public Microsoft.Azure.PowerShell.Cmdlets.Migrate.Models.Api20180901Preview.IProjectSummaryExtendedSummary ExtendedSummary { get => ((Microsoft.Azure.PowerShell.Cmdlets.Migrate.Models.Api20180901Preview.IProjectSummaryInternal)__projectSummary).ExtendedSummary; set => ((Microsoft.Azure.PowerShell.Cmdlets.Migrate.Models.Api20180901Preview.IProjectSummaryInternal)__projectSummary).ExtendedSummary = value; } + public Microsoft.Azure.PowerShell.Cmdlets.Migrate.Models.Api20180901Preview.IProjectSummaryExtendedSummary ExtendedSummary { get => ((Microsoft.Azure.PowerShell.Cmdlets.Migrate.Models.Api20180901Preview.IProjectSummaryInternal)__projectSummary).ExtendedSummary; set => ((Microsoft.Azure.PowerShell.Cmdlets.Migrate.Models.Api20180901Preview.IProjectSummaryInternal)__projectSummary).ExtendedSummary = value ?? null /* model class */; } /// Gets the Instance type. [Microsoft.Azure.PowerShell.Cmdlets.Migrate.Origin(Microsoft.Azure.PowerShell.Cmdlets.Migrate.PropertyOrigin.Inherited)] @@ -24,14 +24,14 @@ public partial class DatabaseProjectSummary : /// Gets or sets the time when summary was last refreshed. [Microsoft.Azure.PowerShell.Cmdlets.Migrate.Origin(Microsoft.Azure.PowerShell.Cmdlets.Migrate.PropertyOrigin.Inherited)] - public global::System.DateTime? LastSummaryRefreshedTime { get => ((Microsoft.Azure.PowerShell.Cmdlets.Migrate.Models.Api20180901Preview.IProjectSummaryInternal)__projectSummary).LastSummaryRefreshedTime; set => ((Microsoft.Azure.PowerShell.Cmdlets.Migrate.Models.Api20180901Preview.IProjectSummaryInternal)__projectSummary).LastSummaryRefreshedTime = value; } + public global::System.DateTime? LastSummaryRefreshedTime { get => ((Microsoft.Azure.PowerShell.Cmdlets.Migrate.Models.Api20180901Preview.IProjectSummaryInternal)__projectSummary).LastSummaryRefreshedTime; set => ((Microsoft.Azure.PowerShell.Cmdlets.Migrate.Models.Api20180901Preview.IProjectSummaryInternal)__projectSummary).LastSummaryRefreshedTime = value ?? default(global::System.DateTime); } /// Internal Acessors for InstanceType string Microsoft.Azure.PowerShell.Cmdlets.Migrate.Models.Api20180901Preview.IProjectSummaryInternal.InstanceType { get => ((Microsoft.Azure.PowerShell.Cmdlets.Migrate.Models.Api20180901Preview.IProjectSummaryInternal)__projectSummary).InstanceType; set => ((Microsoft.Azure.PowerShell.Cmdlets.Migrate.Models.Api20180901Preview.IProjectSummaryInternal)__projectSummary).InstanceType = value; } /// Gets or sets the state of refresh summary. [Microsoft.Azure.PowerShell.Cmdlets.Migrate.Origin(Microsoft.Azure.PowerShell.Cmdlets.Migrate.PropertyOrigin.Inherited)] - public string RefreshSummaryState { get => ((Microsoft.Azure.PowerShell.Cmdlets.Migrate.Models.Api20180901Preview.IProjectSummaryInternal)__projectSummary).RefreshSummaryState; set => ((Microsoft.Azure.PowerShell.Cmdlets.Migrate.Models.Api20180901Preview.IProjectSummaryInternal)__projectSummary).RefreshSummaryState = value; } + public string RefreshSummaryState { get => ((Microsoft.Azure.PowerShell.Cmdlets.Migrate.Models.Api20180901Preview.IProjectSummaryInternal)__projectSummary).RefreshSummaryState; set => ((Microsoft.Azure.PowerShell.Cmdlets.Migrate.Models.Api20180901Preview.IProjectSummaryInternal)__projectSummary).RefreshSummaryState = value ?? null; } /// Creates an new instance. public DatabaseProjectSummary() diff --git a/src/Migrate/generated/api/Models/Api20180901Preview/MachineMigrateEventProperties.cs b/src/Migrate/generated/api/Models/Api20180901Preview/MachineMigrateEventProperties.cs index bf5127da8036..2ccbfd925e5f 100644 --- a/src/Migrate/generated/api/Models/Api20180901Preview/MachineMigrateEventProperties.cs +++ b/src/Migrate/generated/api/Models/Api20180901Preview/MachineMigrateEventProperties.cs @@ -18,15 +18,15 @@ public partial class MachineMigrateEventProperties : /// Gets or sets the client request Id of the payload for which the event is being reported. /// [Microsoft.Azure.PowerShell.Cmdlets.Migrate.Origin(Microsoft.Azure.PowerShell.Cmdlets.Migrate.PropertyOrigin.Inherited)] - public string ClientRequestId { get => ((Microsoft.Azure.PowerShell.Cmdlets.Migrate.Models.Api20180901Preview.IMigrateEventPropertiesInternal)__migrateEventProperties).ClientRequestId; set => ((Microsoft.Azure.PowerShell.Cmdlets.Migrate.Models.Api20180901Preview.IMigrateEventPropertiesInternal)__migrateEventProperties).ClientRequestId = value; } + public string ClientRequestId { get => ((Microsoft.Azure.PowerShell.Cmdlets.Migrate.Models.Api20180901Preview.IMigrateEventPropertiesInternal)__migrateEventProperties).ClientRequestId; set => ((Microsoft.Azure.PowerShell.Cmdlets.Migrate.Models.Api20180901Preview.IMigrateEventPropertiesInternal)__migrateEventProperties).ClientRequestId = value ?? null; } /// Gets or sets the error code. [Microsoft.Azure.PowerShell.Cmdlets.Migrate.Origin(Microsoft.Azure.PowerShell.Cmdlets.Migrate.PropertyOrigin.Inherited)] - public string ErrorCode { get => ((Microsoft.Azure.PowerShell.Cmdlets.Migrate.Models.Api20180901Preview.IMigrateEventPropertiesInternal)__migrateEventProperties).ErrorCode; set => ((Microsoft.Azure.PowerShell.Cmdlets.Migrate.Models.Api20180901Preview.IMigrateEventPropertiesInternal)__migrateEventProperties).ErrorCode = value; } + public string ErrorCode { get => ((Microsoft.Azure.PowerShell.Cmdlets.Migrate.Models.Api20180901Preview.IMigrateEventPropertiesInternal)__migrateEventProperties).ErrorCode; set => ((Microsoft.Azure.PowerShell.Cmdlets.Migrate.Models.Api20180901Preview.IMigrateEventPropertiesInternal)__migrateEventProperties).ErrorCode = value ?? null; } /// Gets or sets the error message. [Microsoft.Azure.PowerShell.Cmdlets.Migrate.Origin(Microsoft.Azure.PowerShell.Cmdlets.Migrate.PropertyOrigin.Inherited)] - public string ErrorMessage { get => ((Microsoft.Azure.PowerShell.Cmdlets.Migrate.Models.Api20180901Preview.IMigrateEventPropertiesInternal)__migrateEventProperties).ErrorMessage; set => ((Microsoft.Azure.PowerShell.Cmdlets.Migrate.Models.Api20180901Preview.IMigrateEventPropertiesInternal)__migrateEventProperties).ErrorMessage = value; } + public string ErrorMessage { get => ((Microsoft.Azure.PowerShell.Cmdlets.Migrate.Models.Api20180901Preview.IMigrateEventPropertiesInternal)__migrateEventProperties).ErrorMessage; set => ((Microsoft.Azure.PowerShell.Cmdlets.Migrate.Models.Api20180901Preview.IMigrateEventPropertiesInternal)__migrateEventProperties).ErrorMessage = value ?? null; } /// Gets the Instance type. [Microsoft.Azure.PowerShell.Cmdlets.Migrate.Origin(Microsoft.Azure.PowerShell.Cmdlets.Migrate.PropertyOrigin.Inherited)] @@ -44,15 +44,15 @@ public partial class MachineMigrateEventProperties : /// Gets or sets the possible causes for the error. [Microsoft.Azure.PowerShell.Cmdlets.Migrate.Origin(Microsoft.Azure.PowerShell.Cmdlets.Migrate.PropertyOrigin.Inherited)] - public string PossibleCaus { get => ((Microsoft.Azure.PowerShell.Cmdlets.Migrate.Models.Api20180901Preview.IMigrateEventPropertiesInternal)__migrateEventProperties).PossibleCaus; set => ((Microsoft.Azure.PowerShell.Cmdlets.Migrate.Models.Api20180901Preview.IMigrateEventPropertiesInternal)__migrateEventProperties).PossibleCaus = value; } + public string PossibleCaus { get => ((Microsoft.Azure.PowerShell.Cmdlets.Migrate.Models.Api20180901Preview.IMigrateEventPropertiesInternal)__migrateEventProperties).PossibleCaus; set => ((Microsoft.Azure.PowerShell.Cmdlets.Migrate.Models.Api20180901Preview.IMigrateEventPropertiesInternal)__migrateEventProperties).PossibleCaus = value ?? null; } /// Gets or sets the recommendation for the error. [Microsoft.Azure.PowerShell.Cmdlets.Migrate.Origin(Microsoft.Azure.PowerShell.Cmdlets.Migrate.PropertyOrigin.Inherited)] - public string Recommendation { get => ((Microsoft.Azure.PowerShell.Cmdlets.Migrate.Models.Api20180901Preview.IMigrateEventPropertiesInternal)__migrateEventProperties).Recommendation; set => ((Microsoft.Azure.PowerShell.Cmdlets.Migrate.Models.Api20180901Preview.IMigrateEventPropertiesInternal)__migrateEventProperties).Recommendation = value; } + public string Recommendation { get => ((Microsoft.Azure.PowerShell.Cmdlets.Migrate.Models.Api20180901Preview.IMigrateEventPropertiesInternal)__migrateEventProperties).Recommendation; set => ((Microsoft.Azure.PowerShell.Cmdlets.Migrate.Models.Api20180901Preview.IMigrateEventPropertiesInternal)__migrateEventProperties).Recommendation = value ?? null; } /// Gets or sets the solution for which the error is being reported. [Microsoft.Azure.PowerShell.Cmdlets.Migrate.Origin(Microsoft.Azure.PowerShell.Cmdlets.Migrate.PropertyOrigin.Inherited)] - public string Solution { get => ((Microsoft.Azure.PowerShell.Cmdlets.Migrate.Models.Api20180901Preview.IMigrateEventPropertiesInternal)__migrateEventProperties).Solution; set => ((Microsoft.Azure.PowerShell.Cmdlets.Migrate.Models.Api20180901Preview.IMigrateEventPropertiesInternal)__migrateEventProperties).Solution = value; } + public string Solution { get => ((Microsoft.Azure.PowerShell.Cmdlets.Migrate.Models.Api20180901Preview.IMigrateEventPropertiesInternal)__migrateEventProperties).Solution; set => ((Microsoft.Azure.PowerShell.Cmdlets.Migrate.Models.Api20180901Preview.IMigrateEventPropertiesInternal)__migrateEventProperties).Solution = value ?? null; } /// Creates an new instance. public MachineMigrateEventProperties() diff --git a/src/Migrate/generated/api/Models/Api20180901Preview/ServersProjectSummary.cs b/src/Migrate/generated/api/Models/Api20180901Preview/ServersProjectSummary.cs index 0440d6dc0258..64c06f617e1d 100644 --- a/src/Migrate/generated/api/Models/Api20180901Preview/ServersProjectSummary.cs +++ b/src/Migrate/generated/api/Models/Api20180901Preview/ServersProjectSummary.cs @@ -30,7 +30,7 @@ public partial class ServersProjectSummary : /// Gets or sets the extended summary. [Microsoft.Azure.PowerShell.Cmdlets.Migrate.Origin(Microsoft.Azure.PowerShell.Cmdlets.Migrate.PropertyOrigin.Inherited)] - public Microsoft.Azure.PowerShell.Cmdlets.Migrate.Models.Api20180901Preview.IProjectSummaryExtendedSummary ExtendedSummary { get => ((Microsoft.Azure.PowerShell.Cmdlets.Migrate.Models.Api20180901Preview.IProjectSummaryInternal)__projectSummary).ExtendedSummary; set => ((Microsoft.Azure.PowerShell.Cmdlets.Migrate.Models.Api20180901Preview.IProjectSummaryInternal)__projectSummary).ExtendedSummary = value; } + public Microsoft.Azure.PowerShell.Cmdlets.Migrate.Models.Api20180901Preview.IProjectSummaryExtendedSummary ExtendedSummary { get => ((Microsoft.Azure.PowerShell.Cmdlets.Migrate.Models.Api20180901Preview.IProjectSummaryInternal)__projectSummary).ExtendedSummary; set => ((Microsoft.Azure.PowerShell.Cmdlets.Migrate.Models.Api20180901Preview.IProjectSummaryInternal)__projectSummary).ExtendedSummary = value ?? null /* model class */; } /// Gets the Instance type. [Microsoft.Azure.PowerShell.Cmdlets.Migrate.Origin(Microsoft.Azure.PowerShell.Cmdlets.Migrate.PropertyOrigin.Inherited)] @@ -38,7 +38,7 @@ public partial class ServersProjectSummary : /// Gets or sets the time when summary was last refreshed. [Microsoft.Azure.PowerShell.Cmdlets.Migrate.Origin(Microsoft.Azure.PowerShell.Cmdlets.Migrate.PropertyOrigin.Inherited)] - public global::System.DateTime? LastSummaryRefreshedTime { get => ((Microsoft.Azure.PowerShell.Cmdlets.Migrate.Models.Api20180901Preview.IProjectSummaryInternal)__projectSummary).LastSummaryRefreshedTime; set => ((Microsoft.Azure.PowerShell.Cmdlets.Migrate.Models.Api20180901Preview.IProjectSummaryInternal)__projectSummary).LastSummaryRefreshedTime = value; } + public global::System.DateTime? LastSummaryRefreshedTime { get => ((Microsoft.Azure.PowerShell.Cmdlets.Migrate.Models.Api20180901Preview.IProjectSummaryInternal)__projectSummary).LastSummaryRefreshedTime; set => ((Microsoft.Azure.PowerShell.Cmdlets.Migrate.Models.Api20180901Preview.IProjectSummaryInternal)__projectSummary).LastSummaryRefreshedTime = value ?? default(global::System.DateTime); } /// Internal Acessors for InstanceType string Microsoft.Azure.PowerShell.Cmdlets.Migrate.Models.Api20180901Preview.IProjectSummaryInternal.InstanceType { get => ((Microsoft.Azure.PowerShell.Cmdlets.Migrate.Models.Api20180901Preview.IProjectSummaryInternal)__projectSummary).InstanceType; set => ((Microsoft.Azure.PowerShell.Cmdlets.Migrate.Models.Api20180901Preview.IProjectSummaryInternal)__projectSummary).InstanceType = value; } @@ -52,7 +52,7 @@ public partial class ServersProjectSummary : /// Gets or sets the state of refresh summary. [Microsoft.Azure.PowerShell.Cmdlets.Migrate.Origin(Microsoft.Azure.PowerShell.Cmdlets.Migrate.PropertyOrigin.Inherited)] - public string RefreshSummaryState { get => ((Microsoft.Azure.PowerShell.Cmdlets.Migrate.Models.Api20180901Preview.IProjectSummaryInternal)__projectSummary).RefreshSummaryState; set => ((Microsoft.Azure.PowerShell.Cmdlets.Migrate.Models.Api20180901Preview.IProjectSummaryInternal)__projectSummary).RefreshSummaryState = value; } + public string RefreshSummaryState { get => ((Microsoft.Azure.PowerShell.Cmdlets.Migrate.Models.Api20180901Preview.IProjectSummaryInternal)__projectSummary).RefreshSummaryState; set => ((Microsoft.Azure.PowerShell.Cmdlets.Migrate.Models.Api20180901Preview.IProjectSummaryInternal)__projectSummary).RefreshSummaryState = value ?? null; } /// Backing field for property. private int? _replicatingCount; diff --git a/src/Migrate/generated/runtime/BuildTime/Cmdlets/ExportPsd1.cs b/src/Migrate/generated/runtime/BuildTime/Cmdlets/ExportPsd1.cs index a9e981c44a28..d0be28468078 100644 --- a/src/Migrate/generated/runtime/BuildTime/Cmdlets/ExportPsd1.cs +++ b/src/Migrate/generated/runtime/BuildTime/Cmdlets/ExportPsd1.cs @@ -49,7 +49,7 @@ protected override void ProcessRecord() throw new ArgumentException($"Custom folder '{CustomFolder}' does not exist"); } - string version = Convert.ToString(@"0.1.2"); + string version = Convert.ToString(@"0.2.1"); // Validate the module version should be semantic version // Following regex is official from https://semver.org/ Regex rx = new Regex(@"^(0|[1-9]\d*)\.(0|[1-9]\d*)\.(0|[1-9]\d*)(?:-((?:0|[1-9]\d*|\d*[a-zA-Z-][0-9a-zA-Z-]*)(?:\.(?:0|[1-9]\d*|\d*[a-zA-Z-][0-9a-zA-Z-]*))*))?(?:\+([0-9a-zA-Z-]+(?:\.[0-9a-zA-Z-]+)*))?$", RegexOptions.Compiled); diff --git a/src/Migrate/generated/runtime/BuildTime/Models/PsHelpMarkdownOutputs.cs b/src/Migrate/generated/runtime/BuildTime/Models/PsHelpMarkdownOutputs.cs index 57d230b230e9..eb2382103bb2 100644 --- a/src/Migrate/generated/runtime/BuildTime/Models/PsHelpMarkdownOutputs.cs +++ b/src/Migrate/generated/runtime/BuildTime/Models/PsHelpMarkdownOutputs.cs @@ -113,7 +113,7 @@ internal class ModulePageMetadataOutput { public PsModuleHelpInfo ModuleInfo { get; } - private static string HelpLinkPrefix { get; } = @"https://docs.microsoft.com/en-us/powershell/module/"; + private static string HelpLinkPrefix { get; } = @"https://docs.microsoft.com/powershell/module/"; public ModulePageMetadataOutput(PsModuleHelpInfo moduleInfo) { diff --git a/src/Migrate/generated/runtime/BuildTime/Models/PsProxyTypes.cs b/src/Migrate/generated/runtime/BuildTime/Models/PsProxyTypes.cs index 246d262c842d..a3b0363c8b7d 100644 --- a/src/Migrate/generated/runtime/BuildTime/Models/PsProxyTypes.cs +++ b/src/Migrate/generated/runtime/BuildTime/Models/PsProxyTypes.cs @@ -363,7 +363,7 @@ internal class CommentInfo public string OnlineVersion { get; } public string[] RelatedLinks { get; } - private const string HelpLinkPrefix = @"https://docs.microsoft.com/en-us/powershell/module/"; + private const string HelpLinkPrefix = @"https://docs.microsoft.com/powershell/module/"; public CommentInfo(VariantGroup variantGroup) { diff --git a/src/Migrate/help/Az.Migrate.md b/src/Migrate/help/Az.Migrate.md index 70f833bdc772..21d1fccf9b2a 100644 --- a/src/Migrate/help/Az.Migrate.md +++ b/src/Migrate/help/Az.Migrate.md @@ -47,6 +47,9 @@ Method to get a site. ### [Get-AzMigrateSolution](Get-AzMigrateSolution.md) Gets a solution in the migrate project. +### [Initialize-AzMigrateReplicationInfrastructure](Initialize-AzMigrateReplicationInfrastructure.md) +The Initialize-AzMigrateReplicationInfrastructure cmdlet initialises the infrastructure for the migrate project. + ### [New-AzMigrateDiskMapping](New-AzMigrateDiskMapping.md) The New-AzMigrateDiskMapping cmdlet creates a mapping of the source disk attached to the server to be migrated diff --git a/src/Migrate/help/Initialize-AzMigrateReplicationInfrastructure.md b/src/Migrate/help/Initialize-AzMigrateReplicationInfrastructure.md new file mode 100644 index 000000000000..2893acc9b61c --- /dev/null +++ b/src/Migrate/help/Initialize-AzMigrateReplicationInfrastructure.md @@ -0,0 +1,172 @@ +--- +external help file: +Module Name: Az.Migrate +online version: https://docs.microsoft.com/powershell/module/az.migrate/initialize-azmigratereplicationinfrastructure +schema: 2.0.0 +--- + +# Initialize-AzMigrateReplicationInfrastructure + +## SYNOPSIS +Initialises the infrastructure for the migrate project. + +## SYNTAX + +``` +Initialize-AzMigrateReplicationInfrastructure -ProjectName -ResourceGroupName + -Scenario -TargetRegion [-SubscriptionId ] [-DefaultProfile ] [-Confirm] + [-WhatIf] [] +``` + +## DESCRIPTION +The Initialize-AzMigrateReplicationInfrastructure cmdlet initialises the infrastructure for the migrate project. + +## EXAMPLES + +### Example 1: Initialises the infrastructure for the migrate project. +```powershell +PS C:\> Initialize-AzMigrateReplicationInfrastructure.ps1 -ResourceGroupName TestRG -ProjectName TestProject -Vmwareagentless -TargetRegion centralus + +True +``` + +Initialises the infrastructure for the migrate project. + +## PARAMETERS + +### -DefaultProfile +The credentials, account, tenant, and subscription used for communication with Azure. + +```yaml +Type: System.Management.Automation.PSObject +Parameter Sets: (All) +Aliases: AzureRMContext, AzureCredential + +Required: False +Position: Named +Default value: None +Accept pipeline input: False +Accept wildcard characters: False +``` + +### -ProjectName +Specifies the name of the Azure Migrate project to be used for server migration. + +```yaml +Type: System.String +Parameter Sets: (All) +Aliases: + +Required: True +Position: Named +Default value: None +Accept pipeline input: False +Accept wildcard characters: False +``` + +### -ResourceGroupName +Specifies the Resource Group of the Azure Migrate Project in the current subscription. + +```yaml +Type: System.String +Parameter Sets: (All) +Aliases: + +Required: True +Position: Named +Default value: None +Accept pipeline input: False +Accept wildcard characters: False +``` + +### -Scenario +Specifies the server migration scenario for which the replication infrastructure needs to be initialized. + +```yaml +Type: System.String +Parameter Sets: (All) +Aliases: + +Required: True +Position: Named +Default value: None +Accept pipeline input: False +Accept wildcard characters: False +``` + +### -SubscriptionId +Azure Subscription ID. + +```yaml +Type: System.String +Parameter Sets: (All) +Aliases: + +Required: False +Position: Named +Default value: (Get-AzContext).Subscription.Id +Accept pipeline input: False +Accept wildcard characters: False +``` + +### -TargetRegion +Specifies the target Azure region for server migrations. + +```yaml +Type: System.String +Parameter Sets: (All) +Aliases: + +Required: True +Position: Named +Default value: None +Accept pipeline input: False +Accept wildcard characters: False +``` + +### -Confirm +Prompts you for confirmation before running the cmdlet. + +```yaml +Type: System.Management.Automation.SwitchParameter +Parameter Sets: (All) +Aliases: cf + +Required: False +Position: Named +Default value: None +Accept pipeline input: False +Accept wildcard characters: False +``` + +### -WhatIf +Shows what would happen if the cmdlet runs. +The cmdlet is not run. + +```yaml +Type: System.Management.Automation.SwitchParameter +Parameter Sets: (All) +Aliases: wi + +Required: False +Position: Named +Default value: None +Accept pipeline input: False +Accept wildcard characters: False +``` + +### CommonParameters +This cmdlet supports the common parameters: -Debug, -ErrorAction, -ErrorVariable, -InformationAction, -InformationVariable, -OutVariable, -OutBuffer, -PipelineVariable, -Verbose, -WarningAction, and -WarningVariable. For more information, see [about_CommonParameters](http://go.microsoft.com/fwlink/?LinkID=113216). + +## INPUTS + +## OUTPUTS + +### System.Boolean + +## NOTES + +ALIASES + +## RELATED LINKS + diff --git a/src/Migrate/help/New-AzMigrateDiskMapping.md b/src/Migrate/help/New-AzMigrateDiskMapping.md index 18cba7a78e66..9597b4dfacb4 100644 --- a/src/Migrate/help/New-AzMigrateDiskMapping.md +++ b/src/Migrate/help/New-AzMigrateDiskMapping.md @@ -13,7 +13,7 @@ Creates a new disk mapping ## SYNTAX ``` -New-AzMigrateDiskMapping -DiskID -DiskType -IsOSDisk +New-AzMigrateDiskMapping -DiskID -DiskType -IsOSDisk [-DiskEncryptionSetID ] [] ``` @@ -69,7 +69,7 @@ Accept wildcard characters: False Specifies the type of disks to be used for the Azure VM. ```yaml -Type: Microsoft.Azure.PowerShell.Cmdlets.Migrate.Support.DiskAccountType +Type: System.String Parameter Sets: (All) Aliases: diff --git a/src/Migrate/help/New-AzMigrateServerReplication.md b/src/Migrate/help/New-AzMigrateServerReplication.md index 678d3ce03309..3e3ca222a05d 100644 --- a/src/Migrate/help/New-AzMigrateServerReplication.md +++ b/src/Migrate/help/New-AzMigrateServerReplication.md @@ -14,17 +14,17 @@ Starts replication for the specified server. ### ByIdDefaultUser (Default) ``` -New-AzMigrateServerReplication -DiskType -LicenseType -MachineId - -OSDiskID -TargetNetworkId -TargetResourceGroupId -TargetSubnetName - -TargetVMName [-DiskEncryptionSetID ] [-PerformAutoResync ] - [-SubscriptionId ] [-TargetAvailabilitySet ] [-TargetAvailabilityZone ] +New-AzMigrateServerReplication -DiskType -LicenseType -MachineId -OSDiskID + -TargetNetworkId -TargetResourceGroupId -TargetSubnetName -TargetVMName + [-DiskEncryptionSetID ] [-PerformAutoResync ] [-SubscriptionId ] + [-TargetAvailabilitySet ] [-TargetAvailabilityZone ] [-TargetBootDiagnosticsStorageAccount ] [-TargetVMSize ] [-VMWarerunasaccountID ] [-DefaultProfile ] [] ``` ### ByIdPowerUser ``` -New-AzMigrateServerReplication -DiskToInclude -LicenseType +New-AzMigrateServerReplication -DiskToInclude -LicenseType -MachineId -TargetNetworkId -TargetResourceGroupId -TargetSubnetName -TargetVMName [-PerformAutoResync ] [-SubscriptionId ] [-TargetAvailabilitySet ] [-TargetAvailabilityZone ] @@ -34,19 +34,19 @@ New-AzMigrateServerReplication -DiskToInclude -LicenseTy ### ByInputObjectDefaultUser ``` -New-AzMigrateServerReplication -DiskType -InputObject - -LicenseType -OSDiskID -TargetNetworkId -TargetResourceGroupId - -TargetSubnetName -TargetVMName [-DiskEncryptionSetID ] - [-PerformAutoResync ] [-SubscriptionId ] [-TargetAvailabilitySet ] - [-TargetAvailabilityZone ] [-TargetBootDiagnosticsStorageAccount ] [-TargetVMSize ] - [-VMWarerunasaccountID ] [-DefaultProfile ] [] +New-AzMigrateServerReplication -DiskType -InputObject -LicenseType + -OSDiskID -TargetNetworkId -TargetResourceGroupId -TargetSubnetName + -TargetVMName [-DiskEncryptionSetID ] [-PerformAutoResync ] + [-SubscriptionId ] [-TargetAvailabilitySet ] [-TargetAvailabilityZone ] + [-TargetBootDiagnosticsStorageAccount ] [-TargetVMSize ] [-VMWarerunasaccountID ] + [-DefaultProfile ] [] ``` ### ByInputObjectPowerUser ``` New-AzMigrateServerReplication -DiskToInclude -InputObject - -LicenseType -TargetNetworkId -TargetResourceGroupId - -TargetSubnetName -TargetVMName [-PerformAutoResync ] [-SubscriptionId ] + -LicenseType -TargetNetworkId -TargetResourceGroupId -TargetSubnetName + -TargetVMName [-PerformAutoResync ] [-SubscriptionId ] [-TargetAvailabilitySet ] [-TargetAvailabilityZone ] [-TargetBootDiagnosticsStorageAccount ] [-TargetVMSize ] [-VMWarerunasaccountID ] [-DefaultProfile ] [] @@ -169,7 +169,7 @@ Accept wildcard characters: False Specifies the type of disks to be used for the Azure VM. ```yaml -Type: Microsoft.Azure.PowerShell.Cmdlets.Migrate.Support.DiskAccountType +Type: System.String Parameter Sets: ByIdDefaultUser, ByInputObjectDefaultUser Aliases: @@ -201,7 +201,7 @@ Accept wildcard characters: False Specifies if Azure Hybrid benefit is applicable for the source server to be migrated. ```yaml -Type: Microsoft.Azure.PowerShell.Cmdlets.Migrate.Support.LicenseType +Type: System.String Parameter Sets: (All) Aliases: diff --git a/src/Migrate/internal/Get-AzMigrateMachine.ps1 b/src/Migrate/internal/Get-AzMigrateMachine.ps1 index 1c526f0e62ec..3fca6f036b84 100644 --- a/src/Migrate/internal/Get-AzMigrateMachine.ps1 +++ b/src/Migrate/internal/Get-AzMigrateMachine.ps1 @@ -30,7 +30,7 @@ PS C:\> {{ Add code here }} .Outputs Microsoft.Azure.PowerShell.Cmdlets.Migrate.Models.Api202001.IVMwareMachine .Link -https://docs.microsoft.com/en-us/powershell/module/az.migrate/get-azmigratemachine +https://docs.microsoft.com/powershell/module/az.migrate/get-azmigratemachine #> function Get-AzMigrateMachine { [OutputType([Microsoft.Azure.PowerShell.Cmdlets.Migrate.Models.Api202001.IVMwareMachine])] diff --git a/src/Migrate/internal/Get-AzMigrateOperation.ps1 b/src/Migrate/internal/Get-AzMigrateOperation.ps1 index 2991c0475504..825626a1eadd 100644 --- a/src/Migrate/internal/Get-AzMigrateOperation.ps1 +++ b/src/Migrate/internal/Get-AzMigrateOperation.ps1 @@ -32,7 +32,7 @@ Microsoft.Azure.PowerShell.Cmdlets.Migrate.Models.Api20180110.IOperationsDiscove .Outputs Microsoft.Azure.PowerShell.Cmdlets.Migrate.Models.Api20180901Preview.IOperation .Link -https://docs.microsoft.com/en-us/powershell/module/az.migrate/get-azmigrateoperation +https://docs.microsoft.com/powershell/module/az.migrate/get-azmigrateoperation #> function Get-AzMigrateOperation { [OutputType([Microsoft.Azure.PowerShell.Cmdlets.Migrate.Models.Api20180901Preview.IOperation], [Microsoft.Azure.PowerShell.Cmdlets.Migrate.Models.Api20180110.IOperationsDiscovery])] diff --git a/src/Migrate/internal/Get-AzMigrateReplicationJob.ps1 b/src/Migrate/internal/Get-AzMigrateReplicationJob.ps1 index 7795b86e896d..b0f34cdc9dc8 100644 --- a/src/Migrate/internal/Get-AzMigrateReplicationJob.ps1 +++ b/src/Migrate/internal/Get-AzMigrateReplicationJob.ps1 @@ -30,7 +30,7 @@ PS C:\> {{ Add code here }} .Outputs Microsoft.Azure.PowerShell.Cmdlets.Migrate.Models.Api20180110.IJob .Link -https://docs.microsoft.com/en-us/powershell/module/az.migrate/get-azmigratereplicationjob +https://docs.microsoft.com/powershell/module/az.migrate/get-azmigratereplicationjob #> function Get-AzMigrateReplicationJob { [OutputType([Microsoft.Azure.PowerShell.Cmdlets.Migrate.Models.Api20180110.IJob])] diff --git a/src/Migrate/internal/Get-AzMigrateReplicationMigrationItem.ps1 b/src/Migrate/internal/Get-AzMigrateReplicationMigrationItem.ps1 index 4f2c150ad3d8..9f2c8247b1c7 100644 --- a/src/Migrate/internal/Get-AzMigrateReplicationMigrationItem.ps1 +++ b/src/Migrate/internal/Get-AzMigrateReplicationMigrationItem.ps1 @@ -30,7 +30,7 @@ PS C:\> {{ Add code here }} .Outputs Microsoft.Azure.PowerShell.Cmdlets.Migrate.Models.Api20180110.IMigrationItem .Link -https://docs.microsoft.com/en-us/powershell/module/az.migrate/get-azmigratereplicationmigrationitem +https://docs.microsoft.com/powershell/module/az.migrate/get-azmigratereplicationmigrationitem #> function Get-AzMigrateReplicationMigrationItem { [OutputType([Microsoft.Azure.PowerShell.Cmdlets.Migrate.Models.Api20180110.IMigrationItem])] diff --git a/src/Migrate/internal/Invoke-AzMigrateResyncReplicationMigrationItem.ps1 b/src/Migrate/internal/Invoke-AzMigrateResyncReplicationMigrationItem.ps1 index 89782924fc25..56603a4cc7fc 100644 --- a/src/Migrate/internal/Invoke-AzMigrateResyncReplicationMigrationItem.ps1 +++ b/src/Migrate/internal/Invoke-AzMigrateResyncReplicationMigrationItem.ps1 @@ -37,7 +37,7 @@ To create the parameters described below, construct a hash table containing the PROVIDERSPECIFICDETAIL : The provider specific details. InstanceType : The class type. .Link -https://docs.microsoft.com/en-us/powershell/module/az.migrate/invoke-azmigrateresyncreplicationmigrationitem +https://docs.microsoft.com/powershell/module/az.migrate/invoke-azmigrateresyncreplicationmigrationitem #> function Invoke-AzMigrateResyncReplicationMigrationItem { [OutputType([Microsoft.Azure.PowerShell.Cmdlets.Migrate.Models.Api20180110.IMigrationItem])] diff --git a/src/Migrate/internal/Move-AzMigrateReplicationMigrationItem.ps1 b/src/Migrate/internal/Move-AzMigrateReplicationMigrationItem.ps1 index ace4b331412b..3a63b375df03 100644 --- a/src/Migrate/internal/Move-AzMigrateReplicationMigrationItem.ps1 +++ b/src/Migrate/internal/Move-AzMigrateReplicationMigrationItem.ps1 @@ -37,7 +37,7 @@ To create the parameters described below, construct a hash table containing the PROVIDERSPECIFICDETAIL : The provider specific details. InstanceType : The class type. .Link -https://docs.microsoft.com/en-us/powershell/module/az.migrate/move-azmigratereplicationmigrationitem +https://docs.microsoft.com/powershell/module/az.migrate/move-azmigratereplicationmigrationitem #> function Move-AzMigrateReplicationMigrationItem { [OutputType([Microsoft.Azure.PowerShell.Cmdlets.Migrate.Models.Api20180110.IMigrationItem])] diff --git a/src/Migrate/internal/New-AzMigrateReplicationMigrationItem.ps1 b/src/Migrate/internal/New-AzMigrateReplicationMigrationItem.ps1 index 10d3eb342004..11d47915afff 100644 --- a/src/Migrate/internal/New-AzMigrateReplicationMigrationItem.ps1 +++ b/src/Migrate/internal/New-AzMigrateReplicationMigrationItem.ps1 @@ -37,7 +37,7 @@ To create the parameters described below, construct a hash table containing the PROVIDERSPECIFICDETAIL : The provider specific details. InstanceType : The class type. .Link -https://docs.microsoft.com/en-us/powershell/module/az.migrate/new-azmigratereplicationmigrationitem +https://docs.microsoft.com/powershell/module/az.migrate/new-azmigratereplicationmigrationitem #> function New-AzMigrateReplicationMigrationItem { [OutputType([Microsoft.Azure.PowerShell.Cmdlets.Migrate.Models.Api20180110.IMigrationItem])] diff --git a/src/Migrate/internal/ProxyCmdletDefinitions.ps1 b/src/Migrate/internal/ProxyCmdletDefinitions.ps1 index 75dd585fdb3b..a966809240bc 100644 --- a/src/Migrate/internal/ProxyCmdletDefinitions.ps1 +++ b/src/Migrate/internal/ProxyCmdletDefinitions.ps1 @@ -30,7 +30,7 @@ PS C:\> {{ Add code here }} .Outputs Microsoft.Azure.PowerShell.Cmdlets.Migrate.Models.Api202001.IVMwareMachine .Link -https://docs.microsoft.com/en-us/powershell/module/az.migrate/get-azmigratemachine +https://docs.microsoft.com/powershell/module/az.migrate/get-azmigratemachine #> function Get-AzMigrateMachine { [OutputType([Microsoft.Azure.PowerShell.Cmdlets.Migrate.Models.Api202001.IVMwareMachine])] @@ -208,7 +208,7 @@ Microsoft.Azure.PowerShell.Cmdlets.Migrate.Models.Api20180110.IOperationsDiscove .Outputs Microsoft.Azure.PowerShell.Cmdlets.Migrate.Models.Api20180901Preview.IOperation .Link -https://docs.microsoft.com/en-us/powershell/module/az.migrate/get-azmigrateoperation +https://docs.microsoft.com/powershell/module/az.migrate/get-azmigrateoperation #> function Get-AzMigrateOperation { [OutputType([Microsoft.Azure.PowerShell.Cmdlets.Migrate.Models.Api20180901Preview.IOperation], [Microsoft.Azure.PowerShell.Cmdlets.Migrate.Models.Api20180110.IOperationsDiscovery])] @@ -347,7 +347,7 @@ PS C:\> {{ Add code here }} .Outputs Microsoft.Azure.PowerShell.Cmdlets.Migrate.Models.Api20180110.IJob .Link -https://docs.microsoft.com/en-us/powershell/module/az.migrate/get-azmigratereplicationjob +https://docs.microsoft.com/powershell/module/az.migrate/get-azmigratereplicationjob #> function Get-AzMigrateReplicationJob { [OutputType([Microsoft.Azure.PowerShell.Cmdlets.Migrate.Models.Api20180110.IJob])] @@ -503,7 +503,7 @@ PS C:\> {{ Add code here }} .Outputs Microsoft.Azure.PowerShell.Cmdlets.Migrate.Models.Api20180110.IMigrationItem .Link -https://docs.microsoft.com/en-us/powershell/module/az.migrate/get-azmigratereplicationmigrationitem +https://docs.microsoft.com/powershell/module/az.migrate/get-azmigratereplicationmigrationitem #> function Get-AzMigrateReplicationMigrationItem { [OutputType([Microsoft.Azure.PowerShell.Cmdlets.Migrate.Models.Api20180110.IMigrationItem])] @@ -687,7 +687,7 @@ To create the parameters described below, construct a hash table containing the PROVIDERSPECIFICDETAIL : The provider specific details. InstanceType : The class type. .Link -https://docs.microsoft.com/en-us/powershell/module/az.migrate/invoke-azmigrateresyncreplicationmigrationitem +https://docs.microsoft.com/powershell/module/az.migrate/invoke-azmigrateresyncreplicationmigrationitem #> function Invoke-AzMigrateResyncReplicationMigrationItem { [OutputType([Microsoft.Azure.PowerShell.Cmdlets.Migrate.Models.Api20180110.IMigrationItem])] @@ -874,7 +874,7 @@ To create the parameters described below, construct a hash table containing the PROVIDERSPECIFICDETAIL : The provider specific details. InstanceType : The class type. .Link -https://docs.microsoft.com/en-us/powershell/module/az.migrate/move-azmigratereplicationmigrationitem +https://docs.microsoft.com/powershell/module/az.migrate/move-azmigratereplicationmigrationitem #> function Move-AzMigrateReplicationMigrationItem { [OutputType([Microsoft.Azure.PowerShell.Cmdlets.Migrate.Models.Api20180110.IMigrationItem])] @@ -1061,7 +1061,7 @@ To create the parameters described below, construct a hash table containing the PROVIDERSPECIFICDETAIL : The provider specific details. InstanceType : The class type. .Link -https://docs.microsoft.com/en-us/powershell/module/az.migrate/new-azmigratereplicationmigrationitem +https://docs.microsoft.com/powershell/module/az.migrate/new-azmigratereplicationmigrationitem #> function New-AzMigrateReplicationMigrationItem { [OutputType([Microsoft.Azure.PowerShell.Cmdlets.Migrate.Models.Api20180110.IMigrationItem])] @@ -1247,7 +1247,7 @@ PS C:\> {{ Add code here }} .Outputs System.Boolean .Link -https://docs.microsoft.com/en-us/powershell/module/az.migrate/remove-azmigratereplicationmigrationitem +https://docs.microsoft.com/powershell/module/az.migrate/remove-azmigratereplicationmigrationitem #> function Remove-AzMigrateReplicationMigrationItem { [OutputType([System.Boolean])] @@ -1440,7 +1440,7 @@ PROPERTY : Gets or sets the nested properties. [ProvisioningState ]: Provisioning state of the migrate project. [RegisteredTool ]: Gets or sets the list of tools registered with the migrate project. .Link -https://docs.microsoft.com/en-us/powershell/module/az.migrate/set-azmigrateproject +https://docs.microsoft.com/powershell/module/az.migrate/set-azmigrateproject #> function Set-AzMigrateProject { [OutputType([Microsoft.Azure.PowerShell.Cmdlets.Migrate.Models.Api20180901Preview.IMigrateProject])] @@ -1639,7 +1639,7 @@ BODY : Site REST Resource. [Tag ]: Dictionary of [(Any) ]: This indicates any property can be added to this object. .Link -https://docs.microsoft.com/en-us/powershell/module/az.migrate/set-azmigratesite +https://docs.microsoft.com/powershell/module/az.migrate/set-azmigratesite #> function Set-AzMigrateSite { [OutputType([Microsoft.Azure.PowerShell.Cmdlets.Migrate.Models.Api202001.IVMwareSite])] @@ -1876,7 +1876,7 @@ PS C:\> {{ Add code here }} .Outputs Microsoft.Azure.PowerShell.Cmdlets.Migrate.Models.Api20180110.IMigrationItem .Link -https://docs.microsoft.com/en-us/powershell/module/az.migrate/test-azmigratereplicationmigrationitemmigratecleanup +https://docs.microsoft.com/powershell/module/az.migrate/test-azmigratereplicationmigrationitemmigratecleanup #> function Test-AzMigrateReplicationMigrationItemMigrateCleanup { [OutputType([Microsoft.Azure.PowerShell.Cmdlets.Migrate.Models.Api20180110.IMigrationItem])] @@ -2062,7 +2062,7 @@ To create the parameters described below, construct a hash table containing the PROVIDERSPECIFICDETAIL : The provider specific details. InstanceType : The class type. .Link -https://docs.microsoft.com/en-us/powershell/module/az.migrate/test-azmigratereplicationmigrationitemmigrate +https://docs.microsoft.com/powershell/module/az.migrate/test-azmigratereplicationmigrationitemmigrate #> function Test-AzMigrateReplicationMigrationItemMigrate { [OutputType([Microsoft.Azure.PowerShell.Cmdlets.Migrate.Models.Api20180110.IMigrationItem])] @@ -2249,7 +2249,7 @@ To create the parameters described below, construct a hash table containing the PROVIDERSPECIFICDETAIL : The provider specific input to update migration item. [InstanceType ]: The class type. .Link -https://docs.microsoft.com/en-us/powershell/module/az.migrate/update-azmigratereplicationmigrationitem +https://docs.microsoft.com/powershell/module/az.migrate/update-azmigratereplicationmigrationitem #> function Update-AzMigrateReplicationMigrationItem { [OutputType([Microsoft.Azure.PowerShell.Cmdlets.Migrate.Models.Api20180110.IMigrationItem])] diff --git a/src/Migrate/internal/Remove-AzMigrateReplicationMigrationItem.ps1 b/src/Migrate/internal/Remove-AzMigrateReplicationMigrationItem.ps1 index a6e5f26434a5..34fadb2b157c 100644 --- a/src/Migrate/internal/Remove-AzMigrateReplicationMigrationItem.ps1 +++ b/src/Migrate/internal/Remove-AzMigrateReplicationMigrationItem.ps1 @@ -30,7 +30,7 @@ PS C:\> {{ Add code here }} .Outputs System.Boolean .Link -https://docs.microsoft.com/en-us/powershell/module/az.migrate/remove-azmigratereplicationmigrationitem +https://docs.microsoft.com/powershell/module/az.migrate/remove-azmigratereplicationmigrationitem #> function Remove-AzMigrateReplicationMigrationItem { [OutputType([System.Boolean])] diff --git a/src/Migrate/internal/Set-AzMigrateProject.ps1 b/src/Migrate/internal/Set-AzMigrateProject.ps1 index 6cd0e9b695aa..8e7c07675387 100644 --- a/src/Migrate/internal/Set-AzMigrateProject.ps1 +++ b/src/Migrate/internal/Set-AzMigrateProject.ps1 @@ -38,7 +38,7 @@ PROPERTY : Gets or sets the nested properties. [ProvisioningState ]: Provisioning state of the migrate project. [RegisteredTool ]: Gets or sets the list of tools registered with the migrate project. .Link -https://docs.microsoft.com/en-us/powershell/module/az.migrate/set-azmigrateproject +https://docs.microsoft.com/powershell/module/az.migrate/set-azmigrateproject #> function Set-AzMigrateProject { [OutputType([Microsoft.Azure.PowerShell.Cmdlets.Migrate.Models.Api20180901Preview.IMigrateProject])] diff --git a/src/Migrate/internal/Set-AzMigrateSite.ps1 b/src/Migrate/internal/Set-AzMigrateSite.ps1 index 3659546a3dbe..099e41824db4 100644 --- a/src/Migrate/internal/Set-AzMigrateSite.ps1 +++ b/src/Migrate/internal/Set-AzMigrateSite.ps1 @@ -53,7 +53,7 @@ BODY : Site REST Resource. [Tag ]: Dictionary of [(Any) ]: This indicates any property can be added to this object. .Link -https://docs.microsoft.com/en-us/powershell/module/az.migrate/set-azmigratesite +https://docs.microsoft.com/powershell/module/az.migrate/set-azmigratesite #> function Set-AzMigrateSite { [OutputType([Microsoft.Azure.PowerShell.Cmdlets.Migrate.Models.Api202001.IVMwareSite])] diff --git a/src/Migrate/internal/Test-AzMigrateReplicationMigrationItemMigrate.ps1 b/src/Migrate/internal/Test-AzMigrateReplicationMigrationItemMigrate.ps1 index b1a780c1162f..a30d1ef605c3 100644 --- a/src/Migrate/internal/Test-AzMigrateReplicationMigrationItemMigrate.ps1 +++ b/src/Migrate/internal/Test-AzMigrateReplicationMigrationItemMigrate.ps1 @@ -37,7 +37,7 @@ To create the parameters described below, construct a hash table containing the PROVIDERSPECIFICDETAIL : The provider specific details. InstanceType : The class type. .Link -https://docs.microsoft.com/en-us/powershell/module/az.migrate/test-azmigratereplicationmigrationitemmigrate +https://docs.microsoft.com/powershell/module/az.migrate/test-azmigratereplicationmigrationitemmigrate #> function Test-AzMigrateReplicationMigrationItemMigrate { [OutputType([Microsoft.Azure.PowerShell.Cmdlets.Migrate.Models.Api20180110.IMigrationItem])] diff --git a/src/Migrate/internal/Test-AzMigrateReplicationMigrationItemMigrateCleanup.ps1 b/src/Migrate/internal/Test-AzMigrateReplicationMigrationItemMigrateCleanup.ps1 index fa5288acbbb9..14b3123b90ff 100644 --- a/src/Migrate/internal/Test-AzMigrateReplicationMigrationItemMigrateCleanup.ps1 +++ b/src/Migrate/internal/Test-AzMigrateReplicationMigrationItemMigrateCleanup.ps1 @@ -30,7 +30,7 @@ PS C:\> {{ Add code here }} .Outputs Microsoft.Azure.PowerShell.Cmdlets.Migrate.Models.Api20180110.IMigrationItem .Link -https://docs.microsoft.com/en-us/powershell/module/az.migrate/test-azmigratereplicationmigrationitemmigratecleanup +https://docs.microsoft.com/powershell/module/az.migrate/test-azmigratereplicationmigrationitemmigratecleanup #> function Test-AzMigrateReplicationMigrationItemMigrateCleanup { [OutputType([Microsoft.Azure.PowerShell.Cmdlets.Migrate.Models.Api20180110.IMigrationItem])] diff --git a/src/Migrate/internal/Update-AzMigrateReplicationMigrationItem.ps1 b/src/Migrate/internal/Update-AzMigrateReplicationMigrationItem.ps1 index 5d0a9ecfff06..869c687df12c 100644 --- a/src/Migrate/internal/Update-AzMigrateReplicationMigrationItem.ps1 +++ b/src/Migrate/internal/Update-AzMigrateReplicationMigrationItem.ps1 @@ -37,7 +37,7 @@ To create the parameters described below, construct a hash table containing the PROVIDERSPECIFICDETAIL : The provider specific input to update migration item. [InstanceType ]: The class type. .Link -https://docs.microsoft.com/en-us/powershell/module/az.migrate/update-azmigratereplicationmigrationitem +https://docs.microsoft.com/powershell/module/az.migrate/update-azmigratereplicationmigrationitem #> function Update-AzMigrateReplicationMigrationItem { [OutputType([Microsoft.Azure.PowerShell.Cmdlets.Migrate.Models.Api20180110.IMigrationItem])] diff --git a/src/Migrate/readme.md b/src/Migrate/readme.md index 67f7b348d3d3..538ea19e4654 100644 --- a/src/Migrate/readme.md +++ b/src/Migrate/readme.md @@ -54,7 +54,7 @@ input-file: - $(repo)/specification/migrateprojects/resource-manager/Microsoft.Migrate/preview/2018-09-01-preview/migrate.json - $(repo)/specification/recoveryservicessiterecovery/resource-manager/Microsoft.RecoveryServices/stable/2018-01-10/service.json -module-version: 0.1.2 +module-version: 0.2.1 title: Migrate subject-prefix: 'Migrate' diff --git a/src/Migrate/test/Initialize-AzMigrateReplicationInfrastructure.Tests.ps1 b/src/Migrate/test/Initialize-AzMigrateReplicationInfrastructure.Tests.ps1 new file mode 100644 index 000000000000..443cf11cf291 --- /dev/null +++ b/src/Migrate/test/Initialize-AzMigrateReplicationInfrastructure.Tests.ps1 @@ -0,0 +1,19 @@ +$loadEnvPath = Join-Path $PSScriptRoot 'loadEnv.ps1' +if (-Not (Test-Path -Path $loadEnvPath)) { + $loadEnvPath = Join-Path $PSScriptRoot '..\loadEnv.ps1' +} +. ($loadEnvPath) +$TestRecordingFile = Join-Path $PSScriptRoot 'Initialize-AzMigrateReplicationInfrastructure.Recording.json' +$currentPath = $PSScriptRoot +while(-not $mockingPath) { + $mockingPath = Get-ChildItem -Path $currentPath -Recurse -Include 'HttpPipelineMocking.ps1' -File + $currentPath = Split-Path -Path $currentPath -Parent +} +. ($mockingPath | Select-Object -First 1).FullName + +Describe 'Initialize-AzMigrateReplicationInfrastructure' { + It 'Default' -skip { + $response = Initialize-AzMigrateReplicationInfrastructure -ProjectName $env.srsinitinfraProjectName -ResourceGroupName $env.srsinitinfraResourceGroupName -Scenario $env.srsinitinfraScenario -TargetRegion $env.srsinitinfraTargetRegion + $response | Should -Be $true + } +} diff --git a/src/Migrate/test/env.json b/src/Migrate/test/env.json index 3aba379a96c1..71fe1ddaf84d 100644 --- a/src/Migrate/test/env.json +++ b/src/Migrate/test/env.json @@ -1,53 +1,58 @@ { + "srsMappingName": "containermapping", + "srsMachineName": "bcdr-vcenter-fareast-corp-micro-cfcc5a24-a40e-56b9-a6af-e206c9ca4f93_50063baa-9806-d6d6-7e09-c0ae87309b4f", + "srsMachineIdtempf": "/Subscriptions/7c943c1b-5122-4097-90c8-861411bdd574/resourceGroups/azmigratepwshtestasr13072020/providers/Microsoft.RecoveryServices/vaults/AzMigrateTestProjectPWSH02aarsvault/replicationFabrics/AzMigratePWSHTc8d1replicationfabric/replicationProtectionContainers/AzMigratePWSHTc8d1replicationcontainer/replicationMigrationItems/bcdr-vcenter-fareast-corp-micro-cfcc5a24-a40e-56b9-a6af-e206c9ca4f93_500f44f8-2aa3-587b-8958-ead358639629", + "srsinitinfraScenario": "agentlessVMware", + "srsGetSDSMachineID": "/subscriptions/7c943c1b-5122-4097-90c8-861411bdd574/resourceGroups/azmigratepwshtestasr13072020/providers/Microsoft.OffAzure/VMwareSites/AzMigratePWSHTc8d1site/machines/bcdr-vcenter-fareast-corp-micro-cfcc5a24-a40e-56b9-a6af-e206c9ca4f93_50063baa-9806-d6d6-7e09-c0ae87309b4f", + "srsinitinfraTargetRegion": "eastus", + "srsJobName": "997e2a92-5afe-49c7-a81a-89660aec9b7b", + "srsTgtVMName": "prsadhu-TestVM", + "SubscriptionId": null, + "srsMachineNametempe": "bcdr-vcenter-fareast-corp-micro-cfcc5a24-a40e-56b9-a6af-e206c9ca4f93_50063baa-9806-d6d6-7e09-c0ae87309b4f", + "migApplianceName": "BBVMwareAVS", "srsSubscriptionId": "7c943c1b-5122-4097-90c8-861411bdd574", - "Tenant": "72f988bf-86f1-41af-91ab-2d7cd011db47", + "srsMachinetmpv": "/Subscriptions/7c943c1b-5122-4097-90c8-861411bdd574/resourceGroups/azmigratepwshtestasr13072020/providers/Microsoft.RecoveryServices/vaults/AzMigrateTestProjectPWSH02aarsvault/replicationFabrics/AzMigratePWSHTc8d1replicationfabric/replicationProtectionContainers/AzMigratePWSHTc8d1replicationcontainer/replicationMigrationItems/bcdr-vcenter-fareast-corp-micro-cfcc5a24-a40e-56b9-a6af-e206c9ca4f93_50069ee3-0b88-6414-0a82-acd37b6dc092", + "srsinitinfraResourceGroupName": "prsadhu-testSrcRG", + "migSolutionName": "Servers-Migration-ServerMigration", + "srsMachineNametempa": "bcdr-vcenter-fareast-corp-micro-cfcc5a24-a40e-56b9-a6af-e206c9ca4f93_525a684f-3131-8b5c-2eb5-2e690eedc30c", + "srsFabricName": "AzMigratePWSHTc8d1replicationfabric", + "migProjectName": "BugBashAVSVMware", + "srsProtectionContainerName": "AzMigratePWSHTc8d1replicationcontainer", + "migSubscriptionId": "31be0ff4-c932-4cb3-8efc-efa411d79280", "migSiteName": "BBVMwareAVScbbcsite", - "srsProjectName": "AzMigrateTestProjectPWSH", - "srsTgtVMName": "prsadhu-TestVM", + "srsTenant": "72f988bf-86f1-41af-91ab-2d7cd011db47", + "srsProviderName": "AzMigratePWSHTc8d1dra", + "srsLicense": "NoLicenseType", "srsSDSSite": "AzMigratePWSHTc8d1site", - "migResourceGroup": "BugBashAVSVMware", - "srsGetSDSMachineID": "/subscriptions/7c943c1b-5122-4097-90c8-861411bdd574/resourceGroups/azmigratepwshtestasr13072020/providers/Microsoft.OffAzure/VMwareSites/AzMigratePWSHTc8d1site/machines/bcdr-vcenter-fareast-corp-micro-cfcc5a24-a40e-56b9-a6af-e206c9ca4f93_50063baa-9806-d6d6-7e09-c0ae87309b4f", - "srsMachineIdtempb": "/Subscriptions/7c943c1b-5122-4097-90c8-861411bdd574/resourceGroups/azmigratepwshtestasr13072020/providers/Microsoft.RecoveryServices/vaults/AzMigrateTestProjectPWSH02aarsvault/replicationFabrics/AzMigratePWSHTc8d1replicationfabric/replicationProtectionContainers/AzMigratePWSHTc8d1replicationcontainer/replicationMigrationItems/bcdr-vcenter-fareast-corp-micro-cfcc5a24-a40e-56b9-a6af-e206c9ca4f93_50351613-0fc1-0a93-8e65-6db3410fe9a4", - "srsMachineIdtempd": "/Subscriptions/7c943c1b-5122-4097-90c8-861411bdd574/resourceGroups/azmigratepwshtestasr13072020/providers/Microsoft.RecoveryServices/vaults/AzMigrateTestProjectPWSH02aarsvault/replicationFabrics/AzMigratePWSHTc8d1replicationfabric/replicationProtectionContainers/AzMigratePWSHTc8d1replicationcontainer/replicationMigrationItems/bcdr-vcenter-fareast-corp-micro-cfcc5a24-a40e-56b9-a6af-e206c9ca4f93_50351613-0fc1-0a93-8e65-6db3410fe9a4", "srsMachinetempz": "/Subscriptions/7c943c1b-5122-4097-90c8-861411bdd574/resourceGroups/azmigratepwshtestasr13072020/providers/Microsoft.RecoveryServices/vaults/AzMigrateTestProjectPWSH02aarsvault/replicationFabrics/AzMigratePWSHTc8d1replicationfabric/replicationProtectionContainers/AzMigratePWSHTc8d1replicationcontainer/replicationMigrationItems/bcdr-vcenter-fareast-corp-micro-cfcc5a24-a40e-56b9-a6af-e206c9ca4f93_50069ee3-0b88-6414-0a82-acd37b6dc092", - "migVMwareMachineName": "10-150-8-52-b090bef3-b733-5e34-bc8f-eb6f2701432a_50098b08-5701-4c58-f6ad-1daf127a8ed9", - "srsDiskId": "6000C299-343d-7bcd-c05e-a94bd63316dd", - "srsMachineName": "bcdr-vcenter-fareast-corp-micro-cfcc5a24-a40e-56b9-a6af-e206c9ca4f93_50063baa-9806-d6d6-7e09-c0ae87309b4f", - "srsMachinetmpv": "/Subscriptions/7c943c1b-5122-4097-90c8-861411bdd574/resourceGroups/azmigratepwshtestasr13072020/providers/Microsoft.RecoveryServices/vaults/AzMigrateTestProjectPWSH02aarsvault/replicationFabrics/AzMigratePWSHTc8d1replicationfabric/replicationProtectionContainers/AzMigratePWSHTc8d1replicationcontainer/replicationMigrationItems/bcdr-vcenter-fareast-corp-micro-cfcc5a24-a40e-56b9-a6af-e206c9ca4f93_50069ee3-0b88-6414-0a82-acd37b6dc092", + "srsSDSMachineId": "/subscriptions/7c943c1b-5122-4097-90c8-861411bdd574/resourceGroups/azmigratepwshtestasr13072020/providers/Microsoft.OffAzure/VMwareSites/AzMigratePWSHTc8d1site/machines/bcdr-vcenter-fareast-corp-micro-cfcc5a24-a40e-56b9-a6af-e206c9ca4f93_50063baa-9806-d6d6-7e09-c0ae87309b4f", + "srsResourceGroup": "azmigratepwshtestasr13072020", + "srsTargetPCId": "Microsoft Azure", "srsMachineIdtempg": "/Subscriptions/7c943c1b-5122-4097-90c8-861411bdd574/resourceGroups/azmigratepwshtestasr13072020/providers/Microsoft.RecoveryServices/vaults/AzMigrateTestProjectPWSH02aarsvault/replicationFabrics/AzMigratePWSHTc8d1replicationfabric/replicationProtectionContainers/AzMigratePWSHTc8d1replicationcontainer/replicationMigrationItems/bcdr-vcenter-fareast-corp-micro-cfcc5a24-a40e-56b9-a6af-e206c9ca4f93_500f8187-6ade-6567-87fc-ebd7f0d48101", - "srsProviderName": "AzMigratePWSHTc8d1dra", - "srsMachinetmpw": "/Subscriptions/7c943c1b-5122-4097-90c8-861411bdd574/resourceGroups/azmigratepwshtestasr13072020/providers/Microsoft.RecoveryServices/vaults/AzMigrateTestProjectPWSH02aarsvault/replicationFabrics/AzMigratePWSHTc8d1replicationfabric/replicationProtectionContainers/AzMigratePWSHTc8d1replicationcontainer/replicationMigrationItems/bcdr-vcenter-fareast-corp-micro-cfcc5a24-a40e-56b9-a6af-e206c9ca4f93_500f44f8-2aa3-587b-8958-ead358639629", - "srsMappingName": "containermapping", - "srsLicense": "NoLicenseType", + "srsMachinetempy": "/Subscriptions/7c943c1b-5122-4097-90c8-861411bdd574/resourceGroups/azmigratepwshtestasr13072020/providers/Microsoft.RecoveryServices/vaults/AzMigrateTestProjectPWSH02aarsvault/replicationFabrics/AzMigratePWSHTc8d1replicationfabric/replicationProtectionContainers/AzMigratePWSHTc8d1replicationcontainer/replicationMigrationItems/bcdr-vcenter-fareast-corp-micro-cfcc5a24-a40e-56b9-a6af-e206c9ca4f93_500f44f8-2aa3-587b-8958-ead358639629", "srsMachineIdtempc": "/Subscriptions/7c943c1b-5122-4097-90c8-861411bdd574/resourceGroups/azmigratepwshtestasr13072020/providers/Microsoft.RecoveryServices/vaults/AzMigrateTestProjectPWSH02aarsvault/replicationFabrics/AzMigratePWSHTc8d1replicationfabric/replicationProtectionContainers/AzMigratePWSHTc8d1replicationcontainer/replicationMigrationItems/bcdr-vcenter-fareast-corp-micro-cfcc5a24-a40e-56b9-a6af-e206c9ca4f93_50063baa-9806-d6d6-7e09-c0ae87309b4f", - "srsPolicyName": "migrateAzMigratePWSHTc8d1sitepolicy", - "srsFabricName": "AzMigratePWSHTc8d1replicationfabric", - "srsResourceGroup": "azmigratepwshtestasr13072020", - "migProjectName": "BugBashAVSVMware", - "migSolutionName": "Servers-Migration-ServerMigration", - "srsMachineNametempa": "bcdr-vcenter-fareast-corp-micro-cfcc5a24-a40e-56b9-a6af-e206c9ca4f93_525a684f-3131-8b5c-2eb5-2e690eedc30c", - "srsDiskType": "Standard_LRS", - "srsTestPolicy": "samplePolicyabc123", + "srsMachineId": "/Subscriptions/7c943c1b-5122-4097-90c8-861411bdd574/resourceGroups/azmigratepwshtestasr13072020/providers/Microsoft.RecoveryServices/vaults/AzMigrateTestProjectPWSH02aarsvault/replicationFabrics/AzMigratePWSHTc8d1replicationfabric/replicationProtectionContainers/AzMigratePWSHTc8d1replicationcontainer/replicationMigrationItems/bcdr-vcenter-fareast-corp-micro-cfcc5a24-a40e-56b9-a6af-e206c9ca4f93_50063baa-9806-d6d6-7e09-c0ae87309b4f", + "srsMachineIdtempb": "/Subscriptions/7c943c1b-5122-4097-90c8-861411bdd574/resourceGroups/azmigratepwshtestasr13072020/providers/Microsoft.RecoveryServices/vaults/AzMigrateTestProjectPWSH02aarsvault/replicationFabrics/AzMigratePWSHTc8d1replicationfabric/replicationProtectionContainers/AzMigratePWSHTc8d1replicationcontainer/replicationMigrationItems/bcdr-vcenter-fareast-corp-micro-cfcc5a24-a40e-56b9-a6af-e206c9ca4f93_50351613-0fc1-0a93-8e65-6db3410fe9a4", + "Tenant": null, "srsSDSMachineName": "bcdr-vcenter-fareast-corp-micro-cfcc5a24-a40e-56b9-a6af-e206c9ca4f93_50063baa-9806-d6d6-7e09-c0ae87309b4f", - "migRunAsAccountName": "b090bef3-b733-5e34-bc8f-eb6f2701432a", - "srsMachinetempy": "/Subscriptions/7c943c1b-5122-4097-90c8-861411bdd574/resourceGroups/azmigratepwshtestasr13072020/providers/Microsoft.RecoveryServices/vaults/AzMigrateTestProjectPWSH02aarsvault/replicationFabrics/AzMigratePWSHTc8d1replicationfabric/replicationProtectionContainers/AzMigratePWSHTc8d1replicationcontainer/replicationMigrationItems/bcdr-vcenter-fareast-corp-micro-cfcc5a24-a40e-56b9-a6af-e206c9ca4f93_500f44f8-2aa3-587b-8958-ead358639629", - "srsMachineIdtempf": "/Subscriptions/7c943c1b-5122-4097-90c8-861411bdd574/resourceGroups/azmigratepwshtestasr13072020/providers/Microsoft.RecoveryServices/vaults/AzMigrateTestProjectPWSH02aarsvault/replicationFabrics/AzMigratePWSHTc8d1replicationfabric/replicationProtectionContainers/AzMigratePWSHTc8d1replicationcontainer/replicationMigrationItems/bcdr-vcenter-fareast-corp-micro-cfcc5a24-a40e-56b9-a6af-e206c9ca4f93_500f44f8-2aa3-587b-8958-ead358639629", - "srsMachineNametempe": "bcdr-vcenter-fareast-corp-micro-cfcc5a24-a40e-56b9-a6af-e206c9ca4f93_50063baa-9806-d6d6-7e09-c0ae87309b4f", - "srsMachinetmpx": "/Subscriptions/7c943c1b-5122-4097-90c8-861411bdd574/resourceGroups/azmigratepwshtestasr13072020/providers/Microsoft.RecoveryServices/vaults/AzMigrateTestProjectPWSH02aarsvault/replicationFabrics/AzMigratePWSHTc8d1replicationfabric/replicationProtectionContainers/AzMigratePWSHTc8d1replicationcontainer/replicationMigrationItems/bcdr-vcenter-fareast-corp-micro-cfcc5a24-a40e-56b9-a6af-e206c9ca4f93_50069ee3-0b88-6414-0a82-acd37b6dc092", - "SubscriptionId": "7c943c1b-5122-4097-90c8-861411bdd574", + "srsTargetRGId": "/subscriptions/7c943c1b-5122-4097-90c8-861411bdd574/resourceGroups/AzMigratePWSHtargetRG", + "srsMachinetmpw": "/Subscriptions/7c943c1b-5122-4097-90c8-861411bdd574/resourceGroups/azmigratepwshtestasr13072020/providers/Microsoft.RecoveryServices/vaults/AzMigrateTestProjectPWSH02aarsvault/replicationFabrics/AzMigratePWSHTc8d1replicationfabric/replicationProtectionContainers/AzMigratePWSHTc8d1replicationcontainer/replicationMigrationItems/bcdr-vcenter-fareast-corp-micro-cfcc5a24-a40e-56b9-a6af-e206c9ca4f93_500f44f8-2aa3-587b-8958-ead358639629", + "srsPolicyId": "/subscriptions/7c943c1b-5122-4097-90c8-861411bdd574/resourceGroups/azmigratepwshtestasr13072020/providers/Microsoft.RecoveryServices/vaults/AzMigrateTestProjectPWSH02aarsvault/replicationPolicies/migrateAzMigratePWSHTc8d1sitepolicy", + "srsJobId": "/Subscriptions/7c943c1b-5122-4097-90c8-861411bdd574/resourceGroups/azmigratepwshtestasr13072020/providers/Microsoft.RecoveryServices/vaults/AzMigrateTestProjectPWSH02aarsvault/replicationJobs/997e2a92-5afe-49c7-a81a-89660aec9b7b", "srsTestNetworkId": "/subscriptions/7c943c1b-5122-4097-90c8-861411bdd574/resourceGroups/AzMigratePWSHtargetRG/providers/Microsoft.Network/virtualNetworks/AzMigrateTargetNetwork", - "srsSDSMachineId": "/subscriptions/7c943c1b-5122-4097-90c8-861411bdd574/resourceGroups/azmigratepwshtestasr13072020/providers/Microsoft.OffAzure/VMwareSites/AzMigratePWSHTc8d1site/machines/bcdr-vcenter-fareast-corp-micro-cfcc5a24-a40e-56b9-a6af-e206c9ca4f93_50063baa-9806-d6d6-7e09-c0ae87309b4f", - "srsResourceGroupId": "/subscriptions/7c943c1b-5122-4097-90c8-861411bdd574/resourceGroups/azmigratepwshtestasr13072020", "srsVaultName": "AzMigrateTestProjectPWSH02aarsvault", - "srsJobId": "/Subscriptions/7c943c1b-5122-4097-90c8-861411bdd574/resourceGroups/azmigratepwshtestasr13072020/providers/Microsoft.RecoveryServices/vaults/AzMigrateTestProjectPWSH02aarsvault/replicationJobs/997e2a92-5afe-49c7-a81a-89660aec9b7b", + "migRunAsAccountName": "b090bef3-b733-5e34-bc8f-eb6f2701432a", + "migVMwareMachineName": "10-150-8-52-b090bef3-b733-5e34-bc8f-eb6f2701432a_50098b08-5701-4c58-f6ad-1daf127a8ed9", + "migResourceGroup": "BugBashAVSVMware", "srsTgtNId": "/subscriptions/7c943c1b-5122-4097-90c8-861411bdd574/resourceGroups/AzMigratePWSHtargetRG/providers/Microsoft.Network/virtualNetworks/AzMigrateTargetNetwork", - "srsTargetPCId": "Microsoft Azure", - "srsMachineId": "/Subscriptions/7c943c1b-5122-4097-90c8-861411bdd574/resourceGroups/azmigratepwshtestasr13072020/providers/Microsoft.RecoveryServices/vaults/AzMigrateTestProjectPWSH02aarsvault/replicationFabrics/AzMigratePWSHTc8d1replicationfabric/replicationProtectionContainers/AzMigratePWSHTc8d1replicationcontainer/replicationMigrationItems/bcdr-vcenter-fareast-corp-micro-cfcc5a24-a40e-56b9-a6af-e206c9ca4f93_50063baa-9806-d6d6-7e09-c0ae87309b4f", + "srsTestPolicy": "samplePolicyabc123", + "srsDiskId": "6000C299-343d-7bcd-c05e-a94bd63316dd", + "srsDiskType": "Standard_LRS", "srsProjectId": "/subscriptions/7c943c1b-5122-4097-90c8-861411bdd574/resourceGroups/azmigratepwshtestasr13072020/providers/Microsoft.Migrate/MigrateProjects/AzMigrateTestProjectPWSH", - "srsTenant": "72f988bf-86f1-41af-91ab-2d7cd011db47", - "migSubscriptionId": "31be0ff4-c932-4cb3-8efc-efa411d79280", - "srsTargetRGId": "/subscriptions/7c943c1b-5122-4097-90c8-861411bdd574/resourceGroups/AzMigratePWSHtargetRG", - "srsPolicyId": "/subscriptions/7c943c1b-5122-4097-90c8-861411bdd574/resourceGroups/azmigratepwshtestasr13072020/providers/Microsoft.RecoveryServices/vaults/AzMigrateTestProjectPWSH02aarsvault/replicationPolicies/migrateAzMigratePWSHTc8d1sitepolicy", - "srsProtectionContainerName": "AzMigratePWSHTc8d1replicationcontainer", - "srsJobName": "997e2a92-5afe-49c7-a81a-89660aec9b7b" + "srsMachineIdtempd": "/Subscriptions/7c943c1b-5122-4097-90c8-861411bdd574/resourceGroups/azmigratepwshtestasr13072020/providers/Microsoft.RecoveryServices/vaults/AzMigrateTestProjectPWSH02aarsvault/replicationFabrics/AzMigratePWSHTc8d1replicationfabric/replicationProtectionContainers/AzMigratePWSHTc8d1replicationcontainer/replicationMigrationItems/bcdr-vcenter-fareast-corp-micro-cfcc5a24-a40e-56b9-a6af-e206c9ca4f93_50351613-0fc1-0a93-8e65-6db3410fe9a4", + "srsinitinfraProjectName": "prsadhu-testmigrate", + "srsResourceGroupId": "/subscriptions/7c943c1b-5122-4097-90c8-861411bdd574/resourceGroups/azmigratepwshtestasr13072020", + "srsMachinetmpx": "/Subscriptions/7c943c1b-5122-4097-90c8-861411bdd574/resourceGroups/azmigratepwshtestasr13072020/providers/Microsoft.RecoveryServices/vaults/AzMigrateTestProjectPWSH02aarsvault/replicationFabrics/AzMigratePWSHTc8d1replicationfabric/replicationProtectionContainers/AzMigratePWSHTc8d1replicationcontainer/replicationMigrationItems/bcdr-vcenter-fareast-corp-micro-cfcc5a24-a40e-56b9-a6af-e206c9ca4f93_50069ee3-0b88-6414-0a82-acd37b6dc092", + "srsPolicyName": "migrateAzMigratePWSHTc8d1sitepolicy", + "srsProjectName": "AzMigrateTestProjectPWSH" } diff --git a/src/Migrate/test/localEnv.json b/src/Migrate/test/localEnv.json index dd9ce0063101..54dd34553e65 100644 --- a/src/Migrate/test/localEnv.json +++ b/src/Migrate/test/localEnv.json @@ -18,5 +18,9 @@ "srsResourceGroupId": "/subscriptions/7c943c1b-5122-4097-90c8-861411bdd574/resourceGroups/azmigratepwshtestasr13072020", "migSolutionName": "Servers-Migration-ServerMigration", "srsMachineId": "/Subscriptions/7c943c1b-5122-4097-90c8-861411bdd574/resourceGroups/azmigratepwshtestasr13072020/providers/Microsoft.RecoveryServices/vaults/AzMigrateTestProjectPWSH02aarsvault/replicationFabrics/AzMigratePWSHTc8d1replicationfabric/replicationProtectionContainers/AzMigratePWSHTc8d1replicationcontainer/replicationMigrationItems/bcdr-vcenter-fareast-corp-micro-cfcc5a24-a40e-56b9-a6af-e206c9ca4f93_50063baa-9806-d6d6-7e09-c0ae87309b4f", - "srsSubscriptionId": "7c943c1b-5122-4097-90c8-861411bdd574" + "srsSubscriptionId": "7c943c1b-5122-4097-90c8-861411bdd574", + "srsinitinfraResourceGroupName" : "prsadhu-testSrcRG", + "srsinitinfraProjectName" : "prsadhu-testmigrate", + "srsinitinfraScenario" : "agentlessVMware", + "srsinitinfraTargetRegion" : "eastus" } diff --git a/src/Migrate/test/utils.ps1 b/src/Migrate/test/utils.ps1 index 3b820b971ac1..5e41d34306d0 100644 --- a/src/Migrate/test/utils.ps1 +++ b/src/Migrate/test/utils.ps1 @@ -54,7 +54,11 @@ function setupEnv() { $env.srsMachinetmpx = "/Subscriptions/7c943c1b-5122-4097-90c8-861411bdd574/resourceGroups/azmigratepwshtestasr13072020/providers/Microsoft.RecoveryServices/vaults/AzMigrateTestProjectPWSH02aarsvault/replicationFabrics/AzMigratePWSHTc8d1replicationfabric/replicationProtectionContainers/AzMigratePWSHTc8d1replicationcontainer/replicationMigrationItems/bcdr-vcenter-fareast-corp-micro-cfcc5a24-a40e-56b9-a6af-e206c9ca4f93_50069ee3-0b88-6414-0a82-acd37b6dc092" $env.srsMachinetmpw = "/Subscriptions/7c943c1b-5122-4097-90c8-861411bdd574/resourceGroups/azmigratepwshtestasr13072020/providers/Microsoft.RecoveryServices/vaults/AzMigrateTestProjectPWSH02aarsvault/replicationFabrics/AzMigratePWSHTc8d1replicationfabric/replicationProtectionContainers/AzMigratePWSHTc8d1replicationcontainer/replicationMigrationItems/bcdr-vcenter-fareast-corp-micro-cfcc5a24-a40e-56b9-a6af-e206c9ca4f93_500f44f8-2aa3-587b-8958-ead358639629" $env.srsMachinetmpv = "/Subscriptions/7c943c1b-5122-4097-90c8-861411bdd574/resourceGroups/azmigratepwshtestasr13072020/providers/Microsoft.RecoveryServices/vaults/AzMigrateTestProjectPWSH02aarsvault/replicationFabrics/AzMigratePWSHTc8d1replicationfabric/replicationProtectionContainers/AzMigratePWSHTc8d1replicationcontainer/replicationMigrationItems/bcdr-vcenter-fareast-corp-micro-cfcc5a24-a40e-56b9-a6af-e206c9ca4f93_50069ee3-0b88-6414-0a82-acd37b6dc092" - + $env.srsinitinfraResourceGroupName = "prsadhu-testSrcRG" + $env.srsinitinfraProjectName = "prsadhu-testmigrate" + $env.srsinitinfraScenario = "agentlessVMware" + $env.srsinitinfraTargetRegion = "eastus" + $env.migSubscriptionId = "31be0ff4-c932-4cb3-8efc-efa411d79280" $env.migResourceGroup = "BugBashAVSVMware" $env.migProjectName = "BugBashAVSVMware" diff --git a/tools/Az/Az.psd1 b/tools/Az/Az.psd1 index 7aa1caacf055..1b2321b0d463 100644 --- a/tools/Az/Az.psd1 +++ b/tools/Az/Az.psd1 @@ -93,6 +93,7 @@ RequiredModules = @(@{ModuleName = 'Az.Accounts'; ModuleVersion = '2.2.5'; }, @{ModuleName = 'Az.ManagedServices'; RequiredVersion = '2.0.0'; }, @{ModuleName = 'Az.MarketplaceOrdering'; RequiredVersion = '1.0.2'; }, @{ModuleName = 'Az.Media'; RequiredVersion = '1.1.1'; }, + @{ModuleName = 'Az.Migrate'; RequiredVersion = '1.0.0'; }, @{ModuleName = 'Az.Monitor'; RequiredVersion = '2.4.0'; }, @{ModuleName = 'Az.Network'; RequiredVersion = '4.6.0'; }, @{ModuleName = 'Az.NotificationHubs'; RequiredVersion = '1.1.1'; },