From c540dffd0f25a17b078b07d93964a3c43cdf722d Mon Sep 17 00:00:00 2001 From: Amarjeet Kumar Date: Mon, 25 Aug 2025 17:27:17 +0530 Subject: [PATCH] Powershell: DMS APIs stable vetsion --- .../sqlMigrationServices.json | 2 +- .../servers-databaseMigrations.json | 52 ++++ .../docs/Az.DataMigration.md | 13 +- .../docs/Get-AzDataMigrationSqlService.md | 2 +- .../Get-AzDataMigrationSqlServiceAuthKey.md | 2 +- ...ationSqlServiceIntegrationRuntimeMetric.md | 2 +- .../Get-AzDataMigrationSqlServiceMigration.md | 2 +- .../docs/Get-AzDataMigrationToSqlDb.md | 2 +- ...Get-AzDataMigrationToSqlManagedInstance.md | 2 +- .../docs/Get-AzDataMigrationToSqlVM.md | 2 +- .../Invoke-AzDataMigrationRetryToSqlDb.md | 287 ++++++++++++++++++ .../docs/New-AzDataMigrationSqlService.md | 2 +- .../New-AzDataMigrationSqlServiceAuthKey.md | 2 +- .../docs/New-AzDataMigrationToSqlDb.md | 10 +- .../docs/New-AzDataMigrationToSqlVM.md | 2 +- .../Remove-AzDataMigrationSqlServiceNode.md | 6 +- ...ove-AzDataMigrationToSqlManagedInstance.md | 256 ++++++++++++++++ .../docs/Remove-AzDataMigrationToSqlVM.md | 256 ++++++++++++++++ .../docs/Update-AzDataMigrationSqlService.md | 2 +- .../Invoke-AzDataMigrationRetryToSqlDb.md | 22 ++ ...ove-AzDataMigrationToSqlManagedInstance.md | 22 ++ .../examples/Remove-AzDataMigrationToSqlVM.md | 22 ++ .../readme.azure.noprofile.md | 47 +++ ...voke-AzDataMigrationRetryToSqlDb.Tests.ps1 | 33 ++ ...ataMigrationToSqlManagedInstance.Tests.ps1 | 25 ++ .../Remove-AzDataMigrationToSqlVM.Tests.ps1 | 25 ++ 26 files changed, 1078 insertions(+), 22 deletions(-) create mode 100644 src/DataMigration/DataMigration.Autorest/UX/Microsoft.Sql/servers-databaseMigrations.json create mode 100644 src/DataMigration/DataMigration.Autorest/docs/Invoke-AzDataMigrationRetryToSqlDb.md create mode 100644 src/DataMigration/DataMigration.Autorest/docs/Remove-AzDataMigrationToSqlManagedInstance.md create mode 100644 src/DataMigration/DataMigration.Autorest/docs/Remove-AzDataMigrationToSqlVM.md create mode 100644 src/DataMigration/DataMigration.Autorest/examples/Invoke-AzDataMigrationRetryToSqlDb.md create mode 100644 src/DataMigration/DataMigration.Autorest/examples/Remove-AzDataMigrationToSqlManagedInstance.md create mode 100644 src/DataMigration/DataMigration.Autorest/examples/Remove-AzDataMigrationToSqlVM.md create mode 100644 src/DataMigration/DataMigration.Autorest/readme.azure.noprofile.md create mode 100644 src/DataMigration/DataMigration.Autorest/test/Invoke-AzDataMigrationRetryToSqlDb.Tests.ps1 create mode 100644 src/DataMigration/DataMigration.Autorest/test/Remove-AzDataMigrationToSqlManagedInstance.Tests.ps1 create mode 100644 src/DataMigration/DataMigration.Autorest/test/Remove-AzDataMigrationToSqlVM.Tests.ps1 diff --git a/src/DataMigration/DataMigration.Autorest/UX/Microsoft.DataMigration/sqlMigrationServices.json b/src/DataMigration/DataMigration.Autorest/UX/Microsoft.DataMigration/sqlMigrationServices.json index 141d5a2cd37c..303dc0d632b9 100644 --- a/src/DataMigration/DataMigration.Autorest/UX/Microsoft.DataMigration/sqlMigrationServices.json +++ b/src/DataMigration/DataMigration.Autorest/UX/Microsoft.DataMigration/sqlMigrationServices.json @@ -1,6 +1,6 @@ { "resourceType": "sqlMigrationServices", - "apiVersion": "2025-03-15-preview", + "apiVersion": "2025-06-30", "learnMore": { "url": "https://learn.microsoft.com/powershell/module/az.datamigration" }, diff --git a/src/DataMigration/DataMigration.Autorest/UX/Microsoft.Sql/servers-databaseMigrations.json b/src/DataMigration/DataMigration.Autorest/UX/Microsoft.Sql/servers-databaseMigrations.json new file mode 100644 index 000000000000..b8444412c3e1 --- /dev/null +++ b/src/DataMigration/DataMigration.Autorest/UX/Microsoft.Sql/servers-databaseMigrations.json @@ -0,0 +1,52 @@ +{ + "resourceType": "servers/databaseMigrations", + "apiVersion": "2025-06-30", + "learnMore": { + "url": "https://learn.microsoft.com/powershell/module/az.datamigration" + }, + "commands": [ + { + "name": "Invoke-AzDataMigrationRetryToSqlDb", + "description": "Retry on going migration for the database.", + "path": "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Sql/servers/{sqlDbInstanceName}/providers/Microsoft.DataMigration/databaseMigrations/{targetDbName}/retry", + "help": { + "learnMore": { + "url": "https://learn.microsoft.com/powershell/module/az.datamigration/invoke-azdatamigrationretrytosqldb" + }, + "parameterSets": [ + { + "parameters": [ + "-ResourceGroupName ", + "-SqlDbInstanceName ", + "[-SubscriptionId ]", + "-TargetDbName " + ] + } + ] + }, + "examples": [ + { + "description": "Retry on going migration for the database.", + "parameters": [ + { + "name": "-ResourceGroupName", + "value": "[Path.resourceGroupName]" + }, + { + "name": "-SqlDbInstanceName", + "value": "[Path.sqlDbInstanceName]" + }, + { + "name": "-SubscriptionId", + "value": "[Path.subscriptionId]" + }, + { + "name": "-TargetDbName", + "value": "[Path.targetDbName]" + } + ] + } + ] + } + ] +} diff --git a/src/DataMigration/DataMigration.Autorest/docs/Az.DataMigration.md b/src/DataMigration/DataMigration.Autorest/docs/Az.DataMigration.md index 39d7e474e416..5a03599c4c69 100644 --- a/src/DataMigration/DataMigration.Autorest/docs/Az.DataMigration.md +++ b/src/DataMigration/DataMigration.Autorest/docs/Az.DataMigration.md @@ -1,6 +1,6 @@ --- Module Name: Az.DataMigration -Module Guid: 5b85d9ae-d85d-4da6-9dde-d80f726fa7f9 +Module Guid: 896e3fc9-6d5a-4964-aa07-5febb86eb489 Download Help Link: https://learn.microsoft.com/powershell/module/az.datamigration Help Version: 1.0.0.0 Locale: en-US @@ -47,6 +47,9 @@ Initiate cutover for in-progress online database migration to SQL Managed Instan ### [Invoke-AzDataMigrationCutoverToSqlVM](Invoke-AzDataMigrationCutoverToSqlVM.md) Initiate cutover for in-progress online database migration to SQL VM. +### [Invoke-AzDataMigrationRetryToSqlDb](Invoke-AzDataMigrationRetryToSqlDb.md) +Retry on going migration for the database. + ### [New-AzDataMigrationLoginsMigration](New-AzDataMigrationLoginsMigration.md) Migrate logins from the source Sql Servers to the target Azure Sql Servers. @@ -65,7 +68,7 @@ Migrate TDE certificate(s) from source SQL Server to the target Azure SQL Server ### [New-AzDataMigrationToSqlDb](New-AzDataMigrationToSqlDb.md) Create a new database migration to a given SQL Db. This command can migrate data from the selected source database tables to the target database tables. -If the target database have no table existing, please use [New-AzDataMigrationSqlServerSchema](https://learn.microsoft.com/powershell/module/az.datamigration/new-azdatamigrationsqlserverschema) command to migrate schema objects from source database to target database. +If the target database have no table existing, please use [New-AzDataMigrationSqlServerSchema](https://learn.microsoft.com/powershell/module/az.datamigration/new-azdatamigrationsqlserverschema) command to migrate schema objects from source database to target databse. ### [New-AzDataMigrationToSqlManagedInstance](New-AzDataMigrationToSqlManagedInstance.md) Create a new database migration to a given SQL Managed Instance. @@ -85,6 +88,12 @@ Delete the integration runtime node. ### [Remove-AzDataMigrationToSqlDb](Remove-AzDataMigrationToSqlDb.md) Remove the specified database migration for a given SQL Db. +### [Remove-AzDataMigrationToSqlManagedInstance](Remove-AzDataMigrationToSqlManagedInstance.md) +Delete Database Migration resource. + +### [Remove-AzDataMigrationToSqlVM](Remove-AzDataMigrationToSqlVM.md) +Delete Database Migration resource. + ### [Stop-AzDataMigrationToSqlDb](Stop-AzDataMigrationToSqlDb.md) Stop in-progress database migration to SQL Db. diff --git a/src/DataMigration/DataMigration.Autorest/docs/Get-AzDataMigrationSqlService.md b/src/DataMigration/DataMigration.Autorest/docs/Get-AzDataMigrationSqlService.md index 3aa5b15fa150..a6b01331d807 100644 --- a/src/DataMigration/DataMigration.Autorest/docs/Get-AzDataMigrationSqlService.md +++ b/src/DataMigration/DataMigration.Autorest/docs/Get-AzDataMigrationSqlService.md @@ -187,7 +187,7 @@ This cmdlet supports the common parameters: -Debug, -ErrorAction, -ErrorVariable ## OUTPUTS -### Microsoft.Azure.PowerShell.Cmdlets.DataMigration.Models.Api20250315Preview.ISqlMigrationService +### Microsoft.Azure.PowerShell.Cmdlets.DataMigration.Models.Api20250630.ISqlMigrationService ## NOTES diff --git a/src/DataMigration/DataMigration.Autorest/docs/Get-AzDataMigrationSqlServiceAuthKey.md b/src/DataMigration/DataMigration.Autorest/docs/Get-AzDataMigrationSqlServiceAuthKey.md index 7ba79e00e3f4..b5012fc94130 100644 --- a/src/DataMigration/DataMigration.Autorest/docs/Get-AzDataMigrationSqlServiceAuthKey.md +++ b/src/DataMigration/DataMigration.Autorest/docs/Get-AzDataMigrationSqlServiceAuthKey.md @@ -153,7 +153,7 @@ This cmdlet supports the common parameters: -Debug, -ErrorAction, -ErrorVariable ## OUTPUTS -### Microsoft.Azure.PowerShell.Cmdlets.DataMigration.Models.Api20250315Preview.IAuthenticationKeys +### Microsoft.Azure.PowerShell.Cmdlets.DataMigration.Models.Api20250630.IAuthenticationKeys ## NOTES diff --git a/src/DataMigration/DataMigration.Autorest/docs/Get-AzDataMigrationSqlServiceIntegrationRuntimeMetric.md b/src/DataMigration/DataMigration.Autorest/docs/Get-AzDataMigrationSqlServiceIntegrationRuntimeMetric.md index 0b4910a013ef..2a37e79bf3d4 100644 --- a/src/DataMigration/DataMigration.Autorest/docs/Get-AzDataMigrationSqlServiceIntegrationRuntimeMetric.md +++ b/src/DataMigration/DataMigration.Autorest/docs/Get-AzDataMigrationSqlServiceIntegrationRuntimeMetric.md @@ -168,7 +168,7 @@ This cmdlet supports the common parameters: -Debug, -ErrorAction, -ErrorVariable ## OUTPUTS -### Microsoft.Azure.PowerShell.Cmdlets.DataMigration.Models.Api20250315Preview.IIntegrationRuntimeMonitoringData +### Microsoft.Azure.PowerShell.Cmdlets.DataMigration.Models.Api20250630.IIntegrationRuntimeMonitoringData ## NOTES diff --git a/src/DataMigration/DataMigration.Autorest/docs/Get-AzDataMigrationSqlServiceMigration.md b/src/DataMigration/DataMigration.Autorest/docs/Get-AzDataMigrationSqlServiceMigration.md index 6e5c0c544b70..edc8e8d660ec 100644 --- a/src/DataMigration/DataMigration.Autorest/docs/Get-AzDataMigrationSqlServiceMigration.md +++ b/src/DataMigration/DataMigration.Autorest/docs/Get-AzDataMigrationSqlServiceMigration.md @@ -123,7 +123,7 @@ This cmdlet supports the common parameters: -Debug, -ErrorAction, -ErrorVariable ## OUTPUTS -### Microsoft.Azure.PowerShell.Cmdlets.DataMigration.Models.Api20250315Preview.IDatabaseMigration +### Microsoft.Azure.PowerShell.Cmdlets.DataMigration.Models.Api20250630.IDatabaseMigration ## NOTES diff --git a/src/DataMigration/DataMigration.Autorest/docs/Get-AzDataMigrationToSqlDb.md b/src/DataMigration/DataMigration.Autorest/docs/Get-AzDataMigrationToSqlDb.md index b826456968ba..c9a9648509fb 100644 --- a/src/DataMigration/DataMigration.Autorest/docs/Get-AzDataMigrationToSqlDb.md +++ b/src/DataMigration/DataMigration.Autorest/docs/Get-AzDataMigrationToSqlDb.md @@ -206,7 +206,7 @@ This cmdlet supports the common parameters: -Debug, -ErrorAction, -ErrorVariable ## OUTPUTS -### Microsoft.Azure.PowerShell.Cmdlets.DataMigration.Models.Api20250315Preview.IDatabaseMigrationSqlDb +### Microsoft.Azure.PowerShell.Cmdlets.DataMigration.Models.Api20250630.IDatabaseMigrationSqlDb ## NOTES diff --git a/src/DataMigration/DataMigration.Autorest/docs/Get-AzDataMigrationToSqlManagedInstance.md b/src/DataMigration/DataMigration.Autorest/docs/Get-AzDataMigrationToSqlManagedInstance.md index 63bd8847d8ae..8f82ab10b63c 100644 --- a/src/DataMigration/DataMigration.Autorest/docs/Get-AzDataMigrationToSqlManagedInstance.md +++ b/src/DataMigration/DataMigration.Autorest/docs/Get-AzDataMigrationToSqlManagedInstance.md @@ -208,7 +208,7 @@ This cmdlet supports the common parameters: -Debug, -ErrorAction, -ErrorVariable ## OUTPUTS -### Microsoft.Azure.PowerShell.Cmdlets.DataMigration.Models.Api20250315Preview.IDatabaseMigrationSqlMi +### Microsoft.Azure.PowerShell.Cmdlets.DataMigration.Models.Api20250630.IDatabaseMigrationSqlMi ## NOTES diff --git a/src/DataMigration/DataMigration.Autorest/docs/Get-AzDataMigrationToSqlVM.md b/src/DataMigration/DataMigration.Autorest/docs/Get-AzDataMigrationToSqlVM.md index 4b870550cf1f..63836a3d3cad 100644 --- a/src/DataMigration/DataMigration.Autorest/docs/Get-AzDataMigrationToSqlVM.md +++ b/src/DataMigration/DataMigration.Autorest/docs/Get-AzDataMigrationToSqlVM.md @@ -208,7 +208,7 @@ This cmdlet supports the common parameters: -Debug, -ErrorAction, -ErrorVariable ## OUTPUTS -### Microsoft.Azure.PowerShell.Cmdlets.DataMigration.Models.Api20250315Preview.IDatabaseMigrationSqlVM +### Microsoft.Azure.PowerShell.Cmdlets.DataMigration.Models.Api20250630.IDatabaseMigrationSqlVM ## NOTES diff --git a/src/DataMigration/DataMigration.Autorest/docs/Invoke-AzDataMigrationRetryToSqlDb.md b/src/DataMigration/DataMigration.Autorest/docs/Invoke-AzDataMigrationRetryToSqlDb.md new file mode 100644 index 000000000000..64854ecdea04 --- /dev/null +++ b/src/DataMigration/DataMigration.Autorest/docs/Invoke-AzDataMigrationRetryToSqlDb.md @@ -0,0 +1,287 @@ +--- +external help file: +Module Name: Az.DataMigration +online version: https://learn.microsoft.com/powershell/module/az.datamigration/invoke-azdatamigrationretrytosqldb +schema: 2.0.0 +--- + +# Invoke-AzDataMigrationRetryToSqlDb + +## SYNOPSIS +Retry on going migration for the database. + +## SYNTAX + +### RetryExpanded (Default) +``` +Invoke-AzDataMigrationRetryToSqlDb -ResourceGroupName -SqlDbInstanceName + -TargetDbName -MigrationOperationId [-SubscriptionId ] [-DefaultProfile ] + [-AsJob] [-NoWait] [-PassThru] [-Confirm] [-WhatIf] [] +``` + +### Retry +``` +Invoke-AzDataMigrationRetryToSqlDb -ResourceGroupName -SqlDbInstanceName + -TargetDbName -MigrationOperationInput [-SubscriptionId ] + [-DefaultProfile ] [-AsJob] [-NoWait] [-PassThru] [-Confirm] [-WhatIf] [] +``` + +### RetryViaIdentity +``` +Invoke-AzDataMigrationRetryToSqlDb -InputObject + -MigrationOperationInput [-DefaultProfile ] [-AsJob] [-NoWait] + [-PassThru] [-Confirm] [-WhatIf] [] +``` + +### RetryViaIdentityExpanded +``` +Invoke-AzDataMigrationRetryToSqlDb -InputObject -MigrationOperationId + [-DefaultProfile ] [-AsJob] [-NoWait] [-PassThru] [-Confirm] [-WhatIf] [] +``` + +## DESCRIPTION +Retry on going migration for the database. + +## EXAMPLES + +### Example 1: {{ Add title here }} +```powershell +{{ Add code here }} +``` + +```output +{{ Add output here }} +``` + +{{ Add description here }} + +### Example 2: {{ Add title here }} +```powershell +{{ Add code here }} +``` + +```output +{{ Add output here }} +``` + +{{ Add description here }} + +## PARAMETERS + +### -AsJob +Run the command as a job + +```yaml +Type: System.Management.Automation.SwitchParameter +Parameter Sets: (All) +Aliases: + +Required: False +Position: Named +Default value: None +Accept pipeline input: False +Accept wildcard characters: False +``` + +### -DefaultProfile +The DefaultProfile parameter is not functional. +Use the SubscriptionId parameter when available if executing the cmdlet against a different subscription. + +```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 +``` + +### -InputObject +Identity Parameter +To construct, see NOTES section for INPUTOBJECT properties and create a hash table. + +```yaml +Type: Microsoft.Azure.PowerShell.Cmdlets.DataMigration.Models.IDataMigrationIdentity +Parameter Sets: RetryViaIdentity, RetryViaIdentityExpanded +Aliases: + +Required: True +Position: Named +Default value: None +Accept pipeline input: True (ByValue) +Accept wildcard characters: False +``` + +### -MigrationOperationId +ID tracking migration operation. + +```yaml +Type: System.String +Parameter Sets: RetryExpanded, RetryViaIdentityExpanded +Aliases: + +Required: True +Position: Named +Default value: None +Accept pipeline input: False +Accept wildcard characters: False +``` + +### -MigrationOperationInput +Migration Operation Input +To construct, see NOTES section for MIGRATIONOPERATIONINPUT properties and create a hash table. + +```yaml +Type: Microsoft.Azure.PowerShell.Cmdlets.DataMigration.Models.Api20250630.IMigrationOperationInput +Parameter Sets: Retry, RetryViaIdentity +Aliases: + +Required: True +Position: Named +Default value: None +Accept pipeline input: True (ByValue) +Accept wildcard characters: False +``` + +### -NoWait +Run the command asynchronously + +```yaml +Type: System.Management.Automation.SwitchParameter +Parameter Sets: (All) +Aliases: + +Required: False +Position: Named +Default value: None +Accept pipeline input: False +Accept wildcard characters: False +``` + +### -PassThru +Returns true when the command succeeds + +```yaml +Type: System.Management.Automation.SwitchParameter +Parameter Sets: (All) +Aliases: + +Required: False +Position: Named +Default value: None +Accept pipeline input: False +Accept wildcard characters: False +``` + +### -ResourceGroupName +Name of the resource group that contains the resource. +You can obtain this value from the Azure Resource Manager API or the portal. + +```yaml +Type: System.String +Parameter Sets: Retry, RetryExpanded +Aliases: + +Required: True +Position: Named +Default value: None +Accept pipeline input: False +Accept wildcard characters: False +``` + +### -SqlDbInstanceName +. + +```yaml +Type: System.String +Parameter Sets: Retry, RetryExpanded +Aliases: + +Required: True +Position: Named +Default value: None +Accept pipeline input: False +Accept wildcard characters: False +``` + +### -SubscriptionId +Subscription ID that identifies an Azure subscription. + +```yaml +Type: System.String +Parameter Sets: Retry, RetryExpanded +Aliases: + +Required: False +Position: Named +Default value: (Get-AzContext).Subscription.Id +Accept pipeline input: False +Accept wildcard characters: False +``` + +### -TargetDbName +The name of the target database. + +```yaml +Type: System.String +Parameter Sets: Retry, RetryExpanded +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 + +### Microsoft.Azure.PowerShell.Cmdlets.DataMigration.Models.Api20250630.IMigrationOperationInput + +### Microsoft.Azure.PowerShell.Cmdlets.DataMigration.Models.IDataMigrationIdentity + +## OUTPUTS + +### System.Boolean + +## NOTES + +## RELATED LINKS + diff --git a/src/DataMigration/DataMigration.Autorest/docs/New-AzDataMigrationSqlService.md b/src/DataMigration/DataMigration.Autorest/docs/New-AzDataMigrationSqlService.md index 9fd6d59a10c0..ed48a56f0c42 100644 --- a/src/DataMigration/DataMigration.Autorest/docs/New-AzDataMigrationSqlService.md +++ b/src/DataMigration/DataMigration.Autorest/docs/New-AzDataMigrationSqlService.md @@ -213,7 +213,7 @@ This cmdlet supports the common parameters: -Debug, -ErrorAction, -ErrorVariable ## OUTPUTS -### Microsoft.Azure.PowerShell.Cmdlets.DataMigration.Models.Api20250315Preview.ISqlMigrationService +### Microsoft.Azure.PowerShell.Cmdlets.DataMigration.Models.Api20250630.ISqlMigrationService ## NOTES diff --git a/src/DataMigration/DataMigration.Autorest/docs/New-AzDataMigrationSqlServiceAuthKey.md b/src/DataMigration/DataMigration.Autorest/docs/New-AzDataMigrationSqlServiceAuthKey.md index b16b60eca7f6..1fa758f78705 100644 --- a/src/DataMigration/DataMigration.Autorest/docs/New-AzDataMigrationSqlServiceAuthKey.md +++ b/src/DataMigration/DataMigration.Autorest/docs/New-AzDataMigrationSqlServiceAuthKey.md @@ -199,7 +199,7 @@ This cmdlet supports the common parameters: -Debug, -ErrorAction, -ErrorVariable ## OUTPUTS -### Microsoft.Azure.PowerShell.Cmdlets.DataMigration.Models.Api20250315Preview.IRegenAuthKeys +### Microsoft.Azure.PowerShell.Cmdlets.DataMigration.Models.Api20250630.IRegenAuthKeys ## NOTES diff --git a/src/DataMigration/DataMigration.Autorest/docs/New-AzDataMigrationToSqlDb.md b/src/DataMigration/DataMigration.Autorest/docs/New-AzDataMigrationToSqlDb.md index 0b6ea3c475de..15e49f6193db 100644 --- a/src/DataMigration/DataMigration.Autorest/docs/New-AzDataMigrationToSqlDb.md +++ b/src/DataMigration/DataMigration.Autorest/docs/New-AzDataMigrationToSqlDb.md @@ -10,7 +10,7 @@ schema: 2.0.0 ## SYNOPSIS Create a new database migration to a given SQL Db. This command can migrate data from the selected source database tables to the target database tables. -If the target database have no table existing, please use [New-AzDataMigrationSqlServerSchema](https://learn.microsoft.com/powershell/module/az.datamigration/new-azdatamigrationsqlserverschema) command to migrate schema objects from source database to target database. +If the target database have no table existing, please use [New-AzDataMigrationSqlServerSchema](https://learn.microsoft.com/powershell/module/az.datamigration/new-azdatamigrationsqlserverschema) command to migrate schema objects from source database to target databse. ## SYNTAX @@ -30,7 +30,7 @@ New-AzDataMigrationToSqlDb -ResourceGroupName -SqlDbInstanceName -ResourceGroupName + -TargetDbName [-SubscriptionId ] [-Force] [-DefaultProfile ] [-AsJob] [-NoWait] + [-PassThru] [-Confirm] [-WhatIf] [] +``` + +### DeleteViaIdentity +``` +Remove-AzDataMigrationToSqlManagedInstance -InputObject [-Force] + [-DefaultProfile ] [-AsJob] [-NoWait] [-PassThru] [-Confirm] [-WhatIf] [] +``` + +## DESCRIPTION +Delete Database Migration resource. + +## EXAMPLES + +### Example 1: {{ Add title here }} +```powershell +{{ Add code here }} +``` + +```output +{{ Add output here }} +``` + +{{ Add description here }} + +### Example 2: {{ Add title here }} +```powershell +{{ Add code here }} +``` + +```output +{{ Add output here }} +``` + +{{ Add description here }} + +## PARAMETERS + +### -AsJob +Run the command as a job + +```yaml +Type: System.Management.Automation.SwitchParameter +Parameter Sets: (All) +Aliases: + +Required: False +Position: Named +Default value: None +Accept pipeline input: False +Accept wildcard characters: False +``` + +### -DefaultProfile +The DefaultProfile parameter is not functional. +Use the SubscriptionId parameter when available if executing the cmdlet against a different subscription. + +```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 +``` + +### -Force +Optional force delete boolean. +If this is provided as true, migration will be deleted even if active. + +```yaml +Type: System.Management.Automation.SwitchParameter +Parameter Sets: (All) +Aliases: + +Required: False +Position: Named +Default value: None +Accept pipeline input: False +Accept wildcard characters: False +``` + +### -InputObject +Identity Parameter +To construct, see NOTES section for INPUTOBJECT properties and create a hash table. + +```yaml +Type: Microsoft.Azure.PowerShell.Cmdlets.DataMigration.Models.IDataMigrationIdentity +Parameter Sets: DeleteViaIdentity +Aliases: + +Required: True +Position: Named +Default value: None +Accept pipeline input: True (ByValue) +Accept wildcard characters: False +``` + +### -ManagedInstanceName +. + +```yaml +Type: System.String +Parameter Sets: Delete +Aliases: + +Required: True +Position: Named +Default value: None +Accept pipeline input: False +Accept wildcard characters: False +``` + +### -NoWait +Run the command asynchronously + +```yaml +Type: System.Management.Automation.SwitchParameter +Parameter Sets: (All) +Aliases: + +Required: False +Position: Named +Default value: None +Accept pipeline input: False +Accept wildcard characters: False +``` + +### -PassThru +Returns true when the command succeeds + +```yaml +Type: System.Management.Automation.SwitchParameter +Parameter Sets: (All) +Aliases: + +Required: False +Position: Named +Default value: None +Accept pipeline input: False +Accept wildcard characters: False +``` + +### -ResourceGroupName +Name of the resource group that contains the resource. +You can obtain this value from the Azure Resource Manager API or the portal. + +```yaml +Type: System.String +Parameter Sets: Delete +Aliases: + +Required: True +Position: Named +Default value: None +Accept pipeline input: False +Accept wildcard characters: False +``` + +### -SubscriptionId +Subscription ID that identifies an Azure subscription. + +```yaml +Type: System.String +Parameter Sets: Delete +Aliases: + +Required: False +Position: Named +Default value: (Get-AzContext).Subscription.Id +Accept pipeline input: False +Accept wildcard characters: False +``` + +### -TargetDbName +The name of the target database. + +```yaml +Type: System.String +Parameter Sets: Delete +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 + +### Microsoft.Azure.PowerShell.Cmdlets.DataMigration.Models.IDataMigrationIdentity + +## OUTPUTS + +### Microsoft.Azure.PowerShell.Cmdlets.DataMigration.Models.Api20250630.IDatabaseMigrationSqlMi + +## NOTES + +## RELATED LINKS + diff --git a/src/DataMigration/DataMigration.Autorest/docs/Remove-AzDataMigrationToSqlVM.md b/src/DataMigration/DataMigration.Autorest/docs/Remove-AzDataMigrationToSqlVM.md new file mode 100644 index 000000000000..ee422645568f --- /dev/null +++ b/src/DataMigration/DataMigration.Autorest/docs/Remove-AzDataMigrationToSqlVM.md @@ -0,0 +1,256 @@ +--- +external help file: +Module Name: Az.DataMigration +online version: https://learn.microsoft.com/powershell/module/az.datamigration/remove-azdatamigrationtosqlvm +schema: 2.0.0 +--- + +# Remove-AzDataMigrationToSqlVM + +## SYNOPSIS +Delete Database Migration resource. + +## SYNTAX + +### Delete (Default) +``` +Remove-AzDataMigrationToSqlVM -ResourceGroupName -SqlVirtualMachineName + -TargetDbName [-SubscriptionId ] [-Force] [-DefaultProfile ] [-AsJob] [-NoWait] + [-PassThru] [-Confirm] [-WhatIf] [] +``` + +### DeleteViaIdentity +``` +Remove-AzDataMigrationToSqlVM -InputObject [-Force] [-DefaultProfile ] + [-AsJob] [-NoWait] [-PassThru] [-Confirm] [-WhatIf] [] +``` + +## DESCRIPTION +Delete Database Migration resource. + +## EXAMPLES + +### Example 1: {{ Add title here }} +```powershell +{{ Add code here }} +``` + +```output +{{ Add output here }} +``` + +{{ Add description here }} + +### Example 2: {{ Add title here }} +```powershell +{{ Add code here }} +``` + +```output +{{ Add output here }} +``` + +{{ Add description here }} + +## PARAMETERS + +### -AsJob +Run the command as a job + +```yaml +Type: System.Management.Automation.SwitchParameter +Parameter Sets: (All) +Aliases: + +Required: False +Position: Named +Default value: None +Accept pipeline input: False +Accept wildcard characters: False +``` + +### -DefaultProfile +The DefaultProfile parameter is not functional. +Use the SubscriptionId parameter when available if executing the cmdlet against a different subscription. + +```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 +``` + +### -Force +Optional force delete boolean. +If this is provided as true, migration will be deleted even if active. + +```yaml +Type: System.Management.Automation.SwitchParameter +Parameter Sets: (All) +Aliases: + +Required: False +Position: Named +Default value: None +Accept pipeline input: False +Accept wildcard characters: False +``` + +### -InputObject +Identity Parameter +To construct, see NOTES section for INPUTOBJECT properties and create a hash table. + +```yaml +Type: Microsoft.Azure.PowerShell.Cmdlets.DataMigration.Models.IDataMigrationIdentity +Parameter Sets: DeleteViaIdentity +Aliases: + +Required: True +Position: Named +Default value: None +Accept pipeline input: True (ByValue) +Accept wildcard characters: False +``` + +### -NoWait +Run the command asynchronously + +```yaml +Type: System.Management.Automation.SwitchParameter +Parameter Sets: (All) +Aliases: + +Required: False +Position: Named +Default value: None +Accept pipeline input: False +Accept wildcard characters: False +``` + +### -PassThru +Returns true when the command succeeds + +```yaml +Type: System.Management.Automation.SwitchParameter +Parameter Sets: (All) +Aliases: + +Required: False +Position: Named +Default value: None +Accept pipeline input: False +Accept wildcard characters: False +``` + +### -ResourceGroupName +Name of the resource group that contains the resource. +You can obtain this value from the Azure Resource Manager API or the portal. + +```yaml +Type: System.String +Parameter Sets: Delete +Aliases: + +Required: True +Position: Named +Default value: None +Accept pipeline input: False +Accept wildcard characters: False +``` + +### -SqlVirtualMachineName +. + +```yaml +Type: System.String +Parameter Sets: Delete +Aliases: + +Required: True +Position: Named +Default value: None +Accept pipeline input: False +Accept wildcard characters: False +``` + +### -SubscriptionId +Subscription ID that identifies an Azure subscription. + +```yaml +Type: System.String +Parameter Sets: Delete +Aliases: + +Required: False +Position: Named +Default value: (Get-AzContext).Subscription.Id +Accept pipeline input: False +Accept wildcard characters: False +``` + +### -TargetDbName +The name of the target database. + +```yaml +Type: System.String +Parameter Sets: Delete +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 + +### Microsoft.Azure.PowerShell.Cmdlets.DataMigration.Models.IDataMigrationIdentity + +## OUTPUTS + +### Microsoft.Azure.PowerShell.Cmdlets.DataMigration.Models.Api20250630.IDatabaseMigrationSqlVM + +## NOTES + +## RELATED LINKS + diff --git a/src/DataMigration/DataMigration.Autorest/docs/Update-AzDataMigrationSqlService.md b/src/DataMigration/DataMigration.Autorest/docs/Update-AzDataMigrationSqlService.md index d2542664098b..66cc51814cd3 100644 --- a/src/DataMigration/DataMigration.Autorest/docs/Update-AzDataMigrationSqlService.md +++ b/src/DataMigration/DataMigration.Autorest/docs/Update-AzDataMigrationSqlService.md @@ -237,7 +237,7 @@ This cmdlet supports the common parameters: -Debug, -ErrorAction, -ErrorVariable ## OUTPUTS -### Microsoft.Azure.PowerShell.Cmdlets.DataMigration.Models.Api20250315Preview.ISqlMigrationService +### Microsoft.Azure.PowerShell.Cmdlets.DataMigration.Models.Api20250630.ISqlMigrationService ## NOTES diff --git a/src/DataMigration/DataMigration.Autorest/examples/Invoke-AzDataMigrationRetryToSqlDb.md b/src/DataMigration/DataMigration.Autorest/examples/Invoke-AzDataMigrationRetryToSqlDb.md new file mode 100644 index 000000000000..6ee1a83db970 --- /dev/null +++ b/src/DataMigration/DataMigration.Autorest/examples/Invoke-AzDataMigrationRetryToSqlDb.md @@ -0,0 +1,22 @@ +### Example 1: {{ Add title here }} +```powershell +{{ Add code here }} +``` + +```output +{{ Add output here }} +``` + +{{ Add description here }} + +### Example 2: {{ Add title here }} +```powershell +{{ Add code here }} +``` + +```output +{{ Add output here }} +``` + +{{ Add description here }} + diff --git a/src/DataMigration/DataMigration.Autorest/examples/Remove-AzDataMigrationToSqlManagedInstance.md b/src/DataMigration/DataMigration.Autorest/examples/Remove-AzDataMigrationToSqlManagedInstance.md new file mode 100644 index 000000000000..6ee1a83db970 --- /dev/null +++ b/src/DataMigration/DataMigration.Autorest/examples/Remove-AzDataMigrationToSqlManagedInstance.md @@ -0,0 +1,22 @@ +### Example 1: {{ Add title here }} +```powershell +{{ Add code here }} +``` + +```output +{{ Add output here }} +``` + +{{ Add description here }} + +### Example 2: {{ Add title here }} +```powershell +{{ Add code here }} +``` + +```output +{{ Add output here }} +``` + +{{ Add description here }} + diff --git a/src/DataMigration/DataMigration.Autorest/examples/Remove-AzDataMigrationToSqlVM.md b/src/DataMigration/DataMigration.Autorest/examples/Remove-AzDataMigrationToSqlVM.md new file mode 100644 index 000000000000..6ee1a83db970 --- /dev/null +++ b/src/DataMigration/DataMigration.Autorest/examples/Remove-AzDataMigrationToSqlVM.md @@ -0,0 +1,22 @@ +### Example 1: {{ Add title here }} +```powershell +{{ Add code here }} +``` + +```output +{{ Add output here }} +``` + +{{ Add description here }} + +### Example 2: {{ Add title here }} +```powershell +{{ Add code here }} +``` + +```output +{{ Add output here }} +``` + +{{ Add description here }} + diff --git a/src/DataMigration/DataMigration.Autorest/readme.azure.noprofile.md b/src/DataMigration/DataMigration.Autorest/readme.azure.noprofile.md new file mode 100644 index 000000000000..82284693a173 --- /dev/null +++ b/src/DataMigration/DataMigration.Autorest/readme.azure.noprofile.md @@ -0,0 +1,47 @@ +# Azure PowerShell AutoRest Configuration + +> Values +``` yaml +azure: true +powershell: true +license-header: MICROSOFT_MIT_NO_VERSION +branch: master +repo: https://github.com/Azure/azure-rest-api-specs/blob/$(branch) +metadata: + authors: Microsoft Corporation + owners: Microsoft Corporation + description: 'Microsoft Azure PowerShell: $(service-name) cmdlets' + copyright: Microsoft Corporation. All rights reserved. + tags: Azure ResourceManager ARM PSModule $(service-name) + companyName: Microsoft Corporation + requireLicenseAcceptance: true + licenseUri: https://aka.ms/azps-license + projectUri: https://github.com/Azure/azure-powershell +``` + +> Names +``` yaml +prefix: Az +subject-prefix: $(service-name) +module-name: $(prefix).$(service-name) +namespace: Microsoft.Azure.PowerShell.Cmdlets.$(service-name) +``` + +> Folders +``` yaml +clear-output-folder: true +output-folder: . +``` + +> Directives +``` yaml +directive: + - where: + subject: Operation + hide: true + - where: + parameter-name: SubscriptionId + set: + default: + script: '(Get-AzContext).Subscription.Id' +``` \ No newline at end of file diff --git a/src/DataMigration/DataMigration.Autorest/test/Invoke-AzDataMigrationRetryToSqlDb.Tests.ps1 b/src/DataMigration/DataMigration.Autorest/test/Invoke-AzDataMigrationRetryToSqlDb.Tests.ps1 new file mode 100644 index 000000000000..912a1f32a91a --- /dev/null +++ b/src/DataMigration/DataMigration.Autorest/test/Invoke-AzDataMigrationRetryToSqlDb.Tests.ps1 @@ -0,0 +1,33 @@ +if(($null -eq $TestName) -or ($TestName -contains 'Invoke-AzDataMigrationRetryToSqlDb')) +{ + $loadEnvPath = Join-Path $PSScriptRoot 'loadEnv.ps1' + if (-Not (Test-Path -Path $loadEnvPath)) { + $loadEnvPath = Join-Path $PSScriptRoot '..\loadEnv.ps1' + } + . ($loadEnvPath) + $TestRecordingFile = Join-Path $PSScriptRoot 'Invoke-AzDataMigrationRetryToSqlDb.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 'Invoke-AzDataMigrationRetryToSqlDb' { + It 'RetryExpanded' -skip { + { throw [System.NotImplementedException] } | Should -Not -Throw + } + + It 'Retry' -skip { + { throw [System.NotImplementedException] } | Should -Not -Throw + } + + It 'RetryViaIdentityExpanded' -skip { + { throw [System.NotImplementedException] } | Should -Not -Throw + } + + It 'RetryViaIdentity' -skip { + { throw [System.NotImplementedException] } | Should -Not -Throw + } +} diff --git a/src/DataMigration/DataMigration.Autorest/test/Remove-AzDataMigrationToSqlManagedInstance.Tests.ps1 b/src/DataMigration/DataMigration.Autorest/test/Remove-AzDataMigrationToSqlManagedInstance.Tests.ps1 new file mode 100644 index 000000000000..45c3d26fea49 --- /dev/null +++ b/src/DataMigration/DataMigration.Autorest/test/Remove-AzDataMigrationToSqlManagedInstance.Tests.ps1 @@ -0,0 +1,25 @@ +if(($null -eq $TestName) -or ($TestName -contains 'Remove-AzDataMigrationToSqlManagedInstance')) +{ + $loadEnvPath = Join-Path $PSScriptRoot 'loadEnv.ps1' + if (-Not (Test-Path -Path $loadEnvPath)) { + $loadEnvPath = Join-Path $PSScriptRoot '..\loadEnv.ps1' + } + . ($loadEnvPath) + $TestRecordingFile = Join-Path $PSScriptRoot 'Remove-AzDataMigrationToSqlManagedInstance.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 'Remove-AzDataMigrationToSqlManagedInstance' { + It 'Delete' -skip { + { throw [System.NotImplementedException] } | Should -Not -Throw + } + + It 'DeleteViaIdentity' -skip { + { throw [System.NotImplementedException] } | Should -Not -Throw + } +} diff --git a/src/DataMigration/DataMigration.Autorest/test/Remove-AzDataMigrationToSqlVM.Tests.ps1 b/src/DataMigration/DataMigration.Autorest/test/Remove-AzDataMigrationToSqlVM.Tests.ps1 new file mode 100644 index 000000000000..2be1128357ad --- /dev/null +++ b/src/DataMigration/DataMigration.Autorest/test/Remove-AzDataMigrationToSqlVM.Tests.ps1 @@ -0,0 +1,25 @@ +if(($null -eq $TestName) -or ($TestName -contains 'Remove-AzDataMigrationToSqlVM')) +{ + $loadEnvPath = Join-Path $PSScriptRoot 'loadEnv.ps1' + if (-Not (Test-Path -Path $loadEnvPath)) { + $loadEnvPath = Join-Path $PSScriptRoot '..\loadEnv.ps1' + } + . ($loadEnvPath) + $TestRecordingFile = Join-Path $PSScriptRoot 'Remove-AzDataMigrationToSqlVM.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 'Remove-AzDataMigrationToSqlVM' { + It 'Delete' -skip { + { throw [System.NotImplementedException] } | Should -Not -Throw + } + + It 'DeleteViaIdentity' -skip { + { throw [System.NotImplementedException] } | Should -Not -Throw + } +}