-
Notifications
You must be signed in to change notification settings - Fork 3.9k
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
adding SQL DB migration cmdlets to AZ.DataMigration (#17406)
* adding option to launch a new console for running perfDatCollection * nit error * Adding Sql DB cmdlets * updating examples , documentation and adding testcases for SQL Db * unit test cases * update doc/example for sql db * Adding message to distinguish between v1 and v2 cmdlets updating SQL VM documentation regarding scope. * adding description for scope parameter of dql VM * Adding example for delete sql db cmdlet (with optional force parameter) * Adding test for delete/remove sql db * removing new console from perf * removing creds from test recordings * hiding credentials from env.json * Remove MigrationoperationId and Provisioning error from New-AzDataMigrationSqlDb Make MigrationoperationId "required" for Stop-AzDataMigrationToSqlDb * description changes removing migrationoperatinid and provisioning error from new sqlMI and new SqlVM migrations referring to swagger from the PR * Revert "description changes" This reverts commit 5ea6516. * Revert "Revert "description changes"" This reverts commit 8d564fc. * referring to the main branch * modifying examples and tests to include secure strings Co-authored-by: Vasundhra Manhas <vmanhas@microsoft.com>
- Loading branch information
1 parent
f504061
commit dae72ea
Showing
62 changed files
with
2,798 additions
and
263 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -146,4 +146,3 @@ function Get-AzDataMigrationPerformanceDataCollection | |
} | ||
} | ||
|
||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
230 changes: 230 additions & 0 deletions
230
src/DataMigration/DataMigration.Autorest/docs/Get-AzDataMigrationToSqlDb.md
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,230 @@ | ||
--- | ||
external help file: | ||
Module Name: Az.DataMigration | ||
online version: https://docs.microsoft.com/powershell/module/az.datamigration/get-azdatamigrationtosqldb | ||
schema: 2.0.0 | ||
--- | ||
|
||
# Get-AzDataMigrationToSqlDb | ||
|
||
## SYNOPSIS | ||
Retrieve the specified database migration for a given SQL Db. | ||
|
||
## SYNTAX | ||
|
||
### Get (Default) | ||
``` | ||
Get-AzDataMigrationToSqlDb -ResourceGroupName <String> -SqlDbInstanceName <String> -TargetDbName <String> | ||
[-SubscriptionId <String[]>] [-Expand <String>] [-MigrationOperationId <String>] [-DefaultProfile <PSObject>] | ||
[-PassThru] [<CommonParameters>] | ||
``` | ||
|
||
### GetViaIdentity | ||
``` | ||
Get-AzDataMigrationToSqlDb -InputObject <IDataMigrationIdentity> [-Expand <String>] | ||
[-MigrationOperationId <String>] [-DefaultProfile <PSObject>] [-PassThru] [<CommonParameters>] | ||
``` | ||
|
||
## DESCRIPTION | ||
Retrieve the specified database migration for a given SQL Db. | ||
|
||
## EXAMPLES | ||
|
||
### Example 1: Get the details of a given Database Migration to a SQL DB | ||
```powershell | ||
Get-AzDataMigrationToSqlDb -ResourceGroupName "myRG" -SqlDbInstanceName "mySqlDb" -TargetDbName "mydb1" | ||
``` | ||
|
||
```output | ||
Name Kind ProvisioningState MigrationStatus | ||
---- ---- ----------------- --------------- | ||
mydb1 SqlDb Succeeded InProgress | ||
``` | ||
|
||
Get the details of a given Database Migration to a SQL DB | ||
|
||
### Example 2: Get the expanded details of a given Database Migration to a SQL DB | ||
```powershell | ||
$dbMigration = Get-AzDataMigrationToSqlDb -ResourceGroupName "myRG" -SqlDbInstanceName "mySqlDb" -TargetDbName "mydb1" -Expand MigrationStatusDetails | ||
$dbMigration.MigrationStatusDetailMigrationState | ||
``` | ||
|
||
```output | ||
MonitorMigration | ||
``` | ||
|
||
Get the expanded details of a given Database Migration to a SQL DB | ||
|
||
## 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 | ||
``` | ||
### -Expand | ||
Complete migration details be included in the response. | ||
```yaml | ||
Type: System.String | ||
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: GetViaIdentity | ||
Aliases: | ||
|
||
Required: True | ||
Position: Named | ||
Default value: None | ||
Accept pipeline input: True (ByValue) | ||
Accept wildcard characters: False | ||
``` | ||
### -MigrationOperationId | ||
Optional migration operation ID. | ||
If this is provided, then details of migration operation for that ID are retrieved. | ||
If not provided (default), then details related to most recent or current operation are retrieved. | ||
```yaml | ||
Type: System.String | ||
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: Get | ||
Aliases: | ||
|
||
Required: True | ||
Position: Named | ||
Default value: None | ||
Accept pipeline input: False | ||
Accept wildcard characters: False | ||
``` | ||
### -SqlDbInstanceName | ||
. | ||
```yaml | ||
Type: System.String | ||
Parameter Sets: Get | ||
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: Get | ||
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: Get | ||
Aliases: | ||
|
||
Required: True | ||
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.Api20220330Preview.IDatabaseMigrationSqlDb | ||
## NOTES | ||
ALIASES | ||
COMPLEX PARAMETER PROPERTIES | ||
To create the parameters described below, construct a hash table containing the appropriate properties. For information on hash tables, run Get-Help about_Hash_Tables. | ||
INPUTOBJECT <IDataMigrationIdentity>: Identity Parameter | ||
- `[Id <String>]`: Resource identity path | ||
- `[ManagedInstanceName <String>]`: | ||
- `[ResourceGroupName <String>]`: Name of the resource group that contains the resource. You can obtain this value from the Azure Resource Manager API or the portal. | ||
- `[SqlDbInstanceName <String>]`: | ||
- `[SqlMigrationServiceName <String>]`: Name of the SQL Migration Service. | ||
- `[SqlVirtualMachineName <String>]`: | ||
- `[SubscriptionId <String>]`: Subscription ID that identifies an Azure subscription. | ||
- `[TargetDbName <String>]`: The name of the target database. | ||
|
||
## RELATED LINKS | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.