diff --git a/.github/CODEOWNERS b/.github/CODEOWNERS index 3a445e641e1..900e8844808 100644 --- a/.github/CODEOWNERS +++ b/.github/CODEOWNERS @@ -219,3 +219,5 @@ /src/image-gallery/ @zhoxing-ms /src/init/ @zhoxing-ms @HuangYT2000 + +/src/datamigration/ @ashutoshsuman99 diff --git a/src/datamigration/HISTORY.rst b/src/datamigration/HISTORY.rst new file mode 100644 index 00000000000..1c139576ba0 --- /dev/null +++ b/src/datamigration/HISTORY.rst @@ -0,0 +1,8 @@ +.. :changelog: + +Release History +=============== + +0.1.0 +++++++ +* Initial release. diff --git a/src/datamigration/README.md b/src/datamigration/README.md new file mode 100644 index 00000000000..e38e6c6d171 --- /dev/null +++ b/src/datamigration/README.md @@ -0,0 +1,142 @@ +# Azure CLI datamigration Extension # +This is the extension for datamigration + +### How to use ### +Install this extension using the below CLI command +``` +az extension add --name datamigration +``` + +### Included Features ### + +##### Get-assessment ##### +``` +az datamigration get-assessment --connection-string "Data Source=LabServer.database.net;Initial Catalog=master;Integrated Security=False;User Id=User;Password=password" --output-folder "C:\AssessmentOutput" --overwrite +``` + +##### Register-integration-runtime ##### +``` +az datamigration register-integration-runtime --auth-key "IR@00000-0000000-000000-aaaaa-bbbb-cccc" +``` + +#### datamigration sql-managed-instance #### +##### Create (Backup source Fileshare) ##### +``` +az datamigration sql-managed-instance create --managed-instance-name "managedInstance1" \ + --source-location '{\"fileShare\":{\"path\":\"\\\\SharedBackup\\user\",\"password\":\"placeholder\",\"username\":\"Server\\name\"}}' \ + --target-location account-key="abcd" storage-account-resource-id="account.database.windows.net" \ + --migration-service "/subscriptions/00000000-1111-2222-3333-444444444444/resourceGroups/testrg/providers/Microsoft.DataMigration/sqlMigrationServices/testagent" \ + --offline-configuration last-backup-name="last_backup_file_name" offline=true \ + --scope "/subscriptions/00000000-1111-2222-3333-444444444444/resourceGroups/testrg/providers/Microsoft.Sql/managedInstances/instance" \ + --source-database-name "aaa" \ + --source-sql-connection authentication="WindowsAuthentication" data-source="aaa" encrypt-connection=true password="placeholder" trust-server-certificate=true user-name="bbb" \ + --resource-group "testrg" --target-db-name "db1" +``` +##### Create (Backup source Azure Blob) ##### +``` +az datamigration sql-managed-instance create --managed-instance-name "managedInstance1" \ + --source-location '{\"AzureBlob\":{\"storageAccountResourceId\":\"/subscriptions/1111-2222-3333-4444/resourceGroups/RG/prooviders/Microsoft.Storage/storageAccounts/MyStorage\",\"accountKey\":\"======AccountKey====\",\"blobContainerName\":\"ContainerName-X\"}}' \ + --migration-service "/subscriptions/00000000-1111-2222-3333-444444444444/resourceGroups/testrg/providers/Microsoft.DataMigration/sqlMigrationServices/testagent" \ + --offline-configuration last-backup-name="last_backup_file_name" offline=true \ + --scope "/subscriptions/00000000-1111-2222-3333-444444444444/resourceGroups/testrg/providers/Microsoft.Sql/managedInstances/instance" \ + --source-database-name "aaa" \ + --source-sql-connection authentication="WindowsAuthentication" data-source="aaa" encrypt-connection=true password="placeholder" trust-server-certificate=true user-name="bbb" \ + --resource-group "testrg" --target-db-name "db1" +``` +##### Show ##### +``` +az datamigration sql-managed-instance show --managed-instance-name "managedInstance1" --resource-group "testrg" \ + --target-db-name "db1" +``` +##### Cancel ##### +``` +az datamigration sql-managed-instance cancel --managed-instance-name "managedInstance1" \ + --migration-operation-id "4124fe90-d1b6-4b50-b4d9-46d02381f59a" --resource-group "testrg" --target-db-name "db1" +``` +##### Cutover ##### +``` +az datamigration sql-managed-instance cutover --managed-instance-name "managedInstance1" \ + --migration-operation-id "4124fe90-d1b6-4b50-b4d9-46d02381f59a" --resource-group "testrg" --target-db-name "db1" +``` +#### datamigration sql-vm #### +##### Create (Backup source Fileshare) ##### +``` +az datamigration sql-vm create \ + --source-location '{\"fileShare\":{\"path\":\"\\\\SharedBackup\\user\",\"password\":\"placeholder\",\"username\":\"Server\\name\"}}' \ + --migration-service "/subscriptions/00000000-1111-2222-3333-444444444444/resourceGroups/testrg/providers/Microsoft.DataMigration/sqlMigrationServices/testagent" \ + --offline-configuration last-backup-name="last_backup_file_name" offline=true \ + --scope "/subscriptions/00000000-1111-2222-3333-444444444444/resourceGroups/testrg/providers/Microsoft.SqlVirtualMachine/sqlVirtualMachines/testvm" \ + --source-database-name "aaa" \ + --source-sql-connection authentication="WindowsAuthentication" data-source="aaa" encrypt-connection=true password="placeholder" trust-server-certificate=true user-name="bbb" \ + --resource-group "testrg" --sql-virtual-machine-name "testvm" --target-db-name "db1" +``` +##### Create (Backup source Azure Blob) ##### +``` +az datamigration sql-vm create \ + --source-location '{\"AzureBlob\":{\"storageAccountResourceId\":\"/subscriptions/1111-2222-3333-4444/resourceGroups/RG/prooviders/Microsoft.Storage/storageAccounts/MyStorage\",\"accountKey\":\"======AccountKey====\",\"blobContainerName\":\"ContainerName-X\"}}' \ + --target-location account-key="abcd" storage-account-resource-id="account.database.windows.net" \ + --migration-service "/subscriptions/00000000-1111-2222-3333-444444444444/resourceGroups/testrg/providers/Microsoft.DataMigration/sqlMigrationServices/testagent" \ + --offline-configuration last-backup-name="last_backup_file_name" offline=true \ + --scope "/subscriptions/00000000-1111-2222-3333-444444444444/resourceGroups/testrg/providers/Microsoft.SqlVirtualMachine/sqlVirtualMachines/testvm" \ + --source-database-name "aaa" \ + --source-sql-connection authentication="WindowsAuthentication" data-source="aaa" encrypt-connection=true password="placeholder" trust-server-certificate=true user-name="bbb" \ + --resource-group "testrg" --sql-virtual-machine-name "testvm" --target-db-name "db1" +``` +##### Show ##### +``` +az datamigration sql-vm show --resource-group "testrg" --sql-virtual-machine-name "testvm" --target-db-name "db1" +``` +##### Cancel ##### +``` +az datamigration sql-vm cancel --migration-operation-id "4124fe90-d1b6-4b50-b4d9-46d02381f59a" \ + --resource-group "testrg" --sql-virtual-machine-name "testvm" --target-db-name "db1" +``` +##### Cutover ##### +``` +az datamigration sql-vm cutover --migration-operation-id "4124fe90-d1b6-4b50-b4d9-46d02381f59a" \ + --resource-group "testrg" --sql-virtual-machine-name "testvm" --target-db-name "db1" +``` +#### datamigration sql-service #### +##### Create ##### +``` +az datamigration sql-service create --location "northeurope" --resource-group "testrg" --name "testagent" + +az datamigration sql-service wait --created --resource-group "{rg}" --name "{mySqlMigrationService}" +``` +##### List ##### +``` +az datamigration sql-service list --resource-group "testrg" +``` +##### Show ##### +``` +az datamigration sql-service show --resource-group "testrg" --name "service1" +``` +##### Update ##### +``` +az datamigration sql-service update --tags mytag="myval" --resource-group "testrg" --name "testagent" +``` +##### Delete-node ##### +``` +az datamigration sql-service delete-node --integration-runtime-name "IRName" --node-name "nodeName" \ + --resource-group "testrg" --name "service1" +``` +##### List-auth-key ##### +``` +az datamigration sql-service list-auth-key --resource-group "testrg" --name "service1" +``` +##### List-integration-runtime-metric ##### +``` +az datamigration sql-service list-integration-runtime-metric --resource-group "testrg" --name "service1" +``` +##### List-migration ##### +``` +az datamigration sql-service list-migration --resource-group "testrg" --name "service1" +``` +##### Regenerate-auth-key ##### +``` +az datamigration sql-service regenerate-auth-key --key-name "authKey1" --resource-group "testrg" --name "service1" +``` +##### Delete ##### +``` +az datamigration sql-service delete --resource-group "testrg" --name "service1" +``` \ No newline at end of file diff --git a/src/datamigration/azext_datamigration/__init__.py b/src/datamigration/azext_datamigration/__init__.py new file mode 100644 index 00000000000..1ca255c4cba --- /dev/null +++ b/src/datamigration/azext_datamigration/__init__.py @@ -0,0 +1,53 @@ +# -------------------------------------------------------------------------- +# Copyright (c) Microsoft Corporation. All rights reserved. +# Licensed under the MIT License. See License.txt in the project root for +# license information. +# +# Code generated by Microsoft (R) AutoRest Code Generator. +# Changes may cause incorrect behavior and will be lost if the code is +# regenerated. +# -------------------------------------------------------------------------- +# pylint: disable=unused-import + +import azext_datamigration._help +from azure.cli.core import AzCommandsLoader + + +class DataMigrationManagementClientCommandsLoader(AzCommandsLoader): + + def __init__(self, cli_ctx=None): + from azure.cli.core.commands import CliCommandType + from azext_datamigration.generated._client_factory import cf_datamigration_cl + datamigration_custom = CliCommandType( + operations_tmpl='azext_datamigration.custom#{}', + client_factory=cf_datamigration_cl) + parent = super(DataMigrationManagementClientCommandsLoader, self) + parent.__init__(cli_ctx=cli_ctx, custom_command_type=datamigration_custom) + + def load_command_table(self, args): + from azext_datamigration.generated.commands import load_command_table + load_command_table(self, args) + try: + from azext_datamigration.manual.commands import load_command_table as load_command_table_manual + load_command_table_manual(self, args) + except ImportError as e: + if e.name.endswith('manual.commands'): + pass + else: + raise e + return self.command_table + + def load_arguments(self, command): + from azext_datamigration.generated._params import load_arguments + load_arguments(self, command) + try: + from azext_datamigration.manual._params import load_arguments as load_arguments_manual + load_arguments_manual(self, command) + except ImportError as e: + if e.name.endswith('manual._params'): + pass + else: + raise e + + +COMMAND_LOADER_CLS = DataMigrationManagementClientCommandsLoader diff --git a/src/datamigration/azext_datamigration/_help.py b/src/datamigration/azext_datamigration/_help.py new file mode 100644 index 00000000000..9b93f87a6e9 --- /dev/null +++ b/src/datamigration/azext_datamigration/_help.py @@ -0,0 +1,20 @@ +# -------------------------------------------------------------------------- +# Copyright (c) Microsoft Corporation. All rights reserved. +# Licensed under the MIT License. See License.txt in the project root for +# license information. +# +# Code generated by Microsoft (R) AutoRest Code Generator. +# Changes may cause incorrect behavior and will be lost if the code is +# regenerated. +# -------------------------------------------------------------------------- +# pylint: disable=wildcard-import +# pylint: disable=unused-wildcard-import +# pylint: disable=unused-import +from .generated._help import helps # pylint: disable=reimported +try: + from .manual._help import helps # pylint: disable=reimported +except ImportError as e: + if e.name.endswith('manual._help'): + pass + else: + raise e diff --git a/src/datamigration/azext_datamigration/action.py b/src/datamigration/azext_datamigration/action.py new file mode 100644 index 00000000000..9b3d0a8a78c --- /dev/null +++ b/src/datamigration/azext_datamigration/action.py @@ -0,0 +1,20 @@ +# -------------------------------------------------------------------------- +# Copyright (c) Microsoft Corporation. All rights reserved. +# Licensed under the MIT License. See License.txt in the project root for +# license information. +# +# Code generated by Microsoft (R) AutoRest Code Generator. +# Changes may cause incorrect behavior and will be lost if the code is +# regenerated. +# -------------------------------------------------------------------------- +# pylint: disable=wildcard-import +# pylint: disable=unused-wildcard-import + +from .generated.action import * # noqa: F403 +try: + from .manual.action import * # noqa: F403 +except ImportError as e: + if e.name.endswith('manual.action'): + pass + else: + raise e diff --git a/src/datamigration/azext_datamigration/azext_metadata.json b/src/datamigration/azext_datamigration/azext_metadata.json new file mode 100644 index 00000000000..cfc30c747c7 --- /dev/null +++ b/src/datamigration/azext_datamigration/azext_metadata.json @@ -0,0 +1,4 @@ +{ + "azext.isExperimental": true, + "azext.minCliCoreVersion": "2.15.0" +} \ No newline at end of file diff --git a/src/datamigration/azext_datamigration/custom.py b/src/datamigration/azext_datamigration/custom.py new file mode 100644 index 00000000000..885447229d6 --- /dev/null +++ b/src/datamigration/azext_datamigration/custom.py @@ -0,0 +1,20 @@ +# -------------------------------------------------------------------------- +# Copyright (c) Microsoft Corporation. All rights reserved. +# Licensed under the MIT License. See License.txt in the project root for +# license information. +# +# Code generated by Microsoft (R) AutoRest Code Generator. +# Changes may cause incorrect behavior and will be lost if the code is +# regenerated. +# -------------------------------------------------------------------------- +# pylint: disable=wildcard-import +# pylint: disable=unused-wildcard-import + +from .generated.custom import * # noqa: F403 +try: + from .manual.custom import * # noqa: F403 +except ImportError as e: + if e.name.endswith('manual.custom'): + pass + else: + raise e diff --git a/src/datamigration/azext_datamigration/generated/__init__.py b/src/datamigration/azext_datamigration/generated/__init__.py new file mode 100644 index 00000000000..c9cfdc73e77 --- /dev/null +++ b/src/datamigration/azext_datamigration/generated/__init__.py @@ -0,0 +1,12 @@ +# coding=utf-8 +# -------------------------------------------------------------------------- +# Copyright (c) Microsoft Corporation. All rights reserved. +# Licensed under the MIT License. See License.txt in the project root for +# license information. +# +# Code generated by Microsoft (R) AutoRest Code Generator. +# Changes may cause incorrect behavior and will be lost if the code is +# regenerated. +# -------------------------------------------------------------------------- + +__path__ = __import__('pkgutil').extend_path(__path__, __name__) diff --git a/src/datamigration/azext_datamigration/generated/_client_factory.py b/src/datamigration/azext_datamigration/generated/_client_factory.py new file mode 100644 index 00000000000..0d4518aa8a6 --- /dev/null +++ b/src/datamigration/azext_datamigration/generated/_client_factory.py @@ -0,0 +1,28 @@ +# -------------------------------------------------------------------------- +# Copyright (c) Microsoft Corporation. All rights reserved. +# Licensed under the MIT License. See License.txt in the project root for +# license information. +# +# Code generated by Microsoft (R) AutoRest Code Generator. +# Changes may cause incorrect behavior and will be lost if the code is +# regenerated. +# -------------------------------------------------------------------------- + + +def cf_datamigration_cl(cli_ctx, *_): + from azure.cli.core.commands.client_factory import get_mgmt_service_client + from azext_datamigration.vendored_sdks.datamigration import DataMigrationManagementClient + return get_mgmt_service_client(cli_ctx, + DataMigrationManagementClient) + + +def cf_database_migration_sqlmi(cli_ctx, *_): + return cf_datamigration_cl(cli_ctx).database_migrations_sql_mi + + +def cf_database_migration_sqlvm(cli_ctx, *_): + return cf_datamigration_cl(cli_ctx).database_migrations_sql_vm + + +def cf_sqlmigration_service(cli_ctx, *_): + return cf_datamigration_cl(cli_ctx).sql_migration_services diff --git a/src/datamigration/azext_datamigration/generated/_help.py b/src/datamigration/azext_datamigration/generated/_help.py new file mode 100644 index 00000000000..07a8b5e3c83 --- /dev/null +++ b/src/datamigration/azext_datamigration/generated/_help.py @@ -0,0 +1,346 @@ +# -------------------------------------------------------------------------- +# Copyright (c) Microsoft Corporation. All rights reserved. +# Licensed under the MIT License. See License.txt in the project root for +# license information. +# +# Code generated by Microsoft (R) AutoRest Code Generator. +# Changes may cause incorrect behavior and will be lost if the code is +# regenerated. +# -------------------------------------------------------------------------- +# pylint: disable=too-many-lines + +from knack.help_files import helps + + +helps['datamigration'] = ''' + type: group + short-summary: Manage Data Migration +''' + +helps['datamigration sql-managed-instance'] = """ + type: group + short-summary: Manage database migrations to SQL Managed Instance. +""" + +helps['datamigration sql-managed-instance show'] = """ + type: command + short-summary: "Retrieve the specified database migration for a given SQL Managed Instance." + examples: + - name: Get Database Migration resource. + text: |- + az datamigration sql-managed-instance show --managed-instance-name "managedInstance1" --resource-group \ +"testrg" --target-db-name "db1" +""" + +helps['datamigration sql-managed-instance create'] = """ + type: command + short-summary: "Create a new database migration to a given SQL Managed Instance." + parameters: + - name: --source-sql-connection + short-summary: "Source SQL Server connection details." + long-summary: | + Usage: --source-sql-connection data-source=XX authentication=XX user-name=XX password=XX \ +encrypt-connection=XX trust-server-certificate=XX + + data-source: Data source. + authentication: Authentication type. + user-name: User name to connect to source SQL. + password: Password to connect to source SQL. + encrypt-connection: Whether to encrypt connection or not. + trust-server-certificate: Whether to trust server certificate or not. + - name: --offline-configuration + short-summary: "Offline configuration." + long-summary: | + Usage: --offline-configuration offline=XX last-backup-name=XX + + offline: Offline migration + last-backup-name: Last backup name for offline migration. This is optional for migrations from file share. \ +If it is not provided, then the service will determine the last backup file name based on latest backup files present \ +in file share. + - name: --target-location + short-summary: "Target location for copying backups." + long-summary: | + Usage: --target-location storage-account-resource-id=XX account-key=XX + + storage-account-resource-id: Resource Id of the storage account copying backups. + account-key: Storage Account Key. + examples: + - name: Create or Update Database Migration resource with Maximum parameters. + text: |- + az datamigration sql-managed-instance create --managed-instance-name "managedInstance1" \ +--source-location "{\\"fileShare\\":{\\"path\\":\\"C:\\\\\\\\aaa\\\\\\\\bbb\\\\\\\\ccc\\",\\"password\\":\\"placeholder\ +\\",\\"username\\":\\"name\\"}}" --target-location account-key="abcd" storage-account-resource-id="account.database.win\ +dows.net" --migration-service "/subscriptions/00000000-1111-2222-3333-444444444444/resourceGroups/testrg/providers/Micr\ +osoft.DataMigration/sqlMigrationServices/testagent" --offline-configuration last-backup-name="last_backup_file_name" \ +offline=true --scope "/subscriptions/00000000-1111-2222-3333-444444444444/resourceGroups/testrg/providers/Microsoft.Sql\ +/managedInstances/instance" --source-database-name "aaa" --source-sql-connection authentication="WindowsAuthentication"\ + data-source="aaa" encrypt-connection=true password="placeholder" trust-server-certificate=true user-name="bbb" \ +--resource-group "testrg" --target-db-name "db1" + - name: Create or Update Database Migration resource with Minimum parameters. + text: |- + az datamigration sql-managed-instance create --managed-instance-name "managedInstance1" \ +--source-location "{\\"fileShare\\":{\\"path\\":\\"C:\\\\\\\\aaa\\\\\\\\bbb\\\\\\\\ccc\\",\\"password\\":\\"placeholder\ +\\",\\"username\\":\\"name\\"}}" --target-location account-key="abcd" storage-account-resource-id="account.database.win\ +dows.net" --migration-service "/subscriptions/00000000-1111-2222-3333-444444444444/resourceGroups/testrg/providers/Micr\ +osoft.DataMigration/sqlMigrationServices/testagent" --offline-configuration last-backup-name="last_backup_file_name" \ +offline=true --scope "/subscriptions/00000000-1111-2222-3333-444444444444/resourceGroups/testrg/providers/Microsoft.Sql\ +/managedInstances/instance" --source-database-name "aaa" --source-sql-connection authentication="WindowsAuthentication"\ + data-source="aaa" encrypt-connection=true password="placeholder" trust-server-certificate=true user-name="bbb" \ +--resource-group "testrg" --target-db-name "db1" +""" + +helps['datamigration sql-managed-instance cancel'] = """ + type: command + short-summary: "Stop in-progress database migration to SQL Managed Instance." + examples: + - name: Stop ongoing migration for the database. + text: |- + az datamigration sql-managed-instance cancel --managed-instance-name "managedInstance1" \ +--migration-operation-id "4124fe90-d1b6-4b50-b4d9-46d02381f59a" --resource-group "testrg" --target-db-name "db1" +""" + +helps['datamigration sql-managed-instance cutover'] = """ + type: command + short-summary: "Initiate cutover for in-progress online database migration to SQL Managed Instance." + examples: + - name: Cutover online migration operation for the database. + text: |- + az datamigration sql-managed-instance cutover --managed-instance-name "managedInstance1" \ +--migration-operation-id "4124fe90-d1b6-4b50-b4d9-46d02381f59a" --resource-group "testrg" --target-db-name "db1" +""" + +helps['datamigration sql-managed-instance wait'] = """ + type: command + short-summary: Place the CLI in a waiting state until a condition of the datamigration sql-managed-instance is \ +met. + examples: + - name: Pause executing next line of CLI script until the datamigration sql-managed-instance is successfully \ +created. + text: |- + az datamigration sql-managed-instance wait --managed-instance-name "managedInstance1" --resource-group \ +"testrg" --target-db-name "db1" --created +""" + +helps['datamigration sql-vm'] = """ + type: group + short-summary: Manage database migrations to SQL VM. +""" + +helps['datamigration sql-vm show'] = """ + type: command + short-summary: "Retrieve the specified database migration for a given SQL VM." + examples: + - name: Get Database Migration resource. + text: |- + az datamigration sql-vm show --resource-group "testrg" --sql-vm-name "testvm" --target-db-name "db1" +""" + +helps['datamigration sql-vm create'] = """ + type: command + short-summary: "Create a new database migration to a given SQL VM." + parameters: + - name: --source-sql-connection + short-summary: "Source SQL Server connection details." + long-summary: | + Usage: --source-sql-connection data-source=XX authentication=XX user-name=XX password=XX \ +encrypt-connection=XX trust-server-certificate=XX + + data-source: Data source. + authentication: Authentication type. + user-name: User name to connect to source SQL. + password: Password to connect to source SQL. + encrypt-connection: Whether to encrypt connection or not. + trust-server-certificate: Whether to trust server certificate or not. + - name: --offline-configuration + short-summary: "Offline configuration." + long-summary: | + Usage: --offline-configuration offline=XX last-backup-name=XX + + offline: Offline migration + last-backup-name: Last backup name for offline migration. This is optional for migrations from file share. \ +If it is not provided, then the service will determine the last backup file name based on latest backup files present \ +in file share. + - name: --target-location + short-summary: "Target location for copying backups." + long-summary: | + Usage: --target-location storage-account-resource-id=XX account-key=XX + + storage-account-resource-id: Resource Id of the storage account copying backups. + account-key: Storage Account Key. + examples: + - name: Create or Update Database Migration resource with Maximum parameters. + text: |- + az datamigration sql-vm create --source-location "{\\"fileShare\\":{\\"path\\":\\"C:\\\\\\\\aaa\\\\\\\\b\ +bb\\\\\\\\ccc\\",\\"password\\":\\"placeholder\\",\\"username\\":\\"name\\"}}" --target-location account-key="abcd" \ +storage-account-resource-id="account.database.windows.net" --migration-service "/subscriptions/00000000-1111-2222-3333-\ +444444444444/resourceGroups/testrg/providers/Microsoft.DataMigration/sqlMigrationServices/testagent" \ +--offline-configuration last-backup-name="last_backup_file_name" offline=true --scope "/subscriptions/00000000-1111-222\ +2-3333-444444444444/resourceGroups/testrg/providers/Microsoft.SqlVirtualMachine/sqlVirtualMachines/testvm" \ +--source-database-name "aaa" --source-sql-connection authentication="WindowsAuthentication" data-source="aaa" \ +encrypt-connection=true password="placeholder" trust-server-certificate=true user-name="bbb" --resource-group "testrg" \ +--sql-vm-name "testvm" --target-db-name "db1" + - name: Create or Update Database Migration resource with Minimum parameters. + text: |- + az datamigration sql-vm create --source-location "{\\"fileShare\\":{\\"path\\":\\"C:\\\\\\\\aaa\\\\\\\\b\ +bb\\\\\\\\ccc\\",\\"password\\":\\"placeholder\\",\\"username\\":\\"name\\"}}" --target-location account-key="abcd" \ +storage-account-resource-id="account.database.windows.net" --migration-service "/subscriptions/00000000-1111-2222-3333-\ +444444444444/resourceGroups/testrg/providers/Microsoft.DataMigration/sqlMigrationServices/testagent" \ +--offline-configuration last-backup-name="last_backup_file_name" offline=true --scope "/subscriptions/00000000-1111-222\ +2-3333-444444444444/resourceGroups/testrg/providers/Microsoft.SqlVirtualMachine/sqlVirtualMachines/testvm" \ +--source-database-name "aaa" --source-sql-connection authentication="WindowsAuthentication" data-source="aaa" \ +encrypt-connection=true password="placeholder" trust-server-certificate=true user-name="bbb" --resource-group "testrg" \ +--sql-vm-name "testvm" --target-db-name "db1" +""" + +helps['datamigration sql-vm cancel'] = """ + type: command + short-summary: "Stop in-progress database migration to SQL VM." + examples: + - name: Stop ongoing migration for the database. + text: |- + az datamigration sql-vm cancel --migration-operation-id "4124fe90-d1b6-4b50-b4d9-46d02381f59a" \ +--resource-group "testrg" --sql-vm-name "testvm" --target-db-name "db1" +""" + +helps['datamigration sql-vm cutover'] = """ + type: command + short-summary: "Initiate cutover for in-progress online database migration to SQL VM." + examples: + - name: Cutover online migration operation for the database. + text: |- + az datamigration sql-vm cutover --migration-operation-id "4124fe90-d1b6-4b50-b4d9-46d02381f59a" \ +--resource-group "testrg" --sql-vm-name "testvm" --target-db-name "db1" +""" + +helps['datamigration sql-vm wait'] = """ + type: command + short-summary: Place the CLI in a waiting state until a condition of the datamigration sql-vm is met. + examples: + - name: Pause executing next line of CLI script until the datamigration sql-vm is successfully created. + text: |- + az datamigration sql-vm wait --resource-group "testrg" --sql-vm-name "testvm" --target-db-name "db1" \ +--created +""" + +helps['datamigration sql-service'] = """ + type: group + short-summary: Manage Database Migration Service. +""" + +helps['datamigration sql-service list'] = """ + type: command + short-summary: "Retrieve all Database Migration Services in the resource group. And Retrieve all Database \ +Migration Services in the subscription." + examples: + - name: Get Migration Services in the Resource Group. + text: |- + az datamigration sql-service list --resource-group "testrg" + - name: Get Services in the Subscriptions. + text: |- + az datamigration sql-service list +""" + +helps['datamigration sql-service show'] = """ + type: command + short-summary: "Retrieve the Database Migration Service." + examples: + - name: Get Migration Service. + text: |- + az datamigration sql-service show --resource-group "testrg" --name "service1" +""" + +helps['datamigration sql-service create'] = """ + type: command + short-summary: "Create Database Migration Service." + examples: + - name: Create or Update SQL Migration Service with maximum parameters. + text: |- + az datamigration sql-service create --location "northeurope" --resource-group "testrg" --name \ +"testagent" + - name: Create or Update SQL Migration Service with minimum parameters. + text: |- + az datamigration sql-service create --location "northeurope" --resource-group "testrg" --name \ +"testagent" +""" + +helps['datamigration sql-service update'] = """ + type: command + short-summary: "Update Database Migration Service." + examples: + - name: Update SQL Migration Service. + text: |- + az datamigration sql-service update --tags mytag="myval" --resource-group "testrg" --name "testagent" +""" + +helps['datamigration sql-service delete'] = """ + type: command + short-summary: "Delete Database Migration Service." + examples: + - name: Delete SQL Migration Service. + text: |- + az datamigration sql-service delete --resource-group "testrg" --name "service1" +""" + +helps['datamigration sql-service delete-node'] = """ + type: command + short-summary: "Delete the integration runtime node." + examples: + - name: Delete the integration runtime node. + text: |- + az datamigration sql-service delete-node --ir-name "IRName" --node-name "nodeName" --resource-group \ +"testrg" --name "service1" +""" + +helps['datamigration sql-service list-auth-key'] = """ + type: command + short-summary: "Retrieve the List of Authentication Keys for Self Hosted Integration Runtime." + examples: + - name: Retrieve the List of Authentication Keys. + text: |- + az datamigration sql-service list-auth-key --resource-group "testrg" --name "service1" +""" + +helps['datamigration sql-service list-integration-runtime-metric'] = """ + type: command + short-summary: "Retrieve the registered Integration Runtine nodes and their monitoring data for a given Database \ +Migration Service." + examples: + - name: Retrieve the Monitoring Data. + text: |- + az datamigration sql-service list-integration-runtime-metric --resource-group "testrg" --name \ +"service1" +""" + +helps['datamigration sql-service list-migration'] = """ + type: command + short-summary: "Retrieve the List of database migrations attached to the service." + examples: + - name: List database migrations attached to the service. + text: |- + az datamigration sql-service list-migration --resource-group "testrg" --name "service1" +""" + +helps['datamigration sql-service regenerate-auth-key'] = """ + type: command + short-summary: "Regenerate a new set of Authentication Keys for Self Hosted Integration Runtime." + examples: + - name: Regenerate the of Authentication Keys. + text: |- + az datamigration sql-service regenerate-auth-key --key-name "authKey1" --resource-group "testrg" --name \ +"service1" +""" + +helps['datamigration sql-service wait'] = """ + type: command + short-summary: Place the CLI in a waiting state until a condition of the datamigration sql-service is met. + examples: + - name: Pause executing next line of CLI script until the datamigration sql-service is successfully created. + text: |- + az datamigration sql-service wait --resource-group "testrg" --name "service1" --created + - name: Pause executing next line of CLI script until the datamigration sql-service is successfully updated. + text: |- + az datamigration sql-service wait --resource-group "testrg" --name "service1" --updated + - name: Pause executing next line of CLI script until the datamigration sql-service is successfully deleted. + text: |- + az datamigration sql-service wait --resource-group "testrg" --name "service1" --deleted +""" diff --git a/src/datamigration/azext_datamigration/generated/_params.py b/src/datamigration/azext_datamigration/generated/_params.py new file mode 100644 index 00000000000..3dff1c4e27b --- /dev/null +++ b/src/datamigration/azext_datamigration/generated/_params.py @@ -0,0 +1,188 @@ +# -------------------------------------------------------------------------- +# Copyright (c) Microsoft Corporation. All rights reserved. +# Licensed under the MIT License. See License.txt in the project root for +# license information. +# +# Code generated by Microsoft (R) AutoRest Code Generator. +# Changes may cause incorrect behavior and will be lost if the code is +# regenerated. +# -------------------------------------------------------------------------- +# pylint: disable=too-many-lines +# pylint: disable=too-many-statements + +from azure.cli.core.commands.parameters import ( + tags_type, + resource_group_name_type, + get_location_type +) +from azure.cli.core.commands.validators import ( + get_default_location_from_resource_group, + validate_file_or_dict +) +from azext_datamigration.action import ( + AddSourceSqlConnection, + AddOfflineConfiguration, + AddTargetLocation +) + + +def load_arguments(self, _): + + with self.argument_context('datamigration sql-managed-instance show') as c: + c.argument('resource_group_name', resource_group_name_type) + c.argument('managed_instance_name', type=str, help='Name of the target SQL Managed Instance.', id_part='name') + c.argument('target_db_name', type=str, help='The name of the target database.', id_part='child_name_1') + c.argument('migration_operation_id', help='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.') + c.argument('expand', type=str, help='The child resources to include in the response.') + + with self.argument_context('datamigration sql-managed-instance create') as c: + c.argument('resource_group_name', resource_group_name_type) + c.argument('managed_instance_name', type=str, help='Name of the target SQL Managed Instance.') + c.argument('target_db_name', type=str, help='The name of the target database.') + c.argument('scope', type=str, help='Resource Id of the target resource (SQL VM or SQL Managed Instance)') + c.argument('source_sql_connection', action=AddSourceSqlConnection, nargs='+', help='Source SQL Server ' + 'connection details.') + c.argument('source_database_name', type=str, help='Name of the source database.') + c.argument('migration_service', type=str, help='Resource Id of the Migration Service.') + c.argument('migration_operation_id', type=str, help='ID tracking current migration operation.') + c.argument('target_db_collation', type=str, help='Database collation to be used for the target database.') + c.argument('provisioning_error', type=str, help='Error message for migration provisioning failure, if any.') + c.argument('offline_configuration', action=AddOfflineConfiguration, nargs='+', help='Offline configuration.') + c.argument('source_location', type=validate_file_or_dict, help='Source location of backups. Expected value: ' + 'json-string/json-file/@json-file.', arg_group='Backup Configuration') + c.argument('target_location', action=AddTargetLocation, nargs='+', help='Target location for copying backups.', + arg_group='Backup Configuration') + + with self.argument_context('datamigration sql-managed-instance cancel') as c: + c.argument('resource_group_name', resource_group_name_type) + c.argument('managed_instance_name', type=str, help='Name of the target SQL Managed Instance.', id_part='name') + c.argument('target_db_name', type=str, help='The name of the target database.', id_part='child_name_1') + c.argument('migration_operation_id', help='ID tracking migration operation.') + + with self.argument_context('datamigration sql-managed-instance cutover') as c: + c.argument('resource_group_name', resource_group_name_type) + c.argument('managed_instance_name', type=str, help='Name of the target SQL Managed Instance.', id_part='name') + c.argument('target_db_name', type=str, help='The name of the target database.', id_part='child_name_1') + c.argument('migration_operation_id', help='ID tracking migration operation.') + + with self.argument_context('datamigration sql-managed-instance wait') as c: + c.argument('resource_group_name', resource_group_name_type) + c.argument('managed_instance_name', type=str, help='Name of the target SQL Managed Instance.', id_part='name') + c.argument('target_db_name', type=str, help='The name of the target database.', id_part='child_name_1') + c.argument('migration_operation_id', help='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.') + c.argument('expand', type=str, help='The child resources to include in the response.') + + with self.argument_context('datamigration sql-vm show') as c: + c.argument('resource_group_name', resource_group_name_type) + c.argument('sql_vm_name', type=str, help='Name of the target SQL Virtual Machine.', id_part='name') + c.argument('target_db_name', type=str, help='The name of the target database.', id_part='child_name_1') + c.argument('migration_operation_id', help='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.') + c.argument('expand', type=str, help='The child resources to include in the response.') + + with self.argument_context('datamigration sql-vm create') as c: + c.argument('resource_group_name', resource_group_name_type) + c.argument('sql_vm_name', type=str, help='Name of the target SQL Virtual Machine.') + c.argument('target_db_name', type=str, help='The name of the target database.') + c.argument('scope', type=str, help='Resource Id of the target resource (SQL VM or SQL Managed Instance)') + c.argument('source_sql_connection', action=AddSourceSqlConnection, nargs='+', help='Source SQL Server ' + 'connection details.') + c.argument('source_database_name', type=str, help='Name of the source database.') + c.argument('migration_service', type=str, help='Resource Id of the Migration Service.') + c.argument('migration_operation_id', type=str, help='ID tracking current migration operation.') + c.argument('target_db_collation', type=str, help='Database collation to be used for the target database.') + c.argument('provisioning_error', type=str, help='Error message for migration provisioning failure, if any.') + c.argument('offline_configuration', action=AddOfflineConfiguration, nargs='+', help='Offline configuration.') + c.argument('source_location', type=validate_file_or_dict, help='Source location of backups. Expected value: ' + 'json-string/json-file/@json-file.', arg_group='Backup Configuration') + c.argument('target_location', action=AddTargetLocation, nargs='+', help='Target location for copying backups.', + arg_group='Backup Configuration') + + with self.argument_context('datamigration sql-vm cancel') as c: + c.argument('resource_group_name', resource_group_name_type) + c.argument('sql_vm_name', type=str, help='Name of the target SQL Virtual Machine.', id_part='name') + c.argument('target_db_name', type=str, help='The name of the target database.', id_part='child_name_1') + c.argument('migration_operation_id', help='ID tracking migration operation.') + + with self.argument_context('datamigration sql-vm cutover') as c: + c.argument('resource_group_name', resource_group_name_type) + c.argument('sql_vm_name', type=str, help='Name of the target SQL Virtual Machine.', id_part='name') + c.argument('target_db_name', type=str, help='The name of the target database.', id_part='child_name_1') + c.argument('migration_operation_id', help='ID tracking migration operation.') + + with self.argument_context('datamigration sql-vm wait') as c: + c.argument('resource_group_name', resource_group_name_type) + c.argument('sql_vm_name', type=str, help='Name of the target SQL Virtual Machine.', id_part='name') + c.argument('target_db_name', type=str, help='The name of the target database.', id_part='child_name_1') + c.argument('migration_operation_id', help='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.') + c.argument('expand', type=str, help='The child resources to include in the response.') + + with self.argument_context('datamigration sql-service list') as c: + c.argument('resource_group_name', resource_group_name_type) + + with self.argument_context('datamigration sql-service show') as c: + c.argument('resource_group_name', resource_group_name_type) + c.argument('sql_migration_service_name', options_list=['--name', '-n', '--sql-migration-service-name'], + type=str, help='Name of the SQL Migration Service.', id_part='name') + + with self.argument_context('datamigration sql-service create') as c: + c.argument('resource_group_name', resource_group_name_type) + c.argument('sql_migration_service_name', options_list=['--name', '-n', '--sql-migration-service-name'], + type=str, help='Name of the SQL Migration Service.') + c.argument('location', arg_type=get_location_type(self.cli_ctx), required=False, + validator=get_default_location_from_resource_group) + c.argument('tags', tags_type) + + with self.argument_context('datamigration sql-service update') as c: + c.argument('resource_group_name', resource_group_name_type) + c.argument('sql_migration_service_name', options_list=['--name', '-n', '--sql-migration-service-name'], + type=str, help='Name of the SQL Migration Service.', id_part='name') + c.argument('tags', tags_type) + + with self.argument_context('datamigration sql-service delete') as c: + c.argument('resource_group_name', resource_group_name_type) + c.argument('sql_migration_service_name', options_list=['--name', '-n', '--sql-migration-service-name'], + type=str, help='Name of the SQL Migration Service.', id_part='name') + + with self.argument_context('datamigration sql-service delete-node') as c: + c.argument('resource_group_name', resource_group_name_type) + c.argument('sql_migration_service_name', options_list=['--name', '-n', '--sql-migration-service-name'], + type=str, help='Name of the SQL Migration Service.', id_part='name') + c.argument('node_name', type=str, help='The name of node to delete.') + c.argument('integration_runtime_name', options_list=['--ir-name'], type=str, help='The name of integration ' + 'runtime.') + + with self.argument_context('datamigration sql-service list-auth-key') as c: + c.argument('resource_group_name', resource_group_name_type) + c.argument('sql_migration_service_name', options_list=['--name', '-n', '--sql-migration-service-name'], + type=str, help='Name of the SQL Migration Service.') + + with self.argument_context('datamigration sql-service list-integration-runtime-metric') as c: + c.argument('resource_group_name', resource_group_name_type) + c.argument('sql_migration_service_name', options_list=['--name', '-n', '--sql-migration-service-name'], + type=str, help='Name of the SQL Migration Service.') + + with self.argument_context('datamigration sql-service list-migration') as c: + c.argument('resource_group_name', resource_group_name_type) + c.argument('sql_migration_service_name', options_list=['--name', '-n', '--sql-migration-service-name'], + type=str, help='Name of the SQL Migration Service.') + + with self.argument_context('datamigration sql-service regenerate-auth-key') as c: + c.argument('resource_group_name', resource_group_name_type) + c.argument('sql_migration_service_name', options_list=['--name', '-n', '--sql-migration-service-name'], + type=str, help='Name of the SQL Migration Service.', id_part='name') + c.argument('key_name', type=str, help='The name of authentication key to generate.') + c.argument('auth_key1', type=str, help='The first authentication key.') + c.argument('auth_key2', type=str, help='The second authentication key.') + + with self.argument_context('datamigration sql-service wait') as c: + c.argument('resource_group_name', resource_group_name_type) + c.argument('sql_migration_service_name', options_list=['--name', '-n', '--sql-migration-service-name'], + type=str, help='Name of the SQL Migration Service.', id_part='name') diff --git a/src/datamigration/azext_datamigration/generated/_validators.py b/src/datamigration/azext_datamigration/generated/_validators.py new file mode 100644 index 00000000000..b33a44c1ebf --- /dev/null +++ b/src/datamigration/azext_datamigration/generated/_validators.py @@ -0,0 +1,9 @@ +# -------------------------------------------------------------------------- +# Copyright (c) Microsoft Corporation. All rights reserved. +# Licensed under the MIT License. See License.txt in the project root for +# license information. +# +# Code generated by Microsoft (R) AutoRest Code Generator. +# Changes may cause incorrect behavior and will be lost if the code is +# regenerated. +# -------------------------------------------------------------------------- diff --git a/src/datamigration/azext_datamigration/generated/action.py b/src/datamigration/azext_datamigration/generated/action.py new file mode 100644 index 00000000000..11e788343a3 --- /dev/null +++ b/src/datamigration/azext_datamigration/generated/action.py @@ -0,0 +1,131 @@ +# -------------------------------------------------------------------------- +# Copyright (c) Microsoft Corporation. All rights reserved. +# Licensed under the MIT License. See License.txt in the project root for +# license information. +# +# Code generated by Microsoft (R) AutoRest Code Generator. +# Changes may cause incorrect behavior and will be lost if the code is +# regenerated. +# -------------------------------------------------------------------------- + + +# pylint: disable=protected-access + +# pylint: disable=no-self-use + + +import argparse +from collections import defaultdict +from knack.util import CLIError + + +class AddSourceSqlConnection(argparse.Action): + def __call__(self, parser, namespace, values, option_string=None): + action = self.get_action(values, option_string) + namespace.source_sql_connection = action + + def get_action(self, values, option_string): + try: + properties = defaultdict(list) + for (k, v) in (x.split('=', 1) for x in values): + properties[k].append(v) + properties = dict(properties) + except ValueError: + raise CLIError('usage error: {} [KEY=VALUE ...]'.format(option_string)) + d = {} + for k in properties: + kl = k.lower() + v = properties[k] + + if kl == 'data-source': + d['data_source'] = v[0] + + elif kl == 'authentication': + d['authentication'] = v[0] + + elif kl == 'user-name': + d['user_name'] = v[0] + + elif kl == 'password': + d['password'] = v[0] + + elif kl == 'encrypt-connection': + d['encrypt_connection'] = v[0] + + elif kl == 'trust-server-certificate': + d['trust_server_certificate'] = v[0] + + else: + raise CLIError( + 'Unsupported Key {} is provided for parameter source-sql-connection. All possible keys are:' + ' data-source, authentication, user-name, password, encrypt-connection, trust-server-certificate' + .format(k) + ) + + return d + + +class AddOfflineConfiguration(argparse.Action): + def __call__(self, parser, namespace, values, option_string=None): + action = self.get_action(values, option_string) + namespace.offline_configuration = action + + def get_action(self, values, option_string): + try: + properties = defaultdict(list) + for (k, v) in (x.split('=', 1) for x in values): + properties[k].append(v) + properties = dict(properties) + except ValueError: + raise CLIError('usage error: {} [KEY=VALUE ...]'.format(option_string)) + d = {} + for k in properties: + kl = k.lower() + v = properties[k] + + if kl == 'offline': + d['offline'] = v[0] + + elif kl == 'last-backup-name': + d['last_backup_name'] = v[0] + + else: + raise CLIError( + 'Unsupported Key {} is provided for parameter offline-configuration. All possible keys are:' + ' offline, last-backup-name'.format(k) + ) + + return d + + +class AddTargetLocation(argparse.Action): + def __call__(self, parser, namespace, values, option_string=None): + action = self.get_action(values, option_string) + namespace.target_location = action + + def get_action(self, values, option_string): + try: + properties = defaultdict(list) + for (k, v) in (x.split('=', 1) for x in values): + properties[k].append(v) + properties = dict(properties) + except ValueError: + raise CLIError('usage error: {} [KEY=VALUE ...]'.format(option_string)) + d = {} + for k in properties: + kl = k.lower() + v = properties[k] + + if kl == 'storage-account-resource-id': + d['storage_account_resource_id'] = v[0] + + elif kl == 'account-key': + d['account_key'] = v[0] + + else: + raise CLIError( + 'Unsupported Key {} is provided for parameter target-location. All possible keys are:' + ' storage-account-resource-id, account-key'.format(k) + ) + + return d diff --git a/src/datamigration/azext_datamigration/generated/commands.py b/src/datamigration/azext_datamigration/generated/commands.py new file mode 100644 index 00000000000..10575799f99 --- /dev/null +++ b/src/datamigration/azext_datamigration/generated/commands.py @@ -0,0 +1,79 @@ +# -------------------------------------------------------------------------- +# Copyright (c) Microsoft Corporation. All rights reserved. +# Licensed under the MIT License. See License.txt in the project root for +# license information. +# +# Code generated by Microsoft (R) AutoRest Code Generator. +# Changes may cause incorrect behavior and will be lost if the code is +# regenerated. +# -------------------------------------------------------------------------- +# pylint: disable=too-many-statements +# pylint: disable=too-many-locals +# pylint: disable=bad-continuation +# pylint: disable=line-too-long + +from azure.cli.core.commands import CliCommandType +from azext_datamigration.generated._client_factory import ( + cf_database_migration_sqlmi, + cf_database_migration_sqlvm, + cf_sqlmigration_service, +) + + +datamigration_database_migration_sqlmi = CliCommandType( + operations_tmpl='azext_datamigration.vendored_sdks.datamigration.operations._database_migrations_sql_mi_operations#DatabaseMigrationsSqlMiOperations.{}', + client_factory=cf_database_migration_sqlmi, +) + + +datamigration_sqlmigration_service = CliCommandType( + operations_tmpl='azext_datamigration.vendored_sdks.datamigration.operations._sql_migration_services_operations#SqlMigrationServicesOperations.{}', + client_factory=cf_sqlmigration_service, +) + + +datamigration_database_migration_sqlvm = CliCommandType( + operations_tmpl='azext_datamigration.vendored_sdks.datamigration.operations._database_migrations_sql_vm_operations#DatabaseMigrationsSqlVmOperations.{}', + client_factory=cf_database_migration_sqlvm, +) + + +def load_command_table(self, _): + + with self.command_group( + 'datamigration sql-managed-instance', + datamigration_database_migration_sqlmi, + client_factory=cf_database_migration_sqlmi, + ) as g: + g.custom_show_command('show', 'datamigration_sql_managed_instance_show') + g.custom_command('create', 'datamigration_sql_managed_instance_create', supports_no_wait=True) + g.custom_command('cancel', 'datamigration_sql_managed_instance_cancel', supports_no_wait=True) + g.custom_command('cutover', 'datamigration_sql_managed_instance_cutover', supports_no_wait=True) + g.custom_wait_command('wait', 'datamigration_sql_managed_instance_show') + + with self.command_group( + 'datamigration sql-service', datamigration_sqlmigration_service, client_factory=cf_sqlmigration_service + ) as g: + g.custom_command('list', 'datamigration_sql_service_list') + g.custom_show_command('show', 'datamigration_sql_service_show') + g.custom_command('create', 'datamigration_sql_service_create', supports_no_wait=True) + g.custom_command('update', 'datamigration_sql_service_update', supports_no_wait=True) + g.custom_command('delete', 'datamigration_sql_service_delete', supports_no_wait=True, confirmation=True) + g.custom_command('delete-node', 'datamigration_sql_service_delete_node') + g.custom_command('list-auth-key', 'datamigration_sql_service_list_auth_key') + g.custom_command('list-integration-runtime-metric', 'datamigration_sql_service_list_integration_runtime_metric') + g.custom_command('list-migration', 'datamigration_sql_service_list_migration') + g.custom_command('regenerate-auth-key', 'datamigration_sql_service_regenerate_auth_key') + g.custom_wait_command('wait', 'datamigration_sql_service_show') + + with self.command_group( + 'datamigration sql-vm', datamigration_database_migration_sqlvm, client_factory=cf_database_migration_sqlvm + ) as g: + g.custom_show_command('show', 'datamigration_sql_vm_show') + g.custom_command('create', 'datamigration_sql_vm_create', supports_no_wait=True) + g.custom_command('cancel', 'datamigration_sql_vm_cancel', supports_no_wait=True) + g.custom_command('cutover', 'datamigration_sql_vm_cutover', supports_no_wait=True) + g.custom_wait_command('wait', 'datamigration_sql_vm_show') + + with self.command_group('datamigration', is_experimental=True): + pass diff --git a/src/datamigration/azext_datamigration/generated/custom.py b/src/datamigration/azext_datamigration/generated/custom.py new file mode 100644 index 00000000000..cb6a1336727 --- /dev/null +++ b/src/datamigration/azext_datamigration/generated/custom.py @@ -0,0 +1,313 @@ +# -------------------------------------------------------------------------- +# Copyright (c) Microsoft Corporation. All rights reserved. +# Licensed under the MIT License. See License.txt in the project root for +# license information. +# +# Code generated by Microsoft (R) AutoRest Code Generator. +# Changes may cause incorrect behavior and will be lost if the code is +# regenerated. +# -------------------------------------------------------------------------- +# pylint: disable=too-many-lines + +from azure.cli.core.util import sdk_no_wait + + +def datamigration_sql_managed_instance_show(client, + resource_group_name, + managed_instance_name, + target_db_name, + migration_operation_id=None, + expand=None): + return client.get(resource_group_name=resource_group_name, + managed_instance_name=managed_instance_name, + target_db_name=target_db_name, + migration_operation_id=migration_operation_id, + expand=expand) + + +def datamigration_sql_managed_instance_create(client, + resource_group_name, + managed_instance_name, + target_db_name, + scope=None, + source_sql_connection=None, + source_database_name=None, + migration_service=None, + migration_operation_id=None, + target_db_collation=None, + provisioning_error=None, + offline_configuration=None, + source_location=None, + target_location=None, + no_wait=False): + parameters = {} + parameters['properties'] = {} + if scope is not None: + parameters['properties']['scope'] = scope + if source_sql_connection is not None: + parameters['properties']['source_sql_connection'] = source_sql_connection + if source_database_name is not None: + parameters['properties']['source_database_name'] = source_database_name + if migration_service is not None: + parameters['properties']['migration_service'] = migration_service + if migration_operation_id is not None: + parameters['properties']['migration_operation_id'] = migration_operation_id + if target_db_collation is not None: + parameters['properties']['target_database_collation'] = target_db_collation + if provisioning_error is not None: + parameters['properties']['provisioning_error'] = provisioning_error + if offline_configuration is not None: + parameters['properties']['offline_configuration'] = offline_configuration + parameters['properties']['backup_configuration'] = {} + if source_location is not None: + parameters['properties']['backup_configuration']['source_location'] = source_location + if target_location is not None: + parameters['properties']['backup_configuration']['target_location'] = target_location + if len(parameters['properties']['backup_configuration']) == 0: + del parameters['properties']['backup_configuration'] + return sdk_no_wait(no_wait, + client.begin_create_or_update, + resource_group_name=resource_group_name, + managed_instance_name=managed_instance_name, + target_db_name=target_db_name, + parameters=parameters) + + +def datamigration_sql_managed_instance_cancel(client, + resource_group_name, + managed_instance_name, + target_db_name, + migration_operation_id=None, + no_wait=False): + parameters = {} + if migration_operation_id is not None: + parameters['migration_operation_id'] = migration_operation_id + return sdk_no_wait(no_wait, + client.begin_cancel, + resource_group_name=resource_group_name, + managed_instance_name=managed_instance_name, + target_db_name=target_db_name, + parameters=parameters) + + +def datamigration_sql_managed_instance_cutover(client, + resource_group_name, + managed_instance_name, + target_db_name, + migration_operation_id=None, + no_wait=False): + parameters = {} + if migration_operation_id is not None: + parameters['migration_operation_id'] = migration_operation_id + return sdk_no_wait(no_wait, + client.begin_cutover, + resource_group_name=resource_group_name, + managed_instance_name=managed_instance_name, + target_db_name=target_db_name, + parameters=parameters) + + +def datamigration_sql_vm_show(client, + resource_group_name, + sql_vm_name, + target_db_name, + migration_operation_id=None, + expand=None): + return client.get(resource_group_name=resource_group_name, + sql_virtual_machine_name=sql_vm_name, + target_db_name=target_db_name, + migration_operation_id=migration_operation_id, + expand=expand) + + +def datamigration_sql_vm_create(client, + resource_group_name, + sql_vm_name, + target_db_name, + scope=None, + source_sql_connection=None, + source_database_name=None, + migration_service=None, + migration_operation_id=None, + target_db_collation=None, + provisioning_error=None, + offline_configuration=None, + source_location=None, + target_location=None, + no_wait=False): + parameters = {} + parameters['properties'] = {} + if scope is not None: + parameters['properties']['scope'] = scope + if source_sql_connection is not None: + parameters['properties']['source_sql_connection'] = source_sql_connection + if source_database_name is not None: + parameters['properties']['source_database_name'] = source_database_name + if migration_service is not None: + parameters['properties']['migration_service'] = migration_service + if migration_operation_id is not None: + parameters['properties']['migration_operation_id'] = migration_operation_id + if target_db_collation is not None: + parameters['properties']['target_database_collation'] = target_db_collation + if provisioning_error is not None: + parameters['properties']['provisioning_error'] = provisioning_error + if offline_configuration is not None: + parameters['properties']['offline_configuration'] = offline_configuration + parameters['properties']['backup_configuration'] = {} + if source_location is not None: + parameters['properties']['backup_configuration']['source_location'] = source_location + if target_location is not None: + parameters['properties']['backup_configuration']['target_location'] = target_location + if len(parameters['properties']['backup_configuration']) == 0: + del parameters['properties']['backup_configuration'] + return sdk_no_wait(no_wait, + client.begin_create_or_update, + resource_group_name=resource_group_name, + sql_virtual_machine_name=sql_vm_name, + target_db_name=target_db_name, + parameters=parameters) + + +def datamigration_sql_vm_cancel(client, + resource_group_name, + sql_vm_name, + target_db_name, + migration_operation_id=None, + no_wait=False): + parameters = {} + if migration_operation_id is not None: + parameters['migration_operation_id'] = migration_operation_id + return sdk_no_wait(no_wait, + client.begin_cancel, + resource_group_name=resource_group_name, + sql_virtual_machine_name=sql_vm_name, + target_db_name=target_db_name, + parameters=parameters) + + +def datamigration_sql_vm_cutover(client, + resource_group_name, + sql_vm_name, + target_db_name, + migration_operation_id=None, + no_wait=False): + parameters = {} + if migration_operation_id is not None: + parameters['migration_operation_id'] = migration_operation_id + return sdk_no_wait(no_wait, + client.begin_cutover, + resource_group_name=resource_group_name, + sql_virtual_machine_name=sql_vm_name, + target_db_name=target_db_name, + parameters=parameters) + + +def datamigration_sql_service_list(client, + resource_group_name=None): + if resource_group_name: + return client.list_by_resource_group(resource_group_name=resource_group_name) + return client.list_by_subscription() + + +def datamigration_sql_service_show(client, + resource_group_name, + sql_migration_service_name): + return client.get(resource_group_name=resource_group_name, + sql_migration_service_name=sql_migration_service_name) + + +def datamigration_sql_service_create(client, + resource_group_name, + sql_migration_service_name, + location=None, + tags=None, + no_wait=False): + parameters = {} + if location is not None: + parameters['location'] = location + if tags is not None: + parameters['tags'] = tags + return sdk_no_wait(no_wait, + client.begin_create_or_update, + resource_group_name=resource_group_name, + sql_migration_service_name=sql_migration_service_name, + parameters=parameters) + + +def datamigration_sql_service_update(client, + resource_group_name, + sql_migration_service_name, + tags=None, + no_wait=False): + parameters = {} + if tags is not None: + parameters['tags'] = tags + return sdk_no_wait(no_wait, + client.begin_update, + resource_group_name=resource_group_name, + sql_migration_service_name=sql_migration_service_name, + parameters=parameters) + + +def datamigration_sql_service_delete(client, + resource_group_name, + sql_migration_service_name, + no_wait=False): + return sdk_no_wait(no_wait, + client.begin_delete, + resource_group_name=resource_group_name, + sql_migration_service_name=sql_migration_service_name) + + +def datamigration_sql_service_delete_node(client, + resource_group_name, + sql_migration_service_name, + node_name=None, + integration_runtime_name=None): + parameters = {} + if node_name is not None: + parameters['node_name'] = node_name + if integration_runtime_name is not None: + parameters['integration_runtime_name'] = integration_runtime_name + return client.delete_node(resource_group_name=resource_group_name, + sql_migration_service_name=sql_migration_service_name, + parameters=parameters) + + +def datamigration_sql_service_list_auth_key(client, + resource_group_name, + sql_migration_service_name): + return client.list_auth_keys(resource_group_name=resource_group_name, + sql_migration_service_name=sql_migration_service_name) + + +def datamigration_sql_service_list_integration_runtime_metric(client, + resource_group_name, + sql_migration_service_name): + return client.list_monitoring_data(resource_group_name=resource_group_name, + sql_migration_service_name=sql_migration_service_name) + + +def datamigration_sql_service_list_migration(client, + resource_group_name, + sql_migration_service_name): + return client.list_migrations(resource_group_name=resource_group_name, + sql_migration_service_name=sql_migration_service_name) + + +def datamigration_sql_service_regenerate_auth_key(client, + resource_group_name, + sql_migration_service_name, + key_name=None, + auth_key1=None, + auth_key2=None): + parameters = {} + if key_name is not None: + parameters['key_name'] = key_name + if auth_key1 is not None: + parameters['auth_key1'] = auth_key1 + if auth_key2 is not None: + parameters['auth_key2'] = auth_key2 + return client.regenerate_auth_keys(resource_group_name=resource_group_name, + sql_migration_service_name=sql_migration_service_name, + parameters=parameters) diff --git a/src/datamigration/azext_datamigration/manual/__init__.py b/src/datamigration/azext_datamigration/manual/__init__.py new file mode 100644 index 00000000000..c9cfdc73e77 --- /dev/null +++ b/src/datamigration/azext_datamigration/manual/__init__.py @@ -0,0 +1,12 @@ +# coding=utf-8 +# -------------------------------------------------------------------------- +# Copyright (c) Microsoft Corporation. All rights reserved. +# Licensed under the MIT License. See License.txt in the project root for +# license information. +# +# Code generated by Microsoft (R) AutoRest Code Generator. +# Changes may cause incorrect behavior and will be lost if the code is +# regenerated. +# -------------------------------------------------------------------------- + +__path__ = __import__('pkgutil').extend_path(__path__, __name__) diff --git a/src/datamigration/azext_datamigration/manual/_help.py b/src/datamigration/azext_datamigration/manual/_help.py new file mode 100644 index 00000000000..dd59f79a434 --- /dev/null +++ b/src/datamigration/azext_datamigration/manual/_help.py @@ -0,0 +1,161 @@ +# -------------------------------------------------------------------------- +# Copyright (c) Microsoft Corporation. All rights reserved. +# Licensed under the MIT License. See License.txt in the project root for +# license information. +# +# Code generated by Microsoft (R) AutoRest Code Generator. +# Changes may cause incorrect behavior and will be lost if the code is +# regenerated. +# -------------------------------------------------------------------------- +# pylint: disable=too-many-lines + +from knack.help_files import helps + + +helps['datamigration get-assessment'] = """ + type: command + short-summary: Start assessment on SQL Server instance(s). + examples: + - name: Run SQL Assessment on given SQL Server using connection string. + text: |- + az datamigration get-assessment --connection-string "Data Source=LabServer.database.net;Initial Catalog=master;Integrated Security=False;User Id=User;Password=password" --output-folder "C:\\AssessmentOutput" --overwrite + - name: Run SQL Assessment on given SQL Server using assessment config file. + text: |- + az datamigration get-assessment --config-file-path "C:\\Users\\user\\document\\config.json" +""" + +helps['datamigration register-integration-runtime'] = """ + type: command + short-summary: Register Database Migration Service on Integration Runtime + examples: + - name: Register Sql Migration Service on Self Hosted Integration Runtime. + text: |- + az datamigration register-integration-runtime --auth-key "IR@00000-0000000-000000-aaaaa-bbbb-cccc" + - name: Install Integration Runtime and register a Sql Migration Service on it. + text: |- + az datamigration register-integration-runtime --auth-key "IR@00000-0000000-000000-aaaaa-bbbb-cccc" --ir-path "C:\\Users\\user\\Downloads\\IntegrationRuntime.msi" +""" + +helps['datamigration sql-managed-instance create'] = """ + type: command + short-summary: "Create a new database migration to a given SQL Managed Instance." + parameters: + - name: --source-sql-connection + short-summary: "Source SQL Server connection details." + long-summary: | + Usage: --source-sql-connection data-source=XX authentication=XX user-name=XX password=XX \ +encrypt-connection=XX trust-server-certificate=XX + + data-source: Data source. + authentication: Authentication type. + user-name: User name to connect to source SQL. + password: Password to connect to source SQL. + encrypt-connection: Whether to encrypt connection or not. + trust-server-certificate: Whether to trust server certificate or not. + - name: --offline-configuration + short-summary: "Offline configuration." + long-summary: | + Usage: --offline-configuration offline=XX last-backup-name=XX + + offline: Offline migration + last-backup-name: Last backup name for offline migration. This is optional for migrations from file share. \ +If it is not provided, then the service will determine the last backup file name based on latest backup files present \ +in file share. + - name: --target-location + short-summary: "Target location for copying backups." + long-summary: | + Usage: --target-location storage-account-resource-id=XX account-key=XX + + storage-account-resource-id: Resource Id of the storage account copying backups. + account-key: Storage Account Key. + examples: + - name: Create or Update Database Migration resource with fileshare as source for backup files. + text: |- + az datamigration sql-managed-instance create --managed-instance-name "managedInstance1" \ +--source-location '{\\"fileShare\\":{\\"path\\":\\"\\\\\\\\SharedBackup\\\\user\\",\\"password\\":\\"placeholder\\",\ +\\"username\\":\\"Server\\\\name\\"}}' --target-location account-key="abcd" storage-account-resource-id="account.database.win\ +dows.net" --migration-service "/subscriptions/00000000-1111-2222-3333-444444444444/resourceGroups/testrg/providers/Micr\ +osoft.DataMigration/sqlMigrationServices/testagent" --offline-configuration last-backup-name="last_backup_file_name" \ +offline=true --scope "/subscriptions/00000000-1111-2222-3333-444444444444/resourceGroups/testrg/providers/Microsoft.Sql\ +/managedInstances/instance" --source-database-name "aaa" --source-sql-connection authentication="WindowsAuthentication"\ + data-source="aaa" encrypt-connection=true password="placeholder" trust-server-certificate=true user-name="bbb" \ +--resource-group "testrg" --target-db-name "db1" + - name: Create or Update Database Migration resource with Azure Blob storage as source for backup files. + text: |- + az datamigration sql-managed-instance create --managed-instance-name "managedInstance1" \ +--source-location '{\\"AzureBlob\\":{\\"storageAccountResourceId\\":\\"/subscriptions/1111-2222-3333-4444/resourceGroups/RG/prooviders\ +/Microsoft.Storage/storageAccounts/MyStorage\\",\\"accountKey\\":\\"======AccountKey====\\",\\"blobContainerName\\":\\"ContainerName\ +-X\\"}}' --migration-service "/subscriptions/00000000-1111-2222-3333-444444444444/resourceGroups/testrg/providers/Micr\ +osoft.DataMigration/sqlMigrationServices/testagent" --offline-configuration last-backup-name="last_backup_file_name" \ +offline=true --scope "/subscriptions/00000000-1111-2222-3333-444444444444/resourceGroups/testrg/providers/Microsoft.Sql\ +/managedInstances/instance" --source-database-name "aaa" --source-sql-connection authentication="WindowsAuthentication"\ + data-source="aaa" encrypt-connection=true password="placeholder" trust-server-certificate=true user-name="bbb" \ +--resource-group "testrg" --target-db-name "db1" +""" + +helps['datamigration sql-vm create'] = """ + type: command + short-summary: "Create a new database migration to a given SQL VM." + parameters: + - name: --source-sql-connection + short-summary: "Source SQL Server connection details." + long-summary: | + Usage: --source-sql-connection data-source=XX authentication=XX user-name=XX password=XX \ +encrypt-connection=XX trust-server-certificate=XX + + data-source: Data source. + authentication: Authentication type. + user-name: User name to connect to source SQL. + password: Password to connect to source SQL. + encrypt-connection: Whether to encrypt connection or not. + trust-server-certificate: Whether to trust server certificate or not. + - name: --offline-configuration + short-summary: "Offline configuration." + long-summary: | + Usage: --offline-configuration offline=XX last-backup-name=XX + + offline: Offline migration + last-backup-name: Last backup name for offline migration. This is optional for migrations from file share. \ +If it is not provided, then the service will determine the last backup file name based on latest backup files present \ +in file share. + - name: --target-location + short-summary: "Target location for copying backups." + long-summary: | + Usage: --target-location storage-account-resource-id=XX account-key=XX + + storage-account-resource-id: Resource Id of the storage account copying backups. + account-key: Storage Account Key. + examples: + - name: Create or Update Database Migration resource with fileshare as source for backup files. + text: |- + az datamigration sql-vm create --source-location '{\\"fileShare\\":{\\"path\\":\\"\\\\\\\\SharedBackup\ +\\\\user\\",\\"password\\":\\"placeholder\\",\\"username\\":\\"Server\\\\name\\"}}' --target-location account-key="abcd" \ +storage-account-resource-id="account.database.windows.net" --migration-service "/subscriptions/00000000-1111-2222-3333-\ +444444444444/resourceGroups/testrg/providers/Microsoft.DataMigration/sqlMigrationServices/testagent" \ +--offline-configuration last-backup-name="last_backup_file_name" offline=true --scope "/subscriptions/00000000-1111-222\ +2-3333-444444444444/resourceGroups/testrg/providers/Microsoft.SqlVirtualMachine/sqlVirtualMachines/testvm" \ +--source-database-name "aaa" --source-sql-connection authentication="WindowsAuthentication" data-source="aaa" \ +encrypt-connection=true password="placeholder" trust-server-certificate=true user-name="bbb" --resource-group "testrg" \ +--sql-vm-name "testvm" --target-db-name "db1" + - name: Create or Update Database Migration resource with Azure Blob storage as source for backup files. + text: |- + az datamigration sql-vm create --source-location '{\\"AzureBlob\\":{\\"storageAccountResourceId\\"\ +:\\"/subscriptions/1111-2222-3333-4444/resourceGroups/RG/prooviders/Microsoft.Storage/storageAccounts/MyStorage\\",\ +\\"accountKey\\":\\"======AccountKey====\\",\\"blobContainerName\\":\\"ContainerName-X\\"}}' --migration-service "/subscriptions\ +/00000000-1111-2222-3333-444444444444/resourceGroups/testrg/providers/Microsoft.DataMigration/sqlMigrationServices/testagent" \ +--offline-configuration last-backup-name="last_backup_file_name" offline=true --scope "/subscriptions/00000000-1111-222\ +2-3333-444444444444/resourceGroups/testrg/providers/Microsoft.SqlVirtualMachine/sqlVirtualMachines/testvm" \ +--source-database-name "aaa" --source-sql-connection authentication="WindowsAuthentication" data-source="aaa" \ +encrypt-connection=true password="placeholder" trust-server-certificate=true user-name="bbb" --resource-group "testrg" \ +--sql-vm-name "testvm" --target-db-name "db1" +""" + +helps['datamigration sql-service create'] = """ + type: command + short-summary: "Create Database Migration Service." + examples: + - name: Create or Update SQL Migration Service. + text: |- + az datamigration sql-service create --location "northeurope" --resource-group "testrg" --name \ +"testagent" +""" diff --git a/src/datamigration/azext_datamigration/manual/_params.py b/src/datamigration/azext_datamigration/manual/_params.py new file mode 100644 index 00000000000..96d05548e6c --- /dev/null +++ b/src/datamigration/azext_datamigration/manual/_params.py @@ -0,0 +1,24 @@ +# -------------------------------------------------------------------------- +# Copyright (c) Microsoft Corporation. All rights reserved. +# Licensed under the MIT License. See License.txt in the project root for +# license information. +# +# Code generated by Microsoft (R) AutoRest Code Generator. +# Changes may cause incorrect behavior and will be lost if the code is +# regenerated. +# -------------------------------------------------------------------------- +# pylint: disable=too-many-lines +# pylint: disable=too-many-statements + + +def load_arguments(self, _): + + with self.argument_context('datamigration get-assessment') as c: + c.argument('connection_string', nargs='+', help='Sql Server Connection Strings') + c.argument('output_folder', type=str, help='Output folder to store assessment report') + c.argument('config_file_path', type=str, help='Path of the ConfigFile') + c.argument('overwrite', help='Enable this parameter to overwrite the existing assessment report') + + with self.argument_context('datamigration register-integration-runtime') as c: + c.argument('auth_key', type=str, help='AuthKey of Sql Migration Service') + c.argument('ir_path', type=str, help='Path of Integration Runtime MSI') diff --git a/src/datamigration/azext_datamigration/manual/commands.py b/src/datamigration/azext_datamigration/manual/commands.py new file mode 100644 index 00000000000..0077dc64bde --- /dev/null +++ b/src/datamigration/azext_datamigration/manual/commands.py @@ -0,0 +1,25 @@ +# -------------------------------------------------------------------------- +# Copyright (c) Microsoft Corporation. All rights reserved. +# Licensed under the MIT License. See License.txt in the project root for +# license information. +# +# Code generated by Microsoft (R) AutoRest Code Generator. +# Changes may cause incorrect behavior and will be lost if the code is +# regenerated. +# -------------------------------------------------------------------------- +# pylint: disable=too-many-statements +# pylint: disable=too-many-locals +# pylint: disable=line-too-long + + +def load_command_table(self, _): + + with self.command_group( + 'datamigration get-assessment' + ) as g: + g.custom_command('', 'datamigration_assessment') + + with self.command_group( + 'datamigration register-integration-runtime' + ) as g: + g.custom_command('', 'datamigration_register_ir') diff --git a/src/datamigration/azext_datamigration/manual/custom.py b/src/datamigration/azext_datamigration/manual/custom.py new file mode 100644 index 00000000000..b339bab1663 --- /dev/null +++ b/src/datamigration/azext_datamigration/manual/custom.py @@ -0,0 +1,305 @@ +# -------------------------------------------------------------------------- +# Copyright (c) Microsoft Corporation. All rights reserved. +# Licensed under the MIT License. See License.txt in the project root for +# license information. +# +# Code generated by Microsoft (R) AutoRest Code Generator. +# Changes may cause incorrect behavior and will be lost if the code is +# regenerated. +# -------------------------------------------------------------------------- +# pylint: disable=too-many-lines +# pylint: disable=unused-argument +# pylint: disable=line-too-long + +import ctypes +import json +import os +import platform +import subprocess +import time +import urllib.request +from zipfile import ZipFile +from azure.cli.core.azclierror import CLIInternalError +from azure.cli.core.azclierror import FileOperationError +from azure.cli.core.azclierror import InvalidArgumentValueError +from azure.cli.core.azclierror import MutuallyExclusiveArgumentError +from azure.cli.core.azclierror import RequiredArgumentMissingError +from azure.cli.core.azclierror import UnclassifiedUserFault + + +# ----------------------------------------------------------------------------------------------------------------- +# Common helper function to validate if the commands are running on Windows. +# ----------------------------------------------------------------------------------------------------------------- +def validate_os_env(): + + if not platform.system().__contains__('Windows'): + raise CLIInternalError("This command cannot be run in non-windows environment. Please run this command in Windows environment") + + +# ----------------------------------------------------------------------------------------------------------------- +# Assessment Command Implementation. +# ----------------------------------------------------------------------------------------------------------------- +def datamigration_assessment(connection_string=None, + output_folder=None, + overwrite=False, + config_file_path=None): + + try: + + validate_os_env() + + defaultOutputFolder = get_default_output_folder() + + # Assigning base folder path + baseFolder = os.path.join(defaultOutputFolder, "Downloads") + exePath = os.path.join(baseFolder, "SqlAssessment.Console.csproj", "SqlAssessment.exe") + + # Creating base folder structure + if not os.path.exists(baseFolder): + os.makedirs(baseFolder) + + testPath = os.path.exists(exePath) + + # Downloading console app zip and extracting it + if not testPath: + zipSource = "https://sqlassess.blob.core.windows.net/app/SqlAssessment.zip" + zipDestination = os.path.join(baseFolder, "SqlAssessment.zip") + + urllib.request.urlretrieve(zipSource, filename=zipDestination) + with ZipFile(zipDestination, 'r') as zipFile: + zipFile.extractall(path=baseFolder) + + if connection_string is not None and config_file_path is not None: + raise MutuallyExclusiveArgumentError("Both connection_string and config_file_path are mutually exclusive arguments. Please provide only one of these arguments.") + + if connection_string is not None: + connection_string = ", ".join(f"\"{i}\"" for i in connection_string) + cmd = f'{exePath} Assess --sqlConnectionStrings {connection_string} ' if output_folder is None else f'{exePath} Assess --sqlConnectionStrings {connection_string} --outputFolder "{output_folder}" ' + cmd += '--overwrite False' if overwrite is False else '' + subprocess.call(cmd, shell=False) + elif config_file_path is not None: + validate_config_file_path(config_file_path) + cmd = f'{exePath} --configFile "{config_file_path}"' + subprocess.call(cmd, shell=False) + else: + raise RequiredArgumentMissingError('No valid parameter set used. Please provide any one of the these prameters: connection_string, config_file_path') + + # Printing log file path + logFilePath = os.path.join(defaultOutputFolder, "Logs") + print(f"Event and Error Logs Folder Path: {logFilePath}") + + except Exception as e: + raise e + + +# ----------------------------------------------------------------------------------------------------------------- +# Assessment helper function to test whether the given cofig_file_path is valid and has valid action specified. +# ----------------------------------------------------------------------------------------------------------------- +def validate_config_file_path(path): + + if not os.path.exists(path): + raise InvalidArgumentValueError(f'Invalid config file path: {path}. Please provide a valid config file path.') + + # JSON file + with open(path, "r", encoding=None) as f: + configJson = json.loads(f.read()) + try: + if not configJson['action'].strip().lower() == "assess": + raise FileOperationError("The desired action in config file was invalid. Please use \"Assess\" for action property in config file") + except KeyError as e: + raise FileOperationError("Invalid schema of config file. Please ensure that this is a properly formatted config file.") from e + + +# ----------------------------------------------------------------------------------------------------------------- +# Assessment helper function to return the default output folder path depending on OS environment. +# ----------------------------------------------------------------------------------------------------------------- +def get_default_output_folder(): + + osPlatform = platform.system() + + if osPlatform.__contains__('Linux'): + defaultOutputPath = os.path.join(os.getenv('USERPROFILE'), ".config", "Microsoft", "SqlAssessment") + elif osPlatform.__contains__('Darwin'): + defaultOutputPath = os.path.join(os.getenv('USERPROFILE'), "Library", "Application Support", "Microsoft", "SqlAssessment") + else: + defaultOutputPath = os.path.join(os.getenv('LOCALAPPDATA'), "Microsoft", "SqlAssessment") + + return defaultOutputPath + + +# ----------------------------------------------------------------------------------------------------------------- +# Register Sql Migration Service on IR command Implementation. +# ----------------------------------------------------------------------------------------------------------------- +def datamigration_register_ir(auth_key, + ir_path=None): + + validate_os_env() + + if not is_user_admin(): + raise UnclassifiedUserFault("Failed: You do not have Administrator rights to run this command. Please re-run this command as an Administrator!") + validate_input(auth_key) + if ir_path is not None: + install_gateway(ir_path) + + register_ir(auth_key) + + +# ----------------------------------------------------------------------------------------------------------------- +# Helper function to check IR path Extension +# ----------------------------------------------------------------------------------------------------------------- +def validate_ir_extension(ir_path): + + if ir_path is not None: + ir_extension = os.path.splitext(ir_path)[1] + if ir_extension != ".msi": + raise InvalidArgumentValueError("Invalid Integration Runtime Extension. Please provide a valid Integration Runtime MSI path.") + + +# ----------------------------------------------------------------------------------------------------------------- +# Helper function to check whether the command is run as admin. +# ----------------------------------------------------------------------------------------------------------------- +def is_user_admin(): + + try: + isAdmin = os.getuid() == 0 + except AttributeError: + isAdmin = ctypes.windll.shell32.IsUserAnAdmin() != 0 + + return isAdmin + + +# ----------------------------------------------------------------------------------------------------------------- +# Helper function to validate key input. +# ----------------------------------------------------------------------------------------------------------------- +def validate_input(key): + if key == "": + raise InvalidArgumentValueError("Failed: IR Auth key is empty. Please provide a valid auth key.") + + +# ----------------------------------------------------------------------------------------------------------------- +# Helper function to check whether SHIR is installed or not. +# ----------------------------------------------------------------------------------------------------------------- +def check_whether_gateway_installed(name): + + import winreg + # Connecting to key in registry + accessRegistry = winreg.ConnectRegistry(None, winreg.HKEY_LOCAL_MACHINE) + + # Get the path of Installed softwares + accessKey = winreg.OpenKey(accessRegistry, r"SOFTWARE\Microsoft\Windows\CurrentVersion\Uninstall") + + for i in range(0, winreg.QueryInfoKey(accessKey)[0]): + installedSoftware = winreg.EnumKey(accessKey, i) + installedSoftwareKey = winreg.OpenKey(accessKey, installedSoftware) + try: + displayName = winreg.QueryValueEx(installedSoftwareKey, r"DisplayName")[0] + if name in displayName: + return True + except FileNotFoundError: + pass + + # Adding this try to look for Installed IR in Program files (Assumes the IR is always installed there) + try: + diaCmdPath = get_cmd_file_path_static() + if os.path.exists(diaCmdPath): + return True + else: + return False + except (FileNotFoundError, IndexError): + return False + + +# ----------------------------------------------------------------------------------------------------------------- +# Helper function to install SHIR +# ----------------------------------------------------------------------------------------------------------------- +def install_gateway(path): + + if check_whether_gateway_installed("Microsoft Integration Runtime"): + print("Microsoft Integration Runtime is already installed") + return + + validate_ir_extension(path) + + if not os.path.exists(path): + raise InvalidArgumentValueError(f"Invalid Integration Runtime MSI path : {path}. Please provide a valid Integration Runtime MSI path") + + print("Start Integration Runtime installation") + + installCmd = f'msiexec.exe /i "{path}" /quiet /passive' + subprocess.call(installCmd, shell=False) + time.sleep(30) + + print("Integration Runtime installation is complete") + + +# ----------------------------------------------------------------------------------------------------------------- +# Helper function to register Sql Migration Service on IR +# ----------------------------------------------------------------------------------------------------------------- +def register_ir(key): + print(f"Start to register IR with key: {key}") + + cmdFilePath = get_cmd_file_path() + + directoryPath = os.path.dirname(cmdFilePath) + parentDirPath = os.path.dirname(directoryPath) + + dmgCmdPath = os.path.join(directoryPath, "dmgcmd.exe") + regIRScriptPath = os.path.join(parentDirPath, "PowerShellScript", "RegisterIntegrationRuntime.ps1") + + portCmd = f'{dmgCmdPath} -EnableRemoteAccess 8060' + irCmd = f'powershell -command "& \'{regIRScriptPath}\' -gatewayKey {key}"' + + subprocess.call(portCmd, shell=False) + subprocess.call(irCmd, shell=False) + + +# ----------------------------------------------------------------------------------------------------------------- +# Helper function to get SHIR script path +# ----------------------------------------------------------------------------------------------------------------- +def get_cmd_file_path(): + + import winreg + try: + # Connecting to key in registry + accessRegistry = winreg.ConnectRegistry(None, winreg.HKEY_LOCAL_MACHINE) + + # Get the path of Integration Runtime + accessKey = winreg.OpenKey(accessRegistry, r"SOFTWARE\Microsoft\DataTransfer\DataManagementGateway\ConfigurationManager") + accessValue = winreg.QueryValueEx(accessKey, r"DiacmdPath")[0] + + return accessValue + except FileNotFoundError: + try: + diaCmdPath = get_cmd_file_path_static() + return diaCmdPath + except FileNotFoundError as e: + raise FileOperationError("Failed: No installed IR found or installed IR is not present in Program Files. Please install Integration Runtime in default location and re-run this command") from e + except IndexError as e: + raise FileOperationError("IR is not properly installed. Please re-install it and re-run this command") from e + + +# ----------------------------------------------------------------------------------------------------------------- +# Helper function to get DiaCmdPath with Static Paths. This function assumes that IR is always installed in program files +# ----------------------------------------------------------------------------------------------------------------- +def get_cmd_file_path_static(): + + # Base folder is taken as Program files or Program files (x86). + baseFolderX64 = os.path.join(r"C:\Program Files", "Microsoft Integration Runtime") + baseFolderX86 = os.path.join(r"C:\Program Files (x86)", "Microsoft Integration Runtime") + if os.path.exists(baseFolderX86): + baseFolder = baseFolderX86 + else: + baseFolder = baseFolderX64 + + # Add the latest version to baseFolder path. + listDir = os.listdir(baseFolder) + listDir.sort(reverse=True) + versionFolder = os.path.join(baseFolder, listDir[0]) + + # Create diaCmd default path and check if it is valid or not. + diaCmdPath = os.path.join(versionFolder, "Shared", "diacmd.exe") + + if not os.path.exists(diaCmdPath): + raise FileNotFoundError(f"The system cannot find the path specified: {diaCmdPath}") + + return diaCmdPath diff --git a/src/datamigration/azext_datamigration/manual/tests/__init__.py b/src/datamigration/azext_datamigration/manual/tests/__init__.py new file mode 100644 index 00000000000..be1a152630c --- /dev/null +++ b/src/datamigration/azext_datamigration/manual/tests/__init__.py @@ -0,0 +1,12 @@ +# coding=utf-8 +# -------------------------------------------------------------------------- +# Copyright (c) Microsoft Corporation. All rights reserved. +# Licensed under the MIT License. See License.txt in the project root for +# license information. +# +# Code generated by Microsoft (R) AutoRest Code Generator. +# Changes may cause incorrect behavior and will be lost if the code is +# regenerated. +# -------------------------------------------------------------------------- + +__path__ = __import__('pkgutil').extend_path(__path__, __name__) \ No newline at end of file diff --git a/src/datamigration/azext_datamigration/manual/tests/latest/__init__.py b/src/datamigration/azext_datamigration/manual/tests/latest/__init__.py new file mode 100644 index 00000000000..c9cfdc73e77 --- /dev/null +++ b/src/datamigration/azext_datamigration/manual/tests/latest/__init__.py @@ -0,0 +1,12 @@ +# coding=utf-8 +# -------------------------------------------------------------------------- +# Copyright (c) Microsoft Corporation. All rights reserved. +# Licensed under the MIT License. See License.txt in the project root for +# license information. +# +# Code generated by Microsoft (R) AutoRest Code Generator. +# Changes may cause incorrect behavior and will be lost if the code is +# regenerated. +# -------------------------------------------------------------------------- + +__path__ = __import__('pkgutil').extend_path(__path__, __name__) diff --git a/src/datamigration/azext_datamigration/manual/tests/latest/test_datamigration_scenario.py b/src/datamigration/azext_datamigration/manual/tests/latest/test_datamigration_scenario.py new file mode 100644 index 00000000000..8ae85a6b8d1 --- /dev/null +++ b/src/datamigration/azext_datamigration/manual/tests/latest/test_datamigration_scenario.py @@ -0,0 +1,652 @@ +# -------------------------------------------------------------------------------------------- +# Copyright (c) Microsoft Corporation. All rights reserved. +# Licensed under the MIT License. See License.txt in the project root for license information. +# -------------------------------------------------------------------------------------------- +# pylint: disable=line-too-long +# pylint: disable=unused-import + +import time + +# Env setup_scenario +def setup_scenario(test): + test.kwargs.update({ + "serviceRG": "CLIUnitTest", + "sqlMigrationService": "dmsCliUnitTest", + "location": "eastus2euap", + "createSqlMigrationService": "sqlServiceUnitTest-Pipeline2" + }), + test.kwargs.update({ + "miRG": "migrationTesting", + "managedInstance": "migrationtestmi", + "miTargetDb": "tsum-CLI-MIOnline" + }), + test.kwargs.update({ + "vmRG": "tsum38RG", + "virtualMachine": "DMSCmdletTest-SqlVM", + "vmTargetDb": "tsum-Db-VM" + }),#12. Create Common Params + test.kwargs.update({ + "migrationService": "/subscriptions/XXXXXXXX-XXXX-XXXX-XXXX-XXXXXXXXXXXX/resourceGroups/tsum38RG/providers/Microsoft.DataMigration/SqlMigrationServices/sqlServiceUnitTest-Pipeline", + "miScope": "/subscriptions/XXXXXXXX-XXXX-XXXX-XXXX-XXXXXXXXXXXX/resourceGroups/MigrationTesting/providers/Microsoft.Sql/managedInstances/migrationtestmi", + "vmScope": "/subscriptions/XXXXXXXX-XXXX-XXXX-XXXX-XXXXXXXXXXXX/resourceGroups/tsum38RG/providers/Microsoft.SqlVirtualMachine/SqlVirtualMachines/DMSCmdletTest-SqlVM", + "sourceDBName": "AdventureWorks", + "miRG": "MigrationTesting", + "authentication": "SqlAuthentication", + "dataSource":"AALAB03-2K8.REDMOND.CORP.MICROSOFT.COM", + "password": "XXXXXXXXXXXX", + "userName": "hijavatestuser1", + "accountKey": "XXXXXXXXXXXX/XXXXXXXXXXXX", + "storageAccountId": "/subscriptions/XXXXXXXX-XXXX-XXXX-XXXX-XXXXXXXXXXXX/resourceGroups/aaskhan/providers/Microsoft.Storage/storageAccounts/aasimmigrationtest" + }), # MI Online FileShare + test.kwargs.update({ + "miOnlineFsTargetDb": "tsum-Db-mi-online-fs9", + "fsSourceLocation":"'{\"fileShare\":{\"path\":\"\\\\\\\\aalab03-2k8.redmond.corp.microsoft.com\\\\SharedBackup\\\\tsuman\",\"password\":\"XXXXXXXXXXXX\",\"username\":\"AALAB03-2K8\\hijavatestlocaluser\"}}'" + }), #Blob + test.kwargs.update({ + "blobSourceLocation": "'{\"AzureBlob\":{\"storageAccountResourceId\":\"/subscriptions/fc04246f-04c5-437e-ac5e-206a19e7193f/resourceGroups/tzppesignoff1211/providers/Microsoft.Storage/storageAccounts/hijavateststorage\",\"accountKey\":\"XXXXXXXXXXXX/XXXXXXXXXXXX\",\"blobContainerName\":\"tsum38-adventureworks\"}}'", + "miOnlineBlobTargetDb":"tsum-Db-mi-online-blob9" + }), # VM DBs + test.kwargs.update({ + "vmOnlineFsTargetDb":"tsum-Db-vm-online-fs9", + "vmOnlineBlobTargetDb": "tsum-Db-vm-online-blob9" + })# Offline + test.kwargs.update({ + "lastBackupName":"AdventureWorksTransactionLog2.trn", + "miOfflineFsTargetDb":"tsum-Db-mi-offline-fs", + "miOfflineBlobTargetDb": "tsum-Db-mi-offline-blob", + "vmOfflineFsTargetDb":"tsum-Db-vm-offline-fs", + "vmOfflineBlobTargetDb": "tsum-Db-vm-offline-blob9" + }) + + +#Test Cases +#1. SQL Service Create +def step_sql_service_create(test, checks=None): + if checks is None: + checks = [] + test.cmd('az datamigration sql-service create ' + '--location "{location}" ' + '--resource-group "{serviceRG}" ' + '--name "{createSqlMigrationService}"', + checks=checks) + +#2. SQL Service Show +def step_sql_service_show(test, checks=None): + if checks is None: + checks = [] + test.cmd('az datamigration sql-service show ' + '--resource-group "{serviceRG}" ' + '--name "{sqlMigrationService}"', + checks=checks) +#3. SQL Service List RG +def step_sql_service_list_rg(test, checks=None): + if checks is None: + checks = [] + test.cmd('az datamigration sql-service list ' + '--resource-group "{serviceRG}"', + checks=checks) + +#4. SQL Service List Sub +def step_sql_service_list_sub(test, checks=None): + if checks is None: + checks = [] + test.cmd('az datamigration sql-service list ', + checks=checks) + +#5. SQL Service List Migration +def step_sql_service_list_migration(test, checks=None): + if checks is None: + checks = [] + test.cmd('az datamigration sql-service list-migration ' + '--resource-group "{serviceRG}" ' + '--name "{sqlMigrationService}"', + checks=checks) + +#6. SQL Service List Auth Keys +def step_sql_service_list_auth_key(test, checks=None): + if checks is None: + checks = [] + test.cmd('az datamigration sql-service list-auth-key ' + '--resource-group "{serviceRG}" ' + '--name "{sqlMigrationService}"', + checks=checks) + +#7. SQL Service Regererate Auth Keys +def step_sql_service_regenerate_auth_key(test, checks=None): + if checks is None: + checks = [] + test.cmd('az datamigration sql-service regenerate-auth-key ' + '--key-name "authKey1" ' + '--resource-group "{serviceRG}" ' + '--name "{sqlMigrationService}"', + checks=checks) + +#8. SQL Service Regererate Auth Keys +def step_sql_service_list_integration_runtime_metric(test, checks=None): + if checks is None: + checks = [] + test.cmd('az datamigration sql-service list-integration-runtime-metric ' + '--resource-group "{serviceRG}" ' + '--name "{sqlMigrationService}"', + checks=checks) + +#9. SQL Service Delete +def step_sql_service_delete(test, checks=None): + if checks is None: + checks = [] + test.cmd('az datamigration sql-service delete -y ' + '--resource-group "{serviceRG}" ' + '--name "{createSqlMigrationService}"', + checks=checks) + +#10. MI Show +def step_sql_managed_instance_show(test, checks=None): + if checks is None: + checks = [] + test.cmd('az datamigration sql-managed-instance show ' + '--managed-instance-name "{managedInstance}" ' + '--resource-group "{miRG}" ' + '--target-db-name "{miTargetDb}"', + checks=checks) + +#11. VM Show +def step_sql_vm_show(test, checks=None): + if checks is None: + checks = [] + test.cmd('az datamigration sql-vm show ' + '--resource-group "{vmRG}" ' + '--sql-vm-name "{virtualMachine}" ' + '--target-db-name "{vmTargetDb}"', + checks=checks) + + +#12. MI Online FileShare Create +def step_sql_managed_instance_online_fileshare_create(test, checks=None): + if checks is None: + checks = [] + test.cmd('az datamigration sql-managed-instance create ' + '--source-location {fsSourceLocation} ' + '--target-location account-key="{accountKey}" storage-account-resource-id="{storageAccountId}" ' + '--migration-service "{migrationService}" ' + '--scope "{miScope}" ' + '--source-database-name "{sourceDBName}" ' + '--source-sql-connection authentication="{authentication}" data-source="{dataSource}" password="{password}" user-name="{userName}" ' + '--target-db-name "{miOnlineFsTargetDb}" ' + '--resource-group "{miRG}" ' + '--managed-instance-name "{managedInstance}"', + checks=checks) + + #13.1 MI Online FileShare Cutover +def step_sql_managed_instance_online_fileshare_cutover(test, checks=None): + if checks is None: + checks = [] + + miOnlinefileShareMigrationStats = test.cmd('az datamigration sql-managed-instance show ' + '--managed-instance-name "{managedInstance}" ' + '--resource-group "{miRG}" ' + '--target-db-name "{miOnlineFsTargetDb}" ' + '--expand=MigrationStatusDetails').get_output_in_json() + miOnlineFsIsfullBackupRestore = miOnlinefileShareMigrationStats["properties"]["migrationStatusDetails"]["isFullBackupRestored"] + migrationStatus = miOnlinefileShareMigrationStats["properties"]["migrationStatus"] + test.kwargs.update({ + "miOnlineFsMigrationId": miOnlinefileShareMigrationStats["properties"]["migrationOperationId"]}) + + while miOnlineFsIsfullBackupRestore != True and migrationStatus != "Failed": + time.sleep(10) + miOnlinefileShareMigrationStats = test.cmd('az datamigration sql-managed-instance show ' + '--managed-instance-name "{managedInstance}" ' + '--resource-group "{miRG}" ' + '--target-db-name "{miOnlineFsTargetDb}" ' + '--expand=MigrationStatusDetails').get_output_in_json() + miOnlineFsIsfullBackupRestore = miOnlinefileShareMigrationStats["properties"]["migrationStatusDetails"]["isFullBackupRestored"] + migrationStatus = miOnlinefileShareMigrationStats["properties"]["migrationStatus"] + + test.cmd('az datamigration sql-managed-instance cutover ' + '--resource-group "{miRG}" ' + '--managed-instance-name "{managedInstance}" ' + '--target-db-name "{miOnlineFsTargetDb}" ' + '--migration-operation-id "{miOnlineFsMigrationId}"', + checks=checks) + +#13.2 MI Online FileShare Cutover +def step_sql_managed_instance_online_fileshare_cutover_Confirm(test, checks=None): + if checks is None: + checks = [] + + miOnlinefileShareMigrationStats = test.cmd('az datamigration sql-managed-instance show ' + '--resource-group "{miRG}" ' + '--managed-instance-name "{managedInstance}" ' + '--target-db-name "{miOnlineFsTargetDb}"', + checks=checks).get_output_in_json() + + migrationStatus = miOnlinefileShareMigrationStats["properties"]["migrationStatus"] + + while migrationStatus != "Succeeded" and migrationStatus != "Failed": + time.sleep(10) + + miOnlinefileShareMigrationStats = test.cmd('az datamigration sql-vm show ' + '--resource-group "{miRG}" ' + '--sql-vm-name "{managedInstance}" ' + '--target-db-name "{miOnlineFsTargetDb}"', + checks=checks).get_output_in_json() + + migrationStatus = miOnlinefileShareMigrationStats["properties"]["migrationStatus"] + +#14. MI Online Blob Create +def step_sql_managed_instance_online_blob_create(test, checks=None): + if checks is None: + checks = [] + test.cmd('az datamigration sql-managed-instance create ' + '--source-location {blobSourceLocation} ' + '--target-location account-key="{accountKey}" storage-account-resource-id="{storageAccountId}" ' + '--migration-service "{migrationService}" ' + '--scope "{miScope}" ' + '--source-database-name "{sourceDBName}" ' + '--source-sql-connection authentication="{authentication}" data-source="{dataSource}" password="{password}" user-name="{userName}" ' + '--target-db-name "{miOnlineBlobTargetDb}" ' + '--resource-group "{miRG}" ' + '--managed-instance-name "{managedInstance}"', + checks=checks) + + + +#15.1 MI Online Blob Cancel +def step_sql_managed_instance_online_blob_cancel(test, checks=None): + if checks is None: + checks = [] + + miOnlineBlobMigrationStats = test.cmd('az datamigration sql-managed-instance show ' + '--managed-instance-name "{managedInstance}" ' + '--resource-group "{miRG}" ' + '--target-db-name "{miOnlineBlobTargetDb}" ' + '--expand=MigrationStatusDetails').get_output_in_json() + test.kwargs.update({ + "miOnlineBlobMigrationId": miOnlineBlobMigrationStats["properties"]["migrationOperationId"]}) + + test.cmd('az datamigration sql-managed-instance cancel ' + '--resource-group "{miRG}" ' + '--managed-instance-name "{managedInstance}" ' + '--target-db-name "{miOnlineBlobTargetDb}" ' + '--migration-operation-id "{miOnlineBlobMigrationId}"', + checks=checks) + +#15.2 MI Online Blob Cancel Confirm +def step_sql_managed_instance_online_blob_cancel_Confirm(test, checks=None): + if checks is None: + checks = [] + + miOnlineBlobStats = test.cmd('az datamigration sql-managed-instance show ' + '--resource-group "{miRG}" ' + '--managed-instance-name "{managedInstance}" ' + '--target-db-name "{miOnlineBlobTargetDb}"', + checks=checks).get_output_in_json() + + miiOnlineBlobStatus = miOnlineBlobStats["properties"]["migrationStatus"] + + while miiOnlineBlobStatus != "Canceled" and miiOnlineBlobStatus != "Failed": + + time.sleep(10) + miOnlineBlobStats = test.cmd('az datamigration sql-managed-instance show ' + '--resource-group "{miRG}" ' + '--managed-instance-name "{managedInstance}" ' + '--target-db-name "{miOnlineBlobTargetDb}"', + checks=checks).get_output_in_json() + + miiOnlineBlobStatus = miOnlineBlobStats["properties"]["migrationStatus"] + +#16. VM Online FileShare Create +def step_sql_vm_online_fileshare_create(test, checks=None): + if checks is None: + checks = [] + test.cmd('az datamigration sql-vm create ' + '--source-location {fsSourceLocation} ' + '--target-location account-key="{accountKey}" storage-account-resource-id="{storageAccountId}" ' + '--migration-service "{migrationService}" ' + '--scope "{vmScope}" ' + '--source-database-name "{sourceDBName}" ' + '--source-sql-connection authentication="{authentication}" data-source="{dataSource}" password="{password}" user-name="{userName}" ' + '--target-db-name "{vmOnlineFsTargetDb}" ' + '--resource-group "{vmRG}" ' + '--sql-vm-name "{virtualMachine}"', + checks=checks) + +#17.1 VM Online FileShare Cutover +def step_sql_vm_online_fileshare_cutover(test, checks=None): + if checks is None: + checks = [] + vmOnlinefileShareMigrationStats = test.cmd('az datamigration sql-vm show ' + '--sql-vm-name "{virtualMachine}" ' + '--resource-group "{vmRG}" ' + '--target-db-name "{vmOnlineFsTargetDb}" ' + '--expand=MigrationStatusDetails').get_output_in_json() + vmOnlineFsIsfullBackupRestore = vmOnlinefileShareMigrationStats["properties"]["migrationStatusDetails"]["isFullBackupRestored"] + migrationStatus = vmOnlinefileShareMigrationStats["properties"]["migrationStatus"] + test.kwargs.update({ + "vmOnlineFsMigrationId": vmOnlinefileShareMigrationStats["properties"]["migrationOperationId"]}) + + while vmOnlineFsIsfullBackupRestore != True and migrationStatus != "Failed": + + time.sleep(10) + vmOnlinefileShareMigrationStats = test.cmd('az datamigration sql-vm show ' + '--sql-vm-name "{virtualMachine}" ' + '--resource-group "{vmRG}" ' + '--target-db-name "{vmOnlineFsTargetDb}" ' + '--expand=MigrationStatusDetails').get_output_in_json() + migrationStatus = vmOnlinefileShareMigrationStats["properties"]["migrationStatus"] + vmOnlineFsIsfullBackupRestore = vmOnlinefileShareMigrationStats["properties"]["migrationStatusDetails"]["isFullBackupRestored"] + + test.cmd('az datamigration sql-vm cutover ' + '--resource-group "{vmRG}" ' + '--sql-vm-name "{virtualMachine}" ' + '--target-db-name "{vmOnlineFsTargetDb}" ' + '--migration-operation-id "{vmOnlineFsMigrationId}"', + checks=checks) + +#17.2 VM Online FileShare Cutover Confirm +def step_sql_vm_online_fileshare_cutover_Confirm(test, checks=None): + if checks is None: + checks = [] + vmOnlinefileShareMigrationStats = test.cmd('az datamigration sql-vm show ' + '--resource-group "{vmRG}" ' + '--sql-vm-name "{virtualMachine}" ' + '--target-db-name "{vmOnlineFsTargetDb}"', + checks=checks).get_output_in_json() + + migrationStatus = vmOnlinefileShareMigrationStats["properties"]["migrationStatus"] + + while migrationStatus != "Succeeded" and migrationStatus != "Failed": + time.sleep(10) + + vmOnlinefileShareMigrationStats = test.cmd('az datamigration sql-vm show ' + '--resource-group "{vmRG}" ' + '--sql-vm-name "{virtualMachine}" ' + '--target-db-name "{vmOnlineFsTargetDb}"', + checks=checks).get_output_in_json() + + migrationStatus = vmOnlinefileShareMigrationStats["properties"]["migrationStatus"] + +#18. VM Online Blob Create +def step_sql_vm_online_blob_create(test, checks=None): + if checks is None: + checks = [] + test.cmd('az datamigration sql-vm create ' + '--source-location {blobSourceLocation} ' + '--target-location account-key="{accountKey}" storage-account-resource-id="{storageAccountId}" ' + '--migration-service "{migrationService}" ' + '--scope "{vmScope}" ' + '--source-database-name "{sourceDBName}" ' + '--source-sql-connection authentication="{authentication}" data-source="{dataSource}" password="{password}" user-name="{userName}" ' + '--target-db-name "{vmOnlineBlobTargetDb}" ' + '--resource-group "{vmRG}" ' + '--sql-vm-name "{virtualMachine}"', + checks=checks) + +#19.1 VM Online Blob Cancel +def step_sql_vm_online_blob_cancel(test, checks=None): + if checks is None: + checks = [] + vmOnlineBlobMigrationStats = test.cmd('az datamigration sql-vm show ' + '--sql-vm-name "{virtualMachine}" ' + '--resource-group "{vmRG}" ' + '--target-db-name "{vmOnlineBlobTargetDb}" ' + '--expand=MigrationStatusDetails').get_output_in_json() + test.kwargs.update({ + "vmOnlineBlobMigrationId": vmOnlineBlobMigrationStats["properties"]["migrationOperationId"] + }) + + test.cmd('az datamigration sql-vm cancel ' + '--resource-group "{vmRG}" ' + '--sql-vm-name "{virtualMachine}" ' + '--target-db-name "{vmOnlineBlobTargetDb}" ' + '--migration-operation-id "{vmOnlineBlobMigrationId}"', + checks=checks) + +#19.2 VM Online Blob Cancel +def step_sql_vm_online_blob_cancel_Confirm(test, checks=None): + if checks is None: + checks = [] + test.cmd('az datamigration sql-vm show ' + '--resource-group "{vmRG}" ' + '--sql-vm-name "{virtualMachine}" ' + '--target-db-name "{vmOnlineBlobTargetDb}"', + checks=checks) +''' + #20. MI Offline FS Create +def step_sql_managed_instance_offline_fileshare_create(test, checks=None): + if checks is None: + checks = [] + test.cmd('az datamigration sql-managed-instance create ' + '--source-location {fsSourceLocation} ' + '--target-location account-key="{accountKey}" storage-account-resource-id="{storageAccountId}" ' + '--migration-service "{migrationService}" ' + '--scope "{miScope}" ' + '--source-database-name "{sourceDBName}" ' + '--source-sql-connection authentication="{authentication}" data-source="{dataSource}" password="{password}" user-name="{userName}" ' + '--target-db-name "{miOfflineFsTargetDb}" ' + '--resource-group "{miRG}" ' + '--managed-instance-name "{managedInstance}" ' + '--offline-configuration offline=true last-backup-name="{lastBackupName}"', + checks=checks) + + #21. MI Offline Blob Create +def step_sql_managed_instance_offline_blob_create (test, checks=None): + if checks is None: + checks = [] + test.cmd('az datamigration sql-managed-instance create ' + '--source-location {blobSourceLocation} ' + '--target-location account-key="{accountKey}" storage-account-resource-id="{storageAccountId}" ' + '--migration-service "{migrationService}" ' + '--scope "{miScope}" ' + '--source-database-name "{sourceDBName}" ' + '--source-sql-connection authentication="{authentication}" data-source="{dataSource}" password="{password}" user-name="{userName}" ' + '--target-db-name "{miOfflineBlobTargetDb}" ' + '--resource-group "{miRG}" ' + '--managed-instance-name "{managedInstance}" ' + '--offline-configuration offline=true last-backup-name="{lastBackupName}"', + checks=checks) + +#22. VM Offline FS Create +def step_sql_vm_offline_fileshare_create (test, checks=None): + if checks is None: + checks = [] + test.cmd('az datamigration sql-vm create ' + '--source-location {fsSourceLocation} ' + '--target-location account-key="{accountKey}" storage-account-resource-id="{storageAccountId}" ' + '--migration-service "{migrationService}" ' + '--scope "{vmScope}" ' + '--source-database-name "{sourceDBName}" ' + '--source-sql-connection authentication="{authentication}" data-source="{dataSource}" password="{password}" user-name="{userName}" ' + '--target-db-name "{vmOfflineFsTargetDb}" ' + '--resource-group "{vmRG}" ' + '--sql-vm-name "{virtualMachine}" ' + '--offline-configuration offline=true last-backup-name="{lastBackupName}"', + checks=checks) +''' +#23. VM Offline Blob Create +def step_sql_vm_offline_blob_create(test, checks=None): + if checks is None: + checks = [] + test.cmd('az datamigration sql-vm create ' + '--source-location {blobSourceLocation} ' + '--target-location account-key="{accountKey}" storage-account-resource-id="{storageAccountId}" ' + '--migration-service "{migrationService}" ' + '--scope "{vmScope}" ' + '--source-database-name "{sourceDBName}" ' + '--source-sql-connection authentication="{authentication}" data-source="{dataSource}" password="{password}" user-name="{userName}" ' + '--target-db-name "{vmOfflineBlobTargetDb}" ' + '--resource-group "{vmRG}" ' + '--sql-vm-name "{virtualMachine}" ' + '--offline-configuration offline=true last-backup-name="{lastBackupName}"', + checks=checks) + + +# Env cleanup_scenario +def cleanup_scenario(test): + pass + + +# Testcase: Scenario +def call_scenario(test): + setup_scenario(test) + try: + + #1. SQL Service Create + step_sql_service_create(test, checks=[ + test.check("location", "{location}", case_sensitive=False), + test.check("name", "{createSqlMigrationService}", case_sensitive=False), + test.check("provisioningState", "Succeeded", case_sensitive=False) + ]) + + #2. SQL Service Show + step_sql_service_show(test, checks=[ + test.check("location", "{location}", case_sensitive=False), + test.check("name", "{sqlMigrationService}", case_sensitive=False) + ]) + #3. SQL Service List RG + step_sql_service_list_rg(test) + + #4. SQL Service List Sub + step_sql_service_list_sub(test) + + #5. SQL Service List Migration + step_sql_service_list_migration(test) + + #6. SQL Service List Auth Keys + step_sql_service_list_auth_key(test) + + #7. SQL Service Regererate Auth Keys + step_sql_service_regenerate_auth_key(test) + + #8. SQL Service Regererate Auth Keys + step_sql_service_list_integration_runtime_metric(test, checks=[ + test.check("name", "default-ir", case_sensitive=False) + ]) + + #9. SQL Service Delete + step_sql_service_delete(test) + + #10. MI Show + step_sql_managed_instance_show(test, checks=[ + test.check("name", "{miTargetDb}", case_sensitive=False), + test.check("type", "Microsoft.DataMigration/databaseMigrations", case_sensitive=False), + test.check("properties.kind", "SqlMi", case_sensitive=False) + ]) + + #11. VM Show + step_sql_vm_show(test, checks=[ + test.check("name", "{vmTargetDb}", case_sensitive=False), + test.check("type", "Microsoft.DataMigration/databaseMigrations", case_sensitive=False), + test.check("properties.kind", "SqlVm", case_sensitive=False) + ]) + + #12. MI Online FileShare Create + step_sql_managed_instance_online_fileshare_create(test, checks=[ + test.check("name", "{miOnlineFsTargetDb}", case_sensitive=False), + test.check("type", "Microsoft.DataMigration/databaseMigrations", case_sensitive=False), + test.check("properties.kind", "SqlMi", case_sensitive=False), + test.check("properties.provisioningState", "Succeeded", case_sensitive=False), + test.check("properties.migrationStatus", "InProgress", case_sensitive=False) + ]) + + #13.1 MI Online FileShare Cutover + step_sql_managed_instance_online_fileshare_cutover(test) + + #13.2 MI Online FileShare Cutover Confirm + step_sql_managed_instance_online_fileshare_cutover_Confirm(test, checks=[ + test.check("name", "{miOnlineFsTargetDb}", case_sensitive=False), + test.check("type", "Microsoft.DataMigration/databaseMigrations", case_sensitive=False), + test.check("properties.kind", "SqlMi", case_sensitive=False), + test.check("properties.migrationStatus", "Succeeded", case_sensitive=False) + ]) + + #14. MI Online Blob Create + step_sql_managed_instance_online_blob_create(test, checks=[ + test.check("name", "{miOnlineBlobTargetDb}", case_sensitive=False), + test.check("type", "Microsoft.DataMigration/databaseMigrations", case_sensitive=False), + test.check("properties.kind", "SqlMi", case_sensitive=False), + test.check("properties.provisioningState", "Succeeded", case_sensitive=False), + test.check("properties.migrationStatus", "InProgress", case_sensitive=False) + ]) + + #15.1 MI Online Blob Cancel + step_sql_managed_instance_online_blob_cancel(test) + + #15.2 MI Online Blob Cancel Confirm + step_sql_managed_instance_online_blob_cancel_Confirm(test, checks=[ + test.check("name", "{miOnlineBlobTargetDb}", case_sensitive=False), + test.check("type", "Microsoft.DataMigration/databaseMigrations", case_sensitive=False), + test.check("properties.kind", "SqlMi", case_sensitive=False), + test.check("properties.migrationStatus", "Canceled", case_sensitive=False) + ]) + + #16. VM Online FileShare Create + step_sql_vm_online_fileshare_create(test, checks=[ + test.check("name", "{vmOnlineFsTargetDb}", case_sensitive=False), + test.check("type", "Microsoft.DataMigration/databaseMigrations", case_sensitive=False), + test.check("properties.kind", "SqlVm", case_sensitive=False), + test.check("properties.provisioningState", "Succeeded", case_sensitive=False), + test.check("properties.migrationStatus", "InProgress", case_sensitive=False) + ]) + + #17.1 VM Online FileShare Cutover + step_sql_vm_online_fileshare_cutover(test) + + #17.2 VM Online FileShare Cutover + step_sql_vm_online_fileshare_cutover_Confirm(test, checks=[ + test.check("name", "{vmOnlineFsTargetDb}", case_sensitive=False), + test.check("type", "Microsoft.DataMigration/databaseMigrations", case_sensitive=False), + test.check("properties.kind", "SqlVm", case_sensitive=False), + test.check("properties.migrationStatus", "Succeeded", case_sensitive=False) + ]) + + + #18. VM Online Blob Create + step_sql_vm_online_blob_create(test, checks=[ + test.check("name", "{vmOnlineBlobTargetDb}", case_sensitive=False), + test.check("type", "Microsoft.DataMigration/databaseMigrations", case_sensitive=False), + test.check("properties.kind", "SqlVm", case_sensitive=False), + test.check("properties.provisioningState", "Succeeded", case_sensitive=False), + test.check("properties.migrationStatus", "InProgress", case_sensitive=False) + ]) + ''' + #19. VM Online Blob Cancel + step_sql_vm_online_blob_cancel(test) + + #20. MI Offline FS Create + step_sql_managed_instance_offline_fileshare_create(test, checks=[ + test.check("name", "{miOfflineFsTargetDb}", case_sensitive=False), + test.check("type", "Microsoft.DataMigration/databaseMigrations", case_sensitive=False), + test.check("properties.kind", "SqlMi", case_sensitive=False), + test.check("properties.provisioningState", "Succeeded", case_sensitive=False), + test.check("properties.migrationStatus", "InProgress", case_sensitive=False) + ]) + #21. MI Offline Blob Create + step_sql_managed_instance_offline_blob_create(test, checks=[ + test.check("name", "{miOfflineBlobTargetDb}", case_sensitive=False), + test.check("type", "Microsoft.DataMigration/databaseMigrations", case_sensitive=False), + test.check("properties.kind", "SqlMi", case_sensitive=False), + test.check("properties.provisioningState", "Succeeded", case_sensitive=False), + test.check("properties.migrationStatus", "InProgress", case_sensitive=False) + ]) + #22. VM Offline FS Create + step_sql_vm_offline_fileshare_create(test, checks=[ + test.check("name", "{vmOfflineFsTargetDb}", case_sensitive=False), + test.check("type", "Microsoft.DataMigration/databaseMigrations", case_sensitive=False), + test.check("properties.kind", "SqlVm", case_sensitive=False), + test.check("properties.provisioningState", "Succeeded", case_sensitive=False), + test.check("properties.migrationStatus", "InProgress", case_sensitive=False) + ]) + ''' + #23. VM Offline Blob Create + step_sql_vm_offline_blob_create(test, checks=[ + test.check("name", "{vmOfflineBlobTargetDb}", case_sensitive=False), + test.check("type", "Microsoft.DataMigration/databaseMigrations", case_sensitive=False), + test.check("properties.kind", "SqlVm", case_sensitive=False), + test.check("properties.provisioningState", "Succeeded", case_sensitive=False), + test.check("properties.migrationStatus", "InProgress", case_sensitive=False) + ]) + + except Exception as e: + raise e + finally: + cleanup_scenario(test) \ No newline at end of file diff --git a/src/datamigration/azext_datamigration/tests/__init__.py b/src/datamigration/azext_datamigration/tests/__init__.py new file mode 100644 index 00000000000..70488e93851 --- /dev/null +++ b/src/datamigration/azext_datamigration/tests/__init__.py @@ -0,0 +1,116 @@ +# coding=utf-8 +# -------------------------------------------------------------------------- +# Copyright (c) Microsoft Corporation. All rights reserved. +# Licensed under the MIT License. See License.txt in the project root for +# license information. +# +# Code generated by Microsoft (R) AutoRest Code Generator. +# Changes may cause incorrect behavior and will be lost if the code is +# regenerated. +# -------------------------------------------------------------------------- +import inspect +import logging +import os +import sys +import traceback +import datetime as dt + +from azure.core.exceptions import AzureError +from azure.cli.testsdk.exceptions import CliTestError, CliExecutionError, JMESPathCheckAssertionError + + +logger = logging.getLogger('azure.cli.testsdk') +logger.addHandler(logging.StreamHandler()) +__path__ = __import__('pkgutil').extend_path(__path__, __name__) +exceptions = [] +test_map = dict() +SUCCESSED = "successed" +FAILED = "failed" + + +def try_manual(func): + def import_manual_function(origin_func): + from importlib import import_module + decorated_path = inspect.getfile(origin_func).lower() + module_path = __path__[0].lower() + if not decorated_path.startswith(module_path): + raise Exception("Decorator can only be used in submodules!") + manual_path = os.path.join( + decorated_path[module_path.rfind(os.path.sep) + 1:]) + manual_file_path, manual_file_name = os.path.split(manual_path) + module_name, _ = os.path.splitext(manual_file_name) + manual_module = "..manual." + \ + ".".join(manual_file_path.split(os.path.sep) + [module_name, ]) + return getattr(import_module(manual_module, package=__name__), origin_func.__name__) + + def get_func_to_call(): + func_to_call = func + try: + func_to_call = import_manual_function(func) + logger.info("Found manual override for %s(...)", func.__name__) + except (ImportError, AttributeError): + pass + return func_to_call + + def wrapper(*args, **kwargs): + func_to_call = get_func_to_call() + logger.info("running %s()...", func.__name__) + try: + test_map[func.__name__] = dict() + test_map[func.__name__]["result"] = SUCCESSED + test_map[func.__name__]["error_message"] = "" + test_map[func.__name__]["error_stack"] = "" + test_map[func.__name__]["error_normalized"] = "" + test_map[func.__name__]["start_dt"] = dt.datetime.utcnow() + ret = func_to_call(*args, **kwargs) + except (AssertionError, AzureError, CliTestError, CliExecutionError, SystemExit, + JMESPathCheckAssertionError) as e: + use_exception_cache = os.getenv("TEST_EXCEPTION_CACHE") + if use_exception_cache is None or use_exception_cache.lower() != "true": + raise + test_map[func.__name__]["end_dt"] = dt.datetime.utcnow() + test_map[func.__name__]["result"] = FAILED + test_map[func.__name__]["error_message"] = str(e).replace("\r\n", " ").replace("\n", " ")[:500] + test_map[func.__name__]["error_stack"] = traceback.format_exc().replace( + "\r\n", " ").replace("\n", " ")[:500] + logger.info("--------------------------------------") + logger.info("step exception: %s", e) + logger.error("--------------------------------------") + logger.error("step exception in %s: %s", func.__name__, e) + logger.info(traceback.format_exc()) + exceptions.append((func.__name__, sys.exc_info())) + else: + test_map[func.__name__]["end_dt"] = dt.datetime.utcnow() + return ret + + if inspect.isclass(func): + return get_func_to_call() + return wrapper + + +def calc_coverage(filename): + filename = filename.split(".")[0] + coverage_name = filename + "_coverage.md" + with open(coverage_name, "w") as f: + f.write("|Scenario|Result|ErrorMessage|ErrorStack|ErrorNormalized|StartDt|EndDt|\n") + total = len(test_map) + covered = 0 + for k, v in test_map.items(): + if not k.startswith("step_"): + total -= 1 + continue + if v["result"] == SUCCESSED: + covered += 1 + f.write("|{step_name}|{result}|{error_message}|{error_stack}|{error_normalized}|{start_dt}|" + "{end_dt}|\n".format(step_name=k, **v)) + f.write("Coverage: {}/{}\n".format(covered, total)) + print("Create coverage\n", file=sys.stderr) + + +def raise_if(): + if exceptions: + if len(exceptions) <= 1: + raise exceptions[0][1][1] + message = "{}\nFollowed with exceptions in other steps:\n".format(str(exceptions[0][1][1])) + message += "\n".join(["{}: {}".format(h[0], h[1][1]) for h in exceptions[1:]]) + raise exceptions[0][1][0](message).with_traceback(exceptions[0][1][2]) diff --git a/src/datamigration/azext_datamigration/tests/latest/__init__.py b/src/datamigration/azext_datamigration/tests/latest/__init__.py new file mode 100644 index 00000000000..c9cfdc73e77 --- /dev/null +++ b/src/datamigration/azext_datamigration/tests/latest/__init__.py @@ -0,0 +1,12 @@ +# coding=utf-8 +# -------------------------------------------------------------------------- +# Copyright (c) Microsoft Corporation. All rights reserved. +# Licensed under the MIT License. See License.txt in the project root for +# license information. +# +# Code generated by Microsoft (R) AutoRest Code Generator. +# Changes may cause incorrect behavior and will be lost if the code is +# regenerated. +# -------------------------------------------------------------------------- + +__path__ = __import__('pkgutil').extend_path(__path__, __name__) diff --git a/src/datamigration/azext_datamigration/tests/latest/example_steps.py b/src/datamigration/azext_datamigration/tests/latest/example_steps.py new file mode 100644 index 00000000000..741c8b377b9 --- /dev/null +++ b/src/datamigration/azext_datamigration/tests/latest/example_steps.py @@ -0,0 +1,284 @@ +# -------------------------------------------------------------------------- +# Copyright (c) Microsoft Corporation. All rights reserved. +# Licensed under the MIT License. See License.txt in the project root for +# license information. +# +# Code generated by Microsoft (R) AutoRest Code Generator. +# Changes may cause incorrect behavior and will be lost if the code is +# regenerated. +# -------------------------------------------------------------------------- + + +from .. import try_manual + + +# EXAMPLE: /SqlMigrationServices/put/Create or Update SQL Migration Service with maximum parameters. +@try_manual +def step_sql_service_create(test, checks=None): + if checks is None: + checks = [] + test.cmd('az datamigration sql-service create ' + '--location "northeurope" ' + '--resource-group "{rg}" ' + '--name "{mySqlMigrationService}"', + checks=[]) + test.cmd('az datamigration sql-service wait --created ' + '--resource-group "{rg}" ' + '--name "{mySqlMigrationService}"', + checks=checks) + + +# EXAMPLE: /SqlMigrationServices/put/Create or Update SQL Migration Service with minimum parameters. +@try_manual +def step_sql_service_create2(test, checks=None): + return step_sql_service_create(test, checks) + test.cmd('az datamigration sql-service wait --created ' + '--resource-group "{rg}" ' + '--name "{mySqlMigrationService}"', + checks=checks) + + +# EXAMPLE: /SqlMigrationServices/get/Get Migration Service. +@try_manual +def step_sql_service_show(test, checks=None): + if checks is None: + checks = [] + test.cmd('az datamigration sql-service show ' + '--resource-group "{rg}" ' + '--name "{mySqlMigrationService2}"', + checks=checks) + + +# EXAMPLE: /SqlMigrationServices/get/Get Migration Services in the Resource Group. +@try_manual +def step_sql_service_list(test, checks=None): + if checks is None: + checks = [] + test.cmd('az datamigration sql-service list ' + '--resource-group "{rg}"', + checks=checks) + + +# EXAMPLE: /SqlMigrationServices/get/Get Services in the Subscriptions. +@try_manual +def step_sql_service_list2(test, checks=None): + if checks is None: + checks = [] + test.cmd('az datamigration sql-service list ' + '-g ""', + checks=checks) + + +# EXAMPLE: /SqlMigrationServices/get/List database migrations attached to the service. +@try_manual +def step_sql_service_list_migration(test, checks=None): + if checks is None: + checks = [] + test.cmd('az datamigration sql-service list-migration ' + '--resource-group "{rg}" ' + '--name "{mySqlMigrationService2}"', + checks=checks) + + +# EXAMPLE: /SqlMigrationServices/patch/Update SQL Migration Service. +@try_manual +def step_sql_service_update(test, checks=None): + if checks is None: + checks = [] + test.cmd('az datamigration sql-service update ' + '--tags mytag="myval" ' + '--resource-group "{rg}" ' + '--name "{mySqlMigrationService}"', + checks=checks) + + +# EXAMPLE: /SqlMigrationServices/post/Delete the integration runtime node. +@try_manual +def step_sql_service_delete_node(test, checks=None): + if checks is None: + checks = [] + test.cmd('az datamigration sql-service delete-node ' + '--ir-name "IRName" ' + '--node-name "nodeName" ' + '--resource-group "{rg}" ' + '--name "{mySqlMigrationService2}"', + checks=checks) + + +# EXAMPLE: /SqlMigrationServices/post/Regenerate the of Authentication Keys. +@try_manual +def step_sql_service_regenerate_auth_key(test, checks=None): + if checks is None: + checks = [] + test.cmd('az datamigration sql-service regenerate-auth-key ' + '--key-name "authKey1" ' + '--resource-group "{rg}" ' + '--name "{mySqlMigrationService2}"', + checks=checks) + + +# EXAMPLE: /SqlMigrationServices/post/Retrieve the List of Authentication Keys. +@try_manual +def step_sql_service_list_auth_key(test, checks=None): + if checks is None: + checks = [] + test.cmd('az datamigration sql-service list-auth-key ' + '--resource-group "{rg}" ' + '--name "{mySqlMigrationService2}"', + checks=checks) + + +# EXAMPLE: /SqlMigrationServices/post/Retrieve the Monitoring Data. +@try_manual +def step_sql_service_list_integration_runtime_metric(test, checks=None): + if checks is None: + checks = [] + test.cmd('az datamigration sql-service list-integration-runtime-metric ' + '--resource-group "{rg}" ' + '--name "{mySqlMigrationService2}"', + checks=checks) + + +# EXAMPLE: /DatabaseMigrationsSqlMi/put/Create or Update Database Migration resource with Maximum parameters. +@try_manual +def step_sql_managed_instance_create(test, checks=None): + if checks is None: + checks = [] + test.cmd('az datamigration sql-managed-instance create ' + '--managed-instance-name "managedInstance1" ' + '--source-location "{{\\"fileShare\\":{{\\"path\\":\\"C:\\\\\\\\aaa\\\\\\\\bbb\\\\\\\\ccc\\",\\"password\\' + '":\\"placeholder\\",\\"username\\":\\"name\\"}}}}" ' + '--target-location account-key="abcd" storage-account-resource-id="account.database.windows.net" ' + '--migration-service "/subscriptions/{subscription_id}/resourceGroups/{rg}/providers/Microsoft.DataMigrati' + 'on/sqlMigrationServices/{mySqlMigrationService}" ' + '--offline-configuration last-backup-name="last_backup_file_name" offline=true ' + '--scope "/subscriptions/{subscription_id}/resourceGroups/{rg}/providers/Microsoft.Sql/managedInstances/in' + 'stance" ' + '--source-database-name "aaa" ' + '--source-sql-connection authentication="WindowsAuthentication" data-source="aaa" encrypt-connection=true ' + 'password="placeholder" trust-server-certificate=true user-name="bbb" ' + '--resource-group "{rg}" ' + '--target-db-name "db1"', + checks=checks) + + +# EXAMPLE: /DatabaseMigrationsSqlMi/put/Create or Update Database Migration resource with Minimum parameters. +@try_manual +def step_sql_managed_instance_create2(test, checks=None): + return step_sql_managed_instance_create(test, checks) + + +# EXAMPLE: /DatabaseMigrationsSqlMi/get/Get Database Migration resource. +@try_manual +def step_sql_managed_instance_show(test, checks=None): + if checks is None: + checks = [] + test.cmd('az datamigration sql-managed-instance show ' + '--managed-instance-name "managedInstance1" ' + '--resource-group "{rg}" ' + '--target-db-name "db1"', + checks=checks) + + +# EXAMPLE: /DatabaseMigrationsSqlMi/post/Cutover online migration operation for the database. +@try_manual +def step_sql_managed_instance_cutover(test, checks=None): + if checks is None: + checks = [] + test.cmd('az datamigration sql-managed-instance cutover ' + '--managed-instance-name "managedInstance1" ' + '--migration-operation-id "4124fe90-d1b6-4b50-b4d9-46d02381f59a" ' + '--resource-group "{rg}" ' + '--target-db-name "db1"', + checks=checks) + + +# EXAMPLE: /DatabaseMigrationsSqlMi/post/Stop ongoing migration for the database. +@try_manual +def step_sql_managed_instance_cancel(test, checks=None): + if checks is None: + checks = [] + test.cmd('az datamigration sql-managed-instance cancel ' + '--managed-instance-name "managedInstance1" ' + '--migration-operation-id "4124fe90-d1b6-4b50-b4d9-46d02381f59a" ' + '--resource-group "{rg}" ' + '--target-db-name "db1"', + checks=checks) + + +# EXAMPLE: /DatabaseMigrationsSqlVm/put/Create or Update Database Migration resource with Maximum parameters. +@try_manual +def step_sql_vm_create(test, checks=None): + if checks is None: + checks = [] + test.cmd('az datamigration sql-vm create ' + '--source-location "{{\\"fileShare\\":{{\\"path\\":\\"C:\\\\\\\\aaa\\\\\\\\bbb\\\\\\\\ccc\\",\\"password\\' + '":\\"placeholder\\",\\"username\\":\\"name\\"}}}}" ' + '--target-location account-key="abcd" storage-account-resource-id="account.database.windows.net" ' + '--migration-service "/subscriptions/{subscription_id}/resourceGroups/{rg}/providers/Microsoft.DataMigrati' + 'on/sqlMigrationServices/{mySqlMigrationService}" ' + '--offline-configuration last-backup-name="last_backup_file_name" offline=true ' + '--scope "/subscriptions/{subscription_id}/resourceGroups/{rg}/providers/Microsoft.SqlVirtualMachine/sqlVi' + 'rtualMachines/testvm" ' + '--source-database-name "aaa" ' + '--source-sql-connection authentication="WindowsAuthentication" data-source="aaa" encrypt-connection=true ' + 'password="placeholder" trust-server-certificate=true user-name="bbb" ' + '--resource-group "{rg}" ' + '--sql-vm-name "testvm" ' + '--target-db-name "db1"', + checks=checks) + + +# EXAMPLE: /DatabaseMigrationsSqlVm/put/Create or Update Database Migration resource with Minimum parameters. +@try_manual +def step_sql_vm_create2(test, checks=None): + return step_sql_vm_create(test, checks) + + +# EXAMPLE: /DatabaseMigrationsSqlVm/get/Get Database Migration resource. +@try_manual +def step_sql_vm_show(test, checks=None): + if checks is None: + checks = [] + test.cmd('az datamigration sql-vm show ' + '--resource-group "{rg}" ' + '--sql-vm-name "testvm" ' + '--target-db-name "db1"', + checks=checks) + + +# EXAMPLE: /DatabaseMigrationsSqlVm/post/Cutover online migration operation for the database. +@try_manual +def step_sql_vm_cutover(test, checks=None): + if checks is None: + checks = [] + test.cmd('az datamigration sql-vm cutover ' + '--migration-operation-id "4124fe90-d1b6-4b50-b4d9-46d02381f59a" ' + '--resource-group "{rg}" ' + '--sql-vm-name "testvm" ' + '--target-db-name "db1"', + checks=checks) + + +# EXAMPLE: /DatabaseMigrationsSqlVm/post/Stop ongoing migration for the database. +@try_manual +def step_sql_vm_cancel(test, checks=None): + if checks is None: + checks = [] + test.cmd('az datamigration sql-vm cancel ' + '--migration-operation-id "4124fe90-d1b6-4b50-b4d9-46d02381f59a" ' + '--resource-group "{rg}" ' + '--sql-vm-name "testvm" ' + '--target-db-name "db1"', + checks=checks) + + +# EXAMPLE: /SqlMigrationServices/delete/Delete SQL Migration Service. +@try_manual +def step_sql_service_delete(test, checks=None): + if checks is None: + checks = [] + test.cmd('az datamigration sql-service delete -y ' + '--resource-group "{rg}" ' + '--name "{mySqlMigrationService2}"', + checks=checks) diff --git a/src/datamigration/azext_datamigration/tests/latest/recordings/test_datamigration_Scenario.yaml b/src/datamigration/azext_datamigration/tests/latest/recordings/test_datamigration_Scenario.yaml new file mode 100644 index 00000000000..5e9e0cc2e34 --- /dev/null +++ b/src/datamigration/azext_datamigration/tests/latest/recordings/test_datamigration_Scenario.yaml @@ -0,0 +1,7474 @@ +interactions: +- request: + body: '{"location": "eastus2euap"}' + headers: + Accept: + - application/json + Accept-Encoding: + - gzip, deflate + CommandName: + - datamigration sql-service create + Connection: + - keep-alive + Content-Length: + - '27' + Content-Type: + - application/json + ParameterSetName: + - --location --resource-group --name + User-Agent: + - AZURECLI/2.32.0 azsdk-python-mgmt-datamigration/1.0.0b1 Python/3.10.1 (Windows-10-10.0.22000-SP0) + method: PUT + uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/CLIUnitTest/providers/Microsoft.DataMigration/sqlMigrationServices/sqlServiceUnitTest-Pipeline2?api-version=2021-10-30-preview + response: + body: + string: '{"properties":{"provisioningState":"Provisioning"},"location":"eastus2euap","id":"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/CLIUnitTest/providers/Microsoft.DataMigration/sqlMigrationServices/sqlServiceUnitTest-Pipeline2","name":"sqlServiceUnitTest-Pipeline2","type":"Microsoft.DataMigration/sqlMigrationServices"}' + headers: + azure-asyncoperation: + - https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/providers/Microsoft.DataMigration/locations/eastus2euap/operationTypes/createsqlmigrationservice/operationResults/cb8821cc-6cba-447e-afc8-dca6dc902f55?api-version=2021-10-30-preview + cache-control: + - no-cache + content-length: + - '338' + content-type: + - application/json; charset=utf-8 + date: + - Tue, 18 Jan 2022 12:21:42 GMT + expires: + - '-1' + pragma: + - no-cache + server: + - Microsoft-HTTPAPI/2.0 + strict-transport-security: + - max-age=31536000; includeSubDomains + x-content-type-options: + - nosniff + x-ms-ratelimit-remaining-subscription-writes: + - '1198' + status: + code: 201 + message: Created +- request: + body: null + headers: + Accept: + - '*/*' + Accept-Encoding: + - gzip, deflate + CommandName: + - datamigration sql-service create + Connection: + - keep-alive + ParameterSetName: + - --location --resource-group --name + User-Agent: + - AZURECLI/2.32.0 azsdk-python-mgmt-datamigration/1.0.0b1 Python/3.10.1 (Windows-10-10.0.22000-SP0) + method: GET + uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/providers/Microsoft.DataMigration/locations/eastus2euap/operationTypes/createsqlmigrationservice/operationResults/cb8821cc-6cba-447e-afc8-dca6dc902f55?api-version=2021-10-30-preview + response: + body: + string: '{"name":"cb8821cc-6cba-447e-afc8-dca6dc902f55","status":"Succeeded","startTime":"2022-01-18T12:21:40.867Z"}' + headers: + cache-control: + - no-cache + content-length: + - '107' + content-type: + - application/json; charset=utf-8 + date: + - Tue, 18 Jan 2022 12:21:58 GMT + expires: + - '-1' + pragma: + - no-cache + server: + - Microsoft-HTTPAPI/2.0 + strict-transport-security: + - max-age=31536000; includeSubDomains + transfer-encoding: + - chunked + vary: + - Accept-Encoding + x-content-type-options: + - nosniff + status: + code: 200 + message: OK +- request: + body: null + headers: + Accept: + - '*/*' + Accept-Encoding: + - gzip, deflate + CommandName: + - datamigration sql-service create + Connection: + - keep-alive + ParameterSetName: + - --location --resource-group --name + User-Agent: + - AZURECLI/2.32.0 azsdk-python-mgmt-datamigration/1.0.0b1 Python/3.10.1 (Windows-10-10.0.22000-SP0) + method: GET + uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/CLIUnitTest/providers/Microsoft.DataMigration/sqlMigrationServices/sqlServiceUnitTest-Pipeline2?api-version=2021-10-30-preview + response: + body: + string: '{"properties":{"provisioningState":"Succeeded","integrationRuntimeState":"NeedRegistration"},"location":"eastus2euap","id":"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/CLIUnitTest/providers/Microsoft.DataMigration/sqlMigrationServices/sqlServiceUnitTest-Pipeline2","name":"sqlServiceUnitTest-Pipeline2","type":"Microsoft.DataMigration/sqlMigrationServices"}' + headers: + cache-control: + - no-cache + content-length: + - '380' + content-type: + - application/json; charset=utf-8 + date: + - Tue, 18 Jan 2022 12:21:58 GMT + expires: + - '-1' + pragma: + - no-cache + server: + - Microsoft-HTTPAPI/2.0 + strict-transport-security: + - max-age=31536000; includeSubDomains + transfer-encoding: + - chunked + vary: + - Accept-Encoding + x-content-type-options: + - nosniff + status: + code: 200 + message: OK +- request: + body: null + headers: + Accept: + - application/json + Accept-Encoding: + - gzip, deflate + CommandName: + - datamigration sql-service show + Connection: + - keep-alive + ParameterSetName: + - --resource-group --name + User-Agent: + - AZURECLI/2.32.0 azsdk-python-mgmt-datamigration/1.0.0b1 Python/3.10.1 (Windows-10-10.0.22000-SP0) + method: GET + uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/CLIUnitTest/providers/Microsoft.DataMigration/sqlMigrationServices/dmsCliUnitTest?api-version=2021-10-30-preview + response: + body: + string: '{"properties":{"provisioningState":"Succeeded","integrationRuntimeState":"NeedRegistration"},"location":"eastus2euap","id":"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/CLIUnitTest/providers/Microsoft.DataMigration/sqlMigrationServices/dmsCliUnitTest","name":"dmsCliUnitTest","type":"Microsoft.DataMigration/sqlMigrationServices"}' + headers: + cache-control: + - no-cache + content-length: + - '352' + content-type: + - application/json; charset=utf-8 + date: + - Tue, 18 Jan 2022 12:22:00 GMT + expires: + - '-1' + pragma: + - no-cache + server: + - Microsoft-HTTPAPI/2.0 + strict-transport-security: + - max-age=31536000; includeSubDomains + transfer-encoding: + - chunked + vary: + - Accept-Encoding + x-content-type-options: + - nosniff + status: + code: 200 + message: OK +- request: + body: null + headers: + Accept: + - application/json + Accept-Encoding: + - gzip, deflate + CommandName: + - datamigration sql-service list + Connection: + - keep-alive + ParameterSetName: + - --resource-group + User-Agent: + - AZURECLI/2.32.0 azsdk-python-mgmt-datamigration/1.0.0b1 Python/3.10.1 (Windows-10-10.0.22000-SP0) + method: GET + uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/CLIUnitTest/providers/Microsoft.DataMigration/sqlMigrationServices?api-version=2021-10-30-preview + response: + body: + string: '{"value":[{"properties":{"provisioningState":"Succeeded","integrationRuntimeState":""},"location":"eastus2","id":"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/CLIUnitTest/providers/Microsoft.DataMigration/sqlMigrationServices/sqlServiceUnitTest-Pipeline","name":"sqlServiceUnitTest-Pipeline","type":"Microsoft.DataMigration/sqlMigrationServices"},{"properties":{"provisioningState":"Succeeded","integrationRuntimeState":""},"location":"eastus2euap","id":"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/CLIUnitTest/providers/Microsoft.DataMigration/sqlMigrationServices/dmsCliUnitTest","name":"dmsCliUnitTest","type":"Microsoft.DataMigration/sqlMigrationServices"},{"properties":{"provisioningState":"Succeeded","integrationRuntimeState":""},"location":"eastus2euap","id":"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/CLIUnitTest/providers/Microsoft.DataMigration/sqlMigrationServices/sqlServiceUnitTest7SBLE","name":"sqlServiceUnitTest7SBLE","type":"Microsoft.DataMigration/sqlMigrationServices"},{"properties":{"provisioningState":"Succeeded","integrationRuntimeState":""},"location":"eastus2euap","id":"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/CLIUnitTest/providers/Microsoft.DataMigration/sqlMigrationServices/sqlServiceUnitTest-Pipeline1","name":"sqlServiceUnitTest-Pipeline1","type":"Microsoft.DataMigration/sqlMigrationServices"},{"properties":{"provisioningState":"Succeeded","integrationRuntimeState":""},"location":"eastus2euap","id":"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/CLIUnitTest/providers/Microsoft.DataMigration/sqlMigrationServices/sqlServiceUnitTest-Pipeline2","name":"sqlServiceUnitTest-Pipeline2","type":"Microsoft.DataMigration/sqlMigrationServices"}]}' + headers: + cache-control: + - no-cache + content-length: + - '1792' + content-type: + - application/json; charset=utf-8 + date: + - Tue, 18 Jan 2022 12:22:01 GMT + expires: + - '-1' + pragma: + - no-cache + strict-transport-security: + - max-age=31536000; includeSubDomains + vary: + - Accept-Encoding + x-content-type-options: + - nosniff + x-ms-original-request-ids: + - af2d6aec-ed0e-4d41-8e1f-fc8b1cc90afe + - eadd36a8-7b13-429e-ab3c-66893fddec73 + status: + code: 200 + message: OK +- request: + body: null + headers: + Accept: + - application/json + Accept-Encoding: + - gzip, deflate + CommandName: + - datamigration sql-service list + Connection: + - keep-alive + User-Agent: + - AZURECLI/2.32.0 azsdk-python-mgmt-datamigration/1.0.0b1 Python/3.10.1 (Windows-10-10.0.22000-SP0) + method: GET + uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/providers/Microsoft.DataMigration/sqlMigrationServices?api-version=2021-10-30-preview + response: + body: + string: '{"value":[{"properties":{"provisioningState":"Succeeded","integrationRuntimeState":""},"location":"eastus2","id":"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/aasimtest10/providers/Microsoft.DataMigration/sqlMigrationServices/aasimdms944","name":"aasimdms944","type":"Microsoft.DataMigration/sqlMigrationServices"},{"properties":{"provisioningState":"Succeeded","integrationRuntimeState":""},"location":"eastus2","id":"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/aaskhan/providers/Microsoft.DataMigration/sqlMigrationServices/aasimtestdmseastus2","name":"aasimtestdmseastus2","type":"Microsoft.DataMigration/sqlMigrationServices"},{"properties":{"provisioningState":"Succeeded","integrationRuntimeState":""},"location":"eastus2","id":"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/aaskhan/providers/Microsoft.DataMigration/sqlMigrationServices/anjalitest","name":"anjalitest","type":"Microsoft.DataMigration/sqlMigrationServices"},{"properties":{"provisioningState":"Succeeded","integrationRuntimeState":""},"location":"eastus2","id":"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/anjali/providers/Microsoft.DataMigration/sqlMigrationServices/anjali-dms-v2","name":"anjali-dms-v2","type":"Microsoft.DataMigration/sqlMigrationServices"},{"properties":{"provisioningState":"Succeeded","integrationRuntimeState":""},"location":"eastus2","id":"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/CLIUnitTest/providers/Microsoft.DataMigration/sqlMigrationServices/sqlServiceUnitTest-Pipeline","name":"sqlServiceUnitTest-Pipeline","type":"Microsoft.DataMigration/sqlMigrationServices"},{"properties":{"provisioningState":"Succeeded","integrationRuntimeState":""},"location":"eastus2","id":"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/hijavaeastus2/providers/Microsoft.DataMigration/sqlMigrationServices/hijavasvcapril23","name":"hijavasvcapril23","type":"Microsoft.DataMigration/sqlMigrationServices"},{"properties":{"provisioningState":"Failed","integrationRuntimeState":""},"location":"eastus2","id":"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/hijavarg_canary/providers/Microsoft.DataMigration/sqlMigrationServices/hijavaservice123","name":"hijavaservice123","type":"Microsoft.DataMigration/sqlMigrationServices"},{"properties":{"provisioningState":"Succeeded","integrationRuntimeState":""},"location":"eastus2","id":"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/lonwrg/providers/Microsoft.DataMigration/sqlMigrationServices/lonwdmseus2","name":"lonwdmseus2","type":"Microsoft.DataMigration/sqlMigrationServices"},{"properties":{"provisioningState":"Succeeded","integrationRuntimeState":""},"location":"eastus2","id":"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/MadhuriRG/providers/Microsoft.DataMigration/sqlMigrationServices/aasim0509test","name":"aasim0509test","type":"Microsoft.DataMigration/sqlMigrationServices"},{"properties":{"provisioningState":"Failed","integrationRuntimeState":""},"location":"eastus2","id":"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/madhurirg/providers/Microsoft.DataMigration/sqlMigrationServices/hijavaservice9","name":"hijavaservice9","type":"Microsoft.DataMigration/sqlMigrationServices"},{"properties":{"provisioningState":"Succeeded","integrationRuntimeState":""},"location":"eastus2","id":"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/MadhuriRGEastUS2/providers/Microsoft.DataMigration/sqlMigrationServices/myservice1","name":"myservice1","type":"Microsoft.DataMigration/sqlMigrationServices"},{"properties":{"provisioningState":"Succeeded","integrationRuntimeState":""},"location":"eastus2","id":"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/MadhuriRGEastUS2/providers/Microsoft.DataMigration/sqlMigrationServices/myservice-eastus2","name":"myservice-eastus2","type":"Microsoft.DataMigration/sqlMigrationServices"},{"properties":{"provisioningState":"Succeeded","integrationRuntimeState":""},"location":"eastus2","id":"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/MigrationTesting/providers/Microsoft.DataMigration/sqlMigrationServices/mscmdlet","name":"mscmdlet","type":"Microsoft.DataMigration/sqlMigrationServices"},{"properties":{"provisioningState":"Succeeded","integrationRuntimeState":""},"location":"eastus2","id":"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/MigrationTesting/providers/Microsoft.DataMigration/sqlMigrationServices/MyCLISqlMigrationService","name":"MyCLISqlMigrationService","type":"Microsoft.DataMigration/sqlMigrationServices"},{"properties":{"provisioningState":"Succeeded","integrationRuntimeState":""},"location":"eastus2","id":"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/MigrationTesting/providers/Microsoft.DataMigration/sqlMigrationServices/MyCLISqlMigrationService1","name":"MyCLISqlMigrationService1","type":"Microsoft.DataMigration/sqlMigrationServices"},{"properties":{"provisioningState":"Succeeded","integrationRuntimeState":""},"location":"eastus2","id":"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/MigrationTesting/providers/Microsoft.DataMigration/sqlMigrationServices/vasuMService","name":"vasuMService","type":"Microsoft.DataMigration/sqlMigrationServices"},{"properties":{"provisioningState":"Succeeded","integrationRuntimeState":""},"location":"eastus2","id":"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/psTest/providers/Microsoft.DataMigration/sqlMigrationServices/dmsAuth","name":"dmsAuth","type":"Microsoft.DataMigration/sqlMigrationServices"},{"properties":{"provisioningState":"Succeeded","integrationRuntimeState":""},"location":"eastus2","id":"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/psTest/providers/Microsoft.DataMigration/sqlMigrationServices/dmscheck","name":"dmscheck","type":"Microsoft.DataMigration/sqlMigrationServices"},{"properties":{"provisioningState":"Succeeded","integrationRuntimeState":""},"location":"eastus2","id":"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/psTest/providers/Microsoft.DataMigration/sqlMigrationServices/dmsMigration","name":"dmsMigration","type":"Microsoft.DataMigration/sqlMigrationServices"},{"properties":{"provisioningState":"Succeeded","integrationRuntimeState":""},"location":"eastus2","id":"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/psTest/providers/Microsoft.DataMigration/sqlMigrationServices/psDMS","name":"psDMS","type":"Microsoft.DataMigration/sqlMigrationServices"},{"properties":{"provisioningState":"Succeeded","integrationRuntimeState":""},"location":"eastus2","id":"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/psTest/providers/Microsoft.DataMigration/sqlMigrationServices/psDMStest267abchywo","name":"psDMStest267abchywo","type":"Microsoft.DataMigration/sqlMigrationServices"},{"properties":{"provisioningState":"Succeeded","integrationRuntimeState":""},"location":"eastus2","id":"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/psTest/providers/Microsoft.DataMigration/sqlMigrationServices/psDMStest3rbnp5yalc","name":"psDMStest3rbnp5yalc","type":"Microsoft.DataMigration/sqlMigrationServices"},{"properties":{"provisioningState":"Succeeded","integrationRuntimeState":""},"location":"eastus2","id":"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/psTest/providers/Microsoft.DataMigration/sqlMigrationServices/psDMStest49jxbqeuta","name":"psDMStest49jxbqeuta","type":"Microsoft.DataMigration/sqlMigrationServices"},{"properties":{"provisioningState":"Succeeded","integrationRuntimeState":""},"location":"eastus2","id":"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/psTest/providers/Microsoft.DataMigration/sqlMigrationServices/psDMStest6xzdi2cqjy","name":"psDMStest6xzdi2cqjy","type":"Microsoft.DataMigration/sqlMigrationServices"},{"properties":{"provisioningState":"Succeeded","integrationRuntimeState":""},"location":"eastus2","id":"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/psTest/providers/Microsoft.DataMigration/sqlMigrationServices/psDMStest7b5m0vptuw","name":"psDMStest7b5m0vptuw","type":"Microsoft.DataMigration/sqlMigrationServices"},{"properties":{"provisioningState":"Succeeded","integrationRuntimeState":""},"location":"eastus2","id":"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/psTest/providers/Microsoft.DataMigration/sqlMigrationServices/psDMStest9gezsb4x5o","name":"psDMStest9gezsb4x5o","type":"Microsoft.DataMigration/sqlMigrationServices"},{"properties":{"provisioningState":"Succeeded","integrationRuntimeState":""},"location":"eastus2","id":"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/psTest/providers/Microsoft.DataMigration/sqlMigrationServices/psDMStestbxyther6fp","name":"psDMStestbxyther6fp","type":"Microsoft.DataMigration/sqlMigrationServices"},{"properties":{"provisioningState":"Succeeded","integrationRuntimeState":""},"location":"eastus2","id":"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/psTest/providers/Microsoft.DataMigration/sqlMigrationServices/psDMStestdn2lcrmj6o","name":"psDMStestdn2lcrmj6o","type":"Microsoft.DataMigration/sqlMigrationServices"},{"properties":{"provisioningState":"Succeeded","integrationRuntimeState":""},"location":"eastus2","id":"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/psTest/providers/Microsoft.DataMigration/sqlMigrationServices/psDMStestjtpgsridov","name":"psDMStestjtpgsridov","type":"Microsoft.DataMigration/sqlMigrationServices"},{"properties":{"provisioningState":"Succeeded","integrationRuntimeState":""},"location":"eastus2","id":"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/psTest/providers/Microsoft.DataMigration/sqlMigrationServices/psDMStestkgy63ticsz","name":"psDMStestkgy63ticsz","type":"Microsoft.DataMigration/sqlMigrationServices"},{"properties":{"provisioningState":"Succeeded","integrationRuntimeState":""},"location":"eastus2","id":"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/psTest/providers/Microsoft.DataMigration/sqlMigrationServices/psDMStestlfo728yn3g","name":"psDMStestlfo728yn3g","type":"Microsoft.DataMigration/sqlMigrationServices"},{"properties":{"provisioningState":"Succeeded","integrationRuntimeState":""},"location":"eastus2","id":"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/psTest/providers/Microsoft.DataMigration/sqlMigrationServices/psDMStestmw4tqh6vok","name":"psDMStestmw4tqh6vok","type":"Microsoft.DataMigration/sqlMigrationServices"},{"properties":{"provisioningState":"Succeeded","integrationRuntimeState":""},"location":"eastus2","id":"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/psTest/providers/Microsoft.DataMigration/sqlMigrationServices/psDMStesto2sjnmaq6y","name":"psDMStesto2sjnmaq6y","type":"Microsoft.DataMigration/sqlMigrationServices"},{"properties":{"provisioningState":"Succeeded","integrationRuntimeState":""},"location":"eastus2","id":"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/psTest/providers/Microsoft.DataMigration/sqlMigrationServices/psDMStestpjvnwf04q7","name":"psDMStestpjvnwf04q7","type":"Microsoft.DataMigration/sqlMigrationServices"},{"properties":{"provisioningState":"Succeeded","integrationRuntimeState":""},"location":"eastus2","id":"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/psTest/providers/Microsoft.DataMigration/sqlMigrationServices/psDMStestxftmn20j81","name":"psDMStestxftmn20j81","type":"Microsoft.DataMigration/sqlMigrationServices"},{"properties":{"provisioningState":"Succeeded","integrationRuntimeState":""},"location":"eastus2","id":"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/psTest/providers/Microsoft.DataMigration/sqlMigrationServices/psDMStestxnjlyh5gmp","name":"psDMStestxnjlyh5gmp","type":"Microsoft.DataMigration/sqlMigrationServices"},{"properties":{"provisioningState":"Succeeded","integrationRuntimeState":""},"location":"eastus2","id":"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/psTest/providers/Microsoft.DataMigration/sqlMigrationServices/psDMStesty6i3w7zmbf","name":"psDMStesty6i3w7zmbf","type":"Microsoft.DataMigration/sqlMigrationServices"},{"properties":{"provisioningState":"Succeeded","integrationRuntimeState":""},"location":"eastus2","id":"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/rackimtest2/providers/Microsoft.DataMigration/sqlMigrationServices/test0903","name":"test0903","type":"Microsoft.DataMigration/sqlMigrationServices"},{"properties":{"provisioningState":"Succeeded","integrationRuntimeState":""},"location":"eastus2","id":"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/tsum38RG/providers/Microsoft.DataMigration/sqlMigrationServices/dmsscript1","name":"dmsscript1","type":"Microsoft.DataMigration/sqlMigrationServices"},{"properties":{"provisioningState":"Succeeded","integrationRuntimeState":""},"location":"eastus2","id":"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/tsum38RG/providers/Microsoft.DataMigration/sqlMigrationServices/dmsUnit","name":"dmsUnit","type":"Microsoft.DataMigration/sqlMigrationServices"},{"properties":{"provisioningState":"Succeeded","integrationRuntimeState":""},"location":"eastus2","id":"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/tsum38RG/providers/Microsoft.DataMigration/sqlMigrationServices/dmsUnitTest","name":"dmsUnitTest","type":"Microsoft.DataMigration/sqlMigrationServices"},{"properties":{"provisioningState":"Succeeded","integrationRuntimeState":""},"location":"eastus2","id":"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/tsum38RG/providers/Microsoft.DataMigration/sqlMigrationServices/scriptdms19","name":"scriptdms19","type":"Microsoft.DataMigration/sqlMigrationServices"},{"properties":{"provisioningState":"Succeeded","integrationRuntimeState":""},"location":"eastus2","id":"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/tsum38RG/providers/Microsoft.DataMigration/sqlMigrationServices/scriptdms23","name":"scriptdms23","type":"Microsoft.DataMigration/sqlMigrationServices"},{"properties":{"provisioningState":"Succeeded","integrationRuntimeState":""},"location":"eastus2","id":"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/tsum38RG/providers/Microsoft.DataMigration/sqlMigrationServices/scriptdms29","name":"scriptdms29","type":"Microsoft.DataMigration/sqlMigrationServices"},{"properties":{"provisioningState":"Succeeded","integrationRuntimeState":""},"location":"eastus2","id":"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/tsum38RG/providers/Microsoft.DataMigration/sqlMigrationServices/scripty1","name":"scripty1","type":"Microsoft.DataMigration/sqlMigrationServices"},{"properties":{"provisioningState":"Succeeded","integrationRuntimeState":""},"location":"eastus2","id":"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/yaly/providers/Microsoft.DataMigration/sqlMigrationServices/myservice2","name":"myservice2","type":"Microsoft.DataMigration/sqlMigrationServices"},{"properties":{"provisioningState":"Succeeded","integrationRuntimeState":""},"location":"eastus2","id":"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/yaly/providers/Microsoft.DataMigration/sqlMigrationServices/myservice3","name":"myservice3","type":"Microsoft.DataMigration/sqlMigrationServices"},{"properties":{"provisioningState":"Succeeded","integrationRuntimeState":""},"location":"eastus2","id":"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/yaly/providers/Microsoft.DataMigration/sqlMigrationServices/yalyservice2","name":"yalyservice2","type":"Microsoft.DataMigration/sqlMigrationServices"},{"properties":{"provisioningState":"Succeeded","integrationRuntimeState":""},"location":"eastus","id":"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/eastustest/providers/Microsoft.DataMigration/sqlMigrationServices/EastUSTestService","name":"EastUSTestService","type":"Microsoft.DataMigration/sqlMigrationServices"},{"properties":{"provisioningState":"Succeeded","integrationRuntimeState":""},"location":"eastus","id":"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/KMVsRG/providers/Microsoft.DataMigration/sqlMigrationServices/kmvadms","name":"kmvadms","type":"Microsoft.DataMigration/sqlMigrationServices"},{"properties":{"provisioningState":"Succeeded","integrationRuntimeState":""},"location":"eastus","id":"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/madhuriRG/providers/Microsoft.DataMigration/sqlMigrationServices/ms123","name":"ms123","type":"Microsoft.DataMigration/sqlMigrationServices"},{"properties":{"provisioningState":"Succeeded","integrationRuntimeState":""},"location":"eastus","id":"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/madhuriRG/providers/Microsoft.DataMigration/sqlMigrationServices/vms1","name":"vms1","type":"Microsoft.DataMigration/sqlMigrationServices"},{"properties":{"provisioningState":"Succeeded","integrationRuntimeState":""},"location":"eastus","id":"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/MigrationTesting/providers/Microsoft.DataMigration/sqlMigrationServices/SaGangwarSqlMigrationService","name":"SaGangwarSqlMigrationService","type":"Microsoft.DataMigration/sqlMigrationServices"},{"properties":{"provisioningState":"Succeeded","integrationRuntimeState":""},"location":"eastus","id":"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/SaGangwarGroup/providers/Microsoft.DataMigration/sqlMigrationServices/SaGangwarSqlMigrationService","name":"SaGangwarSqlMigrationService","type":"Microsoft.DataMigration/sqlMigrationServices"},{"properties":{"provisioningState":"Succeeded","integrationRuntimeState":""},"location":"eastus","id":"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/tsum38RG/providers/Microsoft.DataMigration/sqlMigrationServices/MySqlMigrationService","name":"MySqlMigrationService","type":"Microsoft.DataMigration/sqlMigrationServices"},{"properties":{"provisioningState":"Succeeded","integrationRuntimeState":""},"location":"eastus","id":"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/tsum38RG/providers/Microsoft.DataMigration/sqlMigrationServices/SaGangwarSqlMigrationService","name":"SaGangwarSqlMigrationService","type":"Microsoft.DataMigration/sqlMigrationServices"},{"properties":{"provisioningState":"Succeeded","integrationRuntimeState":""},"location":"eastus","id":"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/vasundhra/providers/Microsoft.DataMigration/sqlMigrationServices/trial","name":"trial","type":"Microsoft.DataMigration/sqlMigrationServices"},{"properties":{"provisioningState":"Succeeded","integrationRuntimeState":""},"location":"canadacentral","id":"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/canadacentraltest/providers/Microsoft.DataMigration/sqlMigrationServices/CanadaCentralTest","name":"CanadaCentralTest","type":"Microsoft.DataMigration/sqlMigrationServices"},{"properties":{"provisioningState":"Succeeded","integrationRuntimeState":""},"location":"centralus","id":"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/CentralUsTest/providers/Microsoft.DataMigration/sqlMigrationServices/CentralUsTest","name":"CentralUsTest","type":"Microsoft.DataMigration/sqlMigrationServices"},{"properties":{"provisioningState":"Succeeded","integrationRuntimeState":""},"location":"canadaeast","id":"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/CanadaEastTest/providers/Microsoft.DataMigration/sqlMigrationServices/CanadaEastTest","name":"CanadaEastTest","type":"Microsoft.DataMigration/sqlMigrationServices"},{"properties":{"provisioningState":"Succeeded","integrationRuntimeState":""},"location":"westeurope","id":"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/yalywesteurope/providers/Microsoft.DataMigration/sqlMigrationServices/failovertest","name":"failovertest","type":"Microsoft.DataMigration/sqlMigrationServices"},{"properties":{"provisioningState":"Succeeded","integrationRuntimeState":""},"location":"australiaeast","id":"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/servicergaustraliaeast/providers/Microsoft.DataMigration/sqlMigrationServices/serviceaustraliaeast","name":"serviceaustraliaeast","type":"Microsoft.DataMigration/sqlMigrationServices"},{"properties":{"provisioningState":"Succeeded","integrationRuntimeState":""},"location":"australiasoutheast","id":"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/servicergaustraliasoutheast/providers/Microsoft.DataMigration/sqlMigrationServices/serviceaustraliasoutheast","name":"serviceaustraliasoutheast","type":"Microsoft.DataMigration/sqlMigrationServices"},{"properties":{"provisioningState":"Succeeded","integrationRuntimeState":""},"location":"francecentral","id":"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/servicergfrancec/providers/Microsoft.DataMigration/sqlMigrationServices/servicefrancec","name":"servicefrancec","type":"Microsoft.DataMigration/sqlMigrationServices"},{"properties":{"provisioningState":"Succeeded","integrationRuntimeState":""},"location":"centralindia","id":"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/servicergindiacentral/providers/Microsoft.DataMigration/sqlMigrationServices/serviceindiacentral","name":"serviceindiacentral","type":"Microsoft.DataMigration/sqlMigrationServices"},{"properties":{"provisioningState":"Succeeded","integrationRuntimeState":""},"location":"southindia","id":"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/servicergindiasouth/providers/Microsoft.DataMigration/sqlMigrationServices/serviceindiasouth","name":"serviceindiasouth","type":"Microsoft.DataMigration/sqlMigrationServices"},{"properties":{"provisioningState":"Succeeded","integrationRuntimeState":""},"location":"japaneast","id":"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/servicergjapaneast/providers/Microsoft.DataMigration/sqlMigrationServices/servicejapaneast","name":"servicejapaneast","type":"Microsoft.DataMigration/sqlMigrationServices"},{"properties":{"provisioningState":"Succeeded","integrationRuntimeState":""},"location":"southcentralus","id":"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/servicergussouth/providers/Microsoft.DataMigration/sqlMigrationServices/serviceussouth","name":"serviceussouth","type":"Microsoft.DataMigration/sqlMigrationServices"},{"properties":{"provisioningState":"Succeeded","integrationRuntimeState":""},"location":"southeastasia","id":"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/servicergasiasoutheast/providers/Microsoft.DataMigration/sqlMigrationServices/serviceasiasoutheast","name":"serviceasiasoutheast","type":"Microsoft.DataMigration/sqlMigrationServices"},{"properties":{"provisioningState":"Succeeded","integrationRuntimeState":""},"location":"southeastasia","id":"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/testyaly/providers/Microsoft.DataMigration/sqlMigrationServices/testyaly","name":"testyaly","type":"Microsoft.DataMigration/sqlMigrationServices"},{"properties":{"provisioningState":"Succeeded","integrationRuntimeState":""},"location":"uksouth","id":"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/MigrationTesting/providers/Microsoft.DataMigration/sqlMigrationServices/MadhuriBB","name":"MadhuriBB","type":"Microsoft.DataMigration/sqlMigrationServices"},{"properties":{"provisioningState":"Succeeded","integrationRuntimeState":""},"location":"uksouth","id":"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/MigrationTesting/providers/Microsoft.DataMigration/sqlMigrationServices/MadhuriServiceBugBash","name":"MadhuriServiceBugBash","type":"Microsoft.DataMigration/sqlMigrationServices"},{"properties":{"provisioningState":"Succeeded","integrationRuntimeState":""},"location":"uksouth","id":"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/MigrationTesting/providers/Microsoft.DataMigration/sqlMigrationServices/kamurugatest1","name":"kamurugatest1","type":"Microsoft.DataMigration/sqlMigrationServices"},{"properties":{"provisioningState":"Succeeded","integrationRuntimeState":""},"location":"uksouth","id":"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/servicerguksouth/providers/Microsoft.DataMigration/sqlMigrationServices/serviceuksouth","name":"serviceuksouth","type":"Microsoft.DataMigration/sqlMigrationServices"},{"properties":{"provisioningState":"Succeeded","integrationRuntimeState":""},"location":"uksouth","id":"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/MigrationTesting/providers/Microsoft.DataMigration/sqlMigrationServices/rohitdhtest","name":"rohitdhtest","type":"Microsoft.DataMigration/sqlMigrationServices"},{"properties":{"provisioningState":"Succeeded","integrationRuntimeState":""},"location":"uksouth","id":"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/hijavarg/providers/Microsoft.DataMigration/sqlMigrationServices/hijavaDmsUkSouth1","name":"hijavaDmsUkSouth1","type":"Microsoft.DataMigration/sqlMigrationServices"},{"properties":{"provisioningState":"Succeeded","integrationRuntimeState":""},"location":"westus","id":"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/servicerguswest/providers/Microsoft.DataMigration/sqlMigrationServices/serviceuswest","name":"serviceuswest","type":"Microsoft.DataMigration/sqlMigrationServices"},{"properties":{"provisioningState":"Succeeded","integrationRuntimeState":""},"location":"westus2","id":"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/servicerguswest2/providers/Microsoft.DataMigration/sqlMigrationServices/serviceuswest2","name":"serviceuswest2","type":"Microsoft.DataMigration/sqlMigrationServices"},{"properties":{"provisioningState":"Succeeded","integrationRuntimeState":""},"location":"eastasia","id":"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/yalyeastasia/providers/Microsoft.DataMigration/sqlMigrationServices/CRUDTest","name":"CRUDTest","type":"Microsoft.DataMigration/sqlMigrationServices"},{"properties":{"provisioningState":"Succeeded","integrationRuntimeState":""},"location":"northeurope","id":"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/yalyNorthEurope/providers/Microsoft.DataMigration/sqlMigrationServices/DMSTest","name":"DMSTest","type":"Microsoft.DataMigration/sqlMigrationServices"},{"properties":{"provisioningState":"Succeeded","integrationRuntimeState":""},"location":"ukwest","id":"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/yalyukwest/providers/Microsoft.DataMigration/sqlMigrationServices/DMSFailoverTest","name":"DMSFailoverTest","type":"Microsoft.DataMigration/sqlMigrationServices"},{"properties":{"provisioningState":"Succeeded","integrationRuntimeState":""},"location":"westcentralus","id":"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/yalywestcentralus/providers/Microsoft.DataMigration/sqlMigrationServices/FailoverTest","name":"FailoverTest","type":"Microsoft.DataMigration/sqlMigrationServices"},{"properties":{"provisioningState":"Failed","integrationRuntimeState":""},"location":"eastus2euap","id":"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/azrRG/providers/Microsoft.DataMigration/sqlMigrationServices/azrTest2","name":"azrTest2","type":"Microsoft.DataMigration/sqlMigrationServices"},{"properties":{"provisioningState":"Succeeded","integrationRuntimeState":""},"location":"eastus2euap","id":"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/aaskhan/providers/Microsoft.DataMigration/sqlMigrationServices/asdfsadfsadfasd","name":"asdfsadfsadfasd","type":"Microsoft.DataMigration/sqlMigrationServices"},{"properties":{"provisioningState":"Succeeded","integrationRuntimeState":""},"location":"eastus2euap","id":"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/aaskhan/providers/Microsoft.DataMigration/sqlMigrationServices/test6","name":"test6","type":"Microsoft.DataMigration/sqlMigrationServices"},{"properties":{"provisioningState":"Succeeded","integrationRuntimeState":""},"location":"eastus2euap","id":"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/aaskhan/providers/Microsoft.DataMigration/sqlMigrationServices/test1","name":"test1","type":"Microsoft.DataMigration/sqlMigrationServices"},{"properties":{"provisioningState":"Succeeded","integrationRuntimeState":""},"location":"eastus2euap","id":"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/tsum38RG/providers/Microsoft.DataMigration/sqlMigrationServices/sqlServiceUnitTest-Pipeline","name":"sqlServiceUnitTest-Pipeline","type":"Microsoft.DataMigration/sqlMigrationServices"},{"properties":{"provisioningState":"Failed","integrationRuntimeState":""},"location":"eastus2euap","id":"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/aasimTestVM_group/providers/Microsoft.DataMigration/sqlMigrationServices/test0608202122","name":"test0608202122","type":"Microsoft.DataMigration/sqlMigrationServices"},{"properties":{"provisioningState":"Failed","integrationRuntimeState":""},"location":"eastus2euap","id":"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/MadhuriRG/providers/Microsoft.DataMigration/sqlMigrationServices/myservice1","name":"myservice1","type":"Microsoft.DataMigration/sqlMigrationServices"},{"properties":{"provisioningState":"Succeeded","integrationRuntimeState":""},"location":"eastus2euap","id":"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/MigrationTesting/providers/Microsoft.DataMigration/sqlMigrationServices/vmsf","name":"vmsf","type":"Microsoft.DataMigration/sqlMigrationServices"},{"properties":{"provisioningState":"Succeeded","integrationRuntimeState":""},"location":"eastus2euap","id":"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/aaskhan/providers/Microsoft.DataMigration/sqlMigrationServices/datamigration-test-ads","name":"datamigration-test-ads","type":"Microsoft.DataMigration/sqlMigrationServices"},{"properties":{"provisioningState":"Succeeded","integrationRuntimeState":""},"location":"eastus2euap","id":"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/tsum38RG/providers/Microsoft.DataMigration/sqlMigrationServices/alias","name":"alias","type":"Microsoft.DataMigration/sqlMigrationServices"},{"properties":{"provisioningState":"Succeeded","integrationRuntimeState":""},"location":"eastus2euap","id":"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/tsum38RG/providers/Microsoft.DataMigration/sqlMigrationServices/alias-dms","name":"alias-dms","type":"Microsoft.DataMigration/sqlMigrationServices"},{"properties":{"provisioningState":"Succeeded","integrationRuntimeState":""},"location":"eastus2euap","id":"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/aaskhan/providers/Microsoft.DataMigration/sqlMigrationServices/sqltoolsdemo331","name":"sqltoolsdemo331","type":"Microsoft.DataMigration/sqlMigrationServices"},{"properties":{"provisioningState":"Succeeded","integrationRuntimeState":""},"location":"eastus2euap","id":"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/MadhuriRG/providers/Microsoft.DataMigration/sqlMigrationServices/tsum38-td","name":"tsum38-td","type":"Microsoft.DataMigration/sqlMigrationServices"},{"properties":{"provisioningState":"Succeeded","integrationRuntimeState":""},"location":"eastus2euap","id":"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/aaskhan/providers/Microsoft.DataMigration/sqlMigrationServices/061020211057","name":"061020211057","type":"Microsoft.DataMigration/sqlMigrationServices"},{"properties":{"provisioningState":"Failed","integrationRuntimeState":""},"location":"eastus2euap","id":"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/aaskhan/providers/Microsoft.DataMigration/sqlMigrationServices/aasimtestdms0504","name":"aasimtestdms0504","type":"Microsoft.DataMigration/sqlMigrationServices"},{"properties":{"provisioningState":"Succeeded","integrationRuntimeState":""},"location":"eastus2euap","id":"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/CLIUnitTest/providers/Microsoft.DataMigration/sqlMigrationServices/sqlServiceUnitTest-Pipeline1","name":"sqlServiceUnitTest-Pipeline1","type":"Microsoft.DataMigration/sqlMigrationServices"},{"properties":{"provisioningState":"Succeeded","integrationRuntimeState":""},"location":"eastus2euap","id":"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/MadhuriRG/providers/Microsoft.DataMigration/sqlMigrationServices/listdmscanary","name":"listdmscanary","type":"Microsoft.DataMigration/sqlMigrationServices"},{"properties":{"provisioningState":"Succeeded","integrationRuntimeState":""},"location":"eastus2euap","id":"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/RSETLEM-RG-DMS/providers/Microsoft.DataMigration/sqlMigrationServices/RSETLEM-DMS-Service20","name":"RSETLEM-DMS-Service20","type":"Microsoft.DataMigration/sqlMigrationServices"},{"properties":{"provisioningState":"Failed","integrationRuntimeState":""},"location":"eastus2euap","id":"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/hijavarg/providers/Microsoft.DataMigration/sqlMigrationServices/hijava_canary_controller","name":"hijava_canary_controller","type":"Microsoft.DataMigration/sqlMigrationServices"},{"properties":{"provisioningState":"Failed","integrationRuntimeState":""},"location":"eastus2euap","id":"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/tsum38RG/providers/Microsoft.DataMigration/sqlMigrationServices/new-testing-sqlmigrationservice-cd5j6m1bh8","name":"new-testing-sqlmigrationservice-cd5j6m1bh8","type":"Microsoft.DataMigration/sqlMigrationServices"},{"properties":{"provisioningState":"Succeeded","integrationRuntimeState":""},"location":"eastus2euap","id":"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/CLIUnitTest/providers/Microsoft.DataMigration/sqlMigrationServices/sqlServiceUnitTest-Pipeline2","name":"sqlServiceUnitTest-Pipeline2","type":"Microsoft.DataMigration/sqlMigrationServices"},{"properties":{"provisioningState":"Succeeded","integrationRuntimeState":""},"location":"eastus2euap","id":"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/hijavarg_canary/providers/Microsoft.DataMigration/sqlMigrationServices/hijavaservicesep01","name":"hijavaservicesep01","type":"Microsoft.DataMigration/sqlMigrationServices"},{"properties":{"provisioningState":"Succeeded","integrationRuntimeState":""},"location":"eastus2euap","id":"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/aaskhan/providers/Microsoft.DataMigration/sqlMigrationServices/aasim-test-dms-330","name":"aasim-test-dms-330","type":"Microsoft.DataMigration/sqlMigrationServices"},{"properties":{"provisioningState":"Succeeded","integrationRuntimeState":""},"location":"eastus2euap","id":"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/aaskhan/providers/Microsoft.DataMigration/sqlMigrationServices/aasim-dms-test-330-2","name":"aasim-dms-test-330-2","type":"Microsoft.DataMigration/sqlMigrationServices"},{"properties":{"provisioningState":"Failed","integrationRuntimeState":""},"location":"eastus2euap","id":"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/hijavarg_canary/providers/Microsoft.DataMigration/sqlMigrationServices/hijava_canary_controller","name":"hijava_canary_controller","type":"Microsoft.DataMigration/sqlMigrationServices"},{"properties":{"provisioningState":"Failed","integrationRuntimeState":""},"location":"eastus2euap","id":"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/aaskhan/providers/Microsoft.DataMigration/sqlMigrationServices/test060821","name":"test060821","type":"Microsoft.DataMigration/sqlMigrationServices"},{"properties":{"provisioningState":"Failed","integrationRuntimeState":""},"location":"eastus2euap","id":"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/MigrationTesting/providers/Microsoft.DataMigration/sqlMigrationServices/vasumsFiddler","name":"vasumsFiddler","type":"Microsoft.DataMigration/sqlMigrationServices"},{"properties":{"provisioningState":"Succeeded","integrationRuntimeState":""},"location":"eastus2euap","id":"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/aaskhan/providers/Microsoft.DataMigration/sqlMigrationServices/aasimtestbutton","name":"aasimtestbutton","type":"Microsoft.DataMigration/sqlMigrationServices"},{"properties":{"provisioningState":"Succeeded","integrationRuntimeState":""},"location":"eastus2euap","id":"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/aaskhan/providers/Microsoft.DataMigration/sqlMigrationServices/vmTest0611256","name":"vmTest0611256","type":"Microsoft.DataMigration/sqlMigrationServices"},{"properties":{"provisioningState":"Failed","integrationRuntimeState":""},"location":"eastus2euap","id":"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/aasimTestVM_group/providers/Microsoft.DataMigration/sqlMigrationServices/at0608t","name":"at0608t","type":"Microsoft.DataMigration/sqlMigrationServices"},{"properties":{"provisioningState":"Succeeded","integrationRuntimeState":""},"location":"eastus2euap","id":"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/aaskhan/providers/Microsoft.DataMigration/sqlMigrationServices/aasimtest1","name":"aasimtest1","type":"Microsoft.DataMigration/sqlMigrationServices"},{"properties":{"provisioningState":"Succeeded","integrationRuntimeState":""},"location":"eastus2euap","id":"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/aasimtest10/providers/Microsoft.DataMigration/sqlMigrationServices/aasim728157","name":"aasim728157","type":"Microsoft.DataMigration/sqlMigrationServices"},{"properties":{"provisioningState":"Failed","integrationRuntimeState":""},"location":"eastus2euap","id":"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/aasimTestVM_group/providers/Microsoft.DataMigration/sqlMigrationServices/test","name":"test","type":"Microsoft.DataMigration/sqlMigrationServices"},{"properties":{"provisioningState":"Failed","integrationRuntimeState":""},"location":"eastus2euap","id":"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/aasimTestVM_group/providers/Microsoft.DataMigration/sqlMigrationServices/test123","name":"test123","type":"Microsoft.DataMigration/sqlMigrationServices"},{"properties":{"provisioningState":"Succeeded","integrationRuntimeState":""},"location":"eastus2euap","id":"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/aaskhan/providers/Microsoft.DataMigration/sqlMigrationServices/aasim-dms-330-test-2","name":"aasim-dms-330-test-2","type":"Microsoft.DataMigration/sqlMigrationServices"},{"properties":{"provisioningState":"Succeeded","integrationRuntimeState":""},"location":"eastus2euap","id":"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/aaskhan/providers/Microsoft.DataMigration/sqlMigrationServices/test1234","name":"test1234","type":"Microsoft.DataMigration/sqlMigrationServices"},{"properties":{"provisioningState":"Succeeded","integrationRuntimeState":""},"location":"eastus2euap","id":"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/aaskhan/providers/Microsoft.DataMigration/sqlMigrationServices/aasimtest0505","name":"aasimtest0505","type":"Microsoft.DataMigration/sqlMigrationServices"},{"properties":{"provisioningState":"Succeeded","integrationRuntimeState":""},"location":"eastus2euap","id":"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/hijavarg_canary/providers/Microsoft.DataMigration/sqlMigrationServices/hijavaservice3","name":"hijavaservice3","type":"Microsoft.DataMigration/sqlMigrationServices"},{"properties":{"provisioningState":"Succeeded","integrationRuntimeState":""},"location":"eastus2euap","id":"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/yaly/providers/Microsoft.DataMigration/sqlMigrationServices/hijavaservice3","name":"hijavaservice3","type":"Microsoft.DataMigration/sqlMigrationServices"},{"properties":{"provisioningState":"Succeeded","integrationRuntimeState":""},"location":"eastus2euap","id":"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/rohitdhmi/providers/Microsoft.DataMigration/sqlMigrationServices/rohitdhbugbush1021","name":"rohitdhbugbush1021","type":"Microsoft.DataMigration/sqlMigrationServices"},{"properties":{"provisioningState":"Succeeded","integrationRuntimeState":""},"location":"eastus2euap","id":"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/MadhuriRG/providers/Microsoft.DataMigration/sqlMigrationServices/TestFactory0505","name":"TestFactory0505","type":"Microsoft.DataMigration/sqlMigrationServices"},{"properties":{"provisioningState":"Failed","integrationRuntimeState":""},"location":"eastus2euap","id":"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/yaly/providers/Microsoft.DataMigration/sqlMigrationServices/yalyservice4","name":"yalyservice4","type":"Microsoft.DataMigration/sqlMigrationServices"},{"properties":{"provisioningState":"Succeeded","integrationRuntimeState":""},"location":"eastus2euap","id":"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/aaskhan/providers/Microsoft.DataMigration/sqlMigrationServices/test5","name":"test5","type":"Microsoft.DataMigration/sqlMigrationServices"},{"properties":{"provisioningState":"Failed","integrationRuntimeState":""},"location":"eastus2euap","id":"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/aaskhan/providers/Microsoft.DataMigration/sqlMigrationServices/aaskhan060821trial24","name":"aaskhan060821trial24","type":"Microsoft.DataMigration/sqlMigrationServices"},{"properties":{"provisioningState":"Succeeded","integrationRuntimeState":""},"location":"eastus2euap","id":"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/servicerguseast2euap/providers/Microsoft.DataMigration/sqlMigrationServices/serviceuseast2euap","name":"serviceuseast2euap","type":"Microsoft.DataMigration/sqlMigrationServices"},{"properties":{"provisioningState":"Succeeded","integrationRuntimeState":""},"location":"eastus2euap","id":"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/hijavarg_canary/providers/Microsoft.DataMigration/sqlMigrationServices/hijavaservice2","name":"hijavaservice2","type":"Microsoft.DataMigration/sqlMigrationServices"},{"properties":{"provisioningState":"Succeeded","integrationRuntimeState":""},"location":"eastus2euap","id":"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/MadhuriRG/providers/Microsoft.DataMigration/sqlMigrationServices/MadhuriTestFactory1","name":"MadhuriTestFactory1","type":"Microsoft.DataMigration/sqlMigrationServices"},{"properties":{"provisioningState":"Succeeded","integrationRuntimeState":""},"location":"eastus2euap","id":"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/smartura/providers/Microsoft.DataMigration/sqlMigrationServices/smarturatest","name":"smarturatest","type":"Microsoft.DataMigration/sqlMigrationServices"},{"properties":{"provisioningState":"Failed","integrationRuntimeState":""},"location":"eastus2euap","id":"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/tsum38RG/providers/Microsoft.DataMigration/sqlMigrationServices/trailTD-delete","name":"trailTD-delete","type":"Microsoft.DataMigration/sqlMigrationServices"},{"properties":{"provisioningState":"Succeeded","integrationRuntimeState":""},"location":"eastus2euap","id":"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/RSETLEM-DMS-RG/providers/Microsoft.DataMigration/sqlMigrationServices/DMS-05192021","name":"DMS-05192021","type":"Microsoft.DataMigration/sqlMigrationServices"},{"properties":{"provisioningState":"Succeeded","integrationRuntimeState":""},"location":"eastus2euap","id":"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/MadhuriRG/providers/Microsoft.DataMigration/sqlMigrationServices/MadhuriTestFactory","name":"MadhuriTestFactory","type":"Microsoft.DataMigration/sqlMigrationServices"},{"properties":{"provisioningState":"Succeeded","integrationRuntimeState":""},"location":"eastus2euap","id":"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/hijavarg_canary/providers/Microsoft.DataMigration/sqlMigrationServices/hijavasvc25may","name":"hijavasvc25may","type":"Microsoft.DataMigration/sqlMigrationServices"},{"properties":{"provisioningState":"Succeeded","integrationRuntimeState":""},"location":"eastus2euap","id":"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/yaly/providers/Microsoft.DataMigration/sqlMigrationServices/yalytest","name":"yalytest","type":"Microsoft.DataMigration/sqlMigrationServices"},{"properties":{"provisioningState":"Failed","integrationRuntimeState":""},"location":"eastus2euap","id":"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/aaskhan/providers/Microsoft.DataMigration/sqlMigrationServices/aasimTestDms060821trial1","name":"aasimTestDms060821trial1","type":"Microsoft.DataMigration/sqlMigrationServices"},{"properties":{"provisioningState":"Succeeded","integrationRuntimeState":""},"location":"eastus2euap","id":"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/hijavarg_canary/providers/Microsoft.DataMigration/sqlMigrationServices/hijavasep22-3","name":"hijavasep22-3","type":"Microsoft.DataMigration/sqlMigrationServices"},{"properties":{"provisioningState":"Succeeded","integrationRuntimeState":""},"location":"eastus2euap","id":"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/aaskhan/providers/Microsoft.DataMigration/sqlMigrationServices/aasimTest","name":"aasimTest","type":"Microsoft.DataMigration/sqlMigrationServices"},{"properties":{"provisioningState":"Succeeded","integrationRuntimeState":""},"location":"eastus2euap","id":"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/rackimtest2/providers/Microsoft.DataMigration/sqlMigrationServices/0910DMS","name":"0910DMS","type":"Microsoft.DataMigration/sqlMigrationServices"},{"properties":{"provisioningState":"Succeeded","integrationRuntimeState":""},"location":"eastus2euap","id":"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/RSETLEM-RG-MC41/providers/Microsoft.DataMigration/sqlMigrationServices/RSETLEM-MC41","name":"RSETLEM-MC41","type":"Microsoft.DataMigration/sqlMigrationServices"},{"properties":{"provisioningState":"Succeeded","integrationRuntimeState":""},"location":"eastus2euap","id":"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/aaskhan/providers/Microsoft.DataMigration/sqlMigrationServices/aasimtestirdms419","name":"aasimtestirdms419","type":"Microsoft.DataMigration/sqlMigrationServices"},{"properties":{"provisioningState":"Succeeded","integrationRuntimeState":""},"location":"eastus2euap","id":"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/MadhuriRG/providers/Microsoft.DataMigration/sqlMigrationServices/vasu","name":"vasu","type":"Microsoft.DataMigration/sqlMigrationServices"},{"properties":{"provisioningState":"Succeeded","integrationRuntimeState":""},"location":"eastus2euap","id":"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/MadhuriRG/providers/Microsoft.DataMigration/sqlMigrationServices/MadhuriTestFactory2","name":"MadhuriTestFactory2","type":"Microsoft.DataMigration/sqlMigrationServices"},{"properties":{"provisioningState":"Failed","integrationRuntimeState":""},"location":"eastus2euap","id":"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/aaskhan/providers/Microsoft.DataMigration/sqlMigrationServices/aaskhan060821trial23","name":"aaskhan060821trial23","type":"Microsoft.DataMigration/sqlMigrationServices"},{"properties":{"provisioningState":"Succeeded","integrationRuntimeState":""},"location":"eastus2euap","id":"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/aasimtest10/providers/Microsoft.DataMigration/sqlMigrationServices/test2","name":"test2","type":"Microsoft.DataMigration/sqlMigrationServices"},{"properties":{"provisioningState":"Succeeded","integrationRuntimeState":""},"location":"eastus2euap","id":"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/CLIUnitTest/providers/Microsoft.DataMigration/sqlMigrationServices/sqlServiceUnitTest7SBLE","name":"sqlServiceUnitTest7SBLE","type":"Microsoft.DataMigration/sqlMigrationServices"},{"properties":{"provisioningState":"Succeeded","integrationRuntimeState":""},"location":"eastus2euap","id":"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/rackimtest/providers/Microsoft.DataMigration/sqlMigrationServices/test1","name":"test1","type":"Microsoft.DataMigration/sqlMigrationServices"},{"properties":{"provisioningState":"Succeeded","integrationRuntimeState":""},"location":"eastus2euap","id":"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/rackimtest2/providers/Microsoft.DataMigration/sqlMigrationServices/test1","name":"test1","type":"Microsoft.DataMigration/sqlMigrationServices"},{"properties":{"provisioningState":"Succeeded","integrationRuntimeState":""},"location":"eastus2euap","id":"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/aaskhan/providers/Microsoft.DataMigration/sqlMigrationServices/aaskhan","name":"aaskhan","type":"Microsoft.DataMigration/sqlMigrationServices"},{"properties":{"provisioningState":"Succeeded","integrationRuntimeState":""},"location":"eastus2euap","id":"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/test/providers/Microsoft.DataMigration/sqlMigrationServices/brih-ADMS-v2","name":"brih-ADMS-v2","type":"Microsoft.DataMigration/sqlMigrationServices"},{"properties":{"provisioningState":"Succeeded","integrationRuntimeState":""},"location":"eastus2euap","id":"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/MadhuriRG/providers/Microsoft.DataMigration/sqlMigrationServices/vmanhasADSMS","name":"vmanhasADSMS","type":"Microsoft.DataMigration/sqlMigrationServices"},{"properties":{"provisioningState":"Succeeded","integrationRuntimeState":""},"location":"eastus2euap","id":"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/aaskhan/providers/Microsoft.DataMigration/sqlMigrationServices/aasimtest412","name":"aasimtest412","type":"Microsoft.DataMigration/sqlMigrationServices"},{"properties":{"provisioningState":"Succeeded","integrationRuntimeState":""},"location":"eastus2euap","id":"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/migrationdemoads/providers/Microsoft.DataMigration/sqlMigrationServices/migrationdemodms2021","name":"migrationdemodms2021","type":"Microsoft.DataMigration/sqlMigrationServices"},{"properties":{"provisioningState":"Succeeded","integrationRuntimeState":""},"location":"eastus2euap","id":"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/rohitdhmi/providers/Microsoft.DataMigration/sqlMigrationServices/testservicecreation","name":"testservicecreation","type":"Microsoft.DataMigration/sqlMigrationServices"},{"properties":{"provisioningState":"Succeeded","integrationRuntimeState":""},"location":"eastus2euap","id":"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/tsum38RG/providers/Microsoft.DataMigration/sqlMigrationServices/dms20211030","name":"dms20211030","type":"Microsoft.DataMigration/sqlMigrationServices"},{"properties":{"provisioningState":"Succeeded","integrationRuntimeState":""},"location":"eastus2euap","id":"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/MadhuriRG/providers/Microsoft.DataMigration/sqlMigrationServices/vMS07","name":"vMS07","type":"Microsoft.DataMigration/sqlMigrationServices"},{"properties":{"provisioningState":"Failed","integrationRuntimeState":""},"location":"eastus2euap","id":"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/aasimTestVM_group/providers/Microsoft.DataMigration/sqlMigrationServices/at0608","name":"at0608","type":"Microsoft.DataMigration/sqlMigrationServices"},{"properties":{"provisioningState":"Succeeded","integrationRuntimeState":""},"location":"eastus2euap","id":"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/mohamedrg/providers/Microsoft.DataMigration/sqlMigrationServices/mohamedservice001","name":"mohamedservice001","type":"Microsoft.DataMigration/sqlMigrationServices"},{"properties":{"provisioningState":"Succeeded","integrationRuntimeState":""},"location":"eastus2euap","id":"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/madhurirg/providers/Microsoft.DataMigration/sqlMigrationServices/hijavaservice1","name":"hijavaservice1","type":"Microsoft.DataMigration/sqlMigrationServices"},{"properties":{"provisioningState":"Succeeded","integrationRuntimeState":""},"location":"eastus2euap","id":"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/aaskhan/providers/Microsoft.DataMigration/sqlMigrationServices/06101046","name":"06101046","type":"Microsoft.DataMigration/sqlMigrationServices"},{"properties":{"provisioningState":"Succeeded","integrationRuntimeState":""},"location":"eastus2euap","id":"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/aaskhan/providers/Microsoft.DataMigration/sqlMigrationServices/test123ggjugu","name":"test123ggjugu","type":"Microsoft.DataMigration/sqlMigrationServices"},{"properties":{"provisioningState":"Succeeded","integrationRuntimeState":""},"location":"eastus2euap","id":"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/brih-dms-v2/providers/Microsoft.DataMigration/sqlMigrationServices/brih-dms-v2-2","name":"brih-dms-v2-2","type":"Microsoft.DataMigration/sqlMigrationServices"},{"properties":{"provisioningState":"Succeeded","integrationRuntimeState":""},"location":"eastus2euap","id":"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/aaskhan/providers/Microsoft.DataMigration/sqlMigrationServices/aasimtestdms0505","name":"aasimtestdms0505","type":"Microsoft.DataMigration/sqlMigrationServices"},{"properties":{"provisioningState":"Succeeded","integrationRuntimeState":""},"location":"eastus2euap","id":"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/aaskhan/providers/Microsoft.DataMigration/sqlMigrationServices/aasimtestdms","name":"aasimtestdms","type":"Microsoft.DataMigration/sqlMigrationServices"},{"properties":{"provisioningState":"Failed","integrationRuntimeState":""},"location":"eastus2euap","id":"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/MadhuriRG/providers/Microsoft.DataMigration/sqlMigrationServices/myservice","name":"myservice","type":"Microsoft.DataMigration/sqlMigrationServices"},{"properties":{"provisioningState":"Succeeded","integrationRuntimeState":""},"location":"eastus2euap","id":"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/rackimtest2/providers/Microsoft.DataMigration/sqlMigrationServices/0901dms","name":"0901dms","type":"Microsoft.DataMigration/sqlMigrationServices"},{"properties":{"provisioningState":"Succeeded","integrationRuntimeState":""},"location":"eastus2euap","id":"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/MadhuriRG/providers/Microsoft.DataMigration/sqlMigrationServices/myservice2","name":"myservice2","type":"Microsoft.DataMigration/sqlMigrationServices"},{"properties":{"provisioningState":"Succeeded","integrationRuntimeState":""},"location":"eastus2euap","id":"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/hijavarg_canary/providers/Microsoft.DataMigration/sqlMigrationServices/hijavasep22-2","name":"hijavasep22-2","type":"Microsoft.DataMigration/sqlMigrationServices"},{"properties":{"provisioningState":"Succeeded","integrationRuntimeState":""},"location":"eastus2euap","id":"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/hijavarg_canary/providers/Microsoft.DataMigration/sqlMigrationServices/hijavajuly28","name":"hijavajuly28","type":"Microsoft.DataMigration/sqlMigrationServices"},{"properties":{"provisioningState":"Succeeded","integrationRuntimeState":""},"location":"eastus2euap","id":"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/tsum38RG/providers/Microsoft.DataMigration/sqlMigrationServices/MySqlMigrationService1","name":"MySqlMigrationService1","type":"Microsoft.DataMigration/sqlMigrationServices"},{"properties":{"provisioningState":"Succeeded","integrationRuntimeState":""},"location":"eastus2euap","id":"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/brih-dms-v2/providers/Microsoft.DataMigration/sqlMigrationServices/brih-dms-v2","name":"brih-dms-v2","type":"Microsoft.DataMigration/sqlMigrationServices"},{"properties":{"provisioningState":"Succeeded","integrationRuntimeState":""},"location":"eastus2euap","id":"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/CLIUnitTest/providers/Microsoft.DataMigration/sqlMigrationServices/dmsCliUnitTest","name":"dmsCliUnitTest","type":"Microsoft.DataMigration/sqlMigrationServices"},{"properties":{"provisioningState":"Succeeded","integrationRuntimeState":""},"location":"eastus2euap","id":"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/aaskhan/providers/Microsoft.DataMigration/sqlMigrationServices/aasimTest06102021","name":"aasimTest06102021","type":"Microsoft.DataMigration/sqlMigrationServices"},{"properties":{"provisioningState":"Failed","integrationRuntimeState":""},"location":"eastus2euap","id":"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/MadhuriRG/providers/Microsoft.DataMigration/sqlMigrationServices/TestFactory0107_1","name":"TestFactory0107_1","type":"Microsoft.DataMigration/sqlMigrationServices"},{"properties":{"provisioningState":"Succeeded","integrationRuntimeState":""},"location":"eastus2euap","id":"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/blakhani-ads/providers/Microsoft.DataMigration/sqlMigrationServices/blakhani-ads-ui","name":"blakhani-ads-ui","type":"Microsoft.DataMigration/sqlMigrationServices"},{"properties":{"provisioningState":"Failed","integrationRuntimeState":""},"location":"eastus2euap","id":"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/aasimTestVM_group/providers/Microsoft.DataMigration/sqlMigrationServices/at0608tt","name":"at0608tt","type":"Microsoft.DataMigration/sqlMigrationServices"},{"properties":{"provisioningState":"Succeeded","integrationRuntimeState":""},"location":"eastus2euap","id":"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/aaskhan/providers/Microsoft.DataMigration/sqlMigrationServices/aasim-dms-330-3","name":"aasim-dms-330-3","type":"Microsoft.DataMigration/sqlMigrationServices"},{"properties":{"provisioningState":"Succeeded","integrationRuntimeState":""},"location":"eastus2euap","id":"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/madhuriRG/providers/Microsoft.DataMigration/sqlMigrationServices/dms2021","name":"dms2021","type":"Microsoft.DataMigration/sqlMigrationServices"},{"properties":{"provisioningState":"Failed","integrationRuntimeState":""},"location":"eastus2euap","id":"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/aasimTestVM_group/providers/Microsoft.DataMigration/sqlMigrationServices/asdfasdfasdf","name":"asdfasdfasdf","type":"Microsoft.DataMigration/sqlMigrationServices"},{"properties":{"provisioningState":"Succeeded","integrationRuntimeState":""},"location":"eastus2euap","id":"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/yaly/providers/Microsoft.DataMigration/sqlMigrationServices/yalyservice1","name":"yalyservice1","type":"Microsoft.DataMigration/sqlMigrationServices"},{"properties":{"provisioningState":"Succeeded","integrationRuntimeState":""},"location":"eastus2euap","id":"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/aaskhan/providers/Microsoft.DataMigration/sqlMigrationServices/test123","name":"test123","type":"Microsoft.DataMigration/sqlMigrationServices"},{"properties":{"provisioningState":"Succeeded","integrationRuntimeState":""},"location":"eastus2euap","id":"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/tsum38RG/providers/Microsoft.DataMigration/sqlMigrationServices/trialTD","name":"trialTD","type":"Microsoft.DataMigration/sqlMigrationServices"},{"properties":{"provisioningState":"Succeeded","integrationRuntimeState":""},"location":"eastus2euap","id":"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/aaskhan/providers/Microsoft.DataMigration/sqlMigrationServices/aasim0610","name":"aasim0610","type":"Microsoft.DataMigration/sqlMigrationServices"},{"properties":{"provisioningState":"Succeeded","integrationRuntimeState":""},"location":"eastus2euap","id":"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/aasimtest10/providers/Microsoft.DataMigration/sqlMigrationServices/test454","name":"test454","type":"Microsoft.DataMigration/sqlMigrationServices"},{"properties":{"provisioningState":"Succeeded","integrationRuntimeState":""},"location":"eastus2euap","id":"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/aaskhan/providers/Microsoft.DataMigration/sqlMigrationServices/aasimbuttontest2","name":"aasimbuttontest2","type":"Microsoft.DataMigration/sqlMigrationServices"},{"properties":{"provisioningState":"Succeeded","integrationRuntimeState":""},"location":"eastus2euap","id":"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/aaskhan/providers/Microsoft.DataMigration/sqlMigrationServices/aasimtestbutton2","name":"aasimtestbutton2","type":"Microsoft.DataMigration/sqlMigrationServices"},{"properties":{"provisioningState":"Succeeded","integrationRuntimeState":""},"location":"eastus2euap","id":"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/MadhuriRG/providers/Microsoft.DataMigration/sqlMigrationServices/MyTestService","name":"MyTestService","type":"Microsoft.DataMigration/sqlMigrationServices"},{"properties":{"provisioningState":"Failed","integrationRuntimeState":""},"location":"eastus2euap","id":"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/tsum38RG/providers/Microsoft.DataMigration/sqlMigrationServices/trail-custom","name":"trail-custom","type":"Microsoft.DataMigration/sqlMigrationServices"},{"properties":{"provisioningState":"Succeeded","integrationRuntimeState":""},"location":"eastus2euap","id":"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/hijavarg_canary/providers/Microsoft.DataMigration/sqlMigrationServices/hijavasvccanary","name":"hijavasvccanary","type":"Microsoft.DataMigration/sqlMigrationServices"},{"properties":{"provisioningState":"Succeeded","integrationRuntimeState":""},"location":"eastus2euap","id":"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/aaskhan/providers/Microsoft.DataMigration/sqlMigrationServices/test124","name":"test124","type":"Microsoft.DataMigration/sqlMigrationServices"},{"properties":{"provisioningState":"Succeeded","integrationRuntimeState":""},"location":"eastus2euap","id":"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/aaskhan/providers/Microsoft.DataMigration/sqlMigrationServices/aasimtestbuttons","name":"aasimtestbuttons","type":"Microsoft.DataMigration/sqlMigrationServices"},{"properties":{"provisioningState":"Failed","integrationRuntimeState":""},"location":"eastus2euap","id":"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/aasimTestVM_group/providers/Microsoft.DataMigration/sqlMigrationServices/at0608ttf","name":"at0608ttf","type":"Microsoft.DataMigration/sqlMigrationServices"},{"properties":{"provisioningState":"Failed","integrationRuntimeState":""},"location":"eastus2euap","id":"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/aasimTestVM_group/providers/Microsoft.DataMigration/sqlMigrationServices/test123ds","name":"test123ds","type":"Microsoft.DataMigration/sqlMigrationServices"},{"properties":{"provisioningState":"Succeeded","integrationRuntimeState":""},"location":"eastus2euap","id":"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/hijavarg_canary/providers/Microsoft.DataMigration/sqlMigrationServices/hijavasep22-1","name":"hijavasep22-1","type":"Microsoft.DataMigration/sqlMigrationServices"},{"properties":{"provisioningState":"Succeeded","integrationRuntimeState":""},"location":"eastus2euap","id":"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/hijavarg_canary/providers/Microsoft.DataMigration/sqlMigrationServices/hijavasvc25may2","name":"hijavasvc25may2","type":"Microsoft.DataMigration/sqlMigrationServices"},{"properties":{"provisioningState":"Succeeded","integrationRuntimeState":""},"location":"eastus2euap","id":"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/yalyeastus2EUAP/providers/Microsoft.DataMigration/sqlMigrationServices/failovertest","name":"failovertest","type":"Microsoft.DataMigration/sqlMigrationServices"},{"properties":{"provisioningState":"Succeeded","integrationRuntimeState":""},"location":"eastus2euap","id":"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/brih-dms-v2/providers/Microsoft.DataMigration/sqlMigrationServices/kebarlet-dms","name":"kebarlet-dms","type":"Microsoft.DataMigration/sqlMigrationServices"},{"properties":{"provisioningState":"Succeeded","integrationRuntimeState":""},"location":"eastus2euap","id":"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/aaskhan/providers/Microsoft.DataMigration/sqlMigrationServices/aasim-test-06-10-2021","name":"aasim-test-06-10-2021","type":"Microsoft.DataMigration/sqlMigrationServices"},{"properties":{"provisioningState":"Succeeded","integrationRuntimeState":""},"location":"eastus2euap","id":"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/MadhuriRG/providers/Microsoft.DataMigration/sqlMigrationServices/factoryeuap","name":"factoryeuap","type":"Microsoft.DataMigration/sqlMigrationServices"},{"properties":{"provisioningState":"Succeeded","integrationRuntimeState":""},"location":"eastus2euap","id":"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/tsum38RG/providers/Microsoft.DataMigration/sqlMigrationServices/IR1","name":"IR1","type":"Microsoft.DataMigration/sqlMigrationServices"},{"properties":{"provisioningState":"Failed","integrationRuntimeState":""},"location":"eastus2euap","id":"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/aaskhan/providers/Microsoft.DataMigration/sqlMigrationServices/aasimTestDms060821trial2","name":"aasimTestDms060821trial2","type":"Microsoft.DataMigration/sqlMigrationServices"},{"properties":{"provisioningState":"Succeeded","integrationRuntimeState":""},"location":"eastus2euap","id":"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/aaskhan/providers/Microsoft.DataMigration/sqlMigrationServices/aasim-test0610","name":"aasim-test0610","type":"Microsoft.DataMigration/sqlMigrationServices"},{"properties":{"provisioningState":"Succeeded","integrationRuntimeState":""},"location":"eastus2euap","id":"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/aaskhan/providers/Microsoft.DataMigration/sqlMigrationServices/aaskhan-dms-0329","name":"aaskhan-dms-0329","type":"Microsoft.DataMigration/sqlMigrationServices"},{"properties":{"provisioningState":"Failed","integrationRuntimeState":""},"location":"eastus2euap","id":"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/yaly/providers/Microsoft.DataMigration/sqlMigrationServices/yalyservice3","name":"yalyservice3","type":"Microsoft.DataMigration/sqlMigrationServices"},{"properties":{"provisioningState":"Succeeded","integrationRuntimeState":""},"location":"centraluseuap","id":"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/central_us_euap_testing/providers/Microsoft.DataMigration/sqlMigrationServices/hijavacanary2svc1","name":"hijavacanary2svc1","type":"Microsoft.DataMigration/sqlMigrationServices"},{"properties":{"provisioningState":"Succeeded","integrationRuntimeState":""},"location":"koreasouth","id":"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/yalyKoreaSouth/providers/Microsoft.DataMigration/sqlMigrationServices/FailoverTest","name":"FailoverTest","type":"Microsoft.DataMigration/sqlMigrationServices"},{"properties":{"provisioningState":"Succeeded","integrationRuntimeState":""},"location":"swedensouth","id":"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/brih-dms-v2/providers/Microsoft.DataMigration/sqlMigrationServices/hijava-sweden-svc1","name":"hijava-sweden-svc1","type":"Microsoft.DataMigration/sqlMigrationServices"}]}' + headers: + cache-control: + - no-cache + content-length: + - '69255' + content-type: + - application/json; charset=utf-8 + date: + - Tue, 18 Jan 2022 12:22:04 GMT + expires: + - '-1' + pragma: + - no-cache + strict-transport-security: + - max-age=31536000; includeSubDomains + vary: + - Accept-Encoding + x-content-type-options: + - nosniff + x-ms-original-request-ids: + - 16ece97e-6938-4260-9b80-7f13e19a924d + - 4e2482ea-da3b-4c0e-944b-5e2db041bf20 + - fd22c1c8-4bb3-489b-94a5-3104748659d5 + - 12348367-7727-45d9-8f6e-87ac62e3fc5a + - e023c2a9-13cc-4996-98d8-4ab7520a9b68 + - 01f909d4-f8fe-4428-9bd7-d012dd6f83ae + - 26f79643-e909-49fb-aa1e-e7d119cd2318 + - c590de5b-60ce-47a6-98b5-c9979afc83b6 + - 724a81b9-0d02-4e47-b144-2cd615305336 + - 7981d5a4-c384-44a8-b1eb-44ae6cc0888f + - 46122513-36c7-489c-b7ec-cd9b412a14a0 + - b0bfcc4d-5dd1-4812-8926-2fc9c338891f + - d61554c8-c3c6-4e3e-84db-6e92d9ba737e + - 6f854a8c-625e-44e3-835b-06b16b195b5b + - 649caf64-d6a4-46da-b9a8-c164e9ee4069 + - d45cb482-c95d-4b44-8bba-bed802d82b63 + - 50fb543a-4ed7-427f-aa2b-54d4f0076af6 + - ab19eb6c-49f6-4e16-aff8-e9d23bde6b6d + - a0d10b61-0e92-4e91-86ad-b8cd007f7e4f + - 4b6e0454-c5bb-477d-8961-367bc7b6133c + - 281d3f77-cd91-42dd-8cc7-647eec5d5230 + - 13b7df81-c88c-42d8-9efd-9e707bdc1364 + - 1e59bac3-61c9-49c3-90d4-e29f2dc53ee2 + - 4e02e79a-2b42-48ab-a59b-c16686ed3bb7 + - cfd60385-93df-4c0f-831e-cf93be1440e0 + status: + code: 200 + message: OK +- request: + body: null + headers: + Accept: + - application/json + Accept-Encoding: + - gzip, deflate + CommandName: + - datamigration sql-service list-migration + Connection: + - keep-alive + ParameterSetName: + - --resource-group --name + User-Agent: + - AZURECLI/2.32.0 azsdk-python-mgmt-datamigration/1.0.0b1 Python/3.10.1 (Windows-10-10.0.22000-SP0) + method: GET + uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/CLIUnitTest/providers/Microsoft.DataMigration/sqlMigrationServices/dmsCliUnitTest/listMigrations?api-version=2021-10-30-preview + response: + body: + string: '{"value":[]}' + headers: + cache-control: + - no-cache + content-length: + - '12' + content-type: + - application/json; charset=utf-8 + date: + - Tue, 18 Jan 2022 12:22:05 GMT + expires: + - '-1' + pragma: + - no-cache + server: + - Microsoft-HTTPAPI/2.0 + strict-transport-security: + - max-age=31536000; includeSubDomains + transfer-encoding: + - chunked + vary: + - Accept-Encoding + x-content-type-options: + - nosniff + status: + code: 200 + message: OK +- request: + body: null + headers: + Accept: + - application/json + Accept-Encoding: + - gzip, deflate + CommandName: + - datamigration sql-service list-auth-key + Connection: + - keep-alive + Content-Length: + - '0' + ParameterSetName: + - --resource-group --name + User-Agent: + - AZURECLI/2.32.0 azsdk-python-mgmt-datamigration/1.0.0b1 Python/3.10.1 (Windows-10-10.0.22000-SP0) + method: POST + uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/CLIUnitTest/providers/Microsoft.DataMigration/sqlMigrationServices/dmsCliUnitTest/listAuthKeys?api-version=2021-10-30-preview + response: + body: + string: '{"authKey1":"IR@XXXXXXXXXX","authKey2":"IR@XXXXXXXXXX"}' + headers: + cache-control: + - no-cache + content-length: + - '243' + content-type: + - application/json; charset=utf-8 + date: + - Tue, 18 Jan 2022 12:22:06 GMT + expires: + - '-1' + pragma: + - no-cache + server: + - Microsoft-HTTPAPI/2.0 + strict-transport-security: + - max-age=31536000; includeSubDomains + transfer-encoding: + - chunked + vary: + - Accept-Encoding + x-content-type-options: + - nosniff + x-ms-ratelimit-remaining-subscription-writes: + - '1199' + status: + code: 200 + message: OK +- request: + body: '{"keyName": "authKey1"}' + headers: + Accept: + - application/json + Accept-Encoding: + - gzip, deflate + CommandName: + - datamigration sql-service regenerate-auth-key + Connection: + - keep-alive + Content-Length: + - '23' + Content-Type: + - application/json + ParameterSetName: + - --key-name --resource-group --name + User-Agent: + - AZURECLI/2.32.0 azsdk-python-mgmt-datamigration/1.0.0b1 Python/3.10.1 (Windows-10-10.0.22000-SP0) + method: POST + uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/CLIUnitTest/providers/Microsoft.DataMigration/sqlMigrationServices/dmsCliUnitTest/regenerateAuthKeys?api-version=2021-10-30-preview + response: + body: + string: '{"authKey1":"IR@XXXXXXXXXX"}' + headers: + cache-control: + - no-cache + content-length: + - '122' + content-type: + - application/json; charset=utf-8 + date: + - Tue, 18 Jan 2022 12:22:09 GMT + expires: + - '-1' + pragma: + - no-cache + server: + - Microsoft-HTTPAPI/2.0 + strict-transport-security: + - max-age=31536000; includeSubDomains + transfer-encoding: + - chunked + vary: + - Accept-Encoding + x-content-type-options: + - nosniff + x-ms-ratelimit-remaining-subscription-writes: + - '1199' + status: + code: 200 + message: OK +- request: + body: null + headers: + Accept: + - application/json + Accept-Encoding: + - gzip, deflate + CommandName: + - datamigration sql-service list-integration-runtime-metric + Connection: + - keep-alive + Content-Length: + - '0' + ParameterSetName: + - --resource-group --name + User-Agent: + - AZURECLI/2.32.0 azsdk-python-mgmt-datamigration/1.0.0b1 Python/3.10.1 (Windows-10-10.0.22000-SP0) + method: POST + uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/CLIUnitTest/providers/Microsoft.DataMigration/sqlMigrationServices/dmsCliUnitTest/listMonitoringData?api-version=2021-10-30-preview + response: + body: + string: '{"name":"default-ir","nodes":[]}' + headers: + cache-control: + - no-cache + content-length: + - '32' + content-type: + - application/json; charset=utf-8 + date: + - Tue, 18 Jan 2022 12:22:11 GMT + expires: + - '-1' + pragma: + - no-cache + server: + - Microsoft-HTTPAPI/2.0 + strict-transport-security: + - max-age=31536000; includeSubDomains + transfer-encoding: + - chunked + vary: + - Accept-Encoding + x-content-type-options: + - nosniff + x-ms-ratelimit-remaining-subscription-writes: + - '1199' + status: + code: 200 + message: OK +- request: + body: null + headers: + Accept: + - '*/*' + Accept-Encoding: + - gzip, deflate + CommandName: + - datamigration sql-service delete + Connection: + - keep-alive + Content-Length: + - '0' + ParameterSetName: + - -y --resource-group --name + User-Agent: + - AZURECLI/2.32.0 azsdk-python-mgmt-datamigration/1.0.0b1 Python/3.10.1 (Windows-10-10.0.22000-SP0) + method: DELETE + uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/CLIUnitTest/providers/Microsoft.DataMigration/sqlMigrationServices/sqlServiceUnitTest-Pipeline2?api-version=2021-10-30-preview + response: + body: + string: '' + headers: + azure-asyncoperation: + - https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/providers/Microsoft.DataMigration/locations/eastus2euap/operationTypes/deletesqlmigrationservice/operationResults/c3d681ba-415b-41e2-a014-51cc1236d370?api-version=2021-10-30-preview + cache-control: + - no-cache + content-length: + - '0' + date: + - Tue, 18 Jan 2022 12:22:14 GMT + expires: + - '-1' + location: + - https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/providers/Microsoft.DataMigration/locations/eastus2euap/sqlMigrationServiceOperationResults/c3d681ba-415b-41e2-a014-51cc1236d370?api-version=2021-10-30-preview + pragma: + - no-cache + server: + - Microsoft-HTTPAPI/2.0 + strict-transport-security: + - max-age=31536000; includeSubDomains + x-content-type-options: + - nosniff + x-ms-ratelimit-remaining-subscription-deletes: + - '14999' + status: + code: 202 + message: Accepted +- request: + body: null + headers: + Accept: + - '*/*' + Accept-Encoding: + - gzip, deflate + CommandName: + - datamigration sql-service delete + Connection: + - keep-alive + ParameterSetName: + - -y --resource-group --name + User-Agent: + - AZURECLI/2.32.0 azsdk-python-mgmt-datamigration/1.0.0b1 Python/3.10.1 (Windows-10-10.0.22000-SP0) + method: GET + uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/providers/Microsoft.DataMigration/locations/eastus2euap/operationTypes/deletesqlmigrationservice/operationResults/c3d681ba-415b-41e2-a014-51cc1236d370?api-version=2021-10-30-preview + response: + body: + string: '{"name":"c3d681ba-415b-41e2-a014-51cc1236d370","status":"Succeeded","startTime":"2022-01-18T12:22:13.963Z"}' + headers: + cache-control: + - no-cache + content-length: + - '107' + content-type: + - application/json; charset=utf-8 + date: + - Tue, 18 Jan 2022 12:22:29 GMT + expires: + - '-1' + pragma: + - no-cache + server: + - Microsoft-HTTPAPI/2.0 + strict-transport-security: + - max-age=31536000; includeSubDomains + transfer-encoding: + - chunked + vary: + - Accept-Encoding + x-content-type-options: + - nosniff + status: + code: 200 + message: OK +- request: + body: null + headers: + Accept: + - application/json + Accept-Encoding: + - gzip, deflate + CommandName: + - datamigration sql-managed-instance show + Connection: + - keep-alive + ParameterSetName: + - --managed-instance-name --resource-group --target-db-name + User-Agent: + - AZURECLI/2.32.0 azsdk-python-mgmt-datamigration/1.0.0b1 Python/3.10.1 (Windows-10-10.0.22000-SP0) + method: GET + uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/MigrationTesting/providers/Microsoft.Sql/managedInstances/migrationtestmi/providers/Microsoft.DataMigration/databaseMigrations/tsum-CLI-MIOnline?api-version=2021-10-30-preview + response: + body: + string: '{"properties":{"scope":"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/MigrationTesting/providers/Microsoft.Sql/managedInstances/migrationtestmi","provisioningState":"Succeeded","migrationStatus":"Succeeded","startedOn":"2021-12-30T06:16:43.983Z","endedOn":"2021-12-30T07:34:46.553Z","sourceDatabaseName":"AdventureWorks","migrationService":"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/tsum38RG/providers/Microsoft.DataMigration/sqlMigrationServices/IR1","migrationOperationId":"c20c73a6-9cf4-488e-b458-243b9eb43e24","kind":"SqlMi"},"id":"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/MigrationTesting/providers/Microsoft.Sql/managedInstances/migrationtestmi/providers/Microsoft.DataMigration/databaseMigrations/tsum-CLI-MIOnline","name":"tsum-CLI-MIOnline","type":"Microsoft.DataMigration/databaseMigrations"}' + headers: + cache-control: + - no-cache + content-length: + - '874' + content-type: + - application/json; charset=utf-8 + date: + - Tue, 18 Jan 2022 12:22:31 GMT + expires: + - '-1' + pragma: + - no-cache + server: + - Microsoft-HTTPAPI/2.0 + strict-transport-security: + - max-age=31536000; includeSubDomains + transfer-encoding: + - chunked + vary: + - Accept-Encoding + x-content-type-options: + - nosniff + status: + code: 200 + message: OK +- request: + body: null + headers: + Accept: + - application/json + Accept-Encoding: + - gzip, deflate + CommandName: + - datamigration sql-vm show + Connection: + - keep-alive + ParameterSetName: + - --resource-group --sql-vm-name --target-db-name + User-Agent: + - AZURECLI/2.32.0 azsdk-python-mgmt-datamigration/1.0.0b1 Python/3.10.1 (Windows-10-10.0.22000-SP0) + method: GET + uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/tsum38RG/providers/Microsoft.SqlVirtualMachine/sqlVirtualMachines/DMSCmdletTest-SqlVM/providers/Microsoft.DataMigration/databaseMigrations/tsum-Db-VM?api-version=2021-10-30-preview + response: + body: + string: '{"properties":{"scope":"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/tsum38RG/providers/Microsoft.SqlVirtualMachine/sqlVirtualMachines/DMSCmdletTest-SqlVM","provisioningState":"Succeeded","migrationStatus":"Succeeded","startedOn":"2021-12-28T17:31:36.843Z","endedOn":"2021-12-28T17:45:08.573Z","sourceDatabaseName":"AdventureWorks","migrationService":"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/tsum38RG/providers/Microsoft.DataMigration/sqlMigrationServices/IR1","migrationOperationId":"18aff4bb-892a-4c9a-bc31-49110101255d","kind":"SqlVm"},"id":"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/tsum38RG/providers/Microsoft.SqlVirtualMachine/sqlVirtualMachines/DMSCmdletTest-SqlVM/providers/Microsoft.DataMigration/databaseMigrations/tsum-Db-VM","name":"tsum-Db-VM","type":"Microsoft.DataMigration/databaseMigrations"}' + headers: + cache-control: + - no-cache + content-length: + - '884' + content-type: + - application/json; charset=utf-8 + date: + - Tue, 18 Jan 2022 12:22:32 GMT + expires: + - '-1' + pragma: + - no-cache + server: + - Microsoft-HTTPAPI/2.0 + strict-transport-security: + - max-age=31536000; includeSubDomains + transfer-encoding: + - chunked + vary: + - Accept-Encoding + x-content-type-options: + - nosniff + status: + code: 200 + message: OK +- request: + body: '{"properties": {"kind": "SqlMi", "scope": "/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/MigrationTesting/providers/Microsoft.Sql/managedInstances/migrationtestmi", + "sourceSqlConnection": {"dataSource": "AALAB03-2K8.REDMOND.CORP.MICROSOFT.COM", + "authentication": "SqlAuthentication", "userName": "hijavatestuser1", "password": + "XXXXXXXXXXXX"}, "sourceDatabaseName": "AdventureWorks", "migrationService": + "/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/tsum38RG/providers/Microsoft.DataMigration/SqlMigrationServices/sqlServiceUnitTest-Pipeline", + "backupConfiguration": {"sourceLocation": {"fileShare": {"path": "\\\\aalab03-2k8.redmond.corp.microsoft.com\\SharedBackup\\tsuman", + "username": "AALAB03-2K8\\hijavatestlocaluser", "password": "XXXXXXXXXXXX"}}, + "targetLocation": {"storageAccountResourceId": "/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/aaskhan/providers/Microsoft.Storage/storageAccounts/aasimmigrationtest", + "accountKey": "XXXXXXXXXXXX/XXXXXXXXXXXX"}}}}' + headers: + Accept: + - application/json + Accept-Encoding: + - gzip, deflate + CommandName: + - datamigration sql-managed-instance create + Connection: + - keep-alive + Content-Length: + - '1094' + Content-Type: + - application/json + ParameterSetName: + - --source-location --target-location --migration-service --scope --source-database-name + --source-sql-connection --target-db-name --resource-group --managed-instance-name + User-Agent: + - AZURECLI/2.32.0 azsdk-python-mgmt-datamigration/1.0.0b1 Python/3.10.1 (Windows-10-10.0.22000-SP0) + method: PUT + uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/MigrationTesting/providers/Microsoft.Sql/managedInstances/migrationtestmi/providers/Microsoft.DataMigration/databaseMigrations/tsum-Db-mi-online-fs9?api-version=2021-10-30-preview + response: + body: + string: '{"properties":{"scope":"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/MigrationTesting/providers/Microsoft.Sql/managedInstances/migrationtestmi","provisioningState":"Creating","sourceDatabaseName":"AdventureWorks","migrationService":"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/tsum38RG/providers/Microsoft.DataMigration/sqlMigrationServices/sqlServiceUnitTest-Pipeline","kind":"SqlMi"},"id":"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/MigrationTesting/providers/Microsoft.Sql/managedInstances/migrationtestmi/providers/Microsoft.DataMigration/databaseMigrations/tsum-Db-mi-online-fs9","name":"tsum-Db-mi-online-fs9","type":"Microsoft.DataMigration/databaseMigrations"}' + headers: + azure-asyncoperation: + - https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/providers/Microsoft.DataMigration/locations/eastus2euap/operationTypes/createsqlmimigration/operationResults/5b46960e-ecd2-4d4c-a45c-7358dd399d61?api-version=2021-10-30-preview + cache-control: + - no-cache + content-length: + - '737' + content-type: + - application/json; charset=utf-8 + date: + - Tue, 18 Jan 2022 12:22:35 GMT + expires: + - '-1' + pragma: + - no-cache + server: + - Microsoft-HTTPAPI/2.0 + strict-transport-security: + - max-age=31536000; includeSubDomains + x-content-type-options: + - nosniff + x-ms-ratelimit-remaining-subscription-writes: + - '1199' + status: + code: 201 + message: Created +- request: + body: null + headers: + Accept: + - '*/*' + Accept-Encoding: + - gzip, deflate + CommandName: + - datamigration sql-managed-instance create + Connection: + - keep-alive + ParameterSetName: + - --source-location --target-location --migration-service --scope --source-database-name + --source-sql-connection --target-db-name --resource-group --managed-instance-name + User-Agent: + - AZURECLI/2.32.0 azsdk-python-mgmt-datamigration/1.0.0b1 Python/3.10.1 (Windows-10-10.0.22000-SP0) + method: GET + uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/providers/Microsoft.DataMigration/locations/eastus2euap/operationTypes/createsqlmimigration/operationResults/5b46960e-ecd2-4d4c-a45c-7358dd399d61?api-version=2021-10-30-preview + response: + body: + string: '{"name":"5b46960e-ecd2-4d4c-a45c-7358dd399d61","status":"InProgress","startTime":"2022-01-18T12:22:34.747Z"}' + headers: + cache-control: + - no-cache + content-length: + - '108' + content-type: + - application/json; charset=utf-8 + date: + - Tue, 18 Jan 2022 12:22:51 GMT + expires: + - '-1' + pragma: + - no-cache + server: + - Microsoft-HTTPAPI/2.0 + strict-transport-security: + - max-age=31536000; includeSubDomains + transfer-encoding: + - chunked + vary: + - Accept-Encoding + x-content-type-options: + - nosniff + status: + code: 200 + message: OK +- request: + body: null + headers: + Accept: + - '*/*' + Accept-Encoding: + - gzip, deflate + CommandName: + - datamigration sql-managed-instance create + Connection: + - keep-alive + ParameterSetName: + - --source-location --target-location --migration-service --scope --source-database-name + --source-sql-connection --target-db-name --resource-group --managed-instance-name + User-Agent: + - AZURECLI/2.32.0 azsdk-python-mgmt-datamigration/1.0.0b1 Python/3.10.1 (Windows-10-10.0.22000-SP0) + method: GET + uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/providers/Microsoft.DataMigration/locations/eastus2euap/operationTypes/createsqlmimigration/operationResults/5b46960e-ecd2-4d4c-a45c-7358dd399d61?api-version=2021-10-30-preview + response: + body: + string: '{"name":"5b46960e-ecd2-4d4c-a45c-7358dd399d61","status":"Succeeded","startTime":"2022-01-18T12:22:34.747Z"}' + headers: + cache-control: + - no-cache + content-length: + - '107' + content-type: + - application/json; charset=utf-8 + date: + - Tue, 18 Jan 2022 12:23:06 GMT + expires: + - '-1' + pragma: + - no-cache + server: + - Microsoft-HTTPAPI/2.0 + strict-transport-security: + - max-age=31536000; includeSubDomains + transfer-encoding: + - chunked + vary: + - Accept-Encoding + x-content-type-options: + - nosniff + status: + code: 200 + message: OK +- request: + body: null + headers: + Accept: + - '*/*' + Accept-Encoding: + - gzip, deflate + CommandName: + - datamigration sql-managed-instance create + Connection: + - keep-alive + ParameterSetName: + - --source-location --target-location --migration-service --scope --source-database-name + --source-sql-connection --target-db-name --resource-group --managed-instance-name + User-Agent: + - AZURECLI/2.32.0 azsdk-python-mgmt-datamigration/1.0.0b1 Python/3.10.1 (Windows-10-10.0.22000-SP0) + method: GET + uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/MigrationTesting/providers/Microsoft.Sql/managedInstances/migrationtestmi/providers/Microsoft.DataMigration/databaseMigrations/tsum-Db-mi-online-fs9?api-version=2021-10-30-preview + response: + body: + string: '{"properties":{"scope":"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/MigrationTesting/providers/Microsoft.Sql/managedInstances/migrationtestmi","provisioningState":"Succeeded","migrationStatus":"InProgress","startedOn":"2022-01-18T12:23:00.387Z","sourceDatabaseName":"AdventureWorks","migrationService":"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/tsum38RG/providers/Microsoft.DataMigration/sqlMigrationServices/sqlServiceUnitTest-Pipeline","migrationOperationId":"5b1d7d1b-0e2c-4bd1-bb47-2b209791eccd","kind":"SqlMi"},"id":"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/MigrationTesting/providers/Microsoft.Sql/managedInstances/migrationtestmi/providers/Microsoft.DataMigration/databaseMigrations/tsum-Db-mi-online-fs9","name":"tsum-Db-mi-online-fs9","type":"Microsoft.DataMigration/databaseMigrations"}' + headers: + cache-control: + - no-cache + content-length: + - '870' + content-type: + - application/json; charset=utf-8 + date: + - Tue, 18 Jan 2022 12:23:06 GMT + expires: + - '-1' + pragma: + - no-cache + server: + - Microsoft-HTTPAPI/2.0 + strict-transport-security: + - max-age=31536000; includeSubDomains + transfer-encoding: + - chunked + vary: + - Accept-Encoding + x-content-type-options: + - nosniff + status: + code: 200 + message: OK +- request: + body: null + headers: + Accept: + - application/json + Accept-Encoding: + - gzip, deflate + CommandName: + - datamigration sql-managed-instance show + Connection: + - keep-alive + ParameterSetName: + - --managed-instance-name --resource-group --target-db-name --expand + User-Agent: + - AZURECLI/2.32.0 azsdk-python-mgmt-datamigration/1.0.0b1 Python/3.10.1 (Windows-10-10.0.22000-SP0) + method: GET + uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/MigrationTesting/providers/Microsoft.Sql/managedInstances/migrationtestmi/providers/Microsoft.DataMigration/databaseMigrations/tsum-Db-mi-online-fs9?$expand=MigrationStatusDetails&api-version=2021-10-30-preview + response: + body: + string: '{"properties":{"migrationStatusDetails":{"migrationState":"StartFullBackupUploadOperation","blobContainerName":"5b1d7d1b-0e2c-4bd1-bb47-2b209791eccd","pendingLogBackupsCount":0},"scope":"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/MigrationTesting/providers/Microsoft.Sql/managedInstances/migrationtestmi","provisioningState":"Succeeded","migrationStatus":"InProgress","startedOn":"2022-01-18T12:23:00.387Z","sourceDatabaseName":"AdventureWorks","migrationService":"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/tsum38RG/providers/Microsoft.DataMigration/sqlMigrationServices/sqlServiceUnitTest-Pipeline","migrationOperationId":"5b1d7d1b-0e2c-4bd1-bb47-2b209791eccd","kind":"SqlMi"},"id":"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/MigrationTesting/providers/Microsoft.Sql/managedInstances/migrationtestmi/providers/Microsoft.DataMigration/databaseMigrations/tsum-Db-mi-online-fs9","name":"tsum-Db-mi-online-fs9","type":"Microsoft.DataMigration/databaseMigrations"}' + headers: + cache-control: + - no-cache + content-length: + - '1033' + content-type: + - application/json; charset=utf-8 + date: + - Tue, 18 Jan 2022 12:23:07 GMT + expires: + - '-1' + pragma: + - no-cache + server: + - Microsoft-HTTPAPI/2.0 + strict-transport-security: + - max-age=31536000; includeSubDomains + transfer-encoding: + - chunked + vary: + - Accept-Encoding + x-content-type-options: + - nosniff + status: + code: 200 + message: OK +- request: + body: null + headers: + Accept: + - application/json + Accept-Encoding: + - gzip, deflate + CommandName: + - datamigration sql-managed-instance show + Connection: + - keep-alive + ParameterSetName: + - --managed-instance-name --resource-group --target-db-name --expand + User-Agent: + - AZURECLI/2.32.0 azsdk-python-mgmt-datamigration/1.0.0b1 Python/3.10.1 (Windows-10-10.0.22000-SP0) + method: GET + uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/MigrationTesting/providers/Microsoft.Sql/managedInstances/migrationtestmi/providers/Microsoft.DataMigration/databaseMigrations/tsum-Db-mi-online-fs9?$expand=MigrationStatusDetails&api-version=2021-10-30-preview + response: + body: + string: '{"properties":{"migrationStatusDetails":{"migrationState":"WaitForFullBackupUploadOperation","blobContainerName":"5b1d7d1b-0e2c-4bd1-bb47-2b209791eccd","pendingLogBackupsCount":0},"scope":"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/MigrationTesting/providers/Microsoft.Sql/managedInstances/migrationtestmi","provisioningState":"Succeeded","migrationStatus":"InProgress","startedOn":"2022-01-18T12:23:00.387Z","sourceDatabaseName":"AdventureWorks","migrationService":"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/tsum38RG/providers/Microsoft.DataMigration/sqlMigrationServices/sqlServiceUnitTest-Pipeline","migrationOperationId":"5b1d7d1b-0e2c-4bd1-bb47-2b209791eccd","kind":"SqlMi"},"id":"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/MigrationTesting/providers/Microsoft.Sql/managedInstances/migrationtestmi/providers/Microsoft.DataMigration/databaseMigrations/tsum-Db-mi-online-fs9","name":"tsum-Db-mi-online-fs9","type":"Microsoft.DataMigration/databaseMigrations"}' + headers: + cache-control: + - no-cache + content-length: + - '1035' + content-type: + - application/json; charset=utf-8 + date: + - Tue, 18 Jan 2022 12:23:19 GMT + expires: + - '-1' + pragma: + - no-cache + server: + - Microsoft-HTTPAPI/2.0 + strict-transport-security: + - max-age=31536000; includeSubDomains + transfer-encoding: + - chunked + vary: + - Accept-Encoding + x-content-type-options: + - nosniff + status: + code: 200 + message: OK +- request: + body: null + headers: + Accept: + - application/json + Accept-Encoding: + - gzip, deflate + CommandName: + - datamigration sql-managed-instance show + Connection: + - keep-alive + ParameterSetName: + - --managed-instance-name --resource-group --target-db-name --expand + User-Agent: + - AZURECLI/2.32.0 azsdk-python-mgmt-datamigration/1.0.0b1 Python/3.10.1 (Windows-10-10.0.22000-SP0) + method: GET + uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/MigrationTesting/providers/Microsoft.Sql/managedInstances/migrationtestmi/providers/Microsoft.DataMigration/databaseMigrations/tsum-Db-mi-online-fs9?$expand=MigrationStatusDetails&api-version=2021-10-30-preview + response: + body: + string: '{"properties":{"migrationStatusDetails":{"migrationState":"WaitForFullBackupUploadOperation","blobContainerName":"5b1d7d1b-0e2c-4bd1-bb47-2b209791eccd","pendingLogBackupsCount":0},"scope":"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/MigrationTesting/providers/Microsoft.Sql/managedInstances/migrationtestmi","provisioningState":"Succeeded","migrationStatus":"InProgress","startedOn":"2022-01-18T12:23:00.387Z","sourceDatabaseName":"AdventureWorks","migrationService":"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/tsum38RG/providers/Microsoft.DataMigration/sqlMigrationServices/sqlServiceUnitTest-Pipeline","migrationOperationId":"5b1d7d1b-0e2c-4bd1-bb47-2b209791eccd","kind":"SqlMi"},"id":"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/MigrationTesting/providers/Microsoft.Sql/managedInstances/migrationtestmi/providers/Microsoft.DataMigration/databaseMigrations/tsum-Db-mi-online-fs9","name":"tsum-Db-mi-online-fs9","type":"Microsoft.DataMigration/databaseMigrations"}' + headers: + cache-control: + - no-cache + content-length: + - '1035' + content-type: + - application/json; charset=utf-8 + date: + - Tue, 18 Jan 2022 12:23:31 GMT + expires: + - '-1' + pragma: + - no-cache + server: + - Microsoft-HTTPAPI/2.0 + strict-transport-security: + - max-age=31536000; includeSubDomains + transfer-encoding: + - chunked + vary: + - Accept-Encoding + x-content-type-options: + - nosniff + status: + code: 200 + message: OK +- request: + body: null + headers: + Accept: + - application/json + Accept-Encoding: + - gzip, deflate + CommandName: + - datamigration sql-managed-instance show + Connection: + - keep-alive + ParameterSetName: + - --managed-instance-name --resource-group --target-db-name --expand + User-Agent: + - AZURECLI/2.32.0 azsdk-python-mgmt-datamigration/1.0.0b1 Python/3.10.1 (Windows-10-10.0.22000-SP0) + method: GET + uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/MigrationTesting/providers/Microsoft.Sql/managedInstances/migrationtestmi/providers/Microsoft.DataMigration/databaseMigrations/tsum-Db-mi-online-fs9?$expand=MigrationStatusDetails&api-version=2021-10-30-preview + response: + body: + string: '{"properties":{"migrationStatusDetails":{"migrationState":"WaitForFullBackupUploadOperation","blobContainerName":"5b1d7d1b-0e2c-4bd1-bb47-2b209791eccd","pendingLogBackupsCount":0},"scope":"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/MigrationTesting/providers/Microsoft.Sql/managedInstances/migrationtestmi","provisioningState":"Succeeded","migrationStatus":"InProgress","startedOn":"2022-01-18T12:23:00.387Z","sourceDatabaseName":"AdventureWorks","migrationService":"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/tsum38RG/providers/Microsoft.DataMigration/sqlMigrationServices/sqlServiceUnitTest-Pipeline","migrationOperationId":"5b1d7d1b-0e2c-4bd1-bb47-2b209791eccd","kind":"SqlMi"},"id":"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/MigrationTesting/providers/Microsoft.Sql/managedInstances/migrationtestmi/providers/Microsoft.DataMigration/databaseMigrations/tsum-Db-mi-online-fs9","name":"tsum-Db-mi-online-fs9","type":"Microsoft.DataMigration/databaseMigrations"}' + headers: + cache-control: + - no-cache + content-length: + - '1035' + content-type: + - application/json; charset=utf-8 + date: + - Tue, 18 Jan 2022 12:23:42 GMT + expires: + - '-1' + pragma: + - no-cache + server: + - Microsoft-HTTPAPI/2.0 + strict-transport-security: + - max-age=31536000; includeSubDomains + transfer-encoding: + - chunked + vary: + - Accept-Encoding + x-content-type-options: + - nosniff + status: + code: 200 + message: OK +- request: + body: null + headers: + Accept: + - application/json + Accept-Encoding: + - gzip, deflate + CommandName: + - datamigration sql-managed-instance show + Connection: + - keep-alive + ParameterSetName: + - --managed-instance-name --resource-group --target-db-name --expand + User-Agent: + - AZURECLI/2.32.0 azsdk-python-mgmt-datamigration/1.0.0b1 Python/3.10.1 (Windows-10-10.0.22000-SP0) + method: GET + uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/MigrationTesting/providers/Microsoft.Sql/managedInstances/migrationtestmi/providers/Microsoft.DataMigration/databaseMigrations/tsum-Db-mi-online-fs9?$expand=MigrationStatusDetails&api-version=2021-10-30-preview + response: + body: + string: '{"properties":{"migrationStatusDetails":{"migrationState":"WaitForFullBackupUploadOperation","blobContainerName":"5b1d7d1b-0e2c-4bd1-bb47-2b209791eccd","pendingLogBackupsCount":0},"scope":"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/MigrationTesting/providers/Microsoft.Sql/managedInstances/migrationtestmi","provisioningState":"Succeeded","migrationStatus":"InProgress","startedOn":"2022-01-18T12:23:00.387Z","sourceDatabaseName":"AdventureWorks","migrationService":"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/tsum38RG/providers/Microsoft.DataMigration/sqlMigrationServices/sqlServiceUnitTest-Pipeline","migrationOperationId":"5b1d7d1b-0e2c-4bd1-bb47-2b209791eccd","kind":"SqlMi"},"id":"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/MigrationTesting/providers/Microsoft.Sql/managedInstances/migrationtestmi/providers/Microsoft.DataMigration/databaseMigrations/tsum-Db-mi-online-fs9","name":"tsum-Db-mi-online-fs9","type":"Microsoft.DataMigration/databaseMigrations"}' + headers: + cache-control: + - no-cache + content-length: + - '1035' + content-type: + - application/json; charset=utf-8 + date: + - Tue, 18 Jan 2022 12:23:54 GMT + expires: + - '-1' + pragma: + - no-cache + server: + - Microsoft-HTTPAPI/2.0 + strict-transport-security: + - max-age=31536000; includeSubDomains + transfer-encoding: + - chunked + vary: + - Accept-Encoding + x-content-type-options: + - nosniff + status: + code: 200 + message: OK +- request: + body: null + headers: + Accept: + - application/json + Accept-Encoding: + - gzip, deflate + CommandName: + - datamigration sql-managed-instance show + Connection: + - keep-alive + ParameterSetName: + - --managed-instance-name --resource-group --target-db-name --expand + User-Agent: + - AZURECLI/2.32.0 azsdk-python-mgmt-datamigration/1.0.0b1 Python/3.10.1 (Windows-10-10.0.22000-SP0) + method: GET + uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/MigrationTesting/providers/Microsoft.Sql/managedInstances/migrationtestmi/providers/Microsoft.DataMigration/databaseMigrations/tsum-Db-mi-online-fs9?$expand=MigrationStatusDetails&api-version=2021-10-30-preview + response: + body: + string: '{"properties":{"migrationStatusDetails":{"migrationState":"WaitForFullBackupUploadOperation","blobContainerName":"5b1d7d1b-0e2c-4bd1-bb47-2b209791eccd","pendingLogBackupsCount":0},"scope":"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/MigrationTesting/providers/Microsoft.Sql/managedInstances/migrationtestmi","provisioningState":"Succeeded","migrationStatus":"InProgress","startedOn":"2022-01-18T12:23:00.387Z","sourceDatabaseName":"AdventureWorks","migrationService":"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/tsum38RG/providers/Microsoft.DataMigration/sqlMigrationServices/sqlServiceUnitTest-Pipeline","migrationOperationId":"5b1d7d1b-0e2c-4bd1-bb47-2b209791eccd","kind":"SqlMi"},"id":"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/MigrationTesting/providers/Microsoft.Sql/managedInstances/migrationtestmi/providers/Microsoft.DataMigration/databaseMigrations/tsum-Db-mi-online-fs9","name":"tsum-Db-mi-online-fs9","type":"Microsoft.DataMigration/databaseMigrations"}' + headers: + cache-control: + - no-cache + content-length: + - '1035' + content-type: + - application/json; charset=utf-8 + date: + - Tue, 18 Jan 2022 12:24:06 GMT + expires: + - '-1' + pragma: + - no-cache + server: + - Microsoft-HTTPAPI/2.0 + strict-transport-security: + - max-age=31536000; includeSubDomains + transfer-encoding: + - chunked + vary: + - Accept-Encoding + x-content-type-options: + - nosniff + status: + code: 200 + message: OK +- request: + body: null + headers: + Accept: + - application/json + Accept-Encoding: + - gzip, deflate + CommandName: + - datamigration sql-managed-instance show + Connection: + - keep-alive + ParameterSetName: + - --managed-instance-name --resource-group --target-db-name --expand + User-Agent: + - AZURECLI/2.32.0 azsdk-python-mgmt-datamigration/1.0.0b1 Python/3.10.1 (Windows-10-10.0.22000-SP0) + method: GET + uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/MigrationTesting/providers/Microsoft.Sql/managedInstances/migrationtestmi/providers/Microsoft.DataMigration/databaseMigrations/tsum-Db-mi-online-fs9?$expand=MigrationStatusDetails&api-version=2021-10-30-preview + response: + body: + string: '{"properties":{"migrationStatusDetails":{"migrationState":"WaitForFullBackupUploadOperation","blobContainerName":"5b1d7d1b-0e2c-4bd1-bb47-2b209791eccd","pendingLogBackupsCount":0},"scope":"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/MigrationTesting/providers/Microsoft.Sql/managedInstances/migrationtestmi","provisioningState":"Succeeded","migrationStatus":"InProgress","startedOn":"2022-01-18T12:23:00.387Z","sourceDatabaseName":"AdventureWorks","migrationService":"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/tsum38RG/providers/Microsoft.DataMigration/sqlMigrationServices/sqlServiceUnitTest-Pipeline","migrationOperationId":"5b1d7d1b-0e2c-4bd1-bb47-2b209791eccd","kind":"SqlMi"},"id":"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/MigrationTesting/providers/Microsoft.Sql/managedInstances/migrationtestmi/providers/Microsoft.DataMigration/databaseMigrations/tsum-Db-mi-online-fs9","name":"tsum-Db-mi-online-fs9","type":"Microsoft.DataMigration/databaseMigrations"}' + headers: + cache-control: + - no-cache + content-length: + - '1035' + content-type: + - application/json; charset=utf-8 + date: + - Tue, 18 Jan 2022 12:24:18 GMT + expires: + - '-1' + pragma: + - no-cache + server: + - Microsoft-HTTPAPI/2.0 + strict-transport-security: + - max-age=31536000; includeSubDomains + transfer-encoding: + - chunked + vary: + - Accept-Encoding + x-content-type-options: + - nosniff + status: + code: 200 + message: OK +- request: + body: null + headers: + Accept: + - application/json + Accept-Encoding: + - gzip, deflate + CommandName: + - datamigration sql-managed-instance show + Connection: + - keep-alive + ParameterSetName: + - --managed-instance-name --resource-group --target-db-name --expand + User-Agent: + - AZURECLI/2.32.0 azsdk-python-mgmt-datamigration/1.0.0b1 Python/3.10.1 (Windows-10-10.0.22000-SP0) + method: GET + uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/MigrationTesting/providers/Microsoft.Sql/managedInstances/migrationtestmi/providers/Microsoft.DataMigration/databaseMigrations/tsum-Db-mi-online-fs9?$expand=MigrationStatusDetails&api-version=2021-10-30-preview + response: + body: + string: '{"properties":{"migrationStatusDetails":{"migrationState":"WaitForFullBackupUploadOperation","blobContainerName":"5b1d7d1b-0e2c-4bd1-bb47-2b209791eccd","pendingLogBackupsCount":0},"scope":"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/MigrationTesting/providers/Microsoft.Sql/managedInstances/migrationtestmi","provisioningState":"Succeeded","migrationStatus":"InProgress","startedOn":"2022-01-18T12:23:00.387Z","sourceDatabaseName":"AdventureWorks","migrationService":"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/tsum38RG/providers/Microsoft.DataMigration/sqlMigrationServices/sqlServiceUnitTest-Pipeline","migrationOperationId":"5b1d7d1b-0e2c-4bd1-bb47-2b209791eccd","kind":"SqlMi"},"id":"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/MigrationTesting/providers/Microsoft.Sql/managedInstances/migrationtestmi/providers/Microsoft.DataMigration/databaseMigrations/tsum-Db-mi-online-fs9","name":"tsum-Db-mi-online-fs9","type":"Microsoft.DataMigration/databaseMigrations"}' + headers: + cache-control: + - no-cache + content-length: + - '1035' + content-type: + - application/json; charset=utf-8 + date: + - Tue, 18 Jan 2022 12:24:31 GMT + expires: + - '-1' + pragma: + - no-cache + server: + - Microsoft-HTTPAPI/2.0 + strict-transport-security: + - max-age=31536000; includeSubDomains + transfer-encoding: + - chunked + vary: + - Accept-Encoding + x-content-type-options: + - nosniff + status: + code: 200 + message: OK +- request: + body: null + headers: + Accept: + - application/json + Accept-Encoding: + - gzip, deflate + CommandName: + - datamigration sql-managed-instance show + Connection: + - keep-alive + ParameterSetName: + - --managed-instance-name --resource-group --target-db-name --expand + User-Agent: + - AZURECLI/2.32.0 azsdk-python-mgmt-datamigration/1.0.0b1 Python/3.10.1 (Windows-10-10.0.22000-SP0) + method: GET + uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/MigrationTesting/providers/Microsoft.Sql/managedInstances/migrationtestmi/providers/Microsoft.DataMigration/databaseMigrations/tsum-Db-mi-online-fs9?$expand=MigrationStatusDetails&api-version=2021-10-30-preview + response: + body: + string: '{"properties":{"migrationStatusDetails":{"migrationState":"WaitForFullBackupUploadOperation","blobContainerName":"5b1d7d1b-0e2c-4bd1-bb47-2b209791eccd","pendingLogBackupsCount":0},"scope":"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/MigrationTesting/providers/Microsoft.Sql/managedInstances/migrationtestmi","provisioningState":"Succeeded","migrationStatus":"InProgress","startedOn":"2022-01-18T12:23:00.387Z","sourceDatabaseName":"AdventureWorks","migrationService":"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/tsum38RG/providers/Microsoft.DataMigration/sqlMigrationServices/sqlServiceUnitTest-Pipeline","migrationOperationId":"5b1d7d1b-0e2c-4bd1-bb47-2b209791eccd","kind":"SqlMi"},"id":"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/MigrationTesting/providers/Microsoft.Sql/managedInstances/migrationtestmi/providers/Microsoft.DataMigration/databaseMigrations/tsum-Db-mi-online-fs9","name":"tsum-Db-mi-online-fs9","type":"Microsoft.DataMigration/databaseMigrations"}' + headers: + cache-control: + - no-cache + content-length: + - '1035' + content-type: + - application/json; charset=utf-8 + date: + - Tue, 18 Jan 2022 12:24:42 GMT + expires: + - '-1' + pragma: + - no-cache + server: + - Microsoft-HTTPAPI/2.0 + strict-transport-security: + - max-age=31536000; includeSubDomains + transfer-encoding: + - chunked + vary: + - Accept-Encoding + x-content-type-options: + - nosniff + status: + code: 200 + message: OK +- request: + body: null + headers: + Accept: + - application/json + Accept-Encoding: + - gzip, deflate + CommandName: + - datamigration sql-managed-instance show + Connection: + - keep-alive + ParameterSetName: + - --managed-instance-name --resource-group --target-db-name --expand + User-Agent: + - AZURECLI/2.32.0 azsdk-python-mgmt-datamigration/1.0.0b1 Python/3.10.1 (Windows-10-10.0.22000-SP0) + method: GET + uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/MigrationTesting/providers/Microsoft.Sql/managedInstances/migrationtestmi/providers/Microsoft.DataMigration/databaseMigrations/tsum-Db-mi-online-fs9?$expand=MigrationStatusDetails&api-version=2021-10-30-preview + response: + body: + string: '{"properties":{"migrationStatusDetails":{"migrationState":"WaitForFullBackupUploadOperation","blobContainerName":"5b1d7d1b-0e2c-4bd1-bb47-2b209791eccd","pendingLogBackupsCount":0},"scope":"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/MigrationTesting/providers/Microsoft.Sql/managedInstances/migrationtestmi","provisioningState":"Succeeded","migrationStatus":"InProgress","startedOn":"2022-01-18T12:23:00.387Z","sourceDatabaseName":"AdventureWorks","migrationService":"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/tsum38RG/providers/Microsoft.DataMigration/sqlMigrationServices/sqlServiceUnitTest-Pipeline","migrationOperationId":"5b1d7d1b-0e2c-4bd1-bb47-2b209791eccd","kind":"SqlMi"},"id":"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/MigrationTesting/providers/Microsoft.Sql/managedInstances/migrationtestmi/providers/Microsoft.DataMigration/databaseMigrations/tsum-Db-mi-online-fs9","name":"tsum-Db-mi-online-fs9","type":"Microsoft.DataMigration/databaseMigrations"}' + headers: + cache-control: + - no-cache + content-length: + - '1035' + content-type: + - application/json; charset=utf-8 + date: + - Tue, 18 Jan 2022 12:24:55 GMT + expires: + - '-1' + pragma: + - no-cache + server: + - Microsoft-HTTPAPI/2.0 + strict-transport-security: + - max-age=31536000; includeSubDomains + transfer-encoding: + - chunked + vary: + - Accept-Encoding + x-content-type-options: + - nosniff + status: + code: 200 + message: OK +- request: + body: null + headers: + Accept: + - application/json + Accept-Encoding: + - gzip, deflate + CommandName: + - datamigration sql-managed-instance show + Connection: + - keep-alive + ParameterSetName: + - --managed-instance-name --resource-group --target-db-name --expand + User-Agent: + - AZURECLI/2.32.0 azsdk-python-mgmt-datamigration/1.0.0b1 Python/3.10.1 (Windows-10-10.0.22000-SP0) + method: GET + uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/MigrationTesting/providers/Microsoft.Sql/managedInstances/migrationtestmi/providers/Microsoft.DataMigration/databaseMigrations/tsum-Db-mi-online-fs9?$expand=MigrationStatusDetails&api-version=2021-10-30-preview + response: + body: + string: '{"properties":{"migrationStatusDetails":{"migrationState":"WaitForFullBackupUploadOperation","blobContainerName":"5b1d7d1b-0e2c-4bd1-bb47-2b209791eccd","pendingLogBackupsCount":0},"scope":"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/MigrationTesting/providers/Microsoft.Sql/managedInstances/migrationtestmi","provisioningState":"Succeeded","migrationStatus":"InProgress","startedOn":"2022-01-18T12:23:00.387Z","sourceDatabaseName":"AdventureWorks","migrationService":"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/tsum38RG/providers/Microsoft.DataMigration/sqlMigrationServices/sqlServiceUnitTest-Pipeline","migrationOperationId":"5b1d7d1b-0e2c-4bd1-bb47-2b209791eccd","kind":"SqlMi"},"id":"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/MigrationTesting/providers/Microsoft.Sql/managedInstances/migrationtestmi/providers/Microsoft.DataMigration/databaseMigrations/tsum-Db-mi-online-fs9","name":"tsum-Db-mi-online-fs9","type":"Microsoft.DataMigration/databaseMigrations"}' + headers: + cache-control: + - no-cache + content-length: + - '1035' + content-type: + - application/json; charset=utf-8 + date: + - Tue, 18 Jan 2022 12:25:07 GMT + expires: + - '-1' + pragma: + - no-cache + server: + - Microsoft-HTTPAPI/2.0 + strict-transport-security: + - max-age=31536000; includeSubDomains + transfer-encoding: + - chunked + vary: + - Accept-Encoding + x-content-type-options: + - nosniff + status: + code: 200 + message: OK +- request: + body: null + headers: + Accept: + - application/json + Accept-Encoding: + - gzip, deflate + CommandName: + - datamigration sql-managed-instance show + Connection: + - keep-alive + ParameterSetName: + - --managed-instance-name --resource-group --target-db-name --expand + User-Agent: + - AZURECLI/2.32.0 azsdk-python-mgmt-datamigration/1.0.0b1 Python/3.10.1 (Windows-10-10.0.22000-SP0) + method: GET + uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/MigrationTesting/providers/Microsoft.Sql/managedInstances/migrationtestmi/providers/Microsoft.DataMigration/databaseMigrations/tsum-Db-mi-online-fs9?$expand=MigrationStatusDetails&api-version=2021-10-30-preview + response: + body: + string: '{"properties":{"migrationStatusDetails":{"migrationState":"WaitForFullBackupUploadOperation","activeBackupSets":[{"backupSetId":"e6b60e53-c7b5-48dd-8f07-95f0caa66de1","firstLSN":"486000000145100000","lastLSN":"486000000145300000","backupType":"TransactionLog","listOfBackupFiles":[{"fileName":"AdventureWorksTransactionLog2.trn","status":"Arrived","totalSize":259584,"dataRead":0,"dataWritten":0,"copyThroughput":0.0,"copyDuration":0,"familySequenceNumber":1}],"backupStartDate":"2019-01-11T13:56:02Z","backupFinishDate":"2019-01-11T13:56:02Z","isBackupRestored":false,"hasBackupChecksums":true,"familyCount":1},{"backupSetId":"9fceb4b8-3864-45b6-bd35-998619297164","firstLSN":"486000000131000000","lastLSN":"486000000132600000","backupType":"Database","listOfBackupFiles":[{"fileName":"AdventureWorksFullBackup.bak","status":"Arrived","totalSize":63176192,"dataRead":0,"dataWritten":0,"copyThroughput":0.0,"copyDuration":0,"familySequenceNumber":1}],"backupStartDate":"2019-01-11T13:53:40Z","backupFinishDate":"2019-01-11T13:53:40Z","isBackupRestored":false,"hasBackupChecksums":true,"familyCount":1},{"backupSetId":"7bdfc66c-14d5-4acc-91d3-d9568cabc0e0","firstLSN":"486000000126400000","lastLSN":"486000000145100000","backupType":"TransactionLog","listOfBackupFiles":[{"fileName":"AdventureWorksTransactionLog1.trn","status":"Arrived","totalSize":325120,"dataRead":0,"dataWritten":0,"copyThroughput":0.0,"copyDuration":0,"familySequenceNumber":1}],"backupStartDate":"2019-01-11T13:55:21Z","backupFinishDate":"2019-01-11T13:55:21Z","isBackupRestored":false,"hasBackupChecksums":true,"familyCount":1}],"invalidFiles":["test + - Copy.txt","test.json","InvalidBackup %20+ `~1!2@3#4$5%6^7&8(9)0_-+=]}[{;'',, + ;+&[]~{}.txt"],"blobContainerName":"5b1d7d1b-0e2c-4bd1-bb47-2b209791eccd","pendingLogBackupsCount":2},"scope":"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/MigrationTesting/providers/Microsoft.Sql/managedInstances/migrationtestmi","provisioningState":"Succeeded","migrationStatus":"InProgress","startedOn":"2022-01-18T12:23:00.387Z","sourceDatabaseName":"AdventureWorks","migrationService":"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/tsum38RG/providers/Microsoft.DataMigration/sqlMigrationServices/sqlServiceUnitTest-Pipeline","migrationOperationId":"5b1d7d1b-0e2c-4bd1-bb47-2b209791eccd","kind":"SqlMi"},"id":"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/MigrationTesting/providers/Microsoft.Sql/managedInstances/migrationtestmi/providers/Microsoft.DataMigration/databaseMigrations/tsum-Db-mi-online-fs9","name":"tsum-Db-mi-online-fs9","type":"Microsoft.DataMigration/databaseMigrations"}' + headers: + cache-control: + - no-cache + content-length: + - '2661' + content-type: + - application/json; charset=utf-8 + date: + - Tue, 18 Jan 2022 12:25:20 GMT + expires: + - '-1' + pragma: + - no-cache + server: + - Microsoft-HTTPAPI/2.0 + strict-transport-security: + - max-age=31536000; includeSubDomains + transfer-encoding: + - chunked + vary: + - Accept-Encoding + x-content-type-options: + - nosniff + status: + code: 200 + message: OK +- request: + body: null + headers: + Accept: + - application/json + Accept-Encoding: + - gzip, deflate + CommandName: + - datamigration sql-managed-instance show + Connection: + - keep-alive + ParameterSetName: + - --managed-instance-name --resource-group --target-db-name --expand + User-Agent: + - AZURECLI/2.32.0 azsdk-python-mgmt-datamigration/1.0.0b1 Python/3.10.1 (Windows-10-10.0.22000-SP0) + method: GET + uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/MigrationTesting/providers/Microsoft.Sql/managedInstances/migrationtestmi/providers/Microsoft.DataMigration/databaseMigrations/tsum-Db-mi-online-fs9?$expand=MigrationStatusDetails&api-version=2021-10-30-preview + response: + body: + string: '{"properties":{"migrationStatusDetails":{"migrationState":"WaitForFullBackupUploadOperation","activeBackupSets":[{"backupSetId":"e6b60e53-c7b5-48dd-8f07-95f0caa66de1","firstLSN":"486000000145100000","lastLSN":"486000000145300000","backupType":"TransactionLog","listOfBackupFiles":[{"fileName":"AdventureWorksTransactionLog2.trn","status":"Arrived","totalSize":259584,"dataRead":0,"dataWritten":0,"copyThroughput":0.0,"copyDuration":0,"familySequenceNumber":1}],"backupStartDate":"2019-01-11T13:56:02Z","backupFinishDate":"2019-01-11T13:56:02Z","isBackupRestored":false,"hasBackupChecksums":true,"familyCount":1},{"backupSetId":"9fceb4b8-3864-45b6-bd35-998619297164","firstLSN":"486000000131000000","lastLSN":"486000000132600000","backupType":"Database","listOfBackupFiles":[{"fileName":"AdventureWorksFullBackup.bak","status":"Arrived","totalSize":63176192,"dataRead":0,"dataWritten":0,"copyThroughput":0.0,"copyDuration":0,"familySequenceNumber":1}],"backupStartDate":"2019-01-11T13:53:40Z","backupFinishDate":"2019-01-11T13:53:40Z","isBackupRestored":false,"hasBackupChecksums":true,"familyCount":1},{"backupSetId":"7bdfc66c-14d5-4acc-91d3-d9568cabc0e0","firstLSN":"486000000126400000","lastLSN":"486000000145100000","backupType":"TransactionLog","listOfBackupFiles":[{"fileName":"AdventureWorksTransactionLog1.trn","status":"Arrived","totalSize":325120,"dataRead":0,"dataWritten":0,"copyThroughput":0.0,"copyDuration":0,"familySequenceNumber":1}],"backupStartDate":"2019-01-11T13:55:21Z","backupFinishDate":"2019-01-11T13:55:21Z","isBackupRestored":false,"hasBackupChecksums":true,"familyCount":1}],"invalidFiles":["test + - Copy.txt","test.json","InvalidBackup %20+ `~1!2@3#4$5%6^7&8(9)0_-+=]}[{;'',, + ;+&[]~{}.txt"],"blobContainerName":"5b1d7d1b-0e2c-4bd1-bb47-2b209791eccd","pendingLogBackupsCount":2},"scope":"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/MigrationTesting/providers/Microsoft.Sql/managedInstances/migrationtestmi","provisioningState":"Succeeded","migrationStatus":"InProgress","startedOn":"2022-01-18T12:23:00.387Z","sourceDatabaseName":"AdventureWorks","migrationService":"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/tsum38RG/providers/Microsoft.DataMigration/sqlMigrationServices/sqlServiceUnitTest-Pipeline","migrationOperationId":"5b1d7d1b-0e2c-4bd1-bb47-2b209791eccd","kind":"SqlMi"},"id":"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/MigrationTesting/providers/Microsoft.Sql/managedInstances/migrationtestmi/providers/Microsoft.DataMigration/databaseMigrations/tsum-Db-mi-online-fs9","name":"tsum-Db-mi-online-fs9","type":"Microsoft.DataMigration/databaseMigrations"}' + headers: + cache-control: + - no-cache + content-length: + - '2661' + content-type: + - application/json; charset=utf-8 + date: + - Tue, 18 Jan 2022 12:25:32 GMT + expires: + - '-1' + pragma: + - no-cache + server: + - Microsoft-HTTPAPI/2.0 + strict-transport-security: + - max-age=31536000; includeSubDomains + transfer-encoding: + - chunked + vary: + - Accept-Encoding + x-content-type-options: + - nosniff + status: + code: 200 + message: OK +- request: + body: null + headers: + Accept: + - application/json + Accept-Encoding: + - gzip, deflate + CommandName: + - datamigration sql-managed-instance show + Connection: + - keep-alive + ParameterSetName: + - --managed-instance-name --resource-group --target-db-name --expand + User-Agent: + - AZURECLI/2.32.0 azsdk-python-mgmt-datamigration/1.0.0b1 Python/3.10.1 (Windows-10-10.0.22000-SP0) + method: GET + uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/MigrationTesting/providers/Microsoft.Sql/managedInstances/migrationtestmi/providers/Microsoft.DataMigration/databaseMigrations/tsum-Db-mi-online-fs9?$expand=MigrationStatusDetails&api-version=2021-10-30-preview + response: + body: + string: '{"properties":{"migrationStatusDetails":{"migrationState":"WaitForFullBackupUploadOperation","activeBackupSets":[{"backupSetId":"e6b60e53-c7b5-48dd-8f07-95f0caa66de1","firstLSN":"486000000145100000","lastLSN":"486000000145300000","backupType":"TransactionLog","listOfBackupFiles":[{"fileName":"AdventureWorksTransactionLog2.trn","status":"Arrived","totalSize":259584,"dataRead":0,"dataWritten":0,"copyThroughput":0.0,"copyDuration":0,"familySequenceNumber":1}],"backupStartDate":"2019-01-11T13:56:02Z","backupFinishDate":"2019-01-11T13:56:02Z","isBackupRestored":false,"hasBackupChecksums":true,"familyCount":1},{"backupSetId":"9fceb4b8-3864-45b6-bd35-998619297164","firstLSN":"486000000131000000","lastLSN":"486000000132600000","backupType":"Database","listOfBackupFiles":[{"fileName":"AdventureWorksFullBackup.bak","status":"Arrived","totalSize":63176192,"dataRead":0,"dataWritten":0,"copyThroughput":0.0,"copyDuration":0,"familySequenceNumber":1}],"backupStartDate":"2019-01-11T13:53:40Z","backupFinishDate":"2019-01-11T13:53:40Z","isBackupRestored":false,"hasBackupChecksums":true,"familyCount":1},{"backupSetId":"7bdfc66c-14d5-4acc-91d3-d9568cabc0e0","firstLSN":"486000000126400000","lastLSN":"486000000145100000","backupType":"TransactionLog","listOfBackupFiles":[{"fileName":"AdventureWorksTransactionLog1.trn","status":"Arrived","totalSize":325120,"dataRead":0,"dataWritten":0,"copyThroughput":0.0,"copyDuration":0,"familySequenceNumber":1}],"backupStartDate":"2019-01-11T13:55:21Z","backupFinishDate":"2019-01-11T13:55:21Z","isBackupRestored":false,"hasBackupChecksums":true,"familyCount":1}],"invalidFiles":["test + - Copy.txt","test.json","InvalidBackup %20+ `~1!2@3#4$5%6^7&8(9)0_-+=]}[{;'',, + ;+&[]~{}.txt"],"blobContainerName":"5b1d7d1b-0e2c-4bd1-bb47-2b209791eccd","pendingLogBackupsCount":2},"scope":"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/MigrationTesting/providers/Microsoft.Sql/managedInstances/migrationtestmi","provisioningState":"Succeeded","migrationStatus":"InProgress","startedOn":"2022-01-18T12:23:00.387Z","sourceDatabaseName":"AdventureWorks","migrationService":"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/tsum38RG/providers/Microsoft.DataMigration/sqlMigrationServices/sqlServiceUnitTest-Pipeline","migrationOperationId":"5b1d7d1b-0e2c-4bd1-bb47-2b209791eccd","kind":"SqlMi"},"id":"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/MigrationTesting/providers/Microsoft.Sql/managedInstances/migrationtestmi/providers/Microsoft.DataMigration/databaseMigrations/tsum-Db-mi-online-fs9","name":"tsum-Db-mi-online-fs9","type":"Microsoft.DataMigration/databaseMigrations"}' + headers: + cache-control: + - no-cache + content-length: + - '2661' + content-type: + - application/json; charset=utf-8 + date: + - Tue, 18 Jan 2022 12:25:43 GMT + expires: + - '-1' + pragma: + - no-cache + server: + - Microsoft-HTTPAPI/2.0 + strict-transport-security: + - max-age=31536000; includeSubDomains + transfer-encoding: + - chunked + vary: + - Accept-Encoding + x-content-type-options: + - nosniff + status: + code: 200 + message: OK +- request: + body: null + headers: + Accept: + - application/json + Accept-Encoding: + - gzip, deflate + CommandName: + - datamigration sql-managed-instance show + Connection: + - keep-alive + ParameterSetName: + - --managed-instance-name --resource-group --target-db-name --expand + User-Agent: + - AZURECLI/2.32.0 azsdk-python-mgmt-datamigration/1.0.0b1 Python/3.10.1 (Windows-10-10.0.22000-SP0) + method: GET + uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/MigrationTesting/providers/Microsoft.Sql/managedInstances/migrationtestmi/providers/Microsoft.DataMigration/databaseMigrations/tsum-Db-mi-online-fs9?$expand=MigrationStatusDetails&api-version=2021-10-30-preview + response: + body: + string: '{"properties":{"migrationStatusDetails":{"migrationState":"WaitForFullBackupUploadOperation","activeBackupSets":[{"backupSetId":"e6b60e53-c7b5-48dd-8f07-95f0caa66de1","firstLSN":"486000000145100000","lastLSN":"486000000145300000","backupType":"TransactionLog","listOfBackupFiles":[{"fileName":"AdventureWorksTransactionLog2.trn","status":"Arrived","totalSize":259584,"dataRead":0,"dataWritten":0,"copyThroughput":0.0,"copyDuration":0,"familySequenceNumber":1}],"backupStartDate":"2019-01-11T13:56:02Z","backupFinishDate":"2019-01-11T13:56:02Z","isBackupRestored":false,"hasBackupChecksums":true,"familyCount":1},{"backupSetId":"9fceb4b8-3864-45b6-bd35-998619297164","firstLSN":"486000000131000000","lastLSN":"486000000132600000","backupType":"Database","listOfBackupFiles":[{"fileName":"AdventureWorksFullBackup.bak","status":"Arrived","totalSize":63176192,"dataRead":0,"dataWritten":0,"copyThroughput":0.0,"copyDuration":0,"familySequenceNumber":1}],"backupStartDate":"2019-01-11T13:53:40Z","backupFinishDate":"2019-01-11T13:53:40Z","isBackupRestored":false,"hasBackupChecksums":true,"familyCount":1},{"backupSetId":"7bdfc66c-14d5-4acc-91d3-d9568cabc0e0","firstLSN":"486000000126400000","lastLSN":"486000000145100000","backupType":"TransactionLog","listOfBackupFiles":[{"fileName":"AdventureWorksTransactionLog1.trn","status":"Arrived","totalSize":325120,"dataRead":0,"dataWritten":0,"copyThroughput":0.0,"copyDuration":0,"familySequenceNumber":1}],"backupStartDate":"2019-01-11T13:55:21Z","backupFinishDate":"2019-01-11T13:55:21Z","isBackupRestored":false,"hasBackupChecksums":true,"familyCount":1}],"invalidFiles":["test + - Copy.txt","test.json","InvalidBackup %20+ `~1!2@3#4$5%6^7&8(9)0_-+=]}[{;'',, + ;+&[]~{}.txt"],"blobContainerName":"5b1d7d1b-0e2c-4bd1-bb47-2b209791eccd","pendingLogBackupsCount":2},"scope":"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/MigrationTesting/providers/Microsoft.Sql/managedInstances/migrationtestmi","provisioningState":"Succeeded","migrationStatus":"InProgress","startedOn":"2022-01-18T12:23:00.387Z","sourceDatabaseName":"AdventureWorks","migrationService":"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/tsum38RG/providers/Microsoft.DataMigration/sqlMigrationServices/sqlServiceUnitTest-Pipeline","migrationOperationId":"5b1d7d1b-0e2c-4bd1-bb47-2b209791eccd","kind":"SqlMi"},"id":"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/MigrationTesting/providers/Microsoft.Sql/managedInstances/migrationtestmi/providers/Microsoft.DataMigration/databaseMigrations/tsum-Db-mi-online-fs9","name":"tsum-Db-mi-online-fs9","type":"Microsoft.DataMigration/databaseMigrations"}' + headers: + cache-control: + - no-cache + content-length: + - '2661' + content-type: + - application/json; charset=utf-8 + date: + - Tue, 18 Jan 2022 12:25:55 GMT + expires: + - '-1' + pragma: + - no-cache + server: + - Microsoft-HTTPAPI/2.0 + strict-transport-security: + - max-age=31536000; includeSubDomains + transfer-encoding: + - chunked + vary: + - Accept-Encoding + x-content-type-options: + - nosniff + status: + code: 200 + message: OK +- request: + body: null + headers: + Accept: + - application/json + Accept-Encoding: + - gzip, deflate + CommandName: + - datamigration sql-managed-instance show + Connection: + - keep-alive + ParameterSetName: + - --managed-instance-name --resource-group --target-db-name --expand + User-Agent: + - AZURECLI/2.32.0 azsdk-python-mgmt-datamigration/1.0.0b1 Python/3.10.1 (Windows-10-10.0.22000-SP0) + method: GET + uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/MigrationTesting/providers/Microsoft.Sql/managedInstances/migrationtestmi/providers/Microsoft.DataMigration/databaseMigrations/tsum-Db-mi-online-fs9?$expand=MigrationStatusDetails&api-version=2021-10-30-preview + response: + body: + string: '{"properties":{"migrationStatusDetails":{"migrationState":"WaitForFullBackupUploadOperation","activeBackupSets":[{"backupSetId":"e6b60e53-c7b5-48dd-8f07-95f0caa66de1","firstLSN":"486000000145100000","lastLSN":"486000000145300000","backupType":"TransactionLog","listOfBackupFiles":[{"fileName":"AdventureWorksTransactionLog2.trn","status":"Arrived","totalSize":259584,"dataRead":0,"dataWritten":0,"copyThroughput":0.0,"copyDuration":0,"familySequenceNumber":1}],"backupStartDate":"2019-01-11T13:56:02Z","backupFinishDate":"2019-01-11T13:56:02Z","isBackupRestored":false,"hasBackupChecksums":true,"familyCount":1},{"backupSetId":"9fceb4b8-3864-45b6-bd35-998619297164","firstLSN":"486000000131000000","lastLSN":"486000000132600000","backupType":"Database","listOfBackupFiles":[{"fileName":"AdventureWorksFullBackup.bak","status":"Arrived","totalSize":63176192,"dataRead":0,"dataWritten":0,"copyThroughput":0.0,"copyDuration":0,"familySequenceNumber":1}],"backupStartDate":"2019-01-11T13:53:40Z","backupFinishDate":"2019-01-11T13:53:40Z","isBackupRestored":false,"hasBackupChecksums":true,"familyCount":1},{"backupSetId":"7bdfc66c-14d5-4acc-91d3-d9568cabc0e0","firstLSN":"486000000126400000","lastLSN":"486000000145100000","backupType":"TransactionLog","listOfBackupFiles":[{"fileName":"AdventureWorksTransactionLog1.trn","status":"Arrived","totalSize":325120,"dataRead":0,"dataWritten":0,"copyThroughput":0.0,"copyDuration":0,"familySequenceNumber":1}],"backupStartDate":"2019-01-11T13:55:21Z","backupFinishDate":"2019-01-11T13:55:21Z","isBackupRestored":false,"hasBackupChecksums":true,"familyCount":1}],"invalidFiles":["test + - Copy.txt","test.json","InvalidBackup %20+ `~1!2@3#4$5%6^7&8(9)0_-+=]}[{;'',, + ;+&[]~{}.txt"],"blobContainerName":"5b1d7d1b-0e2c-4bd1-bb47-2b209791eccd","pendingLogBackupsCount":2},"scope":"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/MigrationTesting/providers/Microsoft.Sql/managedInstances/migrationtestmi","provisioningState":"Succeeded","migrationStatus":"InProgress","startedOn":"2022-01-18T12:23:00.387Z","sourceDatabaseName":"AdventureWorks","migrationService":"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/tsum38RG/providers/Microsoft.DataMigration/sqlMigrationServices/sqlServiceUnitTest-Pipeline","migrationOperationId":"5b1d7d1b-0e2c-4bd1-bb47-2b209791eccd","kind":"SqlMi"},"id":"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/MigrationTesting/providers/Microsoft.Sql/managedInstances/migrationtestmi/providers/Microsoft.DataMigration/databaseMigrations/tsum-Db-mi-online-fs9","name":"tsum-Db-mi-online-fs9","type":"Microsoft.DataMigration/databaseMigrations"}' + headers: + cache-control: + - no-cache + content-length: + - '2661' + content-type: + - application/json; charset=utf-8 + date: + - Tue, 18 Jan 2022 12:26:07 GMT + expires: + - '-1' + pragma: + - no-cache + server: + - Microsoft-HTTPAPI/2.0 + strict-transport-security: + - max-age=31536000; includeSubDomains + transfer-encoding: + - chunked + vary: + - Accept-Encoding + x-content-type-options: + - nosniff + status: + code: 200 + message: OK +- request: + body: null + headers: + Accept: + - application/json + Accept-Encoding: + - gzip, deflate + CommandName: + - datamigration sql-managed-instance show + Connection: + - keep-alive + ParameterSetName: + - --managed-instance-name --resource-group --target-db-name --expand + User-Agent: + - AZURECLI/2.32.0 azsdk-python-mgmt-datamigration/1.0.0b1 Python/3.10.1 (Windows-10-10.0.22000-SP0) + method: GET + uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/MigrationTesting/providers/Microsoft.Sql/managedInstances/migrationtestmi/providers/Microsoft.DataMigration/databaseMigrations/tsum-Db-mi-online-fs9?$expand=MigrationStatusDetails&api-version=2021-10-30-preview + response: + body: + string: '{"properties":{"migrationStatusDetails":{"migrationState":"WaitForFullBackupUploadOperation","fullBackupSetInfo":{"backupSetId":"9fceb4b8-3864-45b6-bd35-998619297164","firstLSN":"486000000131000000","lastLSN":"486000000132600000","backupType":"Database","listOfBackupFiles":[{"fileName":"AdventureWorksFullBackup.bak","status":"Uploading","totalSize":63176192,"dataRead":0,"dataWritten":0,"copyThroughput":0.0,"copyDuration":58,"familySequenceNumber":1}],"backupStartDate":"2019-01-11T13:53:40Z","backupFinishDate":"2019-01-11T13:53:40Z","isBackupRestored":false,"hasBackupChecksums":true,"familyCount":1},"activeBackupSets":[{"backupSetId":"e6b60e53-c7b5-48dd-8f07-95f0caa66de1","firstLSN":"486000000145100000","lastLSN":"486000000145300000","backupType":"TransactionLog","listOfBackupFiles":[{"fileName":"AdventureWorksTransactionLog2.trn","status":"Arrived","totalSize":259584,"dataRead":0,"dataWritten":0,"copyThroughput":0.0,"copyDuration":0,"familySequenceNumber":1}],"backupStartDate":"2019-01-11T13:56:02Z","backupFinishDate":"2019-01-11T13:56:02Z","isBackupRestored":false,"hasBackupChecksums":true,"familyCount":1},{"backupSetId":"9fceb4b8-3864-45b6-bd35-998619297164","firstLSN":"486000000131000000","lastLSN":"486000000132600000","backupType":"Database","listOfBackupFiles":[{"fileName":"AdventureWorksFullBackup.bak","status":"Uploading","totalSize":63176192,"dataRead":0,"dataWritten":0,"copyThroughput":0.0,"copyDuration":58,"familySequenceNumber":1}],"backupStartDate":"2019-01-11T13:53:40Z","backupFinishDate":"2019-01-11T13:53:40Z","isBackupRestored":false,"hasBackupChecksums":true,"familyCount":1},{"backupSetId":"7bdfc66c-14d5-4acc-91d3-d9568cabc0e0","firstLSN":"486000000126400000","lastLSN":"486000000145100000","backupType":"TransactionLog","listOfBackupFiles":[{"fileName":"AdventureWorksTransactionLog1.trn","status":"Arrived","totalSize":325120,"dataRead":0,"dataWritten":0,"copyThroughput":0.0,"copyDuration":0,"familySequenceNumber":1}],"backupStartDate":"2019-01-11T13:55:21Z","backupFinishDate":"2019-01-11T13:55:21Z","isBackupRestored":false,"hasBackupChecksums":true,"familyCount":1}],"invalidFiles":["test + - Copy.txt","test.json","InvalidBackup %20+ `~1!2@3#4$5%6^7&8(9)0_-+=]}[{;'',, + ;+&[]~{}.txt"],"blobContainerName":"5b1d7d1b-0e2c-4bd1-bb47-2b209791eccd","isFullBackupRestored":false,"pendingLogBackupsCount":2},"scope":"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/MigrationTesting/providers/Microsoft.Sql/managedInstances/migrationtestmi","provisioningState":"Succeeded","migrationStatus":"InProgress","startedOn":"2022-01-18T12:23:00.387Z","sourceDatabaseName":"AdventureWorks","migrationService":"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/tsum38RG/providers/Microsoft.DataMigration/sqlMigrationServices/sqlServiceUnitTest-Pipeline","migrationOperationId":"5b1d7d1b-0e2c-4bd1-bb47-2b209791eccd","kind":"SqlMi"},"id":"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/MigrationTesting/providers/Microsoft.Sql/managedInstances/migrationtestmi/providers/Microsoft.DataMigration/databaseMigrations/tsum-Db-mi-online-fs9","name":"tsum-Db-mi-online-fs9","type":"Microsoft.DataMigration/databaseMigrations"}' + headers: + cache-control: + - no-cache + content-length: + - '3206' + content-type: + - application/json; charset=utf-8 + date: + - Tue, 18 Jan 2022 12:26:18 GMT + expires: + - '-1' + pragma: + - no-cache + server: + - Microsoft-HTTPAPI/2.0 + strict-transport-security: + - max-age=31536000; includeSubDomains + transfer-encoding: + - chunked + vary: + - Accept-Encoding + x-content-type-options: + - nosniff + status: + code: 200 + message: OK +- request: + body: null + headers: + Accept: + - application/json + Accept-Encoding: + - gzip, deflate + CommandName: + - datamigration sql-managed-instance show + Connection: + - keep-alive + ParameterSetName: + - --managed-instance-name --resource-group --target-db-name --expand + User-Agent: + - AZURECLI/2.32.0 azsdk-python-mgmt-datamigration/1.0.0b1 Python/3.10.1 (Windows-10-10.0.22000-SP0) + method: GET + uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/MigrationTesting/providers/Microsoft.Sql/managedInstances/migrationtestmi/providers/Microsoft.DataMigration/databaseMigrations/tsum-Db-mi-online-fs9?$expand=MigrationStatusDetails&api-version=2021-10-30-preview + response: + body: + string: '{"properties":{"migrationStatusDetails":{"migrationState":"WaitForFullBackupUploadOperation","fullBackupSetInfo":{"backupSetId":"9fceb4b8-3864-45b6-bd35-998619297164","firstLSN":"486000000131000000","lastLSN":"486000000132600000","backupType":"Database","listOfBackupFiles":[{"fileName":"AdventureWorksFullBackup.bak","status":"Uploading","totalSize":63176192,"dataRead":0,"dataWritten":0,"copyThroughput":0.0,"copyDuration":58,"familySequenceNumber":1}],"backupStartDate":"2019-01-11T13:53:40Z","backupFinishDate":"2019-01-11T13:53:40Z","isBackupRestored":false,"hasBackupChecksums":true,"familyCount":1},"activeBackupSets":[{"backupSetId":"e6b60e53-c7b5-48dd-8f07-95f0caa66de1","firstLSN":"486000000145100000","lastLSN":"486000000145300000","backupType":"TransactionLog","listOfBackupFiles":[{"fileName":"AdventureWorksTransactionLog2.trn","status":"Arrived","totalSize":259584,"dataRead":0,"dataWritten":0,"copyThroughput":0.0,"copyDuration":0,"familySequenceNumber":1}],"backupStartDate":"2019-01-11T13:56:02Z","backupFinishDate":"2019-01-11T13:56:02Z","isBackupRestored":false,"hasBackupChecksums":true,"familyCount":1},{"backupSetId":"9fceb4b8-3864-45b6-bd35-998619297164","firstLSN":"486000000131000000","lastLSN":"486000000132600000","backupType":"Database","listOfBackupFiles":[{"fileName":"AdventureWorksFullBackup.bak","status":"Uploading","totalSize":63176192,"dataRead":0,"dataWritten":0,"copyThroughput":0.0,"copyDuration":58,"familySequenceNumber":1}],"backupStartDate":"2019-01-11T13:53:40Z","backupFinishDate":"2019-01-11T13:53:40Z","isBackupRestored":false,"hasBackupChecksums":true,"familyCount":1},{"backupSetId":"7bdfc66c-14d5-4acc-91d3-d9568cabc0e0","firstLSN":"486000000126400000","lastLSN":"486000000145100000","backupType":"TransactionLog","listOfBackupFiles":[{"fileName":"AdventureWorksTransactionLog1.trn","status":"Arrived","totalSize":325120,"dataRead":0,"dataWritten":0,"copyThroughput":0.0,"copyDuration":0,"familySequenceNumber":1}],"backupStartDate":"2019-01-11T13:55:21Z","backupFinishDate":"2019-01-11T13:55:21Z","isBackupRestored":false,"hasBackupChecksums":true,"familyCount":1}],"invalidFiles":["test + - Copy.txt","test.json","InvalidBackup %20+ `~1!2@3#4$5%6^7&8(9)0_-+=]}[{;'',, + ;+&[]~{}.txt"],"blobContainerName":"5b1d7d1b-0e2c-4bd1-bb47-2b209791eccd","isFullBackupRestored":false,"pendingLogBackupsCount":2},"scope":"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/MigrationTesting/providers/Microsoft.Sql/managedInstances/migrationtestmi","provisioningState":"Succeeded","migrationStatus":"InProgress","startedOn":"2022-01-18T12:23:00.387Z","sourceDatabaseName":"AdventureWorks","migrationService":"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/tsum38RG/providers/Microsoft.DataMigration/sqlMigrationServices/sqlServiceUnitTest-Pipeline","migrationOperationId":"5b1d7d1b-0e2c-4bd1-bb47-2b209791eccd","kind":"SqlMi"},"id":"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/MigrationTesting/providers/Microsoft.Sql/managedInstances/migrationtestmi/providers/Microsoft.DataMigration/databaseMigrations/tsum-Db-mi-online-fs9","name":"tsum-Db-mi-online-fs9","type":"Microsoft.DataMigration/databaseMigrations"}' + headers: + cache-control: + - no-cache + content-length: + - '3206' + content-type: + - application/json; charset=utf-8 + date: + - Tue, 18 Jan 2022 12:26:30 GMT + expires: + - '-1' + pragma: + - no-cache + server: + - Microsoft-HTTPAPI/2.0 + strict-transport-security: + - max-age=31536000; includeSubDomains + transfer-encoding: + - chunked + vary: + - Accept-Encoding + x-content-type-options: + - nosniff + status: + code: 200 + message: OK +- request: + body: null + headers: + Accept: + - application/json + Accept-Encoding: + - gzip, deflate + CommandName: + - datamigration sql-managed-instance show + Connection: + - keep-alive + ParameterSetName: + - --managed-instance-name --resource-group --target-db-name --expand + User-Agent: + - AZURECLI/2.32.0 azsdk-python-mgmt-datamigration/1.0.0b1 Python/3.10.1 (Windows-10-10.0.22000-SP0) + method: GET + uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/MigrationTesting/providers/Microsoft.Sql/managedInstances/migrationtestmi/providers/Microsoft.DataMigration/databaseMigrations/tsum-Db-mi-online-fs9?$expand=MigrationStatusDetails&api-version=2021-10-30-preview + response: + body: + string: '{"properties":{"migrationStatusDetails":{"migrationState":"WaitForFullBackupUploadOperation","fullBackupSetInfo":{"backupSetId":"9fceb4b8-3864-45b6-bd35-998619297164","firstLSN":"486000000131000000","lastLSN":"486000000132600000","backupType":"Database","listOfBackupFiles":[{"fileName":"AdventureWorksFullBackup.bak","status":"Uploading","totalSize":63176192,"dataRead":0,"dataWritten":0,"copyThroughput":0.0,"copyDuration":58,"familySequenceNumber":1}],"backupStartDate":"2019-01-11T13:53:40Z","backupFinishDate":"2019-01-11T13:53:40Z","isBackupRestored":false,"hasBackupChecksums":true,"familyCount":1},"activeBackupSets":[{"backupSetId":"e6b60e53-c7b5-48dd-8f07-95f0caa66de1","firstLSN":"486000000145100000","lastLSN":"486000000145300000","backupType":"TransactionLog","listOfBackupFiles":[{"fileName":"AdventureWorksTransactionLog2.trn","status":"Arrived","totalSize":259584,"dataRead":0,"dataWritten":0,"copyThroughput":0.0,"copyDuration":0,"familySequenceNumber":1}],"backupStartDate":"2019-01-11T13:56:02Z","backupFinishDate":"2019-01-11T13:56:02Z","isBackupRestored":false,"hasBackupChecksums":true,"familyCount":1},{"backupSetId":"9fceb4b8-3864-45b6-bd35-998619297164","firstLSN":"486000000131000000","lastLSN":"486000000132600000","backupType":"Database","listOfBackupFiles":[{"fileName":"AdventureWorksFullBackup.bak","status":"Uploading","totalSize":63176192,"dataRead":0,"dataWritten":0,"copyThroughput":0.0,"copyDuration":58,"familySequenceNumber":1}],"backupStartDate":"2019-01-11T13:53:40Z","backupFinishDate":"2019-01-11T13:53:40Z","isBackupRestored":false,"hasBackupChecksums":true,"familyCount":1},{"backupSetId":"7bdfc66c-14d5-4acc-91d3-d9568cabc0e0","firstLSN":"486000000126400000","lastLSN":"486000000145100000","backupType":"TransactionLog","listOfBackupFiles":[{"fileName":"AdventureWorksTransactionLog1.trn","status":"Arrived","totalSize":325120,"dataRead":0,"dataWritten":0,"copyThroughput":0.0,"copyDuration":0,"familySequenceNumber":1}],"backupStartDate":"2019-01-11T13:55:21Z","backupFinishDate":"2019-01-11T13:55:21Z","isBackupRestored":false,"hasBackupChecksums":true,"familyCount":1}],"invalidFiles":["test + - Copy.txt","test.json","InvalidBackup %20+ `~1!2@3#4$5%6^7&8(9)0_-+=]}[{;'',, + ;+&[]~{}.txt"],"blobContainerName":"5b1d7d1b-0e2c-4bd1-bb47-2b209791eccd","isFullBackupRestored":false,"pendingLogBackupsCount":2},"scope":"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/MigrationTesting/providers/Microsoft.Sql/managedInstances/migrationtestmi","provisioningState":"Succeeded","migrationStatus":"InProgress","startedOn":"2022-01-18T12:23:00.387Z","sourceDatabaseName":"AdventureWorks","migrationService":"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/tsum38RG/providers/Microsoft.DataMigration/sqlMigrationServices/sqlServiceUnitTest-Pipeline","migrationOperationId":"5b1d7d1b-0e2c-4bd1-bb47-2b209791eccd","kind":"SqlMi"},"id":"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/MigrationTesting/providers/Microsoft.Sql/managedInstances/migrationtestmi/providers/Microsoft.DataMigration/databaseMigrations/tsum-Db-mi-online-fs9","name":"tsum-Db-mi-online-fs9","type":"Microsoft.DataMigration/databaseMigrations"}' + headers: + cache-control: + - no-cache + content-length: + - '3206' + content-type: + - application/json; charset=utf-8 + date: + - Tue, 18 Jan 2022 12:26:41 GMT + expires: + - '-1' + pragma: + - no-cache + server: + - Microsoft-HTTPAPI/2.0 + strict-transport-security: + - max-age=31536000; includeSubDomains + transfer-encoding: + - chunked + vary: + - Accept-Encoding + x-content-type-options: + - nosniff + status: + code: 200 + message: OK +- request: + body: null + headers: + Accept: + - application/json + Accept-Encoding: + - gzip, deflate + CommandName: + - datamigration sql-managed-instance show + Connection: + - keep-alive + ParameterSetName: + - --managed-instance-name --resource-group --target-db-name --expand + User-Agent: + - AZURECLI/2.32.0 azsdk-python-mgmt-datamigration/1.0.0b1 Python/3.10.1 (Windows-10-10.0.22000-SP0) + method: GET + uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/MigrationTesting/providers/Microsoft.Sql/managedInstances/migrationtestmi/providers/Microsoft.DataMigration/databaseMigrations/tsum-Db-mi-online-fs9?$expand=MigrationStatusDetails&api-version=2021-10-30-preview + response: + body: + string: '{"properties":{"migrationStatusDetails":{"migrationState":"WaitForFullBackupUploadOperation","fullBackupSetInfo":{"backupSetId":"9fceb4b8-3864-45b6-bd35-998619297164","firstLSN":"486000000131000000","lastLSN":"486000000132600000","backupType":"Database","listOfBackupFiles":[{"fileName":"AdventureWorksFullBackup.bak","status":"Uploading","totalSize":63176192,"dataRead":0,"dataWritten":0,"copyThroughput":0.0,"copyDuration":58,"familySequenceNumber":1}],"backupStartDate":"2019-01-11T13:53:40Z","backupFinishDate":"2019-01-11T13:53:40Z","isBackupRestored":false,"hasBackupChecksums":true,"familyCount":1},"activeBackupSets":[{"backupSetId":"e6b60e53-c7b5-48dd-8f07-95f0caa66de1","firstLSN":"486000000145100000","lastLSN":"486000000145300000","backupType":"TransactionLog","listOfBackupFiles":[{"fileName":"AdventureWorksTransactionLog2.trn","status":"Arrived","totalSize":259584,"dataRead":0,"dataWritten":0,"copyThroughput":0.0,"copyDuration":0,"familySequenceNumber":1}],"backupStartDate":"2019-01-11T13:56:02Z","backupFinishDate":"2019-01-11T13:56:02Z","isBackupRestored":false,"hasBackupChecksums":true,"familyCount":1},{"backupSetId":"9fceb4b8-3864-45b6-bd35-998619297164","firstLSN":"486000000131000000","lastLSN":"486000000132600000","backupType":"Database","listOfBackupFiles":[{"fileName":"AdventureWorksFullBackup.bak","status":"Uploading","totalSize":63176192,"dataRead":0,"dataWritten":0,"copyThroughput":0.0,"copyDuration":58,"familySequenceNumber":1}],"backupStartDate":"2019-01-11T13:53:40Z","backupFinishDate":"2019-01-11T13:53:40Z","isBackupRestored":false,"hasBackupChecksums":true,"familyCount":1},{"backupSetId":"7bdfc66c-14d5-4acc-91d3-d9568cabc0e0","firstLSN":"486000000126400000","lastLSN":"486000000145100000","backupType":"TransactionLog","listOfBackupFiles":[{"fileName":"AdventureWorksTransactionLog1.trn","status":"Arrived","totalSize":325120,"dataRead":0,"dataWritten":0,"copyThroughput":0.0,"copyDuration":0,"familySequenceNumber":1}],"backupStartDate":"2019-01-11T13:55:21Z","backupFinishDate":"2019-01-11T13:55:21Z","isBackupRestored":false,"hasBackupChecksums":true,"familyCount":1}],"invalidFiles":["test + - Copy.txt","test.json","InvalidBackup %20+ `~1!2@3#4$5%6^7&8(9)0_-+=]}[{;'',, + ;+&[]~{}.txt"],"blobContainerName":"5b1d7d1b-0e2c-4bd1-bb47-2b209791eccd","isFullBackupRestored":false,"pendingLogBackupsCount":2},"scope":"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/MigrationTesting/providers/Microsoft.Sql/managedInstances/migrationtestmi","provisioningState":"Succeeded","migrationStatus":"InProgress","startedOn":"2022-01-18T12:23:00.387Z","sourceDatabaseName":"AdventureWorks","migrationService":"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/tsum38RG/providers/Microsoft.DataMigration/sqlMigrationServices/sqlServiceUnitTest-Pipeline","migrationOperationId":"5b1d7d1b-0e2c-4bd1-bb47-2b209791eccd","kind":"SqlMi"},"id":"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/MigrationTesting/providers/Microsoft.Sql/managedInstances/migrationtestmi/providers/Microsoft.DataMigration/databaseMigrations/tsum-Db-mi-online-fs9","name":"tsum-Db-mi-online-fs9","type":"Microsoft.DataMigration/databaseMigrations"}' + headers: + cache-control: + - no-cache + content-length: + - '3206' + content-type: + - application/json; charset=utf-8 + date: + - Tue, 18 Jan 2022 12:26:53 GMT + expires: + - '-1' + pragma: + - no-cache + server: + - Microsoft-HTTPAPI/2.0 + strict-transport-security: + - max-age=31536000; includeSubDomains + transfer-encoding: + - chunked + vary: + - Accept-Encoding + x-content-type-options: + - nosniff + status: + code: 200 + message: OK +- request: + body: null + headers: + Accept: + - application/json + Accept-Encoding: + - gzip, deflate + CommandName: + - datamigration sql-managed-instance show + Connection: + - keep-alive + ParameterSetName: + - --managed-instance-name --resource-group --target-db-name --expand + User-Agent: + - AZURECLI/2.32.0 azsdk-python-mgmt-datamigration/1.0.0b1 Python/3.10.1 (Windows-10-10.0.22000-SP0) + method: GET + uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/MigrationTesting/providers/Microsoft.Sql/managedInstances/migrationtestmi/providers/Microsoft.DataMigration/databaseMigrations/tsum-Db-mi-online-fs9?$expand=MigrationStatusDetails&api-version=2021-10-30-preview + response: + body: + string: '{"properties":{"migrationStatusDetails":{"migrationState":"WaitForFullBackupUploadOperation","fullBackupSetInfo":{"backupSetId":"9fceb4b8-3864-45b6-bd35-998619297164","firstLSN":"486000000131000000","lastLSN":"486000000132600000","backupType":"Database","listOfBackupFiles":[{"fileName":"AdventureWorksFullBackup.bak","status":"Uploading","totalSize":63176192,"dataRead":0,"dataWritten":0,"copyThroughput":0.0,"copyDuration":58,"familySequenceNumber":1}],"backupStartDate":"2019-01-11T13:53:40Z","backupFinishDate":"2019-01-11T13:53:40Z","isBackupRestored":false,"hasBackupChecksums":true,"familyCount":1},"activeBackupSets":[{"backupSetId":"e6b60e53-c7b5-48dd-8f07-95f0caa66de1","firstLSN":"486000000145100000","lastLSN":"486000000145300000","backupType":"TransactionLog","listOfBackupFiles":[{"fileName":"AdventureWorksTransactionLog2.trn","status":"Arrived","totalSize":259584,"dataRead":0,"dataWritten":0,"copyThroughput":0.0,"copyDuration":0,"familySequenceNumber":1}],"backupStartDate":"2019-01-11T13:56:02Z","backupFinishDate":"2019-01-11T13:56:02Z","isBackupRestored":false,"hasBackupChecksums":true,"familyCount":1},{"backupSetId":"9fceb4b8-3864-45b6-bd35-998619297164","firstLSN":"486000000131000000","lastLSN":"486000000132600000","backupType":"Database","listOfBackupFiles":[{"fileName":"AdventureWorksFullBackup.bak","status":"Uploading","totalSize":63176192,"dataRead":0,"dataWritten":0,"copyThroughput":0.0,"copyDuration":58,"familySequenceNumber":1}],"backupStartDate":"2019-01-11T13:53:40Z","backupFinishDate":"2019-01-11T13:53:40Z","isBackupRestored":false,"hasBackupChecksums":true,"familyCount":1},{"backupSetId":"7bdfc66c-14d5-4acc-91d3-d9568cabc0e0","firstLSN":"486000000126400000","lastLSN":"486000000145100000","backupType":"TransactionLog","listOfBackupFiles":[{"fileName":"AdventureWorksTransactionLog1.trn","status":"Arrived","totalSize":325120,"dataRead":0,"dataWritten":0,"copyThroughput":0.0,"copyDuration":0,"familySequenceNumber":1}],"backupStartDate":"2019-01-11T13:55:21Z","backupFinishDate":"2019-01-11T13:55:21Z","isBackupRestored":false,"hasBackupChecksums":true,"familyCount":1}],"invalidFiles":["test + - Copy.txt","test.json","InvalidBackup %20+ `~1!2@3#4$5%6^7&8(9)0_-+=]}[{;'',, + ;+&[]~{}.txt"],"blobContainerName":"5b1d7d1b-0e2c-4bd1-bb47-2b209791eccd","isFullBackupRestored":false,"pendingLogBackupsCount":2},"scope":"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/MigrationTesting/providers/Microsoft.Sql/managedInstances/migrationtestmi","provisioningState":"Succeeded","migrationStatus":"InProgress","startedOn":"2022-01-18T12:23:00.387Z","sourceDatabaseName":"AdventureWorks","migrationService":"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/tsum38RG/providers/Microsoft.DataMigration/sqlMigrationServices/sqlServiceUnitTest-Pipeline","migrationOperationId":"5b1d7d1b-0e2c-4bd1-bb47-2b209791eccd","kind":"SqlMi"},"id":"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/MigrationTesting/providers/Microsoft.Sql/managedInstances/migrationtestmi/providers/Microsoft.DataMigration/databaseMigrations/tsum-Db-mi-online-fs9","name":"tsum-Db-mi-online-fs9","type":"Microsoft.DataMigration/databaseMigrations"}' + headers: + cache-control: + - no-cache + content-length: + - '3206' + content-type: + - application/json; charset=utf-8 + date: + - Tue, 18 Jan 2022 12:27:04 GMT + expires: + - '-1' + pragma: + - no-cache + server: + - Microsoft-HTTPAPI/2.0 + strict-transport-security: + - max-age=31536000; includeSubDomains + transfer-encoding: + - chunked + vary: + - Accept-Encoding + x-content-type-options: + - nosniff + status: + code: 200 + message: OK +- request: + body: null + headers: + Accept: + - application/json + Accept-Encoding: + - gzip, deflate + CommandName: + - datamigration sql-managed-instance show + Connection: + - keep-alive + ParameterSetName: + - --managed-instance-name --resource-group --target-db-name --expand + User-Agent: + - AZURECLI/2.32.0 azsdk-python-mgmt-datamigration/1.0.0b1 Python/3.10.1 (Windows-10-10.0.22000-SP0) + method: GET + uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/MigrationTesting/providers/Microsoft.Sql/managedInstances/migrationtestmi/providers/Microsoft.DataMigration/databaseMigrations/tsum-Db-mi-online-fs9?$expand=MigrationStatusDetails&api-version=2021-10-30-preview + response: + body: + string: '{"properties":{"migrationStatusDetails":{"migrationState":"WaitForFullBackupUploadOperation","fullBackupSetInfo":{"backupSetId":"9fceb4b8-3864-45b6-bd35-998619297164","firstLSN":"486000000131000000","lastLSN":"486000000132600000","backupType":"Database","listOfBackupFiles":[{"fileName":"AdventureWorksFullBackup.bak","status":"Uploading","totalSize":63176192,"dataRead":0,"dataWritten":0,"copyThroughput":0.0,"copyDuration":58,"familySequenceNumber":1}],"backupStartDate":"2019-01-11T13:53:40Z","backupFinishDate":"2019-01-11T13:53:40Z","isBackupRestored":false,"hasBackupChecksums":true,"familyCount":1},"activeBackupSets":[{"backupSetId":"e6b60e53-c7b5-48dd-8f07-95f0caa66de1","firstLSN":"486000000145100000","lastLSN":"486000000145300000","backupType":"TransactionLog","listOfBackupFiles":[{"fileName":"AdventureWorksTransactionLog2.trn","status":"Arrived","totalSize":259584,"dataRead":0,"dataWritten":0,"copyThroughput":0.0,"copyDuration":0,"familySequenceNumber":1}],"backupStartDate":"2019-01-11T13:56:02Z","backupFinishDate":"2019-01-11T13:56:02Z","isBackupRestored":false,"hasBackupChecksums":true,"familyCount":1},{"backupSetId":"9fceb4b8-3864-45b6-bd35-998619297164","firstLSN":"486000000131000000","lastLSN":"486000000132600000","backupType":"Database","listOfBackupFiles":[{"fileName":"AdventureWorksFullBackup.bak","status":"Uploading","totalSize":63176192,"dataRead":0,"dataWritten":0,"copyThroughput":0.0,"copyDuration":58,"familySequenceNumber":1}],"backupStartDate":"2019-01-11T13:53:40Z","backupFinishDate":"2019-01-11T13:53:40Z","isBackupRestored":false,"hasBackupChecksums":true,"familyCount":1},{"backupSetId":"7bdfc66c-14d5-4acc-91d3-d9568cabc0e0","firstLSN":"486000000126400000","lastLSN":"486000000145100000","backupType":"TransactionLog","listOfBackupFiles":[{"fileName":"AdventureWorksTransactionLog1.trn","status":"Arrived","totalSize":325120,"dataRead":0,"dataWritten":0,"copyThroughput":0.0,"copyDuration":0,"familySequenceNumber":1}],"backupStartDate":"2019-01-11T13:55:21Z","backupFinishDate":"2019-01-11T13:55:21Z","isBackupRestored":false,"hasBackupChecksums":true,"familyCount":1}],"invalidFiles":["test + - Copy.txt","test.json","InvalidBackup %20+ `~1!2@3#4$5%6^7&8(9)0_-+=]}[{;'',, + ;+&[]~{}.txt"],"blobContainerName":"5b1d7d1b-0e2c-4bd1-bb47-2b209791eccd","isFullBackupRestored":false,"pendingLogBackupsCount":2},"scope":"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/MigrationTesting/providers/Microsoft.Sql/managedInstances/migrationtestmi","provisioningState":"Succeeded","migrationStatus":"InProgress","startedOn":"2022-01-18T12:23:00.387Z","sourceDatabaseName":"AdventureWorks","migrationService":"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/tsum38RG/providers/Microsoft.DataMigration/sqlMigrationServices/sqlServiceUnitTest-Pipeline","migrationOperationId":"5b1d7d1b-0e2c-4bd1-bb47-2b209791eccd","kind":"SqlMi"},"id":"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/MigrationTesting/providers/Microsoft.Sql/managedInstances/migrationtestmi/providers/Microsoft.DataMigration/databaseMigrations/tsum-Db-mi-online-fs9","name":"tsum-Db-mi-online-fs9","type":"Microsoft.DataMigration/databaseMigrations"}' + headers: + cache-control: + - no-cache + content-length: + - '3206' + content-type: + - application/json; charset=utf-8 + date: + - Tue, 18 Jan 2022 12:27:15 GMT + expires: + - '-1' + pragma: + - no-cache + server: + - Microsoft-HTTPAPI/2.0 + strict-transport-security: + - max-age=31536000; includeSubDomains + transfer-encoding: + - chunked + vary: + - Accept-Encoding + x-content-type-options: + - nosniff + status: + code: 200 + message: OK +- request: + body: null + headers: + Accept: + - application/json + Accept-Encoding: + - gzip, deflate + CommandName: + - datamigration sql-managed-instance show + Connection: + - keep-alive + ParameterSetName: + - --managed-instance-name --resource-group --target-db-name --expand + User-Agent: + - AZURECLI/2.32.0 azsdk-python-mgmt-datamigration/1.0.0b1 Python/3.10.1 (Windows-10-10.0.22000-SP0) + method: GET + uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/MigrationTesting/providers/Microsoft.Sql/managedInstances/migrationtestmi/providers/Microsoft.DataMigration/databaseMigrations/tsum-Db-mi-online-fs9?$expand=MigrationStatusDetails&api-version=2021-10-30-preview + response: + body: + string: '{"properties":{"migrationStatusDetails":{"migrationState":"WaitForFullBackupUploadOperation","fullBackupSetInfo":{"backupSetId":"9fceb4b8-3864-45b6-bd35-998619297164","firstLSN":"486000000131000000","lastLSN":"486000000132600000","backupType":"Database","listOfBackupFiles":[{"fileName":"AdventureWorksFullBackup.bak","status":"Uploading","totalSize":63176192,"dataRead":33554432,"dataWritten":33554432,"copyThroughput":275.36099243164062,"copyDuration":119,"familySequenceNumber":1}],"backupStartDate":"2019-01-11T13:53:40Z","backupFinishDate":"2019-01-11T13:53:40Z","isBackupRestored":false,"hasBackupChecksums":true,"familyCount":1},"activeBackupSets":[{"backupSetId":"e6b60e53-c7b5-48dd-8f07-95f0caa66de1","firstLSN":"486000000145100000","lastLSN":"486000000145300000","backupType":"TransactionLog","listOfBackupFiles":[{"fileName":"AdventureWorksTransactionLog2.trn","status":"Arrived","totalSize":259584,"dataRead":0,"dataWritten":0,"copyThroughput":0.0,"copyDuration":0,"familySequenceNumber":1}],"backupStartDate":"2019-01-11T13:56:02Z","backupFinishDate":"2019-01-11T13:56:02Z","isBackupRestored":false,"hasBackupChecksums":true,"familyCount":1},{"backupSetId":"9fceb4b8-3864-45b6-bd35-998619297164","firstLSN":"486000000131000000","lastLSN":"486000000132600000","backupType":"Database","listOfBackupFiles":[{"fileName":"AdventureWorksFullBackup.bak","status":"Uploading","totalSize":63176192,"dataRead":33554432,"dataWritten":33554432,"copyThroughput":275.36099243164062,"copyDuration":119,"familySequenceNumber":1}],"backupStartDate":"2019-01-11T13:53:40Z","backupFinishDate":"2019-01-11T13:53:40Z","isBackupRestored":false,"hasBackupChecksums":true,"familyCount":1},{"backupSetId":"7bdfc66c-14d5-4acc-91d3-d9568cabc0e0","firstLSN":"486000000126400000","lastLSN":"486000000145100000","backupType":"TransactionLog","listOfBackupFiles":[{"fileName":"AdventureWorksTransactionLog1.trn","status":"Arrived","totalSize":325120,"dataRead":0,"dataWritten":0,"copyThroughput":0.0,"copyDuration":0,"familySequenceNumber":1}],"backupStartDate":"2019-01-11T13:55:21Z","backupFinishDate":"2019-01-11T13:55:21Z","isBackupRestored":false,"hasBackupChecksums":true,"familyCount":1}],"invalidFiles":["test + - Copy.txt","test.json","InvalidBackup %20+ `~1!2@3#4$5%6^7&8(9)0_-+=]}[{;'',, + ;+&[]~{}.txt"],"blobContainerName":"5b1d7d1b-0e2c-4bd1-bb47-2b209791eccd","isFullBackupRestored":false,"pendingLogBackupsCount":2},"scope":"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/MigrationTesting/providers/Microsoft.Sql/managedInstances/migrationtestmi","provisioningState":"Succeeded","migrationStatus":"InProgress","startedOn":"2022-01-18T12:23:00.387Z","sourceDatabaseName":"AdventureWorks","migrationService":"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/tsum38RG/providers/Microsoft.DataMigration/sqlMigrationServices/sqlServiceUnitTest-Pipeline","migrationOperationId":"5b1d7d1b-0e2c-4bd1-bb47-2b209791eccd","kind":"SqlMi"},"id":"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/MigrationTesting/providers/Microsoft.Sql/managedInstances/migrationtestmi/providers/Microsoft.DataMigration/databaseMigrations/tsum-Db-mi-online-fs9","name":"tsum-Db-mi-online-fs9","type":"Microsoft.DataMigration/databaseMigrations"}' + headers: + cache-control: + - no-cache + content-length: + - '3266' + content-type: + - application/json; charset=utf-8 + date: + - Tue, 18 Jan 2022 12:27:26 GMT + expires: + - '-1' + pragma: + - no-cache + server: + - Microsoft-HTTPAPI/2.0 + strict-transport-security: + - max-age=31536000; includeSubDomains + transfer-encoding: + - chunked + vary: + - Accept-Encoding + x-content-type-options: + - nosniff + status: + code: 200 + message: OK +- request: + body: null + headers: + Accept: + - application/json + Accept-Encoding: + - gzip, deflate + CommandName: + - datamigration sql-managed-instance show + Connection: + - keep-alive + ParameterSetName: + - --managed-instance-name --resource-group --target-db-name --expand + User-Agent: + - AZURECLI/2.32.0 azsdk-python-mgmt-datamigration/1.0.0b1 Python/3.10.1 (Windows-10-10.0.22000-SP0) + method: GET + uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/MigrationTesting/providers/Microsoft.Sql/managedInstances/migrationtestmi/providers/Microsoft.DataMigration/databaseMigrations/tsum-Db-mi-online-fs9?$expand=MigrationStatusDetails&api-version=2021-10-30-preview + response: + body: + string: '{"properties":{"migrationStatusDetails":{"migrationState":"WaitForFullBackupUploadOperation","fullBackupSetInfo":{"backupSetId":"9fceb4b8-3864-45b6-bd35-998619297164","firstLSN":"486000000131000000","lastLSN":"486000000132600000","backupType":"Database","listOfBackupFiles":[{"fileName":"AdventureWorksFullBackup.bak","status":"Uploading","totalSize":63176192,"dataRead":33554432,"dataWritten":33554432,"copyThroughput":275.36099243164062,"copyDuration":119,"familySequenceNumber":1}],"backupStartDate":"2019-01-11T13:53:40Z","backupFinishDate":"2019-01-11T13:53:40Z","isBackupRestored":false,"hasBackupChecksums":true,"familyCount":1},"activeBackupSets":[{"backupSetId":"e6b60e53-c7b5-48dd-8f07-95f0caa66de1","firstLSN":"486000000145100000","lastLSN":"486000000145300000","backupType":"TransactionLog","listOfBackupFiles":[{"fileName":"AdventureWorksTransactionLog2.trn","status":"Arrived","totalSize":259584,"dataRead":0,"dataWritten":0,"copyThroughput":0.0,"copyDuration":0,"familySequenceNumber":1}],"backupStartDate":"2019-01-11T13:56:02Z","backupFinishDate":"2019-01-11T13:56:02Z","isBackupRestored":false,"hasBackupChecksums":true,"familyCount":1},{"backupSetId":"9fceb4b8-3864-45b6-bd35-998619297164","firstLSN":"486000000131000000","lastLSN":"486000000132600000","backupType":"Database","listOfBackupFiles":[{"fileName":"AdventureWorksFullBackup.bak","status":"Uploading","totalSize":63176192,"dataRead":33554432,"dataWritten":33554432,"copyThroughput":275.36099243164062,"copyDuration":119,"familySequenceNumber":1}],"backupStartDate":"2019-01-11T13:53:40Z","backupFinishDate":"2019-01-11T13:53:40Z","isBackupRestored":false,"hasBackupChecksums":true,"familyCount":1},{"backupSetId":"7bdfc66c-14d5-4acc-91d3-d9568cabc0e0","firstLSN":"486000000126400000","lastLSN":"486000000145100000","backupType":"TransactionLog","listOfBackupFiles":[{"fileName":"AdventureWorksTransactionLog1.trn","status":"Arrived","totalSize":325120,"dataRead":0,"dataWritten":0,"copyThroughput":0.0,"copyDuration":0,"familySequenceNumber":1}],"backupStartDate":"2019-01-11T13:55:21Z","backupFinishDate":"2019-01-11T13:55:21Z","isBackupRestored":false,"hasBackupChecksums":true,"familyCount":1}],"invalidFiles":["test + - Copy.txt","test.json","InvalidBackup %20+ `~1!2@3#4$5%6^7&8(9)0_-+=]}[{;'',, + ;+&[]~{}.txt"],"blobContainerName":"5b1d7d1b-0e2c-4bd1-bb47-2b209791eccd","isFullBackupRestored":false,"pendingLogBackupsCount":2},"scope":"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/MigrationTesting/providers/Microsoft.Sql/managedInstances/migrationtestmi","provisioningState":"Succeeded","migrationStatus":"InProgress","startedOn":"2022-01-18T12:23:00.387Z","sourceDatabaseName":"AdventureWorks","migrationService":"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/tsum38RG/providers/Microsoft.DataMigration/sqlMigrationServices/sqlServiceUnitTest-Pipeline","migrationOperationId":"5b1d7d1b-0e2c-4bd1-bb47-2b209791eccd","kind":"SqlMi"},"id":"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/MigrationTesting/providers/Microsoft.Sql/managedInstances/migrationtestmi/providers/Microsoft.DataMigration/databaseMigrations/tsum-Db-mi-online-fs9","name":"tsum-Db-mi-online-fs9","type":"Microsoft.DataMigration/databaseMigrations"}' + headers: + cache-control: + - no-cache + content-length: + - '3266' + content-type: + - application/json; charset=utf-8 + date: + - Tue, 18 Jan 2022 12:27:37 GMT + expires: + - '-1' + pragma: + - no-cache + server: + - Microsoft-HTTPAPI/2.0 + strict-transport-security: + - max-age=31536000; includeSubDomains + transfer-encoding: + - chunked + vary: + - Accept-Encoding + x-content-type-options: + - nosniff + status: + code: 200 + message: OK +- request: + body: null + headers: + Accept: + - application/json + Accept-Encoding: + - gzip, deflate + CommandName: + - datamigration sql-managed-instance show + Connection: + - keep-alive + ParameterSetName: + - --managed-instance-name --resource-group --target-db-name --expand + User-Agent: + - AZURECLI/2.32.0 azsdk-python-mgmt-datamigration/1.0.0b1 Python/3.10.1 (Windows-10-10.0.22000-SP0) + method: GET + uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/MigrationTesting/providers/Microsoft.Sql/managedInstances/migrationtestmi/providers/Microsoft.DataMigration/databaseMigrations/tsum-Db-mi-online-fs9?$expand=MigrationStatusDetails&api-version=2021-10-30-preview + response: + body: + string: '{"properties":{"migrationStatusDetails":{"migrationState":"WaitForFullBackupUploadOperation","fullBackupSetInfo":{"backupSetId":"9fceb4b8-3864-45b6-bd35-998619297164","firstLSN":"486000000131000000","lastLSN":"486000000132600000","backupType":"Database","listOfBackupFiles":[{"fileName":"AdventureWorksFullBackup.bak","status":"Uploading","totalSize":63176192,"dataRead":33554432,"dataWritten":33554432,"copyThroughput":275.36099243164062,"copyDuration":119,"familySequenceNumber":1}],"backupStartDate":"2019-01-11T13:53:40Z","backupFinishDate":"2019-01-11T13:53:40Z","isBackupRestored":false,"hasBackupChecksums":true,"familyCount":1},"activeBackupSets":[{"backupSetId":"e6b60e53-c7b5-48dd-8f07-95f0caa66de1","firstLSN":"486000000145100000","lastLSN":"486000000145300000","backupType":"TransactionLog","listOfBackupFiles":[{"fileName":"AdventureWorksTransactionLog2.trn","status":"Arrived","totalSize":259584,"dataRead":0,"dataWritten":0,"copyThroughput":0.0,"copyDuration":0,"familySequenceNumber":1}],"backupStartDate":"2019-01-11T13:56:02Z","backupFinishDate":"2019-01-11T13:56:02Z","isBackupRestored":false,"hasBackupChecksums":true,"familyCount":1},{"backupSetId":"9fceb4b8-3864-45b6-bd35-998619297164","firstLSN":"486000000131000000","lastLSN":"486000000132600000","backupType":"Database","listOfBackupFiles":[{"fileName":"AdventureWorksFullBackup.bak","status":"Uploading","totalSize":63176192,"dataRead":33554432,"dataWritten":33554432,"copyThroughput":275.36099243164062,"copyDuration":119,"familySequenceNumber":1}],"backupStartDate":"2019-01-11T13:53:40Z","backupFinishDate":"2019-01-11T13:53:40Z","isBackupRestored":false,"hasBackupChecksums":true,"familyCount":1},{"backupSetId":"7bdfc66c-14d5-4acc-91d3-d9568cabc0e0","firstLSN":"486000000126400000","lastLSN":"486000000145100000","backupType":"TransactionLog","listOfBackupFiles":[{"fileName":"AdventureWorksTransactionLog1.trn","status":"Arrived","totalSize":325120,"dataRead":0,"dataWritten":0,"copyThroughput":0.0,"copyDuration":0,"familySequenceNumber":1}],"backupStartDate":"2019-01-11T13:55:21Z","backupFinishDate":"2019-01-11T13:55:21Z","isBackupRestored":false,"hasBackupChecksums":true,"familyCount":1}],"invalidFiles":["test + - Copy.txt","test.json","InvalidBackup %20+ `~1!2@3#4$5%6^7&8(9)0_-+=]}[{;'',, + ;+&[]~{}.txt"],"blobContainerName":"5b1d7d1b-0e2c-4bd1-bb47-2b209791eccd","isFullBackupRestored":false,"pendingLogBackupsCount":2},"scope":"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/MigrationTesting/providers/Microsoft.Sql/managedInstances/migrationtestmi","provisioningState":"Succeeded","migrationStatus":"InProgress","startedOn":"2022-01-18T12:23:00.387Z","sourceDatabaseName":"AdventureWorks","migrationService":"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/tsum38RG/providers/Microsoft.DataMigration/sqlMigrationServices/sqlServiceUnitTest-Pipeline","migrationOperationId":"5b1d7d1b-0e2c-4bd1-bb47-2b209791eccd","kind":"SqlMi"},"id":"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/MigrationTesting/providers/Microsoft.Sql/managedInstances/migrationtestmi/providers/Microsoft.DataMigration/databaseMigrations/tsum-Db-mi-online-fs9","name":"tsum-Db-mi-online-fs9","type":"Microsoft.DataMigration/databaseMigrations"}' + headers: + cache-control: + - no-cache + content-length: + - '3266' + content-type: + - application/json; charset=utf-8 + date: + - Tue, 18 Jan 2022 12:27:49 GMT + expires: + - '-1' + pragma: + - no-cache + server: + - Microsoft-HTTPAPI/2.0 + strict-transport-security: + - max-age=31536000; includeSubDomains + transfer-encoding: + - chunked + vary: + - Accept-Encoding + x-content-type-options: + - nosniff + status: + code: 200 + message: OK +- request: + body: null + headers: + Accept: + - application/json + Accept-Encoding: + - gzip, deflate + CommandName: + - datamigration sql-managed-instance show + Connection: + - keep-alive + ParameterSetName: + - --managed-instance-name --resource-group --target-db-name --expand + User-Agent: + - AZURECLI/2.32.0 azsdk-python-mgmt-datamigration/1.0.0b1 Python/3.10.1 (Windows-10-10.0.22000-SP0) + method: GET + uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/MigrationTesting/providers/Microsoft.Sql/managedInstances/migrationtestmi/providers/Microsoft.DataMigration/databaseMigrations/tsum-Db-mi-online-fs9?$expand=MigrationStatusDetails&api-version=2021-10-30-preview + response: + body: + string: '{"properties":{"migrationStatusDetails":{"migrationState":"WaitForFullBackupUploadOperation","fullBackupSetInfo":{"backupSetId":"9fceb4b8-3864-45b6-bd35-998619297164","firstLSN":"486000000131000000","lastLSN":"486000000132600000","backupType":"Database","listOfBackupFiles":[{"fileName":"AdventureWorksFullBackup.bak","status":"Uploading","totalSize":63176192,"dataRead":33554432,"dataWritten":33554432,"copyThroughput":275.36099243164062,"copyDuration":119,"familySequenceNumber":1}],"backupStartDate":"2019-01-11T13:53:40Z","backupFinishDate":"2019-01-11T13:53:40Z","isBackupRestored":false,"hasBackupChecksums":true,"familyCount":1},"activeBackupSets":[{"backupSetId":"e6b60e53-c7b5-48dd-8f07-95f0caa66de1","firstLSN":"486000000145100000","lastLSN":"486000000145300000","backupType":"TransactionLog","listOfBackupFiles":[{"fileName":"AdventureWorksTransactionLog2.trn","status":"Arrived","totalSize":259584,"dataRead":0,"dataWritten":0,"copyThroughput":0.0,"copyDuration":0,"familySequenceNumber":1}],"backupStartDate":"2019-01-11T13:56:02Z","backupFinishDate":"2019-01-11T13:56:02Z","isBackupRestored":false,"hasBackupChecksums":true,"familyCount":1},{"backupSetId":"9fceb4b8-3864-45b6-bd35-998619297164","firstLSN":"486000000131000000","lastLSN":"486000000132600000","backupType":"Database","listOfBackupFiles":[{"fileName":"AdventureWorksFullBackup.bak","status":"Uploading","totalSize":63176192,"dataRead":33554432,"dataWritten":33554432,"copyThroughput":275.36099243164062,"copyDuration":119,"familySequenceNumber":1}],"backupStartDate":"2019-01-11T13:53:40Z","backupFinishDate":"2019-01-11T13:53:40Z","isBackupRestored":false,"hasBackupChecksums":true,"familyCount":1},{"backupSetId":"7bdfc66c-14d5-4acc-91d3-d9568cabc0e0","firstLSN":"486000000126400000","lastLSN":"486000000145100000","backupType":"TransactionLog","listOfBackupFiles":[{"fileName":"AdventureWorksTransactionLog1.trn","status":"Arrived","totalSize":325120,"dataRead":0,"dataWritten":0,"copyThroughput":0.0,"copyDuration":0,"familySequenceNumber":1}],"backupStartDate":"2019-01-11T13:55:21Z","backupFinishDate":"2019-01-11T13:55:21Z","isBackupRestored":false,"hasBackupChecksums":true,"familyCount":1}],"invalidFiles":["test + - Copy.txt","test.json","InvalidBackup %20+ `~1!2@3#4$5%6^7&8(9)0_-+=]}[{;'',, + ;+&[]~{}.txt"],"blobContainerName":"5b1d7d1b-0e2c-4bd1-bb47-2b209791eccd","isFullBackupRestored":false,"pendingLogBackupsCount":2},"scope":"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/MigrationTesting/providers/Microsoft.Sql/managedInstances/migrationtestmi","provisioningState":"Succeeded","migrationStatus":"InProgress","startedOn":"2022-01-18T12:23:00.387Z","sourceDatabaseName":"AdventureWorks","migrationService":"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/tsum38RG/providers/Microsoft.DataMigration/sqlMigrationServices/sqlServiceUnitTest-Pipeline","migrationOperationId":"5b1d7d1b-0e2c-4bd1-bb47-2b209791eccd","kind":"SqlMi"},"id":"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/MigrationTesting/providers/Microsoft.Sql/managedInstances/migrationtestmi/providers/Microsoft.DataMigration/databaseMigrations/tsum-Db-mi-online-fs9","name":"tsum-Db-mi-online-fs9","type":"Microsoft.DataMigration/databaseMigrations"}' + headers: + cache-control: + - no-cache + content-length: + - '3266' + content-type: + - application/json; charset=utf-8 + date: + - Tue, 18 Jan 2022 12:28:00 GMT + expires: + - '-1' + pragma: + - no-cache + server: + - Microsoft-HTTPAPI/2.0 + strict-transport-security: + - max-age=31536000; includeSubDomains + transfer-encoding: + - chunked + vary: + - Accept-Encoding + x-content-type-options: + - nosniff + status: + code: 200 + message: OK +- request: + body: null + headers: + Accept: + - application/json + Accept-Encoding: + - gzip, deflate + CommandName: + - datamigration sql-managed-instance show + Connection: + - keep-alive + ParameterSetName: + - --managed-instance-name --resource-group --target-db-name --expand + User-Agent: + - AZURECLI/2.32.0 azsdk-python-mgmt-datamigration/1.0.0b1 Python/3.10.1 (Windows-10-10.0.22000-SP0) + method: GET + uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/MigrationTesting/providers/Microsoft.Sql/managedInstances/migrationtestmi/providers/Microsoft.DataMigration/databaseMigrations/tsum-Db-mi-online-fs9?$expand=MigrationStatusDetails&api-version=2021-10-30-preview + response: + body: + string: '{"properties":{"migrationStatusDetails":{"migrationState":"WaitForFullBackupUploadOperation","fullBackupSetInfo":{"backupSetId":"9fceb4b8-3864-45b6-bd35-998619297164","firstLSN":"486000000131000000","lastLSN":"486000000132600000","backupType":"Database","listOfBackupFiles":[{"fileName":"AdventureWorksFullBackup.bak","status":"Uploading","totalSize":63176192,"dataRead":33554432,"dataWritten":33554432,"copyThroughput":275.36099243164062,"copyDuration":119,"familySequenceNumber":1}],"backupStartDate":"2019-01-11T13:53:40Z","backupFinishDate":"2019-01-11T13:53:40Z","isBackupRestored":false,"hasBackupChecksums":true,"familyCount":1},"activeBackupSets":[{"backupSetId":"e6b60e53-c7b5-48dd-8f07-95f0caa66de1","firstLSN":"486000000145100000","lastLSN":"486000000145300000","backupType":"TransactionLog","listOfBackupFiles":[{"fileName":"AdventureWorksTransactionLog2.trn","status":"Arrived","totalSize":259584,"dataRead":0,"dataWritten":0,"copyThroughput":0.0,"copyDuration":0,"familySequenceNumber":1}],"backupStartDate":"2019-01-11T13:56:02Z","backupFinishDate":"2019-01-11T13:56:02Z","isBackupRestored":false,"hasBackupChecksums":true,"familyCount":1},{"backupSetId":"9fceb4b8-3864-45b6-bd35-998619297164","firstLSN":"486000000131000000","lastLSN":"486000000132600000","backupType":"Database","listOfBackupFiles":[{"fileName":"AdventureWorksFullBackup.bak","status":"Uploading","totalSize":63176192,"dataRead":33554432,"dataWritten":33554432,"copyThroughput":275.36099243164062,"copyDuration":119,"familySequenceNumber":1}],"backupStartDate":"2019-01-11T13:53:40Z","backupFinishDate":"2019-01-11T13:53:40Z","isBackupRestored":false,"hasBackupChecksums":true,"familyCount":1},{"backupSetId":"7bdfc66c-14d5-4acc-91d3-d9568cabc0e0","firstLSN":"486000000126400000","lastLSN":"486000000145100000","backupType":"TransactionLog","listOfBackupFiles":[{"fileName":"AdventureWorksTransactionLog1.trn","status":"Arrived","totalSize":325120,"dataRead":0,"dataWritten":0,"copyThroughput":0.0,"copyDuration":0,"familySequenceNumber":1}],"backupStartDate":"2019-01-11T13:55:21Z","backupFinishDate":"2019-01-11T13:55:21Z","isBackupRestored":false,"hasBackupChecksums":true,"familyCount":1}],"invalidFiles":["test + - Copy.txt","test.json","InvalidBackup %20+ `~1!2@3#4$5%6^7&8(9)0_-+=]}[{;'',, + ;+&[]~{}.txt"],"blobContainerName":"5b1d7d1b-0e2c-4bd1-bb47-2b209791eccd","isFullBackupRestored":false,"pendingLogBackupsCount":2},"scope":"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/MigrationTesting/providers/Microsoft.Sql/managedInstances/migrationtestmi","provisioningState":"Succeeded","migrationStatus":"InProgress","startedOn":"2022-01-18T12:23:00.387Z","sourceDatabaseName":"AdventureWorks","migrationService":"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/tsum38RG/providers/Microsoft.DataMigration/sqlMigrationServices/sqlServiceUnitTest-Pipeline","migrationOperationId":"5b1d7d1b-0e2c-4bd1-bb47-2b209791eccd","kind":"SqlMi"},"id":"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/MigrationTesting/providers/Microsoft.Sql/managedInstances/migrationtestmi/providers/Microsoft.DataMigration/databaseMigrations/tsum-Db-mi-online-fs9","name":"tsum-Db-mi-online-fs9","type":"Microsoft.DataMigration/databaseMigrations"}' + headers: + cache-control: + - no-cache + content-length: + - '3266' + content-type: + - application/json; charset=utf-8 + date: + - Tue, 18 Jan 2022 12:28:12 GMT + expires: + - '-1' + pragma: + - no-cache + server: + - Microsoft-HTTPAPI/2.0 + strict-transport-security: + - max-age=31536000; includeSubDomains + transfer-encoding: + - chunked + vary: + - Accept-Encoding + x-content-type-options: + - nosniff + status: + code: 200 + message: OK +- request: + body: null + headers: + Accept: + - application/json + Accept-Encoding: + - gzip, deflate + CommandName: + - datamigration sql-managed-instance show + Connection: + - keep-alive + ParameterSetName: + - --managed-instance-name --resource-group --target-db-name --expand + User-Agent: + - AZURECLI/2.32.0 azsdk-python-mgmt-datamigration/1.0.0b1 Python/3.10.1 (Windows-10-10.0.22000-SP0) + method: GET + uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/MigrationTesting/providers/Microsoft.Sql/managedInstances/migrationtestmi/providers/Microsoft.DataMigration/databaseMigrations/tsum-Db-mi-online-fs9?$expand=MigrationStatusDetails&api-version=2021-10-30-preview + response: + body: + string: '{"properties":{"migrationStatusDetails":{"migrationState":"StartLogBackupUploadOperation","fullBackupSetInfo":{"backupSetId":"9fceb4b8-3864-45b6-bd35-998619297164","firstLSN":"486000000131000000","lastLSN":"486000000132600000","backupType":"Database","listOfBackupFiles":[{"fileName":"AdventureWorksFullBackup.bak","status":"Uploaded","totalSize":63176192,"dataRead":63176192,"dataWritten":63176192,"copyThroughput":369.43399047851562,"copyDuration":167,"familySequenceNumber":1}],"backupStartDate":"2019-01-11T13:53:40Z","backupFinishDate":"2019-01-11T13:53:40Z","isBackupRestored":false,"hasBackupChecksums":true,"familyCount":1},"activeBackupSets":[{"backupSetId":"e6b60e53-c7b5-48dd-8f07-95f0caa66de1","firstLSN":"486000000145100000","lastLSN":"486000000145300000","backupType":"TransactionLog","listOfBackupFiles":[{"fileName":"AdventureWorksTransactionLog2.trn","status":"Arrived","totalSize":259584,"dataRead":0,"dataWritten":0,"copyThroughput":0.0,"copyDuration":0,"familySequenceNumber":1}],"backupStartDate":"2019-01-11T13:56:02Z","backupFinishDate":"2019-01-11T13:56:02Z","isBackupRestored":false,"hasBackupChecksums":true,"familyCount":1},{"backupSetId":"9fceb4b8-3864-45b6-bd35-998619297164","firstLSN":"486000000131000000","lastLSN":"486000000132600000","backupType":"Database","listOfBackupFiles":[{"fileName":"AdventureWorksFullBackup.bak","status":"Uploaded","totalSize":63176192,"dataRead":63176192,"dataWritten":63176192,"copyThroughput":369.43399047851562,"copyDuration":167,"familySequenceNumber":1}],"backupStartDate":"2019-01-11T13:53:40Z","backupFinishDate":"2019-01-11T13:53:40Z","isBackupRestored":false,"hasBackupChecksums":true,"familyCount":1},{"backupSetId":"7bdfc66c-14d5-4acc-91d3-d9568cabc0e0","firstLSN":"486000000126400000","lastLSN":"486000000145100000","backupType":"TransactionLog","listOfBackupFiles":[{"fileName":"AdventureWorksTransactionLog1.trn","status":"Arrived","totalSize":325120,"dataRead":0,"dataWritten":0,"copyThroughput":0.0,"copyDuration":0,"familySequenceNumber":1}],"backupStartDate":"2019-01-11T13:55:21Z","backupFinishDate":"2019-01-11T13:55:21Z","isBackupRestored":false,"hasBackupChecksums":true,"familyCount":1}],"invalidFiles":["test + - Copy.txt","test.json","InvalidBackup %20+ `~1!2@3#4$5%6^7&8(9)0_-+=]}[{;'',, + ;+&[]~{}.txt"],"blobContainerName":"5b1d7d1b-0e2c-4bd1-bb47-2b209791eccd","isFullBackupRestored":false,"fileUploadBlockingErrors":["Failure + happened on ''Source'' side. ErrorCode=SqlOperationFailed,''Type=Microsoft.DataTransfer.Common.Shared.HybridDeliveryException,Message=A + database operation failed with the following error: ''The volume on device + ''\\\\aalab03-2k8.redmond.corp.microsoft.com\\SharedBackup\\tsuman\\test.json'' + is empty.\nRESTORE HEADERONLY is terminating abnormally.'',Source=,''''Type=System.Data.SqlClient.SqlException,Message=The + volume on device ''\\\\aalab03-2k8.redmond.corp.microsoft.com\\SharedBackup\\tsuman\\test.json'' + is empty.\nRESTORE HEADERONLY is terminating abnormally.,Source=.Net SqlClient + Data Provider,SqlErrorNumber=3254,Class=16,ErrorCode=-2146232060,State=1,Errors=[{Class=16,Number=3254,State=1,Message=The + volume on device ''\\\\aalab03-2k8.redmond.corp.microsoft.com\\SharedBackup\\tsuman\\test.json'' + is empty.,},{Class=16,Number=3013,State=1,Message=RESTORE HEADERONLY is terminating + abnormally.,},],''","Failure happened on ''Source'' side. ErrorCode=SqlOperationFailed,''Type=Microsoft.DataTransfer.Common.Shared.HybridDeliveryException,Message=A + database operation failed with the following error: ''The volume on device + ''\\\\aalab03-2k8.redmond.corp.microsoft.com\\SharedBackup\\tsuman\\test - + Copy.txt'' is empty.\nRESTORE HEADERONLY is terminating abnormally.'',Source=,''''Type=System.Data.SqlClient.SqlException,Message=The + volume on device ''\\\\aalab03-2k8.redmond.corp.microsoft.com\\SharedBackup\\tsuman\\test + - Copy.txt'' is empty.\nRESTORE HEADERONLY is terminating abnormally.,Source=.Net + SqlClient Data Provider,SqlErrorNumber=3254,Class=16,ErrorCode=-2146232060,State=1,Errors=[{Class=16,Number=3254,State=1,Message=The + volume on device ''\\\\aalab03-2k8.redmond.corp.microsoft.com\\SharedBackup\\tsuman\\test + - Copy.txt'' is empty.,},{Class=16,Number=3013,State=1,Message=RESTORE HEADERONLY + is terminating abnormally.,},],''","Failure happened on ''Source'' side. ErrorCode=SqlOperationFailed,''Type=Microsoft.DataTransfer.Common.Shared.HybridDeliveryException,Message=A + database operation failed with the following error: ''Cannot open backup device + ''\\\\aalab03-2k8.redmond.corp.microsoft.com\\SharedBackup\\tsuman\\backup''. + Operating system error 5(Access is denied.).\nRESTORE HEADERONLY is terminating + abnormally.'',Source=,''''Type=System.Data.SqlClient.SqlException,Message=Cannot + open backup device ''\\\\aalab03-2k8.redmond.corp.microsoft.com\\SharedBackup\\tsuman\\backup''. + Operating system error 5(Access is denied.).\nRESTORE HEADERONLY is terminating + abnormally.,Source=.Net SqlClient Data Provider,SqlErrorNumber=3201,Class=16,ErrorCode=-2146232060,State=2,Errors=[{Class=16,Number=3201,State=2,Message=Cannot + open backup device ''\\\\aalab03-2k8.redmond.corp.microsoft.com\\SharedBackup\\tsuman\\backup''. + Operating system error 5(Access is denied.).,},{Class=16,Number=3013,State=1,Message=RESTORE + HEADERONLY is terminating abnormally.,},],''"],"pendingLogBackupsCount":2},"scope":"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/MigrationTesting/providers/Microsoft.Sql/managedInstances/migrationtestmi","provisioningState":"Succeeded","migrationStatus":"InProgress","startedOn":"2022-01-18T12:23:00.387Z","sourceDatabaseName":"AdventureWorks","migrationService":"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/tsum38RG/providers/Microsoft.DataMigration/sqlMigrationServices/sqlServiceUnitTest-Pipeline","migrationOperationId":"5b1d7d1b-0e2c-4bd1-bb47-2b209791eccd","kind":"SqlMi"},"id":"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/MigrationTesting/providers/Microsoft.Sql/managedInstances/migrationtestmi/providers/Microsoft.DataMigration/databaseMigrations/tsum-Db-mi-online-fs9","name":"tsum-Db-mi-online-fs9","type":"Microsoft.DataMigration/databaseMigrations"}' + headers: + cache-control: + - no-cache + content-length: + - '6149' + content-type: + - application/json; charset=utf-8 + date: + - Tue, 18 Jan 2022 12:28:24 GMT + expires: + - '-1' + pragma: + - no-cache + server: + - Microsoft-HTTPAPI/2.0 + strict-transport-security: + - max-age=31536000; includeSubDomains + transfer-encoding: + - chunked + vary: + - Accept-Encoding + x-content-type-options: + - nosniff + status: + code: 200 + message: OK +- request: + body: null + headers: + Accept: + - application/json + Accept-Encoding: + - gzip, deflate + CommandName: + - datamigration sql-managed-instance show + Connection: + - keep-alive + ParameterSetName: + - --managed-instance-name --resource-group --target-db-name --expand + User-Agent: + - AZURECLI/2.32.0 azsdk-python-mgmt-datamigration/1.0.0b1 Python/3.10.1 (Windows-10-10.0.22000-SP0) + method: GET + uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/MigrationTesting/providers/Microsoft.Sql/managedInstances/migrationtestmi/providers/Microsoft.DataMigration/databaseMigrations/tsum-Db-mi-online-fs9?$expand=MigrationStatusDetails&api-version=2021-10-30-preview + response: + body: + string: '{"properties":{"migrationStatusDetails":{"migrationState":"MonitorMigration","fullBackupSetInfo":{"backupSetId":"9fceb4b8-3864-45b6-bd35-998619297164","firstLSN":"486000000131000000","lastLSN":"486000000132600000","backupType":"Database","listOfBackupFiles":[{"fileName":"AdventureWorksFullBackup.bak","status":"Restoring","totalSize":63176192,"dataRead":63176192,"dataWritten":63176192,"copyThroughput":369.43399047851562,"copyDuration":167,"familySequenceNumber":1}],"backupStartDate":"2019-01-11T13:53:40Z","backupFinishDate":"2019-01-11T13:53:40Z","isBackupRestored":false,"hasBackupChecksums":true,"familyCount":1},"activeBackupSets":[{"backupSetId":"e6b60e53-c7b5-48dd-8f07-95f0caa66de1","firstLSN":"486000000145100000","lastLSN":"486000000145300000","backupType":"TransactionLog","listOfBackupFiles":[{"fileName":"AdventureWorksTransactionLog2.trn","status":"Arrived","totalSize":259584,"dataRead":0,"dataWritten":0,"copyThroughput":0.0,"copyDuration":0,"familySequenceNumber":1}],"backupStartDate":"2019-01-11T13:56:02Z","backupFinishDate":"2019-01-11T13:56:02Z","isBackupRestored":false,"hasBackupChecksums":true,"familyCount":1},{"backupSetId":"9fceb4b8-3864-45b6-bd35-998619297164","firstLSN":"486000000131000000","lastLSN":"486000000132600000","backupType":"Database","listOfBackupFiles":[{"fileName":"AdventureWorksFullBackup.bak","status":"Restoring","totalSize":63176192,"dataRead":63176192,"dataWritten":63176192,"copyThroughput":369.43399047851562,"copyDuration":167,"familySequenceNumber":1}],"backupStartDate":"2019-01-11T13:53:40Z","backupFinishDate":"2019-01-11T13:53:40Z","isBackupRestored":false,"hasBackupChecksums":true,"familyCount":1},{"backupSetId":"7bdfc66c-14d5-4acc-91d3-d9568cabc0e0","firstLSN":"486000000126400000","lastLSN":"486000000145100000","backupType":"TransactionLog","listOfBackupFiles":[{"fileName":"AdventureWorksTransactionLog1.trn","status":"Arrived","totalSize":325120,"dataRead":0,"dataWritten":0,"copyThroughput":0.0,"copyDuration":0,"familySequenceNumber":1}],"backupStartDate":"2019-01-11T13:55:21Z","backupFinishDate":"2019-01-11T13:55:21Z","isBackupRestored":false,"hasBackupChecksums":true,"familyCount":1}],"invalidFiles":["test + - Copy.txt","test.json","InvalidBackup %20+ `~1!2@3#4$5%6^7&8(9)0_-+=]}[{;'',, + ;+&[]~{}.txt"],"blobContainerName":"5b1d7d1b-0e2c-4bd1-bb47-2b209791eccd","isFullBackupRestored":false,"currentRestoringFilename":"AdventureWorksFullBackup.bak","pendingLogBackupsCount":2},"scope":"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/MigrationTesting/providers/Microsoft.Sql/managedInstances/migrationtestmi","provisioningState":"Succeeded","migrationStatus":"InProgress","startedOn":"2022-01-18T12:23:00.387Z","sourceDatabaseName":"AdventureWorks","migrationService":"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/tsum38RG/providers/Microsoft.DataMigration/sqlMigrationServices/sqlServiceUnitTest-Pipeline","migrationOperationId":"5b1d7d1b-0e2c-4bd1-bb47-2b209791eccd","kind":"SqlMi"},"id":"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/MigrationTesting/providers/Microsoft.Sql/managedInstances/migrationtestmi/providers/Microsoft.DataMigration/databaseMigrations/tsum-Db-mi-online-fs9","name":"tsum-Db-mi-online-fs9","type":"Microsoft.DataMigration/databaseMigrations"}' + headers: + cache-control: + - no-cache + content-length: + - '3308' + content-type: + - application/json; charset=utf-8 + date: + - Tue, 18 Jan 2022 12:28:36 GMT + expires: + - '-1' + pragma: + - no-cache + server: + - Microsoft-HTTPAPI/2.0 + strict-transport-security: + - max-age=31536000; includeSubDomains + transfer-encoding: + - chunked + vary: + - Accept-Encoding + x-content-type-options: + - nosniff + status: + code: 200 + message: OK +- request: + body: null + headers: + Accept: + - application/json + Accept-Encoding: + - gzip, deflate + CommandName: + - datamigration sql-managed-instance show + Connection: + - keep-alive + ParameterSetName: + - --managed-instance-name --resource-group --target-db-name --expand + User-Agent: + - AZURECLI/2.32.0 azsdk-python-mgmt-datamigration/1.0.0b1 Python/3.10.1 (Windows-10-10.0.22000-SP0) + method: GET + uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/MigrationTesting/providers/Microsoft.Sql/managedInstances/migrationtestmi/providers/Microsoft.DataMigration/databaseMigrations/tsum-Db-mi-online-fs9?$expand=MigrationStatusDetails&api-version=2021-10-30-preview + response: + body: + string: '{"properties":{"migrationStatusDetails":{"migrationState":"MonitorMigration","fullBackupSetInfo":{"backupSetId":"9fceb4b8-3864-45b6-bd35-998619297164","firstLSN":"486000000131000000","lastLSN":"486000000132600000","backupType":"Database","listOfBackupFiles":[{"fileName":"AdventureWorksFullBackup.bak","status":"Restoring","totalSize":63176192,"dataRead":63176192,"dataWritten":63176192,"copyThroughput":369.43399047851562,"copyDuration":167,"familySequenceNumber":1}],"backupStartDate":"2019-01-11T13:53:40Z","backupFinishDate":"2019-01-11T13:53:40Z","isBackupRestored":false,"hasBackupChecksums":true,"familyCount":1},"activeBackupSets":[{"backupSetId":"e6b60e53-c7b5-48dd-8f07-95f0caa66de1","firstLSN":"486000000145100000","lastLSN":"486000000145300000","backupType":"TransactionLog","listOfBackupFiles":[{"fileName":"AdventureWorksTransactionLog2.trn","status":"Arrived","totalSize":259584,"dataRead":0,"dataWritten":0,"copyThroughput":0.0,"copyDuration":0,"familySequenceNumber":1}],"backupStartDate":"2019-01-11T13:56:02Z","backupFinishDate":"2019-01-11T13:56:02Z","isBackupRestored":false,"hasBackupChecksums":true,"familyCount":1},{"backupSetId":"9fceb4b8-3864-45b6-bd35-998619297164","firstLSN":"486000000131000000","lastLSN":"486000000132600000","backupType":"Database","listOfBackupFiles":[{"fileName":"AdventureWorksFullBackup.bak","status":"Restoring","totalSize":63176192,"dataRead":63176192,"dataWritten":63176192,"copyThroughput":369.43399047851562,"copyDuration":167,"familySequenceNumber":1}],"backupStartDate":"2019-01-11T13:53:40Z","backupFinishDate":"2019-01-11T13:53:40Z","isBackupRestored":false,"hasBackupChecksums":true,"familyCount":1},{"backupSetId":"7bdfc66c-14d5-4acc-91d3-d9568cabc0e0","firstLSN":"486000000126400000","lastLSN":"486000000145100000","backupType":"TransactionLog","listOfBackupFiles":[{"fileName":"AdventureWorksTransactionLog1.trn","status":"Arrived","totalSize":325120,"dataRead":0,"dataWritten":0,"copyThroughput":0.0,"copyDuration":0,"familySequenceNumber":1}],"backupStartDate":"2019-01-11T13:55:21Z","backupFinishDate":"2019-01-11T13:55:21Z","isBackupRestored":false,"hasBackupChecksums":true,"familyCount":1}],"invalidFiles":["test + - Copy.txt","test.json","InvalidBackup %20+ `~1!2@3#4$5%6^7&8(9)0_-+=]}[{;'',, + ;+&[]~{}.txt"],"blobContainerName":"5b1d7d1b-0e2c-4bd1-bb47-2b209791eccd","isFullBackupRestored":false,"currentRestoringFilename":"AdventureWorksFullBackup.bak","pendingLogBackupsCount":2},"scope":"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/MigrationTesting/providers/Microsoft.Sql/managedInstances/migrationtestmi","provisioningState":"Succeeded","migrationStatus":"InProgress","startedOn":"2022-01-18T12:23:00.387Z","sourceDatabaseName":"AdventureWorks","migrationService":"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/tsum38RG/providers/Microsoft.DataMigration/sqlMigrationServices/sqlServiceUnitTest-Pipeline","migrationOperationId":"5b1d7d1b-0e2c-4bd1-bb47-2b209791eccd","kind":"SqlMi"},"id":"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/MigrationTesting/providers/Microsoft.Sql/managedInstances/migrationtestmi/providers/Microsoft.DataMigration/databaseMigrations/tsum-Db-mi-online-fs9","name":"tsum-Db-mi-online-fs9","type":"Microsoft.DataMigration/databaseMigrations"}' + headers: + cache-control: + - no-cache + content-length: + - '3308' + content-type: + - application/json; charset=utf-8 + date: + - Tue, 18 Jan 2022 12:28:48 GMT + expires: + - '-1' + pragma: + - no-cache + server: + - Microsoft-HTTPAPI/2.0 + strict-transport-security: + - max-age=31536000; includeSubDomains + transfer-encoding: + - chunked + vary: + - Accept-Encoding + x-content-type-options: + - nosniff + status: + code: 200 + message: OK +- request: + body: null + headers: + Accept: + - application/json + Accept-Encoding: + - gzip, deflate + CommandName: + - datamigration sql-managed-instance show + Connection: + - keep-alive + ParameterSetName: + - --managed-instance-name --resource-group --target-db-name --expand + User-Agent: + - AZURECLI/2.32.0 azsdk-python-mgmt-datamigration/1.0.0b1 Python/3.10.1 (Windows-10-10.0.22000-SP0) + method: GET + uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/MigrationTesting/providers/Microsoft.Sql/managedInstances/migrationtestmi/providers/Microsoft.DataMigration/databaseMigrations/tsum-Db-mi-online-fs9?$expand=MigrationStatusDetails&api-version=2021-10-30-preview + response: + body: + string: '{"properties":{"migrationStatusDetails":{"migrationState":"MonitorMigration","fullBackupSetInfo":{"backupSetId":"9fceb4b8-3864-45b6-bd35-998619297164","firstLSN":"486000000131000000","lastLSN":"486000000132600000","backupType":"Database","listOfBackupFiles":[{"fileName":"AdventureWorksFullBackup.bak","status":"Restoring","totalSize":63176192,"dataRead":63176192,"dataWritten":63176192,"copyThroughput":369.43399047851562,"copyDuration":167,"familySequenceNumber":1}],"backupStartDate":"2019-01-11T13:53:40Z","backupFinishDate":"2019-01-11T13:53:40Z","isBackupRestored":false,"hasBackupChecksums":true,"familyCount":1},"activeBackupSets":[{"backupSetId":"e6b60e53-c7b5-48dd-8f07-95f0caa66de1","firstLSN":"486000000145100000","lastLSN":"486000000145300000","backupType":"TransactionLog","listOfBackupFiles":[{"fileName":"AdventureWorksTransactionLog2.trn","status":"Arrived","totalSize":259584,"dataRead":0,"dataWritten":0,"copyThroughput":0.0,"copyDuration":0,"familySequenceNumber":1}],"backupStartDate":"2019-01-11T13:56:02Z","backupFinishDate":"2019-01-11T13:56:02Z","isBackupRestored":false,"hasBackupChecksums":true,"familyCount":1},{"backupSetId":"9fceb4b8-3864-45b6-bd35-998619297164","firstLSN":"486000000131000000","lastLSN":"486000000132600000","backupType":"Database","listOfBackupFiles":[{"fileName":"AdventureWorksFullBackup.bak","status":"Restoring","totalSize":63176192,"dataRead":63176192,"dataWritten":63176192,"copyThroughput":369.43399047851562,"copyDuration":167,"familySequenceNumber":1}],"backupStartDate":"2019-01-11T13:53:40Z","backupFinishDate":"2019-01-11T13:53:40Z","isBackupRestored":false,"hasBackupChecksums":true,"familyCount":1},{"backupSetId":"7bdfc66c-14d5-4acc-91d3-d9568cabc0e0","firstLSN":"486000000126400000","lastLSN":"486000000145100000","backupType":"TransactionLog","listOfBackupFiles":[{"fileName":"AdventureWorksTransactionLog1.trn","status":"Arrived","totalSize":325120,"dataRead":0,"dataWritten":0,"copyThroughput":0.0,"copyDuration":0,"familySequenceNumber":1}],"backupStartDate":"2019-01-11T13:55:21Z","backupFinishDate":"2019-01-11T13:55:21Z","isBackupRestored":false,"hasBackupChecksums":true,"familyCount":1}],"invalidFiles":["test + - Copy.txt","test.json","InvalidBackup %20+ `~1!2@3#4$5%6^7&8(9)0_-+=]}[{;'',, + ;+&[]~{}.txt"],"blobContainerName":"5b1d7d1b-0e2c-4bd1-bb47-2b209791eccd","isFullBackupRestored":false,"currentRestoringFilename":"AdventureWorksFullBackup.bak","pendingLogBackupsCount":2},"scope":"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/MigrationTesting/providers/Microsoft.Sql/managedInstances/migrationtestmi","provisioningState":"Succeeded","migrationStatus":"InProgress","startedOn":"2022-01-18T12:23:00.387Z","sourceDatabaseName":"AdventureWorks","migrationService":"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/tsum38RG/providers/Microsoft.DataMigration/sqlMigrationServices/sqlServiceUnitTest-Pipeline","migrationOperationId":"5b1d7d1b-0e2c-4bd1-bb47-2b209791eccd","kind":"SqlMi"},"id":"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/MigrationTesting/providers/Microsoft.Sql/managedInstances/migrationtestmi/providers/Microsoft.DataMigration/databaseMigrations/tsum-Db-mi-online-fs9","name":"tsum-Db-mi-online-fs9","type":"Microsoft.DataMigration/databaseMigrations"}' + headers: + cache-control: + - no-cache + content-length: + - '3308' + content-type: + - application/json; charset=utf-8 + date: + - Tue, 18 Jan 2022 12:28:59 GMT + expires: + - '-1' + pragma: + - no-cache + server: + - Microsoft-HTTPAPI/2.0 + strict-transport-security: + - max-age=31536000; includeSubDomains + transfer-encoding: + - chunked + vary: + - Accept-Encoding + x-content-type-options: + - nosniff + status: + code: 200 + message: OK +- request: + body: null + headers: + Accept: + - application/json + Accept-Encoding: + - gzip, deflate + CommandName: + - datamigration sql-managed-instance show + Connection: + - keep-alive + ParameterSetName: + - --managed-instance-name --resource-group --target-db-name --expand + User-Agent: + - AZURECLI/2.32.0 azsdk-python-mgmt-datamigration/1.0.0b1 Python/3.10.1 (Windows-10-10.0.22000-SP0) + method: GET + uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/MigrationTesting/providers/Microsoft.Sql/managedInstances/migrationtestmi/providers/Microsoft.DataMigration/databaseMigrations/tsum-Db-mi-online-fs9?$expand=MigrationStatusDetails&api-version=2021-10-30-preview + response: + body: + string: '{"properties":{"migrationStatusDetails":{"migrationState":"MonitorMigration","fullBackupSetInfo":{"backupSetId":"9fceb4b8-3864-45b6-bd35-998619297164","firstLSN":"486000000131000000","lastLSN":"486000000132600000","backupType":"Database","listOfBackupFiles":[{"fileName":"AdventureWorksFullBackup.bak","status":"Restoring","totalSize":63176192,"dataRead":63176192,"dataWritten":63176192,"copyThroughput":369.43399047851562,"copyDuration":167,"familySequenceNumber":1}],"backupStartDate":"2019-01-11T13:53:40Z","backupFinishDate":"2019-01-11T13:53:40Z","isBackupRestored":false,"hasBackupChecksums":true,"familyCount":1},"activeBackupSets":[{"backupSetId":"e6b60e53-c7b5-48dd-8f07-95f0caa66de1","firstLSN":"486000000145100000","lastLSN":"486000000145300000","backupType":"TransactionLog","listOfBackupFiles":[{"fileName":"AdventureWorksTransactionLog2.trn","status":"Arrived","totalSize":259584,"dataRead":0,"dataWritten":0,"copyThroughput":0.0,"copyDuration":0,"familySequenceNumber":1}],"backupStartDate":"2019-01-11T13:56:02Z","backupFinishDate":"2019-01-11T13:56:02Z","isBackupRestored":false,"hasBackupChecksums":true,"familyCount":1},{"backupSetId":"9fceb4b8-3864-45b6-bd35-998619297164","firstLSN":"486000000131000000","lastLSN":"486000000132600000","backupType":"Database","listOfBackupFiles":[{"fileName":"AdventureWorksFullBackup.bak","status":"Restoring","totalSize":63176192,"dataRead":63176192,"dataWritten":63176192,"copyThroughput":369.43399047851562,"copyDuration":167,"familySequenceNumber":1}],"backupStartDate":"2019-01-11T13:53:40Z","backupFinishDate":"2019-01-11T13:53:40Z","isBackupRestored":false,"hasBackupChecksums":true,"familyCount":1},{"backupSetId":"7bdfc66c-14d5-4acc-91d3-d9568cabc0e0","firstLSN":"486000000126400000","lastLSN":"486000000145100000","backupType":"TransactionLog","listOfBackupFiles":[{"fileName":"AdventureWorksTransactionLog1.trn","status":"Arrived","totalSize":325120,"dataRead":0,"dataWritten":0,"copyThroughput":0.0,"copyDuration":0,"familySequenceNumber":1}],"backupStartDate":"2019-01-11T13:55:21Z","backupFinishDate":"2019-01-11T13:55:21Z","isBackupRestored":false,"hasBackupChecksums":true,"familyCount":1}],"invalidFiles":["test + - Copy.txt","test.json","InvalidBackup %20+ `~1!2@3#4$5%6^7&8(9)0_-+=]}[{;'',, + ;+&[]~{}.txt"],"blobContainerName":"5b1d7d1b-0e2c-4bd1-bb47-2b209791eccd","isFullBackupRestored":false,"currentRestoringFilename":"AdventureWorksFullBackup.bak","pendingLogBackupsCount":2},"scope":"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/MigrationTesting/providers/Microsoft.Sql/managedInstances/migrationtestmi","provisioningState":"Succeeded","migrationStatus":"InProgress","startedOn":"2022-01-18T12:23:00.387Z","sourceDatabaseName":"AdventureWorks","migrationService":"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/tsum38RG/providers/Microsoft.DataMigration/sqlMigrationServices/sqlServiceUnitTest-Pipeline","migrationOperationId":"5b1d7d1b-0e2c-4bd1-bb47-2b209791eccd","kind":"SqlMi"},"id":"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/MigrationTesting/providers/Microsoft.Sql/managedInstances/migrationtestmi/providers/Microsoft.DataMigration/databaseMigrations/tsum-Db-mi-online-fs9","name":"tsum-Db-mi-online-fs9","type":"Microsoft.DataMigration/databaseMigrations"}' + headers: + cache-control: + - no-cache + content-length: + - '3308' + content-type: + - application/json; charset=utf-8 + date: + - Tue, 18 Jan 2022 12:29:11 GMT + expires: + - '-1' + pragma: + - no-cache + server: + - Microsoft-HTTPAPI/2.0 + strict-transport-security: + - max-age=31536000; includeSubDomains + transfer-encoding: + - chunked + vary: + - Accept-Encoding + x-content-type-options: + - nosniff + status: + code: 200 + message: OK +- request: + body: null + headers: + Accept: + - application/json + Accept-Encoding: + - gzip, deflate + CommandName: + - datamigration sql-managed-instance show + Connection: + - keep-alive + ParameterSetName: + - --managed-instance-name --resource-group --target-db-name --expand + User-Agent: + - AZURECLI/2.32.0 azsdk-python-mgmt-datamigration/1.0.0b1 Python/3.10.1 (Windows-10-10.0.22000-SP0) + method: GET + uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/MigrationTesting/providers/Microsoft.Sql/managedInstances/migrationtestmi/providers/Microsoft.DataMigration/databaseMigrations/tsum-Db-mi-online-fs9?$expand=MigrationStatusDetails&api-version=2021-10-30-preview + response: + body: + string: '{"properties":{"migrationStatusDetails":{"migrationState":"MonitorMigration","fullBackupSetInfo":{"backupSetId":"9fceb4b8-3864-45b6-bd35-998619297164","firstLSN":"486000000131000000","lastLSN":"486000000132600000","backupType":"Database","listOfBackupFiles":[{"fileName":"AdventureWorksFullBackup.bak","status":"Restoring","totalSize":63176192,"dataRead":63176192,"dataWritten":63176192,"copyThroughput":369.43399047851562,"copyDuration":167,"familySequenceNumber":1}],"backupStartDate":"2019-01-11T13:53:40Z","backupFinishDate":"2019-01-11T13:53:40Z","isBackupRestored":false,"hasBackupChecksums":true,"familyCount":1},"activeBackupSets":[{"backupSetId":"e6b60e53-c7b5-48dd-8f07-95f0caa66de1","firstLSN":"486000000145100000","lastLSN":"486000000145300000","backupType":"TransactionLog","listOfBackupFiles":[{"fileName":"AdventureWorksTransactionLog2.trn","status":"Arrived","totalSize":259584,"dataRead":0,"dataWritten":0,"copyThroughput":0.0,"copyDuration":0,"familySequenceNumber":1}],"backupStartDate":"2019-01-11T13:56:02Z","backupFinishDate":"2019-01-11T13:56:02Z","isBackupRestored":false,"hasBackupChecksums":true,"familyCount":1},{"backupSetId":"9fceb4b8-3864-45b6-bd35-998619297164","firstLSN":"486000000131000000","lastLSN":"486000000132600000","backupType":"Database","listOfBackupFiles":[{"fileName":"AdventureWorksFullBackup.bak","status":"Restoring","totalSize":63176192,"dataRead":63176192,"dataWritten":63176192,"copyThroughput":369.43399047851562,"copyDuration":167,"familySequenceNumber":1}],"backupStartDate":"2019-01-11T13:53:40Z","backupFinishDate":"2019-01-11T13:53:40Z","isBackupRestored":false,"hasBackupChecksums":true,"familyCount":1},{"backupSetId":"7bdfc66c-14d5-4acc-91d3-d9568cabc0e0","firstLSN":"486000000126400000","lastLSN":"486000000145100000","backupType":"TransactionLog","listOfBackupFiles":[{"fileName":"AdventureWorksTransactionLog1.trn","status":"Arrived","totalSize":325120,"dataRead":0,"dataWritten":0,"copyThroughput":0.0,"copyDuration":0,"familySequenceNumber":1}],"backupStartDate":"2019-01-11T13:55:21Z","backupFinishDate":"2019-01-11T13:55:21Z","isBackupRestored":false,"hasBackupChecksums":true,"familyCount":1}],"invalidFiles":["test + - Copy.txt","test.json","InvalidBackup %20+ `~1!2@3#4$5%6^7&8(9)0_-+=]}[{;'',, + ;+&[]~{}.txt"],"blobContainerName":"5b1d7d1b-0e2c-4bd1-bb47-2b209791eccd","isFullBackupRestored":false,"currentRestoringFilename":"AdventureWorksFullBackup.bak","pendingLogBackupsCount":2},"scope":"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/MigrationTesting/providers/Microsoft.Sql/managedInstances/migrationtestmi","provisioningState":"Succeeded","migrationStatus":"InProgress","startedOn":"2022-01-18T12:23:00.387Z","sourceDatabaseName":"AdventureWorks","migrationService":"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/tsum38RG/providers/Microsoft.DataMigration/sqlMigrationServices/sqlServiceUnitTest-Pipeline","migrationOperationId":"5b1d7d1b-0e2c-4bd1-bb47-2b209791eccd","kind":"SqlMi"},"id":"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/MigrationTesting/providers/Microsoft.Sql/managedInstances/migrationtestmi/providers/Microsoft.DataMigration/databaseMigrations/tsum-Db-mi-online-fs9","name":"tsum-Db-mi-online-fs9","type":"Microsoft.DataMigration/databaseMigrations"}' + headers: + cache-control: + - no-cache + content-length: + - '3308' + content-type: + - application/json; charset=utf-8 + date: + - Tue, 18 Jan 2022 12:29:24 GMT + expires: + - '-1' + pragma: + - no-cache + server: + - Microsoft-HTTPAPI/2.0 + strict-transport-security: + - max-age=31536000; includeSubDomains + transfer-encoding: + - chunked + vary: + - Accept-Encoding + x-content-type-options: + - nosniff + status: + code: 200 + message: OK +- request: + body: null + headers: + Accept: + - application/json + Accept-Encoding: + - gzip, deflate + CommandName: + - datamigration sql-managed-instance show + Connection: + - keep-alive + ParameterSetName: + - --managed-instance-name --resource-group --target-db-name --expand + User-Agent: + - AZURECLI/2.32.0 azsdk-python-mgmt-datamigration/1.0.0b1 Python/3.10.1 (Windows-10-10.0.22000-SP0) + method: GET + uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/MigrationTesting/providers/Microsoft.Sql/managedInstances/migrationtestmi/providers/Microsoft.DataMigration/databaseMigrations/tsum-Db-mi-online-fs9?$expand=MigrationStatusDetails&api-version=2021-10-30-preview + response: + body: + string: '{"properties":{"migrationStatusDetails":{"migrationState":"MonitorMigration","fullBackupSetInfo":{"backupSetId":"9fceb4b8-3864-45b6-bd35-998619297164","firstLSN":"486000000131000000","lastLSN":"486000000132600000","backupType":"Database","listOfBackupFiles":[{"fileName":"AdventureWorksFullBackup.bak","status":"Restored","totalSize":63176192,"dataRead":63176192,"dataWritten":63176192,"copyThroughput":369.43399047851562,"copyDuration":167,"familySequenceNumber":1}],"backupStartDate":"2019-01-11T13:53:40Z","backupFinishDate":"2019-01-11T13:53:40Z","isBackupRestored":true,"hasBackupChecksums":true,"familyCount":1},"activeBackupSets":[{"backupSetId":"e6b60e53-c7b5-48dd-8f07-95f0caa66de1","firstLSN":"486000000145100000","lastLSN":"486000000145300000","backupType":"TransactionLog","listOfBackupFiles":[{"fileName":"AdventureWorksTransactionLog2.trn","status":"Arrived","totalSize":259584,"dataRead":0,"dataWritten":0,"copyThroughput":0.0,"copyDuration":0,"familySequenceNumber":1}],"backupStartDate":"2019-01-11T13:56:02Z","backupFinishDate":"2019-01-11T13:56:02Z","isBackupRestored":false,"hasBackupChecksums":true,"familyCount":1},{"backupSetId":"9fceb4b8-3864-45b6-bd35-998619297164","firstLSN":"486000000131000000","lastLSN":"486000000132600000","backupType":"Database","listOfBackupFiles":[{"fileName":"AdventureWorksFullBackup.bak","status":"Restored","totalSize":63176192,"dataRead":63176192,"dataWritten":63176192,"copyThroughput":369.43399047851562,"copyDuration":167,"familySequenceNumber":1}],"backupStartDate":"2019-01-11T13:53:40Z","backupFinishDate":"2019-01-11T13:53:40Z","isBackupRestored":true,"hasBackupChecksums":true,"familyCount":1},{"backupSetId":"7bdfc66c-14d5-4acc-91d3-d9568cabc0e0","firstLSN":"486000000126400000","lastLSN":"486000000145100000","backupType":"TransactionLog","listOfBackupFiles":[{"fileName":"AdventureWorksTransactionLog1.trn","status":"Arrived","totalSize":325120,"dataRead":0,"dataWritten":0,"copyThroughput":0.0,"copyDuration":0,"familySequenceNumber":1}],"backupStartDate":"2019-01-11T13:55:21Z","backupFinishDate":"2019-01-11T13:55:21Z","isBackupRestored":false,"hasBackupChecksums":true,"familyCount":1}],"invalidFiles":["test + - Copy.txt","test.json","InvalidBackup %20+ `~1!2@3#4$5%6^7&8(9)0_-+=]}[{;'',, + ;+&[]~{}.txt"],"blobContainerName":"5b1d7d1b-0e2c-4bd1-bb47-2b209791eccd","isFullBackupRestored":true,"currentRestoringFilename":"AdventureWorksFullBackup.bak","lastRestoredFilename":"AdventureWorksFullBackup.bak","pendingLogBackupsCount":2},"scope":"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/MigrationTesting/providers/Microsoft.Sql/managedInstances/migrationtestmi","provisioningState":"Succeeded","migrationStatus":"InProgress","startedOn":"2022-01-18T12:23:00.387Z","sourceDatabaseName":"AdventureWorks","migrationService":"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/tsum38RG/providers/Microsoft.DataMigration/sqlMigrationServices/sqlServiceUnitTest-Pipeline","migrationOperationId":"5b1d7d1b-0e2c-4bd1-bb47-2b209791eccd","kind":"SqlMi"},"id":"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/MigrationTesting/providers/Microsoft.Sql/managedInstances/migrationtestmi/providers/Microsoft.DataMigration/databaseMigrations/tsum-Db-mi-online-fs9","name":"tsum-Db-mi-online-fs9","type":"Microsoft.DataMigration/databaseMigrations"}' + headers: + cache-control: + - no-cache + content-length: + - '3357' + content-type: + - application/json; charset=utf-8 + date: + - Tue, 18 Jan 2022 12:29:35 GMT + expires: + - '-1' + pragma: + - no-cache + server: + - Microsoft-HTTPAPI/2.0 + strict-transport-security: + - max-age=31536000; includeSubDomains + transfer-encoding: + - chunked + vary: + - Accept-Encoding + x-content-type-options: + - nosniff + status: + code: 200 + message: OK +- request: + body: '{"migrationOperationId": "5b1d7d1b-0e2c-4bd1-bb47-2b209791eccd"}' + headers: + Accept: + - '*/*' + Accept-Encoding: + - gzip, deflate + CommandName: + - datamigration sql-managed-instance cutover + Connection: + - keep-alive + Content-Length: + - '64' + Content-Type: + - application/json + ParameterSetName: + - --resource-group --managed-instance-name --target-db-name --migration-operation-id + User-Agent: + - AZURECLI/2.32.0 azsdk-python-mgmt-datamigration/1.0.0b1 Python/3.10.1 (Windows-10-10.0.22000-SP0) + method: POST + uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/MigrationTesting/providers/Microsoft.Sql/managedInstances/migrationtestmi/providers/Microsoft.DataMigration/databaseMigrations/tsum-Db-mi-online-fs9/cutover?api-version=2021-10-30-preview + response: + body: + string: '{"properties":{"scope":"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/MigrationTesting/providers/Microsoft.Sql/managedInstances/migrationtestmi","provisioningState":"Succeeded","migrationStatus":"InProgress","startedOn":"2022-01-18T12:23:00.387Z","sourceDatabaseName":"AdventureWorks","migrationService":"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/tsum38RG/providers/Microsoft.DataMigration/sqlMigrationServices/sqlServiceUnitTest-Pipeline","migrationOperationId":"5b1d7d1b-0e2c-4bd1-bb47-2b209791eccd","kind":"SqlMi"},"id":"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/MigrationTesting/providers/Microsoft.Sql/managedInstances/migrationtestmi/providers/Microsoft.DataMigration/databaseMigrations/tsum-Db-mi-online-fs9","name":"tsum-Db-mi-online-fs9","type":"Microsoft.DataMigration/databaseMigrations"}' + headers: + azure-asyncoperation: + - https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/providers/Microsoft.DataMigration/locations/eastus2euap/operationTypes/cutoversqlmimigration/operationResults/6d84ca72-f4fe-4aa1-8c6f-ff3d99351c63?api-version=2021-10-30-preview + cache-control: + - no-cache + content-length: + - '870' + content-type: + - application/json; charset=utf-8 + date: + - Tue, 18 Jan 2022 12:29:39 GMT + expires: + - '-1' + pragma: + - no-cache + server: + - Microsoft-HTTPAPI/2.0 + strict-transport-security: + - max-age=31536000; includeSubDomains + transfer-encoding: + - chunked + vary: + - Accept-Encoding + x-content-type-options: + - nosniff + x-ms-ratelimit-remaining-subscription-writes: + - '1199' + status: + code: 200 + message: OK +- request: + body: null + headers: + Accept: + - '*/*' + Accept-Encoding: + - gzip, deflate + CommandName: + - datamigration sql-managed-instance cutover + Connection: + - keep-alive + ParameterSetName: + - --resource-group --managed-instance-name --target-db-name --migration-operation-id + User-Agent: + - AZURECLI/2.32.0 azsdk-python-mgmt-datamigration/1.0.0b1 Python/3.10.1 (Windows-10-10.0.22000-SP0) + method: GET + uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/providers/Microsoft.DataMigration/locations/eastus2euap/operationTypes/cutoversqlmimigration/operationResults/6d84ca72-f4fe-4aa1-8c6f-ff3d99351c63?api-version=2021-10-30-preview + response: + body: + string: '{"name":"6d84ca72-f4fe-4aa1-8c6f-ff3d99351c63","status":"InProgress","startTime":"2022-01-18T12:29:38.463Z"}' + headers: + cache-control: + - no-cache + content-length: + - '108' + content-type: + - application/json; charset=utf-8 + date: + - Tue, 18 Jan 2022 12:29:54 GMT + expires: + - '-1' + pragma: + - no-cache + server: + - Microsoft-HTTPAPI/2.0 + strict-transport-security: + - max-age=31536000; includeSubDomains + transfer-encoding: + - chunked + vary: + - Accept-Encoding + x-content-type-options: + - nosniff + status: + code: 200 + message: OK +- request: + body: null + headers: + Accept: + - '*/*' + Accept-Encoding: + - gzip, deflate + CommandName: + - datamigration sql-managed-instance cutover + Connection: + - keep-alive + ParameterSetName: + - --resource-group --managed-instance-name --target-db-name --migration-operation-id + User-Agent: + - AZURECLI/2.32.0 azsdk-python-mgmt-datamigration/1.0.0b1 Python/3.10.1 (Windows-10-10.0.22000-SP0) + method: GET + uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/providers/Microsoft.DataMigration/locations/eastus2euap/operationTypes/cutoversqlmimigration/operationResults/6d84ca72-f4fe-4aa1-8c6f-ff3d99351c63?api-version=2021-10-30-preview + response: + body: + string: '{"name":"6d84ca72-f4fe-4aa1-8c6f-ff3d99351c63","status":"InProgress","startTime":"2022-01-18T12:29:38.463Z"}' + headers: + cache-control: + - no-cache + content-length: + - '108' + content-type: + - application/json; charset=utf-8 + date: + - Tue, 18 Jan 2022 12:30:10 GMT + expires: + - '-1' + pragma: + - no-cache + server: + - Microsoft-HTTPAPI/2.0 + strict-transport-security: + - max-age=31536000; includeSubDomains + transfer-encoding: + - chunked + vary: + - Accept-Encoding + x-content-type-options: + - nosniff + status: + code: 200 + message: OK +- request: + body: null + headers: + Accept: + - '*/*' + Accept-Encoding: + - gzip, deflate + CommandName: + - datamigration sql-managed-instance cutover + Connection: + - keep-alive + ParameterSetName: + - --resource-group --managed-instance-name --target-db-name --migration-operation-id + User-Agent: + - AZURECLI/2.32.0 azsdk-python-mgmt-datamigration/1.0.0b1 Python/3.10.1 (Windows-10-10.0.22000-SP0) + method: GET + uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/providers/Microsoft.DataMigration/locations/eastus2euap/operationTypes/cutoversqlmimigration/operationResults/6d84ca72-f4fe-4aa1-8c6f-ff3d99351c63?api-version=2021-10-30-preview + response: + body: + string: '{"name":"6d84ca72-f4fe-4aa1-8c6f-ff3d99351c63","status":"InProgress","startTime":"2022-01-18T12:29:38.463Z"}' + headers: + cache-control: + - no-cache + content-length: + - '108' + content-type: + - application/json; charset=utf-8 + date: + - Tue, 18 Jan 2022 12:30:25 GMT + expires: + - '-1' + pragma: + - no-cache + server: + - Microsoft-HTTPAPI/2.0 + strict-transport-security: + - max-age=31536000; includeSubDomains + transfer-encoding: + - chunked + vary: + - Accept-Encoding + x-content-type-options: + - nosniff + status: + code: 200 + message: OK +- request: + body: null + headers: + Accept: + - '*/*' + Accept-Encoding: + - gzip, deflate + CommandName: + - datamigration sql-managed-instance cutover + Connection: + - keep-alive + ParameterSetName: + - --resource-group --managed-instance-name --target-db-name --migration-operation-id + User-Agent: + - AZURECLI/2.32.0 azsdk-python-mgmt-datamigration/1.0.0b1 Python/3.10.1 (Windows-10-10.0.22000-SP0) + method: GET + uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/providers/Microsoft.DataMigration/locations/eastus2euap/operationTypes/cutoversqlmimigration/operationResults/6d84ca72-f4fe-4aa1-8c6f-ff3d99351c63?api-version=2021-10-30-preview + response: + body: + string: '{"name":"6d84ca72-f4fe-4aa1-8c6f-ff3d99351c63","status":"InProgress","startTime":"2022-01-18T12:29:38.463Z"}' + headers: + cache-control: + - no-cache + content-length: + - '108' + content-type: + - application/json; charset=utf-8 + date: + - Tue, 18 Jan 2022 12:30:40 GMT + expires: + - '-1' + pragma: + - no-cache + server: + - Microsoft-HTTPAPI/2.0 + strict-transport-security: + - max-age=31536000; includeSubDomains + transfer-encoding: + - chunked + vary: + - Accept-Encoding + x-content-type-options: + - nosniff + status: + code: 200 + message: OK +- request: + body: null + headers: + Accept: + - '*/*' + Accept-Encoding: + - gzip, deflate + CommandName: + - datamigration sql-managed-instance cutover + Connection: + - keep-alive + ParameterSetName: + - --resource-group --managed-instance-name --target-db-name --migration-operation-id + User-Agent: + - AZURECLI/2.32.0 azsdk-python-mgmt-datamigration/1.0.0b1 Python/3.10.1 (Windows-10-10.0.22000-SP0) + method: GET + uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/providers/Microsoft.DataMigration/locations/eastus2euap/operationTypes/cutoversqlmimigration/operationResults/6d84ca72-f4fe-4aa1-8c6f-ff3d99351c63?api-version=2021-10-30-preview + response: + body: + string: '{"name":"6d84ca72-f4fe-4aa1-8c6f-ff3d99351c63","status":"Succeeded","startTime":"2022-01-18T12:29:38.463Z"}' + headers: + cache-control: + - no-cache + content-length: + - '107' + content-type: + - application/json; charset=utf-8 + date: + - Tue, 18 Jan 2022 12:30:56 GMT + expires: + - '-1' + pragma: + - no-cache + server: + - Microsoft-HTTPAPI/2.0 + strict-transport-security: + - max-age=31536000; includeSubDomains + transfer-encoding: + - chunked + vary: + - Accept-Encoding + x-content-type-options: + - nosniff + status: + code: 200 + message: OK +- request: + body: null + headers: + Accept: + - application/json + Accept-Encoding: + - gzip, deflate + CommandName: + - datamigration sql-managed-instance show + Connection: + - keep-alive + ParameterSetName: + - --resource-group --managed-instance-name --target-db-name + User-Agent: + - AZURECLI/2.32.0 azsdk-python-mgmt-datamigration/1.0.0b1 Python/3.10.1 (Windows-10-10.0.22000-SP0) + method: GET + uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/MigrationTesting/providers/Microsoft.Sql/managedInstances/migrationtestmi/providers/Microsoft.DataMigration/databaseMigrations/tsum-Db-mi-online-fs9?api-version=2021-10-30-preview + response: + body: + string: '{"properties":{"scope":"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/MigrationTesting/providers/Microsoft.Sql/managedInstances/migrationtestmi","provisioningState":"Succeeded","migrationStatus":"Succeeded","startedOn":"2022-01-18T12:23:00.387Z","endedOn":"2022-01-18T12:30:43.86Z","sourceDatabaseName":"AdventureWorks","migrationService":"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/tsum38RG/providers/Microsoft.DataMigration/sqlMigrationServices/sqlServiceUnitTest-Pipeline","migrationOperationId":"5b1d7d1b-0e2c-4bd1-bb47-2b209791eccd","kind":"SqlMi"},"id":"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/MigrationTesting/providers/Microsoft.Sql/managedInstances/migrationtestmi/providers/Microsoft.DataMigration/databaseMigrations/tsum-Db-mi-online-fs9","name":"tsum-Db-mi-online-fs9","type":"Microsoft.DataMigration/databaseMigrations"}' + headers: + cache-control: + - no-cache + content-length: + - '905' + content-type: + - application/json; charset=utf-8 + date: + - Tue, 18 Jan 2022 12:30:58 GMT + expires: + - '-1' + pragma: + - no-cache + server: + - Microsoft-HTTPAPI/2.0 + strict-transport-security: + - max-age=31536000; includeSubDomains + transfer-encoding: + - chunked + vary: + - Accept-Encoding + x-content-type-options: + - nosniff + status: + code: 200 + message: OK +- request: + body: '{"properties": {"kind": "SqlMi", "scope": "/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/MigrationTesting/providers/Microsoft.Sql/managedInstances/migrationtestmi", + "sourceSqlConnection": {"dataSource": "AALAB03-2K8.REDMOND.CORP.MICROSOFT.COM", + "authentication": "SqlAuthentication", "userName": "hijavatestuser1", "password": + "XXXXXXXXXXXX"}, "sourceDatabaseName": "AdventureWorks", "migrationService": + "/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/tsum38RG/providers/Microsoft.DataMigration/SqlMigrationServices/sqlServiceUnitTest-Pipeline", + "backupConfiguration": {"sourceLocation": {"azureBlob": {"storageAccountResourceId": + "/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/tzppesignoff1211/providers/Microsoft.Storage/storageAccounts/hijavateststorage", + "accountKey": "XXXXXXXXXXXX/XXXXXXXXXXXX", + "blobContainerName": "tsum38-adventureworks"}}, "targetLocation": {"storageAccountResourceId": + "/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/aaskhan/providers/Microsoft.Storage/storageAccounts/aasimmigrationtest", + "accountKey": "XXXXXXXXXXXX/XXXXXXXXXXXX"}}}}' + headers: + Accept: + - application/json + Accept-Encoding: + - gzip, deflate + CommandName: + - datamigration sql-managed-instance create + Connection: + - keep-alive + Content-Length: + - '1271' + Content-Type: + - application/json + ParameterSetName: + - --source-location --target-location --migration-service --scope --source-database-name + --source-sql-connection --target-db-name --resource-group --managed-instance-name + User-Agent: + - AZURECLI/2.32.0 azsdk-python-mgmt-datamigration/1.0.0b1 Python/3.10.1 (Windows-10-10.0.22000-SP0) + method: PUT + uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/MigrationTesting/providers/Microsoft.Sql/managedInstances/migrationtestmi/providers/Microsoft.DataMigration/databaseMigrations/tsum-Db-mi-online-blob9?api-version=2021-10-30-preview + response: + body: + string: '{"properties":{"scope":"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/MigrationTesting/providers/Microsoft.Sql/managedInstances/migrationtestmi","provisioningState":"Creating","sourceDatabaseName":"AdventureWorks","migrationService":"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/tsum38RG/providers/Microsoft.DataMigration/sqlMigrationServices/sqlServiceUnitTest-Pipeline","kind":"SqlMi"},"id":"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/MigrationTesting/providers/Microsoft.Sql/managedInstances/migrationtestmi/providers/Microsoft.DataMigration/databaseMigrations/tsum-Db-mi-online-blob9","name":"tsum-Db-mi-online-blob9","type":"Microsoft.DataMigration/databaseMigrations"}' + headers: + azure-asyncoperation: + - https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/providers/Microsoft.DataMigration/locations/eastus2euap/operationTypes/createsqlmimigration/operationResults/3240ef81-26a4-4ed3-9945-b1bdf73559ba?api-version=2021-10-30-preview + cache-control: + - no-cache + content-length: + - '741' + content-type: + - application/json; charset=utf-8 + date: + - Tue, 18 Jan 2022 12:31:00 GMT + expires: + - '-1' + pragma: + - no-cache + server: + - Microsoft-HTTPAPI/2.0 + strict-transport-security: + - max-age=31536000; includeSubDomains + x-content-type-options: + - nosniff + x-ms-ratelimit-remaining-subscription-writes: + - '1199' + status: + code: 201 + message: Created +- request: + body: null + headers: + Accept: + - '*/*' + Accept-Encoding: + - gzip, deflate + CommandName: + - datamigration sql-managed-instance create + Connection: + - keep-alive + ParameterSetName: + - --source-location --target-location --migration-service --scope --source-database-name + --source-sql-connection --target-db-name --resource-group --managed-instance-name + User-Agent: + - AZURECLI/2.32.0 azsdk-python-mgmt-datamigration/1.0.0b1 Python/3.10.1 (Windows-10-10.0.22000-SP0) + method: GET + uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/providers/Microsoft.DataMigration/locations/eastus2euap/operationTypes/createsqlmimigration/operationResults/3240ef81-26a4-4ed3-9945-b1bdf73559ba?api-version=2021-10-30-preview + response: + body: + string: '{"name":"3240ef81-26a4-4ed3-9945-b1bdf73559ba","status":"Succeeded","startTime":"2022-01-18T12:31:00.173Z"}' + headers: + cache-control: + - no-cache + content-length: + - '107' + content-type: + - application/json; charset=utf-8 + date: + - Tue, 18 Jan 2022 12:31:16 GMT + expires: + - '-1' + pragma: + - no-cache + server: + - Microsoft-HTTPAPI/2.0 + strict-transport-security: + - max-age=31536000; includeSubDomains + transfer-encoding: + - chunked + vary: + - Accept-Encoding + x-content-type-options: + - nosniff + status: + code: 200 + message: OK +- request: + body: null + headers: + Accept: + - '*/*' + Accept-Encoding: + - gzip, deflate + CommandName: + - datamigration sql-managed-instance create + Connection: + - keep-alive + ParameterSetName: + - --source-location --target-location --migration-service --scope --source-database-name + --source-sql-connection --target-db-name --resource-group --managed-instance-name + User-Agent: + - AZURECLI/2.32.0 azsdk-python-mgmt-datamigration/1.0.0b1 Python/3.10.1 (Windows-10-10.0.22000-SP0) + method: GET + uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/MigrationTesting/providers/Microsoft.Sql/managedInstances/migrationtestmi/providers/Microsoft.DataMigration/databaseMigrations/tsum-Db-mi-online-blob9?api-version=2021-10-30-preview + response: + body: + string: '{"properties":{"scope":"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/MigrationTesting/providers/Microsoft.Sql/managedInstances/migrationtestmi","provisioningState":"Succeeded","migrationStatus":"InProgress","startedOn":"2022-01-18T12:31:00.517Z","sourceDatabaseName":"AdventureWorks","migrationService":"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/tsum38RG/providers/Microsoft.DataMigration/sqlMigrationServices/sqlServiceUnitTest-Pipeline","migrationOperationId":"50e46d33-15df-4deb-8cbe-50a0facbe626","kind":"SqlMi"},"id":"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/MigrationTesting/providers/Microsoft.Sql/managedInstances/migrationtestmi/providers/Microsoft.DataMigration/databaseMigrations/tsum-Db-mi-online-blob9","name":"tsum-Db-mi-online-blob9","type":"Microsoft.DataMigration/databaseMigrations"}' + headers: + cache-control: + - no-cache + content-length: + - '874' + content-type: + - application/json; charset=utf-8 + date: + - Tue, 18 Jan 2022 12:31:16 GMT + expires: + - '-1' + pragma: + - no-cache + server: + - Microsoft-HTTPAPI/2.0 + strict-transport-security: + - max-age=31536000; includeSubDomains + transfer-encoding: + - chunked + vary: + - Accept-Encoding + x-content-type-options: + - nosniff + status: + code: 200 + message: OK +- request: + body: null + headers: + Accept: + - application/json + Accept-Encoding: + - gzip, deflate + CommandName: + - datamigration sql-managed-instance show + Connection: + - keep-alive + ParameterSetName: + - --managed-instance-name --resource-group --target-db-name --expand + User-Agent: + - AZURECLI/2.32.0 azsdk-python-mgmt-datamigration/1.0.0b1 Python/3.10.1 (Windows-10-10.0.22000-SP0) + method: GET + uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/MigrationTesting/providers/Microsoft.Sql/managedInstances/migrationtestmi/providers/Microsoft.DataMigration/databaseMigrations/tsum-Db-mi-online-blob9?$expand=MigrationStatusDetails&api-version=2021-10-30-preview + response: + body: + string: '{"properties":{"migrationStatusDetails":{"migrationState":"MonitorMigration","blobContainerName":"tsum38-adventureworks","pendingLogBackupsCount":0},"scope":"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/MigrationTesting/providers/Microsoft.Sql/managedInstances/migrationtestmi","provisioningState":"Succeeded","migrationStatus":"InProgress","startedOn":"2022-01-18T12:31:00.517Z","sourceDatabaseName":"AdventureWorks","migrationService":"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/tsum38RG/providers/Microsoft.DataMigration/sqlMigrationServices/sqlServiceUnitTest-Pipeline","migrationOperationId":"50e46d33-15df-4deb-8cbe-50a0facbe626","kind":"SqlMi"},"id":"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/MigrationTesting/providers/Microsoft.Sql/managedInstances/migrationtestmi/providers/Microsoft.DataMigration/databaseMigrations/tsum-Db-mi-online-blob9","name":"tsum-Db-mi-online-blob9","type":"Microsoft.DataMigration/databaseMigrations"}' + headers: + cache-control: + - no-cache + content-length: + - '1008' + content-type: + - application/json; charset=utf-8 + date: + - Tue, 18 Jan 2022 12:31:18 GMT + expires: + - '-1' + pragma: + - no-cache + server: + - Microsoft-HTTPAPI/2.0 + strict-transport-security: + - max-age=31536000; includeSubDomains + transfer-encoding: + - chunked + vary: + - Accept-Encoding + x-content-type-options: + - nosniff + status: + code: 200 + message: OK +- request: + body: '{"migrationOperationId": "50e46d33-15df-4deb-8cbe-50a0facbe626"}' + headers: + Accept: + - '*/*' + Accept-Encoding: + - gzip, deflate + CommandName: + - datamigration sql-managed-instance cancel + Connection: + - keep-alive + Content-Length: + - '64' + Content-Type: + - application/json + ParameterSetName: + - --resource-group --managed-instance-name --target-db-name --migration-operation-id + User-Agent: + - AZURECLI/2.32.0 azsdk-python-mgmt-datamigration/1.0.0b1 Python/3.10.1 (Windows-10-10.0.22000-SP0) + method: POST + uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/MigrationTesting/providers/Microsoft.Sql/managedInstances/migrationtestmi/providers/Microsoft.DataMigration/databaseMigrations/tsum-Db-mi-online-blob9/cancel?api-version=2021-10-30-preview + response: + body: + string: '{"properties":{"scope":"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/MigrationTesting/providers/Microsoft.Sql/managedInstances/migrationtestmi","provisioningState":"Canceling","sourceDatabaseName":"AdventureWorks","kind":"SqlMi"},"id":"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/MigrationTesting/providers/Microsoft.Sql/managedInstances/migrationtestmi/providers/Microsoft.DataMigration/databaseMigrations/tsum-Db-mi-online-blob9","name":"tsum-Db-mi-online-blob9","type":"Microsoft.DataMigration/databaseMigrations"}' + headers: + azure-asyncoperation: + - https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/providers/Microsoft.DataMigration/locations/eastus2euap/operationTypes/cancelsqlmimigration/operationResults/3fb5961a-2d4f-4c2c-823e-fae5272119cd?api-version=2021-10-30-preview + cache-control: + - no-cache + content-length: + - '562' + content-type: + - application/json; charset=utf-8 + date: + - Tue, 18 Jan 2022 12:31:21 GMT + expires: + - '-1' + pragma: + - no-cache + server: + - Microsoft-HTTPAPI/2.0 + strict-transport-security: + - max-age=31536000; includeSubDomains + transfer-encoding: + - chunked + vary: + - Accept-Encoding + x-content-type-options: + - nosniff + x-ms-ratelimit-remaining-subscription-writes: + - '1199' + status: + code: 200 + message: OK +- request: + body: null + headers: + Accept: + - '*/*' + Accept-Encoding: + - gzip, deflate + CommandName: + - datamigration sql-managed-instance cancel + Connection: + - keep-alive + ParameterSetName: + - --resource-group --managed-instance-name --target-db-name --migration-operation-id + User-Agent: + - AZURECLI/2.32.0 azsdk-python-mgmt-datamigration/1.0.0b1 Python/3.10.1 (Windows-10-10.0.22000-SP0) + method: GET + uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/providers/Microsoft.DataMigration/locations/eastus2euap/operationTypes/cancelsqlmimigration/operationResults/3fb5961a-2d4f-4c2c-823e-fae5272119cd?api-version=2021-10-30-preview + response: + body: + string: '{"name":"3fb5961a-2d4f-4c2c-823e-fae5272119cd","status":"InProgress","startTime":"2022-01-18T12:31:21.263Z"}' + headers: + cache-control: + - no-cache + content-length: + - '108' + content-type: + - application/json; charset=utf-8 + date: + - Tue, 18 Jan 2022 12:31:36 GMT + expires: + - '-1' + pragma: + - no-cache + server: + - Microsoft-HTTPAPI/2.0 + strict-transport-security: + - max-age=31536000; includeSubDomains + transfer-encoding: + - chunked + vary: + - Accept-Encoding + x-content-type-options: + - nosniff + status: + code: 200 + message: OK +- request: + body: null + headers: + Accept: + - '*/*' + Accept-Encoding: + - gzip, deflate + CommandName: + - datamigration sql-managed-instance cancel + Connection: + - keep-alive + ParameterSetName: + - --resource-group --managed-instance-name --target-db-name --migration-operation-id + User-Agent: + - AZURECLI/2.32.0 azsdk-python-mgmt-datamigration/1.0.0b1 Python/3.10.1 (Windows-10-10.0.22000-SP0) + method: GET + uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/providers/Microsoft.DataMigration/locations/eastus2euap/operationTypes/cancelsqlmimigration/operationResults/3fb5961a-2d4f-4c2c-823e-fae5272119cd?api-version=2021-10-30-preview + response: + body: + string: '{"name":"3fb5961a-2d4f-4c2c-823e-fae5272119cd","status":"InProgress","startTime":"2022-01-18T12:31:21.263Z"}' + headers: + cache-control: + - no-cache + content-length: + - '108' + content-type: + - application/json; charset=utf-8 + date: + - Tue, 18 Jan 2022 12:31:52 GMT + expires: + - '-1' + pragma: + - no-cache + server: + - Microsoft-HTTPAPI/2.0 + strict-transport-security: + - max-age=31536000; includeSubDomains + transfer-encoding: + - chunked + vary: + - Accept-Encoding + x-content-type-options: + - nosniff + status: + code: 200 + message: OK +- request: + body: null + headers: + Accept: + - '*/*' + Accept-Encoding: + - gzip, deflate + CommandName: + - datamigration sql-managed-instance cancel + Connection: + - keep-alive + ParameterSetName: + - --resource-group --managed-instance-name --target-db-name --migration-operation-id + User-Agent: + - AZURECLI/2.32.0 azsdk-python-mgmt-datamigration/1.0.0b1 Python/3.10.1 (Windows-10-10.0.22000-SP0) + method: GET + uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/providers/Microsoft.DataMigration/locations/eastus2euap/operationTypes/cancelsqlmimigration/operationResults/3fb5961a-2d4f-4c2c-823e-fae5272119cd?api-version=2021-10-30-preview + response: + body: + string: '{"name":"3fb5961a-2d4f-4c2c-823e-fae5272119cd","status":"InProgress","startTime":"2022-01-18T12:31:21.263Z"}' + headers: + cache-control: + - no-cache + content-length: + - '108' + content-type: + - application/json; charset=utf-8 + date: + - Tue, 18 Jan 2022 12:32:08 GMT + expires: + - '-1' + pragma: + - no-cache + server: + - Microsoft-HTTPAPI/2.0 + strict-transport-security: + - max-age=31536000; includeSubDomains + transfer-encoding: + - chunked + vary: + - Accept-Encoding + x-content-type-options: + - nosniff + status: + code: 200 + message: OK +- request: + body: null + headers: + Accept: + - '*/*' + Accept-Encoding: + - gzip, deflate + CommandName: + - datamigration sql-managed-instance cancel + Connection: + - keep-alive + ParameterSetName: + - --resource-group --managed-instance-name --target-db-name --migration-operation-id + User-Agent: + - AZURECLI/2.32.0 azsdk-python-mgmt-datamigration/1.0.0b1 Python/3.10.1 (Windows-10-10.0.22000-SP0) + method: GET + uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/providers/Microsoft.DataMigration/locations/eastus2euap/operationTypes/cancelsqlmimigration/operationResults/3fb5961a-2d4f-4c2c-823e-fae5272119cd?api-version=2021-10-30-preview + response: + body: + string: '{"name":"3fb5961a-2d4f-4c2c-823e-fae5272119cd","status":"InProgress","startTime":"2022-01-18T12:31:21.263Z"}' + headers: + cache-control: + - no-cache + content-length: + - '108' + content-type: + - application/json; charset=utf-8 + date: + - Tue, 18 Jan 2022 12:32:23 GMT + expires: + - '-1' + pragma: + - no-cache + server: + - Microsoft-HTTPAPI/2.0 + strict-transport-security: + - max-age=31536000; includeSubDomains + transfer-encoding: + - chunked + vary: + - Accept-Encoding + x-content-type-options: + - nosniff + status: + code: 200 + message: OK +- request: + body: null + headers: + Accept: + - '*/*' + Accept-Encoding: + - gzip, deflate + CommandName: + - datamigration sql-managed-instance cancel + Connection: + - keep-alive + ParameterSetName: + - --resource-group --managed-instance-name --target-db-name --migration-operation-id + User-Agent: + - AZURECLI/2.32.0 azsdk-python-mgmt-datamigration/1.0.0b1 Python/3.10.1 (Windows-10-10.0.22000-SP0) + method: GET + uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/providers/Microsoft.DataMigration/locations/eastus2euap/operationTypes/cancelsqlmimigration/operationResults/3fb5961a-2d4f-4c2c-823e-fae5272119cd?api-version=2021-10-30-preview + response: + body: + string: '{"name":"3fb5961a-2d4f-4c2c-823e-fae5272119cd","status":"InProgress","startTime":"2022-01-18T12:31:21.263Z"}' + headers: + cache-control: + - no-cache + content-length: + - '108' + content-type: + - application/json; charset=utf-8 + date: + - Tue, 18 Jan 2022 12:32:38 GMT + expires: + - '-1' + pragma: + - no-cache + server: + - Microsoft-HTTPAPI/2.0 + strict-transport-security: + - max-age=31536000; includeSubDomains + transfer-encoding: + - chunked + vary: + - Accept-Encoding + x-content-type-options: + - nosniff + status: + code: 200 + message: OK +- request: + body: null + headers: + Accept: + - '*/*' + Accept-Encoding: + - gzip, deflate + CommandName: + - datamigration sql-managed-instance cancel + Connection: + - keep-alive + ParameterSetName: + - --resource-group --managed-instance-name --target-db-name --migration-operation-id + User-Agent: + - AZURECLI/2.32.0 azsdk-python-mgmt-datamigration/1.0.0b1 Python/3.10.1 (Windows-10-10.0.22000-SP0) + method: GET + uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/providers/Microsoft.DataMigration/locations/eastus2euap/operationTypes/cancelsqlmimigration/operationResults/3fb5961a-2d4f-4c2c-823e-fae5272119cd?api-version=2021-10-30-preview + response: + body: + string: '{"name":"3fb5961a-2d4f-4c2c-823e-fae5272119cd","status":"InProgress","startTime":"2022-01-18T12:31:21.263Z"}' + headers: + cache-control: + - no-cache + content-length: + - '108' + content-type: + - application/json; charset=utf-8 + date: + - Tue, 18 Jan 2022 12:32:54 GMT + expires: + - '-1' + pragma: + - no-cache + server: + - Microsoft-HTTPAPI/2.0 + strict-transport-security: + - max-age=31536000; includeSubDomains + transfer-encoding: + - chunked + vary: + - Accept-Encoding + x-content-type-options: + - nosniff + status: + code: 200 + message: OK +- request: + body: null + headers: + Accept: + - '*/*' + Accept-Encoding: + - gzip, deflate + CommandName: + - datamigration sql-managed-instance cancel + Connection: + - keep-alive + ParameterSetName: + - --resource-group --managed-instance-name --target-db-name --migration-operation-id + User-Agent: + - AZURECLI/2.32.0 azsdk-python-mgmt-datamigration/1.0.0b1 Python/3.10.1 (Windows-10-10.0.22000-SP0) + method: GET + uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/providers/Microsoft.DataMigration/locations/eastus2euap/operationTypes/cancelsqlmimigration/operationResults/3fb5961a-2d4f-4c2c-823e-fae5272119cd?api-version=2021-10-30-preview + response: + body: + string: '{"name":"3fb5961a-2d4f-4c2c-823e-fae5272119cd","status":"InProgress","startTime":"2022-01-18T12:31:21.263Z"}' + headers: + cache-control: + - no-cache + content-length: + - '108' + content-type: + - application/json; charset=utf-8 + date: + - Tue, 18 Jan 2022 12:33:09 GMT + expires: + - '-1' + pragma: + - no-cache + server: + - Microsoft-HTTPAPI/2.0 + strict-transport-security: + - max-age=31536000; includeSubDomains + transfer-encoding: + - chunked + vary: + - Accept-Encoding + x-content-type-options: + - nosniff + status: + code: 200 + message: OK +- request: + body: null + headers: + Accept: + - '*/*' + Accept-Encoding: + - gzip, deflate + CommandName: + - datamigration sql-managed-instance cancel + Connection: + - keep-alive + ParameterSetName: + - --resource-group --managed-instance-name --target-db-name --migration-operation-id + User-Agent: + - AZURECLI/2.32.0 azsdk-python-mgmt-datamigration/1.0.0b1 Python/3.10.1 (Windows-10-10.0.22000-SP0) + method: GET + uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/providers/Microsoft.DataMigration/locations/eastus2euap/operationTypes/cancelsqlmimigration/operationResults/3fb5961a-2d4f-4c2c-823e-fae5272119cd?api-version=2021-10-30-preview + response: + body: + string: '{"name":"3fb5961a-2d4f-4c2c-823e-fae5272119cd","status":"Succeeded","startTime":"2022-01-18T12:31:21.263Z"}' + headers: + cache-control: + - no-cache + content-length: + - '107' + content-type: + - application/json; charset=utf-8 + date: + - Tue, 18 Jan 2022 12:33:25 GMT + expires: + - '-1' + pragma: + - no-cache + server: + - Microsoft-HTTPAPI/2.0 + strict-transport-security: + - max-age=31536000; includeSubDomains + transfer-encoding: + - chunked + vary: + - Accept-Encoding + x-content-type-options: + - nosniff + status: + code: 200 + message: OK +- request: + body: '{"properties": {"kind": "SqlVm", "scope": "/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/tsum38RG/providers/Microsoft.SqlVirtualMachine/SqlVirtualMachines/DMSCmdletTest-SqlVM", + "sourceSqlConnection": {"dataSource": "AALAB03-2K8.REDMOND.CORP.MICROSOFT.COM", + "authentication": "SqlAuthentication", "userName": "hijavatestuser1", "password": + "XXXXXXXXXXXX"}, "sourceDatabaseName": "AdventureWorks", "migrationService": + "/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/tsum38RG/providers/Microsoft.DataMigration/SqlMigrationServices/sqlServiceUnitTest-Pipeline", + "backupConfiguration": {"sourceLocation": {"fileShare": {"path": "\\\\aalab03-2k8.redmond.corp.microsoft.com\\SharedBackup\\tsuman", + "username": "AALAB03-2K8\\hijavatestlocaluser", "password": "XXXXXXXXXXXX"}}, + "targetLocation": {"storageAccountResourceId": "/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/aaskhan/providers/Microsoft.Storage/storageAccounts/aasimmigrationtest", + "accountKey": "XXXXXXXXXXXX/XXXXXXXXXXXX"}}}}' + headers: + Accept: + - application/json + Accept-Encoding: + - gzip, deflate + CommandName: + - datamigration sql-vm create + Connection: + - keep-alive + Content-Length: + - '1106' + Content-Type: + - application/json + ParameterSetName: + - --source-location --target-location --migration-service --scope --source-database-name + --source-sql-connection --target-db-name --resource-group --sql-vm-name + User-Agent: + - AZURECLI/2.32.0 azsdk-python-mgmt-datamigration/1.0.0b1 Python/3.10.1 (Windows-10-10.0.22000-SP0) + method: PUT + uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/tsum38RG/providers/Microsoft.SqlVirtualMachine/sqlVirtualMachines/DMSCmdletTest-SqlVM/providers/Microsoft.DataMigration/databaseMigrations/tsum-Db-vm-online-fs9?api-version=2021-10-30-preview + response: + body: + string: '{"properties":{"scope":"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/tsum38RG/providers/Microsoft.SqlVirtualMachine/sqlVirtualMachines/DMSCmdletTest-SqlVM","provisioningState":"Creating","sourceDatabaseName":"AdventureWorks","migrationService":"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/tsum38RG/providers/Microsoft.DataMigration/sqlMigrationServices/sqlServiceUnitTest-Pipeline","kind":"SqlVm"},"id":"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/tsum38RG/providers/Microsoft.SqlVirtualMachine/sqlVirtualMachines/DMSCmdletTest-SqlVM/providers/Microsoft.DataMigration/databaseMigrations/tsum-Db-vm-online-fs9","name":"tsum-Db-vm-online-fs9","type":"Microsoft.DataMigration/databaseMigrations"}' + headers: + azure-asyncoperation: + - https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/providers/Microsoft.DataMigration/locations/eastus2euap/operationTypes/createsqlvmmigration/operationResults/834dc234-c23f-41bb-aa3a-e440579e2f0d?api-version=2021-10-30-preview + cache-control: + - no-cache + content-length: + - '761' + content-type: + - application/json; charset=utf-8 + date: + - Tue, 18 Jan 2022 12:33:28 GMT + expires: + - '-1' + pragma: + - no-cache + server: + - Microsoft-HTTPAPI/2.0 + strict-transport-security: + - max-age=31536000; includeSubDomains + x-content-type-options: + - nosniff + x-ms-ratelimit-remaining-subscription-writes: + - '1198' + status: + code: 201 + message: Created +- request: + body: null + headers: + Accept: + - '*/*' + Accept-Encoding: + - gzip, deflate + CommandName: + - datamigration sql-vm create + Connection: + - keep-alive + ParameterSetName: + - --source-location --target-location --migration-service --scope --source-database-name + --source-sql-connection --target-db-name --resource-group --sql-vm-name + User-Agent: + - AZURECLI/2.32.0 azsdk-python-mgmt-datamigration/1.0.0b1 Python/3.10.1 (Windows-10-10.0.22000-SP0) + method: GET + uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/providers/Microsoft.DataMigration/locations/eastus2euap/operationTypes/createsqlvmmigration/operationResults/834dc234-c23f-41bb-aa3a-e440579e2f0d?api-version=2021-10-30-preview + response: + body: + string: '{"name":"834dc234-c23f-41bb-aa3a-e440579e2f0d","status":"InProgress","startTime":"2022-01-18T12:33:27.483Z"}' + headers: + cache-control: + - no-cache + content-length: + - '108' + content-type: + - application/json; charset=utf-8 + date: + - Tue, 18 Jan 2022 12:33:43 GMT + expires: + - '-1' + pragma: + - no-cache + server: + - Microsoft-HTTPAPI/2.0 + strict-transport-security: + - max-age=31536000; includeSubDomains + transfer-encoding: + - chunked + vary: + - Accept-Encoding + x-content-type-options: + - nosniff + status: + code: 200 + message: OK +- request: + body: null + headers: + Accept: + - '*/*' + Accept-Encoding: + - gzip, deflate + CommandName: + - datamigration sql-vm create + Connection: + - keep-alive + ParameterSetName: + - --source-location --target-location --migration-service --scope --source-database-name + --source-sql-connection --target-db-name --resource-group --sql-vm-name + User-Agent: + - AZURECLI/2.32.0 azsdk-python-mgmt-datamigration/1.0.0b1 Python/3.10.1 (Windows-10-10.0.22000-SP0) + method: GET + uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/providers/Microsoft.DataMigration/locations/eastus2euap/operationTypes/createsqlvmmigration/operationResults/834dc234-c23f-41bb-aa3a-e440579e2f0d?api-version=2021-10-30-preview + response: + body: + string: '{"name":"834dc234-c23f-41bb-aa3a-e440579e2f0d","status":"InProgress","startTime":"2022-01-18T12:33:27.483Z"}' + headers: + cache-control: + - no-cache + content-length: + - '108' + content-type: + - application/json; charset=utf-8 + date: + - Tue, 18 Jan 2022 12:33:58 GMT + expires: + - '-1' + pragma: + - no-cache + server: + - Microsoft-HTTPAPI/2.0 + strict-transport-security: + - max-age=31536000; includeSubDomains + transfer-encoding: + - chunked + vary: + - Accept-Encoding + x-content-type-options: + - nosniff + status: + code: 200 + message: OK +- request: + body: null + headers: + Accept: + - '*/*' + Accept-Encoding: + - gzip, deflate + CommandName: + - datamigration sql-vm create + Connection: + - keep-alive + ParameterSetName: + - --source-location --target-location --migration-service --scope --source-database-name + --source-sql-connection --target-db-name --resource-group --sql-vm-name + User-Agent: + - AZURECLI/2.32.0 azsdk-python-mgmt-datamigration/1.0.0b1 Python/3.10.1 (Windows-10-10.0.22000-SP0) + method: GET + uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/providers/Microsoft.DataMigration/locations/eastus2euap/operationTypes/createsqlvmmigration/operationResults/834dc234-c23f-41bb-aa3a-e440579e2f0d?api-version=2021-10-30-preview + response: + body: + string: '{"name":"834dc234-c23f-41bb-aa3a-e440579e2f0d","status":"InProgress","startTime":"2022-01-18T12:33:27.483Z"}' + headers: + cache-control: + - no-cache + content-length: + - '108' + content-type: + - application/json; charset=utf-8 + date: + - Tue, 18 Jan 2022 12:34:13 GMT + expires: + - '-1' + pragma: + - no-cache + server: + - Microsoft-HTTPAPI/2.0 + strict-transport-security: + - max-age=31536000; includeSubDomains + transfer-encoding: + - chunked + vary: + - Accept-Encoding + x-content-type-options: + - nosniff + status: + code: 200 + message: OK +- request: + body: null + headers: + Accept: + - '*/*' + Accept-Encoding: + - gzip, deflate + CommandName: + - datamigration sql-vm create + Connection: + - keep-alive + ParameterSetName: + - --source-location --target-location --migration-service --scope --source-database-name + --source-sql-connection --target-db-name --resource-group --sql-vm-name + User-Agent: + - AZURECLI/2.32.0 azsdk-python-mgmt-datamigration/1.0.0b1 Python/3.10.1 (Windows-10-10.0.22000-SP0) + method: GET + uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/providers/Microsoft.DataMigration/locations/eastus2euap/operationTypes/createsqlvmmigration/operationResults/834dc234-c23f-41bb-aa3a-e440579e2f0d?api-version=2021-10-30-preview + response: + body: + string: '{"name":"834dc234-c23f-41bb-aa3a-e440579e2f0d","status":"InProgress","startTime":"2022-01-18T12:33:27.483Z"}' + headers: + cache-control: + - no-cache + content-length: + - '108' + content-type: + - application/json; charset=utf-8 + date: + - Tue, 18 Jan 2022 12:34:31 GMT + expires: + - '-1' + pragma: + - no-cache + server: + - Microsoft-HTTPAPI/2.0 + strict-transport-security: + - max-age=31536000; includeSubDomains + transfer-encoding: + - chunked + vary: + - Accept-Encoding + x-content-type-options: + - nosniff + status: + code: 200 + message: OK +- request: + body: null + headers: + Accept: + - '*/*' + Accept-Encoding: + - gzip, deflate + CommandName: + - datamigration sql-vm create + Connection: + - keep-alive + ParameterSetName: + - --source-location --target-location --migration-service --scope --source-database-name + --source-sql-connection --target-db-name --resource-group --sql-vm-name + User-Agent: + - AZURECLI/2.32.0 azsdk-python-mgmt-datamigration/1.0.0b1 Python/3.10.1 (Windows-10-10.0.22000-SP0) + method: GET + uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/providers/Microsoft.DataMigration/locations/eastus2euap/operationTypes/createsqlvmmigration/operationResults/834dc234-c23f-41bb-aa3a-e440579e2f0d?api-version=2021-10-30-preview + response: + body: + string: '{"name":"834dc234-c23f-41bb-aa3a-e440579e2f0d","status":"InProgress","startTime":"2022-01-18T12:33:27.483Z"}' + headers: + cache-control: + - no-cache + content-length: + - '108' + content-type: + - application/json; charset=utf-8 + date: + - Tue, 18 Jan 2022 12:34:46 GMT + expires: + - '-1' + pragma: + - no-cache + server: + - Microsoft-HTTPAPI/2.0 + strict-transport-security: + - max-age=31536000; includeSubDomains + transfer-encoding: + - chunked + vary: + - Accept-Encoding + x-content-type-options: + - nosniff + status: + code: 200 + message: OK +- request: + body: null + headers: + Accept: + - '*/*' + Accept-Encoding: + - gzip, deflate + CommandName: + - datamigration sql-vm create + Connection: + - keep-alive + ParameterSetName: + - --source-location --target-location --migration-service --scope --source-database-name + --source-sql-connection --target-db-name --resource-group --sql-vm-name + User-Agent: + - AZURECLI/2.32.0 azsdk-python-mgmt-datamigration/1.0.0b1 Python/3.10.1 (Windows-10-10.0.22000-SP0) + method: GET + uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/providers/Microsoft.DataMigration/locations/eastus2euap/operationTypes/createsqlvmmigration/operationResults/834dc234-c23f-41bb-aa3a-e440579e2f0d?api-version=2021-10-30-preview + response: + body: + string: '{"name":"834dc234-c23f-41bb-aa3a-e440579e2f0d","status":"InProgress","startTime":"2022-01-18T12:33:27.483Z"}' + headers: + cache-control: + - no-cache + content-length: + - '108' + content-type: + - application/json; charset=utf-8 + date: + - Tue, 18 Jan 2022 12:35:01 GMT + expires: + - '-1' + pragma: + - no-cache + server: + - Microsoft-HTTPAPI/2.0 + strict-transport-security: + - max-age=31536000; includeSubDomains + transfer-encoding: + - chunked + vary: + - Accept-Encoding + x-content-type-options: + - nosniff + status: + code: 200 + message: OK +- request: + body: null + headers: + Accept: + - '*/*' + Accept-Encoding: + - gzip, deflate + CommandName: + - datamigration sql-vm create + Connection: + - keep-alive + ParameterSetName: + - --source-location --target-location --migration-service --scope --source-database-name + --source-sql-connection --target-db-name --resource-group --sql-vm-name + User-Agent: + - AZURECLI/2.32.0 azsdk-python-mgmt-datamigration/1.0.0b1 Python/3.10.1 (Windows-10-10.0.22000-SP0) + method: GET + uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/providers/Microsoft.DataMigration/locations/eastus2euap/operationTypes/createsqlvmmigration/operationResults/834dc234-c23f-41bb-aa3a-e440579e2f0d?api-version=2021-10-30-preview + response: + body: + string: '{"name":"834dc234-c23f-41bb-aa3a-e440579e2f0d","status":"InProgress","startTime":"2022-01-18T12:33:27.483Z"}' + headers: + cache-control: + - no-cache + content-length: + - '108' + content-type: + - application/json; charset=utf-8 + date: + - Tue, 18 Jan 2022 12:35:16 GMT + expires: + - '-1' + pragma: + - no-cache + server: + - Microsoft-HTTPAPI/2.0 + strict-transport-security: + - max-age=31536000; includeSubDomains + transfer-encoding: + - chunked + vary: + - Accept-Encoding + x-content-type-options: + - nosniff + status: + code: 200 + message: OK +- request: + body: null + headers: + Accept: + - '*/*' + Accept-Encoding: + - gzip, deflate + CommandName: + - datamigration sql-vm create + Connection: + - keep-alive + ParameterSetName: + - --source-location --target-location --migration-service --scope --source-database-name + --source-sql-connection --target-db-name --resource-group --sql-vm-name + User-Agent: + - AZURECLI/2.32.0 azsdk-python-mgmt-datamigration/1.0.0b1 Python/3.10.1 (Windows-10-10.0.22000-SP0) + method: GET + uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/providers/Microsoft.DataMigration/locations/eastus2euap/operationTypes/createsqlvmmigration/operationResults/834dc234-c23f-41bb-aa3a-e440579e2f0d?api-version=2021-10-30-preview + response: + body: + string: '{"name":"834dc234-c23f-41bb-aa3a-e440579e2f0d","status":"InProgress","startTime":"2022-01-18T12:33:27.483Z"}' + headers: + cache-control: + - no-cache + content-length: + - '108' + content-type: + - application/json; charset=utf-8 + date: + - Tue, 18 Jan 2022 12:35:32 GMT + expires: + - '-1' + pragma: + - no-cache + server: + - Microsoft-HTTPAPI/2.0 + strict-transport-security: + - max-age=31536000; includeSubDomains + transfer-encoding: + - chunked + vary: + - Accept-Encoding + x-content-type-options: + - nosniff + status: + code: 200 + message: OK +- request: + body: null + headers: + Accept: + - '*/*' + Accept-Encoding: + - gzip, deflate + CommandName: + - datamigration sql-vm create + Connection: + - keep-alive + ParameterSetName: + - --source-location --target-location --migration-service --scope --source-database-name + --source-sql-connection --target-db-name --resource-group --sql-vm-name + User-Agent: + - AZURECLI/2.32.0 azsdk-python-mgmt-datamigration/1.0.0b1 Python/3.10.1 (Windows-10-10.0.22000-SP0) + method: GET + uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/providers/Microsoft.DataMigration/locations/eastus2euap/operationTypes/createsqlvmmigration/operationResults/834dc234-c23f-41bb-aa3a-e440579e2f0d?api-version=2021-10-30-preview + response: + body: + string: '{"name":"834dc234-c23f-41bb-aa3a-e440579e2f0d","status":"InProgress","startTime":"2022-01-18T12:33:27.483Z"}' + headers: + cache-control: + - no-cache + content-length: + - '108' + content-type: + - application/json; charset=utf-8 + date: + - Tue, 18 Jan 2022 12:35:47 GMT + expires: + - '-1' + pragma: + - no-cache + server: + - Microsoft-HTTPAPI/2.0 + strict-transport-security: + - max-age=31536000; includeSubDomains + transfer-encoding: + - chunked + vary: + - Accept-Encoding + x-content-type-options: + - nosniff + status: + code: 200 + message: OK +- request: + body: null + headers: + Accept: + - '*/*' + Accept-Encoding: + - gzip, deflate + CommandName: + - datamigration sql-vm create + Connection: + - keep-alive + ParameterSetName: + - --source-location --target-location --migration-service --scope --source-database-name + --source-sql-connection --target-db-name --resource-group --sql-vm-name + User-Agent: + - AZURECLI/2.32.0 azsdk-python-mgmt-datamigration/1.0.0b1 Python/3.10.1 (Windows-10-10.0.22000-SP0) + method: GET + uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/providers/Microsoft.DataMigration/locations/eastus2euap/operationTypes/createsqlvmmigration/operationResults/834dc234-c23f-41bb-aa3a-e440579e2f0d?api-version=2021-10-30-preview + response: + body: + string: '{"name":"834dc234-c23f-41bb-aa3a-e440579e2f0d","status":"InProgress","startTime":"2022-01-18T12:33:27.483Z"}' + headers: + cache-control: + - no-cache + content-length: + - '108' + content-type: + - application/json; charset=utf-8 + date: + - Tue, 18 Jan 2022 12:36:02 GMT + expires: + - '-1' + pragma: + - no-cache + server: + - Microsoft-HTTPAPI/2.0 + strict-transport-security: + - max-age=31536000; includeSubDomains + transfer-encoding: + - chunked + vary: + - Accept-Encoding + x-content-type-options: + - nosniff + status: + code: 200 + message: OK +- request: + body: null + headers: + Accept: + - '*/*' + Accept-Encoding: + - gzip, deflate + CommandName: + - datamigration sql-vm create + Connection: + - keep-alive + ParameterSetName: + - --source-location --target-location --migration-service --scope --source-database-name + --source-sql-connection --target-db-name --resource-group --sql-vm-name + User-Agent: + - AZURECLI/2.32.0 azsdk-python-mgmt-datamigration/1.0.0b1 Python/3.10.1 (Windows-10-10.0.22000-SP0) + method: GET + uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/providers/Microsoft.DataMigration/locations/eastus2euap/operationTypes/createsqlvmmigration/operationResults/834dc234-c23f-41bb-aa3a-e440579e2f0d?api-version=2021-10-30-preview + response: + body: + string: '{"name":"834dc234-c23f-41bb-aa3a-e440579e2f0d","status":"InProgress","startTime":"2022-01-18T12:33:27.483Z"}' + headers: + cache-control: + - no-cache + content-length: + - '108' + content-type: + - application/json; charset=utf-8 + date: + - Tue, 18 Jan 2022 12:36:18 GMT + expires: + - '-1' + pragma: + - no-cache + server: + - Microsoft-HTTPAPI/2.0 + strict-transport-security: + - max-age=31536000; includeSubDomains + transfer-encoding: + - chunked + vary: + - Accept-Encoding + x-content-type-options: + - nosniff + status: + code: 200 + message: OK +- request: + body: null + headers: + Accept: + - '*/*' + Accept-Encoding: + - gzip, deflate + CommandName: + - datamigration sql-vm create + Connection: + - keep-alive + ParameterSetName: + - --source-location --target-location --migration-service --scope --source-database-name + --source-sql-connection --target-db-name --resource-group --sql-vm-name + User-Agent: + - AZURECLI/2.32.0 azsdk-python-mgmt-datamigration/1.0.0b1 Python/3.10.1 (Windows-10-10.0.22000-SP0) + method: GET + uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/providers/Microsoft.DataMigration/locations/eastus2euap/operationTypes/createsqlvmmigration/operationResults/834dc234-c23f-41bb-aa3a-e440579e2f0d?api-version=2021-10-30-preview + response: + body: + string: '{"name":"834dc234-c23f-41bb-aa3a-e440579e2f0d","status":"InProgress","startTime":"2022-01-18T12:33:27.483Z"}' + headers: + cache-control: + - no-cache + content-length: + - '108' + content-type: + - application/json; charset=utf-8 + date: + - Tue, 18 Jan 2022 12:36:33 GMT + expires: + - '-1' + pragma: + - no-cache + server: + - Microsoft-HTTPAPI/2.0 + strict-transport-security: + - max-age=31536000; includeSubDomains + transfer-encoding: + - chunked + vary: + - Accept-Encoding + x-content-type-options: + - nosniff + status: + code: 200 + message: OK +- request: + body: null + headers: + Accept: + - '*/*' + Accept-Encoding: + - gzip, deflate + CommandName: + - datamigration sql-vm create + Connection: + - keep-alive + ParameterSetName: + - --source-location --target-location --migration-service --scope --source-database-name + --source-sql-connection --target-db-name --resource-group --sql-vm-name + User-Agent: + - AZURECLI/2.32.0 azsdk-python-mgmt-datamigration/1.0.0b1 Python/3.10.1 (Windows-10-10.0.22000-SP0) + method: GET + uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/providers/Microsoft.DataMigration/locations/eastus2euap/operationTypes/createsqlvmmigration/operationResults/834dc234-c23f-41bb-aa3a-e440579e2f0d?api-version=2021-10-30-preview + response: + body: + string: '{"name":"834dc234-c23f-41bb-aa3a-e440579e2f0d","status":"Succeeded","startTime":"2022-01-18T12:33:27.483Z"}' + headers: + cache-control: + - no-cache + content-length: + - '107' + content-type: + - application/json; charset=utf-8 + date: + - Tue, 18 Jan 2022 12:36:48 GMT + expires: + - '-1' + pragma: + - no-cache + server: + - Microsoft-HTTPAPI/2.0 + strict-transport-security: + - max-age=31536000; includeSubDomains + transfer-encoding: + - chunked + vary: + - Accept-Encoding + x-content-type-options: + - nosniff + status: + code: 200 + message: OK +- request: + body: null + headers: + Accept: + - '*/*' + Accept-Encoding: + - gzip, deflate + CommandName: + - datamigration sql-vm create + Connection: + - keep-alive + ParameterSetName: + - --source-location --target-location --migration-service --scope --source-database-name + --source-sql-connection --target-db-name --resource-group --sql-vm-name + User-Agent: + - AZURECLI/2.32.0 azsdk-python-mgmt-datamigration/1.0.0b1 Python/3.10.1 (Windows-10-10.0.22000-SP0) + method: GET + uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/tsum38RG/providers/Microsoft.SqlVirtualMachine/sqlVirtualMachines/DMSCmdletTest-SqlVM/providers/Microsoft.DataMigration/databaseMigrations/tsum-Db-vm-online-fs9?api-version=2021-10-30-preview + response: + body: + string: '{"properties":{"scope":"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/tsum38RG/providers/Microsoft.SqlVirtualMachine/sqlVirtualMachines/DMSCmdletTest-SqlVM","provisioningState":"Succeeded","migrationStatus":"InProgress","startedOn":"2022-01-18T12:36:45.973Z","sourceDatabaseName":"AdventureWorks","migrationService":"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/tsum38RG/providers/Microsoft.DataMigration/sqlMigrationServices/sqlServiceUnitTest-Pipeline","migrationOperationId":"79b234dd-5f04-4f18-9edd-30ce333b6474","kind":"SqlVm"},"id":"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/tsum38RG/providers/Microsoft.SqlVirtualMachine/sqlVirtualMachines/DMSCmdletTest-SqlVM/providers/Microsoft.DataMigration/databaseMigrations/tsum-Db-vm-online-fs9","name":"tsum-Db-vm-online-fs9","type":"Microsoft.DataMigration/databaseMigrations"}' + headers: + cache-control: + - no-cache + content-length: + - '894' + content-type: + - application/json; charset=utf-8 + date: + - Tue, 18 Jan 2022 12:36:49 GMT + expires: + - '-1' + pragma: + - no-cache + server: + - Microsoft-HTTPAPI/2.0 + strict-transport-security: + - max-age=31536000; includeSubDomains + transfer-encoding: + - chunked + vary: + - Accept-Encoding + x-content-type-options: + - nosniff + status: + code: 200 + message: OK +- request: + body: null + headers: + Accept: + - application/json + Accept-Encoding: + - gzip, deflate + CommandName: + - datamigration sql-vm show + Connection: + - keep-alive + ParameterSetName: + - --sql-vm-name --resource-group --target-db-name --expand + User-Agent: + - AZURECLI/2.32.0 azsdk-python-mgmt-datamigration/1.0.0b1 Python/3.10.1 (Windows-10-10.0.22000-SP0) + method: GET + uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/tsum38RG/providers/Microsoft.SqlVirtualMachine/sqlVirtualMachines/DMSCmdletTest-SqlVM/providers/Microsoft.DataMigration/databaseMigrations/tsum-Db-vm-online-fs9?$expand=MigrationStatusDetails&api-version=2021-10-30-preview + response: + body: + string: '{"properties":{"migrationStatusDetails":{"migrationState":"StartFullBackupUploadOperation","blobContainerName":"79b234dd-5f04-4f18-9edd-30ce333b6474","pendingLogBackupsCount":0},"scope":"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/tsum38RG/providers/Microsoft.SqlVirtualMachine/sqlVirtualMachines/DMSCmdletTest-SqlVM","provisioningState":"Succeeded","migrationStatus":"InProgress","startedOn":"2022-01-18T12:36:45.973Z","sourceDatabaseName":"AdventureWorks","migrationService":"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/tsum38RG/providers/Microsoft.DataMigration/sqlMigrationServices/sqlServiceUnitTest-Pipeline","migrationOperationId":"79b234dd-5f04-4f18-9edd-30ce333b6474","kind":"SqlVm"},"id":"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/tsum38RG/providers/Microsoft.SqlVirtualMachine/sqlVirtualMachines/DMSCmdletTest-SqlVM/providers/Microsoft.DataMigration/databaseMigrations/tsum-Db-vm-online-fs9","name":"tsum-Db-vm-online-fs9","type":"Microsoft.DataMigration/databaseMigrations"}' + headers: + cache-control: + - no-cache + content-length: + - '1057' + content-type: + - application/json; charset=utf-8 + date: + - Tue, 18 Jan 2022 12:36:51 GMT + expires: + - '-1' + pragma: + - no-cache + server: + - Microsoft-HTTPAPI/2.0 + strict-transport-security: + - max-age=31536000; includeSubDomains + transfer-encoding: + - chunked + vary: + - Accept-Encoding + x-content-type-options: + - nosniff + status: + code: 200 + message: OK +- request: + body: null + headers: + Accept: + - application/json + Accept-Encoding: + - gzip, deflate + CommandName: + - datamigration sql-vm show + Connection: + - keep-alive + ParameterSetName: + - --sql-vm-name --resource-group --target-db-name --expand + User-Agent: + - AZURECLI/2.32.0 azsdk-python-mgmt-datamigration/1.0.0b1 Python/3.10.1 (Windows-10-10.0.22000-SP0) + method: GET + uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/tsum38RG/providers/Microsoft.SqlVirtualMachine/sqlVirtualMachines/DMSCmdletTest-SqlVM/providers/Microsoft.DataMigration/databaseMigrations/tsum-Db-vm-online-fs9?$expand=MigrationStatusDetails&api-version=2021-10-30-preview + response: + body: + string: '{"properties":{"migrationStatusDetails":{"migrationState":"WaitForFullBackupUploadOperation","blobContainerName":"79b234dd-5f04-4f18-9edd-30ce333b6474","pendingLogBackupsCount":0},"scope":"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/tsum38RG/providers/Microsoft.SqlVirtualMachine/sqlVirtualMachines/DMSCmdletTest-SqlVM","provisioningState":"Succeeded","migrationStatus":"InProgress","startedOn":"2022-01-18T12:36:45.973Z","sourceDatabaseName":"AdventureWorks","migrationService":"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/tsum38RG/providers/Microsoft.DataMigration/sqlMigrationServices/sqlServiceUnitTest-Pipeline","migrationOperationId":"79b234dd-5f04-4f18-9edd-30ce333b6474","kind":"SqlVm"},"id":"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/tsum38RG/providers/Microsoft.SqlVirtualMachine/sqlVirtualMachines/DMSCmdletTest-SqlVM/providers/Microsoft.DataMigration/databaseMigrations/tsum-Db-vm-online-fs9","name":"tsum-Db-vm-online-fs9","type":"Microsoft.DataMigration/databaseMigrations"}' + headers: + cache-control: + - no-cache + content-length: + - '1059' + content-type: + - application/json; charset=utf-8 + date: + - Tue, 18 Jan 2022 12:37:04 GMT + expires: + - '-1' + pragma: + - no-cache + server: + - Microsoft-HTTPAPI/2.0 + strict-transport-security: + - max-age=31536000; includeSubDomains + transfer-encoding: + - chunked + vary: + - Accept-Encoding + x-content-type-options: + - nosniff + status: + code: 200 + message: OK +- request: + body: null + headers: + Accept: + - application/json + Accept-Encoding: + - gzip, deflate + CommandName: + - datamigration sql-vm show + Connection: + - keep-alive + ParameterSetName: + - --sql-vm-name --resource-group --target-db-name --expand + User-Agent: + - AZURECLI/2.32.0 azsdk-python-mgmt-datamigration/1.0.0b1 Python/3.10.1 (Windows-10-10.0.22000-SP0) + method: GET + uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/tsum38RG/providers/Microsoft.SqlVirtualMachine/sqlVirtualMachines/DMSCmdletTest-SqlVM/providers/Microsoft.DataMigration/databaseMigrations/tsum-Db-vm-online-fs9?$expand=MigrationStatusDetails&api-version=2021-10-30-preview + response: + body: + string: '{"properties":{"migrationStatusDetails":{"migrationState":"WaitForFullBackupUploadOperation","blobContainerName":"79b234dd-5f04-4f18-9edd-30ce333b6474","pendingLogBackupsCount":0},"scope":"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/tsum38RG/providers/Microsoft.SqlVirtualMachine/sqlVirtualMachines/DMSCmdletTest-SqlVM","provisioningState":"Succeeded","migrationStatus":"InProgress","startedOn":"2022-01-18T12:36:45.973Z","sourceDatabaseName":"AdventureWorks","migrationService":"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/tsum38RG/providers/Microsoft.DataMigration/sqlMigrationServices/sqlServiceUnitTest-Pipeline","migrationOperationId":"79b234dd-5f04-4f18-9edd-30ce333b6474","kind":"SqlVm"},"id":"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/tsum38RG/providers/Microsoft.SqlVirtualMachine/sqlVirtualMachines/DMSCmdletTest-SqlVM/providers/Microsoft.DataMigration/databaseMigrations/tsum-Db-vm-online-fs9","name":"tsum-Db-vm-online-fs9","type":"Microsoft.DataMigration/databaseMigrations"}' + headers: + cache-control: + - no-cache + content-length: + - '1059' + content-type: + - application/json; charset=utf-8 + date: + - Tue, 18 Jan 2022 12:37:14 GMT + expires: + - '-1' + pragma: + - no-cache + server: + - Microsoft-HTTPAPI/2.0 + strict-transport-security: + - max-age=31536000; includeSubDomains + transfer-encoding: + - chunked + vary: + - Accept-Encoding + x-content-type-options: + - nosniff + status: + code: 200 + message: OK +- request: + body: null + headers: + Accept: + - application/json + Accept-Encoding: + - gzip, deflate + CommandName: + - datamigration sql-vm show + Connection: + - keep-alive + ParameterSetName: + - --sql-vm-name --resource-group --target-db-name --expand + User-Agent: + - AZURECLI/2.32.0 azsdk-python-mgmt-datamigration/1.0.0b1 Python/3.10.1 (Windows-10-10.0.22000-SP0) + method: GET + uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/tsum38RG/providers/Microsoft.SqlVirtualMachine/sqlVirtualMachines/DMSCmdletTest-SqlVM/providers/Microsoft.DataMigration/databaseMigrations/tsum-Db-vm-online-fs9?$expand=MigrationStatusDetails&api-version=2021-10-30-preview + response: + body: + string: '{"properties":{"migrationStatusDetails":{"migrationState":"WaitForFullBackupUploadOperation","blobContainerName":"79b234dd-5f04-4f18-9edd-30ce333b6474","pendingLogBackupsCount":0},"scope":"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/tsum38RG/providers/Microsoft.SqlVirtualMachine/sqlVirtualMachines/DMSCmdletTest-SqlVM","provisioningState":"Succeeded","migrationStatus":"InProgress","startedOn":"2022-01-18T12:36:45.973Z","sourceDatabaseName":"AdventureWorks","migrationService":"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/tsum38RG/providers/Microsoft.DataMigration/sqlMigrationServices/sqlServiceUnitTest-Pipeline","migrationOperationId":"79b234dd-5f04-4f18-9edd-30ce333b6474","kind":"SqlVm"},"id":"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/tsum38RG/providers/Microsoft.SqlVirtualMachine/sqlVirtualMachines/DMSCmdletTest-SqlVM/providers/Microsoft.DataMigration/databaseMigrations/tsum-Db-vm-online-fs9","name":"tsum-Db-vm-online-fs9","type":"Microsoft.DataMigration/databaseMigrations"}' + headers: + cache-control: + - no-cache + content-length: + - '1059' + content-type: + - application/json; charset=utf-8 + date: + - Tue, 18 Jan 2022 12:37:26 GMT + expires: + - '-1' + pragma: + - no-cache + server: + - Microsoft-HTTPAPI/2.0 + strict-transport-security: + - max-age=31536000; includeSubDomains + transfer-encoding: + - chunked + vary: + - Accept-Encoding + x-content-type-options: + - nosniff + status: + code: 200 + message: OK +- request: + body: null + headers: + Accept: + - application/json + Accept-Encoding: + - gzip, deflate + CommandName: + - datamigration sql-vm show + Connection: + - keep-alive + ParameterSetName: + - --sql-vm-name --resource-group --target-db-name --expand + User-Agent: + - AZURECLI/2.32.0 azsdk-python-mgmt-datamigration/1.0.0b1 Python/3.10.1 (Windows-10-10.0.22000-SP0) + method: GET + uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/tsum38RG/providers/Microsoft.SqlVirtualMachine/sqlVirtualMachines/DMSCmdletTest-SqlVM/providers/Microsoft.DataMigration/databaseMigrations/tsum-Db-vm-online-fs9?$expand=MigrationStatusDetails&api-version=2021-10-30-preview + response: + body: + string: '{"properties":{"migrationStatusDetails":{"migrationState":"WaitForFullBackupUploadOperation","blobContainerName":"79b234dd-5f04-4f18-9edd-30ce333b6474","pendingLogBackupsCount":0},"scope":"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/tsum38RG/providers/Microsoft.SqlVirtualMachine/sqlVirtualMachines/DMSCmdletTest-SqlVM","provisioningState":"Succeeded","migrationStatus":"InProgress","startedOn":"2022-01-18T12:36:45.973Z","sourceDatabaseName":"AdventureWorks","migrationService":"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/tsum38RG/providers/Microsoft.DataMigration/sqlMigrationServices/sqlServiceUnitTest-Pipeline","migrationOperationId":"79b234dd-5f04-4f18-9edd-30ce333b6474","kind":"SqlVm"},"id":"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/tsum38RG/providers/Microsoft.SqlVirtualMachine/sqlVirtualMachines/DMSCmdletTest-SqlVM/providers/Microsoft.DataMigration/databaseMigrations/tsum-Db-vm-online-fs9","name":"tsum-Db-vm-online-fs9","type":"Microsoft.DataMigration/databaseMigrations"}' + headers: + cache-control: + - no-cache + content-length: + - '1059' + content-type: + - application/json; charset=utf-8 + date: + - Tue, 18 Jan 2022 12:37:37 GMT + expires: + - '-1' + pragma: + - no-cache + server: + - Microsoft-HTTPAPI/2.0 + strict-transport-security: + - max-age=31536000; includeSubDomains + transfer-encoding: + - chunked + vary: + - Accept-Encoding + x-content-type-options: + - nosniff + status: + code: 200 + message: OK +- request: + body: null + headers: + Accept: + - application/json + Accept-Encoding: + - gzip, deflate + CommandName: + - datamigration sql-vm show + Connection: + - keep-alive + ParameterSetName: + - --sql-vm-name --resource-group --target-db-name --expand + User-Agent: + - AZURECLI/2.32.0 azsdk-python-mgmt-datamigration/1.0.0b1 Python/3.10.1 (Windows-10-10.0.22000-SP0) + method: GET + uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/tsum38RG/providers/Microsoft.SqlVirtualMachine/sqlVirtualMachines/DMSCmdletTest-SqlVM/providers/Microsoft.DataMigration/databaseMigrations/tsum-Db-vm-online-fs9?$expand=MigrationStatusDetails&api-version=2021-10-30-preview + response: + body: + string: '{"properties":{"migrationStatusDetails":{"migrationState":"WaitForFullBackupUploadOperation","blobContainerName":"79b234dd-5f04-4f18-9edd-30ce333b6474","pendingLogBackupsCount":0},"scope":"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/tsum38RG/providers/Microsoft.SqlVirtualMachine/sqlVirtualMachines/DMSCmdletTest-SqlVM","provisioningState":"Succeeded","migrationStatus":"InProgress","startedOn":"2022-01-18T12:36:45.973Z","sourceDatabaseName":"AdventureWorks","migrationService":"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/tsum38RG/providers/Microsoft.DataMigration/sqlMigrationServices/sqlServiceUnitTest-Pipeline","migrationOperationId":"79b234dd-5f04-4f18-9edd-30ce333b6474","kind":"SqlVm"},"id":"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/tsum38RG/providers/Microsoft.SqlVirtualMachine/sqlVirtualMachines/DMSCmdletTest-SqlVM/providers/Microsoft.DataMigration/databaseMigrations/tsum-Db-vm-online-fs9","name":"tsum-Db-vm-online-fs9","type":"Microsoft.DataMigration/databaseMigrations"}' + headers: + cache-control: + - no-cache + content-length: + - '1059' + content-type: + - application/json; charset=utf-8 + date: + - Tue, 18 Jan 2022 12:37:49 GMT + expires: + - '-1' + pragma: + - no-cache + server: + - Microsoft-HTTPAPI/2.0 + strict-transport-security: + - max-age=31536000; includeSubDomains + transfer-encoding: + - chunked + vary: + - Accept-Encoding + x-content-type-options: + - nosniff + status: + code: 200 + message: OK +- request: + body: null + headers: + Accept: + - application/json + Accept-Encoding: + - gzip, deflate + CommandName: + - datamigration sql-vm show + Connection: + - keep-alive + ParameterSetName: + - --sql-vm-name --resource-group --target-db-name --expand + User-Agent: + - AZURECLI/2.32.0 azsdk-python-mgmt-datamigration/1.0.0b1 Python/3.10.1 (Windows-10-10.0.22000-SP0) + method: GET + uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/tsum38RG/providers/Microsoft.SqlVirtualMachine/sqlVirtualMachines/DMSCmdletTest-SqlVM/providers/Microsoft.DataMigration/databaseMigrations/tsum-Db-vm-online-fs9?$expand=MigrationStatusDetails&api-version=2021-10-30-preview + response: + body: + string: '{"properties":{"migrationStatusDetails":{"migrationState":"WaitForFullBackupUploadOperation","blobContainerName":"79b234dd-5f04-4f18-9edd-30ce333b6474","pendingLogBackupsCount":0},"scope":"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/tsum38RG/providers/Microsoft.SqlVirtualMachine/sqlVirtualMachines/DMSCmdletTest-SqlVM","provisioningState":"Succeeded","migrationStatus":"InProgress","startedOn":"2022-01-18T12:36:45.973Z","sourceDatabaseName":"AdventureWorks","migrationService":"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/tsum38RG/providers/Microsoft.DataMigration/sqlMigrationServices/sqlServiceUnitTest-Pipeline","migrationOperationId":"79b234dd-5f04-4f18-9edd-30ce333b6474","kind":"SqlVm"},"id":"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/tsum38RG/providers/Microsoft.SqlVirtualMachine/sqlVirtualMachines/DMSCmdletTest-SqlVM/providers/Microsoft.DataMigration/databaseMigrations/tsum-Db-vm-online-fs9","name":"tsum-Db-vm-online-fs9","type":"Microsoft.DataMigration/databaseMigrations"}' + headers: + cache-control: + - no-cache + content-length: + - '1059' + content-type: + - application/json; charset=utf-8 + date: + - Tue, 18 Jan 2022 12:38:00 GMT + expires: + - '-1' + pragma: + - no-cache + server: + - Microsoft-HTTPAPI/2.0 + strict-transport-security: + - max-age=31536000; includeSubDomains + transfer-encoding: + - chunked + vary: + - Accept-Encoding + x-content-type-options: + - nosniff + status: + code: 200 + message: OK +- request: + body: null + headers: + Accept: + - application/json + Accept-Encoding: + - gzip, deflate + CommandName: + - datamigration sql-vm show + Connection: + - keep-alive + ParameterSetName: + - --sql-vm-name --resource-group --target-db-name --expand + User-Agent: + - AZURECLI/2.32.0 azsdk-python-mgmt-datamigration/1.0.0b1 Python/3.10.1 (Windows-10-10.0.22000-SP0) + method: GET + uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/tsum38RG/providers/Microsoft.SqlVirtualMachine/sqlVirtualMachines/DMSCmdletTest-SqlVM/providers/Microsoft.DataMigration/databaseMigrations/tsum-Db-vm-online-fs9?$expand=MigrationStatusDetails&api-version=2021-10-30-preview + response: + body: + string: '{"properties":{"migrationStatusDetails":{"migrationState":"WaitForFullBackupUploadOperation","blobContainerName":"79b234dd-5f04-4f18-9edd-30ce333b6474","pendingLogBackupsCount":0},"scope":"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/tsum38RG/providers/Microsoft.SqlVirtualMachine/sqlVirtualMachines/DMSCmdletTest-SqlVM","provisioningState":"Succeeded","migrationStatus":"InProgress","startedOn":"2022-01-18T12:36:45.973Z","sourceDatabaseName":"AdventureWorks","migrationService":"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/tsum38RG/providers/Microsoft.DataMigration/sqlMigrationServices/sqlServiceUnitTest-Pipeline","migrationOperationId":"79b234dd-5f04-4f18-9edd-30ce333b6474","kind":"SqlVm"},"id":"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/tsum38RG/providers/Microsoft.SqlVirtualMachine/sqlVirtualMachines/DMSCmdletTest-SqlVM/providers/Microsoft.DataMigration/databaseMigrations/tsum-Db-vm-online-fs9","name":"tsum-Db-vm-online-fs9","type":"Microsoft.DataMigration/databaseMigrations"}' + headers: + cache-control: + - no-cache + content-length: + - '1059' + content-type: + - application/json; charset=utf-8 + date: + - Tue, 18 Jan 2022 12:38:11 GMT + expires: + - '-1' + pragma: + - no-cache + server: + - Microsoft-HTTPAPI/2.0 + strict-transport-security: + - max-age=31536000; includeSubDomains + transfer-encoding: + - chunked + vary: + - Accept-Encoding + x-content-type-options: + - nosniff + status: + code: 200 + message: OK +- request: + body: null + headers: + Accept: + - application/json + Accept-Encoding: + - gzip, deflate + CommandName: + - datamigration sql-vm show + Connection: + - keep-alive + ParameterSetName: + - --sql-vm-name --resource-group --target-db-name --expand + User-Agent: + - AZURECLI/2.32.0 azsdk-python-mgmt-datamigration/1.0.0b1 Python/3.10.1 (Windows-10-10.0.22000-SP0) + method: GET + uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/tsum38RG/providers/Microsoft.SqlVirtualMachine/sqlVirtualMachines/DMSCmdletTest-SqlVM/providers/Microsoft.DataMigration/databaseMigrations/tsum-Db-vm-online-fs9?$expand=MigrationStatusDetails&api-version=2021-10-30-preview + response: + body: + string: '{"properties":{"migrationStatusDetails":{"migrationState":"WaitForFullBackupUploadOperation","blobContainerName":"79b234dd-5f04-4f18-9edd-30ce333b6474","pendingLogBackupsCount":0},"scope":"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/tsum38RG/providers/Microsoft.SqlVirtualMachine/sqlVirtualMachines/DMSCmdletTest-SqlVM","provisioningState":"Succeeded","migrationStatus":"InProgress","startedOn":"2022-01-18T12:36:45.973Z","sourceDatabaseName":"AdventureWorks","migrationService":"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/tsum38RG/providers/Microsoft.DataMigration/sqlMigrationServices/sqlServiceUnitTest-Pipeline","migrationOperationId":"79b234dd-5f04-4f18-9edd-30ce333b6474","kind":"SqlVm"},"id":"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/tsum38RG/providers/Microsoft.SqlVirtualMachine/sqlVirtualMachines/DMSCmdletTest-SqlVM/providers/Microsoft.DataMigration/databaseMigrations/tsum-Db-vm-online-fs9","name":"tsum-Db-vm-online-fs9","type":"Microsoft.DataMigration/databaseMigrations"}' + headers: + cache-control: + - no-cache + content-length: + - '1059' + content-type: + - application/json; charset=utf-8 + date: + - Tue, 18 Jan 2022 12:38:23 GMT + expires: + - '-1' + pragma: + - no-cache + server: + - Microsoft-HTTPAPI/2.0 + strict-transport-security: + - max-age=31536000; includeSubDomains + transfer-encoding: + - chunked + vary: + - Accept-Encoding + x-content-type-options: + - nosniff + status: + code: 200 + message: OK +- request: + body: null + headers: + Accept: + - application/json + Accept-Encoding: + - gzip, deflate + CommandName: + - datamigration sql-vm show + Connection: + - keep-alive + ParameterSetName: + - --sql-vm-name --resource-group --target-db-name --expand + User-Agent: + - AZURECLI/2.32.0 azsdk-python-mgmt-datamigration/1.0.0b1 Python/3.10.1 (Windows-10-10.0.22000-SP0) + method: GET + uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/tsum38RG/providers/Microsoft.SqlVirtualMachine/sqlVirtualMachines/DMSCmdletTest-SqlVM/providers/Microsoft.DataMigration/databaseMigrations/tsum-Db-vm-online-fs9?$expand=MigrationStatusDetails&api-version=2021-10-30-preview + response: + body: + string: '{"properties":{"migrationStatusDetails":{"migrationState":"WaitForFullBackupUploadOperation","blobContainerName":"79b234dd-5f04-4f18-9edd-30ce333b6474","pendingLogBackupsCount":0},"scope":"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/tsum38RG/providers/Microsoft.SqlVirtualMachine/sqlVirtualMachines/DMSCmdletTest-SqlVM","provisioningState":"Succeeded","migrationStatus":"InProgress","startedOn":"2022-01-18T12:36:45.973Z","sourceDatabaseName":"AdventureWorks","migrationService":"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/tsum38RG/providers/Microsoft.DataMigration/sqlMigrationServices/sqlServiceUnitTest-Pipeline","migrationOperationId":"79b234dd-5f04-4f18-9edd-30ce333b6474","kind":"SqlVm"},"id":"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/tsum38RG/providers/Microsoft.SqlVirtualMachine/sqlVirtualMachines/DMSCmdletTest-SqlVM/providers/Microsoft.DataMigration/databaseMigrations/tsum-Db-vm-online-fs9","name":"tsum-Db-vm-online-fs9","type":"Microsoft.DataMigration/databaseMigrations"}' + headers: + cache-control: + - no-cache + content-length: + - '1059' + content-type: + - application/json; charset=utf-8 + date: + - Tue, 18 Jan 2022 12:38:34 GMT + expires: + - '-1' + pragma: + - no-cache + server: + - Microsoft-HTTPAPI/2.0 + strict-transport-security: + - max-age=31536000; includeSubDomains + transfer-encoding: + - chunked + vary: + - Accept-Encoding + x-content-type-options: + - nosniff + status: + code: 200 + message: OK +- request: + body: null + headers: + Accept: + - application/json + Accept-Encoding: + - gzip, deflate + CommandName: + - datamigration sql-vm show + Connection: + - keep-alive + ParameterSetName: + - --sql-vm-name --resource-group --target-db-name --expand + User-Agent: + - AZURECLI/2.32.0 azsdk-python-mgmt-datamigration/1.0.0b1 Python/3.10.1 (Windows-10-10.0.22000-SP0) + method: GET + uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/tsum38RG/providers/Microsoft.SqlVirtualMachine/sqlVirtualMachines/DMSCmdletTest-SqlVM/providers/Microsoft.DataMigration/databaseMigrations/tsum-Db-vm-online-fs9?$expand=MigrationStatusDetails&api-version=2021-10-30-preview + response: + body: + string: '{"properties":{"migrationStatusDetails":{"migrationState":"WaitForFullBackupUploadOperation","blobContainerName":"79b234dd-5f04-4f18-9edd-30ce333b6474","pendingLogBackupsCount":0},"scope":"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/tsum38RG/providers/Microsoft.SqlVirtualMachine/sqlVirtualMachines/DMSCmdletTest-SqlVM","provisioningState":"Succeeded","migrationStatus":"InProgress","startedOn":"2022-01-18T12:36:45.973Z","sourceDatabaseName":"AdventureWorks","migrationService":"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/tsum38RG/providers/Microsoft.DataMigration/sqlMigrationServices/sqlServiceUnitTest-Pipeline","migrationOperationId":"79b234dd-5f04-4f18-9edd-30ce333b6474","kind":"SqlVm"},"id":"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/tsum38RG/providers/Microsoft.SqlVirtualMachine/sqlVirtualMachines/DMSCmdletTest-SqlVM/providers/Microsoft.DataMigration/databaseMigrations/tsum-Db-vm-online-fs9","name":"tsum-Db-vm-online-fs9","type":"Microsoft.DataMigration/databaseMigrations"}' + headers: + cache-control: + - no-cache + content-length: + - '1059' + content-type: + - application/json; charset=utf-8 + date: + - Tue, 18 Jan 2022 12:38:45 GMT + expires: + - '-1' + pragma: + - no-cache + server: + - Microsoft-HTTPAPI/2.0 + strict-transport-security: + - max-age=31536000; includeSubDomains + transfer-encoding: + - chunked + vary: + - Accept-Encoding + x-content-type-options: + - nosniff + status: + code: 200 + message: OK +- request: + body: null + headers: + Accept: + - application/json + Accept-Encoding: + - gzip, deflate + CommandName: + - datamigration sql-vm show + Connection: + - keep-alive + ParameterSetName: + - --sql-vm-name --resource-group --target-db-name --expand + User-Agent: + - AZURECLI/2.32.0 azsdk-python-mgmt-datamigration/1.0.0b1 Python/3.10.1 (Windows-10-10.0.22000-SP0) + method: GET + uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/tsum38RG/providers/Microsoft.SqlVirtualMachine/sqlVirtualMachines/DMSCmdletTest-SqlVM/providers/Microsoft.DataMigration/databaseMigrations/tsum-Db-vm-online-fs9?$expand=MigrationStatusDetails&api-version=2021-10-30-preview + response: + body: + string: '{"properties":{"migrationStatusDetails":{"migrationState":"WaitForFullBackupUploadOperation","blobContainerName":"79b234dd-5f04-4f18-9edd-30ce333b6474","pendingLogBackupsCount":0},"scope":"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/tsum38RG/providers/Microsoft.SqlVirtualMachine/sqlVirtualMachines/DMSCmdletTest-SqlVM","provisioningState":"Succeeded","migrationStatus":"InProgress","startedOn":"2022-01-18T12:36:45.973Z","sourceDatabaseName":"AdventureWorks","migrationService":"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/tsum38RG/providers/Microsoft.DataMigration/sqlMigrationServices/sqlServiceUnitTest-Pipeline","migrationOperationId":"79b234dd-5f04-4f18-9edd-30ce333b6474","kind":"SqlVm"},"id":"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/tsum38RG/providers/Microsoft.SqlVirtualMachine/sqlVirtualMachines/DMSCmdletTest-SqlVM/providers/Microsoft.DataMigration/databaseMigrations/tsum-Db-vm-online-fs9","name":"tsum-Db-vm-online-fs9","type":"Microsoft.DataMigration/databaseMigrations"}' + headers: + cache-control: + - no-cache + content-length: + - '1059' + content-type: + - application/json; charset=utf-8 + date: + - Tue, 18 Jan 2022 12:38:58 GMT + expires: + - '-1' + pragma: + - no-cache + server: + - Microsoft-HTTPAPI/2.0 + strict-transport-security: + - max-age=31536000; includeSubDomains + transfer-encoding: + - chunked + vary: + - Accept-Encoding + x-content-type-options: + - nosniff + status: + code: 200 + message: OK +- request: + body: null + headers: + Accept: + - application/json + Accept-Encoding: + - gzip, deflate + CommandName: + - datamigration sql-vm show + Connection: + - keep-alive + ParameterSetName: + - --sql-vm-name --resource-group --target-db-name --expand + User-Agent: + - AZURECLI/2.32.0 azsdk-python-mgmt-datamigration/1.0.0b1 Python/3.10.1 (Windows-10-10.0.22000-SP0) + method: GET + uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/tsum38RG/providers/Microsoft.SqlVirtualMachine/sqlVirtualMachines/DMSCmdletTest-SqlVM/providers/Microsoft.DataMigration/databaseMigrations/tsum-Db-vm-online-fs9?$expand=MigrationStatusDetails&api-version=2021-10-30-preview + response: + body: + string: '{"properties":{"migrationStatusDetails":{"migrationState":"WaitForFullBackupUploadOperation","activeBackupSets":[{"backupSetId":"e6b60e53-c7b5-48dd-8f07-95f0caa66de1","firstLSN":"486000000145100000","lastLSN":"486000000145300000","backupType":"TransactionLog","listOfBackupFiles":[{"fileName":"AdventureWorksTransactionLog2.trn","status":"Arrived","totalSize":259584,"dataRead":0,"dataWritten":0,"copyThroughput":0.0,"copyDuration":0,"familySequenceNumber":1}],"backupStartDate":"2019-01-11T13:56:02Z","backupFinishDate":"2019-01-11T13:56:02Z","isBackupRestored":false,"hasBackupChecksums":true,"familyCount":1},{"backupSetId":"9fceb4b8-3864-45b6-bd35-998619297164","firstLSN":"486000000131000000","lastLSN":"486000000132600000","backupType":"Database","listOfBackupFiles":[{"fileName":"AdventureWorksFullBackup.bak","status":"Arrived","totalSize":63176192,"dataRead":0,"dataWritten":0,"copyThroughput":0.0,"copyDuration":0,"familySequenceNumber":1}],"backupStartDate":"2019-01-11T13:53:40Z","backupFinishDate":"2019-01-11T13:53:40Z","isBackupRestored":false,"hasBackupChecksums":true,"familyCount":1},{"backupSetId":"7bdfc66c-14d5-4acc-91d3-d9568cabc0e0","firstLSN":"486000000126400000","lastLSN":"486000000145100000","backupType":"TransactionLog","listOfBackupFiles":[{"fileName":"AdventureWorksTransactionLog1.trn","status":"Arrived","totalSize":325120,"dataRead":0,"dataWritten":0,"copyThroughput":0.0,"copyDuration":0,"familySequenceNumber":1}],"backupStartDate":"2019-01-11T13:55:21Z","backupFinishDate":"2019-01-11T13:55:21Z","isBackupRestored":false,"hasBackupChecksums":true,"familyCount":1}],"invalidFiles":["test + - Copy.txt","test.json","InvalidBackup %20+ `~1!2@3#4$5%6^7&8(9)0_-+=]}[{;'',, + ;+&[]~{}.txt"],"blobContainerName":"79b234dd-5f04-4f18-9edd-30ce333b6474","pendingLogBackupsCount":2},"scope":"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/tsum38RG/providers/Microsoft.SqlVirtualMachine/sqlVirtualMachines/DMSCmdletTest-SqlVM","provisioningState":"Succeeded","migrationStatus":"InProgress","startedOn":"2022-01-18T12:36:45.973Z","sourceDatabaseName":"AdventureWorks","migrationService":"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/tsum38RG/providers/Microsoft.DataMigration/sqlMigrationServices/sqlServiceUnitTest-Pipeline","migrationOperationId":"79b234dd-5f04-4f18-9edd-30ce333b6474","kind":"SqlVm"},"id":"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/tsum38RG/providers/Microsoft.SqlVirtualMachine/sqlVirtualMachines/DMSCmdletTest-SqlVM/providers/Microsoft.DataMigration/databaseMigrations/tsum-Db-vm-online-fs9","name":"tsum-Db-vm-online-fs9","type":"Microsoft.DataMigration/databaseMigrations"}' + headers: + cache-control: + - no-cache + content-length: + - '2685' + content-type: + - application/json; charset=utf-8 + date: + - Tue, 18 Jan 2022 12:39:09 GMT + expires: + - '-1' + pragma: + - no-cache + server: + - Microsoft-HTTPAPI/2.0 + strict-transport-security: + - max-age=31536000; includeSubDomains + transfer-encoding: + - chunked + vary: + - Accept-Encoding + x-content-type-options: + - nosniff + status: + code: 200 + message: OK +- request: + body: null + headers: + Accept: + - application/json + Accept-Encoding: + - gzip, deflate + CommandName: + - datamigration sql-vm show + Connection: + - keep-alive + ParameterSetName: + - --sql-vm-name --resource-group --target-db-name --expand + User-Agent: + - AZURECLI/2.32.0 azsdk-python-mgmt-datamigration/1.0.0b1 Python/3.10.1 (Windows-10-10.0.22000-SP0) + method: GET + uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/tsum38RG/providers/Microsoft.SqlVirtualMachine/sqlVirtualMachines/DMSCmdletTest-SqlVM/providers/Microsoft.DataMigration/databaseMigrations/tsum-Db-vm-online-fs9?$expand=MigrationStatusDetails&api-version=2021-10-30-preview + response: + body: + string: '{"properties":{"migrationStatusDetails":{"migrationState":"WaitForFullBackupUploadOperation","activeBackupSets":[{"backupSetId":"e6b60e53-c7b5-48dd-8f07-95f0caa66de1","firstLSN":"486000000145100000","lastLSN":"486000000145300000","backupType":"TransactionLog","listOfBackupFiles":[{"fileName":"AdventureWorksTransactionLog2.trn","status":"Arrived","totalSize":259584,"dataRead":0,"dataWritten":0,"copyThroughput":0.0,"copyDuration":0,"familySequenceNumber":1}],"backupStartDate":"2019-01-11T13:56:02Z","backupFinishDate":"2019-01-11T13:56:02Z","isBackupRestored":false,"hasBackupChecksums":true,"familyCount":1},{"backupSetId":"9fceb4b8-3864-45b6-bd35-998619297164","firstLSN":"486000000131000000","lastLSN":"486000000132600000","backupType":"Database","listOfBackupFiles":[{"fileName":"AdventureWorksFullBackup.bak","status":"Arrived","totalSize":63176192,"dataRead":0,"dataWritten":0,"copyThroughput":0.0,"copyDuration":0,"familySequenceNumber":1}],"backupStartDate":"2019-01-11T13:53:40Z","backupFinishDate":"2019-01-11T13:53:40Z","isBackupRestored":false,"hasBackupChecksums":true,"familyCount":1},{"backupSetId":"7bdfc66c-14d5-4acc-91d3-d9568cabc0e0","firstLSN":"486000000126400000","lastLSN":"486000000145100000","backupType":"TransactionLog","listOfBackupFiles":[{"fileName":"AdventureWorksTransactionLog1.trn","status":"Arrived","totalSize":325120,"dataRead":0,"dataWritten":0,"copyThroughput":0.0,"copyDuration":0,"familySequenceNumber":1}],"backupStartDate":"2019-01-11T13:55:21Z","backupFinishDate":"2019-01-11T13:55:21Z","isBackupRestored":false,"hasBackupChecksums":true,"familyCount":1}],"invalidFiles":["test + - Copy.txt","test.json","InvalidBackup %20+ `~1!2@3#4$5%6^7&8(9)0_-+=]}[{;'',, + ;+&[]~{}.txt"],"blobContainerName":"79b234dd-5f04-4f18-9edd-30ce333b6474","pendingLogBackupsCount":2},"scope":"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/tsum38RG/providers/Microsoft.SqlVirtualMachine/sqlVirtualMachines/DMSCmdletTest-SqlVM","provisioningState":"Succeeded","migrationStatus":"InProgress","startedOn":"2022-01-18T12:36:45.973Z","sourceDatabaseName":"AdventureWorks","migrationService":"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/tsum38RG/providers/Microsoft.DataMigration/sqlMigrationServices/sqlServiceUnitTest-Pipeline","migrationOperationId":"79b234dd-5f04-4f18-9edd-30ce333b6474","kind":"SqlVm"},"id":"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/tsum38RG/providers/Microsoft.SqlVirtualMachine/sqlVirtualMachines/DMSCmdletTest-SqlVM/providers/Microsoft.DataMigration/databaseMigrations/tsum-Db-vm-online-fs9","name":"tsum-Db-vm-online-fs9","type":"Microsoft.DataMigration/databaseMigrations"}' + headers: + cache-control: + - no-cache + content-length: + - '2685' + content-type: + - application/json; charset=utf-8 + date: + - Tue, 18 Jan 2022 12:39:22 GMT + expires: + - '-1' + pragma: + - no-cache + server: + - Microsoft-HTTPAPI/2.0 + strict-transport-security: + - max-age=31536000; includeSubDomains + transfer-encoding: + - chunked + vary: + - Accept-Encoding + x-content-type-options: + - nosniff + status: + code: 200 + message: OK +- request: + body: null + headers: + Accept: + - application/json + Accept-Encoding: + - gzip, deflate + CommandName: + - datamigration sql-vm show + Connection: + - keep-alive + ParameterSetName: + - --sql-vm-name --resource-group --target-db-name --expand + User-Agent: + - AZURECLI/2.32.0 azsdk-python-mgmt-datamigration/1.0.0b1 Python/3.10.1 (Windows-10-10.0.22000-SP0) + method: GET + uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/tsum38RG/providers/Microsoft.SqlVirtualMachine/sqlVirtualMachines/DMSCmdletTest-SqlVM/providers/Microsoft.DataMigration/databaseMigrations/tsum-Db-vm-online-fs9?$expand=MigrationStatusDetails&api-version=2021-10-30-preview + response: + body: + string: '{"properties":{"migrationStatusDetails":{"migrationState":"WaitForFullBackupUploadOperation","activeBackupSets":[{"backupSetId":"e6b60e53-c7b5-48dd-8f07-95f0caa66de1","firstLSN":"486000000145100000","lastLSN":"486000000145300000","backupType":"TransactionLog","listOfBackupFiles":[{"fileName":"AdventureWorksTransactionLog2.trn","status":"Arrived","totalSize":259584,"dataRead":0,"dataWritten":0,"copyThroughput":0.0,"copyDuration":0,"familySequenceNumber":1}],"backupStartDate":"2019-01-11T13:56:02Z","backupFinishDate":"2019-01-11T13:56:02Z","isBackupRestored":false,"hasBackupChecksums":true,"familyCount":1},{"backupSetId":"9fceb4b8-3864-45b6-bd35-998619297164","firstLSN":"486000000131000000","lastLSN":"486000000132600000","backupType":"Database","listOfBackupFiles":[{"fileName":"AdventureWorksFullBackup.bak","status":"Arrived","totalSize":63176192,"dataRead":0,"dataWritten":0,"copyThroughput":0.0,"copyDuration":0,"familySequenceNumber":1}],"backupStartDate":"2019-01-11T13:53:40Z","backupFinishDate":"2019-01-11T13:53:40Z","isBackupRestored":false,"hasBackupChecksums":true,"familyCount":1},{"backupSetId":"7bdfc66c-14d5-4acc-91d3-d9568cabc0e0","firstLSN":"486000000126400000","lastLSN":"486000000145100000","backupType":"TransactionLog","listOfBackupFiles":[{"fileName":"AdventureWorksTransactionLog1.trn","status":"Arrived","totalSize":325120,"dataRead":0,"dataWritten":0,"copyThroughput":0.0,"copyDuration":0,"familySequenceNumber":1}],"backupStartDate":"2019-01-11T13:55:21Z","backupFinishDate":"2019-01-11T13:55:21Z","isBackupRestored":false,"hasBackupChecksums":true,"familyCount":1}],"invalidFiles":["test + - Copy.txt","test.json","InvalidBackup %20+ `~1!2@3#4$5%6^7&8(9)0_-+=]}[{;'',, + ;+&[]~{}.txt"],"blobContainerName":"79b234dd-5f04-4f18-9edd-30ce333b6474","pendingLogBackupsCount":2},"scope":"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/tsum38RG/providers/Microsoft.SqlVirtualMachine/sqlVirtualMachines/DMSCmdletTest-SqlVM","provisioningState":"Succeeded","migrationStatus":"InProgress","startedOn":"2022-01-18T12:36:45.973Z","sourceDatabaseName":"AdventureWorks","migrationService":"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/tsum38RG/providers/Microsoft.DataMigration/sqlMigrationServices/sqlServiceUnitTest-Pipeline","migrationOperationId":"79b234dd-5f04-4f18-9edd-30ce333b6474","kind":"SqlVm"},"id":"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/tsum38RG/providers/Microsoft.SqlVirtualMachine/sqlVirtualMachines/DMSCmdletTest-SqlVM/providers/Microsoft.DataMigration/databaseMigrations/tsum-Db-vm-online-fs9","name":"tsum-Db-vm-online-fs9","type":"Microsoft.DataMigration/databaseMigrations"}' + headers: + cache-control: + - no-cache + content-length: + - '2685' + content-type: + - application/json; charset=utf-8 + date: + - Tue, 18 Jan 2022 12:39:34 GMT + expires: + - '-1' + pragma: + - no-cache + server: + - Microsoft-HTTPAPI/2.0 + strict-transport-security: + - max-age=31536000; includeSubDomains + transfer-encoding: + - chunked + vary: + - Accept-Encoding + x-content-type-options: + - nosniff + status: + code: 200 + message: OK +- request: + body: null + headers: + Accept: + - application/json + Accept-Encoding: + - gzip, deflate + CommandName: + - datamigration sql-vm show + Connection: + - keep-alive + ParameterSetName: + - --sql-vm-name --resource-group --target-db-name --expand + User-Agent: + - AZURECLI/2.32.0 azsdk-python-mgmt-datamigration/1.0.0b1 Python/3.10.1 (Windows-10-10.0.22000-SP0) + method: GET + uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/tsum38RG/providers/Microsoft.SqlVirtualMachine/sqlVirtualMachines/DMSCmdletTest-SqlVM/providers/Microsoft.DataMigration/databaseMigrations/tsum-Db-vm-online-fs9?$expand=MigrationStatusDetails&api-version=2021-10-30-preview + response: + body: + string: '{"properties":{"migrationStatusDetails":{"migrationState":"WaitForFullBackupUploadOperation","activeBackupSets":[{"backupSetId":"e6b60e53-c7b5-48dd-8f07-95f0caa66de1","firstLSN":"486000000145100000","lastLSN":"486000000145300000","backupType":"TransactionLog","listOfBackupFiles":[{"fileName":"AdventureWorksTransactionLog2.trn","status":"Arrived","totalSize":259584,"dataRead":0,"dataWritten":0,"copyThroughput":0.0,"copyDuration":0,"familySequenceNumber":1}],"backupStartDate":"2019-01-11T13:56:02Z","backupFinishDate":"2019-01-11T13:56:02Z","isBackupRestored":false,"hasBackupChecksums":true,"familyCount":1},{"backupSetId":"9fceb4b8-3864-45b6-bd35-998619297164","firstLSN":"486000000131000000","lastLSN":"486000000132600000","backupType":"Database","listOfBackupFiles":[{"fileName":"AdventureWorksFullBackup.bak","status":"Arrived","totalSize":63176192,"dataRead":0,"dataWritten":0,"copyThroughput":0.0,"copyDuration":0,"familySequenceNumber":1}],"backupStartDate":"2019-01-11T13:53:40Z","backupFinishDate":"2019-01-11T13:53:40Z","isBackupRestored":false,"hasBackupChecksums":true,"familyCount":1},{"backupSetId":"7bdfc66c-14d5-4acc-91d3-d9568cabc0e0","firstLSN":"486000000126400000","lastLSN":"486000000145100000","backupType":"TransactionLog","listOfBackupFiles":[{"fileName":"AdventureWorksTransactionLog1.trn","status":"Arrived","totalSize":325120,"dataRead":0,"dataWritten":0,"copyThroughput":0.0,"copyDuration":0,"familySequenceNumber":1}],"backupStartDate":"2019-01-11T13:55:21Z","backupFinishDate":"2019-01-11T13:55:21Z","isBackupRestored":false,"hasBackupChecksums":true,"familyCount":1}],"invalidFiles":["test + - Copy.txt","test.json","InvalidBackup %20+ `~1!2@3#4$5%6^7&8(9)0_-+=]}[{;'',, + ;+&[]~{}.txt"],"blobContainerName":"79b234dd-5f04-4f18-9edd-30ce333b6474","pendingLogBackupsCount":2},"scope":"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/tsum38RG/providers/Microsoft.SqlVirtualMachine/sqlVirtualMachines/DMSCmdletTest-SqlVM","provisioningState":"Succeeded","migrationStatus":"InProgress","startedOn":"2022-01-18T12:36:45.973Z","sourceDatabaseName":"AdventureWorks","migrationService":"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/tsum38RG/providers/Microsoft.DataMigration/sqlMigrationServices/sqlServiceUnitTest-Pipeline","migrationOperationId":"79b234dd-5f04-4f18-9edd-30ce333b6474","kind":"SqlVm"},"id":"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/tsum38RG/providers/Microsoft.SqlVirtualMachine/sqlVirtualMachines/DMSCmdletTest-SqlVM/providers/Microsoft.DataMigration/databaseMigrations/tsum-Db-vm-online-fs9","name":"tsum-Db-vm-online-fs9","type":"Microsoft.DataMigration/databaseMigrations"}' + headers: + cache-control: + - no-cache + content-length: + - '2685' + content-type: + - application/json; charset=utf-8 + date: + - Tue, 18 Jan 2022 12:39:45 GMT + expires: + - '-1' + pragma: + - no-cache + server: + - Microsoft-HTTPAPI/2.0 + strict-transport-security: + - max-age=31536000; includeSubDomains + transfer-encoding: + - chunked + vary: + - Accept-Encoding + x-content-type-options: + - nosniff + status: + code: 200 + message: OK +- request: + body: null + headers: + Accept: + - application/json + Accept-Encoding: + - gzip, deflate + CommandName: + - datamigration sql-vm show + Connection: + - keep-alive + ParameterSetName: + - --sql-vm-name --resource-group --target-db-name --expand + User-Agent: + - AZURECLI/2.32.0 azsdk-python-mgmt-datamigration/1.0.0b1 Python/3.10.1 (Windows-10-10.0.22000-SP0) + method: GET + uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/tsum38RG/providers/Microsoft.SqlVirtualMachine/sqlVirtualMachines/DMSCmdletTest-SqlVM/providers/Microsoft.DataMigration/databaseMigrations/tsum-Db-vm-online-fs9?$expand=MigrationStatusDetails&api-version=2021-10-30-preview + response: + body: + string: '{"properties":{"migrationStatusDetails":{"migrationState":"WaitForFullBackupUploadOperation","activeBackupSets":[{"backupSetId":"e6b60e53-c7b5-48dd-8f07-95f0caa66de1","firstLSN":"486000000145100000","lastLSN":"486000000145300000","backupType":"TransactionLog","listOfBackupFiles":[{"fileName":"AdventureWorksTransactionLog2.trn","status":"Arrived","totalSize":259584,"dataRead":0,"dataWritten":0,"copyThroughput":0.0,"copyDuration":0,"familySequenceNumber":1}],"backupStartDate":"2019-01-11T13:56:02Z","backupFinishDate":"2019-01-11T13:56:02Z","isBackupRestored":false,"hasBackupChecksums":true,"familyCount":1},{"backupSetId":"9fceb4b8-3864-45b6-bd35-998619297164","firstLSN":"486000000131000000","lastLSN":"486000000132600000","backupType":"Database","listOfBackupFiles":[{"fileName":"AdventureWorksFullBackup.bak","status":"Arrived","totalSize":63176192,"dataRead":0,"dataWritten":0,"copyThroughput":0.0,"copyDuration":0,"familySequenceNumber":1}],"backupStartDate":"2019-01-11T13:53:40Z","backupFinishDate":"2019-01-11T13:53:40Z","isBackupRestored":false,"hasBackupChecksums":true,"familyCount":1},{"backupSetId":"7bdfc66c-14d5-4acc-91d3-d9568cabc0e0","firstLSN":"486000000126400000","lastLSN":"486000000145100000","backupType":"TransactionLog","listOfBackupFiles":[{"fileName":"AdventureWorksTransactionLog1.trn","status":"Arrived","totalSize":325120,"dataRead":0,"dataWritten":0,"copyThroughput":0.0,"copyDuration":0,"familySequenceNumber":1}],"backupStartDate":"2019-01-11T13:55:21Z","backupFinishDate":"2019-01-11T13:55:21Z","isBackupRestored":false,"hasBackupChecksums":true,"familyCount":1}],"invalidFiles":["test + - Copy.txt","test.json","InvalidBackup %20+ `~1!2@3#4$5%6^7&8(9)0_-+=]}[{;'',, + ;+&[]~{}.txt"],"blobContainerName":"79b234dd-5f04-4f18-9edd-30ce333b6474","pendingLogBackupsCount":2},"scope":"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/tsum38RG/providers/Microsoft.SqlVirtualMachine/sqlVirtualMachines/DMSCmdletTest-SqlVM","provisioningState":"Succeeded","migrationStatus":"InProgress","startedOn":"2022-01-18T12:36:45.973Z","sourceDatabaseName":"AdventureWorks","migrationService":"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/tsum38RG/providers/Microsoft.DataMigration/sqlMigrationServices/sqlServiceUnitTest-Pipeline","migrationOperationId":"79b234dd-5f04-4f18-9edd-30ce333b6474","kind":"SqlVm"},"id":"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/tsum38RG/providers/Microsoft.SqlVirtualMachine/sqlVirtualMachines/DMSCmdletTest-SqlVM/providers/Microsoft.DataMigration/databaseMigrations/tsum-Db-vm-online-fs9","name":"tsum-Db-vm-online-fs9","type":"Microsoft.DataMigration/databaseMigrations"}' + headers: + cache-control: + - no-cache + content-length: + - '2685' + content-type: + - application/json; charset=utf-8 + date: + - Tue, 18 Jan 2022 12:39:58 GMT + expires: + - '-1' + pragma: + - no-cache + server: + - Microsoft-HTTPAPI/2.0 + strict-transport-security: + - max-age=31536000; includeSubDomains + transfer-encoding: + - chunked + vary: + - Accept-Encoding + x-content-type-options: + - nosniff + status: + code: 200 + message: OK +- request: + body: null + headers: + Accept: + - application/json + Accept-Encoding: + - gzip, deflate + CommandName: + - datamigration sql-vm show + Connection: + - keep-alive + ParameterSetName: + - --sql-vm-name --resource-group --target-db-name --expand + User-Agent: + - AZURECLI/2.32.0 azsdk-python-mgmt-datamigration/1.0.0b1 Python/3.10.1 (Windows-10-10.0.22000-SP0) + method: GET + uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/tsum38RG/providers/Microsoft.SqlVirtualMachine/sqlVirtualMachines/DMSCmdletTest-SqlVM/providers/Microsoft.DataMigration/databaseMigrations/tsum-Db-vm-online-fs9?$expand=MigrationStatusDetails&api-version=2021-10-30-preview + response: + body: + string: '{"properties":{"migrationStatusDetails":{"migrationState":"WaitForFullBackupUploadOperation","fullBackupSetInfo":{"backupSetId":"9fceb4b8-3864-45b6-bd35-998619297164","firstLSN":"486000000131000000","lastLSN":"486000000132600000","backupType":"Database","listOfBackupFiles":[{"fileName":"AdventureWorksFullBackup.bak","status":"Uploading","totalSize":63176192,"dataRead":0,"dataWritten":0,"copyThroughput":0.0,"copyDuration":57,"familySequenceNumber":1}],"backupStartDate":"2019-01-11T13:53:40Z","backupFinishDate":"2019-01-11T13:53:40Z","isBackupRestored":false,"familyCount":1},"activeBackupSets":[{"backupSetId":"e6b60e53-c7b5-48dd-8f07-95f0caa66de1","firstLSN":"486000000145100000","lastLSN":"486000000145300000","backupType":"TransactionLog","listOfBackupFiles":[{"fileName":"AdventureWorksTransactionLog2.trn","status":"Arrived","totalSize":259584,"dataRead":0,"dataWritten":0,"copyThroughput":0.0,"copyDuration":0,"familySequenceNumber":1}],"backupStartDate":"2019-01-11T13:56:02Z","backupFinishDate":"2019-01-11T13:56:02Z","isBackupRestored":false,"hasBackupChecksums":true,"familyCount":1},{"backupSetId":"9fceb4b8-3864-45b6-bd35-998619297164","firstLSN":"486000000131000000","lastLSN":"486000000132600000","backupType":"Database","listOfBackupFiles":[{"fileName":"AdventureWorksFullBackup.bak","status":"Uploading","totalSize":63176192,"dataRead":0,"dataWritten":0,"copyThroughput":0.0,"copyDuration":57,"familySequenceNumber":1}],"backupStartDate":"2019-01-11T13:53:40Z","backupFinishDate":"2019-01-11T13:53:40Z","isBackupRestored":false,"hasBackupChecksums":true,"familyCount":1},{"backupSetId":"7bdfc66c-14d5-4acc-91d3-d9568cabc0e0","firstLSN":"486000000126400000","lastLSN":"486000000145100000","backupType":"TransactionLog","listOfBackupFiles":[{"fileName":"AdventureWorksTransactionLog1.trn","status":"Arrived","totalSize":325120,"dataRead":0,"dataWritten":0,"copyThroughput":0.0,"copyDuration":0,"familySequenceNumber":1}],"backupStartDate":"2019-01-11T13:55:21Z","backupFinishDate":"2019-01-11T13:55:21Z","isBackupRestored":false,"hasBackupChecksums":true,"familyCount":1}],"invalidFiles":["test + - Copy.txt","test.json","InvalidBackup %20+ `~1!2@3#4$5%6^7&8(9)0_-+=]}[{;'',, + ;+&[]~{}.txt"],"blobContainerName":"79b234dd-5f04-4f18-9edd-30ce333b6474","isFullBackupRestored":false,"pendingLogBackupsCount":2},"scope":"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/tsum38RG/providers/Microsoft.SqlVirtualMachine/sqlVirtualMachines/DMSCmdletTest-SqlVM","provisioningState":"Succeeded","migrationStatus":"InProgress","startedOn":"2022-01-18T12:36:45.973Z","sourceDatabaseName":"AdventureWorks","migrationService":"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/tsum38RG/providers/Microsoft.DataMigration/sqlMigrationServices/sqlServiceUnitTest-Pipeline","migrationOperationId":"79b234dd-5f04-4f18-9edd-30ce333b6474","kind":"SqlVm"},"id":"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/tsum38RG/providers/Microsoft.SqlVirtualMachine/sqlVirtualMachines/DMSCmdletTest-SqlVM/providers/Microsoft.DataMigration/databaseMigrations/tsum-Db-vm-online-fs9","name":"tsum-Db-vm-online-fs9","type":"Microsoft.DataMigration/databaseMigrations"}' + headers: + cache-control: + - no-cache + content-length: + - '3204' + content-type: + - application/json; charset=utf-8 + date: + - Tue, 18 Jan 2022 12:40:09 GMT + expires: + - '-1' + pragma: + - no-cache + server: + - Microsoft-HTTPAPI/2.0 + strict-transport-security: + - max-age=31536000; includeSubDomains + transfer-encoding: + - chunked + vary: + - Accept-Encoding + x-content-type-options: + - nosniff + status: + code: 200 + message: OK +- request: + body: null + headers: + Accept: + - application/json + Accept-Encoding: + - gzip, deflate + CommandName: + - datamigration sql-vm show + Connection: + - keep-alive + ParameterSetName: + - --sql-vm-name --resource-group --target-db-name --expand + User-Agent: + - AZURECLI/2.32.0 azsdk-python-mgmt-datamigration/1.0.0b1 Python/3.10.1 (Windows-10-10.0.22000-SP0) + method: GET + uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/tsum38RG/providers/Microsoft.SqlVirtualMachine/sqlVirtualMachines/DMSCmdletTest-SqlVM/providers/Microsoft.DataMigration/databaseMigrations/tsum-Db-vm-online-fs9?$expand=MigrationStatusDetails&api-version=2021-10-30-preview + response: + body: + string: '{"properties":{"migrationStatusDetails":{"migrationState":"WaitForFullBackupUploadOperation","fullBackupSetInfo":{"backupSetId":"9fceb4b8-3864-45b6-bd35-998619297164","firstLSN":"486000000131000000","lastLSN":"486000000132600000","backupType":"Database","listOfBackupFiles":[{"fileName":"AdventureWorksFullBackup.bak","status":"Uploading","totalSize":63176192,"dataRead":0,"dataWritten":0,"copyThroughput":0.0,"copyDuration":57,"familySequenceNumber":1}],"backupStartDate":"2019-01-11T13:53:40Z","backupFinishDate":"2019-01-11T13:53:40Z","isBackupRestored":false,"familyCount":1},"activeBackupSets":[{"backupSetId":"e6b60e53-c7b5-48dd-8f07-95f0caa66de1","firstLSN":"486000000145100000","lastLSN":"486000000145300000","backupType":"TransactionLog","listOfBackupFiles":[{"fileName":"AdventureWorksTransactionLog2.trn","status":"Arrived","totalSize":259584,"dataRead":0,"dataWritten":0,"copyThroughput":0.0,"copyDuration":0,"familySequenceNumber":1}],"backupStartDate":"2019-01-11T13:56:02Z","backupFinishDate":"2019-01-11T13:56:02Z","isBackupRestored":false,"hasBackupChecksums":true,"familyCount":1},{"backupSetId":"9fceb4b8-3864-45b6-bd35-998619297164","firstLSN":"486000000131000000","lastLSN":"486000000132600000","backupType":"Database","listOfBackupFiles":[{"fileName":"AdventureWorksFullBackup.bak","status":"Uploading","totalSize":63176192,"dataRead":0,"dataWritten":0,"copyThroughput":0.0,"copyDuration":57,"familySequenceNumber":1}],"backupStartDate":"2019-01-11T13:53:40Z","backupFinishDate":"2019-01-11T13:53:40Z","isBackupRestored":false,"hasBackupChecksums":true,"familyCount":1},{"backupSetId":"7bdfc66c-14d5-4acc-91d3-d9568cabc0e0","firstLSN":"486000000126400000","lastLSN":"486000000145100000","backupType":"TransactionLog","listOfBackupFiles":[{"fileName":"AdventureWorksTransactionLog1.trn","status":"Arrived","totalSize":325120,"dataRead":0,"dataWritten":0,"copyThroughput":0.0,"copyDuration":0,"familySequenceNumber":1}],"backupStartDate":"2019-01-11T13:55:21Z","backupFinishDate":"2019-01-11T13:55:21Z","isBackupRestored":false,"hasBackupChecksums":true,"familyCount":1}],"invalidFiles":["test + - Copy.txt","test.json","InvalidBackup %20+ `~1!2@3#4$5%6^7&8(9)0_-+=]}[{;'',, + ;+&[]~{}.txt"],"blobContainerName":"79b234dd-5f04-4f18-9edd-30ce333b6474","isFullBackupRestored":false,"pendingLogBackupsCount":2},"scope":"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/tsum38RG/providers/Microsoft.SqlVirtualMachine/sqlVirtualMachines/DMSCmdletTest-SqlVM","provisioningState":"Succeeded","migrationStatus":"InProgress","startedOn":"2022-01-18T12:36:45.973Z","sourceDatabaseName":"AdventureWorks","migrationService":"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/tsum38RG/providers/Microsoft.DataMigration/sqlMigrationServices/sqlServiceUnitTest-Pipeline","migrationOperationId":"79b234dd-5f04-4f18-9edd-30ce333b6474","kind":"SqlVm"},"id":"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/tsum38RG/providers/Microsoft.SqlVirtualMachine/sqlVirtualMachines/DMSCmdletTest-SqlVM/providers/Microsoft.DataMigration/databaseMigrations/tsum-Db-vm-online-fs9","name":"tsum-Db-vm-online-fs9","type":"Microsoft.DataMigration/databaseMigrations"}' + headers: + cache-control: + - no-cache + content-length: + - '3204' + content-type: + - application/json; charset=utf-8 + date: + - Tue, 18 Jan 2022 12:40:20 GMT + expires: + - '-1' + pragma: + - no-cache + server: + - Microsoft-HTTPAPI/2.0 + strict-transport-security: + - max-age=31536000; includeSubDomains + transfer-encoding: + - chunked + vary: + - Accept-Encoding + x-content-type-options: + - nosniff + status: + code: 200 + message: OK +- request: + body: null + headers: + Accept: + - application/json + Accept-Encoding: + - gzip, deflate + CommandName: + - datamigration sql-vm show + Connection: + - keep-alive + ParameterSetName: + - --sql-vm-name --resource-group --target-db-name --expand + User-Agent: + - AZURECLI/2.32.0 azsdk-python-mgmt-datamigration/1.0.0b1 Python/3.10.1 (Windows-10-10.0.22000-SP0) + method: GET + uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/tsum38RG/providers/Microsoft.SqlVirtualMachine/sqlVirtualMachines/DMSCmdletTest-SqlVM/providers/Microsoft.DataMigration/databaseMigrations/tsum-Db-vm-online-fs9?$expand=MigrationStatusDetails&api-version=2021-10-30-preview + response: + body: + string: '{"properties":{"migrationStatusDetails":{"migrationState":"WaitForFullBackupUploadOperation","fullBackupSetInfo":{"backupSetId":"9fceb4b8-3864-45b6-bd35-998619297164","firstLSN":"486000000131000000","lastLSN":"486000000132600000","backupType":"Database","listOfBackupFiles":[{"fileName":"AdventureWorksFullBackup.bak","status":"Uploading","totalSize":63176192,"dataRead":0,"dataWritten":0,"copyThroughput":0.0,"copyDuration":57,"familySequenceNumber":1}],"backupStartDate":"2019-01-11T13:53:40Z","backupFinishDate":"2019-01-11T13:53:40Z","isBackupRestored":false,"familyCount":1},"activeBackupSets":[{"backupSetId":"e6b60e53-c7b5-48dd-8f07-95f0caa66de1","firstLSN":"486000000145100000","lastLSN":"486000000145300000","backupType":"TransactionLog","listOfBackupFiles":[{"fileName":"AdventureWorksTransactionLog2.trn","status":"Arrived","totalSize":259584,"dataRead":0,"dataWritten":0,"copyThroughput":0.0,"copyDuration":0,"familySequenceNumber":1}],"backupStartDate":"2019-01-11T13:56:02Z","backupFinishDate":"2019-01-11T13:56:02Z","isBackupRestored":false,"hasBackupChecksums":true,"familyCount":1},{"backupSetId":"9fceb4b8-3864-45b6-bd35-998619297164","firstLSN":"486000000131000000","lastLSN":"486000000132600000","backupType":"Database","listOfBackupFiles":[{"fileName":"AdventureWorksFullBackup.bak","status":"Uploading","totalSize":63176192,"dataRead":0,"dataWritten":0,"copyThroughput":0.0,"copyDuration":57,"familySequenceNumber":1}],"backupStartDate":"2019-01-11T13:53:40Z","backupFinishDate":"2019-01-11T13:53:40Z","isBackupRestored":false,"hasBackupChecksums":true,"familyCount":1},{"backupSetId":"7bdfc66c-14d5-4acc-91d3-d9568cabc0e0","firstLSN":"486000000126400000","lastLSN":"486000000145100000","backupType":"TransactionLog","listOfBackupFiles":[{"fileName":"AdventureWorksTransactionLog1.trn","status":"Arrived","totalSize":325120,"dataRead":0,"dataWritten":0,"copyThroughput":0.0,"copyDuration":0,"familySequenceNumber":1}],"backupStartDate":"2019-01-11T13:55:21Z","backupFinishDate":"2019-01-11T13:55:21Z","isBackupRestored":false,"hasBackupChecksums":true,"familyCount":1}],"invalidFiles":["test + - Copy.txt","test.json","InvalidBackup %20+ `~1!2@3#4$5%6^7&8(9)0_-+=]}[{;'',, + ;+&[]~{}.txt"],"blobContainerName":"79b234dd-5f04-4f18-9edd-30ce333b6474","isFullBackupRestored":false,"pendingLogBackupsCount":2},"scope":"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/tsum38RG/providers/Microsoft.SqlVirtualMachine/sqlVirtualMachines/DMSCmdletTest-SqlVM","provisioningState":"Succeeded","migrationStatus":"InProgress","startedOn":"2022-01-18T12:36:45.973Z","sourceDatabaseName":"AdventureWorks","migrationService":"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/tsum38RG/providers/Microsoft.DataMigration/sqlMigrationServices/sqlServiceUnitTest-Pipeline","migrationOperationId":"79b234dd-5f04-4f18-9edd-30ce333b6474","kind":"SqlVm"},"id":"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/tsum38RG/providers/Microsoft.SqlVirtualMachine/sqlVirtualMachines/DMSCmdletTest-SqlVM/providers/Microsoft.DataMigration/databaseMigrations/tsum-Db-vm-online-fs9","name":"tsum-Db-vm-online-fs9","type":"Microsoft.DataMigration/databaseMigrations"}' + headers: + cache-control: + - no-cache + content-length: + - '3204' + content-type: + - application/json; charset=utf-8 + date: + - Tue, 18 Jan 2022 12:40:32 GMT + expires: + - '-1' + pragma: + - no-cache + server: + - Microsoft-HTTPAPI/2.0 + strict-transport-security: + - max-age=31536000; includeSubDomains + transfer-encoding: + - chunked + vary: + - Accept-Encoding + x-content-type-options: + - nosniff + status: + code: 200 + message: OK +- request: + body: null + headers: + Accept: + - application/json + Accept-Encoding: + - gzip, deflate + CommandName: + - datamigration sql-vm show + Connection: + - keep-alive + ParameterSetName: + - --sql-vm-name --resource-group --target-db-name --expand + User-Agent: + - AZURECLI/2.32.0 azsdk-python-mgmt-datamigration/1.0.0b1 Python/3.10.1 (Windows-10-10.0.22000-SP0) + method: GET + uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/tsum38RG/providers/Microsoft.SqlVirtualMachine/sqlVirtualMachines/DMSCmdletTest-SqlVM/providers/Microsoft.DataMigration/databaseMigrations/tsum-Db-vm-online-fs9?$expand=MigrationStatusDetails&api-version=2021-10-30-preview + response: + body: + string: '{"properties":{"migrationStatusDetails":{"migrationState":"WaitForFullBackupUploadOperation","fullBackupSetInfo":{"backupSetId":"9fceb4b8-3864-45b6-bd35-998619297164","firstLSN":"486000000131000000","lastLSN":"486000000132600000","backupType":"Database","listOfBackupFiles":[{"fileName":"AdventureWorksFullBackup.bak","status":"Uploading","totalSize":63176192,"dataRead":0,"dataWritten":0,"copyThroughput":0.0,"copyDuration":57,"familySequenceNumber":1}],"backupStartDate":"2019-01-11T13:53:40Z","backupFinishDate":"2019-01-11T13:53:40Z","isBackupRestored":false,"familyCount":1},"activeBackupSets":[{"backupSetId":"e6b60e53-c7b5-48dd-8f07-95f0caa66de1","firstLSN":"486000000145100000","lastLSN":"486000000145300000","backupType":"TransactionLog","listOfBackupFiles":[{"fileName":"AdventureWorksTransactionLog2.trn","status":"Arrived","totalSize":259584,"dataRead":0,"dataWritten":0,"copyThroughput":0.0,"copyDuration":0,"familySequenceNumber":1}],"backupStartDate":"2019-01-11T13:56:02Z","backupFinishDate":"2019-01-11T13:56:02Z","isBackupRestored":false,"hasBackupChecksums":true,"familyCount":1},{"backupSetId":"9fceb4b8-3864-45b6-bd35-998619297164","firstLSN":"486000000131000000","lastLSN":"486000000132600000","backupType":"Database","listOfBackupFiles":[{"fileName":"AdventureWorksFullBackup.bak","status":"Uploading","totalSize":63176192,"dataRead":0,"dataWritten":0,"copyThroughput":0.0,"copyDuration":57,"familySequenceNumber":1}],"backupStartDate":"2019-01-11T13:53:40Z","backupFinishDate":"2019-01-11T13:53:40Z","isBackupRestored":false,"hasBackupChecksums":true,"familyCount":1},{"backupSetId":"7bdfc66c-14d5-4acc-91d3-d9568cabc0e0","firstLSN":"486000000126400000","lastLSN":"486000000145100000","backupType":"TransactionLog","listOfBackupFiles":[{"fileName":"AdventureWorksTransactionLog1.trn","status":"Arrived","totalSize":325120,"dataRead":0,"dataWritten":0,"copyThroughput":0.0,"copyDuration":0,"familySequenceNumber":1}],"backupStartDate":"2019-01-11T13:55:21Z","backupFinishDate":"2019-01-11T13:55:21Z","isBackupRestored":false,"hasBackupChecksums":true,"familyCount":1}],"invalidFiles":["test + - Copy.txt","test.json","InvalidBackup %20+ `~1!2@3#4$5%6^7&8(9)0_-+=]}[{;'',, + ;+&[]~{}.txt"],"blobContainerName":"79b234dd-5f04-4f18-9edd-30ce333b6474","isFullBackupRestored":false,"pendingLogBackupsCount":2},"scope":"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/tsum38RG/providers/Microsoft.SqlVirtualMachine/sqlVirtualMachines/DMSCmdletTest-SqlVM","provisioningState":"Succeeded","migrationStatus":"InProgress","startedOn":"2022-01-18T12:36:45.973Z","sourceDatabaseName":"AdventureWorks","migrationService":"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/tsum38RG/providers/Microsoft.DataMigration/sqlMigrationServices/sqlServiceUnitTest-Pipeline","migrationOperationId":"79b234dd-5f04-4f18-9edd-30ce333b6474","kind":"SqlVm"},"id":"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/tsum38RG/providers/Microsoft.SqlVirtualMachine/sqlVirtualMachines/DMSCmdletTest-SqlVM/providers/Microsoft.DataMigration/databaseMigrations/tsum-Db-vm-online-fs9","name":"tsum-Db-vm-online-fs9","type":"Microsoft.DataMigration/databaseMigrations"}' + headers: + cache-control: + - no-cache + content-length: + - '3204' + content-type: + - application/json; charset=utf-8 + date: + - Tue, 18 Jan 2022 12:40:44 GMT + expires: + - '-1' + pragma: + - no-cache + server: + - Microsoft-HTTPAPI/2.0 + strict-transport-security: + - max-age=31536000; includeSubDomains + transfer-encoding: + - chunked + vary: + - Accept-Encoding + x-content-type-options: + - nosniff + status: + code: 200 + message: OK +- request: + body: null + headers: + Accept: + - application/json + Accept-Encoding: + - gzip, deflate + CommandName: + - datamigration sql-vm show + Connection: + - keep-alive + ParameterSetName: + - --sql-vm-name --resource-group --target-db-name --expand + User-Agent: + - AZURECLI/2.32.0 azsdk-python-mgmt-datamigration/1.0.0b1 Python/3.10.1 (Windows-10-10.0.22000-SP0) + method: GET + uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/tsum38RG/providers/Microsoft.SqlVirtualMachine/sqlVirtualMachines/DMSCmdletTest-SqlVM/providers/Microsoft.DataMigration/databaseMigrations/tsum-Db-vm-online-fs9?$expand=MigrationStatusDetails&api-version=2021-10-30-preview + response: + body: + string: '{"properties":{"migrationStatusDetails":{"migrationState":"WaitForFullBackupUploadOperation","fullBackupSetInfo":{"backupSetId":"9fceb4b8-3864-45b6-bd35-998619297164","firstLSN":"486000000131000000","lastLSN":"486000000132600000","backupType":"Database","listOfBackupFiles":[{"fileName":"AdventureWorksFullBackup.bak","status":"Uploading","totalSize":63176192,"dataRead":0,"dataWritten":0,"copyThroughput":0.0,"copyDuration":57,"familySequenceNumber":1}],"backupStartDate":"2019-01-11T13:53:40Z","backupFinishDate":"2019-01-11T13:53:40Z","isBackupRestored":false,"familyCount":1},"activeBackupSets":[{"backupSetId":"e6b60e53-c7b5-48dd-8f07-95f0caa66de1","firstLSN":"486000000145100000","lastLSN":"486000000145300000","backupType":"TransactionLog","listOfBackupFiles":[{"fileName":"AdventureWorksTransactionLog2.trn","status":"Arrived","totalSize":259584,"dataRead":0,"dataWritten":0,"copyThroughput":0.0,"copyDuration":0,"familySequenceNumber":1}],"backupStartDate":"2019-01-11T13:56:02Z","backupFinishDate":"2019-01-11T13:56:02Z","isBackupRestored":false,"hasBackupChecksums":true,"familyCount":1},{"backupSetId":"9fceb4b8-3864-45b6-bd35-998619297164","firstLSN":"486000000131000000","lastLSN":"486000000132600000","backupType":"Database","listOfBackupFiles":[{"fileName":"AdventureWorksFullBackup.bak","status":"Uploading","totalSize":63176192,"dataRead":0,"dataWritten":0,"copyThroughput":0.0,"copyDuration":57,"familySequenceNumber":1}],"backupStartDate":"2019-01-11T13:53:40Z","backupFinishDate":"2019-01-11T13:53:40Z","isBackupRestored":false,"hasBackupChecksums":true,"familyCount":1},{"backupSetId":"7bdfc66c-14d5-4acc-91d3-d9568cabc0e0","firstLSN":"486000000126400000","lastLSN":"486000000145100000","backupType":"TransactionLog","listOfBackupFiles":[{"fileName":"AdventureWorksTransactionLog1.trn","status":"Arrived","totalSize":325120,"dataRead":0,"dataWritten":0,"copyThroughput":0.0,"copyDuration":0,"familySequenceNumber":1}],"backupStartDate":"2019-01-11T13:55:21Z","backupFinishDate":"2019-01-11T13:55:21Z","isBackupRestored":false,"hasBackupChecksums":true,"familyCount":1}],"invalidFiles":["test + - Copy.txt","test.json","InvalidBackup %20+ `~1!2@3#4$5%6^7&8(9)0_-+=]}[{;'',, + ;+&[]~{}.txt"],"blobContainerName":"79b234dd-5f04-4f18-9edd-30ce333b6474","isFullBackupRestored":false,"pendingLogBackupsCount":2},"scope":"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/tsum38RG/providers/Microsoft.SqlVirtualMachine/sqlVirtualMachines/DMSCmdletTest-SqlVM","provisioningState":"Succeeded","migrationStatus":"InProgress","startedOn":"2022-01-18T12:36:45.973Z","sourceDatabaseName":"AdventureWorks","migrationService":"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/tsum38RG/providers/Microsoft.DataMigration/sqlMigrationServices/sqlServiceUnitTest-Pipeline","migrationOperationId":"79b234dd-5f04-4f18-9edd-30ce333b6474","kind":"SqlVm"},"id":"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/tsum38RG/providers/Microsoft.SqlVirtualMachine/sqlVirtualMachines/DMSCmdletTest-SqlVM/providers/Microsoft.DataMigration/databaseMigrations/tsum-Db-vm-online-fs9","name":"tsum-Db-vm-online-fs9","type":"Microsoft.DataMigration/databaseMigrations"}' + headers: + cache-control: + - no-cache + content-length: + - '3204' + content-type: + - application/json; charset=utf-8 + date: + - Tue, 18 Jan 2022 12:40:56 GMT + expires: + - '-1' + pragma: + - no-cache + server: + - Microsoft-HTTPAPI/2.0 + strict-transport-security: + - max-age=31536000; includeSubDomains + transfer-encoding: + - chunked + vary: + - Accept-Encoding + x-content-type-options: + - nosniff + status: + code: 200 + message: OK +- request: + body: null + headers: + Accept: + - application/json + Accept-Encoding: + - gzip, deflate + CommandName: + - datamigration sql-vm show + Connection: + - keep-alive + ParameterSetName: + - --sql-vm-name --resource-group --target-db-name --expand + User-Agent: + - AZURECLI/2.32.0 azsdk-python-mgmt-datamigration/1.0.0b1 Python/3.10.1 (Windows-10-10.0.22000-SP0) + method: GET + uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/tsum38RG/providers/Microsoft.SqlVirtualMachine/sqlVirtualMachines/DMSCmdletTest-SqlVM/providers/Microsoft.DataMigration/databaseMigrations/tsum-Db-vm-online-fs9?$expand=MigrationStatusDetails&api-version=2021-10-30-preview + response: + body: + string: '{"properties":{"migrationStatusDetails":{"migrationState":"WaitForFullBackupUploadOperation","fullBackupSetInfo":{"backupSetId":"9fceb4b8-3864-45b6-bd35-998619297164","firstLSN":"486000000131000000","lastLSN":"486000000132600000","backupType":"Database","listOfBackupFiles":[{"fileName":"AdventureWorksFullBackup.bak","status":"Uploading","totalSize":63176192,"dataRead":33554432,"dataWritten":33554432,"copyThroughput":277.69500732421875,"copyDuration":118,"familySequenceNumber":1}],"backupStartDate":"2019-01-11T13:53:40Z","backupFinishDate":"2019-01-11T13:53:40Z","isBackupRestored":false,"familyCount":1},"activeBackupSets":[{"backupSetId":"e6b60e53-c7b5-48dd-8f07-95f0caa66de1","firstLSN":"486000000145100000","lastLSN":"486000000145300000","backupType":"TransactionLog","listOfBackupFiles":[{"fileName":"AdventureWorksTransactionLog2.trn","status":"Arrived","totalSize":259584,"dataRead":0,"dataWritten":0,"copyThroughput":0.0,"copyDuration":0,"familySequenceNumber":1}],"backupStartDate":"2019-01-11T13:56:02Z","backupFinishDate":"2019-01-11T13:56:02Z","isBackupRestored":false,"hasBackupChecksums":true,"familyCount":1},{"backupSetId":"9fceb4b8-3864-45b6-bd35-998619297164","firstLSN":"486000000131000000","lastLSN":"486000000132600000","backupType":"Database","listOfBackupFiles":[{"fileName":"AdventureWorksFullBackup.bak","status":"Uploading","totalSize":63176192,"dataRead":33554432,"dataWritten":33554432,"copyThroughput":277.69500732421875,"copyDuration":118,"familySequenceNumber":1}],"backupStartDate":"2019-01-11T13:53:40Z","backupFinishDate":"2019-01-11T13:53:40Z","isBackupRestored":false,"hasBackupChecksums":true,"familyCount":1},{"backupSetId":"7bdfc66c-14d5-4acc-91d3-d9568cabc0e0","firstLSN":"486000000126400000","lastLSN":"486000000145100000","backupType":"TransactionLog","listOfBackupFiles":[{"fileName":"AdventureWorksTransactionLog1.trn","status":"Arrived","totalSize":325120,"dataRead":0,"dataWritten":0,"copyThroughput":0.0,"copyDuration":0,"familySequenceNumber":1}],"backupStartDate":"2019-01-11T13:55:21Z","backupFinishDate":"2019-01-11T13:55:21Z","isBackupRestored":false,"hasBackupChecksums":true,"familyCount":1}],"invalidFiles":["test + - Copy.txt","test.json","InvalidBackup %20+ `~1!2@3#4$5%6^7&8(9)0_-+=]}[{;'',, + ;+&[]~{}.txt"],"blobContainerName":"79b234dd-5f04-4f18-9edd-30ce333b6474","isFullBackupRestored":false,"pendingLogBackupsCount":2},"scope":"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/tsum38RG/providers/Microsoft.SqlVirtualMachine/sqlVirtualMachines/DMSCmdletTest-SqlVM","provisioningState":"Succeeded","migrationStatus":"InProgress","startedOn":"2022-01-18T12:36:45.973Z","sourceDatabaseName":"AdventureWorks","migrationService":"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/tsum38RG/providers/Microsoft.DataMigration/sqlMigrationServices/sqlServiceUnitTest-Pipeline","migrationOperationId":"79b234dd-5f04-4f18-9edd-30ce333b6474","kind":"SqlVm"},"id":"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/tsum38RG/providers/Microsoft.SqlVirtualMachine/sqlVirtualMachines/DMSCmdletTest-SqlVM/providers/Microsoft.DataMigration/databaseMigrations/tsum-Db-vm-online-fs9","name":"tsum-Db-vm-online-fs9","type":"Microsoft.DataMigration/databaseMigrations"}' + headers: + cache-control: + - no-cache + content-length: + - '3264' + content-type: + - application/json; charset=utf-8 + date: + - Tue, 18 Jan 2022 12:41:07 GMT + expires: + - '-1' + pragma: + - no-cache + server: + - Microsoft-HTTPAPI/2.0 + strict-transport-security: + - max-age=31536000; includeSubDomains + transfer-encoding: + - chunked + vary: + - Accept-Encoding + x-content-type-options: + - nosniff + status: + code: 200 + message: OK +- request: + body: null + headers: + Accept: + - application/json + Accept-Encoding: + - gzip, deflate + CommandName: + - datamigration sql-vm show + Connection: + - keep-alive + ParameterSetName: + - --sql-vm-name --resource-group --target-db-name --expand + User-Agent: + - AZURECLI/2.32.0 azsdk-python-mgmt-datamigration/1.0.0b1 Python/3.10.1 (Windows-10-10.0.22000-SP0) + method: GET + uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/tsum38RG/providers/Microsoft.SqlVirtualMachine/sqlVirtualMachines/DMSCmdletTest-SqlVM/providers/Microsoft.DataMigration/databaseMigrations/tsum-Db-vm-online-fs9?$expand=MigrationStatusDetails&api-version=2021-10-30-preview + response: + body: + string: '{"properties":{"migrationStatusDetails":{"migrationState":"WaitForFullBackupUploadOperation","fullBackupSetInfo":{"backupSetId":"9fceb4b8-3864-45b6-bd35-998619297164","firstLSN":"486000000131000000","lastLSN":"486000000132600000","backupType":"Database","listOfBackupFiles":[{"fileName":"AdventureWorksFullBackup.bak","status":"Uploading","totalSize":63176192,"dataRead":33554432,"dataWritten":33554432,"copyThroughput":277.69500732421875,"copyDuration":118,"familySequenceNumber":1}],"backupStartDate":"2019-01-11T13:53:40Z","backupFinishDate":"2019-01-11T13:53:40Z","isBackupRestored":false,"familyCount":1},"activeBackupSets":[{"backupSetId":"e6b60e53-c7b5-48dd-8f07-95f0caa66de1","firstLSN":"486000000145100000","lastLSN":"486000000145300000","backupType":"TransactionLog","listOfBackupFiles":[{"fileName":"AdventureWorksTransactionLog2.trn","status":"Arrived","totalSize":259584,"dataRead":0,"dataWritten":0,"copyThroughput":0.0,"copyDuration":0,"familySequenceNumber":1}],"backupStartDate":"2019-01-11T13:56:02Z","backupFinishDate":"2019-01-11T13:56:02Z","isBackupRestored":false,"hasBackupChecksums":true,"familyCount":1},{"backupSetId":"9fceb4b8-3864-45b6-bd35-998619297164","firstLSN":"486000000131000000","lastLSN":"486000000132600000","backupType":"Database","listOfBackupFiles":[{"fileName":"AdventureWorksFullBackup.bak","status":"Uploading","totalSize":63176192,"dataRead":33554432,"dataWritten":33554432,"copyThroughput":277.69500732421875,"copyDuration":118,"familySequenceNumber":1}],"backupStartDate":"2019-01-11T13:53:40Z","backupFinishDate":"2019-01-11T13:53:40Z","isBackupRestored":false,"hasBackupChecksums":true,"familyCount":1},{"backupSetId":"7bdfc66c-14d5-4acc-91d3-d9568cabc0e0","firstLSN":"486000000126400000","lastLSN":"486000000145100000","backupType":"TransactionLog","listOfBackupFiles":[{"fileName":"AdventureWorksTransactionLog1.trn","status":"Arrived","totalSize":325120,"dataRead":0,"dataWritten":0,"copyThroughput":0.0,"copyDuration":0,"familySequenceNumber":1}],"backupStartDate":"2019-01-11T13:55:21Z","backupFinishDate":"2019-01-11T13:55:21Z","isBackupRestored":false,"hasBackupChecksums":true,"familyCount":1}],"invalidFiles":["test + - Copy.txt","test.json","InvalidBackup %20+ `~1!2@3#4$5%6^7&8(9)0_-+=]}[{;'',, + ;+&[]~{}.txt"],"blobContainerName":"79b234dd-5f04-4f18-9edd-30ce333b6474","isFullBackupRestored":false,"pendingLogBackupsCount":2},"scope":"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/tsum38RG/providers/Microsoft.SqlVirtualMachine/sqlVirtualMachines/DMSCmdletTest-SqlVM","provisioningState":"Succeeded","migrationStatus":"InProgress","startedOn":"2022-01-18T12:36:45.973Z","sourceDatabaseName":"AdventureWorks","migrationService":"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/tsum38RG/providers/Microsoft.DataMigration/sqlMigrationServices/sqlServiceUnitTest-Pipeline","migrationOperationId":"79b234dd-5f04-4f18-9edd-30ce333b6474","kind":"SqlVm"},"id":"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/tsum38RG/providers/Microsoft.SqlVirtualMachine/sqlVirtualMachines/DMSCmdletTest-SqlVM/providers/Microsoft.DataMigration/databaseMigrations/tsum-Db-vm-online-fs9","name":"tsum-Db-vm-online-fs9","type":"Microsoft.DataMigration/databaseMigrations"}' + headers: + cache-control: + - no-cache + content-length: + - '3264' + content-type: + - application/json; charset=utf-8 + date: + - Tue, 18 Jan 2022 12:41:19 GMT + expires: + - '-1' + pragma: + - no-cache + server: + - Microsoft-HTTPAPI/2.0 + strict-transport-security: + - max-age=31536000; includeSubDomains + transfer-encoding: + - chunked + vary: + - Accept-Encoding + x-content-type-options: + - nosniff + status: + code: 200 + message: OK +- request: + body: null + headers: + Accept: + - application/json + Accept-Encoding: + - gzip, deflate + CommandName: + - datamigration sql-vm show + Connection: + - keep-alive + ParameterSetName: + - --sql-vm-name --resource-group --target-db-name --expand + User-Agent: + - AZURECLI/2.32.0 azsdk-python-mgmt-datamigration/1.0.0b1 Python/3.10.1 (Windows-10-10.0.22000-SP0) + method: GET + uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/tsum38RG/providers/Microsoft.SqlVirtualMachine/sqlVirtualMachines/DMSCmdletTest-SqlVM/providers/Microsoft.DataMigration/databaseMigrations/tsum-Db-vm-online-fs9?$expand=MigrationStatusDetails&api-version=2021-10-30-preview + response: + body: + string: '{"properties":{"migrationStatusDetails":{"migrationState":"WaitForFullBackupUploadOperation","fullBackupSetInfo":{"backupSetId":"9fceb4b8-3864-45b6-bd35-998619297164","firstLSN":"486000000131000000","lastLSN":"486000000132600000","backupType":"Database","listOfBackupFiles":[{"fileName":"AdventureWorksFullBackup.bak","status":"Uploading","totalSize":63176192,"dataRead":33554432,"dataWritten":33554432,"copyThroughput":277.69500732421875,"copyDuration":118,"familySequenceNumber":1}],"backupStartDate":"2019-01-11T13:53:40Z","backupFinishDate":"2019-01-11T13:53:40Z","isBackupRestored":false,"familyCount":1},"activeBackupSets":[{"backupSetId":"e6b60e53-c7b5-48dd-8f07-95f0caa66de1","firstLSN":"486000000145100000","lastLSN":"486000000145300000","backupType":"TransactionLog","listOfBackupFiles":[{"fileName":"AdventureWorksTransactionLog2.trn","status":"Arrived","totalSize":259584,"dataRead":0,"dataWritten":0,"copyThroughput":0.0,"copyDuration":0,"familySequenceNumber":1}],"backupStartDate":"2019-01-11T13:56:02Z","backupFinishDate":"2019-01-11T13:56:02Z","isBackupRestored":false,"hasBackupChecksums":true,"familyCount":1},{"backupSetId":"9fceb4b8-3864-45b6-bd35-998619297164","firstLSN":"486000000131000000","lastLSN":"486000000132600000","backupType":"Database","listOfBackupFiles":[{"fileName":"AdventureWorksFullBackup.bak","status":"Uploading","totalSize":63176192,"dataRead":33554432,"dataWritten":33554432,"copyThroughput":277.69500732421875,"copyDuration":118,"familySequenceNumber":1}],"backupStartDate":"2019-01-11T13:53:40Z","backupFinishDate":"2019-01-11T13:53:40Z","isBackupRestored":false,"hasBackupChecksums":true,"familyCount":1},{"backupSetId":"7bdfc66c-14d5-4acc-91d3-d9568cabc0e0","firstLSN":"486000000126400000","lastLSN":"486000000145100000","backupType":"TransactionLog","listOfBackupFiles":[{"fileName":"AdventureWorksTransactionLog1.trn","status":"Arrived","totalSize":325120,"dataRead":0,"dataWritten":0,"copyThroughput":0.0,"copyDuration":0,"familySequenceNumber":1}],"backupStartDate":"2019-01-11T13:55:21Z","backupFinishDate":"2019-01-11T13:55:21Z","isBackupRestored":false,"hasBackupChecksums":true,"familyCount":1}],"invalidFiles":["test + - Copy.txt","test.json","InvalidBackup %20+ `~1!2@3#4$5%6^7&8(9)0_-+=]}[{;'',, + ;+&[]~{}.txt"],"blobContainerName":"79b234dd-5f04-4f18-9edd-30ce333b6474","isFullBackupRestored":false,"pendingLogBackupsCount":2},"scope":"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/tsum38RG/providers/Microsoft.SqlVirtualMachine/sqlVirtualMachines/DMSCmdletTest-SqlVM","provisioningState":"Succeeded","migrationStatus":"InProgress","startedOn":"2022-01-18T12:36:45.973Z","sourceDatabaseName":"AdventureWorks","migrationService":"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/tsum38RG/providers/Microsoft.DataMigration/sqlMigrationServices/sqlServiceUnitTest-Pipeline","migrationOperationId":"79b234dd-5f04-4f18-9edd-30ce333b6474","kind":"SqlVm"},"id":"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/tsum38RG/providers/Microsoft.SqlVirtualMachine/sqlVirtualMachines/DMSCmdletTest-SqlVM/providers/Microsoft.DataMigration/databaseMigrations/tsum-Db-vm-online-fs9","name":"tsum-Db-vm-online-fs9","type":"Microsoft.DataMigration/databaseMigrations"}' + headers: + cache-control: + - no-cache + content-length: + - '3264' + content-type: + - application/json; charset=utf-8 + date: + - Tue, 18 Jan 2022 12:41:31 GMT + expires: + - '-1' + pragma: + - no-cache + server: + - Microsoft-HTTPAPI/2.0 + strict-transport-security: + - max-age=31536000; includeSubDomains + transfer-encoding: + - chunked + vary: + - Accept-Encoding + x-content-type-options: + - nosniff + status: + code: 200 + message: OK +- request: + body: null + headers: + Accept: + - application/json + Accept-Encoding: + - gzip, deflate + CommandName: + - datamigration sql-vm show + Connection: + - keep-alive + ParameterSetName: + - --sql-vm-name --resource-group --target-db-name --expand + User-Agent: + - AZURECLI/2.32.0 azsdk-python-mgmt-datamigration/1.0.0b1 Python/3.10.1 (Windows-10-10.0.22000-SP0) + method: GET + uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/tsum38RG/providers/Microsoft.SqlVirtualMachine/sqlVirtualMachines/DMSCmdletTest-SqlVM/providers/Microsoft.DataMigration/databaseMigrations/tsum-Db-vm-online-fs9?$expand=MigrationStatusDetails&api-version=2021-10-30-preview + response: + body: + string: '{"properties":{"migrationStatusDetails":{"migrationState":"WaitForFullBackupUploadOperation","fullBackupSetInfo":{"backupSetId":"9fceb4b8-3864-45b6-bd35-998619297164","firstLSN":"486000000131000000","lastLSN":"486000000132600000","backupType":"Database","listOfBackupFiles":[{"fileName":"AdventureWorksFullBackup.bak","status":"Uploading","totalSize":63176192,"dataRead":33554432,"dataWritten":33554432,"copyThroughput":277.69500732421875,"copyDuration":118,"familySequenceNumber":1}],"backupStartDate":"2019-01-11T13:53:40Z","backupFinishDate":"2019-01-11T13:53:40Z","isBackupRestored":false,"familyCount":1},"activeBackupSets":[{"backupSetId":"e6b60e53-c7b5-48dd-8f07-95f0caa66de1","firstLSN":"486000000145100000","lastLSN":"486000000145300000","backupType":"TransactionLog","listOfBackupFiles":[{"fileName":"AdventureWorksTransactionLog2.trn","status":"Arrived","totalSize":259584,"dataRead":0,"dataWritten":0,"copyThroughput":0.0,"copyDuration":0,"familySequenceNumber":1}],"backupStartDate":"2019-01-11T13:56:02Z","backupFinishDate":"2019-01-11T13:56:02Z","isBackupRestored":false,"hasBackupChecksums":true,"familyCount":1},{"backupSetId":"9fceb4b8-3864-45b6-bd35-998619297164","firstLSN":"486000000131000000","lastLSN":"486000000132600000","backupType":"Database","listOfBackupFiles":[{"fileName":"AdventureWorksFullBackup.bak","status":"Uploading","totalSize":63176192,"dataRead":33554432,"dataWritten":33554432,"copyThroughput":277.69500732421875,"copyDuration":118,"familySequenceNumber":1}],"backupStartDate":"2019-01-11T13:53:40Z","backupFinishDate":"2019-01-11T13:53:40Z","isBackupRestored":false,"hasBackupChecksums":true,"familyCount":1},{"backupSetId":"7bdfc66c-14d5-4acc-91d3-d9568cabc0e0","firstLSN":"486000000126400000","lastLSN":"486000000145100000","backupType":"TransactionLog","listOfBackupFiles":[{"fileName":"AdventureWorksTransactionLog1.trn","status":"Arrived","totalSize":325120,"dataRead":0,"dataWritten":0,"copyThroughput":0.0,"copyDuration":0,"familySequenceNumber":1}],"backupStartDate":"2019-01-11T13:55:21Z","backupFinishDate":"2019-01-11T13:55:21Z","isBackupRestored":false,"hasBackupChecksums":true,"familyCount":1}],"invalidFiles":["test + - Copy.txt","test.json","InvalidBackup %20+ `~1!2@3#4$5%6^7&8(9)0_-+=]}[{;'',, + ;+&[]~{}.txt"],"blobContainerName":"79b234dd-5f04-4f18-9edd-30ce333b6474","isFullBackupRestored":false,"pendingLogBackupsCount":2},"scope":"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/tsum38RG/providers/Microsoft.SqlVirtualMachine/sqlVirtualMachines/DMSCmdletTest-SqlVM","provisioningState":"Succeeded","migrationStatus":"InProgress","startedOn":"2022-01-18T12:36:45.973Z","sourceDatabaseName":"AdventureWorks","migrationService":"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/tsum38RG/providers/Microsoft.DataMigration/sqlMigrationServices/sqlServiceUnitTest-Pipeline","migrationOperationId":"79b234dd-5f04-4f18-9edd-30ce333b6474","kind":"SqlVm"},"id":"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/tsum38RG/providers/Microsoft.SqlVirtualMachine/sqlVirtualMachines/DMSCmdletTest-SqlVM/providers/Microsoft.DataMigration/databaseMigrations/tsum-Db-vm-online-fs9","name":"tsum-Db-vm-online-fs9","type":"Microsoft.DataMigration/databaseMigrations"}' + headers: + cache-control: + - no-cache + content-length: + - '3264' + content-type: + - application/json; charset=utf-8 + date: + - Tue, 18 Jan 2022 12:41:43 GMT + expires: + - '-1' + pragma: + - no-cache + server: + - Microsoft-HTTPAPI/2.0 + strict-transport-security: + - max-age=31536000; includeSubDomains + transfer-encoding: + - chunked + vary: + - Accept-Encoding + x-content-type-options: + - nosniff + status: + code: 200 + message: OK +- request: + body: null + headers: + Accept: + - application/json + Accept-Encoding: + - gzip, deflate + CommandName: + - datamigration sql-vm show + Connection: + - keep-alive + ParameterSetName: + - --sql-vm-name --resource-group --target-db-name --expand + User-Agent: + - AZURECLI/2.32.0 azsdk-python-mgmt-datamigration/1.0.0b1 Python/3.10.1 (Windows-10-10.0.22000-SP0) + method: GET + uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/tsum38RG/providers/Microsoft.SqlVirtualMachine/sqlVirtualMachines/DMSCmdletTest-SqlVM/providers/Microsoft.DataMigration/databaseMigrations/tsum-Db-vm-online-fs9?$expand=MigrationStatusDetails&api-version=2021-10-30-preview + response: + body: + string: '{"properties":{"migrationStatusDetails":{"migrationState":"WaitForFullBackupUploadOperation","fullBackupSetInfo":{"backupSetId":"9fceb4b8-3864-45b6-bd35-998619297164","firstLSN":"486000000131000000","lastLSN":"486000000132600000","backupType":"Database","listOfBackupFiles":[{"fileName":"AdventureWorksFullBackup.bak","status":"Uploading","totalSize":63176192,"dataRead":33554432,"dataWritten":33554432,"copyThroughput":277.69500732421875,"copyDuration":118,"familySequenceNumber":1}],"backupStartDate":"2019-01-11T13:53:40Z","backupFinishDate":"2019-01-11T13:53:40Z","isBackupRestored":false,"familyCount":1},"activeBackupSets":[{"backupSetId":"e6b60e53-c7b5-48dd-8f07-95f0caa66de1","firstLSN":"486000000145100000","lastLSN":"486000000145300000","backupType":"TransactionLog","listOfBackupFiles":[{"fileName":"AdventureWorksTransactionLog2.trn","status":"Arrived","totalSize":259584,"dataRead":0,"dataWritten":0,"copyThroughput":0.0,"copyDuration":0,"familySequenceNumber":1}],"backupStartDate":"2019-01-11T13:56:02Z","backupFinishDate":"2019-01-11T13:56:02Z","isBackupRestored":false,"hasBackupChecksums":true,"familyCount":1},{"backupSetId":"9fceb4b8-3864-45b6-bd35-998619297164","firstLSN":"486000000131000000","lastLSN":"486000000132600000","backupType":"Database","listOfBackupFiles":[{"fileName":"AdventureWorksFullBackup.bak","status":"Uploading","totalSize":63176192,"dataRead":33554432,"dataWritten":33554432,"copyThroughput":277.69500732421875,"copyDuration":118,"familySequenceNumber":1}],"backupStartDate":"2019-01-11T13:53:40Z","backupFinishDate":"2019-01-11T13:53:40Z","isBackupRestored":false,"hasBackupChecksums":true,"familyCount":1},{"backupSetId":"7bdfc66c-14d5-4acc-91d3-d9568cabc0e0","firstLSN":"486000000126400000","lastLSN":"486000000145100000","backupType":"TransactionLog","listOfBackupFiles":[{"fileName":"AdventureWorksTransactionLog1.trn","status":"Arrived","totalSize":325120,"dataRead":0,"dataWritten":0,"copyThroughput":0.0,"copyDuration":0,"familySequenceNumber":1}],"backupStartDate":"2019-01-11T13:55:21Z","backupFinishDate":"2019-01-11T13:55:21Z","isBackupRestored":false,"hasBackupChecksums":true,"familyCount":1}],"invalidFiles":["test + - Copy.txt","test.json","InvalidBackup %20+ `~1!2@3#4$5%6^7&8(9)0_-+=]}[{;'',, + ;+&[]~{}.txt"],"blobContainerName":"79b234dd-5f04-4f18-9edd-30ce333b6474","isFullBackupRestored":false,"pendingLogBackupsCount":2},"scope":"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/tsum38RG/providers/Microsoft.SqlVirtualMachine/sqlVirtualMachines/DMSCmdletTest-SqlVM","provisioningState":"Succeeded","migrationStatus":"InProgress","startedOn":"2022-01-18T12:36:45.973Z","sourceDatabaseName":"AdventureWorks","migrationService":"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/tsum38RG/providers/Microsoft.DataMigration/sqlMigrationServices/sqlServiceUnitTest-Pipeline","migrationOperationId":"79b234dd-5f04-4f18-9edd-30ce333b6474","kind":"SqlVm"},"id":"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/tsum38RG/providers/Microsoft.SqlVirtualMachine/sqlVirtualMachines/DMSCmdletTest-SqlVM/providers/Microsoft.DataMigration/databaseMigrations/tsum-Db-vm-online-fs9","name":"tsum-Db-vm-online-fs9","type":"Microsoft.DataMigration/databaseMigrations"}' + headers: + cache-control: + - no-cache + content-length: + - '3264' + content-type: + - application/json; charset=utf-8 + date: + - Tue, 18 Jan 2022 12:41:56 GMT + expires: + - '-1' + pragma: + - no-cache + server: + - Microsoft-HTTPAPI/2.0 + strict-transport-security: + - max-age=31536000; includeSubDomains + transfer-encoding: + - chunked + vary: + - Accept-Encoding + x-content-type-options: + - nosniff + status: + code: 200 + message: OK +- request: + body: null + headers: + Accept: + - application/json + Accept-Encoding: + - gzip, deflate + CommandName: + - datamigration sql-vm show + Connection: + - keep-alive + ParameterSetName: + - --sql-vm-name --resource-group --target-db-name --expand + User-Agent: + - AZURECLI/2.32.0 azsdk-python-mgmt-datamigration/1.0.0b1 Python/3.10.1 (Windows-10-10.0.22000-SP0) + method: GET + uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/tsum38RG/providers/Microsoft.SqlVirtualMachine/sqlVirtualMachines/DMSCmdletTest-SqlVM/providers/Microsoft.DataMigration/databaseMigrations/tsum-Db-vm-online-fs9?$expand=MigrationStatusDetails&api-version=2021-10-30-preview + response: + body: + string: '{"properties":{"migrationStatusDetails":{"migrationState":"WaitForFullBackupUploadOperation","fullBackupSetInfo":{"backupSetId":"9fceb4b8-3864-45b6-bd35-998619297164","firstLSN":"486000000131000000","lastLSN":"486000000132600000","backupType":"Database","listOfBackupFiles":[{"fileName":"AdventureWorksFullBackup.bak","status":"Uploaded","totalSize":63176192,"dataRead":63176192,"dataWritten":63176192,"copyThroughput":356.62100219726562,"copyDuration":173,"familySequenceNumber":1}],"backupStartDate":"2019-01-11T13:53:40Z","backupFinishDate":"2019-01-11T13:53:40Z","isBackupRestored":false,"familyCount":1},"activeBackupSets":[{"backupSetId":"e6b60e53-c7b5-48dd-8f07-95f0caa66de1","firstLSN":"486000000145100000","lastLSN":"486000000145300000","backupType":"TransactionLog","listOfBackupFiles":[{"fileName":"AdventureWorksTransactionLog2.trn","status":"Arrived","totalSize":259584,"dataRead":0,"dataWritten":0,"copyThroughput":0.0,"copyDuration":0,"familySequenceNumber":1}],"backupStartDate":"2019-01-11T13:56:02Z","backupFinishDate":"2019-01-11T13:56:02Z","isBackupRestored":false,"hasBackupChecksums":true,"familyCount":1},{"backupSetId":"9fceb4b8-3864-45b6-bd35-998619297164","firstLSN":"486000000131000000","lastLSN":"486000000132600000","backupType":"Database","listOfBackupFiles":[{"fileName":"AdventureWorksFullBackup.bak","status":"Uploaded","totalSize":63176192,"dataRead":63176192,"dataWritten":63176192,"copyThroughput":356.62100219726562,"copyDuration":173,"familySequenceNumber":1}],"backupStartDate":"2019-01-11T13:53:40Z","backupFinishDate":"2019-01-11T13:53:40Z","isBackupRestored":false,"hasBackupChecksums":true,"familyCount":1},{"backupSetId":"7bdfc66c-14d5-4acc-91d3-d9568cabc0e0","firstLSN":"486000000126400000","lastLSN":"486000000145100000","backupType":"TransactionLog","listOfBackupFiles":[{"fileName":"AdventureWorksTransactionLog1.trn","status":"Arrived","totalSize":325120,"dataRead":0,"dataWritten":0,"copyThroughput":0.0,"copyDuration":0,"familySequenceNumber":1}],"backupStartDate":"2019-01-11T13:55:21Z","backupFinishDate":"2019-01-11T13:55:21Z","isBackupRestored":false,"hasBackupChecksums":true,"familyCount":1}],"invalidFiles":["test + - Copy.txt","test.json","InvalidBackup %20+ `~1!2@3#4$5%6^7&8(9)0_-+=]}[{;'',, + ;+&[]~{}.txt"],"blobContainerName":"79b234dd-5f04-4f18-9edd-30ce333b6474","isFullBackupRestored":false,"pendingLogBackupsCount":2},"scope":"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/tsum38RG/providers/Microsoft.SqlVirtualMachine/sqlVirtualMachines/DMSCmdletTest-SqlVM","provisioningState":"Succeeded","migrationStatus":"InProgress","startedOn":"2022-01-18T12:36:45.973Z","sourceDatabaseName":"AdventureWorks","migrationService":"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/tsum38RG/providers/Microsoft.DataMigration/sqlMigrationServices/sqlServiceUnitTest-Pipeline","migrationOperationId":"79b234dd-5f04-4f18-9edd-30ce333b6474","kind":"SqlVm"},"id":"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/tsum38RG/providers/Microsoft.SqlVirtualMachine/sqlVirtualMachines/DMSCmdletTest-SqlVM/providers/Microsoft.DataMigration/databaseMigrations/tsum-Db-vm-online-fs9","name":"tsum-Db-vm-online-fs9","type":"Microsoft.DataMigration/databaseMigrations"}' + headers: + cache-control: + - no-cache + content-length: + - '3262' + content-type: + - application/json; charset=utf-8 + date: + - Tue, 18 Jan 2022 12:42:07 GMT + expires: + - '-1' + pragma: + - no-cache + server: + - Microsoft-HTTPAPI/2.0 + strict-transport-security: + - max-age=31536000; includeSubDomains + transfer-encoding: + - chunked + vary: + - Accept-Encoding + x-content-type-options: + - nosniff + status: + code: 200 + message: OK +- request: + body: null + headers: + Accept: + - application/json + Accept-Encoding: + - gzip, deflate + CommandName: + - datamigration sql-vm show + Connection: + - keep-alive + ParameterSetName: + - --sql-vm-name --resource-group --target-db-name --expand + User-Agent: + - AZURECLI/2.32.0 azsdk-python-mgmt-datamigration/1.0.0b1 Python/3.10.1 (Windows-10-10.0.22000-SP0) + method: GET + uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/tsum38RG/providers/Microsoft.SqlVirtualMachine/sqlVirtualMachines/DMSCmdletTest-SqlVM/providers/Microsoft.DataMigration/databaseMigrations/tsum-Db-vm-online-fs9?$expand=MigrationStatusDetails&api-version=2021-10-30-preview + response: + body: + string: '{"properties":{"migrationStatusDetails":{"migrationState":"WaitForFullBackupUploadOperation","fullBackupSetInfo":{"backupSetId":"9fceb4b8-3864-45b6-bd35-998619297164","firstLSN":"486000000131000000","lastLSN":"486000000132600000","backupType":"Database","listOfBackupFiles":[{"fileName":"AdventureWorksFullBackup.bak","status":"Uploaded","totalSize":63176192,"dataRead":63176192,"dataWritten":63176192,"copyThroughput":356.62100219726562,"copyDuration":173,"familySequenceNumber":1}],"backupStartDate":"2019-01-11T13:53:40Z","backupFinishDate":"2019-01-11T13:53:40Z","isBackupRestored":false,"familyCount":1},"activeBackupSets":[{"backupSetId":"e6b60e53-c7b5-48dd-8f07-95f0caa66de1","firstLSN":"486000000145100000","lastLSN":"486000000145300000","backupType":"TransactionLog","listOfBackupFiles":[{"fileName":"AdventureWorksTransactionLog2.trn","status":"Arrived","totalSize":259584,"dataRead":0,"dataWritten":0,"copyThroughput":0.0,"copyDuration":0,"familySequenceNumber":1}],"backupStartDate":"2019-01-11T13:56:02Z","backupFinishDate":"2019-01-11T13:56:02Z","isBackupRestored":false,"hasBackupChecksums":true,"familyCount":1},{"backupSetId":"9fceb4b8-3864-45b6-bd35-998619297164","firstLSN":"486000000131000000","lastLSN":"486000000132600000","backupType":"Database","listOfBackupFiles":[{"fileName":"AdventureWorksFullBackup.bak","status":"Uploaded","totalSize":63176192,"dataRead":63176192,"dataWritten":63176192,"copyThroughput":356.62100219726562,"copyDuration":173,"familySequenceNumber":1}],"backupStartDate":"2019-01-11T13:53:40Z","backupFinishDate":"2019-01-11T13:53:40Z","isBackupRestored":false,"hasBackupChecksums":true,"familyCount":1},{"backupSetId":"7bdfc66c-14d5-4acc-91d3-d9568cabc0e0","firstLSN":"486000000126400000","lastLSN":"486000000145100000","backupType":"TransactionLog","listOfBackupFiles":[{"fileName":"AdventureWorksTransactionLog1.trn","status":"Arrived","totalSize":325120,"dataRead":0,"dataWritten":0,"copyThroughput":0.0,"copyDuration":0,"familySequenceNumber":1}],"backupStartDate":"2019-01-11T13:55:21Z","backupFinishDate":"2019-01-11T13:55:21Z","isBackupRestored":false,"hasBackupChecksums":true,"familyCount":1}],"invalidFiles":["test + - Copy.txt","test.json","InvalidBackup %20+ `~1!2@3#4$5%6^7&8(9)0_-+=]}[{;'',, + ;+&[]~{}.txt"],"blobContainerName":"79b234dd-5f04-4f18-9edd-30ce333b6474","isFullBackupRestored":false,"pendingLogBackupsCount":2},"scope":"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/tsum38RG/providers/Microsoft.SqlVirtualMachine/sqlVirtualMachines/DMSCmdletTest-SqlVM","provisioningState":"Succeeded","migrationStatus":"InProgress","startedOn":"2022-01-18T12:36:45.973Z","sourceDatabaseName":"AdventureWorks","migrationService":"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/tsum38RG/providers/Microsoft.DataMigration/sqlMigrationServices/sqlServiceUnitTest-Pipeline","migrationOperationId":"79b234dd-5f04-4f18-9edd-30ce333b6474","kind":"SqlVm"},"id":"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/tsum38RG/providers/Microsoft.SqlVirtualMachine/sqlVirtualMachines/DMSCmdletTest-SqlVM/providers/Microsoft.DataMigration/databaseMigrations/tsum-Db-vm-online-fs9","name":"tsum-Db-vm-online-fs9","type":"Microsoft.DataMigration/databaseMigrations"}' + headers: + cache-control: + - no-cache + content-length: + - '3262' + content-type: + - application/json; charset=utf-8 + date: + - Tue, 18 Jan 2022 12:42:19 GMT + expires: + - '-1' + pragma: + - no-cache + server: + - Microsoft-HTTPAPI/2.0 + strict-transport-security: + - max-age=31536000; includeSubDomains + transfer-encoding: + - chunked + vary: + - Accept-Encoding + x-content-type-options: + - nosniff + status: + code: 200 + message: OK +- request: + body: null + headers: + Accept: + - application/json + Accept-Encoding: + - gzip, deflate + CommandName: + - datamigration sql-vm show + Connection: + - keep-alive + ParameterSetName: + - --sql-vm-name --resource-group --target-db-name --expand + User-Agent: + - AZURECLI/2.32.0 azsdk-python-mgmt-datamigration/1.0.0b1 Python/3.10.1 (Windows-10-10.0.22000-SP0) + method: GET + uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/tsum38RG/providers/Microsoft.SqlVirtualMachine/sqlVirtualMachines/DMSCmdletTest-SqlVM/providers/Microsoft.DataMigration/databaseMigrations/tsum-Db-vm-online-fs9?$expand=MigrationStatusDetails&api-version=2021-10-30-preview + response: + body: + string: '{"properties":{"migrationStatusDetails":{"migrationState":"WaitForFullBackupUploadOperation","fullBackupSetInfo":{"backupSetId":"9fceb4b8-3864-45b6-bd35-998619297164","firstLSN":"486000000131000000","lastLSN":"486000000132600000","backupType":"Database","listOfBackupFiles":[{"fileName":"AdventureWorksFullBackup.bak","status":"Uploaded","totalSize":63176192,"dataRead":63176192,"dataWritten":63176192,"copyThroughput":356.62100219726562,"copyDuration":173,"familySequenceNumber":1}],"backupStartDate":"2019-01-11T13:53:40Z","backupFinishDate":"2019-01-11T13:53:40Z","isBackupRestored":false,"familyCount":1},"activeBackupSets":[{"backupSetId":"e6b60e53-c7b5-48dd-8f07-95f0caa66de1","firstLSN":"486000000145100000","lastLSN":"486000000145300000","backupType":"TransactionLog","listOfBackupFiles":[{"fileName":"AdventureWorksTransactionLog2.trn","status":"Arrived","totalSize":259584,"dataRead":0,"dataWritten":0,"copyThroughput":0.0,"copyDuration":0,"familySequenceNumber":1}],"backupStartDate":"2019-01-11T13:56:02Z","backupFinishDate":"2019-01-11T13:56:02Z","isBackupRestored":false,"hasBackupChecksums":true,"familyCount":1},{"backupSetId":"9fceb4b8-3864-45b6-bd35-998619297164","firstLSN":"486000000131000000","lastLSN":"486000000132600000","backupType":"Database","listOfBackupFiles":[{"fileName":"AdventureWorksFullBackup.bak","status":"Uploaded","totalSize":63176192,"dataRead":63176192,"dataWritten":63176192,"copyThroughput":356.62100219726562,"copyDuration":173,"familySequenceNumber":1}],"backupStartDate":"2019-01-11T13:53:40Z","backupFinishDate":"2019-01-11T13:53:40Z","isBackupRestored":false,"hasBackupChecksums":true,"familyCount":1},{"backupSetId":"7bdfc66c-14d5-4acc-91d3-d9568cabc0e0","firstLSN":"486000000126400000","lastLSN":"486000000145100000","backupType":"TransactionLog","listOfBackupFiles":[{"fileName":"AdventureWorksTransactionLog1.trn","status":"Arrived","totalSize":325120,"dataRead":0,"dataWritten":0,"copyThroughput":0.0,"copyDuration":0,"familySequenceNumber":1}],"backupStartDate":"2019-01-11T13:55:21Z","backupFinishDate":"2019-01-11T13:55:21Z","isBackupRestored":false,"hasBackupChecksums":true,"familyCount":1}],"invalidFiles":["test + - Copy.txt","test.json","InvalidBackup %20+ `~1!2@3#4$5%6^7&8(9)0_-+=]}[{;'',, + ;+&[]~{}.txt"],"blobContainerName":"79b234dd-5f04-4f18-9edd-30ce333b6474","isFullBackupRestored":false,"pendingLogBackupsCount":2},"scope":"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/tsum38RG/providers/Microsoft.SqlVirtualMachine/sqlVirtualMachines/DMSCmdletTest-SqlVM","provisioningState":"Succeeded","migrationStatus":"InProgress","startedOn":"2022-01-18T12:36:45.973Z","sourceDatabaseName":"AdventureWorks","migrationService":"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/tsum38RG/providers/Microsoft.DataMigration/sqlMigrationServices/sqlServiceUnitTest-Pipeline","migrationOperationId":"79b234dd-5f04-4f18-9edd-30ce333b6474","kind":"SqlVm"},"id":"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/tsum38RG/providers/Microsoft.SqlVirtualMachine/sqlVirtualMachines/DMSCmdletTest-SqlVM/providers/Microsoft.DataMigration/databaseMigrations/tsum-Db-vm-online-fs9","name":"tsum-Db-vm-online-fs9","type":"Microsoft.DataMigration/databaseMigrations"}' + headers: + cache-control: + - no-cache + content-length: + - '3262' + content-type: + - application/json; charset=utf-8 + date: + - Tue, 18 Jan 2022 12:42:30 GMT + expires: + - '-1' + pragma: + - no-cache + server: + - Microsoft-HTTPAPI/2.0 + strict-transport-security: + - max-age=31536000; includeSubDomains + transfer-encoding: + - chunked + vary: + - Accept-Encoding + x-content-type-options: + - nosniff + status: + code: 200 + message: OK +- request: + body: null + headers: + Accept: + - application/json + Accept-Encoding: + - gzip, deflate + CommandName: + - datamigration sql-vm show + Connection: + - keep-alive + ParameterSetName: + - --sql-vm-name --resource-group --target-db-name --expand + User-Agent: + - AZURECLI/2.32.0 azsdk-python-mgmt-datamigration/1.0.0b1 Python/3.10.1 (Windows-10-10.0.22000-SP0) + method: GET + uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/tsum38RG/providers/Microsoft.SqlVirtualMachine/sqlVirtualMachines/DMSCmdletTest-SqlVM/providers/Microsoft.DataMigration/databaseMigrations/tsum-Db-vm-online-fs9?$expand=MigrationStatusDetails&api-version=2021-10-30-preview + response: + body: + string: '{"properties":{"migrationStatusDetails":{"migrationState":"WaitForFullBackupUploadOperation","fullBackupSetInfo":{"backupSetId":"9fceb4b8-3864-45b6-bd35-998619297164","firstLSN":"486000000131000000","lastLSN":"486000000132600000","backupType":"Database","listOfBackupFiles":[{"fileName":"AdventureWorksFullBackup.bak","status":"Uploaded","totalSize":63176192,"dataRead":63176192,"dataWritten":63176192,"copyThroughput":356.62100219726562,"copyDuration":173,"familySequenceNumber":1}],"backupStartDate":"2019-01-11T13:53:40Z","backupFinishDate":"2019-01-11T13:53:40Z","isBackupRestored":false,"familyCount":1},"activeBackupSets":[{"backupSetId":"e6b60e53-c7b5-48dd-8f07-95f0caa66de1","firstLSN":"486000000145100000","lastLSN":"486000000145300000","backupType":"TransactionLog","listOfBackupFiles":[{"fileName":"AdventureWorksTransactionLog2.trn","status":"Arrived","totalSize":259584,"dataRead":0,"dataWritten":0,"copyThroughput":0.0,"copyDuration":0,"familySequenceNumber":1}],"backupStartDate":"2019-01-11T13:56:02Z","backupFinishDate":"2019-01-11T13:56:02Z","isBackupRestored":false,"hasBackupChecksums":true,"familyCount":1},{"backupSetId":"9fceb4b8-3864-45b6-bd35-998619297164","firstLSN":"486000000131000000","lastLSN":"486000000132600000","backupType":"Database","listOfBackupFiles":[{"fileName":"AdventureWorksFullBackup.bak","status":"Uploaded","totalSize":63176192,"dataRead":63176192,"dataWritten":63176192,"copyThroughput":356.62100219726562,"copyDuration":173,"familySequenceNumber":1}],"backupStartDate":"2019-01-11T13:53:40Z","backupFinishDate":"2019-01-11T13:53:40Z","isBackupRestored":false,"hasBackupChecksums":true,"familyCount":1},{"backupSetId":"7bdfc66c-14d5-4acc-91d3-d9568cabc0e0","firstLSN":"486000000126400000","lastLSN":"486000000145100000","backupType":"TransactionLog","listOfBackupFiles":[{"fileName":"AdventureWorksTransactionLog1.trn","status":"Arrived","totalSize":325120,"dataRead":0,"dataWritten":0,"copyThroughput":0.0,"copyDuration":0,"familySequenceNumber":1}],"backupStartDate":"2019-01-11T13:55:21Z","backupFinishDate":"2019-01-11T13:55:21Z","isBackupRestored":false,"hasBackupChecksums":true,"familyCount":1}],"invalidFiles":["test + - Copy.txt","test.json","InvalidBackup %20+ `~1!2@3#4$5%6^7&8(9)0_-+=]}[{;'',, + ;+&[]~{}.txt"],"blobContainerName":"79b234dd-5f04-4f18-9edd-30ce333b6474","isFullBackupRestored":false,"pendingLogBackupsCount":2},"scope":"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/tsum38RG/providers/Microsoft.SqlVirtualMachine/sqlVirtualMachines/DMSCmdletTest-SqlVM","provisioningState":"Succeeded","migrationStatus":"InProgress","startedOn":"2022-01-18T12:36:45.973Z","sourceDatabaseName":"AdventureWorks","migrationService":"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/tsum38RG/providers/Microsoft.DataMigration/sqlMigrationServices/sqlServiceUnitTest-Pipeline","migrationOperationId":"79b234dd-5f04-4f18-9edd-30ce333b6474","kind":"SqlVm"},"id":"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/tsum38RG/providers/Microsoft.SqlVirtualMachine/sqlVirtualMachines/DMSCmdletTest-SqlVM/providers/Microsoft.DataMigration/databaseMigrations/tsum-Db-vm-online-fs9","name":"tsum-Db-vm-online-fs9","type":"Microsoft.DataMigration/databaseMigrations"}' + headers: + cache-control: + - no-cache + content-length: + - '3262' + content-type: + - application/json; charset=utf-8 + date: + - Tue, 18 Jan 2022 12:42:42 GMT + expires: + - '-1' + pragma: + - no-cache + server: + - Microsoft-HTTPAPI/2.0 + strict-transport-security: + - max-age=31536000; includeSubDomains + transfer-encoding: + - chunked + vary: + - Accept-Encoding + x-content-type-options: + - nosniff + status: + code: 200 + message: OK +- request: + body: null + headers: + Accept: + - application/json + Accept-Encoding: + - gzip, deflate + CommandName: + - datamigration sql-vm show + Connection: + - keep-alive + ParameterSetName: + - --sql-vm-name --resource-group --target-db-name --expand + User-Agent: + - AZURECLI/2.32.0 azsdk-python-mgmt-datamigration/1.0.0b1 Python/3.10.1 (Windows-10-10.0.22000-SP0) + method: GET + uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/tsum38RG/providers/Microsoft.SqlVirtualMachine/sqlVirtualMachines/DMSCmdletTest-SqlVM/providers/Microsoft.DataMigration/databaseMigrations/tsum-Db-vm-online-fs9?$expand=MigrationStatusDetails&api-version=2021-10-30-preview + response: + body: + string: '{"properties":{"migrationStatusDetails":{"migrationState":"WaitForFullBackupUploadOperation","fullBackupSetInfo":{"backupSetId":"9fceb4b8-3864-45b6-bd35-998619297164","firstLSN":"486000000131000000","lastLSN":"486000000132600000","backupType":"Database","listOfBackupFiles":[{"fileName":"AdventureWorksFullBackup.bak","status":"Uploaded","totalSize":63176192,"dataRead":63176192,"dataWritten":63176192,"copyThroughput":356.62100219726562,"copyDuration":173,"familySequenceNumber":1}],"backupStartDate":"2019-01-11T13:53:40Z","backupFinishDate":"2019-01-11T13:53:40Z","isBackupRestored":false,"familyCount":1},"activeBackupSets":[{"backupSetId":"e6b60e53-c7b5-48dd-8f07-95f0caa66de1","firstLSN":"486000000145100000","lastLSN":"486000000145300000","backupType":"TransactionLog","listOfBackupFiles":[{"fileName":"AdventureWorksTransactionLog2.trn","status":"Arrived","totalSize":259584,"dataRead":0,"dataWritten":0,"copyThroughput":0.0,"copyDuration":0,"familySequenceNumber":1}],"backupStartDate":"2019-01-11T13:56:02Z","backupFinishDate":"2019-01-11T13:56:02Z","isBackupRestored":false,"hasBackupChecksums":true,"familyCount":1},{"backupSetId":"9fceb4b8-3864-45b6-bd35-998619297164","firstLSN":"486000000131000000","lastLSN":"486000000132600000","backupType":"Database","listOfBackupFiles":[{"fileName":"AdventureWorksFullBackup.bak","status":"Uploaded","totalSize":63176192,"dataRead":63176192,"dataWritten":63176192,"copyThroughput":356.62100219726562,"copyDuration":173,"familySequenceNumber":1}],"backupStartDate":"2019-01-11T13:53:40Z","backupFinishDate":"2019-01-11T13:53:40Z","isBackupRestored":false,"hasBackupChecksums":true,"familyCount":1},{"backupSetId":"7bdfc66c-14d5-4acc-91d3-d9568cabc0e0","firstLSN":"486000000126400000","lastLSN":"486000000145100000","backupType":"TransactionLog","listOfBackupFiles":[{"fileName":"AdventureWorksTransactionLog1.trn","status":"Arrived","totalSize":325120,"dataRead":0,"dataWritten":0,"copyThroughput":0.0,"copyDuration":0,"familySequenceNumber":1}],"backupStartDate":"2019-01-11T13:55:21Z","backupFinishDate":"2019-01-11T13:55:21Z","isBackupRestored":false,"hasBackupChecksums":true,"familyCount":1}],"invalidFiles":["test + - Copy.txt","test.json","InvalidBackup %20+ `~1!2@3#4$5%6^7&8(9)0_-+=]}[{;'',, + ;+&[]~{}.txt"],"blobContainerName":"79b234dd-5f04-4f18-9edd-30ce333b6474","isFullBackupRestored":false,"pendingLogBackupsCount":2},"scope":"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/tsum38RG/providers/Microsoft.SqlVirtualMachine/sqlVirtualMachines/DMSCmdletTest-SqlVM","provisioningState":"Succeeded","migrationStatus":"InProgress","startedOn":"2022-01-18T12:36:45.973Z","sourceDatabaseName":"AdventureWorks","migrationService":"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/tsum38RG/providers/Microsoft.DataMigration/sqlMigrationServices/sqlServiceUnitTest-Pipeline","migrationOperationId":"79b234dd-5f04-4f18-9edd-30ce333b6474","kind":"SqlVm"},"id":"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/tsum38RG/providers/Microsoft.SqlVirtualMachine/sqlVirtualMachines/DMSCmdletTest-SqlVM/providers/Microsoft.DataMigration/databaseMigrations/tsum-Db-vm-online-fs9","name":"tsum-Db-vm-online-fs9","type":"Microsoft.DataMigration/databaseMigrations"}' + headers: + cache-control: + - no-cache + content-length: + - '3262' + content-type: + - application/json; charset=utf-8 + date: + - Tue, 18 Jan 2022 12:42:53 GMT + expires: + - '-1' + pragma: + - no-cache + server: + - Microsoft-HTTPAPI/2.0 + strict-transport-security: + - max-age=31536000; includeSubDomains + transfer-encoding: + - chunked + vary: + - Accept-Encoding + x-content-type-options: + - nosniff + status: + code: 200 + message: OK +- request: + body: null + headers: + Accept: + - application/json + Accept-Encoding: + - gzip, deflate + CommandName: + - datamigration sql-vm show + Connection: + - keep-alive + ParameterSetName: + - --sql-vm-name --resource-group --target-db-name --expand + User-Agent: + - AZURECLI/2.32.0 azsdk-python-mgmt-datamigration/1.0.0b1 Python/3.10.1 (Windows-10-10.0.22000-SP0) + method: GET + uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/tsum38RG/providers/Microsoft.SqlVirtualMachine/sqlVirtualMachines/DMSCmdletTest-SqlVM/providers/Microsoft.DataMigration/databaseMigrations/tsum-Db-vm-online-fs9?$expand=MigrationStatusDetails&api-version=2021-10-30-preview + response: + body: + string: '{"properties":{"migrationStatusDetails":{"migrationState":"RestoreStart","fullBackupSetInfo":{"backupSetId":"9fceb4b8-3864-45b6-bd35-998619297164","firstLSN":"486000000131000000","lastLSN":"486000000132600000","backupType":"Database","listOfBackupFiles":[{"fileName":"AdventureWorksFullBackup.bak","status":"Uploaded","totalSize":63176192,"dataRead":63176192,"dataWritten":63176192,"copyThroughput":356.62100219726562,"copyDuration":173,"familySequenceNumber":1}],"backupStartDate":"2019-01-11T13:53:40Z","backupFinishDate":"2019-01-11T13:53:40Z","isBackupRestored":false,"familyCount":1},"activeBackupSets":[{"backupSetId":"e6b60e53-c7b5-48dd-8f07-95f0caa66de1","firstLSN":"486000000145100000","lastLSN":"486000000145300000","backupType":"TransactionLog","listOfBackupFiles":[{"fileName":"AdventureWorksTransactionLog2.trn","status":"Arrived","totalSize":259584,"dataRead":0,"dataWritten":0,"copyThroughput":0.0,"copyDuration":0,"familySequenceNumber":1}],"backupStartDate":"2019-01-11T13:56:02Z","backupFinishDate":"2019-01-11T13:56:02Z","isBackupRestored":false,"hasBackupChecksums":true,"familyCount":1},{"backupSetId":"9fceb4b8-3864-45b6-bd35-998619297164","firstLSN":"486000000131000000","lastLSN":"486000000132600000","backupType":"Database","listOfBackupFiles":[{"fileName":"AdventureWorksFullBackup.bak","status":"Uploaded","totalSize":63176192,"dataRead":63176192,"dataWritten":63176192,"copyThroughput":356.62100219726562,"copyDuration":173,"familySequenceNumber":1}],"backupStartDate":"2019-01-11T13:53:40Z","backupFinishDate":"2019-01-11T13:53:40Z","isBackupRestored":false,"hasBackupChecksums":true,"familyCount":1},{"backupSetId":"7bdfc66c-14d5-4acc-91d3-d9568cabc0e0","firstLSN":"486000000126400000","lastLSN":"486000000145100000","backupType":"TransactionLog","listOfBackupFiles":[{"fileName":"AdventureWorksTransactionLog1.trn","status":"Arrived","totalSize":325120,"dataRead":0,"dataWritten":0,"copyThroughput":0.0,"copyDuration":0,"familySequenceNumber":1}],"backupStartDate":"2019-01-11T13:55:21Z","backupFinishDate":"2019-01-11T13:55:21Z","isBackupRestored":false,"hasBackupChecksums":true,"familyCount":1}],"invalidFiles":["test + - Copy.txt","test.json","InvalidBackup %20+ `~1!2@3#4$5%6^7&8(9)0_-+=]}[{;'',, + ;+&[]~{}.txt"],"blobContainerName":"79b234dd-5f04-4f18-9edd-30ce333b6474","isFullBackupRestored":false,"fileUploadBlockingErrors":["Failure + happened on ''Source'' side. ErrorCode=SqlOperationFailed,''Type=Microsoft.DataTransfer.Common.Shared.HybridDeliveryException,Message=A + database operation failed with the following error: ''Cannot open backup device + ''\\\\aalab03-2k8.redmond.corp.microsoft.com\\SharedBackup\\tsuman\\backup''. + Operating system error 5(Access is denied.).\nRESTORE HEADERONLY is terminating + abnormally.'',Source=,''''Type=System.Data.SqlClient.SqlException,Message=Cannot + open backup device ''\\\\aalab03-2k8.redmond.corp.microsoft.com\\SharedBackup\\tsuman\\backup''. + Operating system error 5(Access is denied.).\nRESTORE HEADERONLY is terminating + abnormally.,Source=.Net SqlClient Data Provider,SqlErrorNumber=3201,Class=16,ErrorCode=-2146232060,State=2,Errors=[{Class=16,Number=3201,State=2,Message=Cannot + open backup device ''\\\\aalab03-2k8.redmond.corp.microsoft.com\\SharedBackup\\tsuman\\backup''. + Operating system error 5(Access is denied.).,},{Class=16,Number=3013,State=1,Message=RESTORE + HEADERONLY is terminating abnormally.,},],''","Failure happened on ''Source'' + side. ErrorCode=SqlOperationFailed,''Type=Microsoft.DataTransfer.Common.Shared.HybridDeliveryException,Message=A + database operation failed with the following error: ''The volume on device + ''\\\\aalab03-2k8.redmond.corp.microsoft.com\\SharedBackup\\tsuman\\test.json'' + is empty.\nRESTORE HEADERONLY is terminating abnormally.'',Source=,''''Type=System.Data.SqlClient.SqlException,Message=The + volume on device ''\\\\aalab03-2k8.redmond.corp.microsoft.com\\SharedBackup\\tsuman\\test.json'' + is empty.\nRESTORE HEADERONLY is terminating abnormally.,Source=.Net SqlClient + Data Provider,SqlErrorNumber=3254,Class=16,ErrorCode=-2146232060,State=1,Errors=[{Class=16,Number=3254,State=1,Message=The + volume on device ''\\\\aalab03-2k8.redmond.corp.microsoft.com\\SharedBackup\\tsuman\\test.json'' + is empty.,},{Class=16,Number=3013,State=1,Message=RESTORE HEADERONLY is terminating + abnormally.,},],''","Failure happened on ''Source'' side. ErrorCode=SqlOperationFailed,''Type=Microsoft.DataTransfer.Common.Shared.HybridDeliveryException,Message=A + database operation failed with the following error: ''The volume on device + ''\\\\aalab03-2k8.redmond.corp.microsoft.com\\SharedBackup\\tsuman\\test - + Copy.txt'' is empty.\nRESTORE HEADERONLY is terminating abnormally.'',Source=,''''Type=System.Data.SqlClient.SqlException,Message=The + volume on device ''\\\\aalab03-2k8.redmond.corp.microsoft.com\\SharedBackup\\tsuman\\test + - Copy.txt'' is empty.\nRESTORE HEADERONLY is terminating abnormally.,Source=.Net + SqlClient Data Provider,SqlErrorNumber=3254,Class=16,ErrorCode=-2146232060,State=1,Errors=[{Class=16,Number=3254,State=1,Message=The + volume on device ''\\\\aalab03-2k8.redmond.corp.microsoft.com\\SharedBackup\\tsuman\\test + - Copy.txt'' is empty.,},{Class=16,Number=3013,State=1,Message=RESTORE HEADERONLY + is terminating abnormally.,},],''"],"pendingLogBackupsCount":2},"scope":"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/tsum38RG/providers/Microsoft.SqlVirtualMachine/sqlVirtualMachines/DMSCmdletTest-SqlVM","provisioningState":"Succeeded","migrationStatus":"InProgress","startedOn":"2022-01-18T12:36:45.973Z","sourceDatabaseName":"AdventureWorks","migrationService":"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/tsum38RG/providers/Microsoft.DataMigration/sqlMigrationServices/sqlServiceUnitTest-Pipeline","migrationOperationId":"79b234dd-5f04-4f18-9edd-30ce333b6474","kind":"SqlVm"},"id":"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/tsum38RG/providers/Microsoft.SqlVirtualMachine/sqlVirtualMachines/DMSCmdletTest-SqlVM/providers/Microsoft.DataMigration/databaseMigrations/tsum-Db-vm-online-fs9","name":"tsum-Db-vm-online-fs9","type":"Microsoft.DataMigration/databaseMigrations"}' + headers: + cache-control: + - no-cache + content-length: + - '6130' + content-type: + - application/json; charset=utf-8 + date: + - Tue, 18 Jan 2022 12:43:05 GMT + expires: + - '-1' + pragma: + - no-cache + server: + - Microsoft-HTTPAPI/2.0 + strict-transport-security: + - max-age=31536000; includeSubDomains + transfer-encoding: + - chunked + vary: + - Accept-Encoding + x-content-type-options: + - nosniff + status: + code: 200 + message: OK +- request: + body: null + headers: + Accept: + - application/json + Accept-Encoding: + - gzip, deflate + CommandName: + - datamigration sql-vm show + Connection: + - keep-alive + ParameterSetName: + - --sql-vm-name --resource-group --target-db-name --expand + User-Agent: + - AZURECLI/2.32.0 azsdk-python-mgmt-datamigration/1.0.0b1 Python/3.10.1 (Windows-10-10.0.22000-SP0) + method: GET + uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/tsum38RG/providers/Microsoft.SqlVirtualMachine/sqlVirtualMachines/DMSCmdletTest-SqlVM/providers/Microsoft.DataMigration/databaseMigrations/tsum-Db-vm-online-fs9?$expand=MigrationStatusDetails&api-version=2021-10-30-preview + response: + body: + string: '{"properties":{"migrationStatusDetails":{"migrationState":"WaitRestoreStart","fullBackupSetInfo":{"backupSetId":"9fceb4b8-3864-45b6-bd35-998619297164","firstLSN":"486000000131000000","lastLSN":"486000000132600000","backupType":"Database","listOfBackupFiles":[{"fileName":"AdventureWorksFullBackup.bak","status":"Uploaded","totalSize":63176192,"dataRead":63176192,"dataWritten":63176192,"copyThroughput":356.62100219726562,"copyDuration":173,"familySequenceNumber":1}],"backupStartDate":"2019-01-11T13:53:40Z","backupFinishDate":"2019-01-11T13:53:40Z","isBackupRestored":false,"familyCount":1},"activeBackupSets":[{"backupSetId":"e6b60e53-c7b5-48dd-8f07-95f0caa66de1","firstLSN":"486000000145100000","lastLSN":"486000000145300000","backupType":"TransactionLog","listOfBackupFiles":[{"fileName":"AdventureWorksTransactionLog2.trn","status":"Arrived","totalSize":259584,"dataRead":0,"dataWritten":0,"copyThroughput":0.0,"copyDuration":0,"familySequenceNumber":1}],"backupStartDate":"2019-01-11T13:56:02Z","backupFinishDate":"2019-01-11T13:56:02Z","isBackupRestored":false,"hasBackupChecksums":true,"familyCount":1},{"backupSetId":"9fceb4b8-3864-45b6-bd35-998619297164","firstLSN":"486000000131000000","lastLSN":"486000000132600000","backupType":"Database","listOfBackupFiles":[{"fileName":"AdventureWorksFullBackup.bak","status":"Uploaded","totalSize":63176192,"dataRead":63176192,"dataWritten":63176192,"copyThroughput":356.62100219726562,"copyDuration":173,"familySequenceNumber":1}],"backupStartDate":"2019-01-11T13:53:40Z","backupFinishDate":"2019-01-11T13:53:40Z","isBackupRestored":false,"hasBackupChecksums":true,"familyCount":1},{"backupSetId":"7bdfc66c-14d5-4acc-91d3-d9568cabc0e0","firstLSN":"486000000126400000","lastLSN":"486000000145100000","backupType":"TransactionLog","listOfBackupFiles":[{"fileName":"AdventureWorksTransactionLog1.trn","status":"Arrived","totalSize":325120,"dataRead":0,"dataWritten":0,"copyThroughput":0.0,"copyDuration":0,"familySequenceNumber":1}],"backupStartDate":"2019-01-11T13:55:21Z","backupFinishDate":"2019-01-11T13:55:21Z","isBackupRestored":false,"hasBackupChecksums":true,"familyCount":1}],"invalidFiles":["test + - Copy.txt","test.json","InvalidBackup %20+ `~1!2@3#4$5%6^7&8(9)0_-+=]}[{;'',, + ;+&[]~{}.txt"],"blobContainerName":"79b234dd-5f04-4f18-9edd-30ce333b6474","isFullBackupRestored":false,"fileUploadBlockingErrors":["Failure + happened on ''Source'' side. ErrorCode=SqlOperationFailed,''Type=Microsoft.DataTransfer.Common.Shared.HybridDeliveryException,Message=A + database operation failed with the following error: ''Cannot open backup device + ''\\\\aalab03-2k8.redmond.corp.microsoft.com\\SharedBackup\\tsuman\\backup''. + Operating system error 5(Access is denied.).\nRESTORE HEADERONLY is terminating + abnormally.'',Source=,''''Type=System.Data.SqlClient.SqlException,Message=Cannot + open backup device ''\\\\aalab03-2k8.redmond.corp.microsoft.com\\SharedBackup\\tsuman\\backup''. + Operating system error 5(Access is denied.).\nRESTORE HEADERONLY is terminating + abnormally.,Source=.Net SqlClient Data Provider,SqlErrorNumber=3201,Class=16,ErrorCode=-2146232060,State=2,Errors=[{Class=16,Number=3201,State=2,Message=Cannot + open backup device ''\\\\aalab03-2k8.redmond.corp.microsoft.com\\SharedBackup\\tsuman\\backup''. + Operating system error 5(Access is denied.).,},{Class=16,Number=3013,State=1,Message=RESTORE + HEADERONLY is terminating abnormally.,},],''","Failure happened on ''Source'' + side. ErrorCode=SqlOperationFailed,''Type=Microsoft.DataTransfer.Common.Shared.HybridDeliveryException,Message=A + database operation failed with the following error: ''The volume on device + ''\\\\aalab03-2k8.redmond.corp.microsoft.com\\SharedBackup\\tsuman\\test.json'' + is empty.\nRESTORE HEADERONLY is terminating abnormally.'',Source=,''''Type=System.Data.SqlClient.SqlException,Message=The + volume on device ''\\\\aalab03-2k8.redmond.corp.microsoft.com\\SharedBackup\\tsuman\\test.json'' + is empty.\nRESTORE HEADERONLY is terminating abnormally.,Source=.Net SqlClient + Data Provider,SqlErrorNumber=3254,Class=16,ErrorCode=-2146232060,State=1,Errors=[{Class=16,Number=3254,State=1,Message=The + volume on device ''\\\\aalab03-2k8.redmond.corp.microsoft.com\\SharedBackup\\tsuman\\test.json'' + is empty.,},{Class=16,Number=3013,State=1,Message=RESTORE HEADERONLY is terminating + abnormally.,},],''","Failure happened on ''Source'' side. ErrorCode=SqlOperationFailed,''Type=Microsoft.DataTransfer.Common.Shared.HybridDeliveryException,Message=A + database operation failed with the following error: ''The volume on device + ''\\\\aalab03-2k8.redmond.corp.microsoft.com\\SharedBackup\\tsuman\\test - + Copy.txt'' is empty.\nRESTORE HEADERONLY is terminating abnormally.'',Source=,''''Type=System.Data.SqlClient.SqlException,Message=The + volume on device ''\\\\aalab03-2k8.redmond.corp.microsoft.com\\SharedBackup\\tsuman\\test + - Copy.txt'' is empty.\nRESTORE HEADERONLY is terminating abnormally.,Source=.Net + SqlClient Data Provider,SqlErrorNumber=3254,Class=16,ErrorCode=-2146232060,State=1,Errors=[{Class=16,Number=3254,State=1,Message=The + volume on device ''\\\\aalab03-2k8.redmond.corp.microsoft.com\\SharedBackup\\tsuman\\test + - Copy.txt'' is empty.,},{Class=16,Number=3013,State=1,Message=RESTORE HEADERONLY + is terminating abnormally.,},],''"],"pendingLogBackupsCount":2},"scope":"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/tsum38RG/providers/Microsoft.SqlVirtualMachine/sqlVirtualMachines/DMSCmdletTest-SqlVM","provisioningState":"Succeeded","migrationStatus":"InProgress","startedOn":"2022-01-18T12:36:45.973Z","sourceDatabaseName":"AdventureWorks","migrationService":"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/tsum38RG/providers/Microsoft.DataMigration/sqlMigrationServices/sqlServiceUnitTest-Pipeline","migrationOperationId":"79b234dd-5f04-4f18-9edd-30ce333b6474","kind":"SqlVm"},"id":"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/tsum38RG/providers/Microsoft.SqlVirtualMachine/sqlVirtualMachines/DMSCmdletTest-SqlVM/providers/Microsoft.DataMigration/databaseMigrations/tsum-Db-vm-online-fs9","name":"tsum-Db-vm-online-fs9","type":"Microsoft.DataMigration/databaseMigrations"}' + headers: + cache-control: + - no-cache + content-length: + - '6134' + content-type: + - application/json; charset=utf-8 + date: + - Tue, 18 Jan 2022 12:43:17 GMT + expires: + - '-1' + pragma: + - no-cache + server: + - Microsoft-HTTPAPI/2.0 + strict-transport-security: + - max-age=31536000; includeSubDomains + transfer-encoding: + - chunked + vary: + - Accept-Encoding + x-content-type-options: + - nosniff + status: + code: 200 + message: OK +- request: + body: null + headers: + Accept: + - application/json + Accept-Encoding: + - gzip, deflate + CommandName: + - datamigration sql-vm show + Connection: + - keep-alive + ParameterSetName: + - --sql-vm-name --resource-group --target-db-name --expand + User-Agent: + - AZURECLI/2.32.0 azsdk-python-mgmt-datamigration/1.0.0b1 Python/3.10.1 (Windows-10-10.0.22000-SP0) + method: GET + uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/tsum38RG/providers/Microsoft.SqlVirtualMachine/sqlVirtualMachines/DMSCmdletTest-SqlVM/providers/Microsoft.DataMigration/databaseMigrations/tsum-Db-vm-online-fs9?$expand=MigrationStatusDetails&api-version=2021-10-30-preview + response: + body: + string: '{"properties":{"migrationStatusDetails":{"migrationState":"WaitRestoreStart","fullBackupSetInfo":{"backupSetId":"9fceb4b8-3864-45b6-bd35-998619297164","firstLSN":"486000000131000000","lastLSN":"486000000132600000","backupType":"Database","listOfBackupFiles":[{"fileName":"AdventureWorksFullBackup.bak","status":"Uploaded","totalSize":63176192,"dataRead":63176192,"dataWritten":63176192,"copyThroughput":356.62100219726562,"copyDuration":173,"familySequenceNumber":1}],"backupStartDate":"2019-01-11T13:53:40Z","backupFinishDate":"2019-01-11T13:53:40Z","isBackupRestored":false,"familyCount":1},"activeBackupSets":[{"backupSetId":"e6b60e53-c7b5-48dd-8f07-95f0caa66de1","firstLSN":"486000000145100000","lastLSN":"486000000145300000","backupType":"TransactionLog","listOfBackupFiles":[{"fileName":"AdventureWorksTransactionLog2.trn","status":"Arrived","totalSize":259584,"dataRead":0,"dataWritten":0,"copyThroughput":0.0,"copyDuration":0,"familySequenceNumber":1}],"backupStartDate":"2019-01-11T13:56:02Z","backupFinishDate":"2019-01-11T13:56:02Z","isBackupRestored":false,"hasBackupChecksums":true,"familyCount":1},{"backupSetId":"9fceb4b8-3864-45b6-bd35-998619297164","firstLSN":"486000000131000000","lastLSN":"486000000132600000","backupType":"Database","listOfBackupFiles":[{"fileName":"AdventureWorksFullBackup.bak","status":"Uploaded","totalSize":63176192,"dataRead":63176192,"dataWritten":63176192,"copyThroughput":356.62100219726562,"copyDuration":173,"familySequenceNumber":1}],"backupStartDate":"2019-01-11T13:53:40Z","backupFinishDate":"2019-01-11T13:53:40Z","isBackupRestored":false,"hasBackupChecksums":true,"familyCount":1},{"backupSetId":"7bdfc66c-14d5-4acc-91d3-d9568cabc0e0","firstLSN":"486000000126400000","lastLSN":"486000000145100000","backupType":"TransactionLog","listOfBackupFiles":[{"fileName":"AdventureWorksTransactionLog1.trn","status":"Arrived","totalSize":325120,"dataRead":0,"dataWritten":0,"copyThroughput":0.0,"copyDuration":0,"familySequenceNumber":1}],"backupStartDate":"2019-01-11T13:55:21Z","backupFinishDate":"2019-01-11T13:55:21Z","isBackupRestored":false,"hasBackupChecksums":true,"familyCount":1}],"invalidFiles":["test + - Copy.txt","test.json","InvalidBackup %20+ `~1!2@3#4$5%6^7&8(9)0_-+=]}[{;'',, + ;+&[]~{}.txt"],"blobContainerName":"79b234dd-5f04-4f18-9edd-30ce333b6474","isFullBackupRestored":false,"fileUploadBlockingErrors":["Failure + happened on ''Source'' side. ErrorCode=SqlOperationFailed,''Type=Microsoft.DataTransfer.Common.Shared.HybridDeliveryException,Message=A + database operation failed with the following error: ''Cannot open backup device + ''\\\\aalab03-2k8.redmond.corp.microsoft.com\\SharedBackup\\tsuman\\backup''. + Operating system error 5(Access is denied.).\nRESTORE HEADERONLY is terminating + abnormally.'',Source=,''''Type=System.Data.SqlClient.SqlException,Message=Cannot + open backup device ''\\\\aalab03-2k8.redmond.corp.microsoft.com\\SharedBackup\\tsuman\\backup''. + Operating system error 5(Access is denied.).\nRESTORE HEADERONLY is terminating + abnormally.,Source=.Net SqlClient Data Provider,SqlErrorNumber=3201,Class=16,ErrorCode=-2146232060,State=2,Errors=[{Class=16,Number=3201,State=2,Message=Cannot + open backup device ''\\\\aalab03-2k8.redmond.corp.microsoft.com\\SharedBackup\\tsuman\\backup''. + Operating system error 5(Access is denied.).,},{Class=16,Number=3013,State=1,Message=RESTORE + HEADERONLY is terminating abnormally.,},],''","Failure happened on ''Source'' + side. ErrorCode=SqlOperationFailed,''Type=Microsoft.DataTransfer.Common.Shared.HybridDeliveryException,Message=A + database operation failed with the following error: ''The volume on device + ''\\\\aalab03-2k8.redmond.corp.microsoft.com\\SharedBackup\\tsuman\\test.json'' + is empty.\nRESTORE HEADERONLY is terminating abnormally.'',Source=,''''Type=System.Data.SqlClient.SqlException,Message=The + volume on device ''\\\\aalab03-2k8.redmond.corp.microsoft.com\\SharedBackup\\tsuman\\test.json'' + is empty.\nRESTORE HEADERONLY is terminating abnormally.,Source=.Net SqlClient + Data Provider,SqlErrorNumber=3254,Class=16,ErrorCode=-2146232060,State=1,Errors=[{Class=16,Number=3254,State=1,Message=The + volume on device ''\\\\aalab03-2k8.redmond.corp.microsoft.com\\SharedBackup\\tsuman\\test.json'' + is empty.,},{Class=16,Number=3013,State=1,Message=RESTORE HEADERONLY is terminating + abnormally.,},],''","Failure happened on ''Source'' side. ErrorCode=SqlOperationFailed,''Type=Microsoft.DataTransfer.Common.Shared.HybridDeliveryException,Message=A + database operation failed with the following error: ''The volume on device + ''\\\\aalab03-2k8.redmond.corp.microsoft.com\\SharedBackup\\tsuman\\test - + Copy.txt'' is empty.\nRESTORE HEADERONLY is terminating abnormally.'',Source=,''''Type=System.Data.SqlClient.SqlException,Message=The + volume on device ''\\\\aalab03-2k8.redmond.corp.microsoft.com\\SharedBackup\\tsuman\\test + - Copy.txt'' is empty.\nRESTORE HEADERONLY is terminating abnormally.,Source=.Net + SqlClient Data Provider,SqlErrorNumber=3254,Class=16,ErrorCode=-2146232060,State=1,Errors=[{Class=16,Number=3254,State=1,Message=The + volume on device ''\\\\aalab03-2k8.redmond.corp.microsoft.com\\SharedBackup\\tsuman\\test + - Copy.txt'' is empty.,},{Class=16,Number=3013,State=1,Message=RESTORE HEADERONLY + is terminating abnormally.,},],''"],"pendingLogBackupsCount":2},"scope":"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/tsum38RG/providers/Microsoft.SqlVirtualMachine/sqlVirtualMachines/DMSCmdletTest-SqlVM","provisioningState":"Succeeded","migrationStatus":"InProgress","startedOn":"2022-01-18T12:36:45.973Z","sourceDatabaseName":"AdventureWorks","migrationService":"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/tsum38RG/providers/Microsoft.DataMigration/sqlMigrationServices/sqlServiceUnitTest-Pipeline","migrationOperationId":"79b234dd-5f04-4f18-9edd-30ce333b6474","kind":"SqlVm"},"id":"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/tsum38RG/providers/Microsoft.SqlVirtualMachine/sqlVirtualMachines/DMSCmdletTest-SqlVM/providers/Microsoft.DataMigration/databaseMigrations/tsum-Db-vm-online-fs9","name":"tsum-Db-vm-online-fs9","type":"Microsoft.DataMigration/databaseMigrations"}' + headers: + cache-control: + - no-cache + content-length: + - '6134' + content-type: + - application/json; charset=utf-8 + date: + - Tue, 18 Jan 2022 12:43:28 GMT + expires: + - '-1' + pragma: + - no-cache + server: + - Microsoft-HTTPAPI/2.0 + strict-transport-security: + - max-age=31536000; includeSubDomains + transfer-encoding: + - chunked + vary: + - Accept-Encoding + x-content-type-options: + - nosniff + status: + code: 200 + message: OK +- request: + body: null + headers: + Accept: + - application/json + Accept-Encoding: + - gzip, deflate + CommandName: + - datamigration sql-vm show + Connection: + - keep-alive + ParameterSetName: + - --sql-vm-name --resource-group --target-db-name --expand + User-Agent: + - AZURECLI/2.32.0 azsdk-python-mgmt-datamigration/1.0.0b1 Python/3.10.1 (Windows-10-10.0.22000-SP0) + method: GET + uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/tsum38RG/providers/Microsoft.SqlVirtualMachine/sqlVirtualMachines/DMSCmdletTest-SqlVM/providers/Microsoft.DataMigration/databaseMigrations/tsum-Db-vm-online-fs9?$expand=MigrationStatusDetails&api-version=2021-10-30-preview + response: + body: + string: '{"properties":{"migrationStatusDetails":{"migrationState":"WaitRestoreStart","fullBackupSetInfo":{"backupSetId":"9fceb4b8-3864-45b6-bd35-998619297164","firstLSN":"486000000131000000","lastLSN":"486000000132600000","backupType":"Database","listOfBackupFiles":[{"fileName":"AdventureWorksFullBackup.bak","status":"Uploaded","totalSize":63176192,"dataRead":63176192,"dataWritten":63176192,"copyThroughput":356.62100219726562,"copyDuration":173,"familySequenceNumber":1}],"backupStartDate":"2019-01-11T13:53:40Z","backupFinishDate":"2019-01-11T13:53:40Z","isBackupRestored":false,"familyCount":1},"activeBackupSets":[{"backupSetId":"e6b60e53-c7b5-48dd-8f07-95f0caa66de1","firstLSN":"486000000145100000","lastLSN":"486000000145300000","backupType":"TransactionLog","listOfBackupFiles":[{"fileName":"AdventureWorksTransactionLog2.trn","status":"Arrived","totalSize":259584,"dataRead":0,"dataWritten":0,"copyThroughput":0.0,"copyDuration":0,"familySequenceNumber":1}],"backupStartDate":"2019-01-11T13:56:02Z","backupFinishDate":"2019-01-11T13:56:02Z","isBackupRestored":false,"hasBackupChecksums":true,"familyCount":1},{"backupSetId":"9fceb4b8-3864-45b6-bd35-998619297164","firstLSN":"486000000131000000","lastLSN":"486000000132600000","backupType":"Database","listOfBackupFiles":[{"fileName":"AdventureWorksFullBackup.bak","status":"Uploaded","totalSize":63176192,"dataRead":63176192,"dataWritten":63176192,"copyThroughput":356.62100219726562,"copyDuration":173,"familySequenceNumber":1}],"backupStartDate":"2019-01-11T13:53:40Z","backupFinishDate":"2019-01-11T13:53:40Z","isBackupRestored":false,"hasBackupChecksums":true,"familyCount":1},{"backupSetId":"7bdfc66c-14d5-4acc-91d3-d9568cabc0e0","firstLSN":"486000000126400000","lastLSN":"486000000145100000","backupType":"TransactionLog","listOfBackupFiles":[{"fileName":"AdventureWorksTransactionLog1.trn","status":"Arrived","totalSize":325120,"dataRead":0,"dataWritten":0,"copyThroughput":0.0,"copyDuration":0,"familySequenceNumber":1}],"backupStartDate":"2019-01-11T13:55:21Z","backupFinishDate":"2019-01-11T13:55:21Z","isBackupRestored":false,"hasBackupChecksums":true,"familyCount":1}],"invalidFiles":["test + - Copy.txt","test.json","InvalidBackup %20+ `~1!2@3#4$5%6^7&8(9)0_-+=]}[{;'',, + ;+&[]~{}.txt"],"blobContainerName":"79b234dd-5f04-4f18-9edd-30ce333b6474","isFullBackupRestored":false,"fileUploadBlockingErrors":["Failure + happened on ''Source'' side. ErrorCode=SqlOperationFailed,''Type=Microsoft.DataTransfer.Common.Shared.HybridDeliveryException,Message=A + database operation failed with the following error: ''Cannot open backup device + ''\\\\aalab03-2k8.redmond.corp.microsoft.com\\SharedBackup\\tsuman\\backup''. + Operating system error 5(Access is denied.).\nRESTORE HEADERONLY is terminating + abnormally.'',Source=,''''Type=System.Data.SqlClient.SqlException,Message=Cannot + open backup device ''\\\\aalab03-2k8.redmond.corp.microsoft.com\\SharedBackup\\tsuman\\backup''. + Operating system error 5(Access is denied.).\nRESTORE HEADERONLY is terminating + abnormally.,Source=.Net SqlClient Data Provider,SqlErrorNumber=3201,Class=16,ErrorCode=-2146232060,State=2,Errors=[{Class=16,Number=3201,State=2,Message=Cannot + open backup device ''\\\\aalab03-2k8.redmond.corp.microsoft.com\\SharedBackup\\tsuman\\backup''. + Operating system error 5(Access is denied.).,},{Class=16,Number=3013,State=1,Message=RESTORE + HEADERONLY is terminating abnormally.,},],''","Failure happened on ''Source'' + side. ErrorCode=SqlOperationFailed,''Type=Microsoft.DataTransfer.Common.Shared.HybridDeliveryException,Message=A + database operation failed with the following error: ''The volume on device + ''\\\\aalab03-2k8.redmond.corp.microsoft.com\\SharedBackup\\tsuman\\test.json'' + is empty.\nRESTORE HEADERONLY is terminating abnormally.'',Source=,''''Type=System.Data.SqlClient.SqlException,Message=The + volume on device ''\\\\aalab03-2k8.redmond.corp.microsoft.com\\SharedBackup\\tsuman\\test.json'' + is empty.\nRESTORE HEADERONLY is terminating abnormally.,Source=.Net SqlClient + Data Provider,SqlErrorNumber=3254,Class=16,ErrorCode=-2146232060,State=1,Errors=[{Class=16,Number=3254,State=1,Message=The + volume on device ''\\\\aalab03-2k8.redmond.corp.microsoft.com\\SharedBackup\\tsuman\\test.json'' + is empty.,},{Class=16,Number=3013,State=1,Message=RESTORE HEADERONLY is terminating + abnormally.,},],''","Failure happened on ''Source'' side. ErrorCode=SqlOperationFailed,''Type=Microsoft.DataTransfer.Common.Shared.HybridDeliveryException,Message=A + database operation failed with the following error: ''The volume on device + ''\\\\aalab03-2k8.redmond.corp.microsoft.com\\SharedBackup\\tsuman\\test - + Copy.txt'' is empty.\nRESTORE HEADERONLY is terminating abnormally.'',Source=,''''Type=System.Data.SqlClient.SqlException,Message=The + volume on device ''\\\\aalab03-2k8.redmond.corp.microsoft.com\\SharedBackup\\tsuman\\test + - Copy.txt'' is empty.\nRESTORE HEADERONLY is terminating abnormally.,Source=.Net + SqlClient Data Provider,SqlErrorNumber=3254,Class=16,ErrorCode=-2146232060,State=1,Errors=[{Class=16,Number=3254,State=1,Message=The + volume on device ''\\\\aalab03-2k8.redmond.corp.microsoft.com\\SharedBackup\\tsuman\\test + - Copy.txt'' is empty.,},{Class=16,Number=3013,State=1,Message=RESTORE HEADERONLY + is terminating abnormally.,},],''"],"pendingLogBackupsCount":2},"scope":"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/tsum38RG/providers/Microsoft.SqlVirtualMachine/sqlVirtualMachines/DMSCmdletTest-SqlVM","provisioningState":"Succeeded","migrationStatus":"InProgress","startedOn":"2022-01-18T12:36:45.973Z","sourceDatabaseName":"AdventureWorks","migrationService":"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/tsum38RG/providers/Microsoft.DataMigration/sqlMigrationServices/sqlServiceUnitTest-Pipeline","migrationOperationId":"79b234dd-5f04-4f18-9edd-30ce333b6474","kind":"SqlVm"},"id":"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/tsum38RG/providers/Microsoft.SqlVirtualMachine/sqlVirtualMachines/DMSCmdletTest-SqlVM/providers/Microsoft.DataMigration/databaseMigrations/tsum-Db-vm-online-fs9","name":"tsum-Db-vm-online-fs9","type":"Microsoft.DataMigration/databaseMigrations"}' + headers: + cache-control: + - no-cache + content-length: + - '6134' + content-type: + - application/json; charset=utf-8 + date: + - Tue, 18 Jan 2022 12:43:40 GMT + expires: + - '-1' + pragma: + - no-cache + server: + - Microsoft-HTTPAPI/2.0 + strict-transport-security: + - max-age=31536000; includeSubDomains + transfer-encoding: + - chunked + vary: + - Accept-Encoding + x-content-type-options: + - nosniff + status: + code: 200 + message: OK +- request: + body: null + headers: + Accept: + - application/json + Accept-Encoding: + - gzip, deflate + CommandName: + - datamigration sql-vm show + Connection: + - keep-alive + ParameterSetName: + - --sql-vm-name --resource-group --target-db-name --expand + User-Agent: + - AZURECLI/2.32.0 azsdk-python-mgmt-datamigration/1.0.0b1 Python/3.10.1 (Windows-10-10.0.22000-SP0) + method: GET + uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/tsum38RG/providers/Microsoft.SqlVirtualMachine/sqlVirtualMachines/DMSCmdletTest-SqlVM/providers/Microsoft.DataMigration/databaseMigrations/tsum-Db-vm-online-fs9?$expand=MigrationStatusDetails&api-version=2021-10-30-preview + response: + body: + string: '{"properties":{"migrationStatusDetails":{"migrationState":"WaitRestoreStart","fullBackupSetInfo":{"backupSetId":"9fceb4b8-3864-45b6-bd35-998619297164","firstLSN":"486000000131000000","lastLSN":"486000000132600000","backupType":"Database","listOfBackupFiles":[{"fileName":"AdventureWorksFullBackup.bak","status":"Uploaded","totalSize":63176192,"dataRead":63176192,"dataWritten":63176192,"copyThroughput":356.62100219726562,"copyDuration":173,"familySequenceNumber":1}],"backupStartDate":"2019-01-11T13:53:40Z","backupFinishDate":"2019-01-11T13:53:40Z","isBackupRestored":false,"familyCount":1},"activeBackupSets":[{"backupSetId":"e6b60e53-c7b5-48dd-8f07-95f0caa66de1","firstLSN":"486000000145100000","lastLSN":"486000000145300000","backupType":"TransactionLog","listOfBackupFiles":[{"fileName":"AdventureWorksTransactionLog2.trn","status":"Arrived","totalSize":259584,"dataRead":0,"dataWritten":0,"copyThroughput":0.0,"copyDuration":0,"familySequenceNumber":1}],"backupStartDate":"2019-01-11T13:56:02Z","backupFinishDate":"2019-01-11T13:56:02Z","isBackupRestored":false,"hasBackupChecksums":true,"familyCount":1},{"backupSetId":"9fceb4b8-3864-45b6-bd35-998619297164","firstLSN":"486000000131000000","lastLSN":"486000000132600000","backupType":"Database","listOfBackupFiles":[{"fileName":"AdventureWorksFullBackup.bak","status":"Uploaded","totalSize":63176192,"dataRead":63176192,"dataWritten":63176192,"copyThroughput":356.62100219726562,"copyDuration":173,"familySequenceNumber":1}],"backupStartDate":"2019-01-11T13:53:40Z","backupFinishDate":"2019-01-11T13:53:40Z","isBackupRestored":false,"hasBackupChecksums":true,"familyCount":1},{"backupSetId":"7bdfc66c-14d5-4acc-91d3-d9568cabc0e0","firstLSN":"486000000126400000","lastLSN":"486000000145100000","backupType":"TransactionLog","listOfBackupFiles":[{"fileName":"AdventureWorksTransactionLog1.trn","status":"Arrived","totalSize":325120,"dataRead":0,"dataWritten":0,"copyThroughput":0.0,"copyDuration":0,"familySequenceNumber":1}],"backupStartDate":"2019-01-11T13:55:21Z","backupFinishDate":"2019-01-11T13:55:21Z","isBackupRestored":false,"hasBackupChecksums":true,"familyCount":1}],"invalidFiles":["test + - Copy.txt","test.json","InvalidBackup %20+ `~1!2@3#4$5%6^7&8(9)0_-+=]}[{;'',, + ;+&[]~{}.txt"],"blobContainerName":"79b234dd-5f04-4f18-9edd-30ce333b6474","isFullBackupRestored":false,"fileUploadBlockingErrors":["Failure + happened on ''Source'' side. ErrorCode=SqlOperationFailed,''Type=Microsoft.DataTransfer.Common.Shared.HybridDeliveryException,Message=A + database operation failed with the following error: ''Cannot open backup device + ''\\\\aalab03-2k8.redmond.corp.microsoft.com\\SharedBackup\\tsuman\\backup''. + Operating system error 5(Access is denied.).\nRESTORE HEADERONLY is terminating + abnormally.'',Source=,''''Type=System.Data.SqlClient.SqlException,Message=Cannot + open backup device ''\\\\aalab03-2k8.redmond.corp.microsoft.com\\SharedBackup\\tsuman\\backup''. + Operating system error 5(Access is denied.).\nRESTORE HEADERONLY is terminating + abnormally.,Source=.Net SqlClient Data Provider,SqlErrorNumber=3201,Class=16,ErrorCode=-2146232060,State=2,Errors=[{Class=16,Number=3201,State=2,Message=Cannot + open backup device ''\\\\aalab03-2k8.redmond.corp.microsoft.com\\SharedBackup\\tsuman\\backup''. + Operating system error 5(Access is denied.).,},{Class=16,Number=3013,State=1,Message=RESTORE + HEADERONLY is terminating abnormally.,},],''","Failure happened on ''Source'' + side. ErrorCode=SqlOperationFailed,''Type=Microsoft.DataTransfer.Common.Shared.HybridDeliveryException,Message=A + database operation failed with the following error: ''The volume on device + ''\\\\aalab03-2k8.redmond.corp.microsoft.com\\SharedBackup\\tsuman\\test.json'' + is empty.\nRESTORE HEADERONLY is terminating abnormally.'',Source=,''''Type=System.Data.SqlClient.SqlException,Message=The + volume on device ''\\\\aalab03-2k8.redmond.corp.microsoft.com\\SharedBackup\\tsuman\\test.json'' + is empty.\nRESTORE HEADERONLY is terminating abnormally.,Source=.Net SqlClient + Data Provider,SqlErrorNumber=3254,Class=16,ErrorCode=-2146232060,State=1,Errors=[{Class=16,Number=3254,State=1,Message=The + volume on device ''\\\\aalab03-2k8.redmond.corp.microsoft.com\\SharedBackup\\tsuman\\test.json'' + is empty.,},{Class=16,Number=3013,State=1,Message=RESTORE HEADERONLY is terminating + abnormally.,},],''","Failure happened on ''Source'' side. ErrorCode=SqlOperationFailed,''Type=Microsoft.DataTransfer.Common.Shared.HybridDeliveryException,Message=A + database operation failed with the following error: ''The volume on device + ''\\\\aalab03-2k8.redmond.corp.microsoft.com\\SharedBackup\\tsuman\\test - + Copy.txt'' is empty.\nRESTORE HEADERONLY is terminating abnormally.'',Source=,''''Type=System.Data.SqlClient.SqlException,Message=The + volume on device ''\\\\aalab03-2k8.redmond.corp.microsoft.com\\SharedBackup\\tsuman\\test + - Copy.txt'' is empty.\nRESTORE HEADERONLY is terminating abnormally.,Source=.Net + SqlClient Data Provider,SqlErrorNumber=3254,Class=16,ErrorCode=-2146232060,State=1,Errors=[{Class=16,Number=3254,State=1,Message=The + volume on device ''\\\\aalab03-2k8.redmond.corp.microsoft.com\\SharedBackup\\tsuman\\test + - Copy.txt'' is empty.,},{Class=16,Number=3013,State=1,Message=RESTORE HEADERONLY + is terminating abnormally.,},],''"],"pendingLogBackupsCount":2},"scope":"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/tsum38RG/providers/Microsoft.SqlVirtualMachine/sqlVirtualMachines/DMSCmdletTest-SqlVM","provisioningState":"Succeeded","migrationStatus":"InProgress","startedOn":"2022-01-18T12:36:45.973Z","sourceDatabaseName":"AdventureWorks","migrationService":"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/tsum38RG/providers/Microsoft.DataMigration/sqlMigrationServices/sqlServiceUnitTest-Pipeline","migrationOperationId":"79b234dd-5f04-4f18-9edd-30ce333b6474","kind":"SqlVm"},"id":"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/tsum38RG/providers/Microsoft.SqlVirtualMachine/sqlVirtualMachines/DMSCmdletTest-SqlVM/providers/Microsoft.DataMigration/databaseMigrations/tsum-Db-vm-online-fs9","name":"tsum-Db-vm-online-fs9","type":"Microsoft.DataMigration/databaseMigrations"}' + headers: + cache-control: + - no-cache + content-length: + - '6134' + content-type: + - application/json; charset=utf-8 + date: + - Tue, 18 Jan 2022 12:43:52 GMT + expires: + - '-1' + pragma: + - no-cache + server: + - Microsoft-HTTPAPI/2.0 + strict-transport-security: + - max-age=31536000; includeSubDomains + transfer-encoding: + - chunked + vary: + - Accept-Encoding + x-content-type-options: + - nosniff + status: + code: 200 + message: OK +- request: + body: null + headers: + Accept: + - application/json + Accept-Encoding: + - gzip, deflate + CommandName: + - datamigration sql-vm show + Connection: + - keep-alive + ParameterSetName: + - --sql-vm-name --resource-group --target-db-name --expand + User-Agent: + - AZURECLI/2.32.0 azsdk-python-mgmt-datamigration/1.0.0b1 Python/3.10.1 (Windows-10-10.0.22000-SP0) + method: GET + uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/tsum38RG/providers/Microsoft.SqlVirtualMachine/sqlVirtualMachines/DMSCmdletTest-SqlVM/providers/Microsoft.DataMigration/databaseMigrations/tsum-Db-vm-online-fs9?$expand=MigrationStatusDetails&api-version=2021-10-30-preview + response: + body: + string: '{"properties":{"migrationStatusDetails":{"migrationState":"WaitRestoreStart","fullBackupSetInfo":{"backupSetId":"9fceb4b8-3864-45b6-bd35-998619297164","firstLSN":"486000000131000000","lastLSN":"486000000132600000","backupType":"Database","listOfBackupFiles":[{"fileName":"AdventureWorksFullBackup.bak","status":"Uploaded","totalSize":63176192,"dataRead":63176192,"dataWritten":63176192,"copyThroughput":356.62100219726562,"copyDuration":173,"familySequenceNumber":1}],"backupStartDate":"2019-01-11T13:53:40Z","backupFinishDate":"2019-01-11T13:53:40Z","isBackupRestored":false,"familyCount":1},"activeBackupSets":[{"backupSetId":"e6b60e53-c7b5-48dd-8f07-95f0caa66de1","firstLSN":"486000000145100000","lastLSN":"486000000145300000","backupType":"TransactionLog","listOfBackupFiles":[{"fileName":"AdventureWorksTransactionLog2.trn","status":"Arrived","totalSize":259584,"dataRead":0,"dataWritten":0,"copyThroughput":0.0,"copyDuration":0,"familySequenceNumber":1}],"backupStartDate":"2019-01-11T13:56:02Z","backupFinishDate":"2019-01-11T13:56:02Z","isBackupRestored":false,"hasBackupChecksums":true,"familyCount":1},{"backupSetId":"9fceb4b8-3864-45b6-bd35-998619297164","firstLSN":"486000000131000000","lastLSN":"486000000132600000","backupType":"Database","listOfBackupFiles":[{"fileName":"AdventureWorksFullBackup.bak","status":"Uploaded","totalSize":63176192,"dataRead":63176192,"dataWritten":63176192,"copyThroughput":356.62100219726562,"copyDuration":173,"familySequenceNumber":1}],"backupStartDate":"2019-01-11T13:53:40Z","backupFinishDate":"2019-01-11T13:53:40Z","isBackupRestored":false,"hasBackupChecksums":true,"familyCount":1},{"backupSetId":"7bdfc66c-14d5-4acc-91d3-d9568cabc0e0","firstLSN":"486000000126400000","lastLSN":"486000000145100000","backupType":"TransactionLog","listOfBackupFiles":[{"fileName":"AdventureWorksTransactionLog1.trn","status":"Arrived","totalSize":325120,"dataRead":0,"dataWritten":0,"copyThroughput":0.0,"copyDuration":0,"familySequenceNumber":1}],"backupStartDate":"2019-01-11T13:55:21Z","backupFinishDate":"2019-01-11T13:55:21Z","isBackupRestored":false,"hasBackupChecksums":true,"familyCount":1}],"invalidFiles":["test + - Copy.txt","test.json","InvalidBackup %20+ `~1!2@3#4$5%6^7&8(9)0_-+=]}[{;'',, + ;+&[]~{}.txt"],"blobContainerName":"79b234dd-5f04-4f18-9edd-30ce333b6474","isFullBackupRestored":false,"fileUploadBlockingErrors":["Failure + happened on ''Source'' side. ErrorCode=SqlOperationFailed,''Type=Microsoft.DataTransfer.Common.Shared.HybridDeliveryException,Message=A + database operation failed with the following error: ''Cannot open backup device + ''\\\\aalab03-2k8.redmond.corp.microsoft.com\\SharedBackup\\tsuman\\backup''. + Operating system error 5(Access is denied.).\nRESTORE HEADERONLY is terminating + abnormally.'',Source=,''''Type=System.Data.SqlClient.SqlException,Message=Cannot + open backup device ''\\\\aalab03-2k8.redmond.corp.microsoft.com\\SharedBackup\\tsuman\\backup''. + Operating system error 5(Access is denied.).\nRESTORE HEADERONLY is terminating + abnormally.,Source=.Net SqlClient Data Provider,SqlErrorNumber=3201,Class=16,ErrorCode=-2146232060,State=2,Errors=[{Class=16,Number=3201,State=2,Message=Cannot + open backup device ''\\\\aalab03-2k8.redmond.corp.microsoft.com\\SharedBackup\\tsuman\\backup''. + Operating system error 5(Access is denied.).,},{Class=16,Number=3013,State=1,Message=RESTORE + HEADERONLY is terminating abnormally.,},],''","Failure happened on ''Source'' + side. ErrorCode=SqlOperationFailed,''Type=Microsoft.DataTransfer.Common.Shared.HybridDeliveryException,Message=A + database operation failed with the following error: ''The volume on device + ''\\\\aalab03-2k8.redmond.corp.microsoft.com\\SharedBackup\\tsuman\\test.json'' + is empty.\nRESTORE HEADERONLY is terminating abnormally.'',Source=,''''Type=System.Data.SqlClient.SqlException,Message=The + volume on device ''\\\\aalab03-2k8.redmond.corp.microsoft.com\\SharedBackup\\tsuman\\test.json'' + is empty.\nRESTORE HEADERONLY is terminating abnormally.,Source=.Net SqlClient + Data Provider,SqlErrorNumber=3254,Class=16,ErrorCode=-2146232060,State=1,Errors=[{Class=16,Number=3254,State=1,Message=The + volume on device ''\\\\aalab03-2k8.redmond.corp.microsoft.com\\SharedBackup\\tsuman\\test.json'' + is empty.,},{Class=16,Number=3013,State=1,Message=RESTORE HEADERONLY is terminating + abnormally.,},],''","Failure happened on ''Source'' side. ErrorCode=SqlOperationFailed,''Type=Microsoft.DataTransfer.Common.Shared.HybridDeliveryException,Message=A + database operation failed with the following error: ''The volume on device + ''\\\\aalab03-2k8.redmond.corp.microsoft.com\\SharedBackup\\tsuman\\test - + Copy.txt'' is empty.\nRESTORE HEADERONLY is terminating abnormally.'',Source=,''''Type=System.Data.SqlClient.SqlException,Message=The + volume on device ''\\\\aalab03-2k8.redmond.corp.microsoft.com\\SharedBackup\\tsuman\\test + - Copy.txt'' is empty.\nRESTORE HEADERONLY is terminating abnormally.,Source=.Net + SqlClient Data Provider,SqlErrorNumber=3254,Class=16,ErrorCode=-2146232060,State=1,Errors=[{Class=16,Number=3254,State=1,Message=The + volume on device ''\\\\aalab03-2k8.redmond.corp.microsoft.com\\SharedBackup\\tsuman\\test + - Copy.txt'' is empty.,},{Class=16,Number=3013,State=1,Message=RESTORE HEADERONLY + is terminating abnormally.,},],''"],"pendingLogBackupsCount":2},"scope":"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/tsum38RG/providers/Microsoft.SqlVirtualMachine/sqlVirtualMachines/DMSCmdletTest-SqlVM","provisioningState":"Succeeded","migrationStatus":"InProgress","startedOn":"2022-01-18T12:36:45.973Z","sourceDatabaseName":"AdventureWorks","migrationService":"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/tsum38RG/providers/Microsoft.DataMigration/sqlMigrationServices/sqlServiceUnitTest-Pipeline","migrationOperationId":"79b234dd-5f04-4f18-9edd-30ce333b6474","kind":"SqlVm"},"id":"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/tsum38RG/providers/Microsoft.SqlVirtualMachine/sqlVirtualMachines/DMSCmdletTest-SqlVM/providers/Microsoft.DataMigration/databaseMigrations/tsum-Db-vm-online-fs9","name":"tsum-Db-vm-online-fs9","type":"Microsoft.DataMigration/databaseMigrations"}' + headers: + cache-control: + - no-cache + content-length: + - '6134' + content-type: + - application/json; charset=utf-8 + date: + - Tue, 18 Jan 2022 12:44:04 GMT + expires: + - '-1' + pragma: + - no-cache + server: + - Microsoft-HTTPAPI/2.0 + strict-transport-security: + - max-age=31536000; includeSubDomains + transfer-encoding: + - chunked + vary: + - Accept-Encoding + x-content-type-options: + - nosniff + status: + code: 200 + message: OK +- request: + body: null + headers: + Accept: + - application/json + Accept-Encoding: + - gzip, deflate + CommandName: + - datamigration sql-vm show + Connection: + - keep-alive + ParameterSetName: + - --sql-vm-name --resource-group --target-db-name --expand + User-Agent: + - AZURECLI/2.32.0 azsdk-python-mgmt-datamigration/1.0.0b1 Python/3.10.1 (Windows-10-10.0.22000-SP0) + method: GET + uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/tsum38RG/providers/Microsoft.SqlVirtualMachine/sqlVirtualMachines/DMSCmdletTest-SqlVM/providers/Microsoft.DataMigration/databaseMigrations/tsum-Db-vm-online-fs9?$expand=MigrationStatusDetails&api-version=2021-10-30-preview + response: + body: + string: '{"properties":{"migrationStatusDetails":{"migrationState":"MonitorMigration","fullBackupSetInfo":{"backupSetId":"9fceb4b8-3864-45b6-bd35-998619297164","firstLSN":"486000000131000000","lastLSN":"486000000132600000","backupType":"Database","listOfBackupFiles":[{"fileName":"AdventureWorksFullBackup.bak","status":"Restored","totalSize":63176192,"dataRead":63176192,"dataWritten":63176192,"copyThroughput":356.62100219726562,"copyDuration":173,"familySequenceNumber":1}],"backupStartDate":"2019-01-11T13:53:40Z","backupFinishDate":"2019-01-11T13:53:40Z","isBackupRestored":true,"familyCount":1},"activeBackupSets":[{"backupSetId":"e6b60e53-c7b5-48dd-8f07-95f0caa66de1","firstLSN":"486000000145100000","lastLSN":"486000000145300000","backupType":"TransactionLog","listOfBackupFiles":[{"fileName":"AdventureWorksTransactionLog2.trn","status":"Arrived","totalSize":259584,"dataRead":0,"dataWritten":0,"copyThroughput":0.0,"copyDuration":0,"familySequenceNumber":1}],"backupStartDate":"2019-01-11T13:56:02Z","backupFinishDate":"2019-01-11T13:56:02Z","isBackupRestored":false,"hasBackupChecksums":true,"familyCount":1},{"backupSetId":"9fceb4b8-3864-45b6-bd35-998619297164","firstLSN":"486000000131000000","lastLSN":"486000000132600000","backupType":"Database","listOfBackupFiles":[{"fileName":"AdventureWorksFullBackup.bak","status":"Restored","totalSize":63176192,"dataRead":63176192,"dataWritten":63176192,"copyThroughput":356.62100219726562,"copyDuration":173,"familySequenceNumber":1}],"backupStartDate":"2019-01-11T13:53:40Z","backupFinishDate":"2019-01-11T13:53:40Z","isBackupRestored":true,"hasBackupChecksums":true,"familyCount":1},{"backupSetId":"7bdfc66c-14d5-4acc-91d3-d9568cabc0e0","firstLSN":"486000000126400000","lastLSN":"486000000145100000","backupType":"TransactionLog","listOfBackupFiles":[{"fileName":"AdventureWorksTransactionLog1.trn","status":"Arrived","totalSize":325120,"dataRead":0,"dataWritten":0,"copyThroughput":0.0,"copyDuration":0,"familySequenceNumber":1}],"backupStartDate":"2019-01-11T13:55:21Z","backupFinishDate":"2019-01-11T13:55:21Z","isBackupRestored":false,"hasBackupChecksums":true,"familyCount":1}],"invalidFiles":["test + - Copy.txt","test.json","InvalidBackup %20+ `~1!2@3#4$5%6^7&8(9)0_-+=]}[{;'',, + ;+&[]~{}.txt"],"blobContainerName":"79b234dd-5f04-4f18-9edd-30ce333b6474","isFullBackupRestored":true,"currentRestoringFilename":"AdventureWorksFullBackup.bak","lastRestoredFilename":"AdventureWorksFullBackup.bak","pendingLogBackupsCount":2},"scope":"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/tsum38RG/providers/Microsoft.SqlVirtualMachine/sqlVirtualMachines/DMSCmdletTest-SqlVM","provisioningState":"Succeeded","migrationStatus":"InProgress","startedOn":"2022-01-18T12:36:45.973Z","sourceDatabaseName":"AdventureWorks","migrationService":"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/tsum38RG/providers/Microsoft.DataMigration/sqlMigrationServices/sqlServiceUnitTest-Pipeline","migrationOperationId":"79b234dd-5f04-4f18-9edd-30ce333b6474","kind":"SqlVm"},"id":"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/tsum38RG/providers/Microsoft.SqlVirtualMachine/sqlVirtualMachines/DMSCmdletTest-SqlVM/providers/Microsoft.DataMigration/databaseMigrations/tsum-Db-vm-online-fs9","name":"tsum-Db-vm-online-fs9","type":"Microsoft.DataMigration/databaseMigrations"}' + headers: + cache-control: + - no-cache + content-length: + - '3355' + content-type: + - application/json; charset=utf-8 + date: + - Tue, 18 Jan 2022 12:44:16 GMT + expires: + - '-1' + pragma: + - no-cache + server: + - Microsoft-HTTPAPI/2.0 + strict-transport-security: + - max-age=31536000; includeSubDomains + transfer-encoding: + - chunked + vary: + - Accept-Encoding + x-content-type-options: + - nosniff + status: + code: 200 + message: OK +- request: + body: '{"migrationOperationId": "79b234dd-5f04-4f18-9edd-30ce333b6474"}' + headers: + Accept: + - '*/*' + Accept-Encoding: + - gzip, deflate + CommandName: + - datamigration sql-vm cutover + Connection: + - keep-alive + Content-Length: + - '64' + Content-Type: + - application/json + ParameterSetName: + - --resource-group --sql-vm-name --target-db-name --migration-operation-id + User-Agent: + - AZURECLI/2.32.0 azsdk-python-mgmt-datamigration/1.0.0b1 Python/3.10.1 (Windows-10-10.0.22000-SP0) + method: POST + uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/tsum38RG/providers/Microsoft.SqlVirtualMachine/sqlVirtualMachines/DMSCmdletTest-SqlVM/providers/Microsoft.DataMigration/databaseMigrations/tsum-Db-vm-online-fs9/cutover?api-version=2021-10-30-preview + response: + body: + string: '{"properties":{"scope":"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/tsum38RG/providers/Microsoft.SqlVirtualMachine/sqlVirtualMachines/DMSCmdletTest-SqlVM","provisioningState":"Succeeded","migrationStatus":"InProgress","startedOn":"2022-01-18T12:36:45.973Z","sourceDatabaseName":"AdventureWorks","migrationService":"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/tsum38RG/providers/Microsoft.DataMigration/sqlMigrationServices/sqlServiceUnitTest-Pipeline","migrationOperationId":"79b234dd-5f04-4f18-9edd-30ce333b6474","kind":"SqlVm"},"id":"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/tsum38RG/providers/Microsoft.SqlVirtualMachine/sqlVirtualMachines/DMSCmdletTest-SqlVM/providers/Microsoft.DataMigration/databaseMigrations/tsum-Db-vm-online-fs9","name":"tsum-Db-vm-online-fs9","type":"Microsoft.DataMigration/databaseMigrations"}' + headers: + azure-asyncoperation: + - https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/providers/Microsoft.DataMigration/locations/eastus2euap/operationTypes/cutoversqlvmmigration/operationResults/7783038f-3286-472d-8bbb-b7ac1254d6df?api-version=2021-10-30-preview + cache-control: + - no-cache + content-length: + - '894' + content-type: + - application/json; charset=utf-8 + date: + - Tue, 18 Jan 2022 12:44:19 GMT + expires: + - '-1' + pragma: + - no-cache + server: + - Microsoft-HTTPAPI/2.0 + strict-transport-security: + - max-age=31536000; includeSubDomains + transfer-encoding: + - chunked + vary: + - Accept-Encoding + x-content-type-options: + - nosniff + x-ms-ratelimit-remaining-subscription-writes: + - '1199' + status: + code: 200 + message: OK +- request: + body: null + headers: + Accept: + - '*/*' + Accept-Encoding: + - gzip, deflate + CommandName: + - datamigration sql-vm cutover + Connection: + - keep-alive + ParameterSetName: + - --resource-group --sql-vm-name --target-db-name --migration-operation-id + User-Agent: + - AZURECLI/2.32.0 azsdk-python-mgmt-datamigration/1.0.0b1 Python/3.10.1 (Windows-10-10.0.22000-SP0) + method: GET + uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/providers/Microsoft.DataMigration/locations/eastus2euap/operationTypes/cutoversqlvmmigration/operationResults/7783038f-3286-472d-8bbb-b7ac1254d6df?api-version=2021-10-30-preview + response: + body: + string: '{"name":"7783038f-3286-472d-8bbb-b7ac1254d6df","status":"InProgress","startTime":"2022-01-18T12:44:18.447Z"}' + headers: + cache-control: + - no-cache + content-length: + - '108' + content-type: + - application/json; charset=utf-8 + date: + - Tue, 18 Jan 2022 12:44:34 GMT + expires: + - '-1' + pragma: + - no-cache + server: + - Microsoft-HTTPAPI/2.0 + strict-transport-security: + - max-age=31536000; includeSubDomains + transfer-encoding: + - chunked + vary: + - Accept-Encoding + x-content-type-options: + - nosniff + status: + code: 200 + message: OK +- request: + body: null + headers: + Accept: + - '*/*' + Accept-Encoding: + - gzip, deflate + CommandName: + - datamigration sql-vm cutover + Connection: + - keep-alive + ParameterSetName: + - --resource-group --sql-vm-name --target-db-name --migration-operation-id + User-Agent: + - AZURECLI/2.32.0 azsdk-python-mgmt-datamigration/1.0.0b1 Python/3.10.1 (Windows-10-10.0.22000-SP0) + method: GET + uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/providers/Microsoft.DataMigration/locations/eastus2euap/operationTypes/cutoversqlvmmigration/operationResults/7783038f-3286-472d-8bbb-b7ac1254d6df?api-version=2021-10-30-preview + response: + body: + string: '{"name":"7783038f-3286-472d-8bbb-b7ac1254d6df","status":"InProgress","startTime":"2022-01-18T12:44:18.447Z"}' + headers: + cache-control: + - no-cache + content-length: + - '108' + content-type: + - application/json; charset=utf-8 + date: + - Tue, 18 Jan 2022 12:44:49 GMT + expires: + - '-1' + pragma: + - no-cache + server: + - Microsoft-HTTPAPI/2.0 + strict-transport-security: + - max-age=31536000; includeSubDomains + transfer-encoding: + - chunked + vary: + - Accept-Encoding + x-content-type-options: + - nosniff + status: + code: 200 + message: OK +- request: + body: null + headers: + Accept: + - '*/*' + Accept-Encoding: + - gzip, deflate + CommandName: + - datamigration sql-vm cutover + Connection: + - keep-alive + ParameterSetName: + - --resource-group --sql-vm-name --target-db-name --migration-operation-id + User-Agent: + - AZURECLI/2.32.0 azsdk-python-mgmt-datamigration/1.0.0b1 Python/3.10.1 (Windows-10-10.0.22000-SP0) + method: GET + uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/providers/Microsoft.DataMigration/locations/eastus2euap/operationTypes/cutoversqlvmmigration/operationResults/7783038f-3286-472d-8bbb-b7ac1254d6df?api-version=2021-10-30-preview + response: + body: + string: '{"name":"7783038f-3286-472d-8bbb-b7ac1254d6df","status":"InProgress","startTime":"2022-01-18T12:44:18.447Z"}' + headers: + cache-control: + - no-cache + content-length: + - '108' + content-type: + - application/json; charset=utf-8 + date: + - Tue, 18 Jan 2022 12:45:05 GMT + expires: + - '-1' + pragma: + - no-cache + server: + - Microsoft-HTTPAPI/2.0 + strict-transport-security: + - max-age=31536000; includeSubDomains + transfer-encoding: + - chunked + vary: + - Accept-Encoding + x-content-type-options: + - nosniff + status: + code: 200 + message: OK +- request: + body: null + headers: + Accept: + - '*/*' + Accept-Encoding: + - gzip, deflate + CommandName: + - datamigration sql-vm cutover + Connection: + - keep-alive + ParameterSetName: + - --resource-group --sql-vm-name --target-db-name --migration-operation-id + User-Agent: + - AZURECLI/2.32.0 azsdk-python-mgmt-datamigration/1.0.0b1 Python/3.10.1 (Windows-10-10.0.22000-SP0) + method: GET + uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/providers/Microsoft.DataMigration/locations/eastus2euap/operationTypes/cutoversqlvmmigration/operationResults/7783038f-3286-472d-8bbb-b7ac1254d6df?api-version=2021-10-30-preview + response: + body: + string: '{"name":"7783038f-3286-472d-8bbb-b7ac1254d6df","status":"InProgress","startTime":"2022-01-18T12:44:18.447Z"}' + headers: + cache-control: + - no-cache + content-length: + - '108' + content-type: + - application/json; charset=utf-8 + date: + - Tue, 18 Jan 2022 12:45:20 GMT + expires: + - '-1' + pragma: + - no-cache + server: + - Microsoft-HTTPAPI/2.0 + strict-transport-security: + - max-age=31536000; includeSubDomains + transfer-encoding: + - chunked + vary: + - Accept-Encoding + x-content-type-options: + - nosniff + status: + code: 200 + message: OK +- request: + body: null + headers: + Accept: + - '*/*' + Accept-Encoding: + - gzip, deflate + CommandName: + - datamigration sql-vm cutover + Connection: + - keep-alive + ParameterSetName: + - --resource-group --sql-vm-name --target-db-name --migration-operation-id + User-Agent: + - AZURECLI/2.32.0 azsdk-python-mgmt-datamigration/1.0.0b1 Python/3.10.1 (Windows-10-10.0.22000-SP0) + method: GET + uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/providers/Microsoft.DataMigration/locations/eastus2euap/operationTypes/cutoversqlvmmigration/operationResults/7783038f-3286-472d-8bbb-b7ac1254d6df?api-version=2021-10-30-preview + response: + body: + string: '{"name":"7783038f-3286-472d-8bbb-b7ac1254d6df","status":"Succeeded","startTime":"2022-01-18T12:44:18.447Z"}' + headers: + cache-control: + - no-cache + content-length: + - '107' + content-type: + - application/json; charset=utf-8 + date: + - Tue, 18 Jan 2022 12:45:36 GMT + expires: + - '-1' + pragma: + - no-cache + server: + - Microsoft-HTTPAPI/2.0 + strict-transport-security: + - max-age=31536000; includeSubDomains + transfer-encoding: + - chunked + vary: + - Accept-Encoding + x-content-type-options: + - nosniff + status: + code: 200 + message: OK +- request: + body: null + headers: + Accept: + - application/json + Accept-Encoding: + - gzip, deflate + CommandName: + - datamigration sql-vm show + Connection: + - keep-alive + ParameterSetName: + - --resource-group --sql-vm-name --target-db-name + User-Agent: + - AZURECLI/2.32.0 azsdk-python-mgmt-datamigration/1.0.0b1 Python/3.10.1 (Windows-10-10.0.22000-SP0) + method: GET + uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/tsum38RG/providers/Microsoft.SqlVirtualMachine/sqlVirtualMachines/DMSCmdletTest-SqlVM/providers/Microsoft.DataMigration/databaseMigrations/tsum-Db-vm-online-fs9?api-version=2021-10-30-preview + response: + body: + string: '{"properties":{"scope":"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/tsum38RG/providers/Microsoft.SqlVirtualMachine/sqlVirtualMachines/DMSCmdletTest-SqlVM","provisioningState":"Succeeded","migrationStatus":"Succeeded","startedOn":"2022-01-18T12:36:45.973Z","endedOn":"2022-01-18T12:45:20.02Z","sourceDatabaseName":"AdventureWorks","migrationService":"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/tsum38RG/providers/Microsoft.DataMigration/sqlMigrationServices/sqlServiceUnitTest-Pipeline","migrationOperationId":"79b234dd-5f04-4f18-9edd-30ce333b6474","kind":"SqlVm"},"id":"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/tsum38RG/providers/Microsoft.SqlVirtualMachine/sqlVirtualMachines/DMSCmdletTest-SqlVM/providers/Microsoft.DataMigration/databaseMigrations/tsum-Db-vm-online-fs9","name":"tsum-Db-vm-online-fs9","type":"Microsoft.DataMigration/databaseMigrations"}' + headers: + cache-control: + - no-cache + content-length: + - '929' + content-type: + - application/json; charset=utf-8 + date: + - Tue, 18 Jan 2022 12:45:37 GMT + expires: + - '-1' + pragma: + - no-cache + server: + - Microsoft-HTTPAPI/2.0 + strict-transport-security: + - max-age=31536000; includeSubDomains + transfer-encoding: + - chunked + vary: + - Accept-Encoding + x-content-type-options: + - nosniff + status: + code: 200 + message: OK +- request: + body: '{"properties": {"kind": "SqlVm", "scope": "/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/tsum38RG/providers/Microsoft.SqlVirtualMachine/SqlVirtualMachines/DMSCmdletTest-SqlVM", + "sourceSqlConnection": {"dataSource": "AALAB03-2K8.REDMOND.CORP.MICROSOFT.COM", + "authentication": "SqlAuthentication", "userName": "hijavatestuser1", "password": + "XXXXXXXXXXXX"}, "sourceDatabaseName": "AdventureWorks", "migrationService": + "/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/tsum38RG/providers/Microsoft.DataMigration/SqlMigrationServices/sqlServiceUnitTest-Pipeline", + "backupConfiguration": {"sourceLocation": {"azureBlob": {"storageAccountResourceId": + "/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/tzppesignoff1211/providers/Microsoft.Storage/storageAccounts/hijavateststorage", + "accountKey": "XXXXXXXXXXXX/XXXXXXXXXXXX", + "blobContainerName": "tsum38-adventureworks"}}, "targetLocation": {"storageAccountResourceId": + "/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/aaskhan/providers/Microsoft.Storage/storageAccounts/aasimmigrationtest", + "accountKey": "XXXXXXXXXXXX/XXXXXXXXXXXX"}}}}' + headers: + Accept: + - application/json + Accept-Encoding: + - gzip, deflate + CommandName: + - datamigration sql-vm create + Connection: + - keep-alive + Content-Length: + - '1283' + Content-Type: + - application/json + ParameterSetName: + - --source-location --target-location --migration-service --scope --source-database-name + --source-sql-connection --target-db-name --resource-group --sql-vm-name + User-Agent: + - AZURECLI/2.32.0 azsdk-python-mgmt-datamigration/1.0.0b1 Python/3.10.1 (Windows-10-10.0.22000-SP0) + method: PUT + uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/tsum38RG/providers/Microsoft.SqlVirtualMachine/sqlVirtualMachines/DMSCmdletTest-SqlVM/providers/Microsoft.DataMigration/databaseMigrations/tsum-Db-vm-online-blob9?api-version=2021-10-30-preview + response: + body: + string: '{"properties":{"scope":"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/tsum38RG/providers/Microsoft.SqlVirtualMachine/sqlVirtualMachines/DMSCmdletTest-SqlVM","provisioningState":"Creating","sourceDatabaseName":"AdventureWorks","migrationService":"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/tsum38RG/providers/Microsoft.DataMigration/sqlMigrationServices/sqlServiceUnitTest-Pipeline","kind":"SqlVm"},"id":"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/tsum38RG/providers/Microsoft.SqlVirtualMachine/sqlVirtualMachines/DMSCmdletTest-SqlVM/providers/Microsoft.DataMigration/databaseMigrations/tsum-Db-vm-online-blob9","name":"tsum-Db-vm-online-blob9","type":"Microsoft.DataMigration/databaseMigrations"}' + headers: + azure-asyncoperation: + - https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/providers/Microsoft.DataMigration/locations/eastus2euap/operationTypes/createsqlvmmigration/operationResults/403726fd-f62e-481a-932c-bbfc733f26a5?api-version=2021-10-30-preview + cache-control: + - no-cache + content-length: + - '765' + content-type: + - application/json; charset=utf-8 + date: + - Tue, 18 Jan 2022 12:45:41 GMT + expires: + - '-1' + pragma: + - no-cache + server: + - Microsoft-HTTPAPI/2.0 + strict-transport-security: + - max-age=31536000; includeSubDomains + x-content-type-options: + - nosniff + x-ms-ratelimit-remaining-subscription-writes: + - '1199' + status: + code: 201 + message: Created +- request: + body: null + headers: + Accept: + - '*/*' + Accept-Encoding: + - gzip, deflate + CommandName: + - datamigration sql-vm create + Connection: + - keep-alive + ParameterSetName: + - --source-location --target-location --migration-service --scope --source-database-name + --source-sql-connection --target-db-name --resource-group --sql-vm-name + User-Agent: + - AZURECLI/2.32.0 azsdk-python-mgmt-datamigration/1.0.0b1 Python/3.10.1 (Windows-10-10.0.22000-SP0) + method: GET + uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/providers/Microsoft.DataMigration/locations/eastus2euap/operationTypes/createsqlvmmigration/operationResults/403726fd-f62e-481a-932c-bbfc733f26a5?api-version=2021-10-30-preview + response: + body: + string: '{"name":"403726fd-f62e-481a-932c-bbfc733f26a5","status":"InProgress","startTime":"2022-01-18T12:45:41.067Z"}' + headers: + cache-control: + - no-cache + content-length: + - '108' + content-type: + - application/json; charset=utf-8 + date: + - Tue, 18 Jan 2022 12:45:56 GMT + expires: + - '-1' + pragma: + - no-cache + server: + - Microsoft-HTTPAPI/2.0 + strict-transport-security: + - max-age=31536000; includeSubDomains + transfer-encoding: + - chunked + vary: + - Accept-Encoding + x-content-type-options: + - nosniff + status: + code: 200 + message: OK +- request: + body: null + headers: + Accept: + - '*/*' + Accept-Encoding: + - gzip, deflate + CommandName: + - datamigration sql-vm create + Connection: + - keep-alive + ParameterSetName: + - --source-location --target-location --migration-service --scope --source-database-name + --source-sql-connection --target-db-name --resource-group --sql-vm-name + User-Agent: + - AZURECLI/2.32.0 azsdk-python-mgmt-datamigration/1.0.0b1 Python/3.10.1 (Windows-10-10.0.22000-SP0) + method: GET + uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/providers/Microsoft.DataMigration/locations/eastus2euap/operationTypes/createsqlvmmigration/operationResults/403726fd-f62e-481a-932c-bbfc733f26a5?api-version=2021-10-30-preview + response: + body: + string: '{"name":"403726fd-f62e-481a-932c-bbfc733f26a5","status":"InProgress","startTime":"2022-01-18T12:45:41.067Z"}' + headers: + cache-control: + - no-cache + content-length: + - '108' + content-type: + - application/json; charset=utf-8 + date: + - Tue, 18 Jan 2022 12:46:13 GMT + expires: + - '-1' + pragma: + - no-cache + server: + - Microsoft-HTTPAPI/2.0 + strict-transport-security: + - max-age=31536000; includeSubDomains + transfer-encoding: + - chunked + vary: + - Accept-Encoding + x-content-type-options: + - nosniff + status: + code: 200 + message: OK +- request: + body: null + headers: + Accept: + - '*/*' + Accept-Encoding: + - gzip, deflate + CommandName: + - datamigration sql-vm create + Connection: + - keep-alive + ParameterSetName: + - --source-location --target-location --migration-service --scope --source-database-name + --source-sql-connection --target-db-name --resource-group --sql-vm-name + User-Agent: + - AZURECLI/2.32.0 azsdk-python-mgmt-datamigration/1.0.0b1 Python/3.10.1 (Windows-10-10.0.22000-SP0) + method: GET + uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/providers/Microsoft.DataMigration/locations/eastus2euap/operationTypes/createsqlvmmigration/operationResults/403726fd-f62e-481a-932c-bbfc733f26a5?api-version=2021-10-30-preview + response: + body: + string: '{"name":"403726fd-f62e-481a-932c-bbfc733f26a5","status":"InProgress","startTime":"2022-01-18T12:45:41.067Z"}' + headers: + cache-control: + - no-cache + content-length: + - '108' + content-type: + - application/json; charset=utf-8 + date: + - Tue, 18 Jan 2022 12:46:28 GMT + expires: + - '-1' + pragma: + - no-cache + server: + - Microsoft-HTTPAPI/2.0 + strict-transport-security: + - max-age=31536000; includeSubDomains + transfer-encoding: + - chunked + vary: + - Accept-Encoding + x-content-type-options: + - nosniff + status: + code: 200 + message: OK +- request: + body: null + headers: + Accept: + - '*/*' + Accept-Encoding: + - gzip, deflate + CommandName: + - datamigration sql-vm create + Connection: + - keep-alive + ParameterSetName: + - --source-location --target-location --migration-service --scope --source-database-name + --source-sql-connection --target-db-name --resource-group --sql-vm-name + User-Agent: + - AZURECLI/2.32.0 azsdk-python-mgmt-datamigration/1.0.0b1 Python/3.10.1 (Windows-10-10.0.22000-SP0) + method: GET + uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/providers/Microsoft.DataMigration/locations/eastus2euap/operationTypes/createsqlvmmigration/operationResults/403726fd-f62e-481a-932c-bbfc733f26a5?api-version=2021-10-30-preview + response: + body: + string: '{"name":"403726fd-f62e-481a-932c-bbfc733f26a5","status":"Succeeded","startTime":"2022-01-18T12:45:41.067Z"}' + headers: + cache-control: + - no-cache + content-length: + - '107' + content-type: + - application/json; charset=utf-8 + date: + - Tue, 18 Jan 2022 12:46:43 GMT + expires: + - '-1' + pragma: + - no-cache + server: + - Microsoft-HTTPAPI/2.0 + strict-transport-security: + - max-age=31536000; includeSubDomains + transfer-encoding: + - chunked + vary: + - Accept-Encoding + x-content-type-options: + - nosniff + status: + code: 200 + message: OK +- request: + body: null + headers: + Accept: + - '*/*' + Accept-Encoding: + - gzip, deflate + CommandName: + - datamigration sql-vm create + Connection: + - keep-alive + ParameterSetName: + - --source-location --target-location --migration-service --scope --source-database-name + --source-sql-connection --target-db-name --resource-group --sql-vm-name + User-Agent: + - AZURECLI/2.32.0 azsdk-python-mgmt-datamigration/1.0.0b1 Python/3.10.1 (Windows-10-10.0.22000-SP0) + method: GET + uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/tsum38RG/providers/Microsoft.SqlVirtualMachine/sqlVirtualMachines/DMSCmdletTest-SqlVM/providers/Microsoft.DataMigration/databaseMigrations/tsum-Db-vm-online-blob9?api-version=2021-10-30-preview + response: + body: + string: '{"properties":{"scope":"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/tsum38RG/providers/Microsoft.SqlVirtualMachine/sqlVirtualMachines/DMSCmdletTest-SqlVM","provisioningState":"Succeeded","migrationStatus":"InProgress","startedOn":"2022-01-18T12:46:42.74Z","sourceDatabaseName":"AdventureWorks","migrationService":"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/tsum38RG/providers/Microsoft.DataMigration/sqlMigrationServices/sqlServiceUnitTest-Pipeline","migrationOperationId":"8b776e61-572b-4365-a9ce-34a3c094b506","kind":"SqlVm"},"id":"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/tsum38RG/providers/Microsoft.SqlVirtualMachine/sqlVirtualMachines/DMSCmdletTest-SqlVM/providers/Microsoft.DataMigration/databaseMigrations/tsum-Db-vm-online-blob9","name":"tsum-Db-vm-online-blob9","type":"Microsoft.DataMigration/databaseMigrations"}' + headers: + cache-control: + - no-cache + content-length: + - '897' + content-type: + - application/json; charset=utf-8 + date: + - Tue, 18 Jan 2022 12:46:43 GMT + expires: + - '-1' + pragma: + - no-cache + server: + - Microsoft-HTTPAPI/2.0 + strict-transport-security: + - max-age=31536000; includeSubDomains + transfer-encoding: + - chunked + vary: + - Accept-Encoding + x-content-type-options: + - nosniff + status: + code: 200 + message: OK +- request: + body: '{"properties": {"kind": "SqlVm", "scope": "/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/tsum38RG/providers/Microsoft.SqlVirtualMachine/SqlVirtualMachines/DMSCmdletTest-SqlVM", + "sourceSqlConnection": {"dataSource": "AALAB03-2K8.REDMOND.CORP.MICROSOFT.COM", + "authentication": "SqlAuthentication", "userName": "hijavatestuser1", "password": + "XXXXXXXXXXXX"}, "sourceDatabaseName": "AdventureWorks", "migrationService": + "/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/tsum38RG/providers/Microsoft.DataMigration/SqlMigrationServices/sqlServiceUnitTest-Pipeline", + "backupConfiguration": {"sourceLocation": {"azureBlob": {"storageAccountResourceId": + "/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/tzppesignoff1211/providers/Microsoft.Storage/storageAccounts/hijavateststorage", + "accountKey": "XXXXXXXXXXXX/XXXXXXXXXXXX", + "blobContainerName": "tsum38-adventureworks"}}, "targetLocation": {"storageAccountResourceId": + "/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/aaskhan/providers/Microsoft.Storage/storageAccounts/aasimmigrationtest", + "accountKey": "XXXXXXXXXXXX/XXXXXXXXXXXX"}}, + "offlineConfiguration": {"offline": true, "lastBackupName": "AdventureWorksTransactionLog2.trn"}}}' + headers: + Accept: + - application/json + Accept-Encoding: + - gzip, deflate + CommandName: + - datamigration sql-vm create + Connection: + - keep-alive + Content-Length: + - '1381' + Content-Type: + - application/json + ParameterSetName: + - --source-location --target-location --migration-service --scope --source-database-name + --source-sql-connection --target-db-name --resource-group --sql-vm-name --offline-configuration + User-Agent: + - AZURECLI/2.32.0 azsdk-python-mgmt-datamigration/1.0.0b1 Python/3.10.1 (Windows-10-10.0.22000-SP0) + method: PUT + uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/tsum38RG/providers/Microsoft.SqlVirtualMachine/sqlVirtualMachines/DMSCmdletTest-SqlVM/providers/Microsoft.DataMigration/databaseMigrations/tsum-Db-vm-offline-blob9?api-version=2021-10-30-preview + response: + body: + string: '{"properties":{"autoCutoverConfiguration":{"autoCutover":true,"lastBackupName":"AdventureWorksTransactionLog2.trn"},"offlineConfiguration":{"offline":true,"lastBackupName":"AdventureWorksTransactionLog2.trn"},"scope":"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/tsum38RG/providers/Microsoft.SqlVirtualMachine/sqlVirtualMachines/DMSCmdletTest-SqlVM","provisioningState":"Creating","sourceDatabaseName":"AdventureWorks","migrationService":"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/tsum38RG/providers/Microsoft.DataMigration/sqlMigrationServices/sqlServiceUnitTest-Pipeline","kind":"SqlVm"},"id":"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/tsum38RG/providers/Microsoft.SqlVirtualMachine/sqlVirtualMachines/DMSCmdletTest-SqlVM/providers/Microsoft.DataMigration/databaseMigrations/tsum-Db-vm-offline-blob9","name":"tsum-Db-vm-offline-blob9","type":"Microsoft.DataMigration/databaseMigrations"}' + headers: + azure-asyncoperation: + - https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/providers/Microsoft.DataMigration/locations/eastus2euap/operationTypes/createsqlvmmigration/operationResults/2683bec1-0700-4514-a178-392082ba8571?api-version=2021-10-30-preview + cache-control: + - no-cache + content-length: + - '961' + content-type: + - application/json; charset=utf-8 + date: + - Tue, 18 Jan 2022 12:46:47 GMT + expires: + - '-1' + pragma: + - no-cache + server: + - Microsoft-HTTPAPI/2.0 + strict-transport-security: + - max-age=31536000; includeSubDomains + x-content-type-options: + - nosniff + x-ms-ratelimit-remaining-subscription-writes: + - '1199' + status: + code: 201 + message: Created +- request: + body: null + headers: + Accept: + - '*/*' + Accept-Encoding: + - gzip, deflate + CommandName: + - datamigration sql-vm create + Connection: + - keep-alive + ParameterSetName: + - --source-location --target-location --migration-service --scope --source-database-name + --source-sql-connection --target-db-name --resource-group --sql-vm-name --offline-configuration + User-Agent: + - AZURECLI/2.32.0 azsdk-python-mgmt-datamigration/1.0.0b1 Python/3.10.1 (Windows-10-10.0.22000-SP0) + method: GET + uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/providers/Microsoft.DataMigration/locations/eastus2euap/operationTypes/createsqlvmmigration/operationResults/2683bec1-0700-4514-a178-392082ba8571?api-version=2021-10-30-preview + response: + body: + string: '{"name":"2683bec1-0700-4514-a178-392082ba8571","status":"InProgress","startTime":"2022-01-18T12:46:47.2Z"}' + headers: + cache-control: + - no-cache + content-length: + - '106' + content-type: + - application/json; charset=utf-8 + date: + - Tue, 18 Jan 2022 12:47:03 GMT + expires: + - '-1' + pragma: + - no-cache + server: + - Microsoft-HTTPAPI/2.0 + strict-transport-security: + - max-age=31536000; includeSubDomains + transfer-encoding: + - chunked + vary: + - Accept-Encoding + x-content-type-options: + - nosniff + status: + code: 200 + message: OK +- request: + body: null + headers: + Accept: + - '*/*' + Accept-Encoding: + - gzip, deflate + CommandName: + - datamigration sql-vm create + Connection: + - keep-alive + ParameterSetName: + - --source-location --target-location --migration-service --scope --source-database-name + --source-sql-connection --target-db-name --resource-group --sql-vm-name --offline-configuration + User-Agent: + - AZURECLI/2.32.0 azsdk-python-mgmt-datamigration/1.0.0b1 Python/3.10.1 (Windows-10-10.0.22000-SP0) + method: GET + uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/providers/Microsoft.DataMigration/locations/eastus2euap/operationTypes/createsqlvmmigration/operationResults/2683bec1-0700-4514-a178-392082ba8571?api-version=2021-10-30-preview + response: + body: + string: '{"name":"2683bec1-0700-4514-a178-392082ba8571","status":"InProgress","startTime":"2022-01-18T12:46:47.2Z"}' + headers: + cache-control: + - no-cache + content-length: + - '106' + content-type: + - application/json; charset=utf-8 + date: + - Tue, 18 Jan 2022 12:47:18 GMT + expires: + - '-1' + pragma: + - no-cache + server: + - Microsoft-HTTPAPI/2.0 + strict-transport-security: + - max-age=31536000; includeSubDomains + transfer-encoding: + - chunked + vary: + - Accept-Encoding + x-content-type-options: + - nosniff + status: + code: 200 + message: OK +- request: + body: null + headers: + Accept: + - '*/*' + Accept-Encoding: + - gzip, deflate + CommandName: + - datamigration sql-vm create + Connection: + - keep-alive + ParameterSetName: + - --source-location --target-location --migration-service --scope --source-database-name + --source-sql-connection --target-db-name --resource-group --sql-vm-name --offline-configuration + User-Agent: + - AZURECLI/2.32.0 azsdk-python-mgmt-datamigration/1.0.0b1 Python/3.10.1 (Windows-10-10.0.22000-SP0) + method: GET + uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/providers/Microsoft.DataMigration/locations/eastus2euap/operationTypes/createsqlvmmigration/operationResults/2683bec1-0700-4514-a178-392082ba8571?api-version=2021-10-30-preview + response: + body: + string: '{"name":"2683bec1-0700-4514-a178-392082ba8571","status":"InProgress","startTime":"2022-01-18T12:46:47.2Z"}' + headers: + cache-control: + - no-cache + content-length: + - '106' + content-type: + - application/json; charset=utf-8 + date: + - Tue, 18 Jan 2022 12:47:33 GMT + expires: + - '-1' + pragma: + - no-cache + server: + - Microsoft-HTTPAPI/2.0 + strict-transport-security: + - max-age=31536000; includeSubDomains + transfer-encoding: + - chunked + vary: + - Accept-Encoding + x-content-type-options: + - nosniff + status: + code: 200 + message: OK +- request: + body: null + headers: + Accept: + - '*/*' + Accept-Encoding: + - gzip, deflate + CommandName: + - datamigration sql-vm create + Connection: + - keep-alive + ParameterSetName: + - --source-location --target-location --migration-service --scope --source-database-name + --source-sql-connection --target-db-name --resource-group --sql-vm-name --offline-configuration + User-Agent: + - AZURECLI/2.32.0 azsdk-python-mgmt-datamigration/1.0.0b1 Python/3.10.1 (Windows-10-10.0.22000-SP0) + method: GET + uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/providers/Microsoft.DataMigration/locations/eastus2euap/operationTypes/createsqlvmmigration/operationResults/2683bec1-0700-4514-a178-392082ba8571?api-version=2021-10-30-preview + response: + body: + string: '{"name":"2683bec1-0700-4514-a178-392082ba8571","status":"InProgress","startTime":"2022-01-18T12:46:47.2Z"}' + headers: + cache-control: + - no-cache + content-length: + - '106' + content-type: + - application/json; charset=utf-8 + date: + - Tue, 18 Jan 2022 12:47:49 GMT + expires: + - '-1' + pragma: + - no-cache + server: + - Microsoft-HTTPAPI/2.0 + strict-transport-security: + - max-age=31536000; includeSubDomains + transfer-encoding: + - chunked + vary: + - Accept-Encoding + x-content-type-options: + - nosniff + status: + code: 200 + message: OK +- request: + body: null + headers: + Accept: + - '*/*' + Accept-Encoding: + - gzip, deflate + CommandName: + - datamigration sql-vm create + Connection: + - keep-alive + ParameterSetName: + - --source-location --target-location --migration-service --scope --source-database-name + --source-sql-connection --target-db-name --resource-group --sql-vm-name --offline-configuration + User-Agent: + - AZURECLI/2.32.0 azsdk-python-mgmt-datamigration/1.0.0b1 Python/3.10.1 (Windows-10-10.0.22000-SP0) + method: GET + uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/providers/Microsoft.DataMigration/locations/eastus2euap/operationTypes/createsqlvmmigration/operationResults/2683bec1-0700-4514-a178-392082ba8571?api-version=2021-10-30-preview + response: + body: + string: '{"name":"2683bec1-0700-4514-a178-392082ba8571","status":"InProgress","startTime":"2022-01-18T12:46:47.2Z"}' + headers: + cache-control: + - no-cache + content-length: + - '106' + content-type: + - application/json; charset=utf-8 + date: + - Tue, 18 Jan 2022 12:48:05 GMT + expires: + - '-1' + pragma: + - no-cache + server: + - Microsoft-HTTPAPI/2.0 + strict-transport-security: + - max-age=31536000; includeSubDomains + transfer-encoding: + - chunked + vary: + - Accept-Encoding + x-content-type-options: + - nosniff + status: + code: 200 + message: OK +- request: + body: null + headers: + Accept: + - '*/*' + Accept-Encoding: + - gzip, deflate + CommandName: + - datamigration sql-vm create + Connection: + - keep-alive + ParameterSetName: + - --source-location --target-location --migration-service --scope --source-database-name + --source-sql-connection --target-db-name --resource-group --sql-vm-name --offline-configuration + User-Agent: + - AZURECLI/2.32.0 azsdk-python-mgmt-datamigration/1.0.0b1 Python/3.10.1 (Windows-10-10.0.22000-SP0) + method: GET + uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/providers/Microsoft.DataMigration/locations/eastus2euap/operationTypes/createsqlvmmigration/operationResults/2683bec1-0700-4514-a178-392082ba8571?api-version=2021-10-30-preview + response: + body: + string: '{"name":"2683bec1-0700-4514-a178-392082ba8571","status":"InProgress","startTime":"2022-01-18T12:46:47.2Z"}' + headers: + cache-control: + - no-cache + content-length: + - '106' + content-type: + - application/json; charset=utf-8 + date: + - Tue, 18 Jan 2022 12:48:20 GMT + expires: + - '-1' + pragma: + - no-cache + server: + - Microsoft-HTTPAPI/2.0 + strict-transport-security: + - max-age=31536000; includeSubDomains + transfer-encoding: + - chunked + vary: + - Accept-Encoding + x-content-type-options: + - nosniff + status: + code: 200 + message: OK +- request: + body: null + headers: + Accept: + - '*/*' + Accept-Encoding: + - gzip, deflate + CommandName: + - datamigration sql-vm create + Connection: + - keep-alive + ParameterSetName: + - --source-location --target-location --migration-service --scope --source-database-name + --source-sql-connection --target-db-name --resource-group --sql-vm-name --offline-configuration + User-Agent: + - AZURECLI/2.32.0 azsdk-python-mgmt-datamigration/1.0.0b1 Python/3.10.1 (Windows-10-10.0.22000-SP0) + method: GET + uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/providers/Microsoft.DataMigration/locations/eastus2euap/operationTypes/createsqlvmmigration/operationResults/2683bec1-0700-4514-a178-392082ba8571?api-version=2021-10-30-preview + response: + body: + string: '{"name":"2683bec1-0700-4514-a178-392082ba8571","status":"InProgress","startTime":"2022-01-18T12:46:47.2Z"}' + headers: + cache-control: + - no-cache + content-length: + - '106' + content-type: + - application/json; charset=utf-8 + date: + - Tue, 18 Jan 2022 12:48:36 GMT + expires: + - '-1' + pragma: + - no-cache + server: + - Microsoft-HTTPAPI/2.0 + strict-transport-security: + - max-age=31536000; includeSubDomains + transfer-encoding: + - chunked + vary: + - Accept-Encoding + x-content-type-options: + - nosniff + status: + code: 200 + message: OK +- request: + body: null + headers: + Accept: + - '*/*' + Accept-Encoding: + - gzip, deflate + CommandName: + - datamigration sql-vm create + Connection: + - keep-alive + ParameterSetName: + - --source-location --target-location --migration-service --scope --source-database-name + --source-sql-connection --target-db-name --resource-group --sql-vm-name --offline-configuration + User-Agent: + - AZURECLI/2.32.0 azsdk-python-mgmt-datamigration/1.0.0b1 Python/3.10.1 (Windows-10-10.0.22000-SP0) + method: GET + uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/providers/Microsoft.DataMigration/locations/eastus2euap/operationTypes/createsqlvmmigration/operationResults/2683bec1-0700-4514-a178-392082ba8571?api-version=2021-10-30-preview + response: + body: + string: '{"name":"2683bec1-0700-4514-a178-392082ba8571","status":"InProgress","startTime":"2022-01-18T12:46:47.2Z"}' + headers: + cache-control: + - no-cache + content-length: + - '106' + content-type: + - application/json; charset=utf-8 + date: + - Tue, 18 Jan 2022 12:48:51 GMT + expires: + - '-1' + pragma: + - no-cache + server: + - Microsoft-HTTPAPI/2.0 + strict-transport-security: + - max-age=31536000; includeSubDomains + transfer-encoding: + - chunked + vary: + - Accept-Encoding + x-content-type-options: + - nosniff + status: + code: 200 + message: OK +- request: + body: null + headers: + Accept: + - '*/*' + Accept-Encoding: + - gzip, deflate + CommandName: + - datamigration sql-vm create + Connection: + - keep-alive + ParameterSetName: + - --source-location --target-location --migration-service --scope --source-database-name + --source-sql-connection --target-db-name --resource-group --sql-vm-name --offline-configuration + User-Agent: + - AZURECLI/2.32.0 azsdk-python-mgmt-datamigration/1.0.0b1 Python/3.10.1 (Windows-10-10.0.22000-SP0) + method: GET + uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/providers/Microsoft.DataMigration/locations/eastus2euap/operationTypes/createsqlvmmigration/operationResults/2683bec1-0700-4514-a178-392082ba8571?api-version=2021-10-30-preview + response: + body: + string: '{"name":"2683bec1-0700-4514-a178-392082ba8571","status":"InProgress","startTime":"2022-01-18T12:46:47.2Z"}' + headers: + cache-control: + - no-cache + content-length: + - '106' + content-type: + - application/json; charset=utf-8 + date: + - Tue, 18 Jan 2022 12:49:06 GMT + expires: + - '-1' + pragma: + - no-cache + server: + - Microsoft-HTTPAPI/2.0 + strict-transport-security: + - max-age=31536000; includeSubDomains + transfer-encoding: + - chunked + vary: + - Accept-Encoding + x-content-type-options: + - nosniff + status: + code: 200 + message: OK +- request: + body: null + headers: + Accept: + - '*/*' + Accept-Encoding: + - gzip, deflate + CommandName: + - datamigration sql-vm create + Connection: + - keep-alive + ParameterSetName: + - --source-location --target-location --migration-service --scope --source-database-name + --source-sql-connection --target-db-name --resource-group --sql-vm-name --offline-configuration + User-Agent: + - AZURECLI/2.32.0 azsdk-python-mgmt-datamigration/1.0.0b1 Python/3.10.1 (Windows-10-10.0.22000-SP0) + method: GET + uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/providers/Microsoft.DataMigration/locations/eastus2euap/operationTypes/createsqlvmmigration/operationResults/2683bec1-0700-4514-a178-392082ba8571?api-version=2021-10-30-preview + response: + body: + string: '{"name":"2683bec1-0700-4514-a178-392082ba8571","status":"InProgress","startTime":"2022-01-18T12:46:47.2Z"}' + headers: + cache-control: + - no-cache + content-length: + - '106' + content-type: + - application/json; charset=utf-8 + date: + - Tue, 18 Jan 2022 12:49:21 GMT + expires: + - '-1' + pragma: + - no-cache + server: + - Microsoft-HTTPAPI/2.0 + strict-transport-security: + - max-age=31536000; includeSubDomains + transfer-encoding: + - chunked + vary: + - Accept-Encoding + x-content-type-options: + - nosniff + status: + code: 200 + message: OK +- request: + body: null + headers: + Accept: + - '*/*' + Accept-Encoding: + - gzip, deflate + CommandName: + - datamigration sql-vm create + Connection: + - keep-alive + ParameterSetName: + - --source-location --target-location --migration-service --scope --source-database-name + --source-sql-connection --target-db-name --resource-group --sql-vm-name --offline-configuration + User-Agent: + - AZURECLI/2.32.0 azsdk-python-mgmt-datamigration/1.0.0b1 Python/3.10.1 (Windows-10-10.0.22000-SP0) + method: GET + uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/providers/Microsoft.DataMigration/locations/eastus2euap/operationTypes/createsqlvmmigration/operationResults/2683bec1-0700-4514-a178-392082ba8571?api-version=2021-10-30-preview + response: + body: + string: '{"name":"2683bec1-0700-4514-a178-392082ba8571","status":"Succeeded","startTime":"2022-01-18T12:46:47.2Z"}' + headers: + cache-control: + - no-cache + content-length: + - '105' + content-type: + - application/json; charset=utf-8 + date: + - Tue, 18 Jan 2022 12:49:37 GMT + expires: + - '-1' + pragma: + - no-cache + server: + - Microsoft-HTTPAPI/2.0 + strict-transport-security: + - max-age=31536000; includeSubDomains + transfer-encoding: + - chunked + vary: + - Accept-Encoding + x-content-type-options: + - nosniff + status: + code: 200 + message: OK +- request: + body: null + headers: + Accept: + - '*/*' + Accept-Encoding: + - gzip, deflate + CommandName: + - datamigration sql-vm create + Connection: + - keep-alive + ParameterSetName: + - --source-location --target-location --migration-service --scope --source-database-name + --source-sql-connection --target-db-name --resource-group --sql-vm-name --offline-configuration + User-Agent: + - AZURECLI/2.32.0 azsdk-python-mgmt-datamigration/1.0.0b1 Python/3.10.1 (Windows-10-10.0.22000-SP0) + method: GET + uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/tsum38RG/providers/Microsoft.SqlVirtualMachine/sqlVirtualMachines/DMSCmdletTest-SqlVM/providers/Microsoft.DataMigration/databaseMigrations/tsum-Db-vm-offline-blob9?api-version=2021-10-30-preview + response: + body: + string: '{"properties":{"autoCutoverConfiguration":{"autoCutover":true,"lastBackupName":"AdventureWorksTransactionLog2.trn"},"offlineConfiguration":{"offline":true,"lastBackupName":"AdventureWorksTransactionLog2.trn"},"scope":"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/tsum38RG/providers/Microsoft.SqlVirtualMachine/sqlVirtualMachines/DMSCmdletTest-SqlVM","provisioningState":"Succeeded","migrationStatus":"InProgress","startedOn":"2022-01-18T12:49:32.543Z","sourceDatabaseName":"AdventureWorks","migrationService":"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/tsum38RG/providers/Microsoft.DataMigration/sqlMigrationServices/sqlServiceUnitTest-Pipeline","migrationOperationId":"ab7b603a-83b1-4741-a54c-faec6c8869be","kind":"SqlVm"},"id":"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/tsum38RG/providers/Microsoft.SqlVirtualMachine/sqlVirtualMachines/DMSCmdletTest-SqlVM/providers/Microsoft.DataMigration/databaseMigrations/tsum-Db-vm-offline-blob9","name":"tsum-Db-vm-offline-blob9","type":"Microsoft.DataMigration/databaseMigrations"}' + headers: + cache-control: + - no-cache + content-length: + - '1094' + content-type: + - application/json; charset=utf-8 + date: + - Tue, 18 Jan 2022 12:49:37 GMT + expires: + - '-1' + pragma: + - no-cache + server: + - Microsoft-HTTPAPI/2.0 + strict-transport-security: + - max-age=31536000; includeSubDomains + transfer-encoding: + - chunked + vary: + - Accept-Encoding + x-content-type-options: + - nosniff + status: + code: 200 + message: OK +version: 1 diff --git a/src/datamigration/azext_datamigration/tests/latest/test_datamigration_scenario.py b/src/datamigration/azext_datamigration/tests/latest/test_datamigration_scenario.py new file mode 100644 index 00000000000..75e273a39ea --- /dev/null +++ b/src/datamigration/azext_datamigration/tests/latest/test_datamigration_scenario.py @@ -0,0 +1,119 @@ +# -------------------------------------------------------------------------- +# Copyright (c) Microsoft Corporation. All rights reserved. +# Licensed under the MIT License. See License.txt in the project root for +# license information. +# +# Code generated by Microsoft (R) AutoRest Code Generator. +# Changes may cause incorrect behavior and will be lost if the code is +# regenerated. +# -------------------------------------------------------------------------- + +import os +from azure.cli.testsdk import ScenarioTest +from azure.cli.testsdk import ResourceGroupPreparer +from .example_steps import step_sql_service_create +from .example_steps import step_sql_service_create2 +from .example_steps import step_sql_service_show +from .example_steps import step_sql_service_list +from .example_steps import step_sql_service_list2 +from .example_steps import step_sql_service_list_migration +from .example_steps import step_sql_service_update +from .example_steps import step_sql_service_delete_node +from .example_steps import step_sql_service_regenerate_auth_key +from .example_steps import step_sql_service_list_auth_key +from .example_steps import step_sql_service_list_integration_runtime_metric +from .example_steps import step_sql_managed_instance_create +from .example_steps import step_sql_managed_instance_create2 +from .example_steps import step_sql_managed_instance_show +from .example_steps import step_sql_managed_instance_cutover +from .example_steps import step_sql_managed_instance_cancel +from .example_steps import step_sql_vm_create +from .example_steps import step_sql_vm_create2 +from .example_steps import step_sql_vm_show +from .example_steps import step_sql_vm_cutover +from .example_steps import step_sql_vm_cancel +from .example_steps import step_sql_service_delete +from .. import ( + try_manual, + raise_if, + calc_coverage +) + + +TEST_DIR = os.path.abspath(os.path.join(os.path.abspath(__file__), '..')) + + +# Env setup_scenario +@try_manual +def setup_scenario(test): + pass + + +# Env cleanup_scenario +@try_manual +def cleanup_scenario(test): + pass + + +# Testcase: Scenario +@try_manual +def call_scenario(test): + setup_scenario(test) + step_sql_service_create(test, checks=[ + test.check("location", "northeurope", case_sensitive=False), + test.check("name", "{mySqlMigrationService}", case_sensitive=False), + ]) + step_sql_service_create2(test, checks=[ + test.check("location", "northeurope", case_sensitive=False), + test.check("name", "{mySqlMigrationService}", case_sensitive=False), + ]) + step_sql_service_show(test, checks=[]) + step_sql_service_list(test, checks=[ + test.check('length(@)', 1), + ]) + step_sql_service_list2(test, checks=[ + test.check('length(@)', 1), + ]) + step_sql_service_list_migration(test, checks=[]) + step_sql_service_update(test, checks=[ + test.check("location", "northeurope", case_sensitive=False), + test.check("name", "{mySqlMigrationService}", case_sensitive=False), + test.check("tags.mytag", "myval", case_sensitive=False), + ]) + step_sql_service_delete_node(test, checks=[]) + step_sql_service_regenerate_auth_key(test, checks=[]) + step_sql_service_list_auth_key(test, checks=[]) + step_sql_service_list_integration_runtime_metric(test, checks=[]) + step_sql_managed_instance_create(test, checks=[]) + step_sql_managed_instance_create2(test, checks=[]) + step_sql_managed_instance_show(test, checks=[]) + step_sql_managed_instance_cutover(test, checks=[]) + step_sql_managed_instance_cancel(test, checks=[]) + step_sql_vm_create(test, checks=[]) + step_sql_vm_create2(test, checks=[]) + step_sql_vm_show(test, checks=[]) + step_sql_vm_cutover(test, checks=[]) + step_sql_vm_cancel(test, checks=[]) + step_sql_service_delete(test, checks=[]) + cleanup_scenario(test) + + +# Test class for Scenario +@try_manual +class DatamigrationScenarioTest(ScenarioTest): + def __init__(self, *args, **kwargs): + super(DatamigrationScenarioTest, self).__init__(*args, **kwargs) + self.kwargs.update({ + 'subscription_id': self.get_subscription_id() + }) + + self.kwargs.update({ + 'mySqlMigrationService': 'testagent', + 'mySqlMigrationService2': 'service1', + }) + + @ResourceGroupPreparer(name_prefix='clitestdatamigration_testrg'[:7], key='rg', parameter_name='rg') + def test_datamigration_Scenario(self, rg): + call_scenario(self) + calc_coverage(__file__) + raise_if() diff --git a/src/datamigration/azext_datamigration/tests/latest/test_datamigration_scenario_coverage.md b/src/datamigration/azext_datamigration/tests/latest/test_datamigration_scenario_coverage.md new file mode 100644 index 00000000000..cb712843009 --- /dev/null +++ b/src/datamigration/azext_datamigration/tests/latest/test_datamigration_scenario_coverage.md @@ -0,0 +1,2 @@ +|Scenario|Result|ErrorMessage|ErrorStack|ErrorNormalized|StartDt|EndDt| +Coverage: 0/0 diff --git a/src/datamigration/azext_datamigration/vendored_sdks/__init__.py b/src/datamigration/azext_datamigration/vendored_sdks/__init__.py new file mode 100644 index 00000000000..c9cfdc73e77 --- /dev/null +++ b/src/datamigration/azext_datamigration/vendored_sdks/__init__.py @@ -0,0 +1,12 @@ +# coding=utf-8 +# -------------------------------------------------------------------------- +# Copyright (c) Microsoft Corporation. All rights reserved. +# Licensed under the MIT License. See License.txt in the project root for +# license information. +# +# Code generated by Microsoft (R) AutoRest Code Generator. +# Changes may cause incorrect behavior and will be lost if the code is +# regenerated. +# -------------------------------------------------------------------------- + +__path__ = __import__('pkgutil').extend_path(__path__, __name__) diff --git a/src/datamigration/azext_datamigration/vendored_sdks/datamigration/__init__.py b/src/datamigration/azext_datamigration/vendored_sdks/datamigration/__init__.py new file mode 100644 index 00000000000..b82e09a5b43 --- /dev/null +++ b/src/datamigration/azext_datamigration/vendored_sdks/datamigration/__init__.py @@ -0,0 +1,19 @@ +# coding=utf-8 +# -------------------------------------------------------------------------- +# Copyright (c) Microsoft Corporation. All rights reserved. +# Licensed under the MIT License. See License.txt in the project root for license information. +# Code generated by Microsoft (R) AutoRest Code Generator. +# Changes may cause incorrect behavior and will be lost if the code is regenerated. +# -------------------------------------------------------------------------- + +from ._data_migration_management_client import DataMigrationManagementClient +from ._version import VERSION + +__version__ = VERSION +__all__ = ['DataMigrationManagementClient'] + +try: + from ._patch import patch_sdk # type: ignore + patch_sdk() +except ImportError: + pass diff --git a/src/datamigration/azext_datamigration/vendored_sdks/datamigration/_configuration.py b/src/datamigration/azext_datamigration/vendored_sdks/datamigration/_configuration.py new file mode 100644 index 00000000000..616215b8769 --- /dev/null +++ b/src/datamigration/azext_datamigration/vendored_sdks/datamigration/_configuration.py @@ -0,0 +1,71 @@ +# coding=utf-8 +# -------------------------------------------------------------------------- +# Copyright (c) Microsoft Corporation. All rights reserved. +# Licensed under the MIT License. See License.txt in the project root for license information. +# Code generated by Microsoft (R) AutoRest Code Generator. +# Changes may cause incorrect behavior and will be lost if the code is regenerated. +# -------------------------------------------------------------------------- + +from typing import TYPE_CHECKING + +from azure.core.configuration import Configuration +from azure.core.pipeline import policies +from azure.mgmt.core.policies import ARMHttpLoggingPolicy + +from ._version import VERSION + +if TYPE_CHECKING: + # pylint: disable=unused-import,ungrouped-imports + from typing import Any + + from azure.core.credentials import TokenCredential + + +class DataMigrationManagementClientConfiguration(Configuration): + """Configuration for DataMigrationManagementClient. + + Note that all parameters used to create this instance are saved as instance + attributes. + + :param credential: Credential needed for the client to connect to Azure. + :type credential: ~azure.core.credentials.TokenCredential + :param subscription_id: Subscription ID that identifies an Azure subscription. + :type subscription_id: str + """ + + def __init__( + self, + credential, # type: "TokenCredential" + subscription_id, # type: str + **kwargs # type: Any + ): + # type: (...) -> None + if credential is None: + raise ValueError("Parameter 'credential' must not be None.") + if subscription_id is None: + raise ValueError("Parameter 'subscription_id' must not be None.") + super(DataMigrationManagementClientConfiguration, self).__init__(**kwargs) + + self.credential = credential + self.subscription_id = subscription_id + self.api_version = "2021-10-30-preview" + self.credential_scopes = kwargs.pop('credential_scopes', ['https://management.azure.com/.default']) + kwargs.setdefault('sdk_moniker', 'mgmt-datamigration/{}'.format(VERSION)) + self._configure(**kwargs) + + def _configure( + self, + **kwargs # type: Any + ): + # type: (...) -> None + self.user_agent_policy = kwargs.get('user_agent_policy') or policies.UserAgentPolicy(**kwargs) + self.headers_policy = kwargs.get('headers_policy') or policies.HeadersPolicy(**kwargs) + self.proxy_policy = kwargs.get('proxy_policy') or policies.ProxyPolicy(**kwargs) + self.logging_policy = kwargs.get('logging_policy') or policies.NetworkTraceLoggingPolicy(**kwargs) + self.http_logging_policy = kwargs.get('http_logging_policy') or ARMHttpLoggingPolicy(**kwargs) + self.retry_policy = kwargs.get('retry_policy') or policies.RetryPolicy(**kwargs) + self.custom_hook_policy = kwargs.get('custom_hook_policy') or policies.CustomHookPolicy(**kwargs) + self.redirect_policy = kwargs.get('redirect_policy') or policies.RedirectPolicy(**kwargs) + self.authentication_policy = kwargs.get('authentication_policy') + if self.credential and not self.authentication_policy: + self.authentication_policy = policies.BearerTokenCredentialPolicy(self.credential, *self.credential_scopes, **kwargs) diff --git a/src/datamigration/azext_datamigration/vendored_sdks/datamigration/_data_migration_management_client.py b/src/datamigration/azext_datamigration/vendored_sdks/datamigration/_data_migration_management_client.py new file mode 100644 index 00000000000..60701029ec6 --- /dev/null +++ b/src/datamigration/azext_datamigration/vendored_sdks/datamigration/_data_migration_management_client.py @@ -0,0 +1,120 @@ +# coding=utf-8 +# -------------------------------------------------------------------------- +# Copyright (c) Microsoft Corporation. All rights reserved. +# Licensed under the MIT License. See License.txt in the project root for license information. +# Code generated by Microsoft (R) AutoRest Code Generator. +# Changes may cause incorrect behavior and will be lost if the code is regenerated. +# -------------------------------------------------------------------------- + +from typing import TYPE_CHECKING + +from azure.mgmt.core import ARMPipelineClient +from msrest import Deserializer, Serializer + +if TYPE_CHECKING: + # pylint: disable=unused-import,ungrouped-imports + from typing import Any, Optional + + from azure.core.credentials import TokenCredential + +from ._configuration import DataMigrationManagementClientConfiguration +from .operations import DatabaseMigrationsSqlMiOperations +from .operations import DatabaseMigrationsSqlVmOperations +from .operations import Operations +from .operations import SqlMigrationServicesOperations +from .operations import ResourceSkusOperations +from .operations import ServicesOperations +from .operations import TasksOperations +from .operations import ServiceTasksOperations +from .operations import ProjectsOperations +from .operations import UsagesOperations +from .operations import FilesOperations +from . import models + + +class DataMigrationManagementClient(object): + """Data Migration Client. + + :ivar database_migrations_sql_mi: DatabaseMigrationsSqlMiOperations operations + :vartype database_migrations_sql_mi: azure.mgmt.datamigration.operations.DatabaseMigrationsSqlMiOperations + :ivar database_migrations_sql_vm: DatabaseMigrationsSqlVmOperations operations + :vartype database_migrations_sql_vm: azure.mgmt.datamigration.operations.DatabaseMigrationsSqlVmOperations + :ivar operations: Operations operations + :vartype operations: azure.mgmt.datamigration.operations.Operations + :ivar sql_migration_services: SqlMigrationServicesOperations operations + :vartype sql_migration_services: azure.mgmt.datamigration.operations.SqlMigrationServicesOperations + :ivar resource_skus: ResourceSkusOperations operations + :vartype resource_skus: azure.mgmt.datamigration.operations.ResourceSkusOperations + :ivar services: ServicesOperations operations + :vartype services: azure.mgmt.datamigration.operations.ServicesOperations + :ivar tasks: TasksOperations operations + :vartype tasks: azure.mgmt.datamigration.operations.TasksOperations + :ivar service_tasks: ServiceTasksOperations operations + :vartype service_tasks: azure.mgmt.datamigration.operations.ServiceTasksOperations + :ivar projects: ProjectsOperations operations + :vartype projects: azure.mgmt.datamigration.operations.ProjectsOperations + :ivar usages: UsagesOperations operations + :vartype usages: azure.mgmt.datamigration.operations.UsagesOperations + :ivar files: FilesOperations operations + :vartype files: azure.mgmt.datamigration.operations.FilesOperations + :param credential: Credential needed for the client to connect to Azure. + :type credential: ~azure.core.credentials.TokenCredential + :param subscription_id: Subscription ID that identifies an Azure subscription. + :type subscription_id: str + :param str base_url: Service URL + :keyword int polling_interval: Default waiting time between two polls for LRO operations if no Retry-After header is present. + """ + + def __init__( + self, + credential, # type: "TokenCredential" + subscription_id, # type: str + base_url=None, # type: Optional[str] + **kwargs # type: Any + ): + # type: (...) -> None + if not base_url: + base_url = 'https://management.azure.com' + self._config = DataMigrationManagementClientConfiguration(credential, subscription_id, **kwargs) + self._client = ARMPipelineClient(base_url=base_url, config=self._config, **kwargs) + + client_models = {k: v for k, v in models.__dict__.items() if isinstance(v, type)} + self._serialize = Serializer(client_models) + self._serialize.client_side_validation = False + self._deserialize = Deserializer(client_models) + + self.database_migrations_sql_mi = DatabaseMigrationsSqlMiOperations( + self._client, self._config, self._serialize, self._deserialize) + self.database_migrations_sql_vm = DatabaseMigrationsSqlVmOperations( + self._client, self._config, self._serialize, self._deserialize) + self.operations = Operations( + self._client, self._config, self._serialize, self._deserialize) + self.sql_migration_services = SqlMigrationServicesOperations( + self._client, self._config, self._serialize, self._deserialize) + self.resource_skus = ResourceSkusOperations( + self._client, self._config, self._serialize, self._deserialize) + self.services = ServicesOperations( + self._client, self._config, self._serialize, self._deserialize) + self.tasks = TasksOperations( + self._client, self._config, self._serialize, self._deserialize) + self.service_tasks = ServiceTasksOperations( + self._client, self._config, self._serialize, self._deserialize) + self.projects = ProjectsOperations( + self._client, self._config, self._serialize, self._deserialize) + self.usages = UsagesOperations( + self._client, self._config, self._serialize, self._deserialize) + self.files = FilesOperations( + self._client, self._config, self._serialize, self._deserialize) + + def close(self): + # type: () -> None + self._client.close() + + def __enter__(self): + # type: () -> DataMigrationManagementClient + self._client.__enter__() + return self + + def __exit__(self, *exc_details): + # type: (Any) -> None + self._client.__exit__(*exc_details) diff --git a/src/datamigration/azext_datamigration/vendored_sdks/datamigration/_version.py b/src/datamigration/azext_datamigration/vendored_sdks/datamigration/_version.py new file mode 100644 index 00000000000..e5754a47ce6 --- /dev/null +++ b/src/datamigration/azext_datamigration/vendored_sdks/datamigration/_version.py @@ -0,0 +1,9 @@ +# coding=utf-8 +# -------------------------------------------------------------------------- +# Copyright (c) Microsoft Corporation. All rights reserved. +# Licensed under the MIT License. See License.txt in the project root for license information. +# Code generated by Microsoft (R) AutoRest Code Generator. +# Changes may cause incorrect behavior and will be lost if the code is regenerated. +# -------------------------------------------------------------------------- + +VERSION = "1.0.0b1" diff --git a/src/datamigration/azext_datamigration/vendored_sdks/datamigration/aio/__init__.py b/src/datamigration/azext_datamigration/vendored_sdks/datamigration/aio/__init__.py new file mode 100644 index 00000000000..29a86c66d2b --- /dev/null +++ b/src/datamigration/azext_datamigration/vendored_sdks/datamigration/aio/__init__.py @@ -0,0 +1,10 @@ +# coding=utf-8 +# -------------------------------------------------------------------------- +# Copyright (c) Microsoft Corporation. All rights reserved. +# Licensed under the MIT License. See License.txt in the project root for license information. +# Code generated by Microsoft (R) AutoRest Code Generator. +# Changes may cause incorrect behavior and will be lost if the code is regenerated. +# -------------------------------------------------------------------------- + +from ._data_migration_management_client import DataMigrationManagementClient +__all__ = ['DataMigrationManagementClient'] diff --git a/src/datamigration/azext_datamigration/vendored_sdks/datamigration/aio/_configuration.py b/src/datamigration/azext_datamigration/vendored_sdks/datamigration/aio/_configuration.py new file mode 100644 index 00000000000..e1c37c8429a --- /dev/null +++ b/src/datamigration/azext_datamigration/vendored_sdks/datamigration/aio/_configuration.py @@ -0,0 +1,67 @@ +# coding=utf-8 +# -------------------------------------------------------------------------- +# Copyright (c) Microsoft Corporation. All rights reserved. +# Licensed under the MIT License. See License.txt in the project root for license information. +# Code generated by Microsoft (R) AutoRest Code Generator. +# Changes may cause incorrect behavior and will be lost if the code is regenerated. +# -------------------------------------------------------------------------- + +from typing import Any, TYPE_CHECKING + +from azure.core.configuration import Configuration +from azure.core.pipeline import policies +from azure.mgmt.core.policies import ARMHttpLoggingPolicy + +from .._version import VERSION + +if TYPE_CHECKING: + # pylint: disable=unused-import,ungrouped-imports + from azure.core.credentials_async import AsyncTokenCredential + + +class DataMigrationManagementClientConfiguration(Configuration): + """Configuration for DataMigrationManagementClient. + + Note that all parameters used to create this instance are saved as instance + attributes. + + :param credential: Credential needed for the client to connect to Azure. + :type credential: ~azure.core.credentials_async.AsyncTokenCredential + :param subscription_id: Subscription ID that identifies an Azure subscription. + :type subscription_id: str + """ + + def __init__( + self, + credential: "AsyncTokenCredential", + subscription_id: str, + **kwargs: Any + ) -> None: + if credential is None: + raise ValueError("Parameter 'credential' must not be None.") + if subscription_id is None: + raise ValueError("Parameter 'subscription_id' must not be None.") + super(DataMigrationManagementClientConfiguration, self).__init__(**kwargs) + + self.credential = credential + self.subscription_id = subscription_id + self.api_version = "2021-10-30-preview" + self.credential_scopes = kwargs.pop('credential_scopes', ['https://management.azure.com/.default']) + kwargs.setdefault('sdk_moniker', 'mgmt-datamigration/{}'.format(VERSION)) + self._configure(**kwargs) + + def _configure( + self, + **kwargs: Any + ) -> None: + self.user_agent_policy = kwargs.get('user_agent_policy') or policies.UserAgentPolicy(**kwargs) + self.headers_policy = kwargs.get('headers_policy') or policies.HeadersPolicy(**kwargs) + self.proxy_policy = kwargs.get('proxy_policy') or policies.ProxyPolicy(**kwargs) + self.logging_policy = kwargs.get('logging_policy') or policies.NetworkTraceLoggingPolicy(**kwargs) + self.http_logging_policy = kwargs.get('http_logging_policy') or ARMHttpLoggingPolicy(**kwargs) + self.retry_policy = kwargs.get('retry_policy') or policies.AsyncRetryPolicy(**kwargs) + self.custom_hook_policy = kwargs.get('custom_hook_policy') or policies.CustomHookPolicy(**kwargs) + self.redirect_policy = kwargs.get('redirect_policy') or policies.AsyncRedirectPolicy(**kwargs) + self.authentication_policy = kwargs.get('authentication_policy') + if self.credential and not self.authentication_policy: + self.authentication_policy = policies.AsyncBearerTokenCredentialPolicy(self.credential, *self.credential_scopes, **kwargs) diff --git a/src/datamigration/azext_datamigration/vendored_sdks/datamigration/aio/_data_migration_management_client.py b/src/datamigration/azext_datamigration/vendored_sdks/datamigration/aio/_data_migration_management_client.py new file mode 100644 index 00000000000..3d01d7064b9 --- /dev/null +++ b/src/datamigration/azext_datamigration/vendored_sdks/datamigration/aio/_data_migration_management_client.py @@ -0,0 +1,114 @@ +# coding=utf-8 +# -------------------------------------------------------------------------- +# Copyright (c) Microsoft Corporation. All rights reserved. +# Licensed under the MIT License. See License.txt in the project root for license information. +# Code generated by Microsoft (R) AutoRest Code Generator. +# Changes may cause incorrect behavior and will be lost if the code is regenerated. +# -------------------------------------------------------------------------- + +from typing import Any, Optional, TYPE_CHECKING + +from azure.mgmt.core import AsyncARMPipelineClient +from msrest import Deserializer, Serializer + +if TYPE_CHECKING: + # pylint: disable=unused-import,ungrouped-imports + from azure.core.credentials_async import AsyncTokenCredential + +from ._configuration import DataMigrationManagementClientConfiguration +from .operations import DatabaseMigrationsSqlMiOperations +from .operations import DatabaseMigrationsSqlVmOperations +from .operations import Operations +from .operations import SqlMigrationServicesOperations +from .operations import ResourceSkusOperations +from .operations import ServicesOperations +from .operations import TasksOperations +from .operations import ServiceTasksOperations +from .operations import ProjectsOperations +from .operations import UsagesOperations +from .operations import FilesOperations +from .. import models + + +class DataMigrationManagementClient(object): + """Data Migration Client. + + :ivar database_migrations_sql_mi: DatabaseMigrationsSqlMiOperations operations + :vartype database_migrations_sql_mi: azure.mgmt.datamigration.aio.operations.DatabaseMigrationsSqlMiOperations + :ivar database_migrations_sql_vm: DatabaseMigrationsSqlVmOperations operations + :vartype database_migrations_sql_vm: azure.mgmt.datamigration.aio.operations.DatabaseMigrationsSqlVmOperations + :ivar operations: Operations operations + :vartype operations: azure.mgmt.datamigration.aio.operations.Operations + :ivar sql_migration_services: SqlMigrationServicesOperations operations + :vartype sql_migration_services: azure.mgmt.datamigration.aio.operations.SqlMigrationServicesOperations + :ivar resource_skus: ResourceSkusOperations operations + :vartype resource_skus: azure.mgmt.datamigration.aio.operations.ResourceSkusOperations + :ivar services: ServicesOperations operations + :vartype services: azure.mgmt.datamigration.aio.operations.ServicesOperations + :ivar tasks: TasksOperations operations + :vartype tasks: azure.mgmt.datamigration.aio.operations.TasksOperations + :ivar service_tasks: ServiceTasksOperations operations + :vartype service_tasks: azure.mgmt.datamigration.aio.operations.ServiceTasksOperations + :ivar projects: ProjectsOperations operations + :vartype projects: azure.mgmt.datamigration.aio.operations.ProjectsOperations + :ivar usages: UsagesOperations operations + :vartype usages: azure.mgmt.datamigration.aio.operations.UsagesOperations + :ivar files: FilesOperations operations + :vartype files: azure.mgmt.datamigration.aio.operations.FilesOperations + :param credential: Credential needed for the client to connect to Azure. + :type credential: ~azure.core.credentials_async.AsyncTokenCredential + :param subscription_id: Subscription ID that identifies an Azure subscription. + :type subscription_id: str + :param str base_url: Service URL + :keyword int polling_interval: Default waiting time between two polls for LRO operations if no Retry-After header is present. + """ + + def __init__( + self, + credential: "AsyncTokenCredential", + subscription_id: str, + base_url: Optional[str] = None, + **kwargs: Any + ) -> None: + if not base_url: + base_url = 'https://management.azure.com' + self._config = DataMigrationManagementClientConfiguration(credential, subscription_id, **kwargs) + self._client = AsyncARMPipelineClient(base_url=base_url, config=self._config, **kwargs) + + client_models = {k: v for k, v in models.__dict__.items() if isinstance(v, type)} + self._serialize = Serializer(client_models) + self._serialize.client_side_validation = False + self._deserialize = Deserializer(client_models) + + self.database_migrations_sql_mi = DatabaseMigrationsSqlMiOperations( + self._client, self._config, self._serialize, self._deserialize) + self.database_migrations_sql_vm = DatabaseMigrationsSqlVmOperations( + self._client, self._config, self._serialize, self._deserialize) + self.operations = Operations( + self._client, self._config, self._serialize, self._deserialize) + self.sql_migration_services = SqlMigrationServicesOperations( + self._client, self._config, self._serialize, self._deserialize) + self.resource_skus = ResourceSkusOperations( + self._client, self._config, self._serialize, self._deserialize) + self.services = ServicesOperations( + self._client, self._config, self._serialize, self._deserialize) + self.tasks = TasksOperations( + self._client, self._config, self._serialize, self._deserialize) + self.service_tasks = ServiceTasksOperations( + self._client, self._config, self._serialize, self._deserialize) + self.projects = ProjectsOperations( + self._client, self._config, self._serialize, self._deserialize) + self.usages = UsagesOperations( + self._client, self._config, self._serialize, self._deserialize) + self.files = FilesOperations( + self._client, self._config, self._serialize, self._deserialize) + + async def close(self) -> None: + await self._client.close() + + async def __aenter__(self) -> "DataMigrationManagementClient": + await self._client.__aenter__() + return self + + async def __aexit__(self, *exc_details) -> None: + await self._client.__aexit__(*exc_details) diff --git a/src/datamigration/azext_datamigration/vendored_sdks/datamigration/aio/operations/__init__.py b/src/datamigration/azext_datamigration/vendored_sdks/datamigration/aio/operations/__init__.py new file mode 100644 index 00000000000..6e3db8789ac --- /dev/null +++ b/src/datamigration/azext_datamigration/vendored_sdks/datamigration/aio/operations/__init__.py @@ -0,0 +1,33 @@ +# coding=utf-8 +# -------------------------------------------------------------------------- +# Copyright (c) Microsoft Corporation. All rights reserved. +# Licensed under the MIT License. See License.txt in the project root for license information. +# Code generated by Microsoft (R) AutoRest Code Generator. +# Changes may cause incorrect behavior and will be lost if the code is regenerated. +# -------------------------------------------------------------------------- + +from ._database_migrations_sql_mi_operations import DatabaseMigrationsSqlMiOperations +from ._database_migrations_sql_vm_operations import DatabaseMigrationsSqlVmOperations +from ._operations import Operations +from ._sql_migration_services_operations import SqlMigrationServicesOperations +from ._resource_skus_operations import ResourceSkusOperations +from ._services_operations import ServicesOperations +from ._tasks_operations import TasksOperations +from ._service_tasks_operations import ServiceTasksOperations +from ._projects_operations import ProjectsOperations +from ._usages_operations import UsagesOperations +from ._files_operations import FilesOperations + +__all__ = [ + 'DatabaseMigrationsSqlMiOperations', + 'DatabaseMigrationsSqlVmOperations', + 'Operations', + 'SqlMigrationServicesOperations', + 'ResourceSkusOperations', + 'ServicesOperations', + 'TasksOperations', + 'ServiceTasksOperations', + 'ProjectsOperations', + 'UsagesOperations', + 'FilesOperations', +] diff --git a/src/datamigration/azext_datamigration/vendored_sdks/datamigration/aio/operations/_database_migrations_sql_mi_operations.py b/src/datamigration/azext_datamigration/vendored_sdks/datamigration/aio/operations/_database_migrations_sql_mi_operations.py new file mode 100644 index 00000000000..2f19c85e075 --- /dev/null +++ b/src/datamigration/azext_datamigration/vendored_sdks/datamigration/aio/operations/_database_migrations_sql_mi_operations.py @@ -0,0 +1,502 @@ +# coding=utf-8 +# -------------------------------------------------------------------------- +# Copyright (c) Microsoft Corporation. All rights reserved. +# Licensed under the MIT License. See License.txt in the project root for license information. +# Code generated by Microsoft (R) AutoRest Code Generator. +# Changes may cause incorrect behavior and will be lost if the code is regenerated. +# -------------------------------------------------------------------------- +from typing import Any, Callable, Dict, Generic, Optional, TypeVar, Union +import warnings + +from azure.core.exceptions import ClientAuthenticationError, HttpResponseError, ResourceExistsError, ResourceNotFoundError, map_error +from azure.core.pipeline import PipelineResponse +from azure.core.pipeline.transport import AsyncHttpResponse, HttpRequest +from azure.core.polling import AsyncLROPoller, AsyncNoPolling, AsyncPollingMethod +from azure.mgmt.core.exceptions import ARMErrorFormat +from azure.mgmt.core.polling.async_arm_polling import AsyncARMPolling + +from ... import models + +T = TypeVar('T') +ClsType = Optional[Callable[[PipelineResponse[HttpRequest, AsyncHttpResponse], T, Dict[str, Any]], Any]] + +class DatabaseMigrationsSqlMiOperations: + """DatabaseMigrationsSqlMiOperations async operations. + + You should not instantiate this class directly. Instead, you should create a Client instance that + instantiates it for you and attaches it as an attribute. + + :ivar models: Alias to model classes used in this operation group. + :type models: ~azure.mgmt.datamigration.models + :param client: Client for service requests. + :param config: Configuration of service client. + :param serializer: An object model serializer. + :param deserializer: An object model deserializer. + """ + + models = models + + def __init__(self, client, config, serializer, deserializer) -> None: + self._client = client + self._serialize = serializer + self._deserialize = deserializer + self._config = config + + async def get( + self, + resource_group_name: str, + managed_instance_name: str, + target_db_name: str, + migration_operation_id: Optional[str] = None, + expand: Optional[str] = None, + **kwargs + ) -> "models.DatabaseMigrationSqlMi": + """Retrieve the Database Migration resource. + + :param resource_group_name: Name of the resource group that contains the resource. You can + obtain this value from the Azure Resource Manager API or the portal. + :type resource_group_name: str + :param managed_instance_name: + :type managed_instance_name: str + :param target_db_name: The name of the target database. + :type target_db_name: str + :param migration_operation_id: 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. + :type migration_operation_id: str + :param expand: The child resources to include in the response. + :type expand: str + :keyword callable cls: A custom type or function that will be passed the direct response + :return: DatabaseMigrationSqlMi, or the result of cls(response) + :rtype: ~azure.mgmt.datamigration.models.DatabaseMigrationSqlMi + :raises: ~azure.core.exceptions.HttpResponseError + """ + cls = kwargs.pop('cls', None) # type: ClsType["models.DatabaseMigrationSqlMi"] + error_map = { + 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError + } + error_map.update(kwargs.pop('error_map', {})) + api_version = "2021-10-30-preview" + accept = "application/json" + + # Construct URL + url = self.get.metadata['url'] # type: ignore + path_format_arguments = { + 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str'), + 'managedInstanceName': self._serialize.url("managed_instance_name", managed_instance_name, 'str'), + 'targetDbName': self._serialize.url("target_db_name", target_db_name, 'str'), + 'subscriptionId': self._serialize.url("self._config.subscription_id", self._config.subscription_id, 'str'), + } + url = self._client.format_url(url, **path_format_arguments) + + # Construct parameters + query_parameters = {} # type: Dict[str, Any] + if migration_operation_id is not None: + query_parameters['migrationOperationId'] = self._serialize.query("migration_operation_id", migration_operation_id, 'str') + if expand is not None: + query_parameters['$expand'] = self._serialize.query("expand", expand, 'str') + query_parameters['api-version'] = self._serialize.query("api_version", api_version, 'str') + + # Construct headers + header_parameters = {} # type: Dict[str, Any] + header_parameters['Accept'] = self._serialize.header("accept", accept, 'str') + + request = self._client.get(url, query_parameters, header_parameters) + pipeline_response = await self._client._pipeline.run(request, stream=False, **kwargs) + response = pipeline_response.http_response + + if response.status_code not in [200]: + map_error(status_code=response.status_code, response=response, error_map=error_map) + raise HttpResponseError(response=response, error_format=ARMErrorFormat) + + deserialized = self._deserialize('DatabaseMigrationSqlMi', pipeline_response) + + if cls: + return cls(pipeline_response, deserialized, {}) + + return deserialized + get.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Sql/managedInstances/{managedInstanceName}/providers/Microsoft.DataMigration/databaseMigrations/{targetDbName}'} # type: ignore + + async def _create_or_update_initial( + self, + resource_group_name: str, + managed_instance_name: str, + target_db_name: str, + parameters: "models.DatabaseMigrationSqlMi", + **kwargs + ) -> "models.DatabaseMigrationSqlMi": + cls = kwargs.pop('cls', None) # type: ClsType["models.DatabaseMigrationSqlMi"] + error_map = { + 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError + } + error_map.update(kwargs.pop('error_map', {})) + api_version = "2021-10-30-preview" + content_type = kwargs.pop("content_type", "application/json") + accept = "application/json" + + # Construct URL + url = self._create_or_update_initial.metadata['url'] # type: ignore + path_format_arguments = { + 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str'), + 'managedInstanceName': self._serialize.url("managed_instance_name", managed_instance_name, 'str'), + 'targetDbName': self._serialize.url("target_db_name", target_db_name, 'str'), + 'subscriptionId': self._serialize.url("self._config.subscription_id", self._config.subscription_id, 'str'), + } + url = self._client.format_url(url, **path_format_arguments) + + # Construct parameters + query_parameters = {} # type: Dict[str, Any] + query_parameters['api-version'] = self._serialize.query("api_version", api_version, 'str') + + # Construct headers + header_parameters = {} # type: Dict[str, Any] + header_parameters['Content-Type'] = self._serialize.header("content_type", content_type, 'str') + header_parameters['Accept'] = self._serialize.header("accept", accept, 'str') + + body_content_kwargs = {} # type: Dict[str, Any] + body_content = self._serialize.body(parameters, 'DatabaseMigrationSqlMi') + body_content_kwargs['content'] = body_content + request = self._client.put(url, query_parameters, header_parameters, **body_content_kwargs) + pipeline_response = await self._client._pipeline.run(request, stream=False, **kwargs) + response = pipeline_response.http_response + + if response.status_code not in [200, 201]: + map_error(status_code=response.status_code, response=response, error_map=error_map) + raise HttpResponseError(response=response, error_format=ARMErrorFormat) + + if response.status_code == 200: + deserialized = self._deserialize('DatabaseMigrationSqlMi', pipeline_response) + + if response.status_code == 201: + deserialized = self._deserialize('DatabaseMigrationSqlMi', pipeline_response) + + if cls: + return cls(pipeline_response, deserialized, {}) + + return deserialized + _create_or_update_initial.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Sql/managedInstances/{managedInstanceName}/providers/Microsoft.DataMigration/databaseMigrations/{targetDbName}'} # type: ignore + + async def begin_create_or_update( + self, + resource_group_name: str, + managed_instance_name: str, + target_db_name: str, + parameters: "models.DatabaseMigrationSqlMi", + **kwargs + ) -> AsyncLROPoller["models.DatabaseMigrationSqlMi"]: + """Create a new database migration to a given SQL Managed Instance. + + :param resource_group_name: Name of the resource group that contains the resource. You can + obtain this value from the Azure Resource Manager API or the portal. + :type resource_group_name: str + :param managed_instance_name: + :type managed_instance_name: str + :param target_db_name: The name of the target database. + :type target_db_name: str + :param parameters: Details of SqlMigrationService resource. + :type parameters: ~azure.mgmt.datamigration.models.DatabaseMigrationSqlMi + :keyword callable cls: A custom type or function that will be passed the direct response + :keyword str continuation_token: A continuation token to restart a poller from a saved state. + :keyword polling: True for ARMPolling, False for no polling, or a + polling object for personal polling strategy + :paramtype polling: bool or ~azure.core.polling.AsyncPollingMethod + :keyword int polling_interval: Default waiting time between two polls for LRO operations if no Retry-After header is present. + :return: An instance of AsyncLROPoller that returns either DatabaseMigrationSqlMi or the result of cls(response) + :rtype: ~azure.core.polling.AsyncLROPoller[~azure.mgmt.datamigration.models.DatabaseMigrationSqlMi] + :raises ~azure.core.exceptions.HttpResponseError: + """ + polling = kwargs.pop('polling', True) # type: Union[bool, AsyncPollingMethod] + cls = kwargs.pop('cls', None) # type: ClsType["models.DatabaseMigrationSqlMi"] + lro_delay = kwargs.pop( + 'polling_interval', + self._config.polling_interval + ) + cont_token = kwargs.pop('continuation_token', None) # type: Optional[str] + if cont_token is None: + raw_result = await self._create_or_update_initial( + resource_group_name=resource_group_name, + managed_instance_name=managed_instance_name, + target_db_name=target_db_name, + parameters=parameters, + cls=lambda x,y,z: x, + **kwargs + ) + + kwargs.pop('error_map', None) + kwargs.pop('content_type', None) + + def get_long_running_output(pipeline_response): + deserialized = self._deserialize('DatabaseMigrationSqlMi', pipeline_response) + + if cls: + return cls(pipeline_response, deserialized, {}) + return deserialized + + path_format_arguments = { + 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str'), + 'managedInstanceName': self._serialize.url("managed_instance_name", managed_instance_name, 'str'), + 'targetDbName': self._serialize.url("target_db_name", target_db_name, 'str'), + 'subscriptionId': self._serialize.url("self._config.subscription_id", self._config.subscription_id, 'str'), + } + + if polling is True: polling_method = AsyncARMPolling(lro_delay, path_format_arguments=path_format_arguments, **kwargs) + elif polling is False: polling_method = AsyncNoPolling() + else: polling_method = polling + if cont_token: + return AsyncLROPoller.from_continuation_token( + polling_method=polling_method, + continuation_token=cont_token, + client=self._client, + deserialization_callback=get_long_running_output + ) + else: + return AsyncLROPoller(self._client, raw_result, get_long_running_output, polling_method) + begin_create_or_update.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Sql/managedInstances/{managedInstanceName}/providers/Microsoft.DataMigration/databaseMigrations/{targetDbName}'} # type: ignore + + async def _cancel_initial( + self, + resource_group_name: str, + managed_instance_name: str, + target_db_name: str, + parameters: "models.MigrationOperationInput", + **kwargs + ) -> None: + cls = kwargs.pop('cls', None) # type: ClsType[None] + error_map = { + 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError + } + error_map.update(kwargs.pop('error_map', {})) + api_version = "2021-10-30-preview" + content_type = kwargs.pop("content_type", "application/json") + + # Construct URL + url = self._cancel_initial.metadata['url'] # type: ignore + path_format_arguments = { + 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str'), + 'managedInstanceName': self._serialize.url("managed_instance_name", managed_instance_name, 'str'), + 'targetDbName': self._serialize.url("target_db_name", target_db_name, 'str'), + 'subscriptionId': self._serialize.url("self._config.subscription_id", self._config.subscription_id, 'str'), + } + url = self._client.format_url(url, **path_format_arguments) + + # Construct parameters + query_parameters = {} # type: Dict[str, Any] + query_parameters['api-version'] = self._serialize.query("api_version", api_version, 'str') + + # Construct headers + header_parameters = {} # type: Dict[str, Any] + header_parameters['Content-Type'] = self._serialize.header("content_type", content_type, 'str') + + body_content_kwargs = {} # type: Dict[str, Any] + body_content = self._serialize.body(parameters, 'MigrationOperationInput') + body_content_kwargs['content'] = body_content + request = self._client.post(url, query_parameters, header_parameters, **body_content_kwargs) + pipeline_response = await self._client._pipeline.run(request, stream=False, **kwargs) + response = pipeline_response.http_response + + if response.status_code not in [200, 202]: + map_error(status_code=response.status_code, response=response, error_map=error_map) + raise HttpResponseError(response=response, error_format=ARMErrorFormat) + + if cls: + return cls(pipeline_response, None, {}) + + _cancel_initial.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Sql/managedInstances/{managedInstanceName}/providers/Microsoft.DataMigration/databaseMigrations/{targetDbName}/cancel'} # type: ignore + + async def begin_cancel( + self, + resource_group_name: str, + managed_instance_name: str, + target_db_name: str, + parameters: "models.MigrationOperationInput", + **kwargs + ) -> AsyncLROPoller[None]: + """Stop migrations in progress for the database. + + :param resource_group_name: Name of the resource group that contains the resource. You can + obtain this value from the Azure Resource Manager API or the portal. + :type resource_group_name: str + :param managed_instance_name: + :type managed_instance_name: str + :param target_db_name: The name of the target database. + :type target_db_name: str + :param parameters: Required migration operation ID for which cancel will be initiated. + :type parameters: ~azure.mgmt.datamigration.models.MigrationOperationInput + :keyword callable cls: A custom type or function that will be passed the direct response + :keyword str continuation_token: A continuation token to restart a poller from a saved state. + :keyword polling: True for ARMPolling, False for no polling, or a + polling object for personal polling strategy + :paramtype polling: bool or ~azure.core.polling.AsyncPollingMethod + :keyword int polling_interval: Default waiting time between two polls for LRO operations if no Retry-After header is present. + :return: An instance of AsyncLROPoller that returns either None or the result of cls(response) + :rtype: ~azure.core.polling.AsyncLROPoller[None] + :raises ~azure.core.exceptions.HttpResponseError: + """ + polling = kwargs.pop('polling', True) # type: Union[bool, AsyncPollingMethod] + cls = kwargs.pop('cls', None) # type: ClsType[None] + lro_delay = kwargs.pop( + 'polling_interval', + self._config.polling_interval + ) + cont_token = kwargs.pop('continuation_token', None) # type: Optional[str] + if cont_token is None: + raw_result = await self._cancel_initial( + resource_group_name=resource_group_name, + managed_instance_name=managed_instance_name, + target_db_name=target_db_name, + parameters=parameters, + cls=lambda x,y,z: x, + **kwargs + ) + + kwargs.pop('error_map', None) + kwargs.pop('content_type', None) + + def get_long_running_output(pipeline_response): + if cls: + return cls(pipeline_response, None, {}) + + path_format_arguments = { + 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str'), + 'managedInstanceName': self._serialize.url("managed_instance_name", managed_instance_name, 'str'), + 'targetDbName': self._serialize.url("target_db_name", target_db_name, 'str'), + 'subscriptionId': self._serialize.url("self._config.subscription_id", self._config.subscription_id, 'str'), + } + + if polling is True: polling_method = AsyncARMPolling(lro_delay, path_format_arguments=path_format_arguments, **kwargs) + elif polling is False: polling_method = AsyncNoPolling() + else: polling_method = polling + if cont_token: + return AsyncLROPoller.from_continuation_token( + polling_method=polling_method, + continuation_token=cont_token, + client=self._client, + deserialization_callback=get_long_running_output + ) + else: + return AsyncLROPoller(self._client, raw_result, get_long_running_output, polling_method) + begin_cancel.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Sql/managedInstances/{managedInstanceName}/providers/Microsoft.DataMigration/databaseMigrations/{targetDbName}/cancel'} # type: ignore + + async def _cutover_initial( + self, + resource_group_name: str, + managed_instance_name: str, + target_db_name: str, + parameters: "models.MigrationOperationInput", + **kwargs + ) -> None: + cls = kwargs.pop('cls', None) # type: ClsType[None] + error_map = { + 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError + } + error_map.update(kwargs.pop('error_map', {})) + api_version = "2021-10-30-preview" + content_type = kwargs.pop("content_type", "application/json") + + # Construct URL + url = self._cutover_initial.metadata['url'] # type: ignore + path_format_arguments = { + 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str'), + 'managedInstanceName': self._serialize.url("managed_instance_name", managed_instance_name, 'str'), + 'targetDbName': self._serialize.url("target_db_name", target_db_name, 'str'), + 'subscriptionId': self._serialize.url("self._config.subscription_id", self._config.subscription_id, 'str'), + } + url = self._client.format_url(url, **path_format_arguments) + + # Construct parameters + query_parameters = {} # type: Dict[str, Any] + query_parameters['api-version'] = self._serialize.query("api_version", api_version, 'str') + + # Construct headers + header_parameters = {} # type: Dict[str, Any] + header_parameters['Content-Type'] = self._serialize.header("content_type", content_type, 'str') + + body_content_kwargs = {} # type: Dict[str, Any] + body_content = self._serialize.body(parameters, 'MigrationOperationInput') + body_content_kwargs['content'] = body_content + request = self._client.post(url, query_parameters, header_parameters, **body_content_kwargs) + pipeline_response = await self._client._pipeline.run(request, stream=False, **kwargs) + response = pipeline_response.http_response + + if response.status_code not in [200, 202]: + map_error(status_code=response.status_code, response=response, error_map=error_map) + raise HttpResponseError(response=response, error_format=ARMErrorFormat) + + if cls: + return cls(pipeline_response, None, {}) + + _cutover_initial.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Sql/managedInstances/{managedInstanceName}/providers/Microsoft.DataMigration/databaseMigrations/{targetDbName}/cutover'} # type: ignore + + async def begin_cutover( + self, + resource_group_name: str, + managed_instance_name: str, + target_db_name: str, + parameters: "models.MigrationOperationInput", + **kwargs + ) -> AsyncLROPoller[None]: + """Initiate cutover for online migration in progress for the database. + + :param resource_group_name: Name of the resource group that contains the resource. You can + obtain this value from the Azure Resource Manager API or the portal. + :type resource_group_name: str + :param managed_instance_name: + :type managed_instance_name: str + :param target_db_name: The name of the target database. + :type target_db_name: str + :param parameters: Required migration operation ID for which cutover will be initiated. + :type parameters: ~azure.mgmt.datamigration.models.MigrationOperationInput + :keyword callable cls: A custom type or function that will be passed the direct response + :keyword str continuation_token: A continuation token to restart a poller from a saved state. + :keyword polling: True for ARMPolling, False for no polling, or a + polling object for personal polling strategy + :paramtype polling: bool or ~azure.core.polling.AsyncPollingMethod + :keyword int polling_interval: Default waiting time between two polls for LRO operations if no Retry-After header is present. + :return: An instance of AsyncLROPoller that returns either None or the result of cls(response) + :rtype: ~azure.core.polling.AsyncLROPoller[None] + :raises ~azure.core.exceptions.HttpResponseError: + """ + polling = kwargs.pop('polling', True) # type: Union[bool, AsyncPollingMethod] + cls = kwargs.pop('cls', None) # type: ClsType[None] + lro_delay = kwargs.pop( + 'polling_interval', + self._config.polling_interval + ) + cont_token = kwargs.pop('continuation_token', None) # type: Optional[str] + if cont_token is None: + raw_result = await self._cutover_initial( + resource_group_name=resource_group_name, + managed_instance_name=managed_instance_name, + target_db_name=target_db_name, + parameters=parameters, + cls=lambda x,y,z: x, + **kwargs + ) + + kwargs.pop('error_map', None) + kwargs.pop('content_type', None) + + def get_long_running_output(pipeline_response): + if cls: + return cls(pipeline_response, None, {}) + + path_format_arguments = { + 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str'), + 'managedInstanceName': self._serialize.url("managed_instance_name", managed_instance_name, 'str'), + 'targetDbName': self._serialize.url("target_db_name", target_db_name, 'str'), + 'subscriptionId': self._serialize.url("self._config.subscription_id", self._config.subscription_id, 'str'), + } + + if polling is True: polling_method = AsyncARMPolling(lro_delay, path_format_arguments=path_format_arguments, **kwargs) + elif polling is False: polling_method = AsyncNoPolling() + else: polling_method = polling + if cont_token: + return AsyncLROPoller.from_continuation_token( + polling_method=polling_method, + continuation_token=cont_token, + client=self._client, + deserialization_callback=get_long_running_output + ) + else: + return AsyncLROPoller(self._client, raw_result, get_long_running_output, polling_method) + begin_cutover.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Sql/managedInstances/{managedInstanceName}/providers/Microsoft.DataMigration/databaseMigrations/{targetDbName}/cutover'} # type: ignore diff --git a/src/datamigration/azext_datamigration/vendored_sdks/datamigration/aio/operations/_database_migrations_sql_vm_operations.py b/src/datamigration/azext_datamigration/vendored_sdks/datamigration/aio/operations/_database_migrations_sql_vm_operations.py new file mode 100644 index 00000000000..150b6486763 --- /dev/null +++ b/src/datamigration/azext_datamigration/vendored_sdks/datamigration/aio/operations/_database_migrations_sql_vm_operations.py @@ -0,0 +1,502 @@ +# coding=utf-8 +# -------------------------------------------------------------------------- +# Copyright (c) Microsoft Corporation. All rights reserved. +# Licensed under the MIT License. See License.txt in the project root for license information. +# Code generated by Microsoft (R) AutoRest Code Generator. +# Changes may cause incorrect behavior and will be lost if the code is regenerated. +# -------------------------------------------------------------------------- +from typing import Any, Callable, Dict, Generic, Optional, TypeVar, Union +import warnings + +from azure.core.exceptions import ClientAuthenticationError, HttpResponseError, ResourceExistsError, ResourceNotFoundError, map_error +from azure.core.pipeline import PipelineResponse +from azure.core.pipeline.transport import AsyncHttpResponse, HttpRequest +from azure.core.polling import AsyncLROPoller, AsyncNoPolling, AsyncPollingMethod +from azure.mgmt.core.exceptions import ARMErrorFormat +from azure.mgmt.core.polling.async_arm_polling import AsyncARMPolling + +from ... import models + +T = TypeVar('T') +ClsType = Optional[Callable[[PipelineResponse[HttpRequest, AsyncHttpResponse], T, Dict[str, Any]], Any]] + +class DatabaseMigrationsSqlVmOperations: + """DatabaseMigrationsSqlVmOperations async operations. + + You should not instantiate this class directly. Instead, you should create a Client instance that + instantiates it for you and attaches it as an attribute. + + :ivar models: Alias to model classes used in this operation group. + :type models: ~azure.mgmt.datamigration.models + :param client: Client for service requests. + :param config: Configuration of service client. + :param serializer: An object model serializer. + :param deserializer: An object model deserializer. + """ + + models = models + + def __init__(self, client, config, serializer, deserializer) -> None: + self._client = client + self._serialize = serializer + self._deserialize = deserializer + self._config = config + + async def get( + self, + resource_group_name: str, + sql_virtual_machine_name: str, + target_db_name: str, + migration_operation_id: Optional[str] = None, + expand: Optional[str] = None, + **kwargs + ) -> "models.DatabaseMigrationSqlVm": + """Retrieve the Database Migration resource. + + :param resource_group_name: Name of the resource group that contains the resource. You can + obtain this value from the Azure Resource Manager API or the portal. + :type resource_group_name: str + :param sql_virtual_machine_name: + :type sql_virtual_machine_name: str + :param target_db_name: The name of the target database. + :type target_db_name: str + :param migration_operation_id: 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. + :type migration_operation_id: str + :param expand: The child resources to include in the response. + :type expand: str + :keyword callable cls: A custom type or function that will be passed the direct response + :return: DatabaseMigrationSqlVm, or the result of cls(response) + :rtype: ~azure.mgmt.datamigration.models.DatabaseMigrationSqlVm + :raises: ~azure.core.exceptions.HttpResponseError + """ + cls = kwargs.pop('cls', None) # type: ClsType["models.DatabaseMigrationSqlVm"] + error_map = { + 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError + } + error_map.update(kwargs.pop('error_map', {})) + api_version = "2021-10-30-preview" + accept = "application/json" + + # Construct URL + url = self.get.metadata['url'] # type: ignore + path_format_arguments = { + 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str'), + 'sqlVirtualMachineName': self._serialize.url("sql_virtual_machine_name", sql_virtual_machine_name, 'str'), + 'targetDbName': self._serialize.url("target_db_name", target_db_name, 'str'), + 'subscriptionId': self._serialize.url("self._config.subscription_id", self._config.subscription_id, 'str'), + } + url = self._client.format_url(url, **path_format_arguments) + + # Construct parameters + query_parameters = {} # type: Dict[str, Any] + if migration_operation_id is not None: + query_parameters['migrationOperationId'] = self._serialize.query("migration_operation_id", migration_operation_id, 'str') + if expand is not None: + query_parameters['$expand'] = self._serialize.query("expand", expand, 'str') + query_parameters['api-version'] = self._serialize.query("api_version", api_version, 'str') + + # Construct headers + header_parameters = {} # type: Dict[str, Any] + header_parameters['Accept'] = self._serialize.header("accept", accept, 'str') + + request = self._client.get(url, query_parameters, header_parameters) + pipeline_response = await self._client._pipeline.run(request, stream=False, **kwargs) + response = pipeline_response.http_response + + if response.status_code not in [200]: + map_error(status_code=response.status_code, response=response, error_map=error_map) + raise HttpResponseError(response=response, error_format=ARMErrorFormat) + + deserialized = self._deserialize('DatabaseMigrationSqlVm', pipeline_response) + + if cls: + return cls(pipeline_response, deserialized, {}) + + return deserialized + get.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.SqlVirtualMachine/sqlVirtualMachines/{sqlVirtualMachineName}/providers/Microsoft.DataMigration/databaseMigrations/{targetDbName}'} # type: ignore + + async def _create_or_update_initial( + self, + resource_group_name: str, + sql_virtual_machine_name: str, + target_db_name: str, + parameters: "models.DatabaseMigrationSqlVm", + **kwargs + ) -> "models.DatabaseMigrationSqlVm": + cls = kwargs.pop('cls', None) # type: ClsType["models.DatabaseMigrationSqlVm"] + error_map = { + 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError + } + error_map.update(kwargs.pop('error_map', {})) + api_version = "2021-10-30-preview" + content_type = kwargs.pop("content_type", "application/json") + accept = "application/json" + + # Construct URL + url = self._create_or_update_initial.metadata['url'] # type: ignore + path_format_arguments = { + 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str'), + 'sqlVirtualMachineName': self._serialize.url("sql_virtual_machine_name", sql_virtual_machine_name, 'str'), + 'targetDbName': self._serialize.url("target_db_name", target_db_name, 'str'), + 'subscriptionId': self._serialize.url("self._config.subscription_id", self._config.subscription_id, 'str'), + } + url = self._client.format_url(url, **path_format_arguments) + + # Construct parameters + query_parameters = {} # type: Dict[str, Any] + query_parameters['api-version'] = self._serialize.query("api_version", api_version, 'str') + + # Construct headers + header_parameters = {} # type: Dict[str, Any] + header_parameters['Content-Type'] = self._serialize.header("content_type", content_type, 'str') + header_parameters['Accept'] = self._serialize.header("accept", accept, 'str') + + body_content_kwargs = {} # type: Dict[str, Any] + body_content = self._serialize.body(parameters, 'DatabaseMigrationSqlVm') + body_content_kwargs['content'] = body_content + request = self._client.put(url, query_parameters, header_parameters, **body_content_kwargs) + pipeline_response = await self._client._pipeline.run(request, stream=False, **kwargs) + response = pipeline_response.http_response + + if response.status_code not in [200, 201]: + map_error(status_code=response.status_code, response=response, error_map=error_map) + raise HttpResponseError(response=response, error_format=ARMErrorFormat) + + if response.status_code == 200: + deserialized = self._deserialize('DatabaseMigrationSqlVm', pipeline_response) + + if response.status_code == 201: + deserialized = self._deserialize('DatabaseMigrationSqlVm', pipeline_response) + + if cls: + return cls(pipeline_response, deserialized, {}) + + return deserialized + _create_or_update_initial.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.SqlVirtualMachine/sqlVirtualMachines/{sqlVirtualMachineName}/providers/Microsoft.DataMigration/databaseMigrations/{targetDbName}'} # type: ignore + + async def begin_create_or_update( + self, + resource_group_name: str, + sql_virtual_machine_name: str, + target_db_name: str, + parameters: "models.DatabaseMigrationSqlVm", + **kwargs + ) -> AsyncLROPoller["models.DatabaseMigrationSqlVm"]: + """Create a new database migration to a given SQL VM. + + :param resource_group_name: Name of the resource group that contains the resource. You can + obtain this value from the Azure Resource Manager API or the portal. + :type resource_group_name: str + :param sql_virtual_machine_name: + :type sql_virtual_machine_name: str + :param target_db_name: The name of the target database. + :type target_db_name: str + :param parameters: Details of SqlMigrationService resource. + :type parameters: ~azure.mgmt.datamigration.models.DatabaseMigrationSqlVm + :keyword callable cls: A custom type or function that will be passed the direct response + :keyword str continuation_token: A continuation token to restart a poller from a saved state. + :keyword polling: True for ARMPolling, False for no polling, or a + polling object for personal polling strategy + :paramtype polling: bool or ~azure.core.polling.AsyncPollingMethod + :keyword int polling_interval: Default waiting time between two polls for LRO operations if no Retry-After header is present. + :return: An instance of AsyncLROPoller that returns either DatabaseMigrationSqlVm or the result of cls(response) + :rtype: ~azure.core.polling.AsyncLROPoller[~azure.mgmt.datamigration.models.DatabaseMigrationSqlVm] + :raises ~azure.core.exceptions.HttpResponseError: + """ + polling = kwargs.pop('polling', True) # type: Union[bool, AsyncPollingMethod] + cls = kwargs.pop('cls', None) # type: ClsType["models.DatabaseMigrationSqlVm"] + lro_delay = kwargs.pop( + 'polling_interval', + self._config.polling_interval + ) + cont_token = kwargs.pop('continuation_token', None) # type: Optional[str] + if cont_token is None: + raw_result = await self._create_or_update_initial( + resource_group_name=resource_group_name, + sql_virtual_machine_name=sql_virtual_machine_name, + target_db_name=target_db_name, + parameters=parameters, + cls=lambda x,y,z: x, + **kwargs + ) + + kwargs.pop('error_map', None) + kwargs.pop('content_type', None) + + def get_long_running_output(pipeline_response): + deserialized = self._deserialize('DatabaseMigrationSqlVm', pipeline_response) + + if cls: + return cls(pipeline_response, deserialized, {}) + return deserialized + + path_format_arguments = { + 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str'), + 'sqlVirtualMachineName': self._serialize.url("sql_virtual_machine_name", sql_virtual_machine_name, 'str'), + 'targetDbName': self._serialize.url("target_db_name", target_db_name, 'str'), + 'subscriptionId': self._serialize.url("self._config.subscription_id", self._config.subscription_id, 'str'), + } + + if polling is True: polling_method = AsyncARMPolling(lro_delay, path_format_arguments=path_format_arguments, **kwargs) + elif polling is False: polling_method = AsyncNoPolling() + else: polling_method = polling + if cont_token: + return AsyncLROPoller.from_continuation_token( + polling_method=polling_method, + continuation_token=cont_token, + client=self._client, + deserialization_callback=get_long_running_output + ) + else: + return AsyncLROPoller(self._client, raw_result, get_long_running_output, polling_method) + begin_create_or_update.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.SqlVirtualMachine/sqlVirtualMachines/{sqlVirtualMachineName}/providers/Microsoft.DataMigration/databaseMigrations/{targetDbName}'} # type: ignore + + async def _cancel_initial( + self, + resource_group_name: str, + sql_virtual_machine_name: str, + target_db_name: str, + parameters: "models.MigrationOperationInput", + **kwargs + ) -> None: + cls = kwargs.pop('cls', None) # type: ClsType[None] + error_map = { + 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError + } + error_map.update(kwargs.pop('error_map', {})) + api_version = "2021-10-30-preview" + content_type = kwargs.pop("content_type", "application/json") + + # Construct URL + url = self._cancel_initial.metadata['url'] # type: ignore + path_format_arguments = { + 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str'), + 'sqlVirtualMachineName': self._serialize.url("sql_virtual_machine_name", sql_virtual_machine_name, 'str'), + 'targetDbName': self._serialize.url("target_db_name", target_db_name, 'str'), + 'subscriptionId': self._serialize.url("self._config.subscription_id", self._config.subscription_id, 'str'), + } + url = self._client.format_url(url, **path_format_arguments) + + # Construct parameters + query_parameters = {} # type: Dict[str, Any] + query_parameters['api-version'] = self._serialize.query("api_version", api_version, 'str') + + # Construct headers + header_parameters = {} # type: Dict[str, Any] + header_parameters['Content-Type'] = self._serialize.header("content_type", content_type, 'str') + + body_content_kwargs = {} # type: Dict[str, Any] + body_content = self._serialize.body(parameters, 'MigrationOperationInput') + body_content_kwargs['content'] = body_content + request = self._client.post(url, query_parameters, header_parameters, **body_content_kwargs) + pipeline_response = await self._client._pipeline.run(request, stream=False, **kwargs) + response = pipeline_response.http_response + + if response.status_code not in [200, 202]: + map_error(status_code=response.status_code, response=response, error_map=error_map) + raise HttpResponseError(response=response, error_format=ARMErrorFormat) + + if cls: + return cls(pipeline_response, None, {}) + + _cancel_initial.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.SqlVirtualMachine/sqlVirtualMachines/{sqlVirtualMachineName}/providers/Microsoft.DataMigration/databaseMigrations/{targetDbName}/cancel'} # type: ignore + + async def begin_cancel( + self, + resource_group_name: str, + sql_virtual_machine_name: str, + target_db_name: str, + parameters: "models.MigrationOperationInput", + **kwargs + ) -> AsyncLROPoller[None]: + """Stop ongoing migration for the database. + + :param resource_group_name: Name of the resource group that contains the resource. You can + obtain this value from the Azure Resource Manager API or the portal. + :type resource_group_name: str + :param sql_virtual_machine_name: + :type sql_virtual_machine_name: str + :param target_db_name: The name of the target database. + :type target_db_name: str + :param parameters: + :type parameters: ~azure.mgmt.datamigration.models.MigrationOperationInput + :keyword callable cls: A custom type or function that will be passed the direct response + :keyword str continuation_token: A continuation token to restart a poller from a saved state. + :keyword polling: True for ARMPolling, False for no polling, or a + polling object for personal polling strategy + :paramtype polling: bool or ~azure.core.polling.AsyncPollingMethod + :keyword int polling_interval: Default waiting time between two polls for LRO operations if no Retry-After header is present. + :return: An instance of AsyncLROPoller that returns either None or the result of cls(response) + :rtype: ~azure.core.polling.AsyncLROPoller[None] + :raises ~azure.core.exceptions.HttpResponseError: + """ + polling = kwargs.pop('polling', True) # type: Union[bool, AsyncPollingMethod] + cls = kwargs.pop('cls', None) # type: ClsType[None] + lro_delay = kwargs.pop( + 'polling_interval', + self._config.polling_interval + ) + cont_token = kwargs.pop('continuation_token', None) # type: Optional[str] + if cont_token is None: + raw_result = await self._cancel_initial( + resource_group_name=resource_group_name, + sql_virtual_machine_name=sql_virtual_machine_name, + target_db_name=target_db_name, + parameters=parameters, + cls=lambda x,y,z: x, + **kwargs + ) + + kwargs.pop('error_map', None) + kwargs.pop('content_type', None) + + def get_long_running_output(pipeline_response): + if cls: + return cls(pipeline_response, None, {}) + + path_format_arguments = { + 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str'), + 'sqlVirtualMachineName': self._serialize.url("sql_virtual_machine_name", sql_virtual_machine_name, 'str'), + 'targetDbName': self._serialize.url("target_db_name", target_db_name, 'str'), + 'subscriptionId': self._serialize.url("self._config.subscription_id", self._config.subscription_id, 'str'), + } + + if polling is True: polling_method = AsyncARMPolling(lro_delay, path_format_arguments=path_format_arguments, **kwargs) + elif polling is False: polling_method = AsyncNoPolling() + else: polling_method = polling + if cont_token: + return AsyncLROPoller.from_continuation_token( + polling_method=polling_method, + continuation_token=cont_token, + client=self._client, + deserialization_callback=get_long_running_output + ) + else: + return AsyncLROPoller(self._client, raw_result, get_long_running_output, polling_method) + begin_cancel.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.SqlVirtualMachine/sqlVirtualMachines/{sqlVirtualMachineName}/providers/Microsoft.DataMigration/databaseMigrations/{targetDbName}/cancel'} # type: ignore + + async def _cutover_initial( + self, + resource_group_name: str, + sql_virtual_machine_name: str, + target_db_name: str, + parameters: "models.MigrationOperationInput", + **kwargs + ) -> None: + cls = kwargs.pop('cls', None) # type: ClsType[None] + error_map = { + 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError + } + error_map.update(kwargs.pop('error_map', {})) + api_version = "2021-10-30-preview" + content_type = kwargs.pop("content_type", "application/json") + + # Construct URL + url = self._cutover_initial.metadata['url'] # type: ignore + path_format_arguments = { + 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str'), + 'sqlVirtualMachineName': self._serialize.url("sql_virtual_machine_name", sql_virtual_machine_name, 'str'), + 'targetDbName': self._serialize.url("target_db_name", target_db_name, 'str'), + 'subscriptionId': self._serialize.url("self._config.subscription_id", self._config.subscription_id, 'str'), + } + url = self._client.format_url(url, **path_format_arguments) + + # Construct parameters + query_parameters = {} # type: Dict[str, Any] + query_parameters['api-version'] = self._serialize.query("api_version", api_version, 'str') + + # Construct headers + header_parameters = {} # type: Dict[str, Any] + header_parameters['Content-Type'] = self._serialize.header("content_type", content_type, 'str') + + body_content_kwargs = {} # type: Dict[str, Any] + body_content = self._serialize.body(parameters, 'MigrationOperationInput') + body_content_kwargs['content'] = body_content + request = self._client.post(url, query_parameters, header_parameters, **body_content_kwargs) + pipeline_response = await self._client._pipeline.run(request, stream=False, **kwargs) + response = pipeline_response.http_response + + if response.status_code not in [200, 202]: + map_error(status_code=response.status_code, response=response, error_map=error_map) + raise HttpResponseError(response=response, error_format=ARMErrorFormat) + + if cls: + return cls(pipeline_response, None, {}) + + _cutover_initial.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.SqlVirtualMachine/sqlVirtualMachines/{sqlVirtualMachineName}/providers/Microsoft.DataMigration/databaseMigrations/{targetDbName}/cutover'} # type: ignore + + async def begin_cutover( + self, + resource_group_name: str, + sql_virtual_machine_name: str, + target_db_name: str, + parameters: "models.MigrationOperationInput", + **kwargs + ) -> AsyncLROPoller[None]: + """Cutover online migration operation for the database. + + :param resource_group_name: Name of the resource group that contains the resource. You can + obtain this value from the Azure Resource Manager API or the portal. + :type resource_group_name: str + :param sql_virtual_machine_name: + :type sql_virtual_machine_name: str + :param target_db_name: The name of the target database. + :type target_db_name: str + :param parameters: + :type parameters: ~azure.mgmt.datamigration.models.MigrationOperationInput + :keyword callable cls: A custom type or function that will be passed the direct response + :keyword str continuation_token: A continuation token to restart a poller from a saved state. + :keyword polling: True for ARMPolling, False for no polling, or a + polling object for personal polling strategy + :paramtype polling: bool or ~azure.core.polling.AsyncPollingMethod + :keyword int polling_interval: Default waiting time between two polls for LRO operations if no Retry-After header is present. + :return: An instance of AsyncLROPoller that returns either None or the result of cls(response) + :rtype: ~azure.core.polling.AsyncLROPoller[None] + :raises ~azure.core.exceptions.HttpResponseError: + """ + polling = kwargs.pop('polling', True) # type: Union[bool, AsyncPollingMethod] + cls = kwargs.pop('cls', None) # type: ClsType[None] + lro_delay = kwargs.pop( + 'polling_interval', + self._config.polling_interval + ) + cont_token = kwargs.pop('continuation_token', None) # type: Optional[str] + if cont_token is None: + raw_result = await self._cutover_initial( + resource_group_name=resource_group_name, + sql_virtual_machine_name=sql_virtual_machine_name, + target_db_name=target_db_name, + parameters=parameters, + cls=lambda x,y,z: x, + **kwargs + ) + + kwargs.pop('error_map', None) + kwargs.pop('content_type', None) + + def get_long_running_output(pipeline_response): + if cls: + return cls(pipeline_response, None, {}) + + path_format_arguments = { + 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str'), + 'sqlVirtualMachineName': self._serialize.url("sql_virtual_machine_name", sql_virtual_machine_name, 'str'), + 'targetDbName': self._serialize.url("target_db_name", target_db_name, 'str'), + 'subscriptionId': self._serialize.url("self._config.subscription_id", self._config.subscription_id, 'str'), + } + + if polling is True: polling_method = AsyncARMPolling(lro_delay, path_format_arguments=path_format_arguments, **kwargs) + elif polling is False: polling_method = AsyncNoPolling() + else: polling_method = polling + if cont_token: + return AsyncLROPoller.from_continuation_token( + polling_method=polling_method, + continuation_token=cont_token, + client=self._client, + deserialization_callback=get_long_running_output + ) + else: + return AsyncLROPoller(self._client, raw_result, get_long_running_output, polling_method) + begin_cutover.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.SqlVirtualMachine/sqlVirtualMachines/{sqlVirtualMachineName}/providers/Microsoft.DataMigration/databaseMigrations/{targetDbName}/cutover'} # type: ignore diff --git a/src/datamigration/azext_datamigration/vendored_sdks/datamigration/aio/operations/_files_operations.py b/src/datamigration/azext_datamigration/vendored_sdks/datamigration/aio/operations/_files_operations.py new file mode 100644 index 00000000000..13085a72c06 --- /dev/null +++ b/src/datamigration/azext_datamigration/vendored_sdks/datamigration/aio/operations/_files_operations.py @@ -0,0 +1,557 @@ +# coding=utf-8 +# -------------------------------------------------------------------------- +# Copyright (c) Microsoft Corporation. All rights reserved. +# Licensed under the MIT License. See License.txt in the project root for license information. +# Code generated by Microsoft (R) AutoRest Code Generator. +# Changes may cause incorrect behavior and will be lost if the code is regenerated. +# -------------------------------------------------------------------------- +from typing import Any, AsyncIterable, Callable, Dict, Generic, Optional, TypeVar, Union +import warnings + +from azure.core.async_paging import AsyncItemPaged, AsyncList +from azure.core.exceptions import ClientAuthenticationError, HttpResponseError, ResourceExistsError, ResourceNotFoundError, map_error +from azure.core.pipeline import PipelineResponse +from azure.core.pipeline.transport import AsyncHttpResponse, HttpRequest +from azure.mgmt.core.exceptions import ARMErrorFormat + +from ... import models + +T = TypeVar('T') +ClsType = Optional[Callable[[PipelineResponse[HttpRequest, AsyncHttpResponse], T, Dict[str, Any]], Any]] + +class FilesOperations: + """FilesOperations async operations. + + You should not instantiate this class directly. Instead, you should create a Client instance that + instantiates it for you and attaches it as an attribute. + + :ivar models: Alias to model classes used in this operation group. + :type models: ~azure.mgmt.datamigration.models + :param client: Client for service requests. + :param config: Configuration of service client. + :param serializer: An object model serializer. + :param deserializer: An object model deserializer. + """ + + models = models + + def __init__(self, client, config, serializer, deserializer) -> None: + self._client = client + self._serialize = serializer + self._deserialize = deserializer + self._config = config + + def list( + self, + group_name: str, + service_name: str, + project_name: str, + **kwargs + ) -> AsyncIterable["models.FileList"]: + """Get files in a project. + + The project resource is a nested resource representing a stored migration project. This method + returns a list of files owned by a project resource. + + :param group_name: Name of the resource group. + :type group_name: str + :param service_name: Name of the service. + :type service_name: str + :param project_name: Name of the project. + :type project_name: str + :keyword callable cls: A custom type or function that will be passed the direct response + :return: An iterator like instance of either FileList or the result of cls(response) + :rtype: ~azure.core.async_paging.AsyncItemPaged[~azure.mgmt.datamigration.models.FileList] + :raises: ~azure.core.exceptions.HttpResponseError + """ + cls = kwargs.pop('cls', None) # type: ClsType["models.FileList"] + error_map = { + 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError + } + error_map.update(kwargs.pop('error_map', {})) + api_version = "2021-10-30-preview" + accept = "application/json" + + def prepare_request(next_link=None): + # Construct headers + header_parameters = {} # type: Dict[str, Any] + header_parameters['Accept'] = self._serialize.header("accept", accept, 'str') + + if not next_link: + # Construct URL + url = self.list.metadata['url'] # type: ignore + path_format_arguments = { + 'subscriptionId': self._serialize.url("self._config.subscription_id", self._config.subscription_id, 'str'), + 'groupName': self._serialize.url("group_name", group_name, 'str'), + 'serviceName': self._serialize.url("service_name", service_name, 'str'), + 'projectName': self._serialize.url("project_name", project_name, 'str'), + } + url = self._client.format_url(url, **path_format_arguments) + # Construct parameters + query_parameters = {} # type: Dict[str, Any] + query_parameters['api-version'] = self._serialize.query("api_version", api_version, 'str') + + request = self._client.get(url, query_parameters, header_parameters) + else: + url = next_link + query_parameters = {} # type: Dict[str, Any] + request = self._client.get(url, query_parameters, header_parameters) + return request + + async def extract_data(pipeline_response): + deserialized = self._deserialize('FileList', pipeline_response) + list_of_elem = deserialized.value + if cls: + list_of_elem = cls(list_of_elem) + return deserialized.next_link or None, AsyncList(list_of_elem) + + async def get_next(next_link=None): + request = prepare_request(next_link) + + pipeline_response = await self._client._pipeline.run(request, stream=False, **kwargs) + response = pipeline_response.http_response + + if response.status_code not in [200]: + error = self._deserialize(models.ApiError, response) + map_error(status_code=response.status_code, response=response, error_map=error_map) + raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) + + return pipeline_response + + return AsyncItemPaged( + get_next, extract_data + ) + list.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{groupName}/providers/Microsoft.DataMigration/services/{serviceName}/projects/{projectName}/files'} # type: ignore + + async def get( + self, + group_name: str, + service_name: str, + project_name: str, + file_name: str, + **kwargs + ) -> "models.ProjectFile": + """Get file information. + + The files resource is a nested, proxy-only resource representing a file stored under the + project resource. This method retrieves information about a file. + + :param group_name: Name of the resource group. + :type group_name: str + :param service_name: Name of the service. + :type service_name: str + :param project_name: Name of the project. + :type project_name: str + :param file_name: Name of the File. + :type file_name: str + :keyword callable cls: A custom type or function that will be passed the direct response + :return: ProjectFile, or the result of cls(response) + :rtype: ~azure.mgmt.datamigration.models.ProjectFile + :raises: ~azure.core.exceptions.HttpResponseError + """ + cls = kwargs.pop('cls', None) # type: ClsType["models.ProjectFile"] + error_map = { + 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError + } + error_map.update(kwargs.pop('error_map', {})) + api_version = "2021-10-30-preview" + accept = "application/json" + + # Construct URL + url = self.get.metadata['url'] # type: ignore + path_format_arguments = { + 'subscriptionId': self._serialize.url("self._config.subscription_id", self._config.subscription_id, 'str'), + 'groupName': self._serialize.url("group_name", group_name, 'str'), + 'serviceName': self._serialize.url("service_name", service_name, 'str'), + 'projectName': self._serialize.url("project_name", project_name, 'str'), + 'fileName': self._serialize.url("file_name", file_name, 'str'), + } + url = self._client.format_url(url, **path_format_arguments) + + # Construct parameters + query_parameters = {} # type: Dict[str, Any] + query_parameters['api-version'] = self._serialize.query("api_version", api_version, 'str') + + # Construct headers + header_parameters = {} # type: Dict[str, Any] + header_parameters['Accept'] = self._serialize.header("accept", accept, 'str') + + request = self._client.get(url, query_parameters, header_parameters) + pipeline_response = await self._client._pipeline.run(request, stream=False, **kwargs) + response = pipeline_response.http_response + + if response.status_code not in [200]: + map_error(status_code=response.status_code, response=response, error_map=error_map) + error = self._deserialize(models.ApiError, response) + raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) + + deserialized = self._deserialize('ProjectFile', pipeline_response) + + if cls: + return cls(pipeline_response, deserialized, {}) + + return deserialized + get.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{groupName}/providers/Microsoft.DataMigration/services/{serviceName}/projects/{projectName}/files/{fileName}'} # type: ignore + + async def create_or_update( + self, + group_name: str, + service_name: str, + project_name: str, + file_name: str, + parameters: "models.ProjectFile", + **kwargs + ) -> "models.ProjectFile": + """Create a file resource. + + The PUT method creates a new file or updates an existing one. + + :param group_name: Name of the resource group. + :type group_name: str + :param service_name: Name of the service. + :type service_name: str + :param project_name: Name of the project. + :type project_name: str + :param file_name: Name of the File. + :type file_name: str + :param parameters: Information about the file. + :type parameters: ~azure.mgmt.datamigration.models.ProjectFile + :keyword callable cls: A custom type or function that will be passed the direct response + :return: ProjectFile, or the result of cls(response) + :rtype: ~azure.mgmt.datamigration.models.ProjectFile + :raises: ~azure.core.exceptions.HttpResponseError + """ + cls = kwargs.pop('cls', None) # type: ClsType["models.ProjectFile"] + error_map = { + 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError + } + error_map.update(kwargs.pop('error_map', {})) + api_version = "2021-10-30-preview" + content_type = kwargs.pop("content_type", "application/json") + accept = "application/json" + + # Construct URL + url = self.create_or_update.metadata['url'] # type: ignore + path_format_arguments = { + 'subscriptionId': self._serialize.url("self._config.subscription_id", self._config.subscription_id, 'str'), + 'groupName': self._serialize.url("group_name", group_name, 'str'), + 'serviceName': self._serialize.url("service_name", service_name, 'str'), + 'projectName': self._serialize.url("project_name", project_name, 'str'), + 'fileName': self._serialize.url("file_name", file_name, 'str'), + } + url = self._client.format_url(url, **path_format_arguments) + + # Construct parameters + query_parameters = {} # type: Dict[str, Any] + query_parameters['api-version'] = self._serialize.query("api_version", api_version, 'str') + + # Construct headers + header_parameters = {} # type: Dict[str, Any] + header_parameters['Content-Type'] = self._serialize.header("content_type", content_type, 'str') + header_parameters['Accept'] = self._serialize.header("accept", accept, 'str') + + body_content_kwargs = {} # type: Dict[str, Any] + body_content = self._serialize.body(parameters, 'ProjectFile') + body_content_kwargs['content'] = body_content + request = self._client.put(url, query_parameters, header_parameters, **body_content_kwargs) + pipeline_response = await self._client._pipeline.run(request, stream=False, **kwargs) + response = pipeline_response.http_response + + if response.status_code not in [200, 201]: + map_error(status_code=response.status_code, response=response, error_map=error_map) + error = self._deserialize(models.ApiError, response) + raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) + + if response.status_code == 200: + deserialized = self._deserialize('ProjectFile', pipeline_response) + + if response.status_code == 201: + deserialized = self._deserialize('ProjectFile', pipeline_response) + + if cls: + return cls(pipeline_response, deserialized, {}) + + return deserialized + create_or_update.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{groupName}/providers/Microsoft.DataMigration/services/{serviceName}/projects/{projectName}/files/{fileName}'} # type: ignore + + async def delete( + self, + group_name: str, + service_name: str, + project_name: str, + file_name: str, + **kwargs + ) -> None: + """Delete file. + + This method deletes a file. + + :param group_name: Name of the resource group. + :type group_name: str + :param service_name: Name of the service. + :type service_name: str + :param project_name: Name of the project. + :type project_name: str + :param file_name: Name of the File. + :type file_name: str + :keyword callable cls: A custom type or function that will be passed the direct response + :return: None, or the result of cls(response) + :rtype: None + :raises: ~azure.core.exceptions.HttpResponseError + """ + cls = kwargs.pop('cls', None) # type: ClsType[None] + error_map = { + 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError + } + error_map.update(kwargs.pop('error_map', {})) + api_version = "2021-10-30-preview" + accept = "application/json" + + # Construct URL + url = self.delete.metadata['url'] # type: ignore + path_format_arguments = { + 'subscriptionId': self._serialize.url("self._config.subscription_id", self._config.subscription_id, 'str'), + 'groupName': self._serialize.url("group_name", group_name, 'str'), + 'serviceName': self._serialize.url("service_name", service_name, 'str'), + 'projectName': self._serialize.url("project_name", project_name, 'str'), + 'fileName': self._serialize.url("file_name", file_name, 'str'), + } + url = self._client.format_url(url, **path_format_arguments) + + # Construct parameters + query_parameters = {} # type: Dict[str, Any] + query_parameters['api-version'] = self._serialize.query("api_version", api_version, 'str') + + # Construct headers + header_parameters = {} # type: Dict[str, Any] + header_parameters['Accept'] = self._serialize.header("accept", accept, 'str') + + request = self._client.delete(url, query_parameters, header_parameters) + pipeline_response = await self._client._pipeline.run(request, stream=False, **kwargs) + response = pipeline_response.http_response + + if response.status_code not in [200, 204]: + map_error(status_code=response.status_code, response=response, error_map=error_map) + error = self._deserialize(models.ApiError, response) + raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) + + if cls: + return cls(pipeline_response, None, {}) + + delete.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{groupName}/providers/Microsoft.DataMigration/services/{serviceName}/projects/{projectName}/files/{fileName}'} # type: ignore + + async def update( + self, + group_name: str, + service_name: str, + project_name: str, + file_name: str, + parameters: "models.ProjectFile", + **kwargs + ) -> "models.ProjectFile": + """Update a file. + + This method updates an existing file. + + :param group_name: Name of the resource group. + :type group_name: str + :param service_name: Name of the service. + :type service_name: str + :param project_name: Name of the project. + :type project_name: str + :param file_name: Name of the File. + :type file_name: str + :param parameters: Information about the file. + :type parameters: ~azure.mgmt.datamigration.models.ProjectFile + :keyword callable cls: A custom type or function that will be passed the direct response + :return: ProjectFile, or the result of cls(response) + :rtype: ~azure.mgmt.datamigration.models.ProjectFile + :raises: ~azure.core.exceptions.HttpResponseError + """ + cls = kwargs.pop('cls', None) # type: ClsType["models.ProjectFile"] + error_map = { + 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError + } + error_map.update(kwargs.pop('error_map', {})) + api_version = "2021-10-30-preview" + content_type = kwargs.pop("content_type", "application/json") + accept = "application/json" + + # Construct URL + url = self.update.metadata['url'] # type: ignore + path_format_arguments = { + 'subscriptionId': self._serialize.url("self._config.subscription_id", self._config.subscription_id, 'str'), + 'groupName': self._serialize.url("group_name", group_name, 'str'), + 'serviceName': self._serialize.url("service_name", service_name, 'str'), + 'projectName': self._serialize.url("project_name", project_name, 'str'), + 'fileName': self._serialize.url("file_name", file_name, 'str'), + } + url = self._client.format_url(url, **path_format_arguments) + + # Construct parameters + query_parameters = {} # type: Dict[str, Any] + query_parameters['api-version'] = self._serialize.query("api_version", api_version, 'str') + + # Construct headers + header_parameters = {} # type: Dict[str, Any] + header_parameters['Content-Type'] = self._serialize.header("content_type", content_type, 'str') + header_parameters['Accept'] = self._serialize.header("accept", accept, 'str') + + body_content_kwargs = {} # type: Dict[str, Any] + body_content = self._serialize.body(parameters, 'ProjectFile') + body_content_kwargs['content'] = body_content + request = self._client.patch(url, query_parameters, header_parameters, **body_content_kwargs) + pipeline_response = await self._client._pipeline.run(request, stream=False, **kwargs) + response = pipeline_response.http_response + + if response.status_code not in [200]: + map_error(status_code=response.status_code, response=response, error_map=error_map) + error = self._deserialize(models.ApiError, response) + raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) + + deserialized = self._deserialize('ProjectFile', pipeline_response) + + if cls: + return cls(pipeline_response, deserialized, {}) + + return deserialized + update.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{groupName}/providers/Microsoft.DataMigration/services/{serviceName}/projects/{projectName}/files/{fileName}'} # type: ignore + + async def read( + self, + group_name: str, + service_name: str, + project_name: str, + file_name: str, + **kwargs + ) -> "models.FileStorageInfo": + """Request storage information for downloading the file content. + + This method is used for requesting storage information using which contents of the file can be + downloaded. + + :param group_name: Name of the resource group. + :type group_name: str + :param service_name: Name of the service. + :type service_name: str + :param project_name: Name of the project. + :type project_name: str + :param file_name: Name of the File. + :type file_name: str + :keyword callable cls: A custom type or function that will be passed the direct response + :return: FileStorageInfo, or the result of cls(response) + :rtype: ~azure.mgmt.datamigration.models.FileStorageInfo + :raises: ~azure.core.exceptions.HttpResponseError + """ + cls = kwargs.pop('cls', None) # type: ClsType["models.FileStorageInfo"] + error_map = { + 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError + } + error_map.update(kwargs.pop('error_map', {})) + api_version = "2021-10-30-preview" + accept = "application/json" + + # Construct URL + url = self.read.metadata['url'] # type: ignore + path_format_arguments = { + 'subscriptionId': self._serialize.url("self._config.subscription_id", self._config.subscription_id, 'str'), + 'groupName': self._serialize.url("group_name", group_name, 'str'), + 'serviceName': self._serialize.url("service_name", service_name, 'str'), + 'projectName': self._serialize.url("project_name", project_name, 'str'), + 'fileName': self._serialize.url("file_name", file_name, 'str'), + } + url = self._client.format_url(url, **path_format_arguments) + + # Construct parameters + query_parameters = {} # type: Dict[str, Any] + query_parameters['api-version'] = self._serialize.query("api_version", api_version, 'str') + + # Construct headers + header_parameters = {} # type: Dict[str, Any] + header_parameters['Accept'] = self._serialize.header("accept", accept, 'str') + + request = self._client.post(url, query_parameters, header_parameters) + pipeline_response = await self._client._pipeline.run(request, stream=False, **kwargs) + response = pipeline_response.http_response + + if response.status_code not in [200]: + map_error(status_code=response.status_code, response=response, error_map=error_map) + error = self._deserialize(models.ApiError, response) + raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) + + deserialized = self._deserialize('FileStorageInfo', pipeline_response) + + if cls: + return cls(pipeline_response, deserialized, {}) + + return deserialized + read.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{groupName}/providers/Microsoft.DataMigration/services/{serviceName}/projects/{projectName}/files/{fileName}/read'} # type: ignore + + async def read_write( + self, + group_name: str, + service_name: str, + project_name: str, + file_name: str, + **kwargs + ) -> "models.FileStorageInfo": + """Request information for reading and writing file content. + + This method is used for requesting information for reading and writing the file content. + + :param group_name: Name of the resource group. + :type group_name: str + :param service_name: Name of the service. + :type service_name: str + :param project_name: Name of the project. + :type project_name: str + :param file_name: Name of the File. + :type file_name: str + :keyword callable cls: A custom type or function that will be passed the direct response + :return: FileStorageInfo, or the result of cls(response) + :rtype: ~azure.mgmt.datamigration.models.FileStorageInfo + :raises: ~azure.core.exceptions.HttpResponseError + """ + cls = kwargs.pop('cls', None) # type: ClsType["models.FileStorageInfo"] + error_map = { + 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError + } + error_map.update(kwargs.pop('error_map', {})) + api_version = "2021-10-30-preview" + accept = "application/json" + + # Construct URL + url = self.read_write.metadata['url'] # type: ignore + path_format_arguments = { + 'subscriptionId': self._serialize.url("self._config.subscription_id", self._config.subscription_id, 'str'), + 'groupName': self._serialize.url("group_name", group_name, 'str'), + 'serviceName': self._serialize.url("service_name", service_name, 'str'), + 'projectName': self._serialize.url("project_name", project_name, 'str'), + 'fileName': self._serialize.url("file_name", file_name, 'str'), + } + url = self._client.format_url(url, **path_format_arguments) + + # Construct parameters + query_parameters = {} # type: Dict[str, Any] + query_parameters['api-version'] = self._serialize.query("api_version", api_version, 'str') + + # Construct headers + header_parameters = {} # type: Dict[str, Any] + header_parameters['Accept'] = self._serialize.header("accept", accept, 'str') + + request = self._client.post(url, query_parameters, header_parameters) + pipeline_response = await self._client._pipeline.run(request, stream=False, **kwargs) + response = pipeline_response.http_response + + if response.status_code not in [200]: + map_error(status_code=response.status_code, response=response, error_map=error_map) + error = self._deserialize(models.ApiError, response) + raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) + + deserialized = self._deserialize('FileStorageInfo', pipeline_response) + + if cls: + return cls(pipeline_response, deserialized, {}) + + return deserialized + read_write.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{groupName}/providers/Microsoft.DataMigration/services/{serviceName}/projects/{projectName}/files/{fileName}/readwrite'} # type: ignore diff --git a/src/datamigration/azext_datamigration/vendored_sdks/datamigration/aio/operations/_operations.py b/src/datamigration/azext_datamigration/vendored_sdks/datamigration/aio/operations/_operations.py new file mode 100644 index 00000000000..653286cdb65 --- /dev/null +++ b/src/datamigration/azext_datamigration/vendored_sdks/datamigration/aio/operations/_operations.py @@ -0,0 +1,104 @@ +# coding=utf-8 +# -------------------------------------------------------------------------- +# Copyright (c) Microsoft Corporation. All rights reserved. +# Licensed under the MIT License. See License.txt in the project root for license information. +# Code generated by Microsoft (R) AutoRest Code Generator. +# Changes may cause incorrect behavior and will be lost if the code is regenerated. +# -------------------------------------------------------------------------- +from typing import Any, AsyncIterable, Callable, Dict, Generic, Optional, TypeVar +import warnings + +from azure.core.async_paging import AsyncItemPaged, AsyncList +from azure.core.exceptions import ClientAuthenticationError, HttpResponseError, ResourceExistsError, ResourceNotFoundError, map_error +from azure.core.pipeline import PipelineResponse +from azure.core.pipeline.transport import AsyncHttpResponse, HttpRequest +from azure.mgmt.core.exceptions import ARMErrorFormat + +from ... import models + +T = TypeVar('T') +ClsType = Optional[Callable[[PipelineResponse[HttpRequest, AsyncHttpResponse], T, Dict[str, Any]], Any]] + +class Operations: + """Operations async operations. + + You should not instantiate this class directly. Instead, you should create a Client instance that + instantiates it for you and attaches it as an attribute. + + :ivar models: Alias to model classes used in this operation group. + :type models: ~azure.mgmt.datamigration.models + :param client: Client for service requests. + :param config: Configuration of service client. + :param serializer: An object model serializer. + :param deserializer: An object model deserializer. + """ + + models = models + + def __init__(self, client, config, serializer, deserializer) -> None: + self._client = client + self._serialize = serializer + self._deserialize = deserializer + self._config = config + + def list( + self, + **kwargs + ) -> AsyncIterable["models.OperationListResult"]: + """Lists all of the available SQL Migration REST API operations. + + :keyword callable cls: A custom type or function that will be passed the direct response + :return: An iterator like instance of either OperationListResult or the result of cls(response) + :rtype: ~azure.core.async_paging.AsyncItemPaged[~azure.mgmt.datamigration.models.OperationListResult] + :raises: ~azure.core.exceptions.HttpResponseError + """ + cls = kwargs.pop('cls', None) # type: ClsType["models.OperationListResult"] + error_map = { + 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError + } + error_map.update(kwargs.pop('error_map', {})) + api_version = "2021-10-30-preview" + accept = "application/json" + + def prepare_request(next_link=None): + # Construct headers + header_parameters = {} # type: Dict[str, Any] + header_parameters['Accept'] = self._serialize.header("accept", accept, 'str') + + if not next_link: + # Construct URL + url = self.list.metadata['url'] # type: ignore + # Construct parameters + query_parameters = {} # type: Dict[str, Any] + query_parameters['api-version'] = self._serialize.query("api_version", api_version, 'str') + + request = self._client.get(url, query_parameters, header_parameters) + else: + url = next_link + query_parameters = {} # type: Dict[str, Any] + request = self._client.get(url, query_parameters, header_parameters) + return request + + async def extract_data(pipeline_response): + deserialized = self._deserialize('OperationListResult', pipeline_response) + list_of_elem = deserialized.value + if cls: + list_of_elem = cls(list_of_elem) + return deserialized.next_link or None, AsyncList(list_of_elem) + + async def get_next(next_link=None): + request = prepare_request(next_link) + + pipeline_response = await self._client._pipeline.run(request, stream=False, **kwargs) + response = pipeline_response.http_response + + if response.status_code not in [200]: + map_error(status_code=response.status_code, response=response, error_map=error_map) + raise HttpResponseError(response=response, error_format=ARMErrorFormat) + + return pipeline_response + + return AsyncItemPaged( + get_next, extract_data + ) + list.metadata = {'url': '/providers/Microsoft.DataMigration/operations'} # type: ignore diff --git a/src/datamigration/azext_datamigration/vendored_sdks/datamigration/aio/operations/_projects_operations.py b/src/datamigration/azext_datamigration/vendored_sdks/datamigration/aio/operations/_projects_operations.py new file mode 100644 index 00000000000..63a9dfc8d07 --- /dev/null +++ b/src/datamigration/azext_datamigration/vendored_sdks/datamigration/aio/operations/_projects_operations.py @@ -0,0 +1,406 @@ +# coding=utf-8 +# -------------------------------------------------------------------------- +# Copyright (c) Microsoft Corporation. All rights reserved. +# Licensed under the MIT License. See License.txt in the project root for license information. +# Code generated by Microsoft (R) AutoRest Code Generator. +# Changes may cause incorrect behavior and will be lost if the code is regenerated. +# -------------------------------------------------------------------------- +from typing import Any, AsyncIterable, Callable, Dict, Generic, Optional, TypeVar, Union +import warnings + +from azure.core.async_paging import AsyncItemPaged, AsyncList +from azure.core.exceptions import ClientAuthenticationError, HttpResponseError, ResourceExistsError, ResourceNotFoundError, map_error +from azure.core.pipeline import PipelineResponse +from azure.core.pipeline.transport import AsyncHttpResponse, HttpRequest +from azure.mgmt.core.exceptions import ARMErrorFormat + +from ... import models + +T = TypeVar('T') +ClsType = Optional[Callable[[PipelineResponse[HttpRequest, AsyncHttpResponse], T, Dict[str, Any]], Any]] + +class ProjectsOperations: + """ProjectsOperations async operations. + + You should not instantiate this class directly. Instead, you should create a Client instance that + instantiates it for you and attaches it as an attribute. + + :ivar models: Alias to model classes used in this operation group. + :type models: ~azure.mgmt.datamigration.models + :param client: Client for service requests. + :param config: Configuration of service client. + :param serializer: An object model serializer. + :param deserializer: An object model deserializer. + """ + + models = models + + def __init__(self, client, config, serializer, deserializer) -> None: + self._client = client + self._serialize = serializer + self._deserialize = deserializer + self._config = config + + def list( + self, + group_name: str, + service_name: str, + **kwargs + ) -> AsyncIterable["models.ProjectList"]: + """Get projects in a service. + + The project resource is a nested resource representing a stored migration project. This method + returns a list of projects owned by a service resource. + + :param group_name: Name of the resource group. + :type group_name: str + :param service_name: Name of the service. + :type service_name: str + :keyword callable cls: A custom type or function that will be passed the direct response + :return: An iterator like instance of either ProjectList or the result of cls(response) + :rtype: ~azure.core.async_paging.AsyncItemPaged[~azure.mgmt.datamigration.models.ProjectList] + :raises: ~azure.core.exceptions.HttpResponseError + """ + cls = kwargs.pop('cls', None) # type: ClsType["models.ProjectList"] + error_map = { + 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError + } + error_map.update(kwargs.pop('error_map', {})) + api_version = "2021-10-30-preview" + accept = "application/json" + + def prepare_request(next_link=None): + # Construct headers + header_parameters = {} # type: Dict[str, Any] + header_parameters['Accept'] = self._serialize.header("accept", accept, 'str') + + if not next_link: + # Construct URL + url = self.list.metadata['url'] # type: ignore + path_format_arguments = { + 'subscriptionId': self._serialize.url("self._config.subscription_id", self._config.subscription_id, 'str'), + 'groupName': self._serialize.url("group_name", group_name, 'str'), + 'serviceName': self._serialize.url("service_name", service_name, 'str'), + } + url = self._client.format_url(url, **path_format_arguments) + # Construct parameters + query_parameters = {} # type: Dict[str, Any] + query_parameters['api-version'] = self._serialize.query("api_version", api_version, 'str') + + request = self._client.get(url, query_parameters, header_parameters) + else: + url = next_link + query_parameters = {} # type: Dict[str, Any] + request = self._client.get(url, query_parameters, header_parameters) + return request + + async def extract_data(pipeline_response): + deserialized = self._deserialize('ProjectList', pipeline_response) + list_of_elem = deserialized.value + if cls: + list_of_elem = cls(list_of_elem) + return deserialized.next_link or None, AsyncList(list_of_elem) + + async def get_next(next_link=None): + request = prepare_request(next_link) + + pipeline_response = await self._client._pipeline.run(request, stream=False, **kwargs) + response = pipeline_response.http_response + + if response.status_code not in [200]: + error = self._deserialize(models.ApiError, response) + map_error(status_code=response.status_code, response=response, error_map=error_map) + raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) + + return pipeline_response + + return AsyncItemPaged( + get_next, extract_data + ) + list.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{groupName}/providers/Microsoft.DataMigration/services/{serviceName}/projects'} # type: ignore + + async def create_or_update( + self, + group_name: str, + service_name: str, + project_name: str, + parameters: "models.Project", + **kwargs + ) -> "models.Project": + """Create or update project. + + The project resource is a nested resource representing a stored migration project. The PUT + method creates a new project or updates an existing one. + + :param group_name: Name of the resource group. + :type group_name: str + :param service_name: Name of the service. + :type service_name: str + :param project_name: Name of the project. + :type project_name: str + :param parameters: Information about the project. + :type parameters: ~azure.mgmt.datamigration.models.Project + :keyword callable cls: A custom type or function that will be passed the direct response + :return: Project, or the result of cls(response) + :rtype: ~azure.mgmt.datamigration.models.Project + :raises: ~azure.core.exceptions.HttpResponseError + """ + cls = kwargs.pop('cls', None) # type: ClsType["models.Project"] + error_map = { + 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError + } + error_map.update(kwargs.pop('error_map', {})) + api_version = "2021-10-30-preview" + content_type = kwargs.pop("content_type", "application/json") + accept = "application/json" + + # Construct URL + url = self.create_or_update.metadata['url'] # type: ignore + path_format_arguments = { + 'subscriptionId': self._serialize.url("self._config.subscription_id", self._config.subscription_id, 'str'), + 'groupName': self._serialize.url("group_name", group_name, 'str'), + 'serviceName': self._serialize.url("service_name", service_name, 'str'), + 'projectName': self._serialize.url("project_name", project_name, 'str'), + } + url = self._client.format_url(url, **path_format_arguments) + + # Construct parameters + query_parameters = {} # type: Dict[str, Any] + query_parameters['api-version'] = self._serialize.query("api_version", api_version, 'str') + + # Construct headers + header_parameters = {} # type: Dict[str, Any] + header_parameters['Content-Type'] = self._serialize.header("content_type", content_type, 'str') + header_parameters['Accept'] = self._serialize.header("accept", accept, 'str') + + body_content_kwargs = {} # type: Dict[str, Any] + body_content = self._serialize.body(parameters, 'Project') + body_content_kwargs['content'] = body_content + request = self._client.put(url, query_parameters, header_parameters, **body_content_kwargs) + pipeline_response = await self._client._pipeline.run(request, stream=False, **kwargs) + response = pipeline_response.http_response + + if response.status_code not in [200, 201]: + map_error(status_code=response.status_code, response=response, error_map=error_map) + error = self._deserialize(models.ApiError, response) + raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) + + if response.status_code == 200: + deserialized = self._deserialize('Project', pipeline_response) + + if response.status_code == 201: + deserialized = self._deserialize('Project', pipeline_response) + + if cls: + return cls(pipeline_response, deserialized, {}) + + return deserialized + create_or_update.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{groupName}/providers/Microsoft.DataMigration/services/{serviceName}/projects/{projectName}'} # type: ignore + + async def get( + self, + group_name: str, + service_name: str, + project_name: str, + **kwargs + ) -> "models.Project": + """Get project information. + + The project resource is a nested resource representing a stored migration project. The GET + method retrieves information about a project. + + :param group_name: Name of the resource group. + :type group_name: str + :param service_name: Name of the service. + :type service_name: str + :param project_name: Name of the project. + :type project_name: str + :keyword callable cls: A custom type or function that will be passed the direct response + :return: Project, or the result of cls(response) + :rtype: ~azure.mgmt.datamigration.models.Project + :raises: ~azure.core.exceptions.HttpResponseError + """ + cls = kwargs.pop('cls', None) # type: ClsType["models.Project"] + error_map = { + 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError + } + error_map.update(kwargs.pop('error_map', {})) + api_version = "2021-10-30-preview" + accept = "application/json" + + # Construct URL + url = self.get.metadata['url'] # type: ignore + path_format_arguments = { + 'subscriptionId': self._serialize.url("self._config.subscription_id", self._config.subscription_id, 'str'), + 'groupName': self._serialize.url("group_name", group_name, 'str'), + 'serviceName': self._serialize.url("service_name", service_name, 'str'), + 'projectName': self._serialize.url("project_name", project_name, 'str'), + } + url = self._client.format_url(url, **path_format_arguments) + + # Construct parameters + query_parameters = {} # type: Dict[str, Any] + query_parameters['api-version'] = self._serialize.query("api_version", api_version, 'str') + + # Construct headers + header_parameters = {} # type: Dict[str, Any] + header_parameters['Accept'] = self._serialize.header("accept", accept, 'str') + + request = self._client.get(url, query_parameters, header_parameters) + pipeline_response = await self._client._pipeline.run(request, stream=False, **kwargs) + response = pipeline_response.http_response + + if response.status_code not in [200]: + map_error(status_code=response.status_code, response=response, error_map=error_map) + error = self._deserialize(models.ApiError, response) + raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) + + deserialized = self._deserialize('Project', pipeline_response) + + if cls: + return cls(pipeline_response, deserialized, {}) + + return deserialized + get.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{groupName}/providers/Microsoft.DataMigration/services/{serviceName}/projects/{projectName}'} # type: ignore + + async def delete( + self, + group_name: str, + service_name: str, + project_name: str, + delete_running_tasks: Optional[bool] = None, + **kwargs + ) -> None: + """Delete project. + + The project resource is a nested resource representing a stored migration project. The DELETE + method deletes a project. + + :param group_name: Name of the resource group. + :type group_name: str + :param service_name: Name of the service. + :type service_name: str + :param project_name: Name of the project. + :type project_name: str + :param delete_running_tasks: Delete the resource even if it contains running tasks. + :type delete_running_tasks: bool + :keyword callable cls: A custom type or function that will be passed the direct response + :return: None, or the result of cls(response) + :rtype: None + :raises: ~azure.core.exceptions.HttpResponseError + """ + cls = kwargs.pop('cls', None) # type: ClsType[None] + error_map = { + 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError + } + error_map.update(kwargs.pop('error_map', {})) + api_version = "2021-10-30-preview" + accept = "application/json" + + # Construct URL + url = self.delete.metadata['url'] # type: ignore + path_format_arguments = { + 'subscriptionId': self._serialize.url("self._config.subscription_id", self._config.subscription_id, 'str'), + 'groupName': self._serialize.url("group_name", group_name, 'str'), + 'serviceName': self._serialize.url("service_name", service_name, 'str'), + 'projectName': self._serialize.url("project_name", project_name, 'str'), + } + url = self._client.format_url(url, **path_format_arguments) + + # Construct parameters + query_parameters = {} # type: Dict[str, Any] + query_parameters['api-version'] = self._serialize.query("api_version", api_version, 'str') + if delete_running_tasks is not None: + query_parameters['deleteRunningTasks'] = self._serialize.query("delete_running_tasks", delete_running_tasks, 'bool') + + # Construct headers + header_parameters = {} # type: Dict[str, Any] + header_parameters['Accept'] = self._serialize.header("accept", accept, 'str') + + request = self._client.delete(url, query_parameters, header_parameters) + pipeline_response = await self._client._pipeline.run(request, stream=False, **kwargs) + response = pipeline_response.http_response + + if response.status_code not in [200, 204]: + map_error(status_code=response.status_code, response=response, error_map=error_map) + error = self._deserialize(models.ApiError, response) + raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) + + if cls: + return cls(pipeline_response, None, {}) + + delete.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{groupName}/providers/Microsoft.DataMigration/services/{serviceName}/projects/{projectName}'} # type: ignore + + async def update( + self, + group_name: str, + service_name: str, + project_name: str, + parameters: "models.Project", + **kwargs + ) -> "models.Project": + """Update project. + + The project resource is a nested resource representing a stored migration project. The PATCH + method updates an existing project. + + :param group_name: Name of the resource group. + :type group_name: str + :param service_name: Name of the service. + :type service_name: str + :param project_name: Name of the project. + :type project_name: str + :param parameters: Information about the project. + :type parameters: ~azure.mgmt.datamigration.models.Project + :keyword callable cls: A custom type or function that will be passed the direct response + :return: Project, or the result of cls(response) + :rtype: ~azure.mgmt.datamigration.models.Project + :raises: ~azure.core.exceptions.HttpResponseError + """ + cls = kwargs.pop('cls', None) # type: ClsType["models.Project"] + error_map = { + 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError + } + error_map.update(kwargs.pop('error_map', {})) + api_version = "2021-10-30-preview" + content_type = kwargs.pop("content_type", "application/json") + accept = "application/json" + + # Construct URL + url = self.update.metadata['url'] # type: ignore + path_format_arguments = { + 'subscriptionId': self._serialize.url("self._config.subscription_id", self._config.subscription_id, 'str'), + 'groupName': self._serialize.url("group_name", group_name, 'str'), + 'serviceName': self._serialize.url("service_name", service_name, 'str'), + 'projectName': self._serialize.url("project_name", project_name, 'str'), + } + url = self._client.format_url(url, **path_format_arguments) + + # Construct parameters + query_parameters = {} # type: Dict[str, Any] + query_parameters['api-version'] = self._serialize.query("api_version", api_version, 'str') + + # Construct headers + header_parameters = {} # type: Dict[str, Any] + header_parameters['Content-Type'] = self._serialize.header("content_type", content_type, 'str') + header_parameters['Accept'] = self._serialize.header("accept", accept, 'str') + + body_content_kwargs = {} # type: Dict[str, Any] + body_content = self._serialize.body(parameters, 'Project') + body_content_kwargs['content'] = body_content + request = self._client.patch(url, query_parameters, header_parameters, **body_content_kwargs) + pipeline_response = await self._client._pipeline.run(request, stream=False, **kwargs) + response = pipeline_response.http_response + + if response.status_code not in [200]: + map_error(status_code=response.status_code, response=response, error_map=error_map) + error = self._deserialize(models.ApiError, response) + raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) + + deserialized = self._deserialize('Project', pipeline_response) + + if cls: + return cls(pipeline_response, deserialized, {}) + + return deserialized + update.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{groupName}/providers/Microsoft.DataMigration/services/{serviceName}/projects/{projectName}'} # type: ignore diff --git a/src/datamigration/azext_datamigration/vendored_sdks/datamigration/aio/operations/_resource_skus_operations.py b/src/datamigration/azext_datamigration/vendored_sdks/datamigration/aio/operations/_resource_skus_operations.py new file mode 100644 index 00000000000..d49ddf64e07 --- /dev/null +++ b/src/datamigration/azext_datamigration/vendored_sdks/datamigration/aio/operations/_resource_skus_operations.py @@ -0,0 +1,111 @@ +# coding=utf-8 +# -------------------------------------------------------------------------- +# Copyright (c) Microsoft Corporation. All rights reserved. +# Licensed under the MIT License. See License.txt in the project root for license information. +# Code generated by Microsoft (R) AutoRest Code Generator. +# Changes may cause incorrect behavior and will be lost if the code is regenerated. +# -------------------------------------------------------------------------- +from typing import Any, AsyncIterable, Callable, Dict, Generic, Optional, TypeVar +import warnings + +from azure.core.async_paging import AsyncItemPaged, AsyncList +from azure.core.exceptions import ClientAuthenticationError, HttpResponseError, ResourceExistsError, ResourceNotFoundError, map_error +from azure.core.pipeline import PipelineResponse +from azure.core.pipeline.transport import AsyncHttpResponse, HttpRequest +from azure.mgmt.core.exceptions import ARMErrorFormat + +from ... import models + +T = TypeVar('T') +ClsType = Optional[Callable[[PipelineResponse[HttpRequest, AsyncHttpResponse], T, Dict[str, Any]], Any]] + +class ResourceSkusOperations: + """ResourceSkusOperations async operations. + + You should not instantiate this class directly. Instead, you should create a Client instance that + instantiates it for you and attaches it as an attribute. + + :ivar models: Alias to model classes used in this operation group. + :type models: ~azure.mgmt.datamigration.models + :param client: Client for service requests. + :param config: Configuration of service client. + :param serializer: An object model serializer. + :param deserializer: An object model deserializer. + """ + + models = models + + def __init__(self, client, config, serializer, deserializer) -> None: + self._client = client + self._serialize = serializer + self._deserialize = deserializer + self._config = config + + def list_skus( + self, + **kwargs + ) -> AsyncIterable["models.ResourceSkusResult"]: + """Get supported SKUs. + + The skus action returns the list of SKUs that DMS supports. + + :keyword callable cls: A custom type or function that will be passed the direct response + :return: An iterator like instance of either ResourceSkusResult or the result of cls(response) + :rtype: ~azure.core.async_paging.AsyncItemPaged[~azure.mgmt.datamigration.models.ResourceSkusResult] + :raises: ~azure.core.exceptions.HttpResponseError + """ + cls = kwargs.pop('cls', None) # type: ClsType["models.ResourceSkusResult"] + error_map = { + 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError + } + error_map.update(kwargs.pop('error_map', {})) + api_version = "2021-10-30-preview" + accept = "application/json" + + def prepare_request(next_link=None): + # Construct headers + header_parameters = {} # type: Dict[str, Any] + header_parameters['Accept'] = self._serialize.header("accept", accept, 'str') + + if not next_link: + # Construct URL + url = self.list_skus.metadata['url'] # type: ignore + path_format_arguments = { + 'subscriptionId': self._serialize.url("self._config.subscription_id", self._config.subscription_id, 'str'), + } + url = self._client.format_url(url, **path_format_arguments) + # Construct parameters + query_parameters = {} # type: Dict[str, Any] + query_parameters['api-version'] = self._serialize.query("api_version", api_version, 'str') + + request = self._client.get(url, query_parameters, header_parameters) + else: + url = next_link + query_parameters = {} # type: Dict[str, Any] + request = self._client.get(url, query_parameters, header_parameters) + return request + + async def extract_data(pipeline_response): + deserialized = self._deserialize('ResourceSkusResult', pipeline_response) + list_of_elem = deserialized.value + if cls: + list_of_elem = cls(list_of_elem) + return deserialized.next_link or None, AsyncList(list_of_elem) + + async def get_next(next_link=None): + request = prepare_request(next_link) + + pipeline_response = await self._client._pipeline.run(request, stream=False, **kwargs) + response = pipeline_response.http_response + + if response.status_code not in [200]: + error = self._deserialize(models.ApiError, response) + map_error(status_code=response.status_code, response=response, error_map=error_map) + raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) + + return pipeline_response + + return AsyncItemPaged( + get_next, extract_data + ) + list_skus.metadata = {'url': '/subscriptions/{subscriptionId}/providers/Microsoft.DataMigration/skus'} # type: ignore diff --git a/src/datamigration/azext_datamigration/vendored_sdks/datamigration/aio/operations/_service_tasks_operations.py b/src/datamigration/azext_datamigration/vendored_sdks/datamigration/aio/operations/_service_tasks_operations.py new file mode 100644 index 00000000000..0b3d4d62d63 --- /dev/null +++ b/src/datamigration/azext_datamigration/vendored_sdks/datamigration/aio/operations/_service_tasks_operations.py @@ -0,0 +1,487 @@ +# coding=utf-8 +# -------------------------------------------------------------------------- +# Copyright (c) Microsoft Corporation. All rights reserved. +# Licensed under the MIT License. See License.txt in the project root for license information. +# Code generated by Microsoft (R) AutoRest Code Generator. +# Changes may cause incorrect behavior and will be lost if the code is regenerated. +# -------------------------------------------------------------------------- +from typing import Any, AsyncIterable, Callable, Dict, Generic, Optional, TypeVar, Union +import warnings + +from azure.core.async_paging import AsyncItemPaged, AsyncList +from azure.core.exceptions import ClientAuthenticationError, HttpResponseError, ResourceExistsError, ResourceNotFoundError, map_error +from azure.core.pipeline import PipelineResponse +from azure.core.pipeline.transport import AsyncHttpResponse, HttpRequest +from azure.mgmt.core.exceptions import ARMErrorFormat + +from ... import models + +T = TypeVar('T') +ClsType = Optional[Callable[[PipelineResponse[HttpRequest, AsyncHttpResponse], T, Dict[str, Any]], Any]] + +class ServiceTasksOperations: + """ServiceTasksOperations async operations. + + You should not instantiate this class directly. Instead, you should create a Client instance that + instantiates it for you and attaches it as an attribute. + + :ivar models: Alias to model classes used in this operation group. + :type models: ~azure.mgmt.datamigration.models + :param client: Client for service requests. + :param config: Configuration of service client. + :param serializer: An object model serializer. + :param deserializer: An object model deserializer. + """ + + models = models + + def __init__(self, client, config, serializer, deserializer) -> None: + self._client = client + self._serialize = serializer + self._deserialize = deserializer + self._config = config + + def list( + self, + group_name: str, + service_name: str, + task_type: Optional[str] = None, + **kwargs + ) -> AsyncIterable["models.TaskList"]: + """Get service level tasks for a service. + + The services resource is the top-level resource that represents the Database Migration Service. + This method returns a list of service level tasks owned by a service resource. Some tasks may + have a status of Unknown, which indicates that an error occurred while querying the status of + that task. + + :param group_name: Name of the resource group. + :type group_name: str + :param service_name: Name of the service. + :type service_name: str + :param task_type: Filter tasks by task type. + :type task_type: str + :keyword callable cls: A custom type or function that will be passed the direct response + :return: An iterator like instance of either TaskList or the result of cls(response) + :rtype: ~azure.core.async_paging.AsyncItemPaged[~azure.mgmt.datamigration.models.TaskList] + :raises: ~azure.core.exceptions.HttpResponseError + """ + cls = kwargs.pop('cls', None) # type: ClsType["models.TaskList"] + error_map = { + 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError + } + error_map.update(kwargs.pop('error_map', {})) + api_version = "2021-10-30-preview" + accept = "application/json" + + def prepare_request(next_link=None): + # Construct headers + header_parameters = {} # type: Dict[str, Any] + header_parameters['Accept'] = self._serialize.header("accept", accept, 'str') + + if not next_link: + # Construct URL + url = self.list.metadata['url'] # type: ignore + path_format_arguments = { + 'subscriptionId': self._serialize.url("self._config.subscription_id", self._config.subscription_id, 'str'), + 'groupName': self._serialize.url("group_name", group_name, 'str'), + 'serviceName': self._serialize.url("service_name", service_name, 'str'), + } + url = self._client.format_url(url, **path_format_arguments) + # Construct parameters + query_parameters = {} # type: Dict[str, Any] + query_parameters['api-version'] = self._serialize.query("api_version", api_version, 'str') + if task_type is not None: + query_parameters['taskType'] = self._serialize.query("task_type", task_type, 'str') + + request = self._client.get(url, query_parameters, header_parameters) + else: + url = next_link + query_parameters = {} # type: Dict[str, Any] + request = self._client.get(url, query_parameters, header_parameters) + return request + + async def extract_data(pipeline_response): + deserialized = self._deserialize('TaskList', pipeline_response) + list_of_elem = deserialized.value + if cls: + list_of_elem = cls(list_of_elem) + return deserialized.next_link or None, AsyncList(list_of_elem) + + async def get_next(next_link=None): + request = prepare_request(next_link) + + pipeline_response = await self._client._pipeline.run(request, stream=False, **kwargs) + response = pipeline_response.http_response + + if response.status_code not in [200]: + error = self._deserialize(models.ApiError, response) + map_error(status_code=response.status_code, response=response, error_map=error_map) + raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) + + return pipeline_response + + return AsyncItemPaged( + get_next, extract_data + ) + list.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{groupName}/providers/Microsoft.DataMigration/services/{serviceName}/serviceTasks'} # type: ignore + + async def create_or_update( + self, + group_name: str, + service_name: str, + task_name: str, + parameters: "models.ProjectTask", + **kwargs + ) -> "models.ProjectTask": + """Create or update service task. + + The service tasks resource is a nested, proxy-only resource representing work performed by a + DMS instance. The PUT method creates a new service task or updates an existing one, although + since service tasks have no mutable custom properties, there is little reason to update an + existing one. + + :param group_name: Name of the resource group. + :type group_name: str + :param service_name: Name of the service. + :type service_name: str + :param task_name: Name of the Task. + :type task_name: str + :param parameters: Information about the task. + :type parameters: ~azure.mgmt.datamigration.models.ProjectTask + :keyword callable cls: A custom type or function that will be passed the direct response + :return: ProjectTask, or the result of cls(response) + :rtype: ~azure.mgmt.datamigration.models.ProjectTask + :raises: ~azure.core.exceptions.HttpResponseError + """ + cls = kwargs.pop('cls', None) # type: ClsType["models.ProjectTask"] + error_map = { + 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError + } + error_map.update(kwargs.pop('error_map', {})) + api_version = "2021-10-30-preview" + content_type = kwargs.pop("content_type", "application/json") + accept = "application/json" + + # Construct URL + url = self.create_or_update.metadata['url'] # type: ignore + path_format_arguments = { + 'subscriptionId': self._serialize.url("self._config.subscription_id", self._config.subscription_id, 'str'), + 'groupName': self._serialize.url("group_name", group_name, 'str'), + 'serviceName': self._serialize.url("service_name", service_name, 'str'), + 'taskName': self._serialize.url("task_name", task_name, 'str'), + } + url = self._client.format_url(url, **path_format_arguments) + + # Construct parameters + query_parameters = {} # type: Dict[str, Any] + query_parameters['api-version'] = self._serialize.query("api_version", api_version, 'str') + + # Construct headers + header_parameters = {} # type: Dict[str, Any] + header_parameters['Content-Type'] = self._serialize.header("content_type", content_type, 'str') + header_parameters['Accept'] = self._serialize.header("accept", accept, 'str') + + body_content_kwargs = {} # type: Dict[str, Any] + body_content = self._serialize.body(parameters, 'ProjectTask') + body_content_kwargs['content'] = body_content + request = self._client.put(url, query_parameters, header_parameters, **body_content_kwargs) + pipeline_response = await self._client._pipeline.run(request, stream=False, **kwargs) + response = pipeline_response.http_response + + if response.status_code not in [200, 201]: + map_error(status_code=response.status_code, response=response, error_map=error_map) + error = self._deserialize(models.ApiError, response) + raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) + + if response.status_code == 200: + deserialized = self._deserialize('ProjectTask', pipeline_response) + + if response.status_code == 201: + deserialized = self._deserialize('ProjectTask', pipeline_response) + + if cls: + return cls(pipeline_response, deserialized, {}) + + return deserialized + create_or_update.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{groupName}/providers/Microsoft.DataMigration/services/{serviceName}/serviceTasks/{taskName}'} # type: ignore + + async def get( + self, + group_name: str, + service_name: str, + task_name: str, + expand: Optional[str] = None, + **kwargs + ) -> "models.ProjectTask": + """Get service task information. + + The service tasks resource is a nested, proxy-only resource representing work performed by a + DMS instance. The GET method retrieves information about a service task. + + :param group_name: Name of the resource group. + :type group_name: str + :param service_name: Name of the service. + :type service_name: str + :param task_name: Name of the Task. + :type task_name: str + :param expand: Expand the response. + :type expand: str + :keyword callable cls: A custom type or function that will be passed the direct response + :return: ProjectTask, or the result of cls(response) + :rtype: ~azure.mgmt.datamigration.models.ProjectTask + :raises: ~azure.core.exceptions.HttpResponseError + """ + cls = kwargs.pop('cls', None) # type: ClsType["models.ProjectTask"] + error_map = { + 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError + } + error_map.update(kwargs.pop('error_map', {})) + api_version = "2021-10-30-preview" + accept = "application/json" + + # Construct URL + url = self.get.metadata['url'] # type: ignore + path_format_arguments = { + 'subscriptionId': self._serialize.url("self._config.subscription_id", self._config.subscription_id, 'str'), + 'groupName': self._serialize.url("group_name", group_name, 'str'), + 'serviceName': self._serialize.url("service_name", service_name, 'str'), + 'taskName': self._serialize.url("task_name", task_name, 'str'), + } + url = self._client.format_url(url, **path_format_arguments) + + # Construct parameters + query_parameters = {} # type: Dict[str, Any] + query_parameters['api-version'] = self._serialize.query("api_version", api_version, 'str') + if expand is not None: + query_parameters['$expand'] = self._serialize.query("expand", expand, 'str') + + # Construct headers + header_parameters = {} # type: Dict[str, Any] + header_parameters['Accept'] = self._serialize.header("accept", accept, 'str') + + request = self._client.get(url, query_parameters, header_parameters) + pipeline_response = await self._client._pipeline.run(request, stream=False, **kwargs) + response = pipeline_response.http_response + + if response.status_code not in [200]: + map_error(status_code=response.status_code, response=response, error_map=error_map) + error = self._deserialize(models.ApiError, response) + raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) + + deserialized = self._deserialize('ProjectTask', pipeline_response) + + if cls: + return cls(pipeline_response, deserialized, {}) + + return deserialized + get.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{groupName}/providers/Microsoft.DataMigration/services/{serviceName}/serviceTasks/{taskName}'} # type: ignore + + async def delete( + self, + group_name: str, + service_name: str, + task_name: str, + delete_running_tasks: Optional[bool] = None, + **kwargs + ) -> None: + """Delete service task. + + The service tasks resource is a nested, proxy-only resource representing work performed by a + DMS instance. The DELETE method deletes a service task, canceling it first if it's running. + + :param group_name: Name of the resource group. + :type group_name: str + :param service_name: Name of the service. + :type service_name: str + :param task_name: Name of the Task. + :type task_name: str + :param delete_running_tasks: Delete the resource even if it contains running tasks. + :type delete_running_tasks: bool + :keyword callable cls: A custom type or function that will be passed the direct response + :return: None, or the result of cls(response) + :rtype: None + :raises: ~azure.core.exceptions.HttpResponseError + """ + cls = kwargs.pop('cls', None) # type: ClsType[None] + error_map = { + 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError + } + error_map.update(kwargs.pop('error_map', {})) + api_version = "2021-10-30-preview" + accept = "application/json" + + # Construct URL + url = self.delete.metadata['url'] # type: ignore + path_format_arguments = { + 'subscriptionId': self._serialize.url("self._config.subscription_id", self._config.subscription_id, 'str'), + 'groupName': self._serialize.url("group_name", group_name, 'str'), + 'serviceName': self._serialize.url("service_name", service_name, 'str'), + 'taskName': self._serialize.url("task_name", task_name, 'str'), + } + url = self._client.format_url(url, **path_format_arguments) + + # Construct parameters + query_parameters = {} # type: Dict[str, Any] + query_parameters['api-version'] = self._serialize.query("api_version", api_version, 'str') + if delete_running_tasks is not None: + query_parameters['deleteRunningTasks'] = self._serialize.query("delete_running_tasks", delete_running_tasks, 'bool') + + # Construct headers + header_parameters = {} # type: Dict[str, Any] + header_parameters['Accept'] = self._serialize.header("accept", accept, 'str') + + request = self._client.delete(url, query_parameters, header_parameters) + pipeline_response = await self._client._pipeline.run(request, stream=False, **kwargs) + response = pipeline_response.http_response + + if response.status_code not in [200, 204]: + map_error(status_code=response.status_code, response=response, error_map=error_map) + error = self._deserialize(models.ApiError, response) + raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) + + if cls: + return cls(pipeline_response, None, {}) + + delete.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{groupName}/providers/Microsoft.DataMigration/services/{serviceName}/serviceTasks/{taskName}'} # type: ignore + + async def update( + self, + group_name: str, + service_name: str, + task_name: str, + parameters: "models.ProjectTask", + **kwargs + ) -> "models.ProjectTask": + """Create or update service task. + + The service tasks resource is a nested, proxy-only resource representing work performed by a + DMS instance. The PATCH method updates an existing service task, but since service tasks have + no mutable custom properties, there is little reason to do so. + + :param group_name: Name of the resource group. + :type group_name: str + :param service_name: Name of the service. + :type service_name: str + :param task_name: Name of the Task. + :type task_name: str + :param parameters: Information about the task. + :type parameters: ~azure.mgmt.datamigration.models.ProjectTask + :keyword callable cls: A custom type or function that will be passed the direct response + :return: ProjectTask, or the result of cls(response) + :rtype: ~azure.mgmt.datamigration.models.ProjectTask + :raises: ~azure.core.exceptions.HttpResponseError + """ + cls = kwargs.pop('cls', None) # type: ClsType["models.ProjectTask"] + error_map = { + 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError + } + error_map.update(kwargs.pop('error_map', {})) + api_version = "2021-10-30-preview" + content_type = kwargs.pop("content_type", "application/json") + accept = "application/json" + + # Construct URL + url = self.update.metadata['url'] # type: ignore + path_format_arguments = { + 'subscriptionId': self._serialize.url("self._config.subscription_id", self._config.subscription_id, 'str'), + 'groupName': self._serialize.url("group_name", group_name, 'str'), + 'serviceName': self._serialize.url("service_name", service_name, 'str'), + 'taskName': self._serialize.url("task_name", task_name, 'str'), + } + url = self._client.format_url(url, **path_format_arguments) + + # Construct parameters + query_parameters = {} # type: Dict[str, Any] + query_parameters['api-version'] = self._serialize.query("api_version", api_version, 'str') + + # Construct headers + header_parameters = {} # type: Dict[str, Any] + header_parameters['Content-Type'] = self._serialize.header("content_type", content_type, 'str') + header_parameters['Accept'] = self._serialize.header("accept", accept, 'str') + + body_content_kwargs = {} # type: Dict[str, Any] + body_content = self._serialize.body(parameters, 'ProjectTask') + body_content_kwargs['content'] = body_content + request = self._client.patch(url, query_parameters, header_parameters, **body_content_kwargs) + pipeline_response = await self._client._pipeline.run(request, stream=False, **kwargs) + response = pipeline_response.http_response + + if response.status_code not in [200]: + map_error(status_code=response.status_code, response=response, error_map=error_map) + error = self._deserialize(models.ApiError, response) + raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) + + deserialized = self._deserialize('ProjectTask', pipeline_response) + + if cls: + return cls(pipeline_response, deserialized, {}) + + return deserialized + update.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{groupName}/providers/Microsoft.DataMigration/services/{serviceName}/serviceTasks/{taskName}'} # type: ignore + + async def cancel( + self, + group_name: str, + service_name: str, + task_name: str, + **kwargs + ) -> "models.ProjectTask": + """Cancel a service task. + + The service tasks resource is a nested, proxy-only resource representing work performed by a + DMS instance. This method cancels a service task if it's currently queued or running. + + :param group_name: Name of the resource group. + :type group_name: str + :param service_name: Name of the service. + :type service_name: str + :param task_name: Name of the Task. + :type task_name: str + :keyword callable cls: A custom type or function that will be passed the direct response + :return: ProjectTask, or the result of cls(response) + :rtype: ~azure.mgmt.datamigration.models.ProjectTask + :raises: ~azure.core.exceptions.HttpResponseError + """ + cls = kwargs.pop('cls', None) # type: ClsType["models.ProjectTask"] + error_map = { + 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError + } + error_map.update(kwargs.pop('error_map', {})) + api_version = "2021-10-30-preview" + accept = "application/json" + + # Construct URL + url = self.cancel.metadata['url'] # type: ignore + path_format_arguments = { + 'subscriptionId': self._serialize.url("self._config.subscription_id", self._config.subscription_id, 'str'), + 'groupName': self._serialize.url("group_name", group_name, 'str'), + 'serviceName': self._serialize.url("service_name", service_name, 'str'), + 'taskName': self._serialize.url("task_name", task_name, 'str'), + } + url = self._client.format_url(url, **path_format_arguments) + + # Construct parameters + query_parameters = {} # type: Dict[str, Any] + query_parameters['api-version'] = self._serialize.query("api_version", api_version, 'str') + + # Construct headers + header_parameters = {} # type: Dict[str, Any] + header_parameters['Accept'] = self._serialize.header("accept", accept, 'str') + + request = self._client.post(url, query_parameters, header_parameters) + pipeline_response = await self._client._pipeline.run(request, stream=False, **kwargs) + response = pipeline_response.http_response + + if response.status_code not in [200]: + map_error(status_code=response.status_code, response=response, error_map=error_map) + error = self._deserialize(models.ApiError, response) + raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) + + deserialized = self._deserialize('ProjectTask', pipeline_response) + + if cls: + return cls(pipeline_response, deserialized, {}) + + return deserialized + cancel.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{groupName}/providers/Microsoft.DataMigration/services/{serviceName}/serviceTasks/{taskName}/cancel'} # type: ignore diff --git a/src/datamigration/azext_datamigration/vendored_sdks/datamigration/aio/operations/_services_operations.py b/src/datamigration/azext_datamigration/vendored_sdks/datamigration/aio/operations/_services_operations.py new file mode 100644 index 00000000000..b9f18147a19 --- /dev/null +++ b/src/datamigration/azext_datamigration/vendored_sdks/datamigration/aio/operations/_services_operations.py @@ -0,0 +1,1140 @@ +# coding=utf-8 +# -------------------------------------------------------------------------- +# Copyright (c) Microsoft Corporation. All rights reserved. +# Licensed under the MIT License. See License.txt in the project root for license information. +# Code generated by Microsoft (R) AutoRest Code Generator. +# Changes may cause incorrect behavior and will be lost if the code is regenerated. +# -------------------------------------------------------------------------- +from typing import Any, AsyncIterable, Callable, Dict, Generic, Optional, TypeVar, Union +import warnings + +from azure.core.async_paging import AsyncItemPaged, AsyncList +from azure.core.exceptions import ClientAuthenticationError, HttpResponseError, ResourceExistsError, ResourceNotFoundError, map_error +from azure.core.pipeline import PipelineResponse +from azure.core.pipeline.transport import AsyncHttpResponse, HttpRequest +from azure.core.polling import AsyncLROPoller, AsyncNoPolling, AsyncPollingMethod +from azure.mgmt.core.exceptions import ARMErrorFormat +from azure.mgmt.core.polling.async_arm_polling import AsyncARMPolling + +from ... import models + +T = TypeVar('T') +ClsType = Optional[Callable[[PipelineResponse[HttpRequest, AsyncHttpResponse], T, Dict[str, Any]], Any]] + +class ServicesOperations: + """ServicesOperations async operations. + + You should not instantiate this class directly. Instead, you should create a Client instance that + instantiates it for you and attaches it as an attribute. + + :ivar models: Alias to model classes used in this operation group. + :type models: ~azure.mgmt.datamigration.models + :param client: Client for service requests. + :param config: Configuration of service client. + :param serializer: An object model serializer. + :param deserializer: An object model deserializer. + """ + + models = models + + def __init__(self, client, config, serializer, deserializer) -> None: + self._client = client + self._serialize = serializer + self._deserialize = deserializer + self._config = config + + async def _create_or_update_initial( + self, + group_name: str, + service_name: str, + parameters: "models.DataMigrationService", + **kwargs + ) -> Optional["models.DataMigrationService"]: + cls = kwargs.pop('cls', None) # type: ClsType[Optional["models.DataMigrationService"]] + error_map = { + 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError + } + error_map.update(kwargs.pop('error_map', {})) + api_version = "2021-10-30-preview" + content_type = kwargs.pop("content_type", "application/json") + accept = "application/json" + + # Construct URL + url = self._create_or_update_initial.metadata['url'] # type: ignore + path_format_arguments = { + 'subscriptionId': self._serialize.url("self._config.subscription_id", self._config.subscription_id, 'str'), + 'groupName': self._serialize.url("group_name", group_name, 'str'), + 'serviceName': self._serialize.url("service_name", service_name, 'str'), + } + url = self._client.format_url(url, **path_format_arguments) + + # Construct parameters + query_parameters = {} # type: Dict[str, Any] + query_parameters['api-version'] = self._serialize.query("api_version", api_version, 'str') + + # Construct headers + header_parameters = {} # type: Dict[str, Any] + header_parameters['Content-Type'] = self._serialize.header("content_type", content_type, 'str') + header_parameters['Accept'] = self._serialize.header("accept", accept, 'str') + + body_content_kwargs = {} # type: Dict[str, Any] + body_content = self._serialize.body(parameters, 'DataMigrationService') + body_content_kwargs['content'] = body_content + request = self._client.put(url, query_parameters, header_parameters, **body_content_kwargs) + pipeline_response = await self._client._pipeline.run(request, stream=False, **kwargs) + response = pipeline_response.http_response + + if response.status_code not in [200, 201, 202]: + map_error(status_code=response.status_code, response=response, error_map=error_map) + error = self._deserialize(models.ApiError, response) + raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) + + deserialized = None + if response.status_code == 200: + deserialized = self._deserialize('DataMigrationService', pipeline_response) + + if response.status_code == 201: + deserialized = self._deserialize('DataMigrationService', pipeline_response) + + if cls: + return cls(pipeline_response, deserialized, {}) + + return deserialized + _create_or_update_initial.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{groupName}/providers/Microsoft.DataMigration/services/{serviceName}'} # type: ignore + + async def begin_create_or_update( + self, + group_name: str, + service_name: str, + parameters: "models.DataMigrationService", + **kwargs + ) -> AsyncLROPoller["models.DataMigrationService"]: + """Create or update DMS Instance. + + The services resource is the top-level resource that represents the Database Migration Service. + The PUT method creates a new service or updates an existing one. When a service is updated, + existing child resources (i.e. tasks) are unaffected. Services currently support a single kind, + "vm", which refers to a VM-based service, although other kinds may be added in the future. This + method can change the kind, SKU, and network of the service, but if tasks are currently running + (i.e. the service is busy), this will fail with 400 Bad Request ("ServiceIsBusy"). The provider + will reply when successful with 200 OK or 201 Created. Long-running operations use the + provisioningState property. + + :param group_name: Name of the resource group. + :type group_name: str + :param service_name: Name of the service. + :type service_name: str + :param parameters: Information about the service. + :type parameters: ~azure.mgmt.datamigration.models.DataMigrationService + :keyword callable cls: A custom type or function that will be passed the direct response + :keyword str continuation_token: A continuation token to restart a poller from a saved state. + :keyword polling: True for ARMPolling, False for no polling, or a + polling object for personal polling strategy + :paramtype polling: bool or ~azure.core.polling.AsyncPollingMethod + :keyword int polling_interval: Default waiting time between two polls for LRO operations if no Retry-After header is present. + :return: An instance of AsyncLROPoller that returns either DataMigrationService or the result of cls(response) + :rtype: ~azure.core.polling.AsyncLROPoller[~azure.mgmt.datamigration.models.DataMigrationService] + :raises ~azure.core.exceptions.HttpResponseError: + """ + polling = kwargs.pop('polling', True) # type: Union[bool, AsyncPollingMethod] + cls = kwargs.pop('cls', None) # type: ClsType["models.DataMigrationService"] + lro_delay = kwargs.pop( + 'polling_interval', + self._config.polling_interval + ) + cont_token = kwargs.pop('continuation_token', None) # type: Optional[str] + if cont_token is None: + raw_result = await self._create_or_update_initial( + group_name=group_name, + service_name=service_name, + parameters=parameters, + cls=lambda x,y,z: x, + **kwargs + ) + + kwargs.pop('error_map', None) + kwargs.pop('content_type', None) + + def get_long_running_output(pipeline_response): + deserialized = self._deserialize('DataMigrationService', pipeline_response) + + if cls: + return cls(pipeline_response, deserialized, {}) + return deserialized + + path_format_arguments = { + 'subscriptionId': self._serialize.url("self._config.subscription_id", self._config.subscription_id, 'str'), + 'groupName': self._serialize.url("group_name", group_name, 'str'), + 'serviceName': self._serialize.url("service_name", service_name, 'str'), + } + + if polling is True: polling_method = AsyncARMPolling(lro_delay, path_format_arguments=path_format_arguments, **kwargs) + elif polling is False: polling_method = AsyncNoPolling() + else: polling_method = polling + if cont_token: + return AsyncLROPoller.from_continuation_token( + polling_method=polling_method, + continuation_token=cont_token, + client=self._client, + deserialization_callback=get_long_running_output + ) + else: + return AsyncLROPoller(self._client, raw_result, get_long_running_output, polling_method) + begin_create_or_update.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{groupName}/providers/Microsoft.DataMigration/services/{serviceName}'} # type: ignore + + async def get( + self, + group_name: str, + service_name: str, + **kwargs + ) -> "models.DataMigrationService": + """Get DMS Service Instance. + + The services resource is the top-level resource that represents the Database Migration Service. + The GET method retrieves information about a service instance. + + :param group_name: Name of the resource group. + :type group_name: str + :param service_name: Name of the service. + :type service_name: str + :keyword callable cls: A custom type or function that will be passed the direct response + :return: DataMigrationService, or the result of cls(response) + :rtype: ~azure.mgmt.datamigration.models.DataMigrationService + :raises: ~azure.core.exceptions.HttpResponseError + """ + cls = kwargs.pop('cls', None) # type: ClsType["models.DataMigrationService"] + error_map = { + 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError + } + error_map.update(kwargs.pop('error_map', {})) + api_version = "2021-10-30-preview" + accept = "application/json" + + # Construct URL + url = self.get.metadata['url'] # type: ignore + path_format_arguments = { + 'subscriptionId': self._serialize.url("self._config.subscription_id", self._config.subscription_id, 'str'), + 'groupName': self._serialize.url("group_name", group_name, 'str'), + 'serviceName': self._serialize.url("service_name", service_name, 'str'), + } + url = self._client.format_url(url, **path_format_arguments) + + # Construct parameters + query_parameters = {} # type: Dict[str, Any] + query_parameters['api-version'] = self._serialize.query("api_version", api_version, 'str') + + # Construct headers + header_parameters = {} # type: Dict[str, Any] + header_parameters['Accept'] = self._serialize.header("accept", accept, 'str') + + request = self._client.get(url, query_parameters, header_parameters) + pipeline_response = await self._client._pipeline.run(request, stream=False, **kwargs) + response = pipeline_response.http_response + + if response.status_code not in [200]: + map_error(status_code=response.status_code, response=response, error_map=error_map) + error = self._deserialize(models.ApiError, response) + raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) + + deserialized = self._deserialize('DataMigrationService', pipeline_response) + + if cls: + return cls(pipeline_response, deserialized, {}) + + return deserialized + get.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{groupName}/providers/Microsoft.DataMigration/services/{serviceName}'} # type: ignore + + async def _delete_initial( + self, + group_name: str, + service_name: str, + delete_running_tasks: Optional[bool] = None, + **kwargs + ) -> None: + cls = kwargs.pop('cls', None) # type: ClsType[None] + error_map = { + 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError + } + error_map.update(kwargs.pop('error_map', {})) + api_version = "2021-10-30-preview" + accept = "application/json" + + # Construct URL + url = self._delete_initial.metadata['url'] # type: ignore + path_format_arguments = { + 'subscriptionId': self._serialize.url("self._config.subscription_id", self._config.subscription_id, 'str'), + 'groupName': self._serialize.url("group_name", group_name, 'str'), + 'serviceName': self._serialize.url("service_name", service_name, 'str'), + } + url = self._client.format_url(url, **path_format_arguments) + + # Construct parameters + query_parameters = {} # type: Dict[str, Any] + query_parameters['api-version'] = self._serialize.query("api_version", api_version, 'str') + if delete_running_tasks is not None: + query_parameters['deleteRunningTasks'] = self._serialize.query("delete_running_tasks", delete_running_tasks, 'bool') + + # Construct headers + header_parameters = {} # type: Dict[str, Any] + header_parameters['Accept'] = self._serialize.header("accept", accept, 'str') + + request = self._client.delete(url, query_parameters, header_parameters) + pipeline_response = await self._client._pipeline.run(request, stream=False, **kwargs) + response = pipeline_response.http_response + + if response.status_code not in [200, 202, 204]: + map_error(status_code=response.status_code, response=response, error_map=error_map) + error = self._deserialize(models.ApiError, response) + raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) + + if cls: + return cls(pipeline_response, None, {}) + + _delete_initial.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{groupName}/providers/Microsoft.DataMigration/services/{serviceName}'} # type: ignore + + async def begin_delete( + self, + group_name: str, + service_name: str, + delete_running_tasks: Optional[bool] = None, + **kwargs + ) -> AsyncLROPoller[None]: + """Delete DMS Service Instance. + + The services resource is the top-level resource that represents the Database Migration Service. + The DELETE method deletes a service. Any running tasks will be canceled. + + :param group_name: Name of the resource group. + :type group_name: str + :param service_name: Name of the service. + :type service_name: str + :param delete_running_tasks: Delete the resource even if it contains running tasks. + :type delete_running_tasks: bool + :keyword callable cls: A custom type or function that will be passed the direct response + :keyword str continuation_token: A continuation token to restart a poller from a saved state. + :keyword polling: True for ARMPolling, False for no polling, or a + polling object for personal polling strategy + :paramtype polling: bool or ~azure.core.polling.AsyncPollingMethod + :keyword int polling_interval: Default waiting time between two polls for LRO operations if no Retry-After header is present. + :return: An instance of AsyncLROPoller that returns either None or the result of cls(response) + :rtype: ~azure.core.polling.AsyncLROPoller[None] + :raises ~azure.core.exceptions.HttpResponseError: + """ + polling = kwargs.pop('polling', True) # type: Union[bool, AsyncPollingMethod] + cls = kwargs.pop('cls', None) # type: ClsType[None] + lro_delay = kwargs.pop( + 'polling_interval', + self._config.polling_interval + ) + cont_token = kwargs.pop('continuation_token', None) # type: Optional[str] + if cont_token is None: + raw_result = await self._delete_initial( + group_name=group_name, + service_name=service_name, + delete_running_tasks=delete_running_tasks, + cls=lambda x,y,z: x, + **kwargs + ) + + kwargs.pop('error_map', None) + kwargs.pop('content_type', None) + + def get_long_running_output(pipeline_response): + if cls: + return cls(pipeline_response, None, {}) + + path_format_arguments = { + 'subscriptionId': self._serialize.url("self._config.subscription_id", self._config.subscription_id, 'str'), + 'groupName': self._serialize.url("group_name", group_name, 'str'), + 'serviceName': self._serialize.url("service_name", service_name, 'str'), + } + + if polling is True: polling_method = AsyncARMPolling(lro_delay, path_format_arguments=path_format_arguments, **kwargs) + elif polling is False: polling_method = AsyncNoPolling() + else: polling_method = polling + if cont_token: + return AsyncLROPoller.from_continuation_token( + polling_method=polling_method, + continuation_token=cont_token, + client=self._client, + deserialization_callback=get_long_running_output + ) + else: + return AsyncLROPoller(self._client, raw_result, get_long_running_output, polling_method) + begin_delete.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{groupName}/providers/Microsoft.DataMigration/services/{serviceName}'} # type: ignore + + async def _update_initial( + self, + group_name: str, + service_name: str, + parameters: "models.DataMigrationService", + **kwargs + ) -> Optional["models.DataMigrationService"]: + cls = kwargs.pop('cls', None) # type: ClsType[Optional["models.DataMigrationService"]] + error_map = { + 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError + } + error_map.update(kwargs.pop('error_map', {})) + api_version = "2021-10-30-preview" + content_type = kwargs.pop("content_type", "application/json") + accept = "application/json" + + # Construct URL + url = self._update_initial.metadata['url'] # type: ignore + path_format_arguments = { + 'subscriptionId': self._serialize.url("self._config.subscription_id", self._config.subscription_id, 'str'), + 'groupName': self._serialize.url("group_name", group_name, 'str'), + 'serviceName': self._serialize.url("service_name", service_name, 'str'), + } + url = self._client.format_url(url, **path_format_arguments) + + # Construct parameters + query_parameters = {} # type: Dict[str, Any] + query_parameters['api-version'] = self._serialize.query("api_version", api_version, 'str') + + # Construct headers + header_parameters = {} # type: Dict[str, Any] + header_parameters['Content-Type'] = self._serialize.header("content_type", content_type, 'str') + header_parameters['Accept'] = self._serialize.header("accept", accept, 'str') + + body_content_kwargs = {} # type: Dict[str, Any] + body_content = self._serialize.body(parameters, 'DataMigrationService') + body_content_kwargs['content'] = body_content + request = self._client.patch(url, query_parameters, header_parameters, **body_content_kwargs) + pipeline_response = await self._client._pipeline.run(request, stream=False, **kwargs) + response = pipeline_response.http_response + + if response.status_code not in [200, 202]: + map_error(status_code=response.status_code, response=response, error_map=error_map) + error = self._deserialize(models.ApiError, response) + raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) + + deserialized = None + if response.status_code == 200: + deserialized = self._deserialize('DataMigrationService', pipeline_response) + + if cls: + return cls(pipeline_response, deserialized, {}) + + return deserialized + _update_initial.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{groupName}/providers/Microsoft.DataMigration/services/{serviceName}'} # type: ignore + + async def begin_update( + self, + group_name: str, + service_name: str, + parameters: "models.DataMigrationService", + **kwargs + ) -> AsyncLROPoller["models.DataMigrationService"]: + """Create or update DMS Service Instance. + + The services resource is the top-level resource that represents the Database Migration Service. + The PATCH method updates an existing service. This method can change the kind, SKU, and network + of the service, but if tasks are currently running (i.e. the service is busy), this will fail + with 400 Bad Request ("ServiceIsBusy"). + + :param group_name: Name of the resource group. + :type group_name: str + :param service_name: Name of the service. + :type service_name: str + :param parameters: Information about the service. + :type parameters: ~azure.mgmt.datamigration.models.DataMigrationService + :keyword callable cls: A custom type or function that will be passed the direct response + :keyword str continuation_token: A continuation token to restart a poller from a saved state. + :keyword polling: True for ARMPolling, False for no polling, or a + polling object for personal polling strategy + :paramtype polling: bool or ~azure.core.polling.AsyncPollingMethod + :keyword int polling_interval: Default waiting time between two polls for LRO operations if no Retry-After header is present. + :return: An instance of AsyncLROPoller that returns either DataMigrationService or the result of cls(response) + :rtype: ~azure.core.polling.AsyncLROPoller[~azure.mgmt.datamigration.models.DataMigrationService] + :raises ~azure.core.exceptions.HttpResponseError: + """ + polling = kwargs.pop('polling', True) # type: Union[bool, AsyncPollingMethod] + cls = kwargs.pop('cls', None) # type: ClsType["models.DataMigrationService"] + lro_delay = kwargs.pop( + 'polling_interval', + self._config.polling_interval + ) + cont_token = kwargs.pop('continuation_token', None) # type: Optional[str] + if cont_token is None: + raw_result = await self._update_initial( + group_name=group_name, + service_name=service_name, + parameters=parameters, + cls=lambda x,y,z: x, + **kwargs + ) + + kwargs.pop('error_map', None) + kwargs.pop('content_type', None) + + def get_long_running_output(pipeline_response): + deserialized = self._deserialize('DataMigrationService', pipeline_response) + + if cls: + return cls(pipeline_response, deserialized, {}) + return deserialized + + path_format_arguments = { + 'subscriptionId': self._serialize.url("self._config.subscription_id", self._config.subscription_id, 'str'), + 'groupName': self._serialize.url("group_name", group_name, 'str'), + 'serviceName': self._serialize.url("service_name", service_name, 'str'), + } + + if polling is True: polling_method = AsyncARMPolling(lro_delay, path_format_arguments=path_format_arguments, **kwargs) + elif polling is False: polling_method = AsyncNoPolling() + else: polling_method = polling + if cont_token: + return AsyncLROPoller.from_continuation_token( + polling_method=polling_method, + continuation_token=cont_token, + client=self._client, + deserialization_callback=get_long_running_output + ) + else: + return AsyncLROPoller(self._client, raw_result, get_long_running_output, polling_method) + begin_update.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{groupName}/providers/Microsoft.DataMigration/services/{serviceName}'} # type: ignore + + async def check_status( + self, + group_name: str, + service_name: str, + **kwargs + ) -> "models.DataMigrationServiceStatusResponse": + """Check service health status. + + The services resource is the top-level resource that represents the Database Migration Service. + This action performs a health check and returns the status of the service and virtual machine + size. + + :param group_name: Name of the resource group. + :type group_name: str + :param service_name: Name of the service. + :type service_name: str + :keyword callable cls: A custom type or function that will be passed the direct response + :return: DataMigrationServiceStatusResponse, or the result of cls(response) + :rtype: ~azure.mgmt.datamigration.models.DataMigrationServiceStatusResponse + :raises: ~azure.core.exceptions.HttpResponseError + """ + cls = kwargs.pop('cls', None) # type: ClsType["models.DataMigrationServiceStatusResponse"] + error_map = { + 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError + } + error_map.update(kwargs.pop('error_map', {})) + api_version = "2021-10-30-preview" + accept = "application/json" + + # Construct URL + url = self.check_status.metadata['url'] # type: ignore + path_format_arguments = { + 'subscriptionId': self._serialize.url("self._config.subscription_id", self._config.subscription_id, 'str'), + 'groupName': self._serialize.url("group_name", group_name, 'str'), + 'serviceName': self._serialize.url("service_name", service_name, 'str'), + } + url = self._client.format_url(url, **path_format_arguments) + + # Construct parameters + query_parameters = {} # type: Dict[str, Any] + query_parameters['api-version'] = self._serialize.query("api_version", api_version, 'str') + + # Construct headers + header_parameters = {} # type: Dict[str, Any] + header_parameters['Accept'] = self._serialize.header("accept", accept, 'str') + + request = self._client.post(url, query_parameters, header_parameters) + pipeline_response = await self._client._pipeline.run(request, stream=False, **kwargs) + response = pipeline_response.http_response + + if response.status_code not in [200]: + map_error(status_code=response.status_code, response=response, error_map=error_map) + error = self._deserialize(models.ApiError, response) + raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) + + deserialized = self._deserialize('DataMigrationServiceStatusResponse', pipeline_response) + + if cls: + return cls(pipeline_response, deserialized, {}) + + return deserialized + check_status.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{groupName}/providers/Microsoft.DataMigration/services/{serviceName}/checkStatus'} # type: ignore + + async def _start_initial( + self, + group_name: str, + service_name: str, + **kwargs + ) -> None: + cls = kwargs.pop('cls', None) # type: ClsType[None] + error_map = { + 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError + } + error_map.update(kwargs.pop('error_map', {})) + api_version = "2021-10-30-preview" + accept = "application/json" + + # Construct URL + url = self._start_initial.metadata['url'] # type: ignore + path_format_arguments = { + 'subscriptionId': self._serialize.url("self._config.subscription_id", self._config.subscription_id, 'str'), + 'groupName': self._serialize.url("group_name", group_name, 'str'), + 'serviceName': self._serialize.url("service_name", service_name, 'str'), + } + url = self._client.format_url(url, **path_format_arguments) + + # Construct parameters + query_parameters = {} # type: Dict[str, Any] + query_parameters['api-version'] = self._serialize.query("api_version", api_version, 'str') + + # Construct headers + header_parameters = {} # type: Dict[str, Any] + header_parameters['Accept'] = self._serialize.header("accept", accept, 'str') + + request = self._client.post(url, query_parameters, header_parameters) + pipeline_response = await self._client._pipeline.run(request, stream=False, **kwargs) + response = pipeline_response.http_response + + if response.status_code not in [200, 202]: + map_error(status_code=response.status_code, response=response, error_map=error_map) + error = self._deserialize(models.ApiError, response) + raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) + + if cls: + return cls(pipeline_response, None, {}) + + _start_initial.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{groupName}/providers/Microsoft.DataMigration/services/{serviceName}/start'} # type: ignore + + async def begin_start( + self, + group_name: str, + service_name: str, + **kwargs + ) -> AsyncLROPoller[None]: + """Start service. + + The services resource is the top-level resource that represents the Database Migration Service. + This action starts the service and the service can be used for data migration. + + :param group_name: Name of the resource group. + :type group_name: str + :param service_name: Name of the service. + :type service_name: str + :keyword callable cls: A custom type or function that will be passed the direct response + :keyword str continuation_token: A continuation token to restart a poller from a saved state. + :keyword polling: True for ARMPolling, False for no polling, or a + polling object for personal polling strategy + :paramtype polling: bool or ~azure.core.polling.AsyncPollingMethod + :keyword int polling_interval: Default waiting time between two polls for LRO operations if no Retry-After header is present. + :return: An instance of AsyncLROPoller that returns either None or the result of cls(response) + :rtype: ~azure.core.polling.AsyncLROPoller[None] + :raises ~azure.core.exceptions.HttpResponseError: + """ + polling = kwargs.pop('polling', True) # type: Union[bool, AsyncPollingMethod] + cls = kwargs.pop('cls', None) # type: ClsType[None] + lro_delay = kwargs.pop( + 'polling_interval', + self._config.polling_interval + ) + cont_token = kwargs.pop('continuation_token', None) # type: Optional[str] + if cont_token is None: + raw_result = await self._start_initial( + group_name=group_name, + service_name=service_name, + cls=lambda x,y,z: x, + **kwargs + ) + + kwargs.pop('error_map', None) + kwargs.pop('content_type', None) + + def get_long_running_output(pipeline_response): + if cls: + return cls(pipeline_response, None, {}) + + path_format_arguments = { + 'subscriptionId': self._serialize.url("self._config.subscription_id", self._config.subscription_id, 'str'), + 'groupName': self._serialize.url("group_name", group_name, 'str'), + 'serviceName': self._serialize.url("service_name", service_name, 'str'), + } + + if polling is True: polling_method = AsyncARMPolling(lro_delay, path_format_arguments=path_format_arguments, **kwargs) + elif polling is False: polling_method = AsyncNoPolling() + else: polling_method = polling + if cont_token: + return AsyncLROPoller.from_continuation_token( + polling_method=polling_method, + continuation_token=cont_token, + client=self._client, + deserialization_callback=get_long_running_output + ) + else: + return AsyncLROPoller(self._client, raw_result, get_long_running_output, polling_method) + begin_start.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{groupName}/providers/Microsoft.DataMigration/services/{serviceName}/start'} # type: ignore + + async def _stop_initial( + self, + group_name: str, + service_name: str, + **kwargs + ) -> None: + cls = kwargs.pop('cls', None) # type: ClsType[None] + error_map = { + 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError + } + error_map.update(kwargs.pop('error_map', {})) + api_version = "2021-10-30-preview" + accept = "application/json" + + # Construct URL + url = self._stop_initial.metadata['url'] # type: ignore + path_format_arguments = { + 'subscriptionId': self._serialize.url("self._config.subscription_id", self._config.subscription_id, 'str'), + 'groupName': self._serialize.url("group_name", group_name, 'str'), + 'serviceName': self._serialize.url("service_name", service_name, 'str'), + } + url = self._client.format_url(url, **path_format_arguments) + + # Construct parameters + query_parameters = {} # type: Dict[str, Any] + query_parameters['api-version'] = self._serialize.query("api_version", api_version, 'str') + + # Construct headers + header_parameters = {} # type: Dict[str, Any] + header_parameters['Accept'] = self._serialize.header("accept", accept, 'str') + + request = self._client.post(url, query_parameters, header_parameters) + pipeline_response = await self._client._pipeline.run(request, stream=False, **kwargs) + response = pipeline_response.http_response + + if response.status_code not in [200, 202]: + map_error(status_code=response.status_code, response=response, error_map=error_map) + error = self._deserialize(models.ApiError, response) + raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) + + if cls: + return cls(pipeline_response, None, {}) + + _stop_initial.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{groupName}/providers/Microsoft.DataMigration/services/{serviceName}/stop'} # type: ignore + + async def begin_stop( + self, + group_name: str, + service_name: str, + **kwargs + ) -> AsyncLROPoller[None]: + """Stop service. + + The services resource is the top-level resource that represents the Database Migration Service. + This action stops the service and the service cannot be used for data migration. The service + owner won't be billed when the service is stopped. + + :param group_name: Name of the resource group. + :type group_name: str + :param service_name: Name of the service. + :type service_name: str + :keyword callable cls: A custom type or function that will be passed the direct response + :keyword str continuation_token: A continuation token to restart a poller from a saved state. + :keyword polling: True for ARMPolling, False for no polling, or a + polling object for personal polling strategy + :paramtype polling: bool or ~azure.core.polling.AsyncPollingMethod + :keyword int polling_interval: Default waiting time between two polls for LRO operations if no Retry-After header is present. + :return: An instance of AsyncLROPoller that returns either None or the result of cls(response) + :rtype: ~azure.core.polling.AsyncLROPoller[None] + :raises ~azure.core.exceptions.HttpResponseError: + """ + polling = kwargs.pop('polling', True) # type: Union[bool, AsyncPollingMethod] + cls = kwargs.pop('cls', None) # type: ClsType[None] + lro_delay = kwargs.pop( + 'polling_interval', + self._config.polling_interval + ) + cont_token = kwargs.pop('continuation_token', None) # type: Optional[str] + if cont_token is None: + raw_result = await self._stop_initial( + group_name=group_name, + service_name=service_name, + cls=lambda x,y,z: x, + **kwargs + ) + + kwargs.pop('error_map', None) + kwargs.pop('content_type', None) + + def get_long_running_output(pipeline_response): + if cls: + return cls(pipeline_response, None, {}) + + path_format_arguments = { + 'subscriptionId': self._serialize.url("self._config.subscription_id", self._config.subscription_id, 'str'), + 'groupName': self._serialize.url("group_name", group_name, 'str'), + 'serviceName': self._serialize.url("service_name", service_name, 'str'), + } + + if polling is True: polling_method = AsyncARMPolling(lro_delay, path_format_arguments=path_format_arguments, **kwargs) + elif polling is False: polling_method = AsyncNoPolling() + else: polling_method = polling + if cont_token: + return AsyncLROPoller.from_continuation_token( + polling_method=polling_method, + continuation_token=cont_token, + client=self._client, + deserialization_callback=get_long_running_output + ) + else: + return AsyncLROPoller(self._client, raw_result, get_long_running_output, polling_method) + begin_stop.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{groupName}/providers/Microsoft.DataMigration/services/{serviceName}/stop'} # type: ignore + + def list_skus( + self, + group_name: str, + service_name: str, + **kwargs + ) -> AsyncIterable["models.ServiceSkuList"]: + """Get compatible SKUs. + + The services resource is the top-level resource that represents the Database Migration Service. + The skus action returns the list of SKUs that a service resource can be updated to. + + :param group_name: Name of the resource group. + :type group_name: str + :param service_name: Name of the service. + :type service_name: str + :keyword callable cls: A custom type or function that will be passed the direct response + :return: An iterator like instance of either ServiceSkuList or the result of cls(response) + :rtype: ~azure.core.async_paging.AsyncItemPaged[~azure.mgmt.datamigration.models.ServiceSkuList] + :raises: ~azure.core.exceptions.HttpResponseError + """ + cls = kwargs.pop('cls', None) # type: ClsType["models.ServiceSkuList"] + error_map = { + 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError + } + error_map.update(kwargs.pop('error_map', {})) + api_version = "2021-10-30-preview" + accept = "application/json" + + def prepare_request(next_link=None): + # Construct headers + header_parameters = {} # type: Dict[str, Any] + header_parameters['Accept'] = self._serialize.header("accept", accept, 'str') + + if not next_link: + # Construct URL + url = self.list_skus.metadata['url'] # type: ignore + path_format_arguments = { + 'subscriptionId': self._serialize.url("self._config.subscription_id", self._config.subscription_id, 'str'), + 'groupName': self._serialize.url("group_name", group_name, 'str'), + 'serviceName': self._serialize.url("service_name", service_name, 'str'), + } + url = self._client.format_url(url, **path_format_arguments) + # Construct parameters + query_parameters = {} # type: Dict[str, Any] + query_parameters['api-version'] = self._serialize.query("api_version", api_version, 'str') + + request = self._client.get(url, query_parameters, header_parameters) + else: + url = next_link + query_parameters = {} # type: Dict[str, Any] + request = self._client.get(url, query_parameters, header_parameters) + return request + + async def extract_data(pipeline_response): + deserialized = self._deserialize('ServiceSkuList', pipeline_response) + list_of_elem = deserialized.value + if cls: + list_of_elem = cls(list_of_elem) + return deserialized.next_link or None, AsyncList(list_of_elem) + + async def get_next(next_link=None): + request = prepare_request(next_link) + + pipeline_response = await self._client._pipeline.run(request, stream=False, **kwargs) + response = pipeline_response.http_response + + if response.status_code not in [200]: + error = self._deserialize(models.ApiError, response) + map_error(status_code=response.status_code, response=response, error_map=error_map) + raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) + + return pipeline_response + + return AsyncItemPaged( + get_next, extract_data + ) + list_skus.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{groupName}/providers/Microsoft.DataMigration/services/{serviceName}/skus'} # type: ignore + + async def check_children_name_availability( + self, + group_name: str, + service_name: str, + parameters: "models.NameAvailabilityRequest", + **kwargs + ) -> "models.NameAvailabilityResponse": + """Check nested resource name validity and availability. + + This method checks whether a proposed nested resource name is valid and available. + + :param group_name: Name of the resource group. + :type group_name: str + :param service_name: Name of the service. + :type service_name: str + :param parameters: Requested name to validate. + :type parameters: ~azure.mgmt.datamigration.models.NameAvailabilityRequest + :keyword callable cls: A custom type or function that will be passed the direct response + :return: NameAvailabilityResponse, or the result of cls(response) + :rtype: ~azure.mgmt.datamigration.models.NameAvailabilityResponse + :raises: ~azure.core.exceptions.HttpResponseError + """ + cls = kwargs.pop('cls', None) # type: ClsType["models.NameAvailabilityResponse"] + error_map = { + 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError + } + error_map.update(kwargs.pop('error_map', {})) + api_version = "2021-10-30-preview" + content_type = kwargs.pop("content_type", "application/json") + accept = "application/json" + + # Construct URL + url = self.check_children_name_availability.metadata['url'] # type: ignore + path_format_arguments = { + 'subscriptionId': self._serialize.url("self._config.subscription_id", self._config.subscription_id, 'str'), + 'groupName': self._serialize.url("group_name", group_name, 'str'), + 'serviceName': self._serialize.url("service_name", service_name, 'str'), + } + url = self._client.format_url(url, **path_format_arguments) + + # Construct parameters + query_parameters = {} # type: Dict[str, Any] + query_parameters['api-version'] = self._serialize.query("api_version", api_version, 'str') + + # Construct headers + header_parameters = {} # type: Dict[str, Any] + header_parameters['Content-Type'] = self._serialize.header("content_type", content_type, 'str') + header_parameters['Accept'] = self._serialize.header("accept", accept, 'str') + + body_content_kwargs = {} # type: Dict[str, Any] + body_content = self._serialize.body(parameters, 'NameAvailabilityRequest') + body_content_kwargs['content'] = body_content + request = self._client.post(url, query_parameters, header_parameters, **body_content_kwargs) + pipeline_response = await self._client._pipeline.run(request, stream=False, **kwargs) + response = pipeline_response.http_response + + if response.status_code not in [200]: + map_error(status_code=response.status_code, response=response, error_map=error_map) + error = self._deserialize(models.ApiError, response) + raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) + + deserialized = self._deserialize('NameAvailabilityResponse', pipeline_response) + + if cls: + return cls(pipeline_response, deserialized, {}) + + return deserialized + check_children_name_availability.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{groupName}/providers/Microsoft.DataMigration/services/{serviceName}/checkNameAvailability'} # type: ignore + + def list_by_resource_group( + self, + group_name: str, + **kwargs + ) -> AsyncIterable["models.DataMigrationServiceList"]: + """Get services in resource group. + + The Services resource is the top-level resource that represents the Database Migration Service. + This method returns a list of service resources in a resource group. + + :param group_name: Name of the resource group. + :type group_name: str + :keyword callable cls: A custom type or function that will be passed the direct response + :return: An iterator like instance of either DataMigrationServiceList or the result of cls(response) + :rtype: ~azure.core.async_paging.AsyncItemPaged[~azure.mgmt.datamigration.models.DataMigrationServiceList] + :raises: ~azure.core.exceptions.HttpResponseError + """ + cls = kwargs.pop('cls', None) # type: ClsType["models.DataMigrationServiceList"] + error_map = { + 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError + } + error_map.update(kwargs.pop('error_map', {})) + api_version = "2021-10-30-preview" + accept = "application/json" + + def prepare_request(next_link=None): + # Construct headers + header_parameters = {} # type: Dict[str, Any] + header_parameters['Accept'] = self._serialize.header("accept", accept, 'str') + + if not next_link: + # Construct URL + url = self.list_by_resource_group.metadata['url'] # type: ignore + path_format_arguments = { + 'subscriptionId': self._serialize.url("self._config.subscription_id", self._config.subscription_id, 'str'), + 'groupName': self._serialize.url("group_name", group_name, 'str'), + } + url = self._client.format_url(url, **path_format_arguments) + # Construct parameters + query_parameters = {} # type: Dict[str, Any] + query_parameters['api-version'] = self._serialize.query("api_version", api_version, 'str') + + request = self._client.get(url, query_parameters, header_parameters) + else: + url = next_link + query_parameters = {} # type: Dict[str, Any] + request = self._client.get(url, query_parameters, header_parameters) + return request + + async def extract_data(pipeline_response): + deserialized = self._deserialize('DataMigrationServiceList', pipeline_response) + list_of_elem = deserialized.value + if cls: + list_of_elem = cls(list_of_elem) + return deserialized.next_link or None, AsyncList(list_of_elem) + + async def get_next(next_link=None): + request = prepare_request(next_link) + + pipeline_response = await self._client._pipeline.run(request, stream=False, **kwargs) + response = pipeline_response.http_response + + if response.status_code not in [200]: + error = self._deserialize(models.ApiError, response) + map_error(status_code=response.status_code, response=response, error_map=error_map) + raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) + + return pipeline_response + + return AsyncItemPaged( + get_next, extract_data + ) + list_by_resource_group.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{groupName}/providers/Microsoft.DataMigration/services'} # type: ignore + + def list( + self, + **kwargs + ) -> AsyncIterable["models.DataMigrationServiceList"]: + """Get services in subscription. + + The services resource is the top-level resource that represents the Database Migration Service. + This method returns a list of service resources in a subscription. + + :keyword callable cls: A custom type or function that will be passed the direct response + :return: An iterator like instance of either DataMigrationServiceList or the result of cls(response) + :rtype: ~azure.core.async_paging.AsyncItemPaged[~azure.mgmt.datamigration.models.DataMigrationServiceList] + :raises: ~azure.core.exceptions.HttpResponseError + """ + cls = kwargs.pop('cls', None) # type: ClsType["models.DataMigrationServiceList"] + error_map = { + 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError + } + error_map.update(kwargs.pop('error_map', {})) + api_version = "2021-10-30-preview" + accept = "application/json" + + def prepare_request(next_link=None): + # Construct headers + header_parameters = {} # type: Dict[str, Any] + header_parameters['Accept'] = self._serialize.header("accept", accept, 'str') + + if not next_link: + # Construct URL + url = self.list.metadata['url'] # type: ignore + path_format_arguments = { + 'subscriptionId': self._serialize.url("self._config.subscription_id", self._config.subscription_id, 'str'), + } + url = self._client.format_url(url, **path_format_arguments) + # Construct parameters + query_parameters = {} # type: Dict[str, Any] + query_parameters['api-version'] = self._serialize.query("api_version", api_version, 'str') + + request = self._client.get(url, query_parameters, header_parameters) + else: + url = next_link + query_parameters = {} # type: Dict[str, Any] + request = self._client.get(url, query_parameters, header_parameters) + return request + + async def extract_data(pipeline_response): + deserialized = self._deserialize('DataMigrationServiceList', pipeline_response) + list_of_elem = deserialized.value + if cls: + list_of_elem = cls(list_of_elem) + return deserialized.next_link or None, AsyncList(list_of_elem) + + async def get_next(next_link=None): + request = prepare_request(next_link) + + pipeline_response = await self._client._pipeline.run(request, stream=False, **kwargs) + response = pipeline_response.http_response + + if response.status_code not in [200]: + error = self._deserialize(models.ApiError, response) + map_error(status_code=response.status_code, response=response, error_map=error_map) + raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) + + return pipeline_response + + return AsyncItemPaged( + get_next, extract_data + ) + list.metadata = {'url': '/subscriptions/{subscriptionId}/providers/Microsoft.DataMigration/services'} # type: ignore + + async def check_name_availability( + self, + location: str, + parameters: "models.NameAvailabilityRequest", + **kwargs + ) -> "models.NameAvailabilityResponse": + """Check name validity and availability. + + This method checks whether a proposed top-level resource name is valid and available. + + :param location: The Azure region of the operation. + :type location: str + :param parameters: Requested name to validate. + :type parameters: ~azure.mgmt.datamigration.models.NameAvailabilityRequest + :keyword callable cls: A custom type or function that will be passed the direct response + :return: NameAvailabilityResponse, or the result of cls(response) + :rtype: ~azure.mgmt.datamigration.models.NameAvailabilityResponse + :raises: ~azure.core.exceptions.HttpResponseError + """ + cls = kwargs.pop('cls', None) # type: ClsType["models.NameAvailabilityResponse"] + error_map = { + 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError + } + error_map.update(kwargs.pop('error_map', {})) + api_version = "2021-10-30-preview" + content_type = kwargs.pop("content_type", "application/json") + accept = "application/json" + + # Construct URL + url = self.check_name_availability.metadata['url'] # type: ignore + path_format_arguments = { + 'subscriptionId': self._serialize.url("self._config.subscription_id", self._config.subscription_id, 'str'), + 'location': self._serialize.url("location", location, 'str'), + } + url = self._client.format_url(url, **path_format_arguments) + + # Construct parameters + query_parameters = {} # type: Dict[str, Any] + query_parameters['api-version'] = self._serialize.query("api_version", api_version, 'str') + + # Construct headers + header_parameters = {} # type: Dict[str, Any] + header_parameters['Content-Type'] = self._serialize.header("content_type", content_type, 'str') + header_parameters['Accept'] = self._serialize.header("accept", accept, 'str') + + body_content_kwargs = {} # type: Dict[str, Any] + body_content = self._serialize.body(parameters, 'NameAvailabilityRequest') + body_content_kwargs['content'] = body_content + request = self._client.post(url, query_parameters, header_parameters, **body_content_kwargs) + pipeline_response = await self._client._pipeline.run(request, stream=False, **kwargs) + response = pipeline_response.http_response + + if response.status_code not in [200]: + map_error(status_code=response.status_code, response=response, error_map=error_map) + error = self._deserialize(models.ApiError, response) + raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) + + deserialized = self._deserialize('NameAvailabilityResponse', pipeline_response) + + if cls: + return cls(pipeline_response, deserialized, {}) + + return deserialized + check_name_availability.metadata = {'url': '/subscriptions/{subscriptionId}/providers/Microsoft.DataMigration/locations/{location}/checkNameAvailability'} # type: ignore diff --git a/src/datamigration/azext_datamigration/vendored_sdks/datamigration/aio/operations/_sql_migration_services_operations.py b/src/datamigration/azext_datamigration/vendored_sdks/datamigration/aio/operations/_sql_migration_services_operations.py new file mode 100644 index 00000000000..29f3cd99705 --- /dev/null +++ b/src/datamigration/azext_datamigration/vendored_sdks/datamigration/aio/operations/_sql_migration_services_operations.py @@ -0,0 +1,932 @@ +# coding=utf-8 +# -------------------------------------------------------------------------- +# Copyright (c) Microsoft Corporation. All rights reserved. +# Licensed under the MIT License. See License.txt in the project root for license information. +# Code generated by Microsoft (R) AutoRest Code Generator. +# Changes may cause incorrect behavior and will be lost if the code is regenerated. +# -------------------------------------------------------------------------- +from typing import Any, AsyncIterable, Callable, Dict, Generic, Optional, TypeVar, Union +import warnings + +from azure.core.async_paging import AsyncItemPaged, AsyncList +from azure.core.exceptions import ClientAuthenticationError, HttpResponseError, ResourceExistsError, ResourceNotFoundError, map_error +from azure.core.pipeline import PipelineResponse +from azure.core.pipeline.transport import AsyncHttpResponse, HttpRequest +from azure.core.polling import AsyncLROPoller, AsyncNoPolling, AsyncPollingMethod +from azure.mgmt.core.exceptions import ARMErrorFormat +from azure.mgmt.core.polling.async_arm_polling import AsyncARMPolling + +from ... import models + +T = TypeVar('T') +ClsType = Optional[Callable[[PipelineResponse[HttpRequest, AsyncHttpResponse], T, Dict[str, Any]], Any]] + +class SqlMigrationServicesOperations: + """SqlMigrationServicesOperations async operations. + + You should not instantiate this class directly. Instead, you should create a Client instance that + instantiates it for you and attaches it as an attribute. + + :ivar models: Alias to model classes used in this operation group. + :type models: ~azure.mgmt.datamigration.models + :param client: Client for service requests. + :param config: Configuration of service client. + :param serializer: An object model serializer. + :param deserializer: An object model deserializer. + """ + + models = models + + def __init__(self, client, config, serializer, deserializer) -> None: + self._client = client + self._serialize = serializer + self._deserialize = deserializer + self._config = config + + async def get( + self, + resource_group_name: str, + sql_migration_service_name: str, + **kwargs + ) -> "models.SqlMigrationService": + """Retrieve the Migration Service. + + :param resource_group_name: Name of the resource group that contains the resource. You can + obtain this value from the Azure Resource Manager API or the portal. + :type resource_group_name: str + :param sql_migration_service_name: Name of the SQL Migration Service. + :type sql_migration_service_name: str + :keyword callable cls: A custom type or function that will be passed the direct response + :return: SqlMigrationService, or the result of cls(response) + :rtype: ~azure.mgmt.datamigration.models.SqlMigrationService + :raises: ~azure.core.exceptions.HttpResponseError + """ + cls = kwargs.pop('cls', None) # type: ClsType["models.SqlMigrationService"] + error_map = { + 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError + } + error_map.update(kwargs.pop('error_map', {})) + api_version = "2021-10-30-preview" + accept = "application/json" + + # Construct URL + url = self.get.metadata['url'] # type: ignore + path_format_arguments = { + 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str'), + 'sqlMigrationServiceName': self._serialize.url("sql_migration_service_name", sql_migration_service_name, 'str'), + 'subscriptionId': self._serialize.url("self._config.subscription_id", self._config.subscription_id, 'str'), + } + url = self._client.format_url(url, **path_format_arguments) + + # Construct parameters + query_parameters = {} # type: Dict[str, Any] + query_parameters['api-version'] = self._serialize.query("api_version", api_version, 'str') + + # Construct headers + header_parameters = {} # type: Dict[str, Any] + header_parameters['Accept'] = self._serialize.header("accept", accept, 'str') + + request = self._client.get(url, query_parameters, header_parameters) + pipeline_response = await self._client._pipeline.run(request, stream=False, **kwargs) + response = pipeline_response.http_response + + if response.status_code not in [200]: + map_error(status_code=response.status_code, response=response, error_map=error_map) + raise HttpResponseError(response=response, error_format=ARMErrorFormat) + + deserialized = self._deserialize('SqlMigrationService', pipeline_response) + + if cls: + return cls(pipeline_response, deserialized, {}) + + return deserialized + get.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.DataMigration/sqlMigrationServices/{sqlMigrationServiceName}'} # type: ignore + + async def _create_or_update_initial( + self, + resource_group_name: str, + sql_migration_service_name: str, + parameters: "models.SqlMigrationService", + **kwargs + ) -> "models.SqlMigrationService": + cls = kwargs.pop('cls', None) # type: ClsType["models.SqlMigrationService"] + error_map = { + 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError + } + error_map.update(kwargs.pop('error_map', {})) + api_version = "2021-10-30-preview" + content_type = kwargs.pop("content_type", "application/json") + accept = "application/json" + + # Construct URL + url = self._create_or_update_initial.metadata['url'] # type: ignore + path_format_arguments = { + 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str'), + 'sqlMigrationServiceName': self._serialize.url("sql_migration_service_name", sql_migration_service_name, 'str'), + 'subscriptionId': self._serialize.url("self._config.subscription_id", self._config.subscription_id, 'str'), + } + url = self._client.format_url(url, **path_format_arguments) + + # Construct parameters + query_parameters = {} # type: Dict[str, Any] + query_parameters['api-version'] = self._serialize.query("api_version", api_version, 'str') + + # Construct headers + header_parameters = {} # type: Dict[str, Any] + header_parameters['Content-Type'] = self._serialize.header("content_type", content_type, 'str') + header_parameters['Accept'] = self._serialize.header("accept", accept, 'str') + + body_content_kwargs = {} # type: Dict[str, Any] + body_content = self._serialize.body(parameters, 'SqlMigrationService') + body_content_kwargs['content'] = body_content + request = self._client.put(url, query_parameters, header_parameters, **body_content_kwargs) + pipeline_response = await self._client._pipeline.run(request, stream=False, **kwargs) + response = pipeline_response.http_response + + if response.status_code not in [200, 201]: + map_error(status_code=response.status_code, response=response, error_map=error_map) + raise HttpResponseError(response=response, error_format=ARMErrorFormat) + + if response.status_code == 200: + deserialized = self._deserialize('SqlMigrationService', pipeline_response) + + if response.status_code == 201: + deserialized = self._deserialize('SqlMigrationService', pipeline_response) + + if cls: + return cls(pipeline_response, deserialized, {}) + + return deserialized + _create_or_update_initial.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.DataMigration/sqlMigrationServices/{sqlMigrationServiceName}'} # type: ignore + + async def begin_create_or_update( + self, + resource_group_name: str, + sql_migration_service_name: str, + parameters: "models.SqlMigrationService", + **kwargs + ) -> AsyncLROPoller["models.SqlMigrationService"]: + """Create or Update Database Migration Service. + + :param resource_group_name: Name of the resource group that contains the resource. You can + obtain this value from the Azure Resource Manager API or the portal. + :type resource_group_name: str + :param sql_migration_service_name: Name of the SQL Migration Service. + :type sql_migration_service_name: str + :param parameters: Details of SqlMigrationService resource. + :type parameters: ~azure.mgmt.datamigration.models.SqlMigrationService + :keyword callable cls: A custom type or function that will be passed the direct response + :keyword str continuation_token: A continuation token to restart a poller from a saved state. + :keyword polling: True for ARMPolling, False for no polling, or a + polling object for personal polling strategy + :paramtype polling: bool or ~azure.core.polling.AsyncPollingMethod + :keyword int polling_interval: Default waiting time between two polls for LRO operations if no Retry-After header is present. + :return: An instance of AsyncLROPoller that returns either SqlMigrationService or the result of cls(response) + :rtype: ~azure.core.polling.AsyncLROPoller[~azure.mgmt.datamigration.models.SqlMigrationService] + :raises ~azure.core.exceptions.HttpResponseError: + """ + polling = kwargs.pop('polling', True) # type: Union[bool, AsyncPollingMethod] + cls = kwargs.pop('cls', None) # type: ClsType["models.SqlMigrationService"] + lro_delay = kwargs.pop( + 'polling_interval', + self._config.polling_interval + ) + cont_token = kwargs.pop('continuation_token', None) # type: Optional[str] + if cont_token is None: + raw_result = await self._create_or_update_initial( + resource_group_name=resource_group_name, + sql_migration_service_name=sql_migration_service_name, + parameters=parameters, + cls=lambda x,y,z: x, + **kwargs + ) + + kwargs.pop('error_map', None) + kwargs.pop('content_type', None) + + def get_long_running_output(pipeline_response): + deserialized = self._deserialize('SqlMigrationService', pipeline_response) + + if cls: + return cls(pipeline_response, deserialized, {}) + return deserialized + + path_format_arguments = { + 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str'), + 'sqlMigrationServiceName': self._serialize.url("sql_migration_service_name", sql_migration_service_name, 'str'), + 'subscriptionId': self._serialize.url("self._config.subscription_id", self._config.subscription_id, 'str'), + } + + if polling is True: polling_method = AsyncARMPolling(lro_delay, path_format_arguments=path_format_arguments, **kwargs) + elif polling is False: polling_method = AsyncNoPolling() + else: polling_method = polling + if cont_token: + return AsyncLROPoller.from_continuation_token( + polling_method=polling_method, + continuation_token=cont_token, + client=self._client, + deserialization_callback=get_long_running_output + ) + else: + return AsyncLROPoller(self._client, raw_result, get_long_running_output, polling_method) + begin_create_or_update.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.DataMigration/sqlMigrationServices/{sqlMigrationServiceName}'} # type: ignore + + async def _delete_initial( + self, + resource_group_name: str, + sql_migration_service_name: str, + **kwargs + ) -> None: + cls = kwargs.pop('cls', None) # type: ClsType[None] + error_map = { + 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError + } + error_map.update(kwargs.pop('error_map', {})) + api_version = "2021-10-30-preview" + + # Construct URL + url = self._delete_initial.metadata['url'] # type: ignore + path_format_arguments = { + 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str'), + 'sqlMigrationServiceName': self._serialize.url("sql_migration_service_name", sql_migration_service_name, 'str'), + 'subscriptionId': self._serialize.url("self._config.subscription_id", self._config.subscription_id, 'str'), + } + url = self._client.format_url(url, **path_format_arguments) + + # Construct parameters + query_parameters = {} # type: Dict[str, Any] + query_parameters['api-version'] = self._serialize.query("api_version", api_version, 'str') + + # Construct headers + header_parameters = {} # type: Dict[str, Any] + + request = self._client.delete(url, query_parameters, header_parameters) + pipeline_response = await self._client._pipeline.run(request, stream=False, **kwargs) + response = pipeline_response.http_response + + if response.status_code not in [200, 202, 204]: + map_error(status_code=response.status_code, response=response, error_map=error_map) + raise HttpResponseError(response=response, error_format=ARMErrorFormat) + + if cls: + return cls(pipeline_response, None, {}) + + _delete_initial.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.DataMigration/sqlMigrationServices/{sqlMigrationServiceName}'} # type: ignore + + async def begin_delete( + self, + resource_group_name: str, + sql_migration_service_name: str, + **kwargs + ) -> AsyncLROPoller[None]: + """Delete SQL Migration Service. + + :param resource_group_name: Name of the resource group that contains the resource. You can + obtain this value from the Azure Resource Manager API or the portal. + :type resource_group_name: str + :param sql_migration_service_name: Name of the SQL Migration Service. + :type sql_migration_service_name: str + :keyword callable cls: A custom type or function that will be passed the direct response + :keyword str continuation_token: A continuation token to restart a poller from a saved state. + :keyword polling: True for ARMPolling, False for no polling, or a + polling object for personal polling strategy + :paramtype polling: bool or ~azure.core.polling.AsyncPollingMethod + :keyword int polling_interval: Default waiting time between two polls for LRO operations if no Retry-After header is present. + :return: An instance of AsyncLROPoller that returns either None or the result of cls(response) + :rtype: ~azure.core.polling.AsyncLROPoller[None] + :raises ~azure.core.exceptions.HttpResponseError: + """ + polling = kwargs.pop('polling', True) # type: Union[bool, AsyncPollingMethod] + cls = kwargs.pop('cls', None) # type: ClsType[None] + lro_delay = kwargs.pop( + 'polling_interval', + self._config.polling_interval + ) + cont_token = kwargs.pop('continuation_token', None) # type: Optional[str] + if cont_token is None: + raw_result = await self._delete_initial( + resource_group_name=resource_group_name, + sql_migration_service_name=sql_migration_service_name, + cls=lambda x,y,z: x, + **kwargs + ) + + kwargs.pop('error_map', None) + kwargs.pop('content_type', None) + + def get_long_running_output(pipeline_response): + if cls: + return cls(pipeline_response, None, {}) + + path_format_arguments = { + 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str'), + 'sqlMigrationServiceName': self._serialize.url("sql_migration_service_name", sql_migration_service_name, 'str'), + 'subscriptionId': self._serialize.url("self._config.subscription_id", self._config.subscription_id, 'str'), + } + + if polling is True: polling_method = AsyncARMPolling(lro_delay, path_format_arguments=path_format_arguments, **kwargs) + elif polling is False: polling_method = AsyncNoPolling() + else: polling_method = polling + if cont_token: + return AsyncLROPoller.from_continuation_token( + polling_method=polling_method, + continuation_token=cont_token, + client=self._client, + deserialization_callback=get_long_running_output + ) + else: + return AsyncLROPoller(self._client, raw_result, get_long_running_output, polling_method) + begin_delete.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.DataMigration/sqlMigrationServices/{sqlMigrationServiceName}'} # type: ignore + + async def _update_initial( + self, + resource_group_name: str, + sql_migration_service_name: str, + parameters: "models.SqlMigrationServiceUpdate", + **kwargs + ) -> "models.SqlMigrationService": + cls = kwargs.pop('cls', None) # type: ClsType["models.SqlMigrationService"] + error_map = { + 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError + } + error_map.update(kwargs.pop('error_map', {})) + api_version = "2021-10-30-preview" + content_type = kwargs.pop("content_type", "application/json") + accept = "application/json" + + # Construct URL + url = self._update_initial.metadata['url'] # type: ignore + path_format_arguments = { + 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str'), + 'sqlMigrationServiceName': self._serialize.url("sql_migration_service_name", sql_migration_service_name, 'str'), + 'subscriptionId': self._serialize.url("self._config.subscription_id", self._config.subscription_id, 'str'), + } + url = self._client.format_url(url, **path_format_arguments) + + # Construct parameters + query_parameters = {} # type: Dict[str, Any] + query_parameters['api-version'] = self._serialize.query("api_version", api_version, 'str') + + # Construct headers + header_parameters = {} # type: Dict[str, Any] + header_parameters['Content-Type'] = self._serialize.header("content_type", content_type, 'str') + header_parameters['Accept'] = self._serialize.header("accept", accept, 'str') + + body_content_kwargs = {} # type: Dict[str, Any] + body_content = self._serialize.body(parameters, 'SqlMigrationServiceUpdate') + body_content_kwargs['content'] = body_content + request = self._client.patch(url, query_parameters, header_parameters, **body_content_kwargs) + pipeline_response = await self._client._pipeline.run(request, stream=False, **kwargs) + response = pipeline_response.http_response + + if response.status_code not in [200, 201]: + map_error(status_code=response.status_code, response=response, error_map=error_map) + raise HttpResponseError(response=response, error_format=ARMErrorFormat) + + if response.status_code == 200: + deserialized = self._deserialize('SqlMigrationService', pipeline_response) + + if response.status_code == 201: + deserialized = self._deserialize('SqlMigrationService', pipeline_response) + + if cls: + return cls(pipeline_response, deserialized, {}) + + return deserialized + _update_initial.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.DataMigration/sqlMigrationServices/{sqlMigrationServiceName}'} # type: ignore + + async def begin_update( + self, + resource_group_name: str, + sql_migration_service_name: str, + parameters: "models.SqlMigrationServiceUpdate", + **kwargs + ) -> AsyncLROPoller["models.SqlMigrationService"]: + """Update SQL Migration Service. + + :param resource_group_name: Name of the resource group that contains the resource. You can + obtain this value from the Azure Resource Manager API or the portal. + :type resource_group_name: str + :param sql_migration_service_name: Name of the SQL Migration Service. + :type sql_migration_service_name: str + :param parameters: Details of SqlMigrationService resource. + :type parameters: ~azure.mgmt.datamigration.models.SqlMigrationServiceUpdate + :keyword callable cls: A custom type or function that will be passed the direct response + :keyword str continuation_token: A continuation token to restart a poller from a saved state. + :keyword polling: True for ARMPolling, False for no polling, or a + polling object for personal polling strategy + :paramtype polling: bool or ~azure.core.polling.AsyncPollingMethod + :keyword int polling_interval: Default waiting time between two polls for LRO operations if no Retry-After header is present. + :return: An instance of AsyncLROPoller that returns either SqlMigrationService or the result of cls(response) + :rtype: ~azure.core.polling.AsyncLROPoller[~azure.mgmt.datamigration.models.SqlMigrationService] + :raises ~azure.core.exceptions.HttpResponseError: + """ + polling = kwargs.pop('polling', True) # type: Union[bool, AsyncPollingMethod] + cls = kwargs.pop('cls', None) # type: ClsType["models.SqlMigrationService"] + lro_delay = kwargs.pop( + 'polling_interval', + self._config.polling_interval + ) + cont_token = kwargs.pop('continuation_token', None) # type: Optional[str] + if cont_token is None: + raw_result = await self._update_initial( + resource_group_name=resource_group_name, + sql_migration_service_name=sql_migration_service_name, + parameters=parameters, + cls=lambda x,y,z: x, + **kwargs + ) + + kwargs.pop('error_map', None) + kwargs.pop('content_type', None) + + def get_long_running_output(pipeline_response): + deserialized = self._deserialize('SqlMigrationService', pipeline_response) + + if cls: + return cls(pipeline_response, deserialized, {}) + return deserialized + + path_format_arguments = { + 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str'), + 'sqlMigrationServiceName': self._serialize.url("sql_migration_service_name", sql_migration_service_name, 'str'), + 'subscriptionId': self._serialize.url("self._config.subscription_id", self._config.subscription_id, 'str'), + } + + if polling is True: polling_method = AsyncARMPolling(lro_delay, path_format_arguments=path_format_arguments, **kwargs) + elif polling is False: polling_method = AsyncNoPolling() + else: polling_method = polling + if cont_token: + return AsyncLROPoller.from_continuation_token( + polling_method=polling_method, + continuation_token=cont_token, + client=self._client, + deserialization_callback=get_long_running_output + ) + else: + return AsyncLROPoller(self._client, raw_result, get_long_running_output, polling_method) + begin_update.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.DataMigration/sqlMigrationServices/{sqlMigrationServiceName}'} # type: ignore + + def list_by_resource_group( + self, + resource_group_name: str, + **kwargs + ) -> AsyncIterable["models.SqlMigrationListResult"]: + """Retrieve all SQL migration services in the resource group. + + :param resource_group_name: Name of the resource group that contains the resource. You can + obtain this value from the Azure Resource Manager API or the portal. + :type resource_group_name: str + :keyword callable cls: A custom type or function that will be passed the direct response + :return: An iterator like instance of either SqlMigrationListResult or the result of cls(response) + :rtype: ~azure.core.async_paging.AsyncItemPaged[~azure.mgmt.datamigration.models.SqlMigrationListResult] + :raises: ~azure.core.exceptions.HttpResponseError + """ + cls = kwargs.pop('cls', None) # type: ClsType["models.SqlMigrationListResult"] + error_map = { + 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError + } + error_map.update(kwargs.pop('error_map', {})) + api_version = "2021-10-30-preview" + accept = "application/json" + + def prepare_request(next_link=None): + # Construct headers + header_parameters = {} # type: Dict[str, Any] + header_parameters['Accept'] = self._serialize.header("accept", accept, 'str') + + if not next_link: + # Construct URL + url = self.list_by_resource_group.metadata['url'] # type: ignore + path_format_arguments = { + 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str'), + 'subscriptionId': self._serialize.url("self._config.subscription_id", self._config.subscription_id, 'str'), + } + url = self._client.format_url(url, **path_format_arguments) + # Construct parameters + query_parameters = {} # type: Dict[str, Any] + query_parameters['api-version'] = self._serialize.query("api_version", api_version, 'str') + + request = self._client.get(url, query_parameters, header_parameters) + else: + url = next_link + query_parameters = {} # type: Dict[str, Any] + request = self._client.get(url, query_parameters, header_parameters) + return request + + async def extract_data(pipeline_response): + deserialized = self._deserialize('SqlMigrationListResult', pipeline_response) + list_of_elem = deserialized.value + if cls: + list_of_elem = cls(list_of_elem) + return deserialized.next_link or None, AsyncList(list_of_elem) + + async def get_next(next_link=None): + request = prepare_request(next_link) + + pipeline_response = await self._client._pipeline.run(request, stream=False, **kwargs) + response = pipeline_response.http_response + + if response.status_code not in [200]: + map_error(status_code=response.status_code, response=response, error_map=error_map) + raise HttpResponseError(response=response, error_format=ARMErrorFormat) + + return pipeline_response + + return AsyncItemPaged( + get_next, extract_data + ) + list_by_resource_group.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.DataMigration/sqlMigrationServices'} # type: ignore + + async def list_auth_keys( + self, + resource_group_name: str, + sql_migration_service_name: str, + **kwargs + ) -> "models.AuthenticationKeys": + """Retrieve the List of Authentication Keys for Self Hosted Integration Runtime. + + :param resource_group_name: Name of the resource group that contains the resource. You can + obtain this value from the Azure Resource Manager API or the portal. + :type resource_group_name: str + :param sql_migration_service_name: Name of the SQL Migration Service. + :type sql_migration_service_name: str + :keyword callable cls: A custom type or function that will be passed the direct response + :return: AuthenticationKeys, or the result of cls(response) + :rtype: ~azure.mgmt.datamigration.models.AuthenticationKeys + :raises: ~azure.core.exceptions.HttpResponseError + """ + cls = kwargs.pop('cls', None) # type: ClsType["models.AuthenticationKeys"] + error_map = { + 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError + } + error_map.update(kwargs.pop('error_map', {})) + api_version = "2021-10-30-preview" + accept = "application/json" + + # Construct URL + url = self.list_auth_keys.metadata['url'] # type: ignore + path_format_arguments = { + 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str'), + 'sqlMigrationServiceName': self._serialize.url("sql_migration_service_name", sql_migration_service_name, 'str'), + 'subscriptionId': self._serialize.url("self._config.subscription_id", self._config.subscription_id, 'str'), + } + url = self._client.format_url(url, **path_format_arguments) + + # Construct parameters + query_parameters = {} # type: Dict[str, Any] + query_parameters['api-version'] = self._serialize.query("api_version", api_version, 'str') + + # Construct headers + header_parameters = {} # type: Dict[str, Any] + header_parameters['Accept'] = self._serialize.header("accept", accept, 'str') + + request = self._client.post(url, query_parameters, header_parameters) + pipeline_response = await self._client._pipeline.run(request, stream=False, **kwargs) + response = pipeline_response.http_response + + if response.status_code not in [200]: + map_error(status_code=response.status_code, response=response, error_map=error_map) + raise HttpResponseError(response=response, error_format=ARMErrorFormat) + + deserialized = self._deserialize('AuthenticationKeys', pipeline_response) + + if cls: + return cls(pipeline_response, deserialized, {}) + + return deserialized + list_auth_keys.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.DataMigration/sqlMigrationServices/{sqlMigrationServiceName}/listAuthKeys'} # type: ignore + + async def regenerate_auth_keys( + self, + resource_group_name: str, + sql_migration_service_name: str, + parameters: "models.RegenAuthKeys", + **kwargs + ) -> "models.RegenAuthKeys": + """Regenerate a new set of Authentication Keys for Self Hosted Integration Runtime. + + :param resource_group_name: Name of the resource group that contains the resource. You can + obtain this value from the Azure Resource Manager API or the portal. + :type resource_group_name: str + :param sql_migration_service_name: Name of the SQL Migration Service. + :type sql_migration_service_name: str + :param parameters: Details of SqlMigrationService resource. + :type parameters: ~azure.mgmt.datamigration.models.RegenAuthKeys + :keyword callable cls: A custom type or function that will be passed the direct response + :return: RegenAuthKeys, or the result of cls(response) + :rtype: ~azure.mgmt.datamigration.models.RegenAuthKeys + :raises: ~azure.core.exceptions.HttpResponseError + """ + cls = kwargs.pop('cls', None) # type: ClsType["models.RegenAuthKeys"] + error_map = { + 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError + } + error_map.update(kwargs.pop('error_map', {})) + api_version = "2021-10-30-preview" + content_type = kwargs.pop("content_type", "application/json") + accept = "application/json" + + # Construct URL + url = self.regenerate_auth_keys.metadata['url'] # type: ignore + path_format_arguments = { + 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str'), + 'sqlMigrationServiceName': self._serialize.url("sql_migration_service_name", sql_migration_service_name, 'str'), + 'subscriptionId': self._serialize.url("self._config.subscription_id", self._config.subscription_id, 'str'), + } + url = self._client.format_url(url, **path_format_arguments) + + # Construct parameters + query_parameters = {} # type: Dict[str, Any] + query_parameters['api-version'] = self._serialize.query("api_version", api_version, 'str') + + # Construct headers + header_parameters = {} # type: Dict[str, Any] + header_parameters['Content-Type'] = self._serialize.header("content_type", content_type, 'str') + header_parameters['Accept'] = self._serialize.header("accept", accept, 'str') + + body_content_kwargs = {} # type: Dict[str, Any] + body_content = self._serialize.body(parameters, 'RegenAuthKeys') + body_content_kwargs['content'] = body_content + request = self._client.post(url, query_parameters, header_parameters, **body_content_kwargs) + pipeline_response = await self._client._pipeline.run(request, stream=False, **kwargs) + response = pipeline_response.http_response + + if response.status_code not in [200]: + map_error(status_code=response.status_code, response=response, error_map=error_map) + raise HttpResponseError(response=response, error_format=ARMErrorFormat) + + deserialized = self._deserialize('RegenAuthKeys', pipeline_response) + + if cls: + return cls(pipeline_response, deserialized, {}) + + return deserialized + regenerate_auth_keys.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.DataMigration/sqlMigrationServices/{sqlMigrationServiceName}/regenerateAuthKeys'} # type: ignore + + async def delete_node( + self, + resource_group_name: str, + sql_migration_service_name: str, + parameters: "models.DeleteNode", + **kwargs + ) -> "models.DeleteNode": + """Delete the integration runtime node. + + :param resource_group_name: Name of the resource group that contains the resource. You can + obtain this value from the Azure Resource Manager API or the portal. + :type resource_group_name: str + :param sql_migration_service_name: Name of the SQL Migration Service. + :type sql_migration_service_name: str + :param parameters: Details of SqlMigrationService resource. + :type parameters: ~azure.mgmt.datamigration.models.DeleteNode + :keyword callable cls: A custom type or function that will be passed the direct response + :return: DeleteNode, or the result of cls(response) + :rtype: ~azure.mgmt.datamigration.models.DeleteNode + :raises: ~azure.core.exceptions.HttpResponseError + """ + cls = kwargs.pop('cls', None) # type: ClsType["models.DeleteNode"] + error_map = { + 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError + } + error_map.update(kwargs.pop('error_map', {})) + api_version = "2021-10-30-preview" + content_type = kwargs.pop("content_type", "application/json") + accept = "application/json" + + # Construct URL + url = self.delete_node.metadata['url'] # type: ignore + path_format_arguments = { + 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str'), + 'sqlMigrationServiceName': self._serialize.url("sql_migration_service_name", sql_migration_service_name, 'str'), + 'subscriptionId': self._serialize.url("self._config.subscription_id", self._config.subscription_id, 'str'), + } + url = self._client.format_url(url, **path_format_arguments) + + # Construct parameters + query_parameters = {} # type: Dict[str, Any] + query_parameters['api-version'] = self._serialize.query("api_version", api_version, 'str') + + # Construct headers + header_parameters = {} # type: Dict[str, Any] + header_parameters['Content-Type'] = self._serialize.header("content_type", content_type, 'str') + header_parameters['Accept'] = self._serialize.header("accept", accept, 'str') + + body_content_kwargs = {} # type: Dict[str, Any] + body_content = self._serialize.body(parameters, 'DeleteNode') + body_content_kwargs['content'] = body_content + request = self._client.post(url, query_parameters, header_parameters, **body_content_kwargs) + pipeline_response = await self._client._pipeline.run(request, stream=False, **kwargs) + response = pipeline_response.http_response + + if response.status_code not in [200]: + map_error(status_code=response.status_code, response=response, error_map=error_map) + raise HttpResponseError(response=response, error_format=ARMErrorFormat) + + deserialized = self._deserialize('DeleteNode', pipeline_response) + + if cls: + return cls(pipeline_response, deserialized, {}) + + return deserialized + delete_node.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.DataMigration/sqlMigrationServices/{sqlMigrationServiceName}/deleteNode'} # type: ignore + + def list_migrations( + self, + resource_group_name: str, + sql_migration_service_name: str, + **kwargs + ) -> AsyncIterable["models.DatabaseMigrationListResult"]: + """Retrieve the List of database migrations attached to the service. + + :param resource_group_name: Name of the resource group that contains the resource. You can + obtain this value from the Azure Resource Manager API or the portal. + :type resource_group_name: str + :param sql_migration_service_name: Name of the SQL Migration Service. + :type sql_migration_service_name: str + :keyword callable cls: A custom type or function that will be passed the direct response + :return: An iterator like instance of either DatabaseMigrationListResult or the result of cls(response) + :rtype: ~azure.core.async_paging.AsyncItemPaged[~azure.mgmt.datamigration.models.DatabaseMigrationListResult] + :raises: ~azure.core.exceptions.HttpResponseError + """ + cls = kwargs.pop('cls', None) # type: ClsType["models.DatabaseMigrationListResult"] + error_map = { + 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError + } + error_map.update(kwargs.pop('error_map', {})) + api_version = "2021-10-30-preview" + accept = "application/json" + + def prepare_request(next_link=None): + # Construct headers + header_parameters = {} # type: Dict[str, Any] + header_parameters['Accept'] = self._serialize.header("accept", accept, 'str') + + if not next_link: + # Construct URL + url = self.list_migrations.metadata['url'] # type: ignore + path_format_arguments = { + 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str'), + 'sqlMigrationServiceName': self._serialize.url("sql_migration_service_name", sql_migration_service_name, 'str'), + 'subscriptionId': self._serialize.url("self._config.subscription_id", self._config.subscription_id, 'str'), + } + url = self._client.format_url(url, **path_format_arguments) + # Construct parameters + query_parameters = {} # type: Dict[str, Any] + query_parameters['api-version'] = self._serialize.query("api_version", api_version, 'str') + + request = self._client.get(url, query_parameters, header_parameters) + else: + url = next_link + query_parameters = {} # type: Dict[str, Any] + request = self._client.get(url, query_parameters, header_parameters) + return request + + async def extract_data(pipeline_response): + deserialized = self._deserialize('DatabaseMigrationListResult', pipeline_response) + list_of_elem = deserialized.value + if cls: + list_of_elem = cls(list_of_elem) + return deserialized.next_link or None, AsyncList(list_of_elem) + + async def get_next(next_link=None): + request = prepare_request(next_link) + + pipeline_response = await self._client._pipeline.run(request, stream=False, **kwargs) + response = pipeline_response.http_response + + if response.status_code not in [200]: + map_error(status_code=response.status_code, response=response, error_map=error_map) + raise HttpResponseError(response=response, error_format=ARMErrorFormat) + + return pipeline_response + + return AsyncItemPaged( + get_next, extract_data + ) + list_migrations.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.DataMigration/sqlMigrationServices/{sqlMigrationServiceName}/listMigrations'} # type: ignore + + async def list_monitoring_data( + self, + resource_group_name: str, + sql_migration_service_name: str, + **kwargs + ) -> "models.IntegrationRuntimeMonitoringData": + """Retrieve the Monitoring Data. + + :param resource_group_name: Name of the resource group that contains the resource. You can + obtain this value from the Azure Resource Manager API or the portal. + :type resource_group_name: str + :param sql_migration_service_name: Name of the SQL Migration Service. + :type sql_migration_service_name: str + :keyword callable cls: A custom type or function that will be passed the direct response + :return: IntegrationRuntimeMonitoringData, or the result of cls(response) + :rtype: ~azure.mgmt.datamigration.models.IntegrationRuntimeMonitoringData + :raises: ~azure.core.exceptions.HttpResponseError + """ + cls = kwargs.pop('cls', None) # type: ClsType["models.IntegrationRuntimeMonitoringData"] + error_map = { + 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError + } + error_map.update(kwargs.pop('error_map', {})) + api_version = "2021-10-30-preview" + accept = "application/json" + + # Construct URL + url = self.list_monitoring_data.metadata['url'] # type: ignore + path_format_arguments = { + 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str'), + 'sqlMigrationServiceName': self._serialize.url("sql_migration_service_name", sql_migration_service_name, 'str'), + 'subscriptionId': self._serialize.url("self._config.subscription_id", self._config.subscription_id, 'str'), + } + url = self._client.format_url(url, **path_format_arguments) + + # Construct parameters + query_parameters = {} # type: Dict[str, Any] + query_parameters['api-version'] = self._serialize.query("api_version", api_version, 'str') + + # Construct headers + header_parameters = {} # type: Dict[str, Any] + header_parameters['Accept'] = self._serialize.header("accept", accept, 'str') + + request = self._client.post(url, query_parameters, header_parameters) + pipeline_response = await self._client._pipeline.run(request, stream=False, **kwargs) + response = pipeline_response.http_response + + if response.status_code not in [200]: + map_error(status_code=response.status_code, response=response, error_map=error_map) + raise HttpResponseError(response=response, error_format=ARMErrorFormat) + + deserialized = self._deserialize('IntegrationRuntimeMonitoringData', pipeline_response) + + if cls: + return cls(pipeline_response, deserialized, {}) + + return deserialized + list_monitoring_data.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.DataMigration/sqlMigrationServices/{sqlMigrationServiceName}/listMonitoringData'} # type: ignore + + def list_by_subscription( + self, + **kwargs + ) -> AsyncIterable["models.SqlMigrationListResult"]: + """Retrieve all SQL migration services in the subscriptions. + + :keyword callable cls: A custom type or function that will be passed the direct response + :return: An iterator like instance of either SqlMigrationListResult or the result of cls(response) + :rtype: ~azure.core.async_paging.AsyncItemPaged[~azure.mgmt.datamigration.models.SqlMigrationListResult] + :raises: ~azure.core.exceptions.HttpResponseError + """ + cls = kwargs.pop('cls', None) # type: ClsType["models.SqlMigrationListResult"] + error_map = { + 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError + } + error_map.update(kwargs.pop('error_map', {})) + api_version = "2021-10-30-preview" + accept = "application/json" + + def prepare_request(next_link=None): + # Construct headers + header_parameters = {} # type: Dict[str, Any] + header_parameters['Accept'] = self._serialize.header("accept", accept, 'str') + + if not next_link: + # Construct URL + url = self.list_by_subscription.metadata['url'] # type: ignore + path_format_arguments = { + 'subscriptionId': self._serialize.url("self._config.subscription_id", self._config.subscription_id, 'str'), + } + url = self._client.format_url(url, **path_format_arguments) + # Construct parameters + query_parameters = {} # type: Dict[str, Any] + query_parameters['api-version'] = self._serialize.query("api_version", api_version, 'str') + + request = self._client.get(url, query_parameters, header_parameters) + else: + url = next_link + query_parameters = {} # type: Dict[str, Any] + request = self._client.get(url, query_parameters, header_parameters) + return request + + async def extract_data(pipeline_response): + deserialized = self._deserialize('SqlMigrationListResult', pipeline_response) + list_of_elem = deserialized.value + if cls: + list_of_elem = cls(list_of_elem) + return deserialized.next_link or None, AsyncList(list_of_elem) + + async def get_next(next_link=None): + request = prepare_request(next_link) + + pipeline_response = await self._client._pipeline.run(request, stream=False, **kwargs) + response = pipeline_response.http_response + + if response.status_code not in [200]: + map_error(status_code=response.status_code, response=response, error_map=error_map) + raise HttpResponseError(response=response, error_format=ARMErrorFormat) + + return pipeline_response + + return AsyncItemPaged( + get_next, extract_data + ) + list_by_subscription.metadata = {'url': '/subscriptions/{subscriptionId}/providers/Microsoft.DataMigration/sqlMigrationServices'} # type: ignore diff --git a/src/datamigration/azext_datamigration/vendored_sdks/datamigration/aio/operations/_tasks_operations.py b/src/datamigration/azext_datamigration/vendored_sdks/datamigration/aio/operations/_tasks_operations.py new file mode 100644 index 00000000000..7918767b386 --- /dev/null +++ b/src/datamigration/azext_datamigration/vendored_sdks/datamigration/aio/operations/_tasks_operations.py @@ -0,0 +1,587 @@ +# coding=utf-8 +# -------------------------------------------------------------------------- +# Copyright (c) Microsoft Corporation. All rights reserved. +# Licensed under the MIT License. See License.txt in the project root for license information. +# Code generated by Microsoft (R) AutoRest Code Generator. +# Changes may cause incorrect behavior and will be lost if the code is regenerated. +# -------------------------------------------------------------------------- +from typing import Any, AsyncIterable, Callable, Dict, Generic, Optional, TypeVar, Union +import warnings + +from azure.core.async_paging import AsyncItemPaged, AsyncList +from azure.core.exceptions import ClientAuthenticationError, HttpResponseError, ResourceExistsError, ResourceNotFoundError, map_error +from azure.core.pipeline import PipelineResponse +from azure.core.pipeline.transport import AsyncHttpResponse, HttpRequest +from azure.mgmt.core.exceptions import ARMErrorFormat + +from ... import models + +T = TypeVar('T') +ClsType = Optional[Callable[[PipelineResponse[HttpRequest, AsyncHttpResponse], T, Dict[str, Any]], Any]] + +class TasksOperations: + """TasksOperations async operations. + + You should not instantiate this class directly. Instead, you should create a Client instance that + instantiates it for you and attaches it as an attribute. + + :ivar models: Alias to model classes used in this operation group. + :type models: ~azure.mgmt.datamigration.models + :param client: Client for service requests. + :param config: Configuration of service client. + :param serializer: An object model serializer. + :param deserializer: An object model deserializer. + """ + + models = models + + def __init__(self, client, config, serializer, deserializer) -> None: + self._client = client + self._serialize = serializer + self._deserialize = deserializer + self._config = config + + def list( + self, + group_name: str, + service_name: str, + project_name: str, + task_type: Optional[str] = None, + **kwargs + ) -> AsyncIterable["models.TaskList"]: + """Get tasks in a service. + + The services resource is the top-level resource that represents the Database Migration Service. + This method returns a list of tasks owned by a service resource. Some tasks may have a status + of Unknown, which indicates that an error occurred while querying the status of that task. + + :param group_name: Name of the resource group. + :type group_name: str + :param service_name: Name of the service. + :type service_name: str + :param project_name: Name of the project. + :type project_name: str + :param task_type: Filter tasks by task type. + :type task_type: str + :keyword callable cls: A custom type or function that will be passed the direct response + :return: An iterator like instance of either TaskList or the result of cls(response) + :rtype: ~azure.core.async_paging.AsyncItemPaged[~azure.mgmt.datamigration.models.TaskList] + :raises: ~azure.core.exceptions.HttpResponseError + """ + cls = kwargs.pop('cls', None) # type: ClsType["models.TaskList"] + error_map = { + 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError + } + error_map.update(kwargs.pop('error_map', {})) + api_version = "2021-10-30-preview" + accept = "application/json" + + def prepare_request(next_link=None): + # Construct headers + header_parameters = {} # type: Dict[str, Any] + header_parameters['Accept'] = self._serialize.header("accept", accept, 'str') + + if not next_link: + # Construct URL + url = self.list.metadata['url'] # type: ignore + path_format_arguments = { + 'subscriptionId': self._serialize.url("self._config.subscription_id", self._config.subscription_id, 'str'), + 'groupName': self._serialize.url("group_name", group_name, 'str'), + 'serviceName': self._serialize.url("service_name", service_name, 'str'), + 'projectName': self._serialize.url("project_name", project_name, 'str'), + } + url = self._client.format_url(url, **path_format_arguments) + # Construct parameters + query_parameters = {} # type: Dict[str, Any] + query_parameters['api-version'] = self._serialize.query("api_version", api_version, 'str') + if task_type is not None: + query_parameters['taskType'] = self._serialize.query("task_type", task_type, 'str') + + request = self._client.get(url, query_parameters, header_parameters) + else: + url = next_link + query_parameters = {} # type: Dict[str, Any] + request = self._client.get(url, query_parameters, header_parameters) + return request + + async def extract_data(pipeline_response): + deserialized = self._deserialize('TaskList', pipeline_response) + list_of_elem = deserialized.value + if cls: + list_of_elem = cls(list_of_elem) + return deserialized.next_link or None, AsyncList(list_of_elem) + + async def get_next(next_link=None): + request = prepare_request(next_link) + + pipeline_response = await self._client._pipeline.run(request, stream=False, **kwargs) + response = pipeline_response.http_response + + if response.status_code not in [200]: + error = self._deserialize(models.ApiError, response) + map_error(status_code=response.status_code, response=response, error_map=error_map) + raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) + + return pipeline_response + + return AsyncItemPaged( + get_next, extract_data + ) + list.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{groupName}/providers/Microsoft.DataMigration/services/{serviceName}/projects/{projectName}/tasks'} # type: ignore + + async def create_or_update( + self, + group_name: str, + service_name: str, + project_name: str, + task_name: str, + parameters: "models.ProjectTask", + **kwargs + ) -> "models.ProjectTask": + """Create or update task. + + The tasks resource is a nested, proxy-only resource representing work performed by a DMS + instance. The PUT method creates a new task or updates an existing one, although since tasks + have no mutable custom properties, there is little reason to update an existing one. + + :param group_name: Name of the resource group. + :type group_name: str + :param service_name: Name of the service. + :type service_name: str + :param project_name: Name of the project. + :type project_name: str + :param task_name: Name of the Task. + :type task_name: str + :param parameters: Information about the task. + :type parameters: ~azure.mgmt.datamigration.models.ProjectTask + :keyword callable cls: A custom type or function that will be passed the direct response + :return: ProjectTask, or the result of cls(response) + :rtype: ~azure.mgmt.datamigration.models.ProjectTask + :raises: ~azure.core.exceptions.HttpResponseError + """ + cls = kwargs.pop('cls', None) # type: ClsType["models.ProjectTask"] + error_map = { + 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError + } + error_map.update(kwargs.pop('error_map', {})) + api_version = "2021-10-30-preview" + content_type = kwargs.pop("content_type", "application/json") + accept = "application/json" + + # Construct URL + url = self.create_or_update.metadata['url'] # type: ignore + path_format_arguments = { + 'subscriptionId': self._serialize.url("self._config.subscription_id", self._config.subscription_id, 'str'), + 'groupName': self._serialize.url("group_name", group_name, 'str'), + 'serviceName': self._serialize.url("service_name", service_name, 'str'), + 'projectName': self._serialize.url("project_name", project_name, 'str'), + 'taskName': self._serialize.url("task_name", task_name, 'str'), + } + url = self._client.format_url(url, **path_format_arguments) + + # Construct parameters + query_parameters = {} # type: Dict[str, Any] + query_parameters['api-version'] = self._serialize.query("api_version", api_version, 'str') + + # Construct headers + header_parameters = {} # type: Dict[str, Any] + header_parameters['Content-Type'] = self._serialize.header("content_type", content_type, 'str') + header_parameters['Accept'] = self._serialize.header("accept", accept, 'str') + + body_content_kwargs = {} # type: Dict[str, Any] + body_content = self._serialize.body(parameters, 'ProjectTask') + body_content_kwargs['content'] = body_content + request = self._client.put(url, query_parameters, header_parameters, **body_content_kwargs) + pipeline_response = await self._client._pipeline.run(request, stream=False, **kwargs) + response = pipeline_response.http_response + + if response.status_code not in [200, 201]: + map_error(status_code=response.status_code, response=response, error_map=error_map) + error = self._deserialize(models.ApiError, response) + raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) + + if response.status_code == 200: + deserialized = self._deserialize('ProjectTask', pipeline_response) + + if response.status_code == 201: + deserialized = self._deserialize('ProjectTask', pipeline_response) + + if cls: + return cls(pipeline_response, deserialized, {}) + + return deserialized + create_or_update.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{groupName}/providers/Microsoft.DataMigration/services/{serviceName}/projects/{projectName}/tasks/{taskName}'} # type: ignore + + async def get( + self, + group_name: str, + service_name: str, + project_name: str, + task_name: str, + expand: Optional[str] = None, + **kwargs + ) -> "models.ProjectTask": + """Get task information. + + The tasks resource is a nested, proxy-only resource representing work performed by a DMS + instance. The GET method retrieves information about a task. + + :param group_name: Name of the resource group. + :type group_name: str + :param service_name: Name of the service. + :type service_name: str + :param project_name: Name of the project. + :type project_name: str + :param task_name: Name of the Task. + :type task_name: str + :param expand: Expand the response. + :type expand: str + :keyword callable cls: A custom type or function that will be passed the direct response + :return: ProjectTask, or the result of cls(response) + :rtype: ~azure.mgmt.datamigration.models.ProjectTask + :raises: ~azure.core.exceptions.HttpResponseError + """ + cls = kwargs.pop('cls', None) # type: ClsType["models.ProjectTask"] + error_map = { + 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError + } + error_map.update(kwargs.pop('error_map', {})) + api_version = "2021-10-30-preview" + accept = "application/json" + + # Construct URL + url = self.get.metadata['url'] # type: ignore + path_format_arguments = { + 'subscriptionId': self._serialize.url("self._config.subscription_id", self._config.subscription_id, 'str'), + 'groupName': self._serialize.url("group_name", group_name, 'str'), + 'serviceName': self._serialize.url("service_name", service_name, 'str'), + 'projectName': self._serialize.url("project_name", project_name, 'str'), + 'taskName': self._serialize.url("task_name", task_name, 'str'), + } + url = self._client.format_url(url, **path_format_arguments) + + # Construct parameters + query_parameters = {} # type: Dict[str, Any] + query_parameters['api-version'] = self._serialize.query("api_version", api_version, 'str') + if expand is not None: + query_parameters['$expand'] = self._serialize.query("expand", expand, 'str') + + # Construct headers + header_parameters = {} # type: Dict[str, Any] + header_parameters['Accept'] = self._serialize.header("accept", accept, 'str') + + request = self._client.get(url, query_parameters, header_parameters) + pipeline_response = await self._client._pipeline.run(request, stream=False, **kwargs) + response = pipeline_response.http_response + + if response.status_code not in [200]: + map_error(status_code=response.status_code, response=response, error_map=error_map) + error = self._deserialize(models.ApiError, response) + raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) + + deserialized = self._deserialize('ProjectTask', pipeline_response) + + if cls: + return cls(pipeline_response, deserialized, {}) + + return deserialized + get.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{groupName}/providers/Microsoft.DataMigration/services/{serviceName}/projects/{projectName}/tasks/{taskName}'} # type: ignore + + async def delete( + self, + group_name: str, + service_name: str, + project_name: str, + task_name: str, + delete_running_tasks: Optional[bool] = None, + **kwargs + ) -> None: + """Delete task. + + The tasks resource is a nested, proxy-only resource representing work performed by a DMS + instance. The DELETE method deletes a task, canceling it first if it's running. + + :param group_name: Name of the resource group. + :type group_name: str + :param service_name: Name of the service. + :type service_name: str + :param project_name: Name of the project. + :type project_name: str + :param task_name: Name of the Task. + :type task_name: str + :param delete_running_tasks: Delete the resource even if it contains running tasks. + :type delete_running_tasks: bool + :keyword callable cls: A custom type or function that will be passed the direct response + :return: None, or the result of cls(response) + :rtype: None + :raises: ~azure.core.exceptions.HttpResponseError + """ + cls = kwargs.pop('cls', None) # type: ClsType[None] + error_map = { + 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError + } + error_map.update(kwargs.pop('error_map', {})) + api_version = "2021-10-30-preview" + accept = "application/json" + + # Construct URL + url = self.delete.metadata['url'] # type: ignore + path_format_arguments = { + 'subscriptionId': self._serialize.url("self._config.subscription_id", self._config.subscription_id, 'str'), + 'groupName': self._serialize.url("group_name", group_name, 'str'), + 'serviceName': self._serialize.url("service_name", service_name, 'str'), + 'projectName': self._serialize.url("project_name", project_name, 'str'), + 'taskName': self._serialize.url("task_name", task_name, 'str'), + } + url = self._client.format_url(url, **path_format_arguments) + + # Construct parameters + query_parameters = {} # type: Dict[str, Any] + query_parameters['api-version'] = self._serialize.query("api_version", api_version, 'str') + if delete_running_tasks is not None: + query_parameters['deleteRunningTasks'] = self._serialize.query("delete_running_tasks", delete_running_tasks, 'bool') + + # Construct headers + header_parameters = {} # type: Dict[str, Any] + header_parameters['Accept'] = self._serialize.header("accept", accept, 'str') + + request = self._client.delete(url, query_parameters, header_parameters) + pipeline_response = await self._client._pipeline.run(request, stream=False, **kwargs) + response = pipeline_response.http_response + + if response.status_code not in [200, 204]: + map_error(status_code=response.status_code, response=response, error_map=error_map) + error = self._deserialize(models.ApiError, response) + raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) + + if cls: + return cls(pipeline_response, None, {}) + + delete.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{groupName}/providers/Microsoft.DataMigration/services/{serviceName}/projects/{projectName}/tasks/{taskName}'} # type: ignore + + async def update( + self, + group_name: str, + service_name: str, + project_name: str, + task_name: str, + parameters: "models.ProjectTask", + **kwargs + ) -> "models.ProjectTask": + """Create or update task. + + The tasks resource is a nested, proxy-only resource representing work performed by a DMS + instance. The PATCH method updates an existing task, but since tasks have no mutable custom + properties, there is little reason to do so. + + :param group_name: Name of the resource group. + :type group_name: str + :param service_name: Name of the service. + :type service_name: str + :param project_name: Name of the project. + :type project_name: str + :param task_name: Name of the Task. + :type task_name: str + :param parameters: Information about the task. + :type parameters: ~azure.mgmt.datamigration.models.ProjectTask + :keyword callable cls: A custom type or function that will be passed the direct response + :return: ProjectTask, or the result of cls(response) + :rtype: ~azure.mgmt.datamigration.models.ProjectTask + :raises: ~azure.core.exceptions.HttpResponseError + """ + cls = kwargs.pop('cls', None) # type: ClsType["models.ProjectTask"] + error_map = { + 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError + } + error_map.update(kwargs.pop('error_map', {})) + api_version = "2021-10-30-preview" + content_type = kwargs.pop("content_type", "application/json") + accept = "application/json" + + # Construct URL + url = self.update.metadata['url'] # type: ignore + path_format_arguments = { + 'subscriptionId': self._serialize.url("self._config.subscription_id", self._config.subscription_id, 'str'), + 'groupName': self._serialize.url("group_name", group_name, 'str'), + 'serviceName': self._serialize.url("service_name", service_name, 'str'), + 'projectName': self._serialize.url("project_name", project_name, 'str'), + 'taskName': self._serialize.url("task_name", task_name, 'str'), + } + url = self._client.format_url(url, **path_format_arguments) + + # Construct parameters + query_parameters = {} # type: Dict[str, Any] + query_parameters['api-version'] = self._serialize.query("api_version", api_version, 'str') + + # Construct headers + header_parameters = {} # type: Dict[str, Any] + header_parameters['Content-Type'] = self._serialize.header("content_type", content_type, 'str') + header_parameters['Accept'] = self._serialize.header("accept", accept, 'str') + + body_content_kwargs = {} # type: Dict[str, Any] + body_content = self._serialize.body(parameters, 'ProjectTask') + body_content_kwargs['content'] = body_content + request = self._client.patch(url, query_parameters, header_parameters, **body_content_kwargs) + pipeline_response = await self._client._pipeline.run(request, stream=False, **kwargs) + response = pipeline_response.http_response + + if response.status_code not in [200]: + map_error(status_code=response.status_code, response=response, error_map=error_map) + error = self._deserialize(models.ApiError, response) + raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) + + deserialized = self._deserialize('ProjectTask', pipeline_response) + + if cls: + return cls(pipeline_response, deserialized, {}) + + return deserialized + update.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{groupName}/providers/Microsoft.DataMigration/services/{serviceName}/projects/{projectName}/tasks/{taskName}'} # type: ignore + + async def cancel( + self, + group_name: str, + service_name: str, + project_name: str, + task_name: str, + **kwargs + ) -> "models.ProjectTask": + """Cancel a task. + + The tasks resource is a nested, proxy-only resource representing work performed by a DMS + instance. This method cancels a task if it's currently queued or running. + + :param group_name: Name of the resource group. + :type group_name: str + :param service_name: Name of the service. + :type service_name: str + :param project_name: Name of the project. + :type project_name: str + :param task_name: Name of the Task. + :type task_name: str + :keyword callable cls: A custom type or function that will be passed the direct response + :return: ProjectTask, or the result of cls(response) + :rtype: ~azure.mgmt.datamigration.models.ProjectTask + :raises: ~azure.core.exceptions.HttpResponseError + """ + cls = kwargs.pop('cls', None) # type: ClsType["models.ProjectTask"] + error_map = { + 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError + } + error_map.update(kwargs.pop('error_map', {})) + api_version = "2021-10-30-preview" + accept = "application/json" + + # Construct URL + url = self.cancel.metadata['url'] # type: ignore + path_format_arguments = { + 'subscriptionId': self._serialize.url("self._config.subscription_id", self._config.subscription_id, 'str'), + 'groupName': self._serialize.url("group_name", group_name, 'str'), + 'serviceName': self._serialize.url("service_name", service_name, 'str'), + 'projectName': self._serialize.url("project_name", project_name, 'str'), + 'taskName': self._serialize.url("task_name", task_name, 'str'), + } + url = self._client.format_url(url, **path_format_arguments) + + # Construct parameters + query_parameters = {} # type: Dict[str, Any] + query_parameters['api-version'] = self._serialize.query("api_version", api_version, 'str') + + # Construct headers + header_parameters = {} # type: Dict[str, Any] + header_parameters['Accept'] = self._serialize.header("accept", accept, 'str') + + request = self._client.post(url, query_parameters, header_parameters) + pipeline_response = await self._client._pipeline.run(request, stream=False, **kwargs) + response = pipeline_response.http_response + + if response.status_code not in [200]: + map_error(status_code=response.status_code, response=response, error_map=error_map) + error = self._deserialize(models.ApiError, response) + raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) + + deserialized = self._deserialize('ProjectTask', pipeline_response) + + if cls: + return cls(pipeline_response, deserialized, {}) + + return deserialized + cancel.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{groupName}/providers/Microsoft.DataMigration/services/{serviceName}/projects/{projectName}/tasks/{taskName}/cancel'} # type: ignore + + async def command( + self, + group_name: str, + service_name: str, + project_name: str, + task_name: str, + parameters: "models.CommandProperties", + **kwargs + ) -> "models.CommandProperties": + """Execute a command on a task. + + The tasks resource is a nested, proxy-only resource representing work performed by a DMS + instance. This method executes a command on a running task. + + :param group_name: Name of the resource group. + :type group_name: str + :param service_name: Name of the service. + :type service_name: str + :param project_name: Name of the project. + :type project_name: str + :param task_name: Name of the Task. + :type task_name: str + :param parameters: Command to execute. + :type parameters: ~azure.mgmt.datamigration.models.CommandProperties + :keyword callable cls: A custom type or function that will be passed the direct response + :return: CommandProperties, or the result of cls(response) + :rtype: ~azure.mgmt.datamigration.models.CommandProperties + :raises: ~azure.core.exceptions.HttpResponseError + """ + cls = kwargs.pop('cls', None) # type: ClsType["models.CommandProperties"] + error_map = { + 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError + } + error_map.update(kwargs.pop('error_map', {})) + api_version = "2021-10-30-preview" + content_type = kwargs.pop("content_type", "application/json") + accept = "application/json" + + # Construct URL + url = self.command.metadata['url'] # type: ignore + path_format_arguments = { + 'subscriptionId': self._serialize.url("self._config.subscription_id", self._config.subscription_id, 'str'), + 'groupName': self._serialize.url("group_name", group_name, 'str'), + 'serviceName': self._serialize.url("service_name", service_name, 'str'), + 'projectName': self._serialize.url("project_name", project_name, 'str'), + 'taskName': self._serialize.url("task_name", task_name, 'str'), + } + url = self._client.format_url(url, **path_format_arguments) + + # Construct parameters + query_parameters = {} # type: Dict[str, Any] + query_parameters['api-version'] = self._serialize.query("api_version", api_version, 'str') + + # Construct headers + header_parameters = {} # type: Dict[str, Any] + header_parameters['Content-Type'] = self._serialize.header("content_type", content_type, 'str') + header_parameters['Accept'] = self._serialize.header("accept", accept, 'str') + + body_content_kwargs = {} # type: Dict[str, Any] + body_content = self._serialize.body(parameters, 'CommandProperties') + body_content_kwargs['content'] = body_content + request = self._client.post(url, query_parameters, header_parameters, **body_content_kwargs) + pipeline_response = await self._client._pipeline.run(request, stream=False, **kwargs) + response = pipeline_response.http_response + + if response.status_code not in [200]: + map_error(status_code=response.status_code, response=response, error_map=error_map) + error = self._deserialize(models.ApiError, response) + raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) + + deserialized = self._deserialize('CommandProperties', pipeline_response) + + if cls: + return cls(pipeline_response, deserialized, {}) + + return deserialized + command.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{groupName}/providers/Microsoft.DataMigration/services/{serviceName}/projects/{projectName}/tasks/{taskName}/command'} # type: ignore diff --git a/src/datamigration/azext_datamigration/vendored_sdks/datamigration/aio/operations/_usages_operations.py b/src/datamigration/azext_datamigration/vendored_sdks/datamigration/aio/operations/_usages_operations.py new file mode 100644 index 00000000000..e890dfc8add --- /dev/null +++ b/src/datamigration/azext_datamigration/vendored_sdks/datamigration/aio/operations/_usages_operations.py @@ -0,0 +1,116 @@ +# coding=utf-8 +# -------------------------------------------------------------------------- +# Copyright (c) Microsoft Corporation. All rights reserved. +# Licensed under the MIT License. See License.txt in the project root for license information. +# Code generated by Microsoft (R) AutoRest Code Generator. +# Changes may cause incorrect behavior and will be lost if the code is regenerated. +# -------------------------------------------------------------------------- +from typing import Any, AsyncIterable, Callable, Dict, Generic, Optional, TypeVar +import warnings + +from azure.core.async_paging import AsyncItemPaged, AsyncList +from azure.core.exceptions import ClientAuthenticationError, HttpResponseError, ResourceExistsError, ResourceNotFoundError, map_error +from azure.core.pipeline import PipelineResponse +from azure.core.pipeline.transport import AsyncHttpResponse, HttpRequest +from azure.mgmt.core.exceptions import ARMErrorFormat + +from ... import models + +T = TypeVar('T') +ClsType = Optional[Callable[[PipelineResponse[HttpRequest, AsyncHttpResponse], T, Dict[str, Any]], Any]] + +class UsagesOperations: + """UsagesOperations async operations. + + You should not instantiate this class directly. Instead, you should create a Client instance that + instantiates it for you and attaches it as an attribute. + + :ivar models: Alias to model classes used in this operation group. + :type models: ~azure.mgmt.datamigration.models + :param client: Client for service requests. + :param config: Configuration of service client. + :param serializer: An object model serializer. + :param deserializer: An object model deserializer. + """ + + models = models + + def __init__(self, client, config, serializer, deserializer) -> None: + self._client = client + self._serialize = serializer + self._deserialize = deserializer + self._config = config + + def list( + self, + location: str, + **kwargs + ) -> AsyncIterable["models.QuotaList"]: + """Get resource quotas and usage information. + + This method returns region-specific quotas and resource usage information for the Database + Migration Service. + + :param location: The Azure region of the operation. + :type location: str + :keyword callable cls: A custom type or function that will be passed the direct response + :return: An iterator like instance of either QuotaList or the result of cls(response) + :rtype: ~azure.core.async_paging.AsyncItemPaged[~azure.mgmt.datamigration.models.QuotaList] + :raises: ~azure.core.exceptions.HttpResponseError + """ + cls = kwargs.pop('cls', None) # type: ClsType["models.QuotaList"] + error_map = { + 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError + } + error_map.update(kwargs.pop('error_map', {})) + api_version = "2021-10-30-preview" + accept = "application/json" + + def prepare_request(next_link=None): + # Construct headers + header_parameters = {} # type: Dict[str, Any] + header_parameters['Accept'] = self._serialize.header("accept", accept, 'str') + + if not next_link: + # Construct URL + url = self.list.metadata['url'] # type: ignore + path_format_arguments = { + 'subscriptionId': self._serialize.url("self._config.subscription_id", self._config.subscription_id, 'str'), + 'location': self._serialize.url("location", location, 'str'), + } + url = self._client.format_url(url, **path_format_arguments) + # Construct parameters + query_parameters = {} # type: Dict[str, Any] + query_parameters['api-version'] = self._serialize.query("api_version", api_version, 'str') + + request = self._client.get(url, query_parameters, header_parameters) + else: + url = next_link + query_parameters = {} # type: Dict[str, Any] + request = self._client.get(url, query_parameters, header_parameters) + return request + + async def extract_data(pipeline_response): + deserialized = self._deserialize('QuotaList', pipeline_response) + list_of_elem = deserialized.value + if cls: + list_of_elem = cls(list_of_elem) + return deserialized.next_link or None, AsyncList(list_of_elem) + + async def get_next(next_link=None): + request = prepare_request(next_link) + + pipeline_response = await self._client._pipeline.run(request, stream=False, **kwargs) + response = pipeline_response.http_response + + if response.status_code not in [200]: + error = self._deserialize(models.ApiError, response) + map_error(status_code=response.status_code, response=response, error_map=error_map) + raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) + + return pipeline_response + + return AsyncItemPaged( + get_next, extract_data + ) + list.metadata = {'url': '/subscriptions/{subscriptionId}/providers/Microsoft.DataMigration/locations/{location}/usages'} # type: ignore diff --git a/src/datamigration/azext_datamigration/vendored_sdks/datamigration/models/__init__.py b/src/datamigration/azext_datamigration/vendored_sdks/datamigration/models/__init__.py new file mode 100644 index 00000000000..77792c9c315 --- /dev/null +++ b/src/datamigration/azext_datamigration/vendored_sdks/datamigration/models/__init__.py @@ -0,0 +1,1060 @@ +# coding=utf-8 +# -------------------------------------------------------------------------- +# Copyright (c) Microsoft Corporation. All rights reserved. +# Licensed under the MIT License. See License.txt in the project root for license information. +# Code generated by Microsoft (R) AutoRest Code Generator. +# Changes may cause incorrect behavior and will be lost if the code is regenerated. +# -------------------------------------------------------------------------- + +try: + from ._models_py3 import ApiError + from ._models_py3 import AuthenticationKeys + from ._models_py3 import AvailableServiceSku + from ._models_py3 import AvailableServiceSkuCapacity + from ._models_py3 import AvailableServiceSkuautogenerated + from ._models_py3 import AzureActiveDirectoryApp + from ._models_py3 import AzureBlob + from ._models_py3 import BackupConfiguration + from ._models_py3 import BackupFileInfo + from ._models_py3 import BackupSetInfo + from ._models_py3 import BlobShare + from ._models_py3 import CheckOciDriverTaskInput + from ._models_py3 import CheckOciDriverTaskOutput + from ._models_py3 import CheckOciDriverTaskProperties + from ._models_py3 import CommandProperties + from ._models_py3 import ConnectToMongoDbTaskProperties + from ._models_py3 import ConnectToSourceMySqlTaskInput + from ._models_py3 import ConnectToSourceMySqlTaskProperties + from ._models_py3 import ConnectToSourceNonSqlTaskOutput + from ._models_py3 import ConnectToSourceOracleSyncTaskInput + from ._models_py3 import ConnectToSourceOracleSyncTaskOutput + from ._models_py3 import ConnectToSourceOracleSyncTaskProperties + from ._models_py3 import ConnectToSourcePostgreSqlSyncTaskInput + from ._models_py3 import ConnectToSourcePostgreSqlSyncTaskOutput + from ._models_py3 import ConnectToSourcePostgreSqlSyncTaskProperties + from ._models_py3 import ConnectToSourceSqlServerSyncTaskProperties + from ._models_py3 import ConnectToSourceSqlServerTaskInput + from ._models_py3 import ConnectToSourceSqlServerTaskOutput + from ._models_py3 import ConnectToSourceSqlServerTaskOutputAgentJobLevel + from ._models_py3 import ConnectToSourceSqlServerTaskOutputDatabaseLevel + from ._models_py3 import ConnectToSourceSqlServerTaskOutputLoginLevel + from ._models_py3 import ConnectToSourceSqlServerTaskOutputTaskLevel + from ._models_py3 import ConnectToSourceSqlServerTaskProperties + from ._models_py3 import ConnectToTargetAzureDbForMySqlTaskInput + from ._models_py3 import ConnectToTargetAzureDbForMySqlTaskOutput + from ._models_py3 import ConnectToTargetAzureDbForMySqlTaskProperties + from ._models_py3 import ConnectToTargetAzureDbForPostgreSqlSyncTaskInput + from ._models_py3 import ConnectToTargetAzureDbForPostgreSqlSyncTaskOutput + from ._models_py3 import ConnectToTargetAzureDbForPostgreSqlSyncTaskProperties + from ._models_py3 import ConnectToTargetOracleAzureDbForPostgreSqlSyncTaskInput + from ._models_py3 import ConnectToTargetOracleAzureDbForPostgreSqlSyncTaskOutput + from ._models_py3 import ConnectToTargetOracleAzureDbForPostgreSqlSyncTaskOutputDatabaseSchemaMapItem + from ._models_py3 import ConnectToTargetOracleAzureDbForPostgreSqlSyncTaskProperties + from ._models_py3 import ConnectToTargetSqlDbSyncTaskInput + from ._models_py3 import ConnectToTargetSqlDbSyncTaskProperties + from ._models_py3 import ConnectToTargetSqlDbTaskInput + from ._models_py3 import ConnectToTargetSqlDbTaskOutput + from ._models_py3 import ConnectToTargetSqlDbTaskProperties + from ._models_py3 import ConnectToTargetSqlMiSyncTaskInput + from ._models_py3 import ConnectToTargetSqlMiSyncTaskOutput + from ._models_py3 import ConnectToTargetSqlMiSyncTaskProperties + from ._models_py3 import ConnectToTargetSqlMiTaskInput + from ._models_py3 import ConnectToTargetSqlMiTaskOutput + from ._models_py3 import ConnectToTargetSqlMiTaskProperties + from ._models_py3 import ConnectionInfo + from ._models_py3 import DataIntegrityValidationResult + from ._models_py3 import DataItemMigrationSummaryResult + from ._models_py3 import DataMigrationError + from ._models_py3 import DataMigrationProjectMetadata + from ._models_py3 import DataMigrationService + from ._models_py3 import DataMigrationServiceList + from ._models_py3 import DataMigrationServiceStatusResponse + from ._models_py3 import Database + from ._models_py3 import DatabaseBackupInfo + from ._models_py3 import DatabaseFileInfo + from ._models_py3 import DatabaseFileInput + from ._models_py3 import DatabaseInfo + from ._models_py3 import DatabaseMigration + from ._models_py3 import DatabaseMigrationListResult + from ._models_py3 import DatabaseMigrationProperties + from ._models_py3 import DatabaseMigrationPropertiesSqlMi + from ._models_py3 import DatabaseMigrationPropertiesSqlVm + from ._models_py3 import DatabaseMigrationSqlMi + from ._models_py3 import DatabaseMigrationSqlVm + from ._models_py3 import DatabaseObjectName + from ._models_py3 import DatabaseSummaryResult + from ._models_py3 import DatabaseTable + from ._models_py3 import DeleteNode + from ._models_py3 import ErrorInfo + from ._models_py3 import ExecutionStatistics + from ._models_py3 import FileList + from ._models_py3 import FileShare + from ._models_py3 import FileStorageInfo + from ._models_py3 import GetProjectDetailsNonSqlTaskInput + from ._models_py3 import GetTdeCertificatesSqlTaskInput + from ._models_py3 import GetTdeCertificatesSqlTaskOutput + from ._models_py3 import GetTdeCertificatesSqlTaskProperties + from ._models_py3 import GetUserTablesMySqlTaskInput + from ._models_py3 import GetUserTablesMySqlTaskOutput + from ._models_py3 import GetUserTablesMySqlTaskProperties + from ._models_py3 import GetUserTablesOracleTaskInput + from ._models_py3 import GetUserTablesOracleTaskOutput + from ._models_py3 import GetUserTablesOracleTaskProperties + from ._models_py3 import GetUserTablesPostgreSqlTaskInput + from ._models_py3 import GetUserTablesPostgreSqlTaskOutput + from ._models_py3 import GetUserTablesPostgreSqlTaskProperties + from ._models_py3 import GetUserTablesSqlSyncTaskInput + from ._models_py3 import GetUserTablesSqlSyncTaskOutput + from ._models_py3 import GetUserTablesSqlSyncTaskProperties + from ._models_py3 import GetUserTablesSqlTaskInput + from ._models_py3 import GetUserTablesSqlTaskOutput + from ._models_py3 import GetUserTablesSqlTaskProperties + from ._models_py3 import InstallOciDriverTaskInput + from ._models_py3 import InstallOciDriverTaskOutput + from ._models_py3 import InstallOciDriverTaskProperties + from ._models_py3 import IntegrationRuntimeMonitoringData + from ._models_py3 import MiSqlConnectionInfo + from ._models_py3 import MigrateMiSyncCompleteCommandInput + from ._models_py3 import MigrateMiSyncCompleteCommandOutput + from ._models_py3 import MigrateMiSyncCompleteCommandProperties + from ._models_py3 import MigrateMongoDbTaskProperties + from ._models_py3 import MigrateMySqlAzureDbForMySqlOfflineDatabaseInput + from ._models_py3 import MigrateMySqlAzureDbForMySqlOfflineTaskInput + from ._models_py3 import MigrateMySqlAzureDbForMySqlOfflineTaskOutput + from ._models_py3 import MigrateMySqlAzureDbForMySqlOfflineTaskOutputDatabaseLevel + from ._models_py3 import MigrateMySqlAzureDbForMySqlOfflineTaskOutputError + from ._models_py3 import MigrateMySqlAzureDbForMySqlOfflineTaskOutputMigrationLevel + from ._models_py3 import MigrateMySqlAzureDbForMySqlOfflineTaskOutputTableLevel + from ._models_py3 import MigrateMySqlAzureDbForMySqlOfflineTaskProperties + from ._models_py3 import MigrateMySqlAzureDbForMySqlSyncDatabaseInput + from ._models_py3 import MigrateMySqlAzureDbForMySqlSyncTaskInput + from ._models_py3 import MigrateMySqlAzureDbForMySqlSyncTaskOutput + from ._models_py3 import MigrateMySqlAzureDbForMySqlSyncTaskOutputDatabaseError + from ._models_py3 import MigrateMySqlAzureDbForMySqlSyncTaskOutputDatabaseLevel + from ._models_py3 import MigrateMySqlAzureDbForMySqlSyncTaskOutputError + from ._models_py3 import MigrateMySqlAzureDbForMySqlSyncTaskOutputMigrationLevel + from ._models_py3 import MigrateMySqlAzureDbForMySqlSyncTaskOutputTableLevel + from ._models_py3 import MigrateMySqlAzureDbForMySqlSyncTaskProperties + from ._models_py3 import MigrateOracleAzureDbForPostgreSqlSyncTaskProperties + from ._models_py3 import MigrateOracleAzureDbPostgreSqlSyncDatabaseInput + from ._models_py3 import MigrateOracleAzureDbPostgreSqlSyncTaskInput + from ._models_py3 import MigrateOracleAzureDbPostgreSqlSyncTaskOutput + from ._models_py3 import MigrateOracleAzureDbPostgreSqlSyncTaskOutputDatabaseError + from ._models_py3 import MigrateOracleAzureDbPostgreSqlSyncTaskOutputDatabaseLevel + from ._models_py3 import MigrateOracleAzureDbPostgreSqlSyncTaskOutputError + from ._models_py3 import MigrateOracleAzureDbPostgreSqlSyncTaskOutputMigrationLevel + from ._models_py3 import MigrateOracleAzureDbPostgreSqlSyncTaskOutputTableLevel + from ._models_py3 import MigratePostgreSqlAzureDbForPostgreSqlSyncDatabaseInput + from ._models_py3 import MigratePostgreSqlAzureDbForPostgreSqlSyncDatabaseTableInput + from ._models_py3 import MigratePostgreSqlAzureDbForPostgreSqlSyncTaskInput + from ._models_py3 import MigratePostgreSqlAzureDbForPostgreSqlSyncTaskOutput + from ._models_py3 import MigratePostgreSqlAzureDbForPostgreSqlSyncTaskOutputDatabaseError + from ._models_py3 import MigratePostgreSqlAzureDbForPostgreSqlSyncTaskOutputDatabaseLevel + from ._models_py3 import MigratePostgreSqlAzureDbForPostgreSqlSyncTaskOutputError + from ._models_py3 import MigratePostgreSqlAzureDbForPostgreSqlSyncTaskOutputMigrationLevel + from ._models_py3 import MigratePostgreSqlAzureDbForPostgreSqlSyncTaskOutputTableLevel + from ._models_py3 import MigratePostgreSqlAzureDbForPostgreSqlSyncTaskProperties + from ._models_py3 import MigrateSchemaSqlServerSqlDbDatabaseInput + from ._models_py3 import MigrateSchemaSqlServerSqlDbTaskInput + from ._models_py3 import MigrateSchemaSqlServerSqlDbTaskOutput + from ._models_py3 import MigrateSchemaSqlServerSqlDbTaskOutputDatabaseLevel + from ._models_py3 import MigrateSchemaSqlServerSqlDbTaskOutputError + from ._models_py3 import MigrateSchemaSqlServerSqlDbTaskOutputMigrationLevel + from ._models_py3 import MigrateSchemaSqlServerSqlDbTaskProperties + from ._models_py3 import MigrateSchemaSqlTaskOutputError + from ._models_py3 import MigrateSqlServerDatabaseInput + from ._models_py3 import MigrateSqlServerSqlDbDatabaseInput + from ._models_py3 import MigrateSqlServerSqlDbSyncDatabaseInput + from ._models_py3 import MigrateSqlServerSqlDbSyncTaskInput + from ._models_py3 import MigrateSqlServerSqlDbSyncTaskOutput + from ._models_py3 import MigrateSqlServerSqlDbSyncTaskOutputDatabaseError + from ._models_py3 import MigrateSqlServerSqlDbSyncTaskOutputDatabaseLevel + from ._models_py3 import MigrateSqlServerSqlDbSyncTaskOutputError + from ._models_py3 import MigrateSqlServerSqlDbSyncTaskOutputMigrationLevel + from ._models_py3 import MigrateSqlServerSqlDbSyncTaskOutputTableLevel + from ._models_py3 import MigrateSqlServerSqlDbSyncTaskProperties + from ._models_py3 import MigrateSqlServerSqlDbTaskInput + from ._models_py3 import MigrateSqlServerSqlDbTaskOutput + from ._models_py3 import MigrateSqlServerSqlDbTaskOutputDatabaseLevel + from ._models_py3 import MigrateSqlServerSqlDbTaskOutputDatabaseLevelValidationResult + from ._models_py3 import MigrateSqlServerSqlDbTaskOutputError + from ._models_py3 import MigrateSqlServerSqlDbTaskOutputMigrationLevel + from ._models_py3 import MigrateSqlServerSqlDbTaskOutputTableLevel + from ._models_py3 import MigrateSqlServerSqlDbTaskOutputValidationResult + from ._models_py3 import MigrateSqlServerSqlDbTaskProperties + from ._models_py3 import MigrateSqlServerSqlMiDatabaseInput + from ._models_py3 import MigrateSqlServerSqlMiSyncTaskInput + from ._models_py3 import MigrateSqlServerSqlMiSyncTaskOutput + from ._models_py3 import MigrateSqlServerSqlMiSyncTaskOutputDatabaseLevel + from ._models_py3 import MigrateSqlServerSqlMiSyncTaskOutputError + from ._models_py3 import MigrateSqlServerSqlMiSyncTaskOutputMigrationLevel + from ._models_py3 import MigrateSqlServerSqlMiSyncTaskProperties + from ._models_py3 import MigrateSqlServerSqlMiTaskInput + from ._models_py3 import MigrateSqlServerSqlMiTaskOutput + from ._models_py3 import MigrateSqlServerSqlMiTaskOutputAgentJobLevel + from ._models_py3 import MigrateSqlServerSqlMiTaskOutputDatabaseLevel + from ._models_py3 import MigrateSqlServerSqlMiTaskOutputError + from ._models_py3 import MigrateSqlServerSqlMiTaskOutputLoginLevel + from ._models_py3 import MigrateSqlServerSqlMiTaskOutputMigrationLevel + from ._models_py3 import MigrateSqlServerSqlMiTaskProperties + from ._models_py3 import MigrateSsisTaskInput + from ._models_py3 import MigrateSsisTaskOutput + from ._models_py3 import MigrateSsisTaskOutputMigrationLevel + from ._models_py3 import MigrateSsisTaskOutputProjectLevel + from ._models_py3 import MigrateSsisTaskProperties + from ._models_py3 import MigrateSyncCompleteCommandInput + from ._models_py3 import MigrateSyncCompleteCommandOutput + from ._models_py3 import MigrateSyncCompleteCommandProperties + from ._models_py3 import MigrationEligibilityInfo + from ._models_py3 import MigrationOperationInput + from ._models_py3 import MigrationReportResult + from ._models_py3 import MigrationStatusDetails + from ._models_py3 import MigrationTableMetadata + from ._models_py3 import MigrationValidationDatabaseLevelResult + from ._models_py3 import MigrationValidationDatabaseSummaryResult + from ._models_py3 import MigrationValidationOptions + from ._models_py3 import MigrationValidationResult + from ._models_py3 import MongoDbCancelCommand + from ._models_py3 import MongoDbClusterInfo + from ._models_py3 import MongoDbCollectionInfo + from ._models_py3 import MongoDbCollectionProgress + from ._models_py3 import MongoDbCollectionSettings + from ._models_py3 import MongoDbCommandInput + from ._models_py3 import MongoDbConnectionInfo + from ._models_py3 import MongoDbDatabaseInfo + from ._models_py3 import MongoDbDatabaseProgress + from ._models_py3 import MongoDbDatabaseSettings + from ._models_py3 import MongoDbError + from ._models_py3 import MongoDbFinishCommand + from ._models_py3 import MongoDbFinishCommandInput + from ._models_py3 import MongoDbMigrationProgress + from ._models_py3 import MongoDbMigrationSettings + from ._models_py3 import MongoDbObjectInfo + from ._models_py3 import MongoDbProgress + from ._models_py3 import MongoDbRestartCommand + from ._models_py3 import MongoDbShardKeyField + from ._models_py3 import MongoDbShardKeyInfo + from ._models_py3 import MongoDbShardKeySetting + from ._models_py3 import MongoDbThrottlingSettings + from ._models_py3 import MySqlConnectionInfo + from ._models_py3 import NameAvailabilityRequest + from ._models_py3 import NameAvailabilityResponse + from ._models_py3 import NodeMonitoringData + from ._models_py3 import NonSqlDataMigrationTable + from ._models_py3 import NonSqlDataMigrationTableResult + from ._models_py3 import NonSqlMigrationTaskInput + from ._models_py3 import NonSqlMigrationTaskOutput + from ._models_py3 import ODataError + from ._models_py3 import OfflineConfiguration + from ._models_py3 import OperationListResult + from ._models_py3 import OperationsDefinition + from ._models_py3 import OperationsDisplayDefinition + from ._models_py3 import OracleConnectionInfo + from ._models_py3 import OracleOciDriverInfo + from ._models_py3 import OrphanedUserInfo + from ._models_py3 import PostgreSqlConnectionInfo + from ._models_py3 import Project + from ._models_py3 import ProjectFile + from ._models_py3 import ProjectFileProperties + from ._models_py3 import ProjectList + from ._models_py3 import ProjectTask + from ._models_py3 import ProjectTaskProperties + from ._models_py3 import ProxyResource + from ._models_py3 import QueryAnalysisValidationResult + from ._models_py3 import QueryExecutionResult + from ._models_py3 import Quota + from ._models_py3 import QuotaList + from ._models_py3 import QuotaName + from ._models_py3 import RegenAuthKeys + from ._models_py3 import ReportableException + from ._models_py3 import Resource + from ._models_py3 import ResourceSku + from ._models_py3 import ResourceSkuCapabilities + from ._models_py3 import ResourceSkuCapacity + from ._models_py3 import ResourceSkuCosts + from ._models_py3 import ResourceSkuRestrictions + from ._models_py3 import ResourceSkusResult + from ._models_py3 import SchemaComparisonValidationResult + from ._models_py3 import SchemaComparisonValidationResultType + from ._models_py3 import SchemaMigrationSetting + from ._models_py3 import SelectedCertificateInput + from ._models_py3 import ServerProperties + from ._models_py3 import ServiceOperation + from ._models_py3 import ServiceOperationDisplay + from ._models_py3 import ServiceOperationList + from ._models_py3 import ServiceSku + from ._models_py3 import ServiceSkuList + from ._models_py3 import SourceLocation + from ._models_py3 import SqlBackupFileInfo + from ._models_py3 import SqlBackupSetInfo + from ._models_py3 import SqlConnectionInfo + from ._models_py3 import SqlConnectionInformation + from ._models_py3 import SqlFileShare + from ._models_py3 import SqlMigrationListResult + from ._models_py3 import SqlMigrationService + from ._models_py3 import SqlMigrationServiceUpdate + from ._models_py3 import SqlMigrationTaskInput + from ._models_py3 import SqlServerSqlMiSyncTaskInput + from ._models_py3 import SsisMigrationInfo + from ._models_py3 import StartMigrationScenarioServerRoleResult + from ._models_py3 import SyncMigrationDatabaseErrorEvent + from ._models_py3 import SystemData + from ._models_py3 import TargetLocation + from ._models_py3 import TaskList + from ._models_py3 import TrackedResource + from ._models_py3 import UploadOciDriverTaskInput + from ._models_py3 import UploadOciDriverTaskOutput + from ._models_py3 import UploadOciDriverTaskProperties + from ._models_py3 import ValidateMigrationInputSqlServerSqlDbSyncTaskProperties + from ._models_py3 import ValidateMigrationInputSqlServerSqlMiSyncTaskInput + from ._models_py3 import ValidateMigrationInputSqlServerSqlMiSyncTaskOutput + from ._models_py3 import ValidateMigrationInputSqlServerSqlMiSyncTaskProperties + from ._models_py3 import ValidateMigrationInputSqlServerSqlMiTaskInput + from ._models_py3 import ValidateMigrationInputSqlServerSqlMiTaskOutput + from ._models_py3 import ValidateMigrationInputSqlServerSqlMiTaskProperties + from ._models_py3 import ValidateMongoDbTaskProperties + from ._models_py3 import ValidateOracleAzureDbForPostgreSqlSyncTaskProperties + from ._models_py3 import ValidateOracleAzureDbPostgreSqlSyncTaskOutput + from ._models_py3 import ValidateSyncMigrationInputSqlServerTaskInput + from ._models_py3 import ValidateSyncMigrationInputSqlServerTaskOutput + from ._models_py3 import ValidationError + from ._models_py3 import WaitStatistics +except (SyntaxError, ImportError): + from ._models import ApiError # type: ignore + from ._models import AuthenticationKeys # type: ignore + from ._models import AvailableServiceSku # type: ignore + from ._models import AvailableServiceSkuCapacity # type: ignore + from ._models import AvailableServiceSkuautogenerated # type: ignore + from ._models import AzureActiveDirectoryApp # type: ignore + from ._models import AzureBlob # type: ignore + from ._models import BackupConfiguration # type: ignore + from ._models import BackupFileInfo # type: ignore + from ._models import BackupSetInfo # type: ignore + from ._models import BlobShare # type: ignore + from ._models import CheckOciDriverTaskInput # type: ignore + from ._models import CheckOciDriverTaskOutput # type: ignore + from ._models import CheckOciDriverTaskProperties # type: ignore + from ._models import CommandProperties # type: ignore + from ._models import ConnectToMongoDbTaskProperties # type: ignore + from ._models import ConnectToSourceMySqlTaskInput # type: ignore + from ._models import ConnectToSourceMySqlTaskProperties # type: ignore + from ._models import ConnectToSourceNonSqlTaskOutput # type: ignore + from ._models import ConnectToSourceOracleSyncTaskInput # type: ignore + from ._models import ConnectToSourceOracleSyncTaskOutput # type: ignore + from ._models import ConnectToSourceOracleSyncTaskProperties # type: ignore + from ._models import ConnectToSourcePostgreSqlSyncTaskInput # type: ignore + from ._models import ConnectToSourcePostgreSqlSyncTaskOutput # type: ignore + from ._models import ConnectToSourcePostgreSqlSyncTaskProperties # type: ignore + from ._models import ConnectToSourceSqlServerSyncTaskProperties # type: ignore + from ._models import ConnectToSourceSqlServerTaskInput # type: ignore + from ._models import ConnectToSourceSqlServerTaskOutput # type: ignore + from ._models import ConnectToSourceSqlServerTaskOutputAgentJobLevel # type: ignore + from ._models import ConnectToSourceSqlServerTaskOutputDatabaseLevel # type: ignore + from ._models import ConnectToSourceSqlServerTaskOutputLoginLevel # type: ignore + from ._models import ConnectToSourceSqlServerTaskOutputTaskLevel # type: ignore + from ._models import ConnectToSourceSqlServerTaskProperties # type: ignore + from ._models import ConnectToTargetAzureDbForMySqlTaskInput # type: ignore + from ._models import ConnectToTargetAzureDbForMySqlTaskOutput # type: ignore + from ._models import ConnectToTargetAzureDbForMySqlTaskProperties # type: ignore + from ._models import ConnectToTargetAzureDbForPostgreSqlSyncTaskInput # type: ignore + from ._models import ConnectToTargetAzureDbForPostgreSqlSyncTaskOutput # type: ignore + from ._models import ConnectToTargetAzureDbForPostgreSqlSyncTaskProperties # type: ignore + from ._models import ConnectToTargetOracleAzureDbForPostgreSqlSyncTaskInput # type: ignore + from ._models import ConnectToTargetOracleAzureDbForPostgreSqlSyncTaskOutput # type: ignore + from ._models import ConnectToTargetOracleAzureDbForPostgreSqlSyncTaskOutputDatabaseSchemaMapItem # type: ignore + from ._models import ConnectToTargetOracleAzureDbForPostgreSqlSyncTaskProperties # type: ignore + from ._models import ConnectToTargetSqlDbSyncTaskInput # type: ignore + from ._models import ConnectToTargetSqlDbSyncTaskProperties # type: ignore + from ._models import ConnectToTargetSqlDbTaskInput # type: ignore + from ._models import ConnectToTargetSqlDbTaskOutput # type: ignore + from ._models import ConnectToTargetSqlDbTaskProperties # type: ignore + from ._models import ConnectToTargetSqlMiSyncTaskInput # type: ignore + from ._models import ConnectToTargetSqlMiSyncTaskOutput # type: ignore + from ._models import ConnectToTargetSqlMiSyncTaskProperties # type: ignore + from ._models import ConnectToTargetSqlMiTaskInput # type: ignore + from ._models import ConnectToTargetSqlMiTaskOutput # type: ignore + from ._models import ConnectToTargetSqlMiTaskProperties # type: ignore + from ._models import ConnectionInfo # type: ignore + from ._models import DataIntegrityValidationResult # type: ignore + from ._models import DataItemMigrationSummaryResult # type: ignore + from ._models import DataMigrationError # type: ignore + from ._models import DataMigrationProjectMetadata # type: ignore + from ._models import DataMigrationService # type: ignore + from ._models import DataMigrationServiceList # type: ignore + from ._models import DataMigrationServiceStatusResponse # type: ignore + from ._models import Database # type: ignore + from ._models import DatabaseBackupInfo # type: ignore + from ._models import DatabaseFileInfo # type: ignore + from ._models import DatabaseFileInput # type: ignore + from ._models import DatabaseInfo # type: ignore + from ._models import DatabaseMigration # type: ignore + from ._models import DatabaseMigrationListResult # type: ignore + from ._models import DatabaseMigrationProperties # type: ignore + from ._models import DatabaseMigrationPropertiesSqlMi # type: ignore + from ._models import DatabaseMigrationPropertiesSqlVm # type: ignore + from ._models import DatabaseMigrationSqlMi # type: ignore + from ._models import DatabaseMigrationSqlVm # type: ignore + from ._models import DatabaseObjectName # type: ignore + from ._models import DatabaseSummaryResult # type: ignore + from ._models import DatabaseTable # type: ignore + from ._models import DeleteNode # type: ignore + from ._models import ErrorInfo # type: ignore + from ._models import ExecutionStatistics # type: ignore + from ._models import FileList # type: ignore + from ._models import FileShare # type: ignore + from ._models import FileStorageInfo # type: ignore + from ._models import GetProjectDetailsNonSqlTaskInput # type: ignore + from ._models import GetTdeCertificatesSqlTaskInput # type: ignore + from ._models import GetTdeCertificatesSqlTaskOutput # type: ignore + from ._models import GetTdeCertificatesSqlTaskProperties # type: ignore + from ._models import GetUserTablesMySqlTaskInput # type: ignore + from ._models import GetUserTablesMySqlTaskOutput # type: ignore + from ._models import GetUserTablesMySqlTaskProperties # type: ignore + from ._models import GetUserTablesOracleTaskInput # type: ignore + from ._models import GetUserTablesOracleTaskOutput # type: ignore + from ._models import GetUserTablesOracleTaskProperties # type: ignore + from ._models import GetUserTablesPostgreSqlTaskInput # type: ignore + from ._models import GetUserTablesPostgreSqlTaskOutput # type: ignore + from ._models import GetUserTablesPostgreSqlTaskProperties # type: ignore + from ._models import GetUserTablesSqlSyncTaskInput # type: ignore + from ._models import GetUserTablesSqlSyncTaskOutput # type: ignore + from ._models import GetUserTablesSqlSyncTaskProperties # type: ignore + from ._models import GetUserTablesSqlTaskInput # type: ignore + from ._models import GetUserTablesSqlTaskOutput # type: ignore + from ._models import GetUserTablesSqlTaskProperties # type: ignore + from ._models import InstallOciDriverTaskInput # type: ignore + from ._models import InstallOciDriverTaskOutput # type: ignore + from ._models import InstallOciDriverTaskProperties # type: ignore + from ._models import IntegrationRuntimeMonitoringData # type: ignore + from ._models import MiSqlConnectionInfo # type: ignore + from ._models import MigrateMiSyncCompleteCommandInput # type: ignore + from ._models import MigrateMiSyncCompleteCommandOutput # type: ignore + from ._models import MigrateMiSyncCompleteCommandProperties # type: ignore + from ._models import MigrateMongoDbTaskProperties # type: ignore + from ._models import MigrateMySqlAzureDbForMySqlOfflineDatabaseInput # type: ignore + from ._models import MigrateMySqlAzureDbForMySqlOfflineTaskInput # type: ignore + from ._models import MigrateMySqlAzureDbForMySqlOfflineTaskOutput # type: ignore + from ._models import MigrateMySqlAzureDbForMySqlOfflineTaskOutputDatabaseLevel # type: ignore + from ._models import MigrateMySqlAzureDbForMySqlOfflineTaskOutputError # type: ignore + from ._models import MigrateMySqlAzureDbForMySqlOfflineTaskOutputMigrationLevel # type: ignore + from ._models import MigrateMySqlAzureDbForMySqlOfflineTaskOutputTableLevel # type: ignore + from ._models import MigrateMySqlAzureDbForMySqlOfflineTaskProperties # type: ignore + from ._models import MigrateMySqlAzureDbForMySqlSyncDatabaseInput # type: ignore + from ._models import MigrateMySqlAzureDbForMySqlSyncTaskInput # type: ignore + from ._models import MigrateMySqlAzureDbForMySqlSyncTaskOutput # type: ignore + from ._models import MigrateMySqlAzureDbForMySqlSyncTaskOutputDatabaseError # type: ignore + from ._models import MigrateMySqlAzureDbForMySqlSyncTaskOutputDatabaseLevel # type: ignore + from ._models import MigrateMySqlAzureDbForMySqlSyncTaskOutputError # type: ignore + from ._models import MigrateMySqlAzureDbForMySqlSyncTaskOutputMigrationLevel # type: ignore + from ._models import MigrateMySqlAzureDbForMySqlSyncTaskOutputTableLevel # type: ignore + from ._models import MigrateMySqlAzureDbForMySqlSyncTaskProperties # type: ignore + from ._models import MigrateOracleAzureDbForPostgreSqlSyncTaskProperties # type: ignore + from ._models import MigrateOracleAzureDbPostgreSqlSyncDatabaseInput # type: ignore + from ._models import MigrateOracleAzureDbPostgreSqlSyncTaskInput # type: ignore + from ._models import MigrateOracleAzureDbPostgreSqlSyncTaskOutput # type: ignore + from ._models import MigrateOracleAzureDbPostgreSqlSyncTaskOutputDatabaseError # type: ignore + from ._models import MigrateOracleAzureDbPostgreSqlSyncTaskOutputDatabaseLevel # type: ignore + from ._models import MigrateOracleAzureDbPostgreSqlSyncTaskOutputError # type: ignore + from ._models import MigrateOracleAzureDbPostgreSqlSyncTaskOutputMigrationLevel # type: ignore + from ._models import MigrateOracleAzureDbPostgreSqlSyncTaskOutputTableLevel # type: ignore + from ._models import MigratePostgreSqlAzureDbForPostgreSqlSyncDatabaseInput # type: ignore + from ._models import MigratePostgreSqlAzureDbForPostgreSqlSyncDatabaseTableInput # type: ignore + from ._models import MigratePostgreSqlAzureDbForPostgreSqlSyncTaskInput # type: ignore + from ._models import MigratePostgreSqlAzureDbForPostgreSqlSyncTaskOutput # type: ignore + from ._models import MigratePostgreSqlAzureDbForPostgreSqlSyncTaskOutputDatabaseError # type: ignore + from ._models import MigratePostgreSqlAzureDbForPostgreSqlSyncTaskOutputDatabaseLevel # type: ignore + from ._models import MigratePostgreSqlAzureDbForPostgreSqlSyncTaskOutputError # type: ignore + from ._models import MigratePostgreSqlAzureDbForPostgreSqlSyncTaskOutputMigrationLevel # type: ignore + from ._models import MigratePostgreSqlAzureDbForPostgreSqlSyncTaskOutputTableLevel # type: ignore + from ._models import MigratePostgreSqlAzureDbForPostgreSqlSyncTaskProperties # type: ignore + from ._models import MigrateSchemaSqlServerSqlDbDatabaseInput # type: ignore + from ._models import MigrateSchemaSqlServerSqlDbTaskInput # type: ignore + from ._models import MigrateSchemaSqlServerSqlDbTaskOutput # type: ignore + from ._models import MigrateSchemaSqlServerSqlDbTaskOutputDatabaseLevel # type: ignore + from ._models import MigrateSchemaSqlServerSqlDbTaskOutputError # type: ignore + from ._models import MigrateSchemaSqlServerSqlDbTaskOutputMigrationLevel # type: ignore + from ._models import MigrateSchemaSqlServerSqlDbTaskProperties # type: ignore + from ._models import MigrateSchemaSqlTaskOutputError # type: ignore + from ._models import MigrateSqlServerDatabaseInput # type: ignore + from ._models import MigrateSqlServerSqlDbDatabaseInput # type: ignore + from ._models import MigrateSqlServerSqlDbSyncDatabaseInput # type: ignore + from ._models import MigrateSqlServerSqlDbSyncTaskInput # type: ignore + from ._models import MigrateSqlServerSqlDbSyncTaskOutput # type: ignore + from ._models import MigrateSqlServerSqlDbSyncTaskOutputDatabaseError # type: ignore + from ._models import MigrateSqlServerSqlDbSyncTaskOutputDatabaseLevel # type: ignore + from ._models import MigrateSqlServerSqlDbSyncTaskOutputError # type: ignore + from ._models import MigrateSqlServerSqlDbSyncTaskOutputMigrationLevel # type: ignore + from ._models import MigrateSqlServerSqlDbSyncTaskOutputTableLevel # type: ignore + from ._models import MigrateSqlServerSqlDbSyncTaskProperties # type: ignore + from ._models import MigrateSqlServerSqlDbTaskInput # type: ignore + from ._models import MigrateSqlServerSqlDbTaskOutput # type: ignore + from ._models import MigrateSqlServerSqlDbTaskOutputDatabaseLevel # type: ignore + from ._models import MigrateSqlServerSqlDbTaskOutputDatabaseLevelValidationResult # type: ignore + from ._models import MigrateSqlServerSqlDbTaskOutputError # type: ignore + from ._models import MigrateSqlServerSqlDbTaskOutputMigrationLevel # type: ignore + from ._models import MigrateSqlServerSqlDbTaskOutputTableLevel # type: ignore + from ._models import MigrateSqlServerSqlDbTaskOutputValidationResult # type: ignore + from ._models import MigrateSqlServerSqlDbTaskProperties # type: ignore + from ._models import MigrateSqlServerSqlMiDatabaseInput # type: ignore + from ._models import MigrateSqlServerSqlMiSyncTaskInput # type: ignore + from ._models import MigrateSqlServerSqlMiSyncTaskOutput # type: ignore + from ._models import MigrateSqlServerSqlMiSyncTaskOutputDatabaseLevel # type: ignore + from ._models import MigrateSqlServerSqlMiSyncTaskOutputError # type: ignore + from ._models import MigrateSqlServerSqlMiSyncTaskOutputMigrationLevel # type: ignore + from ._models import MigrateSqlServerSqlMiSyncTaskProperties # type: ignore + from ._models import MigrateSqlServerSqlMiTaskInput # type: ignore + from ._models import MigrateSqlServerSqlMiTaskOutput # type: ignore + from ._models import MigrateSqlServerSqlMiTaskOutputAgentJobLevel # type: ignore + from ._models import MigrateSqlServerSqlMiTaskOutputDatabaseLevel # type: ignore + from ._models import MigrateSqlServerSqlMiTaskOutputError # type: ignore + from ._models import MigrateSqlServerSqlMiTaskOutputLoginLevel # type: ignore + from ._models import MigrateSqlServerSqlMiTaskOutputMigrationLevel # type: ignore + from ._models import MigrateSqlServerSqlMiTaskProperties # type: ignore + from ._models import MigrateSsisTaskInput # type: ignore + from ._models import MigrateSsisTaskOutput # type: ignore + from ._models import MigrateSsisTaskOutputMigrationLevel # type: ignore + from ._models import MigrateSsisTaskOutputProjectLevel # type: ignore + from ._models import MigrateSsisTaskProperties # type: ignore + from ._models import MigrateSyncCompleteCommandInput # type: ignore + from ._models import MigrateSyncCompleteCommandOutput # type: ignore + from ._models import MigrateSyncCompleteCommandProperties # type: ignore + from ._models import MigrationEligibilityInfo # type: ignore + from ._models import MigrationOperationInput # type: ignore + from ._models import MigrationReportResult # type: ignore + from ._models import MigrationStatusDetails # type: ignore + from ._models import MigrationTableMetadata # type: ignore + from ._models import MigrationValidationDatabaseLevelResult # type: ignore + from ._models import MigrationValidationDatabaseSummaryResult # type: ignore + from ._models import MigrationValidationOptions # type: ignore + from ._models import MigrationValidationResult # type: ignore + from ._models import MongoDbCancelCommand # type: ignore + from ._models import MongoDbClusterInfo # type: ignore + from ._models import MongoDbCollectionInfo # type: ignore + from ._models import MongoDbCollectionProgress # type: ignore + from ._models import MongoDbCollectionSettings # type: ignore + from ._models import MongoDbCommandInput # type: ignore + from ._models import MongoDbConnectionInfo # type: ignore + from ._models import MongoDbDatabaseInfo # type: ignore + from ._models import MongoDbDatabaseProgress # type: ignore + from ._models import MongoDbDatabaseSettings # type: ignore + from ._models import MongoDbError # type: ignore + from ._models import MongoDbFinishCommand # type: ignore + from ._models import MongoDbFinishCommandInput # type: ignore + from ._models import MongoDbMigrationProgress # type: ignore + from ._models import MongoDbMigrationSettings # type: ignore + from ._models import MongoDbObjectInfo # type: ignore + from ._models import MongoDbProgress # type: ignore + from ._models import MongoDbRestartCommand # type: ignore + from ._models import MongoDbShardKeyField # type: ignore + from ._models import MongoDbShardKeyInfo # type: ignore + from ._models import MongoDbShardKeySetting # type: ignore + from ._models import MongoDbThrottlingSettings # type: ignore + from ._models import MySqlConnectionInfo # type: ignore + from ._models import NameAvailabilityRequest # type: ignore + from ._models import NameAvailabilityResponse # type: ignore + from ._models import NodeMonitoringData # type: ignore + from ._models import NonSqlDataMigrationTable # type: ignore + from ._models import NonSqlDataMigrationTableResult # type: ignore + from ._models import NonSqlMigrationTaskInput # type: ignore + from ._models import NonSqlMigrationTaskOutput # type: ignore + from ._models import ODataError # type: ignore + from ._models import OfflineConfiguration # type: ignore + from ._models import OperationListResult # type: ignore + from ._models import OperationsDefinition # type: ignore + from ._models import OperationsDisplayDefinition # type: ignore + from ._models import OracleConnectionInfo # type: ignore + from ._models import OracleOciDriverInfo # type: ignore + from ._models import OrphanedUserInfo # type: ignore + from ._models import PostgreSqlConnectionInfo # type: ignore + from ._models import Project # type: ignore + from ._models import ProjectFile # type: ignore + from ._models import ProjectFileProperties # type: ignore + from ._models import ProjectList # type: ignore + from ._models import ProjectTask # type: ignore + from ._models import ProjectTaskProperties # type: ignore + from ._models import ProxyResource # type: ignore + from ._models import QueryAnalysisValidationResult # type: ignore + from ._models import QueryExecutionResult # type: ignore + from ._models import Quota # type: ignore + from ._models import QuotaList # type: ignore + from ._models import QuotaName # type: ignore + from ._models import RegenAuthKeys # type: ignore + from ._models import ReportableException # type: ignore + from ._models import Resource # type: ignore + from ._models import ResourceSku # type: ignore + from ._models import ResourceSkuCapabilities # type: ignore + from ._models import ResourceSkuCapacity # type: ignore + from ._models import ResourceSkuCosts # type: ignore + from ._models import ResourceSkuRestrictions # type: ignore + from ._models import ResourceSkusResult # type: ignore + from ._models import SchemaComparisonValidationResult # type: ignore + from ._models import SchemaComparisonValidationResultType # type: ignore + from ._models import SchemaMigrationSetting # type: ignore + from ._models import SelectedCertificateInput # type: ignore + from ._models import ServerProperties # type: ignore + from ._models import ServiceOperation # type: ignore + from ._models import ServiceOperationDisplay # type: ignore + from ._models import ServiceOperationList # type: ignore + from ._models import ServiceSku # type: ignore + from ._models import ServiceSkuList # type: ignore + from ._models import SourceLocation # type: ignore + from ._models import SqlBackupFileInfo # type: ignore + from ._models import SqlBackupSetInfo # type: ignore + from ._models import SqlConnectionInfo # type: ignore + from ._models import SqlConnectionInformation # type: ignore + from ._models import SqlFileShare # type: ignore + from ._models import SqlMigrationListResult # type: ignore + from ._models import SqlMigrationService # type: ignore + from ._models import SqlMigrationServiceUpdate # type: ignore + from ._models import SqlMigrationTaskInput # type: ignore + from ._models import SqlServerSqlMiSyncTaskInput # type: ignore + from ._models import SsisMigrationInfo # type: ignore + from ._models import StartMigrationScenarioServerRoleResult # type: ignore + from ._models import SyncMigrationDatabaseErrorEvent # type: ignore + from ._models import SystemData # type: ignore + from ._models import TargetLocation # type: ignore + from ._models import TaskList # type: ignore + from ._models import TrackedResource # type: ignore + from ._models import UploadOciDriverTaskInput # type: ignore + from ._models import UploadOciDriverTaskOutput # type: ignore + from ._models import UploadOciDriverTaskProperties # type: ignore + from ._models import ValidateMigrationInputSqlServerSqlDbSyncTaskProperties # type: ignore + from ._models import ValidateMigrationInputSqlServerSqlMiSyncTaskInput # type: ignore + from ._models import ValidateMigrationInputSqlServerSqlMiSyncTaskOutput # type: ignore + from ._models import ValidateMigrationInputSqlServerSqlMiSyncTaskProperties # type: ignore + from ._models import ValidateMigrationInputSqlServerSqlMiTaskInput # type: ignore + from ._models import ValidateMigrationInputSqlServerSqlMiTaskOutput # type: ignore + from ._models import ValidateMigrationInputSqlServerSqlMiTaskProperties # type: ignore + from ._models import ValidateMongoDbTaskProperties # type: ignore + from ._models import ValidateOracleAzureDbForPostgreSqlSyncTaskProperties # type: ignore + from ._models import ValidateOracleAzureDbPostgreSqlSyncTaskOutput # type: ignore + from ._models import ValidateSyncMigrationInputSqlServerTaskInput # type: ignore + from ._models import ValidateSyncMigrationInputSqlServerTaskOutput # type: ignore + from ._models import ValidationError # type: ignore + from ._models import WaitStatistics # type: ignore + +from ._data_migration_management_client_enums import ( + AuthenticationType, + BackupFileStatus, + BackupMode, + BackupType, + CommandState, + CommandType, + CreatedByType, + DataMigrationResultCode, + DatabaseCompatLevel, + DatabaseFileType, + DatabaseMigrationStage, + DatabaseMigrationState, + DatabaseState, + ErrorType, + LoginMigrationStage, + LoginType, + MigrationState, + MigrationStatus, + MongoDbClusterType, + MongoDbErrorType, + MongoDbMigrationState, + MongoDbProgressResultType, + MongoDbReplication, + MongoDbShardKeyOrder, + MySqlTargetPlatformType, + NameCheckFailureReason, + ObjectType, + OperationOrigin, + ProjectProvisioningState, + ProjectSourcePlatform, + ProjectTargetPlatform, + ReplicateMigrationState, + ResourceSkuCapacityScaleType, + ResourceSkuRestrictionsReasonCode, + ResourceSkuRestrictionsType, + ResourceType, + ScenarioSource, + ScenarioTarget, + SchemaMigrationOption, + SchemaMigrationStage, + ServerLevelPermissionsGroup, + ServiceProvisioningState, + ServiceScalability, + Severity, + SqlSourcePlatform, + SsisMigrationOverwriteOption, + SsisMigrationStage, + SsisStoreType, + SyncDatabaseMigrationReportingState, + SyncTableMigrationState, + TaskState, + TaskType, + UpdateActionType, + ValidationStatus, +) + +__all__ = [ + 'ApiError', + 'AuthenticationKeys', + 'AvailableServiceSku', + 'AvailableServiceSkuCapacity', + 'AvailableServiceSkuautogenerated', + 'AzureActiveDirectoryApp', + 'AzureBlob', + 'BackupConfiguration', + 'BackupFileInfo', + 'BackupSetInfo', + 'BlobShare', + 'CheckOciDriverTaskInput', + 'CheckOciDriverTaskOutput', + 'CheckOciDriverTaskProperties', + 'CommandProperties', + 'ConnectToMongoDbTaskProperties', + 'ConnectToSourceMySqlTaskInput', + 'ConnectToSourceMySqlTaskProperties', + 'ConnectToSourceNonSqlTaskOutput', + 'ConnectToSourceOracleSyncTaskInput', + 'ConnectToSourceOracleSyncTaskOutput', + 'ConnectToSourceOracleSyncTaskProperties', + 'ConnectToSourcePostgreSqlSyncTaskInput', + 'ConnectToSourcePostgreSqlSyncTaskOutput', + 'ConnectToSourcePostgreSqlSyncTaskProperties', + 'ConnectToSourceSqlServerSyncTaskProperties', + 'ConnectToSourceSqlServerTaskInput', + 'ConnectToSourceSqlServerTaskOutput', + 'ConnectToSourceSqlServerTaskOutputAgentJobLevel', + 'ConnectToSourceSqlServerTaskOutputDatabaseLevel', + 'ConnectToSourceSqlServerTaskOutputLoginLevel', + 'ConnectToSourceSqlServerTaskOutputTaskLevel', + 'ConnectToSourceSqlServerTaskProperties', + 'ConnectToTargetAzureDbForMySqlTaskInput', + 'ConnectToTargetAzureDbForMySqlTaskOutput', + 'ConnectToTargetAzureDbForMySqlTaskProperties', + 'ConnectToTargetAzureDbForPostgreSqlSyncTaskInput', + 'ConnectToTargetAzureDbForPostgreSqlSyncTaskOutput', + 'ConnectToTargetAzureDbForPostgreSqlSyncTaskProperties', + 'ConnectToTargetOracleAzureDbForPostgreSqlSyncTaskInput', + 'ConnectToTargetOracleAzureDbForPostgreSqlSyncTaskOutput', + 'ConnectToTargetOracleAzureDbForPostgreSqlSyncTaskOutputDatabaseSchemaMapItem', + 'ConnectToTargetOracleAzureDbForPostgreSqlSyncTaskProperties', + 'ConnectToTargetSqlDbSyncTaskInput', + 'ConnectToTargetSqlDbSyncTaskProperties', + 'ConnectToTargetSqlDbTaskInput', + 'ConnectToTargetSqlDbTaskOutput', + 'ConnectToTargetSqlDbTaskProperties', + 'ConnectToTargetSqlMiSyncTaskInput', + 'ConnectToTargetSqlMiSyncTaskOutput', + 'ConnectToTargetSqlMiSyncTaskProperties', + 'ConnectToTargetSqlMiTaskInput', + 'ConnectToTargetSqlMiTaskOutput', + 'ConnectToTargetSqlMiTaskProperties', + 'ConnectionInfo', + 'DataIntegrityValidationResult', + 'DataItemMigrationSummaryResult', + 'DataMigrationError', + 'DataMigrationProjectMetadata', + 'DataMigrationService', + 'DataMigrationServiceList', + 'DataMigrationServiceStatusResponse', + 'Database', + 'DatabaseBackupInfo', + 'DatabaseFileInfo', + 'DatabaseFileInput', + 'DatabaseInfo', + 'DatabaseMigration', + 'DatabaseMigrationListResult', + 'DatabaseMigrationProperties', + 'DatabaseMigrationPropertiesSqlMi', + 'DatabaseMigrationPropertiesSqlVm', + 'DatabaseMigrationSqlMi', + 'DatabaseMigrationSqlVm', + 'DatabaseObjectName', + 'DatabaseSummaryResult', + 'DatabaseTable', + 'DeleteNode', + 'ErrorInfo', + 'ExecutionStatistics', + 'FileList', + 'FileShare', + 'FileStorageInfo', + 'GetProjectDetailsNonSqlTaskInput', + 'GetTdeCertificatesSqlTaskInput', + 'GetTdeCertificatesSqlTaskOutput', + 'GetTdeCertificatesSqlTaskProperties', + 'GetUserTablesMySqlTaskInput', + 'GetUserTablesMySqlTaskOutput', + 'GetUserTablesMySqlTaskProperties', + 'GetUserTablesOracleTaskInput', + 'GetUserTablesOracleTaskOutput', + 'GetUserTablesOracleTaskProperties', + 'GetUserTablesPostgreSqlTaskInput', + 'GetUserTablesPostgreSqlTaskOutput', + 'GetUserTablesPostgreSqlTaskProperties', + 'GetUserTablesSqlSyncTaskInput', + 'GetUserTablesSqlSyncTaskOutput', + 'GetUserTablesSqlSyncTaskProperties', + 'GetUserTablesSqlTaskInput', + 'GetUserTablesSqlTaskOutput', + 'GetUserTablesSqlTaskProperties', + 'InstallOciDriverTaskInput', + 'InstallOciDriverTaskOutput', + 'InstallOciDriverTaskProperties', + 'IntegrationRuntimeMonitoringData', + 'MiSqlConnectionInfo', + 'MigrateMiSyncCompleteCommandInput', + 'MigrateMiSyncCompleteCommandOutput', + 'MigrateMiSyncCompleteCommandProperties', + 'MigrateMongoDbTaskProperties', + 'MigrateMySqlAzureDbForMySqlOfflineDatabaseInput', + 'MigrateMySqlAzureDbForMySqlOfflineTaskInput', + 'MigrateMySqlAzureDbForMySqlOfflineTaskOutput', + 'MigrateMySqlAzureDbForMySqlOfflineTaskOutputDatabaseLevel', + 'MigrateMySqlAzureDbForMySqlOfflineTaskOutputError', + 'MigrateMySqlAzureDbForMySqlOfflineTaskOutputMigrationLevel', + 'MigrateMySqlAzureDbForMySqlOfflineTaskOutputTableLevel', + 'MigrateMySqlAzureDbForMySqlOfflineTaskProperties', + 'MigrateMySqlAzureDbForMySqlSyncDatabaseInput', + 'MigrateMySqlAzureDbForMySqlSyncTaskInput', + 'MigrateMySqlAzureDbForMySqlSyncTaskOutput', + 'MigrateMySqlAzureDbForMySqlSyncTaskOutputDatabaseError', + 'MigrateMySqlAzureDbForMySqlSyncTaskOutputDatabaseLevel', + 'MigrateMySqlAzureDbForMySqlSyncTaskOutputError', + 'MigrateMySqlAzureDbForMySqlSyncTaskOutputMigrationLevel', + 'MigrateMySqlAzureDbForMySqlSyncTaskOutputTableLevel', + 'MigrateMySqlAzureDbForMySqlSyncTaskProperties', + 'MigrateOracleAzureDbForPostgreSqlSyncTaskProperties', + 'MigrateOracleAzureDbPostgreSqlSyncDatabaseInput', + 'MigrateOracleAzureDbPostgreSqlSyncTaskInput', + 'MigrateOracleAzureDbPostgreSqlSyncTaskOutput', + 'MigrateOracleAzureDbPostgreSqlSyncTaskOutputDatabaseError', + 'MigrateOracleAzureDbPostgreSqlSyncTaskOutputDatabaseLevel', + 'MigrateOracleAzureDbPostgreSqlSyncTaskOutputError', + 'MigrateOracleAzureDbPostgreSqlSyncTaskOutputMigrationLevel', + 'MigrateOracleAzureDbPostgreSqlSyncTaskOutputTableLevel', + 'MigratePostgreSqlAzureDbForPostgreSqlSyncDatabaseInput', + 'MigratePostgreSqlAzureDbForPostgreSqlSyncDatabaseTableInput', + 'MigratePostgreSqlAzureDbForPostgreSqlSyncTaskInput', + 'MigratePostgreSqlAzureDbForPostgreSqlSyncTaskOutput', + 'MigratePostgreSqlAzureDbForPostgreSqlSyncTaskOutputDatabaseError', + 'MigratePostgreSqlAzureDbForPostgreSqlSyncTaskOutputDatabaseLevel', + 'MigratePostgreSqlAzureDbForPostgreSqlSyncTaskOutputError', + 'MigratePostgreSqlAzureDbForPostgreSqlSyncTaskOutputMigrationLevel', + 'MigratePostgreSqlAzureDbForPostgreSqlSyncTaskOutputTableLevel', + 'MigratePostgreSqlAzureDbForPostgreSqlSyncTaskProperties', + 'MigrateSchemaSqlServerSqlDbDatabaseInput', + 'MigrateSchemaSqlServerSqlDbTaskInput', + 'MigrateSchemaSqlServerSqlDbTaskOutput', + 'MigrateSchemaSqlServerSqlDbTaskOutputDatabaseLevel', + 'MigrateSchemaSqlServerSqlDbTaskOutputError', + 'MigrateSchemaSqlServerSqlDbTaskOutputMigrationLevel', + 'MigrateSchemaSqlServerSqlDbTaskProperties', + 'MigrateSchemaSqlTaskOutputError', + 'MigrateSqlServerDatabaseInput', + 'MigrateSqlServerSqlDbDatabaseInput', + 'MigrateSqlServerSqlDbSyncDatabaseInput', + 'MigrateSqlServerSqlDbSyncTaskInput', + 'MigrateSqlServerSqlDbSyncTaskOutput', + 'MigrateSqlServerSqlDbSyncTaskOutputDatabaseError', + 'MigrateSqlServerSqlDbSyncTaskOutputDatabaseLevel', + 'MigrateSqlServerSqlDbSyncTaskOutputError', + 'MigrateSqlServerSqlDbSyncTaskOutputMigrationLevel', + 'MigrateSqlServerSqlDbSyncTaskOutputTableLevel', + 'MigrateSqlServerSqlDbSyncTaskProperties', + 'MigrateSqlServerSqlDbTaskInput', + 'MigrateSqlServerSqlDbTaskOutput', + 'MigrateSqlServerSqlDbTaskOutputDatabaseLevel', + 'MigrateSqlServerSqlDbTaskOutputDatabaseLevelValidationResult', + 'MigrateSqlServerSqlDbTaskOutputError', + 'MigrateSqlServerSqlDbTaskOutputMigrationLevel', + 'MigrateSqlServerSqlDbTaskOutputTableLevel', + 'MigrateSqlServerSqlDbTaskOutputValidationResult', + 'MigrateSqlServerSqlDbTaskProperties', + 'MigrateSqlServerSqlMiDatabaseInput', + 'MigrateSqlServerSqlMiSyncTaskInput', + 'MigrateSqlServerSqlMiSyncTaskOutput', + 'MigrateSqlServerSqlMiSyncTaskOutputDatabaseLevel', + 'MigrateSqlServerSqlMiSyncTaskOutputError', + 'MigrateSqlServerSqlMiSyncTaskOutputMigrationLevel', + 'MigrateSqlServerSqlMiSyncTaskProperties', + 'MigrateSqlServerSqlMiTaskInput', + 'MigrateSqlServerSqlMiTaskOutput', + 'MigrateSqlServerSqlMiTaskOutputAgentJobLevel', + 'MigrateSqlServerSqlMiTaskOutputDatabaseLevel', + 'MigrateSqlServerSqlMiTaskOutputError', + 'MigrateSqlServerSqlMiTaskOutputLoginLevel', + 'MigrateSqlServerSqlMiTaskOutputMigrationLevel', + 'MigrateSqlServerSqlMiTaskProperties', + 'MigrateSsisTaskInput', + 'MigrateSsisTaskOutput', + 'MigrateSsisTaskOutputMigrationLevel', + 'MigrateSsisTaskOutputProjectLevel', + 'MigrateSsisTaskProperties', + 'MigrateSyncCompleteCommandInput', + 'MigrateSyncCompleteCommandOutput', + 'MigrateSyncCompleteCommandProperties', + 'MigrationEligibilityInfo', + 'MigrationOperationInput', + 'MigrationReportResult', + 'MigrationStatusDetails', + 'MigrationTableMetadata', + 'MigrationValidationDatabaseLevelResult', + 'MigrationValidationDatabaseSummaryResult', + 'MigrationValidationOptions', + 'MigrationValidationResult', + 'MongoDbCancelCommand', + 'MongoDbClusterInfo', + 'MongoDbCollectionInfo', + 'MongoDbCollectionProgress', + 'MongoDbCollectionSettings', + 'MongoDbCommandInput', + 'MongoDbConnectionInfo', + 'MongoDbDatabaseInfo', + 'MongoDbDatabaseProgress', + 'MongoDbDatabaseSettings', + 'MongoDbError', + 'MongoDbFinishCommand', + 'MongoDbFinishCommandInput', + 'MongoDbMigrationProgress', + 'MongoDbMigrationSettings', + 'MongoDbObjectInfo', + 'MongoDbProgress', + 'MongoDbRestartCommand', + 'MongoDbShardKeyField', + 'MongoDbShardKeyInfo', + 'MongoDbShardKeySetting', + 'MongoDbThrottlingSettings', + 'MySqlConnectionInfo', + 'NameAvailabilityRequest', + 'NameAvailabilityResponse', + 'NodeMonitoringData', + 'NonSqlDataMigrationTable', + 'NonSqlDataMigrationTableResult', + 'NonSqlMigrationTaskInput', + 'NonSqlMigrationTaskOutput', + 'ODataError', + 'OfflineConfiguration', + 'OperationListResult', + 'OperationsDefinition', + 'OperationsDisplayDefinition', + 'OracleConnectionInfo', + 'OracleOciDriverInfo', + 'OrphanedUserInfo', + 'PostgreSqlConnectionInfo', + 'Project', + 'ProjectFile', + 'ProjectFileProperties', + 'ProjectList', + 'ProjectTask', + 'ProjectTaskProperties', + 'ProxyResource', + 'QueryAnalysisValidationResult', + 'QueryExecutionResult', + 'Quota', + 'QuotaList', + 'QuotaName', + 'RegenAuthKeys', + 'ReportableException', + 'Resource', + 'ResourceSku', + 'ResourceSkuCapabilities', + 'ResourceSkuCapacity', + 'ResourceSkuCosts', + 'ResourceSkuRestrictions', + 'ResourceSkusResult', + 'SchemaComparisonValidationResult', + 'SchemaComparisonValidationResultType', + 'SchemaMigrationSetting', + 'SelectedCertificateInput', + 'ServerProperties', + 'ServiceOperation', + 'ServiceOperationDisplay', + 'ServiceOperationList', + 'ServiceSku', + 'ServiceSkuList', + 'SourceLocation', + 'SqlBackupFileInfo', + 'SqlBackupSetInfo', + 'SqlConnectionInfo', + 'SqlConnectionInformation', + 'SqlFileShare', + 'SqlMigrationListResult', + 'SqlMigrationService', + 'SqlMigrationServiceUpdate', + 'SqlMigrationTaskInput', + 'SqlServerSqlMiSyncTaskInput', + 'SsisMigrationInfo', + 'StartMigrationScenarioServerRoleResult', + 'SyncMigrationDatabaseErrorEvent', + 'SystemData', + 'TargetLocation', + 'TaskList', + 'TrackedResource', + 'UploadOciDriverTaskInput', + 'UploadOciDriverTaskOutput', + 'UploadOciDriverTaskProperties', + 'ValidateMigrationInputSqlServerSqlDbSyncTaskProperties', + 'ValidateMigrationInputSqlServerSqlMiSyncTaskInput', + 'ValidateMigrationInputSqlServerSqlMiSyncTaskOutput', + 'ValidateMigrationInputSqlServerSqlMiSyncTaskProperties', + 'ValidateMigrationInputSqlServerSqlMiTaskInput', + 'ValidateMigrationInputSqlServerSqlMiTaskOutput', + 'ValidateMigrationInputSqlServerSqlMiTaskProperties', + 'ValidateMongoDbTaskProperties', + 'ValidateOracleAzureDbForPostgreSqlSyncTaskProperties', + 'ValidateOracleAzureDbPostgreSqlSyncTaskOutput', + 'ValidateSyncMigrationInputSqlServerTaskInput', + 'ValidateSyncMigrationInputSqlServerTaskOutput', + 'ValidationError', + 'WaitStatistics', + 'AuthenticationType', + 'BackupFileStatus', + 'BackupMode', + 'BackupType', + 'CommandState', + 'CommandType', + 'CreatedByType', + 'DataMigrationResultCode', + 'DatabaseCompatLevel', + 'DatabaseFileType', + 'DatabaseMigrationStage', + 'DatabaseMigrationState', + 'DatabaseState', + 'ErrorType', + 'LoginMigrationStage', + 'LoginType', + 'MigrationState', + 'MigrationStatus', + 'MongoDbClusterType', + 'MongoDbErrorType', + 'MongoDbMigrationState', + 'MongoDbProgressResultType', + 'MongoDbReplication', + 'MongoDbShardKeyOrder', + 'MySqlTargetPlatformType', + 'NameCheckFailureReason', + 'ObjectType', + 'OperationOrigin', + 'ProjectProvisioningState', + 'ProjectSourcePlatform', + 'ProjectTargetPlatform', + 'ReplicateMigrationState', + 'ResourceSkuCapacityScaleType', + 'ResourceSkuRestrictionsReasonCode', + 'ResourceSkuRestrictionsType', + 'ResourceType', + 'ScenarioSource', + 'ScenarioTarget', + 'SchemaMigrationOption', + 'SchemaMigrationStage', + 'ServerLevelPermissionsGroup', + 'ServiceProvisioningState', + 'ServiceScalability', + 'Severity', + 'SqlSourcePlatform', + 'SsisMigrationOverwriteOption', + 'SsisMigrationStage', + 'SsisStoreType', + 'SyncDatabaseMigrationReportingState', + 'SyncTableMigrationState', + 'TaskState', + 'TaskType', + 'UpdateActionType', + 'ValidationStatus', +] diff --git a/src/datamigration/azext_datamigration/vendored_sdks/datamigration/models/_data_migration_management_client_enums.py b/src/datamigration/azext_datamigration/vendored_sdks/datamigration/models/_data_migration_management_client_enums.py new file mode 100644 index 00000000000..83afba661d7 --- /dev/null +++ b/src/datamigration/azext_datamigration/vendored_sdks/datamigration/models/_data_migration_management_client_enums.py @@ -0,0 +1,609 @@ +# coding=utf-8 +# -------------------------------------------------------------------------- +# Copyright (c) Microsoft Corporation. All rights reserved. +# Licensed under the MIT License. See License.txt in the project root for license information. +# Code generated by Microsoft (R) AutoRest Code Generator. +# Changes may cause incorrect behavior and will be lost if the code is regenerated. +# -------------------------------------------------------------------------- + +from enum import Enum, EnumMeta +from six import with_metaclass + +class _CaseInsensitiveEnumMeta(EnumMeta): + def __getitem__(self, name): + return super().__getitem__(name.upper()) + + def __getattr__(cls, name): + """Return the enum member matching `name` + We use __getattr__ instead of descriptors or inserting into the enum + class' __dict__ in order to support `name` and `value` being both + properties for enum members (which live in the class' __dict__) and + enum members themselves. + """ + try: + return cls._member_map_[name.upper()] + except KeyError: + raise AttributeError(name) + + +class AuthenticationType(with_metaclass(_CaseInsensitiveEnumMeta, str, Enum)): + """An enumeration of possible authentication types when connecting + """ + + NONE = "None" + WINDOWS_AUTHENTICATION = "WindowsAuthentication" + SQL_AUTHENTICATION = "SqlAuthentication" + ACTIVE_DIRECTORY_INTEGRATED = "ActiveDirectoryIntegrated" + ACTIVE_DIRECTORY_PASSWORD = "ActiveDirectoryPassword" + +class BackupFileStatus(with_metaclass(_CaseInsensitiveEnumMeta, str, Enum)): + """An enumeration of Status of the log backup file. + """ + + ARRIVED = "Arrived" + QUEUED = "Queued" + UPLOADING = "Uploading" + UPLOADED = "Uploaded" + RESTORING = "Restoring" + RESTORED = "Restored" + CANCELLED = "Cancelled" + +class BackupMode(with_metaclass(_CaseInsensitiveEnumMeta, str, Enum)): + """An enumeration of backup modes + """ + + CREATE_BACKUP = "CreateBackup" + EXISTING_BACKUP = "ExistingBackup" + +class BackupType(with_metaclass(_CaseInsensitiveEnumMeta, str, Enum)): + """Enum of the different backup types. + """ + + DATABASE = "Database" + TRANSACTION_LOG = "TransactionLog" + FILE = "File" + DIFFERENTIAL_DATABASE = "DifferentialDatabase" + DIFFERENTIAL_FILE = "DifferentialFile" + PARTIAL = "Partial" + DIFFERENTIAL_PARTIAL = "DifferentialPartial" + +class CommandState(with_metaclass(_CaseInsensitiveEnumMeta, str, Enum)): + """The state of the command. This is ignored if submitted. + """ + + UNKNOWN = "Unknown" + ACCEPTED = "Accepted" + RUNNING = "Running" + SUCCEEDED = "Succeeded" + FAILED = "Failed" + +class CommandType(with_metaclass(_CaseInsensitiveEnumMeta, str, Enum)): + """Command type. + """ + + MIGRATE_SYNC_COMPLETE_DATABASE = "Migrate.Sync.Complete.Database" + MIGRATE_SQL_SERVER_AZURE_DB_SQL_MI_COMPLETE = "Migrate.SqlServer.AzureDbSqlMi.Complete" + CANCEL = "cancel" + FINISH = "finish" + RESTART = "restart" + +class CreatedByType(with_metaclass(_CaseInsensitiveEnumMeta, str, Enum)): + + USER = "User" + APPLICATION = "Application" + MANAGED_IDENTITY = "ManagedIdentity" + KEY = "Key" + +class DatabaseCompatLevel(with_metaclass(_CaseInsensitiveEnumMeta, str, Enum)): + """An enumeration of SQL Server database compatibility levels + """ + + COMPAT_LEVEL80 = "CompatLevel80" + COMPAT_LEVEL90 = "CompatLevel90" + COMPAT_LEVEL100 = "CompatLevel100" + COMPAT_LEVEL110 = "CompatLevel110" + COMPAT_LEVEL120 = "CompatLevel120" + COMPAT_LEVEL130 = "CompatLevel130" + COMPAT_LEVEL140 = "CompatLevel140" + +class DatabaseFileType(with_metaclass(_CaseInsensitiveEnumMeta, str, Enum)): + """An enumeration of SQL Server database file types + """ + + ROWS = "Rows" + LOG = "Log" + FILESTREAM = "Filestream" + NOT_SUPPORTED = "NotSupported" + FULLTEXT = "Fulltext" + +class DatabaseMigrationStage(with_metaclass(_CaseInsensitiveEnumMeta, str, Enum)): + """Current stage of migration + """ + + NONE = "None" + INITIALIZE = "Initialize" + BACKUP = "Backup" + FILE_COPY = "FileCopy" + RESTORE = "Restore" + COMPLETED = "Completed" + +class DatabaseMigrationState(with_metaclass(_CaseInsensitiveEnumMeta, str, Enum)): + """Database level migration state. + """ + + UNDEFINED = "UNDEFINED" + INITIAL = "INITIAL" + FULL_BACKUP_UPLOAD_START = "FULL_BACKUP_UPLOAD_START" + LOG_SHIPPING_START = "LOG_SHIPPING_START" + UPLOAD_LOG_FILES_START = "UPLOAD_LOG_FILES_START" + CUTOVER_START = "CUTOVER_START" + POST_CUTOVER_COMPLETE = "POST_CUTOVER_COMPLETE" + COMPLETED = "COMPLETED" + CANCELLED = "CANCELLED" + FAILED = "FAILED" + +class DatabaseState(with_metaclass(_CaseInsensitiveEnumMeta, str, Enum)): + """An enumeration of SQL Server Database states + """ + + ONLINE = "Online" + RESTORING = "Restoring" + RECOVERING = "Recovering" + RECOVERY_PENDING = "RecoveryPending" + SUSPECT = "Suspect" + EMERGENCY = "Emergency" + OFFLINE = "Offline" + COPYING = "Copying" + OFFLINE_SECONDARY = "OfflineSecondary" + +class DataMigrationResultCode(with_metaclass(_CaseInsensitiveEnumMeta, str, Enum)): + """Result code of the data migration + """ + + INITIAL = "Initial" + COMPLETED = "Completed" + OBJECT_NOT_EXISTS_IN_SOURCE = "ObjectNotExistsInSource" + OBJECT_NOT_EXISTS_IN_TARGET = "ObjectNotExistsInTarget" + TARGET_OBJECT_IS_INACCESSIBLE = "TargetObjectIsInaccessible" + FATAL_ERROR = "FatalError" + +class ErrorType(with_metaclass(_CaseInsensitiveEnumMeta, str, Enum)): + """Error type + """ + + DEFAULT = "Default" + WARNING = "Warning" + ERROR = "Error" + +class LoginMigrationStage(with_metaclass(_CaseInsensitiveEnumMeta, str, Enum)): + """Enum of the different stage of login migration. + """ + + NONE = "None" + INITIALIZE = "Initialize" + LOGIN_MIGRATION = "LoginMigration" + ESTABLISH_USER_MAPPING = "EstablishUserMapping" + ASSIGN_ROLE_MEMBERSHIP = "AssignRoleMembership" + ASSIGN_ROLE_OWNERSHIP = "AssignRoleOwnership" + ESTABLISH_SERVER_PERMISSIONS = "EstablishServerPermissions" + ESTABLISH_OBJECT_PERMISSIONS = "EstablishObjectPermissions" + COMPLETED = "Completed" + +class LoginType(with_metaclass(_CaseInsensitiveEnumMeta, str, Enum)): + """Enum mapping of SMO LoginType. + """ + + WINDOWS_USER = "WindowsUser" + WINDOWS_GROUP = "WindowsGroup" + SQL_LOGIN = "SqlLogin" + CERTIFICATE = "Certificate" + ASYMMETRIC_KEY = "AsymmetricKey" + EXTERNAL_USER = "ExternalUser" + EXTERNAL_GROUP = "ExternalGroup" + +class MigrationState(with_metaclass(_CaseInsensitiveEnumMeta, str, Enum)): + """Current state of migration + """ + + NONE = "None" + IN_PROGRESS = "InProgress" + FAILED = "Failed" + WARNING = "Warning" + COMPLETED = "Completed" + SKIPPED = "Skipped" + STOPPED = "Stopped" + +class MigrationStatus(with_metaclass(_CaseInsensitiveEnumMeta, str, Enum)): + """Current status of migration + """ + + DEFAULT = "Default" + CONNECTING = "Connecting" + SOURCE_AND_TARGET_SELECTED = "SourceAndTargetSelected" + SELECT_LOGINS = "SelectLogins" + CONFIGURED = "Configured" + RUNNING = "Running" + ERROR = "Error" + STOPPED = "Stopped" + COMPLETED = "Completed" + COMPLETED_WITH_WARNINGS = "CompletedWithWarnings" + +class MongoDbClusterType(with_metaclass(_CaseInsensitiveEnumMeta, str, Enum)): + """The type of data source + """ + + BLOB_CONTAINER = "BlobContainer" + COSMOS_DB = "CosmosDb" + MONGO_DB = "MongoDb" + +class MongoDbErrorType(with_metaclass(_CaseInsensitiveEnumMeta, str, Enum)): + """The type of error or warning + """ + + ERROR = "Error" + VALIDATION_ERROR = "ValidationError" + WARNING = "Warning" + +class MongoDbMigrationState(with_metaclass(_CaseInsensitiveEnumMeta, str, Enum)): + + NOT_STARTED = "NotStarted" + VALIDATING_INPUT = "ValidatingInput" + INITIALIZING = "Initializing" + RESTARTING = "Restarting" + COPYING = "Copying" + INITIAL_REPLAY = "InitialReplay" + REPLAYING = "Replaying" + FINALIZING = "Finalizing" + COMPLETE = "Complete" + CANCELED = "Canceled" + FAILED = "Failed" + +class MongoDbProgressResultType(with_metaclass(_CaseInsensitiveEnumMeta, str, Enum)): + """The type of progress object + """ + + MIGRATION = "Migration" + DATABASE = "Database" + COLLECTION = "Collection" + +class MongoDbReplication(with_metaclass(_CaseInsensitiveEnumMeta, str, Enum)): + """Describes how changes will be replicated from the source to the target. The default is OneTime. + """ + + DISABLED = "Disabled" + ONE_TIME = "OneTime" + CONTINUOUS = "Continuous" + +class MongoDbShardKeyOrder(with_metaclass(_CaseInsensitiveEnumMeta, str, Enum)): + """The field ordering + """ + + FORWARD = "Forward" + REVERSE = "Reverse" + HASHED = "Hashed" + +class MySqlTargetPlatformType(with_metaclass(_CaseInsensitiveEnumMeta, str, Enum)): + """An enumeration of possible target types when migrating from MySQL + """ + + SQL_SERVER = "SqlServer" + AZURE_DB_FOR_MY_SQL = "AzureDbForMySQL" + +class NameCheckFailureReason(with_metaclass(_CaseInsensitiveEnumMeta, str, Enum)): + """The reason why the name is not available, if nameAvailable is false + """ + + ALREADY_EXISTS = "AlreadyExists" + INVALID = "Invalid" + +class ObjectType(with_metaclass(_CaseInsensitiveEnumMeta, str, Enum)): + """An enumeration of type of objects + """ + + STORED_PROCEDURES = "StoredProcedures" + TABLE = "Table" + USER = "User" + VIEW = "View" + FUNCTION = "Function" + +class OperationOrigin(with_metaclass(_CaseInsensitiveEnumMeta, str, Enum)): + + USER = "user" + SYSTEM = "system" + +class ProjectProvisioningState(with_metaclass(_CaseInsensitiveEnumMeta, str, Enum)): + """The project's provisioning state + """ + + DELETING = "Deleting" + SUCCEEDED = "Succeeded" + +class ProjectSourcePlatform(with_metaclass(_CaseInsensitiveEnumMeta, str, Enum)): + """Source platform of the project + """ + + SQL = "SQL" + MY_SQL = "MySQL" + POSTGRE_SQL = "PostgreSql" + MONGO_DB = "MongoDb" + UNKNOWN = "Unknown" + +class ProjectTargetPlatform(with_metaclass(_CaseInsensitiveEnumMeta, str, Enum)): + """Target platform of the project + """ + + SQLDB = "SQLDB" + SQLMI = "SQLMI" + AZURE_DB_FOR_MY_SQL = "AzureDbForMySql" + AZURE_DB_FOR_POSTGRE_SQL = "AzureDbForPostgreSql" + MONGO_DB = "MongoDb" + UNKNOWN = "Unknown" + +class ReplicateMigrationState(with_metaclass(_CaseInsensitiveEnumMeta, str, Enum)): + """Wrapper for replicate reported migration states. + """ + + UNDEFINED = "UNDEFINED" + VALIDATING = "VALIDATING" + PENDING = "PENDING" + COMPLETE = "COMPLETE" + ACTION_REQUIRED = "ACTION_REQUIRED" + FAILED = "FAILED" + +class ResourceSkuCapacityScaleType(with_metaclass(_CaseInsensitiveEnumMeta, str, Enum)): + """The scale type applicable to the SKU. + """ + + AUTOMATIC = "Automatic" + MANUAL = "Manual" + NONE = "None" + +class ResourceSkuRestrictionsReasonCode(with_metaclass(_CaseInsensitiveEnumMeta, str, Enum)): + """The reason code for restriction. + """ + + QUOTA_ID = "QuotaId" + NOT_AVAILABLE_FOR_SUBSCRIPTION = "NotAvailableForSubscription" + +class ResourceSkuRestrictionsType(with_metaclass(_CaseInsensitiveEnumMeta, str, Enum)): + """The type of restrictions. + """ + + LOCATION = "location" + +class ResourceType(with_metaclass(_CaseInsensitiveEnumMeta, str, Enum)): + + SQL_MI = "SqlMi" + SQL_VM = "SqlVm" + +class ScenarioSource(with_metaclass(_CaseInsensitiveEnumMeta, str, Enum)): + """An enumeration of source type + """ + + ACCESS = "Access" + DB2 = "DB2" + MY_SQL = "MySQL" + ORACLE = "Oracle" + SQL = "SQL" + SYBASE = "Sybase" + POSTGRE_SQL = "PostgreSQL" + MONGO_DB = "MongoDB" + SQLRDS = "SQLRDS" + MY_SQLRDS = "MySQLRDS" + POSTGRE_SQLRDS = "PostgreSQLRDS" + +class ScenarioTarget(with_metaclass(_CaseInsensitiveEnumMeta, str, Enum)): + """An enumeration of target type + """ + + SQL_SERVER = "SQLServer" + SQLDB = "SQLDB" + SQLDW = "SQLDW" + SQLMI = "SQLMI" + AZURE_DB_FOR_MY_SQL = "AzureDBForMySql" + AZURE_DB_FOR_POSTGRES_SQL = "AzureDBForPostgresSQL" + MONGO_DB = "MongoDB" + +class SchemaMigrationOption(with_metaclass(_CaseInsensitiveEnumMeta, str, Enum)): + """Option for how schema is extracted and applied to target + """ + + NONE = "None" + EXTRACT_FROM_SOURCE = "ExtractFromSource" + USE_STORAGE_FILE = "UseStorageFile" + +class SchemaMigrationStage(with_metaclass(_CaseInsensitiveEnumMeta, str, Enum)): + """Current stage of schema migration + """ + + NOT_STARTED = "NotStarted" + VALIDATING_INPUTS = "ValidatingInputs" + COLLECTING_OBJECTS = "CollectingObjects" + DOWNLOADING_SCRIPT = "DownloadingScript" + GENERATING_SCRIPT = "GeneratingScript" + UPLOADING_SCRIPT = "UploadingScript" + DEPLOYING_SCHEMA = "DeployingSchema" + COMPLETED = "Completed" + COMPLETED_WITH_WARNINGS = "CompletedWithWarnings" + FAILED = "Failed" + +class ServerLevelPermissionsGroup(with_metaclass(_CaseInsensitiveEnumMeta, str, Enum)): + """Permission group for validations. These groups will run a set of permissions for validating + user activity. Select the permission group for the activity that you are performing. + """ + + DEFAULT = "Default" + MIGRATION_FROM_SQL_SERVER_TO_AZURE_DB = "MigrationFromSqlServerToAzureDB" + MIGRATION_FROM_SQL_SERVER_TO_AZURE_MI = "MigrationFromSqlServerToAzureMI" + MIGRATION_FROM_MY_SQL_TO_AZURE_DB_FOR_MY_SQL = "MigrationFromMySQLToAzureDBForMySQL" + +class ServiceProvisioningState(with_metaclass(_CaseInsensitiveEnumMeta, str, Enum)): + """The resource's provisioning state + """ + + ACCEPTED = "Accepted" + DELETING = "Deleting" + DEPLOYING = "Deploying" + STOPPED = "Stopped" + STOPPING = "Stopping" + STARTING = "Starting" + FAILED_TO_START = "FailedToStart" + FAILED_TO_STOP = "FailedToStop" + SUCCEEDED = "Succeeded" + FAILED = "Failed" + +class ServiceScalability(with_metaclass(_CaseInsensitiveEnumMeta, str, Enum)): + """The scalability approach + """ + + NONE = "none" + MANUAL = "manual" + AUTOMATIC = "automatic" + +class Severity(with_metaclass(_CaseInsensitiveEnumMeta, str, Enum)): + """Severity of the validation error + """ + + MESSAGE = "Message" + WARNING = "Warning" + ERROR = "Error" + +class SqlSourcePlatform(with_metaclass(_CaseInsensitiveEnumMeta, str, Enum)): + """An enumeration of source platform types + """ + + SQL_ON_PREM = "SqlOnPrem" + +class SsisMigrationOverwriteOption(with_metaclass(_CaseInsensitiveEnumMeta, str, Enum)): + """The overwrite option for SSIS object migration, only ignore and overwrite are supported in DMS + now and future may add Reuse option for container object + """ + + IGNORE = "Ignore" + OVERWRITE = "Overwrite" + +class SsisMigrationStage(with_metaclass(_CaseInsensitiveEnumMeta, str, Enum)): + """Current stage of SSIS migration + """ + + NONE = "None" + INITIALIZE = "Initialize" + IN_PROGRESS = "InProgress" + COMPLETED = "Completed" + +class SsisStoreType(with_metaclass(_CaseInsensitiveEnumMeta, str, Enum)): + """An enumeration of supported source SSIS store type in DMS + """ + + SSIS_CATALOG = "SsisCatalog" + +class SyncDatabaseMigrationReportingState(with_metaclass(_CaseInsensitiveEnumMeta, str, Enum)): + """Enum of the different state of database level online migration. + """ + + UNDEFINED = "UNDEFINED" + CONFIGURING = "CONFIGURING" + INITIALIAZING = "INITIALIAZING" + STARTING = "STARTING" + RUNNING = "RUNNING" + READY_TO_COMPLETE = "READY_TO_COMPLETE" + COMPLETING = "COMPLETING" + COMPLETE = "COMPLETE" + CANCELLING = "CANCELLING" + CANCELLED = "CANCELLED" + FAILED = "FAILED" + VALIDATING = "VALIDATING" + VALIDATION_COMPLETE = "VALIDATION_COMPLETE" + VALIDATION_FAILED = "VALIDATION_FAILED" + RESTORE_IN_PROGRESS = "RESTORE_IN_PROGRESS" + RESTORE_COMPLETED = "RESTORE_COMPLETED" + BACKUP_IN_PROGRESS = "BACKUP_IN_PROGRESS" + BACKUP_COMPLETED = "BACKUP_COMPLETED" + +class SyncTableMigrationState(with_metaclass(_CaseInsensitiveEnumMeta, str, Enum)): + """Enum of the different state of table level online migration. + """ + + BEFORE_LOAD = "BEFORE_LOAD" + FULL_LOAD = "FULL_LOAD" + COMPLETED = "COMPLETED" + CANCELED = "CANCELED" + ERROR = "ERROR" + FAILED = "FAILED" + +class TaskState(with_metaclass(_CaseInsensitiveEnumMeta, str, Enum)): + """The state of the task. This is ignored if submitted. + """ + + UNKNOWN = "Unknown" + QUEUED = "Queued" + RUNNING = "Running" + CANCELED = "Canceled" + SUCCEEDED = "Succeeded" + FAILED = "Failed" + FAILED_INPUT_VALIDATION = "FailedInputValidation" + FAULTED = "Faulted" + +class TaskType(with_metaclass(_CaseInsensitiveEnumMeta, str, Enum)): + """Task type. + """ + + CONNECT_MONGO_DB = "Connect.MongoDb" + CONNECT_TO_SOURCE_SQL_SERVER = "ConnectToSource.SqlServer" + CONNECT_TO_SOURCE_SQL_SERVER_SYNC = "ConnectToSource.SqlServer.Sync" + CONNECT_TO_SOURCE_POSTGRE_SQL_SYNC = "ConnectToSource.PostgreSql.Sync" + CONNECT_TO_SOURCE_MY_SQL = "ConnectToSource.MySql" + CONNECT_TO_SOURCE_ORACLE_SYNC = "ConnectToSource.Oracle.Sync" + CONNECT_TO_TARGET_SQL_DB = "ConnectToTarget.SqlDb" + CONNECT_TO_TARGET_SQL_DB_SYNC = "ConnectToTarget.SqlDb.Sync" + CONNECT_TO_TARGET_AZURE_DB_FOR_POSTGRE_SQL_SYNC = "ConnectToTarget.AzureDbForPostgreSql.Sync" + CONNECT_TO_TARGET_ORACLE_AZURE_DB_FOR_POSTGRE_SQL_SYNC = "ConnectToTarget.Oracle.AzureDbForPostgreSql.Sync" + CONNECT_TO_TARGET_AZURE_SQL_DB_MI = "ConnectToTarget.AzureSqlDbMI" + CONNECT_TO_TARGET_AZURE_SQL_DB_MI_SYNC_LRS = "ConnectToTarget.AzureSqlDbMI.Sync.LRS" + CONNECT_TO_TARGET_AZURE_DB_FOR_MY_SQL = "ConnectToTarget.AzureDbForMySql" + GET_USER_TABLES_SQL = "GetUserTables.Sql" + GET_USER_TABLES_AZURE_SQL_DB_SYNC = "GetUserTables.AzureSqlDb.Sync" + GET_USER_TABLES_ORACLE = "GetUserTablesOracle" + GET_USER_TABLES_POSTGRE_SQL = "GetUserTablesPostgreSql" + GET_USER_TABLES_MY_SQL = "GetUserTablesMySql" + MIGRATE_MONGO_DB = "Migrate.MongoDb" + MIGRATE_SQL_SERVER_AZURE_SQL_DB_MI = "Migrate.SqlServer.AzureSqlDbMI" + MIGRATE_SQL_SERVER_AZURE_SQL_DB_MI_SYNC_LRS = "Migrate.SqlServer.AzureSqlDbMI.Sync.LRS" + MIGRATE_SQL_SERVER_SQL_DB = "Migrate.SqlServer.SqlDb" + MIGRATE_SQL_SERVER_AZURE_SQL_DB_SYNC = "Migrate.SqlServer.AzureSqlDb.Sync" + MIGRATE_MY_SQL_AZURE_DB_FOR_MY_SQL_SYNC = "Migrate.MySql.AzureDbForMySql.Sync" + MIGRATE_MY_SQL_AZURE_DB_FOR_MY_SQL = "Migrate.MySql.AzureDbForMySql" + MIGRATE_POSTGRE_SQL_AZURE_DB_FOR_POSTGRE_SQL_SYNC_V2 = "Migrate.PostgreSql.AzureDbForPostgreSql.SyncV2" + MIGRATE_ORACLE_AZURE_DB_FOR_POSTGRE_SQL_SYNC = "Migrate.Oracle.AzureDbForPostgreSql.Sync" + VALIDATE_MIGRATION_INPUT_SQL_SERVER_SQL_DB_SYNC = "ValidateMigrationInput.SqlServer.SqlDb.Sync" + VALIDATE_MIGRATION_INPUT_SQL_SERVER_AZURE_SQL_DB_MI = "ValidateMigrationInput.SqlServer.AzureSqlDbMI" + VALIDATE_MIGRATION_INPUT_SQL_SERVER_AZURE_SQL_DB_MI_SYNC_LRS = "ValidateMigrationInput.SqlServer.AzureSqlDbMI.Sync.LRS" + VALIDATE_MONGO_DB = "Validate.MongoDb" + VALIDATE_ORACLE_AZURE_DB_POSTGRE_SQL_SYNC = "Validate.Oracle.AzureDbPostgreSql.Sync" + GET_TDE_CERTIFICATES_SQL = "GetTDECertificates.Sql" + MIGRATE_SSIS = "Migrate.Ssis" + SERVICE_CHECK_OCI = "Service.Check.OCI" + SERVICE_UPLOAD_OCI = "Service.Upload.OCI" + SERVICE_INSTALL_OCI = "Service.Install.OCI" + MIGRATE_SCHEMA_SQL_SERVER_SQL_DB = "MigrateSchemaSqlServerSqlDb" + +class UpdateActionType(with_metaclass(_CaseInsensitiveEnumMeta, str, Enum)): + """Type of the actual difference for the compared object, while performing schema comparison + """ + + DELETED_ON_TARGET = "DeletedOnTarget" + CHANGED_ON_TARGET = "ChangedOnTarget" + ADDED_ON_TARGET = "AddedOnTarget" + +class ValidationStatus(with_metaclass(_CaseInsensitiveEnumMeta, str, Enum)): + """Current status of the validation + """ + + DEFAULT = "Default" + NOT_STARTED = "NotStarted" + INITIALIZED = "Initialized" + IN_PROGRESS = "InProgress" + COMPLETED = "Completed" + COMPLETED_WITH_ISSUES = "CompletedWithIssues" + STOPPED = "Stopped" + FAILED = "Failed" diff --git a/src/datamigration/azext_datamigration/vendored_sdks/datamigration/models/_models.py b/src/datamigration/azext_datamigration/vendored_sdks/datamigration/models/_models.py new file mode 100644 index 00000000000..84a3adfe020 --- /dev/null +++ b/src/datamigration/azext_datamigration/vendored_sdks/datamigration/models/_models.py @@ -0,0 +1,15102 @@ +# coding=utf-8 +# -------------------------------------------------------------------------- +# Copyright (c) Microsoft Corporation. All rights reserved. +# Licensed under the MIT License. See License.txt in the project root for license information. +# Code generated by Microsoft (R) AutoRest Code Generator. +# Changes may cause incorrect behavior and will be lost if the code is regenerated. +# -------------------------------------------------------------------------- + +from azure.core.exceptions import HttpResponseError +import msrest.serialization + + +class ApiError(msrest.serialization.Model): + """Error information. + + Variables are only populated by the server, and will be ignored when sending a request. + + :param error: Error information in OData format. + :type error: ~azure.mgmt.datamigration.models.ODataError + :ivar system_data: Metadata pertaining to creation and last modification of the resource. + :vartype system_data: ~azure.mgmt.datamigration.models.SystemData + """ + + _validation = { + 'system_data': {'readonly': True}, + } + + _attribute_map = { + 'error': {'key': 'error', 'type': 'ODataError'}, + 'system_data': {'key': 'systemData', 'type': 'SystemData'}, + } + + def __init__( + self, + **kwargs + ): + super(ApiError, self).__init__(**kwargs) + self.error = kwargs.get('error', None) + self.system_data = None + + +class AuthenticationKeys(msrest.serialization.Model): + """An authentication key. + + :param auth_key1: The first authentication key. + :type auth_key1: str + :param auth_key2: The second authentication key. + :type auth_key2: str + """ + + _attribute_map = { + 'auth_key1': {'key': 'authKey1', 'type': 'str'}, + 'auth_key2': {'key': 'authKey2', 'type': 'str'}, + } + + def __init__( + self, + **kwargs + ): + super(AuthenticationKeys, self).__init__(**kwargs) + self.auth_key1 = kwargs.get('auth_key1', None) + self.auth_key2 = kwargs.get('auth_key2', None) + + +class AvailableServiceSku(msrest.serialization.Model): + """Describes the available service SKU. + + :param resource_type: The resource type, including the provider namespace. + :type resource_type: str + :param sku: SKU name, tier, etc. + :type sku: ~azure.mgmt.datamigration.models.AvailableServiceSkuautogenerated + :param capacity: A description of the scaling capacities of the SKU. + :type capacity: ~azure.mgmt.datamigration.models.AvailableServiceSkuCapacity + """ + + _attribute_map = { + 'resource_type': {'key': 'resourceType', 'type': 'str'}, + 'sku': {'key': 'sku', 'type': 'AvailableServiceSkuautogenerated'}, + 'capacity': {'key': 'capacity', 'type': 'AvailableServiceSkuCapacity'}, + } + + def __init__( + self, + **kwargs + ): + super(AvailableServiceSku, self).__init__(**kwargs) + self.resource_type = kwargs.get('resource_type', None) + self.sku = kwargs.get('sku', None) + self.capacity = kwargs.get('capacity', None) + + +class AvailableServiceSkuautogenerated(msrest.serialization.Model): + """SKU name, tier, etc. + + :param name: The name of the SKU. + :type name: str + :param family: SKU family. + :type family: str + :param size: SKU size. + :type size: str + :param tier: The tier of the SKU, such as "Basic", "General Purpose", or "Business Critical". + :type tier: str + """ + + _attribute_map = { + 'name': {'key': 'name', 'type': 'str'}, + 'family': {'key': 'family', 'type': 'str'}, + 'size': {'key': 'size', 'type': 'str'}, + 'tier': {'key': 'tier', 'type': 'str'}, + } + + def __init__( + self, + **kwargs + ): + super(AvailableServiceSkuautogenerated, self).__init__(**kwargs) + self.name = kwargs.get('name', None) + self.family = kwargs.get('family', None) + self.size = kwargs.get('size', None) + self.tier = kwargs.get('tier', None) + + +class AvailableServiceSkuCapacity(msrest.serialization.Model): + """A description of the scaling capacities of the SKU. + + :param minimum: The minimum capacity, usually 0 or 1. + :type minimum: int + :param maximum: The maximum capacity. + :type maximum: int + :param default: The default capacity. + :type default: int + :param scale_type: The scalability approach. Possible values include: "none", "manual", + "automatic". + :type scale_type: str or ~azure.mgmt.datamigration.models.ServiceScalability + """ + + _attribute_map = { + 'minimum': {'key': 'minimum', 'type': 'int'}, + 'maximum': {'key': 'maximum', 'type': 'int'}, + 'default': {'key': 'default', 'type': 'int'}, + 'scale_type': {'key': 'scaleType', 'type': 'str'}, + } + + def __init__( + self, + **kwargs + ): + super(AvailableServiceSkuCapacity, self).__init__(**kwargs) + self.minimum = kwargs.get('minimum', None) + self.maximum = kwargs.get('maximum', None) + self.default = kwargs.get('default', None) + self.scale_type = kwargs.get('scale_type', None) + + +class AzureActiveDirectoryApp(msrest.serialization.Model): + """Azure Active Directory Application. + + All required parameters must be populated in order to send to Azure. + + :param application_id: Required. Application ID of the Azure Active Directory Application. + :type application_id: str + :param app_key: Required. Key used to authenticate to the Azure Active Directory Application. + :type app_key: str + :param tenant_id: Required. Tenant id of the customer. + :type tenant_id: str + """ + + _validation = { + 'application_id': {'required': True}, + 'app_key': {'required': True}, + 'tenant_id': {'required': True}, + } + + _attribute_map = { + 'application_id': {'key': 'applicationId', 'type': 'str'}, + 'app_key': {'key': 'appKey', 'type': 'str'}, + 'tenant_id': {'key': 'tenantId', 'type': 'str'}, + } + + def __init__( + self, + **kwargs + ): + super(AzureActiveDirectoryApp, self).__init__(**kwargs) + self.application_id = kwargs['application_id'] + self.app_key = kwargs['app_key'] + self.tenant_id = kwargs['tenant_id'] + + +class AzureBlob(msrest.serialization.Model): + """Azure Blob Details. + + :param storage_account_resource_id: Resource Id of the storage account where backups are + stored. + :type storage_account_resource_id: str + :param account_key: Storage Account Key. + :type account_key: str + :param blob_container_name: Blob container name where backups are stored. + :type blob_container_name: str + """ + + _attribute_map = { + 'storage_account_resource_id': {'key': 'storageAccountResourceId', 'type': 'str'}, + 'account_key': {'key': 'accountKey', 'type': 'str'}, + 'blob_container_name': {'key': 'blobContainerName', 'type': 'str'}, + } + + def __init__( + self, + **kwargs + ): + super(AzureBlob, self).__init__(**kwargs) + self.storage_account_resource_id = kwargs.get('storage_account_resource_id', None) + self.account_key = kwargs.get('account_key', None) + self.blob_container_name = kwargs.get('blob_container_name', None) + + +class BackupConfiguration(msrest.serialization.Model): + """Backup Configuration. + + :param source_location: Source location of backups. + :type source_location: ~azure.mgmt.datamigration.models.SourceLocation + :param target_location: Target location for copying backups. + :type target_location: ~azure.mgmt.datamigration.models.TargetLocation + """ + + _attribute_map = { + 'source_location': {'key': 'sourceLocation', 'type': 'SourceLocation'}, + 'target_location': {'key': 'targetLocation', 'type': 'TargetLocation'}, + } + + def __init__( + self, + **kwargs + ): + super(BackupConfiguration, self).__init__(**kwargs) + self.source_location = kwargs.get('source_location', None) + self.target_location = kwargs.get('target_location', None) + + +class BackupFileInfo(msrest.serialization.Model): + """Information of the backup file. + + :param file_location: Location of the backup file in shared folder. + :type file_location: str + :param family_sequence_number: Sequence number of the backup file in the backup set. + :type family_sequence_number: int + :param status: Status of the backup file during migration. Possible values include: "Arrived", + "Queued", "Uploading", "Uploaded", "Restoring", "Restored", "Cancelled". + :type status: str or ~azure.mgmt.datamigration.models.BackupFileStatus + """ + + _attribute_map = { + 'file_location': {'key': 'fileLocation', 'type': 'str'}, + 'family_sequence_number': {'key': 'familySequenceNumber', 'type': 'int'}, + 'status': {'key': 'status', 'type': 'str'}, + } + + def __init__( + self, + **kwargs + ): + super(BackupFileInfo, self).__init__(**kwargs) + self.file_location = kwargs.get('file_location', None) + self.family_sequence_number = kwargs.get('family_sequence_number', None) + self.status = kwargs.get('status', None) + + +class BackupSetInfo(msrest.serialization.Model): + """Information of backup set. + + :param backup_set_id: Id for the set of backup files. + :type backup_set_id: str + :param first_lsn: First log sequence number of the backup file. + :type first_lsn: str + :param last_lsn: Last log sequence number of the backup file. + :type last_lsn: str + :param last_modified_time: Last modified time of the backup file in share location. + :type last_modified_time: ~datetime.datetime + :param backup_type: Enum of the different backup types. Possible values include: "Database", + "TransactionLog", "File", "DifferentialDatabase", "DifferentialFile", "Partial", + "DifferentialPartial". + :type backup_type: str or ~azure.mgmt.datamigration.models.BackupType + :param list_of_backup_files: List of files in the backup set. + :type list_of_backup_files: list[~azure.mgmt.datamigration.models.BackupFileInfo] + :param database_name: Name of the database to which the backup set belongs. + :type database_name: str + :param backup_start_date: Date and time that the backup operation began. + :type backup_start_date: ~datetime.datetime + :param backup_finished_date: Date and time that the backup operation finished. + :type backup_finished_date: ~datetime.datetime + :param is_backup_restored: Whether the backup set is restored or not. + :type is_backup_restored: bool + """ + + _attribute_map = { + 'backup_set_id': {'key': 'backupSetId', 'type': 'str'}, + 'first_lsn': {'key': 'firstLsn', 'type': 'str'}, + 'last_lsn': {'key': 'lastLsn', 'type': 'str'}, + 'last_modified_time': {'key': 'lastModifiedTime', 'type': 'iso-8601'}, + 'backup_type': {'key': 'backupType', 'type': 'str'}, + 'list_of_backup_files': {'key': 'listOfBackupFiles', 'type': '[BackupFileInfo]'}, + 'database_name': {'key': 'databaseName', 'type': 'str'}, + 'backup_start_date': {'key': 'backupStartDate', 'type': 'iso-8601'}, + 'backup_finished_date': {'key': 'backupFinishedDate', 'type': 'iso-8601'}, + 'is_backup_restored': {'key': 'isBackupRestored', 'type': 'bool'}, + } + + def __init__( + self, + **kwargs + ): + super(BackupSetInfo, self).__init__(**kwargs) + self.backup_set_id = kwargs.get('backup_set_id', None) + self.first_lsn = kwargs.get('first_lsn', None) + self.last_lsn = kwargs.get('last_lsn', None) + self.last_modified_time = kwargs.get('last_modified_time', None) + self.backup_type = kwargs.get('backup_type', None) + self.list_of_backup_files = kwargs.get('list_of_backup_files', None) + self.database_name = kwargs.get('database_name', None) + self.backup_start_date = kwargs.get('backup_start_date', None) + self.backup_finished_date = kwargs.get('backup_finished_date', None) + self.is_backup_restored = kwargs.get('is_backup_restored', None) + + +class BlobShare(msrest.serialization.Model): + """Blob container storage information. + + All required parameters must be populated in order to send to Azure. + + :param sas_uri: Required. SAS URI of Azure Storage Account Container. + :type sas_uri: str + """ + + _validation = { + 'sas_uri': {'required': True}, + } + + _attribute_map = { + 'sas_uri': {'key': 'sasUri', 'type': 'str'}, + } + + def __init__( + self, + **kwargs + ): + super(BlobShare, self).__init__(**kwargs) + self.sas_uri = kwargs['sas_uri'] + + +class CheckOciDriverTaskInput(msrest.serialization.Model): + """Input for the service task to check for OCI drivers. + + :param server_version: Version of the source server to check against. Optional. + :type server_version: str + """ + + _attribute_map = { + 'server_version': {'key': 'serverVersion', 'type': 'str'}, + } + + def __init__( + self, + **kwargs + ): + super(CheckOciDriverTaskInput, self).__init__(**kwargs) + self.server_version = kwargs.get('server_version', None) + + +class CheckOciDriverTaskOutput(msrest.serialization.Model): + """Output for the service task to check for OCI drivers. + + Variables are only populated by the server, and will be ignored when sending a request. + + :param installed_driver: Information about the installed driver if found and valid. + :type installed_driver: ~azure.mgmt.datamigration.models.OracleOciDriverInfo + :ivar validation_errors: Validation errors. + :vartype validation_errors: list[~azure.mgmt.datamigration.models.ReportableException] + """ + + _validation = { + 'validation_errors': {'readonly': True}, + } + + _attribute_map = { + 'installed_driver': {'key': 'installedDriver', 'type': 'OracleOciDriverInfo'}, + 'validation_errors': {'key': 'validationErrors', 'type': '[ReportableException]'}, + } + + def __init__( + self, + **kwargs + ): + super(CheckOciDriverTaskOutput, self).__init__(**kwargs) + self.installed_driver = kwargs.get('installed_driver', None) + self.validation_errors = None + + +class ProjectTaskProperties(msrest.serialization.Model): + """Base class for all types of DMS task properties. If task is not supported by current client, this object is returned. + + You probably want to use the sub-classes and not this class directly. Known + sub-classes are: ConnectToMongoDbTaskProperties, ConnectToSourceMySqlTaskProperties, ConnectToSourceOracleSyncTaskProperties, ConnectToSourcePostgreSqlSyncTaskProperties, ConnectToSourceSqlServerTaskProperties, ConnectToSourceSqlServerSyncTaskProperties, ConnectToTargetAzureDbForMySqlTaskProperties, ConnectToTargetAzureDbForPostgreSqlSyncTaskProperties, ConnectToTargetSqlMiTaskProperties, ConnectToTargetSqlMiSyncTaskProperties, ConnectToTargetOracleAzureDbForPostgreSqlSyncTaskProperties, ConnectToTargetSqlDbTaskProperties, ConnectToTargetSqlDbSyncTaskProperties, GetTdeCertificatesSqlTaskProperties, GetUserTablesSqlSyncTaskProperties, GetUserTablesSqlTaskProperties, GetUserTablesMySqlTaskProperties, GetUserTablesOracleTaskProperties, GetUserTablesPostgreSqlTaskProperties, MigrateMongoDbTaskProperties, MigrateMySqlAzureDbForMySqlOfflineTaskProperties, MigrateMySqlAzureDbForMySqlSyncTaskProperties, MigrateOracleAzureDbForPostgreSqlSyncTaskProperties, MigratePostgreSqlAzureDbForPostgreSqlSyncTaskProperties, MigrateSqlServerSqlDbSyncTaskProperties, MigrateSqlServerSqlMiTaskProperties, MigrateSqlServerSqlMiSyncTaskProperties, MigrateSqlServerSqlDbTaskProperties, MigrateSsisTaskProperties, MigrateSchemaSqlServerSqlDbTaskProperties, CheckOciDriverTaskProperties, InstallOciDriverTaskProperties, UploadOciDriverTaskProperties, ValidateMongoDbTaskProperties, ValidateOracleAzureDbForPostgreSqlSyncTaskProperties, ValidateMigrationInputSqlServerSqlMiTaskProperties, ValidateMigrationInputSqlServerSqlMiSyncTaskProperties, ValidateMigrationInputSqlServerSqlDbSyncTaskProperties. + + Variables are only populated by the server, and will be ignored when sending a request. + + All required parameters must be populated in order to send to Azure. + + :param task_type: Required. Task type.Constant filled by server. Possible values include: + "Connect.MongoDb", "ConnectToSource.SqlServer", "ConnectToSource.SqlServer.Sync", + "ConnectToSource.PostgreSql.Sync", "ConnectToSource.MySql", "ConnectToSource.Oracle.Sync", + "ConnectToTarget.SqlDb", "ConnectToTarget.SqlDb.Sync", + "ConnectToTarget.AzureDbForPostgreSql.Sync", + "ConnectToTarget.Oracle.AzureDbForPostgreSql.Sync", "ConnectToTarget.AzureSqlDbMI", + "ConnectToTarget.AzureSqlDbMI.Sync.LRS", "ConnectToTarget.AzureDbForMySql", + "GetUserTables.Sql", "GetUserTables.AzureSqlDb.Sync", "GetUserTablesOracle", + "GetUserTablesPostgreSql", "GetUserTablesMySql", "Migrate.MongoDb", + "Migrate.SqlServer.AzureSqlDbMI", "Migrate.SqlServer.AzureSqlDbMI.Sync.LRS", + "Migrate.SqlServer.SqlDb", "Migrate.SqlServer.AzureSqlDb.Sync", + "Migrate.MySql.AzureDbForMySql.Sync", "Migrate.MySql.AzureDbForMySql", + "Migrate.PostgreSql.AzureDbForPostgreSql.SyncV2", "Migrate.Oracle.AzureDbForPostgreSql.Sync", + "ValidateMigrationInput.SqlServer.SqlDb.Sync", "ValidateMigrationInput.SqlServer.AzureSqlDbMI", + "ValidateMigrationInput.SqlServer.AzureSqlDbMI.Sync.LRS", "Validate.MongoDb", + "Validate.Oracle.AzureDbPostgreSql.Sync", "GetTDECertificates.Sql", "Migrate.Ssis", + "Service.Check.OCI", "Service.Upload.OCI", "Service.Install.OCI", + "MigrateSchemaSqlServerSqlDb". + :type task_type: str or ~azure.mgmt.datamigration.models.TaskType + :ivar errors: Array of errors. This is ignored if submitted. + :vartype errors: list[~azure.mgmt.datamigration.models.ODataError] + :ivar state: The state of the task. This is ignored if submitted. Possible values include: + "Unknown", "Queued", "Running", "Canceled", "Succeeded", "Failed", "FailedInputValidation", + "Faulted". + :vartype state: str or ~azure.mgmt.datamigration.models.TaskState + :ivar commands: Array of command properties. + :vartype commands: list[~azure.mgmt.datamigration.models.CommandProperties] + :param client_data: Key value pairs of client data to attach meta data information to task. + :type client_data: dict[str, str] + """ + + _validation = { + 'task_type': {'required': True}, + 'errors': {'readonly': True}, + 'state': {'readonly': True}, + 'commands': {'readonly': True}, + } + + _attribute_map = { + 'task_type': {'key': 'taskType', 'type': 'str'}, + 'errors': {'key': 'errors', 'type': '[ODataError]'}, + 'state': {'key': 'state', 'type': 'str'}, + 'commands': {'key': 'commands', 'type': '[CommandProperties]'}, + 'client_data': {'key': 'clientData', 'type': '{str}'}, + } + + _subtype_map = { + 'task_type': {'Connect.MongoDb': 'ConnectToMongoDbTaskProperties', 'ConnectToSource.MySql': 'ConnectToSourceMySqlTaskProperties', 'ConnectToSource.Oracle.Sync': 'ConnectToSourceOracleSyncTaskProperties', 'ConnectToSource.PostgreSql.Sync': 'ConnectToSourcePostgreSqlSyncTaskProperties', 'ConnectToSource.SqlServer': 'ConnectToSourceSqlServerTaskProperties', 'ConnectToSource.SqlServer.Sync': 'ConnectToSourceSqlServerSyncTaskProperties', 'ConnectToTarget.AzureDbForMySql': 'ConnectToTargetAzureDbForMySqlTaskProperties', 'ConnectToTarget.AzureDbForPostgreSql.Sync': 'ConnectToTargetAzureDbForPostgreSqlSyncTaskProperties', 'ConnectToTarget.AzureSqlDbMI': 'ConnectToTargetSqlMiTaskProperties', 'ConnectToTarget.AzureSqlDbMI.Sync.LRS': 'ConnectToTargetSqlMiSyncTaskProperties', 'ConnectToTarget.Oracle.AzureDbForPostgreSql.Sync': 'ConnectToTargetOracleAzureDbForPostgreSqlSyncTaskProperties', 'ConnectToTarget.SqlDb': 'ConnectToTargetSqlDbTaskProperties', 'ConnectToTarget.SqlDb.Sync': 'ConnectToTargetSqlDbSyncTaskProperties', 'GetTDECertificates.Sql': 'GetTdeCertificatesSqlTaskProperties', 'GetUserTables.AzureSqlDb.Sync': 'GetUserTablesSqlSyncTaskProperties', 'GetUserTables.Sql': 'GetUserTablesSqlTaskProperties', 'GetUserTablesMySql': 'GetUserTablesMySqlTaskProperties', 'GetUserTablesOracle': 'GetUserTablesOracleTaskProperties', 'GetUserTablesPostgreSql': 'GetUserTablesPostgreSqlTaskProperties', 'Migrate.MongoDb': 'MigrateMongoDbTaskProperties', 'Migrate.MySql.AzureDbForMySql': 'MigrateMySqlAzureDbForMySqlOfflineTaskProperties', 'Migrate.MySql.AzureDbForMySql.Sync': 'MigrateMySqlAzureDbForMySqlSyncTaskProperties', 'Migrate.Oracle.AzureDbForPostgreSql.Sync': 'MigrateOracleAzureDbForPostgreSqlSyncTaskProperties', 'Migrate.PostgreSql.AzureDbForPostgreSql.SyncV2': 'MigratePostgreSqlAzureDbForPostgreSqlSyncTaskProperties', 'Migrate.SqlServer.AzureSqlDb.Sync': 'MigrateSqlServerSqlDbSyncTaskProperties', 'Migrate.SqlServer.AzureSqlDbMI': 'MigrateSqlServerSqlMiTaskProperties', 'Migrate.SqlServer.AzureSqlDbMI.Sync.LRS': 'MigrateSqlServerSqlMiSyncTaskProperties', 'Migrate.SqlServer.SqlDb': 'MigrateSqlServerSqlDbTaskProperties', 'Migrate.Ssis': 'MigrateSsisTaskProperties', 'MigrateSchemaSqlServerSqlDb': 'MigrateSchemaSqlServerSqlDbTaskProperties', 'Service.Check.OCI': 'CheckOciDriverTaskProperties', 'Service.Install.OCI': 'InstallOciDriverTaskProperties', 'Service.Upload.OCI': 'UploadOciDriverTaskProperties', 'Validate.MongoDb': 'ValidateMongoDbTaskProperties', 'Validate.Oracle.AzureDbPostgreSql.Sync': 'ValidateOracleAzureDbForPostgreSqlSyncTaskProperties', 'ValidateMigrationInput.SqlServer.AzureSqlDbMI': 'ValidateMigrationInputSqlServerSqlMiTaskProperties', 'ValidateMigrationInput.SqlServer.AzureSqlDbMI.Sync.LRS': 'ValidateMigrationInputSqlServerSqlMiSyncTaskProperties', 'ValidateMigrationInput.SqlServer.SqlDb.Sync': 'ValidateMigrationInputSqlServerSqlDbSyncTaskProperties'} + } + + def __init__( + self, + **kwargs + ): + super(ProjectTaskProperties, self).__init__(**kwargs) + self.task_type = None # type: Optional[str] + self.errors = None + self.state = None + self.commands = None + self.client_data = kwargs.get('client_data', None) + + +class CheckOciDriverTaskProperties(ProjectTaskProperties): + """Properties for the task that checks for OCI drivers. + + Variables are only populated by the server, and will be ignored when sending a request. + + All required parameters must be populated in order to send to Azure. + + :param task_type: Required. Task type.Constant filled by server. Possible values include: + "Connect.MongoDb", "ConnectToSource.SqlServer", "ConnectToSource.SqlServer.Sync", + "ConnectToSource.PostgreSql.Sync", "ConnectToSource.MySql", "ConnectToSource.Oracle.Sync", + "ConnectToTarget.SqlDb", "ConnectToTarget.SqlDb.Sync", + "ConnectToTarget.AzureDbForPostgreSql.Sync", + "ConnectToTarget.Oracle.AzureDbForPostgreSql.Sync", "ConnectToTarget.AzureSqlDbMI", + "ConnectToTarget.AzureSqlDbMI.Sync.LRS", "ConnectToTarget.AzureDbForMySql", + "GetUserTables.Sql", "GetUserTables.AzureSqlDb.Sync", "GetUserTablesOracle", + "GetUserTablesPostgreSql", "GetUserTablesMySql", "Migrate.MongoDb", + "Migrate.SqlServer.AzureSqlDbMI", "Migrate.SqlServer.AzureSqlDbMI.Sync.LRS", + "Migrate.SqlServer.SqlDb", "Migrate.SqlServer.AzureSqlDb.Sync", + "Migrate.MySql.AzureDbForMySql.Sync", "Migrate.MySql.AzureDbForMySql", + "Migrate.PostgreSql.AzureDbForPostgreSql.SyncV2", "Migrate.Oracle.AzureDbForPostgreSql.Sync", + "ValidateMigrationInput.SqlServer.SqlDb.Sync", "ValidateMigrationInput.SqlServer.AzureSqlDbMI", + "ValidateMigrationInput.SqlServer.AzureSqlDbMI.Sync.LRS", "Validate.MongoDb", + "Validate.Oracle.AzureDbPostgreSql.Sync", "GetTDECertificates.Sql", "Migrate.Ssis", + "Service.Check.OCI", "Service.Upload.OCI", "Service.Install.OCI", + "MigrateSchemaSqlServerSqlDb". + :type task_type: str or ~azure.mgmt.datamigration.models.TaskType + :ivar errors: Array of errors. This is ignored if submitted. + :vartype errors: list[~azure.mgmt.datamigration.models.ODataError] + :ivar state: The state of the task. This is ignored if submitted. Possible values include: + "Unknown", "Queued", "Running", "Canceled", "Succeeded", "Failed", "FailedInputValidation", + "Faulted". + :vartype state: str or ~azure.mgmt.datamigration.models.TaskState + :ivar commands: Array of command properties. + :vartype commands: list[~azure.mgmt.datamigration.models.CommandProperties] + :param client_data: Key value pairs of client data to attach meta data information to task. + :type client_data: dict[str, str] + :param input: Input for the service task to check for OCI drivers. + :type input: ~azure.mgmt.datamigration.models.CheckOciDriverTaskInput + :ivar output: Task output. This is ignored if submitted. + :vartype output: list[~azure.mgmt.datamigration.models.CheckOciDriverTaskOutput] + """ + + _validation = { + 'task_type': {'required': True}, + 'errors': {'readonly': True}, + 'state': {'readonly': True}, + 'commands': {'readonly': True}, + 'output': {'readonly': True}, + } + + _attribute_map = { + 'task_type': {'key': 'taskType', 'type': 'str'}, + 'errors': {'key': 'errors', 'type': '[ODataError]'}, + 'state': {'key': 'state', 'type': 'str'}, + 'commands': {'key': 'commands', 'type': '[CommandProperties]'}, + 'client_data': {'key': 'clientData', 'type': '{str}'}, + 'input': {'key': 'input', 'type': 'CheckOciDriverTaskInput'}, + 'output': {'key': 'output', 'type': '[CheckOciDriverTaskOutput]'}, + } + + def __init__( + self, + **kwargs + ): + super(CheckOciDriverTaskProperties, self).__init__(**kwargs) + self.task_type = 'Service.Check.OCI' # type: str + self.input = kwargs.get('input', None) + self.output = None + + +class CommandProperties(msrest.serialization.Model): + """Base class for all types of DMS command properties. If command is not supported by current client, this object is returned. + + You probably want to use the sub-classes and not this class directly. Known + sub-classes are: MigrateMiSyncCompleteCommandProperties, MigrateSyncCompleteCommandProperties, MongoDbCancelCommand, MongoDbFinishCommand, MongoDbRestartCommand. + + Variables are only populated by the server, and will be ignored when sending a request. + + All required parameters must be populated in order to send to Azure. + + :param command_type: Required. Command type.Constant filled by server. Possible values + include: "Migrate.Sync.Complete.Database", "Migrate.SqlServer.AzureDbSqlMi.Complete", "cancel", + "finish", "restart". + :type command_type: str or ~azure.mgmt.datamigration.models.CommandType + :ivar errors: Array of errors. This is ignored if submitted. + :vartype errors: list[~azure.mgmt.datamigration.models.ODataError] + :ivar state: The state of the command. This is ignored if submitted. Possible values include: + "Unknown", "Accepted", "Running", "Succeeded", "Failed". + :vartype state: str or ~azure.mgmt.datamigration.models.CommandState + """ + + _validation = { + 'command_type': {'required': True}, + 'errors': {'readonly': True}, + 'state': {'readonly': True}, + } + + _attribute_map = { + 'command_type': {'key': 'commandType', 'type': 'str'}, + 'errors': {'key': 'errors', 'type': '[ODataError]'}, + 'state': {'key': 'state', 'type': 'str'}, + } + + _subtype_map = { + 'command_type': {'Migrate.SqlServer.AzureDbSqlMi.Complete': 'MigrateMiSyncCompleteCommandProperties', 'Migrate.Sync.Complete.Database': 'MigrateSyncCompleteCommandProperties', 'cancel': 'MongoDbCancelCommand', 'finish': 'MongoDbFinishCommand', 'restart': 'MongoDbRestartCommand'} + } + + def __init__( + self, + **kwargs + ): + super(CommandProperties, self).__init__(**kwargs) + self.command_type = None # type: Optional[str] + self.errors = None + self.state = None + + +class ConnectionInfo(msrest.serialization.Model): + """Defines the connection properties of a server. + + You probably want to use the sub-classes and not this class directly. Known + sub-classes are: MiSqlConnectionInfo, MongoDbConnectionInfo, MySqlConnectionInfo, OracleConnectionInfo, PostgreSqlConnectionInfo, SqlConnectionInfo. + + All required parameters must be populated in order to send to Azure. + + :param type: Required. Type of connection info.Constant filled by server. + :type type: str + :param user_name: User name. + :type user_name: str + :param password: Password credential. + :type password: str + """ + + _validation = { + 'type': {'required': True}, + } + + _attribute_map = { + 'type': {'key': 'type', 'type': 'str'}, + 'user_name': {'key': 'userName', 'type': 'str'}, + 'password': {'key': 'password', 'type': 'str'}, + } + + _subtype_map = { + 'type': {'MiSqlConnectionInfo': 'MiSqlConnectionInfo', 'MongoDbConnectionInfo': 'MongoDbConnectionInfo', 'MySqlConnectionInfo': 'MySqlConnectionInfo', 'OracleConnectionInfo': 'OracleConnectionInfo', 'PostgreSqlConnectionInfo': 'PostgreSqlConnectionInfo', 'SqlConnectionInfo': 'SqlConnectionInfo'} + } + + def __init__( + self, + **kwargs + ): + super(ConnectionInfo, self).__init__(**kwargs) + self.type = None # type: Optional[str] + self.user_name = kwargs.get('user_name', None) + self.password = kwargs.get('password', None) + + +class ConnectToMongoDbTaskProperties(ProjectTaskProperties): + """Properties for the task that validates the connection to and provides information about a MongoDB server. + + Variables are only populated by the server, and will be ignored when sending a request. + + All required parameters must be populated in order to send to Azure. + + :param task_type: Required. Task type.Constant filled by server. Possible values include: + "Connect.MongoDb", "ConnectToSource.SqlServer", "ConnectToSource.SqlServer.Sync", + "ConnectToSource.PostgreSql.Sync", "ConnectToSource.MySql", "ConnectToSource.Oracle.Sync", + "ConnectToTarget.SqlDb", "ConnectToTarget.SqlDb.Sync", + "ConnectToTarget.AzureDbForPostgreSql.Sync", + "ConnectToTarget.Oracle.AzureDbForPostgreSql.Sync", "ConnectToTarget.AzureSqlDbMI", + "ConnectToTarget.AzureSqlDbMI.Sync.LRS", "ConnectToTarget.AzureDbForMySql", + "GetUserTables.Sql", "GetUserTables.AzureSqlDb.Sync", "GetUserTablesOracle", + "GetUserTablesPostgreSql", "GetUserTablesMySql", "Migrate.MongoDb", + "Migrate.SqlServer.AzureSqlDbMI", "Migrate.SqlServer.AzureSqlDbMI.Sync.LRS", + "Migrate.SqlServer.SqlDb", "Migrate.SqlServer.AzureSqlDb.Sync", + "Migrate.MySql.AzureDbForMySql.Sync", "Migrate.MySql.AzureDbForMySql", + "Migrate.PostgreSql.AzureDbForPostgreSql.SyncV2", "Migrate.Oracle.AzureDbForPostgreSql.Sync", + "ValidateMigrationInput.SqlServer.SqlDb.Sync", "ValidateMigrationInput.SqlServer.AzureSqlDbMI", + "ValidateMigrationInput.SqlServer.AzureSqlDbMI.Sync.LRS", "Validate.MongoDb", + "Validate.Oracle.AzureDbPostgreSql.Sync", "GetTDECertificates.Sql", "Migrate.Ssis", + "Service.Check.OCI", "Service.Upload.OCI", "Service.Install.OCI", + "MigrateSchemaSqlServerSqlDb". + :type task_type: str or ~azure.mgmt.datamigration.models.TaskType + :ivar errors: Array of errors. This is ignored if submitted. + :vartype errors: list[~azure.mgmt.datamigration.models.ODataError] + :ivar state: The state of the task. This is ignored if submitted. Possible values include: + "Unknown", "Queued", "Running", "Canceled", "Succeeded", "Failed", "FailedInputValidation", + "Faulted". + :vartype state: str or ~azure.mgmt.datamigration.models.TaskState + :ivar commands: Array of command properties. + :vartype commands: list[~azure.mgmt.datamigration.models.CommandProperties] + :param client_data: Key value pairs of client data to attach meta data information to task. + :type client_data: dict[str, str] + :param input: Describes a connection to a MongoDB data source. + :type input: ~azure.mgmt.datamigration.models.MongoDbConnectionInfo + :ivar output: An array containing a single MongoDbClusterInfo object. + :vartype output: list[~azure.mgmt.datamigration.models.MongoDbClusterInfo] + """ + + _validation = { + 'task_type': {'required': True}, + 'errors': {'readonly': True}, + 'state': {'readonly': True}, + 'commands': {'readonly': True}, + 'output': {'readonly': True}, + } + + _attribute_map = { + 'task_type': {'key': 'taskType', 'type': 'str'}, + 'errors': {'key': 'errors', 'type': '[ODataError]'}, + 'state': {'key': 'state', 'type': 'str'}, + 'commands': {'key': 'commands', 'type': '[CommandProperties]'}, + 'client_data': {'key': 'clientData', 'type': '{str}'}, + 'input': {'key': 'input', 'type': 'MongoDbConnectionInfo'}, + 'output': {'key': 'output', 'type': '[MongoDbClusterInfo]'}, + } + + def __init__( + self, + **kwargs + ): + super(ConnectToMongoDbTaskProperties, self).__init__(**kwargs) + self.task_type = 'Connect.MongoDb' # type: str + self.input = kwargs.get('input', None) + self.output = None + + +class ConnectToSourceMySqlTaskInput(msrest.serialization.Model): + """Input for the task that validates MySQL database connection. + + All required parameters must be populated in order to send to Azure. + + :param source_connection_info: Required. Information for connecting to MySQL source. + :type source_connection_info: ~azure.mgmt.datamigration.models.MySqlConnectionInfo + :param target_platform: Target Platform for the migration. Possible values include: + "SqlServer", "AzureDbForMySQL". + :type target_platform: str or ~azure.mgmt.datamigration.models.MySqlTargetPlatformType + :param check_permissions_group: Permission group for validations. Possible values include: + "Default", "MigrationFromSqlServerToAzureDB", "MigrationFromSqlServerToAzureMI", + "MigrationFromMySQLToAzureDBForMySQL". + :type check_permissions_group: str or + ~azure.mgmt.datamigration.models.ServerLevelPermissionsGroup + :param is_offline_migration: Flag for whether or not the migration is offline. + :type is_offline_migration: bool + """ + + _validation = { + 'source_connection_info': {'required': True}, + } + + _attribute_map = { + 'source_connection_info': {'key': 'sourceConnectionInfo', 'type': 'MySqlConnectionInfo'}, + 'target_platform': {'key': 'targetPlatform', 'type': 'str'}, + 'check_permissions_group': {'key': 'checkPermissionsGroup', 'type': 'str'}, + 'is_offline_migration': {'key': 'isOfflineMigration', 'type': 'bool'}, + } + + def __init__( + self, + **kwargs + ): + super(ConnectToSourceMySqlTaskInput, self).__init__(**kwargs) + self.source_connection_info = kwargs['source_connection_info'] + self.target_platform = kwargs.get('target_platform', None) + self.check_permissions_group = kwargs.get('check_permissions_group', None) + self.is_offline_migration = kwargs.get('is_offline_migration', False) + + +class ConnectToSourceMySqlTaskProperties(ProjectTaskProperties): + """Properties for the task that validates MySQL database connection. + + Variables are only populated by the server, and will be ignored when sending a request. + + All required parameters must be populated in order to send to Azure. + + :param task_type: Required. Task type.Constant filled by server. Possible values include: + "Connect.MongoDb", "ConnectToSource.SqlServer", "ConnectToSource.SqlServer.Sync", + "ConnectToSource.PostgreSql.Sync", "ConnectToSource.MySql", "ConnectToSource.Oracle.Sync", + "ConnectToTarget.SqlDb", "ConnectToTarget.SqlDb.Sync", + "ConnectToTarget.AzureDbForPostgreSql.Sync", + "ConnectToTarget.Oracle.AzureDbForPostgreSql.Sync", "ConnectToTarget.AzureSqlDbMI", + "ConnectToTarget.AzureSqlDbMI.Sync.LRS", "ConnectToTarget.AzureDbForMySql", + "GetUserTables.Sql", "GetUserTables.AzureSqlDb.Sync", "GetUserTablesOracle", + "GetUserTablesPostgreSql", "GetUserTablesMySql", "Migrate.MongoDb", + "Migrate.SqlServer.AzureSqlDbMI", "Migrate.SqlServer.AzureSqlDbMI.Sync.LRS", + "Migrate.SqlServer.SqlDb", "Migrate.SqlServer.AzureSqlDb.Sync", + "Migrate.MySql.AzureDbForMySql.Sync", "Migrate.MySql.AzureDbForMySql", + "Migrate.PostgreSql.AzureDbForPostgreSql.SyncV2", "Migrate.Oracle.AzureDbForPostgreSql.Sync", + "ValidateMigrationInput.SqlServer.SqlDb.Sync", "ValidateMigrationInput.SqlServer.AzureSqlDbMI", + "ValidateMigrationInput.SqlServer.AzureSqlDbMI.Sync.LRS", "Validate.MongoDb", + "Validate.Oracle.AzureDbPostgreSql.Sync", "GetTDECertificates.Sql", "Migrate.Ssis", + "Service.Check.OCI", "Service.Upload.OCI", "Service.Install.OCI", + "MigrateSchemaSqlServerSqlDb". + :type task_type: str or ~azure.mgmt.datamigration.models.TaskType + :ivar errors: Array of errors. This is ignored if submitted. + :vartype errors: list[~azure.mgmt.datamigration.models.ODataError] + :ivar state: The state of the task. This is ignored if submitted. Possible values include: + "Unknown", "Queued", "Running", "Canceled", "Succeeded", "Failed", "FailedInputValidation", + "Faulted". + :vartype state: str or ~azure.mgmt.datamigration.models.TaskState + :ivar commands: Array of command properties. + :vartype commands: list[~azure.mgmt.datamigration.models.CommandProperties] + :param client_data: Key value pairs of client data to attach meta data information to task. + :type client_data: dict[str, str] + :param input: Task input. + :type input: ~azure.mgmt.datamigration.models.ConnectToSourceMySqlTaskInput + :ivar output: Task output. This is ignored if submitted. + :vartype output: list[~azure.mgmt.datamigration.models.ConnectToSourceNonSqlTaskOutput] + """ + + _validation = { + 'task_type': {'required': True}, + 'errors': {'readonly': True}, + 'state': {'readonly': True}, + 'commands': {'readonly': True}, + 'output': {'readonly': True}, + } + + _attribute_map = { + 'task_type': {'key': 'taskType', 'type': 'str'}, + 'errors': {'key': 'errors', 'type': '[ODataError]'}, + 'state': {'key': 'state', 'type': 'str'}, + 'commands': {'key': 'commands', 'type': '[CommandProperties]'}, + 'client_data': {'key': 'clientData', 'type': '{str}'}, + 'input': {'key': 'input', 'type': 'ConnectToSourceMySqlTaskInput'}, + 'output': {'key': 'output', 'type': '[ConnectToSourceNonSqlTaskOutput]'}, + } + + def __init__( + self, + **kwargs + ): + super(ConnectToSourceMySqlTaskProperties, self).__init__(**kwargs) + self.task_type = 'ConnectToSource.MySql' # type: str + self.input = kwargs.get('input', None) + self.output = None + + +class ConnectToSourceNonSqlTaskOutput(msrest.serialization.Model): + """Output for connect to MySQL type source. + + Variables are only populated by the server, and will be ignored when sending a request. + + :ivar id: Result identifier. + :vartype id: str + :ivar source_server_brand_version: Server brand version. + :vartype source_server_brand_version: str + :ivar server_properties: Server properties. + :vartype server_properties: ~azure.mgmt.datamigration.models.ServerProperties + :ivar databases: List of databases on the server. + :vartype databases: list[str] + :ivar validation_errors: Validation errors associated with the task. + :vartype validation_errors: list[~azure.mgmt.datamigration.models.ReportableException] + """ + + _validation = { + 'id': {'readonly': True}, + 'source_server_brand_version': {'readonly': True}, + 'server_properties': {'readonly': True}, + 'databases': {'readonly': True}, + 'validation_errors': {'readonly': True}, + } + + _attribute_map = { + 'id': {'key': 'id', 'type': 'str'}, + 'source_server_brand_version': {'key': 'sourceServerBrandVersion', 'type': 'str'}, + 'server_properties': {'key': 'serverProperties', 'type': 'ServerProperties'}, + 'databases': {'key': 'databases', 'type': '[str]'}, + 'validation_errors': {'key': 'validationErrors', 'type': '[ReportableException]'}, + } + + def __init__( + self, + **kwargs + ): + super(ConnectToSourceNonSqlTaskOutput, self).__init__(**kwargs) + self.id = None + self.source_server_brand_version = None + self.server_properties = None + self.databases = None + self.validation_errors = None + + +class ConnectToSourceOracleSyncTaskInput(msrest.serialization.Model): + """Input for the task that validates Oracle database connection. + + All required parameters must be populated in order to send to Azure. + + :param source_connection_info: Required. Information for connecting to Oracle source. + :type source_connection_info: ~azure.mgmt.datamigration.models.OracleConnectionInfo + """ + + _validation = { + 'source_connection_info': {'required': True}, + } + + _attribute_map = { + 'source_connection_info': {'key': 'sourceConnectionInfo', 'type': 'OracleConnectionInfo'}, + } + + def __init__( + self, + **kwargs + ): + super(ConnectToSourceOracleSyncTaskInput, self).__init__(**kwargs) + self.source_connection_info = kwargs['source_connection_info'] + + +class ConnectToSourceOracleSyncTaskOutput(msrest.serialization.Model): + """Output for the task that validates Oracle database connection. + + Variables are only populated by the server, and will be ignored when sending a request. + + :ivar source_server_version: Version of the source server. + :vartype source_server_version: str + :ivar databases: List of schemas on source server. + :vartype databases: list[str] + :ivar source_server_brand_version: Source server brand version. + :vartype source_server_brand_version: str + :ivar validation_errors: Validation errors associated with the task. + :vartype validation_errors: list[~azure.mgmt.datamigration.models.ReportableException] + """ + + _validation = { + 'source_server_version': {'readonly': True}, + 'databases': {'readonly': True}, + 'source_server_brand_version': {'readonly': True}, + 'validation_errors': {'readonly': True}, + } + + _attribute_map = { + 'source_server_version': {'key': 'sourceServerVersion', 'type': 'str'}, + 'databases': {'key': 'databases', 'type': '[str]'}, + 'source_server_brand_version': {'key': 'sourceServerBrandVersion', 'type': 'str'}, + 'validation_errors': {'key': 'validationErrors', 'type': '[ReportableException]'}, + } + + def __init__( + self, + **kwargs + ): + super(ConnectToSourceOracleSyncTaskOutput, self).__init__(**kwargs) + self.source_server_version = None + self.databases = None + self.source_server_brand_version = None + self.validation_errors = None + + +class ConnectToSourceOracleSyncTaskProperties(ProjectTaskProperties): + """Properties for the task that validates Oracle database connection. + + Variables are only populated by the server, and will be ignored when sending a request. + + All required parameters must be populated in order to send to Azure. + + :param task_type: Required. Task type.Constant filled by server. Possible values include: + "Connect.MongoDb", "ConnectToSource.SqlServer", "ConnectToSource.SqlServer.Sync", + "ConnectToSource.PostgreSql.Sync", "ConnectToSource.MySql", "ConnectToSource.Oracle.Sync", + "ConnectToTarget.SqlDb", "ConnectToTarget.SqlDb.Sync", + "ConnectToTarget.AzureDbForPostgreSql.Sync", + "ConnectToTarget.Oracle.AzureDbForPostgreSql.Sync", "ConnectToTarget.AzureSqlDbMI", + "ConnectToTarget.AzureSqlDbMI.Sync.LRS", "ConnectToTarget.AzureDbForMySql", + "GetUserTables.Sql", "GetUserTables.AzureSqlDb.Sync", "GetUserTablesOracle", + "GetUserTablesPostgreSql", "GetUserTablesMySql", "Migrate.MongoDb", + "Migrate.SqlServer.AzureSqlDbMI", "Migrate.SqlServer.AzureSqlDbMI.Sync.LRS", + "Migrate.SqlServer.SqlDb", "Migrate.SqlServer.AzureSqlDb.Sync", + "Migrate.MySql.AzureDbForMySql.Sync", "Migrate.MySql.AzureDbForMySql", + "Migrate.PostgreSql.AzureDbForPostgreSql.SyncV2", "Migrate.Oracle.AzureDbForPostgreSql.Sync", + "ValidateMigrationInput.SqlServer.SqlDb.Sync", "ValidateMigrationInput.SqlServer.AzureSqlDbMI", + "ValidateMigrationInput.SqlServer.AzureSqlDbMI.Sync.LRS", "Validate.MongoDb", + "Validate.Oracle.AzureDbPostgreSql.Sync", "GetTDECertificates.Sql", "Migrate.Ssis", + "Service.Check.OCI", "Service.Upload.OCI", "Service.Install.OCI", + "MigrateSchemaSqlServerSqlDb". + :type task_type: str or ~azure.mgmt.datamigration.models.TaskType + :ivar errors: Array of errors. This is ignored if submitted. + :vartype errors: list[~azure.mgmt.datamigration.models.ODataError] + :ivar state: The state of the task. This is ignored if submitted. Possible values include: + "Unknown", "Queued", "Running", "Canceled", "Succeeded", "Failed", "FailedInputValidation", + "Faulted". + :vartype state: str or ~azure.mgmt.datamigration.models.TaskState + :ivar commands: Array of command properties. + :vartype commands: list[~azure.mgmt.datamigration.models.CommandProperties] + :param client_data: Key value pairs of client data to attach meta data information to task. + :type client_data: dict[str, str] + :param input: Task input. + :type input: ~azure.mgmt.datamigration.models.ConnectToSourceOracleSyncTaskInput + :ivar output: Task output. This is ignored if submitted. + :vartype output: list[~azure.mgmt.datamigration.models.ConnectToSourceOracleSyncTaskOutput] + """ + + _validation = { + 'task_type': {'required': True}, + 'errors': {'readonly': True}, + 'state': {'readonly': True}, + 'commands': {'readonly': True}, + 'output': {'readonly': True}, + } + + _attribute_map = { + 'task_type': {'key': 'taskType', 'type': 'str'}, + 'errors': {'key': 'errors', 'type': '[ODataError]'}, + 'state': {'key': 'state', 'type': 'str'}, + 'commands': {'key': 'commands', 'type': '[CommandProperties]'}, + 'client_data': {'key': 'clientData', 'type': '{str}'}, + 'input': {'key': 'input', 'type': 'ConnectToSourceOracleSyncTaskInput'}, + 'output': {'key': 'output', 'type': '[ConnectToSourceOracleSyncTaskOutput]'}, + } + + def __init__( + self, + **kwargs + ): + super(ConnectToSourceOracleSyncTaskProperties, self).__init__(**kwargs) + self.task_type = 'ConnectToSource.Oracle.Sync' # type: str + self.input = kwargs.get('input', None) + self.output = None + + +class ConnectToSourcePostgreSqlSyncTaskInput(msrest.serialization.Model): + """Input for the task that validates connection to PostgreSQL and source server requirements. + + All required parameters must be populated in order to send to Azure. + + :param source_connection_info: Required. Connection information for source PostgreSQL server. + :type source_connection_info: ~azure.mgmt.datamigration.models.PostgreSqlConnectionInfo + """ + + _validation = { + 'source_connection_info': {'required': True}, + } + + _attribute_map = { + 'source_connection_info': {'key': 'sourceConnectionInfo', 'type': 'PostgreSqlConnectionInfo'}, + } + + def __init__( + self, + **kwargs + ): + super(ConnectToSourcePostgreSqlSyncTaskInput, self).__init__(**kwargs) + self.source_connection_info = kwargs['source_connection_info'] + + +class ConnectToSourcePostgreSqlSyncTaskOutput(msrest.serialization.Model): + """Output for the task that validates connection to PostgreSQL and source server requirements. + + Variables are only populated by the server, and will be ignored when sending a request. + + :ivar id: Result identifier. + :vartype id: str + :ivar source_server_version: Version of the source server. + :vartype source_server_version: str + :ivar databases: List of databases on source server. + :vartype databases: list[str] + :ivar source_server_brand_version: Source server brand version. + :vartype source_server_brand_version: str + :ivar validation_errors: Validation errors associated with the task. + :vartype validation_errors: list[~azure.mgmt.datamigration.models.ReportableException] + """ + + _validation = { + 'id': {'readonly': True}, + 'source_server_version': {'readonly': True}, + 'databases': {'readonly': True}, + 'source_server_brand_version': {'readonly': True}, + 'validation_errors': {'readonly': True}, + } + + _attribute_map = { + 'id': {'key': 'id', 'type': 'str'}, + 'source_server_version': {'key': 'sourceServerVersion', 'type': 'str'}, + 'databases': {'key': 'databases', 'type': '[str]'}, + 'source_server_brand_version': {'key': 'sourceServerBrandVersion', 'type': 'str'}, + 'validation_errors': {'key': 'validationErrors', 'type': '[ReportableException]'}, + } + + def __init__( + self, + **kwargs + ): + super(ConnectToSourcePostgreSqlSyncTaskOutput, self).__init__(**kwargs) + self.id = None + self.source_server_version = None + self.databases = None + self.source_server_brand_version = None + self.validation_errors = None + + +class ConnectToSourcePostgreSqlSyncTaskProperties(ProjectTaskProperties): + """Properties for the task that validates connection to PostgreSQL server and source server requirements for online migration. + + Variables are only populated by the server, and will be ignored when sending a request. + + All required parameters must be populated in order to send to Azure. + + :param task_type: Required. Task type.Constant filled by server. Possible values include: + "Connect.MongoDb", "ConnectToSource.SqlServer", "ConnectToSource.SqlServer.Sync", + "ConnectToSource.PostgreSql.Sync", "ConnectToSource.MySql", "ConnectToSource.Oracle.Sync", + "ConnectToTarget.SqlDb", "ConnectToTarget.SqlDb.Sync", + "ConnectToTarget.AzureDbForPostgreSql.Sync", + "ConnectToTarget.Oracle.AzureDbForPostgreSql.Sync", "ConnectToTarget.AzureSqlDbMI", + "ConnectToTarget.AzureSqlDbMI.Sync.LRS", "ConnectToTarget.AzureDbForMySql", + "GetUserTables.Sql", "GetUserTables.AzureSqlDb.Sync", "GetUserTablesOracle", + "GetUserTablesPostgreSql", "GetUserTablesMySql", "Migrate.MongoDb", + "Migrate.SqlServer.AzureSqlDbMI", "Migrate.SqlServer.AzureSqlDbMI.Sync.LRS", + "Migrate.SqlServer.SqlDb", "Migrate.SqlServer.AzureSqlDb.Sync", + "Migrate.MySql.AzureDbForMySql.Sync", "Migrate.MySql.AzureDbForMySql", + "Migrate.PostgreSql.AzureDbForPostgreSql.SyncV2", "Migrate.Oracle.AzureDbForPostgreSql.Sync", + "ValidateMigrationInput.SqlServer.SqlDb.Sync", "ValidateMigrationInput.SqlServer.AzureSqlDbMI", + "ValidateMigrationInput.SqlServer.AzureSqlDbMI.Sync.LRS", "Validate.MongoDb", + "Validate.Oracle.AzureDbPostgreSql.Sync", "GetTDECertificates.Sql", "Migrate.Ssis", + "Service.Check.OCI", "Service.Upload.OCI", "Service.Install.OCI", + "MigrateSchemaSqlServerSqlDb". + :type task_type: str or ~azure.mgmt.datamigration.models.TaskType + :ivar errors: Array of errors. This is ignored if submitted. + :vartype errors: list[~azure.mgmt.datamigration.models.ODataError] + :ivar state: The state of the task. This is ignored if submitted. Possible values include: + "Unknown", "Queued", "Running", "Canceled", "Succeeded", "Failed", "FailedInputValidation", + "Faulted". + :vartype state: str or ~azure.mgmt.datamigration.models.TaskState + :ivar commands: Array of command properties. + :vartype commands: list[~azure.mgmt.datamigration.models.CommandProperties] + :param client_data: Key value pairs of client data to attach meta data information to task. + :type client_data: dict[str, str] + :param input: Task input. + :type input: ~azure.mgmt.datamigration.models.ConnectToSourcePostgreSqlSyncTaskInput + :ivar output: Task output. This is ignored if submitted. + :vartype output: list[~azure.mgmt.datamigration.models.ConnectToSourcePostgreSqlSyncTaskOutput] + """ + + _validation = { + 'task_type': {'required': True}, + 'errors': {'readonly': True}, + 'state': {'readonly': True}, + 'commands': {'readonly': True}, + 'output': {'readonly': True}, + } + + _attribute_map = { + 'task_type': {'key': 'taskType', 'type': 'str'}, + 'errors': {'key': 'errors', 'type': '[ODataError]'}, + 'state': {'key': 'state', 'type': 'str'}, + 'commands': {'key': 'commands', 'type': '[CommandProperties]'}, + 'client_data': {'key': 'clientData', 'type': '{str}'}, + 'input': {'key': 'input', 'type': 'ConnectToSourcePostgreSqlSyncTaskInput'}, + 'output': {'key': 'output', 'type': '[ConnectToSourcePostgreSqlSyncTaskOutput]'}, + } + + def __init__( + self, + **kwargs + ): + super(ConnectToSourcePostgreSqlSyncTaskProperties, self).__init__(**kwargs) + self.task_type = 'ConnectToSource.PostgreSql.Sync' # type: str + self.input = kwargs.get('input', None) + self.output = None + + +class ConnectToSourceSqlServerSyncTaskProperties(ProjectTaskProperties): + """Properties for the task that validates connection to SQL Server and source server requirements for online migration. + + Variables are only populated by the server, and will be ignored when sending a request. + + All required parameters must be populated in order to send to Azure. + + :param task_type: Required. Task type.Constant filled by server. Possible values include: + "Connect.MongoDb", "ConnectToSource.SqlServer", "ConnectToSource.SqlServer.Sync", + "ConnectToSource.PostgreSql.Sync", "ConnectToSource.MySql", "ConnectToSource.Oracle.Sync", + "ConnectToTarget.SqlDb", "ConnectToTarget.SqlDb.Sync", + "ConnectToTarget.AzureDbForPostgreSql.Sync", + "ConnectToTarget.Oracle.AzureDbForPostgreSql.Sync", "ConnectToTarget.AzureSqlDbMI", + "ConnectToTarget.AzureSqlDbMI.Sync.LRS", "ConnectToTarget.AzureDbForMySql", + "GetUserTables.Sql", "GetUserTables.AzureSqlDb.Sync", "GetUserTablesOracle", + "GetUserTablesPostgreSql", "GetUserTablesMySql", "Migrate.MongoDb", + "Migrate.SqlServer.AzureSqlDbMI", "Migrate.SqlServer.AzureSqlDbMI.Sync.LRS", + "Migrate.SqlServer.SqlDb", "Migrate.SqlServer.AzureSqlDb.Sync", + "Migrate.MySql.AzureDbForMySql.Sync", "Migrate.MySql.AzureDbForMySql", + "Migrate.PostgreSql.AzureDbForPostgreSql.SyncV2", "Migrate.Oracle.AzureDbForPostgreSql.Sync", + "ValidateMigrationInput.SqlServer.SqlDb.Sync", "ValidateMigrationInput.SqlServer.AzureSqlDbMI", + "ValidateMigrationInput.SqlServer.AzureSqlDbMI.Sync.LRS", "Validate.MongoDb", + "Validate.Oracle.AzureDbPostgreSql.Sync", "GetTDECertificates.Sql", "Migrate.Ssis", + "Service.Check.OCI", "Service.Upload.OCI", "Service.Install.OCI", + "MigrateSchemaSqlServerSqlDb". + :type task_type: str or ~azure.mgmt.datamigration.models.TaskType + :ivar errors: Array of errors. This is ignored if submitted. + :vartype errors: list[~azure.mgmt.datamigration.models.ODataError] + :ivar state: The state of the task. This is ignored if submitted. Possible values include: + "Unknown", "Queued", "Running", "Canceled", "Succeeded", "Failed", "FailedInputValidation", + "Faulted". + :vartype state: str or ~azure.mgmt.datamigration.models.TaskState + :ivar commands: Array of command properties. + :vartype commands: list[~azure.mgmt.datamigration.models.CommandProperties] + :param client_data: Key value pairs of client data to attach meta data information to task. + :type client_data: dict[str, str] + :param input: Task input. + :type input: ~azure.mgmt.datamigration.models.ConnectToSourceSqlServerTaskInput + :ivar output: Task output. This is ignored if submitted. + :vartype output: list[~azure.mgmt.datamigration.models.ConnectToSourceSqlServerTaskOutput] + """ + + _validation = { + 'task_type': {'required': True}, + 'errors': {'readonly': True}, + 'state': {'readonly': True}, + 'commands': {'readonly': True}, + 'output': {'readonly': True}, + } + + _attribute_map = { + 'task_type': {'key': 'taskType', 'type': 'str'}, + 'errors': {'key': 'errors', 'type': '[ODataError]'}, + 'state': {'key': 'state', 'type': 'str'}, + 'commands': {'key': 'commands', 'type': '[CommandProperties]'}, + 'client_data': {'key': 'clientData', 'type': '{str}'}, + 'input': {'key': 'input', 'type': 'ConnectToSourceSqlServerTaskInput'}, + 'output': {'key': 'output', 'type': '[ConnectToSourceSqlServerTaskOutput]'}, + } + + def __init__( + self, + **kwargs + ): + super(ConnectToSourceSqlServerSyncTaskProperties, self).__init__(**kwargs) + self.task_type = 'ConnectToSource.SqlServer.Sync' # type: str + self.input = kwargs.get('input', None) + self.output = None + + +class ConnectToSourceSqlServerTaskInput(msrest.serialization.Model): + """Input for the task that validates connection to SQL Server and also validates source server requirements. + + All required parameters must be populated in order to send to Azure. + + :param source_connection_info: Required. Connection information for Source SQL Server. + :type source_connection_info: ~azure.mgmt.datamigration.models.SqlConnectionInfo + :param check_permissions_group: Permission group for validations. Possible values include: + "Default", "MigrationFromSqlServerToAzureDB", "MigrationFromSqlServerToAzureMI", + "MigrationFromMySQLToAzureDBForMySQL". + :type check_permissions_group: str or + ~azure.mgmt.datamigration.models.ServerLevelPermissionsGroup + :param collect_databases: Flag for whether to collect databases from source server. + :type collect_databases: bool + :param collect_logins: Flag for whether to collect logins from source server. + :type collect_logins: bool + :param collect_agent_jobs: Flag for whether to collect agent jobs from source server. + :type collect_agent_jobs: bool + :param collect_tde_certificate_info: Flag for whether to collect TDE Certificate names from + source server. + :type collect_tde_certificate_info: bool + :param validate_ssis_catalog_only: Flag for whether to validate SSIS catalog is reachable on + the source server. + :type validate_ssis_catalog_only: bool + """ + + _validation = { + 'source_connection_info': {'required': True}, + } + + _attribute_map = { + 'source_connection_info': {'key': 'sourceConnectionInfo', 'type': 'SqlConnectionInfo'}, + 'check_permissions_group': {'key': 'checkPermissionsGroup', 'type': 'str'}, + 'collect_databases': {'key': 'collectDatabases', 'type': 'bool'}, + 'collect_logins': {'key': 'collectLogins', 'type': 'bool'}, + 'collect_agent_jobs': {'key': 'collectAgentJobs', 'type': 'bool'}, + 'collect_tde_certificate_info': {'key': 'collectTdeCertificateInfo', 'type': 'bool'}, + 'validate_ssis_catalog_only': {'key': 'validateSsisCatalogOnly', 'type': 'bool'}, + } + + def __init__( + self, + **kwargs + ): + super(ConnectToSourceSqlServerTaskInput, self).__init__(**kwargs) + self.source_connection_info = kwargs['source_connection_info'] + self.check_permissions_group = kwargs.get('check_permissions_group', None) + self.collect_databases = kwargs.get('collect_databases', True) + self.collect_logins = kwargs.get('collect_logins', False) + self.collect_agent_jobs = kwargs.get('collect_agent_jobs', False) + self.collect_tde_certificate_info = kwargs.get('collect_tde_certificate_info', False) + self.validate_ssis_catalog_only = kwargs.get('validate_ssis_catalog_only', False) + + +class ConnectToSourceSqlServerTaskOutput(msrest.serialization.Model): + """Output for the task that validates connection to SQL Server and also validates source server requirements. + + You probably want to use the sub-classes and not this class directly. Known + sub-classes are: ConnectToSourceSqlServerTaskOutputAgentJobLevel, ConnectToSourceSqlServerTaskOutputDatabaseLevel, ConnectToSourceSqlServerTaskOutputLoginLevel, ConnectToSourceSqlServerTaskOutputTaskLevel. + + Variables are only populated by the server, and will be ignored when sending a request. + + All required parameters must be populated in order to send to Azure. + + :ivar id: Result identifier. + :vartype id: str + :param result_type: Required. Type of result - database level or task level.Constant filled by + server. + :type result_type: str + """ + + _validation = { + 'id': {'readonly': True}, + 'result_type': {'required': True}, + } + + _attribute_map = { + 'id': {'key': 'id', 'type': 'str'}, + 'result_type': {'key': 'resultType', 'type': 'str'}, + } + + _subtype_map = { + 'result_type': {'AgentJobLevelOutput': 'ConnectToSourceSqlServerTaskOutputAgentJobLevel', 'DatabaseLevelOutput': 'ConnectToSourceSqlServerTaskOutputDatabaseLevel', 'LoginLevelOutput': 'ConnectToSourceSqlServerTaskOutputLoginLevel', 'TaskLevelOutput': 'ConnectToSourceSqlServerTaskOutputTaskLevel'} + } + + def __init__( + self, + **kwargs + ): + super(ConnectToSourceSqlServerTaskOutput, self).__init__(**kwargs) + self.id = None + self.result_type = None # type: Optional[str] + + +class ConnectToSourceSqlServerTaskOutputAgentJobLevel(ConnectToSourceSqlServerTaskOutput): + """Agent Job level output for the task that validates connection to SQL Server and also validates source server requirements. + + Variables are only populated by the server, and will be ignored when sending a request. + + All required parameters must be populated in order to send to Azure. + + :ivar id: Result identifier. + :vartype id: str + :param result_type: Required. Type of result - database level or task level.Constant filled by + server. + :type result_type: str + :ivar name: Agent Job name. + :vartype name: str + :ivar job_category: The type of Agent Job. + :vartype job_category: str + :ivar is_enabled: The state of the original Agent Job. + :vartype is_enabled: bool + :ivar job_owner: The owner of the Agent Job. + :vartype job_owner: str + :ivar last_executed_on: UTC Date and time when the Agent Job was last executed. + :vartype last_executed_on: ~datetime.datetime + :ivar validation_errors: Validation errors. + :vartype validation_errors: list[~azure.mgmt.datamigration.models.ReportableException] + :ivar migration_eligibility: Information about eligibility of agent job for migration. + :vartype migration_eligibility: ~azure.mgmt.datamigration.models.MigrationEligibilityInfo + """ + + _validation = { + 'id': {'readonly': True}, + 'result_type': {'required': True}, + 'name': {'readonly': True}, + 'job_category': {'readonly': True}, + 'is_enabled': {'readonly': True}, + 'job_owner': {'readonly': True}, + 'last_executed_on': {'readonly': True}, + 'validation_errors': {'readonly': True}, + 'migration_eligibility': {'readonly': True}, + } + + _attribute_map = { + 'id': {'key': 'id', 'type': 'str'}, + 'result_type': {'key': 'resultType', 'type': 'str'}, + 'name': {'key': 'name', 'type': 'str'}, + 'job_category': {'key': 'jobCategory', 'type': 'str'}, + 'is_enabled': {'key': 'isEnabled', 'type': 'bool'}, + 'job_owner': {'key': 'jobOwner', 'type': 'str'}, + 'last_executed_on': {'key': 'lastExecutedOn', 'type': 'iso-8601'}, + 'validation_errors': {'key': 'validationErrors', 'type': '[ReportableException]'}, + 'migration_eligibility': {'key': 'migrationEligibility', 'type': 'MigrationEligibilityInfo'}, + } + + def __init__( + self, + **kwargs + ): + super(ConnectToSourceSqlServerTaskOutputAgentJobLevel, self).__init__(**kwargs) + self.result_type = 'AgentJobLevelOutput' # type: str + self.name = None + self.job_category = None + self.is_enabled = None + self.job_owner = None + self.last_executed_on = None + self.validation_errors = None + self.migration_eligibility = None + + +class ConnectToSourceSqlServerTaskOutputDatabaseLevel(ConnectToSourceSqlServerTaskOutput): + """Database level output for the task that validates connection to SQL Server and also validates source server requirements. + + Variables are only populated by the server, and will be ignored when sending a request. + + All required parameters must be populated in order to send to Azure. + + :ivar id: Result identifier. + :vartype id: str + :param result_type: Required. Type of result - database level or task level.Constant filled by + server. + :type result_type: str + :ivar name: Database name. + :vartype name: str + :ivar size_mb: Size of the file in megabytes. + :vartype size_mb: float + :ivar database_files: The list of database files. + :vartype database_files: list[~azure.mgmt.datamigration.models.DatabaseFileInfo] + :ivar compatibility_level: SQL Server compatibility level of database. Possible values include: + "CompatLevel80", "CompatLevel90", "CompatLevel100", "CompatLevel110", "CompatLevel120", + "CompatLevel130", "CompatLevel140". + :vartype compatibility_level: str or ~azure.mgmt.datamigration.models.DatabaseCompatLevel + :ivar database_state: State of the database. Possible values include: "Online", "Restoring", + "Recovering", "RecoveryPending", "Suspect", "Emergency", "Offline", "Copying", + "OfflineSecondary". + :vartype database_state: str or ~azure.mgmt.datamigration.models.DatabaseState + """ + + _validation = { + 'id': {'readonly': True}, + 'result_type': {'required': True}, + 'name': {'readonly': True}, + 'size_mb': {'readonly': True}, + 'database_files': {'readonly': True}, + 'compatibility_level': {'readonly': True}, + 'database_state': {'readonly': True}, + } + + _attribute_map = { + 'id': {'key': 'id', 'type': 'str'}, + 'result_type': {'key': 'resultType', 'type': 'str'}, + 'name': {'key': 'name', 'type': 'str'}, + 'size_mb': {'key': 'sizeMB', 'type': 'float'}, + 'database_files': {'key': 'databaseFiles', 'type': '[DatabaseFileInfo]'}, + 'compatibility_level': {'key': 'compatibilityLevel', 'type': 'str'}, + 'database_state': {'key': 'databaseState', 'type': 'str'}, + } + + def __init__( + self, + **kwargs + ): + super(ConnectToSourceSqlServerTaskOutputDatabaseLevel, self).__init__(**kwargs) + self.result_type = 'DatabaseLevelOutput' # type: str + self.name = None + self.size_mb = None + self.database_files = None + self.compatibility_level = None + self.database_state = None + + +class ConnectToSourceSqlServerTaskOutputLoginLevel(ConnectToSourceSqlServerTaskOutput): + """Login level output for the task that validates connection to SQL Server and also validates source server requirements. + + Variables are only populated by the server, and will be ignored when sending a request. + + All required parameters must be populated in order to send to Azure. + + :ivar id: Result identifier. + :vartype id: str + :param result_type: Required. Type of result - database level or task level.Constant filled by + server. + :type result_type: str + :ivar name: Login name. + :vartype name: str + :ivar login_type: The type of login. Possible values include: "WindowsUser", "WindowsGroup", + "SqlLogin", "Certificate", "AsymmetricKey", "ExternalUser", "ExternalGroup". + :vartype login_type: str or ~azure.mgmt.datamigration.models.LoginType + :ivar default_database: The default database for the login. + :vartype default_database: str + :ivar is_enabled: The state of the login. + :vartype is_enabled: bool + :ivar migration_eligibility: Information about eligibility of login for migration. + :vartype migration_eligibility: ~azure.mgmt.datamigration.models.MigrationEligibilityInfo + """ + + _validation = { + 'id': {'readonly': True}, + 'result_type': {'required': True}, + 'name': {'readonly': True}, + 'login_type': {'readonly': True}, + 'default_database': {'readonly': True}, + 'is_enabled': {'readonly': True}, + 'migration_eligibility': {'readonly': True}, + } + + _attribute_map = { + 'id': {'key': 'id', 'type': 'str'}, + 'result_type': {'key': 'resultType', 'type': 'str'}, + 'name': {'key': 'name', 'type': 'str'}, + 'login_type': {'key': 'loginType', 'type': 'str'}, + 'default_database': {'key': 'defaultDatabase', 'type': 'str'}, + 'is_enabled': {'key': 'isEnabled', 'type': 'bool'}, + 'migration_eligibility': {'key': 'migrationEligibility', 'type': 'MigrationEligibilityInfo'}, + } + + def __init__( + self, + **kwargs + ): + super(ConnectToSourceSqlServerTaskOutputLoginLevel, self).__init__(**kwargs) + self.result_type = 'LoginLevelOutput' # type: str + self.name = None + self.login_type = None + self.default_database = None + self.is_enabled = None + self.migration_eligibility = None + + +class ConnectToSourceSqlServerTaskOutputTaskLevel(ConnectToSourceSqlServerTaskOutput): + """Task level output for the task that validates connection to SQL Server and also validates source server requirements. + + Variables are only populated by the server, and will be ignored when sending a request. + + All required parameters must be populated in order to send to Azure. + + :ivar id: Result identifier. + :vartype id: str + :param result_type: Required. Type of result - database level or task level.Constant filled by + server. + :type result_type: str + :ivar databases: Source databases as a map from database name to database id. + :vartype databases: str + :ivar logins: Source logins as a map from login name to login id. + :vartype logins: str + :ivar agent_jobs: Source agent jobs as a map from agent job name to id. + :vartype agent_jobs: str + :ivar database_tde_certificate_mapping: Mapping from database name to TDE certificate name, if + applicable. + :vartype database_tde_certificate_mapping: str + :ivar source_server_version: Source server version. + :vartype source_server_version: str + :ivar source_server_brand_version: Source server brand version. + :vartype source_server_brand_version: str + :ivar validation_errors: Validation errors. + :vartype validation_errors: list[~azure.mgmt.datamigration.models.ReportableException] + """ + + _validation = { + 'id': {'readonly': True}, + 'result_type': {'required': True}, + 'databases': {'readonly': True}, + 'logins': {'readonly': True}, + 'agent_jobs': {'readonly': True}, + 'database_tde_certificate_mapping': {'readonly': True}, + 'source_server_version': {'readonly': True}, + 'source_server_brand_version': {'readonly': True}, + 'validation_errors': {'readonly': True}, + } + + _attribute_map = { + 'id': {'key': 'id', 'type': 'str'}, + 'result_type': {'key': 'resultType', 'type': 'str'}, + 'databases': {'key': 'databases', 'type': 'str'}, + 'logins': {'key': 'logins', 'type': 'str'}, + 'agent_jobs': {'key': 'agentJobs', 'type': 'str'}, + 'database_tde_certificate_mapping': {'key': 'databaseTdeCertificateMapping', 'type': 'str'}, + 'source_server_version': {'key': 'sourceServerVersion', 'type': 'str'}, + 'source_server_brand_version': {'key': 'sourceServerBrandVersion', 'type': 'str'}, + 'validation_errors': {'key': 'validationErrors', 'type': '[ReportableException]'}, + } + + def __init__( + self, + **kwargs + ): + super(ConnectToSourceSqlServerTaskOutputTaskLevel, self).__init__(**kwargs) + self.result_type = 'TaskLevelOutput' # type: str + self.databases = None + self.logins = None + self.agent_jobs = None + self.database_tde_certificate_mapping = None + self.source_server_version = None + self.source_server_brand_version = None + self.validation_errors = None + + +class ConnectToSourceSqlServerTaskProperties(ProjectTaskProperties): + """Properties for the task that validates connection to SQL Server and also validates source server requirements. + + Variables are only populated by the server, and will be ignored when sending a request. + + All required parameters must be populated in order to send to Azure. + + :param task_type: Required. Task type.Constant filled by server. Possible values include: + "Connect.MongoDb", "ConnectToSource.SqlServer", "ConnectToSource.SqlServer.Sync", + "ConnectToSource.PostgreSql.Sync", "ConnectToSource.MySql", "ConnectToSource.Oracle.Sync", + "ConnectToTarget.SqlDb", "ConnectToTarget.SqlDb.Sync", + "ConnectToTarget.AzureDbForPostgreSql.Sync", + "ConnectToTarget.Oracle.AzureDbForPostgreSql.Sync", "ConnectToTarget.AzureSqlDbMI", + "ConnectToTarget.AzureSqlDbMI.Sync.LRS", "ConnectToTarget.AzureDbForMySql", + "GetUserTables.Sql", "GetUserTables.AzureSqlDb.Sync", "GetUserTablesOracle", + "GetUserTablesPostgreSql", "GetUserTablesMySql", "Migrate.MongoDb", + "Migrate.SqlServer.AzureSqlDbMI", "Migrate.SqlServer.AzureSqlDbMI.Sync.LRS", + "Migrate.SqlServer.SqlDb", "Migrate.SqlServer.AzureSqlDb.Sync", + "Migrate.MySql.AzureDbForMySql.Sync", "Migrate.MySql.AzureDbForMySql", + "Migrate.PostgreSql.AzureDbForPostgreSql.SyncV2", "Migrate.Oracle.AzureDbForPostgreSql.Sync", + "ValidateMigrationInput.SqlServer.SqlDb.Sync", "ValidateMigrationInput.SqlServer.AzureSqlDbMI", + "ValidateMigrationInput.SqlServer.AzureSqlDbMI.Sync.LRS", "Validate.MongoDb", + "Validate.Oracle.AzureDbPostgreSql.Sync", "GetTDECertificates.Sql", "Migrate.Ssis", + "Service.Check.OCI", "Service.Upload.OCI", "Service.Install.OCI", + "MigrateSchemaSqlServerSqlDb". + :type task_type: str or ~azure.mgmt.datamigration.models.TaskType + :ivar errors: Array of errors. This is ignored if submitted. + :vartype errors: list[~azure.mgmt.datamigration.models.ODataError] + :ivar state: The state of the task. This is ignored if submitted. Possible values include: + "Unknown", "Queued", "Running", "Canceled", "Succeeded", "Failed", "FailedInputValidation", + "Faulted". + :vartype state: str or ~azure.mgmt.datamigration.models.TaskState + :ivar commands: Array of command properties. + :vartype commands: list[~azure.mgmt.datamigration.models.CommandProperties] + :param client_data: Key value pairs of client data to attach meta data information to task. + :type client_data: dict[str, str] + :param input: Task input. + :type input: ~azure.mgmt.datamigration.models.ConnectToSourceSqlServerTaskInput + :ivar output: Task output. This is ignored if submitted. + :vartype output: list[~azure.mgmt.datamigration.models.ConnectToSourceSqlServerTaskOutput] + """ + + _validation = { + 'task_type': {'required': True}, + 'errors': {'readonly': True}, + 'state': {'readonly': True}, + 'commands': {'readonly': True}, + 'output': {'readonly': True}, + } + + _attribute_map = { + 'task_type': {'key': 'taskType', 'type': 'str'}, + 'errors': {'key': 'errors', 'type': '[ODataError]'}, + 'state': {'key': 'state', 'type': 'str'}, + 'commands': {'key': 'commands', 'type': '[CommandProperties]'}, + 'client_data': {'key': 'clientData', 'type': '{str}'}, + 'input': {'key': 'input', 'type': 'ConnectToSourceSqlServerTaskInput'}, + 'output': {'key': 'output', 'type': '[ConnectToSourceSqlServerTaskOutput]'}, + } + + def __init__( + self, + **kwargs + ): + super(ConnectToSourceSqlServerTaskProperties, self).__init__(**kwargs) + self.task_type = 'ConnectToSource.SqlServer' # type: str + self.input = kwargs.get('input', None) + self.output = None + + +class ConnectToTargetAzureDbForMySqlTaskInput(msrest.serialization.Model): + """Input for the task that validates connection to Azure Database for MySQL and target server requirements. + + All required parameters must be populated in order to send to Azure. + + :param source_connection_info: Required. Connection information for source MySQL server. + :type source_connection_info: ~azure.mgmt.datamigration.models.MySqlConnectionInfo + :param target_connection_info: Required. Connection information for target Azure Database for + MySQL server. + :type target_connection_info: ~azure.mgmt.datamigration.models.MySqlConnectionInfo + :param is_offline_migration: Flag for whether or not the migration is offline. + :type is_offline_migration: bool + """ + + _validation = { + 'source_connection_info': {'required': True}, + 'target_connection_info': {'required': True}, + } + + _attribute_map = { + 'source_connection_info': {'key': 'sourceConnectionInfo', 'type': 'MySqlConnectionInfo'}, + 'target_connection_info': {'key': 'targetConnectionInfo', 'type': 'MySqlConnectionInfo'}, + 'is_offline_migration': {'key': 'isOfflineMigration', 'type': 'bool'}, + } + + def __init__( + self, + **kwargs + ): + super(ConnectToTargetAzureDbForMySqlTaskInput, self).__init__(**kwargs) + self.source_connection_info = kwargs['source_connection_info'] + self.target_connection_info = kwargs['target_connection_info'] + self.is_offline_migration = kwargs.get('is_offline_migration', False) + + +class ConnectToTargetAzureDbForMySqlTaskOutput(msrest.serialization.Model): + """Output for the task that validates connection to Azure Database for MySQL and target server requirements. + + Variables are only populated by the server, and will be ignored when sending a request. + + :ivar id: Result identifier. + :vartype id: str + :ivar server_version: Version of the target server. + :vartype server_version: str + :ivar databases: List of databases on target server. + :vartype databases: list[str] + :ivar target_server_brand_version: Target server brand version. + :vartype target_server_brand_version: str + :ivar validation_errors: Validation errors associated with the task. + :vartype validation_errors: list[~azure.mgmt.datamigration.models.ReportableException] + """ + + _validation = { + 'id': {'readonly': True}, + 'server_version': {'readonly': True}, + 'databases': {'readonly': True}, + 'target_server_brand_version': {'readonly': True}, + 'validation_errors': {'readonly': True}, + } + + _attribute_map = { + 'id': {'key': 'id', 'type': 'str'}, + 'server_version': {'key': 'serverVersion', 'type': 'str'}, + 'databases': {'key': 'databases', 'type': '[str]'}, + 'target_server_brand_version': {'key': 'targetServerBrandVersion', 'type': 'str'}, + 'validation_errors': {'key': 'validationErrors', 'type': '[ReportableException]'}, + } + + def __init__( + self, + **kwargs + ): + super(ConnectToTargetAzureDbForMySqlTaskOutput, self).__init__(**kwargs) + self.id = None + self.server_version = None + self.databases = None + self.target_server_brand_version = None + self.validation_errors = None + + +class ConnectToTargetAzureDbForMySqlTaskProperties(ProjectTaskProperties): + """Properties for the task that validates connection to Azure Database for MySQL and target server requirements. + + Variables are only populated by the server, and will be ignored when sending a request. + + All required parameters must be populated in order to send to Azure. + + :param task_type: Required. Task type.Constant filled by server. Possible values include: + "Connect.MongoDb", "ConnectToSource.SqlServer", "ConnectToSource.SqlServer.Sync", + "ConnectToSource.PostgreSql.Sync", "ConnectToSource.MySql", "ConnectToSource.Oracle.Sync", + "ConnectToTarget.SqlDb", "ConnectToTarget.SqlDb.Sync", + "ConnectToTarget.AzureDbForPostgreSql.Sync", + "ConnectToTarget.Oracle.AzureDbForPostgreSql.Sync", "ConnectToTarget.AzureSqlDbMI", + "ConnectToTarget.AzureSqlDbMI.Sync.LRS", "ConnectToTarget.AzureDbForMySql", + "GetUserTables.Sql", "GetUserTables.AzureSqlDb.Sync", "GetUserTablesOracle", + "GetUserTablesPostgreSql", "GetUserTablesMySql", "Migrate.MongoDb", + "Migrate.SqlServer.AzureSqlDbMI", "Migrate.SqlServer.AzureSqlDbMI.Sync.LRS", + "Migrate.SqlServer.SqlDb", "Migrate.SqlServer.AzureSqlDb.Sync", + "Migrate.MySql.AzureDbForMySql.Sync", "Migrate.MySql.AzureDbForMySql", + "Migrate.PostgreSql.AzureDbForPostgreSql.SyncV2", "Migrate.Oracle.AzureDbForPostgreSql.Sync", + "ValidateMigrationInput.SqlServer.SqlDb.Sync", "ValidateMigrationInput.SqlServer.AzureSqlDbMI", + "ValidateMigrationInput.SqlServer.AzureSqlDbMI.Sync.LRS", "Validate.MongoDb", + "Validate.Oracle.AzureDbPostgreSql.Sync", "GetTDECertificates.Sql", "Migrate.Ssis", + "Service.Check.OCI", "Service.Upload.OCI", "Service.Install.OCI", + "MigrateSchemaSqlServerSqlDb". + :type task_type: str or ~azure.mgmt.datamigration.models.TaskType + :ivar errors: Array of errors. This is ignored if submitted. + :vartype errors: list[~azure.mgmt.datamigration.models.ODataError] + :ivar state: The state of the task. This is ignored if submitted. Possible values include: + "Unknown", "Queued", "Running", "Canceled", "Succeeded", "Failed", "FailedInputValidation", + "Faulted". + :vartype state: str or ~azure.mgmt.datamigration.models.TaskState + :ivar commands: Array of command properties. + :vartype commands: list[~azure.mgmt.datamigration.models.CommandProperties] + :param client_data: Key value pairs of client data to attach meta data information to task. + :type client_data: dict[str, str] + :param input: Task input. + :type input: ~azure.mgmt.datamigration.models.ConnectToTargetAzureDbForMySqlTaskInput + :ivar output: Task output. This is ignored if submitted. + :vartype output: + list[~azure.mgmt.datamigration.models.ConnectToTargetAzureDbForMySqlTaskOutput] + """ + + _validation = { + 'task_type': {'required': True}, + 'errors': {'readonly': True}, + 'state': {'readonly': True}, + 'commands': {'readonly': True}, + 'output': {'readonly': True}, + } + + _attribute_map = { + 'task_type': {'key': 'taskType', 'type': 'str'}, + 'errors': {'key': 'errors', 'type': '[ODataError]'}, + 'state': {'key': 'state', 'type': 'str'}, + 'commands': {'key': 'commands', 'type': '[CommandProperties]'}, + 'client_data': {'key': 'clientData', 'type': '{str}'}, + 'input': {'key': 'input', 'type': 'ConnectToTargetAzureDbForMySqlTaskInput'}, + 'output': {'key': 'output', 'type': '[ConnectToTargetAzureDbForMySqlTaskOutput]'}, + } + + def __init__( + self, + **kwargs + ): + super(ConnectToTargetAzureDbForMySqlTaskProperties, self).__init__(**kwargs) + self.task_type = 'ConnectToTarget.AzureDbForMySql' # type: str + self.input = kwargs.get('input', None) + self.output = None + + +class ConnectToTargetAzureDbForPostgreSqlSyncTaskInput(msrest.serialization.Model): + """Input for the task that validates connection to Azure Database for PostgreSQL and target server requirements. + + All required parameters must be populated in order to send to Azure. + + :param source_connection_info: Required. Connection information for source PostgreSQL server. + :type source_connection_info: ~azure.mgmt.datamigration.models.PostgreSqlConnectionInfo + :param target_connection_info: Required. Connection information for target Azure Database for + PostgreSQL server. + :type target_connection_info: ~azure.mgmt.datamigration.models.PostgreSqlConnectionInfo + """ + + _validation = { + 'source_connection_info': {'required': True}, + 'target_connection_info': {'required': True}, + } + + _attribute_map = { + 'source_connection_info': {'key': 'sourceConnectionInfo', 'type': 'PostgreSqlConnectionInfo'}, + 'target_connection_info': {'key': 'targetConnectionInfo', 'type': 'PostgreSqlConnectionInfo'}, + } + + def __init__( + self, + **kwargs + ): + super(ConnectToTargetAzureDbForPostgreSqlSyncTaskInput, self).__init__(**kwargs) + self.source_connection_info = kwargs['source_connection_info'] + self.target_connection_info = kwargs['target_connection_info'] + + +class ConnectToTargetAzureDbForPostgreSqlSyncTaskOutput(msrest.serialization.Model): + """Output for the task that validates connection to Azure Database for PostgreSQL and target server requirements. + + Variables are only populated by the server, and will be ignored when sending a request. + + :ivar id: Result identifier. + :vartype id: str + :ivar target_server_version: Version of the target server. + :vartype target_server_version: str + :ivar databases: List of databases on target server. + :vartype databases: list[str] + :ivar target_server_brand_version: Target server brand version. + :vartype target_server_brand_version: str + :ivar validation_errors: Validation errors associated with the task. + :vartype validation_errors: list[~azure.mgmt.datamigration.models.ReportableException] + """ + + _validation = { + 'id': {'readonly': True}, + 'target_server_version': {'readonly': True}, + 'databases': {'readonly': True}, + 'target_server_brand_version': {'readonly': True}, + 'validation_errors': {'readonly': True}, + } + + _attribute_map = { + 'id': {'key': 'id', 'type': 'str'}, + 'target_server_version': {'key': 'targetServerVersion', 'type': 'str'}, + 'databases': {'key': 'databases', 'type': '[str]'}, + 'target_server_brand_version': {'key': 'targetServerBrandVersion', 'type': 'str'}, + 'validation_errors': {'key': 'validationErrors', 'type': '[ReportableException]'}, + } + + def __init__( + self, + **kwargs + ): + super(ConnectToTargetAzureDbForPostgreSqlSyncTaskOutput, self).__init__(**kwargs) + self.id = None + self.target_server_version = None + self.databases = None + self.target_server_brand_version = None + self.validation_errors = None + + +class ConnectToTargetAzureDbForPostgreSqlSyncTaskProperties(ProjectTaskProperties): + """Properties for the task that validates connection to Azure Database For PostgreSQL server and target server requirements for online migration. + + Variables are only populated by the server, and will be ignored when sending a request. + + All required parameters must be populated in order to send to Azure. + + :param task_type: Required. Task type.Constant filled by server. Possible values include: + "Connect.MongoDb", "ConnectToSource.SqlServer", "ConnectToSource.SqlServer.Sync", + "ConnectToSource.PostgreSql.Sync", "ConnectToSource.MySql", "ConnectToSource.Oracle.Sync", + "ConnectToTarget.SqlDb", "ConnectToTarget.SqlDb.Sync", + "ConnectToTarget.AzureDbForPostgreSql.Sync", + "ConnectToTarget.Oracle.AzureDbForPostgreSql.Sync", "ConnectToTarget.AzureSqlDbMI", + "ConnectToTarget.AzureSqlDbMI.Sync.LRS", "ConnectToTarget.AzureDbForMySql", + "GetUserTables.Sql", "GetUserTables.AzureSqlDb.Sync", "GetUserTablesOracle", + "GetUserTablesPostgreSql", "GetUserTablesMySql", "Migrate.MongoDb", + "Migrate.SqlServer.AzureSqlDbMI", "Migrate.SqlServer.AzureSqlDbMI.Sync.LRS", + "Migrate.SqlServer.SqlDb", "Migrate.SqlServer.AzureSqlDb.Sync", + "Migrate.MySql.AzureDbForMySql.Sync", "Migrate.MySql.AzureDbForMySql", + "Migrate.PostgreSql.AzureDbForPostgreSql.SyncV2", "Migrate.Oracle.AzureDbForPostgreSql.Sync", + "ValidateMigrationInput.SqlServer.SqlDb.Sync", "ValidateMigrationInput.SqlServer.AzureSqlDbMI", + "ValidateMigrationInput.SqlServer.AzureSqlDbMI.Sync.LRS", "Validate.MongoDb", + "Validate.Oracle.AzureDbPostgreSql.Sync", "GetTDECertificates.Sql", "Migrate.Ssis", + "Service.Check.OCI", "Service.Upload.OCI", "Service.Install.OCI", + "MigrateSchemaSqlServerSqlDb". + :type task_type: str or ~azure.mgmt.datamigration.models.TaskType + :ivar errors: Array of errors. This is ignored if submitted. + :vartype errors: list[~azure.mgmt.datamigration.models.ODataError] + :ivar state: The state of the task. This is ignored if submitted. Possible values include: + "Unknown", "Queued", "Running", "Canceled", "Succeeded", "Failed", "FailedInputValidation", + "Faulted". + :vartype state: str or ~azure.mgmt.datamigration.models.TaskState + :ivar commands: Array of command properties. + :vartype commands: list[~azure.mgmt.datamigration.models.CommandProperties] + :param client_data: Key value pairs of client data to attach meta data information to task. + :type client_data: dict[str, str] + :param input: Task input. + :type input: ~azure.mgmt.datamigration.models.ConnectToTargetAzureDbForPostgreSqlSyncTaskInput + :ivar output: Task output. This is ignored if submitted. + :vartype output: + list[~azure.mgmt.datamigration.models.ConnectToTargetAzureDbForPostgreSqlSyncTaskOutput] + """ + + _validation = { + 'task_type': {'required': True}, + 'errors': {'readonly': True}, + 'state': {'readonly': True}, + 'commands': {'readonly': True}, + 'output': {'readonly': True}, + } + + _attribute_map = { + 'task_type': {'key': 'taskType', 'type': 'str'}, + 'errors': {'key': 'errors', 'type': '[ODataError]'}, + 'state': {'key': 'state', 'type': 'str'}, + 'commands': {'key': 'commands', 'type': '[CommandProperties]'}, + 'client_data': {'key': 'clientData', 'type': '{str}'}, + 'input': {'key': 'input', 'type': 'ConnectToTargetAzureDbForPostgreSqlSyncTaskInput'}, + 'output': {'key': 'output', 'type': '[ConnectToTargetAzureDbForPostgreSqlSyncTaskOutput]'}, + } + + def __init__( + self, + **kwargs + ): + super(ConnectToTargetAzureDbForPostgreSqlSyncTaskProperties, self).__init__(**kwargs) + self.task_type = 'ConnectToTarget.AzureDbForPostgreSql.Sync' # type: str + self.input = kwargs.get('input', None) + self.output = None + + +class ConnectToTargetOracleAzureDbForPostgreSqlSyncTaskInput(msrest.serialization.Model): + """Input for the task that validates connection to Azure Database for PostgreSQL and target server requirements for Oracle source. + + All required parameters must be populated in order to send to Azure. + + :param target_connection_info: Required. Connection information for target Azure Database for + PostgreSQL server. + :type target_connection_info: ~azure.mgmt.datamigration.models.PostgreSqlConnectionInfo + """ + + _validation = { + 'target_connection_info': {'required': True}, + } + + _attribute_map = { + 'target_connection_info': {'key': 'targetConnectionInfo', 'type': 'PostgreSqlConnectionInfo'}, + } + + def __init__( + self, + **kwargs + ): + super(ConnectToTargetOracleAzureDbForPostgreSqlSyncTaskInput, self).__init__(**kwargs) + self.target_connection_info = kwargs['target_connection_info'] + + +class ConnectToTargetOracleAzureDbForPostgreSqlSyncTaskOutput(msrest.serialization.Model): + """Output for the task that validates connection to Azure Database for PostgreSQL and target server requirements for Oracle source. + + Variables are only populated by the server, and will be ignored when sending a request. + + :ivar target_server_version: Version of the target server. + :vartype target_server_version: str + :ivar databases: List of databases on target server. + :vartype databases: list[str] + :ivar target_server_brand_version: Target server brand version. + :vartype target_server_brand_version: str + :ivar validation_errors: Validation errors associated with the task. + :vartype validation_errors: list[~azure.mgmt.datamigration.models.ReportableException] + :param database_schema_map: Mapping of schemas per database. + :type database_schema_map: + list[~azure.mgmt.datamigration.models.ConnectToTargetOracleAzureDbForPostgreSqlSyncTaskOutputDatabaseSchemaMapItem] + """ + + _validation = { + 'target_server_version': {'readonly': True}, + 'databases': {'readonly': True}, + 'target_server_brand_version': {'readonly': True}, + 'validation_errors': {'readonly': True}, + } + + _attribute_map = { + 'target_server_version': {'key': 'targetServerVersion', 'type': 'str'}, + 'databases': {'key': 'databases', 'type': '[str]'}, + 'target_server_brand_version': {'key': 'targetServerBrandVersion', 'type': 'str'}, + 'validation_errors': {'key': 'validationErrors', 'type': '[ReportableException]'}, + 'database_schema_map': {'key': 'databaseSchemaMap', 'type': '[ConnectToTargetOracleAzureDbForPostgreSqlSyncTaskOutputDatabaseSchemaMapItem]'}, + } + + def __init__( + self, + **kwargs + ): + super(ConnectToTargetOracleAzureDbForPostgreSqlSyncTaskOutput, self).__init__(**kwargs) + self.target_server_version = None + self.databases = None + self.target_server_brand_version = None + self.validation_errors = None + self.database_schema_map = kwargs.get('database_schema_map', None) + + +class ConnectToTargetOracleAzureDbForPostgreSqlSyncTaskOutputDatabaseSchemaMapItem(msrest.serialization.Model): + """ConnectToTargetOracleAzureDbForPostgreSqlSyncTaskOutputDatabaseSchemaMapItem. + + :param database: + :type database: str + :param schemas: + :type schemas: list[str] + """ + + _attribute_map = { + 'database': {'key': 'database', 'type': 'str'}, + 'schemas': {'key': 'schemas', 'type': '[str]'}, + } + + def __init__( + self, + **kwargs + ): + super(ConnectToTargetOracleAzureDbForPostgreSqlSyncTaskOutputDatabaseSchemaMapItem, self).__init__(**kwargs) + self.database = kwargs.get('database', None) + self.schemas = kwargs.get('schemas', None) + + +class ConnectToTargetOracleAzureDbForPostgreSqlSyncTaskProperties(ProjectTaskProperties): + """Properties for the task that validates connection to Azure Database For PostgreSQL server and target server requirements for online migration for Oracle source. + + Variables are only populated by the server, and will be ignored when sending a request. + + All required parameters must be populated in order to send to Azure. + + :param task_type: Required. Task type.Constant filled by server. Possible values include: + "Connect.MongoDb", "ConnectToSource.SqlServer", "ConnectToSource.SqlServer.Sync", + "ConnectToSource.PostgreSql.Sync", "ConnectToSource.MySql", "ConnectToSource.Oracle.Sync", + "ConnectToTarget.SqlDb", "ConnectToTarget.SqlDb.Sync", + "ConnectToTarget.AzureDbForPostgreSql.Sync", + "ConnectToTarget.Oracle.AzureDbForPostgreSql.Sync", "ConnectToTarget.AzureSqlDbMI", + "ConnectToTarget.AzureSqlDbMI.Sync.LRS", "ConnectToTarget.AzureDbForMySql", + "GetUserTables.Sql", "GetUserTables.AzureSqlDb.Sync", "GetUserTablesOracle", + "GetUserTablesPostgreSql", "GetUserTablesMySql", "Migrate.MongoDb", + "Migrate.SqlServer.AzureSqlDbMI", "Migrate.SqlServer.AzureSqlDbMI.Sync.LRS", + "Migrate.SqlServer.SqlDb", "Migrate.SqlServer.AzureSqlDb.Sync", + "Migrate.MySql.AzureDbForMySql.Sync", "Migrate.MySql.AzureDbForMySql", + "Migrate.PostgreSql.AzureDbForPostgreSql.SyncV2", "Migrate.Oracle.AzureDbForPostgreSql.Sync", + "ValidateMigrationInput.SqlServer.SqlDb.Sync", "ValidateMigrationInput.SqlServer.AzureSqlDbMI", + "ValidateMigrationInput.SqlServer.AzureSqlDbMI.Sync.LRS", "Validate.MongoDb", + "Validate.Oracle.AzureDbPostgreSql.Sync", "GetTDECertificates.Sql", "Migrate.Ssis", + "Service.Check.OCI", "Service.Upload.OCI", "Service.Install.OCI", + "MigrateSchemaSqlServerSqlDb". + :type task_type: str or ~azure.mgmt.datamigration.models.TaskType + :ivar errors: Array of errors. This is ignored if submitted. + :vartype errors: list[~azure.mgmt.datamigration.models.ODataError] + :ivar state: The state of the task. This is ignored if submitted. Possible values include: + "Unknown", "Queued", "Running", "Canceled", "Succeeded", "Failed", "FailedInputValidation", + "Faulted". + :vartype state: str or ~azure.mgmt.datamigration.models.TaskState + :ivar commands: Array of command properties. + :vartype commands: list[~azure.mgmt.datamigration.models.CommandProperties] + :param client_data: Key value pairs of client data to attach meta data information to task. + :type client_data: dict[str, str] + :param input: Task input. + :type input: + ~azure.mgmt.datamigration.models.ConnectToTargetOracleAzureDbForPostgreSqlSyncTaskInput + :ivar output: Task output. This is ignored if submitted. + :vartype output: + list[~azure.mgmt.datamigration.models.ConnectToTargetOracleAzureDbForPostgreSqlSyncTaskOutput] + """ + + _validation = { + 'task_type': {'required': True}, + 'errors': {'readonly': True}, + 'state': {'readonly': True}, + 'commands': {'readonly': True}, + 'output': {'readonly': True}, + } + + _attribute_map = { + 'task_type': {'key': 'taskType', 'type': 'str'}, + 'errors': {'key': 'errors', 'type': '[ODataError]'}, + 'state': {'key': 'state', 'type': 'str'}, + 'commands': {'key': 'commands', 'type': '[CommandProperties]'}, + 'client_data': {'key': 'clientData', 'type': '{str}'}, + 'input': {'key': 'input', 'type': 'ConnectToTargetOracleAzureDbForPostgreSqlSyncTaskInput'}, + 'output': {'key': 'output', 'type': '[ConnectToTargetOracleAzureDbForPostgreSqlSyncTaskOutput]'}, + } + + def __init__( + self, + **kwargs + ): + super(ConnectToTargetOracleAzureDbForPostgreSqlSyncTaskProperties, self).__init__(**kwargs) + self.task_type = 'ConnectToTarget.Oracle.AzureDbForPostgreSql.Sync' # type: str + self.input = kwargs.get('input', None) + self.output = None + + +class ConnectToTargetSqlDbSyncTaskInput(msrest.serialization.Model): + """Input for the task that validates connection to Azure SQL DB and target server requirements. + + All required parameters must be populated in order to send to Azure. + + :param source_connection_info: Required. Connection information for source SQL Server. + :type source_connection_info: ~azure.mgmt.datamigration.models.SqlConnectionInfo + :param target_connection_info: Required. Connection information for target SQL DB. + :type target_connection_info: ~azure.mgmt.datamigration.models.SqlConnectionInfo + """ + + _validation = { + 'source_connection_info': {'required': True}, + 'target_connection_info': {'required': True}, + } + + _attribute_map = { + 'source_connection_info': {'key': 'sourceConnectionInfo', 'type': 'SqlConnectionInfo'}, + 'target_connection_info': {'key': 'targetConnectionInfo', 'type': 'SqlConnectionInfo'}, + } + + def __init__( + self, + **kwargs + ): + super(ConnectToTargetSqlDbSyncTaskInput, self).__init__(**kwargs) + self.source_connection_info = kwargs['source_connection_info'] + self.target_connection_info = kwargs['target_connection_info'] + + +class ConnectToTargetSqlDbSyncTaskProperties(ProjectTaskProperties): + """Properties for the task that validates connection to SQL DB and target server requirements for online migration. + + Variables are only populated by the server, and will be ignored when sending a request. + + All required parameters must be populated in order to send to Azure. + + :param task_type: Required. Task type.Constant filled by server. Possible values include: + "Connect.MongoDb", "ConnectToSource.SqlServer", "ConnectToSource.SqlServer.Sync", + "ConnectToSource.PostgreSql.Sync", "ConnectToSource.MySql", "ConnectToSource.Oracle.Sync", + "ConnectToTarget.SqlDb", "ConnectToTarget.SqlDb.Sync", + "ConnectToTarget.AzureDbForPostgreSql.Sync", + "ConnectToTarget.Oracle.AzureDbForPostgreSql.Sync", "ConnectToTarget.AzureSqlDbMI", + "ConnectToTarget.AzureSqlDbMI.Sync.LRS", "ConnectToTarget.AzureDbForMySql", + "GetUserTables.Sql", "GetUserTables.AzureSqlDb.Sync", "GetUserTablesOracle", + "GetUserTablesPostgreSql", "GetUserTablesMySql", "Migrate.MongoDb", + "Migrate.SqlServer.AzureSqlDbMI", "Migrate.SqlServer.AzureSqlDbMI.Sync.LRS", + "Migrate.SqlServer.SqlDb", "Migrate.SqlServer.AzureSqlDb.Sync", + "Migrate.MySql.AzureDbForMySql.Sync", "Migrate.MySql.AzureDbForMySql", + "Migrate.PostgreSql.AzureDbForPostgreSql.SyncV2", "Migrate.Oracle.AzureDbForPostgreSql.Sync", + "ValidateMigrationInput.SqlServer.SqlDb.Sync", "ValidateMigrationInput.SqlServer.AzureSqlDbMI", + "ValidateMigrationInput.SqlServer.AzureSqlDbMI.Sync.LRS", "Validate.MongoDb", + "Validate.Oracle.AzureDbPostgreSql.Sync", "GetTDECertificates.Sql", "Migrate.Ssis", + "Service.Check.OCI", "Service.Upload.OCI", "Service.Install.OCI", + "MigrateSchemaSqlServerSqlDb". + :type task_type: str or ~azure.mgmt.datamigration.models.TaskType + :ivar errors: Array of errors. This is ignored if submitted. + :vartype errors: list[~azure.mgmt.datamigration.models.ODataError] + :ivar state: The state of the task. This is ignored if submitted. Possible values include: + "Unknown", "Queued", "Running", "Canceled", "Succeeded", "Failed", "FailedInputValidation", + "Faulted". + :vartype state: str or ~azure.mgmt.datamigration.models.TaskState + :ivar commands: Array of command properties. + :vartype commands: list[~azure.mgmt.datamigration.models.CommandProperties] + :param client_data: Key value pairs of client data to attach meta data information to task. + :type client_data: dict[str, str] + :param input: Task input. + :type input: ~azure.mgmt.datamigration.models.ConnectToTargetSqlDbSyncTaskInput + :ivar output: Task output. This is ignored if submitted. + :vartype output: list[~azure.mgmt.datamigration.models.ConnectToTargetSqlDbTaskOutput] + """ + + _validation = { + 'task_type': {'required': True}, + 'errors': {'readonly': True}, + 'state': {'readonly': True}, + 'commands': {'readonly': True}, + 'output': {'readonly': True}, + } + + _attribute_map = { + 'task_type': {'key': 'taskType', 'type': 'str'}, + 'errors': {'key': 'errors', 'type': '[ODataError]'}, + 'state': {'key': 'state', 'type': 'str'}, + 'commands': {'key': 'commands', 'type': '[CommandProperties]'}, + 'client_data': {'key': 'clientData', 'type': '{str}'}, + 'input': {'key': 'input', 'type': 'ConnectToTargetSqlDbSyncTaskInput'}, + 'output': {'key': 'output', 'type': '[ConnectToTargetSqlDbTaskOutput]'}, + } + + def __init__( + self, + **kwargs + ): + super(ConnectToTargetSqlDbSyncTaskProperties, self).__init__(**kwargs) + self.task_type = 'ConnectToTarget.SqlDb.Sync' # type: str + self.input = kwargs.get('input', None) + self.output = None + + +class ConnectToTargetSqlDbTaskInput(msrest.serialization.Model): + """Input for the task that validates connection to SQL DB and target server requirements. + + All required parameters must be populated in order to send to Azure. + + :param target_connection_info: Required. Connection information for target SQL DB. + :type target_connection_info: ~azure.mgmt.datamigration.models.SqlConnectionInfo + """ + + _validation = { + 'target_connection_info': {'required': True}, + } + + _attribute_map = { + 'target_connection_info': {'key': 'targetConnectionInfo', 'type': 'SqlConnectionInfo'}, + } + + def __init__( + self, + **kwargs + ): + super(ConnectToTargetSqlDbTaskInput, self).__init__(**kwargs) + self.target_connection_info = kwargs['target_connection_info'] + + +class ConnectToTargetSqlDbTaskOutput(msrest.serialization.Model): + """Output for the task that validates connection to SQL DB and target server requirements. + + Variables are only populated by the server, and will be ignored when sending a request. + + :ivar id: Result identifier. + :vartype id: str + :ivar databases: Source databases as a map from database name to database id. + :vartype databases: str + :ivar target_server_version: Version of the target server. + :vartype target_server_version: str + :ivar target_server_brand_version: Target server brand version. + :vartype target_server_brand_version: str + """ + + _validation = { + 'id': {'readonly': True}, + 'databases': {'readonly': True}, + 'target_server_version': {'readonly': True}, + 'target_server_brand_version': {'readonly': True}, + } + + _attribute_map = { + 'id': {'key': 'id', 'type': 'str'}, + 'databases': {'key': 'databases', 'type': 'str'}, + 'target_server_version': {'key': 'targetServerVersion', 'type': 'str'}, + 'target_server_brand_version': {'key': 'targetServerBrandVersion', 'type': 'str'}, + } + + def __init__( + self, + **kwargs + ): + super(ConnectToTargetSqlDbTaskOutput, self).__init__(**kwargs) + self.id = None + self.databases = None + self.target_server_version = None + self.target_server_brand_version = None + + +class ConnectToTargetSqlDbTaskProperties(ProjectTaskProperties): + """Properties for the task that validates connection to SQL DB and target server requirements. + + Variables are only populated by the server, and will be ignored when sending a request. + + All required parameters must be populated in order to send to Azure. + + :param task_type: Required. Task type.Constant filled by server. Possible values include: + "Connect.MongoDb", "ConnectToSource.SqlServer", "ConnectToSource.SqlServer.Sync", + "ConnectToSource.PostgreSql.Sync", "ConnectToSource.MySql", "ConnectToSource.Oracle.Sync", + "ConnectToTarget.SqlDb", "ConnectToTarget.SqlDb.Sync", + "ConnectToTarget.AzureDbForPostgreSql.Sync", + "ConnectToTarget.Oracle.AzureDbForPostgreSql.Sync", "ConnectToTarget.AzureSqlDbMI", + "ConnectToTarget.AzureSqlDbMI.Sync.LRS", "ConnectToTarget.AzureDbForMySql", + "GetUserTables.Sql", "GetUserTables.AzureSqlDb.Sync", "GetUserTablesOracle", + "GetUserTablesPostgreSql", "GetUserTablesMySql", "Migrate.MongoDb", + "Migrate.SqlServer.AzureSqlDbMI", "Migrate.SqlServer.AzureSqlDbMI.Sync.LRS", + "Migrate.SqlServer.SqlDb", "Migrate.SqlServer.AzureSqlDb.Sync", + "Migrate.MySql.AzureDbForMySql.Sync", "Migrate.MySql.AzureDbForMySql", + "Migrate.PostgreSql.AzureDbForPostgreSql.SyncV2", "Migrate.Oracle.AzureDbForPostgreSql.Sync", + "ValidateMigrationInput.SqlServer.SqlDb.Sync", "ValidateMigrationInput.SqlServer.AzureSqlDbMI", + "ValidateMigrationInput.SqlServer.AzureSqlDbMI.Sync.LRS", "Validate.MongoDb", + "Validate.Oracle.AzureDbPostgreSql.Sync", "GetTDECertificates.Sql", "Migrate.Ssis", + "Service.Check.OCI", "Service.Upload.OCI", "Service.Install.OCI", + "MigrateSchemaSqlServerSqlDb". + :type task_type: str or ~azure.mgmt.datamigration.models.TaskType + :ivar errors: Array of errors. This is ignored if submitted. + :vartype errors: list[~azure.mgmt.datamigration.models.ODataError] + :ivar state: The state of the task. This is ignored if submitted. Possible values include: + "Unknown", "Queued", "Running", "Canceled", "Succeeded", "Failed", "FailedInputValidation", + "Faulted". + :vartype state: str or ~azure.mgmt.datamigration.models.TaskState + :ivar commands: Array of command properties. + :vartype commands: list[~azure.mgmt.datamigration.models.CommandProperties] + :param client_data: Key value pairs of client data to attach meta data information to task. + :type client_data: dict[str, str] + :param input: Task input. + :type input: ~azure.mgmt.datamigration.models.ConnectToTargetSqlDbTaskInput + :ivar output: Task output. This is ignored if submitted. + :vartype output: list[~azure.mgmt.datamigration.models.ConnectToTargetSqlDbTaskOutput] + """ + + _validation = { + 'task_type': {'required': True}, + 'errors': {'readonly': True}, + 'state': {'readonly': True}, + 'commands': {'readonly': True}, + 'output': {'readonly': True}, + } + + _attribute_map = { + 'task_type': {'key': 'taskType', 'type': 'str'}, + 'errors': {'key': 'errors', 'type': '[ODataError]'}, + 'state': {'key': 'state', 'type': 'str'}, + 'commands': {'key': 'commands', 'type': '[CommandProperties]'}, + 'client_data': {'key': 'clientData', 'type': '{str}'}, + 'input': {'key': 'input', 'type': 'ConnectToTargetSqlDbTaskInput'}, + 'output': {'key': 'output', 'type': '[ConnectToTargetSqlDbTaskOutput]'}, + } + + def __init__( + self, + **kwargs + ): + super(ConnectToTargetSqlDbTaskProperties, self).__init__(**kwargs) + self.task_type = 'ConnectToTarget.SqlDb' # type: str + self.input = kwargs.get('input', None) + self.output = None + + +class ConnectToTargetSqlMiSyncTaskInput(msrest.serialization.Model): + """Input for the task that validates connection to Azure SQL Database Managed Instance online scenario. + + All required parameters must be populated in order to send to Azure. + + :param target_connection_info: Required. Connection information for Azure SQL Database Managed + Instance. + :type target_connection_info: ~azure.mgmt.datamigration.models.MiSqlConnectionInfo + :param azure_app: Required. Azure Active Directory Application the DMS instance will use to + connect to the target instance of Azure SQL Database Managed Instance and the Azure Storage + Account. + :type azure_app: ~azure.mgmt.datamigration.models.AzureActiveDirectoryApp + """ + + _validation = { + 'target_connection_info': {'required': True}, + 'azure_app': {'required': True}, + } + + _attribute_map = { + 'target_connection_info': {'key': 'targetConnectionInfo', 'type': 'MiSqlConnectionInfo'}, + 'azure_app': {'key': 'azureApp', 'type': 'AzureActiveDirectoryApp'}, + } + + def __init__( + self, + **kwargs + ): + super(ConnectToTargetSqlMiSyncTaskInput, self).__init__(**kwargs) + self.target_connection_info = kwargs['target_connection_info'] + self.azure_app = kwargs['azure_app'] + + +class ConnectToTargetSqlMiSyncTaskOutput(msrest.serialization.Model): + """Output for the task that validates connection to Azure SQL Database Managed Instance. + + Variables are only populated by the server, and will be ignored when sending a request. + + :ivar target_server_version: Target server version. + :vartype target_server_version: str + :ivar target_server_brand_version: Target server brand version. + :vartype target_server_brand_version: str + :ivar validation_errors: Validation errors. + :vartype validation_errors: list[~azure.mgmt.datamigration.models.ReportableException] + """ + + _validation = { + 'target_server_version': {'readonly': True}, + 'target_server_brand_version': {'readonly': True}, + 'validation_errors': {'readonly': True}, + } + + _attribute_map = { + 'target_server_version': {'key': 'targetServerVersion', 'type': 'str'}, + 'target_server_brand_version': {'key': 'targetServerBrandVersion', 'type': 'str'}, + 'validation_errors': {'key': 'validationErrors', 'type': '[ReportableException]'}, + } + + def __init__( + self, + **kwargs + ): + super(ConnectToTargetSqlMiSyncTaskOutput, self).__init__(**kwargs) + self.target_server_version = None + self.target_server_brand_version = None + self.validation_errors = None + + +class ConnectToTargetSqlMiSyncTaskProperties(ProjectTaskProperties): + """Properties for the task that validates connection to Azure SQL Database Managed Instance. + + Variables are only populated by the server, and will be ignored when sending a request. + + All required parameters must be populated in order to send to Azure. + + :param task_type: Required. Task type.Constant filled by server. Possible values include: + "Connect.MongoDb", "ConnectToSource.SqlServer", "ConnectToSource.SqlServer.Sync", + "ConnectToSource.PostgreSql.Sync", "ConnectToSource.MySql", "ConnectToSource.Oracle.Sync", + "ConnectToTarget.SqlDb", "ConnectToTarget.SqlDb.Sync", + "ConnectToTarget.AzureDbForPostgreSql.Sync", + "ConnectToTarget.Oracle.AzureDbForPostgreSql.Sync", "ConnectToTarget.AzureSqlDbMI", + "ConnectToTarget.AzureSqlDbMI.Sync.LRS", "ConnectToTarget.AzureDbForMySql", + "GetUserTables.Sql", "GetUserTables.AzureSqlDb.Sync", "GetUserTablesOracle", + "GetUserTablesPostgreSql", "GetUserTablesMySql", "Migrate.MongoDb", + "Migrate.SqlServer.AzureSqlDbMI", "Migrate.SqlServer.AzureSqlDbMI.Sync.LRS", + "Migrate.SqlServer.SqlDb", "Migrate.SqlServer.AzureSqlDb.Sync", + "Migrate.MySql.AzureDbForMySql.Sync", "Migrate.MySql.AzureDbForMySql", + "Migrate.PostgreSql.AzureDbForPostgreSql.SyncV2", "Migrate.Oracle.AzureDbForPostgreSql.Sync", + "ValidateMigrationInput.SqlServer.SqlDb.Sync", "ValidateMigrationInput.SqlServer.AzureSqlDbMI", + "ValidateMigrationInput.SqlServer.AzureSqlDbMI.Sync.LRS", "Validate.MongoDb", + "Validate.Oracle.AzureDbPostgreSql.Sync", "GetTDECertificates.Sql", "Migrate.Ssis", + "Service.Check.OCI", "Service.Upload.OCI", "Service.Install.OCI", + "MigrateSchemaSqlServerSqlDb". + :type task_type: str or ~azure.mgmt.datamigration.models.TaskType + :ivar errors: Array of errors. This is ignored if submitted. + :vartype errors: list[~azure.mgmt.datamigration.models.ODataError] + :ivar state: The state of the task. This is ignored if submitted. Possible values include: + "Unknown", "Queued", "Running", "Canceled", "Succeeded", "Failed", "FailedInputValidation", + "Faulted". + :vartype state: str or ~azure.mgmt.datamigration.models.TaskState + :ivar commands: Array of command properties. + :vartype commands: list[~azure.mgmt.datamigration.models.CommandProperties] + :param client_data: Key value pairs of client data to attach meta data information to task. + :type client_data: dict[str, str] + :param input: Task input. + :type input: ~azure.mgmt.datamigration.models.ConnectToTargetSqlMiSyncTaskInput + :ivar output: Task output. This is ignored if submitted. + :vartype output: list[~azure.mgmt.datamigration.models.ConnectToTargetSqlMiSyncTaskOutput] + """ + + _validation = { + 'task_type': {'required': True}, + 'errors': {'readonly': True}, + 'state': {'readonly': True}, + 'commands': {'readonly': True}, + 'output': {'readonly': True}, + } + + _attribute_map = { + 'task_type': {'key': 'taskType', 'type': 'str'}, + 'errors': {'key': 'errors', 'type': '[ODataError]'}, + 'state': {'key': 'state', 'type': 'str'}, + 'commands': {'key': 'commands', 'type': '[CommandProperties]'}, + 'client_data': {'key': 'clientData', 'type': '{str}'}, + 'input': {'key': 'input', 'type': 'ConnectToTargetSqlMiSyncTaskInput'}, + 'output': {'key': 'output', 'type': '[ConnectToTargetSqlMiSyncTaskOutput]'}, + } + + def __init__( + self, + **kwargs + ): + super(ConnectToTargetSqlMiSyncTaskProperties, self).__init__(**kwargs) + self.task_type = 'ConnectToTarget.AzureSqlDbMI.Sync.LRS' # type: str + self.input = kwargs.get('input', None) + self.output = None + + +class ConnectToTargetSqlMiTaskInput(msrest.serialization.Model): + """Input for the task that validates connection to Azure SQL Database Managed Instance. + + All required parameters must be populated in order to send to Azure. + + :param target_connection_info: Required. Connection information for target SQL Server. + :type target_connection_info: ~azure.mgmt.datamigration.models.SqlConnectionInfo + :param collect_logins: Flag for whether to collect logins from target SQL MI server. + :type collect_logins: bool + :param collect_agent_jobs: Flag for whether to collect agent jobs from target SQL MI server. + :type collect_agent_jobs: bool + :param validate_ssis_catalog_only: Flag for whether to validate SSIS catalog is reachable on + the target SQL MI server. + :type validate_ssis_catalog_only: bool + """ + + _validation = { + 'target_connection_info': {'required': True}, + } + + _attribute_map = { + 'target_connection_info': {'key': 'targetConnectionInfo', 'type': 'SqlConnectionInfo'}, + 'collect_logins': {'key': 'collectLogins', 'type': 'bool'}, + 'collect_agent_jobs': {'key': 'collectAgentJobs', 'type': 'bool'}, + 'validate_ssis_catalog_only': {'key': 'validateSsisCatalogOnly', 'type': 'bool'}, + } + + def __init__( + self, + **kwargs + ): + super(ConnectToTargetSqlMiTaskInput, self).__init__(**kwargs) + self.target_connection_info = kwargs['target_connection_info'] + self.collect_logins = kwargs.get('collect_logins', True) + self.collect_agent_jobs = kwargs.get('collect_agent_jobs', True) + self.validate_ssis_catalog_only = kwargs.get('validate_ssis_catalog_only', False) + + +class ConnectToTargetSqlMiTaskOutput(msrest.serialization.Model): + """Output for the task that validates connection to Azure SQL Database Managed Instance. + + Variables are only populated by the server, and will be ignored when sending a request. + + :ivar id: Result identifier. + :vartype id: str + :ivar target_server_version: Target server version. + :vartype target_server_version: str + :ivar target_server_brand_version: Target server brand version. + :vartype target_server_brand_version: str + :ivar logins: List of logins on the target server. + :vartype logins: list[str] + :ivar agent_jobs: List of agent jobs on the target server. + :vartype agent_jobs: list[str] + :ivar validation_errors: Validation errors. + :vartype validation_errors: list[~azure.mgmt.datamigration.models.ReportableException] + """ + + _validation = { + 'id': {'readonly': True}, + 'target_server_version': {'readonly': True}, + 'target_server_brand_version': {'readonly': True}, + 'logins': {'readonly': True}, + 'agent_jobs': {'readonly': True}, + 'validation_errors': {'readonly': True}, + } + + _attribute_map = { + 'id': {'key': 'id', 'type': 'str'}, + 'target_server_version': {'key': 'targetServerVersion', 'type': 'str'}, + 'target_server_brand_version': {'key': 'targetServerBrandVersion', 'type': 'str'}, + 'logins': {'key': 'logins', 'type': '[str]'}, + 'agent_jobs': {'key': 'agentJobs', 'type': '[str]'}, + 'validation_errors': {'key': 'validationErrors', 'type': '[ReportableException]'}, + } + + def __init__( + self, + **kwargs + ): + super(ConnectToTargetSqlMiTaskOutput, self).__init__(**kwargs) + self.id = None + self.target_server_version = None + self.target_server_brand_version = None + self.logins = None + self.agent_jobs = None + self.validation_errors = None + + +class ConnectToTargetSqlMiTaskProperties(ProjectTaskProperties): + """Properties for the task that validates connection to Azure SQL Database Managed Instance. + + Variables are only populated by the server, and will be ignored when sending a request. + + All required parameters must be populated in order to send to Azure. + + :param task_type: Required. Task type.Constant filled by server. Possible values include: + "Connect.MongoDb", "ConnectToSource.SqlServer", "ConnectToSource.SqlServer.Sync", + "ConnectToSource.PostgreSql.Sync", "ConnectToSource.MySql", "ConnectToSource.Oracle.Sync", + "ConnectToTarget.SqlDb", "ConnectToTarget.SqlDb.Sync", + "ConnectToTarget.AzureDbForPostgreSql.Sync", + "ConnectToTarget.Oracle.AzureDbForPostgreSql.Sync", "ConnectToTarget.AzureSqlDbMI", + "ConnectToTarget.AzureSqlDbMI.Sync.LRS", "ConnectToTarget.AzureDbForMySql", + "GetUserTables.Sql", "GetUserTables.AzureSqlDb.Sync", "GetUserTablesOracle", + "GetUserTablesPostgreSql", "GetUserTablesMySql", "Migrate.MongoDb", + "Migrate.SqlServer.AzureSqlDbMI", "Migrate.SqlServer.AzureSqlDbMI.Sync.LRS", + "Migrate.SqlServer.SqlDb", "Migrate.SqlServer.AzureSqlDb.Sync", + "Migrate.MySql.AzureDbForMySql.Sync", "Migrate.MySql.AzureDbForMySql", + "Migrate.PostgreSql.AzureDbForPostgreSql.SyncV2", "Migrate.Oracle.AzureDbForPostgreSql.Sync", + "ValidateMigrationInput.SqlServer.SqlDb.Sync", "ValidateMigrationInput.SqlServer.AzureSqlDbMI", + "ValidateMigrationInput.SqlServer.AzureSqlDbMI.Sync.LRS", "Validate.MongoDb", + "Validate.Oracle.AzureDbPostgreSql.Sync", "GetTDECertificates.Sql", "Migrate.Ssis", + "Service.Check.OCI", "Service.Upload.OCI", "Service.Install.OCI", + "MigrateSchemaSqlServerSqlDb". + :type task_type: str or ~azure.mgmt.datamigration.models.TaskType + :ivar errors: Array of errors. This is ignored if submitted. + :vartype errors: list[~azure.mgmt.datamigration.models.ODataError] + :ivar state: The state of the task. This is ignored if submitted. Possible values include: + "Unknown", "Queued", "Running", "Canceled", "Succeeded", "Failed", "FailedInputValidation", + "Faulted". + :vartype state: str or ~azure.mgmt.datamigration.models.TaskState + :ivar commands: Array of command properties. + :vartype commands: list[~azure.mgmt.datamigration.models.CommandProperties] + :param client_data: Key value pairs of client data to attach meta data information to task. + :type client_data: dict[str, str] + :param input: Task input. + :type input: ~azure.mgmt.datamigration.models.ConnectToTargetSqlMiTaskInput + :ivar output: Task output. This is ignored if submitted. + :vartype output: list[~azure.mgmt.datamigration.models.ConnectToTargetSqlMiTaskOutput] + """ + + _validation = { + 'task_type': {'required': True}, + 'errors': {'readonly': True}, + 'state': {'readonly': True}, + 'commands': {'readonly': True}, + 'output': {'readonly': True}, + } + + _attribute_map = { + 'task_type': {'key': 'taskType', 'type': 'str'}, + 'errors': {'key': 'errors', 'type': '[ODataError]'}, + 'state': {'key': 'state', 'type': 'str'}, + 'commands': {'key': 'commands', 'type': '[CommandProperties]'}, + 'client_data': {'key': 'clientData', 'type': '{str}'}, + 'input': {'key': 'input', 'type': 'ConnectToTargetSqlMiTaskInput'}, + 'output': {'key': 'output', 'type': '[ConnectToTargetSqlMiTaskOutput]'}, + } + + def __init__( + self, + **kwargs + ): + super(ConnectToTargetSqlMiTaskProperties, self).__init__(**kwargs) + self.task_type = 'ConnectToTarget.AzureSqlDbMI' # type: str + self.input = kwargs.get('input', None) + self.output = None + + +class Database(msrest.serialization.Model): + """Information about a single database. + + :param id: Unique identifier for the database. + :type id: str + :param name: Name of the database. + :type name: str + :param compatibility_level: SQL Server compatibility level of database. Possible values + include: "CompatLevel80", "CompatLevel90", "CompatLevel100", "CompatLevel110", + "CompatLevel120", "CompatLevel130", "CompatLevel140". + :type compatibility_level: str or ~azure.mgmt.datamigration.models.DatabaseCompatLevel + :param collation: Collation name of the database. + :type collation: str + :param server_name: Name of the server. + :type server_name: str + :param fqdn: Fully qualified name. + :type fqdn: str + :param install_id: Install id of the database. + :type install_id: str + :param server_version: Version of the server. + :type server_version: str + :param server_edition: Edition of the server. + :type server_edition: str + :param server_level: Product level of the server (RTM, SP, CTP). + :type server_level: str + :param server_default_data_path: Default path of the data files. + :type server_default_data_path: str + :param server_default_log_path: Default path of the log files. + :type server_default_log_path: str + :param server_default_backup_path: Default path of the backup folder. + :type server_default_backup_path: str + :param server_core_count: Number of cores on the server. + :type server_core_count: int + :param server_visible_online_core_count: Number of cores on the server that have VISIBLE ONLINE + status. + :type server_visible_online_core_count: int + :param database_state: State of the database. Possible values include: "Online", "Restoring", + "Recovering", "RecoveryPending", "Suspect", "Emergency", "Offline", "Copying", + "OfflineSecondary". + :type database_state: str or ~azure.mgmt.datamigration.models.DatabaseState + :param server_id: The unique Server Id. + :type server_id: str + """ + + _attribute_map = { + 'id': {'key': 'id', 'type': 'str'}, + 'name': {'key': 'name', 'type': 'str'}, + 'compatibility_level': {'key': 'compatibilityLevel', 'type': 'str'}, + 'collation': {'key': 'collation', 'type': 'str'}, + 'server_name': {'key': 'serverName', 'type': 'str'}, + 'fqdn': {'key': 'fqdn', 'type': 'str'}, + 'install_id': {'key': 'installId', 'type': 'str'}, + 'server_version': {'key': 'serverVersion', 'type': 'str'}, + 'server_edition': {'key': 'serverEdition', 'type': 'str'}, + 'server_level': {'key': 'serverLevel', 'type': 'str'}, + 'server_default_data_path': {'key': 'serverDefaultDataPath', 'type': 'str'}, + 'server_default_log_path': {'key': 'serverDefaultLogPath', 'type': 'str'}, + 'server_default_backup_path': {'key': 'serverDefaultBackupPath', 'type': 'str'}, + 'server_core_count': {'key': 'serverCoreCount', 'type': 'int'}, + 'server_visible_online_core_count': {'key': 'serverVisibleOnlineCoreCount', 'type': 'int'}, + 'database_state': {'key': 'databaseState', 'type': 'str'}, + 'server_id': {'key': 'serverId', 'type': 'str'}, + } + + def __init__( + self, + **kwargs + ): + super(Database, self).__init__(**kwargs) + self.id = kwargs.get('id', None) + self.name = kwargs.get('name', None) + self.compatibility_level = kwargs.get('compatibility_level', None) + self.collation = kwargs.get('collation', None) + self.server_name = kwargs.get('server_name', None) + self.fqdn = kwargs.get('fqdn', None) + self.install_id = kwargs.get('install_id', None) + self.server_version = kwargs.get('server_version', None) + self.server_edition = kwargs.get('server_edition', None) + self.server_level = kwargs.get('server_level', None) + self.server_default_data_path = kwargs.get('server_default_data_path', None) + self.server_default_log_path = kwargs.get('server_default_log_path', None) + self.server_default_backup_path = kwargs.get('server_default_backup_path', None) + self.server_core_count = kwargs.get('server_core_count', None) + self.server_visible_online_core_count = kwargs.get('server_visible_online_core_count', None) + self.database_state = kwargs.get('database_state', None) + self.server_id = kwargs.get('server_id', None) + + +class DatabaseBackupInfo(msrest.serialization.Model): + """Information about backup files when existing backup mode is used. + + Variables are only populated by the server, and will be ignored when sending a request. + + :ivar database_name: Database name. + :vartype database_name: str + :ivar backup_type: Backup Type. Possible values include: "Database", "TransactionLog", "File", + "DifferentialDatabase", "DifferentialFile", "Partial", "DifferentialPartial". + :vartype backup_type: str or ~azure.mgmt.datamigration.models.BackupType + :ivar backup_files: The list of backup files for the current database. + :vartype backup_files: list[str] + :ivar position: Position of current database backup in the file. + :vartype position: int + :ivar is_damaged: Database was damaged when backed up, but the backup operation was requested + to continue despite errors. + :vartype is_damaged: bool + :ivar is_compressed: Whether the backup set is compressed. + :vartype is_compressed: bool + :ivar family_count: Number of files in the backup set. + :vartype family_count: int + :ivar backup_finish_date: Date and time when the backup operation finished. + :vartype backup_finish_date: ~datetime.datetime + """ + + _validation = { + 'database_name': {'readonly': True}, + 'backup_type': {'readonly': True}, + 'backup_files': {'readonly': True}, + 'position': {'readonly': True}, + 'is_damaged': {'readonly': True}, + 'is_compressed': {'readonly': True}, + 'family_count': {'readonly': True}, + 'backup_finish_date': {'readonly': True}, + } + + _attribute_map = { + 'database_name': {'key': 'databaseName', 'type': 'str'}, + 'backup_type': {'key': 'backupType', 'type': 'str'}, + 'backup_files': {'key': 'backupFiles', 'type': '[str]'}, + 'position': {'key': 'position', 'type': 'int'}, + 'is_damaged': {'key': 'isDamaged', 'type': 'bool'}, + 'is_compressed': {'key': 'isCompressed', 'type': 'bool'}, + 'family_count': {'key': 'familyCount', 'type': 'int'}, + 'backup_finish_date': {'key': 'backupFinishDate', 'type': 'iso-8601'}, + } + + def __init__( + self, + **kwargs + ): + super(DatabaseBackupInfo, self).__init__(**kwargs) + self.database_name = None + self.backup_type = None + self.backup_files = None + self.position = None + self.is_damaged = None + self.is_compressed = None + self.family_count = None + self.backup_finish_date = None + + +class DatabaseFileInfo(msrest.serialization.Model): + """Database file specific information. + + :param database_name: Name of the database. + :type database_name: str + :param id: Unique identifier for database file. + :type id: str + :param logical_name: Logical name of the file. + :type logical_name: str + :param physical_full_name: Operating-system full path of the file. + :type physical_full_name: str + :param restore_full_name: Suggested full path of the file for restoring. + :type restore_full_name: str + :param file_type: Database file type. Possible values include: "Rows", "Log", "Filestream", + "NotSupported", "Fulltext". + :type file_type: str or ~azure.mgmt.datamigration.models.DatabaseFileType + :param size_mb: Size of the file in megabytes. + :type size_mb: float + """ + + _attribute_map = { + 'database_name': {'key': 'databaseName', 'type': 'str'}, + 'id': {'key': 'id', 'type': 'str'}, + 'logical_name': {'key': 'logicalName', 'type': 'str'}, + 'physical_full_name': {'key': 'physicalFullName', 'type': 'str'}, + 'restore_full_name': {'key': 'restoreFullName', 'type': 'str'}, + 'file_type': {'key': 'fileType', 'type': 'str'}, + 'size_mb': {'key': 'sizeMB', 'type': 'float'}, + } + + def __init__( + self, + **kwargs + ): + super(DatabaseFileInfo, self).__init__(**kwargs) + self.database_name = kwargs.get('database_name', None) + self.id = kwargs.get('id', None) + self.logical_name = kwargs.get('logical_name', None) + self.physical_full_name = kwargs.get('physical_full_name', None) + self.restore_full_name = kwargs.get('restore_full_name', None) + self.file_type = kwargs.get('file_type', None) + self.size_mb = kwargs.get('size_mb', None) + + +class DatabaseFileInput(msrest.serialization.Model): + """Database file specific information for input. + + :param id: Unique identifier for database file. + :type id: str + :param logical_name: Logical name of the file. + :type logical_name: str + :param physical_full_name: Operating-system full path of the file. + :type physical_full_name: str + :param restore_full_name: Suggested full path of the file for restoring. + :type restore_full_name: str + :param file_type: Database file type. Possible values include: "Rows", "Log", "Filestream", + "NotSupported", "Fulltext". + :type file_type: str or ~azure.mgmt.datamigration.models.DatabaseFileType + """ + + _attribute_map = { + 'id': {'key': 'id', 'type': 'str'}, + 'logical_name': {'key': 'logicalName', 'type': 'str'}, + 'physical_full_name': {'key': 'physicalFullName', 'type': 'str'}, + 'restore_full_name': {'key': 'restoreFullName', 'type': 'str'}, + 'file_type': {'key': 'fileType', 'type': 'str'}, + } + + def __init__( + self, + **kwargs + ): + super(DatabaseFileInput, self).__init__(**kwargs) + self.id = kwargs.get('id', None) + self.logical_name = kwargs.get('logical_name', None) + self.physical_full_name = kwargs.get('physical_full_name', None) + self.restore_full_name = kwargs.get('restore_full_name', None) + self.file_type = kwargs.get('file_type', None) + + +class DatabaseInfo(msrest.serialization.Model): + """Project Database Details. + + All required parameters must be populated in order to send to Azure. + + :param source_database_name: Required. Name of the database. + :type source_database_name: str + """ + + _validation = { + 'source_database_name': {'required': True}, + } + + _attribute_map = { + 'source_database_name': {'key': 'sourceDatabaseName', 'type': 'str'}, + } + + def __init__( + self, + **kwargs + ): + super(DatabaseInfo, self).__init__(**kwargs) + self.source_database_name = kwargs['source_database_name'] + + +class ProxyResource(msrest.serialization.Model): + """ProxyResource. + + Variables are only populated by the server, and will be ignored when sending a request. + + :ivar id: + :vartype id: str + :ivar name: + :vartype name: str + :ivar type: + :vartype type: str + """ + + _validation = { + 'id': {'readonly': True}, + 'name': {'readonly': True}, + 'type': {'readonly': True}, + } + + _attribute_map = { + 'id': {'key': 'id', 'type': 'str'}, + 'name': {'key': 'name', 'type': 'str'}, + 'type': {'key': 'type', 'type': 'str'}, + } + + def __init__( + self, + **kwargs + ): + super(ProxyResource, self).__init__(**kwargs) + self.id = None + self.name = None + self.type = None + + +class DatabaseMigration(ProxyResource): + """Database Migration Resource. + + Variables are only populated by the server, and will be ignored when sending a request. + + :ivar id: + :vartype id: str + :ivar name: + :vartype name: str + :ivar type: + :vartype type: str + :ivar system_data: Metadata pertaining to creation and last modification of the resource. + :vartype system_data: ~azure.mgmt.datamigration.models.SystemData + :param properties: Database Migration Resource properties. + :type properties: ~azure.mgmt.datamigration.models.DatabaseMigrationProperties + """ + + _validation = { + 'id': {'readonly': True}, + 'name': {'readonly': True}, + 'type': {'readonly': True}, + 'system_data': {'readonly': True}, + } + + _attribute_map = { + 'id': {'key': 'id', 'type': 'str'}, + 'name': {'key': 'name', 'type': 'str'}, + 'type': {'key': 'type', 'type': 'str'}, + 'system_data': {'key': 'systemData', 'type': 'SystemData'}, + 'properties': {'key': 'properties', 'type': 'DatabaseMigrationProperties'}, + } + + def __init__( + self, + **kwargs + ): + super(DatabaseMigration, self).__init__(**kwargs) + self.system_data = None + self.properties = kwargs.get('properties', None) + + +class DatabaseMigrationListResult(msrest.serialization.Model): + """A list of Database Migrations. + + Variables are only populated by the server, and will be ignored when sending a request. + + :ivar value: + :vartype value: list[~azure.mgmt.datamigration.models.DatabaseMigration] + :ivar next_link: + :vartype next_link: str + """ + + _validation = { + 'value': {'readonly': True}, + 'next_link': {'readonly': True}, + } + + _attribute_map = { + 'value': {'key': 'value', 'type': '[DatabaseMigration]'}, + 'next_link': {'key': 'nextLink', 'type': 'str'}, + } + + def __init__( + self, + **kwargs + ): + super(DatabaseMigrationListResult, self).__init__(**kwargs) + self.value = None + self.next_link = None + + +class DatabaseMigrationProperties(msrest.serialization.Model): + """Database Migration Resource properties. + + You probably want to use the sub-classes and not this class directly. Known + sub-classes are: DatabaseMigrationPropertiesSqlMi, DatabaseMigrationPropertiesSqlVm. + + Variables are only populated by the server, and will be ignored when sending a request. + + All required parameters must be populated in order to send to Azure. + + :param kind: Required. Constant filled by server. Possible values include: "SqlMi", "SqlVm". + :type kind: str or ~azure.mgmt.datamigration.models.ResourceType + :param scope: Resource Id of the target resource (SQL VM or SQL Managed Instance). + :type scope: str + :ivar provisioning_state: Provisioning State of migration. ProvisioningState as Succeeded + implies that validations have been performed and migration has started. + :vartype provisioning_state: str + :ivar migration_status: Migration status. + :vartype migration_status: str + :ivar started_on: Database migration start time. + :vartype started_on: ~datetime.datetime + :ivar ended_on: Database migration end time. + :vartype ended_on: ~datetime.datetime + :param source_sql_connection: Source SQL Server connection details. + :type source_sql_connection: ~azure.mgmt.datamigration.models.SqlConnectionInformation + :param source_database_name: Name of the source database. + :type source_database_name: str + :param migration_service: Resource Id of the Migration Service. + :type migration_service: str + :param migration_operation_id: ID tracking current migration operation. + :type migration_operation_id: str + :ivar migration_failure_error: Error details in case of migration failure. + :vartype migration_failure_error: ~azure.mgmt.datamigration.models.ErrorInfo + """ + + _validation = { + 'kind': {'required': True}, + 'provisioning_state': {'readonly': True}, + 'migration_status': {'readonly': True}, + 'started_on': {'readonly': True}, + 'ended_on': {'readonly': True}, + 'migration_failure_error': {'readonly': True}, + } + + _attribute_map = { + 'kind': {'key': 'kind', 'type': 'str'}, + 'scope': {'key': 'scope', 'type': 'str'}, + 'provisioning_state': {'key': 'provisioningState', 'type': 'str'}, + 'migration_status': {'key': 'migrationStatus', 'type': 'str'}, + 'started_on': {'key': 'startedOn', 'type': 'iso-8601'}, + 'ended_on': {'key': 'endedOn', 'type': 'iso-8601'}, + 'source_sql_connection': {'key': 'sourceSqlConnection', 'type': 'SqlConnectionInformation'}, + 'source_database_name': {'key': 'sourceDatabaseName', 'type': 'str'}, + 'migration_service': {'key': 'migrationService', 'type': 'str'}, + 'migration_operation_id': {'key': 'migrationOperationId', 'type': 'str'}, + 'migration_failure_error': {'key': 'migrationFailureError', 'type': 'ErrorInfo'}, + } + + _subtype_map = { + 'kind': {'SqlMi': 'DatabaseMigrationPropertiesSqlMi', 'SqlVm': 'DatabaseMigrationPropertiesSqlVm'} + } + + def __init__( + self, + **kwargs + ): + super(DatabaseMigrationProperties, self).__init__(**kwargs) + self.kind = None # type: Optional[str] + self.scope = kwargs.get('scope', None) + self.provisioning_state = None + self.migration_status = None + self.started_on = None + self.ended_on = None + self.source_sql_connection = kwargs.get('source_sql_connection', None) + self.source_database_name = kwargs.get('source_database_name', None) + self.migration_service = kwargs.get('migration_service', None) + self.migration_operation_id = kwargs.get('migration_operation_id', None) + self.migration_failure_error = None + + +class DatabaseMigrationPropertiesSqlMi(DatabaseMigrationProperties): + """Database Migration Resource properties for SQL Managed Instance. + + Variables are only populated by the server, and will be ignored when sending a request. + + All required parameters must be populated in order to send to Azure. + + :param kind: Required. Constant filled by server. Possible values include: "SqlMi", "SqlVm". + :type kind: str or ~azure.mgmt.datamigration.models.ResourceType + :param scope: Resource Id of the target resource (SQL VM or SQL Managed Instance). + :type scope: str + :ivar provisioning_state: Provisioning State of migration. ProvisioningState as Succeeded + implies that validations have been performed and migration has started. + :vartype provisioning_state: str + :ivar migration_status: Migration status. + :vartype migration_status: str + :ivar started_on: Database migration start time. + :vartype started_on: ~datetime.datetime + :ivar ended_on: Database migration end time. + :vartype ended_on: ~datetime.datetime + :param source_sql_connection: Source SQL Server connection details. + :type source_sql_connection: ~azure.mgmt.datamigration.models.SqlConnectionInformation + :param source_database_name: Name of the source database. + :type source_database_name: str + :param migration_service: Resource Id of the Migration Service. + :type migration_service: str + :param migration_operation_id: ID tracking current migration operation. + :type migration_operation_id: str + :ivar migration_failure_error: Error details in case of migration failure. + :vartype migration_failure_error: ~azure.mgmt.datamigration.models.ErrorInfo + :ivar migration_status_details: Detailed migration status. Not included by default. + :vartype migration_status_details: ~azure.mgmt.datamigration.models.MigrationStatusDetails + :param target_database_collation: Database collation to be used for the target database. + :type target_database_collation: str + :param provisioning_error: Error message for migration provisioning failure, if any. + :type provisioning_error: str + :param backup_configuration: Backup configuration info. + :type backup_configuration: ~azure.mgmt.datamigration.models.BackupConfiguration + :param offline_configuration: Offline configuration. + :type offline_configuration: ~azure.mgmt.datamigration.models.OfflineConfiguration + """ + + _validation = { + 'kind': {'required': True}, + 'provisioning_state': {'readonly': True}, + 'migration_status': {'readonly': True}, + 'started_on': {'readonly': True}, + 'ended_on': {'readonly': True}, + 'migration_failure_error': {'readonly': True}, + 'migration_status_details': {'readonly': True}, + } + + _attribute_map = { + 'kind': {'key': 'kind', 'type': 'str'}, + 'scope': {'key': 'scope', 'type': 'str'}, + 'provisioning_state': {'key': 'provisioningState', 'type': 'str'}, + 'migration_status': {'key': 'migrationStatus', 'type': 'str'}, + 'started_on': {'key': 'startedOn', 'type': 'iso-8601'}, + 'ended_on': {'key': 'endedOn', 'type': 'iso-8601'}, + 'source_sql_connection': {'key': 'sourceSqlConnection', 'type': 'SqlConnectionInformation'}, + 'source_database_name': {'key': 'sourceDatabaseName', 'type': 'str'}, + 'migration_service': {'key': 'migrationService', 'type': 'str'}, + 'migration_operation_id': {'key': 'migrationOperationId', 'type': 'str'}, + 'migration_failure_error': {'key': 'migrationFailureError', 'type': 'ErrorInfo'}, + 'migration_status_details': {'key': 'migrationStatusDetails', 'type': 'MigrationStatusDetails'}, + 'target_database_collation': {'key': 'targetDatabaseCollation', 'type': 'str'}, + 'provisioning_error': {'key': 'provisioningError', 'type': 'str'}, + 'backup_configuration': {'key': 'backupConfiguration', 'type': 'BackupConfiguration'}, + 'offline_configuration': {'key': 'offlineConfiguration', 'type': 'OfflineConfiguration'}, + } + + def __init__( + self, + **kwargs + ): + super(DatabaseMigrationPropertiesSqlMi, self).__init__(**kwargs) + self.kind = 'SqlMi' # type: str + self.migration_status_details = None + self.target_database_collation = kwargs.get('target_database_collation', None) + self.provisioning_error = kwargs.get('provisioning_error', None) + self.backup_configuration = kwargs.get('backup_configuration', None) + self.offline_configuration = kwargs.get('offline_configuration', None) + + +class DatabaseMigrationPropertiesSqlVm(DatabaseMigrationProperties): + """Database Migration Resource properties for SQL Virtual Machine. + + Variables are only populated by the server, and will be ignored when sending a request. + + All required parameters must be populated in order to send to Azure. + + :param kind: Required. Constant filled by server. Possible values include: "SqlMi", "SqlVm". + :type kind: str or ~azure.mgmt.datamigration.models.ResourceType + :param scope: Resource Id of the target resource (SQL VM or SQL Managed Instance). + :type scope: str + :ivar provisioning_state: Provisioning State of migration. ProvisioningState as Succeeded + implies that validations have been performed and migration has started. + :vartype provisioning_state: str + :ivar migration_status: Migration status. + :vartype migration_status: str + :ivar started_on: Database migration start time. + :vartype started_on: ~datetime.datetime + :ivar ended_on: Database migration end time. + :vartype ended_on: ~datetime.datetime + :param source_sql_connection: Source SQL Server connection details. + :type source_sql_connection: ~azure.mgmt.datamigration.models.SqlConnectionInformation + :param source_database_name: Name of the source database. + :type source_database_name: str + :param migration_service: Resource Id of the Migration Service. + :type migration_service: str + :param migration_operation_id: ID tracking current migration operation. + :type migration_operation_id: str + :ivar migration_failure_error: Error details in case of migration failure. + :vartype migration_failure_error: ~azure.mgmt.datamigration.models.ErrorInfo + :ivar migration_status_details: Detailed migration status. Not included by default. + :vartype migration_status_details: ~azure.mgmt.datamigration.models.MigrationStatusDetails + :param target_database_collation: Database collation to be used for the target database. + :type target_database_collation: str + :param provisioning_error: Error message for migration provisioning failure, if any. + :type provisioning_error: str + :param backup_configuration: Backup configuration info. + :type backup_configuration: ~azure.mgmt.datamigration.models.BackupConfiguration + :param offline_configuration: Offline configuration. + :type offline_configuration: ~azure.mgmt.datamigration.models.OfflineConfiguration + """ + + _validation = { + 'kind': {'required': True}, + 'provisioning_state': {'readonly': True}, + 'migration_status': {'readonly': True}, + 'started_on': {'readonly': True}, + 'ended_on': {'readonly': True}, + 'migration_failure_error': {'readonly': True}, + 'migration_status_details': {'readonly': True}, + } + + _attribute_map = { + 'kind': {'key': 'kind', 'type': 'str'}, + 'scope': {'key': 'scope', 'type': 'str'}, + 'provisioning_state': {'key': 'provisioningState', 'type': 'str'}, + 'migration_status': {'key': 'migrationStatus', 'type': 'str'}, + 'started_on': {'key': 'startedOn', 'type': 'iso-8601'}, + 'ended_on': {'key': 'endedOn', 'type': 'iso-8601'}, + 'source_sql_connection': {'key': 'sourceSqlConnection', 'type': 'SqlConnectionInformation'}, + 'source_database_name': {'key': 'sourceDatabaseName', 'type': 'str'}, + 'migration_service': {'key': 'migrationService', 'type': 'str'}, + 'migration_operation_id': {'key': 'migrationOperationId', 'type': 'str'}, + 'migration_failure_error': {'key': 'migrationFailureError', 'type': 'ErrorInfo'}, + 'migration_status_details': {'key': 'migrationStatusDetails', 'type': 'MigrationStatusDetails'}, + 'target_database_collation': {'key': 'targetDatabaseCollation', 'type': 'str'}, + 'provisioning_error': {'key': 'provisioningError', 'type': 'str'}, + 'backup_configuration': {'key': 'backupConfiguration', 'type': 'BackupConfiguration'}, + 'offline_configuration': {'key': 'offlineConfiguration', 'type': 'OfflineConfiguration'}, + } + + def __init__( + self, + **kwargs + ): + super(DatabaseMigrationPropertiesSqlVm, self).__init__(**kwargs) + self.kind = 'SqlVm' # type: str + self.migration_status_details = None + self.target_database_collation = kwargs.get('target_database_collation', None) + self.provisioning_error = kwargs.get('provisioning_error', None) + self.backup_configuration = kwargs.get('backup_configuration', None) + self.offline_configuration = kwargs.get('offline_configuration', None) + + +class DatabaseMigrationSqlMi(ProxyResource): + """Database Migration Resource for SQL Managed Instance. + + Variables are only populated by the server, and will be ignored when sending a request. + + :ivar id: + :vartype id: str + :ivar name: + :vartype name: str + :ivar type: + :vartype type: str + :ivar system_data: Metadata pertaining to creation and last modification of the resource. + :vartype system_data: ~azure.mgmt.datamigration.models.SystemData + :param properties: Database Migration Resource properties for SQL Managed Instance. + :type properties: ~azure.mgmt.datamigration.models.DatabaseMigrationPropertiesSqlMi + """ + + _validation = { + 'id': {'readonly': True}, + 'name': {'readonly': True}, + 'type': {'readonly': True}, + 'system_data': {'readonly': True}, + } + + _attribute_map = { + 'id': {'key': 'id', 'type': 'str'}, + 'name': {'key': 'name', 'type': 'str'}, + 'type': {'key': 'type', 'type': 'str'}, + 'system_data': {'key': 'systemData', 'type': 'SystemData'}, + 'properties': {'key': 'properties', 'type': 'DatabaseMigrationPropertiesSqlMi'}, + } + + def __init__( + self, + **kwargs + ): + super(DatabaseMigrationSqlMi, self).__init__(**kwargs) + self.system_data = None + self.properties = kwargs.get('properties', None) + + +class DatabaseMigrationSqlVm(ProxyResource): + """Database Migration Resource for SQL Virtual Machine. + + Variables are only populated by the server, and will be ignored when sending a request. + + :ivar id: + :vartype id: str + :ivar name: + :vartype name: str + :ivar type: + :vartype type: str + :ivar system_data: Metadata pertaining to creation and last modification of the resource. + :vartype system_data: ~azure.mgmt.datamigration.models.SystemData + :param properties: Database Migration Resource properties for SQL Virtual Machine. + :type properties: ~azure.mgmt.datamigration.models.DatabaseMigrationPropertiesSqlVm + """ + + _validation = { + 'id': {'readonly': True}, + 'name': {'readonly': True}, + 'type': {'readonly': True}, + 'system_data': {'readonly': True}, + } + + _attribute_map = { + 'id': {'key': 'id', 'type': 'str'}, + 'name': {'key': 'name', 'type': 'str'}, + 'type': {'key': 'type', 'type': 'str'}, + 'system_data': {'key': 'systemData', 'type': 'SystemData'}, + 'properties': {'key': 'properties', 'type': 'DatabaseMigrationPropertiesSqlVm'}, + } + + def __init__( + self, + **kwargs + ): + super(DatabaseMigrationSqlVm, self).__init__(**kwargs) + self.system_data = None + self.properties = kwargs.get('properties', None) + + +class DatabaseObjectName(msrest.serialization.Model): + """A representation of the name of an object in a database. + + Variables are only populated by the server, and will be ignored when sending a request. + + :ivar database_name: The unescaped name of the database containing the object. + :vartype database_name: str + :ivar object_name: The unescaped name of the object. + :vartype object_name: str + :ivar schema_name: The unescaped name of the schema containing the object. + :vartype schema_name: str + :param object_type: Type of the object in the database. Possible values include: + "StoredProcedures", "Table", "User", "View", "Function". + :type object_type: str or ~azure.mgmt.datamigration.models.ObjectType + """ + + _validation = { + 'database_name': {'readonly': True}, + 'object_name': {'readonly': True}, + 'schema_name': {'readonly': True}, + } + + _attribute_map = { + 'database_name': {'key': 'databaseName', 'type': 'str'}, + 'object_name': {'key': 'objectName', 'type': 'str'}, + 'schema_name': {'key': 'schemaName', 'type': 'str'}, + 'object_type': {'key': 'objectType', 'type': 'str'}, + } + + def __init__( + self, + **kwargs + ): + super(DatabaseObjectName, self).__init__(**kwargs) + self.database_name = None + self.object_name = None + self.schema_name = None + self.object_type = kwargs.get('object_type', None) + + +class DataItemMigrationSummaryResult(msrest.serialization.Model): + """Basic summary of a data item migration. + + Variables are only populated by the server, and will be ignored when sending a request. + + :ivar name: Name of the item. + :vartype name: str + :ivar started_on: Migration start time. + :vartype started_on: ~datetime.datetime + :ivar ended_on: Migration end time. + :vartype ended_on: ~datetime.datetime + :ivar state: Current state of migration. Possible values include: "None", "InProgress", + "Failed", "Warning", "Completed", "Skipped", "Stopped". + :vartype state: str or ~azure.mgmt.datamigration.models.MigrationState + :ivar status_message: Status message. + :vartype status_message: str + :ivar items_count: Number of items. + :vartype items_count: long + :ivar items_completed_count: Number of successfully completed items. + :vartype items_completed_count: long + :ivar error_prefix: Wildcard string prefix to use for querying all errors of the item. + :vartype error_prefix: str + :ivar result_prefix: Wildcard string prefix to use for querying all sub-tem results of the + item. + :vartype result_prefix: str + """ + + _validation = { + 'name': {'readonly': True}, + 'started_on': {'readonly': True}, + 'ended_on': {'readonly': True}, + 'state': {'readonly': True}, + 'status_message': {'readonly': True}, + 'items_count': {'readonly': True}, + 'items_completed_count': {'readonly': True}, + 'error_prefix': {'readonly': True}, + 'result_prefix': {'readonly': True}, + } + + _attribute_map = { + 'name': {'key': 'name', 'type': 'str'}, + 'started_on': {'key': 'startedOn', 'type': 'iso-8601'}, + 'ended_on': {'key': 'endedOn', 'type': 'iso-8601'}, + 'state': {'key': 'state', 'type': 'str'}, + 'status_message': {'key': 'statusMessage', 'type': 'str'}, + 'items_count': {'key': 'itemsCount', 'type': 'long'}, + 'items_completed_count': {'key': 'itemsCompletedCount', 'type': 'long'}, + 'error_prefix': {'key': 'errorPrefix', 'type': 'str'}, + 'result_prefix': {'key': 'resultPrefix', 'type': 'str'}, + } + + def __init__( + self, + **kwargs + ): + super(DataItemMigrationSummaryResult, self).__init__(**kwargs) + self.name = None + self.started_on = None + self.ended_on = None + self.state = None + self.status_message = None + self.items_count = None + self.items_completed_count = None + self.error_prefix = None + self.result_prefix = None + + +class DatabaseSummaryResult(DataItemMigrationSummaryResult): + """Summary of database results in the migration. + + Variables are only populated by the server, and will be ignored when sending a request. + + :ivar name: Name of the item. + :vartype name: str + :ivar started_on: Migration start time. + :vartype started_on: ~datetime.datetime + :ivar ended_on: Migration end time. + :vartype ended_on: ~datetime.datetime + :ivar state: Current state of migration. Possible values include: "None", "InProgress", + "Failed", "Warning", "Completed", "Skipped", "Stopped". + :vartype state: str or ~azure.mgmt.datamigration.models.MigrationState + :ivar status_message: Status message. + :vartype status_message: str + :ivar items_count: Number of items. + :vartype items_count: long + :ivar items_completed_count: Number of successfully completed items. + :vartype items_completed_count: long + :ivar error_prefix: Wildcard string prefix to use for querying all errors of the item. + :vartype error_prefix: str + :ivar result_prefix: Wildcard string prefix to use for querying all sub-tem results of the + item. + :vartype result_prefix: str + :ivar size_mb: Size of the database in megabytes. + :vartype size_mb: float + """ + + _validation = { + 'name': {'readonly': True}, + 'started_on': {'readonly': True}, + 'ended_on': {'readonly': True}, + 'state': {'readonly': True}, + 'status_message': {'readonly': True}, + 'items_count': {'readonly': True}, + 'items_completed_count': {'readonly': True}, + 'error_prefix': {'readonly': True}, + 'result_prefix': {'readonly': True}, + 'size_mb': {'readonly': True}, + } + + _attribute_map = { + 'name': {'key': 'name', 'type': 'str'}, + 'started_on': {'key': 'startedOn', 'type': 'iso-8601'}, + 'ended_on': {'key': 'endedOn', 'type': 'iso-8601'}, + 'state': {'key': 'state', 'type': 'str'}, + 'status_message': {'key': 'statusMessage', 'type': 'str'}, + 'items_count': {'key': 'itemsCount', 'type': 'long'}, + 'items_completed_count': {'key': 'itemsCompletedCount', 'type': 'long'}, + 'error_prefix': {'key': 'errorPrefix', 'type': 'str'}, + 'result_prefix': {'key': 'resultPrefix', 'type': 'str'}, + 'size_mb': {'key': 'sizeMB', 'type': 'float'}, + } + + def __init__( + self, + **kwargs + ): + super(DatabaseSummaryResult, self).__init__(**kwargs) + self.size_mb = None + + +class DatabaseTable(msrest.serialization.Model): + """Table properties. + + Variables are only populated by the server, and will be ignored when sending a request. + + :ivar has_rows: Indicates whether table is empty or not. + :vartype has_rows: bool + :ivar name: Schema-qualified name of the table. + :vartype name: str + """ + + _validation = { + 'has_rows': {'readonly': True}, + 'name': {'readonly': True}, + } + + _attribute_map = { + 'has_rows': {'key': 'hasRows', 'type': 'bool'}, + 'name': {'key': 'name', 'type': 'str'}, + } + + def __init__( + self, + **kwargs + ): + super(DatabaseTable, self).__init__(**kwargs) + self.has_rows = None + self.name = None + + +class DataIntegrityValidationResult(msrest.serialization.Model): + """Results for checksum based Data Integrity validation results. + + :param failed_objects: List of failed table names of source and target pair. + :type failed_objects: dict[str, str] + :param validation_errors: List of errors that happened while performing data integrity + validation. + :type validation_errors: ~azure.mgmt.datamigration.models.ValidationError + """ + + _attribute_map = { + 'failed_objects': {'key': 'failedObjects', 'type': '{str}'}, + 'validation_errors': {'key': 'validationErrors', 'type': 'ValidationError'}, + } + + def __init__( + self, + **kwargs + ): + super(DataIntegrityValidationResult, self).__init__(**kwargs) + self.failed_objects = kwargs.get('failed_objects', None) + self.validation_errors = kwargs.get('validation_errors', None) + + +class DataMigrationError(msrest.serialization.Model): + """Migration Task errors. + + Variables are only populated by the server, and will be ignored when sending a request. + + :ivar message: Error description. + :vartype message: str + :param type: Error type. Possible values include: "Default", "Warning", "Error". + :type type: str or ~azure.mgmt.datamigration.models.ErrorType + """ + + _validation = { + 'message': {'readonly': True}, + } + + _attribute_map = { + 'message': {'key': 'message', 'type': 'str'}, + 'type': {'key': 'type', 'type': 'str'}, + } + + def __init__( + self, + **kwargs + ): + super(DataMigrationError, self).__init__(**kwargs) + self.message = None + self.type = kwargs.get('type', None) + + +class DataMigrationProjectMetadata(msrest.serialization.Model): + """Common metadata for migration projects. + + Variables are only populated by the server, and will be ignored when sending a request. + + :ivar source_server_name: Source server name. + :vartype source_server_name: str + :ivar source_server_port: Source server port number. + :vartype source_server_port: str + :ivar source_username: Source username. + :vartype source_username: str + :ivar target_server_name: Target server name. + :vartype target_server_name: str + :ivar target_username: Target username. + :vartype target_username: str + :ivar target_db_name: Target database name. + :vartype target_db_name: str + :ivar target_using_win_auth: Whether target connection is Windows authentication. + :vartype target_using_win_auth: bool + :ivar selected_migration_tables: List of tables selected for migration. + :vartype selected_migration_tables: + list[~azure.mgmt.datamigration.models.MigrationTableMetadata] + """ + + _validation = { + 'source_server_name': {'readonly': True}, + 'source_server_port': {'readonly': True}, + 'source_username': {'readonly': True}, + 'target_server_name': {'readonly': True}, + 'target_username': {'readonly': True}, + 'target_db_name': {'readonly': True}, + 'target_using_win_auth': {'readonly': True}, + 'selected_migration_tables': {'readonly': True}, + } + + _attribute_map = { + 'source_server_name': {'key': 'sourceServerName', 'type': 'str'}, + 'source_server_port': {'key': 'sourceServerPort', 'type': 'str'}, + 'source_username': {'key': 'sourceUsername', 'type': 'str'}, + 'target_server_name': {'key': 'targetServerName', 'type': 'str'}, + 'target_username': {'key': 'targetUsername', 'type': 'str'}, + 'target_db_name': {'key': 'targetDbName', 'type': 'str'}, + 'target_using_win_auth': {'key': 'targetUsingWinAuth', 'type': 'bool'}, + 'selected_migration_tables': {'key': 'selectedMigrationTables', 'type': '[MigrationTableMetadata]'}, + } + + def __init__( + self, + **kwargs + ): + super(DataMigrationProjectMetadata, self).__init__(**kwargs) + self.source_server_name = None + self.source_server_port = None + self.source_username = None + self.target_server_name = None + self.target_username = None + self.target_db_name = None + self.target_using_win_auth = None + self.selected_migration_tables = None + + +class TrackedResource(msrest.serialization.Model): + """TrackedResource. + + Variables are only populated by the server, and will be ignored when sending a request. + + :param location: + :type location: str + :param tags: A set of tags. Dictionary of :code:``. + :type tags: dict[str, str] + :ivar id: + :vartype id: str + :ivar name: + :vartype name: str + :ivar type: + :vartype type: str + :ivar system_data: + :vartype system_data: ~azure.mgmt.datamigration.models.SystemData + """ + + _validation = { + 'id': {'readonly': True}, + 'name': {'readonly': True}, + 'type': {'readonly': True}, + 'system_data': {'readonly': True}, + } + + _attribute_map = { + 'location': {'key': 'location', 'type': 'str'}, + 'tags': {'key': 'tags', 'type': '{str}'}, + 'id': {'key': 'id', 'type': 'str'}, + 'name': {'key': 'name', 'type': 'str'}, + 'type': {'key': 'type', 'type': 'str'}, + 'system_data': {'key': 'systemData', 'type': 'SystemData'}, + } + + def __init__( + self, + **kwargs + ): + super(TrackedResource, self).__init__(**kwargs) + self.location = kwargs.get('location', None) + self.tags = kwargs.get('tags', None) + self.id = None + self.name = None + self.type = None + self.system_data = None + + +class DataMigrationService(TrackedResource): + """A Database Migration Service resource. + + Variables are only populated by the server, and will be ignored when sending a request. + + :param location: + :type location: str + :param tags: A set of tags. Dictionary of :code:``. + :type tags: dict[str, str] + :ivar id: + :vartype id: str + :ivar name: + :vartype name: str + :ivar type: + :vartype type: str + :ivar system_data: + :vartype system_data: ~azure.mgmt.datamigration.models.SystemData + :param etag: HTTP strong entity tag value. Ignored if submitted. + :type etag: str + :param kind: The resource kind. Only 'vm' (the default) is supported. + :type kind: str + :param sku: Service SKU. + :type sku: ~azure.mgmt.datamigration.models.ServiceSku + :ivar provisioning_state: The resource's provisioning state. Possible values include: + "Accepted", "Deleting", "Deploying", "Stopped", "Stopping", "Starting", "FailedToStart", + "FailedToStop", "Succeeded", "Failed". + :vartype provisioning_state: str or ~azure.mgmt.datamigration.models.ServiceProvisioningState + :param public_key: The public key of the service, used to encrypt secrets sent to the service. + :type public_key: str + :param virtual_subnet_id: The ID of the Microsoft.Network/virtualNetworks/subnets resource to + which the service should be joined. + :type virtual_subnet_id: str + :param virtual_nic_id: The ID of the Microsoft.Network/networkInterfaces resource which the + service have. + :type virtual_nic_id: str + :param auto_stop_delay: The time delay before the service is auto-stopped when idle. + :type auto_stop_delay: str + :param delete_resources_on_stop: Whether service resources should be deleted when stopped. + (Turned on by default). + :type delete_resources_on_stop: bool + """ + + _validation = { + 'id': {'readonly': True}, + 'name': {'readonly': True}, + 'type': {'readonly': True}, + 'system_data': {'readonly': True}, + 'provisioning_state': {'readonly': True}, + } + + _attribute_map = { + 'location': {'key': 'location', 'type': 'str'}, + 'tags': {'key': 'tags', 'type': '{str}'}, + 'id': {'key': 'id', 'type': 'str'}, + 'name': {'key': 'name', 'type': 'str'}, + 'type': {'key': 'type', 'type': 'str'}, + 'system_data': {'key': 'systemData', 'type': 'SystemData'}, + 'etag': {'key': 'etag', 'type': 'str'}, + 'kind': {'key': 'kind', 'type': 'str'}, + 'sku': {'key': 'sku', 'type': 'ServiceSku'}, + 'provisioning_state': {'key': 'properties.provisioningState', 'type': 'str'}, + 'public_key': {'key': 'properties.publicKey', 'type': 'str'}, + 'virtual_subnet_id': {'key': 'properties.virtualSubnetId', 'type': 'str'}, + 'virtual_nic_id': {'key': 'properties.virtualNicId', 'type': 'str'}, + 'auto_stop_delay': {'key': 'properties.autoStopDelay', 'type': 'str'}, + 'delete_resources_on_stop': {'key': 'properties.deleteResourcesOnStop', 'type': 'bool'}, + } + + def __init__( + self, + **kwargs + ): + super(DataMigrationService, self).__init__(**kwargs) + self.etag = kwargs.get('etag', None) + self.kind = kwargs.get('kind', None) + self.sku = kwargs.get('sku', None) + self.provisioning_state = None + self.public_key = kwargs.get('public_key', None) + self.virtual_subnet_id = kwargs.get('virtual_subnet_id', None) + self.virtual_nic_id = kwargs.get('virtual_nic_id', None) + self.auto_stop_delay = kwargs.get('auto_stop_delay', None) + self.delete_resources_on_stop = kwargs.get('delete_resources_on_stop', None) + + +class DataMigrationServiceList(msrest.serialization.Model): + """OData page of service objects. + + :param value: List of services. + :type value: list[~azure.mgmt.datamigration.models.DataMigrationService] + :param next_link: URL to load the next page of services. + :type next_link: str + """ + + _attribute_map = { + 'value': {'key': 'value', 'type': '[DataMigrationService]'}, + 'next_link': {'key': 'nextLink', 'type': 'str'}, + } + + def __init__( + self, + **kwargs + ): + super(DataMigrationServiceList, self).__init__(**kwargs) + self.value = kwargs.get('value', None) + self.next_link = kwargs.get('next_link', None) + + +class DataMigrationServiceStatusResponse(msrest.serialization.Model): + """Service health status. + + :param agent_version: The DMS instance agent version. + :type agent_version: str + :param status: The machine-readable status, such as 'Initializing', 'Offline', 'Online', + 'Deploying', 'Deleting', 'Stopped', 'Stopping', 'Starting', 'FailedToStart', 'FailedToStop' or + 'Failed'. + :type status: str + :param vm_size: The services virtual machine size, such as 'Standard_D2_v2'. + :type vm_size: str + :param supported_task_types: The list of supported task types. + :type supported_task_types: list[str] + """ + + _attribute_map = { + 'agent_version': {'key': 'agentVersion', 'type': 'str'}, + 'status': {'key': 'status', 'type': 'str'}, + 'vm_size': {'key': 'vmSize', 'type': 'str'}, + 'supported_task_types': {'key': 'supportedTaskTypes', 'type': '[str]'}, + } + + def __init__( + self, + **kwargs + ): + super(DataMigrationServiceStatusResponse, self).__init__(**kwargs) + self.agent_version = kwargs.get('agent_version', None) + self.status = kwargs.get('status', None) + self.vm_size = kwargs.get('vm_size', None) + self.supported_task_types = kwargs.get('supported_task_types', None) + + +class DeleteNode(msrest.serialization.Model): + """Details of node to be deleted. + + :param node_name: The name of node to delete. + :type node_name: str + :param integration_runtime_name: The name of integration runtime. + :type integration_runtime_name: str + """ + + _attribute_map = { + 'node_name': {'key': 'nodeName', 'type': 'str'}, + 'integration_runtime_name': {'key': 'integrationRuntimeName', 'type': 'str'}, + } + + def __init__( + self, + **kwargs + ): + super(DeleteNode, self).__init__(**kwargs) + self.node_name = kwargs.get('node_name', None) + self.integration_runtime_name = kwargs.get('integration_runtime_name', None) + + +class ErrorInfo(msrest.serialization.Model): + """Error details. + + Variables are only populated by the server, and will be ignored when sending a request. + + :ivar code: Error code. + :vartype code: str + :ivar message: Error message. + :vartype message: str + """ + + _validation = { + 'code': {'readonly': True}, + 'message': {'readonly': True}, + } + + _attribute_map = { + 'code': {'key': 'code', 'type': 'str'}, + 'message': {'key': 'message', 'type': 'str'}, + } + + def __init__( + self, + **kwargs + ): + super(ErrorInfo, self).__init__(**kwargs) + self.code = None + self.message = None + + +class ExecutionStatistics(msrest.serialization.Model): + """Description about the errors happen while performing migration validation. + + :param execution_count: No. of query executions. + :type execution_count: long + :param cpu_time_ms: CPU Time in millisecond(s) for the query execution. + :type cpu_time_ms: float + :param elapsed_time_ms: Time taken in millisecond(s) for executing the query. + :type elapsed_time_ms: float + :param wait_stats: Dictionary of sql query execution wait types and the respective statistics. + :type wait_stats: dict[str, ~azure.mgmt.datamigration.models.WaitStatistics] + :param has_errors: Indicates whether the query resulted in an error. + :type has_errors: bool + :param sql_errors: List of sql Errors. + :type sql_errors: list[str] + """ + + _attribute_map = { + 'execution_count': {'key': 'executionCount', 'type': 'long'}, + 'cpu_time_ms': {'key': 'cpuTimeMs', 'type': 'float'}, + 'elapsed_time_ms': {'key': 'elapsedTimeMs', 'type': 'float'}, + 'wait_stats': {'key': 'waitStats', 'type': '{WaitStatistics}'}, + 'has_errors': {'key': 'hasErrors', 'type': 'bool'}, + 'sql_errors': {'key': 'sqlErrors', 'type': '[str]'}, + } + + def __init__( + self, + **kwargs + ): + super(ExecutionStatistics, self).__init__(**kwargs) + self.execution_count = kwargs.get('execution_count', None) + self.cpu_time_ms = kwargs.get('cpu_time_ms', None) + self.elapsed_time_ms = kwargs.get('elapsed_time_ms', None) + self.wait_stats = kwargs.get('wait_stats', None) + self.has_errors = kwargs.get('has_errors', None) + self.sql_errors = kwargs.get('sql_errors', None) + + +class FileList(msrest.serialization.Model): + """OData page of files. + + :param value: List of files. + :type value: list[~azure.mgmt.datamigration.models.ProjectFile] + :param next_link: URL to load the next page of files. + :type next_link: str + """ + + _attribute_map = { + 'value': {'key': 'value', 'type': '[ProjectFile]'}, + 'next_link': {'key': 'nextLink', 'type': 'str'}, + } + + def __init__( + self, + **kwargs + ): + super(FileList, self).__init__(**kwargs) + self.value = kwargs.get('value', None) + self.next_link = kwargs.get('next_link', None) + + +class FileShare(msrest.serialization.Model): + """File share information with Path, Username, and Password. + + All required parameters must be populated in order to send to Azure. + + :param user_name: User name credential to connect to the share location. + :type user_name: str + :param password: Password credential used to connect to the share location. + :type password: str + :param path: Required. The folder path for this share. + :type path: str + """ + + _validation = { + 'path': {'required': True}, + } + + _attribute_map = { + 'user_name': {'key': 'userName', 'type': 'str'}, + 'password': {'key': 'password', 'type': 'str'}, + 'path': {'key': 'path', 'type': 'str'}, + } + + def __init__( + self, + **kwargs + ): + super(FileShare, self).__init__(**kwargs) + self.user_name = kwargs.get('user_name', None) + self.password = kwargs.get('password', None) + self.path = kwargs['path'] + + +class FileStorageInfo(msrest.serialization.Model): + """File storage information. + + :param uri: A URI that can be used to access the file content. + :type uri: str + :param headers: Dictionary of :code:``. + :type headers: dict[str, str] + """ + + _attribute_map = { + 'uri': {'key': 'uri', 'type': 'str'}, + 'headers': {'key': 'headers', 'type': '{str}'}, + } + + def __init__( + self, + **kwargs + ): + super(FileStorageInfo, self).__init__(**kwargs) + self.uri = kwargs.get('uri', None) + self.headers = kwargs.get('headers', None) + + +class GetProjectDetailsNonSqlTaskInput(msrest.serialization.Model): + """Input for the task that reads configuration from project artifacts. + + All required parameters must be populated in order to send to Azure. + + :param project_name: Required. Name of the migration project. + :type project_name: str + :param project_location: Required. A URL that points to the location to access project + artifacts. + :type project_location: str + """ + + _validation = { + 'project_name': {'required': True}, + 'project_location': {'required': True}, + } + + _attribute_map = { + 'project_name': {'key': 'projectName', 'type': 'str'}, + 'project_location': {'key': 'projectLocation', 'type': 'str'}, + } + + def __init__( + self, + **kwargs + ): + super(GetProjectDetailsNonSqlTaskInput, self).__init__(**kwargs) + self.project_name = kwargs['project_name'] + self.project_location = kwargs['project_location'] + + +class GetTdeCertificatesSqlTaskInput(msrest.serialization.Model): + """Input for the task that gets TDE certificates in Base64 encoded format. + + All required parameters must be populated in order to send to Azure. + + :param connection_info: Required. Connection information for SQL Server. + :type connection_info: ~azure.mgmt.datamigration.models.SqlConnectionInfo + :param backup_file_share: Required. Backup file share information for file share to be used for + temporarily storing files. + :type backup_file_share: ~azure.mgmt.datamigration.models.FileShare + :param selected_certificates: Required. List containing certificate names and corresponding + password to use for encrypting the exported certificate. + :type selected_certificates: list[~azure.mgmt.datamigration.models.SelectedCertificateInput] + """ + + _validation = { + 'connection_info': {'required': True}, + 'backup_file_share': {'required': True}, + 'selected_certificates': {'required': True}, + } + + _attribute_map = { + 'connection_info': {'key': 'connectionInfo', 'type': 'SqlConnectionInfo'}, + 'backup_file_share': {'key': 'backupFileShare', 'type': 'FileShare'}, + 'selected_certificates': {'key': 'selectedCertificates', 'type': '[SelectedCertificateInput]'}, + } + + def __init__( + self, + **kwargs + ): + super(GetTdeCertificatesSqlTaskInput, self).__init__(**kwargs) + self.connection_info = kwargs['connection_info'] + self.backup_file_share = kwargs['backup_file_share'] + self.selected_certificates = kwargs['selected_certificates'] + + +class GetTdeCertificatesSqlTaskOutput(msrest.serialization.Model): + """Output of the task that gets TDE certificates in Base64 encoded format. + + Variables are only populated by the server, and will be ignored when sending a request. + + :ivar base64_encoded_certificates: Mapping from certificate name to base 64 encoded format. + :vartype base64_encoded_certificates: str + :ivar validation_errors: Validation errors. + :vartype validation_errors: list[~azure.mgmt.datamigration.models.ReportableException] + """ + + _validation = { + 'base64_encoded_certificates': {'readonly': True}, + 'validation_errors': {'readonly': True}, + } + + _attribute_map = { + 'base64_encoded_certificates': {'key': 'base64EncodedCertificates', 'type': 'str'}, + 'validation_errors': {'key': 'validationErrors', 'type': '[ReportableException]'}, + } + + def __init__( + self, + **kwargs + ): + super(GetTdeCertificatesSqlTaskOutput, self).__init__(**kwargs) + self.base64_encoded_certificates = None + self.validation_errors = None + + +class GetTdeCertificatesSqlTaskProperties(ProjectTaskProperties): + """Properties for the task that gets TDE certificates in Base64 encoded format. + + Variables are only populated by the server, and will be ignored when sending a request. + + All required parameters must be populated in order to send to Azure. + + :param task_type: Required. Task type.Constant filled by server. Possible values include: + "Connect.MongoDb", "ConnectToSource.SqlServer", "ConnectToSource.SqlServer.Sync", + "ConnectToSource.PostgreSql.Sync", "ConnectToSource.MySql", "ConnectToSource.Oracle.Sync", + "ConnectToTarget.SqlDb", "ConnectToTarget.SqlDb.Sync", + "ConnectToTarget.AzureDbForPostgreSql.Sync", + "ConnectToTarget.Oracle.AzureDbForPostgreSql.Sync", "ConnectToTarget.AzureSqlDbMI", + "ConnectToTarget.AzureSqlDbMI.Sync.LRS", "ConnectToTarget.AzureDbForMySql", + "GetUserTables.Sql", "GetUserTables.AzureSqlDb.Sync", "GetUserTablesOracle", + "GetUserTablesPostgreSql", "GetUserTablesMySql", "Migrate.MongoDb", + "Migrate.SqlServer.AzureSqlDbMI", "Migrate.SqlServer.AzureSqlDbMI.Sync.LRS", + "Migrate.SqlServer.SqlDb", "Migrate.SqlServer.AzureSqlDb.Sync", + "Migrate.MySql.AzureDbForMySql.Sync", "Migrate.MySql.AzureDbForMySql", + "Migrate.PostgreSql.AzureDbForPostgreSql.SyncV2", "Migrate.Oracle.AzureDbForPostgreSql.Sync", + "ValidateMigrationInput.SqlServer.SqlDb.Sync", "ValidateMigrationInput.SqlServer.AzureSqlDbMI", + "ValidateMigrationInput.SqlServer.AzureSqlDbMI.Sync.LRS", "Validate.MongoDb", + "Validate.Oracle.AzureDbPostgreSql.Sync", "GetTDECertificates.Sql", "Migrate.Ssis", + "Service.Check.OCI", "Service.Upload.OCI", "Service.Install.OCI", + "MigrateSchemaSqlServerSqlDb". + :type task_type: str or ~azure.mgmt.datamigration.models.TaskType + :ivar errors: Array of errors. This is ignored if submitted. + :vartype errors: list[~azure.mgmt.datamigration.models.ODataError] + :ivar state: The state of the task. This is ignored if submitted. Possible values include: + "Unknown", "Queued", "Running", "Canceled", "Succeeded", "Failed", "FailedInputValidation", + "Faulted". + :vartype state: str or ~azure.mgmt.datamigration.models.TaskState + :ivar commands: Array of command properties. + :vartype commands: list[~azure.mgmt.datamigration.models.CommandProperties] + :param client_data: Key value pairs of client data to attach meta data information to task. + :type client_data: dict[str, str] + :param input: Task input. + :type input: ~azure.mgmt.datamigration.models.GetTdeCertificatesSqlTaskInput + :ivar output: Task output. This is ignored if submitted. + :vartype output: list[~azure.mgmt.datamigration.models.GetTdeCertificatesSqlTaskOutput] + """ + + _validation = { + 'task_type': {'required': True}, + 'errors': {'readonly': True}, + 'state': {'readonly': True}, + 'commands': {'readonly': True}, + 'output': {'readonly': True}, + } + + _attribute_map = { + 'task_type': {'key': 'taskType', 'type': 'str'}, + 'errors': {'key': 'errors', 'type': '[ODataError]'}, + 'state': {'key': 'state', 'type': 'str'}, + 'commands': {'key': 'commands', 'type': '[CommandProperties]'}, + 'client_data': {'key': 'clientData', 'type': '{str}'}, + 'input': {'key': 'input', 'type': 'GetTdeCertificatesSqlTaskInput'}, + 'output': {'key': 'output', 'type': '[GetTdeCertificatesSqlTaskOutput]'}, + } + + def __init__( + self, + **kwargs + ): + super(GetTdeCertificatesSqlTaskProperties, self).__init__(**kwargs) + self.task_type = 'GetTDECertificates.Sql' # type: str + self.input = kwargs.get('input', None) + self.output = None + + +class GetUserTablesMySqlTaskInput(msrest.serialization.Model): + """Input for the task that collects user tables for the given list of databases. + + All required parameters must be populated in order to send to Azure. + + :param connection_info: Required. Connection information for SQL Server. + :type connection_info: ~azure.mgmt.datamigration.models.MySqlConnectionInfo + :param selected_databases: Required. List of database names to collect tables for. + :type selected_databases: list[str] + """ + + _validation = { + 'connection_info': {'required': True}, + 'selected_databases': {'required': True}, + } + + _attribute_map = { + 'connection_info': {'key': 'connectionInfo', 'type': 'MySqlConnectionInfo'}, + 'selected_databases': {'key': 'selectedDatabases', 'type': '[str]'}, + } + + def __init__( + self, + **kwargs + ): + super(GetUserTablesMySqlTaskInput, self).__init__(**kwargs) + self.connection_info = kwargs['connection_info'] + self.selected_databases = kwargs['selected_databases'] + + +class GetUserTablesMySqlTaskOutput(msrest.serialization.Model): + """Output of the task that collects user tables for the given list of databases. + + Variables are only populated by the server, and will be ignored when sending a request. + + :ivar id: Result identifier. + :vartype id: str + :ivar databases_to_tables: Mapping from database name to list of tables. + :vartype databases_to_tables: str + :ivar validation_errors: Validation errors. + :vartype validation_errors: list[~azure.mgmt.datamigration.models.ReportableException] + """ + + _validation = { + 'id': {'readonly': True}, + 'databases_to_tables': {'readonly': True}, + 'validation_errors': {'readonly': True}, + } + + _attribute_map = { + 'id': {'key': 'id', 'type': 'str'}, + 'databases_to_tables': {'key': 'databasesToTables', 'type': 'str'}, + 'validation_errors': {'key': 'validationErrors', 'type': '[ReportableException]'}, + } + + def __init__( + self, + **kwargs + ): + super(GetUserTablesMySqlTaskOutput, self).__init__(**kwargs) + self.id = None + self.databases_to_tables = None + self.validation_errors = None + + +class GetUserTablesMySqlTaskProperties(ProjectTaskProperties): + """Properties for the task that collects user tables for the given list of databases. + + Variables are only populated by the server, and will be ignored when sending a request. + + All required parameters must be populated in order to send to Azure. + + :param task_type: Required. Task type.Constant filled by server. Possible values include: + "Connect.MongoDb", "ConnectToSource.SqlServer", "ConnectToSource.SqlServer.Sync", + "ConnectToSource.PostgreSql.Sync", "ConnectToSource.MySql", "ConnectToSource.Oracle.Sync", + "ConnectToTarget.SqlDb", "ConnectToTarget.SqlDb.Sync", + "ConnectToTarget.AzureDbForPostgreSql.Sync", + "ConnectToTarget.Oracle.AzureDbForPostgreSql.Sync", "ConnectToTarget.AzureSqlDbMI", + "ConnectToTarget.AzureSqlDbMI.Sync.LRS", "ConnectToTarget.AzureDbForMySql", + "GetUserTables.Sql", "GetUserTables.AzureSqlDb.Sync", "GetUserTablesOracle", + "GetUserTablesPostgreSql", "GetUserTablesMySql", "Migrate.MongoDb", + "Migrate.SqlServer.AzureSqlDbMI", "Migrate.SqlServer.AzureSqlDbMI.Sync.LRS", + "Migrate.SqlServer.SqlDb", "Migrate.SqlServer.AzureSqlDb.Sync", + "Migrate.MySql.AzureDbForMySql.Sync", "Migrate.MySql.AzureDbForMySql", + "Migrate.PostgreSql.AzureDbForPostgreSql.SyncV2", "Migrate.Oracle.AzureDbForPostgreSql.Sync", + "ValidateMigrationInput.SqlServer.SqlDb.Sync", "ValidateMigrationInput.SqlServer.AzureSqlDbMI", + "ValidateMigrationInput.SqlServer.AzureSqlDbMI.Sync.LRS", "Validate.MongoDb", + "Validate.Oracle.AzureDbPostgreSql.Sync", "GetTDECertificates.Sql", "Migrate.Ssis", + "Service.Check.OCI", "Service.Upload.OCI", "Service.Install.OCI", + "MigrateSchemaSqlServerSqlDb". + :type task_type: str or ~azure.mgmt.datamigration.models.TaskType + :ivar errors: Array of errors. This is ignored if submitted. + :vartype errors: list[~azure.mgmt.datamigration.models.ODataError] + :ivar state: The state of the task. This is ignored if submitted. Possible values include: + "Unknown", "Queued", "Running", "Canceled", "Succeeded", "Failed", "FailedInputValidation", + "Faulted". + :vartype state: str or ~azure.mgmt.datamigration.models.TaskState + :ivar commands: Array of command properties. + :vartype commands: list[~azure.mgmt.datamigration.models.CommandProperties] + :param client_data: Key value pairs of client data to attach meta data information to task. + :type client_data: dict[str, str] + :param input: Task input. + :type input: ~azure.mgmt.datamigration.models.GetUserTablesMySqlTaskInput + :ivar output: Task output. This is ignored if submitted. + :vartype output: list[~azure.mgmt.datamigration.models.GetUserTablesMySqlTaskOutput] + """ + + _validation = { + 'task_type': {'required': True}, + 'errors': {'readonly': True}, + 'state': {'readonly': True}, + 'commands': {'readonly': True}, + 'output': {'readonly': True}, + } + + _attribute_map = { + 'task_type': {'key': 'taskType', 'type': 'str'}, + 'errors': {'key': 'errors', 'type': '[ODataError]'}, + 'state': {'key': 'state', 'type': 'str'}, + 'commands': {'key': 'commands', 'type': '[CommandProperties]'}, + 'client_data': {'key': 'clientData', 'type': '{str}'}, + 'input': {'key': 'input', 'type': 'GetUserTablesMySqlTaskInput'}, + 'output': {'key': 'output', 'type': '[GetUserTablesMySqlTaskOutput]'}, + } + + def __init__( + self, + **kwargs + ): + super(GetUserTablesMySqlTaskProperties, self).__init__(**kwargs) + self.task_type = 'GetUserTablesMySql' # type: str + self.input = kwargs.get('input', None) + self.output = None + + +class GetUserTablesOracleTaskInput(msrest.serialization.Model): + """Input for the task that gets the list of tables contained within a provided list of Oracle schemas. + + All required parameters must be populated in order to send to Azure. + + :param connection_info: Required. Information for connecting to Oracle source. + :type connection_info: ~azure.mgmt.datamigration.models.OracleConnectionInfo + :param selected_schemas: Required. List of Oracle schemas for which to collect tables. + :type selected_schemas: list[str] + """ + + _validation = { + 'connection_info': {'required': True}, + 'selected_schemas': {'required': True}, + } + + _attribute_map = { + 'connection_info': {'key': 'connectionInfo', 'type': 'OracleConnectionInfo'}, + 'selected_schemas': {'key': 'selectedSchemas', 'type': '[str]'}, + } + + def __init__( + self, + **kwargs + ): + super(GetUserTablesOracleTaskInput, self).__init__(**kwargs) + self.connection_info = kwargs['connection_info'] + self.selected_schemas = kwargs['selected_schemas'] + + +class GetUserTablesOracleTaskOutput(msrest.serialization.Model): + """Output for the task that gets the list of tables contained within a provided list of Oracle schemas. + + Variables are only populated by the server, and will be ignored when sending a request. + + :ivar schema_name: The schema this result is for. + :vartype schema_name: str + :ivar tables: List of valid tables found for this schema. + :vartype tables: list[~azure.mgmt.datamigration.models.DatabaseTable] + :ivar validation_errors: Validation errors associated with the task. + :vartype validation_errors: list[~azure.mgmt.datamigration.models.ReportableException] + """ + + _validation = { + 'schema_name': {'readonly': True}, + 'tables': {'readonly': True}, + 'validation_errors': {'readonly': True}, + } + + _attribute_map = { + 'schema_name': {'key': 'schemaName', 'type': 'str'}, + 'tables': {'key': 'tables', 'type': '[DatabaseTable]'}, + 'validation_errors': {'key': 'validationErrors', 'type': '[ReportableException]'}, + } + + def __init__( + self, + **kwargs + ): + super(GetUserTablesOracleTaskOutput, self).__init__(**kwargs) + self.schema_name = None + self.tables = None + self.validation_errors = None + + +class GetUserTablesOracleTaskProperties(ProjectTaskProperties): + """Properties for the task that collects user tables for the given list of Oracle schemas. + + Variables are only populated by the server, and will be ignored when sending a request. + + All required parameters must be populated in order to send to Azure. + + :param task_type: Required. Task type.Constant filled by server. Possible values include: + "Connect.MongoDb", "ConnectToSource.SqlServer", "ConnectToSource.SqlServer.Sync", + "ConnectToSource.PostgreSql.Sync", "ConnectToSource.MySql", "ConnectToSource.Oracle.Sync", + "ConnectToTarget.SqlDb", "ConnectToTarget.SqlDb.Sync", + "ConnectToTarget.AzureDbForPostgreSql.Sync", + "ConnectToTarget.Oracle.AzureDbForPostgreSql.Sync", "ConnectToTarget.AzureSqlDbMI", + "ConnectToTarget.AzureSqlDbMI.Sync.LRS", "ConnectToTarget.AzureDbForMySql", + "GetUserTables.Sql", "GetUserTables.AzureSqlDb.Sync", "GetUserTablesOracle", + "GetUserTablesPostgreSql", "GetUserTablesMySql", "Migrate.MongoDb", + "Migrate.SqlServer.AzureSqlDbMI", "Migrate.SqlServer.AzureSqlDbMI.Sync.LRS", + "Migrate.SqlServer.SqlDb", "Migrate.SqlServer.AzureSqlDb.Sync", + "Migrate.MySql.AzureDbForMySql.Sync", "Migrate.MySql.AzureDbForMySql", + "Migrate.PostgreSql.AzureDbForPostgreSql.SyncV2", "Migrate.Oracle.AzureDbForPostgreSql.Sync", + "ValidateMigrationInput.SqlServer.SqlDb.Sync", "ValidateMigrationInput.SqlServer.AzureSqlDbMI", + "ValidateMigrationInput.SqlServer.AzureSqlDbMI.Sync.LRS", "Validate.MongoDb", + "Validate.Oracle.AzureDbPostgreSql.Sync", "GetTDECertificates.Sql", "Migrate.Ssis", + "Service.Check.OCI", "Service.Upload.OCI", "Service.Install.OCI", + "MigrateSchemaSqlServerSqlDb". + :type task_type: str or ~azure.mgmt.datamigration.models.TaskType + :ivar errors: Array of errors. This is ignored if submitted. + :vartype errors: list[~azure.mgmt.datamigration.models.ODataError] + :ivar state: The state of the task. This is ignored if submitted. Possible values include: + "Unknown", "Queued", "Running", "Canceled", "Succeeded", "Failed", "FailedInputValidation", + "Faulted". + :vartype state: str or ~azure.mgmt.datamigration.models.TaskState + :ivar commands: Array of command properties. + :vartype commands: list[~azure.mgmt.datamigration.models.CommandProperties] + :param client_data: Key value pairs of client data to attach meta data information to task. + :type client_data: dict[str, str] + :param input: Task input. + :type input: ~azure.mgmt.datamigration.models.GetUserTablesOracleTaskInput + :ivar output: Task output. This is ignored if submitted. + :vartype output: list[~azure.mgmt.datamigration.models.GetUserTablesOracleTaskOutput] + """ + + _validation = { + 'task_type': {'required': True}, + 'errors': {'readonly': True}, + 'state': {'readonly': True}, + 'commands': {'readonly': True}, + 'output': {'readonly': True}, + } + + _attribute_map = { + 'task_type': {'key': 'taskType', 'type': 'str'}, + 'errors': {'key': 'errors', 'type': '[ODataError]'}, + 'state': {'key': 'state', 'type': 'str'}, + 'commands': {'key': 'commands', 'type': '[CommandProperties]'}, + 'client_data': {'key': 'clientData', 'type': '{str}'}, + 'input': {'key': 'input', 'type': 'GetUserTablesOracleTaskInput'}, + 'output': {'key': 'output', 'type': '[GetUserTablesOracleTaskOutput]'}, + } + + def __init__( + self, + **kwargs + ): + super(GetUserTablesOracleTaskProperties, self).__init__(**kwargs) + self.task_type = 'GetUserTablesOracle' # type: str + self.input = kwargs.get('input', None) + self.output = None + + +class GetUserTablesPostgreSqlTaskInput(msrest.serialization.Model): + """Input for the task that gets the list of tables for a provided list of PostgreSQL databases. + + All required parameters must be populated in order to send to Azure. + + :param connection_info: Required. Information for connecting to PostgreSQL source. + :type connection_info: ~azure.mgmt.datamigration.models.PostgreSqlConnectionInfo + :param selected_databases: Required. List of PostgreSQL databases for which to collect tables. + :type selected_databases: list[str] + """ + + _validation = { + 'connection_info': {'required': True}, + 'selected_databases': {'required': True}, + } + + _attribute_map = { + 'connection_info': {'key': 'connectionInfo', 'type': 'PostgreSqlConnectionInfo'}, + 'selected_databases': {'key': 'selectedDatabases', 'type': '[str]'}, + } + + def __init__( + self, + **kwargs + ): + super(GetUserTablesPostgreSqlTaskInput, self).__init__(**kwargs) + self.connection_info = kwargs['connection_info'] + self.selected_databases = kwargs['selected_databases'] + + +class GetUserTablesPostgreSqlTaskOutput(msrest.serialization.Model): + """Output for the task that gets the list of tables for a provided list of PostgreSQL databases. + + Variables are only populated by the server, and will be ignored when sending a request. + + :ivar database_name: The database this result is for. + :vartype database_name: str + :ivar tables: List of valid tables found for this database. + :vartype tables: list[~azure.mgmt.datamigration.models.DatabaseTable] + :ivar validation_errors: Validation errors associated with the task. + :vartype validation_errors: list[~azure.mgmt.datamigration.models.ReportableException] + """ + + _validation = { + 'database_name': {'readonly': True}, + 'tables': {'readonly': True}, + 'validation_errors': {'readonly': True}, + } + + _attribute_map = { + 'database_name': {'key': 'databaseName', 'type': 'str'}, + 'tables': {'key': 'tables', 'type': '[DatabaseTable]'}, + 'validation_errors': {'key': 'validationErrors', 'type': '[ReportableException]'}, + } + + def __init__( + self, + **kwargs + ): + super(GetUserTablesPostgreSqlTaskOutput, self).__init__(**kwargs) + self.database_name = None + self.tables = None + self.validation_errors = None + + +class GetUserTablesPostgreSqlTaskProperties(ProjectTaskProperties): + """Properties for the task that collects user tables for the given list of databases. + + Variables are only populated by the server, and will be ignored when sending a request. + + All required parameters must be populated in order to send to Azure. + + :param task_type: Required. Task type.Constant filled by server. Possible values include: + "Connect.MongoDb", "ConnectToSource.SqlServer", "ConnectToSource.SqlServer.Sync", + "ConnectToSource.PostgreSql.Sync", "ConnectToSource.MySql", "ConnectToSource.Oracle.Sync", + "ConnectToTarget.SqlDb", "ConnectToTarget.SqlDb.Sync", + "ConnectToTarget.AzureDbForPostgreSql.Sync", + "ConnectToTarget.Oracle.AzureDbForPostgreSql.Sync", "ConnectToTarget.AzureSqlDbMI", + "ConnectToTarget.AzureSqlDbMI.Sync.LRS", "ConnectToTarget.AzureDbForMySql", + "GetUserTables.Sql", "GetUserTables.AzureSqlDb.Sync", "GetUserTablesOracle", + "GetUserTablesPostgreSql", "GetUserTablesMySql", "Migrate.MongoDb", + "Migrate.SqlServer.AzureSqlDbMI", "Migrate.SqlServer.AzureSqlDbMI.Sync.LRS", + "Migrate.SqlServer.SqlDb", "Migrate.SqlServer.AzureSqlDb.Sync", + "Migrate.MySql.AzureDbForMySql.Sync", "Migrate.MySql.AzureDbForMySql", + "Migrate.PostgreSql.AzureDbForPostgreSql.SyncV2", "Migrate.Oracle.AzureDbForPostgreSql.Sync", + "ValidateMigrationInput.SqlServer.SqlDb.Sync", "ValidateMigrationInput.SqlServer.AzureSqlDbMI", + "ValidateMigrationInput.SqlServer.AzureSqlDbMI.Sync.LRS", "Validate.MongoDb", + "Validate.Oracle.AzureDbPostgreSql.Sync", "GetTDECertificates.Sql", "Migrate.Ssis", + "Service.Check.OCI", "Service.Upload.OCI", "Service.Install.OCI", + "MigrateSchemaSqlServerSqlDb". + :type task_type: str or ~azure.mgmt.datamigration.models.TaskType + :ivar errors: Array of errors. This is ignored if submitted. + :vartype errors: list[~azure.mgmt.datamigration.models.ODataError] + :ivar state: The state of the task. This is ignored if submitted. Possible values include: + "Unknown", "Queued", "Running", "Canceled", "Succeeded", "Failed", "FailedInputValidation", + "Faulted". + :vartype state: str or ~azure.mgmt.datamigration.models.TaskState + :ivar commands: Array of command properties. + :vartype commands: list[~azure.mgmt.datamigration.models.CommandProperties] + :param client_data: Key value pairs of client data to attach meta data information to task. + :type client_data: dict[str, str] + :param input: Task input. + :type input: ~azure.mgmt.datamigration.models.GetUserTablesPostgreSqlTaskInput + :ivar output: Task output. This is ignored if submitted. + :vartype output: list[~azure.mgmt.datamigration.models.GetUserTablesPostgreSqlTaskOutput] + """ + + _validation = { + 'task_type': {'required': True}, + 'errors': {'readonly': True}, + 'state': {'readonly': True}, + 'commands': {'readonly': True}, + 'output': {'readonly': True}, + } + + _attribute_map = { + 'task_type': {'key': 'taskType', 'type': 'str'}, + 'errors': {'key': 'errors', 'type': '[ODataError]'}, + 'state': {'key': 'state', 'type': 'str'}, + 'commands': {'key': 'commands', 'type': '[CommandProperties]'}, + 'client_data': {'key': 'clientData', 'type': '{str}'}, + 'input': {'key': 'input', 'type': 'GetUserTablesPostgreSqlTaskInput'}, + 'output': {'key': 'output', 'type': '[GetUserTablesPostgreSqlTaskOutput]'}, + } + + def __init__( + self, + **kwargs + ): + super(GetUserTablesPostgreSqlTaskProperties, self).__init__(**kwargs) + self.task_type = 'GetUserTablesPostgreSql' # type: str + self.input = kwargs.get('input', None) + self.output = None + + +class GetUserTablesSqlSyncTaskInput(msrest.serialization.Model): + """Input for the task that collects user tables for the given list of databases. + + All required parameters must be populated in order to send to Azure. + + :param source_connection_info: Required. Connection information for SQL Server. + :type source_connection_info: ~azure.mgmt.datamigration.models.SqlConnectionInfo + :param target_connection_info: Required. Connection information for SQL DB. + :type target_connection_info: ~azure.mgmt.datamigration.models.SqlConnectionInfo + :param selected_source_databases: Required. List of source database names to collect tables + for. + :type selected_source_databases: list[str] + :param selected_target_databases: Required. List of target database names to collect tables + for. + :type selected_target_databases: list[str] + """ + + _validation = { + 'source_connection_info': {'required': True}, + 'target_connection_info': {'required': True}, + 'selected_source_databases': {'required': True}, + 'selected_target_databases': {'required': True}, + } + + _attribute_map = { + 'source_connection_info': {'key': 'sourceConnectionInfo', 'type': 'SqlConnectionInfo'}, + 'target_connection_info': {'key': 'targetConnectionInfo', 'type': 'SqlConnectionInfo'}, + 'selected_source_databases': {'key': 'selectedSourceDatabases', 'type': '[str]'}, + 'selected_target_databases': {'key': 'selectedTargetDatabases', 'type': '[str]'}, + } + + def __init__( + self, + **kwargs + ): + super(GetUserTablesSqlSyncTaskInput, self).__init__(**kwargs) + self.source_connection_info = kwargs['source_connection_info'] + self.target_connection_info = kwargs['target_connection_info'] + self.selected_source_databases = kwargs['selected_source_databases'] + self.selected_target_databases = kwargs['selected_target_databases'] + + +class GetUserTablesSqlSyncTaskOutput(msrest.serialization.Model): + """Output of the task that collects user tables for the given list of databases. + + Variables are only populated by the server, and will be ignored when sending a request. + + :ivar databases_to_source_tables: Mapping from database name to list of source tables. + :vartype databases_to_source_tables: str + :ivar databases_to_target_tables: Mapping from database name to list of target tables. + :vartype databases_to_target_tables: str + :ivar table_validation_errors: Mapping from database name to list of validation errors. + :vartype table_validation_errors: str + :ivar validation_errors: Validation errors. + :vartype validation_errors: list[~azure.mgmt.datamigration.models.ReportableException] + """ + + _validation = { + 'databases_to_source_tables': {'readonly': True}, + 'databases_to_target_tables': {'readonly': True}, + 'table_validation_errors': {'readonly': True}, + 'validation_errors': {'readonly': True}, + } + + _attribute_map = { + 'databases_to_source_tables': {'key': 'databasesToSourceTables', 'type': 'str'}, + 'databases_to_target_tables': {'key': 'databasesToTargetTables', 'type': 'str'}, + 'table_validation_errors': {'key': 'tableValidationErrors', 'type': 'str'}, + 'validation_errors': {'key': 'validationErrors', 'type': '[ReportableException]'}, + } + + def __init__( + self, + **kwargs + ): + super(GetUserTablesSqlSyncTaskOutput, self).__init__(**kwargs) + self.databases_to_source_tables = None + self.databases_to_target_tables = None + self.table_validation_errors = None + self.validation_errors = None + + +class GetUserTablesSqlSyncTaskProperties(ProjectTaskProperties): + """Properties for the task that collects user tables for the given list of databases. + + Variables are only populated by the server, and will be ignored when sending a request. + + All required parameters must be populated in order to send to Azure. + + :param task_type: Required. Task type.Constant filled by server. Possible values include: + "Connect.MongoDb", "ConnectToSource.SqlServer", "ConnectToSource.SqlServer.Sync", + "ConnectToSource.PostgreSql.Sync", "ConnectToSource.MySql", "ConnectToSource.Oracle.Sync", + "ConnectToTarget.SqlDb", "ConnectToTarget.SqlDb.Sync", + "ConnectToTarget.AzureDbForPostgreSql.Sync", + "ConnectToTarget.Oracle.AzureDbForPostgreSql.Sync", "ConnectToTarget.AzureSqlDbMI", + "ConnectToTarget.AzureSqlDbMI.Sync.LRS", "ConnectToTarget.AzureDbForMySql", + "GetUserTables.Sql", "GetUserTables.AzureSqlDb.Sync", "GetUserTablesOracle", + "GetUserTablesPostgreSql", "GetUserTablesMySql", "Migrate.MongoDb", + "Migrate.SqlServer.AzureSqlDbMI", "Migrate.SqlServer.AzureSqlDbMI.Sync.LRS", + "Migrate.SqlServer.SqlDb", "Migrate.SqlServer.AzureSqlDb.Sync", + "Migrate.MySql.AzureDbForMySql.Sync", "Migrate.MySql.AzureDbForMySql", + "Migrate.PostgreSql.AzureDbForPostgreSql.SyncV2", "Migrate.Oracle.AzureDbForPostgreSql.Sync", + "ValidateMigrationInput.SqlServer.SqlDb.Sync", "ValidateMigrationInput.SqlServer.AzureSqlDbMI", + "ValidateMigrationInput.SqlServer.AzureSqlDbMI.Sync.LRS", "Validate.MongoDb", + "Validate.Oracle.AzureDbPostgreSql.Sync", "GetTDECertificates.Sql", "Migrate.Ssis", + "Service.Check.OCI", "Service.Upload.OCI", "Service.Install.OCI", + "MigrateSchemaSqlServerSqlDb". + :type task_type: str or ~azure.mgmt.datamigration.models.TaskType + :ivar errors: Array of errors. This is ignored if submitted. + :vartype errors: list[~azure.mgmt.datamigration.models.ODataError] + :ivar state: The state of the task. This is ignored if submitted. Possible values include: + "Unknown", "Queued", "Running", "Canceled", "Succeeded", "Failed", "FailedInputValidation", + "Faulted". + :vartype state: str or ~azure.mgmt.datamigration.models.TaskState + :ivar commands: Array of command properties. + :vartype commands: list[~azure.mgmt.datamigration.models.CommandProperties] + :param client_data: Key value pairs of client data to attach meta data information to task. + :type client_data: dict[str, str] + :param input: Task input. + :type input: ~azure.mgmt.datamigration.models.GetUserTablesSqlSyncTaskInput + :ivar output: Task output. This is ignored if submitted. + :vartype output: list[~azure.mgmt.datamigration.models.GetUserTablesSqlSyncTaskOutput] + """ + + _validation = { + 'task_type': {'required': True}, + 'errors': {'readonly': True}, + 'state': {'readonly': True}, + 'commands': {'readonly': True}, + 'output': {'readonly': True}, + } + + _attribute_map = { + 'task_type': {'key': 'taskType', 'type': 'str'}, + 'errors': {'key': 'errors', 'type': '[ODataError]'}, + 'state': {'key': 'state', 'type': 'str'}, + 'commands': {'key': 'commands', 'type': '[CommandProperties]'}, + 'client_data': {'key': 'clientData', 'type': '{str}'}, + 'input': {'key': 'input', 'type': 'GetUserTablesSqlSyncTaskInput'}, + 'output': {'key': 'output', 'type': '[GetUserTablesSqlSyncTaskOutput]'}, + } + + def __init__( + self, + **kwargs + ): + super(GetUserTablesSqlSyncTaskProperties, self).__init__(**kwargs) + self.task_type = 'GetUserTables.AzureSqlDb.Sync' # type: str + self.input = kwargs.get('input', None) + self.output = None + + +class GetUserTablesSqlTaskInput(msrest.serialization.Model): + """Input for the task that collects user tables for the given list of databases. + + All required parameters must be populated in order to send to Azure. + + :param connection_info: Required. Connection information for SQL Server. + :type connection_info: ~azure.mgmt.datamigration.models.SqlConnectionInfo + :param selected_databases: Required. List of database names to collect tables for. + :type selected_databases: list[str] + """ + + _validation = { + 'connection_info': {'required': True}, + 'selected_databases': {'required': True}, + } + + _attribute_map = { + 'connection_info': {'key': 'connectionInfo', 'type': 'SqlConnectionInfo'}, + 'selected_databases': {'key': 'selectedDatabases', 'type': '[str]'}, + } + + def __init__( + self, + **kwargs + ): + super(GetUserTablesSqlTaskInput, self).__init__(**kwargs) + self.connection_info = kwargs['connection_info'] + self.selected_databases = kwargs['selected_databases'] + + +class GetUserTablesSqlTaskOutput(msrest.serialization.Model): + """Output of the task that collects user tables for the given list of databases. + + Variables are only populated by the server, and will be ignored when sending a request. + + :ivar id: Result identifier. + :vartype id: str + :ivar databases_to_tables: Mapping from database name to list of tables. + :vartype databases_to_tables: str + :ivar validation_errors: Validation errors. + :vartype validation_errors: list[~azure.mgmt.datamigration.models.ReportableException] + """ + + _validation = { + 'id': {'readonly': True}, + 'databases_to_tables': {'readonly': True}, + 'validation_errors': {'readonly': True}, + } + + _attribute_map = { + 'id': {'key': 'id', 'type': 'str'}, + 'databases_to_tables': {'key': 'databasesToTables', 'type': 'str'}, + 'validation_errors': {'key': 'validationErrors', 'type': '[ReportableException]'}, + } + + def __init__( + self, + **kwargs + ): + super(GetUserTablesSqlTaskOutput, self).__init__(**kwargs) + self.id = None + self.databases_to_tables = None + self.validation_errors = None + + +class GetUserTablesSqlTaskProperties(ProjectTaskProperties): + """Properties for the task that collects user tables for the given list of databases. + + Variables are only populated by the server, and will be ignored when sending a request. + + All required parameters must be populated in order to send to Azure. + + :param task_type: Required. Task type.Constant filled by server. Possible values include: + "Connect.MongoDb", "ConnectToSource.SqlServer", "ConnectToSource.SqlServer.Sync", + "ConnectToSource.PostgreSql.Sync", "ConnectToSource.MySql", "ConnectToSource.Oracle.Sync", + "ConnectToTarget.SqlDb", "ConnectToTarget.SqlDb.Sync", + "ConnectToTarget.AzureDbForPostgreSql.Sync", + "ConnectToTarget.Oracle.AzureDbForPostgreSql.Sync", "ConnectToTarget.AzureSqlDbMI", + "ConnectToTarget.AzureSqlDbMI.Sync.LRS", "ConnectToTarget.AzureDbForMySql", + "GetUserTables.Sql", "GetUserTables.AzureSqlDb.Sync", "GetUserTablesOracle", + "GetUserTablesPostgreSql", "GetUserTablesMySql", "Migrate.MongoDb", + "Migrate.SqlServer.AzureSqlDbMI", "Migrate.SqlServer.AzureSqlDbMI.Sync.LRS", + "Migrate.SqlServer.SqlDb", "Migrate.SqlServer.AzureSqlDb.Sync", + "Migrate.MySql.AzureDbForMySql.Sync", "Migrate.MySql.AzureDbForMySql", + "Migrate.PostgreSql.AzureDbForPostgreSql.SyncV2", "Migrate.Oracle.AzureDbForPostgreSql.Sync", + "ValidateMigrationInput.SqlServer.SqlDb.Sync", "ValidateMigrationInput.SqlServer.AzureSqlDbMI", + "ValidateMigrationInput.SqlServer.AzureSqlDbMI.Sync.LRS", "Validate.MongoDb", + "Validate.Oracle.AzureDbPostgreSql.Sync", "GetTDECertificates.Sql", "Migrate.Ssis", + "Service.Check.OCI", "Service.Upload.OCI", "Service.Install.OCI", + "MigrateSchemaSqlServerSqlDb". + :type task_type: str or ~azure.mgmt.datamigration.models.TaskType + :ivar errors: Array of errors. This is ignored if submitted. + :vartype errors: list[~azure.mgmt.datamigration.models.ODataError] + :ivar state: The state of the task. This is ignored if submitted. Possible values include: + "Unknown", "Queued", "Running", "Canceled", "Succeeded", "Failed", "FailedInputValidation", + "Faulted". + :vartype state: str or ~azure.mgmt.datamigration.models.TaskState + :ivar commands: Array of command properties. + :vartype commands: list[~azure.mgmt.datamigration.models.CommandProperties] + :param client_data: Key value pairs of client data to attach meta data information to task. + :type client_data: dict[str, str] + :param input: Task input. + :type input: ~azure.mgmt.datamigration.models.GetUserTablesSqlTaskInput + :ivar output: Task output. This is ignored if submitted. + :vartype output: list[~azure.mgmt.datamigration.models.GetUserTablesSqlTaskOutput] + """ + + _validation = { + 'task_type': {'required': True}, + 'errors': {'readonly': True}, + 'state': {'readonly': True}, + 'commands': {'readonly': True}, + 'output': {'readonly': True}, + } + + _attribute_map = { + 'task_type': {'key': 'taskType', 'type': 'str'}, + 'errors': {'key': 'errors', 'type': '[ODataError]'}, + 'state': {'key': 'state', 'type': 'str'}, + 'commands': {'key': 'commands', 'type': '[CommandProperties]'}, + 'client_data': {'key': 'clientData', 'type': '{str}'}, + 'input': {'key': 'input', 'type': 'GetUserTablesSqlTaskInput'}, + 'output': {'key': 'output', 'type': '[GetUserTablesSqlTaskOutput]'}, + } + + def __init__( + self, + **kwargs + ): + super(GetUserTablesSqlTaskProperties, self).__init__(**kwargs) + self.task_type = 'GetUserTables.Sql' # type: str + self.input = kwargs.get('input', None) + self.output = None + + +class InstallOciDriverTaskInput(msrest.serialization.Model): + """Input for the service task to install an OCI driver. + + :param driver_package_name: Name of the uploaded driver package to install. + :type driver_package_name: str + """ + + _attribute_map = { + 'driver_package_name': {'key': 'driverPackageName', 'type': 'str'}, + } + + def __init__( + self, + **kwargs + ): + super(InstallOciDriverTaskInput, self).__init__(**kwargs) + self.driver_package_name = kwargs.get('driver_package_name', None) + + +class InstallOciDriverTaskOutput(msrest.serialization.Model): + """Output for the service task to install an OCI driver. + + Variables are only populated by the server, and will be ignored when sending a request. + + :ivar validation_errors: Validation errors. + :vartype validation_errors: list[~azure.mgmt.datamigration.models.ReportableException] + """ + + _validation = { + 'validation_errors': {'readonly': True}, + } + + _attribute_map = { + 'validation_errors': {'key': 'validationErrors', 'type': '[ReportableException]'}, + } + + def __init__( + self, + **kwargs + ): + super(InstallOciDriverTaskOutput, self).__init__(**kwargs) + self.validation_errors = None + + +class InstallOciDriverTaskProperties(ProjectTaskProperties): + """Properties for the task that installs an OCI driver. + + Variables are only populated by the server, and will be ignored when sending a request. + + All required parameters must be populated in order to send to Azure. + + :param task_type: Required. Task type.Constant filled by server. Possible values include: + "Connect.MongoDb", "ConnectToSource.SqlServer", "ConnectToSource.SqlServer.Sync", + "ConnectToSource.PostgreSql.Sync", "ConnectToSource.MySql", "ConnectToSource.Oracle.Sync", + "ConnectToTarget.SqlDb", "ConnectToTarget.SqlDb.Sync", + "ConnectToTarget.AzureDbForPostgreSql.Sync", + "ConnectToTarget.Oracle.AzureDbForPostgreSql.Sync", "ConnectToTarget.AzureSqlDbMI", + "ConnectToTarget.AzureSqlDbMI.Sync.LRS", "ConnectToTarget.AzureDbForMySql", + "GetUserTables.Sql", "GetUserTables.AzureSqlDb.Sync", "GetUserTablesOracle", + "GetUserTablesPostgreSql", "GetUserTablesMySql", "Migrate.MongoDb", + "Migrate.SqlServer.AzureSqlDbMI", "Migrate.SqlServer.AzureSqlDbMI.Sync.LRS", + "Migrate.SqlServer.SqlDb", "Migrate.SqlServer.AzureSqlDb.Sync", + "Migrate.MySql.AzureDbForMySql.Sync", "Migrate.MySql.AzureDbForMySql", + "Migrate.PostgreSql.AzureDbForPostgreSql.SyncV2", "Migrate.Oracle.AzureDbForPostgreSql.Sync", + "ValidateMigrationInput.SqlServer.SqlDb.Sync", "ValidateMigrationInput.SqlServer.AzureSqlDbMI", + "ValidateMigrationInput.SqlServer.AzureSqlDbMI.Sync.LRS", "Validate.MongoDb", + "Validate.Oracle.AzureDbPostgreSql.Sync", "GetTDECertificates.Sql", "Migrate.Ssis", + "Service.Check.OCI", "Service.Upload.OCI", "Service.Install.OCI", + "MigrateSchemaSqlServerSqlDb". + :type task_type: str or ~azure.mgmt.datamigration.models.TaskType + :ivar errors: Array of errors. This is ignored if submitted. + :vartype errors: list[~azure.mgmt.datamigration.models.ODataError] + :ivar state: The state of the task. This is ignored if submitted. Possible values include: + "Unknown", "Queued", "Running", "Canceled", "Succeeded", "Failed", "FailedInputValidation", + "Faulted". + :vartype state: str or ~azure.mgmt.datamigration.models.TaskState + :ivar commands: Array of command properties. + :vartype commands: list[~azure.mgmt.datamigration.models.CommandProperties] + :param client_data: Key value pairs of client data to attach meta data information to task. + :type client_data: dict[str, str] + :param input: Input for the service task to install an OCI driver. + :type input: ~azure.mgmt.datamigration.models.InstallOciDriverTaskInput + :ivar output: Task output. This is ignored if submitted. + :vartype output: list[~azure.mgmt.datamigration.models.InstallOciDriverTaskOutput] + """ + + _validation = { + 'task_type': {'required': True}, + 'errors': {'readonly': True}, + 'state': {'readonly': True}, + 'commands': {'readonly': True}, + 'output': {'readonly': True}, + } + + _attribute_map = { + 'task_type': {'key': 'taskType', 'type': 'str'}, + 'errors': {'key': 'errors', 'type': '[ODataError]'}, + 'state': {'key': 'state', 'type': 'str'}, + 'commands': {'key': 'commands', 'type': '[CommandProperties]'}, + 'client_data': {'key': 'clientData', 'type': '{str}'}, + 'input': {'key': 'input', 'type': 'InstallOciDriverTaskInput'}, + 'output': {'key': 'output', 'type': '[InstallOciDriverTaskOutput]'}, + } + + def __init__( + self, + **kwargs + ): + super(InstallOciDriverTaskProperties, self).__init__(**kwargs) + self.task_type = 'Service.Install.OCI' # type: str + self.input = kwargs.get('input', None) + self.output = None + + +class IntegrationRuntimeMonitoringData(msrest.serialization.Model): + """Integration Runtime Monitoring Data. + + Variables are only populated by the server, and will be ignored when sending a request. + + :ivar name: The name of Integration Runtime. + :vartype name: str + :ivar nodes: Integration Runtime node monitoring data. + :vartype nodes: list[~azure.mgmt.datamigration.models.NodeMonitoringData] + """ + + _validation = { + 'name': {'readonly': True}, + 'nodes': {'readonly': True}, + } + + _attribute_map = { + 'name': {'key': 'name', 'type': 'str'}, + 'nodes': {'key': 'nodes', 'type': '[NodeMonitoringData]'}, + } + + def __init__( + self, + **kwargs + ): + super(IntegrationRuntimeMonitoringData, self).__init__(**kwargs) + self.name = None + self.nodes = None + + +class MigrateMiSyncCompleteCommandInput(msrest.serialization.Model): + """Input for command that completes online migration for an Azure SQL Database Managed Instance. + + All required parameters must be populated in order to send to Azure. + + :param source_database_name: Required. Name of managed instance database. + :type source_database_name: str + """ + + _validation = { + 'source_database_name': {'required': True}, + } + + _attribute_map = { + 'source_database_name': {'key': 'sourceDatabaseName', 'type': 'str'}, + } + + def __init__( + self, + **kwargs + ): + super(MigrateMiSyncCompleteCommandInput, self).__init__(**kwargs) + self.source_database_name = kwargs['source_database_name'] + + +class MigrateMiSyncCompleteCommandOutput(msrest.serialization.Model): + """Output for command that completes online migration for an Azure SQL Database Managed Instance. + + :param errors: List of errors that happened during the command execution. + :type errors: list[~azure.mgmt.datamigration.models.ReportableException] + """ + + _attribute_map = { + 'errors': {'key': 'errors', 'type': '[ReportableException]'}, + } + + def __init__( + self, + **kwargs + ): + super(MigrateMiSyncCompleteCommandOutput, self).__init__(**kwargs) + self.errors = kwargs.get('errors', None) + + +class MigrateMiSyncCompleteCommandProperties(CommandProperties): + """Properties for the command that completes online migration for an Azure SQL Database Managed Instance. + + Variables are only populated by the server, and will be ignored when sending a request. + + All required parameters must be populated in order to send to Azure. + + :param command_type: Required. Command type.Constant filled by server. Possible values + include: "Migrate.Sync.Complete.Database", "Migrate.SqlServer.AzureDbSqlMi.Complete", "cancel", + "finish", "restart". + :type command_type: str or ~azure.mgmt.datamigration.models.CommandType + :ivar errors: Array of errors. This is ignored if submitted. + :vartype errors: list[~azure.mgmt.datamigration.models.ODataError] + :ivar state: The state of the command. This is ignored if submitted. Possible values include: + "Unknown", "Accepted", "Running", "Succeeded", "Failed". + :vartype state: str or ~azure.mgmt.datamigration.models.CommandState + :param input: Command input. + :type input: ~azure.mgmt.datamigration.models.MigrateMiSyncCompleteCommandInput + :ivar output: Command output. This is ignored if submitted. + :vartype output: ~azure.mgmt.datamigration.models.MigrateMiSyncCompleteCommandOutput + """ + + _validation = { + 'command_type': {'required': True}, + 'errors': {'readonly': True}, + 'state': {'readonly': True}, + 'output': {'readonly': True}, + } + + _attribute_map = { + 'command_type': {'key': 'commandType', 'type': 'str'}, + 'errors': {'key': 'errors', 'type': '[ODataError]'}, + 'state': {'key': 'state', 'type': 'str'}, + 'input': {'key': 'input', 'type': 'MigrateMiSyncCompleteCommandInput'}, + 'output': {'key': 'output', 'type': 'MigrateMiSyncCompleteCommandOutput'}, + } + + def __init__( + self, + **kwargs + ): + super(MigrateMiSyncCompleteCommandProperties, self).__init__(**kwargs) + self.command_type = 'Migrate.SqlServer.AzureDbSqlMi.Complete' # type: str + self.input = kwargs.get('input', None) + self.output = None + + +class MigrateMongoDbTaskProperties(ProjectTaskProperties): + """Properties for the task that migrates data between MongoDB data sources. + + Variables are only populated by the server, and will be ignored when sending a request. + + All required parameters must be populated in order to send to Azure. + + :param task_type: Required. Task type.Constant filled by server. Possible values include: + "Connect.MongoDb", "ConnectToSource.SqlServer", "ConnectToSource.SqlServer.Sync", + "ConnectToSource.PostgreSql.Sync", "ConnectToSource.MySql", "ConnectToSource.Oracle.Sync", + "ConnectToTarget.SqlDb", "ConnectToTarget.SqlDb.Sync", + "ConnectToTarget.AzureDbForPostgreSql.Sync", + "ConnectToTarget.Oracle.AzureDbForPostgreSql.Sync", "ConnectToTarget.AzureSqlDbMI", + "ConnectToTarget.AzureSqlDbMI.Sync.LRS", "ConnectToTarget.AzureDbForMySql", + "GetUserTables.Sql", "GetUserTables.AzureSqlDb.Sync", "GetUserTablesOracle", + "GetUserTablesPostgreSql", "GetUserTablesMySql", "Migrate.MongoDb", + "Migrate.SqlServer.AzureSqlDbMI", "Migrate.SqlServer.AzureSqlDbMI.Sync.LRS", + "Migrate.SqlServer.SqlDb", "Migrate.SqlServer.AzureSqlDb.Sync", + "Migrate.MySql.AzureDbForMySql.Sync", "Migrate.MySql.AzureDbForMySql", + "Migrate.PostgreSql.AzureDbForPostgreSql.SyncV2", "Migrate.Oracle.AzureDbForPostgreSql.Sync", + "ValidateMigrationInput.SqlServer.SqlDb.Sync", "ValidateMigrationInput.SqlServer.AzureSqlDbMI", + "ValidateMigrationInput.SqlServer.AzureSqlDbMI.Sync.LRS", "Validate.MongoDb", + "Validate.Oracle.AzureDbPostgreSql.Sync", "GetTDECertificates.Sql", "Migrate.Ssis", + "Service.Check.OCI", "Service.Upload.OCI", "Service.Install.OCI", + "MigrateSchemaSqlServerSqlDb". + :type task_type: str or ~azure.mgmt.datamigration.models.TaskType + :ivar errors: Array of errors. This is ignored if submitted. + :vartype errors: list[~azure.mgmt.datamigration.models.ODataError] + :ivar state: The state of the task. This is ignored if submitted. Possible values include: + "Unknown", "Queued", "Running", "Canceled", "Succeeded", "Failed", "FailedInputValidation", + "Faulted". + :vartype state: str or ~azure.mgmt.datamigration.models.TaskState + :ivar commands: Array of command properties. + :vartype commands: list[~azure.mgmt.datamigration.models.CommandProperties] + :param client_data: Key value pairs of client data to attach meta data information to task. + :type client_data: dict[str, str] + :param input: Describes how a MongoDB data migration should be performed. + :type input: ~azure.mgmt.datamigration.models.MongoDbMigrationSettings + :ivar output: + :vartype output: list[~azure.mgmt.datamigration.models.MongoDbProgress] + """ + + _validation = { + 'task_type': {'required': True}, + 'errors': {'readonly': True}, + 'state': {'readonly': True}, + 'commands': {'readonly': True}, + 'output': {'readonly': True}, + } + + _attribute_map = { + 'task_type': {'key': 'taskType', 'type': 'str'}, + 'errors': {'key': 'errors', 'type': '[ODataError]'}, + 'state': {'key': 'state', 'type': 'str'}, + 'commands': {'key': 'commands', 'type': '[CommandProperties]'}, + 'client_data': {'key': 'clientData', 'type': '{str}'}, + 'input': {'key': 'input', 'type': 'MongoDbMigrationSettings'}, + 'output': {'key': 'output', 'type': '[MongoDbProgress]'}, + } + + def __init__( + self, + **kwargs + ): + super(MigrateMongoDbTaskProperties, self).__init__(**kwargs) + self.task_type = 'Migrate.MongoDb' # type: str + self.input = kwargs.get('input', None) + self.output = None + + +class MigrateMySqlAzureDbForMySqlOfflineDatabaseInput(msrest.serialization.Model): + """Database specific information for offline MySQL to Azure Database for MySQL migration task inputs. + + :param name: Name of the database. + :type name: str + :param target_database_name: Name of target database. Note: Target database will be truncated + before starting migration. + :type target_database_name: str + :param table_map: Mapping of source to target tables. + :type table_map: dict[str, str] + """ + + _attribute_map = { + 'name': {'key': 'name', 'type': 'str'}, + 'target_database_name': {'key': 'targetDatabaseName', 'type': 'str'}, + 'table_map': {'key': 'tableMap', 'type': '{str}'}, + } + + def __init__( + self, + **kwargs + ): + super(MigrateMySqlAzureDbForMySqlOfflineDatabaseInput, self).__init__(**kwargs) + self.name = kwargs.get('name', None) + self.target_database_name = kwargs.get('target_database_name', None) + self.table_map = kwargs.get('table_map', None) + + +class MigrateMySqlAzureDbForMySqlOfflineTaskInput(msrest.serialization.Model): + """Input for the task that migrates MySQL databases to Azure Database for MySQL for offline migrations. + + All required parameters must be populated in order to send to Azure. + + :param source_connection_info: Required. Connection information for source MySQL. + :type source_connection_info: ~azure.mgmt.datamigration.models.MySqlConnectionInfo + :param target_connection_info: Required. Connection information for target Azure Database for + MySQL. + :type target_connection_info: ~azure.mgmt.datamigration.models.MySqlConnectionInfo + :param selected_databases: Required. Databases to migrate. + :type selected_databases: + list[~azure.mgmt.datamigration.models.MigrateMySqlAzureDbForMySqlOfflineDatabaseInput] + :param make_source_server_read_only: Setting to set the source server read only. + :type make_source_server_read_only: bool + :param started_on: Parameter to specify when the migration started. + :type started_on: ~datetime.datetime + :param optional_agent_settings: Optional parameters for fine tuning the data transfer rate + during migration. + :type optional_agent_settings: dict[str, str] + """ + + _validation = { + 'source_connection_info': {'required': True}, + 'target_connection_info': {'required': True}, + 'selected_databases': {'required': True}, + } + + _attribute_map = { + 'source_connection_info': {'key': 'sourceConnectionInfo', 'type': 'MySqlConnectionInfo'}, + 'target_connection_info': {'key': 'targetConnectionInfo', 'type': 'MySqlConnectionInfo'}, + 'selected_databases': {'key': 'selectedDatabases', 'type': '[MigrateMySqlAzureDbForMySqlOfflineDatabaseInput]'}, + 'make_source_server_read_only': {'key': 'makeSourceServerReadOnly', 'type': 'bool'}, + 'started_on': {'key': 'startedOn', 'type': 'iso-8601'}, + 'optional_agent_settings': {'key': 'optionalAgentSettings', 'type': '{str}'}, + } + + def __init__( + self, + **kwargs + ): + super(MigrateMySqlAzureDbForMySqlOfflineTaskInput, self).__init__(**kwargs) + self.source_connection_info = kwargs['source_connection_info'] + self.target_connection_info = kwargs['target_connection_info'] + self.selected_databases = kwargs['selected_databases'] + self.make_source_server_read_only = kwargs.get('make_source_server_read_only', False) + self.started_on = kwargs.get('started_on', None) + self.optional_agent_settings = kwargs.get('optional_agent_settings', None) + + +class MigrateMySqlAzureDbForMySqlOfflineTaskOutput(msrest.serialization.Model): + """Output for the task that migrates MySQL databases to Azure Database for MySQL for offline migrations. + + You probably want to use the sub-classes and not this class directly. Known + sub-classes are: MigrateMySqlAzureDbForMySqlOfflineTaskOutputDatabaseLevel, MigrateMySqlAzureDbForMySqlOfflineTaskOutputError, MigrateMySqlAzureDbForMySqlOfflineTaskOutputMigrationLevel, MigrateMySqlAzureDbForMySqlOfflineTaskOutputTableLevel. + + Variables are only populated by the server, and will be ignored when sending a request. + + All required parameters must be populated in order to send to Azure. + + :ivar id: Result identifier. + :vartype id: str + :param result_type: Required. Result type.Constant filled by server. + :type result_type: str + """ + + _validation = { + 'id': {'readonly': True}, + 'result_type': {'required': True}, + } + + _attribute_map = { + 'id': {'key': 'id', 'type': 'str'}, + 'result_type': {'key': 'resultType', 'type': 'str'}, + } + + _subtype_map = { + 'result_type': {'DatabaseLevelOutput': 'MigrateMySqlAzureDbForMySqlOfflineTaskOutputDatabaseLevel', 'ErrorOutput': 'MigrateMySqlAzureDbForMySqlOfflineTaskOutputError', 'MigrationLevelOutput': 'MigrateMySqlAzureDbForMySqlOfflineTaskOutputMigrationLevel', 'TableLevelOutput': 'MigrateMySqlAzureDbForMySqlOfflineTaskOutputTableLevel'} + } + + def __init__( + self, + **kwargs + ): + super(MigrateMySqlAzureDbForMySqlOfflineTaskOutput, self).__init__(**kwargs) + self.id = None + self.result_type = None # type: Optional[str] + + +class MigrateMySqlAzureDbForMySqlOfflineTaskOutputDatabaseLevel(MigrateMySqlAzureDbForMySqlOfflineTaskOutput): + """MigrateMySqlAzureDbForMySqlOfflineTaskOutputDatabaseLevel. + + Variables are only populated by the server, and will be ignored when sending a request. + + All required parameters must be populated in order to send to Azure. + + :ivar id: Result identifier. + :vartype id: str + :param result_type: Required. Result type.Constant filled by server. + :type result_type: str + :ivar database_name: Name of the database. + :vartype database_name: str + :ivar started_on: Migration start time. + :vartype started_on: ~datetime.datetime + :ivar ended_on: Migration end time. + :vartype ended_on: ~datetime.datetime + :ivar state: Current state of migration. Possible values include: "None", "InProgress", + "Failed", "Warning", "Completed", "Skipped", "Stopped". + :vartype state: str or ~azure.mgmt.datamigration.models.MigrationState + :ivar stage: Migration stage that this database is in. Possible values include: "None", + "Initialize", "Backup", "FileCopy", "Restore", "Completed". + :vartype stage: str or ~azure.mgmt.datamigration.models.DatabaseMigrationStage + :ivar status_message: Status message. + :vartype status_message: str + :ivar message: Migration progress message. + :vartype message: str + :ivar number_of_objects: Number of objects. + :vartype number_of_objects: long + :ivar number_of_objects_completed: Number of successfully completed objects. + :vartype number_of_objects_completed: long + :ivar error_count: Number of database/object errors. + :vartype error_count: long + :ivar error_prefix: Wildcard string prefix to use for querying all errors of the item. + :vartype error_prefix: str + :ivar result_prefix: Wildcard string prefix to use for querying all sub-tem results of the + item. + :vartype result_prefix: str + :ivar exceptions_and_warnings: Migration exceptions and warnings. + :vartype exceptions_and_warnings: list[~azure.mgmt.datamigration.models.ReportableException] + :ivar last_storage_update: Last time the storage was updated. + :vartype last_storage_update: ~datetime.datetime + :ivar object_summary: Summary of object results in the migration. + :vartype object_summary: str + """ + + _validation = { + 'id': {'readonly': True}, + 'result_type': {'required': True}, + 'database_name': {'readonly': True}, + 'started_on': {'readonly': True}, + 'ended_on': {'readonly': True}, + 'state': {'readonly': True}, + 'stage': {'readonly': True}, + 'status_message': {'readonly': True}, + 'message': {'readonly': True}, + 'number_of_objects': {'readonly': True}, + 'number_of_objects_completed': {'readonly': True}, + 'error_count': {'readonly': True}, + 'error_prefix': {'readonly': True}, + 'result_prefix': {'readonly': True}, + 'exceptions_and_warnings': {'readonly': True}, + 'last_storage_update': {'readonly': True}, + 'object_summary': {'readonly': True}, + } + + _attribute_map = { + 'id': {'key': 'id', 'type': 'str'}, + 'result_type': {'key': 'resultType', 'type': 'str'}, + 'database_name': {'key': 'databaseName', 'type': 'str'}, + 'started_on': {'key': 'startedOn', 'type': 'iso-8601'}, + 'ended_on': {'key': 'endedOn', 'type': 'iso-8601'}, + 'state': {'key': 'state', 'type': 'str'}, + 'stage': {'key': 'stage', 'type': 'str'}, + 'status_message': {'key': 'statusMessage', 'type': 'str'}, + 'message': {'key': 'message', 'type': 'str'}, + 'number_of_objects': {'key': 'numberOfObjects', 'type': 'long'}, + 'number_of_objects_completed': {'key': 'numberOfObjectsCompleted', 'type': 'long'}, + 'error_count': {'key': 'errorCount', 'type': 'long'}, + 'error_prefix': {'key': 'errorPrefix', 'type': 'str'}, + 'result_prefix': {'key': 'resultPrefix', 'type': 'str'}, + 'exceptions_and_warnings': {'key': 'exceptionsAndWarnings', 'type': '[ReportableException]'}, + 'last_storage_update': {'key': 'lastStorageUpdate', 'type': 'iso-8601'}, + 'object_summary': {'key': 'objectSummary', 'type': 'str'}, + } + + def __init__( + self, + **kwargs + ): + super(MigrateMySqlAzureDbForMySqlOfflineTaskOutputDatabaseLevel, self).__init__(**kwargs) + self.result_type = 'DatabaseLevelOutput' # type: str + self.database_name = None + self.started_on = None + self.ended_on = None + self.state = None + self.stage = None + self.status_message = None + self.message = None + self.number_of_objects = None + self.number_of_objects_completed = None + self.error_count = None + self.error_prefix = None + self.result_prefix = None + self.exceptions_and_warnings = None + self.last_storage_update = None + self.object_summary = None + + +class MigrateMySqlAzureDbForMySqlOfflineTaskOutputError(MigrateMySqlAzureDbForMySqlOfflineTaskOutput): + """MigrateMySqlAzureDbForMySqlOfflineTaskOutputError. + + Variables are only populated by the server, and will be ignored when sending a request. + + All required parameters must be populated in order to send to Azure. + + :ivar id: Result identifier. + :vartype id: str + :param result_type: Required. Result type.Constant filled by server. + :type result_type: str + :ivar error: Migration error. + :vartype error: ~azure.mgmt.datamigration.models.ReportableException + """ + + _validation = { + 'id': {'readonly': True}, + 'result_type': {'required': True}, + 'error': {'readonly': True}, + } + + _attribute_map = { + 'id': {'key': 'id', 'type': 'str'}, + 'result_type': {'key': 'resultType', 'type': 'str'}, + 'error': {'key': 'error', 'type': 'ReportableException'}, + } + + def __init__( + self, + **kwargs + ): + super(MigrateMySqlAzureDbForMySqlOfflineTaskOutputError, self).__init__(**kwargs) + self.result_type = 'ErrorOutput' # type: str + self.error = None + + +class MigrateMySqlAzureDbForMySqlOfflineTaskOutputMigrationLevel(MigrateMySqlAzureDbForMySqlOfflineTaskOutput): + """MigrateMySqlAzureDbForMySqlOfflineTaskOutputMigrationLevel. + + Variables are only populated by the server, and will be ignored when sending a request. + + All required parameters must be populated in order to send to Azure. + + :ivar id: Result identifier. + :vartype id: str + :param result_type: Required. Result type.Constant filled by server. + :type result_type: str + :ivar started_on: Migration start time. + :vartype started_on: ~datetime.datetime + :ivar ended_on: Migration end time. + :vartype ended_on: ~datetime.datetime + :ivar duration_in_seconds: Duration of task execution in seconds. + :vartype duration_in_seconds: long + :ivar status: Current status of migration. Possible values include: "Default", "Connecting", + "SourceAndTargetSelected", "SelectLogins", "Configured", "Running", "Error", "Stopped", + "Completed", "CompletedWithWarnings". + :vartype status: str or ~azure.mgmt.datamigration.models.MigrationStatus + :ivar status_message: Migration status message. + :vartype status_message: str + :ivar message: Migration progress message. + :vartype message: str + :param databases: Selected databases as a map from database name to database id. + :type databases: str + :ivar database_summary: Summary of database results in the migration. + :vartype database_summary: str + :param migration_report_result: Migration Report Result, provides unique url for downloading + your migration report. + :type migration_report_result: ~azure.mgmt.datamigration.models.MigrationReportResult + :ivar source_server_version: Source server version. + :vartype source_server_version: str + :ivar source_server_brand_version: Source server brand version. + :vartype source_server_brand_version: str + :ivar target_server_version: Target server version. + :vartype target_server_version: str + :ivar target_server_brand_version: Target server brand version. + :vartype target_server_brand_version: str + :ivar exceptions_and_warnings: Migration exceptions and warnings. + :vartype exceptions_and_warnings: list[~azure.mgmt.datamigration.models.ReportableException] + :ivar last_storage_update: Last time the storage was updated. + :vartype last_storage_update: ~datetime.datetime + """ + + _validation = { + 'id': {'readonly': True}, + 'result_type': {'required': True}, + 'started_on': {'readonly': True}, + 'ended_on': {'readonly': True}, + 'duration_in_seconds': {'readonly': True}, + 'status': {'readonly': True}, + 'status_message': {'readonly': True}, + 'message': {'readonly': True}, + 'database_summary': {'readonly': True}, + 'source_server_version': {'readonly': True}, + 'source_server_brand_version': {'readonly': True}, + 'target_server_version': {'readonly': True}, + 'target_server_brand_version': {'readonly': True}, + 'exceptions_and_warnings': {'readonly': True}, + 'last_storage_update': {'readonly': True}, + } + + _attribute_map = { + 'id': {'key': 'id', 'type': 'str'}, + 'result_type': {'key': 'resultType', 'type': 'str'}, + 'started_on': {'key': 'startedOn', 'type': 'iso-8601'}, + 'ended_on': {'key': 'endedOn', 'type': 'iso-8601'}, + 'duration_in_seconds': {'key': 'durationInSeconds', 'type': 'long'}, + 'status': {'key': 'status', 'type': 'str'}, + 'status_message': {'key': 'statusMessage', 'type': 'str'}, + 'message': {'key': 'message', 'type': 'str'}, + 'databases': {'key': 'databases', 'type': 'str'}, + 'database_summary': {'key': 'databaseSummary', 'type': 'str'}, + 'migration_report_result': {'key': 'migrationReportResult', 'type': 'MigrationReportResult'}, + 'source_server_version': {'key': 'sourceServerVersion', 'type': 'str'}, + 'source_server_brand_version': {'key': 'sourceServerBrandVersion', 'type': 'str'}, + 'target_server_version': {'key': 'targetServerVersion', 'type': 'str'}, + 'target_server_brand_version': {'key': 'targetServerBrandVersion', 'type': 'str'}, + 'exceptions_and_warnings': {'key': 'exceptionsAndWarnings', 'type': '[ReportableException]'}, + 'last_storage_update': {'key': 'lastStorageUpdate', 'type': 'iso-8601'}, + } + + def __init__( + self, + **kwargs + ): + super(MigrateMySqlAzureDbForMySqlOfflineTaskOutputMigrationLevel, self).__init__(**kwargs) + self.result_type = 'MigrationLevelOutput' # type: str + self.started_on = None + self.ended_on = None + self.duration_in_seconds = None + self.status = None + self.status_message = None + self.message = None + self.databases = kwargs.get('databases', None) + self.database_summary = None + self.migration_report_result = kwargs.get('migration_report_result', None) + self.source_server_version = None + self.source_server_brand_version = None + self.target_server_version = None + self.target_server_brand_version = None + self.exceptions_and_warnings = None + self.last_storage_update = None + + +class MigrateMySqlAzureDbForMySqlOfflineTaskOutputTableLevel(MigrateMySqlAzureDbForMySqlOfflineTaskOutput): + """MigrateMySqlAzureDbForMySqlOfflineTaskOutputTableLevel. + + Variables are only populated by the server, and will be ignored when sending a request. + + All required parameters must be populated in order to send to Azure. + + :ivar id: Result identifier. + :vartype id: str + :param result_type: Required. Result type.Constant filled by server. + :type result_type: str + :ivar object_name: Name of the item. + :vartype object_name: str + :ivar started_on: Migration start time. + :vartype started_on: ~datetime.datetime + :ivar ended_on: Migration end time. + :vartype ended_on: ~datetime.datetime + :ivar state: Current state of migration. Possible values include: "None", "InProgress", + "Failed", "Warning", "Completed", "Skipped", "Stopped". + :vartype state: str or ~azure.mgmt.datamigration.models.MigrationState + :ivar status_message: Status message. + :vartype status_message: str + :ivar items_count: Number of items. + :vartype items_count: long + :ivar items_completed_count: Number of successfully completed items. + :vartype items_completed_count: long + :ivar error_prefix: Wildcard string prefix to use for querying all errors of the item. + :vartype error_prefix: str + :ivar result_prefix: Wildcard string prefix to use for querying all sub-tem results of the + item. + :vartype result_prefix: str + :ivar last_storage_update: Last time the storage was updated. + :vartype last_storage_update: ~datetime.datetime + """ + + _validation = { + 'id': {'readonly': True}, + 'result_type': {'required': True}, + 'object_name': {'readonly': True}, + 'started_on': {'readonly': True}, + 'ended_on': {'readonly': True}, + 'state': {'readonly': True}, + 'status_message': {'readonly': True}, + 'items_count': {'readonly': True}, + 'items_completed_count': {'readonly': True}, + 'error_prefix': {'readonly': True}, + 'result_prefix': {'readonly': True}, + 'last_storage_update': {'readonly': True}, + } + + _attribute_map = { + 'id': {'key': 'id', 'type': 'str'}, + 'result_type': {'key': 'resultType', 'type': 'str'}, + 'object_name': {'key': 'objectName', 'type': 'str'}, + 'started_on': {'key': 'startedOn', 'type': 'iso-8601'}, + 'ended_on': {'key': 'endedOn', 'type': 'iso-8601'}, + 'state': {'key': 'state', 'type': 'str'}, + 'status_message': {'key': 'statusMessage', 'type': 'str'}, + 'items_count': {'key': 'itemsCount', 'type': 'long'}, + 'items_completed_count': {'key': 'itemsCompletedCount', 'type': 'long'}, + 'error_prefix': {'key': 'errorPrefix', 'type': 'str'}, + 'result_prefix': {'key': 'resultPrefix', 'type': 'str'}, + 'last_storage_update': {'key': 'lastStorageUpdate', 'type': 'iso-8601'}, + } + + def __init__( + self, + **kwargs + ): + super(MigrateMySqlAzureDbForMySqlOfflineTaskOutputTableLevel, self).__init__(**kwargs) + self.result_type = 'TableLevelOutput' # type: str + self.object_name = None + self.started_on = None + self.ended_on = None + self.state = None + self.status_message = None + self.items_count = None + self.items_completed_count = None + self.error_prefix = None + self.result_prefix = None + self.last_storage_update = None + + +class MigrateMySqlAzureDbForMySqlOfflineTaskProperties(ProjectTaskProperties): + """Properties for the task that migrates MySQL databases to Azure Database for MySQL for offline migrations. + + Variables are only populated by the server, and will be ignored when sending a request. + + All required parameters must be populated in order to send to Azure. + + :param task_type: Required. Task type.Constant filled by server. Possible values include: + "Connect.MongoDb", "ConnectToSource.SqlServer", "ConnectToSource.SqlServer.Sync", + "ConnectToSource.PostgreSql.Sync", "ConnectToSource.MySql", "ConnectToSource.Oracle.Sync", + "ConnectToTarget.SqlDb", "ConnectToTarget.SqlDb.Sync", + "ConnectToTarget.AzureDbForPostgreSql.Sync", + "ConnectToTarget.Oracle.AzureDbForPostgreSql.Sync", "ConnectToTarget.AzureSqlDbMI", + "ConnectToTarget.AzureSqlDbMI.Sync.LRS", "ConnectToTarget.AzureDbForMySql", + "GetUserTables.Sql", "GetUserTables.AzureSqlDb.Sync", "GetUserTablesOracle", + "GetUserTablesPostgreSql", "GetUserTablesMySql", "Migrate.MongoDb", + "Migrate.SqlServer.AzureSqlDbMI", "Migrate.SqlServer.AzureSqlDbMI.Sync.LRS", + "Migrate.SqlServer.SqlDb", "Migrate.SqlServer.AzureSqlDb.Sync", + "Migrate.MySql.AzureDbForMySql.Sync", "Migrate.MySql.AzureDbForMySql", + "Migrate.PostgreSql.AzureDbForPostgreSql.SyncV2", "Migrate.Oracle.AzureDbForPostgreSql.Sync", + "ValidateMigrationInput.SqlServer.SqlDb.Sync", "ValidateMigrationInput.SqlServer.AzureSqlDbMI", + "ValidateMigrationInput.SqlServer.AzureSqlDbMI.Sync.LRS", "Validate.MongoDb", + "Validate.Oracle.AzureDbPostgreSql.Sync", "GetTDECertificates.Sql", "Migrate.Ssis", + "Service.Check.OCI", "Service.Upload.OCI", "Service.Install.OCI", + "MigrateSchemaSqlServerSqlDb". + :type task_type: str or ~azure.mgmt.datamigration.models.TaskType + :ivar errors: Array of errors. This is ignored if submitted. + :vartype errors: list[~azure.mgmt.datamigration.models.ODataError] + :ivar state: The state of the task. This is ignored if submitted. Possible values include: + "Unknown", "Queued", "Running", "Canceled", "Succeeded", "Failed", "FailedInputValidation", + "Faulted". + :vartype state: str or ~azure.mgmt.datamigration.models.TaskState + :ivar commands: Array of command properties. + :vartype commands: list[~azure.mgmt.datamigration.models.CommandProperties] + :param client_data: Key value pairs of client data to attach meta data information to task. + :type client_data: dict[str, str] + :param input: Task input. + :type input: ~azure.mgmt.datamigration.models.MigrateMySqlAzureDbForMySqlOfflineTaskInput + :ivar output: Task output. This is ignored if submitted. + :vartype output: + list[~azure.mgmt.datamigration.models.MigrateMySqlAzureDbForMySqlOfflineTaskOutput] + """ + + _validation = { + 'task_type': {'required': True}, + 'errors': {'readonly': True}, + 'state': {'readonly': True}, + 'commands': {'readonly': True}, + 'output': {'readonly': True}, + } + + _attribute_map = { + 'task_type': {'key': 'taskType', 'type': 'str'}, + 'errors': {'key': 'errors', 'type': '[ODataError]'}, + 'state': {'key': 'state', 'type': 'str'}, + 'commands': {'key': 'commands', 'type': '[CommandProperties]'}, + 'client_data': {'key': 'clientData', 'type': '{str}'}, + 'input': {'key': 'input', 'type': 'MigrateMySqlAzureDbForMySqlOfflineTaskInput'}, + 'output': {'key': 'output', 'type': '[MigrateMySqlAzureDbForMySqlOfflineTaskOutput]'}, + } + + def __init__( + self, + **kwargs + ): + super(MigrateMySqlAzureDbForMySqlOfflineTaskProperties, self).__init__(**kwargs) + self.task_type = 'Migrate.MySql.AzureDbForMySql' # type: str + self.input = kwargs.get('input', None) + self.output = None + + +class MigrateMySqlAzureDbForMySqlSyncDatabaseInput(msrest.serialization.Model): + """Database specific information for MySQL to Azure Database for MySQL migration task inputs. + + :param name: Name of the database. + :type name: str + :param target_database_name: Name of target database. Note: Target database will be truncated + before starting migration. + :type target_database_name: str + :param migration_setting: Migration settings which tune the migration behavior. + :type migration_setting: dict[str, str] + :param source_setting: Source settings to tune source endpoint migration behavior. + :type source_setting: dict[str, str] + :param target_setting: Target settings to tune target endpoint migration behavior. + :type target_setting: dict[str, str] + :param table_map: Mapping of source to target tables. + :type table_map: dict[str, str] + """ + + _attribute_map = { + 'name': {'key': 'name', 'type': 'str'}, + 'target_database_name': {'key': 'targetDatabaseName', 'type': 'str'}, + 'migration_setting': {'key': 'migrationSetting', 'type': '{str}'}, + 'source_setting': {'key': 'sourceSetting', 'type': '{str}'}, + 'target_setting': {'key': 'targetSetting', 'type': '{str}'}, + 'table_map': {'key': 'tableMap', 'type': '{str}'}, + } + + def __init__( + self, + **kwargs + ): + super(MigrateMySqlAzureDbForMySqlSyncDatabaseInput, self).__init__(**kwargs) + self.name = kwargs.get('name', None) + self.target_database_name = kwargs.get('target_database_name', None) + self.migration_setting = kwargs.get('migration_setting', None) + self.source_setting = kwargs.get('source_setting', None) + self.target_setting = kwargs.get('target_setting', None) + self.table_map = kwargs.get('table_map', None) + + +class MigrateMySqlAzureDbForMySqlSyncTaskInput(msrest.serialization.Model): + """Input for the task that migrates MySQL databases to Azure Database for MySQL for online migrations. + + All required parameters must be populated in order to send to Azure. + + :param source_connection_info: Required. Connection information for source MySQL. + :type source_connection_info: ~azure.mgmt.datamigration.models.MySqlConnectionInfo + :param target_connection_info: Required. Connection information for target Azure Database for + MySQL. + :type target_connection_info: ~azure.mgmt.datamigration.models.MySqlConnectionInfo + :param selected_databases: Required. Databases to migrate. + :type selected_databases: + list[~azure.mgmt.datamigration.models.MigrateMySqlAzureDbForMySqlSyncDatabaseInput] + """ + + _validation = { + 'source_connection_info': {'required': True}, + 'target_connection_info': {'required': True}, + 'selected_databases': {'required': True}, + } + + _attribute_map = { + 'source_connection_info': {'key': 'sourceConnectionInfo', 'type': 'MySqlConnectionInfo'}, + 'target_connection_info': {'key': 'targetConnectionInfo', 'type': 'MySqlConnectionInfo'}, + 'selected_databases': {'key': 'selectedDatabases', 'type': '[MigrateMySqlAzureDbForMySqlSyncDatabaseInput]'}, + } + + def __init__( + self, + **kwargs + ): + super(MigrateMySqlAzureDbForMySqlSyncTaskInput, self).__init__(**kwargs) + self.source_connection_info = kwargs['source_connection_info'] + self.target_connection_info = kwargs['target_connection_info'] + self.selected_databases = kwargs['selected_databases'] + + +class MigrateMySqlAzureDbForMySqlSyncTaskOutput(msrest.serialization.Model): + """Output for the task that migrates MySQL databases to Azure Database for MySQL for online migrations. + + You probably want to use the sub-classes and not this class directly. Known + sub-classes are: MigrateMySqlAzureDbForMySqlSyncTaskOutputDatabaseError, MigrateMySqlAzureDbForMySqlSyncTaskOutputDatabaseLevel, MigrateMySqlAzureDbForMySqlSyncTaskOutputError, MigrateMySqlAzureDbForMySqlSyncTaskOutputMigrationLevel, MigrateMySqlAzureDbForMySqlSyncTaskOutputTableLevel. + + Variables are only populated by the server, and will be ignored when sending a request. + + All required parameters must be populated in order to send to Azure. + + :ivar id: Result identifier. + :vartype id: str + :param result_type: Required. Result type.Constant filled by server. + :type result_type: str + """ + + _validation = { + 'id': {'readonly': True}, + 'result_type': {'required': True}, + } + + _attribute_map = { + 'id': {'key': 'id', 'type': 'str'}, + 'result_type': {'key': 'resultType', 'type': 'str'}, + } + + _subtype_map = { + 'result_type': {'DatabaseLevelErrorOutput': 'MigrateMySqlAzureDbForMySqlSyncTaskOutputDatabaseError', 'DatabaseLevelOutput': 'MigrateMySqlAzureDbForMySqlSyncTaskOutputDatabaseLevel', 'ErrorOutput': 'MigrateMySqlAzureDbForMySqlSyncTaskOutputError', 'MigrationLevelOutput': 'MigrateMySqlAzureDbForMySqlSyncTaskOutputMigrationLevel', 'TableLevelOutput': 'MigrateMySqlAzureDbForMySqlSyncTaskOutputTableLevel'} + } + + def __init__( + self, + **kwargs + ): + super(MigrateMySqlAzureDbForMySqlSyncTaskOutput, self).__init__(**kwargs) + self.id = None + self.result_type = None # type: Optional[str] + + +class MigrateMySqlAzureDbForMySqlSyncTaskOutputDatabaseError(MigrateMySqlAzureDbForMySqlSyncTaskOutput): + """MigrateMySqlAzureDbForMySqlSyncTaskOutputDatabaseError. + + Variables are only populated by the server, and will be ignored when sending a request. + + All required parameters must be populated in order to send to Azure. + + :ivar id: Result identifier. + :vartype id: str + :param result_type: Required. Result type.Constant filled by server. + :type result_type: str + :param error_message: Error message. + :type error_message: str + :param events: List of error events. + :type events: list[~azure.mgmt.datamigration.models.SyncMigrationDatabaseErrorEvent] + """ + + _validation = { + 'id': {'readonly': True}, + 'result_type': {'required': True}, + } + + _attribute_map = { + 'id': {'key': 'id', 'type': 'str'}, + 'result_type': {'key': 'resultType', 'type': 'str'}, + 'error_message': {'key': 'errorMessage', 'type': 'str'}, + 'events': {'key': 'events', 'type': '[SyncMigrationDatabaseErrorEvent]'}, + } + + def __init__( + self, + **kwargs + ): + super(MigrateMySqlAzureDbForMySqlSyncTaskOutputDatabaseError, self).__init__(**kwargs) + self.result_type = 'DatabaseLevelErrorOutput' # type: str + self.error_message = kwargs.get('error_message', None) + self.events = kwargs.get('events', None) + + +class MigrateMySqlAzureDbForMySqlSyncTaskOutputDatabaseLevel(MigrateMySqlAzureDbForMySqlSyncTaskOutput): + """MigrateMySqlAzureDbForMySqlSyncTaskOutputDatabaseLevel. + + Variables are only populated by the server, and will be ignored when sending a request. + + All required parameters must be populated in order to send to Azure. + + :ivar id: Result identifier. + :vartype id: str + :param result_type: Required. Result type.Constant filled by server. + :type result_type: str + :ivar database_name: Name of the database. + :vartype database_name: str + :ivar started_on: Migration start time. + :vartype started_on: ~datetime.datetime + :ivar ended_on: Migration end time. + :vartype ended_on: ~datetime.datetime + :ivar migration_state: Migration state that this database is in. Possible values include: + "UNDEFINED", "CONFIGURING", "INITIALIAZING", "STARTING", "RUNNING", "READY_TO_COMPLETE", + "COMPLETING", "COMPLETE", "CANCELLING", "CANCELLED", "FAILED", "VALIDATING", + "VALIDATION_COMPLETE", "VALIDATION_FAILED", "RESTORE_IN_PROGRESS", "RESTORE_COMPLETED", + "BACKUP_IN_PROGRESS", "BACKUP_COMPLETED". + :vartype migration_state: str or + ~azure.mgmt.datamigration.models.SyncDatabaseMigrationReportingState + :ivar incoming_changes: Number of incoming changes. + :vartype incoming_changes: long + :ivar applied_changes: Number of applied changes. + :vartype applied_changes: long + :ivar cdc_insert_counter: Number of cdc inserts. + :vartype cdc_insert_counter: long + :ivar cdc_delete_counter: Number of cdc deletes. + :vartype cdc_delete_counter: long + :ivar cdc_update_counter: Number of cdc updates. + :vartype cdc_update_counter: long + :ivar full_load_completed_tables: Number of tables completed in full load. + :vartype full_load_completed_tables: long + :ivar full_load_loading_tables: Number of tables loading in full load. + :vartype full_load_loading_tables: long + :ivar full_load_queued_tables: Number of tables queued in full load. + :vartype full_load_queued_tables: long + :ivar full_load_errored_tables: Number of tables errored in full load. + :vartype full_load_errored_tables: long + :ivar initialization_completed: Indicates if initial load (full load) has been completed. + :vartype initialization_completed: bool + :ivar latency: CDC apply latency. + :vartype latency: long + """ + + _validation = { + 'id': {'readonly': True}, + 'result_type': {'required': True}, + 'database_name': {'readonly': True}, + 'started_on': {'readonly': True}, + 'ended_on': {'readonly': True}, + 'migration_state': {'readonly': True}, + 'incoming_changes': {'readonly': True}, + 'applied_changes': {'readonly': True}, + 'cdc_insert_counter': {'readonly': True}, + 'cdc_delete_counter': {'readonly': True}, + 'cdc_update_counter': {'readonly': True}, + 'full_load_completed_tables': {'readonly': True}, + 'full_load_loading_tables': {'readonly': True}, + 'full_load_queued_tables': {'readonly': True}, + 'full_load_errored_tables': {'readonly': True}, + 'initialization_completed': {'readonly': True}, + 'latency': {'readonly': True}, + } + + _attribute_map = { + 'id': {'key': 'id', 'type': 'str'}, + 'result_type': {'key': 'resultType', 'type': 'str'}, + 'database_name': {'key': 'databaseName', 'type': 'str'}, + 'started_on': {'key': 'startedOn', 'type': 'iso-8601'}, + 'ended_on': {'key': 'endedOn', 'type': 'iso-8601'}, + 'migration_state': {'key': 'migrationState', 'type': 'str'}, + 'incoming_changes': {'key': 'incomingChanges', 'type': 'long'}, + 'applied_changes': {'key': 'appliedChanges', 'type': 'long'}, + 'cdc_insert_counter': {'key': 'cdcInsertCounter', 'type': 'long'}, + 'cdc_delete_counter': {'key': 'cdcDeleteCounter', 'type': 'long'}, + 'cdc_update_counter': {'key': 'cdcUpdateCounter', 'type': 'long'}, + 'full_load_completed_tables': {'key': 'fullLoadCompletedTables', 'type': 'long'}, + 'full_load_loading_tables': {'key': 'fullLoadLoadingTables', 'type': 'long'}, + 'full_load_queued_tables': {'key': 'fullLoadQueuedTables', 'type': 'long'}, + 'full_load_errored_tables': {'key': 'fullLoadErroredTables', 'type': 'long'}, + 'initialization_completed': {'key': 'initializationCompleted', 'type': 'bool'}, + 'latency': {'key': 'latency', 'type': 'long'}, + } + + def __init__( + self, + **kwargs + ): + super(MigrateMySqlAzureDbForMySqlSyncTaskOutputDatabaseLevel, self).__init__(**kwargs) + self.result_type = 'DatabaseLevelOutput' # type: str + self.database_name = None + self.started_on = None + self.ended_on = None + self.migration_state = None + self.incoming_changes = None + self.applied_changes = None + self.cdc_insert_counter = None + self.cdc_delete_counter = None + self.cdc_update_counter = None + self.full_load_completed_tables = None + self.full_load_loading_tables = None + self.full_load_queued_tables = None + self.full_load_errored_tables = None + self.initialization_completed = None + self.latency = None + + +class MigrateMySqlAzureDbForMySqlSyncTaskOutputError(MigrateMySqlAzureDbForMySqlSyncTaskOutput): + """MigrateMySqlAzureDbForMySqlSyncTaskOutputError. + + Variables are only populated by the server, and will be ignored when sending a request. + + All required parameters must be populated in order to send to Azure. + + :ivar id: Result identifier. + :vartype id: str + :param result_type: Required. Result type.Constant filled by server. + :type result_type: str + :ivar error: Migration error. + :vartype error: ~azure.mgmt.datamigration.models.ReportableException + """ + + _validation = { + 'id': {'readonly': True}, + 'result_type': {'required': True}, + 'error': {'readonly': True}, + } + + _attribute_map = { + 'id': {'key': 'id', 'type': 'str'}, + 'result_type': {'key': 'resultType', 'type': 'str'}, + 'error': {'key': 'error', 'type': 'ReportableException'}, + } + + def __init__( + self, + **kwargs + ): + super(MigrateMySqlAzureDbForMySqlSyncTaskOutputError, self).__init__(**kwargs) + self.result_type = 'ErrorOutput' # type: str + self.error = None + + +class MigrateMySqlAzureDbForMySqlSyncTaskOutputMigrationLevel(MigrateMySqlAzureDbForMySqlSyncTaskOutput): + """MigrateMySqlAzureDbForMySqlSyncTaskOutputMigrationLevel. + + Variables are only populated by the server, and will be ignored when sending a request. + + All required parameters must be populated in order to send to Azure. + + :ivar id: Result identifier. + :vartype id: str + :param result_type: Required. Result type.Constant filled by server. + :type result_type: str + :ivar started_on: Migration start time. + :vartype started_on: ~datetime.datetime + :ivar ended_on: Migration end time. + :vartype ended_on: ~datetime.datetime + :ivar source_server_version: Source server version. + :vartype source_server_version: str + :ivar source_server: Source server name. + :vartype source_server: str + :ivar target_server_version: Target server version. + :vartype target_server_version: str + :ivar target_server: Target server name. + :vartype target_server: str + """ + + _validation = { + 'id': {'readonly': True}, + 'result_type': {'required': True}, + 'started_on': {'readonly': True}, + 'ended_on': {'readonly': True}, + 'source_server_version': {'readonly': True}, + 'source_server': {'readonly': True}, + 'target_server_version': {'readonly': True}, + 'target_server': {'readonly': True}, + } + + _attribute_map = { + 'id': {'key': 'id', 'type': 'str'}, + 'result_type': {'key': 'resultType', 'type': 'str'}, + 'started_on': {'key': 'startedOn', 'type': 'iso-8601'}, + 'ended_on': {'key': 'endedOn', 'type': 'iso-8601'}, + 'source_server_version': {'key': 'sourceServerVersion', 'type': 'str'}, + 'source_server': {'key': 'sourceServer', 'type': 'str'}, + 'target_server_version': {'key': 'targetServerVersion', 'type': 'str'}, + 'target_server': {'key': 'targetServer', 'type': 'str'}, + } + + def __init__( + self, + **kwargs + ): + super(MigrateMySqlAzureDbForMySqlSyncTaskOutputMigrationLevel, self).__init__(**kwargs) + self.result_type = 'MigrationLevelOutput' # type: str + self.started_on = None + self.ended_on = None + self.source_server_version = None + self.source_server = None + self.target_server_version = None + self.target_server = None + + +class MigrateMySqlAzureDbForMySqlSyncTaskOutputTableLevel(MigrateMySqlAzureDbForMySqlSyncTaskOutput): + """MigrateMySqlAzureDbForMySqlSyncTaskOutputTableLevel. + + Variables are only populated by the server, and will be ignored when sending a request. + + All required parameters must be populated in order to send to Azure. + + :ivar id: Result identifier. + :vartype id: str + :param result_type: Required. Result type.Constant filled by server. + :type result_type: str + :ivar table_name: Name of the table. + :vartype table_name: str + :ivar database_name: Name of the database. + :vartype database_name: str + :ivar cdc_insert_counter: Number of applied inserts. + :vartype cdc_insert_counter: str + :ivar cdc_update_counter: Number of applied updates. + :vartype cdc_update_counter: str + :ivar cdc_delete_counter: Number of applied deletes. + :vartype cdc_delete_counter: str + :ivar full_load_est_finish_time: Estimate to finish full load. + :vartype full_load_est_finish_time: ~datetime.datetime + :ivar full_load_started_on: Full load start time. + :vartype full_load_started_on: ~datetime.datetime + :ivar full_load_ended_on: Full load end time. + :vartype full_load_ended_on: ~datetime.datetime + :ivar full_load_total_rows: Number of rows applied in full load. + :vartype full_load_total_rows: long + :ivar state: Current state of the table migration. Possible values include: "BEFORE_LOAD", + "FULL_LOAD", "COMPLETED", "CANCELED", "ERROR", "FAILED". + :vartype state: str or ~azure.mgmt.datamigration.models.SyncTableMigrationState + :ivar total_changes_applied: Total number of applied changes. + :vartype total_changes_applied: long + :ivar data_errors_counter: Number of data errors occurred. + :vartype data_errors_counter: long + :ivar last_modified_time: Last modified time on target. + :vartype last_modified_time: ~datetime.datetime + """ + + _validation = { + 'id': {'readonly': True}, + 'result_type': {'required': True}, + 'table_name': {'readonly': True}, + 'database_name': {'readonly': True}, + 'cdc_insert_counter': {'readonly': True}, + 'cdc_update_counter': {'readonly': True}, + 'cdc_delete_counter': {'readonly': True}, + 'full_load_est_finish_time': {'readonly': True}, + 'full_load_started_on': {'readonly': True}, + 'full_load_ended_on': {'readonly': True}, + 'full_load_total_rows': {'readonly': True}, + 'state': {'readonly': True}, + 'total_changes_applied': {'readonly': True}, + 'data_errors_counter': {'readonly': True}, + 'last_modified_time': {'readonly': True}, + } + + _attribute_map = { + 'id': {'key': 'id', 'type': 'str'}, + 'result_type': {'key': 'resultType', 'type': 'str'}, + 'table_name': {'key': 'tableName', 'type': 'str'}, + 'database_name': {'key': 'databaseName', 'type': 'str'}, + 'cdc_insert_counter': {'key': 'cdcInsertCounter', 'type': 'str'}, + 'cdc_update_counter': {'key': 'cdcUpdateCounter', 'type': 'str'}, + 'cdc_delete_counter': {'key': 'cdcDeleteCounter', 'type': 'str'}, + 'full_load_est_finish_time': {'key': 'fullLoadEstFinishTime', 'type': 'iso-8601'}, + 'full_load_started_on': {'key': 'fullLoadStartedOn', 'type': 'iso-8601'}, + 'full_load_ended_on': {'key': 'fullLoadEndedOn', 'type': 'iso-8601'}, + 'full_load_total_rows': {'key': 'fullLoadTotalRows', 'type': 'long'}, + 'state': {'key': 'state', 'type': 'str'}, + 'total_changes_applied': {'key': 'totalChangesApplied', 'type': 'long'}, + 'data_errors_counter': {'key': 'dataErrorsCounter', 'type': 'long'}, + 'last_modified_time': {'key': 'lastModifiedTime', 'type': 'iso-8601'}, + } + + def __init__( + self, + **kwargs + ): + super(MigrateMySqlAzureDbForMySqlSyncTaskOutputTableLevel, self).__init__(**kwargs) + self.result_type = 'TableLevelOutput' # type: str + self.table_name = None + self.database_name = None + self.cdc_insert_counter = None + self.cdc_update_counter = None + self.cdc_delete_counter = None + self.full_load_est_finish_time = None + self.full_load_started_on = None + self.full_load_ended_on = None + self.full_load_total_rows = None + self.state = None + self.total_changes_applied = None + self.data_errors_counter = None + self.last_modified_time = None + + +class MigrateMySqlAzureDbForMySqlSyncTaskProperties(ProjectTaskProperties): + """Properties for the task that migrates MySQL databases to Azure Database for MySQL for online migrations. + + Variables are only populated by the server, and will be ignored when sending a request. + + All required parameters must be populated in order to send to Azure. + + :param task_type: Required. Task type.Constant filled by server. Possible values include: + "Connect.MongoDb", "ConnectToSource.SqlServer", "ConnectToSource.SqlServer.Sync", + "ConnectToSource.PostgreSql.Sync", "ConnectToSource.MySql", "ConnectToSource.Oracle.Sync", + "ConnectToTarget.SqlDb", "ConnectToTarget.SqlDb.Sync", + "ConnectToTarget.AzureDbForPostgreSql.Sync", + "ConnectToTarget.Oracle.AzureDbForPostgreSql.Sync", "ConnectToTarget.AzureSqlDbMI", + "ConnectToTarget.AzureSqlDbMI.Sync.LRS", "ConnectToTarget.AzureDbForMySql", + "GetUserTables.Sql", "GetUserTables.AzureSqlDb.Sync", "GetUserTablesOracle", + "GetUserTablesPostgreSql", "GetUserTablesMySql", "Migrate.MongoDb", + "Migrate.SqlServer.AzureSqlDbMI", "Migrate.SqlServer.AzureSqlDbMI.Sync.LRS", + "Migrate.SqlServer.SqlDb", "Migrate.SqlServer.AzureSqlDb.Sync", + "Migrate.MySql.AzureDbForMySql.Sync", "Migrate.MySql.AzureDbForMySql", + "Migrate.PostgreSql.AzureDbForPostgreSql.SyncV2", "Migrate.Oracle.AzureDbForPostgreSql.Sync", + "ValidateMigrationInput.SqlServer.SqlDb.Sync", "ValidateMigrationInput.SqlServer.AzureSqlDbMI", + "ValidateMigrationInput.SqlServer.AzureSqlDbMI.Sync.LRS", "Validate.MongoDb", + "Validate.Oracle.AzureDbPostgreSql.Sync", "GetTDECertificates.Sql", "Migrate.Ssis", + "Service.Check.OCI", "Service.Upload.OCI", "Service.Install.OCI", + "MigrateSchemaSqlServerSqlDb". + :type task_type: str or ~azure.mgmt.datamigration.models.TaskType + :ivar errors: Array of errors. This is ignored if submitted. + :vartype errors: list[~azure.mgmt.datamigration.models.ODataError] + :ivar state: The state of the task. This is ignored if submitted. Possible values include: + "Unknown", "Queued", "Running", "Canceled", "Succeeded", "Failed", "FailedInputValidation", + "Faulted". + :vartype state: str or ~azure.mgmt.datamigration.models.TaskState + :ivar commands: Array of command properties. + :vartype commands: list[~azure.mgmt.datamigration.models.CommandProperties] + :param client_data: Key value pairs of client data to attach meta data information to task. + :type client_data: dict[str, str] + :param input: Task input. + :type input: ~azure.mgmt.datamigration.models.MigrateMySqlAzureDbForMySqlSyncTaskInput + :ivar output: Task output. This is ignored if submitted. + :vartype output: + list[~azure.mgmt.datamigration.models.MigrateMySqlAzureDbForMySqlSyncTaskOutput] + """ + + _validation = { + 'task_type': {'required': True}, + 'errors': {'readonly': True}, + 'state': {'readonly': True}, + 'commands': {'readonly': True}, + 'output': {'readonly': True}, + } + + _attribute_map = { + 'task_type': {'key': 'taskType', 'type': 'str'}, + 'errors': {'key': 'errors', 'type': '[ODataError]'}, + 'state': {'key': 'state', 'type': 'str'}, + 'commands': {'key': 'commands', 'type': '[CommandProperties]'}, + 'client_data': {'key': 'clientData', 'type': '{str}'}, + 'input': {'key': 'input', 'type': 'MigrateMySqlAzureDbForMySqlSyncTaskInput'}, + 'output': {'key': 'output', 'type': '[MigrateMySqlAzureDbForMySqlSyncTaskOutput]'}, + } + + def __init__( + self, + **kwargs + ): + super(MigrateMySqlAzureDbForMySqlSyncTaskProperties, self).__init__(**kwargs) + self.task_type = 'Migrate.MySql.AzureDbForMySql.Sync' # type: str + self.input = kwargs.get('input', None) + self.output = None + + +class MigrateOracleAzureDbForPostgreSqlSyncTaskProperties(ProjectTaskProperties): + """Properties for the task that migrates Oracle to Azure Database for PostgreSQL for online migrations. + + Variables are only populated by the server, and will be ignored when sending a request. + + All required parameters must be populated in order to send to Azure. + + :param task_type: Required. Task type.Constant filled by server. Possible values include: + "Connect.MongoDb", "ConnectToSource.SqlServer", "ConnectToSource.SqlServer.Sync", + "ConnectToSource.PostgreSql.Sync", "ConnectToSource.MySql", "ConnectToSource.Oracle.Sync", + "ConnectToTarget.SqlDb", "ConnectToTarget.SqlDb.Sync", + "ConnectToTarget.AzureDbForPostgreSql.Sync", + "ConnectToTarget.Oracle.AzureDbForPostgreSql.Sync", "ConnectToTarget.AzureSqlDbMI", + "ConnectToTarget.AzureSqlDbMI.Sync.LRS", "ConnectToTarget.AzureDbForMySql", + "GetUserTables.Sql", "GetUserTables.AzureSqlDb.Sync", "GetUserTablesOracle", + "GetUserTablesPostgreSql", "GetUserTablesMySql", "Migrate.MongoDb", + "Migrate.SqlServer.AzureSqlDbMI", "Migrate.SqlServer.AzureSqlDbMI.Sync.LRS", + "Migrate.SqlServer.SqlDb", "Migrate.SqlServer.AzureSqlDb.Sync", + "Migrate.MySql.AzureDbForMySql.Sync", "Migrate.MySql.AzureDbForMySql", + "Migrate.PostgreSql.AzureDbForPostgreSql.SyncV2", "Migrate.Oracle.AzureDbForPostgreSql.Sync", + "ValidateMigrationInput.SqlServer.SqlDb.Sync", "ValidateMigrationInput.SqlServer.AzureSqlDbMI", + "ValidateMigrationInput.SqlServer.AzureSqlDbMI.Sync.LRS", "Validate.MongoDb", + "Validate.Oracle.AzureDbPostgreSql.Sync", "GetTDECertificates.Sql", "Migrate.Ssis", + "Service.Check.OCI", "Service.Upload.OCI", "Service.Install.OCI", + "MigrateSchemaSqlServerSqlDb". + :type task_type: str or ~azure.mgmt.datamigration.models.TaskType + :ivar errors: Array of errors. This is ignored if submitted. + :vartype errors: list[~azure.mgmt.datamigration.models.ODataError] + :ivar state: The state of the task. This is ignored if submitted. Possible values include: + "Unknown", "Queued", "Running", "Canceled", "Succeeded", "Failed", "FailedInputValidation", + "Faulted". + :vartype state: str or ~azure.mgmt.datamigration.models.TaskState + :ivar commands: Array of command properties. + :vartype commands: list[~azure.mgmt.datamigration.models.CommandProperties] + :param client_data: Key value pairs of client data to attach meta data information to task. + :type client_data: dict[str, str] + :param input: Task input. + :type input: ~azure.mgmt.datamigration.models.MigrateOracleAzureDbPostgreSqlSyncTaskInput + :ivar output: Task output. This is ignored if submitted. + :vartype output: + list[~azure.mgmt.datamigration.models.MigrateOracleAzureDbPostgreSqlSyncTaskOutput] + """ + + _validation = { + 'task_type': {'required': True}, + 'errors': {'readonly': True}, + 'state': {'readonly': True}, + 'commands': {'readonly': True}, + 'output': {'readonly': True}, + } + + _attribute_map = { + 'task_type': {'key': 'taskType', 'type': 'str'}, + 'errors': {'key': 'errors', 'type': '[ODataError]'}, + 'state': {'key': 'state', 'type': 'str'}, + 'commands': {'key': 'commands', 'type': '[CommandProperties]'}, + 'client_data': {'key': 'clientData', 'type': '{str}'}, + 'input': {'key': 'input', 'type': 'MigrateOracleAzureDbPostgreSqlSyncTaskInput'}, + 'output': {'key': 'output', 'type': '[MigrateOracleAzureDbPostgreSqlSyncTaskOutput]'}, + } + + def __init__( + self, + **kwargs + ): + super(MigrateOracleAzureDbForPostgreSqlSyncTaskProperties, self).__init__(**kwargs) + self.task_type = 'Migrate.Oracle.AzureDbForPostgreSql.Sync' # type: str + self.input = kwargs.get('input', None) + self.output = None + + +class MigrateOracleAzureDbPostgreSqlSyncDatabaseInput(msrest.serialization.Model): + """Database specific information for Oracle to Azure Database for PostgreSQL migration task inputs. + + :param case_manipulation: How to handle object name casing: either Preserve or ToLower. + :type case_manipulation: str + :param name: Name of the migration pipeline. + :type name: str + :param schema_name: Name of the source schema. + :type schema_name: str + :param table_map: Mapping of source to target tables. + :type table_map: dict[str, str] + :param target_database_name: Name of target database. Note: Target database will be truncated + before starting migration. + :type target_database_name: str + :param migration_setting: Migration settings which tune the migration behavior. + :type migration_setting: dict[str, str] + :param source_setting: Source settings to tune source endpoint migration behavior. + :type source_setting: dict[str, str] + :param target_setting: Target settings to tune target endpoint migration behavior. + :type target_setting: dict[str, str] + """ + + _attribute_map = { + 'case_manipulation': {'key': 'caseManipulation', 'type': 'str'}, + 'name': {'key': 'name', 'type': 'str'}, + 'schema_name': {'key': 'schemaName', 'type': 'str'}, + 'table_map': {'key': 'tableMap', 'type': '{str}'}, + 'target_database_name': {'key': 'targetDatabaseName', 'type': 'str'}, + 'migration_setting': {'key': 'migrationSetting', 'type': '{str}'}, + 'source_setting': {'key': 'sourceSetting', 'type': '{str}'}, + 'target_setting': {'key': 'targetSetting', 'type': '{str}'}, + } + + def __init__( + self, + **kwargs + ): + super(MigrateOracleAzureDbPostgreSqlSyncDatabaseInput, self).__init__(**kwargs) + self.case_manipulation = kwargs.get('case_manipulation', None) + self.name = kwargs.get('name', None) + self.schema_name = kwargs.get('schema_name', None) + self.table_map = kwargs.get('table_map', None) + self.target_database_name = kwargs.get('target_database_name', None) + self.migration_setting = kwargs.get('migration_setting', None) + self.source_setting = kwargs.get('source_setting', None) + self.target_setting = kwargs.get('target_setting', None) + + +class MigrateOracleAzureDbPostgreSqlSyncTaskInput(msrest.serialization.Model): + """Input for the task that migrates Oracle databases to Azure Database for PostgreSQL for online migrations. + + All required parameters must be populated in order to send to Azure. + + :param selected_databases: Required. Databases to migrate. + :type selected_databases: + list[~azure.mgmt.datamigration.models.MigrateOracleAzureDbPostgreSqlSyncDatabaseInput] + :param target_connection_info: Required. Connection information for target Azure Database for + PostgreSQL. + :type target_connection_info: ~azure.mgmt.datamigration.models.PostgreSqlConnectionInfo + :param source_connection_info: Required. Connection information for source Oracle. + :type source_connection_info: ~azure.mgmt.datamigration.models.OracleConnectionInfo + """ + + _validation = { + 'selected_databases': {'required': True}, + 'target_connection_info': {'required': True}, + 'source_connection_info': {'required': True}, + } + + _attribute_map = { + 'selected_databases': {'key': 'selectedDatabases', 'type': '[MigrateOracleAzureDbPostgreSqlSyncDatabaseInput]'}, + 'target_connection_info': {'key': 'targetConnectionInfo', 'type': 'PostgreSqlConnectionInfo'}, + 'source_connection_info': {'key': 'sourceConnectionInfo', 'type': 'OracleConnectionInfo'}, + } + + def __init__( + self, + **kwargs + ): + super(MigrateOracleAzureDbPostgreSqlSyncTaskInput, self).__init__(**kwargs) + self.selected_databases = kwargs['selected_databases'] + self.target_connection_info = kwargs['target_connection_info'] + self.source_connection_info = kwargs['source_connection_info'] + + +class MigrateOracleAzureDbPostgreSqlSyncTaskOutput(msrest.serialization.Model): + """Output for the task that migrates Oracle databases to Azure Database for PostgreSQL for online migrations. + + You probably want to use the sub-classes and not this class directly. Known + sub-classes are: MigrateOracleAzureDbPostgreSqlSyncTaskOutputDatabaseError, MigrateOracleAzureDbPostgreSqlSyncTaskOutputDatabaseLevel, MigrateOracleAzureDbPostgreSqlSyncTaskOutputError, MigrateOracleAzureDbPostgreSqlSyncTaskOutputMigrationLevel, MigrateOracleAzureDbPostgreSqlSyncTaskOutputTableLevel. + + Variables are only populated by the server, and will be ignored when sending a request. + + All required parameters must be populated in order to send to Azure. + + :ivar id: Result identifier. + :vartype id: str + :param result_type: Required. Result type.Constant filled by server. + :type result_type: str + """ + + _validation = { + 'id': {'readonly': True}, + 'result_type': {'required': True}, + } + + _attribute_map = { + 'id': {'key': 'id', 'type': 'str'}, + 'result_type': {'key': 'resultType', 'type': 'str'}, + } + + _subtype_map = { + 'result_type': {'DatabaseLevelErrorOutput': 'MigrateOracleAzureDbPostgreSqlSyncTaskOutputDatabaseError', 'DatabaseLevelOutput': 'MigrateOracleAzureDbPostgreSqlSyncTaskOutputDatabaseLevel', 'ErrorOutput': 'MigrateOracleAzureDbPostgreSqlSyncTaskOutputError', 'MigrationLevelOutput': 'MigrateOracleAzureDbPostgreSqlSyncTaskOutputMigrationLevel', 'TableLevelOutput': 'MigrateOracleAzureDbPostgreSqlSyncTaskOutputTableLevel'} + } + + def __init__( + self, + **kwargs + ): + super(MigrateOracleAzureDbPostgreSqlSyncTaskOutput, self).__init__(**kwargs) + self.id = None + self.result_type = None # type: Optional[str] + + +class MigrateOracleAzureDbPostgreSqlSyncTaskOutputDatabaseError(MigrateOracleAzureDbPostgreSqlSyncTaskOutput): + """MigrateOracleAzureDbPostgreSqlSyncTaskOutputDatabaseError. + + Variables are only populated by the server, and will be ignored when sending a request. + + All required parameters must be populated in order to send to Azure. + + :ivar id: Result identifier. + :vartype id: str + :param result_type: Required. Result type.Constant filled by server. + :type result_type: str + :param error_message: Error message. + :type error_message: str + :param events: List of error events. + :type events: list[~azure.mgmt.datamigration.models.SyncMigrationDatabaseErrorEvent] + """ + + _validation = { + 'id': {'readonly': True}, + 'result_type': {'required': True}, + } + + _attribute_map = { + 'id': {'key': 'id', 'type': 'str'}, + 'result_type': {'key': 'resultType', 'type': 'str'}, + 'error_message': {'key': 'errorMessage', 'type': 'str'}, + 'events': {'key': 'events', 'type': '[SyncMigrationDatabaseErrorEvent]'}, + } + + def __init__( + self, + **kwargs + ): + super(MigrateOracleAzureDbPostgreSqlSyncTaskOutputDatabaseError, self).__init__(**kwargs) + self.result_type = 'DatabaseLevelErrorOutput' # type: str + self.error_message = kwargs.get('error_message', None) + self.events = kwargs.get('events', None) + + +class MigrateOracleAzureDbPostgreSqlSyncTaskOutputDatabaseLevel(MigrateOracleAzureDbPostgreSqlSyncTaskOutput): + """MigrateOracleAzureDbPostgreSqlSyncTaskOutputDatabaseLevel. + + Variables are only populated by the server, and will be ignored when sending a request. + + All required parameters must be populated in order to send to Azure. + + :ivar id: Result identifier. + :vartype id: str + :param result_type: Required. Result type.Constant filled by server. + :type result_type: str + :ivar database_name: Name of the database. + :vartype database_name: str + :ivar started_on: Migration start time. + :vartype started_on: ~datetime.datetime + :ivar ended_on: Migration end time. + :vartype ended_on: ~datetime.datetime + :ivar migration_state: Migration state that this database is in. Possible values include: + "UNDEFINED", "CONFIGURING", "INITIALIAZING", "STARTING", "RUNNING", "READY_TO_COMPLETE", + "COMPLETING", "COMPLETE", "CANCELLING", "CANCELLED", "FAILED", "VALIDATING", + "VALIDATION_COMPLETE", "VALIDATION_FAILED", "RESTORE_IN_PROGRESS", "RESTORE_COMPLETED", + "BACKUP_IN_PROGRESS", "BACKUP_COMPLETED". + :vartype migration_state: str or + ~azure.mgmt.datamigration.models.SyncDatabaseMigrationReportingState + :ivar incoming_changes: Number of incoming changes. + :vartype incoming_changes: long + :ivar applied_changes: Number of applied changes. + :vartype applied_changes: long + :ivar cdc_insert_counter: Number of cdc inserts. + :vartype cdc_insert_counter: long + :ivar cdc_delete_counter: Number of cdc deletes. + :vartype cdc_delete_counter: long + :ivar cdc_update_counter: Number of cdc updates. + :vartype cdc_update_counter: long + :ivar full_load_completed_tables: Number of tables completed in full load. + :vartype full_load_completed_tables: long + :ivar full_load_loading_tables: Number of tables loading in full load. + :vartype full_load_loading_tables: long + :ivar full_load_queued_tables: Number of tables queued in full load. + :vartype full_load_queued_tables: long + :ivar full_load_errored_tables: Number of tables errored in full load. + :vartype full_load_errored_tables: long + :ivar initialization_completed: Indicates if initial load (full load) has been completed. + :vartype initialization_completed: bool + :ivar latency: CDC apply latency. + :vartype latency: long + """ + + _validation = { + 'id': {'readonly': True}, + 'result_type': {'required': True}, + 'database_name': {'readonly': True}, + 'started_on': {'readonly': True}, + 'ended_on': {'readonly': True}, + 'migration_state': {'readonly': True}, + 'incoming_changes': {'readonly': True}, + 'applied_changes': {'readonly': True}, + 'cdc_insert_counter': {'readonly': True}, + 'cdc_delete_counter': {'readonly': True}, + 'cdc_update_counter': {'readonly': True}, + 'full_load_completed_tables': {'readonly': True}, + 'full_load_loading_tables': {'readonly': True}, + 'full_load_queued_tables': {'readonly': True}, + 'full_load_errored_tables': {'readonly': True}, + 'initialization_completed': {'readonly': True}, + 'latency': {'readonly': True}, + } + + _attribute_map = { + 'id': {'key': 'id', 'type': 'str'}, + 'result_type': {'key': 'resultType', 'type': 'str'}, + 'database_name': {'key': 'databaseName', 'type': 'str'}, + 'started_on': {'key': 'startedOn', 'type': 'iso-8601'}, + 'ended_on': {'key': 'endedOn', 'type': 'iso-8601'}, + 'migration_state': {'key': 'migrationState', 'type': 'str'}, + 'incoming_changes': {'key': 'incomingChanges', 'type': 'long'}, + 'applied_changes': {'key': 'appliedChanges', 'type': 'long'}, + 'cdc_insert_counter': {'key': 'cdcInsertCounter', 'type': 'long'}, + 'cdc_delete_counter': {'key': 'cdcDeleteCounter', 'type': 'long'}, + 'cdc_update_counter': {'key': 'cdcUpdateCounter', 'type': 'long'}, + 'full_load_completed_tables': {'key': 'fullLoadCompletedTables', 'type': 'long'}, + 'full_load_loading_tables': {'key': 'fullLoadLoadingTables', 'type': 'long'}, + 'full_load_queued_tables': {'key': 'fullLoadQueuedTables', 'type': 'long'}, + 'full_load_errored_tables': {'key': 'fullLoadErroredTables', 'type': 'long'}, + 'initialization_completed': {'key': 'initializationCompleted', 'type': 'bool'}, + 'latency': {'key': 'latency', 'type': 'long'}, + } + + def __init__( + self, + **kwargs + ): + super(MigrateOracleAzureDbPostgreSqlSyncTaskOutputDatabaseLevel, self).__init__(**kwargs) + self.result_type = 'DatabaseLevelOutput' # type: str + self.database_name = None + self.started_on = None + self.ended_on = None + self.migration_state = None + self.incoming_changes = None + self.applied_changes = None + self.cdc_insert_counter = None + self.cdc_delete_counter = None + self.cdc_update_counter = None + self.full_load_completed_tables = None + self.full_load_loading_tables = None + self.full_load_queued_tables = None + self.full_load_errored_tables = None + self.initialization_completed = None + self.latency = None + + +class MigrateOracleAzureDbPostgreSqlSyncTaskOutputError(MigrateOracleAzureDbPostgreSqlSyncTaskOutput): + """MigrateOracleAzureDbPostgreSqlSyncTaskOutputError. + + Variables are only populated by the server, and will be ignored when sending a request. + + All required parameters must be populated in order to send to Azure. + + :ivar id: Result identifier. + :vartype id: str + :param result_type: Required. Result type.Constant filled by server. + :type result_type: str + :ivar error: Migration error. + :vartype error: ~azure.mgmt.datamigration.models.ReportableException + """ + + _validation = { + 'id': {'readonly': True}, + 'result_type': {'required': True}, + 'error': {'readonly': True}, + } + + _attribute_map = { + 'id': {'key': 'id', 'type': 'str'}, + 'result_type': {'key': 'resultType', 'type': 'str'}, + 'error': {'key': 'error', 'type': 'ReportableException'}, + } + + def __init__( + self, + **kwargs + ): + super(MigrateOracleAzureDbPostgreSqlSyncTaskOutputError, self).__init__(**kwargs) + self.result_type = 'ErrorOutput' # type: str + self.error = None + + +class MigrateOracleAzureDbPostgreSqlSyncTaskOutputMigrationLevel(MigrateOracleAzureDbPostgreSqlSyncTaskOutput): + """MigrateOracleAzureDbPostgreSqlSyncTaskOutputMigrationLevel. + + Variables are only populated by the server, and will be ignored when sending a request. + + All required parameters must be populated in order to send to Azure. + + :ivar id: Result identifier. + :vartype id: str + :param result_type: Required. Result type.Constant filled by server. + :type result_type: str + :ivar started_on: Migration start time. + :vartype started_on: ~datetime.datetime + :ivar ended_on: Migration end time. + :vartype ended_on: ~datetime.datetime + :ivar source_server_version: Source server version. + :vartype source_server_version: str + :ivar source_server: Source server name. + :vartype source_server: str + :ivar target_server_version: Target server version. + :vartype target_server_version: str + :ivar target_server: Target server name. + :vartype target_server: str + """ + + _validation = { + 'id': {'readonly': True}, + 'result_type': {'required': True}, + 'started_on': {'readonly': True}, + 'ended_on': {'readonly': True}, + 'source_server_version': {'readonly': True}, + 'source_server': {'readonly': True}, + 'target_server_version': {'readonly': True}, + 'target_server': {'readonly': True}, + } + + _attribute_map = { + 'id': {'key': 'id', 'type': 'str'}, + 'result_type': {'key': 'resultType', 'type': 'str'}, + 'started_on': {'key': 'startedOn', 'type': 'iso-8601'}, + 'ended_on': {'key': 'endedOn', 'type': 'iso-8601'}, + 'source_server_version': {'key': 'sourceServerVersion', 'type': 'str'}, + 'source_server': {'key': 'sourceServer', 'type': 'str'}, + 'target_server_version': {'key': 'targetServerVersion', 'type': 'str'}, + 'target_server': {'key': 'targetServer', 'type': 'str'}, + } + + def __init__( + self, + **kwargs + ): + super(MigrateOracleAzureDbPostgreSqlSyncTaskOutputMigrationLevel, self).__init__(**kwargs) + self.result_type = 'MigrationLevelOutput' # type: str + self.started_on = None + self.ended_on = None + self.source_server_version = None + self.source_server = None + self.target_server_version = None + self.target_server = None + + +class MigrateOracleAzureDbPostgreSqlSyncTaskOutputTableLevel(MigrateOracleAzureDbPostgreSqlSyncTaskOutput): + """MigrateOracleAzureDbPostgreSqlSyncTaskOutputTableLevel. + + Variables are only populated by the server, and will be ignored when sending a request. + + All required parameters must be populated in order to send to Azure. + + :ivar id: Result identifier. + :vartype id: str + :param result_type: Required. Result type.Constant filled by server. + :type result_type: str + :ivar table_name: Name of the table. + :vartype table_name: str + :ivar database_name: Name of the database. + :vartype database_name: str + :ivar cdc_insert_counter: Number of applied inserts. + :vartype cdc_insert_counter: long + :ivar cdc_update_counter: Number of applied updates. + :vartype cdc_update_counter: long + :ivar cdc_delete_counter: Number of applied deletes. + :vartype cdc_delete_counter: long + :ivar full_load_est_finish_time: Estimate to finish full load. + :vartype full_load_est_finish_time: ~datetime.datetime + :ivar full_load_started_on: Full load start time. + :vartype full_load_started_on: ~datetime.datetime + :ivar full_load_ended_on: Full load end time. + :vartype full_load_ended_on: ~datetime.datetime + :ivar full_load_total_rows: Number of rows applied in full load. + :vartype full_load_total_rows: long + :ivar state: Current state of the table migration. Possible values include: "BEFORE_LOAD", + "FULL_LOAD", "COMPLETED", "CANCELED", "ERROR", "FAILED". + :vartype state: str or ~azure.mgmt.datamigration.models.SyncTableMigrationState + :ivar total_changes_applied: Total number of applied changes. + :vartype total_changes_applied: long + :ivar data_errors_counter: Number of data errors occurred. + :vartype data_errors_counter: long + :ivar last_modified_time: Last modified time on target. + :vartype last_modified_time: ~datetime.datetime + """ + + _validation = { + 'id': {'readonly': True}, + 'result_type': {'required': True}, + 'table_name': {'readonly': True}, + 'database_name': {'readonly': True}, + 'cdc_insert_counter': {'readonly': True}, + 'cdc_update_counter': {'readonly': True}, + 'cdc_delete_counter': {'readonly': True}, + 'full_load_est_finish_time': {'readonly': True}, + 'full_load_started_on': {'readonly': True}, + 'full_load_ended_on': {'readonly': True}, + 'full_load_total_rows': {'readonly': True}, + 'state': {'readonly': True}, + 'total_changes_applied': {'readonly': True}, + 'data_errors_counter': {'readonly': True}, + 'last_modified_time': {'readonly': True}, + } + + _attribute_map = { + 'id': {'key': 'id', 'type': 'str'}, + 'result_type': {'key': 'resultType', 'type': 'str'}, + 'table_name': {'key': 'tableName', 'type': 'str'}, + 'database_name': {'key': 'databaseName', 'type': 'str'}, + 'cdc_insert_counter': {'key': 'cdcInsertCounter', 'type': 'long'}, + 'cdc_update_counter': {'key': 'cdcUpdateCounter', 'type': 'long'}, + 'cdc_delete_counter': {'key': 'cdcDeleteCounter', 'type': 'long'}, + 'full_load_est_finish_time': {'key': 'fullLoadEstFinishTime', 'type': 'iso-8601'}, + 'full_load_started_on': {'key': 'fullLoadStartedOn', 'type': 'iso-8601'}, + 'full_load_ended_on': {'key': 'fullLoadEndedOn', 'type': 'iso-8601'}, + 'full_load_total_rows': {'key': 'fullLoadTotalRows', 'type': 'long'}, + 'state': {'key': 'state', 'type': 'str'}, + 'total_changes_applied': {'key': 'totalChangesApplied', 'type': 'long'}, + 'data_errors_counter': {'key': 'dataErrorsCounter', 'type': 'long'}, + 'last_modified_time': {'key': 'lastModifiedTime', 'type': 'iso-8601'}, + } + + def __init__( + self, + **kwargs + ): + super(MigrateOracleAzureDbPostgreSqlSyncTaskOutputTableLevel, self).__init__(**kwargs) + self.result_type = 'TableLevelOutput' # type: str + self.table_name = None + self.database_name = None + self.cdc_insert_counter = None + self.cdc_update_counter = None + self.cdc_delete_counter = None + self.full_load_est_finish_time = None + self.full_load_started_on = None + self.full_load_ended_on = None + self.full_load_total_rows = None + self.state = None + self.total_changes_applied = None + self.data_errors_counter = None + self.last_modified_time = None + + +class MigratePostgreSqlAzureDbForPostgreSqlSyncDatabaseInput(msrest.serialization.Model): + """Database specific information for PostgreSQL to Azure Database for PostgreSQL migration task inputs. + + :param name: Name of the database. + :type name: str + :param target_database_name: Name of target database. Note: Target database will be truncated + before starting migration. + :type target_database_name: str + :param migration_setting: Migration settings which tune the migration behavior. + :type migration_setting: dict[str, str] + :param source_setting: Source settings to tune source endpoint migration behavior. + :type source_setting: dict[str, str] + :param target_setting: Target settings to tune target endpoint migration behavior. + :type target_setting: dict[str, str] + :param selected_tables: Tables selected for migration. + :type selected_tables: + list[~azure.mgmt.datamigration.models.MigratePostgreSqlAzureDbForPostgreSqlSyncDatabaseTableInput] + """ + + _attribute_map = { + 'name': {'key': 'name', 'type': 'str'}, + 'target_database_name': {'key': 'targetDatabaseName', 'type': 'str'}, + 'migration_setting': {'key': 'migrationSetting', 'type': '{str}'}, + 'source_setting': {'key': 'sourceSetting', 'type': '{str}'}, + 'target_setting': {'key': 'targetSetting', 'type': '{str}'}, + 'selected_tables': {'key': 'selectedTables', 'type': '[MigratePostgreSqlAzureDbForPostgreSqlSyncDatabaseTableInput]'}, + } + + def __init__( + self, + **kwargs + ): + super(MigratePostgreSqlAzureDbForPostgreSqlSyncDatabaseInput, self).__init__(**kwargs) + self.name = kwargs.get('name', None) + self.target_database_name = kwargs.get('target_database_name', None) + self.migration_setting = kwargs.get('migration_setting', None) + self.source_setting = kwargs.get('source_setting', None) + self.target_setting = kwargs.get('target_setting', None) + self.selected_tables = kwargs.get('selected_tables', None) + + +class MigratePostgreSqlAzureDbForPostgreSqlSyncDatabaseTableInput(msrest.serialization.Model): + """Selected tables for the migration. + + :param name: Name of the table to migrate. + :type name: str + """ + + _attribute_map = { + 'name': {'key': 'name', 'type': 'str'}, + } + + def __init__( + self, + **kwargs + ): + super(MigratePostgreSqlAzureDbForPostgreSqlSyncDatabaseTableInput, self).__init__(**kwargs) + self.name = kwargs.get('name', None) + + +class MigratePostgreSqlAzureDbForPostgreSqlSyncTaskInput(msrest.serialization.Model): + """Input for the task that migrates PostgreSQL databases to Azure Database for PostgreSQL for online migrations. + + All required parameters must be populated in order to send to Azure. + + :param selected_databases: Required. Databases to migrate. + :type selected_databases: + list[~azure.mgmt.datamigration.models.MigratePostgreSqlAzureDbForPostgreSqlSyncDatabaseInput] + :param target_connection_info: Required. Connection information for target Azure Database for + PostgreSQL. + :type target_connection_info: ~azure.mgmt.datamigration.models.PostgreSqlConnectionInfo + :param source_connection_info: Required. Connection information for source PostgreSQL. + :type source_connection_info: ~azure.mgmt.datamigration.models.PostgreSqlConnectionInfo + :param encrypted_key_for_secure_fields: encrypted key for secure fields. + :type encrypted_key_for_secure_fields: str + """ + + _validation = { + 'selected_databases': {'required': True}, + 'target_connection_info': {'required': True}, + 'source_connection_info': {'required': True}, + } + + _attribute_map = { + 'selected_databases': {'key': 'selectedDatabases', 'type': '[MigratePostgreSqlAzureDbForPostgreSqlSyncDatabaseInput]'}, + 'target_connection_info': {'key': 'targetConnectionInfo', 'type': 'PostgreSqlConnectionInfo'}, + 'source_connection_info': {'key': 'sourceConnectionInfo', 'type': 'PostgreSqlConnectionInfo'}, + 'encrypted_key_for_secure_fields': {'key': 'encryptedKeyForSecureFields', 'type': 'str'}, + } + + def __init__( + self, + **kwargs + ): + super(MigratePostgreSqlAzureDbForPostgreSqlSyncTaskInput, self).__init__(**kwargs) + self.selected_databases = kwargs['selected_databases'] + self.target_connection_info = kwargs['target_connection_info'] + self.source_connection_info = kwargs['source_connection_info'] + self.encrypted_key_for_secure_fields = kwargs.get('encrypted_key_for_secure_fields', None) + + +class MigratePostgreSqlAzureDbForPostgreSqlSyncTaskOutput(msrest.serialization.Model): + """Output for the task that migrates PostgreSQL databases to Azure Database for PostgreSQL for online migrations. + + You probably want to use the sub-classes and not this class directly. Known + sub-classes are: MigratePostgreSqlAzureDbForPostgreSqlSyncTaskOutputDatabaseError, MigratePostgreSqlAzureDbForPostgreSqlSyncTaskOutputDatabaseLevel, MigratePostgreSqlAzureDbForPostgreSqlSyncTaskOutputError, MigratePostgreSqlAzureDbForPostgreSqlSyncTaskOutputMigrationLevel, MigratePostgreSqlAzureDbForPostgreSqlSyncTaskOutputTableLevel. + + Variables are only populated by the server, and will be ignored when sending a request. + + All required parameters must be populated in order to send to Azure. + + :ivar id: Result identifier. + :vartype id: str + :param result_type: Required. Result type.Constant filled by server. + :type result_type: str + """ + + _validation = { + 'id': {'readonly': True}, + 'result_type': {'required': True}, + } + + _attribute_map = { + 'id': {'key': 'id', 'type': 'str'}, + 'result_type': {'key': 'resultType', 'type': 'str'}, + } + + _subtype_map = { + 'result_type': {'DatabaseLevelErrorOutput': 'MigratePostgreSqlAzureDbForPostgreSqlSyncTaskOutputDatabaseError', 'DatabaseLevelOutput': 'MigratePostgreSqlAzureDbForPostgreSqlSyncTaskOutputDatabaseLevel', 'ErrorOutput': 'MigratePostgreSqlAzureDbForPostgreSqlSyncTaskOutputError', 'MigrationLevelOutput': 'MigratePostgreSqlAzureDbForPostgreSqlSyncTaskOutputMigrationLevel', 'TableLevelOutput': 'MigratePostgreSqlAzureDbForPostgreSqlSyncTaskOutputTableLevel'} + } + + def __init__( + self, + **kwargs + ): + super(MigratePostgreSqlAzureDbForPostgreSqlSyncTaskOutput, self).__init__(**kwargs) + self.id = None + self.result_type = None # type: Optional[str] + + +class MigratePostgreSqlAzureDbForPostgreSqlSyncTaskOutputDatabaseError(MigratePostgreSqlAzureDbForPostgreSqlSyncTaskOutput): + """MigratePostgreSqlAzureDbForPostgreSqlSyncTaskOutputDatabaseError. + + Variables are only populated by the server, and will be ignored when sending a request. + + All required parameters must be populated in order to send to Azure. + + :ivar id: Result identifier. + :vartype id: str + :param result_type: Required. Result type.Constant filled by server. + :type result_type: str + :param error_message: Error message. + :type error_message: str + :param events: List of error events. + :type events: list[~azure.mgmt.datamigration.models.SyncMigrationDatabaseErrorEvent] + """ + + _validation = { + 'id': {'readonly': True}, + 'result_type': {'required': True}, + } + + _attribute_map = { + 'id': {'key': 'id', 'type': 'str'}, + 'result_type': {'key': 'resultType', 'type': 'str'}, + 'error_message': {'key': 'errorMessage', 'type': 'str'}, + 'events': {'key': 'events', 'type': '[SyncMigrationDatabaseErrorEvent]'}, + } + + def __init__( + self, + **kwargs + ): + super(MigratePostgreSqlAzureDbForPostgreSqlSyncTaskOutputDatabaseError, self).__init__(**kwargs) + self.result_type = 'DatabaseLevelErrorOutput' # type: str + self.error_message = kwargs.get('error_message', None) + self.events = kwargs.get('events', None) + + +class MigratePostgreSqlAzureDbForPostgreSqlSyncTaskOutputDatabaseLevel(MigratePostgreSqlAzureDbForPostgreSqlSyncTaskOutput): + """MigratePostgreSqlAzureDbForPostgreSqlSyncTaskOutputDatabaseLevel. + + Variables are only populated by the server, and will be ignored when sending a request. + + All required parameters must be populated in order to send to Azure. + + :ivar id: Result identifier. + :vartype id: str + :param result_type: Required. Result type.Constant filled by server. + :type result_type: str + :ivar database_name: Name of the database. + :vartype database_name: str + :ivar started_on: Migration start time. + :vartype started_on: ~datetime.datetime + :ivar ended_on: Migration end time. + :vartype ended_on: ~datetime.datetime + :ivar migration_state: Migration state that this database is in. Possible values include: + "UNDEFINED", "CONFIGURING", "INITIALIAZING", "STARTING", "RUNNING", "READY_TO_COMPLETE", + "COMPLETING", "COMPLETE", "CANCELLING", "CANCELLED", "FAILED", "VALIDATING", + "VALIDATION_COMPLETE", "VALIDATION_FAILED", "RESTORE_IN_PROGRESS", "RESTORE_COMPLETED", + "BACKUP_IN_PROGRESS", "BACKUP_COMPLETED". + :vartype migration_state: str or + ~azure.mgmt.datamigration.models.SyncDatabaseMigrationReportingState + :ivar incoming_changes: Number of incoming changes. + :vartype incoming_changes: long + :ivar applied_changes: Number of applied changes. + :vartype applied_changes: long + :ivar cdc_insert_counter: Number of cdc inserts. + :vartype cdc_insert_counter: long + :ivar cdc_delete_counter: Number of cdc deletes. + :vartype cdc_delete_counter: long + :ivar cdc_update_counter: Number of cdc updates. + :vartype cdc_update_counter: long + :ivar full_load_completed_tables: Number of tables completed in full load. + :vartype full_load_completed_tables: long + :ivar full_load_loading_tables: Number of tables loading in full load. + :vartype full_load_loading_tables: long + :ivar full_load_queued_tables: Number of tables queued in full load. + :vartype full_load_queued_tables: long + :ivar full_load_errored_tables: Number of tables errored in full load. + :vartype full_load_errored_tables: long + :ivar initialization_completed: Indicates if initial load (full load) has been completed. + :vartype initialization_completed: bool + :ivar latency: CDC apply latency. + :vartype latency: long + """ + + _validation = { + 'id': {'readonly': True}, + 'result_type': {'required': True}, + 'database_name': {'readonly': True}, + 'started_on': {'readonly': True}, + 'ended_on': {'readonly': True}, + 'migration_state': {'readonly': True}, + 'incoming_changes': {'readonly': True}, + 'applied_changes': {'readonly': True}, + 'cdc_insert_counter': {'readonly': True}, + 'cdc_delete_counter': {'readonly': True}, + 'cdc_update_counter': {'readonly': True}, + 'full_load_completed_tables': {'readonly': True}, + 'full_load_loading_tables': {'readonly': True}, + 'full_load_queued_tables': {'readonly': True}, + 'full_load_errored_tables': {'readonly': True}, + 'initialization_completed': {'readonly': True}, + 'latency': {'readonly': True}, + } + + _attribute_map = { + 'id': {'key': 'id', 'type': 'str'}, + 'result_type': {'key': 'resultType', 'type': 'str'}, + 'database_name': {'key': 'databaseName', 'type': 'str'}, + 'started_on': {'key': 'startedOn', 'type': 'iso-8601'}, + 'ended_on': {'key': 'endedOn', 'type': 'iso-8601'}, + 'migration_state': {'key': 'migrationState', 'type': 'str'}, + 'incoming_changes': {'key': 'incomingChanges', 'type': 'long'}, + 'applied_changes': {'key': 'appliedChanges', 'type': 'long'}, + 'cdc_insert_counter': {'key': 'cdcInsertCounter', 'type': 'long'}, + 'cdc_delete_counter': {'key': 'cdcDeleteCounter', 'type': 'long'}, + 'cdc_update_counter': {'key': 'cdcUpdateCounter', 'type': 'long'}, + 'full_load_completed_tables': {'key': 'fullLoadCompletedTables', 'type': 'long'}, + 'full_load_loading_tables': {'key': 'fullLoadLoadingTables', 'type': 'long'}, + 'full_load_queued_tables': {'key': 'fullLoadQueuedTables', 'type': 'long'}, + 'full_load_errored_tables': {'key': 'fullLoadErroredTables', 'type': 'long'}, + 'initialization_completed': {'key': 'initializationCompleted', 'type': 'bool'}, + 'latency': {'key': 'latency', 'type': 'long'}, + } + + def __init__( + self, + **kwargs + ): + super(MigratePostgreSqlAzureDbForPostgreSqlSyncTaskOutputDatabaseLevel, self).__init__(**kwargs) + self.result_type = 'DatabaseLevelOutput' # type: str + self.database_name = None + self.started_on = None + self.ended_on = None + self.migration_state = None + self.incoming_changes = None + self.applied_changes = None + self.cdc_insert_counter = None + self.cdc_delete_counter = None + self.cdc_update_counter = None + self.full_load_completed_tables = None + self.full_load_loading_tables = None + self.full_load_queued_tables = None + self.full_load_errored_tables = None + self.initialization_completed = None + self.latency = None + + +class MigratePostgreSqlAzureDbForPostgreSqlSyncTaskOutputError(MigratePostgreSqlAzureDbForPostgreSqlSyncTaskOutput): + """MigratePostgreSqlAzureDbForPostgreSqlSyncTaskOutputError. + + Variables are only populated by the server, and will be ignored when sending a request. + + All required parameters must be populated in order to send to Azure. + + :ivar id: Result identifier. + :vartype id: str + :param result_type: Required. Result type.Constant filled by server. + :type result_type: str + :ivar error: Migration error. + :vartype error: ~azure.mgmt.datamigration.models.ReportableException + :param events: List of error events. + :type events: list[~azure.mgmt.datamigration.models.SyncMigrationDatabaseErrorEvent] + """ + + _validation = { + 'id': {'readonly': True}, + 'result_type': {'required': True}, + 'error': {'readonly': True}, + } + + _attribute_map = { + 'id': {'key': 'id', 'type': 'str'}, + 'result_type': {'key': 'resultType', 'type': 'str'}, + 'error': {'key': 'error', 'type': 'ReportableException'}, + 'events': {'key': 'events', 'type': '[SyncMigrationDatabaseErrorEvent]'}, + } + + def __init__( + self, + **kwargs + ): + super(MigratePostgreSqlAzureDbForPostgreSqlSyncTaskOutputError, self).__init__(**kwargs) + self.result_type = 'ErrorOutput' # type: str + self.error = None + self.events = kwargs.get('events', None) + + +class MigratePostgreSqlAzureDbForPostgreSqlSyncTaskOutputMigrationLevel(MigratePostgreSqlAzureDbForPostgreSqlSyncTaskOutput): + """MigratePostgreSqlAzureDbForPostgreSqlSyncTaskOutputMigrationLevel. + + Variables are only populated by the server, and will be ignored when sending a request. + + All required parameters must be populated in order to send to Azure. + + :ivar id: Result identifier. + :vartype id: str + :param result_type: Required. Result type.Constant filled by server. + :type result_type: str + :ivar started_on: Migration start time. + :vartype started_on: ~datetime.datetime + :ivar ended_on: Migration end time. + :vartype ended_on: ~datetime.datetime + :ivar source_server_version: Source server version. + :vartype source_server_version: str + :ivar source_server: Source server name. + :vartype source_server: str + :ivar target_server_version: Target server version. + :vartype target_server_version: str + :ivar target_server: Target server name. + :vartype target_server: str + :ivar source_server_type: Source server type. Possible values include: "Access", "DB2", + "MySQL", "Oracle", "SQL", "Sybase", "PostgreSQL", "MongoDB", "SQLRDS", "MySQLRDS", + "PostgreSQLRDS". + :vartype source_server_type: str or ~azure.mgmt.datamigration.models.ScenarioSource + :ivar target_server_type: Target server type. Possible values include: "SQLServer", "SQLDB", + "SQLDW", "SQLMI", "AzureDBForMySql", "AzureDBForPostgresSQL", "MongoDB". + :vartype target_server_type: str or ~azure.mgmt.datamigration.models.ScenarioTarget + :ivar state: Migration status. Possible values include: "UNDEFINED", "VALIDATING", "PENDING", + "COMPLETE", "ACTION_REQUIRED", "FAILED". + :vartype state: str or ~azure.mgmt.datamigration.models.ReplicateMigrationState + :param database_count: Number of databases to include. + :type database_count: float + """ + + _validation = { + 'id': {'readonly': True}, + 'result_type': {'required': True}, + 'started_on': {'readonly': True}, + 'ended_on': {'readonly': True}, + 'source_server_version': {'readonly': True}, + 'source_server': {'readonly': True}, + 'target_server_version': {'readonly': True}, + 'target_server': {'readonly': True}, + 'source_server_type': {'readonly': True}, + 'target_server_type': {'readonly': True}, + 'state': {'readonly': True}, + } + + _attribute_map = { + 'id': {'key': 'id', 'type': 'str'}, + 'result_type': {'key': 'resultType', 'type': 'str'}, + 'started_on': {'key': 'startedOn', 'type': 'iso-8601'}, + 'ended_on': {'key': 'endedOn', 'type': 'iso-8601'}, + 'source_server_version': {'key': 'sourceServerVersion', 'type': 'str'}, + 'source_server': {'key': 'sourceServer', 'type': 'str'}, + 'target_server_version': {'key': 'targetServerVersion', 'type': 'str'}, + 'target_server': {'key': 'targetServer', 'type': 'str'}, + 'source_server_type': {'key': 'sourceServerType', 'type': 'str'}, + 'target_server_type': {'key': 'targetServerType', 'type': 'str'}, + 'state': {'key': 'state', 'type': 'str'}, + 'database_count': {'key': 'databaseCount', 'type': 'float'}, + } + + def __init__( + self, + **kwargs + ): + super(MigratePostgreSqlAzureDbForPostgreSqlSyncTaskOutputMigrationLevel, self).__init__(**kwargs) + self.result_type = 'MigrationLevelOutput' # type: str + self.started_on = None + self.ended_on = None + self.source_server_version = None + self.source_server = None + self.target_server_version = None + self.target_server = None + self.source_server_type = None + self.target_server_type = None + self.state = None + self.database_count = kwargs.get('database_count', None) + + +class MigratePostgreSqlAzureDbForPostgreSqlSyncTaskOutputTableLevel(MigratePostgreSqlAzureDbForPostgreSqlSyncTaskOutput): + """MigratePostgreSqlAzureDbForPostgreSqlSyncTaskOutputTableLevel. + + Variables are only populated by the server, and will be ignored when sending a request. + + All required parameters must be populated in order to send to Azure. + + :ivar id: Result identifier. + :vartype id: str + :param result_type: Required. Result type.Constant filled by server. + :type result_type: str + :ivar table_name: Name of the table. + :vartype table_name: str + :ivar database_name: Name of the database. + :vartype database_name: str + :ivar cdc_insert_counter: Number of applied inserts. + :vartype cdc_insert_counter: long + :ivar cdc_update_counter: Number of applied updates. + :vartype cdc_update_counter: long + :ivar cdc_delete_counter: Number of applied deletes. + :vartype cdc_delete_counter: long + :ivar full_load_est_finish_time: Estimate to finish full load. + :vartype full_load_est_finish_time: ~datetime.datetime + :ivar full_load_started_on: Full load start time. + :vartype full_load_started_on: ~datetime.datetime + :ivar full_load_ended_on: Full load end time. + :vartype full_load_ended_on: ~datetime.datetime + :ivar full_load_total_rows: Number of rows applied in full load. + :vartype full_load_total_rows: long + :ivar state: Current state of the table migration. Possible values include: "BEFORE_LOAD", + "FULL_LOAD", "COMPLETED", "CANCELED", "ERROR", "FAILED". + :vartype state: str or ~azure.mgmt.datamigration.models.SyncTableMigrationState + :ivar total_changes_applied: Total number of applied changes. + :vartype total_changes_applied: long + :ivar data_errors_counter: Number of data errors occurred. + :vartype data_errors_counter: long + :ivar last_modified_time: Last modified time on target. + :vartype last_modified_time: ~datetime.datetime + """ + + _validation = { + 'id': {'readonly': True}, + 'result_type': {'required': True}, + 'table_name': {'readonly': True}, + 'database_name': {'readonly': True}, + 'cdc_insert_counter': {'readonly': True}, + 'cdc_update_counter': {'readonly': True}, + 'cdc_delete_counter': {'readonly': True}, + 'full_load_est_finish_time': {'readonly': True}, + 'full_load_started_on': {'readonly': True}, + 'full_load_ended_on': {'readonly': True}, + 'full_load_total_rows': {'readonly': True}, + 'state': {'readonly': True}, + 'total_changes_applied': {'readonly': True}, + 'data_errors_counter': {'readonly': True}, + 'last_modified_time': {'readonly': True}, + } + + _attribute_map = { + 'id': {'key': 'id', 'type': 'str'}, + 'result_type': {'key': 'resultType', 'type': 'str'}, + 'table_name': {'key': 'tableName', 'type': 'str'}, + 'database_name': {'key': 'databaseName', 'type': 'str'}, + 'cdc_insert_counter': {'key': 'cdcInsertCounter', 'type': 'long'}, + 'cdc_update_counter': {'key': 'cdcUpdateCounter', 'type': 'long'}, + 'cdc_delete_counter': {'key': 'cdcDeleteCounter', 'type': 'long'}, + 'full_load_est_finish_time': {'key': 'fullLoadEstFinishTime', 'type': 'iso-8601'}, + 'full_load_started_on': {'key': 'fullLoadStartedOn', 'type': 'iso-8601'}, + 'full_load_ended_on': {'key': 'fullLoadEndedOn', 'type': 'iso-8601'}, + 'full_load_total_rows': {'key': 'fullLoadTotalRows', 'type': 'long'}, + 'state': {'key': 'state', 'type': 'str'}, + 'total_changes_applied': {'key': 'totalChangesApplied', 'type': 'long'}, + 'data_errors_counter': {'key': 'dataErrorsCounter', 'type': 'long'}, + 'last_modified_time': {'key': 'lastModifiedTime', 'type': 'iso-8601'}, + } + + def __init__( + self, + **kwargs + ): + super(MigratePostgreSqlAzureDbForPostgreSqlSyncTaskOutputTableLevel, self).__init__(**kwargs) + self.result_type = 'TableLevelOutput' # type: str + self.table_name = None + self.database_name = None + self.cdc_insert_counter = None + self.cdc_update_counter = None + self.cdc_delete_counter = None + self.full_load_est_finish_time = None + self.full_load_started_on = None + self.full_load_ended_on = None + self.full_load_total_rows = None + self.state = None + self.total_changes_applied = None + self.data_errors_counter = None + self.last_modified_time = None + + +class MigratePostgreSqlAzureDbForPostgreSqlSyncTaskProperties(ProjectTaskProperties): + """Properties for the task that migrates PostgreSQL databases to Azure Database for PostgreSQL for online migrations. + + Variables are only populated by the server, and will be ignored when sending a request. + + All required parameters must be populated in order to send to Azure. + + :param task_type: Required. Task type.Constant filled by server. Possible values include: + "Connect.MongoDb", "ConnectToSource.SqlServer", "ConnectToSource.SqlServer.Sync", + "ConnectToSource.PostgreSql.Sync", "ConnectToSource.MySql", "ConnectToSource.Oracle.Sync", + "ConnectToTarget.SqlDb", "ConnectToTarget.SqlDb.Sync", + "ConnectToTarget.AzureDbForPostgreSql.Sync", + "ConnectToTarget.Oracle.AzureDbForPostgreSql.Sync", "ConnectToTarget.AzureSqlDbMI", + "ConnectToTarget.AzureSqlDbMI.Sync.LRS", "ConnectToTarget.AzureDbForMySql", + "GetUserTables.Sql", "GetUserTables.AzureSqlDb.Sync", "GetUserTablesOracle", + "GetUserTablesPostgreSql", "GetUserTablesMySql", "Migrate.MongoDb", + "Migrate.SqlServer.AzureSqlDbMI", "Migrate.SqlServer.AzureSqlDbMI.Sync.LRS", + "Migrate.SqlServer.SqlDb", "Migrate.SqlServer.AzureSqlDb.Sync", + "Migrate.MySql.AzureDbForMySql.Sync", "Migrate.MySql.AzureDbForMySql", + "Migrate.PostgreSql.AzureDbForPostgreSql.SyncV2", "Migrate.Oracle.AzureDbForPostgreSql.Sync", + "ValidateMigrationInput.SqlServer.SqlDb.Sync", "ValidateMigrationInput.SqlServer.AzureSqlDbMI", + "ValidateMigrationInput.SqlServer.AzureSqlDbMI.Sync.LRS", "Validate.MongoDb", + "Validate.Oracle.AzureDbPostgreSql.Sync", "GetTDECertificates.Sql", "Migrate.Ssis", + "Service.Check.OCI", "Service.Upload.OCI", "Service.Install.OCI", + "MigrateSchemaSqlServerSqlDb". + :type task_type: str or ~azure.mgmt.datamigration.models.TaskType + :ivar errors: Array of errors. This is ignored if submitted. + :vartype errors: list[~azure.mgmt.datamigration.models.ODataError] + :ivar state: The state of the task. This is ignored if submitted. Possible values include: + "Unknown", "Queued", "Running", "Canceled", "Succeeded", "Failed", "FailedInputValidation", + "Faulted". + :vartype state: str or ~azure.mgmt.datamigration.models.TaskState + :ivar commands: Array of command properties. + :vartype commands: list[~azure.mgmt.datamigration.models.CommandProperties] + :param client_data: Key value pairs of client data to attach meta data information to task. + :type client_data: dict[str, str] + :param input: Task input. + :type input: + ~azure.mgmt.datamigration.models.MigratePostgreSqlAzureDbForPostgreSqlSyncTaskInput + :ivar output: Task output. This is ignored if submitted. + :vartype output: + list[~azure.mgmt.datamigration.models.MigratePostgreSqlAzureDbForPostgreSqlSyncTaskOutput] + :param task_id: task id. + :type task_id: str + :param created_on: DateTime in UTC when the task was created. + :type created_on: str + """ + + _validation = { + 'task_type': {'required': True}, + 'errors': {'readonly': True}, + 'state': {'readonly': True}, + 'commands': {'readonly': True}, + 'output': {'readonly': True}, + } + + _attribute_map = { + 'task_type': {'key': 'taskType', 'type': 'str'}, + 'errors': {'key': 'errors', 'type': '[ODataError]'}, + 'state': {'key': 'state', 'type': 'str'}, + 'commands': {'key': 'commands', 'type': '[CommandProperties]'}, + 'client_data': {'key': 'clientData', 'type': '{str}'}, + 'input': {'key': 'input', 'type': 'MigratePostgreSqlAzureDbForPostgreSqlSyncTaskInput'}, + 'output': {'key': 'output', 'type': '[MigratePostgreSqlAzureDbForPostgreSqlSyncTaskOutput]'}, + 'task_id': {'key': 'taskId', 'type': 'str'}, + 'created_on': {'key': 'createdOn', 'type': 'str'}, + } + + def __init__( + self, + **kwargs + ): + super(MigratePostgreSqlAzureDbForPostgreSqlSyncTaskProperties, self).__init__(**kwargs) + self.task_type = 'Migrate.PostgreSql.AzureDbForPostgreSql.SyncV2' # type: str + self.input = kwargs.get('input', None) + self.output = None + self.task_id = kwargs.get('task_id', None) + self.created_on = kwargs.get('created_on', None) + + +class MigrateSchemaSqlServerSqlDbDatabaseInput(msrest.serialization.Model): + """Database input for migrate schema Sql Server to Azure SQL Server scenario. + + :param name: Name of source database. + :type name: str + :param id: Id of the source database. + :type id: str + :param target_database_name: Name of target database. + :type target_database_name: str + :param schema_setting: Database schema migration settings. + :type schema_setting: ~azure.mgmt.datamigration.models.SchemaMigrationSetting + """ + + _attribute_map = { + 'name': {'key': 'name', 'type': 'str'}, + 'id': {'key': 'id', 'type': 'str'}, + 'target_database_name': {'key': 'targetDatabaseName', 'type': 'str'}, + 'schema_setting': {'key': 'schemaSetting', 'type': 'SchemaMigrationSetting'}, + } + + def __init__( + self, + **kwargs + ): + super(MigrateSchemaSqlServerSqlDbDatabaseInput, self).__init__(**kwargs) + self.name = kwargs.get('name', None) + self.id = kwargs.get('id', None) + self.target_database_name = kwargs.get('target_database_name', None) + self.schema_setting = kwargs.get('schema_setting', None) + + +class SqlMigrationTaskInput(msrest.serialization.Model): + """Base class for migration task input. + + All required parameters must be populated in order to send to Azure. + + :param source_connection_info: Required. Information for connecting to source. + :type source_connection_info: ~azure.mgmt.datamigration.models.SqlConnectionInfo + :param target_connection_info: Required. Information for connecting to target. + :type target_connection_info: ~azure.mgmt.datamigration.models.SqlConnectionInfo + """ + + _validation = { + 'source_connection_info': {'required': True}, + 'target_connection_info': {'required': True}, + } + + _attribute_map = { + 'source_connection_info': {'key': 'sourceConnectionInfo', 'type': 'SqlConnectionInfo'}, + 'target_connection_info': {'key': 'targetConnectionInfo', 'type': 'SqlConnectionInfo'}, + } + + def __init__( + self, + **kwargs + ): + super(SqlMigrationTaskInput, self).__init__(**kwargs) + self.source_connection_info = kwargs['source_connection_info'] + self.target_connection_info = kwargs['target_connection_info'] + + +class MigrateSchemaSqlServerSqlDbTaskInput(SqlMigrationTaskInput): + """Input for task that migrates Schema for SQL Server databases to Azure SQL databases. + + All required parameters must be populated in order to send to Azure. + + :param source_connection_info: Required. Information for connecting to source. + :type source_connection_info: ~azure.mgmt.datamigration.models.SqlConnectionInfo + :param target_connection_info: Required. Information for connecting to target. + :type target_connection_info: ~azure.mgmt.datamigration.models.SqlConnectionInfo + :param selected_databases: Required. Databases to migrate. + :type selected_databases: + list[~azure.mgmt.datamigration.models.MigrateSchemaSqlServerSqlDbDatabaseInput] + :param encrypted_key_for_secure_fields: encrypted key for secure fields. + :type encrypted_key_for_secure_fields: str + :param started_on: Migration start time. + :type started_on: str + """ + + _validation = { + 'source_connection_info': {'required': True}, + 'target_connection_info': {'required': True}, + 'selected_databases': {'required': True}, + } + + _attribute_map = { + 'source_connection_info': {'key': 'sourceConnectionInfo', 'type': 'SqlConnectionInfo'}, + 'target_connection_info': {'key': 'targetConnectionInfo', 'type': 'SqlConnectionInfo'}, + 'selected_databases': {'key': 'selectedDatabases', 'type': '[MigrateSchemaSqlServerSqlDbDatabaseInput]'}, + 'encrypted_key_for_secure_fields': {'key': 'encryptedKeyForSecureFields', 'type': 'str'}, + 'started_on': {'key': 'startedOn', 'type': 'str'}, + } + + def __init__( + self, + **kwargs + ): + super(MigrateSchemaSqlServerSqlDbTaskInput, self).__init__(**kwargs) + self.selected_databases = kwargs['selected_databases'] + self.encrypted_key_for_secure_fields = kwargs.get('encrypted_key_for_secure_fields', None) + self.started_on = kwargs.get('started_on', None) + + +class MigrateSchemaSqlServerSqlDbTaskOutput(msrest.serialization.Model): + """Output for the task that migrates Schema for SQL Server databases to Azure SQL databases. + + You probably want to use the sub-classes and not this class directly. Known + sub-classes are: MigrateSchemaSqlServerSqlDbTaskOutputDatabaseLevel, MigrateSchemaSqlTaskOutputError, MigrateSchemaSqlServerSqlDbTaskOutputMigrationLevel, MigrateSchemaSqlServerSqlDbTaskOutputError. + + Variables are only populated by the server, and will be ignored when sending a request. + + All required parameters must be populated in order to send to Azure. + + :ivar id: Result identifier. + :vartype id: str + :param result_type: Required. Result type.Constant filled by server. + :type result_type: str + """ + + _validation = { + 'id': {'readonly': True}, + 'result_type': {'required': True}, + } + + _attribute_map = { + 'id': {'key': 'id', 'type': 'str'}, + 'result_type': {'key': 'resultType', 'type': 'str'}, + } + + _subtype_map = { + 'result_type': {'DatabaseLevelOutput': 'MigrateSchemaSqlServerSqlDbTaskOutputDatabaseLevel', 'ErrorOutput': 'MigrateSchemaSqlTaskOutputError', 'MigrationLevelOutput': 'MigrateSchemaSqlServerSqlDbTaskOutputMigrationLevel', 'SchemaErrorOutput': 'MigrateSchemaSqlServerSqlDbTaskOutputError'} + } + + def __init__( + self, + **kwargs + ): + super(MigrateSchemaSqlServerSqlDbTaskOutput, self).__init__(**kwargs) + self.id = None + self.result_type = None # type: Optional[str] + + +class MigrateSchemaSqlServerSqlDbTaskOutputDatabaseLevel(MigrateSchemaSqlServerSqlDbTaskOutput): + """MigrateSchemaSqlServerSqlDbTaskOutputDatabaseLevel. + + Variables are only populated by the server, and will be ignored when sending a request. + + All required parameters must be populated in order to send to Azure. + + :ivar id: Result identifier. + :vartype id: str + :param result_type: Required. Result type.Constant filled by server. + :type result_type: str + :ivar database_name: The name of the database. + :vartype database_name: str + :ivar state: State of the schema migration for this database. Possible values include: "None", + "InProgress", "Failed", "Warning", "Completed", "Skipped", "Stopped". + :vartype state: str or ~azure.mgmt.datamigration.models.MigrationState + :ivar stage: Schema migration stage for this database. Possible values include: "NotStarted", + "ValidatingInputs", "CollectingObjects", "DownloadingScript", "GeneratingScript", + "UploadingScript", "DeployingSchema", "Completed", "CompletedWithWarnings", "Failed". + :vartype stage: str or ~azure.mgmt.datamigration.models.SchemaMigrationStage + :ivar started_on: Migration start time. + :vartype started_on: ~datetime.datetime + :ivar ended_on: Migration end time. + :vartype ended_on: ~datetime.datetime + :ivar database_error_result_prefix: Prefix string to use for querying errors for this database. + :vartype database_error_result_prefix: str + :ivar schema_error_result_prefix: Prefix string to use for querying schema errors for this + database. + :vartype schema_error_result_prefix: str + :ivar number_of_successful_operations: Number of successful operations for this database. + :vartype number_of_successful_operations: long + :ivar number_of_failed_operations: Number of failed operations for this database. + :vartype number_of_failed_operations: long + :ivar file_id: Identifier for the file resource containing the schema of this database. + :vartype file_id: str + """ + + _validation = { + 'id': {'readonly': True}, + 'result_type': {'required': True}, + 'database_name': {'readonly': True}, + 'state': {'readonly': True}, + 'stage': {'readonly': True}, + 'started_on': {'readonly': True}, + 'ended_on': {'readonly': True}, + 'database_error_result_prefix': {'readonly': True}, + 'schema_error_result_prefix': {'readonly': True}, + 'number_of_successful_operations': {'readonly': True}, + 'number_of_failed_operations': {'readonly': True}, + 'file_id': {'readonly': True}, + } + + _attribute_map = { + 'id': {'key': 'id', 'type': 'str'}, + 'result_type': {'key': 'resultType', 'type': 'str'}, + 'database_name': {'key': 'databaseName', 'type': 'str'}, + 'state': {'key': 'state', 'type': 'str'}, + 'stage': {'key': 'stage', 'type': 'str'}, + 'started_on': {'key': 'startedOn', 'type': 'iso-8601'}, + 'ended_on': {'key': 'endedOn', 'type': 'iso-8601'}, + 'database_error_result_prefix': {'key': 'databaseErrorResultPrefix', 'type': 'str'}, + 'schema_error_result_prefix': {'key': 'schemaErrorResultPrefix', 'type': 'str'}, + 'number_of_successful_operations': {'key': 'numberOfSuccessfulOperations', 'type': 'long'}, + 'number_of_failed_operations': {'key': 'numberOfFailedOperations', 'type': 'long'}, + 'file_id': {'key': 'fileId', 'type': 'str'}, + } + + def __init__( + self, + **kwargs + ): + super(MigrateSchemaSqlServerSqlDbTaskOutputDatabaseLevel, self).__init__(**kwargs) + self.result_type = 'DatabaseLevelOutput' # type: str + self.database_name = None + self.state = None + self.stage = None + self.started_on = None + self.ended_on = None + self.database_error_result_prefix = None + self.schema_error_result_prefix = None + self.number_of_successful_operations = None + self.number_of_failed_operations = None + self.file_id = None + + +class MigrateSchemaSqlServerSqlDbTaskOutputError(MigrateSchemaSqlServerSqlDbTaskOutput): + """MigrateSchemaSqlServerSqlDbTaskOutputError. + + Variables are only populated by the server, and will be ignored when sending a request. + + All required parameters must be populated in order to send to Azure. + + :ivar id: Result identifier. + :vartype id: str + :param result_type: Required. Result type.Constant filled by server. + :type result_type: str + :ivar command_text: Schema command which failed. + :vartype command_text: str + :ivar error_text: Reason of failure. + :vartype error_text: str + """ + + _validation = { + 'id': {'readonly': True}, + 'result_type': {'required': True}, + 'command_text': {'readonly': True}, + 'error_text': {'readonly': True}, + } + + _attribute_map = { + 'id': {'key': 'id', 'type': 'str'}, + 'result_type': {'key': 'resultType', 'type': 'str'}, + 'command_text': {'key': 'commandText', 'type': 'str'}, + 'error_text': {'key': 'errorText', 'type': 'str'}, + } + + def __init__( + self, + **kwargs + ): + super(MigrateSchemaSqlServerSqlDbTaskOutputError, self).__init__(**kwargs) + self.result_type = 'SchemaErrorOutput' # type: str + self.command_text = None + self.error_text = None + + +class MigrateSchemaSqlServerSqlDbTaskOutputMigrationLevel(MigrateSchemaSqlServerSqlDbTaskOutput): + """MigrateSchemaSqlServerSqlDbTaskOutputMigrationLevel. + + Variables are only populated by the server, and will be ignored when sending a request. + + All required parameters must be populated in order to send to Azure. + + :ivar id: Result identifier. + :vartype id: str + :param result_type: Required. Result type.Constant filled by server. + :type result_type: str + :ivar state: Overall state of the schema migration. Possible values include: "None", + "InProgress", "Failed", "Warning", "Completed", "Skipped", "Stopped". + :vartype state: str or ~azure.mgmt.datamigration.models.MigrationState + :ivar started_on: Migration start time. + :vartype started_on: ~datetime.datetime + :ivar ended_on: Migration end time. + :vartype ended_on: ~datetime.datetime + :ivar source_server_version: Source server version. + :vartype source_server_version: str + :ivar source_server_brand_version: Source server brand version. + :vartype source_server_brand_version: str + :ivar target_server_version: Target server version. + :vartype target_server_version: str + :ivar target_server_brand_version: Target server brand version. + :vartype target_server_brand_version: str + """ + + _validation = { + 'id': {'readonly': True}, + 'result_type': {'required': True}, + 'state': {'readonly': True}, + 'started_on': {'readonly': True}, + 'ended_on': {'readonly': True}, + 'source_server_version': {'readonly': True}, + 'source_server_brand_version': {'readonly': True}, + 'target_server_version': {'readonly': True}, + 'target_server_brand_version': {'readonly': True}, + } + + _attribute_map = { + 'id': {'key': 'id', 'type': 'str'}, + 'result_type': {'key': 'resultType', 'type': 'str'}, + 'state': {'key': 'state', 'type': 'str'}, + 'started_on': {'key': 'startedOn', 'type': 'iso-8601'}, + 'ended_on': {'key': 'endedOn', 'type': 'iso-8601'}, + 'source_server_version': {'key': 'sourceServerVersion', 'type': 'str'}, + 'source_server_brand_version': {'key': 'sourceServerBrandVersion', 'type': 'str'}, + 'target_server_version': {'key': 'targetServerVersion', 'type': 'str'}, + 'target_server_brand_version': {'key': 'targetServerBrandVersion', 'type': 'str'}, + } + + def __init__( + self, + **kwargs + ): + super(MigrateSchemaSqlServerSqlDbTaskOutputMigrationLevel, self).__init__(**kwargs) + self.result_type = 'MigrationLevelOutput' # type: str + self.state = None + self.started_on = None + self.ended_on = None + self.source_server_version = None + self.source_server_brand_version = None + self.target_server_version = None + self.target_server_brand_version = None + + +class MigrateSchemaSqlServerSqlDbTaskProperties(ProjectTaskProperties): + """Properties for task that migrates Schema for SQL Server databases to Azure SQL databases. + + Variables are only populated by the server, and will be ignored when sending a request. + + All required parameters must be populated in order to send to Azure. + + :param task_type: Required. Task type.Constant filled by server. Possible values include: + "Connect.MongoDb", "ConnectToSource.SqlServer", "ConnectToSource.SqlServer.Sync", + "ConnectToSource.PostgreSql.Sync", "ConnectToSource.MySql", "ConnectToSource.Oracle.Sync", + "ConnectToTarget.SqlDb", "ConnectToTarget.SqlDb.Sync", + "ConnectToTarget.AzureDbForPostgreSql.Sync", + "ConnectToTarget.Oracle.AzureDbForPostgreSql.Sync", "ConnectToTarget.AzureSqlDbMI", + "ConnectToTarget.AzureSqlDbMI.Sync.LRS", "ConnectToTarget.AzureDbForMySql", + "GetUserTables.Sql", "GetUserTables.AzureSqlDb.Sync", "GetUserTablesOracle", + "GetUserTablesPostgreSql", "GetUserTablesMySql", "Migrate.MongoDb", + "Migrate.SqlServer.AzureSqlDbMI", "Migrate.SqlServer.AzureSqlDbMI.Sync.LRS", + "Migrate.SqlServer.SqlDb", "Migrate.SqlServer.AzureSqlDb.Sync", + "Migrate.MySql.AzureDbForMySql.Sync", "Migrate.MySql.AzureDbForMySql", + "Migrate.PostgreSql.AzureDbForPostgreSql.SyncV2", "Migrate.Oracle.AzureDbForPostgreSql.Sync", + "ValidateMigrationInput.SqlServer.SqlDb.Sync", "ValidateMigrationInput.SqlServer.AzureSqlDbMI", + "ValidateMigrationInput.SqlServer.AzureSqlDbMI.Sync.LRS", "Validate.MongoDb", + "Validate.Oracle.AzureDbPostgreSql.Sync", "GetTDECertificates.Sql", "Migrate.Ssis", + "Service.Check.OCI", "Service.Upload.OCI", "Service.Install.OCI", + "MigrateSchemaSqlServerSqlDb". + :type task_type: str or ~azure.mgmt.datamigration.models.TaskType + :ivar errors: Array of errors. This is ignored if submitted. + :vartype errors: list[~azure.mgmt.datamigration.models.ODataError] + :ivar state: The state of the task. This is ignored if submitted. Possible values include: + "Unknown", "Queued", "Running", "Canceled", "Succeeded", "Failed", "FailedInputValidation", + "Faulted". + :vartype state: str or ~azure.mgmt.datamigration.models.TaskState + :ivar commands: Array of command properties. + :vartype commands: list[~azure.mgmt.datamigration.models.CommandProperties] + :param client_data: Key value pairs of client data to attach meta data information to task. + :type client_data: dict[str, str] + :param input: Task input. + :type input: ~azure.mgmt.datamigration.models.MigrateSchemaSqlServerSqlDbTaskInput + :ivar output: Task output. This is ignored if submitted. + :vartype output: list[~azure.mgmt.datamigration.models.MigrateSchemaSqlServerSqlDbTaskOutput] + :param created_on: DateTime in UTC when the task was created. + :type created_on: str + :param task_id: Task id. + :type task_id: str + """ + + _validation = { + 'task_type': {'required': True}, + 'errors': {'readonly': True}, + 'state': {'readonly': True}, + 'commands': {'readonly': True}, + 'output': {'readonly': True}, + } + + _attribute_map = { + 'task_type': {'key': 'taskType', 'type': 'str'}, + 'errors': {'key': 'errors', 'type': '[ODataError]'}, + 'state': {'key': 'state', 'type': 'str'}, + 'commands': {'key': 'commands', 'type': '[CommandProperties]'}, + 'client_data': {'key': 'clientData', 'type': '{str}'}, + 'input': {'key': 'input', 'type': 'MigrateSchemaSqlServerSqlDbTaskInput'}, + 'output': {'key': 'output', 'type': '[MigrateSchemaSqlServerSqlDbTaskOutput]'}, + 'created_on': {'key': 'createdOn', 'type': 'str'}, + 'task_id': {'key': 'taskId', 'type': 'str'}, + } + + def __init__( + self, + **kwargs + ): + super(MigrateSchemaSqlServerSqlDbTaskProperties, self).__init__(**kwargs) + self.task_type = 'MigrateSchemaSqlServerSqlDb' # type: str + self.input = kwargs.get('input', None) + self.output = None + self.created_on = kwargs.get('created_on', None) + self.task_id = kwargs.get('task_id', None) + + +class MigrateSchemaSqlTaskOutputError(MigrateSchemaSqlServerSqlDbTaskOutput): + """MigrateSchemaSqlTaskOutputError. + + Variables are only populated by the server, and will be ignored when sending a request. + + All required parameters must be populated in order to send to Azure. + + :ivar id: Result identifier. + :vartype id: str + :param result_type: Required. Result type.Constant filled by server. + :type result_type: str + :ivar error: Migration error. + :vartype error: ~azure.mgmt.datamigration.models.ReportableException + """ + + _validation = { + 'id': {'readonly': True}, + 'result_type': {'required': True}, + 'error': {'readonly': True}, + } + + _attribute_map = { + 'id': {'key': 'id', 'type': 'str'}, + 'result_type': {'key': 'resultType', 'type': 'str'}, + 'error': {'key': 'error', 'type': 'ReportableException'}, + } + + def __init__( + self, + **kwargs + ): + super(MigrateSchemaSqlTaskOutputError, self).__init__(**kwargs) + self.result_type = 'ErrorOutput' # type: str + self.error = None + + +class MigrateSqlServerDatabaseInput(msrest.serialization.Model): + """Database specific information for SQL to SQL migration task inputs. + + :param name: Name of the database. + :type name: str + :param restore_database_name: Name of the database at destination. + :type restore_database_name: str + :param backup_and_restore_folder: The backup and restore folder. + :type backup_and_restore_folder: str + :param database_files: The list of database files. + :type database_files: list[~azure.mgmt.datamigration.models.DatabaseFileInput] + """ + + _attribute_map = { + 'name': {'key': 'name', 'type': 'str'}, + 'restore_database_name': {'key': 'restoreDatabaseName', 'type': 'str'}, + 'backup_and_restore_folder': {'key': 'backupAndRestoreFolder', 'type': 'str'}, + 'database_files': {'key': 'databaseFiles', 'type': '[DatabaseFileInput]'}, + } + + def __init__( + self, + **kwargs + ): + super(MigrateSqlServerDatabaseInput, self).__init__(**kwargs) + self.name = kwargs.get('name', None) + self.restore_database_name = kwargs.get('restore_database_name', None) + self.backup_and_restore_folder = kwargs.get('backup_and_restore_folder', None) + self.database_files = kwargs.get('database_files', None) + + +class MigrateSqlServerSqlDbDatabaseInput(msrest.serialization.Model): + """Database specific information for SQL to Azure SQL DB migration task inputs. + + :param name: Name of the database. + :type name: str + :param target_database_name: Name of target database. Note: Target database will be truncated + before starting migration. + :type target_database_name: str + :param make_source_db_read_only: Whether to set database read only before migration. + :type make_source_db_read_only: bool + :param table_map: Mapping of source to target tables. + :type table_map: dict[str, str] + :param schema_setting: Settings selected for DB schema migration. + :type schema_setting: object + :param id: id of the database. + :type id: str + """ + + _attribute_map = { + 'name': {'key': 'name', 'type': 'str'}, + 'target_database_name': {'key': 'targetDatabaseName', 'type': 'str'}, + 'make_source_db_read_only': {'key': 'makeSourceDbReadOnly', 'type': 'bool'}, + 'table_map': {'key': 'tableMap', 'type': '{str}'}, + 'schema_setting': {'key': 'schemaSetting', 'type': 'object'}, + 'id': {'key': 'id', 'type': 'str'}, + } + + def __init__( + self, + **kwargs + ): + super(MigrateSqlServerSqlDbDatabaseInput, self).__init__(**kwargs) + self.name = kwargs.get('name', None) + self.target_database_name = kwargs.get('target_database_name', None) + self.make_source_db_read_only = kwargs.get('make_source_db_read_only', None) + self.table_map = kwargs.get('table_map', None) + self.schema_setting = kwargs.get('schema_setting', None) + self.id = kwargs.get('id', None) + + +class MigrateSqlServerSqlDbSyncDatabaseInput(msrest.serialization.Model): + """Database specific information for SQL to Azure SQL DB sync migration task inputs. + + :param id: Unique identifier for database. + :type id: str + :param name: Name of database. + :type name: str + :param target_database_name: Target database name. + :type target_database_name: str + :param schema_name: Schema name to be migrated. + :type schema_name: str + :param table_map: Mapping of source to target tables. + :type table_map: dict[str, str] + :param migration_setting: Migration settings which tune the migration behavior. + :type migration_setting: dict[str, str] + :param source_setting: Source settings to tune source endpoint migration behavior. + :type source_setting: dict[str, str] + :param target_setting: Target settings to tune target endpoint migration behavior. + :type target_setting: dict[str, str] + """ + + _attribute_map = { + 'id': {'key': 'id', 'type': 'str'}, + 'name': {'key': 'name', 'type': 'str'}, + 'target_database_name': {'key': 'targetDatabaseName', 'type': 'str'}, + 'schema_name': {'key': 'schemaName', 'type': 'str'}, + 'table_map': {'key': 'tableMap', 'type': '{str}'}, + 'migration_setting': {'key': 'migrationSetting', 'type': '{str}'}, + 'source_setting': {'key': 'sourceSetting', 'type': '{str}'}, + 'target_setting': {'key': 'targetSetting', 'type': '{str}'}, + } + + def __init__( + self, + **kwargs + ): + super(MigrateSqlServerSqlDbSyncDatabaseInput, self).__init__(**kwargs) + self.id = kwargs.get('id', None) + self.name = kwargs.get('name', None) + self.target_database_name = kwargs.get('target_database_name', None) + self.schema_name = kwargs.get('schema_name', None) + self.table_map = kwargs.get('table_map', None) + self.migration_setting = kwargs.get('migration_setting', None) + self.source_setting = kwargs.get('source_setting', None) + self.target_setting = kwargs.get('target_setting', None) + + +class MigrateSqlServerSqlDbSyncTaskInput(SqlMigrationTaskInput): + """Input for the task that migrates on-prem SQL Server databases to Azure SQL Database for online migrations. + + All required parameters must be populated in order to send to Azure. + + :param source_connection_info: Required. Information for connecting to source. + :type source_connection_info: ~azure.mgmt.datamigration.models.SqlConnectionInfo + :param target_connection_info: Required. Information for connecting to target. + :type target_connection_info: ~azure.mgmt.datamigration.models.SqlConnectionInfo + :param selected_databases: Required. Databases to migrate. + :type selected_databases: + list[~azure.mgmt.datamigration.models.MigrateSqlServerSqlDbSyncDatabaseInput] + :param validation_options: Validation options. + :type validation_options: ~azure.mgmt.datamigration.models.MigrationValidationOptions + """ + + _validation = { + 'source_connection_info': {'required': True}, + 'target_connection_info': {'required': True}, + 'selected_databases': {'required': True}, + } + + _attribute_map = { + 'source_connection_info': {'key': 'sourceConnectionInfo', 'type': 'SqlConnectionInfo'}, + 'target_connection_info': {'key': 'targetConnectionInfo', 'type': 'SqlConnectionInfo'}, + 'selected_databases': {'key': 'selectedDatabases', 'type': '[MigrateSqlServerSqlDbSyncDatabaseInput]'}, + 'validation_options': {'key': 'validationOptions', 'type': 'MigrationValidationOptions'}, + } + + def __init__( + self, + **kwargs + ): + super(MigrateSqlServerSqlDbSyncTaskInput, self).__init__(**kwargs) + self.selected_databases = kwargs['selected_databases'] + self.validation_options = kwargs.get('validation_options', None) + + +class MigrateSqlServerSqlDbSyncTaskOutput(msrest.serialization.Model): + """Output for the task that migrates on-prem SQL Server databases to Azure SQL Database for online migrations. + + You probably want to use the sub-classes and not this class directly. Known + sub-classes are: MigrateSqlServerSqlDbSyncTaskOutputDatabaseError, MigrateSqlServerSqlDbSyncTaskOutputDatabaseLevel, MigrateSqlServerSqlDbSyncTaskOutputError, MigrateSqlServerSqlDbSyncTaskOutputMigrationLevel, MigrateSqlServerSqlDbSyncTaskOutputTableLevel. + + Variables are only populated by the server, and will be ignored when sending a request. + + All required parameters must be populated in order to send to Azure. + + :ivar id: Result identifier. + :vartype id: str + :param result_type: Required. Result type.Constant filled by server. + :type result_type: str + """ + + _validation = { + 'id': {'readonly': True}, + 'result_type': {'required': True}, + } + + _attribute_map = { + 'id': {'key': 'id', 'type': 'str'}, + 'result_type': {'key': 'resultType', 'type': 'str'}, + } + + _subtype_map = { + 'result_type': {'DatabaseLevelErrorOutput': 'MigrateSqlServerSqlDbSyncTaskOutputDatabaseError', 'DatabaseLevelOutput': 'MigrateSqlServerSqlDbSyncTaskOutputDatabaseLevel', 'ErrorOutput': 'MigrateSqlServerSqlDbSyncTaskOutputError', 'MigrationLevelOutput': 'MigrateSqlServerSqlDbSyncTaskOutputMigrationLevel', 'TableLevelOutput': 'MigrateSqlServerSqlDbSyncTaskOutputTableLevel'} + } + + def __init__( + self, + **kwargs + ): + super(MigrateSqlServerSqlDbSyncTaskOutput, self).__init__(**kwargs) + self.id = None + self.result_type = None # type: Optional[str] + + +class MigrateSqlServerSqlDbSyncTaskOutputDatabaseError(MigrateSqlServerSqlDbSyncTaskOutput): + """MigrateSqlServerSqlDbSyncTaskOutputDatabaseError. + + Variables are only populated by the server, and will be ignored when sending a request. + + All required parameters must be populated in order to send to Azure. + + :ivar id: Result identifier. + :vartype id: str + :param result_type: Required. Result type.Constant filled by server. + :type result_type: str + :param error_message: Error message. + :type error_message: str + :param events: List of error events. + :type events: list[~azure.mgmt.datamigration.models.SyncMigrationDatabaseErrorEvent] + """ + + _validation = { + 'id': {'readonly': True}, + 'result_type': {'required': True}, + } + + _attribute_map = { + 'id': {'key': 'id', 'type': 'str'}, + 'result_type': {'key': 'resultType', 'type': 'str'}, + 'error_message': {'key': 'errorMessage', 'type': 'str'}, + 'events': {'key': 'events', 'type': '[SyncMigrationDatabaseErrorEvent]'}, + } + + def __init__( + self, + **kwargs + ): + super(MigrateSqlServerSqlDbSyncTaskOutputDatabaseError, self).__init__(**kwargs) + self.result_type = 'DatabaseLevelErrorOutput' # type: str + self.error_message = kwargs.get('error_message', None) + self.events = kwargs.get('events', None) + + +class MigrateSqlServerSqlDbSyncTaskOutputDatabaseLevel(MigrateSqlServerSqlDbSyncTaskOutput): + """MigrateSqlServerSqlDbSyncTaskOutputDatabaseLevel. + + Variables are only populated by the server, and will be ignored when sending a request. + + All required parameters must be populated in order to send to Azure. + + :ivar id: Result identifier. + :vartype id: str + :param result_type: Required. Result type.Constant filled by server. + :type result_type: str + :ivar database_name: Name of the database. + :vartype database_name: str + :ivar started_on: Migration start time. + :vartype started_on: ~datetime.datetime + :ivar ended_on: Migration end time. + :vartype ended_on: ~datetime.datetime + :ivar migration_state: Migration state that this database is in. Possible values include: + "UNDEFINED", "CONFIGURING", "INITIALIAZING", "STARTING", "RUNNING", "READY_TO_COMPLETE", + "COMPLETING", "COMPLETE", "CANCELLING", "CANCELLED", "FAILED", "VALIDATING", + "VALIDATION_COMPLETE", "VALIDATION_FAILED", "RESTORE_IN_PROGRESS", "RESTORE_COMPLETED", + "BACKUP_IN_PROGRESS", "BACKUP_COMPLETED". + :vartype migration_state: str or + ~azure.mgmt.datamigration.models.SyncDatabaseMigrationReportingState + :ivar incoming_changes: Number of incoming changes. + :vartype incoming_changes: long + :ivar applied_changes: Number of applied changes. + :vartype applied_changes: long + :ivar cdc_insert_counter: Number of cdc inserts. + :vartype cdc_insert_counter: long + :ivar cdc_delete_counter: Number of cdc deletes. + :vartype cdc_delete_counter: long + :ivar cdc_update_counter: Number of cdc updates. + :vartype cdc_update_counter: long + :ivar full_load_completed_tables: Number of tables completed in full load. + :vartype full_load_completed_tables: long + :ivar full_load_loading_tables: Number of tables loading in full load. + :vartype full_load_loading_tables: long + :ivar full_load_queued_tables: Number of tables queued in full load. + :vartype full_load_queued_tables: long + :ivar full_load_errored_tables: Number of tables errored in full load. + :vartype full_load_errored_tables: long + :ivar initialization_completed: Indicates if initial load (full load) has been completed. + :vartype initialization_completed: bool + :ivar latency: CDC apply latency. + :vartype latency: long + """ + + _validation = { + 'id': {'readonly': True}, + 'result_type': {'required': True}, + 'database_name': {'readonly': True}, + 'started_on': {'readonly': True}, + 'ended_on': {'readonly': True}, + 'migration_state': {'readonly': True}, + 'incoming_changes': {'readonly': True}, + 'applied_changes': {'readonly': True}, + 'cdc_insert_counter': {'readonly': True}, + 'cdc_delete_counter': {'readonly': True}, + 'cdc_update_counter': {'readonly': True}, + 'full_load_completed_tables': {'readonly': True}, + 'full_load_loading_tables': {'readonly': True}, + 'full_load_queued_tables': {'readonly': True}, + 'full_load_errored_tables': {'readonly': True}, + 'initialization_completed': {'readonly': True}, + 'latency': {'readonly': True}, + } + + _attribute_map = { + 'id': {'key': 'id', 'type': 'str'}, + 'result_type': {'key': 'resultType', 'type': 'str'}, + 'database_name': {'key': 'databaseName', 'type': 'str'}, + 'started_on': {'key': 'startedOn', 'type': 'iso-8601'}, + 'ended_on': {'key': 'endedOn', 'type': 'iso-8601'}, + 'migration_state': {'key': 'migrationState', 'type': 'str'}, + 'incoming_changes': {'key': 'incomingChanges', 'type': 'long'}, + 'applied_changes': {'key': 'appliedChanges', 'type': 'long'}, + 'cdc_insert_counter': {'key': 'cdcInsertCounter', 'type': 'long'}, + 'cdc_delete_counter': {'key': 'cdcDeleteCounter', 'type': 'long'}, + 'cdc_update_counter': {'key': 'cdcUpdateCounter', 'type': 'long'}, + 'full_load_completed_tables': {'key': 'fullLoadCompletedTables', 'type': 'long'}, + 'full_load_loading_tables': {'key': 'fullLoadLoadingTables', 'type': 'long'}, + 'full_load_queued_tables': {'key': 'fullLoadQueuedTables', 'type': 'long'}, + 'full_load_errored_tables': {'key': 'fullLoadErroredTables', 'type': 'long'}, + 'initialization_completed': {'key': 'initializationCompleted', 'type': 'bool'}, + 'latency': {'key': 'latency', 'type': 'long'}, + } + + def __init__( + self, + **kwargs + ): + super(MigrateSqlServerSqlDbSyncTaskOutputDatabaseLevel, self).__init__(**kwargs) + self.result_type = 'DatabaseLevelOutput' # type: str + self.database_name = None + self.started_on = None + self.ended_on = None + self.migration_state = None + self.incoming_changes = None + self.applied_changes = None + self.cdc_insert_counter = None + self.cdc_delete_counter = None + self.cdc_update_counter = None + self.full_load_completed_tables = None + self.full_load_loading_tables = None + self.full_load_queued_tables = None + self.full_load_errored_tables = None + self.initialization_completed = None + self.latency = None + + +class MigrateSqlServerSqlDbSyncTaskOutputError(MigrateSqlServerSqlDbSyncTaskOutput): + """MigrateSqlServerSqlDbSyncTaskOutputError. + + Variables are only populated by the server, and will be ignored when sending a request. + + All required parameters must be populated in order to send to Azure. + + :ivar id: Result identifier. + :vartype id: str + :param result_type: Required. Result type.Constant filled by server. + :type result_type: str + :ivar error: Migration error. + :vartype error: ~azure.mgmt.datamigration.models.ReportableException + """ + + _validation = { + 'id': {'readonly': True}, + 'result_type': {'required': True}, + 'error': {'readonly': True}, + } + + _attribute_map = { + 'id': {'key': 'id', 'type': 'str'}, + 'result_type': {'key': 'resultType', 'type': 'str'}, + 'error': {'key': 'error', 'type': 'ReportableException'}, + } + + def __init__( + self, + **kwargs + ): + super(MigrateSqlServerSqlDbSyncTaskOutputError, self).__init__(**kwargs) + self.result_type = 'ErrorOutput' # type: str + self.error = None + + +class MigrateSqlServerSqlDbSyncTaskOutputMigrationLevel(MigrateSqlServerSqlDbSyncTaskOutput): + """MigrateSqlServerSqlDbSyncTaskOutputMigrationLevel. + + Variables are only populated by the server, and will be ignored when sending a request. + + All required parameters must be populated in order to send to Azure. + + :ivar id: Result identifier. + :vartype id: str + :param result_type: Required. Result type.Constant filled by server. + :type result_type: str + :ivar started_on: Migration start time. + :vartype started_on: ~datetime.datetime + :ivar ended_on: Migration end time. + :vartype ended_on: ~datetime.datetime + :ivar source_server_version: Source server version. + :vartype source_server_version: str + :ivar source_server: Source server name. + :vartype source_server: str + :ivar target_server_version: Target server version. + :vartype target_server_version: str + :ivar target_server: Target server name. + :vartype target_server: str + :ivar database_count: Count of databases. + :vartype database_count: int + """ + + _validation = { + 'id': {'readonly': True}, + 'result_type': {'required': True}, + 'started_on': {'readonly': True}, + 'ended_on': {'readonly': True}, + 'source_server_version': {'readonly': True}, + 'source_server': {'readonly': True}, + 'target_server_version': {'readonly': True}, + 'target_server': {'readonly': True}, + 'database_count': {'readonly': True}, + } + + _attribute_map = { + 'id': {'key': 'id', 'type': 'str'}, + 'result_type': {'key': 'resultType', 'type': 'str'}, + 'started_on': {'key': 'startedOn', 'type': 'iso-8601'}, + 'ended_on': {'key': 'endedOn', 'type': 'iso-8601'}, + 'source_server_version': {'key': 'sourceServerVersion', 'type': 'str'}, + 'source_server': {'key': 'sourceServer', 'type': 'str'}, + 'target_server_version': {'key': 'targetServerVersion', 'type': 'str'}, + 'target_server': {'key': 'targetServer', 'type': 'str'}, + 'database_count': {'key': 'databaseCount', 'type': 'int'}, + } + + def __init__( + self, + **kwargs + ): + super(MigrateSqlServerSqlDbSyncTaskOutputMigrationLevel, self).__init__(**kwargs) + self.result_type = 'MigrationLevelOutput' # type: str + self.started_on = None + self.ended_on = None + self.source_server_version = None + self.source_server = None + self.target_server_version = None + self.target_server = None + self.database_count = None + + +class MigrateSqlServerSqlDbSyncTaskOutputTableLevel(MigrateSqlServerSqlDbSyncTaskOutput): + """MigrateSqlServerSqlDbSyncTaskOutputTableLevel. + + Variables are only populated by the server, and will be ignored when sending a request. + + All required parameters must be populated in order to send to Azure. + + :ivar id: Result identifier. + :vartype id: str + :param result_type: Required. Result type.Constant filled by server. + :type result_type: str + :ivar table_name: Name of the table. + :vartype table_name: str + :ivar database_name: Name of the database. + :vartype database_name: str + :ivar cdc_insert_counter: Number of applied inserts. + :vartype cdc_insert_counter: long + :ivar cdc_update_counter: Number of applied updates. + :vartype cdc_update_counter: long + :ivar cdc_delete_counter: Number of applied deletes. + :vartype cdc_delete_counter: long + :ivar full_load_est_finish_time: Estimate to finish full load. + :vartype full_load_est_finish_time: ~datetime.datetime + :ivar full_load_started_on: Full load start time. + :vartype full_load_started_on: ~datetime.datetime + :ivar full_load_ended_on: Full load end time. + :vartype full_load_ended_on: ~datetime.datetime + :ivar full_load_total_rows: Number of rows applied in full load. + :vartype full_load_total_rows: long + :ivar state: Current state of the table migration. Possible values include: "BEFORE_LOAD", + "FULL_LOAD", "COMPLETED", "CANCELED", "ERROR", "FAILED". + :vartype state: str or ~azure.mgmt.datamigration.models.SyncTableMigrationState + :ivar total_changes_applied: Total number of applied changes. + :vartype total_changes_applied: long + :ivar data_errors_counter: Number of data errors occurred. + :vartype data_errors_counter: long + :ivar last_modified_time: Last modified time on target. + :vartype last_modified_time: ~datetime.datetime + """ + + _validation = { + 'id': {'readonly': True}, + 'result_type': {'required': True}, + 'table_name': {'readonly': True}, + 'database_name': {'readonly': True}, + 'cdc_insert_counter': {'readonly': True}, + 'cdc_update_counter': {'readonly': True}, + 'cdc_delete_counter': {'readonly': True}, + 'full_load_est_finish_time': {'readonly': True}, + 'full_load_started_on': {'readonly': True}, + 'full_load_ended_on': {'readonly': True}, + 'full_load_total_rows': {'readonly': True}, + 'state': {'readonly': True}, + 'total_changes_applied': {'readonly': True}, + 'data_errors_counter': {'readonly': True}, + 'last_modified_time': {'readonly': True}, + } + + _attribute_map = { + 'id': {'key': 'id', 'type': 'str'}, + 'result_type': {'key': 'resultType', 'type': 'str'}, + 'table_name': {'key': 'tableName', 'type': 'str'}, + 'database_name': {'key': 'databaseName', 'type': 'str'}, + 'cdc_insert_counter': {'key': 'cdcInsertCounter', 'type': 'long'}, + 'cdc_update_counter': {'key': 'cdcUpdateCounter', 'type': 'long'}, + 'cdc_delete_counter': {'key': 'cdcDeleteCounter', 'type': 'long'}, + 'full_load_est_finish_time': {'key': 'fullLoadEstFinishTime', 'type': 'iso-8601'}, + 'full_load_started_on': {'key': 'fullLoadStartedOn', 'type': 'iso-8601'}, + 'full_load_ended_on': {'key': 'fullLoadEndedOn', 'type': 'iso-8601'}, + 'full_load_total_rows': {'key': 'fullLoadTotalRows', 'type': 'long'}, + 'state': {'key': 'state', 'type': 'str'}, + 'total_changes_applied': {'key': 'totalChangesApplied', 'type': 'long'}, + 'data_errors_counter': {'key': 'dataErrorsCounter', 'type': 'long'}, + 'last_modified_time': {'key': 'lastModifiedTime', 'type': 'iso-8601'}, + } + + def __init__( + self, + **kwargs + ): + super(MigrateSqlServerSqlDbSyncTaskOutputTableLevel, self).__init__(**kwargs) + self.result_type = 'TableLevelOutput' # type: str + self.table_name = None + self.database_name = None + self.cdc_insert_counter = None + self.cdc_update_counter = None + self.cdc_delete_counter = None + self.full_load_est_finish_time = None + self.full_load_started_on = None + self.full_load_ended_on = None + self.full_load_total_rows = None + self.state = None + self.total_changes_applied = None + self.data_errors_counter = None + self.last_modified_time = None + + +class MigrateSqlServerSqlDbSyncTaskProperties(ProjectTaskProperties): + """Properties for the task that migrates on-prem SQL Server databases to Azure SQL Database for online migrations. + + Variables are only populated by the server, and will be ignored when sending a request. + + All required parameters must be populated in order to send to Azure. + + :param task_type: Required. Task type.Constant filled by server. Possible values include: + "Connect.MongoDb", "ConnectToSource.SqlServer", "ConnectToSource.SqlServer.Sync", + "ConnectToSource.PostgreSql.Sync", "ConnectToSource.MySql", "ConnectToSource.Oracle.Sync", + "ConnectToTarget.SqlDb", "ConnectToTarget.SqlDb.Sync", + "ConnectToTarget.AzureDbForPostgreSql.Sync", + "ConnectToTarget.Oracle.AzureDbForPostgreSql.Sync", "ConnectToTarget.AzureSqlDbMI", + "ConnectToTarget.AzureSqlDbMI.Sync.LRS", "ConnectToTarget.AzureDbForMySql", + "GetUserTables.Sql", "GetUserTables.AzureSqlDb.Sync", "GetUserTablesOracle", + "GetUserTablesPostgreSql", "GetUserTablesMySql", "Migrate.MongoDb", + "Migrate.SqlServer.AzureSqlDbMI", "Migrate.SqlServer.AzureSqlDbMI.Sync.LRS", + "Migrate.SqlServer.SqlDb", "Migrate.SqlServer.AzureSqlDb.Sync", + "Migrate.MySql.AzureDbForMySql.Sync", "Migrate.MySql.AzureDbForMySql", + "Migrate.PostgreSql.AzureDbForPostgreSql.SyncV2", "Migrate.Oracle.AzureDbForPostgreSql.Sync", + "ValidateMigrationInput.SqlServer.SqlDb.Sync", "ValidateMigrationInput.SqlServer.AzureSqlDbMI", + "ValidateMigrationInput.SqlServer.AzureSqlDbMI.Sync.LRS", "Validate.MongoDb", + "Validate.Oracle.AzureDbPostgreSql.Sync", "GetTDECertificates.Sql", "Migrate.Ssis", + "Service.Check.OCI", "Service.Upload.OCI", "Service.Install.OCI", + "MigrateSchemaSqlServerSqlDb". + :type task_type: str or ~azure.mgmt.datamigration.models.TaskType + :ivar errors: Array of errors. This is ignored if submitted. + :vartype errors: list[~azure.mgmt.datamigration.models.ODataError] + :ivar state: The state of the task. This is ignored if submitted. Possible values include: + "Unknown", "Queued", "Running", "Canceled", "Succeeded", "Failed", "FailedInputValidation", + "Faulted". + :vartype state: str or ~azure.mgmt.datamigration.models.TaskState + :ivar commands: Array of command properties. + :vartype commands: list[~azure.mgmt.datamigration.models.CommandProperties] + :param client_data: Key value pairs of client data to attach meta data information to task. + :type client_data: dict[str, str] + :param input: Task input. + :type input: ~azure.mgmt.datamigration.models.MigrateSqlServerSqlDbSyncTaskInput + :ivar output: Task output. This is ignored if submitted. + :vartype output: list[~azure.mgmt.datamigration.models.MigrateSqlServerSqlDbSyncTaskOutput] + """ + + _validation = { + 'task_type': {'required': True}, + 'errors': {'readonly': True}, + 'state': {'readonly': True}, + 'commands': {'readonly': True}, + 'output': {'readonly': True}, + } + + _attribute_map = { + 'task_type': {'key': 'taskType', 'type': 'str'}, + 'errors': {'key': 'errors', 'type': '[ODataError]'}, + 'state': {'key': 'state', 'type': 'str'}, + 'commands': {'key': 'commands', 'type': '[CommandProperties]'}, + 'client_data': {'key': 'clientData', 'type': '{str}'}, + 'input': {'key': 'input', 'type': 'MigrateSqlServerSqlDbSyncTaskInput'}, + 'output': {'key': 'output', 'type': '[MigrateSqlServerSqlDbSyncTaskOutput]'}, + } + + def __init__( + self, + **kwargs + ): + super(MigrateSqlServerSqlDbSyncTaskProperties, self).__init__(**kwargs) + self.task_type = 'Migrate.SqlServer.AzureSqlDb.Sync' # type: str + self.input = kwargs.get('input', None) + self.output = None + + +class MigrateSqlServerSqlDbTaskInput(SqlMigrationTaskInput): + """Input for the task that migrates on-prem SQL Server databases to Azure SQL Database. + + All required parameters must be populated in order to send to Azure. + + :param source_connection_info: Required. Information for connecting to source. + :type source_connection_info: ~azure.mgmt.datamigration.models.SqlConnectionInfo + :param target_connection_info: Required. Information for connecting to target. + :type target_connection_info: ~azure.mgmt.datamigration.models.SqlConnectionInfo + :param selected_databases: Required. Databases to migrate. + :type selected_databases: + list[~azure.mgmt.datamigration.models.MigrateSqlServerSqlDbDatabaseInput] + :param validation_options: Options for enabling various post migration validations. Available + options, + 1.) Data Integrity Check: Performs a checksum based comparison on source and target tables + after the migration to ensure the correctness of the data. + 2.) Schema Validation: Performs a thorough schema comparison between the source and target + tables and provides a list of differences between the source and target database, 3.) Query + Analysis: Executes a set of queries picked up automatically either from the Query Plan Cache or + Query Store and execute them and compares the execution time between the source and target + database. + :type validation_options: ~azure.mgmt.datamigration.models.MigrationValidationOptions + :param started_on: Date and time relative to UTC when the migration was started on. + :type started_on: str + :param encrypted_key_for_secure_fields: encrypted key for secure fields. + :type encrypted_key_for_secure_fields: str + """ + + _validation = { + 'source_connection_info': {'required': True}, + 'target_connection_info': {'required': True}, + 'selected_databases': {'required': True}, + } + + _attribute_map = { + 'source_connection_info': {'key': 'sourceConnectionInfo', 'type': 'SqlConnectionInfo'}, + 'target_connection_info': {'key': 'targetConnectionInfo', 'type': 'SqlConnectionInfo'}, + 'selected_databases': {'key': 'selectedDatabases', 'type': '[MigrateSqlServerSqlDbDatabaseInput]'}, + 'validation_options': {'key': 'validationOptions', 'type': 'MigrationValidationOptions'}, + 'started_on': {'key': 'startedOn', 'type': 'str'}, + 'encrypted_key_for_secure_fields': {'key': 'encryptedKeyForSecureFields', 'type': 'str'}, + } + + def __init__( + self, + **kwargs + ): + super(MigrateSqlServerSqlDbTaskInput, self).__init__(**kwargs) + self.selected_databases = kwargs['selected_databases'] + self.validation_options = kwargs.get('validation_options', None) + self.started_on = kwargs.get('started_on', None) + self.encrypted_key_for_secure_fields = kwargs.get('encrypted_key_for_secure_fields', None) + + +class MigrateSqlServerSqlDbTaskOutput(msrest.serialization.Model): + """Output for the task that migrates on-prem SQL Server databases to Azure SQL Database. + + You probably want to use the sub-classes and not this class directly. Known + sub-classes are: MigrateSqlServerSqlDbTaskOutputDatabaseLevel, MigrateSqlServerSqlDbTaskOutputError, MigrateSqlServerSqlDbTaskOutputDatabaseLevelValidationResult, MigrateSqlServerSqlDbTaskOutputMigrationLevel, MigrateSqlServerSqlDbTaskOutputValidationResult, MigrateSqlServerSqlDbTaskOutputTableLevel. + + Variables are only populated by the server, and will be ignored when sending a request. + + All required parameters must be populated in order to send to Azure. + + :ivar id: Result identifier. + :vartype id: str + :param result_type: Required. Result type.Constant filled by server. + :type result_type: str + """ + + _validation = { + 'id': {'readonly': True}, + 'result_type': {'required': True}, + } + + _attribute_map = { + 'id': {'key': 'id', 'type': 'str'}, + 'result_type': {'key': 'resultType', 'type': 'str'}, + } + + _subtype_map = { + 'result_type': {'DatabaseLevelOutput': 'MigrateSqlServerSqlDbTaskOutputDatabaseLevel', 'ErrorOutput': 'MigrateSqlServerSqlDbTaskOutputError', 'MigrationDatabaseLevelValidationOutput': 'MigrateSqlServerSqlDbTaskOutputDatabaseLevelValidationResult', 'MigrationLevelOutput': 'MigrateSqlServerSqlDbTaskOutputMigrationLevel', 'MigrationValidationOutput': 'MigrateSqlServerSqlDbTaskOutputValidationResult', 'TableLevelOutput': 'MigrateSqlServerSqlDbTaskOutputTableLevel'} + } + + def __init__( + self, + **kwargs + ): + super(MigrateSqlServerSqlDbTaskOutput, self).__init__(**kwargs) + self.id = None + self.result_type = None # type: Optional[str] + + +class MigrateSqlServerSqlDbTaskOutputDatabaseLevel(MigrateSqlServerSqlDbTaskOutput): + """MigrateSqlServerSqlDbTaskOutputDatabaseLevel. + + Variables are only populated by the server, and will be ignored when sending a request. + + All required parameters must be populated in order to send to Azure. + + :ivar id: Result identifier. + :vartype id: str + :param result_type: Required. Result type.Constant filled by server. + :type result_type: str + :ivar database_name: Name of the item. + :vartype database_name: str + :ivar started_on: Migration start time. + :vartype started_on: ~datetime.datetime + :ivar ended_on: Migration end time. + :vartype ended_on: ~datetime.datetime + :ivar state: Current state of migration. Possible values include: "None", "InProgress", + "Failed", "Warning", "Completed", "Skipped", "Stopped". + :vartype state: str or ~azure.mgmt.datamigration.models.MigrationState + :ivar stage: Migration stage that this database is in. Possible values include: "None", + "Initialize", "Backup", "FileCopy", "Restore", "Completed". + :vartype stage: str or ~azure.mgmt.datamigration.models.DatabaseMigrationStage + :ivar status_message: Status message. + :vartype status_message: str + :ivar message: Migration progress message. + :vartype message: str + :ivar number_of_objects: Number of objects. + :vartype number_of_objects: long + :ivar number_of_objects_completed: Number of successfully completed objects. + :vartype number_of_objects_completed: long + :ivar error_count: Number of database/object errors. + :vartype error_count: long + :ivar error_prefix: Wildcard string prefix to use for querying all errors of the item. + :vartype error_prefix: str + :ivar result_prefix: Wildcard string prefix to use for querying all sub-tem results of the + item. + :vartype result_prefix: str + :ivar exceptions_and_warnings: Migration exceptions and warnings. + :vartype exceptions_and_warnings: list[~azure.mgmt.datamigration.models.ReportableException] + :ivar object_summary: Summary of object results in the migration. + :vartype object_summary: str + """ + + _validation = { + 'id': {'readonly': True}, + 'result_type': {'required': True}, + 'database_name': {'readonly': True}, + 'started_on': {'readonly': True}, + 'ended_on': {'readonly': True}, + 'state': {'readonly': True}, + 'stage': {'readonly': True}, + 'status_message': {'readonly': True}, + 'message': {'readonly': True}, + 'number_of_objects': {'readonly': True}, + 'number_of_objects_completed': {'readonly': True}, + 'error_count': {'readonly': True}, + 'error_prefix': {'readonly': True}, + 'result_prefix': {'readonly': True}, + 'exceptions_and_warnings': {'readonly': True}, + 'object_summary': {'readonly': True}, + } + + _attribute_map = { + 'id': {'key': 'id', 'type': 'str'}, + 'result_type': {'key': 'resultType', 'type': 'str'}, + 'database_name': {'key': 'databaseName', 'type': 'str'}, + 'started_on': {'key': 'startedOn', 'type': 'iso-8601'}, + 'ended_on': {'key': 'endedOn', 'type': 'iso-8601'}, + 'state': {'key': 'state', 'type': 'str'}, + 'stage': {'key': 'stage', 'type': 'str'}, + 'status_message': {'key': 'statusMessage', 'type': 'str'}, + 'message': {'key': 'message', 'type': 'str'}, + 'number_of_objects': {'key': 'numberOfObjects', 'type': 'long'}, + 'number_of_objects_completed': {'key': 'numberOfObjectsCompleted', 'type': 'long'}, + 'error_count': {'key': 'errorCount', 'type': 'long'}, + 'error_prefix': {'key': 'errorPrefix', 'type': 'str'}, + 'result_prefix': {'key': 'resultPrefix', 'type': 'str'}, + 'exceptions_and_warnings': {'key': 'exceptionsAndWarnings', 'type': '[ReportableException]'}, + 'object_summary': {'key': 'objectSummary', 'type': 'str'}, + } + + def __init__( + self, + **kwargs + ): + super(MigrateSqlServerSqlDbTaskOutputDatabaseLevel, self).__init__(**kwargs) + self.result_type = 'DatabaseLevelOutput' # type: str + self.database_name = None + self.started_on = None + self.ended_on = None + self.state = None + self.stage = None + self.status_message = None + self.message = None + self.number_of_objects = None + self.number_of_objects_completed = None + self.error_count = None + self.error_prefix = None + self.result_prefix = None + self.exceptions_and_warnings = None + self.object_summary = None + + +class MigrationValidationDatabaseLevelResult(msrest.serialization.Model): + """Database level validation results. + + Variables are only populated by the server, and will be ignored when sending a request. + + :ivar id: Result identifier. + :vartype id: str + :ivar migration_id: Migration Identifier. + :vartype migration_id: str + :ivar source_database_name: Name of the source database. + :vartype source_database_name: str + :ivar target_database_name: Name of the target database. + :vartype target_database_name: str + :ivar started_on: Validation start time. + :vartype started_on: ~datetime.datetime + :ivar ended_on: Validation end time. + :vartype ended_on: ~datetime.datetime + :ivar data_integrity_validation_result: Provides data integrity validation result between the + source and target tables that are migrated. + :vartype data_integrity_validation_result: + ~azure.mgmt.datamigration.models.DataIntegrityValidationResult + :ivar schema_validation_result: Provides schema comparison result between source and target + database. + :vartype schema_validation_result: + ~azure.mgmt.datamigration.models.SchemaComparisonValidationResult + :ivar query_analysis_validation_result: Results of some of the query execution result between + source and target database. + :vartype query_analysis_validation_result: + ~azure.mgmt.datamigration.models.QueryAnalysisValidationResult + :ivar status: Current status of validation at the database level. Possible values include: + "Default", "NotStarted", "Initialized", "InProgress", "Completed", "CompletedWithIssues", + "Stopped", "Failed". + :vartype status: str or ~azure.mgmt.datamigration.models.ValidationStatus + """ + + _validation = { + 'id': {'readonly': True}, + 'migration_id': {'readonly': True}, + 'source_database_name': {'readonly': True}, + 'target_database_name': {'readonly': True}, + 'started_on': {'readonly': True}, + 'ended_on': {'readonly': True}, + 'data_integrity_validation_result': {'readonly': True}, + 'schema_validation_result': {'readonly': True}, + 'query_analysis_validation_result': {'readonly': True}, + 'status': {'readonly': True}, + } + + _attribute_map = { + 'id': {'key': 'id', 'type': 'str'}, + 'migration_id': {'key': 'migrationId', 'type': 'str'}, + 'source_database_name': {'key': 'sourceDatabaseName', 'type': 'str'}, + 'target_database_name': {'key': 'targetDatabaseName', 'type': 'str'}, + 'started_on': {'key': 'startedOn', 'type': 'iso-8601'}, + 'ended_on': {'key': 'endedOn', 'type': 'iso-8601'}, + 'data_integrity_validation_result': {'key': 'dataIntegrityValidationResult', 'type': 'DataIntegrityValidationResult'}, + 'schema_validation_result': {'key': 'schemaValidationResult', 'type': 'SchemaComparisonValidationResult'}, + 'query_analysis_validation_result': {'key': 'queryAnalysisValidationResult', 'type': 'QueryAnalysisValidationResult'}, + 'status': {'key': 'status', 'type': 'str'}, + } + + def __init__( + self, + **kwargs + ): + super(MigrationValidationDatabaseLevelResult, self).__init__(**kwargs) + self.id = None + self.migration_id = None + self.source_database_name = None + self.target_database_name = None + self.started_on = None + self.ended_on = None + self.data_integrity_validation_result = None + self.schema_validation_result = None + self.query_analysis_validation_result = None + self.status = None + + +class MigrateSqlServerSqlDbTaskOutputDatabaseLevelValidationResult(MigrateSqlServerSqlDbTaskOutput, MigrationValidationDatabaseLevelResult): + """MigrateSqlServerSqlDbTaskOutputDatabaseLevelValidationResult. + + Variables are only populated by the server, and will be ignored when sending a request. + + All required parameters must be populated in order to send to Azure. + + :ivar migration_id: Migration Identifier. + :vartype migration_id: str + :ivar source_database_name: Name of the source database. + :vartype source_database_name: str + :ivar target_database_name: Name of the target database. + :vartype target_database_name: str + :ivar started_on: Validation start time. + :vartype started_on: ~datetime.datetime + :ivar ended_on: Validation end time. + :vartype ended_on: ~datetime.datetime + :ivar data_integrity_validation_result: Provides data integrity validation result between the + source and target tables that are migrated. + :vartype data_integrity_validation_result: + ~azure.mgmt.datamigration.models.DataIntegrityValidationResult + :ivar schema_validation_result: Provides schema comparison result between source and target + database. + :vartype schema_validation_result: + ~azure.mgmt.datamigration.models.SchemaComparisonValidationResult + :ivar query_analysis_validation_result: Results of some of the query execution result between + source and target database. + :vartype query_analysis_validation_result: + ~azure.mgmt.datamigration.models.QueryAnalysisValidationResult + :ivar status: Current status of validation at the database level. Possible values include: + "Default", "NotStarted", "Initialized", "InProgress", "Completed", "CompletedWithIssues", + "Stopped", "Failed". + :vartype status: str or ~azure.mgmt.datamigration.models.ValidationStatus + :ivar id: Result identifier. + :vartype id: str + :param result_type: Required. Result type.Constant filled by server. + :type result_type: str + """ + + _validation = { + 'migration_id': {'readonly': True}, + 'source_database_name': {'readonly': True}, + 'target_database_name': {'readonly': True}, + 'started_on': {'readonly': True}, + 'ended_on': {'readonly': True}, + 'data_integrity_validation_result': {'readonly': True}, + 'schema_validation_result': {'readonly': True}, + 'query_analysis_validation_result': {'readonly': True}, + 'status': {'readonly': True}, + 'id': {'readonly': True}, + 'result_type': {'required': True}, + } + + _attribute_map = { + 'migration_id': {'key': 'migrationId', 'type': 'str'}, + 'source_database_name': {'key': 'sourceDatabaseName', 'type': 'str'}, + 'target_database_name': {'key': 'targetDatabaseName', 'type': 'str'}, + 'started_on': {'key': 'startedOn', 'type': 'iso-8601'}, + 'ended_on': {'key': 'endedOn', 'type': 'iso-8601'}, + 'data_integrity_validation_result': {'key': 'dataIntegrityValidationResult', 'type': 'DataIntegrityValidationResult'}, + 'schema_validation_result': {'key': 'schemaValidationResult', 'type': 'SchemaComparisonValidationResult'}, + 'query_analysis_validation_result': {'key': 'queryAnalysisValidationResult', 'type': 'QueryAnalysisValidationResult'}, + 'status': {'key': 'status', 'type': 'str'}, + 'id': {'key': 'id', 'type': 'str'}, + 'result_type': {'key': 'resultType', 'type': 'str'}, + } + + def __init__( + self, + **kwargs + ): + super(MigrateSqlServerSqlDbTaskOutputDatabaseLevelValidationResult, self).__init__(**kwargs) + self.migration_id = None + self.source_database_name = None + self.target_database_name = None + self.started_on = None + self.ended_on = None + self.data_integrity_validation_result = None + self.schema_validation_result = None + self.query_analysis_validation_result = None + self.status = None + self.result_type = 'MigrationDatabaseLevelValidationOutput' # type: str + self.id = None + self.result_type = 'MigrationDatabaseLevelValidationOutput' # type: str + + +class MigrateSqlServerSqlDbTaskOutputError(MigrateSqlServerSqlDbTaskOutput): + """MigrateSqlServerSqlDbTaskOutputError. + + Variables are only populated by the server, and will be ignored when sending a request. + + All required parameters must be populated in order to send to Azure. + + :ivar id: Result identifier. + :vartype id: str + :param result_type: Required. Result type.Constant filled by server. + :type result_type: str + :ivar error: Migration error. + :vartype error: ~azure.mgmt.datamigration.models.ReportableException + """ + + _validation = { + 'id': {'readonly': True}, + 'result_type': {'required': True}, + 'error': {'readonly': True}, + } + + _attribute_map = { + 'id': {'key': 'id', 'type': 'str'}, + 'result_type': {'key': 'resultType', 'type': 'str'}, + 'error': {'key': 'error', 'type': 'ReportableException'}, + } + + def __init__( + self, + **kwargs + ): + super(MigrateSqlServerSqlDbTaskOutputError, self).__init__(**kwargs) + self.result_type = 'ErrorOutput' # type: str + self.error = None + + +class MigrateSqlServerSqlDbTaskOutputMigrationLevel(MigrateSqlServerSqlDbTaskOutput): + """MigrateSqlServerSqlDbTaskOutputMigrationLevel. + + Variables are only populated by the server, and will be ignored when sending a request. + + All required parameters must be populated in order to send to Azure. + + :ivar id: Result identifier. + :vartype id: str + :param result_type: Required. Result type.Constant filled by server. + :type result_type: str + :ivar started_on: Migration start time. + :vartype started_on: ~datetime.datetime + :ivar ended_on: Migration end time. + :vartype ended_on: ~datetime.datetime + :ivar duration_in_seconds: Duration of task execution in seconds. + :vartype duration_in_seconds: long + :ivar status: Current status of migration. Possible values include: "Default", "Connecting", + "SourceAndTargetSelected", "SelectLogins", "Configured", "Running", "Error", "Stopped", + "Completed", "CompletedWithWarnings". + :vartype status: str or ~azure.mgmt.datamigration.models.MigrationStatus + :ivar status_message: Migration status message. + :vartype status_message: str + :ivar message: Migration progress message. + :vartype message: str + :ivar databases: Selected databases as a map from database name to database id. + :vartype databases: str + :ivar database_summary: Summary of database results in the migration. + :vartype database_summary: str + :param migration_validation_result: Migration Validation Results. + :type migration_validation_result: ~azure.mgmt.datamigration.models.MigrationValidationResult + :param migration_report_result: Migration Report Result, provides unique url for downloading + your migration report. + :type migration_report_result: ~azure.mgmt.datamigration.models.MigrationReportResult + :ivar source_server_version: Source server version. + :vartype source_server_version: str + :ivar source_server_brand_version: Source server brand version. + :vartype source_server_brand_version: str + :ivar target_server_version: Target server version. + :vartype target_server_version: str + :ivar target_server_brand_version: Target server brand version. + :vartype target_server_brand_version: str + :ivar exceptions_and_warnings: Migration exceptions and warnings. + :vartype exceptions_and_warnings: list[~azure.mgmt.datamigration.models.ReportableException] + """ + + _validation = { + 'id': {'readonly': True}, + 'result_type': {'required': True}, + 'started_on': {'readonly': True}, + 'ended_on': {'readonly': True}, + 'duration_in_seconds': {'readonly': True}, + 'status': {'readonly': True}, + 'status_message': {'readonly': True}, + 'message': {'readonly': True}, + 'databases': {'readonly': True}, + 'database_summary': {'readonly': True}, + 'source_server_version': {'readonly': True}, + 'source_server_brand_version': {'readonly': True}, + 'target_server_version': {'readonly': True}, + 'target_server_brand_version': {'readonly': True}, + 'exceptions_and_warnings': {'readonly': True}, + } + + _attribute_map = { + 'id': {'key': 'id', 'type': 'str'}, + 'result_type': {'key': 'resultType', 'type': 'str'}, + 'started_on': {'key': 'startedOn', 'type': 'iso-8601'}, + 'ended_on': {'key': 'endedOn', 'type': 'iso-8601'}, + 'duration_in_seconds': {'key': 'durationInSeconds', 'type': 'long'}, + 'status': {'key': 'status', 'type': 'str'}, + 'status_message': {'key': 'statusMessage', 'type': 'str'}, + 'message': {'key': 'message', 'type': 'str'}, + 'databases': {'key': 'databases', 'type': 'str'}, + 'database_summary': {'key': 'databaseSummary', 'type': 'str'}, + 'migration_validation_result': {'key': 'migrationValidationResult', 'type': 'MigrationValidationResult'}, + 'migration_report_result': {'key': 'migrationReportResult', 'type': 'MigrationReportResult'}, + 'source_server_version': {'key': 'sourceServerVersion', 'type': 'str'}, + 'source_server_brand_version': {'key': 'sourceServerBrandVersion', 'type': 'str'}, + 'target_server_version': {'key': 'targetServerVersion', 'type': 'str'}, + 'target_server_brand_version': {'key': 'targetServerBrandVersion', 'type': 'str'}, + 'exceptions_and_warnings': {'key': 'exceptionsAndWarnings', 'type': '[ReportableException]'}, + } + + def __init__( + self, + **kwargs + ): + super(MigrateSqlServerSqlDbTaskOutputMigrationLevel, self).__init__(**kwargs) + self.result_type = 'MigrationLevelOutput' # type: str + self.started_on = None + self.ended_on = None + self.duration_in_seconds = None + self.status = None + self.status_message = None + self.message = None + self.databases = None + self.database_summary = None + self.migration_validation_result = kwargs.get('migration_validation_result', None) + self.migration_report_result = kwargs.get('migration_report_result', None) + self.source_server_version = None + self.source_server_brand_version = None + self.target_server_version = None + self.target_server_brand_version = None + self.exceptions_and_warnings = None + + +class MigrateSqlServerSqlDbTaskOutputTableLevel(MigrateSqlServerSqlDbTaskOutput): + """MigrateSqlServerSqlDbTaskOutputTableLevel. + + Variables are only populated by the server, and will be ignored when sending a request. + + All required parameters must be populated in order to send to Azure. + + :ivar id: Result identifier. + :vartype id: str + :param result_type: Required. Result type.Constant filled by server. + :type result_type: str + :ivar object_name: Name of the item. + :vartype object_name: str + :ivar started_on: Migration start time. + :vartype started_on: ~datetime.datetime + :ivar ended_on: Migration end time. + :vartype ended_on: ~datetime.datetime + :ivar state: Current state of migration. Possible values include: "None", "InProgress", + "Failed", "Warning", "Completed", "Skipped", "Stopped". + :vartype state: str or ~azure.mgmt.datamigration.models.MigrationState + :ivar status_message: Status message. + :vartype status_message: str + :ivar items_count: Number of items. + :vartype items_count: long + :ivar items_completed_count: Number of successfully completed items. + :vartype items_completed_count: long + :ivar error_prefix: Wildcard string prefix to use for querying all errors of the item. + :vartype error_prefix: str + :ivar result_prefix: Wildcard string prefix to use for querying all sub-tem results of the + item. + :vartype result_prefix: str + """ + + _validation = { + 'id': {'readonly': True}, + 'result_type': {'required': True}, + 'object_name': {'readonly': True}, + 'started_on': {'readonly': True}, + 'ended_on': {'readonly': True}, + 'state': {'readonly': True}, + 'status_message': {'readonly': True}, + 'items_count': {'readonly': True}, + 'items_completed_count': {'readonly': True}, + 'error_prefix': {'readonly': True}, + 'result_prefix': {'readonly': True}, + } + + _attribute_map = { + 'id': {'key': 'id', 'type': 'str'}, + 'result_type': {'key': 'resultType', 'type': 'str'}, + 'object_name': {'key': 'objectName', 'type': 'str'}, + 'started_on': {'key': 'startedOn', 'type': 'iso-8601'}, + 'ended_on': {'key': 'endedOn', 'type': 'iso-8601'}, + 'state': {'key': 'state', 'type': 'str'}, + 'status_message': {'key': 'statusMessage', 'type': 'str'}, + 'items_count': {'key': 'itemsCount', 'type': 'long'}, + 'items_completed_count': {'key': 'itemsCompletedCount', 'type': 'long'}, + 'error_prefix': {'key': 'errorPrefix', 'type': 'str'}, + 'result_prefix': {'key': 'resultPrefix', 'type': 'str'}, + } + + def __init__( + self, + **kwargs + ): + super(MigrateSqlServerSqlDbTaskOutputTableLevel, self).__init__(**kwargs) + self.result_type = 'TableLevelOutput' # type: str + self.object_name = None + self.started_on = None + self.ended_on = None + self.state = None + self.status_message = None + self.items_count = None + self.items_completed_count = None + self.error_prefix = None + self.result_prefix = None + + +class MigrationValidationResult(msrest.serialization.Model): + """Migration Validation Result. + + Variables are only populated by the server, and will be ignored when sending a request. + + :ivar id: Migration validation result identifier. + :vartype id: str + :ivar migration_id: Migration Identifier. + :vartype migration_id: str + :param summary_results: Validation summary results for each database. + :type summary_results: dict[str, + ~azure.mgmt.datamigration.models.MigrationValidationDatabaseSummaryResult] + :ivar status: Current status of validation at the migration level. Status from the database + validation result status will be aggregated here. Possible values include: "Default", + "NotStarted", "Initialized", "InProgress", "Completed", "CompletedWithIssues", "Stopped", + "Failed". + :vartype status: str or ~azure.mgmt.datamigration.models.ValidationStatus + """ + + _validation = { + 'id': {'readonly': True}, + 'migration_id': {'readonly': True}, + 'status': {'readonly': True}, + } + + _attribute_map = { + 'id': {'key': 'id', 'type': 'str'}, + 'migration_id': {'key': 'migrationId', 'type': 'str'}, + 'summary_results': {'key': 'summaryResults', 'type': '{MigrationValidationDatabaseSummaryResult}'}, + 'status': {'key': 'status', 'type': 'str'}, + } + + def __init__( + self, + **kwargs + ): + super(MigrationValidationResult, self).__init__(**kwargs) + self.id = None + self.migration_id = None + self.summary_results = kwargs.get('summary_results', None) + self.status = None + + +class MigrateSqlServerSqlDbTaskOutputValidationResult(MigrateSqlServerSqlDbTaskOutput, MigrationValidationResult): + """MigrateSqlServerSqlDbTaskOutputValidationResult. + + Variables are only populated by the server, and will be ignored when sending a request. + + All required parameters must be populated in order to send to Azure. + + :ivar migration_id: Migration Identifier. + :vartype migration_id: str + :param summary_results: Validation summary results for each database. + :type summary_results: dict[str, + ~azure.mgmt.datamigration.models.MigrationValidationDatabaseSummaryResult] + :ivar status: Current status of validation at the migration level. Status from the database + validation result status will be aggregated here. Possible values include: "Default", + "NotStarted", "Initialized", "InProgress", "Completed", "CompletedWithIssues", "Stopped", + "Failed". + :vartype status: str or ~azure.mgmt.datamigration.models.ValidationStatus + :ivar id: Result identifier. + :vartype id: str + :param result_type: Required. Result type.Constant filled by server. + :type result_type: str + """ + + _validation = { + 'migration_id': {'readonly': True}, + 'status': {'readonly': True}, + 'id': {'readonly': True}, + 'result_type': {'required': True}, + } + + _attribute_map = { + 'migration_id': {'key': 'migrationId', 'type': 'str'}, + 'summary_results': {'key': 'summaryResults', 'type': '{MigrationValidationDatabaseSummaryResult}'}, + 'status': {'key': 'status', 'type': 'str'}, + 'id': {'key': 'id', 'type': 'str'}, + 'result_type': {'key': 'resultType', 'type': 'str'}, + } + + def __init__( + self, + **kwargs + ): + super(MigrateSqlServerSqlDbTaskOutputValidationResult, self).__init__(**kwargs) + self.migration_id = None + self.summary_results = kwargs.get('summary_results', None) + self.status = None + self.result_type = 'MigrationValidationOutput' # type: str + self.id = None + self.result_type = 'MigrationValidationOutput' # type: str + + +class MigrateSqlServerSqlDbTaskProperties(ProjectTaskProperties): + """Properties for the task that migrates on-prem SQL Server databases to Azure SQL Database. + + Variables are only populated by the server, and will be ignored when sending a request. + + All required parameters must be populated in order to send to Azure. + + :param task_type: Required. Task type.Constant filled by server. Possible values include: + "Connect.MongoDb", "ConnectToSource.SqlServer", "ConnectToSource.SqlServer.Sync", + "ConnectToSource.PostgreSql.Sync", "ConnectToSource.MySql", "ConnectToSource.Oracle.Sync", + "ConnectToTarget.SqlDb", "ConnectToTarget.SqlDb.Sync", + "ConnectToTarget.AzureDbForPostgreSql.Sync", + "ConnectToTarget.Oracle.AzureDbForPostgreSql.Sync", "ConnectToTarget.AzureSqlDbMI", + "ConnectToTarget.AzureSqlDbMI.Sync.LRS", "ConnectToTarget.AzureDbForMySql", + "GetUserTables.Sql", "GetUserTables.AzureSqlDb.Sync", "GetUserTablesOracle", + "GetUserTablesPostgreSql", "GetUserTablesMySql", "Migrate.MongoDb", + "Migrate.SqlServer.AzureSqlDbMI", "Migrate.SqlServer.AzureSqlDbMI.Sync.LRS", + "Migrate.SqlServer.SqlDb", "Migrate.SqlServer.AzureSqlDb.Sync", + "Migrate.MySql.AzureDbForMySql.Sync", "Migrate.MySql.AzureDbForMySql", + "Migrate.PostgreSql.AzureDbForPostgreSql.SyncV2", "Migrate.Oracle.AzureDbForPostgreSql.Sync", + "ValidateMigrationInput.SqlServer.SqlDb.Sync", "ValidateMigrationInput.SqlServer.AzureSqlDbMI", + "ValidateMigrationInput.SqlServer.AzureSqlDbMI.Sync.LRS", "Validate.MongoDb", + "Validate.Oracle.AzureDbPostgreSql.Sync", "GetTDECertificates.Sql", "Migrate.Ssis", + "Service.Check.OCI", "Service.Upload.OCI", "Service.Install.OCI", + "MigrateSchemaSqlServerSqlDb". + :type task_type: str or ~azure.mgmt.datamigration.models.TaskType + :ivar errors: Array of errors. This is ignored if submitted. + :vartype errors: list[~azure.mgmt.datamigration.models.ODataError] + :ivar state: The state of the task. This is ignored if submitted. Possible values include: + "Unknown", "Queued", "Running", "Canceled", "Succeeded", "Failed", "FailedInputValidation", + "Faulted". + :vartype state: str or ~azure.mgmt.datamigration.models.TaskState + :ivar commands: Array of command properties. + :vartype commands: list[~azure.mgmt.datamigration.models.CommandProperties] + :param client_data: Key value pairs of client data to attach meta data information to task. + :type client_data: dict[str, str] + :param input: Task input. + :type input: ~azure.mgmt.datamigration.models.MigrateSqlServerSqlDbTaskInput + :ivar output: Task output. This is ignored if submitted. + :vartype output: list[~azure.mgmt.datamigration.models.MigrateSqlServerSqlDbTaskOutput] + :param task_id: task id. + :type task_id: str + :param is_cloneable: whether the task can be cloned or not. + :type is_cloneable: bool + """ + + _validation = { + 'task_type': {'required': True}, + 'errors': {'readonly': True}, + 'state': {'readonly': True}, + 'commands': {'readonly': True}, + 'output': {'readonly': True}, + } + + _attribute_map = { + 'task_type': {'key': 'taskType', 'type': 'str'}, + 'errors': {'key': 'errors', 'type': '[ODataError]'}, + 'state': {'key': 'state', 'type': 'str'}, + 'commands': {'key': 'commands', 'type': '[CommandProperties]'}, + 'client_data': {'key': 'clientData', 'type': '{str}'}, + 'input': {'key': 'input', 'type': 'MigrateSqlServerSqlDbTaskInput'}, + 'output': {'key': 'output', 'type': '[MigrateSqlServerSqlDbTaskOutput]'}, + 'task_id': {'key': 'taskId', 'type': 'str'}, + 'is_cloneable': {'key': 'isCloneable', 'type': 'bool'}, + } + + def __init__( + self, + **kwargs + ): + super(MigrateSqlServerSqlDbTaskProperties, self).__init__(**kwargs) + self.task_type = 'Migrate.SqlServer.SqlDb' # type: str + self.input = kwargs.get('input', None) + self.output = None + self.task_id = kwargs.get('task_id', None) + self.is_cloneable = kwargs.get('is_cloneable', None) + + +class MigrateSqlServerSqlMiDatabaseInput(msrest.serialization.Model): + """Database specific information for SQL to Azure SQL DB Managed Instance migration task inputs. + + All required parameters must be populated in order to send to Azure. + + :param name: Required. Name of the database. + :type name: str + :param restore_database_name: Required. Name of the database at destination. + :type restore_database_name: str + :param backup_file_share: Backup file share information for backing up this database. + :type backup_file_share: ~azure.mgmt.datamigration.models.FileShare + :param backup_file_paths: The list of backup files to be used in case of existing backups. + :type backup_file_paths: list[str] + :param id: id of the database. + :type id: str + """ + + _validation = { + 'name': {'required': True}, + 'restore_database_name': {'required': True}, + } + + _attribute_map = { + 'name': {'key': 'name', 'type': 'str'}, + 'restore_database_name': {'key': 'restoreDatabaseName', 'type': 'str'}, + 'backup_file_share': {'key': 'backupFileShare', 'type': 'FileShare'}, + 'backup_file_paths': {'key': 'backupFilePaths', 'type': '[str]'}, + 'id': {'key': 'id', 'type': 'str'}, + } + + def __init__( + self, + **kwargs + ): + super(MigrateSqlServerSqlMiDatabaseInput, self).__init__(**kwargs) + self.name = kwargs['name'] + self.restore_database_name = kwargs['restore_database_name'] + self.backup_file_share = kwargs.get('backup_file_share', None) + self.backup_file_paths = kwargs.get('backup_file_paths', None) + self.id = kwargs.get('id', None) + + +class SqlServerSqlMiSyncTaskInput(msrest.serialization.Model): + """Input for task that migrates SQL Server databases to Azure SQL Database Managed Instance online scenario. + + All required parameters must be populated in order to send to Azure. + + :param selected_databases: Required. Databases to migrate. + :type selected_databases: + list[~azure.mgmt.datamigration.models.MigrateSqlServerSqlMiDatabaseInput] + :param backup_file_share: Backup file share information for all selected databases. + :type backup_file_share: ~azure.mgmt.datamigration.models.FileShare + :param storage_resource_id: Required. Fully qualified resourceId of storage. + :type storage_resource_id: str + :param source_connection_info: Required. Connection information for source SQL Server. + :type source_connection_info: ~azure.mgmt.datamigration.models.SqlConnectionInfo + :param target_connection_info: Required. Connection information for Azure SQL Database Managed + Instance. + :type target_connection_info: ~azure.mgmt.datamigration.models.MiSqlConnectionInfo + :param azure_app: Required. Azure Active Directory Application the DMS instance will use to + connect to the target instance of Azure SQL Database Managed Instance and the Azure Storage + Account. + :type azure_app: ~azure.mgmt.datamigration.models.AzureActiveDirectoryApp + """ + + _validation = { + 'selected_databases': {'required': True}, + 'storage_resource_id': {'required': True}, + 'source_connection_info': {'required': True}, + 'target_connection_info': {'required': True}, + 'azure_app': {'required': True}, + } + + _attribute_map = { + 'selected_databases': {'key': 'selectedDatabases', 'type': '[MigrateSqlServerSqlMiDatabaseInput]'}, + 'backup_file_share': {'key': 'backupFileShare', 'type': 'FileShare'}, + 'storage_resource_id': {'key': 'storageResourceId', 'type': 'str'}, + 'source_connection_info': {'key': 'sourceConnectionInfo', 'type': 'SqlConnectionInfo'}, + 'target_connection_info': {'key': 'targetConnectionInfo', 'type': 'MiSqlConnectionInfo'}, + 'azure_app': {'key': 'azureApp', 'type': 'AzureActiveDirectoryApp'}, + } + + def __init__( + self, + **kwargs + ): + super(SqlServerSqlMiSyncTaskInput, self).__init__(**kwargs) + self.selected_databases = kwargs['selected_databases'] + self.backup_file_share = kwargs.get('backup_file_share', None) + self.storage_resource_id = kwargs['storage_resource_id'] + self.source_connection_info = kwargs['source_connection_info'] + self.target_connection_info = kwargs['target_connection_info'] + self.azure_app = kwargs['azure_app'] + + +class MigrateSqlServerSqlMiSyncTaskInput(SqlServerSqlMiSyncTaskInput): + """Input for task that migrates SQL Server databases to Azure SQL Database Managed Instance online scenario. + + All required parameters must be populated in order to send to Azure. + + :param selected_databases: Required. Databases to migrate. + :type selected_databases: + list[~azure.mgmt.datamigration.models.MigrateSqlServerSqlMiDatabaseInput] + :param backup_file_share: Backup file share information for all selected databases. + :type backup_file_share: ~azure.mgmt.datamigration.models.FileShare + :param storage_resource_id: Required. Fully qualified resourceId of storage. + :type storage_resource_id: str + :param source_connection_info: Required. Connection information for source SQL Server. + :type source_connection_info: ~azure.mgmt.datamigration.models.SqlConnectionInfo + :param target_connection_info: Required. Connection information for Azure SQL Database Managed + Instance. + :type target_connection_info: ~azure.mgmt.datamigration.models.MiSqlConnectionInfo + :param azure_app: Required. Azure Active Directory Application the DMS instance will use to + connect to the target instance of Azure SQL Database Managed Instance and the Azure Storage + Account. + :type azure_app: ~azure.mgmt.datamigration.models.AzureActiveDirectoryApp + """ + + _validation = { + 'selected_databases': {'required': True}, + 'storage_resource_id': {'required': True}, + 'source_connection_info': {'required': True}, + 'target_connection_info': {'required': True}, + 'azure_app': {'required': True}, + } + + _attribute_map = { + 'selected_databases': {'key': 'selectedDatabases', 'type': '[MigrateSqlServerSqlMiDatabaseInput]'}, + 'backup_file_share': {'key': 'backupFileShare', 'type': 'FileShare'}, + 'storage_resource_id': {'key': 'storageResourceId', 'type': 'str'}, + 'source_connection_info': {'key': 'sourceConnectionInfo', 'type': 'SqlConnectionInfo'}, + 'target_connection_info': {'key': 'targetConnectionInfo', 'type': 'MiSqlConnectionInfo'}, + 'azure_app': {'key': 'azureApp', 'type': 'AzureActiveDirectoryApp'}, + } + + def __init__( + self, + **kwargs + ): + super(MigrateSqlServerSqlMiSyncTaskInput, self).__init__(**kwargs) + + +class MigrateSqlServerSqlMiSyncTaskOutput(msrest.serialization.Model): + """Output for task that migrates SQL Server databases to Azure SQL Database Managed Instance using Log Replay Service. + + You probably want to use the sub-classes and not this class directly. Known + sub-classes are: MigrateSqlServerSqlMiSyncTaskOutputDatabaseLevel, MigrateSqlServerSqlMiSyncTaskOutputError, MigrateSqlServerSqlMiSyncTaskOutputMigrationLevel. + + Variables are only populated by the server, and will be ignored when sending a request. + + All required parameters must be populated in order to send to Azure. + + :ivar id: Result identifier. + :vartype id: str + :param result_type: Required. Result type.Constant filled by server. + :type result_type: str + """ + + _validation = { + 'id': {'readonly': True}, + 'result_type': {'required': True}, + } + + _attribute_map = { + 'id': {'key': 'id', 'type': 'str'}, + 'result_type': {'key': 'resultType', 'type': 'str'}, + } + + _subtype_map = { + 'result_type': {'DatabaseLevelOutput': 'MigrateSqlServerSqlMiSyncTaskOutputDatabaseLevel', 'ErrorOutput': 'MigrateSqlServerSqlMiSyncTaskOutputError', 'MigrationLevelOutput': 'MigrateSqlServerSqlMiSyncTaskOutputMigrationLevel'} + } + + def __init__( + self, + **kwargs + ): + super(MigrateSqlServerSqlMiSyncTaskOutput, self).__init__(**kwargs) + self.id = None + self.result_type = None # type: Optional[str] + + +class MigrateSqlServerSqlMiSyncTaskOutputDatabaseLevel(MigrateSqlServerSqlMiSyncTaskOutput): + """MigrateSqlServerSqlMiSyncTaskOutputDatabaseLevel. + + Variables are only populated by the server, and will be ignored when sending a request. + + All required parameters must be populated in order to send to Azure. + + :ivar id: Result identifier. + :vartype id: str + :param result_type: Required. Result type.Constant filled by server. + :type result_type: str + :ivar source_database_name: Name of the database. + :vartype source_database_name: str + :ivar migration_state: Current state of database. Possible values include: "UNDEFINED", + "INITIAL", "FULL_BACKUP_UPLOAD_START", "LOG_SHIPPING_START", "UPLOAD_LOG_FILES_START", + "CUTOVER_START", "POST_CUTOVER_COMPLETE", "COMPLETED", "CANCELLED", "FAILED". + :vartype migration_state: str or ~azure.mgmt.datamigration.models.DatabaseMigrationState + :ivar started_on: Database migration start time. + :vartype started_on: ~datetime.datetime + :ivar ended_on: Database migration end time. + :vartype ended_on: ~datetime.datetime + :ivar full_backup_set_info: Details of full backup set. + :vartype full_backup_set_info: ~azure.mgmt.datamigration.models.BackupSetInfo + :ivar last_restored_backup_set_info: Last applied backup set information. + :vartype last_restored_backup_set_info: ~azure.mgmt.datamigration.models.BackupSetInfo + :ivar active_backup_sets: Backup sets that are currently active (Either being uploaded or + getting restored). + :vartype active_backup_sets: list[~azure.mgmt.datamigration.models.BackupSetInfo] + :ivar container_name: Name of container created in the Azure Storage account where backups are + copied to. + :vartype container_name: str + :ivar error_prefix: prefix string to use for querying errors for this database. + :vartype error_prefix: str + :ivar is_full_backup_restored: Whether full backup has been applied to the target database or + not. + :vartype is_full_backup_restored: bool + :ivar exceptions_and_warnings: Migration exceptions and warnings. + :vartype exceptions_and_warnings: list[~azure.mgmt.datamigration.models.ReportableException] + """ + + _validation = { + 'id': {'readonly': True}, + 'result_type': {'required': True}, + 'source_database_name': {'readonly': True}, + 'migration_state': {'readonly': True}, + 'started_on': {'readonly': True}, + 'ended_on': {'readonly': True}, + 'full_backup_set_info': {'readonly': True}, + 'last_restored_backup_set_info': {'readonly': True}, + 'active_backup_sets': {'readonly': True}, + 'container_name': {'readonly': True}, + 'error_prefix': {'readonly': True}, + 'is_full_backup_restored': {'readonly': True}, + 'exceptions_and_warnings': {'readonly': True}, + } + + _attribute_map = { + 'id': {'key': 'id', 'type': 'str'}, + 'result_type': {'key': 'resultType', 'type': 'str'}, + 'source_database_name': {'key': 'sourceDatabaseName', 'type': 'str'}, + 'migration_state': {'key': 'migrationState', 'type': 'str'}, + 'started_on': {'key': 'startedOn', 'type': 'iso-8601'}, + 'ended_on': {'key': 'endedOn', 'type': 'iso-8601'}, + 'full_backup_set_info': {'key': 'fullBackupSetInfo', 'type': 'BackupSetInfo'}, + 'last_restored_backup_set_info': {'key': 'lastRestoredBackupSetInfo', 'type': 'BackupSetInfo'}, + 'active_backup_sets': {'key': 'activeBackupSets', 'type': '[BackupSetInfo]'}, + 'container_name': {'key': 'containerName', 'type': 'str'}, + 'error_prefix': {'key': 'errorPrefix', 'type': 'str'}, + 'is_full_backup_restored': {'key': 'isFullBackupRestored', 'type': 'bool'}, + 'exceptions_and_warnings': {'key': 'exceptionsAndWarnings', 'type': '[ReportableException]'}, + } + + def __init__( + self, + **kwargs + ): + super(MigrateSqlServerSqlMiSyncTaskOutputDatabaseLevel, self).__init__(**kwargs) + self.result_type = 'DatabaseLevelOutput' # type: str + self.source_database_name = None + self.migration_state = None + self.started_on = None + self.ended_on = None + self.full_backup_set_info = None + self.last_restored_backup_set_info = None + self.active_backup_sets = None + self.container_name = None + self.error_prefix = None + self.is_full_backup_restored = None + self.exceptions_and_warnings = None + + +class MigrateSqlServerSqlMiSyncTaskOutputError(MigrateSqlServerSqlMiSyncTaskOutput): + """MigrateSqlServerSqlMiSyncTaskOutputError. + + Variables are only populated by the server, and will be ignored when sending a request. + + All required parameters must be populated in order to send to Azure. + + :ivar id: Result identifier. + :vartype id: str + :param result_type: Required. Result type.Constant filled by server. + :type result_type: str + :ivar error: Migration error. + :vartype error: ~azure.mgmt.datamigration.models.ReportableException + """ + + _validation = { + 'id': {'readonly': True}, + 'result_type': {'required': True}, + 'error': {'readonly': True}, + } + + _attribute_map = { + 'id': {'key': 'id', 'type': 'str'}, + 'result_type': {'key': 'resultType', 'type': 'str'}, + 'error': {'key': 'error', 'type': 'ReportableException'}, + } + + def __init__( + self, + **kwargs + ): + super(MigrateSqlServerSqlMiSyncTaskOutputError, self).__init__(**kwargs) + self.result_type = 'ErrorOutput' # type: str + self.error = None + + +class MigrateSqlServerSqlMiSyncTaskOutputMigrationLevel(MigrateSqlServerSqlMiSyncTaskOutput): + """MigrateSqlServerSqlMiSyncTaskOutputMigrationLevel. + + Variables are only populated by the server, and will be ignored when sending a request. + + All required parameters must be populated in order to send to Azure. + + :ivar id: Result identifier. + :vartype id: str + :param result_type: Required. Result type.Constant filled by server. + :type result_type: str + :ivar database_count: Count of databases. + :vartype database_count: int + :ivar state: Current state of migration. Possible values include: "None", "InProgress", + "Failed", "Warning", "Completed", "Skipped", "Stopped". + :vartype state: str or ~azure.mgmt.datamigration.models.MigrationState + :ivar started_on: Migration start time. + :vartype started_on: ~datetime.datetime + :ivar ended_on: Migration end time. + :vartype ended_on: ~datetime.datetime + :ivar source_server_name: Source server name. + :vartype source_server_name: str + :ivar source_server_version: Source server version. + :vartype source_server_version: str + :ivar source_server_brand_version: Source server brand version. + :vartype source_server_brand_version: str + :ivar target_server_name: Target server name. + :vartype target_server_name: str + :ivar target_server_version: Target server version. + :vartype target_server_version: str + :ivar target_server_brand_version: Target server brand version. + :vartype target_server_brand_version: str + :ivar database_error_count: Number of database level errors. + :vartype database_error_count: int + """ + + _validation = { + 'id': {'readonly': True}, + 'result_type': {'required': True}, + 'database_count': {'readonly': True}, + 'state': {'readonly': True}, + 'started_on': {'readonly': True}, + 'ended_on': {'readonly': True}, + 'source_server_name': {'readonly': True}, + 'source_server_version': {'readonly': True}, + 'source_server_brand_version': {'readonly': True}, + 'target_server_name': {'readonly': True}, + 'target_server_version': {'readonly': True}, + 'target_server_brand_version': {'readonly': True}, + 'database_error_count': {'readonly': True}, + } + + _attribute_map = { + 'id': {'key': 'id', 'type': 'str'}, + 'result_type': {'key': 'resultType', 'type': 'str'}, + 'database_count': {'key': 'databaseCount', 'type': 'int'}, + 'state': {'key': 'state', 'type': 'str'}, + 'started_on': {'key': 'startedOn', 'type': 'iso-8601'}, + 'ended_on': {'key': 'endedOn', 'type': 'iso-8601'}, + 'source_server_name': {'key': 'sourceServerName', 'type': 'str'}, + 'source_server_version': {'key': 'sourceServerVersion', 'type': 'str'}, + 'source_server_brand_version': {'key': 'sourceServerBrandVersion', 'type': 'str'}, + 'target_server_name': {'key': 'targetServerName', 'type': 'str'}, + 'target_server_version': {'key': 'targetServerVersion', 'type': 'str'}, + 'target_server_brand_version': {'key': 'targetServerBrandVersion', 'type': 'str'}, + 'database_error_count': {'key': 'databaseErrorCount', 'type': 'int'}, + } + + def __init__( + self, + **kwargs + ): + super(MigrateSqlServerSqlMiSyncTaskOutputMigrationLevel, self).__init__(**kwargs) + self.result_type = 'MigrationLevelOutput' # type: str + self.database_count = None + self.state = None + self.started_on = None + self.ended_on = None + self.source_server_name = None + self.source_server_version = None + self.source_server_brand_version = None + self.target_server_name = None + self.target_server_version = None + self.target_server_brand_version = None + self.database_error_count = None + + +class MigrateSqlServerSqlMiSyncTaskProperties(ProjectTaskProperties): + """Properties for task that migrates SQL Server databases to Azure SQL Database Managed Instance sync scenario. + + Variables are only populated by the server, and will be ignored when sending a request. + + All required parameters must be populated in order to send to Azure. + + :param task_type: Required. Task type.Constant filled by server. Possible values include: + "Connect.MongoDb", "ConnectToSource.SqlServer", "ConnectToSource.SqlServer.Sync", + "ConnectToSource.PostgreSql.Sync", "ConnectToSource.MySql", "ConnectToSource.Oracle.Sync", + "ConnectToTarget.SqlDb", "ConnectToTarget.SqlDb.Sync", + "ConnectToTarget.AzureDbForPostgreSql.Sync", + "ConnectToTarget.Oracle.AzureDbForPostgreSql.Sync", "ConnectToTarget.AzureSqlDbMI", + "ConnectToTarget.AzureSqlDbMI.Sync.LRS", "ConnectToTarget.AzureDbForMySql", + "GetUserTables.Sql", "GetUserTables.AzureSqlDb.Sync", "GetUserTablesOracle", + "GetUserTablesPostgreSql", "GetUserTablesMySql", "Migrate.MongoDb", + "Migrate.SqlServer.AzureSqlDbMI", "Migrate.SqlServer.AzureSqlDbMI.Sync.LRS", + "Migrate.SqlServer.SqlDb", "Migrate.SqlServer.AzureSqlDb.Sync", + "Migrate.MySql.AzureDbForMySql.Sync", "Migrate.MySql.AzureDbForMySql", + "Migrate.PostgreSql.AzureDbForPostgreSql.SyncV2", "Migrate.Oracle.AzureDbForPostgreSql.Sync", + "ValidateMigrationInput.SqlServer.SqlDb.Sync", "ValidateMigrationInput.SqlServer.AzureSqlDbMI", + "ValidateMigrationInput.SqlServer.AzureSqlDbMI.Sync.LRS", "Validate.MongoDb", + "Validate.Oracle.AzureDbPostgreSql.Sync", "GetTDECertificates.Sql", "Migrate.Ssis", + "Service.Check.OCI", "Service.Upload.OCI", "Service.Install.OCI", + "MigrateSchemaSqlServerSqlDb". + :type task_type: str or ~azure.mgmt.datamigration.models.TaskType + :ivar errors: Array of errors. This is ignored if submitted. + :vartype errors: list[~azure.mgmt.datamigration.models.ODataError] + :ivar state: The state of the task. This is ignored if submitted. Possible values include: + "Unknown", "Queued", "Running", "Canceled", "Succeeded", "Failed", "FailedInputValidation", + "Faulted". + :vartype state: str or ~azure.mgmt.datamigration.models.TaskState + :ivar commands: Array of command properties. + :vartype commands: list[~azure.mgmt.datamigration.models.CommandProperties] + :param client_data: Key value pairs of client data to attach meta data information to task. + :type client_data: dict[str, str] + :param input: Task input. + :type input: ~azure.mgmt.datamigration.models.SqlServerSqlMiSyncTaskInput + :ivar output: Task output. This is ignored if submitted. + :vartype output: list[~azure.mgmt.datamigration.models.MigrateSqlServerSqlMiSyncTaskOutput] + """ + + _validation = { + 'task_type': {'required': True}, + 'errors': {'readonly': True}, + 'state': {'readonly': True}, + 'commands': {'readonly': True}, + 'output': {'readonly': True}, + } + + _attribute_map = { + 'task_type': {'key': 'taskType', 'type': 'str'}, + 'errors': {'key': 'errors', 'type': '[ODataError]'}, + 'state': {'key': 'state', 'type': 'str'}, + 'commands': {'key': 'commands', 'type': '[CommandProperties]'}, + 'client_data': {'key': 'clientData', 'type': '{str}'}, + 'input': {'key': 'input', 'type': 'SqlServerSqlMiSyncTaskInput'}, + 'output': {'key': 'output', 'type': '[MigrateSqlServerSqlMiSyncTaskOutput]'}, + } + + def __init__( + self, + **kwargs + ): + super(MigrateSqlServerSqlMiSyncTaskProperties, self).__init__(**kwargs) + self.task_type = 'Migrate.SqlServer.AzureSqlDbMI.Sync.LRS' # type: str + self.input = kwargs.get('input', None) + self.output = None + + +class MigrateSqlServerSqlMiTaskInput(SqlMigrationTaskInput): + """Input for task that migrates SQL Server databases to Azure SQL Database Managed Instance. + + All required parameters must be populated in order to send to Azure. + + :param source_connection_info: Required. Information for connecting to source. + :type source_connection_info: ~azure.mgmt.datamigration.models.SqlConnectionInfo + :param target_connection_info: Required. Information for connecting to target. + :type target_connection_info: ~azure.mgmt.datamigration.models.SqlConnectionInfo + :param selected_databases: Required. Databases to migrate. + :type selected_databases: + list[~azure.mgmt.datamigration.models.MigrateSqlServerSqlMiDatabaseInput] + :param started_on: Date and time relative to UTC when the migration was started on. + :type started_on: str + :param selected_logins: Logins to migrate. + :type selected_logins: list[str] + :param selected_agent_jobs: Agent Jobs to migrate. + :type selected_agent_jobs: list[str] + :param backup_file_share: Backup file share information for all selected databases. + :type backup_file_share: ~azure.mgmt.datamigration.models.FileShare + :param backup_blob_share: Required. SAS URI of Azure Storage Account Container to be used for + storing backup files. + :type backup_blob_share: ~azure.mgmt.datamigration.models.BlobShare + :param backup_mode: Backup Mode to specify whether to use existing backup or create new backup. + If using existing backups, backup file paths are required to be provided in selectedDatabases. + Possible values include: "CreateBackup", "ExistingBackup". + :type backup_mode: str or ~azure.mgmt.datamigration.models.BackupMode + :param aad_domain_name: Azure Active Directory domain name in the format of 'contoso.com' for + federated Azure AD or 'contoso.onmicrosoft.com' for managed domain, required if and only if + Windows logins are selected. + :type aad_domain_name: str + """ + + _validation = { + 'source_connection_info': {'required': True}, + 'target_connection_info': {'required': True}, + 'selected_databases': {'required': True}, + 'backup_blob_share': {'required': True}, + } + + _attribute_map = { + 'source_connection_info': {'key': 'sourceConnectionInfo', 'type': 'SqlConnectionInfo'}, + 'target_connection_info': {'key': 'targetConnectionInfo', 'type': 'SqlConnectionInfo'}, + 'selected_databases': {'key': 'selectedDatabases', 'type': '[MigrateSqlServerSqlMiDatabaseInput]'}, + 'started_on': {'key': 'startedOn', 'type': 'str'}, + 'selected_logins': {'key': 'selectedLogins', 'type': '[str]'}, + 'selected_agent_jobs': {'key': 'selectedAgentJobs', 'type': '[str]'}, + 'backup_file_share': {'key': 'backupFileShare', 'type': 'FileShare'}, + 'backup_blob_share': {'key': 'backupBlobShare', 'type': 'BlobShare'}, + 'backup_mode': {'key': 'backupMode', 'type': 'str'}, + 'aad_domain_name': {'key': 'aadDomainName', 'type': 'str'}, + } + + def __init__( + self, + **kwargs + ): + super(MigrateSqlServerSqlMiTaskInput, self).__init__(**kwargs) + self.selected_databases = kwargs['selected_databases'] + self.started_on = kwargs.get('started_on', None) + self.selected_logins = kwargs.get('selected_logins', None) + self.selected_agent_jobs = kwargs.get('selected_agent_jobs', None) + self.backup_file_share = kwargs.get('backup_file_share', None) + self.backup_blob_share = kwargs['backup_blob_share'] + self.backup_mode = kwargs.get('backup_mode', None) + self.aad_domain_name = kwargs.get('aad_domain_name', None) + + +class MigrateSqlServerSqlMiTaskOutput(msrest.serialization.Model): + """Output for task that migrates SQL Server databases to Azure SQL Database Managed Instance. + + You probably want to use the sub-classes and not this class directly. Known + sub-classes are: MigrateSqlServerSqlMiTaskOutputAgentJobLevel, MigrateSqlServerSqlMiTaskOutputDatabaseLevel, MigrateSqlServerSqlMiTaskOutputError, MigrateSqlServerSqlMiTaskOutputLoginLevel, MigrateSqlServerSqlMiTaskOutputMigrationLevel. + + Variables are only populated by the server, and will be ignored when sending a request. + + All required parameters must be populated in order to send to Azure. + + :ivar id: Result identifier. + :vartype id: str + :param result_type: Required. Result type.Constant filled by server. + :type result_type: str + """ + + _validation = { + 'id': {'readonly': True}, + 'result_type': {'required': True}, + } + + _attribute_map = { + 'id': {'key': 'id', 'type': 'str'}, + 'result_type': {'key': 'resultType', 'type': 'str'}, + } + + _subtype_map = { + 'result_type': {'AgentJobLevelOutput': 'MigrateSqlServerSqlMiTaskOutputAgentJobLevel', 'DatabaseLevelOutput': 'MigrateSqlServerSqlMiTaskOutputDatabaseLevel', 'ErrorOutput': 'MigrateSqlServerSqlMiTaskOutputError', 'LoginLevelOutput': 'MigrateSqlServerSqlMiTaskOutputLoginLevel', 'MigrationLevelOutput': 'MigrateSqlServerSqlMiTaskOutputMigrationLevel'} + } + + def __init__( + self, + **kwargs + ): + super(MigrateSqlServerSqlMiTaskOutput, self).__init__(**kwargs) + self.id = None + self.result_type = None # type: Optional[str] + + +class MigrateSqlServerSqlMiTaskOutputAgentJobLevel(MigrateSqlServerSqlMiTaskOutput): + """MigrateSqlServerSqlMiTaskOutputAgentJobLevel. + + Variables are only populated by the server, and will be ignored when sending a request. + + All required parameters must be populated in order to send to Azure. + + :ivar id: Result identifier. + :vartype id: str + :param result_type: Required. Result type.Constant filled by server. + :type result_type: str + :ivar name: Agent Job name. + :vartype name: str + :ivar is_enabled: The state of the original Agent Job. + :vartype is_enabled: bool + :ivar state: Current state of migration. Possible values include: "None", "InProgress", + "Failed", "Warning", "Completed", "Skipped", "Stopped". + :vartype state: str or ~azure.mgmt.datamigration.models.MigrationState + :ivar started_on: Migration start time. + :vartype started_on: ~datetime.datetime + :ivar ended_on: Migration end time. + :vartype ended_on: ~datetime.datetime + :ivar message: Migration progress message. + :vartype message: str + :ivar exceptions_and_warnings: Migration errors and warnings per job. + :vartype exceptions_and_warnings: list[~azure.mgmt.datamigration.models.ReportableException] + """ + + _validation = { + 'id': {'readonly': True}, + 'result_type': {'required': True}, + 'name': {'readonly': True}, + 'is_enabled': {'readonly': True}, + 'state': {'readonly': True}, + 'started_on': {'readonly': True}, + 'ended_on': {'readonly': True}, + 'message': {'readonly': True}, + 'exceptions_and_warnings': {'readonly': True}, + } + + _attribute_map = { + 'id': {'key': 'id', 'type': 'str'}, + 'result_type': {'key': 'resultType', 'type': 'str'}, + 'name': {'key': 'name', 'type': 'str'}, + 'is_enabled': {'key': 'isEnabled', 'type': 'bool'}, + 'state': {'key': 'state', 'type': 'str'}, + 'started_on': {'key': 'startedOn', 'type': 'iso-8601'}, + 'ended_on': {'key': 'endedOn', 'type': 'iso-8601'}, + 'message': {'key': 'message', 'type': 'str'}, + 'exceptions_and_warnings': {'key': 'exceptionsAndWarnings', 'type': '[ReportableException]'}, + } + + def __init__( + self, + **kwargs + ): + super(MigrateSqlServerSqlMiTaskOutputAgentJobLevel, self).__init__(**kwargs) + self.result_type = 'AgentJobLevelOutput' # type: str + self.name = None + self.is_enabled = None + self.state = None + self.started_on = None + self.ended_on = None + self.message = None + self.exceptions_and_warnings = None + + +class MigrateSqlServerSqlMiTaskOutputDatabaseLevel(MigrateSqlServerSqlMiTaskOutput): + """MigrateSqlServerSqlMiTaskOutputDatabaseLevel. + + Variables are only populated by the server, and will be ignored when sending a request. + + All required parameters must be populated in order to send to Azure. + + :ivar id: Result identifier. + :vartype id: str + :param result_type: Required. Result type.Constant filled by server. + :type result_type: str + :ivar database_name: Name of the database. + :vartype database_name: str + :ivar size_mb: Size of the database in megabytes. + :vartype size_mb: float + :ivar state: Current state of migration. Possible values include: "None", "InProgress", + "Failed", "Warning", "Completed", "Skipped", "Stopped". + :vartype state: str or ~azure.mgmt.datamigration.models.MigrationState + :ivar stage: Current stage of migration. Possible values include: "None", "Initialize", + "Backup", "FileCopy", "Restore", "Completed". + :vartype stage: str or ~azure.mgmt.datamigration.models.DatabaseMigrationStage + :ivar started_on: Migration start time. + :vartype started_on: ~datetime.datetime + :ivar ended_on: Migration end time. + :vartype ended_on: ~datetime.datetime + :ivar message: Migration progress message. + :vartype message: str + :ivar exceptions_and_warnings: Migration exceptions and warnings. + :vartype exceptions_and_warnings: list[~azure.mgmt.datamigration.models.ReportableException] + """ + + _validation = { + 'id': {'readonly': True}, + 'result_type': {'required': True}, + 'database_name': {'readonly': True}, + 'size_mb': {'readonly': True}, + 'state': {'readonly': True}, + 'stage': {'readonly': True}, + 'started_on': {'readonly': True}, + 'ended_on': {'readonly': True}, + 'message': {'readonly': True}, + 'exceptions_and_warnings': {'readonly': True}, + } + + _attribute_map = { + 'id': {'key': 'id', 'type': 'str'}, + 'result_type': {'key': 'resultType', 'type': 'str'}, + 'database_name': {'key': 'databaseName', 'type': 'str'}, + 'size_mb': {'key': 'sizeMB', 'type': 'float'}, + 'state': {'key': 'state', 'type': 'str'}, + 'stage': {'key': 'stage', 'type': 'str'}, + 'started_on': {'key': 'startedOn', 'type': 'iso-8601'}, + 'ended_on': {'key': 'endedOn', 'type': 'iso-8601'}, + 'message': {'key': 'message', 'type': 'str'}, + 'exceptions_and_warnings': {'key': 'exceptionsAndWarnings', 'type': '[ReportableException]'}, + } + + def __init__( + self, + **kwargs + ): + super(MigrateSqlServerSqlMiTaskOutputDatabaseLevel, self).__init__(**kwargs) + self.result_type = 'DatabaseLevelOutput' # type: str + self.database_name = None + self.size_mb = None + self.state = None + self.stage = None + self.started_on = None + self.ended_on = None + self.message = None + self.exceptions_and_warnings = None + + +class MigrateSqlServerSqlMiTaskOutputError(MigrateSqlServerSqlMiTaskOutput): + """MigrateSqlServerSqlMiTaskOutputError. + + Variables are only populated by the server, and will be ignored when sending a request. + + All required parameters must be populated in order to send to Azure. + + :ivar id: Result identifier. + :vartype id: str + :param result_type: Required. Result type.Constant filled by server. + :type result_type: str + :ivar error: Migration error. + :vartype error: ~azure.mgmt.datamigration.models.ReportableException + """ + + _validation = { + 'id': {'readonly': True}, + 'result_type': {'required': True}, + 'error': {'readonly': True}, + } + + _attribute_map = { + 'id': {'key': 'id', 'type': 'str'}, + 'result_type': {'key': 'resultType', 'type': 'str'}, + 'error': {'key': 'error', 'type': 'ReportableException'}, + } + + def __init__( + self, + **kwargs + ): + super(MigrateSqlServerSqlMiTaskOutputError, self).__init__(**kwargs) + self.result_type = 'ErrorOutput' # type: str + self.error = None + + +class MigrateSqlServerSqlMiTaskOutputLoginLevel(MigrateSqlServerSqlMiTaskOutput): + """MigrateSqlServerSqlMiTaskOutputLoginLevel. + + Variables are only populated by the server, and will be ignored when sending a request. + + All required parameters must be populated in order to send to Azure. + + :ivar id: Result identifier. + :vartype id: str + :param result_type: Required. Result type.Constant filled by server. + :type result_type: str + :ivar login_name: Login name. + :vartype login_name: str + :ivar state: Current state of login. Possible values include: "None", "InProgress", "Failed", + "Warning", "Completed", "Skipped", "Stopped". + :vartype state: str or ~azure.mgmt.datamigration.models.MigrationState + :ivar stage: Current stage of login. Possible values include: "None", "Initialize", + "LoginMigration", "EstablishUserMapping", "AssignRoleMembership", "AssignRoleOwnership", + "EstablishServerPermissions", "EstablishObjectPermissions", "Completed". + :vartype stage: str or ~azure.mgmt.datamigration.models.LoginMigrationStage + :ivar started_on: Login migration start time. + :vartype started_on: ~datetime.datetime + :ivar ended_on: Login migration end time. + :vartype ended_on: ~datetime.datetime + :ivar message: Login migration progress message. + :vartype message: str + :ivar exceptions_and_warnings: Login migration errors and warnings per login. + :vartype exceptions_and_warnings: list[~azure.mgmt.datamigration.models.ReportableException] + """ + + _validation = { + 'id': {'readonly': True}, + 'result_type': {'required': True}, + 'login_name': {'readonly': True}, + 'state': {'readonly': True}, + 'stage': {'readonly': True}, + 'started_on': {'readonly': True}, + 'ended_on': {'readonly': True}, + 'message': {'readonly': True}, + 'exceptions_and_warnings': {'readonly': True}, + } + + _attribute_map = { + 'id': {'key': 'id', 'type': 'str'}, + 'result_type': {'key': 'resultType', 'type': 'str'}, + 'login_name': {'key': 'loginName', 'type': 'str'}, + 'state': {'key': 'state', 'type': 'str'}, + 'stage': {'key': 'stage', 'type': 'str'}, + 'started_on': {'key': 'startedOn', 'type': 'iso-8601'}, + 'ended_on': {'key': 'endedOn', 'type': 'iso-8601'}, + 'message': {'key': 'message', 'type': 'str'}, + 'exceptions_and_warnings': {'key': 'exceptionsAndWarnings', 'type': '[ReportableException]'}, + } + + def __init__( + self, + **kwargs + ): + super(MigrateSqlServerSqlMiTaskOutputLoginLevel, self).__init__(**kwargs) + self.result_type = 'LoginLevelOutput' # type: str + self.login_name = None + self.state = None + self.stage = None + self.started_on = None + self.ended_on = None + self.message = None + self.exceptions_and_warnings = None + + +class MigrateSqlServerSqlMiTaskOutputMigrationLevel(MigrateSqlServerSqlMiTaskOutput): + """MigrateSqlServerSqlMiTaskOutputMigrationLevel. + + Variables are only populated by the server, and will be ignored when sending a request. + + All required parameters must be populated in order to send to Azure. + + :ivar id: Result identifier. + :vartype id: str + :param result_type: Required. Result type.Constant filled by server. + :type result_type: str + :ivar started_on: Migration start time. + :vartype started_on: ~datetime.datetime + :ivar ended_on: Migration end time. + :vartype ended_on: ~datetime.datetime + :ivar status: Current status of migration. Possible values include: "Default", "Connecting", + "SourceAndTargetSelected", "SelectLogins", "Configured", "Running", "Error", "Stopped", + "Completed", "CompletedWithWarnings". + :vartype status: str or ~azure.mgmt.datamigration.models.MigrationStatus + :ivar state: Current state of migration. Possible values include: "None", "InProgress", + "Failed", "Warning", "Completed", "Skipped", "Stopped". + :vartype state: str or ~azure.mgmt.datamigration.models.MigrationState + :ivar agent_jobs: Selected agent jobs as a map from name to id. + :vartype agent_jobs: str + :ivar logins: Selected logins as a map from name to id. + :vartype logins: str + :ivar message: Migration progress message. + :vartype message: str + :ivar server_role_results: Map of server role migration results. + :vartype server_role_results: str + :ivar orphaned_users_info: List of orphaned users. + :vartype orphaned_users_info: list[~azure.mgmt.datamigration.models.OrphanedUserInfo] + :ivar databases: Selected databases as a map from database name to database id. + :vartype databases: str + :ivar source_server_version: Source server version. + :vartype source_server_version: str + :ivar source_server_brand_version: Source server brand version. + :vartype source_server_brand_version: str + :ivar target_server_version: Target server version. + :vartype target_server_version: str + :ivar target_server_brand_version: Target server brand version. + :vartype target_server_brand_version: str + :ivar exceptions_and_warnings: Migration exceptions and warnings. + :vartype exceptions_and_warnings: list[~azure.mgmt.datamigration.models.ReportableException] + """ + + _validation = { + 'id': {'readonly': True}, + 'result_type': {'required': True}, + 'started_on': {'readonly': True}, + 'ended_on': {'readonly': True}, + 'status': {'readonly': True}, + 'state': {'readonly': True}, + 'agent_jobs': {'readonly': True}, + 'logins': {'readonly': True}, + 'message': {'readonly': True}, + 'server_role_results': {'readonly': True}, + 'orphaned_users_info': {'readonly': True}, + 'databases': {'readonly': True}, + 'source_server_version': {'readonly': True}, + 'source_server_brand_version': {'readonly': True}, + 'target_server_version': {'readonly': True}, + 'target_server_brand_version': {'readonly': True}, + 'exceptions_and_warnings': {'readonly': True}, + } + + _attribute_map = { + 'id': {'key': 'id', 'type': 'str'}, + 'result_type': {'key': 'resultType', 'type': 'str'}, + 'started_on': {'key': 'startedOn', 'type': 'iso-8601'}, + 'ended_on': {'key': 'endedOn', 'type': 'iso-8601'}, + 'status': {'key': 'status', 'type': 'str'}, + 'state': {'key': 'state', 'type': 'str'}, + 'agent_jobs': {'key': 'agentJobs', 'type': 'str'}, + 'logins': {'key': 'logins', 'type': 'str'}, + 'message': {'key': 'message', 'type': 'str'}, + 'server_role_results': {'key': 'serverRoleResults', 'type': 'str'}, + 'orphaned_users_info': {'key': 'orphanedUsersInfo', 'type': '[OrphanedUserInfo]'}, + 'databases': {'key': 'databases', 'type': 'str'}, + 'source_server_version': {'key': 'sourceServerVersion', 'type': 'str'}, + 'source_server_brand_version': {'key': 'sourceServerBrandVersion', 'type': 'str'}, + 'target_server_version': {'key': 'targetServerVersion', 'type': 'str'}, + 'target_server_brand_version': {'key': 'targetServerBrandVersion', 'type': 'str'}, + 'exceptions_and_warnings': {'key': 'exceptionsAndWarnings', 'type': '[ReportableException]'}, + } + + def __init__( + self, + **kwargs + ): + super(MigrateSqlServerSqlMiTaskOutputMigrationLevel, self).__init__(**kwargs) + self.result_type = 'MigrationLevelOutput' # type: str + self.started_on = None + self.ended_on = None + self.status = None + self.state = None + self.agent_jobs = None + self.logins = None + self.message = None + self.server_role_results = None + self.orphaned_users_info = None + self.databases = None + self.source_server_version = None + self.source_server_brand_version = None + self.target_server_version = None + self.target_server_brand_version = None + self.exceptions_and_warnings = None + + +class MigrateSqlServerSqlMiTaskProperties(ProjectTaskProperties): + """Properties for task that migrates SQL Server databases to Azure SQL Database Managed Instance. + + Variables are only populated by the server, and will be ignored when sending a request. + + All required parameters must be populated in order to send to Azure. + + :param task_type: Required. Task type.Constant filled by server. Possible values include: + "Connect.MongoDb", "ConnectToSource.SqlServer", "ConnectToSource.SqlServer.Sync", + "ConnectToSource.PostgreSql.Sync", "ConnectToSource.MySql", "ConnectToSource.Oracle.Sync", + "ConnectToTarget.SqlDb", "ConnectToTarget.SqlDb.Sync", + "ConnectToTarget.AzureDbForPostgreSql.Sync", + "ConnectToTarget.Oracle.AzureDbForPostgreSql.Sync", "ConnectToTarget.AzureSqlDbMI", + "ConnectToTarget.AzureSqlDbMI.Sync.LRS", "ConnectToTarget.AzureDbForMySql", + "GetUserTables.Sql", "GetUserTables.AzureSqlDb.Sync", "GetUserTablesOracle", + "GetUserTablesPostgreSql", "GetUserTablesMySql", "Migrate.MongoDb", + "Migrate.SqlServer.AzureSqlDbMI", "Migrate.SqlServer.AzureSqlDbMI.Sync.LRS", + "Migrate.SqlServer.SqlDb", "Migrate.SqlServer.AzureSqlDb.Sync", + "Migrate.MySql.AzureDbForMySql.Sync", "Migrate.MySql.AzureDbForMySql", + "Migrate.PostgreSql.AzureDbForPostgreSql.SyncV2", "Migrate.Oracle.AzureDbForPostgreSql.Sync", + "ValidateMigrationInput.SqlServer.SqlDb.Sync", "ValidateMigrationInput.SqlServer.AzureSqlDbMI", + "ValidateMigrationInput.SqlServer.AzureSqlDbMI.Sync.LRS", "Validate.MongoDb", + "Validate.Oracle.AzureDbPostgreSql.Sync", "GetTDECertificates.Sql", "Migrate.Ssis", + "Service.Check.OCI", "Service.Upload.OCI", "Service.Install.OCI", + "MigrateSchemaSqlServerSqlDb". + :type task_type: str or ~azure.mgmt.datamigration.models.TaskType + :ivar errors: Array of errors. This is ignored if submitted. + :vartype errors: list[~azure.mgmt.datamigration.models.ODataError] + :ivar state: The state of the task. This is ignored if submitted. Possible values include: + "Unknown", "Queued", "Running", "Canceled", "Succeeded", "Failed", "FailedInputValidation", + "Faulted". + :vartype state: str or ~azure.mgmt.datamigration.models.TaskState + :ivar commands: Array of command properties. + :vartype commands: list[~azure.mgmt.datamigration.models.CommandProperties] + :param client_data: Key value pairs of client data to attach meta data information to task. + :type client_data: dict[str, str] + :param input: Task input. + :type input: ~azure.mgmt.datamigration.models.MigrateSqlServerSqlMiTaskInput + :ivar output: Task output. This is ignored if submitted. + :vartype output: list[~azure.mgmt.datamigration.models.MigrateSqlServerSqlMiTaskOutput] + :param task_id: task id. + :type task_id: str + """ + + _validation = { + 'task_type': {'required': True}, + 'errors': {'readonly': True}, + 'state': {'readonly': True}, + 'commands': {'readonly': True}, + 'output': {'readonly': True}, + } + + _attribute_map = { + 'task_type': {'key': 'taskType', 'type': 'str'}, + 'errors': {'key': 'errors', 'type': '[ODataError]'}, + 'state': {'key': 'state', 'type': 'str'}, + 'commands': {'key': 'commands', 'type': '[CommandProperties]'}, + 'client_data': {'key': 'clientData', 'type': '{str}'}, + 'input': {'key': 'input', 'type': 'MigrateSqlServerSqlMiTaskInput'}, + 'output': {'key': 'output', 'type': '[MigrateSqlServerSqlMiTaskOutput]'}, + 'task_id': {'key': 'taskId', 'type': 'str'}, + } + + def __init__( + self, + **kwargs + ): + super(MigrateSqlServerSqlMiTaskProperties, self).__init__(**kwargs) + self.task_type = 'Migrate.SqlServer.AzureSqlDbMI' # type: str + self.input = kwargs.get('input', None) + self.output = None + self.task_id = kwargs.get('task_id', None) + + +class MigrateSsisTaskInput(SqlMigrationTaskInput): + """Input for task that migrates SSIS packages from SQL Server to Azure SQL Database Managed Instance. + + All required parameters must be populated in order to send to Azure. + + :param source_connection_info: Required. Information for connecting to source. + :type source_connection_info: ~azure.mgmt.datamigration.models.SqlConnectionInfo + :param target_connection_info: Required. Information for connecting to target. + :type target_connection_info: ~azure.mgmt.datamigration.models.SqlConnectionInfo + :param ssis_migration_info: Required. SSIS package migration information. + :type ssis_migration_info: ~azure.mgmt.datamigration.models.SsisMigrationInfo + """ + + _validation = { + 'source_connection_info': {'required': True}, + 'target_connection_info': {'required': True}, + 'ssis_migration_info': {'required': True}, + } + + _attribute_map = { + 'source_connection_info': {'key': 'sourceConnectionInfo', 'type': 'SqlConnectionInfo'}, + 'target_connection_info': {'key': 'targetConnectionInfo', 'type': 'SqlConnectionInfo'}, + 'ssis_migration_info': {'key': 'ssisMigrationInfo', 'type': 'SsisMigrationInfo'}, + } + + def __init__( + self, + **kwargs + ): + super(MigrateSsisTaskInput, self).__init__(**kwargs) + self.ssis_migration_info = kwargs['ssis_migration_info'] + + +class MigrateSsisTaskOutput(msrest.serialization.Model): + """Output for task that migrates SSIS packages from SQL Server to Azure SQL Database Managed Instance. + + You probably want to use the sub-classes and not this class directly. Known + sub-classes are: MigrateSsisTaskOutputMigrationLevel, MigrateSsisTaskOutputProjectLevel. + + Variables are only populated by the server, and will be ignored when sending a request. + + All required parameters must be populated in order to send to Azure. + + :ivar id: Result identifier. + :vartype id: str + :param result_type: Required. Result type.Constant filled by server. + :type result_type: str + """ + + _validation = { + 'id': {'readonly': True}, + 'result_type': {'required': True}, + } + + _attribute_map = { + 'id': {'key': 'id', 'type': 'str'}, + 'result_type': {'key': 'resultType', 'type': 'str'}, + } + + _subtype_map = { + 'result_type': {'MigrationLevelOutput': 'MigrateSsisTaskOutputMigrationLevel', 'SsisProjectLevelOutput': 'MigrateSsisTaskOutputProjectLevel'} + } + + def __init__( + self, + **kwargs + ): + super(MigrateSsisTaskOutput, self).__init__(**kwargs) + self.id = None + self.result_type = None # type: Optional[str] + + +class MigrateSsisTaskOutputMigrationLevel(MigrateSsisTaskOutput): + """MigrateSsisTaskOutputMigrationLevel. + + Variables are only populated by the server, and will be ignored when sending a request. + + All required parameters must be populated in order to send to Azure. + + :ivar id: Result identifier. + :vartype id: str + :param result_type: Required. Result type.Constant filled by server. + :type result_type: str + :ivar started_on: Migration start time. + :vartype started_on: ~datetime.datetime + :ivar ended_on: Migration end time. + :vartype ended_on: ~datetime.datetime + :ivar status: Current status of migration. Possible values include: "Default", "Connecting", + "SourceAndTargetSelected", "SelectLogins", "Configured", "Running", "Error", "Stopped", + "Completed", "CompletedWithWarnings". + :vartype status: str or ~azure.mgmt.datamigration.models.MigrationStatus + :ivar message: Migration progress message. + :vartype message: str + :ivar source_server_version: Source server version. + :vartype source_server_version: str + :ivar source_server_brand_version: Source server brand version. + :vartype source_server_brand_version: str + :ivar target_server_version: Target server version. + :vartype target_server_version: str + :ivar target_server_brand_version: Target server brand version. + :vartype target_server_brand_version: str + :ivar exceptions_and_warnings: Migration exceptions and warnings. + :vartype exceptions_and_warnings: list[~azure.mgmt.datamigration.models.ReportableException] + :ivar stage: Stage of SSIS migration. Possible values include: "None", "Initialize", + "InProgress", "Completed". + :vartype stage: str or ~azure.mgmt.datamigration.models.SsisMigrationStage + """ + + _validation = { + 'id': {'readonly': True}, + 'result_type': {'required': True}, + 'started_on': {'readonly': True}, + 'ended_on': {'readonly': True}, + 'status': {'readonly': True}, + 'message': {'readonly': True}, + 'source_server_version': {'readonly': True}, + 'source_server_brand_version': {'readonly': True}, + 'target_server_version': {'readonly': True}, + 'target_server_brand_version': {'readonly': True}, + 'exceptions_and_warnings': {'readonly': True}, + 'stage': {'readonly': True}, + } + + _attribute_map = { + 'id': {'key': 'id', 'type': 'str'}, + 'result_type': {'key': 'resultType', 'type': 'str'}, + 'started_on': {'key': 'startedOn', 'type': 'iso-8601'}, + 'ended_on': {'key': 'endedOn', 'type': 'iso-8601'}, + 'status': {'key': 'status', 'type': 'str'}, + 'message': {'key': 'message', 'type': 'str'}, + 'source_server_version': {'key': 'sourceServerVersion', 'type': 'str'}, + 'source_server_brand_version': {'key': 'sourceServerBrandVersion', 'type': 'str'}, + 'target_server_version': {'key': 'targetServerVersion', 'type': 'str'}, + 'target_server_brand_version': {'key': 'targetServerBrandVersion', 'type': 'str'}, + 'exceptions_and_warnings': {'key': 'exceptionsAndWarnings', 'type': '[ReportableException]'}, + 'stage': {'key': 'stage', 'type': 'str'}, + } + + def __init__( + self, + **kwargs + ): + super(MigrateSsisTaskOutputMigrationLevel, self).__init__(**kwargs) + self.result_type = 'MigrationLevelOutput' # type: str + self.started_on = None + self.ended_on = None + self.status = None + self.message = None + self.source_server_version = None + self.source_server_brand_version = None + self.target_server_version = None + self.target_server_brand_version = None + self.exceptions_and_warnings = None + self.stage = None + + +class MigrateSsisTaskOutputProjectLevel(MigrateSsisTaskOutput): + """MigrateSsisTaskOutputProjectLevel. + + Variables are only populated by the server, and will be ignored when sending a request. + + All required parameters must be populated in order to send to Azure. + + :ivar id: Result identifier. + :vartype id: str + :param result_type: Required. Result type.Constant filled by server. + :type result_type: str + :ivar folder_name: Name of the folder. + :vartype folder_name: str + :ivar project_name: Name of the project. + :vartype project_name: str + :ivar state: Current state of migration. Possible values include: "None", "InProgress", + "Failed", "Warning", "Completed", "Skipped", "Stopped". + :vartype state: str or ~azure.mgmt.datamigration.models.MigrationState + :ivar stage: Stage of SSIS migration. Possible values include: "None", "Initialize", + "InProgress", "Completed". + :vartype stage: str or ~azure.mgmt.datamigration.models.SsisMigrationStage + :ivar started_on: Migration start time. + :vartype started_on: ~datetime.datetime + :ivar ended_on: Migration end time. + :vartype ended_on: ~datetime.datetime + :ivar message: Migration progress message. + :vartype message: str + :ivar exceptions_and_warnings: Migration exceptions and warnings. + :vartype exceptions_and_warnings: list[~azure.mgmt.datamigration.models.ReportableException] + """ + + _validation = { + 'id': {'readonly': True}, + 'result_type': {'required': True}, + 'folder_name': {'readonly': True}, + 'project_name': {'readonly': True}, + 'state': {'readonly': True}, + 'stage': {'readonly': True}, + 'started_on': {'readonly': True}, + 'ended_on': {'readonly': True}, + 'message': {'readonly': True}, + 'exceptions_and_warnings': {'readonly': True}, + } + + _attribute_map = { + 'id': {'key': 'id', 'type': 'str'}, + 'result_type': {'key': 'resultType', 'type': 'str'}, + 'folder_name': {'key': 'folderName', 'type': 'str'}, + 'project_name': {'key': 'projectName', 'type': 'str'}, + 'state': {'key': 'state', 'type': 'str'}, + 'stage': {'key': 'stage', 'type': 'str'}, + 'started_on': {'key': 'startedOn', 'type': 'iso-8601'}, + 'ended_on': {'key': 'endedOn', 'type': 'iso-8601'}, + 'message': {'key': 'message', 'type': 'str'}, + 'exceptions_and_warnings': {'key': 'exceptionsAndWarnings', 'type': '[ReportableException]'}, + } + + def __init__( + self, + **kwargs + ): + super(MigrateSsisTaskOutputProjectLevel, self).__init__(**kwargs) + self.result_type = 'SsisProjectLevelOutput' # type: str + self.folder_name = None + self.project_name = None + self.state = None + self.stage = None + self.started_on = None + self.ended_on = None + self.message = None + self.exceptions_and_warnings = None + + +class MigrateSsisTaskProperties(ProjectTaskProperties): + """Properties for task that migrates SSIS packages from SQL Server databases to Azure SQL Database Managed Instance. + + Variables are only populated by the server, and will be ignored when sending a request. + + All required parameters must be populated in order to send to Azure. + + :param task_type: Required. Task type.Constant filled by server. Possible values include: + "Connect.MongoDb", "ConnectToSource.SqlServer", "ConnectToSource.SqlServer.Sync", + "ConnectToSource.PostgreSql.Sync", "ConnectToSource.MySql", "ConnectToSource.Oracle.Sync", + "ConnectToTarget.SqlDb", "ConnectToTarget.SqlDb.Sync", + "ConnectToTarget.AzureDbForPostgreSql.Sync", + "ConnectToTarget.Oracle.AzureDbForPostgreSql.Sync", "ConnectToTarget.AzureSqlDbMI", + "ConnectToTarget.AzureSqlDbMI.Sync.LRS", "ConnectToTarget.AzureDbForMySql", + "GetUserTables.Sql", "GetUserTables.AzureSqlDb.Sync", "GetUserTablesOracle", + "GetUserTablesPostgreSql", "GetUserTablesMySql", "Migrate.MongoDb", + "Migrate.SqlServer.AzureSqlDbMI", "Migrate.SqlServer.AzureSqlDbMI.Sync.LRS", + "Migrate.SqlServer.SqlDb", "Migrate.SqlServer.AzureSqlDb.Sync", + "Migrate.MySql.AzureDbForMySql.Sync", "Migrate.MySql.AzureDbForMySql", + "Migrate.PostgreSql.AzureDbForPostgreSql.SyncV2", "Migrate.Oracle.AzureDbForPostgreSql.Sync", + "ValidateMigrationInput.SqlServer.SqlDb.Sync", "ValidateMigrationInput.SqlServer.AzureSqlDbMI", + "ValidateMigrationInput.SqlServer.AzureSqlDbMI.Sync.LRS", "Validate.MongoDb", + "Validate.Oracle.AzureDbPostgreSql.Sync", "GetTDECertificates.Sql", "Migrate.Ssis", + "Service.Check.OCI", "Service.Upload.OCI", "Service.Install.OCI", + "MigrateSchemaSqlServerSqlDb". + :type task_type: str or ~azure.mgmt.datamigration.models.TaskType + :ivar errors: Array of errors. This is ignored if submitted. + :vartype errors: list[~azure.mgmt.datamigration.models.ODataError] + :ivar state: The state of the task. This is ignored if submitted. Possible values include: + "Unknown", "Queued", "Running", "Canceled", "Succeeded", "Failed", "FailedInputValidation", + "Faulted". + :vartype state: str or ~azure.mgmt.datamigration.models.TaskState + :ivar commands: Array of command properties. + :vartype commands: list[~azure.mgmt.datamigration.models.CommandProperties] + :param client_data: Key value pairs of client data to attach meta data information to task. + :type client_data: dict[str, str] + :param input: Task input. + :type input: ~azure.mgmt.datamigration.models.MigrateSsisTaskInput + :ivar output: Task output. This is ignored if submitted. + :vartype output: list[~azure.mgmt.datamigration.models.MigrateSsisTaskOutput] + """ + + _validation = { + 'task_type': {'required': True}, + 'errors': {'readonly': True}, + 'state': {'readonly': True}, + 'commands': {'readonly': True}, + 'output': {'readonly': True}, + } + + _attribute_map = { + 'task_type': {'key': 'taskType', 'type': 'str'}, + 'errors': {'key': 'errors', 'type': '[ODataError]'}, + 'state': {'key': 'state', 'type': 'str'}, + 'commands': {'key': 'commands', 'type': '[CommandProperties]'}, + 'client_data': {'key': 'clientData', 'type': '{str}'}, + 'input': {'key': 'input', 'type': 'MigrateSsisTaskInput'}, + 'output': {'key': 'output', 'type': '[MigrateSsisTaskOutput]'}, + } + + def __init__( + self, + **kwargs + ): + super(MigrateSsisTaskProperties, self).__init__(**kwargs) + self.task_type = 'Migrate.Ssis' # type: str + self.input = kwargs.get('input', None) + self.output = None + + +class MigrateSyncCompleteCommandInput(msrest.serialization.Model): + """Input for command that completes sync migration for a database. + + All required parameters must be populated in order to send to Azure. + + :param database_name: Required. Name of database. + :type database_name: str + :param commit_time_stamp: Time stamp to complete. + :type commit_time_stamp: ~datetime.datetime + """ + + _validation = { + 'database_name': {'required': True}, + } + + _attribute_map = { + 'database_name': {'key': 'databaseName', 'type': 'str'}, + 'commit_time_stamp': {'key': 'commitTimeStamp', 'type': 'iso-8601'}, + } + + def __init__( + self, + **kwargs + ): + super(MigrateSyncCompleteCommandInput, self).__init__(**kwargs) + self.database_name = kwargs['database_name'] + self.commit_time_stamp = kwargs.get('commit_time_stamp', None) + + +class MigrateSyncCompleteCommandOutput(msrest.serialization.Model): + """Output for command that completes sync migration for a database. + + Variables are only populated by the server, and will be ignored when sending a request. + + :ivar id: Result identifier. + :vartype id: str + :ivar errors: List of errors that happened during the command execution. + :vartype errors: list[~azure.mgmt.datamigration.models.ReportableException] + """ + + _validation = { + 'id': {'readonly': True}, + 'errors': {'readonly': True}, + } + + _attribute_map = { + 'id': {'key': 'id', 'type': 'str'}, + 'errors': {'key': 'errors', 'type': '[ReportableException]'}, + } + + def __init__( + self, + **kwargs + ): + super(MigrateSyncCompleteCommandOutput, self).__init__(**kwargs) + self.id = None + self.errors = None + + +class MigrateSyncCompleteCommandProperties(CommandProperties): + """Properties for the command that completes sync migration for a database. + + Variables are only populated by the server, and will be ignored when sending a request. + + All required parameters must be populated in order to send to Azure. + + :param command_type: Required. Command type.Constant filled by server. Possible values + include: "Migrate.Sync.Complete.Database", "Migrate.SqlServer.AzureDbSqlMi.Complete", "cancel", + "finish", "restart". + :type command_type: str or ~azure.mgmt.datamigration.models.CommandType + :ivar errors: Array of errors. This is ignored if submitted. + :vartype errors: list[~azure.mgmt.datamigration.models.ODataError] + :ivar state: The state of the command. This is ignored if submitted. Possible values include: + "Unknown", "Accepted", "Running", "Succeeded", "Failed". + :vartype state: str or ~azure.mgmt.datamigration.models.CommandState + :param input: Command input. + :type input: ~azure.mgmt.datamigration.models.MigrateSyncCompleteCommandInput + :ivar output: Command output. This is ignored if submitted. + :vartype output: ~azure.mgmt.datamigration.models.MigrateSyncCompleteCommandOutput + """ + + _validation = { + 'command_type': {'required': True}, + 'errors': {'readonly': True}, + 'state': {'readonly': True}, + 'output': {'readonly': True}, + } + + _attribute_map = { + 'command_type': {'key': 'commandType', 'type': 'str'}, + 'errors': {'key': 'errors', 'type': '[ODataError]'}, + 'state': {'key': 'state', 'type': 'str'}, + 'input': {'key': 'input', 'type': 'MigrateSyncCompleteCommandInput'}, + 'output': {'key': 'output', 'type': 'MigrateSyncCompleteCommandOutput'}, + } + + def __init__( + self, + **kwargs + ): + super(MigrateSyncCompleteCommandProperties, self).__init__(**kwargs) + self.command_type = 'Migrate.Sync.Complete.Database' # type: str + self.input = kwargs.get('input', None) + self.output = None + + +class MigrationEligibilityInfo(msrest.serialization.Model): + """Information about migration eligibility of a server object. + + Variables are only populated by the server, and will be ignored when sending a request. + + :ivar is_eligible_for_migration: Whether object is eligible for migration or not. + :vartype is_eligible_for_migration: bool + :ivar validation_messages: Information about eligibility failure for the server object. + :vartype validation_messages: list[str] + """ + + _validation = { + 'is_eligible_for_migration': {'readonly': True}, + 'validation_messages': {'readonly': True}, + } + + _attribute_map = { + 'is_eligible_for_migration': {'key': 'isEligibleForMigration', 'type': 'bool'}, + 'validation_messages': {'key': 'validationMessages', 'type': '[str]'}, + } + + def __init__( + self, + **kwargs + ): + super(MigrationEligibilityInfo, self).__init__(**kwargs) + self.is_eligible_for_migration = None + self.validation_messages = None + + +class MigrationOperationInput(msrest.serialization.Model): + """Migration Operation Input. + + :param migration_operation_id: ID tracking migration operation. + :type migration_operation_id: str + """ + + _attribute_map = { + 'migration_operation_id': {'key': 'migrationOperationId', 'type': 'str'}, + } + + def __init__( + self, + **kwargs + ): + super(MigrationOperationInput, self).__init__(**kwargs) + self.migration_operation_id = kwargs.get('migration_operation_id', None) + + +class MigrationReportResult(msrest.serialization.Model): + """Migration validation report result, contains the url for downloading the generated report. + + :param id: Migration validation result identifier. + :type id: str + :param report_url: The url of the report. + :type report_url: str + """ + + _attribute_map = { + 'id': {'key': 'id', 'type': 'str'}, + 'report_url': {'key': 'reportUrl', 'type': 'str'}, + } + + def __init__( + self, + **kwargs + ): + super(MigrationReportResult, self).__init__(**kwargs) + self.id = kwargs.get('id', None) + self.report_url = kwargs.get('report_url', None) + + +class MigrationStatusDetails(msrest.serialization.Model): + """Detailed status of current migration. + + Variables are only populated by the server, and will be ignored when sending a request. + + :ivar migration_state: Current State of Migration. + :vartype migration_state: str + :ivar full_backup_set_info: Details of full backup set. + :vartype full_backup_set_info: ~azure.mgmt.datamigration.models.SqlBackupSetInfo + :ivar last_restored_backup_set_info: Last applied backup set information. + :vartype last_restored_backup_set_info: ~azure.mgmt.datamigration.models.SqlBackupSetInfo + :ivar active_backup_sets: Backup sets that are currently active. + :vartype active_backup_sets: list[~azure.mgmt.datamigration.models.SqlBackupSetInfo] + :ivar invalid_files: Files that are not valid backup files. + :vartype invalid_files: list[str] + :ivar blob_container_name: Name of blob container. + :vartype blob_container_name: str + :ivar is_full_backup_restored: Whether full backup has been applied to the target database or + not. + :vartype is_full_backup_restored: bool + :ivar restore_blocking_reason: Restore blocking reason, if any. + :vartype restore_blocking_reason: str + :ivar complete_restore_error_message: Complete restore error message, if any. + :vartype complete_restore_error_message: str + :ivar file_upload_blocking_errors: File upload blocking errors, if any. + :vartype file_upload_blocking_errors: list[str] + :ivar current_restoring_filename: File name that is currently being restored. + :vartype current_restoring_filename: str + :ivar last_restored_filename: Last restored file name. + :vartype last_restored_filename: str + :ivar pending_log_backups_count: Total pending log backups. + :vartype pending_log_backups_count: int + """ + + _validation = { + 'migration_state': {'readonly': True}, + 'full_backup_set_info': {'readonly': True}, + 'last_restored_backup_set_info': {'readonly': True}, + 'active_backup_sets': {'readonly': True}, + 'invalid_files': {'readonly': True}, + 'blob_container_name': {'readonly': True}, + 'is_full_backup_restored': {'readonly': True}, + 'restore_blocking_reason': {'readonly': True}, + 'complete_restore_error_message': {'readonly': True}, + 'file_upload_blocking_errors': {'readonly': True}, + 'current_restoring_filename': {'readonly': True}, + 'last_restored_filename': {'readonly': True}, + 'pending_log_backups_count': {'readonly': True}, + } + + _attribute_map = { + 'migration_state': {'key': 'migrationState', 'type': 'str'}, + 'full_backup_set_info': {'key': 'fullBackupSetInfo', 'type': 'SqlBackupSetInfo'}, + 'last_restored_backup_set_info': {'key': 'lastRestoredBackupSetInfo', 'type': 'SqlBackupSetInfo'}, + 'active_backup_sets': {'key': 'activeBackupSets', 'type': '[SqlBackupSetInfo]'}, + 'invalid_files': {'key': 'invalidFiles', 'type': '[str]'}, + 'blob_container_name': {'key': 'blobContainerName', 'type': 'str'}, + 'is_full_backup_restored': {'key': 'isFullBackupRestored', 'type': 'bool'}, + 'restore_blocking_reason': {'key': 'restoreBlockingReason', 'type': 'str'}, + 'complete_restore_error_message': {'key': 'completeRestoreErrorMessage', 'type': 'str'}, + 'file_upload_blocking_errors': {'key': 'fileUploadBlockingErrors', 'type': '[str]'}, + 'current_restoring_filename': {'key': 'currentRestoringFilename', 'type': 'str'}, + 'last_restored_filename': {'key': 'lastRestoredFilename', 'type': 'str'}, + 'pending_log_backups_count': {'key': 'pendingLogBackupsCount', 'type': 'int'}, + } + + def __init__( + self, + **kwargs + ): + super(MigrationStatusDetails, self).__init__(**kwargs) + self.migration_state = None + self.full_backup_set_info = None + self.last_restored_backup_set_info = None + self.active_backup_sets = None + self.invalid_files = None + self.blob_container_name = None + self.is_full_backup_restored = None + self.restore_blocking_reason = None + self.complete_restore_error_message = None + self.file_upload_blocking_errors = None + self.current_restoring_filename = None + self.last_restored_filename = None + self.pending_log_backups_count = None + + +class MigrationTableMetadata(msrest.serialization.Model): + """Metadata for tables selected in migration project. + + Variables are only populated by the server, and will be ignored when sending a request. + + :ivar source_table_name: Source table name. + :vartype source_table_name: str + :ivar target_table_name: Target table name. + :vartype target_table_name: str + """ + + _validation = { + 'source_table_name': {'readonly': True}, + 'target_table_name': {'readonly': True}, + } + + _attribute_map = { + 'source_table_name': {'key': 'sourceTableName', 'type': 'str'}, + 'target_table_name': {'key': 'targetTableName', 'type': 'str'}, + } + + def __init__( + self, + **kwargs + ): + super(MigrationTableMetadata, self).__init__(**kwargs) + self.source_table_name = None + self.target_table_name = None + + +class MigrationValidationDatabaseSummaryResult(msrest.serialization.Model): + """Migration Validation Database level summary result. + + Variables are only populated by the server, and will be ignored when sending a request. + + :ivar id: Result identifier. + :vartype id: str + :ivar migration_id: Migration Identifier. + :vartype migration_id: str + :ivar source_database_name: Name of the source database. + :vartype source_database_name: str + :ivar target_database_name: Name of the target database. + :vartype target_database_name: str + :ivar started_on: Validation start time. + :vartype started_on: ~datetime.datetime + :ivar ended_on: Validation end time. + :vartype ended_on: ~datetime.datetime + :ivar status: Current status of validation at the database level. Possible values include: + "Default", "NotStarted", "Initialized", "InProgress", "Completed", "CompletedWithIssues", + "Stopped", "Failed". + :vartype status: str or ~azure.mgmt.datamigration.models.ValidationStatus + """ + + _validation = { + 'id': {'readonly': True}, + 'migration_id': {'readonly': True}, + 'source_database_name': {'readonly': True}, + 'target_database_name': {'readonly': True}, + 'started_on': {'readonly': True}, + 'ended_on': {'readonly': True}, + 'status': {'readonly': True}, + } + + _attribute_map = { + 'id': {'key': 'id', 'type': 'str'}, + 'migration_id': {'key': 'migrationId', 'type': 'str'}, + 'source_database_name': {'key': 'sourceDatabaseName', 'type': 'str'}, + 'target_database_name': {'key': 'targetDatabaseName', 'type': 'str'}, + 'started_on': {'key': 'startedOn', 'type': 'iso-8601'}, + 'ended_on': {'key': 'endedOn', 'type': 'iso-8601'}, + 'status': {'key': 'status', 'type': 'str'}, + } + + def __init__( + self, + **kwargs + ): + super(MigrationValidationDatabaseSummaryResult, self).__init__(**kwargs) + self.id = None + self.migration_id = None + self.source_database_name = None + self.target_database_name = None + self.started_on = None + self.ended_on = None + self.status = None + + +class MigrationValidationOptions(msrest.serialization.Model): + """Types of validations to run after the migration. + + :param enable_schema_validation: Allows to compare the schema information between source and + target. + :type enable_schema_validation: bool + :param enable_data_integrity_validation: Allows to perform a checksum based data integrity + validation between source and target for the selected database / tables . + :type enable_data_integrity_validation: bool + :param enable_query_analysis_validation: Allows to perform a quick and intelligent query + analysis by retrieving queries from the source database and executes them in the target. The + result will have execution statistics for executions in source and target databases for the + extracted queries. + :type enable_query_analysis_validation: bool + """ + + _attribute_map = { + 'enable_schema_validation': {'key': 'enableSchemaValidation', 'type': 'bool'}, + 'enable_data_integrity_validation': {'key': 'enableDataIntegrityValidation', 'type': 'bool'}, + 'enable_query_analysis_validation': {'key': 'enableQueryAnalysisValidation', 'type': 'bool'}, + } + + def __init__( + self, + **kwargs + ): + super(MigrationValidationOptions, self).__init__(**kwargs) + self.enable_schema_validation = kwargs.get('enable_schema_validation', None) + self.enable_data_integrity_validation = kwargs.get('enable_data_integrity_validation', None) + self.enable_query_analysis_validation = kwargs.get('enable_query_analysis_validation', None) + + +class MiSqlConnectionInfo(ConnectionInfo): + """Properties required to create a connection to Azure SQL database Managed instance. + + All required parameters must be populated in order to send to Azure. + + :param type: Required. Type of connection info.Constant filled by server. + :type type: str + :param user_name: User name. + :type user_name: str + :param password: Password credential. + :type password: str + :param managed_instance_resource_id: Required. Resource id for Azure SQL database Managed + instance. + :type managed_instance_resource_id: str + """ + + _validation = { + 'type': {'required': True}, + 'managed_instance_resource_id': {'required': True}, + } + + _attribute_map = { + 'type': {'key': 'type', 'type': 'str'}, + 'user_name': {'key': 'userName', 'type': 'str'}, + 'password': {'key': 'password', 'type': 'str'}, + 'managed_instance_resource_id': {'key': 'managedInstanceResourceId', 'type': 'str'}, + } + + def __init__( + self, + **kwargs + ): + super(MiSqlConnectionInfo, self).__init__(**kwargs) + self.type = 'MiSqlConnectionInfo' # type: str + self.managed_instance_resource_id = kwargs['managed_instance_resource_id'] + + +class MongoDbCancelCommand(CommandProperties): + """Properties for the command that cancels a migration in whole or in part. + + Variables are only populated by the server, and will be ignored when sending a request. + + All required parameters must be populated in order to send to Azure. + + :param command_type: Required. Command type.Constant filled by server. Possible values + include: "Migrate.Sync.Complete.Database", "Migrate.SqlServer.AzureDbSqlMi.Complete", "cancel", + "finish", "restart". + :type command_type: str or ~azure.mgmt.datamigration.models.CommandType + :ivar errors: Array of errors. This is ignored if submitted. + :vartype errors: list[~azure.mgmt.datamigration.models.ODataError] + :ivar state: The state of the command. This is ignored if submitted. Possible values include: + "Unknown", "Accepted", "Running", "Succeeded", "Failed". + :vartype state: str or ~azure.mgmt.datamigration.models.CommandState + :param input: Command input. + :type input: ~azure.mgmt.datamigration.models.MongoDbCommandInput + """ + + _validation = { + 'command_type': {'required': True}, + 'errors': {'readonly': True}, + 'state': {'readonly': True}, + } + + _attribute_map = { + 'command_type': {'key': 'commandType', 'type': 'str'}, + 'errors': {'key': 'errors', 'type': '[ODataError]'}, + 'state': {'key': 'state', 'type': 'str'}, + 'input': {'key': 'input', 'type': 'MongoDbCommandInput'}, + } + + def __init__( + self, + **kwargs + ): + super(MongoDbCancelCommand, self).__init__(**kwargs) + self.command_type = 'cancel' # type: str + self.input = kwargs.get('input', None) + + +class MongoDbClusterInfo(msrest.serialization.Model): + """Describes a MongoDB data source. + + All required parameters must be populated in order to send to Azure. + + :param databases: Required. A list of non-system databases in the cluster. + :type databases: list[~azure.mgmt.datamigration.models.MongoDbDatabaseInfo] + :param supports_sharding: Required. Whether the cluster supports sharded collections. + :type supports_sharding: bool + :param type: Required. The type of data source. Possible values include: "BlobContainer", + "CosmosDb", "MongoDb". + :type type: str or ~azure.mgmt.datamigration.models.MongoDbClusterType + :param version: Required. The version of the data source in the form x.y.z (e.g. 3.6.7). Not + used if Type is BlobContainer. + :type version: str + """ + + _validation = { + 'databases': {'required': True}, + 'supports_sharding': {'required': True}, + 'type': {'required': True}, + 'version': {'required': True}, + } + + _attribute_map = { + 'databases': {'key': 'databases', 'type': '[MongoDbDatabaseInfo]'}, + 'supports_sharding': {'key': 'supportsSharding', 'type': 'bool'}, + 'type': {'key': 'type', 'type': 'str'}, + 'version': {'key': 'version', 'type': 'str'}, + } + + def __init__( + self, + **kwargs + ): + super(MongoDbClusterInfo, self).__init__(**kwargs) + self.databases = kwargs['databases'] + self.supports_sharding = kwargs['supports_sharding'] + self.type = kwargs['type'] + self.version = kwargs['version'] + + +class MongoDbObjectInfo(msrest.serialization.Model): + """Describes a database or collection within a MongoDB data source. + + All required parameters must be populated in order to send to Azure. + + :param average_document_size: Required. The average document size, or -1 if the average size is + unknown. + :type average_document_size: long + :param data_size: Required. The estimated total data size, in bytes, or -1 if the size is + unknown. + :type data_size: long + :param document_count: Required. The estimated total number of documents, or -1 if the document + count is unknown. + :type document_count: long + :param name: Required. The unqualified name of the database or collection. + :type name: str + :param qualified_name: Required. The qualified name of the database or collection. For a + collection, this is the database-qualified name. + :type qualified_name: str + """ + + _validation = { + 'average_document_size': {'required': True}, + 'data_size': {'required': True}, + 'document_count': {'required': True}, + 'name': {'required': True}, + 'qualified_name': {'required': True}, + } + + _attribute_map = { + 'average_document_size': {'key': 'averageDocumentSize', 'type': 'long'}, + 'data_size': {'key': 'dataSize', 'type': 'long'}, + 'document_count': {'key': 'documentCount', 'type': 'long'}, + 'name': {'key': 'name', 'type': 'str'}, + 'qualified_name': {'key': 'qualifiedName', 'type': 'str'}, + } + + def __init__( + self, + **kwargs + ): + super(MongoDbObjectInfo, self).__init__(**kwargs) + self.average_document_size = kwargs['average_document_size'] + self.data_size = kwargs['data_size'] + self.document_count = kwargs['document_count'] + self.name = kwargs['name'] + self.qualified_name = kwargs['qualified_name'] + + +class MongoDbCollectionInfo(MongoDbObjectInfo): + """Describes a supported collection within a MongoDB database. + + All required parameters must be populated in order to send to Azure. + + :param average_document_size: Required. The average document size, or -1 if the average size is + unknown. + :type average_document_size: long + :param data_size: Required. The estimated total data size, in bytes, or -1 if the size is + unknown. + :type data_size: long + :param document_count: Required. The estimated total number of documents, or -1 if the document + count is unknown. + :type document_count: long + :param name: Required. The unqualified name of the database or collection. + :type name: str + :param qualified_name: Required. The qualified name of the database or collection. For a + collection, this is the database-qualified name. + :type qualified_name: str + :param database_name: Required. The name of the database containing the collection. + :type database_name: str + :param is_capped: Required. Whether the collection is a capped collection (i.e. whether it has + a fixed size and acts like a circular buffer). + :type is_capped: bool + :param is_system_collection: Required. Whether the collection is system collection. + :type is_system_collection: bool + :param is_view: Required. Whether the collection is a view of another collection. + :type is_view: bool + :param shard_key: The shard key on the collection, or null if the collection is not sharded. + :type shard_key: ~azure.mgmt.datamigration.models.MongoDbShardKeyInfo + :param supports_sharding: Required. Whether the database has sharding enabled. Note that the + migration task will enable sharding on the target if necessary. + :type supports_sharding: bool + :param view_of: The name of the collection that this is a view of, if IsView is true. + :type view_of: str + """ + + _validation = { + 'average_document_size': {'required': True}, + 'data_size': {'required': True}, + 'document_count': {'required': True}, + 'name': {'required': True}, + 'qualified_name': {'required': True}, + 'database_name': {'required': True}, + 'is_capped': {'required': True}, + 'is_system_collection': {'required': True}, + 'is_view': {'required': True}, + 'supports_sharding': {'required': True}, + } + + _attribute_map = { + 'average_document_size': {'key': 'averageDocumentSize', 'type': 'long'}, + 'data_size': {'key': 'dataSize', 'type': 'long'}, + 'document_count': {'key': 'documentCount', 'type': 'long'}, + 'name': {'key': 'name', 'type': 'str'}, + 'qualified_name': {'key': 'qualifiedName', 'type': 'str'}, + 'database_name': {'key': 'databaseName', 'type': 'str'}, + 'is_capped': {'key': 'isCapped', 'type': 'bool'}, + 'is_system_collection': {'key': 'isSystemCollection', 'type': 'bool'}, + 'is_view': {'key': 'isView', 'type': 'bool'}, + 'shard_key': {'key': 'shardKey', 'type': 'MongoDbShardKeyInfo'}, + 'supports_sharding': {'key': 'supportsSharding', 'type': 'bool'}, + 'view_of': {'key': 'viewOf', 'type': 'str'}, + } + + def __init__( + self, + **kwargs + ): + super(MongoDbCollectionInfo, self).__init__(**kwargs) + self.database_name = kwargs['database_name'] + self.is_capped = kwargs['is_capped'] + self.is_system_collection = kwargs['is_system_collection'] + self.is_view = kwargs['is_view'] + self.shard_key = kwargs.get('shard_key', None) + self.supports_sharding = kwargs['supports_sharding'] + self.view_of = kwargs.get('view_of', None) + + +class MongoDbProgress(msrest.serialization.Model): + """Base class for MongoDB migration outputs. + + You probably want to use the sub-classes and not this class directly. Known + sub-classes are: MongoDbCollectionProgress, MongoDbDatabaseProgress, MongoDbMigrationProgress. + + All required parameters must be populated in order to send to Azure. + + :param bytes_copied: Required. The number of document bytes copied during the Copying stage. + :type bytes_copied: long + :param documents_copied: Required. The number of documents copied during the Copying stage. + :type documents_copied: long + :param elapsed_time: Required. The elapsed time in the format [ddd.]hh:mm:ss[.fffffff] (i.e. + TimeSpan format). + :type elapsed_time: str + :param errors: Required. The errors and warnings that have occurred for the current object. The + keys are the error codes. + :type errors: dict[str, ~azure.mgmt.datamigration.models.MongoDbError] + :param events_pending: Required. The number of oplog events awaiting replay. + :type events_pending: long + :param events_replayed: Required. The number of oplog events replayed so far. + :type events_replayed: long + :param last_event_time: The timestamp of the last oplog event received, or null if no oplog + event has been received yet. + :type last_event_time: ~datetime.datetime + :param last_replay_time: The timestamp of the last oplog event replayed, or null if no oplog + event has been replayed yet. + :type last_replay_time: ~datetime.datetime + :param name: The name of the progress object. For a collection, this is the unqualified + collection name. For a database, this is the database name. For the overall migration, this is + null. + :type name: str + :param qualified_name: The qualified name of the progress object. For a collection, this is the + database-qualified name. For a database, this is the database name. For the overall migration, + this is null. + :type qualified_name: str + :param result_type: Required. The type of progress object.Constant filled by server. Possible + values include: "Migration", "Database", "Collection". + :type result_type: str or ~azure.mgmt.datamigration.models.MongoDbProgressResultType + :param state: Required. Possible values include: "NotStarted", "ValidatingInput", + "Initializing", "Restarting", "Copying", "InitialReplay", "Replaying", "Finalizing", + "Complete", "Canceled", "Failed". + :type state: str or ~azure.mgmt.datamigration.models.MongoDbMigrationState + :param total_bytes: Required. The total number of document bytes on the source at the beginning + of the Copying stage, or -1 if the total size was unknown. + :type total_bytes: long + :param total_documents: Required. The total number of documents on the source at the beginning + of the Copying stage, or -1 if the total count was unknown. + :type total_documents: long + """ + + _validation = { + 'bytes_copied': {'required': True}, + 'documents_copied': {'required': True}, + 'elapsed_time': {'required': True}, + 'errors': {'required': True}, + 'events_pending': {'required': True}, + 'events_replayed': {'required': True}, + 'result_type': {'required': True}, + 'state': {'required': True}, + 'total_bytes': {'required': True}, + 'total_documents': {'required': True}, + } + + _attribute_map = { + 'bytes_copied': {'key': 'bytesCopied', 'type': 'long'}, + 'documents_copied': {'key': 'documentsCopied', 'type': 'long'}, + 'elapsed_time': {'key': 'elapsedTime', 'type': 'str'}, + 'errors': {'key': 'errors', 'type': '{MongoDbError}'}, + 'events_pending': {'key': 'eventsPending', 'type': 'long'}, + 'events_replayed': {'key': 'eventsReplayed', 'type': 'long'}, + 'last_event_time': {'key': 'lastEventTime', 'type': 'iso-8601'}, + 'last_replay_time': {'key': 'lastReplayTime', 'type': 'iso-8601'}, + 'name': {'key': 'name', 'type': 'str'}, + 'qualified_name': {'key': 'qualifiedName', 'type': 'str'}, + 'result_type': {'key': 'resultType', 'type': 'str'}, + 'state': {'key': 'state', 'type': 'str'}, + 'total_bytes': {'key': 'totalBytes', 'type': 'long'}, + 'total_documents': {'key': 'totalDocuments', 'type': 'long'}, + } + + _subtype_map = { + 'result_type': {'Collection': 'MongoDbCollectionProgress', 'Database': 'MongoDbDatabaseProgress', 'Migration': 'MongoDbMigrationProgress'} + } + + def __init__( + self, + **kwargs + ): + super(MongoDbProgress, self).__init__(**kwargs) + self.bytes_copied = kwargs['bytes_copied'] + self.documents_copied = kwargs['documents_copied'] + self.elapsed_time = kwargs['elapsed_time'] + self.errors = kwargs['errors'] + self.events_pending = kwargs['events_pending'] + self.events_replayed = kwargs['events_replayed'] + self.last_event_time = kwargs.get('last_event_time', None) + self.last_replay_time = kwargs.get('last_replay_time', None) + self.name = kwargs.get('name', None) + self.qualified_name = kwargs.get('qualified_name', None) + self.result_type = None # type: Optional[str] + self.state = kwargs['state'] + self.total_bytes = kwargs['total_bytes'] + self.total_documents = kwargs['total_documents'] + + +class MongoDbCollectionProgress(MongoDbProgress): + """Describes the progress of a collection. + + All required parameters must be populated in order to send to Azure. + + :param bytes_copied: Required. The number of document bytes copied during the Copying stage. + :type bytes_copied: long + :param documents_copied: Required. The number of documents copied during the Copying stage. + :type documents_copied: long + :param elapsed_time: Required. The elapsed time in the format [ddd.]hh:mm:ss[.fffffff] (i.e. + TimeSpan format). + :type elapsed_time: str + :param errors: Required. The errors and warnings that have occurred for the current object. The + keys are the error codes. + :type errors: dict[str, ~azure.mgmt.datamigration.models.MongoDbError] + :param events_pending: Required. The number of oplog events awaiting replay. + :type events_pending: long + :param events_replayed: Required. The number of oplog events replayed so far. + :type events_replayed: long + :param last_event_time: The timestamp of the last oplog event received, or null if no oplog + event has been received yet. + :type last_event_time: ~datetime.datetime + :param last_replay_time: The timestamp of the last oplog event replayed, or null if no oplog + event has been replayed yet. + :type last_replay_time: ~datetime.datetime + :param name: The name of the progress object. For a collection, this is the unqualified + collection name. For a database, this is the database name. For the overall migration, this is + null. + :type name: str + :param qualified_name: The qualified name of the progress object. For a collection, this is the + database-qualified name. For a database, this is the database name. For the overall migration, + this is null. + :type qualified_name: str + :param result_type: Required. The type of progress object.Constant filled by server. Possible + values include: "Migration", "Database", "Collection". + :type result_type: str or ~azure.mgmt.datamigration.models.MongoDbProgressResultType + :param state: Required. Possible values include: "NotStarted", "ValidatingInput", + "Initializing", "Restarting", "Copying", "InitialReplay", "Replaying", "Finalizing", + "Complete", "Canceled", "Failed". + :type state: str or ~azure.mgmt.datamigration.models.MongoDbMigrationState + :param total_bytes: Required. The total number of document bytes on the source at the beginning + of the Copying stage, or -1 if the total size was unknown. + :type total_bytes: long + :param total_documents: Required. The total number of documents on the source at the beginning + of the Copying stage, or -1 if the total count was unknown. + :type total_documents: long + """ + + _validation = { + 'bytes_copied': {'required': True}, + 'documents_copied': {'required': True}, + 'elapsed_time': {'required': True}, + 'errors': {'required': True}, + 'events_pending': {'required': True}, + 'events_replayed': {'required': True}, + 'result_type': {'required': True}, + 'state': {'required': True}, + 'total_bytes': {'required': True}, + 'total_documents': {'required': True}, + } + + _attribute_map = { + 'bytes_copied': {'key': 'bytesCopied', 'type': 'long'}, + 'documents_copied': {'key': 'documentsCopied', 'type': 'long'}, + 'elapsed_time': {'key': 'elapsedTime', 'type': 'str'}, + 'errors': {'key': 'errors', 'type': '{MongoDbError}'}, + 'events_pending': {'key': 'eventsPending', 'type': 'long'}, + 'events_replayed': {'key': 'eventsReplayed', 'type': 'long'}, + 'last_event_time': {'key': 'lastEventTime', 'type': 'iso-8601'}, + 'last_replay_time': {'key': 'lastReplayTime', 'type': 'iso-8601'}, + 'name': {'key': 'name', 'type': 'str'}, + 'qualified_name': {'key': 'qualifiedName', 'type': 'str'}, + 'result_type': {'key': 'resultType', 'type': 'str'}, + 'state': {'key': 'state', 'type': 'str'}, + 'total_bytes': {'key': 'totalBytes', 'type': 'long'}, + 'total_documents': {'key': 'totalDocuments', 'type': 'long'}, + } + + def __init__( + self, + **kwargs + ): + super(MongoDbCollectionProgress, self).__init__(**kwargs) + self.result_type = 'Collection' # type: str + + +class MongoDbCollectionSettings(msrest.serialization.Model): + """Describes how an individual MongoDB collection should be migrated. + + :param can_delete: Whether the migrator is allowed to drop the target collection in the course + of performing a migration. The default is true. + :type can_delete: bool + :param shard_key: Describes a MongoDB shard key. + :type shard_key: ~azure.mgmt.datamigration.models.MongoDbShardKeySetting + :param target_r_us: The RUs that should be configured on a CosmosDB target, or null to use the + default. This has no effect on non-CosmosDB targets. + :type target_r_us: int + """ + + _attribute_map = { + 'can_delete': {'key': 'canDelete', 'type': 'bool'}, + 'shard_key': {'key': 'shardKey', 'type': 'MongoDbShardKeySetting'}, + 'target_r_us': {'key': 'targetRUs', 'type': 'int'}, + } + + def __init__( + self, + **kwargs + ): + super(MongoDbCollectionSettings, self).__init__(**kwargs) + self.can_delete = kwargs.get('can_delete', None) + self.shard_key = kwargs.get('shard_key', None) + self.target_r_us = kwargs.get('target_r_us', None) + + +class MongoDbCommandInput(msrest.serialization.Model): + """Describes the input to the 'cancel' and 'restart' MongoDB migration commands. + + :param object_name: The qualified name of a database or collection to act upon, or null to act + upon the entire migration. + :type object_name: str + """ + + _attribute_map = { + 'object_name': {'key': 'objectName', 'type': 'str'}, + } + + def __init__( + self, + **kwargs + ): + super(MongoDbCommandInput, self).__init__(**kwargs) + self.object_name = kwargs.get('object_name', None) + + +class MongoDbConnectionInfo(ConnectionInfo): + """Describes a connection to a MongoDB data source. + + All required parameters must be populated in order to send to Azure. + + :param type: Required. Type of connection info.Constant filled by server. + :type type: str + :param user_name: User name. + :type user_name: str + :param password: Password credential. + :type password: str + :param connection_string: Required. A MongoDB connection string or blob container URL. The user + name and password can be specified here or in the userName and password properties. + :type connection_string: str + :param data_source: Data source. + :type data_source: str + :param encrypt_connection: Whether to encrypt the connection. + :type encrypt_connection: bool + :param server_brand_version: server brand version. + :type server_brand_version: str + :param enforce_ssl: + :type enforce_ssl: bool + :param port: port for server. + :type port: int + :param additional_settings: Additional connection settings. + :type additional_settings: str + """ + + _validation = { + 'type': {'required': True}, + 'connection_string': {'required': True}, + } + + _attribute_map = { + 'type': {'key': 'type', 'type': 'str'}, + 'user_name': {'key': 'userName', 'type': 'str'}, + 'password': {'key': 'password', 'type': 'str'}, + 'connection_string': {'key': 'connectionString', 'type': 'str'}, + 'data_source': {'key': 'dataSource', 'type': 'str'}, + 'encrypt_connection': {'key': 'encryptConnection', 'type': 'bool'}, + 'server_brand_version': {'key': 'serverBrandVersion', 'type': 'str'}, + 'enforce_ssl': {'key': 'enforceSSL', 'type': 'bool'}, + 'port': {'key': 'port', 'type': 'int'}, + 'additional_settings': {'key': 'additionalSettings', 'type': 'str'}, + } + + def __init__( + self, + **kwargs + ): + super(MongoDbConnectionInfo, self).__init__(**kwargs) + self.type = 'MongoDbConnectionInfo' # type: str + self.connection_string = kwargs['connection_string'] + self.data_source = kwargs.get('data_source', None) + self.encrypt_connection = kwargs.get('encrypt_connection', None) + self.server_brand_version = kwargs.get('server_brand_version', None) + self.enforce_ssl = kwargs.get('enforce_ssl', None) + self.port = kwargs.get('port', None) + self.additional_settings = kwargs.get('additional_settings', None) + + +class MongoDbDatabaseInfo(MongoDbObjectInfo): + """Describes a database within a MongoDB data source. + + All required parameters must be populated in order to send to Azure. + + :param average_document_size: Required. The average document size, or -1 if the average size is + unknown. + :type average_document_size: long + :param data_size: Required. The estimated total data size, in bytes, or -1 if the size is + unknown. + :type data_size: long + :param document_count: Required. The estimated total number of documents, or -1 if the document + count is unknown. + :type document_count: long + :param name: Required. The unqualified name of the database or collection. + :type name: str + :param qualified_name: Required. The qualified name of the database or collection. For a + collection, this is the database-qualified name. + :type qualified_name: str + :param collections: Required. A list of supported collections in a MongoDB database. + :type collections: list[~azure.mgmt.datamigration.models.MongoDbCollectionInfo] + :param supports_sharding: Required. Whether the database has sharding enabled. Note that the + migration task will enable sharding on the target if necessary. + :type supports_sharding: bool + """ + + _validation = { + 'average_document_size': {'required': True}, + 'data_size': {'required': True}, + 'document_count': {'required': True}, + 'name': {'required': True}, + 'qualified_name': {'required': True}, + 'collections': {'required': True}, + 'supports_sharding': {'required': True}, + } + + _attribute_map = { + 'average_document_size': {'key': 'averageDocumentSize', 'type': 'long'}, + 'data_size': {'key': 'dataSize', 'type': 'long'}, + 'document_count': {'key': 'documentCount', 'type': 'long'}, + 'name': {'key': 'name', 'type': 'str'}, + 'qualified_name': {'key': 'qualifiedName', 'type': 'str'}, + 'collections': {'key': 'collections', 'type': '[MongoDbCollectionInfo]'}, + 'supports_sharding': {'key': 'supportsSharding', 'type': 'bool'}, + } + + def __init__( + self, + **kwargs + ): + super(MongoDbDatabaseInfo, self).__init__(**kwargs) + self.collections = kwargs['collections'] + self.supports_sharding = kwargs['supports_sharding'] + + +class MongoDbDatabaseProgress(MongoDbProgress): + """Describes the progress of a database. + + All required parameters must be populated in order to send to Azure. + + :param bytes_copied: Required. The number of document bytes copied during the Copying stage. + :type bytes_copied: long + :param documents_copied: Required. The number of documents copied during the Copying stage. + :type documents_copied: long + :param elapsed_time: Required. The elapsed time in the format [ddd.]hh:mm:ss[.fffffff] (i.e. + TimeSpan format). + :type elapsed_time: str + :param errors: Required. The errors and warnings that have occurred for the current object. The + keys are the error codes. + :type errors: dict[str, ~azure.mgmt.datamigration.models.MongoDbError] + :param events_pending: Required. The number of oplog events awaiting replay. + :type events_pending: long + :param events_replayed: Required. The number of oplog events replayed so far. + :type events_replayed: long + :param last_event_time: The timestamp of the last oplog event received, or null if no oplog + event has been received yet. + :type last_event_time: ~datetime.datetime + :param last_replay_time: The timestamp of the last oplog event replayed, or null if no oplog + event has been replayed yet. + :type last_replay_time: ~datetime.datetime + :param name: The name of the progress object. For a collection, this is the unqualified + collection name. For a database, this is the database name. For the overall migration, this is + null. + :type name: str + :param qualified_name: The qualified name of the progress object. For a collection, this is the + database-qualified name. For a database, this is the database name. For the overall migration, + this is null. + :type qualified_name: str + :param result_type: Required. The type of progress object.Constant filled by server. Possible + values include: "Migration", "Database", "Collection". + :type result_type: str or ~azure.mgmt.datamigration.models.MongoDbProgressResultType + :param state: Required. Possible values include: "NotStarted", "ValidatingInput", + "Initializing", "Restarting", "Copying", "InitialReplay", "Replaying", "Finalizing", + "Complete", "Canceled", "Failed". + :type state: str or ~azure.mgmt.datamigration.models.MongoDbMigrationState + :param total_bytes: Required. The total number of document bytes on the source at the beginning + of the Copying stage, or -1 if the total size was unknown. + :type total_bytes: long + :param total_documents: Required. The total number of documents on the source at the beginning + of the Copying stage, or -1 if the total count was unknown. + :type total_documents: long + :param collections: The progress of the collections in the database. The keys are the + unqualified names of the collections. + :type collections: dict[str, ~azure.mgmt.datamigration.models.MongoDbProgress] + """ + + _validation = { + 'bytes_copied': {'required': True}, + 'documents_copied': {'required': True}, + 'elapsed_time': {'required': True}, + 'errors': {'required': True}, + 'events_pending': {'required': True}, + 'events_replayed': {'required': True}, + 'result_type': {'required': True}, + 'state': {'required': True}, + 'total_bytes': {'required': True}, + 'total_documents': {'required': True}, + } + + _attribute_map = { + 'bytes_copied': {'key': 'bytesCopied', 'type': 'long'}, + 'documents_copied': {'key': 'documentsCopied', 'type': 'long'}, + 'elapsed_time': {'key': 'elapsedTime', 'type': 'str'}, + 'errors': {'key': 'errors', 'type': '{MongoDbError}'}, + 'events_pending': {'key': 'eventsPending', 'type': 'long'}, + 'events_replayed': {'key': 'eventsReplayed', 'type': 'long'}, + 'last_event_time': {'key': 'lastEventTime', 'type': 'iso-8601'}, + 'last_replay_time': {'key': 'lastReplayTime', 'type': 'iso-8601'}, + 'name': {'key': 'name', 'type': 'str'}, + 'qualified_name': {'key': 'qualifiedName', 'type': 'str'}, + 'result_type': {'key': 'resultType', 'type': 'str'}, + 'state': {'key': 'state', 'type': 'str'}, + 'total_bytes': {'key': 'totalBytes', 'type': 'long'}, + 'total_documents': {'key': 'totalDocuments', 'type': 'long'}, + 'collections': {'key': 'collections', 'type': '{MongoDbProgress}'}, + } + + def __init__( + self, + **kwargs + ): + super(MongoDbDatabaseProgress, self).__init__(**kwargs) + self.result_type = 'Database' # type: str + self.collections = kwargs.get('collections', None) + + +class MongoDbDatabaseSettings(msrest.serialization.Model): + """Describes how an individual MongoDB database should be migrated. + + All required parameters must be populated in order to send to Azure. + + :param collections: Required. The collections on the source database to migrate to the target. + The keys are the unqualified names of the collections. + :type collections: dict[str, ~azure.mgmt.datamigration.models.MongoDbCollectionSettings] + :param target_r_us: The RUs that should be configured on a CosmosDB target, or null to use the + default, or 0 if throughput should not be provisioned for the database. This has no effect on + non-CosmosDB targets. + :type target_r_us: int + """ + + _validation = { + 'collections': {'required': True}, + } + + _attribute_map = { + 'collections': {'key': 'collections', 'type': '{MongoDbCollectionSettings}'}, + 'target_r_us': {'key': 'targetRUs', 'type': 'int'}, + } + + def __init__( + self, + **kwargs + ): + super(MongoDbDatabaseSettings, self).__init__(**kwargs) + self.collections = kwargs['collections'] + self.target_r_us = kwargs.get('target_r_us', None) + + +class MongoDbError(msrest.serialization.Model): + """Describes an error or warning that occurred during a MongoDB migration. + + :param code: The non-localized, machine-readable code that describes the error or warning. + :type code: str + :param count: The number of times the error or warning has occurred. + :type count: int + :param message: The localized, human-readable message that describes the error or warning. + :type message: str + :param type: The type of error or warning. Possible values include: "Error", "ValidationError", + "Warning". + :type type: str or ~azure.mgmt.datamigration.models.MongoDbErrorType + """ + + _attribute_map = { + 'code': {'key': 'code', 'type': 'str'}, + 'count': {'key': 'count', 'type': 'int'}, + 'message': {'key': 'message', 'type': 'str'}, + 'type': {'key': 'type', 'type': 'str'}, + } + + def __init__( + self, + **kwargs + ): + super(MongoDbError, self).__init__(**kwargs) + self.code = kwargs.get('code', None) + self.count = kwargs.get('count', None) + self.message = kwargs.get('message', None) + self.type = kwargs.get('type', None) + + +class MongoDbFinishCommand(CommandProperties): + """Properties for the command that finishes a migration in whole or in part. + + Variables are only populated by the server, and will be ignored when sending a request. + + All required parameters must be populated in order to send to Azure. + + :param command_type: Required. Command type.Constant filled by server. Possible values + include: "Migrate.Sync.Complete.Database", "Migrate.SqlServer.AzureDbSqlMi.Complete", "cancel", + "finish", "restart". + :type command_type: str or ~azure.mgmt.datamigration.models.CommandType + :ivar errors: Array of errors. This is ignored if submitted. + :vartype errors: list[~azure.mgmt.datamigration.models.ODataError] + :ivar state: The state of the command. This is ignored if submitted. Possible values include: + "Unknown", "Accepted", "Running", "Succeeded", "Failed". + :vartype state: str or ~azure.mgmt.datamigration.models.CommandState + :param input: Command input. + :type input: ~azure.mgmt.datamigration.models.MongoDbFinishCommandInput + """ + + _validation = { + 'command_type': {'required': True}, + 'errors': {'readonly': True}, + 'state': {'readonly': True}, + } + + _attribute_map = { + 'command_type': {'key': 'commandType', 'type': 'str'}, + 'errors': {'key': 'errors', 'type': '[ODataError]'}, + 'state': {'key': 'state', 'type': 'str'}, + 'input': {'key': 'input', 'type': 'MongoDbFinishCommandInput'}, + } + + def __init__( + self, + **kwargs + ): + super(MongoDbFinishCommand, self).__init__(**kwargs) + self.command_type = 'finish' # type: str + self.input = kwargs.get('input', None) + + +class MongoDbFinishCommandInput(MongoDbCommandInput): + """Describes the input to the 'finish' MongoDB migration command. + + All required parameters must be populated in order to send to Azure. + + :param object_name: The qualified name of a database or collection to act upon, or null to act + upon the entire migration. + :type object_name: str + :param immediate: Required. If true, replication for the affected objects will be stopped + immediately. If false, the migrator will finish replaying queued events before finishing the + replication. + :type immediate: bool + """ + + _validation = { + 'immediate': {'required': True}, + } + + _attribute_map = { + 'object_name': {'key': 'objectName', 'type': 'str'}, + 'immediate': {'key': 'immediate', 'type': 'bool'}, + } + + def __init__( + self, + **kwargs + ): + super(MongoDbFinishCommandInput, self).__init__(**kwargs) + self.immediate = kwargs['immediate'] + + +class MongoDbMigrationProgress(MongoDbProgress): + """Describes the progress of the overall migration. + + All required parameters must be populated in order to send to Azure. + + :param bytes_copied: Required. The number of document bytes copied during the Copying stage. + :type bytes_copied: long + :param documents_copied: Required. The number of documents copied during the Copying stage. + :type documents_copied: long + :param elapsed_time: Required. The elapsed time in the format [ddd.]hh:mm:ss[.fffffff] (i.e. + TimeSpan format). + :type elapsed_time: str + :param errors: Required. The errors and warnings that have occurred for the current object. The + keys are the error codes. + :type errors: dict[str, ~azure.mgmt.datamigration.models.MongoDbError] + :param events_pending: Required. The number of oplog events awaiting replay. + :type events_pending: long + :param events_replayed: Required. The number of oplog events replayed so far. + :type events_replayed: long + :param last_event_time: The timestamp of the last oplog event received, or null if no oplog + event has been received yet. + :type last_event_time: ~datetime.datetime + :param last_replay_time: The timestamp of the last oplog event replayed, or null if no oplog + event has been replayed yet. + :type last_replay_time: ~datetime.datetime + :param name: The name of the progress object. For a collection, this is the unqualified + collection name. For a database, this is the database name. For the overall migration, this is + null. + :type name: str + :param qualified_name: The qualified name of the progress object. For a collection, this is the + database-qualified name. For a database, this is the database name. For the overall migration, + this is null. + :type qualified_name: str + :param result_type: Required. The type of progress object.Constant filled by server. Possible + values include: "Migration", "Database", "Collection". + :type result_type: str or ~azure.mgmt.datamigration.models.MongoDbProgressResultType + :param state: Required. Possible values include: "NotStarted", "ValidatingInput", + "Initializing", "Restarting", "Copying", "InitialReplay", "Replaying", "Finalizing", + "Complete", "Canceled", "Failed". + :type state: str or ~azure.mgmt.datamigration.models.MongoDbMigrationState + :param total_bytes: Required. The total number of document bytes on the source at the beginning + of the Copying stage, or -1 if the total size was unknown. + :type total_bytes: long + :param total_documents: Required. The total number of documents on the source at the beginning + of the Copying stage, or -1 if the total count was unknown. + :type total_documents: long + :param databases: The progress of the databases in the migration. The keys are the names of the + databases. + :type databases: dict[str, ~azure.mgmt.datamigration.models.MongoDbDatabaseProgress] + """ + + _validation = { + 'bytes_copied': {'required': True}, + 'documents_copied': {'required': True}, + 'elapsed_time': {'required': True}, + 'errors': {'required': True}, + 'events_pending': {'required': True}, + 'events_replayed': {'required': True}, + 'result_type': {'required': True}, + 'state': {'required': True}, + 'total_bytes': {'required': True}, + 'total_documents': {'required': True}, + } + + _attribute_map = { + 'bytes_copied': {'key': 'bytesCopied', 'type': 'long'}, + 'documents_copied': {'key': 'documentsCopied', 'type': 'long'}, + 'elapsed_time': {'key': 'elapsedTime', 'type': 'str'}, + 'errors': {'key': 'errors', 'type': '{MongoDbError}'}, + 'events_pending': {'key': 'eventsPending', 'type': 'long'}, + 'events_replayed': {'key': 'eventsReplayed', 'type': 'long'}, + 'last_event_time': {'key': 'lastEventTime', 'type': 'iso-8601'}, + 'last_replay_time': {'key': 'lastReplayTime', 'type': 'iso-8601'}, + 'name': {'key': 'name', 'type': 'str'}, + 'qualified_name': {'key': 'qualifiedName', 'type': 'str'}, + 'result_type': {'key': 'resultType', 'type': 'str'}, + 'state': {'key': 'state', 'type': 'str'}, + 'total_bytes': {'key': 'totalBytes', 'type': 'long'}, + 'total_documents': {'key': 'totalDocuments', 'type': 'long'}, + 'databases': {'key': 'databases', 'type': '{MongoDbDatabaseProgress}'}, + } + + def __init__( + self, + **kwargs + ): + super(MongoDbMigrationProgress, self).__init__(**kwargs) + self.result_type = 'Migration' # type: str + self.databases = kwargs.get('databases', None) + + +class MongoDbMigrationSettings(msrest.serialization.Model): + """Describes how a MongoDB data migration should be performed. + + All required parameters must be populated in order to send to Azure. + + :param boost_r_us: The RU limit on a CosmosDB target that collections will be temporarily + increased to (if lower) during the initial copy of a migration, from 10,000 to 1,000,000, or 0 + to use the default boost (which is generally the maximum), or null to not boost the RUs. This + setting has no effect on non-CosmosDB targets. + :type boost_r_us: int + :param databases: Required. The databases on the source cluster to migrate to the target. The + keys are the names of the databases. + :type databases: dict[str, ~azure.mgmt.datamigration.models.MongoDbDatabaseSettings] + :param replication: Describes how changes will be replicated from the source to the target. The + default is OneTime. Possible values include: "Disabled", "OneTime", "Continuous". + :type replication: str or ~azure.mgmt.datamigration.models.MongoDbReplication + :param source: Required. Settings used to connect to the source cluster. + :type source: ~azure.mgmt.datamigration.models.MongoDbConnectionInfo + :param target: Required. Settings used to connect to the target cluster. + :type target: ~azure.mgmt.datamigration.models.MongoDbConnectionInfo + :param throttling: Settings used to limit the resource usage of the migration. + :type throttling: ~azure.mgmt.datamigration.models.MongoDbThrottlingSettings + """ + + _validation = { + 'databases': {'required': True}, + 'source': {'required': True}, + 'target': {'required': True}, + } + + _attribute_map = { + 'boost_r_us': {'key': 'boostRUs', 'type': 'int'}, + 'databases': {'key': 'databases', 'type': '{MongoDbDatabaseSettings}'}, + 'replication': {'key': 'replication', 'type': 'str'}, + 'source': {'key': 'source', 'type': 'MongoDbConnectionInfo'}, + 'target': {'key': 'target', 'type': 'MongoDbConnectionInfo'}, + 'throttling': {'key': 'throttling', 'type': 'MongoDbThrottlingSettings'}, + } + + def __init__( + self, + **kwargs + ): + super(MongoDbMigrationSettings, self).__init__(**kwargs) + self.boost_r_us = kwargs.get('boost_r_us', None) + self.databases = kwargs['databases'] + self.replication = kwargs.get('replication', None) + self.source = kwargs['source'] + self.target = kwargs['target'] + self.throttling = kwargs.get('throttling', None) + + +class MongoDbRestartCommand(CommandProperties): + """Properties for the command that restarts a migration in whole or in part. + + Variables are only populated by the server, and will be ignored when sending a request. + + All required parameters must be populated in order to send to Azure. + + :param command_type: Required. Command type.Constant filled by server. Possible values + include: "Migrate.Sync.Complete.Database", "Migrate.SqlServer.AzureDbSqlMi.Complete", "cancel", + "finish", "restart". + :type command_type: str or ~azure.mgmt.datamigration.models.CommandType + :ivar errors: Array of errors. This is ignored if submitted. + :vartype errors: list[~azure.mgmt.datamigration.models.ODataError] + :ivar state: The state of the command. This is ignored if submitted. Possible values include: + "Unknown", "Accepted", "Running", "Succeeded", "Failed". + :vartype state: str or ~azure.mgmt.datamigration.models.CommandState + :param input: Command input. + :type input: ~azure.mgmt.datamigration.models.MongoDbCommandInput + """ + + _validation = { + 'command_type': {'required': True}, + 'errors': {'readonly': True}, + 'state': {'readonly': True}, + } + + _attribute_map = { + 'command_type': {'key': 'commandType', 'type': 'str'}, + 'errors': {'key': 'errors', 'type': '[ODataError]'}, + 'state': {'key': 'state', 'type': 'str'}, + 'input': {'key': 'input', 'type': 'MongoDbCommandInput'}, + } + + def __init__( + self, + **kwargs + ): + super(MongoDbRestartCommand, self).__init__(**kwargs) + self.command_type = 'restart' # type: str + self.input = kwargs.get('input', None) + + +class MongoDbShardKeyField(msrest.serialization.Model): + """Describes a field reference within a MongoDB shard key. + + All required parameters must be populated in order to send to Azure. + + :param name: Required. The name of the field. + :type name: str + :param order: Required. The field ordering. Possible values include: "Forward", "Reverse", + "Hashed". + :type order: str or ~azure.mgmt.datamigration.models.MongoDbShardKeyOrder + """ + + _validation = { + 'name': {'required': True}, + 'order': {'required': True}, + } + + _attribute_map = { + 'name': {'key': 'name', 'type': 'str'}, + 'order': {'key': 'order', 'type': 'str'}, + } + + def __init__( + self, + **kwargs + ): + super(MongoDbShardKeyField, self).__init__(**kwargs) + self.name = kwargs['name'] + self.order = kwargs['order'] + + +class MongoDbShardKeyInfo(msrest.serialization.Model): + """Describes a MongoDB shard key. + + All required parameters must be populated in order to send to Azure. + + :param fields: Required. The fields within the shard key. + :type fields: list[~azure.mgmt.datamigration.models.MongoDbShardKeyField] + :param is_unique: Required. Whether the shard key is unique. + :type is_unique: bool + """ + + _validation = { + 'fields': {'required': True}, + 'is_unique': {'required': True}, + } + + _attribute_map = { + 'fields': {'key': 'fields', 'type': '[MongoDbShardKeyField]'}, + 'is_unique': {'key': 'isUnique', 'type': 'bool'}, + } + + def __init__( + self, + **kwargs + ): + super(MongoDbShardKeyInfo, self).__init__(**kwargs) + self.fields = kwargs['fields'] + self.is_unique = kwargs['is_unique'] + + +class MongoDbShardKeySetting(msrest.serialization.Model): + """Describes a MongoDB shard key. + + All required parameters must be populated in order to send to Azure. + + :param fields: Required. The fields within the shard key. + :type fields: list[~azure.mgmt.datamigration.models.MongoDbShardKeyField] + :param is_unique: Required. Whether the shard key is unique. + :type is_unique: bool + """ + + _validation = { + 'fields': {'required': True}, + 'is_unique': {'required': True}, + } + + _attribute_map = { + 'fields': {'key': 'fields', 'type': '[MongoDbShardKeyField]'}, + 'is_unique': {'key': 'isUnique', 'type': 'bool'}, + } + + def __init__( + self, + **kwargs + ): + super(MongoDbShardKeySetting, self).__init__(**kwargs) + self.fields = kwargs['fields'] + self.is_unique = kwargs['is_unique'] + + +class MongoDbThrottlingSettings(msrest.serialization.Model): + """Specifies resource limits for the migration. + + :param min_free_cpu: The percentage of CPU time that the migrator will try to avoid using, from + 0 to 100. + :type min_free_cpu: int + :param min_free_memory_mb: The number of megabytes of RAM that the migrator will try to avoid + using. + :type min_free_memory_mb: int + :param max_parallelism: The maximum number of work items (e.g. collection copies) that will be + processed in parallel. + :type max_parallelism: int + """ + + _attribute_map = { + 'min_free_cpu': {'key': 'minFreeCpu', 'type': 'int'}, + 'min_free_memory_mb': {'key': 'minFreeMemoryMb', 'type': 'int'}, + 'max_parallelism': {'key': 'maxParallelism', 'type': 'int'}, + } + + def __init__( + self, + **kwargs + ): + super(MongoDbThrottlingSettings, self).__init__(**kwargs) + self.min_free_cpu = kwargs.get('min_free_cpu', None) + self.min_free_memory_mb = kwargs.get('min_free_memory_mb', None) + self.max_parallelism = kwargs.get('max_parallelism', None) + + +class MySqlConnectionInfo(ConnectionInfo): + """Information for connecting to MySQL server. + + All required parameters must be populated in order to send to Azure. + + :param type: Required. Type of connection info.Constant filled by server. + :type type: str + :param user_name: User name. + :type user_name: str + :param password: Password credential. + :type password: str + :param server_name: Required. Name of the server. + :type server_name: str + :param data_source: Data source. + :type data_source: str + :param port: Required. Port for Server. + :type port: int + :param encrypt_connection: Whether to encrypt the connection. + :type encrypt_connection: bool + """ + + _validation = { + 'type': {'required': True}, + 'server_name': {'required': True}, + 'port': {'required': True}, + } + + _attribute_map = { + 'type': {'key': 'type', 'type': 'str'}, + 'user_name': {'key': 'userName', 'type': 'str'}, + 'password': {'key': 'password', 'type': 'str'}, + 'server_name': {'key': 'serverName', 'type': 'str'}, + 'data_source': {'key': 'dataSource', 'type': 'str'}, + 'port': {'key': 'port', 'type': 'int'}, + 'encrypt_connection': {'key': 'encryptConnection', 'type': 'bool'}, + } + + def __init__( + self, + **kwargs + ): + super(MySqlConnectionInfo, self).__init__(**kwargs) + self.type = 'MySqlConnectionInfo' # type: str + self.server_name = kwargs['server_name'] + self.data_source = kwargs.get('data_source', None) + self.port = kwargs['port'] + self.encrypt_connection = kwargs.get('encrypt_connection', True) + + +class NameAvailabilityRequest(msrest.serialization.Model): + """A resource type and proposed name. + + :param name: The proposed resource name. + :type name: str + :param type: The resource type chain (e.g. virtualMachines/extensions). + :type type: str + """ + + _attribute_map = { + 'name': {'key': 'name', 'type': 'str'}, + 'type': {'key': 'type', 'type': 'str'}, + } + + def __init__( + self, + **kwargs + ): + super(NameAvailabilityRequest, self).__init__(**kwargs) + self.name = kwargs.get('name', None) + self.type = kwargs.get('type', None) + + +class NameAvailabilityResponse(msrest.serialization.Model): + """Indicates whether a proposed resource name is available. + + :param name_available: If true, the name is valid and available. If false, 'reason' describes + why not. + :type name_available: bool + :param reason: The reason why the name is not available, if nameAvailable is false. Possible + values include: "AlreadyExists", "Invalid". + :type reason: str or ~azure.mgmt.datamigration.models.NameCheckFailureReason + :param message: The localized reason why the name is not available, if nameAvailable is false. + :type message: str + """ + + _attribute_map = { + 'name_available': {'key': 'nameAvailable', 'type': 'bool'}, + 'reason': {'key': 'reason', 'type': 'str'}, + 'message': {'key': 'message', 'type': 'str'}, + } + + def __init__( + self, + **kwargs + ): + super(NameAvailabilityResponse, self).__init__(**kwargs) + self.name_available = kwargs.get('name_available', None) + self.reason = kwargs.get('reason', None) + self.message = kwargs.get('message', None) + + +class NodeMonitoringData(msrest.serialization.Model): + """NodeMonitoringData. + + Variables are only populated by the server, and will be ignored when sending a request. + + :ivar additional_properties: Unmatched properties from the message are deserialized in this + collection. + :vartype additional_properties: dict[str, object] + :ivar node_name: Name of the integration runtime node. + :vartype node_name: str + :ivar available_memory_in_mb: Available memory (MB) on the integration runtime node. + :vartype available_memory_in_mb: int + :ivar cpu_utilization: CPU percentage on the integration runtime node. + :vartype cpu_utilization: int + :ivar concurrent_jobs_limit: Maximum concurrent jobs on the integration runtime node. + :vartype concurrent_jobs_limit: int + :ivar concurrent_jobs_running: The number of jobs currently running on the integration runtime + node. + :vartype concurrent_jobs_running: int + :ivar max_concurrent_jobs: The maximum concurrent jobs in this integration runtime. + :vartype max_concurrent_jobs: int + :ivar sent_bytes: Sent bytes on the integration runtime node. + :vartype sent_bytes: float + :ivar received_bytes: Received bytes on the integration runtime node. + :vartype received_bytes: float + """ + + _validation = { + 'additional_properties': {'readonly': True}, + 'node_name': {'readonly': True}, + 'available_memory_in_mb': {'readonly': True}, + 'cpu_utilization': {'readonly': True}, + 'concurrent_jobs_limit': {'readonly': True}, + 'concurrent_jobs_running': {'readonly': True}, + 'max_concurrent_jobs': {'readonly': True}, + 'sent_bytes': {'readonly': True}, + 'received_bytes': {'readonly': True}, + } + + _attribute_map = { + 'additional_properties': {'key': 'additionalProperties', 'type': '{object}'}, + 'node_name': {'key': 'nodeName', 'type': 'str'}, + 'available_memory_in_mb': {'key': 'availableMemoryInMB', 'type': 'int'}, + 'cpu_utilization': {'key': 'cpuUtilization', 'type': 'int'}, + 'concurrent_jobs_limit': {'key': 'concurrentJobsLimit', 'type': 'int'}, + 'concurrent_jobs_running': {'key': 'concurrentJobsRunning', 'type': 'int'}, + 'max_concurrent_jobs': {'key': 'maxConcurrentJobs', 'type': 'int'}, + 'sent_bytes': {'key': 'sentBytes', 'type': 'float'}, + 'received_bytes': {'key': 'receivedBytes', 'type': 'float'}, + } + + def __init__( + self, + **kwargs + ): + super(NodeMonitoringData, self).__init__(**kwargs) + self.additional_properties = None + self.node_name = None + self.available_memory_in_mb = None + self.cpu_utilization = None + self.concurrent_jobs_limit = None + self.concurrent_jobs_running = None + self.max_concurrent_jobs = None + self.sent_bytes = None + self.received_bytes = None + + +class NonSqlDataMigrationTable(msrest.serialization.Model): + """Defines metadata for table to be migrated. + + :param source_name: Source table name. + :type source_name: str + """ + + _attribute_map = { + 'source_name': {'key': 'sourceName', 'type': 'str'}, + } + + def __init__( + self, + **kwargs + ): + super(NonSqlDataMigrationTable, self).__init__(**kwargs) + self.source_name = kwargs.get('source_name', None) + + +class NonSqlDataMigrationTableResult(msrest.serialization.Model): + """Object used to report the data migration results of a table. + + Variables are only populated by the server, and will be ignored when sending a request. + + :ivar result_code: Result code of the data migration. Possible values include: "Initial", + "Completed", "ObjectNotExistsInSource", "ObjectNotExistsInTarget", + "TargetObjectIsInaccessible", "FatalError". + :vartype result_code: str or ~azure.mgmt.datamigration.models.DataMigrationResultCode + :ivar source_name: Name of the source table. + :vartype source_name: str + :ivar target_name: Name of the target table. + :vartype target_name: str + :ivar source_row_count: Number of rows in the source table. + :vartype source_row_count: long + :ivar target_row_count: Number of rows in the target table. + :vartype target_row_count: long + :ivar elapsed_time_in_miliseconds: Time taken to migrate the data. + :vartype elapsed_time_in_miliseconds: float + :ivar errors: List of errors, if any, during migration. + :vartype errors: list[~azure.mgmt.datamigration.models.DataMigrationError] + """ + + _validation = { + 'result_code': {'readonly': True}, + 'source_name': {'readonly': True}, + 'target_name': {'readonly': True}, + 'source_row_count': {'readonly': True}, + 'target_row_count': {'readonly': True}, + 'elapsed_time_in_miliseconds': {'readonly': True}, + 'errors': {'readonly': True}, + } + + _attribute_map = { + 'result_code': {'key': 'resultCode', 'type': 'str'}, + 'source_name': {'key': 'sourceName', 'type': 'str'}, + 'target_name': {'key': 'targetName', 'type': 'str'}, + 'source_row_count': {'key': 'sourceRowCount', 'type': 'long'}, + 'target_row_count': {'key': 'targetRowCount', 'type': 'long'}, + 'elapsed_time_in_miliseconds': {'key': 'elapsedTimeInMiliseconds', 'type': 'float'}, + 'errors': {'key': 'errors', 'type': '[DataMigrationError]'}, + } + + def __init__( + self, + **kwargs + ): + super(NonSqlDataMigrationTableResult, self).__init__(**kwargs) + self.result_code = None + self.source_name = None + self.target_name = None + self.source_row_count = None + self.target_row_count = None + self.elapsed_time_in_miliseconds = None + self.errors = None + + +class NonSqlMigrationTaskInput(msrest.serialization.Model): + """Base class for non sql migration task input. + + All required parameters must be populated in order to send to Azure. + + :param target_connection_info: Required. Information for connecting to target. + :type target_connection_info: ~azure.mgmt.datamigration.models.SqlConnectionInfo + :param target_database_name: Required. Target database name. + :type target_database_name: str + :param project_name: Required. Name of the migration project. + :type project_name: str + :param project_location: Required. A URL that points to the drop location to access project + artifacts. + :type project_location: str + :param selected_tables: Required. Metadata of the tables selected for migration. + :type selected_tables: list[~azure.mgmt.datamigration.models.NonSqlDataMigrationTable] + """ + + _validation = { + 'target_connection_info': {'required': True}, + 'target_database_name': {'required': True}, + 'project_name': {'required': True}, + 'project_location': {'required': True}, + 'selected_tables': {'required': True}, + } + + _attribute_map = { + 'target_connection_info': {'key': 'targetConnectionInfo', 'type': 'SqlConnectionInfo'}, + 'target_database_name': {'key': 'targetDatabaseName', 'type': 'str'}, + 'project_name': {'key': 'projectName', 'type': 'str'}, + 'project_location': {'key': 'projectLocation', 'type': 'str'}, + 'selected_tables': {'key': 'selectedTables', 'type': '[NonSqlDataMigrationTable]'}, + } + + def __init__( + self, + **kwargs + ): + super(NonSqlMigrationTaskInput, self).__init__(**kwargs) + self.target_connection_info = kwargs['target_connection_info'] + self.target_database_name = kwargs['target_database_name'] + self.project_name = kwargs['project_name'] + self.project_location = kwargs['project_location'] + self.selected_tables = kwargs['selected_tables'] + + +class NonSqlMigrationTaskOutput(msrest.serialization.Model): + """Base class for non sql migration task output. + + Variables are only populated by the server, and will be ignored when sending a request. + + :ivar id: Result identifier. + :vartype id: str + :ivar started_on: Migration start time. + :vartype started_on: ~datetime.datetime + :ivar ended_on: Migration end time. + :vartype ended_on: ~datetime.datetime + :ivar status: Current state of migration. Possible values include: "Default", "Connecting", + "SourceAndTargetSelected", "SelectLogins", "Configured", "Running", "Error", "Stopped", + "Completed", "CompletedWithWarnings". + :vartype status: str or ~azure.mgmt.datamigration.models.MigrationStatus + :ivar data_migration_table_results: Results of the migration. The key contains the table name + and the value the table result object. + :vartype data_migration_table_results: str + :ivar progress_message: Message about the progress of the migration. + :vartype progress_message: str + :ivar source_server_name: Name of source server. + :vartype source_server_name: str + :ivar target_server_name: Name of target server. + :vartype target_server_name: str + """ + + _validation = { + 'id': {'readonly': True}, + 'started_on': {'readonly': True}, + 'ended_on': {'readonly': True}, + 'status': {'readonly': True}, + 'data_migration_table_results': {'readonly': True}, + 'progress_message': {'readonly': True}, + 'source_server_name': {'readonly': True}, + 'target_server_name': {'readonly': True}, + } + + _attribute_map = { + 'id': {'key': 'id', 'type': 'str'}, + 'started_on': {'key': 'startedOn', 'type': 'iso-8601'}, + 'ended_on': {'key': 'endedOn', 'type': 'iso-8601'}, + 'status': {'key': 'status', 'type': 'str'}, + 'data_migration_table_results': {'key': 'dataMigrationTableResults', 'type': 'str'}, + 'progress_message': {'key': 'progressMessage', 'type': 'str'}, + 'source_server_name': {'key': 'sourceServerName', 'type': 'str'}, + 'target_server_name': {'key': 'targetServerName', 'type': 'str'}, + } + + def __init__( + self, + **kwargs + ): + super(NonSqlMigrationTaskOutput, self).__init__(**kwargs) + self.id = None + self.started_on = None + self.ended_on = None + self.status = None + self.data_migration_table_results = None + self.progress_message = None + self.source_server_name = None + self.target_server_name = None + + +class ODataError(msrest.serialization.Model): + """Error information in OData format. + + :param code: The machine-readable description of the error, such as 'InvalidRequest' or + 'InternalServerError'. + :type code: str + :param message: The human-readable description of the error. + :type message: str + :param details: Inner errors that caused this error. + :type details: list[~azure.mgmt.datamigration.models.ODataError] + """ + + _attribute_map = { + 'code': {'key': 'code', 'type': 'str'}, + 'message': {'key': 'message', 'type': 'str'}, + 'details': {'key': 'details', 'type': '[ODataError]'}, + } + + def __init__( + self, + **kwargs + ): + super(ODataError, self).__init__(**kwargs) + self.code = kwargs.get('code', None) + self.message = kwargs.get('message', None) + self.details = kwargs.get('details', None) + + +class OfflineConfiguration(msrest.serialization.Model): + """Offline configuration. + + :param offline: Offline migration. + :type offline: bool + :param last_backup_name: Last backup name for offline migration. This is optional for + migrations from file share. If it is not provided, then the service will determine the last + backup file name based on latest backup files present in file share. + :type last_backup_name: str + """ + + _attribute_map = { + 'offline': {'key': 'offline', 'type': 'bool'}, + 'last_backup_name': {'key': 'lastBackupName', 'type': 'str'}, + } + + def __init__( + self, + **kwargs + ): + super(OfflineConfiguration, self).__init__(**kwargs) + self.offline = kwargs.get('offline', None) + self.last_backup_name = kwargs.get('last_backup_name', None) + + +class OperationListResult(msrest.serialization.Model): + """Result of the request to list SQL operations. + + Variables are only populated by the server, and will be ignored when sending a request. + + :ivar value: + :vartype value: list[~azure.mgmt.datamigration.models.OperationsDefinition] + :ivar next_link: + :vartype next_link: str + """ + + _validation = { + 'value': {'readonly': True}, + 'next_link': {'readonly': True}, + } + + _attribute_map = { + 'value': {'key': 'value', 'type': '[OperationsDefinition]'}, + 'next_link': {'key': 'nextLink', 'type': 'str'}, + } + + def __init__( + self, + **kwargs + ): + super(OperationListResult, self).__init__(**kwargs) + self.value = None + self.next_link = None + + +class OperationsDefinition(msrest.serialization.Model): + """OperationsDefinition. + + Variables are only populated by the server, and will be ignored when sending a request. + + :ivar name: + :vartype name: str + :param is_data_action: Indicates whether the operation is a data action. + :type is_data_action: bool + :ivar display: + :vartype display: ~azure.mgmt.datamigration.models.OperationsDisplayDefinition + :ivar origin: Possible values include: "user", "system". + :vartype origin: str or ~azure.mgmt.datamigration.models.OperationOrigin + :ivar properties: Dictionary of :code:``. + :vartype properties: dict[str, object] + """ + + _validation = { + 'name': {'readonly': True}, + 'display': {'readonly': True}, + 'origin': {'readonly': True}, + 'properties': {'readonly': True}, + } + + _attribute_map = { + 'name': {'key': 'name', 'type': 'str'}, + 'is_data_action': {'key': 'isDataAction', 'type': 'bool'}, + 'display': {'key': 'display', 'type': 'OperationsDisplayDefinition'}, + 'origin': {'key': 'origin', 'type': 'str'}, + 'properties': {'key': 'properties', 'type': '{object}'}, + } + + def __init__( + self, + **kwargs + ): + super(OperationsDefinition, self).__init__(**kwargs) + self.name = None + self.is_data_action = kwargs.get('is_data_action', None) + self.display = None + self.origin = None + self.properties = None + + +class OperationsDisplayDefinition(msrest.serialization.Model): + """OperationsDisplayDefinition. + + Variables are only populated by the server, and will be ignored when sending a request. + + :ivar provider: + :vartype provider: str + :ivar resource: + :vartype resource: str + :ivar operation: + :vartype operation: str + :ivar description: + :vartype description: str + """ + + _validation = { + 'provider': {'readonly': True}, + 'resource': {'readonly': True}, + 'operation': {'readonly': True}, + 'description': {'readonly': True}, + } + + _attribute_map = { + 'provider': {'key': 'provider', 'type': 'str'}, + 'resource': {'key': 'resource', 'type': 'str'}, + 'operation': {'key': 'operation', 'type': 'str'}, + 'description': {'key': 'description', 'type': 'str'}, + } + + def __init__( + self, + **kwargs + ): + super(OperationsDisplayDefinition, self).__init__(**kwargs) + self.provider = None + self.resource = None + self.operation = None + self.description = None + + +class OracleConnectionInfo(ConnectionInfo): + """Information for connecting to Oracle server. + + All required parameters must be populated in order to send to Azure. + + :param type: Required. Type of connection info.Constant filled by server. + :type type: str + :param user_name: User name. + :type user_name: str + :param password: Password credential. + :type password: str + :param data_source: Required. EZConnect or TNSName connection string. + :type data_source: str + """ + + _validation = { + 'type': {'required': True}, + 'data_source': {'required': True}, + } + + _attribute_map = { + 'type': {'key': 'type', 'type': 'str'}, + 'user_name': {'key': 'userName', 'type': 'str'}, + 'password': {'key': 'password', 'type': 'str'}, + 'data_source': {'key': 'dataSource', 'type': 'str'}, + } + + def __init__( + self, + **kwargs + ): + super(OracleConnectionInfo, self).__init__(**kwargs) + self.type = 'OracleConnectionInfo' # type: str + self.data_source = kwargs['data_source'] + + +class OracleOciDriverInfo(msrest.serialization.Model): + """Information about an Oracle OCI driver. + + Variables are only populated by the server, and will be ignored when sending a request. + + :ivar driver_name: The name of the driver package. + :vartype driver_name: str + :ivar driver_size: The size in bytes of the driver package. + :vartype driver_size: str + :ivar archive_checksum: The MD5 Base64 encoded checksum for the driver package. + :vartype archive_checksum: str + :ivar oracle_checksum: The checksum for the driver package provided by Oracle. + :vartype oracle_checksum: str + :ivar assembly_version: Version listed in the OCI assembly 'oci.dll'. + :vartype assembly_version: str + :ivar supported_oracle_versions: List of Oracle database versions supported by this driver. + Only major minor of the version is listed. + :vartype supported_oracle_versions: list[str] + """ + + _validation = { + 'driver_name': {'readonly': True}, + 'driver_size': {'readonly': True}, + 'archive_checksum': {'readonly': True}, + 'oracle_checksum': {'readonly': True}, + 'assembly_version': {'readonly': True}, + 'supported_oracle_versions': {'readonly': True}, + } + + _attribute_map = { + 'driver_name': {'key': 'driverName', 'type': 'str'}, + 'driver_size': {'key': 'driverSize', 'type': 'str'}, + 'archive_checksum': {'key': 'archiveChecksum', 'type': 'str'}, + 'oracle_checksum': {'key': 'oracleChecksum', 'type': 'str'}, + 'assembly_version': {'key': 'assemblyVersion', 'type': 'str'}, + 'supported_oracle_versions': {'key': 'supportedOracleVersions', 'type': '[str]'}, + } + + def __init__( + self, + **kwargs + ): + super(OracleOciDriverInfo, self).__init__(**kwargs) + self.driver_name = None + self.driver_size = None + self.archive_checksum = None + self.oracle_checksum = None + self.assembly_version = None + self.supported_oracle_versions = None + + +class OrphanedUserInfo(msrest.serialization.Model): + """Information of orphaned users on the SQL server database. + + :param name: Name of the orphaned user. + :type name: str + :param database_name: Parent database of the user. + :type database_name: str + """ + + _attribute_map = { + 'name': {'key': 'name', 'type': 'str'}, + 'database_name': {'key': 'databaseName', 'type': 'str'}, + } + + def __init__( + self, + **kwargs + ): + super(OrphanedUserInfo, self).__init__(**kwargs) + self.name = kwargs.get('name', None) + self.database_name = kwargs.get('database_name', None) + + +class PostgreSqlConnectionInfo(ConnectionInfo): + """Information for connecting to PostgreSQL server. + + All required parameters must be populated in order to send to Azure. + + :param type: Required. Type of connection info.Constant filled by server. + :type type: str + :param user_name: User name. + :type user_name: str + :param password: Password credential. + :type password: str + :param server_name: Required. Name of the server. + :type server_name: str + :param data_source: Data source. + :type data_source: str + :param server_version: server version. + :type server_version: str + :param database_name: Name of the database. + :type database_name: str + :param port: Required. Port for Server. + :type port: int + :param encrypt_connection: Whether to encrypt the connection. + :type encrypt_connection: bool + :param trust_server_certificate: Whether to trust the server certificate. + :type trust_server_certificate: bool + """ + + _validation = { + 'type': {'required': True}, + 'server_name': {'required': True}, + 'port': {'required': True}, + } + + _attribute_map = { + 'type': {'key': 'type', 'type': 'str'}, + 'user_name': {'key': 'userName', 'type': 'str'}, + 'password': {'key': 'password', 'type': 'str'}, + 'server_name': {'key': 'serverName', 'type': 'str'}, + 'data_source': {'key': 'dataSource', 'type': 'str'}, + 'server_version': {'key': 'serverVersion', 'type': 'str'}, + 'database_name': {'key': 'databaseName', 'type': 'str'}, + 'port': {'key': 'port', 'type': 'int'}, + 'encrypt_connection': {'key': 'encryptConnection', 'type': 'bool'}, + 'trust_server_certificate': {'key': 'trustServerCertificate', 'type': 'bool'}, + } + + def __init__( + self, + **kwargs + ): + super(PostgreSqlConnectionInfo, self).__init__(**kwargs) + self.type = 'PostgreSqlConnectionInfo' # type: str + self.server_name = kwargs['server_name'] + self.data_source = kwargs.get('data_source', None) + self.server_version = kwargs.get('server_version', None) + self.database_name = kwargs.get('database_name', None) + self.port = kwargs['port'] + self.encrypt_connection = kwargs.get('encrypt_connection', True) + self.trust_server_certificate = kwargs.get('trust_server_certificate', False) + + +class Project(TrackedResource): + """A project resource. + + Variables are only populated by the server, and will be ignored when sending a request. + + :param location: + :type location: str + :param tags: A set of tags. Dictionary of :code:``. + :type tags: dict[str, str] + :ivar id: + :vartype id: str + :ivar name: + :vartype name: str + :ivar type: + :vartype type: str + :ivar system_data: + :vartype system_data: ~azure.mgmt.datamigration.models.SystemData + :param e_tag: HTTP strong entity tag value. This is ignored if submitted. + :type e_tag: str + :param source_platform: Source platform for the project. Possible values include: "SQL", + "MySQL", "PostgreSql", "MongoDb", "Unknown". + :type source_platform: str or ~azure.mgmt.datamigration.models.ProjectSourcePlatform + :param azure_authentication_info: Field that defines the Azure active directory application + info, used to connect to the target Azure resource. + :type azure_authentication_info: str + :param target_platform: Target platform for the project. Possible values include: "SQLDB", + "SQLMI", "AzureDbForMySql", "AzureDbForPostgreSql", "MongoDb", "Unknown". + :type target_platform: str or ~azure.mgmt.datamigration.models.ProjectTargetPlatform + :ivar creation_time: UTC Date and time when project was created. + :vartype creation_time: ~datetime.datetime + :param source_connection_info: Information for connecting to source. + :type source_connection_info: ~azure.mgmt.datamigration.models.ConnectionInfo + :param target_connection_info: Information for connecting to target. + :type target_connection_info: ~azure.mgmt.datamigration.models.ConnectionInfo + :param databases_info: List of DatabaseInfo. + :type databases_info: list[~azure.mgmt.datamigration.models.DatabaseInfo] + :ivar provisioning_state: The project's provisioning state. Possible values include: + "Deleting", "Succeeded". + :vartype provisioning_state: str or ~azure.mgmt.datamigration.models.ProjectProvisioningState + """ + + _validation = { + 'id': {'readonly': True}, + 'name': {'readonly': True}, + 'type': {'readonly': True}, + 'system_data': {'readonly': True}, + 'creation_time': {'readonly': True}, + 'provisioning_state': {'readonly': True}, + } + + _attribute_map = { + 'location': {'key': 'location', 'type': 'str'}, + 'tags': {'key': 'tags', 'type': '{str}'}, + 'id': {'key': 'id', 'type': 'str'}, + 'name': {'key': 'name', 'type': 'str'}, + 'type': {'key': 'type', 'type': 'str'}, + 'system_data': {'key': 'systemData', 'type': 'SystemData'}, + 'e_tag': {'key': 'eTag', 'type': 'str'}, + 'source_platform': {'key': 'properties.sourcePlatform', 'type': 'str'}, + 'azure_authentication_info': {'key': 'properties.azureAuthenticationInfo', 'type': 'str'}, + 'target_platform': {'key': 'properties.targetPlatform', 'type': 'str'}, + 'creation_time': {'key': 'properties.creationTime', 'type': 'iso-8601'}, + 'source_connection_info': {'key': 'properties.sourceConnectionInfo', 'type': 'ConnectionInfo'}, + 'target_connection_info': {'key': 'properties.targetConnectionInfo', 'type': 'ConnectionInfo'}, + 'databases_info': {'key': 'properties.databasesInfo', 'type': '[DatabaseInfo]'}, + 'provisioning_state': {'key': 'properties.provisioningState', 'type': 'str'}, + } + + def __init__( + self, + **kwargs + ): + super(Project, self).__init__(**kwargs) + self.e_tag = kwargs.get('e_tag', None) + self.source_platform = kwargs.get('source_platform', None) + self.azure_authentication_info = kwargs.get('azure_authentication_info', None) + self.target_platform = kwargs.get('target_platform', None) + self.creation_time = None + self.source_connection_info = kwargs.get('source_connection_info', None) + self.target_connection_info = kwargs.get('target_connection_info', None) + self.databases_info = kwargs.get('databases_info', None) + self.provisioning_state = None + + +class Resource(msrest.serialization.Model): + """ARM resource. + + Variables are only populated by the server, and will be ignored when sending a request. + + :ivar id: Resource ID. + :vartype id: str + :ivar name: Resource name. + :vartype name: str + :ivar type: Resource type. + :vartype type: str + """ + + _validation = { + 'id': {'readonly': True}, + 'name': {'readonly': True}, + 'type': {'readonly': True}, + } + + _attribute_map = { + 'id': {'key': 'id', 'type': 'str'}, + 'name': {'key': 'name', 'type': 'str'}, + 'type': {'key': 'type', 'type': 'str'}, + } + + def __init__( + self, + **kwargs + ): + super(Resource, self).__init__(**kwargs) + self.id = None + self.name = None + self.type = None + + +class ProjectFile(Resource): + """A file resource. + + Variables are only populated by the server, and will be ignored when sending a request. + + :ivar id: Resource ID. + :vartype id: str + :ivar name: Resource name. + :vartype name: str + :ivar type: Resource type. + :vartype type: str + :param etag: HTTP strong entity tag value. This is ignored if submitted. + :type etag: str + :param properties: Custom file properties. + :type properties: ~azure.mgmt.datamigration.models.ProjectFileProperties + :ivar system_data: Metadata pertaining to creation and last modification of the resource. + :vartype system_data: ~azure.mgmt.datamigration.models.SystemData + """ + + _validation = { + 'id': {'readonly': True}, + 'name': {'readonly': True}, + 'type': {'readonly': True}, + 'system_data': {'readonly': True}, + } + + _attribute_map = { + 'id': {'key': 'id', 'type': 'str'}, + 'name': {'key': 'name', 'type': 'str'}, + 'type': {'key': 'type', 'type': 'str'}, + 'etag': {'key': 'etag', 'type': 'str'}, + 'properties': {'key': 'properties', 'type': 'ProjectFileProperties'}, + 'system_data': {'key': 'systemData', 'type': 'SystemData'}, + } + + def __init__( + self, + **kwargs + ): + super(ProjectFile, self).__init__(**kwargs) + self.etag = kwargs.get('etag', None) + self.properties = kwargs.get('properties', None) + self.system_data = None + + +class ProjectFileProperties(msrest.serialization.Model): + """Base class for file properties. + + Variables are only populated by the server, and will be ignored when sending a request. + + :param extension: Optional File extension. If submitted it should not have a leading period and + must match the extension from filePath. + :type extension: str + :param file_path: Relative path of this file resource. This property can be set when creating + or updating the file resource. + :type file_path: str + :ivar last_modified: Modification DateTime. + :vartype last_modified: ~datetime.datetime + :param media_type: File content type. This property can be modified to reflect the file content + type. + :type media_type: str + :ivar size: File size. + :vartype size: long + """ + + _validation = { + 'last_modified': {'readonly': True}, + 'size': {'readonly': True}, + } + + _attribute_map = { + 'extension': {'key': 'extension', 'type': 'str'}, + 'file_path': {'key': 'filePath', 'type': 'str'}, + 'last_modified': {'key': 'lastModified', 'type': 'iso-8601'}, + 'media_type': {'key': 'mediaType', 'type': 'str'}, + 'size': {'key': 'size', 'type': 'long'}, + } + + def __init__( + self, + **kwargs + ): + super(ProjectFileProperties, self).__init__(**kwargs) + self.extension = kwargs.get('extension', None) + self.file_path = kwargs.get('file_path', None) + self.last_modified = None + self.media_type = kwargs.get('media_type', None) + self.size = None + + +class ProjectList(msrest.serialization.Model): + """OData page of project resources. + + :param value: List of projects. + :type value: list[~azure.mgmt.datamigration.models.Project] + :param next_link: URL to load the next page of projects. + :type next_link: str + """ + + _attribute_map = { + 'value': {'key': 'value', 'type': '[Project]'}, + 'next_link': {'key': 'nextLink', 'type': 'str'}, + } + + def __init__( + self, + **kwargs + ): + super(ProjectList, self).__init__(**kwargs) + self.value = kwargs.get('value', None) + self.next_link = kwargs.get('next_link', None) + + +class ProjectTask(Resource): + """A task resource. + + Variables are only populated by the server, and will be ignored when sending a request. + + :ivar id: Resource ID. + :vartype id: str + :ivar name: Resource name. + :vartype name: str + :ivar type: Resource type. + :vartype type: str + :param etag: HTTP strong entity tag value. This is ignored if submitted. + :type etag: str + :param properties: Custom task properties. + :type properties: ~azure.mgmt.datamigration.models.ProjectTaskProperties + :ivar system_data: Metadata pertaining to creation and last modification of the resource. + :vartype system_data: ~azure.mgmt.datamigration.models.SystemData + """ + + _validation = { + 'id': {'readonly': True}, + 'name': {'readonly': True}, + 'type': {'readonly': True}, + 'system_data': {'readonly': True}, + } + + _attribute_map = { + 'id': {'key': 'id', 'type': 'str'}, + 'name': {'key': 'name', 'type': 'str'}, + 'type': {'key': 'type', 'type': 'str'}, + 'etag': {'key': 'etag', 'type': 'str'}, + 'properties': {'key': 'properties', 'type': 'ProjectTaskProperties'}, + 'system_data': {'key': 'systemData', 'type': 'SystemData'}, + } + + def __init__( + self, + **kwargs + ): + super(ProjectTask, self).__init__(**kwargs) + self.etag = kwargs.get('etag', None) + self.properties = kwargs.get('properties', None) + self.system_data = None + + +class QueryAnalysisValidationResult(msrest.serialization.Model): + """Results for query analysis comparison between the source and target. + + :param query_results: List of queries executed and it's execution results in source and target. + :type query_results: ~azure.mgmt.datamigration.models.QueryExecutionResult + :param validation_errors: Errors that are part of the execution. + :type validation_errors: ~azure.mgmt.datamigration.models.ValidationError + """ + + _attribute_map = { + 'query_results': {'key': 'queryResults', 'type': 'QueryExecutionResult'}, + 'validation_errors': {'key': 'validationErrors', 'type': 'ValidationError'}, + } + + def __init__( + self, + **kwargs + ): + super(QueryAnalysisValidationResult, self).__init__(**kwargs) + self.query_results = kwargs.get('query_results', None) + self.validation_errors = kwargs.get('validation_errors', None) + + +class QueryExecutionResult(msrest.serialization.Model): + """Describes query analysis results for execution in source and target. + + :param query_text: Query text retrieved from the source server. + :type query_text: str + :param statements_in_batch: Total no. of statements in the batch. + :type statements_in_batch: long + :param source_result: Query analysis result from the source. + :type source_result: ~azure.mgmt.datamigration.models.ExecutionStatistics + :param target_result: Query analysis result from the target. + :type target_result: ~azure.mgmt.datamigration.models.ExecutionStatistics + """ + + _attribute_map = { + 'query_text': {'key': 'queryText', 'type': 'str'}, + 'statements_in_batch': {'key': 'statementsInBatch', 'type': 'long'}, + 'source_result': {'key': 'sourceResult', 'type': 'ExecutionStatistics'}, + 'target_result': {'key': 'targetResult', 'type': 'ExecutionStatistics'}, + } + + def __init__( + self, + **kwargs + ): + super(QueryExecutionResult, self).__init__(**kwargs) + self.query_text = kwargs.get('query_text', None) + self.statements_in_batch = kwargs.get('statements_in_batch', None) + self.source_result = kwargs.get('source_result', None) + self.target_result = kwargs.get('target_result', None) + + +class Quota(msrest.serialization.Model): + """Describes a quota for or usage details about a resource. + + :param current_value: The current value of the quota. If null or missing, the current value + cannot be determined in the context of the request. + :type current_value: float + :param id: The resource ID of the quota object. + :type id: str + :param limit: The maximum value of the quota. If null or missing, the quota has no maximum, in + which case it merely tracks usage. + :type limit: float + :param name: The name of the quota. + :type name: ~azure.mgmt.datamigration.models.QuotaName + :param unit: The unit for the quota, such as Count, Bytes, BytesPerSecond, etc. + :type unit: str + """ + + _attribute_map = { + 'current_value': {'key': 'currentValue', 'type': 'float'}, + 'id': {'key': 'id', 'type': 'str'}, + 'limit': {'key': 'limit', 'type': 'float'}, + 'name': {'key': 'name', 'type': 'QuotaName'}, + 'unit': {'key': 'unit', 'type': 'str'}, + } + + def __init__( + self, + **kwargs + ): + super(Quota, self).__init__(**kwargs) + self.current_value = kwargs.get('current_value', None) + self.id = kwargs.get('id', None) + self.limit = kwargs.get('limit', None) + self.name = kwargs.get('name', None) + self.unit = kwargs.get('unit', None) + + +class QuotaList(msrest.serialization.Model): + """OData page of quota objects. + + :param value: List of quotas. + :type value: list[~azure.mgmt.datamigration.models.Quota] + :param next_link: URL to load the next page of quotas, or null or missing if this is the last + page. + :type next_link: str + """ + + _attribute_map = { + 'value': {'key': 'value', 'type': '[Quota]'}, + 'next_link': {'key': 'nextLink', 'type': 'str'}, + } + + def __init__( + self, + **kwargs + ): + super(QuotaList, self).__init__(**kwargs) + self.value = kwargs.get('value', None) + self.next_link = kwargs.get('next_link', None) + + +class QuotaName(msrest.serialization.Model): + """The name of the quota. + + :param localized_value: The localized name of the quota. + :type localized_value: str + :param value: The unlocalized name (or ID) of the quota. + :type value: str + """ + + _attribute_map = { + 'localized_value': {'key': 'localizedValue', 'type': 'str'}, + 'value': {'key': 'value', 'type': 'str'}, + } + + def __init__( + self, + **kwargs + ): + super(QuotaName, self).__init__(**kwargs) + self.localized_value = kwargs.get('localized_value', None) + self.value = kwargs.get('value', None) + + +class RegenAuthKeys(msrest.serialization.Model): + """An authentication key to regenerate. + + :param key_name: The name of authentication key to generate. + :type key_name: str + :param auth_key1: The first authentication key. + :type auth_key1: str + :param auth_key2: The second authentication key. + :type auth_key2: str + """ + + _attribute_map = { + 'key_name': {'key': 'keyName', 'type': 'str'}, + 'auth_key1': {'key': 'authKey1', 'type': 'str'}, + 'auth_key2': {'key': 'authKey2', 'type': 'str'}, + } + + def __init__( + self, + **kwargs + ): + super(RegenAuthKeys, self).__init__(**kwargs) + self.key_name = kwargs.get('key_name', None) + self.auth_key1 = kwargs.get('auth_key1', None) + self.auth_key2 = kwargs.get('auth_key2', None) + + +class ReportableException(msrest.serialization.Model): + """Exception object for all custom exceptions. + + :param message: Error message. + :type message: str + :param actionable_message: Actionable steps for this exception. + :type actionable_message: str + :param file_path: The path to the file where exception occurred. + :type file_path: str + :param line_number: The line number where exception occurred. + :type line_number: str + :param h_result: Coded numerical value that is assigned to a specific exception. + :type h_result: int + :param stack_trace: Stack trace. + :type stack_trace: str + """ + + _attribute_map = { + 'message': {'key': 'message', 'type': 'str'}, + 'actionable_message': {'key': 'actionableMessage', 'type': 'str'}, + 'file_path': {'key': 'filePath', 'type': 'str'}, + 'line_number': {'key': 'lineNumber', 'type': 'str'}, + 'h_result': {'key': 'hResult', 'type': 'int'}, + 'stack_trace': {'key': 'stackTrace', 'type': 'str'}, + } + + def __init__( + self, + **kwargs + ): + super(ReportableException, self).__init__(**kwargs) + self.message = kwargs.get('message', None) + self.actionable_message = kwargs.get('actionable_message', None) + self.file_path = kwargs.get('file_path', None) + self.line_number = kwargs.get('line_number', None) + self.h_result = kwargs.get('h_result', None) + self.stack_trace = kwargs.get('stack_trace', None) + + +class ResourceSku(msrest.serialization.Model): + """Describes an available DMS SKU. + + Variables are only populated by the server, and will be ignored when sending a request. + + :ivar resource_type: The type of resource the SKU applies to. + :vartype resource_type: str + :ivar name: The name of SKU. + :vartype name: str + :ivar tier: Specifies the tier of DMS in a scale set. + :vartype tier: str + :ivar size: The Size of the SKU. + :vartype size: str + :ivar family: The Family of this particular SKU. + :vartype family: str + :ivar kind: The Kind of resources that are supported in this SKU. + :vartype kind: str + :ivar capacity: Not used. + :vartype capacity: ~azure.mgmt.datamigration.models.ResourceSkuCapacity + :ivar locations: The set of locations that the SKU is available. + :vartype locations: list[str] + :ivar api_versions: The api versions that support this SKU. + :vartype api_versions: list[str] + :ivar costs: Metadata for retrieving price info. + :vartype costs: list[~azure.mgmt.datamigration.models.ResourceSkuCosts] + :ivar capabilities: A name value pair to describe the capability. + :vartype capabilities: list[~azure.mgmt.datamigration.models.ResourceSkuCapabilities] + :ivar restrictions: The restrictions because of which SKU cannot be used. This is empty if + there are no restrictions. + :vartype restrictions: list[~azure.mgmt.datamigration.models.ResourceSkuRestrictions] + """ + + _validation = { + 'resource_type': {'readonly': True}, + 'name': {'readonly': True}, + 'tier': {'readonly': True}, + 'size': {'readonly': True}, + 'family': {'readonly': True}, + 'kind': {'readonly': True}, + 'capacity': {'readonly': True}, + 'locations': {'readonly': True}, + 'api_versions': {'readonly': True}, + 'costs': {'readonly': True}, + 'capabilities': {'readonly': True}, + 'restrictions': {'readonly': True}, + } + + _attribute_map = { + 'resource_type': {'key': 'resourceType', 'type': 'str'}, + 'name': {'key': 'name', 'type': 'str'}, + 'tier': {'key': 'tier', 'type': 'str'}, + 'size': {'key': 'size', 'type': 'str'}, + 'family': {'key': 'family', 'type': 'str'}, + 'kind': {'key': 'kind', 'type': 'str'}, + 'capacity': {'key': 'capacity', 'type': 'ResourceSkuCapacity'}, + 'locations': {'key': 'locations', 'type': '[str]'}, + 'api_versions': {'key': 'apiVersions', 'type': '[str]'}, + 'costs': {'key': 'costs', 'type': '[ResourceSkuCosts]'}, + 'capabilities': {'key': 'capabilities', 'type': '[ResourceSkuCapabilities]'}, + 'restrictions': {'key': 'restrictions', 'type': '[ResourceSkuRestrictions]'}, + } + + def __init__( + self, + **kwargs + ): + super(ResourceSku, self).__init__(**kwargs) + self.resource_type = None + self.name = None + self.tier = None + self.size = None + self.family = None + self.kind = None + self.capacity = None + self.locations = None + self.api_versions = None + self.costs = None + self.capabilities = None + self.restrictions = None + + +class ResourceSkuCapabilities(msrest.serialization.Model): + """Describes The SKU capabilities object. + + Variables are only populated by the server, and will be ignored when sending a request. + + :ivar name: An invariant to describe the feature. + :vartype name: str + :ivar value: An invariant if the feature is measured by quantity. + :vartype value: str + """ + + _validation = { + 'name': {'readonly': True}, + 'value': {'readonly': True}, + } + + _attribute_map = { + 'name': {'key': 'name', 'type': 'str'}, + 'value': {'key': 'value', 'type': 'str'}, + } + + def __init__( + self, + **kwargs + ): + super(ResourceSkuCapabilities, self).__init__(**kwargs) + self.name = None + self.value = None + + +class ResourceSkuCapacity(msrest.serialization.Model): + """Describes scaling information of a SKU. + + Variables are only populated by the server, and will be ignored when sending a request. + + :ivar minimum: The minimum capacity. + :vartype minimum: long + :ivar maximum: The maximum capacity. + :vartype maximum: long + :ivar default: The default capacity. + :vartype default: long + :ivar scale_type: The scale type applicable to the SKU. Possible values include: "Automatic", + "Manual", "None". + :vartype scale_type: str or ~azure.mgmt.datamigration.models.ResourceSkuCapacityScaleType + """ + + _validation = { + 'minimum': {'readonly': True}, + 'maximum': {'readonly': True}, + 'default': {'readonly': True}, + 'scale_type': {'readonly': True}, + } + + _attribute_map = { + 'minimum': {'key': 'minimum', 'type': 'long'}, + 'maximum': {'key': 'maximum', 'type': 'long'}, + 'default': {'key': 'default', 'type': 'long'}, + 'scale_type': {'key': 'scaleType', 'type': 'str'}, + } + + def __init__( + self, + **kwargs + ): + super(ResourceSkuCapacity, self).__init__(**kwargs) + self.minimum = None + self.maximum = None + self.default = None + self.scale_type = None + + +class ResourceSkuCosts(msrest.serialization.Model): + """Describes metadata for retrieving price info. + + Variables are only populated by the server, and will be ignored when sending a request. + + :ivar meter_id: Used for querying price from commerce. + :vartype meter_id: str + :ivar quantity: The multiplier is needed to extend the base metered cost. + :vartype quantity: long + :ivar extended_unit: An invariant to show the extended unit. + :vartype extended_unit: str + """ + + _validation = { + 'meter_id': {'readonly': True}, + 'quantity': {'readonly': True}, + 'extended_unit': {'readonly': True}, + } + + _attribute_map = { + 'meter_id': {'key': 'meterID', 'type': 'str'}, + 'quantity': {'key': 'quantity', 'type': 'long'}, + 'extended_unit': {'key': 'extendedUnit', 'type': 'str'}, + } + + def __init__( + self, + **kwargs + ): + super(ResourceSkuCosts, self).__init__(**kwargs) + self.meter_id = None + self.quantity = None + self.extended_unit = None + + +class ResourceSkuRestrictions(msrest.serialization.Model): + """Describes scaling information of a SKU. + + Variables are only populated by the server, and will be ignored when sending a request. + + :ivar type: The type of restrictions. Possible values include: "location". + :vartype type: str or ~azure.mgmt.datamigration.models.ResourceSkuRestrictionsType + :ivar values: The value of restrictions. If the restriction type is set to location. This would + be different locations where the SKU is restricted. + :vartype values: list[str] + :ivar reason_code: The reason code for restriction. Possible values include: "QuotaId", + "NotAvailableForSubscription". + :vartype reason_code: str or ~azure.mgmt.datamigration.models.ResourceSkuRestrictionsReasonCode + """ + + _validation = { + 'type': {'readonly': True}, + 'values': {'readonly': True}, + 'reason_code': {'readonly': True}, + } + + _attribute_map = { + 'type': {'key': 'type', 'type': 'str'}, + 'values': {'key': 'values', 'type': '[str]'}, + 'reason_code': {'key': 'reasonCode', 'type': 'str'}, + } + + def __init__( + self, + **kwargs + ): + super(ResourceSkuRestrictions, self).__init__(**kwargs) + self.type = None + self.values = None + self.reason_code = None + + +class ResourceSkusResult(msrest.serialization.Model): + """The DMS List SKUs operation response. + + All required parameters must be populated in order to send to Azure. + + :param value: Required. The list of SKUs available for the subscription. + :type value: list[~azure.mgmt.datamigration.models.ResourceSku] + :param next_link: The uri to fetch the next page of DMS SKUs. Call ListNext() with this to + fetch the next page of DMS SKUs. + :type next_link: str + """ + + _validation = { + 'value': {'required': True}, + } + + _attribute_map = { + 'value': {'key': 'value', 'type': '[ResourceSku]'}, + 'next_link': {'key': 'nextLink', 'type': 'str'}, + } + + def __init__( + self, + **kwargs + ): + super(ResourceSkusResult, self).__init__(**kwargs) + self.value = kwargs['value'] + self.next_link = kwargs.get('next_link', None) + + +class SchemaComparisonValidationResult(msrest.serialization.Model): + """Results for schema comparison between the source and target. + + :param schema_differences: List of schema differences between the source and target databases. + :type schema_differences: ~azure.mgmt.datamigration.models.SchemaComparisonValidationResultType + :param validation_errors: List of errors that happened while performing schema compare + validation. + :type validation_errors: ~azure.mgmt.datamigration.models.ValidationError + :param source_database_object_count: Count of source database objects. + :type source_database_object_count: dict[str, long] + :param target_database_object_count: Count of target database objects. + :type target_database_object_count: dict[str, long] + """ + + _attribute_map = { + 'schema_differences': {'key': 'schemaDifferences', 'type': 'SchemaComparisonValidationResultType'}, + 'validation_errors': {'key': 'validationErrors', 'type': 'ValidationError'}, + 'source_database_object_count': {'key': 'sourceDatabaseObjectCount', 'type': '{long}'}, + 'target_database_object_count': {'key': 'targetDatabaseObjectCount', 'type': '{long}'}, + } + + def __init__( + self, + **kwargs + ): + super(SchemaComparisonValidationResult, self).__init__(**kwargs) + self.schema_differences = kwargs.get('schema_differences', None) + self.validation_errors = kwargs.get('validation_errors', None) + self.source_database_object_count = kwargs.get('source_database_object_count', None) + self.target_database_object_count = kwargs.get('target_database_object_count', None) + + +class SchemaComparisonValidationResultType(msrest.serialization.Model): + """Description about the errors happen while performing migration validation. + + :param object_name: Name of the object that has the difference. + :type object_name: str + :param object_type: Type of the object that has the difference. e.g + (Table/View/StoredProcedure). Possible values include: "StoredProcedures", "Table", "User", + "View", "Function". + :type object_type: str or ~azure.mgmt.datamigration.models.ObjectType + :param update_action: Update action type with respect to target. Possible values include: + "DeletedOnTarget", "ChangedOnTarget", "AddedOnTarget". + :type update_action: str or ~azure.mgmt.datamigration.models.UpdateActionType + """ + + _attribute_map = { + 'object_name': {'key': 'objectName', 'type': 'str'}, + 'object_type': {'key': 'objectType', 'type': 'str'}, + 'update_action': {'key': 'updateAction', 'type': 'str'}, + } + + def __init__( + self, + **kwargs + ): + super(SchemaComparisonValidationResultType, self).__init__(**kwargs) + self.object_name = kwargs.get('object_name', None) + self.object_type = kwargs.get('object_type', None) + self.update_action = kwargs.get('update_action', None) + + +class SchemaMigrationSetting(msrest.serialization.Model): + """Settings for migrating schema from source to target. + + :param schema_option: Option on how to migrate the schema. Possible values include: "None", + "ExtractFromSource", "UseStorageFile". + :type schema_option: str or ~azure.mgmt.datamigration.models.SchemaMigrationOption + :param file_id: Resource Identifier of a file resource containing the uploaded schema file. + :type file_id: str + :param file_name: Name of the file resource containing the uploaded schema file. + :type file_name: str + """ + + _attribute_map = { + 'schema_option': {'key': 'schemaOption', 'type': 'str'}, + 'file_id': {'key': 'fileId', 'type': 'str'}, + 'file_name': {'key': 'fileName', 'type': 'str'}, + } + + def __init__( + self, + **kwargs + ): + super(SchemaMigrationSetting, self).__init__(**kwargs) + self.schema_option = kwargs.get('schema_option', None) + self.file_id = kwargs.get('file_id', None) + self.file_name = kwargs.get('file_name', None) + + +class SelectedCertificateInput(msrest.serialization.Model): + """Info for certificate to be exported for TDE enabled databases. + + All required parameters must be populated in order to send to Azure. + + :param certificate_name: Required. Name of certificate to be exported. + :type certificate_name: str + :param password: Required. Password to use for encrypting the exported certificate. + :type password: str + """ + + _validation = { + 'certificate_name': {'required': True}, + 'password': {'required': True}, + } + + _attribute_map = { + 'certificate_name': {'key': 'certificateName', 'type': 'str'}, + 'password': {'key': 'password', 'type': 'str'}, + } + + def __init__( + self, + **kwargs + ): + super(SelectedCertificateInput, self).__init__(**kwargs) + self.certificate_name = kwargs['certificate_name'] + self.password = kwargs['password'] + + +class ServerProperties(msrest.serialization.Model): + """Server properties for MySQL type source. + + Variables are only populated by the server, and will be ignored when sending a request. + + :ivar server_platform: Name of the server platform. + :vartype server_platform: str + :ivar server_name: Name of the server. + :vartype server_name: str + :ivar server_version: Version of the database server. + :vartype server_version: str + :ivar server_edition: Edition of the database server. + :vartype server_edition: str + :ivar server_operating_system_version: Version of the operating system. + :vartype server_operating_system_version: str + :ivar server_database_count: Number of databases in the server. + :vartype server_database_count: int + """ + + _validation = { + 'server_platform': {'readonly': True}, + 'server_name': {'readonly': True}, + 'server_version': {'readonly': True}, + 'server_edition': {'readonly': True}, + 'server_operating_system_version': {'readonly': True}, + 'server_database_count': {'readonly': True}, + } + + _attribute_map = { + 'server_platform': {'key': 'serverPlatform', 'type': 'str'}, + 'server_name': {'key': 'serverName', 'type': 'str'}, + 'server_version': {'key': 'serverVersion', 'type': 'str'}, + 'server_edition': {'key': 'serverEdition', 'type': 'str'}, + 'server_operating_system_version': {'key': 'serverOperatingSystemVersion', 'type': 'str'}, + 'server_database_count': {'key': 'serverDatabaseCount', 'type': 'int'}, + } + + def __init__( + self, + **kwargs + ): + super(ServerProperties, self).__init__(**kwargs) + self.server_platform = None + self.server_name = None + self.server_version = None + self.server_edition = None + self.server_operating_system_version = None + self.server_database_count = None + + +class ServiceOperation(msrest.serialization.Model): + """Description of an action supported by the Database Migration Service. + + :param name: The fully qualified action name, e.g. Microsoft.DataMigration/services/read. + :type name: str + :param display: Localized display text. + :type display: ~azure.mgmt.datamigration.models.ServiceOperationDisplay + """ + + _attribute_map = { + 'name': {'key': 'name', 'type': 'str'}, + 'display': {'key': 'display', 'type': 'ServiceOperationDisplay'}, + } + + def __init__( + self, + **kwargs + ): + super(ServiceOperation, self).__init__(**kwargs) + self.name = kwargs.get('name', None) + self.display = kwargs.get('display', None) + + +class ServiceOperationDisplay(msrest.serialization.Model): + """Localized display text. + + :param provider: The localized resource provider name. + :type provider: str + :param resource: The localized resource type name. + :type resource: str + :param operation: The localized operation name. + :type operation: str + :param description: The localized operation description. + :type description: str + """ + + _attribute_map = { + 'provider': {'key': 'provider', 'type': 'str'}, + 'resource': {'key': 'resource', 'type': 'str'}, + 'operation': {'key': 'operation', 'type': 'str'}, + 'description': {'key': 'description', 'type': 'str'}, + } + + def __init__( + self, + **kwargs + ): + super(ServiceOperationDisplay, self).__init__(**kwargs) + self.provider = kwargs.get('provider', None) + self.resource = kwargs.get('resource', None) + self.operation = kwargs.get('operation', None) + self.description = kwargs.get('description', None) + + +class ServiceOperationList(msrest.serialization.Model): + """OData page of action (operation) objects. + + :param value: List of actions. + :type value: list[~azure.mgmt.datamigration.models.ServiceOperation] + :param next_link: URL to load the next page of actions. + :type next_link: str + """ + + _attribute_map = { + 'value': {'key': 'value', 'type': '[ServiceOperation]'}, + 'next_link': {'key': 'nextLink', 'type': 'str'}, + } + + def __init__( + self, + **kwargs + ): + super(ServiceOperationList, self).__init__(**kwargs) + self.value = kwargs.get('value', None) + self.next_link = kwargs.get('next_link', None) + + +class ServiceSku(msrest.serialization.Model): + """An Azure SKU instance. + + :param name: The unique name of the SKU, such as 'P3'. + :type name: str + :param tier: The tier of the SKU, such as 'Basic', 'General Purpose', or 'Business Critical'. + :type tier: str + :param family: The SKU family, used when the service has multiple performance classes within a + tier, such as 'A', 'D', etc. for virtual machines. + :type family: str + :param size: The size of the SKU, used when the name alone does not denote a service size or + when a SKU has multiple performance classes within a family, e.g. 'A1' for virtual machines. + :type size: str + :param capacity: The capacity of the SKU, if it supports scaling. + :type capacity: int + """ + + _attribute_map = { + 'name': {'key': 'name', 'type': 'str'}, + 'tier': {'key': 'tier', 'type': 'str'}, + 'family': {'key': 'family', 'type': 'str'}, + 'size': {'key': 'size', 'type': 'str'}, + 'capacity': {'key': 'capacity', 'type': 'int'}, + } + + def __init__( + self, + **kwargs + ): + super(ServiceSku, self).__init__(**kwargs) + self.name = kwargs.get('name', None) + self.tier = kwargs.get('tier', None) + self.family = kwargs.get('family', None) + self.size = kwargs.get('size', None) + self.capacity = kwargs.get('capacity', None) + + +class ServiceSkuList(msrest.serialization.Model): + """OData page of available SKUs. + + :param value: List of service SKUs. + :type value: list[~azure.mgmt.datamigration.models.AvailableServiceSku] + :param next_link: URL to load the next page of service SKUs. + :type next_link: str + """ + + _attribute_map = { + 'value': {'key': 'value', 'type': '[AvailableServiceSku]'}, + 'next_link': {'key': 'nextLink', 'type': 'str'}, + } + + def __init__( + self, + **kwargs + ): + super(ServiceSkuList, self).__init__(**kwargs) + self.value = kwargs.get('value', None) + self.next_link = kwargs.get('next_link', None) + + +class SourceLocation(msrest.serialization.Model): + """Source Location details of backups. + + :param file_share: Source File share. + :type file_share: ~azure.mgmt.datamigration.models.SqlFileShare + :param azure_blob: Source Azure Blob. + :type azure_blob: ~azure.mgmt.datamigration.models.AzureBlob + """ + + _attribute_map = { + 'file_share': {'key': 'fileShare', 'type': 'SqlFileShare'}, + 'azure_blob': {'key': 'azureBlob', 'type': 'AzureBlob'}, + } + + def __init__( + self, + **kwargs + ): + super(SourceLocation, self).__init__(**kwargs) + self.file_share = kwargs.get('file_share', None) + self.azure_blob = kwargs.get('azure_blob', None) + + +class SqlBackupFileInfo(msrest.serialization.Model): + """Information of backup file. + + Variables are only populated by the server, and will be ignored when sending a request. + + :ivar file_name: File name. + :vartype file_name: str + :ivar status: Status of the file. (Initial, Uploading, Uploaded, Restoring, Restored or + Skipped). + :vartype status: str + :ivar total_size: File size in bytes. + :vartype total_size: long + :ivar data_read: Bytes read. + :vartype data_read: long + :ivar data_written: Bytes written. + :vartype data_written: long + :ivar copy_throughput: Copy throughput in KBps. + :vartype copy_throughput: float + :ivar copy_duration: Copy Duration in seconds. + :vartype copy_duration: int + :ivar family_sequence_number: Media family sequence number. + :vartype family_sequence_number: int + """ + + _validation = { + 'file_name': {'readonly': True}, + 'status': {'readonly': True}, + 'total_size': {'readonly': True}, + 'data_read': {'readonly': True}, + 'data_written': {'readonly': True}, + 'copy_throughput': {'readonly': True}, + 'copy_duration': {'readonly': True}, + 'family_sequence_number': {'readonly': True}, + } + + _attribute_map = { + 'file_name': {'key': 'fileName', 'type': 'str'}, + 'status': {'key': 'status', 'type': 'str'}, + 'total_size': {'key': 'totalSize', 'type': 'long'}, + 'data_read': {'key': 'dataRead', 'type': 'long'}, + 'data_written': {'key': 'dataWritten', 'type': 'long'}, + 'copy_throughput': {'key': 'copyThroughput', 'type': 'float'}, + 'copy_duration': {'key': 'copyDuration', 'type': 'int'}, + 'family_sequence_number': {'key': 'familySequenceNumber', 'type': 'int'}, + } + + def __init__( + self, + **kwargs + ): + super(SqlBackupFileInfo, self).__init__(**kwargs) + self.file_name = None + self.status = None + self.total_size = None + self.data_read = None + self.data_written = None + self.copy_throughput = None + self.copy_duration = None + self.family_sequence_number = None + + +class SqlBackupSetInfo(msrest.serialization.Model): + """Information of backup set. + + Variables are only populated by the server, and will be ignored when sending a request. + + :ivar backup_set_id: Backup set id. + :vartype backup_set_id: str + :ivar first_lsn: First LSN of the backup set. + :vartype first_lsn: str + :ivar last_lsn: Last LSN of the backup set. + :vartype last_lsn: str + :ivar backup_type: Backup type. + :vartype backup_type: str + :ivar list_of_backup_files: List of files in the backup set. + :vartype list_of_backup_files: list[~azure.mgmt.datamigration.models.SqlBackupFileInfo] + :ivar backup_start_date: Backup start date. + :vartype backup_start_date: ~datetime.datetime + :ivar backup_finish_date: Backup end time. + :vartype backup_finish_date: ~datetime.datetime + :ivar is_backup_restored: Whether this backup set has been restored or not. + :vartype is_backup_restored: bool + :ivar has_backup_checksums: Has Backup Checksums. + :vartype has_backup_checksums: bool + :ivar family_count: Media family count. + :vartype family_count: int + :ivar ignore_reasons: The reasons why the backup set is ignored. + :vartype ignore_reasons: list[str] + """ + + _validation = { + 'backup_set_id': {'readonly': True}, + 'first_lsn': {'readonly': True}, + 'last_lsn': {'readonly': True}, + 'backup_type': {'readonly': True}, + 'list_of_backup_files': {'readonly': True}, + 'backup_start_date': {'readonly': True}, + 'backup_finish_date': {'readonly': True}, + 'is_backup_restored': {'readonly': True}, + 'has_backup_checksums': {'readonly': True}, + 'family_count': {'readonly': True}, + 'ignore_reasons': {'readonly': True}, + } + + _attribute_map = { + 'backup_set_id': {'key': 'backupSetId', 'type': 'str'}, + 'first_lsn': {'key': 'firstLSN', 'type': 'str'}, + 'last_lsn': {'key': 'lastLSN', 'type': 'str'}, + 'backup_type': {'key': 'backupType', 'type': 'str'}, + 'list_of_backup_files': {'key': 'listOfBackupFiles', 'type': '[SqlBackupFileInfo]'}, + 'backup_start_date': {'key': 'backupStartDate', 'type': 'iso-8601'}, + 'backup_finish_date': {'key': 'backupFinishDate', 'type': 'iso-8601'}, + 'is_backup_restored': {'key': 'isBackupRestored', 'type': 'bool'}, + 'has_backup_checksums': {'key': 'hasBackupChecksums', 'type': 'bool'}, + 'family_count': {'key': 'familyCount', 'type': 'int'}, + 'ignore_reasons': {'key': 'ignoreReasons', 'type': '[str]'}, + } + + def __init__( + self, + **kwargs + ): + super(SqlBackupSetInfo, self).__init__(**kwargs) + self.backup_set_id = None + self.first_lsn = None + self.last_lsn = None + self.backup_type = None + self.list_of_backup_files = None + self.backup_start_date = None + self.backup_finish_date = None + self.is_backup_restored = None + self.has_backup_checksums = None + self.family_count = None + self.ignore_reasons = None + + +class SqlConnectionInfo(ConnectionInfo): + """Information for connecting to SQL database server. + + All required parameters must be populated in order to send to Azure. + + :param type: Required. Type of connection info.Constant filled by server. + :type type: str + :param user_name: User name. + :type user_name: str + :param password: Password credential. + :type password: str + :param data_source: Required. Data source in the format + Protocol:MachineName\SQLServerInstanceName,PortNumber. + :type data_source: str + :param server_name: name of the server. + :type server_name: str + :param port: port for server. + :type port: str + :param resource_id: Represents the ID of an HTTP resource represented by an Azure resource + provider. + :type resource_id: str + :param authentication: Authentication type to use for connection. Possible values include: + "None", "WindowsAuthentication", "SqlAuthentication", "ActiveDirectoryIntegrated", + "ActiveDirectoryPassword". + :type authentication: str or ~azure.mgmt.datamigration.models.AuthenticationType + :param encrypt_connection: Whether to encrypt the connection. + :type encrypt_connection: bool + :param additional_settings: Additional connection settings. + :type additional_settings: str + :param trust_server_certificate: Whether to trust the server certificate. + :type trust_server_certificate: bool + :param platform: Server platform type for connection. Possible values include: "SqlOnPrem". + :type platform: str or ~azure.mgmt.datamigration.models.SqlSourcePlatform + """ + + _validation = { + 'type': {'required': True}, + 'data_source': {'required': True}, + } + + _attribute_map = { + 'type': {'key': 'type', 'type': 'str'}, + 'user_name': {'key': 'userName', 'type': 'str'}, + 'password': {'key': 'password', 'type': 'str'}, + 'data_source': {'key': 'dataSource', 'type': 'str'}, + 'server_name': {'key': 'serverName', 'type': 'str'}, + 'port': {'key': 'port', 'type': 'str'}, + 'resource_id': {'key': 'resourceId', 'type': 'str'}, + 'authentication': {'key': 'authentication', 'type': 'str'}, + 'encrypt_connection': {'key': 'encryptConnection', 'type': 'bool'}, + 'additional_settings': {'key': 'additionalSettings', 'type': 'str'}, + 'trust_server_certificate': {'key': 'trustServerCertificate', 'type': 'bool'}, + 'platform': {'key': 'platform', 'type': 'str'}, + } + + def __init__( + self, + **kwargs + ): + super(SqlConnectionInfo, self).__init__(**kwargs) + self.type = 'SqlConnectionInfo' # type: str + self.data_source = kwargs['data_source'] + self.server_name = kwargs.get('server_name', None) + self.port = kwargs.get('port', None) + self.resource_id = kwargs.get('resource_id', None) + self.authentication = kwargs.get('authentication', None) + self.encrypt_connection = kwargs.get('encrypt_connection', True) + self.additional_settings = kwargs.get('additional_settings', None) + self.trust_server_certificate = kwargs.get('trust_server_certificate', False) + self.platform = kwargs.get('platform', None) + + +class SqlConnectionInformation(msrest.serialization.Model): + """Source SQL Connection. + + :param data_source: Data source. + :type data_source: str + :param authentication: Authentication type. + :type authentication: str + :param user_name: User name to connect to source SQL. + :type user_name: str + :param password: Password to connect to source SQL. + :type password: str + :param encrypt_connection: Whether to encrypt connection or not. + :type encrypt_connection: bool + :param trust_server_certificate: Whether to trust server certificate or not. + :type trust_server_certificate: bool + """ + + _attribute_map = { + 'data_source': {'key': 'dataSource', 'type': 'str'}, + 'authentication': {'key': 'authentication', 'type': 'str'}, + 'user_name': {'key': 'userName', 'type': 'str'}, + 'password': {'key': 'password', 'type': 'str'}, + 'encrypt_connection': {'key': 'encryptConnection', 'type': 'bool'}, + 'trust_server_certificate': {'key': 'trustServerCertificate', 'type': 'bool'}, + } + + def __init__( + self, + **kwargs + ): + super(SqlConnectionInformation, self).__init__(**kwargs) + self.data_source = kwargs.get('data_source', None) + self.authentication = kwargs.get('authentication', None) + self.user_name = kwargs.get('user_name', None) + self.password = kwargs.get('password', None) + self.encrypt_connection = kwargs.get('encrypt_connection', None) + self.trust_server_certificate = kwargs.get('trust_server_certificate', None) + + +class SqlFileShare(msrest.serialization.Model): + """File share. + + :param path: Location as SMB share or local drive where backups are placed. + :type path: str + :param username: Username to access the file share location for backups. + :type username: str + :param password: Password for username to access file share location. + :type password: str + """ + + _attribute_map = { + 'path': {'key': 'path', 'type': 'str'}, + 'username': {'key': 'username', 'type': 'str'}, + 'password': {'key': 'password', 'type': 'str'}, + } + + def __init__( + self, + **kwargs + ): + super(SqlFileShare, self).__init__(**kwargs) + self.path = kwargs.get('path', None) + self.username = kwargs.get('username', None) + self.password = kwargs.get('password', None) + + +class SqlMigrationListResult(msrest.serialization.Model): + """A list of SQL Migration Service. + + Variables are only populated by the server, and will be ignored when sending a request. + + :ivar value: + :vartype value: list[~azure.mgmt.datamigration.models.SqlMigrationService] + :ivar next_link: + :vartype next_link: str + """ + + _validation = { + 'value': {'readonly': True}, + 'next_link': {'readonly': True}, + } + + _attribute_map = { + 'value': {'key': 'value', 'type': '[SqlMigrationService]'}, + 'next_link': {'key': 'nextLink', 'type': 'str'}, + } + + def __init__( + self, + **kwargs + ): + super(SqlMigrationListResult, self).__init__(**kwargs) + self.value = None + self.next_link = None + + +class SqlMigrationService(TrackedResource): + """A SQL Migration Service. + + Variables are only populated by the server, and will be ignored when sending a request. + + :param location: + :type location: str + :param tags: A set of tags. Dictionary of :code:``. + :type tags: dict[str, str] + :ivar id: + :vartype id: str + :ivar name: + :vartype name: str + :ivar type: + :vartype type: str + :ivar system_data: + :vartype system_data: ~azure.mgmt.datamigration.models.SystemData + :ivar provisioning_state: Provisioning state to track the async operation status. + :vartype provisioning_state: str + :ivar integration_runtime_state: Current state of the Integration runtime. + :vartype integration_runtime_state: str + """ + + _validation = { + 'id': {'readonly': True}, + 'name': {'readonly': True}, + 'type': {'readonly': True}, + 'system_data': {'readonly': True}, + 'provisioning_state': {'readonly': True}, + 'integration_runtime_state': {'readonly': True}, + } + + _attribute_map = { + 'location': {'key': 'location', 'type': 'str'}, + 'tags': {'key': 'tags', 'type': '{str}'}, + 'id': {'key': 'id', 'type': 'str'}, + 'name': {'key': 'name', 'type': 'str'}, + 'type': {'key': 'type', 'type': 'str'}, + 'system_data': {'key': 'systemData', 'type': 'SystemData'}, + 'provisioning_state': {'key': 'properties.provisioningState', 'type': 'str'}, + 'integration_runtime_state': {'key': 'properties.integrationRuntimeState', 'type': 'str'}, + } + + def __init__( + self, + **kwargs + ): + super(SqlMigrationService, self).__init__(**kwargs) + self.provisioning_state = None + self.integration_runtime_state = None + + +class SqlMigrationServiceUpdate(msrest.serialization.Model): + """An update to a SQL Migration Service. + + :param tags: A set of tags. Dictionary of :code:``. + :type tags: dict[str, str] + """ + + _attribute_map = { + 'tags': {'key': 'tags', 'type': '{str}'}, + } + + def __init__( + self, + **kwargs + ): + super(SqlMigrationServiceUpdate, self).__init__(**kwargs) + self.tags = kwargs.get('tags', None) + + +class SsisMigrationInfo(msrest.serialization.Model): + """SSIS migration info with SSIS store type, overwrite policy. + + :param ssis_store_type: The SSIS store type of source, only SSIS catalog is supported now in + DMS. Possible values include: "SsisCatalog". + :type ssis_store_type: str or ~azure.mgmt.datamigration.models.SsisStoreType + :param project_overwrite_option: The overwrite option for the SSIS project migration. Possible + values include: "Ignore", "Overwrite". + :type project_overwrite_option: str or + ~azure.mgmt.datamigration.models.SsisMigrationOverwriteOption + :param environment_overwrite_option: The overwrite option for the SSIS environment migration. + Possible values include: "Ignore", "Overwrite". + :type environment_overwrite_option: str or + ~azure.mgmt.datamigration.models.SsisMigrationOverwriteOption + """ + + _attribute_map = { + 'ssis_store_type': {'key': 'ssisStoreType', 'type': 'str'}, + 'project_overwrite_option': {'key': 'projectOverwriteOption', 'type': 'str'}, + 'environment_overwrite_option': {'key': 'environmentOverwriteOption', 'type': 'str'}, + } + + def __init__( + self, + **kwargs + ): + super(SsisMigrationInfo, self).__init__(**kwargs) + self.ssis_store_type = kwargs.get('ssis_store_type', None) + self.project_overwrite_option = kwargs.get('project_overwrite_option', None) + self.environment_overwrite_option = kwargs.get('environment_overwrite_option', None) + + +class StartMigrationScenarioServerRoleResult(msrest.serialization.Model): + """Server role migration result. + + Variables are only populated by the server, and will be ignored when sending a request. + + :ivar name: Name of server role. + :vartype name: str + :ivar state: Current state of migration. Possible values include: "None", "InProgress", + "Failed", "Warning", "Completed", "Skipped", "Stopped". + :vartype state: str or ~azure.mgmt.datamigration.models.MigrationState + :ivar exceptions_and_warnings: Migration exceptions and warnings. + :vartype exceptions_and_warnings: list[~azure.mgmt.datamigration.models.ReportableException] + """ + + _validation = { + 'name': {'readonly': True}, + 'state': {'readonly': True}, + 'exceptions_and_warnings': {'readonly': True}, + } + + _attribute_map = { + 'name': {'key': 'name', 'type': 'str'}, + 'state': {'key': 'state', 'type': 'str'}, + 'exceptions_and_warnings': {'key': 'exceptionsAndWarnings', 'type': '[ReportableException]'}, + } + + def __init__( + self, + **kwargs + ): + super(StartMigrationScenarioServerRoleResult, self).__init__(**kwargs) + self.name = None + self.state = None + self.exceptions_and_warnings = None + + +class SyncMigrationDatabaseErrorEvent(msrest.serialization.Model): + """Database migration errors for online migration. + + Variables are only populated by the server, and will be ignored when sending a request. + + :ivar timestamp_string: String value of timestamp. + :vartype timestamp_string: str + :ivar event_type_string: Event type. + :vartype event_type_string: str + :ivar event_text: Event text. + :vartype event_text: str + """ + + _validation = { + 'timestamp_string': {'readonly': True}, + 'event_type_string': {'readonly': True}, + 'event_text': {'readonly': True}, + } + + _attribute_map = { + 'timestamp_string': {'key': 'timestampString', 'type': 'str'}, + 'event_type_string': {'key': 'eventTypeString', 'type': 'str'}, + 'event_text': {'key': 'eventText', 'type': 'str'}, + } + + def __init__( + self, + **kwargs + ): + super(SyncMigrationDatabaseErrorEvent, self).__init__(**kwargs) + self.timestamp_string = None + self.event_type_string = None + self.event_text = None + + +class SystemData(msrest.serialization.Model): + """SystemData. + + :param created_by: + :type created_by: str + :param created_by_type: Possible values include: "User", "Application", "ManagedIdentity", + "Key". + :type created_by_type: str or ~azure.mgmt.datamigration.models.CreatedByType + :param created_at: + :type created_at: ~datetime.datetime + :param last_modified_by: + :type last_modified_by: str + :param last_modified_by_type: Possible values include: "User", "Application", + "ManagedIdentity", "Key". + :type last_modified_by_type: str or ~azure.mgmt.datamigration.models.CreatedByType + :param last_modified_at: + :type last_modified_at: ~datetime.datetime + """ + + _attribute_map = { + 'created_by': {'key': 'createdBy', 'type': 'str'}, + 'created_by_type': {'key': 'createdByType', 'type': 'str'}, + 'created_at': {'key': 'createdAt', 'type': 'iso-8601'}, + 'last_modified_by': {'key': 'lastModifiedBy', 'type': 'str'}, + 'last_modified_by_type': {'key': 'lastModifiedByType', 'type': 'str'}, + 'last_modified_at': {'key': 'lastModifiedAt', 'type': 'iso-8601'}, + } + + def __init__( + self, + **kwargs + ): + super(SystemData, self).__init__(**kwargs) + self.created_by = kwargs.get('created_by', None) + self.created_by_type = kwargs.get('created_by_type', None) + self.created_at = kwargs.get('created_at', None) + self.last_modified_by = kwargs.get('last_modified_by', None) + self.last_modified_by_type = kwargs.get('last_modified_by_type', None) + self.last_modified_at = kwargs.get('last_modified_at', None) + + +class TargetLocation(msrest.serialization.Model): + """Target Location details for optional copy of backups. + + :param storage_account_resource_id: Resource Id of the storage account copying backups. + :type storage_account_resource_id: str + :param account_key: Storage Account Key. + :type account_key: str + """ + + _attribute_map = { + 'storage_account_resource_id': {'key': 'storageAccountResourceId', 'type': 'str'}, + 'account_key': {'key': 'accountKey', 'type': 'str'}, + } + + def __init__( + self, + **kwargs + ): + super(TargetLocation, self).__init__(**kwargs) + self.storage_account_resource_id = kwargs.get('storage_account_resource_id', None) + self.account_key = kwargs.get('account_key', None) + + +class TaskList(msrest.serialization.Model): + """OData page of tasks. + + :param value: List of tasks. + :type value: list[~azure.mgmt.datamigration.models.ProjectTask] + :param next_link: URL to load the next page of tasks. + :type next_link: str + """ + + _attribute_map = { + 'value': {'key': 'value', 'type': '[ProjectTask]'}, + 'next_link': {'key': 'nextLink', 'type': 'str'}, + } + + def __init__( + self, + **kwargs + ): + super(TaskList, self).__init__(**kwargs) + self.value = kwargs.get('value', None) + self.next_link = kwargs.get('next_link', None) + + +class UploadOciDriverTaskInput(msrest.serialization.Model): + """Input for the service task to upload an OCI driver. + + :param driver_share: File share information for the OCI driver archive. + :type driver_share: ~azure.mgmt.datamigration.models.FileShare + """ + + _attribute_map = { + 'driver_share': {'key': 'driverShare', 'type': 'FileShare'}, + } + + def __init__( + self, + **kwargs + ): + super(UploadOciDriverTaskInput, self).__init__(**kwargs) + self.driver_share = kwargs.get('driver_share', None) + + +class UploadOciDriverTaskOutput(msrest.serialization.Model): + """Output for the service task to upload an OCI driver. + + Variables are only populated by the server, and will be ignored when sending a request. + + :ivar driver_package_name: The name of the driver package that was validated and uploaded. + :vartype driver_package_name: str + :ivar validation_errors: Validation errors. + :vartype validation_errors: list[~azure.mgmt.datamigration.models.ReportableException] + """ + + _validation = { + 'driver_package_name': {'readonly': True}, + 'validation_errors': {'readonly': True}, + } + + _attribute_map = { + 'driver_package_name': {'key': 'driverPackageName', 'type': 'str'}, + 'validation_errors': {'key': 'validationErrors', 'type': '[ReportableException]'}, + } + + def __init__( + self, + **kwargs + ): + super(UploadOciDriverTaskOutput, self).__init__(**kwargs) + self.driver_package_name = None + self.validation_errors = None + + +class UploadOciDriverTaskProperties(ProjectTaskProperties): + """Properties for the task that uploads an OCI driver. + + Variables are only populated by the server, and will be ignored when sending a request. + + All required parameters must be populated in order to send to Azure. + + :param task_type: Required. Task type.Constant filled by server. Possible values include: + "Connect.MongoDb", "ConnectToSource.SqlServer", "ConnectToSource.SqlServer.Sync", + "ConnectToSource.PostgreSql.Sync", "ConnectToSource.MySql", "ConnectToSource.Oracle.Sync", + "ConnectToTarget.SqlDb", "ConnectToTarget.SqlDb.Sync", + "ConnectToTarget.AzureDbForPostgreSql.Sync", + "ConnectToTarget.Oracle.AzureDbForPostgreSql.Sync", "ConnectToTarget.AzureSqlDbMI", + "ConnectToTarget.AzureSqlDbMI.Sync.LRS", "ConnectToTarget.AzureDbForMySql", + "GetUserTables.Sql", "GetUserTables.AzureSqlDb.Sync", "GetUserTablesOracle", + "GetUserTablesPostgreSql", "GetUserTablesMySql", "Migrate.MongoDb", + "Migrate.SqlServer.AzureSqlDbMI", "Migrate.SqlServer.AzureSqlDbMI.Sync.LRS", + "Migrate.SqlServer.SqlDb", "Migrate.SqlServer.AzureSqlDb.Sync", + "Migrate.MySql.AzureDbForMySql.Sync", "Migrate.MySql.AzureDbForMySql", + "Migrate.PostgreSql.AzureDbForPostgreSql.SyncV2", "Migrate.Oracle.AzureDbForPostgreSql.Sync", + "ValidateMigrationInput.SqlServer.SqlDb.Sync", "ValidateMigrationInput.SqlServer.AzureSqlDbMI", + "ValidateMigrationInput.SqlServer.AzureSqlDbMI.Sync.LRS", "Validate.MongoDb", + "Validate.Oracle.AzureDbPostgreSql.Sync", "GetTDECertificates.Sql", "Migrate.Ssis", + "Service.Check.OCI", "Service.Upload.OCI", "Service.Install.OCI", + "MigrateSchemaSqlServerSqlDb". + :type task_type: str or ~azure.mgmt.datamigration.models.TaskType + :ivar errors: Array of errors. This is ignored if submitted. + :vartype errors: list[~azure.mgmt.datamigration.models.ODataError] + :ivar state: The state of the task. This is ignored if submitted. Possible values include: + "Unknown", "Queued", "Running", "Canceled", "Succeeded", "Failed", "FailedInputValidation", + "Faulted". + :vartype state: str or ~azure.mgmt.datamigration.models.TaskState + :ivar commands: Array of command properties. + :vartype commands: list[~azure.mgmt.datamigration.models.CommandProperties] + :param client_data: Key value pairs of client data to attach meta data information to task. + :type client_data: dict[str, str] + :param input: Input for the service task to upload an OCI driver. + :type input: ~azure.mgmt.datamigration.models.UploadOciDriverTaskInput + :ivar output: Task output. This is ignored if submitted. + :vartype output: list[~azure.mgmt.datamigration.models.UploadOciDriverTaskOutput] + """ + + _validation = { + 'task_type': {'required': True}, + 'errors': {'readonly': True}, + 'state': {'readonly': True}, + 'commands': {'readonly': True}, + 'output': {'readonly': True}, + } + + _attribute_map = { + 'task_type': {'key': 'taskType', 'type': 'str'}, + 'errors': {'key': 'errors', 'type': '[ODataError]'}, + 'state': {'key': 'state', 'type': 'str'}, + 'commands': {'key': 'commands', 'type': '[CommandProperties]'}, + 'client_data': {'key': 'clientData', 'type': '{str}'}, + 'input': {'key': 'input', 'type': 'UploadOciDriverTaskInput'}, + 'output': {'key': 'output', 'type': '[UploadOciDriverTaskOutput]'}, + } + + def __init__( + self, + **kwargs + ): + super(UploadOciDriverTaskProperties, self).__init__(**kwargs) + self.task_type = 'Service.Upload.OCI' # type: str + self.input = kwargs.get('input', None) + self.output = None + + +class ValidateMigrationInputSqlServerSqlDbSyncTaskProperties(ProjectTaskProperties): + """Properties for task that validates migration input for SQL to Azure SQL DB sync migrations. + + Variables are only populated by the server, and will be ignored when sending a request. + + All required parameters must be populated in order to send to Azure. + + :param task_type: Required. Task type.Constant filled by server. Possible values include: + "Connect.MongoDb", "ConnectToSource.SqlServer", "ConnectToSource.SqlServer.Sync", + "ConnectToSource.PostgreSql.Sync", "ConnectToSource.MySql", "ConnectToSource.Oracle.Sync", + "ConnectToTarget.SqlDb", "ConnectToTarget.SqlDb.Sync", + "ConnectToTarget.AzureDbForPostgreSql.Sync", + "ConnectToTarget.Oracle.AzureDbForPostgreSql.Sync", "ConnectToTarget.AzureSqlDbMI", + "ConnectToTarget.AzureSqlDbMI.Sync.LRS", "ConnectToTarget.AzureDbForMySql", + "GetUserTables.Sql", "GetUserTables.AzureSqlDb.Sync", "GetUserTablesOracle", + "GetUserTablesPostgreSql", "GetUserTablesMySql", "Migrate.MongoDb", + "Migrate.SqlServer.AzureSqlDbMI", "Migrate.SqlServer.AzureSqlDbMI.Sync.LRS", + "Migrate.SqlServer.SqlDb", "Migrate.SqlServer.AzureSqlDb.Sync", + "Migrate.MySql.AzureDbForMySql.Sync", "Migrate.MySql.AzureDbForMySql", + "Migrate.PostgreSql.AzureDbForPostgreSql.SyncV2", "Migrate.Oracle.AzureDbForPostgreSql.Sync", + "ValidateMigrationInput.SqlServer.SqlDb.Sync", "ValidateMigrationInput.SqlServer.AzureSqlDbMI", + "ValidateMigrationInput.SqlServer.AzureSqlDbMI.Sync.LRS", "Validate.MongoDb", + "Validate.Oracle.AzureDbPostgreSql.Sync", "GetTDECertificates.Sql", "Migrate.Ssis", + "Service.Check.OCI", "Service.Upload.OCI", "Service.Install.OCI", + "MigrateSchemaSqlServerSqlDb". + :type task_type: str or ~azure.mgmt.datamigration.models.TaskType + :ivar errors: Array of errors. This is ignored if submitted. + :vartype errors: list[~azure.mgmt.datamigration.models.ODataError] + :ivar state: The state of the task. This is ignored if submitted. Possible values include: + "Unknown", "Queued", "Running", "Canceled", "Succeeded", "Failed", "FailedInputValidation", + "Faulted". + :vartype state: str or ~azure.mgmt.datamigration.models.TaskState + :ivar commands: Array of command properties. + :vartype commands: list[~azure.mgmt.datamigration.models.CommandProperties] + :param client_data: Key value pairs of client data to attach meta data information to task. + :type client_data: dict[str, str] + :param input: Task input. + :type input: ~azure.mgmt.datamigration.models.ValidateSyncMigrationInputSqlServerTaskInput + :ivar output: Task output. This is ignored if submitted. + :vartype output: + list[~azure.mgmt.datamigration.models.ValidateSyncMigrationInputSqlServerTaskOutput] + """ + + _validation = { + 'task_type': {'required': True}, + 'errors': {'readonly': True}, + 'state': {'readonly': True}, + 'commands': {'readonly': True}, + 'output': {'readonly': True}, + } + + _attribute_map = { + 'task_type': {'key': 'taskType', 'type': 'str'}, + 'errors': {'key': 'errors', 'type': '[ODataError]'}, + 'state': {'key': 'state', 'type': 'str'}, + 'commands': {'key': 'commands', 'type': '[CommandProperties]'}, + 'client_data': {'key': 'clientData', 'type': '{str}'}, + 'input': {'key': 'input', 'type': 'ValidateSyncMigrationInputSqlServerTaskInput'}, + 'output': {'key': 'output', 'type': '[ValidateSyncMigrationInputSqlServerTaskOutput]'}, + } + + def __init__( + self, + **kwargs + ): + super(ValidateMigrationInputSqlServerSqlDbSyncTaskProperties, self).__init__(**kwargs) + self.task_type = 'ValidateMigrationInput.SqlServer.SqlDb.Sync' # type: str + self.input = kwargs.get('input', None) + self.output = None + + +class ValidateMigrationInputSqlServerSqlMiSyncTaskInput(SqlServerSqlMiSyncTaskInput): + """Input for task that migrates SQL Server databases to Azure SQL Database Managed Instance online scenario. + + All required parameters must be populated in order to send to Azure. + + :param selected_databases: Required. Databases to migrate. + :type selected_databases: + list[~azure.mgmt.datamigration.models.MigrateSqlServerSqlMiDatabaseInput] + :param backup_file_share: Backup file share information for all selected databases. + :type backup_file_share: ~azure.mgmt.datamigration.models.FileShare + :param storage_resource_id: Required. Fully qualified resourceId of storage. + :type storage_resource_id: str + :param source_connection_info: Required. Connection information for source SQL Server. + :type source_connection_info: ~azure.mgmt.datamigration.models.SqlConnectionInfo + :param target_connection_info: Required. Connection information for Azure SQL Database Managed + Instance. + :type target_connection_info: ~azure.mgmt.datamigration.models.MiSqlConnectionInfo + :param azure_app: Required. Azure Active Directory Application the DMS instance will use to + connect to the target instance of Azure SQL Database Managed Instance and the Azure Storage + Account. + :type azure_app: ~azure.mgmt.datamigration.models.AzureActiveDirectoryApp + """ + + _validation = { + 'selected_databases': {'required': True}, + 'storage_resource_id': {'required': True}, + 'source_connection_info': {'required': True}, + 'target_connection_info': {'required': True}, + 'azure_app': {'required': True}, + } + + _attribute_map = { + 'selected_databases': {'key': 'selectedDatabases', 'type': '[MigrateSqlServerSqlMiDatabaseInput]'}, + 'backup_file_share': {'key': 'backupFileShare', 'type': 'FileShare'}, + 'storage_resource_id': {'key': 'storageResourceId', 'type': 'str'}, + 'source_connection_info': {'key': 'sourceConnectionInfo', 'type': 'SqlConnectionInfo'}, + 'target_connection_info': {'key': 'targetConnectionInfo', 'type': 'MiSqlConnectionInfo'}, + 'azure_app': {'key': 'azureApp', 'type': 'AzureActiveDirectoryApp'}, + } + + def __init__( + self, + **kwargs + ): + super(ValidateMigrationInputSqlServerSqlMiSyncTaskInput, self).__init__(**kwargs) + + +class ValidateMigrationInputSqlServerSqlMiSyncTaskOutput(msrest.serialization.Model): + """Output for task that validates migration input for Azure SQL Database Managed Instance online migration. + + Variables are only populated by the server, and will be ignored when sending a request. + + :ivar id: Database identifier. + :vartype id: str + :ivar name: Name of database. + :vartype name: str + :ivar validation_errors: Errors associated with a selected database object. + :vartype validation_errors: list[~azure.mgmt.datamigration.models.ReportableException] + """ + + _validation = { + 'id': {'readonly': True}, + 'name': {'readonly': True}, + 'validation_errors': {'readonly': True}, + } + + _attribute_map = { + 'id': {'key': 'id', 'type': 'str'}, + 'name': {'key': 'name', 'type': 'str'}, + 'validation_errors': {'key': 'validationErrors', 'type': '[ReportableException]'}, + } + + def __init__( + self, + **kwargs + ): + super(ValidateMigrationInputSqlServerSqlMiSyncTaskOutput, self).__init__(**kwargs) + self.id = None + self.name = None + self.validation_errors = None + + +class ValidateMigrationInputSqlServerSqlMiSyncTaskProperties(ProjectTaskProperties): + """Properties for task that validates migration input for SQL to Azure SQL Database Managed Instance sync scenario. + + Variables are only populated by the server, and will be ignored when sending a request. + + All required parameters must be populated in order to send to Azure. + + :param task_type: Required. Task type.Constant filled by server. Possible values include: + "Connect.MongoDb", "ConnectToSource.SqlServer", "ConnectToSource.SqlServer.Sync", + "ConnectToSource.PostgreSql.Sync", "ConnectToSource.MySql", "ConnectToSource.Oracle.Sync", + "ConnectToTarget.SqlDb", "ConnectToTarget.SqlDb.Sync", + "ConnectToTarget.AzureDbForPostgreSql.Sync", + "ConnectToTarget.Oracle.AzureDbForPostgreSql.Sync", "ConnectToTarget.AzureSqlDbMI", + "ConnectToTarget.AzureSqlDbMI.Sync.LRS", "ConnectToTarget.AzureDbForMySql", + "GetUserTables.Sql", "GetUserTables.AzureSqlDb.Sync", "GetUserTablesOracle", + "GetUserTablesPostgreSql", "GetUserTablesMySql", "Migrate.MongoDb", + "Migrate.SqlServer.AzureSqlDbMI", "Migrate.SqlServer.AzureSqlDbMI.Sync.LRS", + "Migrate.SqlServer.SqlDb", "Migrate.SqlServer.AzureSqlDb.Sync", + "Migrate.MySql.AzureDbForMySql.Sync", "Migrate.MySql.AzureDbForMySql", + "Migrate.PostgreSql.AzureDbForPostgreSql.SyncV2", "Migrate.Oracle.AzureDbForPostgreSql.Sync", + "ValidateMigrationInput.SqlServer.SqlDb.Sync", "ValidateMigrationInput.SqlServer.AzureSqlDbMI", + "ValidateMigrationInput.SqlServer.AzureSqlDbMI.Sync.LRS", "Validate.MongoDb", + "Validate.Oracle.AzureDbPostgreSql.Sync", "GetTDECertificates.Sql", "Migrate.Ssis", + "Service.Check.OCI", "Service.Upload.OCI", "Service.Install.OCI", + "MigrateSchemaSqlServerSqlDb". + :type task_type: str or ~azure.mgmt.datamigration.models.TaskType + :ivar errors: Array of errors. This is ignored if submitted. + :vartype errors: list[~azure.mgmt.datamigration.models.ODataError] + :ivar state: The state of the task. This is ignored if submitted. Possible values include: + "Unknown", "Queued", "Running", "Canceled", "Succeeded", "Failed", "FailedInputValidation", + "Faulted". + :vartype state: str or ~azure.mgmt.datamigration.models.TaskState + :ivar commands: Array of command properties. + :vartype commands: list[~azure.mgmt.datamigration.models.CommandProperties] + :param client_data: Key value pairs of client data to attach meta data information to task. + :type client_data: dict[str, str] + :param input: Task input. + :type input: ~azure.mgmt.datamigration.models.SqlServerSqlMiSyncTaskInput + :ivar output: Task output. This is ignored if submitted. + :vartype output: + list[~azure.mgmt.datamigration.models.ValidateMigrationInputSqlServerSqlMiSyncTaskOutput] + """ + + _validation = { + 'task_type': {'required': True}, + 'errors': {'readonly': True}, + 'state': {'readonly': True}, + 'commands': {'readonly': True}, + 'output': {'readonly': True}, + } + + _attribute_map = { + 'task_type': {'key': 'taskType', 'type': 'str'}, + 'errors': {'key': 'errors', 'type': '[ODataError]'}, + 'state': {'key': 'state', 'type': 'str'}, + 'commands': {'key': 'commands', 'type': '[CommandProperties]'}, + 'client_data': {'key': 'clientData', 'type': '{str}'}, + 'input': {'key': 'input', 'type': 'SqlServerSqlMiSyncTaskInput'}, + 'output': {'key': 'output', 'type': '[ValidateMigrationInputSqlServerSqlMiSyncTaskOutput]'}, + } + + def __init__( + self, + **kwargs + ): + super(ValidateMigrationInputSqlServerSqlMiSyncTaskProperties, self).__init__(**kwargs) + self.task_type = 'ValidateMigrationInput.SqlServer.AzureSqlDbMI.Sync.LRS' # type: str + self.input = kwargs.get('input', None) + self.output = None + + +class ValidateMigrationInputSqlServerSqlMiTaskInput(msrest.serialization.Model): + """Input for task that validates migration input for SQL to Azure SQL Managed Instance. + + All required parameters must be populated in order to send to Azure. + + :param source_connection_info: Required. Information for connecting to source. + :type source_connection_info: ~azure.mgmt.datamigration.models.SqlConnectionInfo + :param target_connection_info: Required. Information for connecting to target. + :type target_connection_info: ~azure.mgmt.datamigration.models.SqlConnectionInfo + :param selected_databases: Required. Databases to migrate. + :type selected_databases: + list[~azure.mgmt.datamigration.models.MigrateSqlServerSqlMiDatabaseInput] + :param selected_logins: Logins to migrate. + :type selected_logins: list[str] + :param backup_file_share: Backup file share information for all selected databases. + :type backup_file_share: ~azure.mgmt.datamigration.models.FileShare + :param backup_blob_share: Required. SAS URI of Azure Storage Account Container to be used for + storing backup files. + :type backup_blob_share: ~azure.mgmt.datamigration.models.BlobShare + :param backup_mode: Backup Mode to specify whether to use existing backup or create new backup. + Possible values include: "CreateBackup", "ExistingBackup". + :type backup_mode: str or ~azure.mgmt.datamigration.models.BackupMode + """ + + _validation = { + 'source_connection_info': {'required': True}, + 'target_connection_info': {'required': True}, + 'selected_databases': {'required': True}, + 'backup_blob_share': {'required': True}, + } + + _attribute_map = { + 'source_connection_info': {'key': 'sourceConnectionInfo', 'type': 'SqlConnectionInfo'}, + 'target_connection_info': {'key': 'targetConnectionInfo', 'type': 'SqlConnectionInfo'}, + 'selected_databases': {'key': 'selectedDatabases', 'type': '[MigrateSqlServerSqlMiDatabaseInput]'}, + 'selected_logins': {'key': 'selectedLogins', 'type': '[str]'}, + 'backup_file_share': {'key': 'backupFileShare', 'type': 'FileShare'}, + 'backup_blob_share': {'key': 'backupBlobShare', 'type': 'BlobShare'}, + 'backup_mode': {'key': 'backupMode', 'type': 'str'}, + } + + def __init__( + self, + **kwargs + ): + super(ValidateMigrationInputSqlServerSqlMiTaskInput, self).__init__(**kwargs) + self.source_connection_info = kwargs['source_connection_info'] + self.target_connection_info = kwargs['target_connection_info'] + self.selected_databases = kwargs['selected_databases'] + self.selected_logins = kwargs.get('selected_logins', None) + self.backup_file_share = kwargs.get('backup_file_share', None) + self.backup_blob_share = kwargs['backup_blob_share'] + self.backup_mode = kwargs.get('backup_mode', None) + + +class ValidateMigrationInputSqlServerSqlMiTaskOutput(msrest.serialization.Model): + """Output for task that validates migration input for SQL to Azure SQL Managed Instance migrations. + + Variables are only populated by the server, and will be ignored when sending a request. + + :ivar id: Result identifier. + :vartype id: str + :ivar name: Name of database. + :vartype name: str + :ivar restore_database_name_errors: Errors associated with the RestoreDatabaseName. + :vartype restore_database_name_errors: + list[~azure.mgmt.datamigration.models.ReportableException] + :ivar backup_folder_errors: Errors associated with the BackupFolder path. + :vartype backup_folder_errors: list[~azure.mgmt.datamigration.models.ReportableException] + :ivar backup_share_credentials_errors: Errors associated with backup share user name and + password credentials. + :vartype backup_share_credentials_errors: + list[~azure.mgmt.datamigration.models.ReportableException] + :ivar backup_storage_account_errors: Errors associated with the storage account provided. + :vartype backup_storage_account_errors: + list[~azure.mgmt.datamigration.models.ReportableException] + :ivar existing_backup_errors: Errors associated with existing backup files. + :vartype existing_backup_errors: list[~azure.mgmt.datamigration.models.ReportableException] + :param database_backup_info: Information about backup files when existing backup mode is used. + :type database_backup_info: ~azure.mgmt.datamigration.models.DatabaseBackupInfo + """ + + _validation = { + 'id': {'readonly': True}, + 'name': {'readonly': True}, + 'restore_database_name_errors': {'readonly': True}, + 'backup_folder_errors': {'readonly': True}, + 'backup_share_credentials_errors': {'readonly': True}, + 'backup_storage_account_errors': {'readonly': True}, + 'existing_backup_errors': {'readonly': True}, + } + + _attribute_map = { + 'id': {'key': 'id', 'type': 'str'}, + 'name': {'key': 'name', 'type': 'str'}, + 'restore_database_name_errors': {'key': 'restoreDatabaseNameErrors', 'type': '[ReportableException]'}, + 'backup_folder_errors': {'key': 'backupFolderErrors', 'type': '[ReportableException]'}, + 'backup_share_credentials_errors': {'key': 'backupShareCredentialsErrors', 'type': '[ReportableException]'}, + 'backup_storage_account_errors': {'key': 'backupStorageAccountErrors', 'type': '[ReportableException]'}, + 'existing_backup_errors': {'key': 'existingBackupErrors', 'type': '[ReportableException]'}, + 'database_backup_info': {'key': 'databaseBackupInfo', 'type': 'DatabaseBackupInfo'}, + } + + def __init__( + self, + **kwargs + ): + super(ValidateMigrationInputSqlServerSqlMiTaskOutput, self).__init__(**kwargs) + self.id = None + self.name = None + self.restore_database_name_errors = None + self.backup_folder_errors = None + self.backup_share_credentials_errors = None + self.backup_storage_account_errors = None + self.existing_backup_errors = None + self.database_backup_info = kwargs.get('database_backup_info', None) + + +class ValidateMigrationInputSqlServerSqlMiTaskProperties(ProjectTaskProperties): + """Properties for task that validates migration input for SQL to Azure SQL Database Managed Instance. + + Variables are only populated by the server, and will be ignored when sending a request. + + All required parameters must be populated in order to send to Azure. + + :param task_type: Required. Task type.Constant filled by server. Possible values include: + "Connect.MongoDb", "ConnectToSource.SqlServer", "ConnectToSource.SqlServer.Sync", + "ConnectToSource.PostgreSql.Sync", "ConnectToSource.MySql", "ConnectToSource.Oracle.Sync", + "ConnectToTarget.SqlDb", "ConnectToTarget.SqlDb.Sync", + "ConnectToTarget.AzureDbForPostgreSql.Sync", + "ConnectToTarget.Oracle.AzureDbForPostgreSql.Sync", "ConnectToTarget.AzureSqlDbMI", + "ConnectToTarget.AzureSqlDbMI.Sync.LRS", "ConnectToTarget.AzureDbForMySql", + "GetUserTables.Sql", "GetUserTables.AzureSqlDb.Sync", "GetUserTablesOracle", + "GetUserTablesPostgreSql", "GetUserTablesMySql", "Migrate.MongoDb", + "Migrate.SqlServer.AzureSqlDbMI", "Migrate.SqlServer.AzureSqlDbMI.Sync.LRS", + "Migrate.SqlServer.SqlDb", "Migrate.SqlServer.AzureSqlDb.Sync", + "Migrate.MySql.AzureDbForMySql.Sync", "Migrate.MySql.AzureDbForMySql", + "Migrate.PostgreSql.AzureDbForPostgreSql.SyncV2", "Migrate.Oracle.AzureDbForPostgreSql.Sync", + "ValidateMigrationInput.SqlServer.SqlDb.Sync", "ValidateMigrationInput.SqlServer.AzureSqlDbMI", + "ValidateMigrationInput.SqlServer.AzureSqlDbMI.Sync.LRS", "Validate.MongoDb", + "Validate.Oracle.AzureDbPostgreSql.Sync", "GetTDECertificates.Sql", "Migrate.Ssis", + "Service.Check.OCI", "Service.Upload.OCI", "Service.Install.OCI", + "MigrateSchemaSqlServerSqlDb". + :type task_type: str or ~azure.mgmt.datamigration.models.TaskType + :ivar errors: Array of errors. This is ignored if submitted. + :vartype errors: list[~azure.mgmt.datamigration.models.ODataError] + :ivar state: The state of the task. This is ignored if submitted. Possible values include: + "Unknown", "Queued", "Running", "Canceled", "Succeeded", "Failed", "FailedInputValidation", + "Faulted". + :vartype state: str or ~azure.mgmt.datamigration.models.TaskState + :ivar commands: Array of command properties. + :vartype commands: list[~azure.mgmt.datamigration.models.CommandProperties] + :param client_data: Key value pairs of client data to attach meta data information to task. + :type client_data: dict[str, str] + :param input: Task input. + :type input: ~azure.mgmt.datamigration.models.ValidateMigrationInputSqlServerSqlMiTaskInput + :ivar output: Task output. This is ignored if submitted. + :vartype output: + list[~azure.mgmt.datamigration.models.ValidateMigrationInputSqlServerSqlMiTaskOutput] + """ + + _validation = { + 'task_type': {'required': True}, + 'errors': {'readonly': True}, + 'state': {'readonly': True}, + 'commands': {'readonly': True}, + 'output': {'readonly': True}, + } + + _attribute_map = { + 'task_type': {'key': 'taskType', 'type': 'str'}, + 'errors': {'key': 'errors', 'type': '[ODataError]'}, + 'state': {'key': 'state', 'type': 'str'}, + 'commands': {'key': 'commands', 'type': '[CommandProperties]'}, + 'client_data': {'key': 'clientData', 'type': '{str}'}, + 'input': {'key': 'input', 'type': 'ValidateMigrationInputSqlServerSqlMiTaskInput'}, + 'output': {'key': 'output', 'type': '[ValidateMigrationInputSqlServerSqlMiTaskOutput]'}, + } + + def __init__( + self, + **kwargs + ): + super(ValidateMigrationInputSqlServerSqlMiTaskProperties, self).__init__(**kwargs) + self.task_type = 'ValidateMigrationInput.SqlServer.AzureSqlDbMI' # type: str + self.input = kwargs.get('input', None) + self.output = None + + +class ValidateMongoDbTaskProperties(ProjectTaskProperties): + """Properties for the task that validates a migration between MongoDB data sources. + + Variables are only populated by the server, and will be ignored when sending a request. + + All required parameters must be populated in order to send to Azure. + + :param task_type: Required. Task type.Constant filled by server. Possible values include: + "Connect.MongoDb", "ConnectToSource.SqlServer", "ConnectToSource.SqlServer.Sync", + "ConnectToSource.PostgreSql.Sync", "ConnectToSource.MySql", "ConnectToSource.Oracle.Sync", + "ConnectToTarget.SqlDb", "ConnectToTarget.SqlDb.Sync", + "ConnectToTarget.AzureDbForPostgreSql.Sync", + "ConnectToTarget.Oracle.AzureDbForPostgreSql.Sync", "ConnectToTarget.AzureSqlDbMI", + "ConnectToTarget.AzureSqlDbMI.Sync.LRS", "ConnectToTarget.AzureDbForMySql", + "GetUserTables.Sql", "GetUserTables.AzureSqlDb.Sync", "GetUserTablesOracle", + "GetUserTablesPostgreSql", "GetUserTablesMySql", "Migrate.MongoDb", + "Migrate.SqlServer.AzureSqlDbMI", "Migrate.SqlServer.AzureSqlDbMI.Sync.LRS", + "Migrate.SqlServer.SqlDb", "Migrate.SqlServer.AzureSqlDb.Sync", + "Migrate.MySql.AzureDbForMySql.Sync", "Migrate.MySql.AzureDbForMySql", + "Migrate.PostgreSql.AzureDbForPostgreSql.SyncV2", "Migrate.Oracle.AzureDbForPostgreSql.Sync", + "ValidateMigrationInput.SqlServer.SqlDb.Sync", "ValidateMigrationInput.SqlServer.AzureSqlDbMI", + "ValidateMigrationInput.SqlServer.AzureSqlDbMI.Sync.LRS", "Validate.MongoDb", + "Validate.Oracle.AzureDbPostgreSql.Sync", "GetTDECertificates.Sql", "Migrate.Ssis", + "Service.Check.OCI", "Service.Upload.OCI", "Service.Install.OCI", + "MigrateSchemaSqlServerSqlDb". + :type task_type: str or ~azure.mgmt.datamigration.models.TaskType + :ivar errors: Array of errors. This is ignored if submitted. + :vartype errors: list[~azure.mgmt.datamigration.models.ODataError] + :ivar state: The state of the task. This is ignored if submitted. Possible values include: + "Unknown", "Queued", "Running", "Canceled", "Succeeded", "Failed", "FailedInputValidation", + "Faulted". + :vartype state: str or ~azure.mgmt.datamigration.models.TaskState + :ivar commands: Array of command properties. + :vartype commands: list[~azure.mgmt.datamigration.models.CommandProperties] + :param client_data: Key value pairs of client data to attach meta data information to task. + :type client_data: dict[str, str] + :param input: Describes how a MongoDB data migration should be performed. + :type input: ~azure.mgmt.datamigration.models.MongoDbMigrationSettings + :ivar output: An array containing a single MongoDbMigrationProgress object. + :vartype output: list[~azure.mgmt.datamigration.models.MongoDbMigrationProgress] + """ + + _validation = { + 'task_type': {'required': True}, + 'errors': {'readonly': True}, + 'state': {'readonly': True}, + 'commands': {'readonly': True}, + 'output': {'readonly': True}, + } + + _attribute_map = { + 'task_type': {'key': 'taskType', 'type': 'str'}, + 'errors': {'key': 'errors', 'type': '[ODataError]'}, + 'state': {'key': 'state', 'type': 'str'}, + 'commands': {'key': 'commands', 'type': '[CommandProperties]'}, + 'client_data': {'key': 'clientData', 'type': '{str}'}, + 'input': {'key': 'input', 'type': 'MongoDbMigrationSettings'}, + 'output': {'key': 'output', 'type': '[MongoDbMigrationProgress]'}, + } + + def __init__( + self, + **kwargs + ): + super(ValidateMongoDbTaskProperties, self).__init__(**kwargs) + self.task_type = 'Validate.MongoDb' # type: str + self.input = kwargs.get('input', None) + self.output = None + + +class ValidateOracleAzureDbForPostgreSqlSyncTaskProperties(ProjectTaskProperties): + """Properties for the task that validates a migration for Oracle to Azure Database for PostgreSQL for online migrations. + + Variables are only populated by the server, and will be ignored when sending a request. + + All required parameters must be populated in order to send to Azure. + + :param task_type: Required. Task type.Constant filled by server. Possible values include: + "Connect.MongoDb", "ConnectToSource.SqlServer", "ConnectToSource.SqlServer.Sync", + "ConnectToSource.PostgreSql.Sync", "ConnectToSource.MySql", "ConnectToSource.Oracle.Sync", + "ConnectToTarget.SqlDb", "ConnectToTarget.SqlDb.Sync", + "ConnectToTarget.AzureDbForPostgreSql.Sync", + "ConnectToTarget.Oracle.AzureDbForPostgreSql.Sync", "ConnectToTarget.AzureSqlDbMI", + "ConnectToTarget.AzureSqlDbMI.Sync.LRS", "ConnectToTarget.AzureDbForMySql", + "GetUserTables.Sql", "GetUserTables.AzureSqlDb.Sync", "GetUserTablesOracle", + "GetUserTablesPostgreSql", "GetUserTablesMySql", "Migrate.MongoDb", + "Migrate.SqlServer.AzureSqlDbMI", "Migrate.SqlServer.AzureSqlDbMI.Sync.LRS", + "Migrate.SqlServer.SqlDb", "Migrate.SqlServer.AzureSqlDb.Sync", + "Migrate.MySql.AzureDbForMySql.Sync", "Migrate.MySql.AzureDbForMySql", + "Migrate.PostgreSql.AzureDbForPostgreSql.SyncV2", "Migrate.Oracle.AzureDbForPostgreSql.Sync", + "ValidateMigrationInput.SqlServer.SqlDb.Sync", "ValidateMigrationInput.SqlServer.AzureSqlDbMI", + "ValidateMigrationInput.SqlServer.AzureSqlDbMI.Sync.LRS", "Validate.MongoDb", + "Validate.Oracle.AzureDbPostgreSql.Sync", "GetTDECertificates.Sql", "Migrate.Ssis", + "Service.Check.OCI", "Service.Upload.OCI", "Service.Install.OCI", + "MigrateSchemaSqlServerSqlDb". + :type task_type: str or ~azure.mgmt.datamigration.models.TaskType + :ivar errors: Array of errors. This is ignored if submitted. + :vartype errors: list[~azure.mgmt.datamigration.models.ODataError] + :ivar state: The state of the task. This is ignored if submitted. Possible values include: + "Unknown", "Queued", "Running", "Canceled", "Succeeded", "Failed", "FailedInputValidation", + "Faulted". + :vartype state: str or ~azure.mgmt.datamigration.models.TaskState + :ivar commands: Array of command properties. + :vartype commands: list[~azure.mgmt.datamigration.models.CommandProperties] + :param client_data: Key value pairs of client data to attach meta data information to task. + :type client_data: dict[str, str] + :param input: Input for the task that migrates Oracle databases to Azure Database for + PostgreSQL for online migrations. + :type input: ~azure.mgmt.datamigration.models.MigrateOracleAzureDbPostgreSqlSyncTaskInput + :ivar output: An array containing a single validation error response object. + :vartype output: + list[~azure.mgmt.datamigration.models.ValidateOracleAzureDbPostgreSqlSyncTaskOutput] + """ + + _validation = { + 'task_type': {'required': True}, + 'errors': {'readonly': True}, + 'state': {'readonly': True}, + 'commands': {'readonly': True}, + 'output': {'readonly': True}, + } + + _attribute_map = { + 'task_type': {'key': 'taskType', 'type': 'str'}, + 'errors': {'key': 'errors', 'type': '[ODataError]'}, + 'state': {'key': 'state', 'type': 'str'}, + 'commands': {'key': 'commands', 'type': '[CommandProperties]'}, + 'client_data': {'key': 'clientData', 'type': '{str}'}, + 'input': {'key': 'input', 'type': 'MigrateOracleAzureDbPostgreSqlSyncTaskInput'}, + 'output': {'key': 'output', 'type': '[ValidateOracleAzureDbPostgreSqlSyncTaskOutput]'}, + } + + def __init__( + self, + **kwargs + ): + super(ValidateOracleAzureDbForPostgreSqlSyncTaskProperties, self).__init__(**kwargs) + self.task_type = 'Validate.Oracle.AzureDbPostgreSql.Sync' # type: str + self.input = kwargs.get('input', None) + self.output = None + + +class ValidateOracleAzureDbPostgreSqlSyncTaskOutput(msrest.serialization.Model): + """Output for task that validates migration input for Oracle to Azure Database for PostgreSQL for online migrations. + + Variables are only populated by the server, and will be ignored when sending a request. + + :ivar validation_errors: Errors associated with a selected database object. + :vartype validation_errors: list[~azure.mgmt.datamigration.models.ReportableException] + """ + + _validation = { + 'validation_errors': {'readonly': True}, + } + + _attribute_map = { + 'validation_errors': {'key': 'validationErrors', 'type': '[ReportableException]'}, + } + + def __init__( + self, + **kwargs + ): + super(ValidateOracleAzureDbPostgreSqlSyncTaskOutput, self).__init__(**kwargs) + self.validation_errors = None + + +class ValidateSyncMigrationInputSqlServerTaskInput(msrest.serialization.Model): + """Input for task that validates migration input for SQL sync migrations. + + All required parameters must be populated in order to send to Azure. + + :param source_connection_info: Required. Information for connecting to source SQL server. + :type source_connection_info: ~azure.mgmt.datamigration.models.SqlConnectionInfo + :param target_connection_info: Required. Information for connecting to target. + :type target_connection_info: ~azure.mgmt.datamigration.models.SqlConnectionInfo + :param selected_databases: Required. Databases to migrate. + :type selected_databases: + list[~azure.mgmt.datamigration.models.MigrateSqlServerSqlDbSyncDatabaseInput] + """ + + _validation = { + 'source_connection_info': {'required': True}, + 'target_connection_info': {'required': True}, + 'selected_databases': {'required': True}, + } + + _attribute_map = { + 'source_connection_info': {'key': 'sourceConnectionInfo', 'type': 'SqlConnectionInfo'}, + 'target_connection_info': {'key': 'targetConnectionInfo', 'type': 'SqlConnectionInfo'}, + 'selected_databases': {'key': 'selectedDatabases', 'type': '[MigrateSqlServerSqlDbSyncDatabaseInput]'}, + } + + def __init__( + self, + **kwargs + ): + super(ValidateSyncMigrationInputSqlServerTaskInput, self).__init__(**kwargs) + self.source_connection_info = kwargs['source_connection_info'] + self.target_connection_info = kwargs['target_connection_info'] + self.selected_databases = kwargs['selected_databases'] + + +class ValidateSyncMigrationInputSqlServerTaskOutput(msrest.serialization.Model): + """Output for task that validates migration input for SQL sync migrations. + + Variables are only populated by the server, and will be ignored when sending a request. + + :ivar id: Database identifier. + :vartype id: str + :ivar name: Name of database. + :vartype name: str + :ivar validation_errors: Errors associated with a selected database object. + :vartype validation_errors: list[~azure.mgmt.datamigration.models.ReportableException] + """ + + _validation = { + 'id': {'readonly': True}, + 'name': {'readonly': True}, + 'validation_errors': {'readonly': True}, + } + + _attribute_map = { + 'id': {'key': 'id', 'type': 'str'}, + 'name': {'key': 'name', 'type': 'str'}, + 'validation_errors': {'key': 'validationErrors', 'type': '[ReportableException]'}, + } + + def __init__( + self, + **kwargs + ): + super(ValidateSyncMigrationInputSqlServerTaskOutput, self).__init__(**kwargs) + self.id = None + self.name = None + self.validation_errors = None + + +class ValidationError(msrest.serialization.Model): + """Description about the errors happen while performing migration validation. + + :param text: Error Text. + :type text: str + :param severity: Severity of the error. Possible values include: "Message", "Warning", "Error". + :type severity: str or ~azure.mgmt.datamigration.models.Severity + """ + + _attribute_map = { + 'text': {'key': 'text', 'type': 'str'}, + 'severity': {'key': 'severity', 'type': 'str'}, + } + + def __init__( + self, + **kwargs + ): + super(ValidationError, self).__init__(**kwargs) + self.text = kwargs.get('text', None) + self.severity = kwargs.get('severity', None) + + +class WaitStatistics(msrest.serialization.Model): + """Wait statistics gathered during query batch execution. + + :param wait_type: Type of the Wait. + :type wait_type: str + :param wait_time_ms: Total wait time in millisecond(s). + :type wait_time_ms: float + :param wait_count: Total no. of waits. + :type wait_count: long + """ + + _attribute_map = { + 'wait_type': {'key': 'waitType', 'type': 'str'}, + 'wait_time_ms': {'key': 'waitTimeMs', 'type': 'float'}, + 'wait_count': {'key': 'waitCount', 'type': 'long'}, + } + + def __init__( + self, + **kwargs + ): + super(WaitStatistics, self).__init__(**kwargs) + self.wait_type = kwargs.get('wait_type', None) + self.wait_time_ms = kwargs.get('wait_time_ms', 0) + self.wait_count = kwargs.get('wait_count', None) diff --git a/src/datamigration/azext_datamigration/vendored_sdks/datamigration/models/_models_py3.py b/src/datamigration/azext_datamigration/vendored_sdks/datamigration/models/_models_py3.py new file mode 100644 index 00000000000..18448edb8e1 --- /dev/null +++ b/src/datamigration/azext_datamigration/vendored_sdks/datamigration/models/_models_py3.py @@ -0,0 +1,16012 @@ +# coding=utf-8 +# -------------------------------------------------------------------------- +# Copyright (c) Microsoft Corporation. All rights reserved. +# Licensed under the MIT License. See License.txt in the project root for license information. +# Code generated by Microsoft (R) AutoRest Code Generator. +# Changes may cause incorrect behavior and will be lost if the code is regenerated. +# -------------------------------------------------------------------------- + +import datetime +from typing import Dict, List, Optional, Union + +from azure.core.exceptions import HttpResponseError +import msrest.serialization + +from ._data_migration_management_client_enums import * + + +class ApiError(msrest.serialization.Model): + """Error information. + + Variables are only populated by the server, and will be ignored when sending a request. + + :param error: Error information in OData format. + :type error: ~azure.mgmt.datamigration.models.ODataError + :ivar system_data: Metadata pertaining to creation and last modification of the resource. + :vartype system_data: ~azure.mgmt.datamigration.models.SystemData + """ + + _validation = { + 'system_data': {'readonly': True}, + } + + _attribute_map = { + 'error': {'key': 'error', 'type': 'ODataError'}, + 'system_data': {'key': 'systemData', 'type': 'SystemData'}, + } + + def __init__( + self, + *, + error: Optional["ODataError"] = None, + **kwargs + ): + super(ApiError, self).__init__(**kwargs) + self.error = error + self.system_data = None + + +class AuthenticationKeys(msrest.serialization.Model): + """An authentication key. + + :param auth_key1: The first authentication key. + :type auth_key1: str + :param auth_key2: The second authentication key. + :type auth_key2: str + """ + + _attribute_map = { + 'auth_key1': {'key': 'authKey1', 'type': 'str'}, + 'auth_key2': {'key': 'authKey2', 'type': 'str'}, + } + + def __init__( + self, + *, + auth_key1: Optional[str] = None, + auth_key2: Optional[str] = None, + **kwargs + ): + super(AuthenticationKeys, self).__init__(**kwargs) + self.auth_key1 = auth_key1 + self.auth_key2 = auth_key2 + + +class AvailableServiceSku(msrest.serialization.Model): + """Describes the available service SKU. + + :param resource_type: The resource type, including the provider namespace. + :type resource_type: str + :param sku: SKU name, tier, etc. + :type sku: ~azure.mgmt.datamigration.models.AvailableServiceSkuautogenerated + :param capacity: A description of the scaling capacities of the SKU. + :type capacity: ~azure.mgmt.datamigration.models.AvailableServiceSkuCapacity + """ + + _attribute_map = { + 'resource_type': {'key': 'resourceType', 'type': 'str'}, + 'sku': {'key': 'sku', 'type': 'AvailableServiceSkuautogenerated'}, + 'capacity': {'key': 'capacity', 'type': 'AvailableServiceSkuCapacity'}, + } + + def __init__( + self, + *, + resource_type: Optional[str] = None, + sku: Optional["AvailableServiceSkuautogenerated"] = None, + capacity: Optional["AvailableServiceSkuCapacity"] = None, + **kwargs + ): + super(AvailableServiceSku, self).__init__(**kwargs) + self.resource_type = resource_type + self.sku = sku + self.capacity = capacity + + +class AvailableServiceSkuautogenerated(msrest.serialization.Model): + """SKU name, tier, etc. + + :param name: The name of the SKU. + :type name: str + :param family: SKU family. + :type family: str + :param size: SKU size. + :type size: str + :param tier: The tier of the SKU, such as "Basic", "General Purpose", or "Business Critical". + :type tier: str + """ + + _attribute_map = { + 'name': {'key': 'name', 'type': 'str'}, + 'family': {'key': 'family', 'type': 'str'}, + 'size': {'key': 'size', 'type': 'str'}, + 'tier': {'key': 'tier', 'type': 'str'}, + } + + def __init__( + self, + *, + name: Optional[str] = None, + family: Optional[str] = None, + size: Optional[str] = None, + tier: Optional[str] = None, + **kwargs + ): + super(AvailableServiceSkuautogenerated, self).__init__(**kwargs) + self.name = name + self.family = family + self.size = size + self.tier = tier + + +class AvailableServiceSkuCapacity(msrest.serialization.Model): + """A description of the scaling capacities of the SKU. + + :param minimum: The minimum capacity, usually 0 or 1. + :type minimum: int + :param maximum: The maximum capacity. + :type maximum: int + :param default: The default capacity. + :type default: int + :param scale_type: The scalability approach. Possible values include: "none", "manual", + "automatic". + :type scale_type: str or ~azure.mgmt.datamigration.models.ServiceScalability + """ + + _attribute_map = { + 'minimum': {'key': 'minimum', 'type': 'int'}, + 'maximum': {'key': 'maximum', 'type': 'int'}, + 'default': {'key': 'default', 'type': 'int'}, + 'scale_type': {'key': 'scaleType', 'type': 'str'}, + } + + def __init__( + self, + *, + minimum: Optional[int] = None, + maximum: Optional[int] = None, + default: Optional[int] = None, + scale_type: Optional[Union[str, "ServiceScalability"]] = None, + **kwargs + ): + super(AvailableServiceSkuCapacity, self).__init__(**kwargs) + self.minimum = minimum + self.maximum = maximum + self.default = default + self.scale_type = scale_type + + +class AzureActiveDirectoryApp(msrest.serialization.Model): + """Azure Active Directory Application. + + All required parameters must be populated in order to send to Azure. + + :param application_id: Required. Application ID of the Azure Active Directory Application. + :type application_id: str + :param app_key: Required. Key used to authenticate to the Azure Active Directory Application. + :type app_key: str + :param tenant_id: Required. Tenant id of the customer. + :type tenant_id: str + """ + + _validation = { + 'application_id': {'required': True}, + 'app_key': {'required': True}, + 'tenant_id': {'required': True}, + } + + _attribute_map = { + 'application_id': {'key': 'applicationId', 'type': 'str'}, + 'app_key': {'key': 'appKey', 'type': 'str'}, + 'tenant_id': {'key': 'tenantId', 'type': 'str'}, + } + + def __init__( + self, + *, + application_id: str, + app_key: str, + tenant_id: str, + **kwargs + ): + super(AzureActiveDirectoryApp, self).__init__(**kwargs) + self.application_id = application_id + self.app_key = app_key + self.tenant_id = tenant_id + + +class AzureBlob(msrest.serialization.Model): + """Azure Blob Details. + + :param storage_account_resource_id: Resource Id of the storage account where backups are + stored. + :type storage_account_resource_id: str + :param account_key: Storage Account Key. + :type account_key: str + :param blob_container_name: Blob container name where backups are stored. + :type blob_container_name: str + """ + + _attribute_map = { + 'storage_account_resource_id': {'key': 'storageAccountResourceId', 'type': 'str'}, + 'account_key': {'key': 'accountKey', 'type': 'str'}, + 'blob_container_name': {'key': 'blobContainerName', 'type': 'str'}, + } + + def __init__( + self, + *, + storage_account_resource_id: Optional[str] = None, + account_key: Optional[str] = None, + blob_container_name: Optional[str] = None, + **kwargs + ): + super(AzureBlob, self).__init__(**kwargs) + self.storage_account_resource_id = storage_account_resource_id + self.account_key = account_key + self.blob_container_name = blob_container_name + + +class BackupConfiguration(msrest.serialization.Model): + """Backup Configuration. + + :param source_location: Source location of backups. + :type source_location: ~azure.mgmt.datamigration.models.SourceLocation + :param target_location: Target location for copying backups. + :type target_location: ~azure.mgmt.datamigration.models.TargetLocation + """ + + _attribute_map = { + 'source_location': {'key': 'sourceLocation', 'type': 'SourceLocation'}, + 'target_location': {'key': 'targetLocation', 'type': 'TargetLocation'}, + } + + def __init__( + self, + *, + source_location: Optional["SourceLocation"] = None, + target_location: Optional["TargetLocation"] = None, + **kwargs + ): + super(BackupConfiguration, self).__init__(**kwargs) + self.source_location = source_location + self.target_location = target_location + + +class BackupFileInfo(msrest.serialization.Model): + """Information of the backup file. + + :param file_location: Location of the backup file in shared folder. + :type file_location: str + :param family_sequence_number: Sequence number of the backup file in the backup set. + :type family_sequence_number: int + :param status: Status of the backup file during migration. Possible values include: "Arrived", + "Queued", "Uploading", "Uploaded", "Restoring", "Restored", "Cancelled". + :type status: str or ~azure.mgmt.datamigration.models.BackupFileStatus + """ + + _attribute_map = { + 'file_location': {'key': 'fileLocation', 'type': 'str'}, + 'family_sequence_number': {'key': 'familySequenceNumber', 'type': 'int'}, + 'status': {'key': 'status', 'type': 'str'}, + } + + def __init__( + self, + *, + file_location: Optional[str] = None, + family_sequence_number: Optional[int] = None, + status: Optional[Union[str, "BackupFileStatus"]] = None, + **kwargs + ): + super(BackupFileInfo, self).__init__(**kwargs) + self.file_location = file_location + self.family_sequence_number = family_sequence_number + self.status = status + + +class BackupSetInfo(msrest.serialization.Model): + """Information of backup set. + + :param backup_set_id: Id for the set of backup files. + :type backup_set_id: str + :param first_lsn: First log sequence number of the backup file. + :type first_lsn: str + :param last_lsn: Last log sequence number of the backup file. + :type last_lsn: str + :param last_modified_time: Last modified time of the backup file in share location. + :type last_modified_time: ~datetime.datetime + :param backup_type: Enum of the different backup types. Possible values include: "Database", + "TransactionLog", "File", "DifferentialDatabase", "DifferentialFile", "Partial", + "DifferentialPartial". + :type backup_type: str or ~azure.mgmt.datamigration.models.BackupType + :param list_of_backup_files: List of files in the backup set. + :type list_of_backup_files: list[~azure.mgmt.datamigration.models.BackupFileInfo] + :param database_name: Name of the database to which the backup set belongs. + :type database_name: str + :param backup_start_date: Date and time that the backup operation began. + :type backup_start_date: ~datetime.datetime + :param backup_finished_date: Date and time that the backup operation finished. + :type backup_finished_date: ~datetime.datetime + :param is_backup_restored: Whether the backup set is restored or not. + :type is_backup_restored: bool + """ + + _attribute_map = { + 'backup_set_id': {'key': 'backupSetId', 'type': 'str'}, + 'first_lsn': {'key': 'firstLsn', 'type': 'str'}, + 'last_lsn': {'key': 'lastLsn', 'type': 'str'}, + 'last_modified_time': {'key': 'lastModifiedTime', 'type': 'iso-8601'}, + 'backup_type': {'key': 'backupType', 'type': 'str'}, + 'list_of_backup_files': {'key': 'listOfBackupFiles', 'type': '[BackupFileInfo]'}, + 'database_name': {'key': 'databaseName', 'type': 'str'}, + 'backup_start_date': {'key': 'backupStartDate', 'type': 'iso-8601'}, + 'backup_finished_date': {'key': 'backupFinishedDate', 'type': 'iso-8601'}, + 'is_backup_restored': {'key': 'isBackupRestored', 'type': 'bool'}, + } + + def __init__( + self, + *, + backup_set_id: Optional[str] = None, + first_lsn: Optional[str] = None, + last_lsn: Optional[str] = None, + last_modified_time: Optional[datetime.datetime] = None, + backup_type: Optional[Union[str, "BackupType"]] = None, + list_of_backup_files: Optional[List["BackupFileInfo"]] = None, + database_name: Optional[str] = None, + backup_start_date: Optional[datetime.datetime] = None, + backup_finished_date: Optional[datetime.datetime] = None, + is_backup_restored: Optional[bool] = None, + **kwargs + ): + super(BackupSetInfo, self).__init__(**kwargs) + self.backup_set_id = backup_set_id + self.first_lsn = first_lsn + self.last_lsn = last_lsn + self.last_modified_time = last_modified_time + self.backup_type = backup_type + self.list_of_backup_files = list_of_backup_files + self.database_name = database_name + self.backup_start_date = backup_start_date + self.backup_finished_date = backup_finished_date + self.is_backup_restored = is_backup_restored + + +class BlobShare(msrest.serialization.Model): + """Blob container storage information. + + All required parameters must be populated in order to send to Azure. + + :param sas_uri: Required. SAS URI of Azure Storage Account Container. + :type sas_uri: str + """ + + _validation = { + 'sas_uri': {'required': True}, + } + + _attribute_map = { + 'sas_uri': {'key': 'sasUri', 'type': 'str'}, + } + + def __init__( + self, + *, + sas_uri: str, + **kwargs + ): + super(BlobShare, self).__init__(**kwargs) + self.sas_uri = sas_uri + + +class CheckOciDriverTaskInput(msrest.serialization.Model): + """Input for the service task to check for OCI drivers. + + :param server_version: Version of the source server to check against. Optional. + :type server_version: str + """ + + _attribute_map = { + 'server_version': {'key': 'serverVersion', 'type': 'str'}, + } + + def __init__( + self, + *, + server_version: Optional[str] = None, + **kwargs + ): + super(CheckOciDriverTaskInput, self).__init__(**kwargs) + self.server_version = server_version + + +class CheckOciDriverTaskOutput(msrest.serialization.Model): + """Output for the service task to check for OCI drivers. + + Variables are only populated by the server, and will be ignored when sending a request. + + :param installed_driver: Information about the installed driver if found and valid. + :type installed_driver: ~azure.mgmt.datamigration.models.OracleOciDriverInfo + :ivar validation_errors: Validation errors. + :vartype validation_errors: list[~azure.mgmt.datamigration.models.ReportableException] + """ + + _validation = { + 'validation_errors': {'readonly': True}, + } + + _attribute_map = { + 'installed_driver': {'key': 'installedDriver', 'type': 'OracleOciDriverInfo'}, + 'validation_errors': {'key': 'validationErrors', 'type': '[ReportableException]'}, + } + + def __init__( + self, + *, + installed_driver: Optional["OracleOciDriverInfo"] = None, + **kwargs + ): + super(CheckOciDriverTaskOutput, self).__init__(**kwargs) + self.installed_driver = installed_driver + self.validation_errors = None + + +class ProjectTaskProperties(msrest.serialization.Model): + """Base class for all types of DMS task properties. If task is not supported by current client, this object is returned. + + You probably want to use the sub-classes and not this class directly. Known + sub-classes are: ConnectToMongoDbTaskProperties, ConnectToSourceMySqlTaskProperties, ConnectToSourceOracleSyncTaskProperties, ConnectToSourcePostgreSqlSyncTaskProperties, ConnectToSourceSqlServerTaskProperties, ConnectToSourceSqlServerSyncTaskProperties, ConnectToTargetAzureDbForMySqlTaskProperties, ConnectToTargetAzureDbForPostgreSqlSyncTaskProperties, ConnectToTargetSqlMiTaskProperties, ConnectToTargetSqlMiSyncTaskProperties, ConnectToTargetOracleAzureDbForPostgreSqlSyncTaskProperties, ConnectToTargetSqlDbTaskProperties, ConnectToTargetSqlDbSyncTaskProperties, GetTdeCertificatesSqlTaskProperties, GetUserTablesSqlSyncTaskProperties, GetUserTablesSqlTaskProperties, GetUserTablesMySqlTaskProperties, GetUserTablesOracleTaskProperties, GetUserTablesPostgreSqlTaskProperties, MigrateMongoDbTaskProperties, MigrateMySqlAzureDbForMySqlOfflineTaskProperties, MigrateMySqlAzureDbForMySqlSyncTaskProperties, MigrateOracleAzureDbForPostgreSqlSyncTaskProperties, MigratePostgreSqlAzureDbForPostgreSqlSyncTaskProperties, MigrateSqlServerSqlDbSyncTaskProperties, MigrateSqlServerSqlMiTaskProperties, MigrateSqlServerSqlMiSyncTaskProperties, MigrateSqlServerSqlDbTaskProperties, MigrateSsisTaskProperties, MigrateSchemaSqlServerSqlDbTaskProperties, CheckOciDriverTaskProperties, InstallOciDriverTaskProperties, UploadOciDriverTaskProperties, ValidateMongoDbTaskProperties, ValidateOracleAzureDbForPostgreSqlSyncTaskProperties, ValidateMigrationInputSqlServerSqlMiTaskProperties, ValidateMigrationInputSqlServerSqlMiSyncTaskProperties, ValidateMigrationInputSqlServerSqlDbSyncTaskProperties. + + Variables are only populated by the server, and will be ignored when sending a request. + + All required parameters must be populated in order to send to Azure. + + :param task_type: Required. Task type.Constant filled by server. Possible values include: + "Connect.MongoDb", "ConnectToSource.SqlServer", "ConnectToSource.SqlServer.Sync", + "ConnectToSource.PostgreSql.Sync", "ConnectToSource.MySql", "ConnectToSource.Oracle.Sync", + "ConnectToTarget.SqlDb", "ConnectToTarget.SqlDb.Sync", + "ConnectToTarget.AzureDbForPostgreSql.Sync", + "ConnectToTarget.Oracle.AzureDbForPostgreSql.Sync", "ConnectToTarget.AzureSqlDbMI", + "ConnectToTarget.AzureSqlDbMI.Sync.LRS", "ConnectToTarget.AzureDbForMySql", + "GetUserTables.Sql", "GetUserTables.AzureSqlDb.Sync", "GetUserTablesOracle", + "GetUserTablesPostgreSql", "GetUserTablesMySql", "Migrate.MongoDb", + "Migrate.SqlServer.AzureSqlDbMI", "Migrate.SqlServer.AzureSqlDbMI.Sync.LRS", + "Migrate.SqlServer.SqlDb", "Migrate.SqlServer.AzureSqlDb.Sync", + "Migrate.MySql.AzureDbForMySql.Sync", "Migrate.MySql.AzureDbForMySql", + "Migrate.PostgreSql.AzureDbForPostgreSql.SyncV2", "Migrate.Oracle.AzureDbForPostgreSql.Sync", + "ValidateMigrationInput.SqlServer.SqlDb.Sync", "ValidateMigrationInput.SqlServer.AzureSqlDbMI", + "ValidateMigrationInput.SqlServer.AzureSqlDbMI.Sync.LRS", "Validate.MongoDb", + "Validate.Oracle.AzureDbPostgreSql.Sync", "GetTDECertificates.Sql", "Migrate.Ssis", + "Service.Check.OCI", "Service.Upload.OCI", "Service.Install.OCI", + "MigrateSchemaSqlServerSqlDb". + :type task_type: str or ~azure.mgmt.datamigration.models.TaskType + :ivar errors: Array of errors. This is ignored if submitted. + :vartype errors: list[~azure.mgmt.datamigration.models.ODataError] + :ivar state: The state of the task. This is ignored if submitted. Possible values include: + "Unknown", "Queued", "Running", "Canceled", "Succeeded", "Failed", "FailedInputValidation", + "Faulted". + :vartype state: str or ~azure.mgmt.datamigration.models.TaskState + :ivar commands: Array of command properties. + :vartype commands: list[~azure.mgmt.datamigration.models.CommandProperties] + :param client_data: Key value pairs of client data to attach meta data information to task. + :type client_data: dict[str, str] + """ + + _validation = { + 'task_type': {'required': True}, + 'errors': {'readonly': True}, + 'state': {'readonly': True}, + 'commands': {'readonly': True}, + } + + _attribute_map = { + 'task_type': {'key': 'taskType', 'type': 'str'}, + 'errors': {'key': 'errors', 'type': '[ODataError]'}, + 'state': {'key': 'state', 'type': 'str'}, + 'commands': {'key': 'commands', 'type': '[CommandProperties]'}, + 'client_data': {'key': 'clientData', 'type': '{str}'}, + } + + _subtype_map = { + 'task_type': {'Connect.MongoDb': 'ConnectToMongoDbTaskProperties', 'ConnectToSource.MySql': 'ConnectToSourceMySqlTaskProperties', 'ConnectToSource.Oracle.Sync': 'ConnectToSourceOracleSyncTaskProperties', 'ConnectToSource.PostgreSql.Sync': 'ConnectToSourcePostgreSqlSyncTaskProperties', 'ConnectToSource.SqlServer': 'ConnectToSourceSqlServerTaskProperties', 'ConnectToSource.SqlServer.Sync': 'ConnectToSourceSqlServerSyncTaskProperties', 'ConnectToTarget.AzureDbForMySql': 'ConnectToTargetAzureDbForMySqlTaskProperties', 'ConnectToTarget.AzureDbForPostgreSql.Sync': 'ConnectToTargetAzureDbForPostgreSqlSyncTaskProperties', 'ConnectToTarget.AzureSqlDbMI': 'ConnectToTargetSqlMiTaskProperties', 'ConnectToTarget.AzureSqlDbMI.Sync.LRS': 'ConnectToTargetSqlMiSyncTaskProperties', 'ConnectToTarget.Oracle.AzureDbForPostgreSql.Sync': 'ConnectToTargetOracleAzureDbForPostgreSqlSyncTaskProperties', 'ConnectToTarget.SqlDb': 'ConnectToTargetSqlDbTaskProperties', 'ConnectToTarget.SqlDb.Sync': 'ConnectToTargetSqlDbSyncTaskProperties', 'GetTDECertificates.Sql': 'GetTdeCertificatesSqlTaskProperties', 'GetUserTables.AzureSqlDb.Sync': 'GetUserTablesSqlSyncTaskProperties', 'GetUserTables.Sql': 'GetUserTablesSqlTaskProperties', 'GetUserTablesMySql': 'GetUserTablesMySqlTaskProperties', 'GetUserTablesOracle': 'GetUserTablesOracleTaskProperties', 'GetUserTablesPostgreSql': 'GetUserTablesPostgreSqlTaskProperties', 'Migrate.MongoDb': 'MigrateMongoDbTaskProperties', 'Migrate.MySql.AzureDbForMySql': 'MigrateMySqlAzureDbForMySqlOfflineTaskProperties', 'Migrate.MySql.AzureDbForMySql.Sync': 'MigrateMySqlAzureDbForMySqlSyncTaskProperties', 'Migrate.Oracle.AzureDbForPostgreSql.Sync': 'MigrateOracleAzureDbForPostgreSqlSyncTaskProperties', 'Migrate.PostgreSql.AzureDbForPostgreSql.SyncV2': 'MigratePostgreSqlAzureDbForPostgreSqlSyncTaskProperties', 'Migrate.SqlServer.AzureSqlDb.Sync': 'MigrateSqlServerSqlDbSyncTaskProperties', 'Migrate.SqlServer.AzureSqlDbMI': 'MigrateSqlServerSqlMiTaskProperties', 'Migrate.SqlServer.AzureSqlDbMI.Sync.LRS': 'MigrateSqlServerSqlMiSyncTaskProperties', 'Migrate.SqlServer.SqlDb': 'MigrateSqlServerSqlDbTaskProperties', 'Migrate.Ssis': 'MigrateSsisTaskProperties', 'MigrateSchemaSqlServerSqlDb': 'MigrateSchemaSqlServerSqlDbTaskProperties', 'Service.Check.OCI': 'CheckOciDriverTaskProperties', 'Service.Install.OCI': 'InstallOciDriverTaskProperties', 'Service.Upload.OCI': 'UploadOciDriverTaskProperties', 'Validate.MongoDb': 'ValidateMongoDbTaskProperties', 'Validate.Oracle.AzureDbPostgreSql.Sync': 'ValidateOracleAzureDbForPostgreSqlSyncTaskProperties', 'ValidateMigrationInput.SqlServer.AzureSqlDbMI': 'ValidateMigrationInputSqlServerSqlMiTaskProperties', 'ValidateMigrationInput.SqlServer.AzureSqlDbMI.Sync.LRS': 'ValidateMigrationInputSqlServerSqlMiSyncTaskProperties', 'ValidateMigrationInput.SqlServer.SqlDb.Sync': 'ValidateMigrationInputSqlServerSqlDbSyncTaskProperties'} + } + + def __init__( + self, + *, + client_data: Optional[Dict[str, str]] = None, + **kwargs + ): + super(ProjectTaskProperties, self).__init__(**kwargs) + self.task_type = None # type: Optional[str] + self.errors = None + self.state = None + self.commands = None + self.client_data = client_data + + +class CheckOciDriverTaskProperties(ProjectTaskProperties): + """Properties for the task that checks for OCI drivers. + + Variables are only populated by the server, and will be ignored when sending a request. + + All required parameters must be populated in order to send to Azure. + + :param task_type: Required. Task type.Constant filled by server. Possible values include: + "Connect.MongoDb", "ConnectToSource.SqlServer", "ConnectToSource.SqlServer.Sync", + "ConnectToSource.PostgreSql.Sync", "ConnectToSource.MySql", "ConnectToSource.Oracle.Sync", + "ConnectToTarget.SqlDb", "ConnectToTarget.SqlDb.Sync", + "ConnectToTarget.AzureDbForPostgreSql.Sync", + "ConnectToTarget.Oracle.AzureDbForPostgreSql.Sync", "ConnectToTarget.AzureSqlDbMI", + "ConnectToTarget.AzureSqlDbMI.Sync.LRS", "ConnectToTarget.AzureDbForMySql", + "GetUserTables.Sql", "GetUserTables.AzureSqlDb.Sync", "GetUserTablesOracle", + "GetUserTablesPostgreSql", "GetUserTablesMySql", "Migrate.MongoDb", + "Migrate.SqlServer.AzureSqlDbMI", "Migrate.SqlServer.AzureSqlDbMI.Sync.LRS", + "Migrate.SqlServer.SqlDb", "Migrate.SqlServer.AzureSqlDb.Sync", + "Migrate.MySql.AzureDbForMySql.Sync", "Migrate.MySql.AzureDbForMySql", + "Migrate.PostgreSql.AzureDbForPostgreSql.SyncV2", "Migrate.Oracle.AzureDbForPostgreSql.Sync", + "ValidateMigrationInput.SqlServer.SqlDb.Sync", "ValidateMigrationInput.SqlServer.AzureSqlDbMI", + "ValidateMigrationInput.SqlServer.AzureSqlDbMI.Sync.LRS", "Validate.MongoDb", + "Validate.Oracle.AzureDbPostgreSql.Sync", "GetTDECertificates.Sql", "Migrate.Ssis", + "Service.Check.OCI", "Service.Upload.OCI", "Service.Install.OCI", + "MigrateSchemaSqlServerSqlDb". + :type task_type: str or ~azure.mgmt.datamigration.models.TaskType + :ivar errors: Array of errors. This is ignored if submitted. + :vartype errors: list[~azure.mgmt.datamigration.models.ODataError] + :ivar state: The state of the task. This is ignored if submitted. Possible values include: + "Unknown", "Queued", "Running", "Canceled", "Succeeded", "Failed", "FailedInputValidation", + "Faulted". + :vartype state: str or ~azure.mgmt.datamigration.models.TaskState + :ivar commands: Array of command properties. + :vartype commands: list[~azure.mgmt.datamigration.models.CommandProperties] + :param client_data: Key value pairs of client data to attach meta data information to task. + :type client_data: dict[str, str] + :param input: Input for the service task to check for OCI drivers. + :type input: ~azure.mgmt.datamigration.models.CheckOciDriverTaskInput + :ivar output: Task output. This is ignored if submitted. + :vartype output: list[~azure.mgmt.datamigration.models.CheckOciDriverTaskOutput] + """ + + _validation = { + 'task_type': {'required': True}, + 'errors': {'readonly': True}, + 'state': {'readonly': True}, + 'commands': {'readonly': True}, + 'output': {'readonly': True}, + } + + _attribute_map = { + 'task_type': {'key': 'taskType', 'type': 'str'}, + 'errors': {'key': 'errors', 'type': '[ODataError]'}, + 'state': {'key': 'state', 'type': 'str'}, + 'commands': {'key': 'commands', 'type': '[CommandProperties]'}, + 'client_data': {'key': 'clientData', 'type': '{str}'}, + 'input': {'key': 'input', 'type': 'CheckOciDriverTaskInput'}, + 'output': {'key': 'output', 'type': '[CheckOciDriverTaskOutput]'}, + } + + def __init__( + self, + *, + client_data: Optional[Dict[str, str]] = None, + input: Optional["CheckOciDriverTaskInput"] = None, + **kwargs + ): + super(CheckOciDriverTaskProperties, self).__init__(client_data=client_data, **kwargs) + self.task_type = 'Service.Check.OCI' # type: str + self.input = input + self.output = None + + +class CommandProperties(msrest.serialization.Model): + """Base class for all types of DMS command properties. If command is not supported by current client, this object is returned. + + You probably want to use the sub-classes and not this class directly. Known + sub-classes are: MigrateMiSyncCompleteCommandProperties, MigrateSyncCompleteCommandProperties, MongoDbCancelCommand, MongoDbFinishCommand, MongoDbRestartCommand. + + Variables are only populated by the server, and will be ignored when sending a request. + + All required parameters must be populated in order to send to Azure. + + :param command_type: Required. Command type.Constant filled by server. Possible values + include: "Migrate.Sync.Complete.Database", "Migrate.SqlServer.AzureDbSqlMi.Complete", "cancel", + "finish", "restart". + :type command_type: str or ~azure.mgmt.datamigration.models.CommandType + :ivar errors: Array of errors. This is ignored if submitted. + :vartype errors: list[~azure.mgmt.datamigration.models.ODataError] + :ivar state: The state of the command. This is ignored if submitted. Possible values include: + "Unknown", "Accepted", "Running", "Succeeded", "Failed". + :vartype state: str or ~azure.mgmt.datamigration.models.CommandState + """ + + _validation = { + 'command_type': {'required': True}, + 'errors': {'readonly': True}, + 'state': {'readonly': True}, + } + + _attribute_map = { + 'command_type': {'key': 'commandType', 'type': 'str'}, + 'errors': {'key': 'errors', 'type': '[ODataError]'}, + 'state': {'key': 'state', 'type': 'str'}, + } + + _subtype_map = { + 'command_type': {'Migrate.SqlServer.AzureDbSqlMi.Complete': 'MigrateMiSyncCompleteCommandProperties', 'Migrate.Sync.Complete.Database': 'MigrateSyncCompleteCommandProperties', 'cancel': 'MongoDbCancelCommand', 'finish': 'MongoDbFinishCommand', 'restart': 'MongoDbRestartCommand'} + } + + def __init__( + self, + **kwargs + ): + super(CommandProperties, self).__init__(**kwargs) + self.command_type = None # type: Optional[str] + self.errors = None + self.state = None + + +class ConnectionInfo(msrest.serialization.Model): + """Defines the connection properties of a server. + + You probably want to use the sub-classes and not this class directly. Known + sub-classes are: MiSqlConnectionInfo, MongoDbConnectionInfo, MySqlConnectionInfo, OracleConnectionInfo, PostgreSqlConnectionInfo, SqlConnectionInfo. + + All required parameters must be populated in order to send to Azure. + + :param type: Required. Type of connection info.Constant filled by server. + :type type: str + :param user_name: User name. + :type user_name: str + :param password: Password credential. + :type password: str + """ + + _validation = { + 'type': {'required': True}, + } + + _attribute_map = { + 'type': {'key': 'type', 'type': 'str'}, + 'user_name': {'key': 'userName', 'type': 'str'}, + 'password': {'key': 'password', 'type': 'str'}, + } + + _subtype_map = { + 'type': {'MiSqlConnectionInfo': 'MiSqlConnectionInfo', 'MongoDbConnectionInfo': 'MongoDbConnectionInfo', 'MySqlConnectionInfo': 'MySqlConnectionInfo', 'OracleConnectionInfo': 'OracleConnectionInfo', 'PostgreSqlConnectionInfo': 'PostgreSqlConnectionInfo', 'SqlConnectionInfo': 'SqlConnectionInfo'} + } + + def __init__( + self, + *, + user_name: Optional[str] = None, + password: Optional[str] = None, + **kwargs + ): + super(ConnectionInfo, self).__init__(**kwargs) + self.type = None # type: Optional[str] + self.user_name = user_name + self.password = password + + +class ConnectToMongoDbTaskProperties(ProjectTaskProperties): + """Properties for the task that validates the connection to and provides information about a MongoDB server. + + Variables are only populated by the server, and will be ignored when sending a request. + + All required parameters must be populated in order to send to Azure. + + :param task_type: Required. Task type.Constant filled by server. Possible values include: + "Connect.MongoDb", "ConnectToSource.SqlServer", "ConnectToSource.SqlServer.Sync", + "ConnectToSource.PostgreSql.Sync", "ConnectToSource.MySql", "ConnectToSource.Oracle.Sync", + "ConnectToTarget.SqlDb", "ConnectToTarget.SqlDb.Sync", + "ConnectToTarget.AzureDbForPostgreSql.Sync", + "ConnectToTarget.Oracle.AzureDbForPostgreSql.Sync", "ConnectToTarget.AzureSqlDbMI", + "ConnectToTarget.AzureSqlDbMI.Sync.LRS", "ConnectToTarget.AzureDbForMySql", + "GetUserTables.Sql", "GetUserTables.AzureSqlDb.Sync", "GetUserTablesOracle", + "GetUserTablesPostgreSql", "GetUserTablesMySql", "Migrate.MongoDb", + "Migrate.SqlServer.AzureSqlDbMI", "Migrate.SqlServer.AzureSqlDbMI.Sync.LRS", + "Migrate.SqlServer.SqlDb", "Migrate.SqlServer.AzureSqlDb.Sync", + "Migrate.MySql.AzureDbForMySql.Sync", "Migrate.MySql.AzureDbForMySql", + "Migrate.PostgreSql.AzureDbForPostgreSql.SyncV2", "Migrate.Oracle.AzureDbForPostgreSql.Sync", + "ValidateMigrationInput.SqlServer.SqlDb.Sync", "ValidateMigrationInput.SqlServer.AzureSqlDbMI", + "ValidateMigrationInput.SqlServer.AzureSqlDbMI.Sync.LRS", "Validate.MongoDb", + "Validate.Oracle.AzureDbPostgreSql.Sync", "GetTDECertificates.Sql", "Migrate.Ssis", + "Service.Check.OCI", "Service.Upload.OCI", "Service.Install.OCI", + "MigrateSchemaSqlServerSqlDb". + :type task_type: str or ~azure.mgmt.datamigration.models.TaskType + :ivar errors: Array of errors. This is ignored if submitted. + :vartype errors: list[~azure.mgmt.datamigration.models.ODataError] + :ivar state: The state of the task. This is ignored if submitted. Possible values include: + "Unknown", "Queued", "Running", "Canceled", "Succeeded", "Failed", "FailedInputValidation", + "Faulted". + :vartype state: str or ~azure.mgmt.datamigration.models.TaskState + :ivar commands: Array of command properties. + :vartype commands: list[~azure.mgmt.datamigration.models.CommandProperties] + :param client_data: Key value pairs of client data to attach meta data information to task. + :type client_data: dict[str, str] + :param input: Describes a connection to a MongoDB data source. + :type input: ~azure.mgmt.datamigration.models.MongoDbConnectionInfo + :ivar output: An array containing a single MongoDbClusterInfo object. + :vartype output: list[~azure.mgmt.datamigration.models.MongoDbClusterInfo] + """ + + _validation = { + 'task_type': {'required': True}, + 'errors': {'readonly': True}, + 'state': {'readonly': True}, + 'commands': {'readonly': True}, + 'output': {'readonly': True}, + } + + _attribute_map = { + 'task_type': {'key': 'taskType', 'type': 'str'}, + 'errors': {'key': 'errors', 'type': '[ODataError]'}, + 'state': {'key': 'state', 'type': 'str'}, + 'commands': {'key': 'commands', 'type': '[CommandProperties]'}, + 'client_data': {'key': 'clientData', 'type': '{str}'}, + 'input': {'key': 'input', 'type': 'MongoDbConnectionInfo'}, + 'output': {'key': 'output', 'type': '[MongoDbClusterInfo]'}, + } + + def __init__( + self, + *, + client_data: Optional[Dict[str, str]] = None, + input: Optional["MongoDbConnectionInfo"] = None, + **kwargs + ): + super(ConnectToMongoDbTaskProperties, self).__init__(client_data=client_data, **kwargs) + self.task_type = 'Connect.MongoDb' # type: str + self.input = input + self.output = None + + +class ConnectToSourceMySqlTaskInput(msrest.serialization.Model): + """Input for the task that validates MySQL database connection. + + All required parameters must be populated in order to send to Azure. + + :param source_connection_info: Required. Information for connecting to MySQL source. + :type source_connection_info: ~azure.mgmt.datamigration.models.MySqlConnectionInfo + :param target_platform: Target Platform for the migration. Possible values include: + "SqlServer", "AzureDbForMySQL". + :type target_platform: str or ~azure.mgmt.datamigration.models.MySqlTargetPlatformType + :param check_permissions_group: Permission group for validations. Possible values include: + "Default", "MigrationFromSqlServerToAzureDB", "MigrationFromSqlServerToAzureMI", + "MigrationFromMySQLToAzureDBForMySQL". + :type check_permissions_group: str or + ~azure.mgmt.datamigration.models.ServerLevelPermissionsGroup + :param is_offline_migration: Flag for whether or not the migration is offline. + :type is_offline_migration: bool + """ + + _validation = { + 'source_connection_info': {'required': True}, + } + + _attribute_map = { + 'source_connection_info': {'key': 'sourceConnectionInfo', 'type': 'MySqlConnectionInfo'}, + 'target_platform': {'key': 'targetPlatform', 'type': 'str'}, + 'check_permissions_group': {'key': 'checkPermissionsGroup', 'type': 'str'}, + 'is_offline_migration': {'key': 'isOfflineMigration', 'type': 'bool'}, + } + + def __init__( + self, + *, + source_connection_info: "MySqlConnectionInfo", + target_platform: Optional[Union[str, "MySqlTargetPlatformType"]] = None, + check_permissions_group: Optional[Union[str, "ServerLevelPermissionsGroup"]] = None, + is_offline_migration: Optional[bool] = False, + **kwargs + ): + super(ConnectToSourceMySqlTaskInput, self).__init__(**kwargs) + self.source_connection_info = source_connection_info + self.target_platform = target_platform + self.check_permissions_group = check_permissions_group + self.is_offline_migration = is_offline_migration + + +class ConnectToSourceMySqlTaskProperties(ProjectTaskProperties): + """Properties for the task that validates MySQL database connection. + + Variables are only populated by the server, and will be ignored when sending a request. + + All required parameters must be populated in order to send to Azure. + + :param task_type: Required. Task type.Constant filled by server. Possible values include: + "Connect.MongoDb", "ConnectToSource.SqlServer", "ConnectToSource.SqlServer.Sync", + "ConnectToSource.PostgreSql.Sync", "ConnectToSource.MySql", "ConnectToSource.Oracle.Sync", + "ConnectToTarget.SqlDb", "ConnectToTarget.SqlDb.Sync", + "ConnectToTarget.AzureDbForPostgreSql.Sync", + "ConnectToTarget.Oracle.AzureDbForPostgreSql.Sync", "ConnectToTarget.AzureSqlDbMI", + "ConnectToTarget.AzureSqlDbMI.Sync.LRS", "ConnectToTarget.AzureDbForMySql", + "GetUserTables.Sql", "GetUserTables.AzureSqlDb.Sync", "GetUserTablesOracle", + "GetUserTablesPostgreSql", "GetUserTablesMySql", "Migrate.MongoDb", + "Migrate.SqlServer.AzureSqlDbMI", "Migrate.SqlServer.AzureSqlDbMI.Sync.LRS", + "Migrate.SqlServer.SqlDb", "Migrate.SqlServer.AzureSqlDb.Sync", + "Migrate.MySql.AzureDbForMySql.Sync", "Migrate.MySql.AzureDbForMySql", + "Migrate.PostgreSql.AzureDbForPostgreSql.SyncV2", "Migrate.Oracle.AzureDbForPostgreSql.Sync", + "ValidateMigrationInput.SqlServer.SqlDb.Sync", "ValidateMigrationInput.SqlServer.AzureSqlDbMI", + "ValidateMigrationInput.SqlServer.AzureSqlDbMI.Sync.LRS", "Validate.MongoDb", + "Validate.Oracle.AzureDbPostgreSql.Sync", "GetTDECertificates.Sql", "Migrate.Ssis", + "Service.Check.OCI", "Service.Upload.OCI", "Service.Install.OCI", + "MigrateSchemaSqlServerSqlDb". + :type task_type: str or ~azure.mgmt.datamigration.models.TaskType + :ivar errors: Array of errors. This is ignored if submitted. + :vartype errors: list[~azure.mgmt.datamigration.models.ODataError] + :ivar state: The state of the task. This is ignored if submitted. Possible values include: + "Unknown", "Queued", "Running", "Canceled", "Succeeded", "Failed", "FailedInputValidation", + "Faulted". + :vartype state: str or ~azure.mgmt.datamigration.models.TaskState + :ivar commands: Array of command properties. + :vartype commands: list[~azure.mgmt.datamigration.models.CommandProperties] + :param client_data: Key value pairs of client data to attach meta data information to task. + :type client_data: dict[str, str] + :param input: Task input. + :type input: ~azure.mgmt.datamigration.models.ConnectToSourceMySqlTaskInput + :ivar output: Task output. This is ignored if submitted. + :vartype output: list[~azure.mgmt.datamigration.models.ConnectToSourceNonSqlTaskOutput] + """ + + _validation = { + 'task_type': {'required': True}, + 'errors': {'readonly': True}, + 'state': {'readonly': True}, + 'commands': {'readonly': True}, + 'output': {'readonly': True}, + } + + _attribute_map = { + 'task_type': {'key': 'taskType', 'type': 'str'}, + 'errors': {'key': 'errors', 'type': '[ODataError]'}, + 'state': {'key': 'state', 'type': 'str'}, + 'commands': {'key': 'commands', 'type': '[CommandProperties]'}, + 'client_data': {'key': 'clientData', 'type': '{str}'}, + 'input': {'key': 'input', 'type': 'ConnectToSourceMySqlTaskInput'}, + 'output': {'key': 'output', 'type': '[ConnectToSourceNonSqlTaskOutput]'}, + } + + def __init__( + self, + *, + client_data: Optional[Dict[str, str]] = None, + input: Optional["ConnectToSourceMySqlTaskInput"] = None, + **kwargs + ): + super(ConnectToSourceMySqlTaskProperties, self).__init__(client_data=client_data, **kwargs) + self.task_type = 'ConnectToSource.MySql' # type: str + self.input = input + self.output = None + + +class ConnectToSourceNonSqlTaskOutput(msrest.serialization.Model): + """Output for connect to MySQL type source. + + Variables are only populated by the server, and will be ignored when sending a request. + + :ivar id: Result identifier. + :vartype id: str + :ivar source_server_brand_version: Server brand version. + :vartype source_server_brand_version: str + :ivar server_properties: Server properties. + :vartype server_properties: ~azure.mgmt.datamigration.models.ServerProperties + :ivar databases: List of databases on the server. + :vartype databases: list[str] + :ivar validation_errors: Validation errors associated with the task. + :vartype validation_errors: list[~azure.mgmt.datamigration.models.ReportableException] + """ + + _validation = { + 'id': {'readonly': True}, + 'source_server_brand_version': {'readonly': True}, + 'server_properties': {'readonly': True}, + 'databases': {'readonly': True}, + 'validation_errors': {'readonly': True}, + } + + _attribute_map = { + 'id': {'key': 'id', 'type': 'str'}, + 'source_server_brand_version': {'key': 'sourceServerBrandVersion', 'type': 'str'}, + 'server_properties': {'key': 'serverProperties', 'type': 'ServerProperties'}, + 'databases': {'key': 'databases', 'type': '[str]'}, + 'validation_errors': {'key': 'validationErrors', 'type': '[ReportableException]'}, + } + + def __init__( + self, + **kwargs + ): + super(ConnectToSourceNonSqlTaskOutput, self).__init__(**kwargs) + self.id = None + self.source_server_brand_version = None + self.server_properties = None + self.databases = None + self.validation_errors = None + + +class ConnectToSourceOracleSyncTaskInput(msrest.serialization.Model): + """Input for the task that validates Oracle database connection. + + All required parameters must be populated in order to send to Azure. + + :param source_connection_info: Required. Information for connecting to Oracle source. + :type source_connection_info: ~azure.mgmt.datamigration.models.OracleConnectionInfo + """ + + _validation = { + 'source_connection_info': {'required': True}, + } + + _attribute_map = { + 'source_connection_info': {'key': 'sourceConnectionInfo', 'type': 'OracleConnectionInfo'}, + } + + def __init__( + self, + *, + source_connection_info: "OracleConnectionInfo", + **kwargs + ): + super(ConnectToSourceOracleSyncTaskInput, self).__init__(**kwargs) + self.source_connection_info = source_connection_info + + +class ConnectToSourceOracleSyncTaskOutput(msrest.serialization.Model): + """Output for the task that validates Oracle database connection. + + Variables are only populated by the server, and will be ignored when sending a request. + + :ivar source_server_version: Version of the source server. + :vartype source_server_version: str + :ivar databases: List of schemas on source server. + :vartype databases: list[str] + :ivar source_server_brand_version: Source server brand version. + :vartype source_server_brand_version: str + :ivar validation_errors: Validation errors associated with the task. + :vartype validation_errors: list[~azure.mgmt.datamigration.models.ReportableException] + """ + + _validation = { + 'source_server_version': {'readonly': True}, + 'databases': {'readonly': True}, + 'source_server_brand_version': {'readonly': True}, + 'validation_errors': {'readonly': True}, + } + + _attribute_map = { + 'source_server_version': {'key': 'sourceServerVersion', 'type': 'str'}, + 'databases': {'key': 'databases', 'type': '[str]'}, + 'source_server_brand_version': {'key': 'sourceServerBrandVersion', 'type': 'str'}, + 'validation_errors': {'key': 'validationErrors', 'type': '[ReportableException]'}, + } + + def __init__( + self, + **kwargs + ): + super(ConnectToSourceOracleSyncTaskOutput, self).__init__(**kwargs) + self.source_server_version = None + self.databases = None + self.source_server_brand_version = None + self.validation_errors = None + + +class ConnectToSourceOracleSyncTaskProperties(ProjectTaskProperties): + """Properties for the task that validates Oracle database connection. + + Variables are only populated by the server, and will be ignored when sending a request. + + All required parameters must be populated in order to send to Azure. + + :param task_type: Required. Task type.Constant filled by server. Possible values include: + "Connect.MongoDb", "ConnectToSource.SqlServer", "ConnectToSource.SqlServer.Sync", + "ConnectToSource.PostgreSql.Sync", "ConnectToSource.MySql", "ConnectToSource.Oracle.Sync", + "ConnectToTarget.SqlDb", "ConnectToTarget.SqlDb.Sync", + "ConnectToTarget.AzureDbForPostgreSql.Sync", + "ConnectToTarget.Oracle.AzureDbForPostgreSql.Sync", "ConnectToTarget.AzureSqlDbMI", + "ConnectToTarget.AzureSqlDbMI.Sync.LRS", "ConnectToTarget.AzureDbForMySql", + "GetUserTables.Sql", "GetUserTables.AzureSqlDb.Sync", "GetUserTablesOracle", + "GetUserTablesPostgreSql", "GetUserTablesMySql", "Migrate.MongoDb", + "Migrate.SqlServer.AzureSqlDbMI", "Migrate.SqlServer.AzureSqlDbMI.Sync.LRS", + "Migrate.SqlServer.SqlDb", "Migrate.SqlServer.AzureSqlDb.Sync", + "Migrate.MySql.AzureDbForMySql.Sync", "Migrate.MySql.AzureDbForMySql", + "Migrate.PostgreSql.AzureDbForPostgreSql.SyncV2", "Migrate.Oracle.AzureDbForPostgreSql.Sync", + "ValidateMigrationInput.SqlServer.SqlDb.Sync", "ValidateMigrationInput.SqlServer.AzureSqlDbMI", + "ValidateMigrationInput.SqlServer.AzureSqlDbMI.Sync.LRS", "Validate.MongoDb", + "Validate.Oracle.AzureDbPostgreSql.Sync", "GetTDECertificates.Sql", "Migrate.Ssis", + "Service.Check.OCI", "Service.Upload.OCI", "Service.Install.OCI", + "MigrateSchemaSqlServerSqlDb". + :type task_type: str or ~azure.mgmt.datamigration.models.TaskType + :ivar errors: Array of errors. This is ignored if submitted. + :vartype errors: list[~azure.mgmt.datamigration.models.ODataError] + :ivar state: The state of the task. This is ignored if submitted. Possible values include: + "Unknown", "Queued", "Running", "Canceled", "Succeeded", "Failed", "FailedInputValidation", + "Faulted". + :vartype state: str or ~azure.mgmt.datamigration.models.TaskState + :ivar commands: Array of command properties. + :vartype commands: list[~azure.mgmt.datamigration.models.CommandProperties] + :param client_data: Key value pairs of client data to attach meta data information to task. + :type client_data: dict[str, str] + :param input: Task input. + :type input: ~azure.mgmt.datamigration.models.ConnectToSourceOracleSyncTaskInput + :ivar output: Task output. This is ignored if submitted. + :vartype output: list[~azure.mgmt.datamigration.models.ConnectToSourceOracleSyncTaskOutput] + """ + + _validation = { + 'task_type': {'required': True}, + 'errors': {'readonly': True}, + 'state': {'readonly': True}, + 'commands': {'readonly': True}, + 'output': {'readonly': True}, + } + + _attribute_map = { + 'task_type': {'key': 'taskType', 'type': 'str'}, + 'errors': {'key': 'errors', 'type': '[ODataError]'}, + 'state': {'key': 'state', 'type': 'str'}, + 'commands': {'key': 'commands', 'type': '[CommandProperties]'}, + 'client_data': {'key': 'clientData', 'type': '{str}'}, + 'input': {'key': 'input', 'type': 'ConnectToSourceOracleSyncTaskInput'}, + 'output': {'key': 'output', 'type': '[ConnectToSourceOracleSyncTaskOutput]'}, + } + + def __init__( + self, + *, + client_data: Optional[Dict[str, str]] = None, + input: Optional["ConnectToSourceOracleSyncTaskInput"] = None, + **kwargs + ): + super(ConnectToSourceOracleSyncTaskProperties, self).__init__(client_data=client_data, **kwargs) + self.task_type = 'ConnectToSource.Oracle.Sync' # type: str + self.input = input + self.output = None + + +class ConnectToSourcePostgreSqlSyncTaskInput(msrest.serialization.Model): + """Input for the task that validates connection to PostgreSQL and source server requirements. + + All required parameters must be populated in order to send to Azure. + + :param source_connection_info: Required. Connection information for source PostgreSQL server. + :type source_connection_info: ~azure.mgmt.datamigration.models.PostgreSqlConnectionInfo + """ + + _validation = { + 'source_connection_info': {'required': True}, + } + + _attribute_map = { + 'source_connection_info': {'key': 'sourceConnectionInfo', 'type': 'PostgreSqlConnectionInfo'}, + } + + def __init__( + self, + *, + source_connection_info: "PostgreSqlConnectionInfo", + **kwargs + ): + super(ConnectToSourcePostgreSqlSyncTaskInput, self).__init__(**kwargs) + self.source_connection_info = source_connection_info + + +class ConnectToSourcePostgreSqlSyncTaskOutput(msrest.serialization.Model): + """Output for the task that validates connection to PostgreSQL and source server requirements. + + Variables are only populated by the server, and will be ignored when sending a request. + + :ivar id: Result identifier. + :vartype id: str + :ivar source_server_version: Version of the source server. + :vartype source_server_version: str + :ivar databases: List of databases on source server. + :vartype databases: list[str] + :ivar source_server_brand_version: Source server brand version. + :vartype source_server_brand_version: str + :ivar validation_errors: Validation errors associated with the task. + :vartype validation_errors: list[~azure.mgmt.datamigration.models.ReportableException] + """ + + _validation = { + 'id': {'readonly': True}, + 'source_server_version': {'readonly': True}, + 'databases': {'readonly': True}, + 'source_server_brand_version': {'readonly': True}, + 'validation_errors': {'readonly': True}, + } + + _attribute_map = { + 'id': {'key': 'id', 'type': 'str'}, + 'source_server_version': {'key': 'sourceServerVersion', 'type': 'str'}, + 'databases': {'key': 'databases', 'type': '[str]'}, + 'source_server_brand_version': {'key': 'sourceServerBrandVersion', 'type': 'str'}, + 'validation_errors': {'key': 'validationErrors', 'type': '[ReportableException]'}, + } + + def __init__( + self, + **kwargs + ): + super(ConnectToSourcePostgreSqlSyncTaskOutput, self).__init__(**kwargs) + self.id = None + self.source_server_version = None + self.databases = None + self.source_server_brand_version = None + self.validation_errors = None + + +class ConnectToSourcePostgreSqlSyncTaskProperties(ProjectTaskProperties): + """Properties for the task that validates connection to PostgreSQL server and source server requirements for online migration. + + Variables are only populated by the server, and will be ignored when sending a request. + + All required parameters must be populated in order to send to Azure. + + :param task_type: Required. Task type.Constant filled by server. Possible values include: + "Connect.MongoDb", "ConnectToSource.SqlServer", "ConnectToSource.SqlServer.Sync", + "ConnectToSource.PostgreSql.Sync", "ConnectToSource.MySql", "ConnectToSource.Oracle.Sync", + "ConnectToTarget.SqlDb", "ConnectToTarget.SqlDb.Sync", + "ConnectToTarget.AzureDbForPostgreSql.Sync", + "ConnectToTarget.Oracle.AzureDbForPostgreSql.Sync", "ConnectToTarget.AzureSqlDbMI", + "ConnectToTarget.AzureSqlDbMI.Sync.LRS", "ConnectToTarget.AzureDbForMySql", + "GetUserTables.Sql", "GetUserTables.AzureSqlDb.Sync", "GetUserTablesOracle", + "GetUserTablesPostgreSql", "GetUserTablesMySql", "Migrate.MongoDb", + "Migrate.SqlServer.AzureSqlDbMI", "Migrate.SqlServer.AzureSqlDbMI.Sync.LRS", + "Migrate.SqlServer.SqlDb", "Migrate.SqlServer.AzureSqlDb.Sync", + "Migrate.MySql.AzureDbForMySql.Sync", "Migrate.MySql.AzureDbForMySql", + "Migrate.PostgreSql.AzureDbForPostgreSql.SyncV2", "Migrate.Oracle.AzureDbForPostgreSql.Sync", + "ValidateMigrationInput.SqlServer.SqlDb.Sync", "ValidateMigrationInput.SqlServer.AzureSqlDbMI", + "ValidateMigrationInput.SqlServer.AzureSqlDbMI.Sync.LRS", "Validate.MongoDb", + "Validate.Oracle.AzureDbPostgreSql.Sync", "GetTDECertificates.Sql", "Migrate.Ssis", + "Service.Check.OCI", "Service.Upload.OCI", "Service.Install.OCI", + "MigrateSchemaSqlServerSqlDb". + :type task_type: str or ~azure.mgmt.datamigration.models.TaskType + :ivar errors: Array of errors. This is ignored if submitted. + :vartype errors: list[~azure.mgmt.datamigration.models.ODataError] + :ivar state: The state of the task. This is ignored if submitted. Possible values include: + "Unknown", "Queued", "Running", "Canceled", "Succeeded", "Failed", "FailedInputValidation", + "Faulted". + :vartype state: str or ~azure.mgmt.datamigration.models.TaskState + :ivar commands: Array of command properties. + :vartype commands: list[~azure.mgmt.datamigration.models.CommandProperties] + :param client_data: Key value pairs of client data to attach meta data information to task. + :type client_data: dict[str, str] + :param input: Task input. + :type input: ~azure.mgmt.datamigration.models.ConnectToSourcePostgreSqlSyncTaskInput + :ivar output: Task output. This is ignored if submitted. + :vartype output: list[~azure.mgmt.datamigration.models.ConnectToSourcePostgreSqlSyncTaskOutput] + """ + + _validation = { + 'task_type': {'required': True}, + 'errors': {'readonly': True}, + 'state': {'readonly': True}, + 'commands': {'readonly': True}, + 'output': {'readonly': True}, + } + + _attribute_map = { + 'task_type': {'key': 'taskType', 'type': 'str'}, + 'errors': {'key': 'errors', 'type': '[ODataError]'}, + 'state': {'key': 'state', 'type': 'str'}, + 'commands': {'key': 'commands', 'type': '[CommandProperties]'}, + 'client_data': {'key': 'clientData', 'type': '{str}'}, + 'input': {'key': 'input', 'type': 'ConnectToSourcePostgreSqlSyncTaskInput'}, + 'output': {'key': 'output', 'type': '[ConnectToSourcePostgreSqlSyncTaskOutput]'}, + } + + def __init__( + self, + *, + client_data: Optional[Dict[str, str]] = None, + input: Optional["ConnectToSourcePostgreSqlSyncTaskInput"] = None, + **kwargs + ): + super(ConnectToSourcePostgreSqlSyncTaskProperties, self).__init__(client_data=client_data, **kwargs) + self.task_type = 'ConnectToSource.PostgreSql.Sync' # type: str + self.input = input + self.output = None + + +class ConnectToSourceSqlServerSyncTaskProperties(ProjectTaskProperties): + """Properties for the task that validates connection to SQL Server and source server requirements for online migration. + + Variables are only populated by the server, and will be ignored when sending a request. + + All required parameters must be populated in order to send to Azure. + + :param task_type: Required. Task type.Constant filled by server. Possible values include: + "Connect.MongoDb", "ConnectToSource.SqlServer", "ConnectToSource.SqlServer.Sync", + "ConnectToSource.PostgreSql.Sync", "ConnectToSource.MySql", "ConnectToSource.Oracle.Sync", + "ConnectToTarget.SqlDb", "ConnectToTarget.SqlDb.Sync", + "ConnectToTarget.AzureDbForPostgreSql.Sync", + "ConnectToTarget.Oracle.AzureDbForPostgreSql.Sync", "ConnectToTarget.AzureSqlDbMI", + "ConnectToTarget.AzureSqlDbMI.Sync.LRS", "ConnectToTarget.AzureDbForMySql", + "GetUserTables.Sql", "GetUserTables.AzureSqlDb.Sync", "GetUserTablesOracle", + "GetUserTablesPostgreSql", "GetUserTablesMySql", "Migrate.MongoDb", + "Migrate.SqlServer.AzureSqlDbMI", "Migrate.SqlServer.AzureSqlDbMI.Sync.LRS", + "Migrate.SqlServer.SqlDb", "Migrate.SqlServer.AzureSqlDb.Sync", + "Migrate.MySql.AzureDbForMySql.Sync", "Migrate.MySql.AzureDbForMySql", + "Migrate.PostgreSql.AzureDbForPostgreSql.SyncV2", "Migrate.Oracle.AzureDbForPostgreSql.Sync", + "ValidateMigrationInput.SqlServer.SqlDb.Sync", "ValidateMigrationInput.SqlServer.AzureSqlDbMI", + "ValidateMigrationInput.SqlServer.AzureSqlDbMI.Sync.LRS", "Validate.MongoDb", + "Validate.Oracle.AzureDbPostgreSql.Sync", "GetTDECertificates.Sql", "Migrate.Ssis", + "Service.Check.OCI", "Service.Upload.OCI", "Service.Install.OCI", + "MigrateSchemaSqlServerSqlDb". + :type task_type: str or ~azure.mgmt.datamigration.models.TaskType + :ivar errors: Array of errors. This is ignored if submitted. + :vartype errors: list[~azure.mgmt.datamigration.models.ODataError] + :ivar state: The state of the task. This is ignored if submitted. Possible values include: + "Unknown", "Queued", "Running", "Canceled", "Succeeded", "Failed", "FailedInputValidation", + "Faulted". + :vartype state: str or ~azure.mgmt.datamigration.models.TaskState + :ivar commands: Array of command properties. + :vartype commands: list[~azure.mgmt.datamigration.models.CommandProperties] + :param client_data: Key value pairs of client data to attach meta data information to task. + :type client_data: dict[str, str] + :param input: Task input. + :type input: ~azure.mgmt.datamigration.models.ConnectToSourceSqlServerTaskInput + :ivar output: Task output. This is ignored if submitted. + :vartype output: list[~azure.mgmt.datamigration.models.ConnectToSourceSqlServerTaskOutput] + """ + + _validation = { + 'task_type': {'required': True}, + 'errors': {'readonly': True}, + 'state': {'readonly': True}, + 'commands': {'readonly': True}, + 'output': {'readonly': True}, + } + + _attribute_map = { + 'task_type': {'key': 'taskType', 'type': 'str'}, + 'errors': {'key': 'errors', 'type': '[ODataError]'}, + 'state': {'key': 'state', 'type': 'str'}, + 'commands': {'key': 'commands', 'type': '[CommandProperties]'}, + 'client_data': {'key': 'clientData', 'type': '{str}'}, + 'input': {'key': 'input', 'type': 'ConnectToSourceSqlServerTaskInput'}, + 'output': {'key': 'output', 'type': '[ConnectToSourceSqlServerTaskOutput]'}, + } + + def __init__( + self, + *, + client_data: Optional[Dict[str, str]] = None, + input: Optional["ConnectToSourceSqlServerTaskInput"] = None, + **kwargs + ): + super(ConnectToSourceSqlServerSyncTaskProperties, self).__init__(client_data=client_data, **kwargs) + self.task_type = 'ConnectToSource.SqlServer.Sync' # type: str + self.input = input + self.output = None + + +class ConnectToSourceSqlServerTaskInput(msrest.serialization.Model): + """Input for the task that validates connection to SQL Server and also validates source server requirements. + + All required parameters must be populated in order to send to Azure. + + :param source_connection_info: Required. Connection information for Source SQL Server. + :type source_connection_info: ~azure.mgmt.datamigration.models.SqlConnectionInfo + :param check_permissions_group: Permission group for validations. Possible values include: + "Default", "MigrationFromSqlServerToAzureDB", "MigrationFromSqlServerToAzureMI", + "MigrationFromMySQLToAzureDBForMySQL". + :type check_permissions_group: str or + ~azure.mgmt.datamigration.models.ServerLevelPermissionsGroup + :param collect_databases: Flag for whether to collect databases from source server. + :type collect_databases: bool + :param collect_logins: Flag for whether to collect logins from source server. + :type collect_logins: bool + :param collect_agent_jobs: Flag for whether to collect agent jobs from source server. + :type collect_agent_jobs: bool + :param collect_tde_certificate_info: Flag for whether to collect TDE Certificate names from + source server. + :type collect_tde_certificate_info: bool + :param validate_ssis_catalog_only: Flag for whether to validate SSIS catalog is reachable on + the source server. + :type validate_ssis_catalog_only: bool + """ + + _validation = { + 'source_connection_info': {'required': True}, + } + + _attribute_map = { + 'source_connection_info': {'key': 'sourceConnectionInfo', 'type': 'SqlConnectionInfo'}, + 'check_permissions_group': {'key': 'checkPermissionsGroup', 'type': 'str'}, + 'collect_databases': {'key': 'collectDatabases', 'type': 'bool'}, + 'collect_logins': {'key': 'collectLogins', 'type': 'bool'}, + 'collect_agent_jobs': {'key': 'collectAgentJobs', 'type': 'bool'}, + 'collect_tde_certificate_info': {'key': 'collectTdeCertificateInfo', 'type': 'bool'}, + 'validate_ssis_catalog_only': {'key': 'validateSsisCatalogOnly', 'type': 'bool'}, + } + + def __init__( + self, + *, + source_connection_info: "SqlConnectionInfo", + check_permissions_group: Optional[Union[str, "ServerLevelPermissionsGroup"]] = None, + collect_databases: Optional[bool] = True, + collect_logins: Optional[bool] = False, + collect_agent_jobs: Optional[bool] = False, + collect_tde_certificate_info: Optional[bool] = False, + validate_ssis_catalog_only: Optional[bool] = False, + **kwargs + ): + super(ConnectToSourceSqlServerTaskInput, self).__init__(**kwargs) + self.source_connection_info = source_connection_info + self.check_permissions_group = check_permissions_group + self.collect_databases = collect_databases + self.collect_logins = collect_logins + self.collect_agent_jobs = collect_agent_jobs + self.collect_tde_certificate_info = collect_tde_certificate_info + self.validate_ssis_catalog_only = validate_ssis_catalog_only + + +class ConnectToSourceSqlServerTaskOutput(msrest.serialization.Model): + """Output for the task that validates connection to SQL Server and also validates source server requirements. + + You probably want to use the sub-classes and not this class directly. Known + sub-classes are: ConnectToSourceSqlServerTaskOutputAgentJobLevel, ConnectToSourceSqlServerTaskOutputDatabaseLevel, ConnectToSourceSqlServerTaskOutputLoginLevel, ConnectToSourceSqlServerTaskOutputTaskLevel. + + Variables are only populated by the server, and will be ignored when sending a request. + + All required parameters must be populated in order to send to Azure. + + :ivar id: Result identifier. + :vartype id: str + :param result_type: Required. Type of result - database level or task level.Constant filled by + server. + :type result_type: str + """ + + _validation = { + 'id': {'readonly': True}, + 'result_type': {'required': True}, + } + + _attribute_map = { + 'id': {'key': 'id', 'type': 'str'}, + 'result_type': {'key': 'resultType', 'type': 'str'}, + } + + _subtype_map = { + 'result_type': {'AgentJobLevelOutput': 'ConnectToSourceSqlServerTaskOutputAgentJobLevel', 'DatabaseLevelOutput': 'ConnectToSourceSqlServerTaskOutputDatabaseLevel', 'LoginLevelOutput': 'ConnectToSourceSqlServerTaskOutputLoginLevel', 'TaskLevelOutput': 'ConnectToSourceSqlServerTaskOutputTaskLevel'} + } + + def __init__( + self, + **kwargs + ): + super(ConnectToSourceSqlServerTaskOutput, self).__init__(**kwargs) + self.id = None + self.result_type = None # type: Optional[str] + + +class ConnectToSourceSqlServerTaskOutputAgentJobLevel(ConnectToSourceSqlServerTaskOutput): + """Agent Job level output for the task that validates connection to SQL Server and also validates source server requirements. + + Variables are only populated by the server, and will be ignored when sending a request. + + All required parameters must be populated in order to send to Azure. + + :ivar id: Result identifier. + :vartype id: str + :param result_type: Required. Type of result - database level or task level.Constant filled by + server. + :type result_type: str + :ivar name: Agent Job name. + :vartype name: str + :ivar job_category: The type of Agent Job. + :vartype job_category: str + :ivar is_enabled: The state of the original Agent Job. + :vartype is_enabled: bool + :ivar job_owner: The owner of the Agent Job. + :vartype job_owner: str + :ivar last_executed_on: UTC Date and time when the Agent Job was last executed. + :vartype last_executed_on: ~datetime.datetime + :ivar validation_errors: Validation errors. + :vartype validation_errors: list[~azure.mgmt.datamigration.models.ReportableException] + :ivar migration_eligibility: Information about eligibility of agent job for migration. + :vartype migration_eligibility: ~azure.mgmt.datamigration.models.MigrationEligibilityInfo + """ + + _validation = { + 'id': {'readonly': True}, + 'result_type': {'required': True}, + 'name': {'readonly': True}, + 'job_category': {'readonly': True}, + 'is_enabled': {'readonly': True}, + 'job_owner': {'readonly': True}, + 'last_executed_on': {'readonly': True}, + 'validation_errors': {'readonly': True}, + 'migration_eligibility': {'readonly': True}, + } + + _attribute_map = { + 'id': {'key': 'id', 'type': 'str'}, + 'result_type': {'key': 'resultType', 'type': 'str'}, + 'name': {'key': 'name', 'type': 'str'}, + 'job_category': {'key': 'jobCategory', 'type': 'str'}, + 'is_enabled': {'key': 'isEnabled', 'type': 'bool'}, + 'job_owner': {'key': 'jobOwner', 'type': 'str'}, + 'last_executed_on': {'key': 'lastExecutedOn', 'type': 'iso-8601'}, + 'validation_errors': {'key': 'validationErrors', 'type': '[ReportableException]'}, + 'migration_eligibility': {'key': 'migrationEligibility', 'type': 'MigrationEligibilityInfo'}, + } + + def __init__( + self, + **kwargs + ): + super(ConnectToSourceSqlServerTaskOutputAgentJobLevel, self).__init__(**kwargs) + self.result_type = 'AgentJobLevelOutput' # type: str + self.name = None + self.job_category = None + self.is_enabled = None + self.job_owner = None + self.last_executed_on = None + self.validation_errors = None + self.migration_eligibility = None + + +class ConnectToSourceSqlServerTaskOutputDatabaseLevel(ConnectToSourceSqlServerTaskOutput): + """Database level output for the task that validates connection to SQL Server and also validates source server requirements. + + Variables are only populated by the server, and will be ignored when sending a request. + + All required parameters must be populated in order to send to Azure. + + :ivar id: Result identifier. + :vartype id: str + :param result_type: Required. Type of result - database level or task level.Constant filled by + server. + :type result_type: str + :ivar name: Database name. + :vartype name: str + :ivar size_mb: Size of the file in megabytes. + :vartype size_mb: float + :ivar database_files: The list of database files. + :vartype database_files: list[~azure.mgmt.datamigration.models.DatabaseFileInfo] + :ivar compatibility_level: SQL Server compatibility level of database. Possible values include: + "CompatLevel80", "CompatLevel90", "CompatLevel100", "CompatLevel110", "CompatLevel120", + "CompatLevel130", "CompatLevel140". + :vartype compatibility_level: str or ~azure.mgmt.datamigration.models.DatabaseCompatLevel + :ivar database_state: State of the database. Possible values include: "Online", "Restoring", + "Recovering", "RecoveryPending", "Suspect", "Emergency", "Offline", "Copying", + "OfflineSecondary". + :vartype database_state: str or ~azure.mgmt.datamigration.models.DatabaseState + """ + + _validation = { + 'id': {'readonly': True}, + 'result_type': {'required': True}, + 'name': {'readonly': True}, + 'size_mb': {'readonly': True}, + 'database_files': {'readonly': True}, + 'compatibility_level': {'readonly': True}, + 'database_state': {'readonly': True}, + } + + _attribute_map = { + 'id': {'key': 'id', 'type': 'str'}, + 'result_type': {'key': 'resultType', 'type': 'str'}, + 'name': {'key': 'name', 'type': 'str'}, + 'size_mb': {'key': 'sizeMB', 'type': 'float'}, + 'database_files': {'key': 'databaseFiles', 'type': '[DatabaseFileInfo]'}, + 'compatibility_level': {'key': 'compatibilityLevel', 'type': 'str'}, + 'database_state': {'key': 'databaseState', 'type': 'str'}, + } + + def __init__( + self, + **kwargs + ): + super(ConnectToSourceSqlServerTaskOutputDatabaseLevel, self).__init__(**kwargs) + self.result_type = 'DatabaseLevelOutput' # type: str + self.name = None + self.size_mb = None + self.database_files = None + self.compatibility_level = None + self.database_state = None + + +class ConnectToSourceSqlServerTaskOutputLoginLevel(ConnectToSourceSqlServerTaskOutput): + """Login level output for the task that validates connection to SQL Server and also validates source server requirements. + + Variables are only populated by the server, and will be ignored when sending a request. + + All required parameters must be populated in order to send to Azure. + + :ivar id: Result identifier. + :vartype id: str + :param result_type: Required. Type of result - database level or task level.Constant filled by + server. + :type result_type: str + :ivar name: Login name. + :vartype name: str + :ivar login_type: The type of login. Possible values include: "WindowsUser", "WindowsGroup", + "SqlLogin", "Certificate", "AsymmetricKey", "ExternalUser", "ExternalGroup". + :vartype login_type: str or ~azure.mgmt.datamigration.models.LoginType + :ivar default_database: The default database for the login. + :vartype default_database: str + :ivar is_enabled: The state of the login. + :vartype is_enabled: bool + :ivar migration_eligibility: Information about eligibility of login for migration. + :vartype migration_eligibility: ~azure.mgmt.datamigration.models.MigrationEligibilityInfo + """ + + _validation = { + 'id': {'readonly': True}, + 'result_type': {'required': True}, + 'name': {'readonly': True}, + 'login_type': {'readonly': True}, + 'default_database': {'readonly': True}, + 'is_enabled': {'readonly': True}, + 'migration_eligibility': {'readonly': True}, + } + + _attribute_map = { + 'id': {'key': 'id', 'type': 'str'}, + 'result_type': {'key': 'resultType', 'type': 'str'}, + 'name': {'key': 'name', 'type': 'str'}, + 'login_type': {'key': 'loginType', 'type': 'str'}, + 'default_database': {'key': 'defaultDatabase', 'type': 'str'}, + 'is_enabled': {'key': 'isEnabled', 'type': 'bool'}, + 'migration_eligibility': {'key': 'migrationEligibility', 'type': 'MigrationEligibilityInfo'}, + } + + def __init__( + self, + **kwargs + ): + super(ConnectToSourceSqlServerTaskOutputLoginLevel, self).__init__(**kwargs) + self.result_type = 'LoginLevelOutput' # type: str + self.name = None + self.login_type = None + self.default_database = None + self.is_enabled = None + self.migration_eligibility = None + + +class ConnectToSourceSqlServerTaskOutputTaskLevel(ConnectToSourceSqlServerTaskOutput): + """Task level output for the task that validates connection to SQL Server and also validates source server requirements. + + Variables are only populated by the server, and will be ignored when sending a request. + + All required parameters must be populated in order to send to Azure. + + :ivar id: Result identifier. + :vartype id: str + :param result_type: Required. Type of result - database level or task level.Constant filled by + server. + :type result_type: str + :ivar databases: Source databases as a map from database name to database id. + :vartype databases: str + :ivar logins: Source logins as a map from login name to login id. + :vartype logins: str + :ivar agent_jobs: Source agent jobs as a map from agent job name to id. + :vartype agent_jobs: str + :ivar database_tde_certificate_mapping: Mapping from database name to TDE certificate name, if + applicable. + :vartype database_tde_certificate_mapping: str + :ivar source_server_version: Source server version. + :vartype source_server_version: str + :ivar source_server_brand_version: Source server brand version. + :vartype source_server_brand_version: str + :ivar validation_errors: Validation errors. + :vartype validation_errors: list[~azure.mgmt.datamigration.models.ReportableException] + """ + + _validation = { + 'id': {'readonly': True}, + 'result_type': {'required': True}, + 'databases': {'readonly': True}, + 'logins': {'readonly': True}, + 'agent_jobs': {'readonly': True}, + 'database_tde_certificate_mapping': {'readonly': True}, + 'source_server_version': {'readonly': True}, + 'source_server_brand_version': {'readonly': True}, + 'validation_errors': {'readonly': True}, + } + + _attribute_map = { + 'id': {'key': 'id', 'type': 'str'}, + 'result_type': {'key': 'resultType', 'type': 'str'}, + 'databases': {'key': 'databases', 'type': 'str'}, + 'logins': {'key': 'logins', 'type': 'str'}, + 'agent_jobs': {'key': 'agentJobs', 'type': 'str'}, + 'database_tde_certificate_mapping': {'key': 'databaseTdeCertificateMapping', 'type': 'str'}, + 'source_server_version': {'key': 'sourceServerVersion', 'type': 'str'}, + 'source_server_brand_version': {'key': 'sourceServerBrandVersion', 'type': 'str'}, + 'validation_errors': {'key': 'validationErrors', 'type': '[ReportableException]'}, + } + + def __init__( + self, + **kwargs + ): + super(ConnectToSourceSqlServerTaskOutputTaskLevel, self).__init__(**kwargs) + self.result_type = 'TaskLevelOutput' # type: str + self.databases = None + self.logins = None + self.agent_jobs = None + self.database_tde_certificate_mapping = None + self.source_server_version = None + self.source_server_brand_version = None + self.validation_errors = None + + +class ConnectToSourceSqlServerTaskProperties(ProjectTaskProperties): + """Properties for the task that validates connection to SQL Server and also validates source server requirements. + + Variables are only populated by the server, and will be ignored when sending a request. + + All required parameters must be populated in order to send to Azure. + + :param task_type: Required. Task type.Constant filled by server. Possible values include: + "Connect.MongoDb", "ConnectToSource.SqlServer", "ConnectToSource.SqlServer.Sync", + "ConnectToSource.PostgreSql.Sync", "ConnectToSource.MySql", "ConnectToSource.Oracle.Sync", + "ConnectToTarget.SqlDb", "ConnectToTarget.SqlDb.Sync", + "ConnectToTarget.AzureDbForPostgreSql.Sync", + "ConnectToTarget.Oracle.AzureDbForPostgreSql.Sync", "ConnectToTarget.AzureSqlDbMI", + "ConnectToTarget.AzureSqlDbMI.Sync.LRS", "ConnectToTarget.AzureDbForMySql", + "GetUserTables.Sql", "GetUserTables.AzureSqlDb.Sync", "GetUserTablesOracle", + "GetUserTablesPostgreSql", "GetUserTablesMySql", "Migrate.MongoDb", + "Migrate.SqlServer.AzureSqlDbMI", "Migrate.SqlServer.AzureSqlDbMI.Sync.LRS", + "Migrate.SqlServer.SqlDb", "Migrate.SqlServer.AzureSqlDb.Sync", + "Migrate.MySql.AzureDbForMySql.Sync", "Migrate.MySql.AzureDbForMySql", + "Migrate.PostgreSql.AzureDbForPostgreSql.SyncV2", "Migrate.Oracle.AzureDbForPostgreSql.Sync", + "ValidateMigrationInput.SqlServer.SqlDb.Sync", "ValidateMigrationInput.SqlServer.AzureSqlDbMI", + "ValidateMigrationInput.SqlServer.AzureSqlDbMI.Sync.LRS", "Validate.MongoDb", + "Validate.Oracle.AzureDbPostgreSql.Sync", "GetTDECertificates.Sql", "Migrate.Ssis", + "Service.Check.OCI", "Service.Upload.OCI", "Service.Install.OCI", + "MigrateSchemaSqlServerSqlDb". + :type task_type: str or ~azure.mgmt.datamigration.models.TaskType + :ivar errors: Array of errors. This is ignored if submitted. + :vartype errors: list[~azure.mgmt.datamigration.models.ODataError] + :ivar state: The state of the task. This is ignored if submitted. Possible values include: + "Unknown", "Queued", "Running", "Canceled", "Succeeded", "Failed", "FailedInputValidation", + "Faulted". + :vartype state: str or ~azure.mgmt.datamigration.models.TaskState + :ivar commands: Array of command properties. + :vartype commands: list[~azure.mgmt.datamigration.models.CommandProperties] + :param client_data: Key value pairs of client data to attach meta data information to task. + :type client_data: dict[str, str] + :param input: Task input. + :type input: ~azure.mgmt.datamigration.models.ConnectToSourceSqlServerTaskInput + :ivar output: Task output. This is ignored if submitted. + :vartype output: list[~azure.mgmt.datamigration.models.ConnectToSourceSqlServerTaskOutput] + """ + + _validation = { + 'task_type': {'required': True}, + 'errors': {'readonly': True}, + 'state': {'readonly': True}, + 'commands': {'readonly': True}, + 'output': {'readonly': True}, + } + + _attribute_map = { + 'task_type': {'key': 'taskType', 'type': 'str'}, + 'errors': {'key': 'errors', 'type': '[ODataError]'}, + 'state': {'key': 'state', 'type': 'str'}, + 'commands': {'key': 'commands', 'type': '[CommandProperties]'}, + 'client_data': {'key': 'clientData', 'type': '{str}'}, + 'input': {'key': 'input', 'type': 'ConnectToSourceSqlServerTaskInput'}, + 'output': {'key': 'output', 'type': '[ConnectToSourceSqlServerTaskOutput]'}, + } + + def __init__( + self, + *, + client_data: Optional[Dict[str, str]] = None, + input: Optional["ConnectToSourceSqlServerTaskInput"] = None, + **kwargs + ): + super(ConnectToSourceSqlServerTaskProperties, self).__init__(client_data=client_data, **kwargs) + self.task_type = 'ConnectToSource.SqlServer' # type: str + self.input = input + self.output = None + + +class ConnectToTargetAzureDbForMySqlTaskInput(msrest.serialization.Model): + """Input for the task that validates connection to Azure Database for MySQL and target server requirements. + + All required parameters must be populated in order to send to Azure. + + :param source_connection_info: Required. Connection information for source MySQL server. + :type source_connection_info: ~azure.mgmt.datamigration.models.MySqlConnectionInfo + :param target_connection_info: Required. Connection information for target Azure Database for + MySQL server. + :type target_connection_info: ~azure.mgmt.datamigration.models.MySqlConnectionInfo + :param is_offline_migration: Flag for whether or not the migration is offline. + :type is_offline_migration: bool + """ + + _validation = { + 'source_connection_info': {'required': True}, + 'target_connection_info': {'required': True}, + } + + _attribute_map = { + 'source_connection_info': {'key': 'sourceConnectionInfo', 'type': 'MySqlConnectionInfo'}, + 'target_connection_info': {'key': 'targetConnectionInfo', 'type': 'MySqlConnectionInfo'}, + 'is_offline_migration': {'key': 'isOfflineMigration', 'type': 'bool'}, + } + + def __init__( + self, + *, + source_connection_info: "MySqlConnectionInfo", + target_connection_info: "MySqlConnectionInfo", + is_offline_migration: Optional[bool] = False, + **kwargs + ): + super(ConnectToTargetAzureDbForMySqlTaskInput, self).__init__(**kwargs) + self.source_connection_info = source_connection_info + self.target_connection_info = target_connection_info + self.is_offline_migration = is_offline_migration + + +class ConnectToTargetAzureDbForMySqlTaskOutput(msrest.serialization.Model): + """Output for the task that validates connection to Azure Database for MySQL and target server requirements. + + Variables are only populated by the server, and will be ignored when sending a request. + + :ivar id: Result identifier. + :vartype id: str + :ivar server_version: Version of the target server. + :vartype server_version: str + :ivar databases: List of databases on target server. + :vartype databases: list[str] + :ivar target_server_brand_version: Target server brand version. + :vartype target_server_brand_version: str + :ivar validation_errors: Validation errors associated with the task. + :vartype validation_errors: list[~azure.mgmt.datamigration.models.ReportableException] + """ + + _validation = { + 'id': {'readonly': True}, + 'server_version': {'readonly': True}, + 'databases': {'readonly': True}, + 'target_server_brand_version': {'readonly': True}, + 'validation_errors': {'readonly': True}, + } + + _attribute_map = { + 'id': {'key': 'id', 'type': 'str'}, + 'server_version': {'key': 'serverVersion', 'type': 'str'}, + 'databases': {'key': 'databases', 'type': '[str]'}, + 'target_server_brand_version': {'key': 'targetServerBrandVersion', 'type': 'str'}, + 'validation_errors': {'key': 'validationErrors', 'type': '[ReportableException]'}, + } + + def __init__( + self, + **kwargs + ): + super(ConnectToTargetAzureDbForMySqlTaskOutput, self).__init__(**kwargs) + self.id = None + self.server_version = None + self.databases = None + self.target_server_brand_version = None + self.validation_errors = None + + +class ConnectToTargetAzureDbForMySqlTaskProperties(ProjectTaskProperties): + """Properties for the task that validates connection to Azure Database for MySQL and target server requirements. + + Variables are only populated by the server, and will be ignored when sending a request. + + All required parameters must be populated in order to send to Azure. + + :param task_type: Required. Task type.Constant filled by server. Possible values include: + "Connect.MongoDb", "ConnectToSource.SqlServer", "ConnectToSource.SqlServer.Sync", + "ConnectToSource.PostgreSql.Sync", "ConnectToSource.MySql", "ConnectToSource.Oracle.Sync", + "ConnectToTarget.SqlDb", "ConnectToTarget.SqlDb.Sync", + "ConnectToTarget.AzureDbForPostgreSql.Sync", + "ConnectToTarget.Oracle.AzureDbForPostgreSql.Sync", "ConnectToTarget.AzureSqlDbMI", + "ConnectToTarget.AzureSqlDbMI.Sync.LRS", "ConnectToTarget.AzureDbForMySql", + "GetUserTables.Sql", "GetUserTables.AzureSqlDb.Sync", "GetUserTablesOracle", + "GetUserTablesPostgreSql", "GetUserTablesMySql", "Migrate.MongoDb", + "Migrate.SqlServer.AzureSqlDbMI", "Migrate.SqlServer.AzureSqlDbMI.Sync.LRS", + "Migrate.SqlServer.SqlDb", "Migrate.SqlServer.AzureSqlDb.Sync", + "Migrate.MySql.AzureDbForMySql.Sync", "Migrate.MySql.AzureDbForMySql", + "Migrate.PostgreSql.AzureDbForPostgreSql.SyncV2", "Migrate.Oracle.AzureDbForPostgreSql.Sync", + "ValidateMigrationInput.SqlServer.SqlDb.Sync", "ValidateMigrationInput.SqlServer.AzureSqlDbMI", + "ValidateMigrationInput.SqlServer.AzureSqlDbMI.Sync.LRS", "Validate.MongoDb", + "Validate.Oracle.AzureDbPostgreSql.Sync", "GetTDECertificates.Sql", "Migrate.Ssis", + "Service.Check.OCI", "Service.Upload.OCI", "Service.Install.OCI", + "MigrateSchemaSqlServerSqlDb". + :type task_type: str or ~azure.mgmt.datamigration.models.TaskType + :ivar errors: Array of errors. This is ignored if submitted. + :vartype errors: list[~azure.mgmt.datamigration.models.ODataError] + :ivar state: The state of the task. This is ignored if submitted. Possible values include: + "Unknown", "Queued", "Running", "Canceled", "Succeeded", "Failed", "FailedInputValidation", + "Faulted". + :vartype state: str or ~azure.mgmt.datamigration.models.TaskState + :ivar commands: Array of command properties. + :vartype commands: list[~azure.mgmt.datamigration.models.CommandProperties] + :param client_data: Key value pairs of client data to attach meta data information to task. + :type client_data: dict[str, str] + :param input: Task input. + :type input: ~azure.mgmt.datamigration.models.ConnectToTargetAzureDbForMySqlTaskInput + :ivar output: Task output. This is ignored if submitted. + :vartype output: + list[~azure.mgmt.datamigration.models.ConnectToTargetAzureDbForMySqlTaskOutput] + """ + + _validation = { + 'task_type': {'required': True}, + 'errors': {'readonly': True}, + 'state': {'readonly': True}, + 'commands': {'readonly': True}, + 'output': {'readonly': True}, + } + + _attribute_map = { + 'task_type': {'key': 'taskType', 'type': 'str'}, + 'errors': {'key': 'errors', 'type': '[ODataError]'}, + 'state': {'key': 'state', 'type': 'str'}, + 'commands': {'key': 'commands', 'type': '[CommandProperties]'}, + 'client_data': {'key': 'clientData', 'type': '{str}'}, + 'input': {'key': 'input', 'type': 'ConnectToTargetAzureDbForMySqlTaskInput'}, + 'output': {'key': 'output', 'type': '[ConnectToTargetAzureDbForMySqlTaskOutput]'}, + } + + def __init__( + self, + *, + client_data: Optional[Dict[str, str]] = None, + input: Optional["ConnectToTargetAzureDbForMySqlTaskInput"] = None, + **kwargs + ): + super(ConnectToTargetAzureDbForMySqlTaskProperties, self).__init__(client_data=client_data, **kwargs) + self.task_type = 'ConnectToTarget.AzureDbForMySql' # type: str + self.input = input + self.output = None + + +class ConnectToTargetAzureDbForPostgreSqlSyncTaskInput(msrest.serialization.Model): + """Input for the task that validates connection to Azure Database for PostgreSQL and target server requirements. + + All required parameters must be populated in order to send to Azure. + + :param source_connection_info: Required. Connection information for source PostgreSQL server. + :type source_connection_info: ~azure.mgmt.datamigration.models.PostgreSqlConnectionInfo + :param target_connection_info: Required. Connection information for target Azure Database for + PostgreSQL server. + :type target_connection_info: ~azure.mgmt.datamigration.models.PostgreSqlConnectionInfo + """ + + _validation = { + 'source_connection_info': {'required': True}, + 'target_connection_info': {'required': True}, + } + + _attribute_map = { + 'source_connection_info': {'key': 'sourceConnectionInfo', 'type': 'PostgreSqlConnectionInfo'}, + 'target_connection_info': {'key': 'targetConnectionInfo', 'type': 'PostgreSqlConnectionInfo'}, + } + + def __init__( + self, + *, + source_connection_info: "PostgreSqlConnectionInfo", + target_connection_info: "PostgreSqlConnectionInfo", + **kwargs + ): + super(ConnectToTargetAzureDbForPostgreSqlSyncTaskInput, self).__init__(**kwargs) + self.source_connection_info = source_connection_info + self.target_connection_info = target_connection_info + + +class ConnectToTargetAzureDbForPostgreSqlSyncTaskOutput(msrest.serialization.Model): + """Output for the task that validates connection to Azure Database for PostgreSQL and target server requirements. + + Variables are only populated by the server, and will be ignored when sending a request. + + :ivar id: Result identifier. + :vartype id: str + :ivar target_server_version: Version of the target server. + :vartype target_server_version: str + :ivar databases: List of databases on target server. + :vartype databases: list[str] + :ivar target_server_brand_version: Target server brand version. + :vartype target_server_brand_version: str + :ivar validation_errors: Validation errors associated with the task. + :vartype validation_errors: list[~azure.mgmt.datamigration.models.ReportableException] + """ + + _validation = { + 'id': {'readonly': True}, + 'target_server_version': {'readonly': True}, + 'databases': {'readonly': True}, + 'target_server_brand_version': {'readonly': True}, + 'validation_errors': {'readonly': True}, + } + + _attribute_map = { + 'id': {'key': 'id', 'type': 'str'}, + 'target_server_version': {'key': 'targetServerVersion', 'type': 'str'}, + 'databases': {'key': 'databases', 'type': '[str]'}, + 'target_server_brand_version': {'key': 'targetServerBrandVersion', 'type': 'str'}, + 'validation_errors': {'key': 'validationErrors', 'type': '[ReportableException]'}, + } + + def __init__( + self, + **kwargs + ): + super(ConnectToTargetAzureDbForPostgreSqlSyncTaskOutput, self).__init__(**kwargs) + self.id = None + self.target_server_version = None + self.databases = None + self.target_server_brand_version = None + self.validation_errors = None + + +class ConnectToTargetAzureDbForPostgreSqlSyncTaskProperties(ProjectTaskProperties): + """Properties for the task that validates connection to Azure Database For PostgreSQL server and target server requirements for online migration. + + Variables are only populated by the server, and will be ignored when sending a request. + + All required parameters must be populated in order to send to Azure. + + :param task_type: Required. Task type.Constant filled by server. Possible values include: + "Connect.MongoDb", "ConnectToSource.SqlServer", "ConnectToSource.SqlServer.Sync", + "ConnectToSource.PostgreSql.Sync", "ConnectToSource.MySql", "ConnectToSource.Oracle.Sync", + "ConnectToTarget.SqlDb", "ConnectToTarget.SqlDb.Sync", + "ConnectToTarget.AzureDbForPostgreSql.Sync", + "ConnectToTarget.Oracle.AzureDbForPostgreSql.Sync", "ConnectToTarget.AzureSqlDbMI", + "ConnectToTarget.AzureSqlDbMI.Sync.LRS", "ConnectToTarget.AzureDbForMySql", + "GetUserTables.Sql", "GetUserTables.AzureSqlDb.Sync", "GetUserTablesOracle", + "GetUserTablesPostgreSql", "GetUserTablesMySql", "Migrate.MongoDb", + "Migrate.SqlServer.AzureSqlDbMI", "Migrate.SqlServer.AzureSqlDbMI.Sync.LRS", + "Migrate.SqlServer.SqlDb", "Migrate.SqlServer.AzureSqlDb.Sync", + "Migrate.MySql.AzureDbForMySql.Sync", "Migrate.MySql.AzureDbForMySql", + "Migrate.PostgreSql.AzureDbForPostgreSql.SyncV2", "Migrate.Oracle.AzureDbForPostgreSql.Sync", + "ValidateMigrationInput.SqlServer.SqlDb.Sync", "ValidateMigrationInput.SqlServer.AzureSqlDbMI", + "ValidateMigrationInput.SqlServer.AzureSqlDbMI.Sync.LRS", "Validate.MongoDb", + "Validate.Oracle.AzureDbPostgreSql.Sync", "GetTDECertificates.Sql", "Migrate.Ssis", + "Service.Check.OCI", "Service.Upload.OCI", "Service.Install.OCI", + "MigrateSchemaSqlServerSqlDb". + :type task_type: str or ~azure.mgmt.datamigration.models.TaskType + :ivar errors: Array of errors. This is ignored if submitted. + :vartype errors: list[~azure.mgmt.datamigration.models.ODataError] + :ivar state: The state of the task. This is ignored if submitted. Possible values include: + "Unknown", "Queued", "Running", "Canceled", "Succeeded", "Failed", "FailedInputValidation", + "Faulted". + :vartype state: str or ~azure.mgmt.datamigration.models.TaskState + :ivar commands: Array of command properties. + :vartype commands: list[~azure.mgmt.datamigration.models.CommandProperties] + :param client_data: Key value pairs of client data to attach meta data information to task. + :type client_data: dict[str, str] + :param input: Task input. + :type input: ~azure.mgmt.datamigration.models.ConnectToTargetAzureDbForPostgreSqlSyncTaskInput + :ivar output: Task output. This is ignored if submitted. + :vartype output: + list[~azure.mgmt.datamigration.models.ConnectToTargetAzureDbForPostgreSqlSyncTaskOutput] + """ + + _validation = { + 'task_type': {'required': True}, + 'errors': {'readonly': True}, + 'state': {'readonly': True}, + 'commands': {'readonly': True}, + 'output': {'readonly': True}, + } + + _attribute_map = { + 'task_type': {'key': 'taskType', 'type': 'str'}, + 'errors': {'key': 'errors', 'type': '[ODataError]'}, + 'state': {'key': 'state', 'type': 'str'}, + 'commands': {'key': 'commands', 'type': '[CommandProperties]'}, + 'client_data': {'key': 'clientData', 'type': '{str}'}, + 'input': {'key': 'input', 'type': 'ConnectToTargetAzureDbForPostgreSqlSyncTaskInput'}, + 'output': {'key': 'output', 'type': '[ConnectToTargetAzureDbForPostgreSqlSyncTaskOutput]'}, + } + + def __init__( + self, + *, + client_data: Optional[Dict[str, str]] = None, + input: Optional["ConnectToTargetAzureDbForPostgreSqlSyncTaskInput"] = None, + **kwargs + ): + super(ConnectToTargetAzureDbForPostgreSqlSyncTaskProperties, self).__init__(client_data=client_data, **kwargs) + self.task_type = 'ConnectToTarget.AzureDbForPostgreSql.Sync' # type: str + self.input = input + self.output = None + + +class ConnectToTargetOracleAzureDbForPostgreSqlSyncTaskInput(msrest.serialization.Model): + """Input for the task that validates connection to Azure Database for PostgreSQL and target server requirements for Oracle source. + + All required parameters must be populated in order to send to Azure. + + :param target_connection_info: Required. Connection information for target Azure Database for + PostgreSQL server. + :type target_connection_info: ~azure.mgmt.datamigration.models.PostgreSqlConnectionInfo + """ + + _validation = { + 'target_connection_info': {'required': True}, + } + + _attribute_map = { + 'target_connection_info': {'key': 'targetConnectionInfo', 'type': 'PostgreSqlConnectionInfo'}, + } + + def __init__( + self, + *, + target_connection_info: "PostgreSqlConnectionInfo", + **kwargs + ): + super(ConnectToTargetOracleAzureDbForPostgreSqlSyncTaskInput, self).__init__(**kwargs) + self.target_connection_info = target_connection_info + + +class ConnectToTargetOracleAzureDbForPostgreSqlSyncTaskOutput(msrest.serialization.Model): + """Output for the task that validates connection to Azure Database for PostgreSQL and target server requirements for Oracle source. + + Variables are only populated by the server, and will be ignored when sending a request. + + :ivar target_server_version: Version of the target server. + :vartype target_server_version: str + :ivar databases: List of databases on target server. + :vartype databases: list[str] + :ivar target_server_brand_version: Target server brand version. + :vartype target_server_brand_version: str + :ivar validation_errors: Validation errors associated with the task. + :vartype validation_errors: list[~azure.mgmt.datamigration.models.ReportableException] + :param database_schema_map: Mapping of schemas per database. + :type database_schema_map: + list[~azure.mgmt.datamigration.models.ConnectToTargetOracleAzureDbForPostgreSqlSyncTaskOutputDatabaseSchemaMapItem] + """ + + _validation = { + 'target_server_version': {'readonly': True}, + 'databases': {'readonly': True}, + 'target_server_brand_version': {'readonly': True}, + 'validation_errors': {'readonly': True}, + } + + _attribute_map = { + 'target_server_version': {'key': 'targetServerVersion', 'type': 'str'}, + 'databases': {'key': 'databases', 'type': '[str]'}, + 'target_server_brand_version': {'key': 'targetServerBrandVersion', 'type': 'str'}, + 'validation_errors': {'key': 'validationErrors', 'type': '[ReportableException]'}, + 'database_schema_map': {'key': 'databaseSchemaMap', 'type': '[ConnectToTargetOracleAzureDbForPostgreSqlSyncTaskOutputDatabaseSchemaMapItem]'}, + } + + def __init__( + self, + *, + database_schema_map: Optional[List["ConnectToTargetOracleAzureDbForPostgreSqlSyncTaskOutputDatabaseSchemaMapItem"]] = None, + **kwargs + ): + super(ConnectToTargetOracleAzureDbForPostgreSqlSyncTaskOutput, self).__init__(**kwargs) + self.target_server_version = None + self.databases = None + self.target_server_brand_version = None + self.validation_errors = None + self.database_schema_map = database_schema_map + + +class ConnectToTargetOracleAzureDbForPostgreSqlSyncTaskOutputDatabaseSchemaMapItem(msrest.serialization.Model): + """ConnectToTargetOracleAzureDbForPostgreSqlSyncTaskOutputDatabaseSchemaMapItem. + + :param database: + :type database: str + :param schemas: + :type schemas: list[str] + """ + + _attribute_map = { + 'database': {'key': 'database', 'type': 'str'}, + 'schemas': {'key': 'schemas', 'type': '[str]'}, + } + + def __init__( + self, + *, + database: Optional[str] = None, + schemas: Optional[List[str]] = None, + **kwargs + ): + super(ConnectToTargetOracleAzureDbForPostgreSqlSyncTaskOutputDatabaseSchemaMapItem, self).__init__(**kwargs) + self.database = database + self.schemas = schemas + + +class ConnectToTargetOracleAzureDbForPostgreSqlSyncTaskProperties(ProjectTaskProperties): + """Properties for the task that validates connection to Azure Database For PostgreSQL server and target server requirements for online migration for Oracle source. + + Variables are only populated by the server, and will be ignored when sending a request. + + All required parameters must be populated in order to send to Azure. + + :param task_type: Required. Task type.Constant filled by server. Possible values include: + "Connect.MongoDb", "ConnectToSource.SqlServer", "ConnectToSource.SqlServer.Sync", + "ConnectToSource.PostgreSql.Sync", "ConnectToSource.MySql", "ConnectToSource.Oracle.Sync", + "ConnectToTarget.SqlDb", "ConnectToTarget.SqlDb.Sync", + "ConnectToTarget.AzureDbForPostgreSql.Sync", + "ConnectToTarget.Oracle.AzureDbForPostgreSql.Sync", "ConnectToTarget.AzureSqlDbMI", + "ConnectToTarget.AzureSqlDbMI.Sync.LRS", "ConnectToTarget.AzureDbForMySql", + "GetUserTables.Sql", "GetUserTables.AzureSqlDb.Sync", "GetUserTablesOracle", + "GetUserTablesPostgreSql", "GetUserTablesMySql", "Migrate.MongoDb", + "Migrate.SqlServer.AzureSqlDbMI", "Migrate.SqlServer.AzureSqlDbMI.Sync.LRS", + "Migrate.SqlServer.SqlDb", "Migrate.SqlServer.AzureSqlDb.Sync", + "Migrate.MySql.AzureDbForMySql.Sync", "Migrate.MySql.AzureDbForMySql", + "Migrate.PostgreSql.AzureDbForPostgreSql.SyncV2", "Migrate.Oracle.AzureDbForPostgreSql.Sync", + "ValidateMigrationInput.SqlServer.SqlDb.Sync", "ValidateMigrationInput.SqlServer.AzureSqlDbMI", + "ValidateMigrationInput.SqlServer.AzureSqlDbMI.Sync.LRS", "Validate.MongoDb", + "Validate.Oracle.AzureDbPostgreSql.Sync", "GetTDECertificates.Sql", "Migrate.Ssis", + "Service.Check.OCI", "Service.Upload.OCI", "Service.Install.OCI", + "MigrateSchemaSqlServerSqlDb". + :type task_type: str or ~azure.mgmt.datamigration.models.TaskType + :ivar errors: Array of errors. This is ignored if submitted. + :vartype errors: list[~azure.mgmt.datamigration.models.ODataError] + :ivar state: The state of the task. This is ignored if submitted. Possible values include: + "Unknown", "Queued", "Running", "Canceled", "Succeeded", "Failed", "FailedInputValidation", + "Faulted". + :vartype state: str or ~azure.mgmt.datamigration.models.TaskState + :ivar commands: Array of command properties. + :vartype commands: list[~azure.mgmt.datamigration.models.CommandProperties] + :param client_data: Key value pairs of client data to attach meta data information to task. + :type client_data: dict[str, str] + :param input: Task input. + :type input: + ~azure.mgmt.datamigration.models.ConnectToTargetOracleAzureDbForPostgreSqlSyncTaskInput + :ivar output: Task output. This is ignored if submitted. + :vartype output: + list[~azure.mgmt.datamigration.models.ConnectToTargetOracleAzureDbForPostgreSqlSyncTaskOutput] + """ + + _validation = { + 'task_type': {'required': True}, + 'errors': {'readonly': True}, + 'state': {'readonly': True}, + 'commands': {'readonly': True}, + 'output': {'readonly': True}, + } + + _attribute_map = { + 'task_type': {'key': 'taskType', 'type': 'str'}, + 'errors': {'key': 'errors', 'type': '[ODataError]'}, + 'state': {'key': 'state', 'type': 'str'}, + 'commands': {'key': 'commands', 'type': '[CommandProperties]'}, + 'client_data': {'key': 'clientData', 'type': '{str}'}, + 'input': {'key': 'input', 'type': 'ConnectToTargetOracleAzureDbForPostgreSqlSyncTaskInput'}, + 'output': {'key': 'output', 'type': '[ConnectToTargetOracleAzureDbForPostgreSqlSyncTaskOutput]'}, + } + + def __init__( + self, + *, + client_data: Optional[Dict[str, str]] = None, + input: Optional["ConnectToTargetOracleAzureDbForPostgreSqlSyncTaskInput"] = None, + **kwargs + ): + super(ConnectToTargetOracleAzureDbForPostgreSqlSyncTaskProperties, self).__init__(client_data=client_data, **kwargs) + self.task_type = 'ConnectToTarget.Oracle.AzureDbForPostgreSql.Sync' # type: str + self.input = input + self.output = None + + +class ConnectToTargetSqlDbSyncTaskInput(msrest.serialization.Model): + """Input for the task that validates connection to Azure SQL DB and target server requirements. + + All required parameters must be populated in order to send to Azure. + + :param source_connection_info: Required. Connection information for source SQL Server. + :type source_connection_info: ~azure.mgmt.datamigration.models.SqlConnectionInfo + :param target_connection_info: Required. Connection information for target SQL DB. + :type target_connection_info: ~azure.mgmt.datamigration.models.SqlConnectionInfo + """ + + _validation = { + 'source_connection_info': {'required': True}, + 'target_connection_info': {'required': True}, + } + + _attribute_map = { + 'source_connection_info': {'key': 'sourceConnectionInfo', 'type': 'SqlConnectionInfo'}, + 'target_connection_info': {'key': 'targetConnectionInfo', 'type': 'SqlConnectionInfo'}, + } + + def __init__( + self, + *, + source_connection_info: "SqlConnectionInfo", + target_connection_info: "SqlConnectionInfo", + **kwargs + ): + super(ConnectToTargetSqlDbSyncTaskInput, self).__init__(**kwargs) + self.source_connection_info = source_connection_info + self.target_connection_info = target_connection_info + + +class ConnectToTargetSqlDbSyncTaskProperties(ProjectTaskProperties): + """Properties for the task that validates connection to SQL DB and target server requirements for online migration. + + Variables are only populated by the server, and will be ignored when sending a request. + + All required parameters must be populated in order to send to Azure. + + :param task_type: Required. Task type.Constant filled by server. Possible values include: + "Connect.MongoDb", "ConnectToSource.SqlServer", "ConnectToSource.SqlServer.Sync", + "ConnectToSource.PostgreSql.Sync", "ConnectToSource.MySql", "ConnectToSource.Oracle.Sync", + "ConnectToTarget.SqlDb", "ConnectToTarget.SqlDb.Sync", + "ConnectToTarget.AzureDbForPostgreSql.Sync", + "ConnectToTarget.Oracle.AzureDbForPostgreSql.Sync", "ConnectToTarget.AzureSqlDbMI", + "ConnectToTarget.AzureSqlDbMI.Sync.LRS", "ConnectToTarget.AzureDbForMySql", + "GetUserTables.Sql", "GetUserTables.AzureSqlDb.Sync", "GetUserTablesOracle", + "GetUserTablesPostgreSql", "GetUserTablesMySql", "Migrate.MongoDb", + "Migrate.SqlServer.AzureSqlDbMI", "Migrate.SqlServer.AzureSqlDbMI.Sync.LRS", + "Migrate.SqlServer.SqlDb", "Migrate.SqlServer.AzureSqlDb.Sync", + "Migrate.MySql.AzureDbForMySql.Sync", "Migrate.MySql.AzureDbForMySql", + "Migrate.PostgreSql.AzureDbForPostgreSql.SyncV2", "Migrate.Oracle.AzureDbForPostgreSql.Sync", + "ValidateMigrationInput.SqlServer.SqlDb.Sync", "ValidateMigrationInput.SqlServer.AzureSqlDbMI", + "ValidateMigrationInput.SqlServer.AzureSqlDbMI.Sync.LRS", "Validate.MongoDb", + "Validate.Oracle.AzureDbPostgreSql.Sync", "GetTDECertificates.Sql", "Migrate.Ssis", + "Service.Check.OCI", "Service.Upload.OCI", "Service.Install.OCI", + "MigrateSchemaSqlServerSqlDb". + :type task_type: str or ~azure.mgmt.datamigration.models.TaskType + :ivar errors: Array of errors. This is ignored if submitted. + :vartype errors: list[~azure.mgmt.datamigration.models.ODataError] + :ivar state: The state of the task. This is ignored if submitted. Possible values include: + "Unknown", "Queued", "Running", "Canceled", "Succeeded", "Failed", "FailedInputValidation", + "Faulted". + :vartype state: str or ~azure.mgmt.datamigration.models.TaskState + :ivar commands: Array of command properties. + :vartype commands: list[~azure.mgmt.datamigration.models.CommandProperties] + :param client_data: Key value pairs of client data to attach meta data information to task. + :type client_data: dict[str, str] + :param input: Task input. + :type input: ~azure.mgmt.datamigration.models.ConnectToTargetSqlDbSyncTaskInput + :ivar output: Task output. This is ignored if submitted. + :vartype output: list[~azure.mgmt.datamigration.models.ConnectToTargetSqlDbTaskOutput] + """ + + _validation = { + 'task_type': {'required': True}, + 'errors': {'readonly': True}, + 'state': {'readonly': True}, + 'commands': {'readonly': True}, + 'output': {'readonly': True}, + } + + _attribute_map = { + 'task_type': {'key': 'taskType', 'type': 'str'}, + 'errors': {'key': 'errors', 'type': '[ODataError]'}, + 'state': {'key': 'state', 'type': 'str'}, + 'commands': {'key': 'commands', 'type': '[CommandProperties]'}, + 'client_data': {'key': 'clientData', 'type': '{str}'}, + 'input': {'key': 'input', 'type': 'ConnectToTargetSqlDbSyncTaskInput'}, + 'output': {'key': 'output', 'type': '[ConnectToTargetSqlDbTaskOutput]'}, + } + + def __init__( + self, + *, + client_data: Optional[Dict[str, str]] = None, + input: Optional["ConnectToTargetSqlDbSyncTaskInput"] = None, + **kwargs + ): + super(ConnectToTargetSqlDbSyncTaskProperties, self).__init__(client_data=client_data, **kwargs) + self.task_type = 'ConnectToTarget.SqlDb.Sync' # type: str + self.input = input + self.output = None + + +class ConnectToTargetSqlDbTaskInput(msrest.serialization.Model): + """Input for the task that validates connection to SQL DB and target server requirements. + + All required parameters must be populated in order to send to Azure. + + :param target_connection_info: Required. Connection information for target SQL DB. + :type target_connection_info: ~azure.mgmt.datamigration.models.SqlConnectionInfo + """ + + _validation = { + 'target_connection_info': {'required': True}, + } + + _attribute_map = { + 'target_connection_info': {'key': 'targetConnectionInfo', 'type': 'SqlConnectionInfo'}, + } + + def __init__( + self, + *, + target_connection_info: "SqlConnectionInfo", + **kwargs + ): + super(ConnectToTargetSqlDbTaskInput, self).__init__(**kwargs) + self.target_connection_info = target_connection_info + + +class ConnectToTargetSqlDbTaskOutput(msrest.serialization.Model): + """Output for the task that validates connection to SQL DB and target server requirements. + + Variables are only populated by the server, and will be ignored when sending a request. + + :ivar id: Result identifier. + :vartype id: str + :ivar databases: Source databases as a map from database name to database id. + :vartype databases: str + :ivar target_server_version: Version of the target server. + :vartype target_server_version: str + :ivar target_server_brand_version: Target server brand version. + :vartype target_server_brand_version: str + """ + + _validation = { + 'id': {'readonly': True}, + 'databases': {'readonly': True}, + 'target_server_version': {'readonly': True}, + 'target_server_brand_version': {'readonly': True}, + } + + _attribute_map = { + 'id': {'key': 'id', 'type': 'str'}, + 'databases': {'key': 'databases', 'type': 'str'}, + 'target_server_version': {'key': 'targetServerVersion', 'type': 'str'}, + 'target_server_brand_version': {'key': 'targetServerBrandVersion', 'type': 'str'}, + } + + def __init__( + self, + **kwargs + ): + super(ConnectToTargetSqlDbTaskOutput, self).__init__(**kwargs) + self.id = None + self.databases = None + self.target_server_version = None + self.target_server_brand_version = None + + +class ConnectToTargetSqlDbTaskProperties(ProjectTaskProperties): + """Properties for the task that validates connection to SQL DB and target server requirements. + + Variables are only populated by the server, and will be ignored when sending a request. + + All required parameters must be populated in order to send to Azure. + + :param task_type: Required. Task type.Constant filled by server. Possible values include: + "Connect.MongoDb", "ConnectToSource.SqlServer", "ConnectToSource.SqlServer.Sync", + "ConnectToSource.PostgreSql.Sync", "ConnectToSource.MySql", "ConnectToSource.Oracle.Sync", + "ConnectToTarget.SqlDb", "ConnectToTarget.SqlDb.Sync", + "ConnectToTarget.AzureDbForPostgreSql.Sync", + "ConnectToTarget.Oracle.AzureDbForPostgreSql.Sync", "ConnectToTarget.AzureSqlDbMI", + "ConnectToTarget.AzureSqlDbMI.Sync.LRS", "ConnectToTarget.AzureDbForMySql", + "GetUserTables.Sql", "GetUserTables.AzureSqlDb.Sync", "GetUserTablesOracle", + "GetUserTablesPostgreSql", "GetUserTablesMySql", "Migrate.MongoDb", + "Migrate.SqlServer.AzureSqlDbMI", "Migrate.SqlServer.AzureSqlDbMI.Sync.LRS", + "Migrate.SqlServer.SqlDb", "Migrate.SqlServer.AzureSqlDb.Sync", + "Migrate.MySql.AzureDbForMySql.Sync", "Migrate.MySql.AzureDbForMySql", + "Migrate.PostgreSql.AzureDbForPostgreSql.SyncV2", "Migrate.Oracle.AzureDbForPostgreSql.Sync", + "ValidateMigrationInput.SqlServer.SqlDb.Sync", "ValidateMigrationInput.SqlServer.AzureSqlDbMI", + "ValidateMigrationInput.SqlServer.AzureSqlDbMI.Sync.LRS", "Validate.MongoDb", + "Validate.Oracle.AzureDbPostgreSql.Sync", "GetTDECertificates.Sql", "Migrate.Ssis", + "Service.Check.OCI", "Service.Upload.OCI", "Service.Install.OCI", + "MigrateSchemaSqlServerSqlDb". + :type task_type: str or ~azure.mgmt.datamigration.models.TaskType + :ivar errors: Array of errors. This is ignored if submitted. + :vartype errors: list[~azure.mgmt.datamigration.models.ODataError] + :ivar state: The state of the task. This is ignored if submitted. Possible values include: + "Unknown", "Queued", "Running", "Canceled", "Succeeded", "Failed", "FailedInputValidation", + "Faulted". + :vartype state: str or ~azure.mgmt.datamigration.models.TaskState + :ivar commands: Array of command properties. + :vartype commands: list[~azure.mgmt.datamigration.models.CommandProperties] + :param client_data: Key value pairs of client data to attach meta data information to task. + :type client_data: dict[str, str] + :param input: Task input. + :type input: ~azure.mgmt.datamigration.models.ConnectToTargetSqlDbTaskInput + :ivar output: Task output. This is ignored if submitted. + :vartype output: list[~azure.mgmt.datamigration.models.ConnectToTargetSqlDbTaskOutput] + """ + + _validation = { + 'task_type': {'required': True}, + 'errors': {'readonly': True}, + 'state': {'readonly': True}, + 'commands': {'readonly': True}, + 'output': {'readonly': True}, + } + + _attribute_map = { + 'task_type': {'key': 'taskType', 'type': 'str'}, + 'errors': {'key': 'errors', 'type': '[ODataError]'}, + 'state': {'key': 'state', 'type': 'str'}, + 'commands': {'key': 'commands', 'type': '[CommandProperties]'}, + 'client_data': {'key': 'clientData', 'type': '{str}'}, + 'input': {'key': 'input', 'type': 'ConnectToTargetSqlDbTaskInput'}, + 'output': {'key': 'output', 'type': '[ConnectToTargetSqlDbTaskOutput]'}, + } + + def __init__( + self, + *, + client_data: Optional[Dict[str, str]] = None, + input: Optional["ConnectToTargetSqlDbTaskInput"] = None, + **kwargs + ): + super(ConnectToTargetSqlDbTaskProperties, self).__init__(client_data=client_data, **kwargs) + self.task_type = 'ConnectToTarget.SqlDb' # type: str + self.input = input + self.output = None + + +class ConnectToTargetSqlMiSyncTaskInput(msrest.serialization.Model): + """Input for the task that validates connection to Azure SQL Database Managed Instance online scenario. + + All required parameters must be populated in order to send to Azure. + + :param target_connection_info: Required. Connection information for Azure SQL Database Managed + Instance. + :type target_connection_info: ~azure.mgmt.datamigration.models.MiSqlConnectionInfo + :param azure_app: Required. Azure Active Directory Application the DMS instance will use to + connect to the target instance of Azure SQL Database Managed Instance and the Azure Storage + Account. + :type azure_app: ~azure.mgmt.datamigration.models.AzureActiveDirectoryApp + """ + + _validation = { + 'target_connection_info': {'required': True}, + 'azure_app': {'required': True}, + } + + _attribute_map = { + 'target_connection_info': {'key': 'targetConnectionInfo', 'type': 'MiSqlConnectionInfo'}, + 'azure_app': {'key': 'azureApp', 'type': 'AzureActiveDirectoryApp'}, + } + + def __init__( + self, + *, + target_connection_info: "MiSqlConnectionInfo", + azure_app: "AzureActiveDirectoryApp", + **kwargs + ): + super(ConnectToTargetSqlMiSyncTaskInput, self).__init__(**kwargs) + self.target_connection_info = target_connection_info + self.azure_app = azure_app + + +class ConnectToTargetSqlMiSyncTaskOutput(msrest.serialization.Model): + """Output for the task that validates connection to Azure SQL Database Managed Instance. + + Variables are only populated by the server, and will be ignored when sending a request. + + :ivar target_server_version: Target server version. + :vartype target_server_version: str + :ivar target_server_brand_version: Target server brand version. + :vartype target_server_brand_version: str + :ivar validation_errors: Validation errors. + :vartype validation_errors: list[~azure.mgmt.datamigration.models.ReportableException] + """ + + _validation = { + 'target_server_version': {'readonly': True}, + 'target_server_brand_version': {'readonly': True}, + 'validation_errors': {'readonly': True}, + } + + _attribute_map = { + 'target_server_version': {'key': 'targetServerVersion', 'type': 'str'}, + 'target_server_brand_version': {'key': 'targetServerBrandVersion', 'type': 'str'}, + 'validation_errors': {'key': 'validationErrors', 'type': '[ReportableException]'}, + } + + def __init__( + self, + **kwargs + ): + super(ConnectToTargetSqlMiSyncTaskOutput, self).__init__(**kwargs) + self.target_server_version = None + self.target_server_brand_version = None + self.validation_errors = None + + +class ConnectToTargetSqlMiSyncTaskProperties(ProjectTaskProperties): + """Properties for the task that validates connection to Azure SQL Database Managed Instance. + + Variables are only populated by the server, and will be ignored when sending a request. + + All required parameters must be populated in order to send to Azure. + + :param task_type: Required. Task type.Constant filled by server. Possible values include: + "Connect.MongoDb", "ConnectToSource.SqlServer", "ConnectToSource.SqlServer.Sync", + "ConnectToSource.PostgreSql.Sync", "ConnectToSource.MySql", "ConnectToSource.Oracle.Sync", + "ConnectToTarget.SqlDb", "ConnectToTarget.SqlDb.Sync", + "ConnectToTarget.AzureDbForPostgreSql.Sync", + "ConnectToTarget.Oracle.AzureDbForPostgreSql.Sync", "ConnectToTarget.AzureSqlDbMI", + "ConnectToTarget.AzureSqlDbMI.Sync.LRS", "ConnectToTarget.AzureDbForMySql", + "GetUserTables.Sql", "GetUserTables.AzureSqlDb.Sync", "GetUserTablesOracle", + "GetUserTablesPostgreSql", "GetUserTablesMySql", "Migrate.MongoDb", + "Migrate.SqlServer.AzureSqlDbMI", "Migrate.SqlServer.AzureSqlDbMI.Sync.LRS", + "Migrate.SqlServer.SqlDb", "Migrate.SqlServer.AzureSqlDb.Sync", + "Migrate.MySql.AzureDbForMySql.Sync", "Migrate.MySql.AzureDbForMySql", + "Migrate.PostgreSql.AzureDbForPostgreSql.SyncV2", "Migrate.Oracle.AzureDbForPostgreSql.Sync", + "ValidateMigrationInput.SqlServer.SqlDb.Sync", "ValidateMigrationInput.SqlServer.AzureSqlDbMI", + "ValidateMigrationInput.SqlServer.AzureSqlDbMI.Sync.LRS", "Validate.MongoDb", + "Validate.Oracle.AzureDbPostgreSql.Sync", "GetTDECertificates.Sql", "Migrate.Ssis", + "Service.Check.OCI", "Service.Upload.OCI", "Service.Install.OCI", + "MigrateSchemaSqlServerSqlDb". + :type task_type: str or ~azure.mgmt.datamigration.models.TaskType + :ivar errors: Array of errors. This is ignored if submitted. + :vartype errors: list[~azure.mgmt.datamigration.models.ODataError] + :ivar state: The state of the task. This is ignored if submitted. Possible values include: + "Unknown", "Queued", "Running", "Canceled", "Succeeded", "Failed", "FailedInputValidation", + "Faulted". + :vartype state: str or ~azure.mgmt.datamigration.models.TaskState + :ivar commands: Array of command properties. + :vartype commands: list[~azure.mgmt.datamigration.models.CommandProperties] + :param client_data: Key value pairs of client data to attach meta data information to task. + :type client_data: dict[str, str] + :param input: Task input. + :type input: ~azure.mgmt.datamigration.models.ConnectToTargetSqlMiSyncTaskInput + :ivar output: Task output. This is ignored if submitted. + :vartype output: list[~azure.mgmt.datamigration.models.ConnectToTargetSqlMiSyncTaskOutput] + """ + + _validation = { + 'task_type': {'required': True}, + 'errors': {'readonly': True}, + 'state': {'readonly': True}, + 'commands': {'readonly': True}, + 'output': {'readonly': True}, + } + + _attribute_map = { + 'task_type': {'key': 'taskType', 'type': 'str'}, + 'errors': {'key': 'errors', 'type': '[ODataError]'}, + 'state': {'key': 'state', 'type': 'str'}, + 'commands': {'key': 'commands', 'type': '[CommandProperties]'}, + 'client_data': {'key': 'clientData', 'type': '{str}'}, + 'input': {'key': 'input', 'type': 'ConnectToTargetSqlMiSyncTaskInput'}, + 'output': {'key': 'output', 'type': '[ConnectToTargetSqlMiSyncTaskOutput]'}, + } + + def __init__( + self, + *, + client_data: Optional[Dict[str, str]] = None, + input: Optional["ConnectToTargetSqlMiSyncTaskInput"] = None, + **kwargs + ): + super(ConnectToTargetSqlMiSyncTaskProperties, self).__init__(client_data=client_data, **kwargs) + self.task_type = 'ConnectToTarget.AzureSqlDbMI.Sync.LRS' # type: str + self.input = input + self.output = None + + +class ConnectToTargetSqlMiTaskInput(msrest.serialization.Model): + """Input for the task that validates connection to Azure SQL Database Managed Instance. + + All required parameters must be populated in order to send to Azure. + + :param target_connection_info: Required. Connection information for target SQL Server. + :type target_connection_info: ~azure.mgmt.datamigration.models.SqlConnectionInfo + :param collect_logins: Flag for whether to collect logins from target SQL MI server. + :type collect_logins: bool + :param collect_agent_jobs: Flag for whether to collect agent jobs from target SQL MI server. + :type collect_agent_jobs: bool + :param validate_ssis_catalog_only: Flag for whether to validate SSIS catalog is reachable on + the target SQL MI server. + :type validate_ssis_catalog_only: bool + """ + + _validation = { + 'target_connection_info': {'required': True}, + } + + _attribute_map = { + 'target_connection_info': {'key': 'targetConnectionInfo', 'type': 'SqlConnectionInfo'}, + 'collect_logins': {'key': 'collectLogins', 'type': 'bool'}, + 'collect_agent_jobs': {'key': 'collectAgentJobs', 'type': 'bool'}, + 'validate_ssis_catalog_only': {'key': 'validateSsisCatalogOnly', 'type': 'bool'}, + } + + def __init__( + self, + *, + target_connection_info: "SqlConnectionInfo", + collect_logins: Optional[bool] = True, + collect_agent_jobs: Optional[bool] = True, + validate_ssis_catalog_only: Optional[bool] = False, + **kwargs + ): + super(ConnectToTargetSqlMiTaskInput, self).__init__(**kwargs) + self.target_connection_info = target_connection_info + self.collect_logins = collect_logins + self.collect_agent_jobs = collect_agent_jobs + self.validate_ssis_catalog_only = validate_ssis_catalog_only + + +class ConnectToTargetSqlMiTaskOutput(msrest.serialization.Model): + """Output for the task that validates connection to Azure SQL Database Managed Instance. + + Variables are only populated by the server, and will be ignored when sending a request. + + :ivar id: Result identifier. + :vartype id: str + :ivar target_server_version: Target server version. + :vartype target_server_version: str + :ivar target_server_brand_version: Target server brand version. + :vartype target_server_brand_version: str + :ivar logins: List of logins on the target server. + :vartype logins: list[str] + :ivar agent_jobs: List of agent jobs on the target server. + :vartype agent_jobs: list[str] + :ivar validation_errors: Validation errors. + :vartype validation_errors: list[~azure.mgmt.datamigration.models.ReportableException] + """ + + _validation = { + 'id': {'readonly': True}, + 'target_server_version': {'readonly': True}, + 'target_server_brand_version': {'readonly': True}, + 'logins': {'readonly': True}, + 'agent_jobs': {'readonly': True}, + 'validation_errors': {'readonly': True}, + } + + _attribute_map = { + 'id': {'key': 'id', 'type': 'str'}, + 'target_server_version': {'key': 'targetServerVersion', 'type': 'str'}, + 'target_server_brand_version': {'key': 'targetServerBrandVersion', 'type': 'str'}, + 'logins': {'key': 'logins', 'type': '[str]'}, + 'agent_jobs': {'key': 'agentJobs', 'type': '[str]'}, + 'validation_errors': {'key': 'validationErrors', 'type': '[ReportableException]'}, + } + + def __init__( + self, + **kwargs + ): + super(ConnectToTargetSqlMiTaskOutput, self).__init__(**kwargs) + self.id = None + self.target_server_version = None + self.target_server_brand_version = None + self.logins = None + self.agent_jobs = None + self.validation_errors = None + + +class ConnectToTargetSqlMiTaskProperties(ProjectTaskProperties): + """Properties for the task that validates connection to Azure SQL Database Managed Instance. + + Variables are only populated by the server, and will be ignored when sending a request. + + All required parameters must be populated in order to send to Azure. + + :param task_type: Required. Task type.Constant filled by server. Possible values include: + "Connect.MongoDb", "ConnectToSource.SqlServer", "ConnectToSource.SqlServer.Sync", + "ConnectToSource.PostgreSql.Sync", "ConnectToSource.MySql", "ConnectToSource.Oracle.Sync", + "ConnectToTarget.SqlDb", "ConnectToTarget.SqlDb.Sync", + "ConnectToTarget.AzureDbForPostgreSql.Sync", + "ConnectToTarget.Oracle.AzureDbForPostgreSql.Sync", "ConnectToTarget.AzureSqlDbMI", + "ConnectToTarget.AzureSqlDbMI.Sync.LRS", "ConnectToTarget.AzureDbForMySql", + "GetUserTables.Sql", "GetUserTables.AzureSqlDb.Sync", "GetUserTablesOracle", + "GetUserTablesPostgreSql", "GetUserTablesMySql", "Migrate.MongoDb", + "Migrate.SqlServer.AzureSqlDbMI", "Migrate.SqlServer.AzureSqlDbMI.Sync.LRS", + "Migrate.SqlServer.SqlDb", "Migrate.SqlServer.AzureSqlDb.Sync", + "Migrate.MySql.AzureDbForMySql.Sync", "Migrate.MySql.AzureDbForMySql", + "Migrate.PostgreSql.AzureDbForPostgreSql.SyncV2", "Migrate.Oracle.AzureDbForPostgreSql.Sync", + "ValidateMigrationInput.SqlServer.SqlDb.Sync", "ValidateMigrationInput.SqlServer.AzureSqlDbMI", + "ValidateMigrationInput.SqlServer.AzureSqlDbMI.Sync.LRS", "Validate.MongoDb", + "Validate.Oracle.AzureDbPostgreSql.Sync", "GetTDECertificates.Sql", "Migrate.Ssis", + "Service.Check.OCI", "Service.Upload.OCI", "Service.Install.OCI", + "MigrateSchemaSqlServerSqlDb". + :type task_type: str or ~azure.mgmt.datamigration.models.TaskType + :ivar errors: Array of errors. This is ignored if submitted. + :vartype errors: list[~azure.mgmt.datamigration.models.ODataError] + :ivar state: The state of the task. This is ignored if submitted. Possible values include: + "Unknown", "Queued", "Running", "Canceled", "Succeeded", "Failed", "FailedInputValidation", + "Faulted". + :vartype state: str or ~azure.mgmt.datamigration.models.TaskState + :ivar commands: Array of command properties. + :vartype commands: list[~azure.mgmt.datamigration.models.CommandProperties] + :param client_data: Key value pairs of client data to attach meta data information to task. + :type client_data: dict[str, str] + :param input: Task input. + :type input: ~azure.mgmt.datamigration.models.ConnectToTargetSqlMiTaskInput + :ivar output: Task output. This is ignored if submitted. + :vartype output: list[~azure.mgmt.datamigration.models.ConnectToTargetSqlMiTaskOutput] + """ + + _validation = { + 'task_type': {'required': True}, + 'errors': {'readonly': True}, + 'state': {'readonly': True}, + 'commands': {'readonly': True}, + 'output': {'readonly': True}, + } + + _attribute_map = { + 'task_type': {'key': 'taskType', 'type': 'str'}, + 'errors': {'key': 'errors', 'type': '[ODataError]'}, + 'state': {'key': 'state', 'type': 'str'}, + 'commands': {'key': 'commands', 'type': '[CommandProperties]'}, + 'client_data': {'key': 'clientData', 'type': '{str}'}, + 'input': {'key': 'input', 'type': 'ConnectToTargetSqlMiTaskInput'}, + 'output': {'key': 'output', 'type': '[ConnectToTargetSqlMiTaskOutput]'}, + } + + def __init__( + self, + *, + client_data: Optional[Dict[str, str]] = None, + input: Optional["ConnectToTargetSqlMiTaskInput"] = None, + **kwargs + ): + super(ConnectToTargetSqlMiTaskProperties, self).__init__(client_data=client_data, **kwargs) + self.task_type = 'ConnectToTarget.AzureSqlDbMI' # type: str + self.input = input + self.output = None + + +class Database(msrest.serialization.Model): + """Information about a single database. + + :param id: Unique identifier for the database. + :type id: str + :param name: Name of the database. + :type name: str + :param compatibility_level: SQL Server compatibility level of database. Possible values + include: "CompatLevel80", "CompatLevel90", "CompatLevel100", "CompatLevel110", + "CompatLevel120", "CompatLevel130", "CompatLevel140". + :type compatibility_level: str or ~azure.mgmt.datamigration.models.DatabaseCompatLevel + :param collation: Collation name of the database. + :type collation: str + :param server_name: Name of the server. + :type server_name: str + :param fqdn: Fully qualified name. + :type fqdn: str + :param install_id: Install id of the database. + :type install_id: str + :param server_version: Version of the server. + :type server_version: str + :param server_edition: Edition of the server. + :type server_edition: str + :param server_level: Product level of the server (RTM, SP, CTP). + :type server_level: str + :param server_default_data_path: Default path of the data files. + :type server_default_data_path: str + :param server_default_log_path: Default path of the log files. + :type server_default_log_path: str + :param server_default_backup_path: Default path of the backup folder. + :type server_default_backup_path: str + :param server_core_count: Number of cores on the server. + :type server_core_count: int + :param server_visible_online_core_count: Number of cores on the server that have VISIBLE ONLINE + status. + :type server_visible_online_core_count: int + :param database_state: State of the database. Possible values include: "Online", "Restoring", + "Recovering", "RecoveryPending", "Suspect", "Emergency", "Offline", "Copying", + "OfflineSecondary". + :type database_state: str or ~azure.mgmt.datamigration.models.DatabaseState + :param server_id: The unique Server Id. + :type server_id: str + """ + + _attribute_map = { + 'id': {'key': 'id', 'type': 'str'}, + 'name': {'key': 'name', 'type': 'str'}, + 'compatibility_level': {'key': 'compatibilityLevel', 'type': 'str'}, + 'collation': {'key': 'collation', 'type': 'str'}, + 'server_name': {'key': 'serverName', 'type': 'str'}, + 'fqdn': {'key': 'fqdn', 'type': 'str'}, + 'install_id': {'key': 'installId', 'type': 'str'}, + 'server_version': {'key': 'serverVersion', 'type': 'str'}, + 'server_edition': {'key': 'serverEdition', 'type': 'str'}, + 'server_level': {'key': 'serverLevel', 'type': 'str'}, + 'server_default_data_path': {'key': 'serverDefaultDataPath', 'type': 'str'}, + 'server_default_log_path': {'key': 'serverDefaultLogPath', 'type': 'str'}, + 'server_default_backup_path': {'key': 'serverDefaultBackupPath', 'type': 'str'}, + 'server_core_count': {'key': 'serverCoreCount', 'type': 'int'}, + 'server_visible_online_core_count': {'key': 'serverVisibleOnlineCoreCount', 'type': 'int'}, + 'database_state': {'key': 'databaseState', 'type': 'str'}, + 'server_id': {'key': 'serverId', 'type': 'str'}, + } + + def __init__( + self, + *, + id: Optional[str] = None, + name: Optional[str] = None, + compatibility_level: Optional[Union[str, "DatabaseCompatLevel"]] = None, + collation: Optional[str] = None, + server_name: Optional[str] = None, + fqdn: Optional[str] = None, + install_id: Optional[str] = None, + server_version: Optional[str] = None, + server_edition: Optional[str] = None, + server_level: Optional[str] = None, + server_default_data_path: Optional[str] = None, + server_default_log_path: Optional[str] = None, + server_default_backup_path: Optional[str] = None, + server_core_count: Optional[int] = None, + server_visible_online_core_count: Optional[int] = None, + database_state: Optional[Union[str, "DatabaseState"]] = None, + server_id: Optional[str] = None, + **kwargs + ): + super(Database, self).__init__(**kwargs) + self.id = id + self.name = name + self.compatibility_level = compatibility_level + self.collation = collation + self.server_name = server_name + self.fqdn = fqdn + self.install_id = install_id + self.server_version = server_version + self.server_edition = server_edition + self.server_level = server_level + self.server_default_data_path = server_default_data_path + self.server_default_log_path = server_default_log_path + self.server_default_backup_path = server_default_backup_path + self.server_core_count = server_core_count + self.server_visible_online_core_count = server_visible_online_core_count + self.database_state = database_state + self.server_id = server_id + + +class DatabaseBackupInfo(msrest.serialization.Model): + """Information about backup files when existing backup mode is used. + + Variables are only populated by the server, and will be ignored when sending a request. + + :ivar database_name: Database name. + :vartype database_name: str + :ivar backup_type: Backup Type. Possible values include: "Database", "TransactionLog", "File", + "DifferentialDatabase", "DifferentialFile", "Partial", "DifferentialPartial". + :vartype backup_type: str or ~azure.mgmt.datamigration.models.BackupType + :ivar backup_files: The list of backup files for the current database. + :vartype backup_files: list[str] + :ivar position: Position of current database backup in the file. + :vartype position: int + :ivar is_damaged: Database was damaged when backed up, but the backup operation was requested + to continue despite errors. + :vartype is_damaged: bool + :ivar is_compressed: Whether the backup set is compressed. + :vartype is_compressed: bool + :ivar family_count: Number of files in the backup set. + :vartype family_count: int + :ivar backup_finish_date: Date and time when the backup operation finished. + :vartype backup_finish_date: ~datetime.datetime + """ + + _validation = { + 'database_name': {'readonly': True}, + 'backup_type': {'readonly': True}, + 'backup_files': {'readonly': True}, + 'position': {'readonly': True}, + 'is_damaged': {'readonly': True}, + 'is_compressed': {'readonly': True}, + 'family_count': {'readonly': True}, + 'backup_finish_date': {'readonly': True}, + } + + _attribute_map = { + 'database_name': {'key': 'databaseName', 'type': 'str'}, + 'backup_type': {'key': 'backupType', 'type': 'str'}, + 'backup_files': {'key': 'backupFiles', 'type': '[str]'}, + 'position': {'key': 'position', 'type': 'int'}, + 'is_damaged': {'key': 'isDamaged', 'type': 'bool'}, + 'is_compressed': {'key': 'isCompressed', 'type': 'bool'}, + 'family_count': {'key': 'familyCount', 'type': 'int'}, + 'backup_finish_date': {'key': 'backupFinishDate', 'type': 'iso-8601'}, + } + + def __init__( + self, + **kwargs + ): + super(DatabaseBackupInfo, self).__init__(**kwargs) + self.database_name = None + self.backup_type = None + self.backup_files = None + self.position = None + self.is_damaged = None + self.is_compressed = None + self.family_count = None + self.backup_finish_date = None + + +class DatabaseFileInfo(msrest.serialization.Model): + """Database file specific information. + + :param database_name: Name of the database. + :type database_name: str + :param id: Unique identifier for database file. + :type id: str + :param logical_name: Logical name of the file. + :type logical_name: str + :param physical_full_name: Operating-system full path of the file. + :type physical_full_name: str + :param restore_full_name: Suggested full path of the file for restoring. + :type restore_full_name: str + :param file_type: Database file type. Possible values include: "Rows", "Log", "Filestream", + "NotSupported", "Fulltext". + :type file_type: str or ~azure.mgmt.datamigration.models.DatabaseFileType + :param size_mb: Size of the file in megabytes. + :type size_mb: float + """ + + _attribute_map = { + 'database_name': {'key': 'databaseName', 'type': 'str'}, + 'id': {'key': 'id', 'type': 'str'}, + 'logical_name': {'key': 'logicalName', 'type': 'str'}, + 'physical_full_name': {'key': 'physicalFullName', 'type': 'str'}, + 'restore_full_name': {'key': 'restoreFullName', 'type': 'str'}, + 'file_type': {'key': 'fileType', 'type': 'str'}, + 'size_mb': {'key': 'sizeMB', 'type': 'float'}, + } + + def __init__( + self, + *, + database_name: Optional[str] = None, + id: Optional[str] = None, + logical_name: Optional[str] = None, + physical_full_name: Optional[str] = None, + restore_full_name: Optional[str] = None, + file_type: Optional[Union[str, "DatabaseFileType"]] = None, + size_mb: Optional[float] = None, + **kwargs + ): + super(DatabaseFileInfo, self).__init__(**kwargs) + self.database_name = database_name + self.id = id + self.logical_name = logical_name + self.physical_full_name = physical_full_name + self.restore_full_name = restore_full_name + self.file_type = file_type + self.size_mb = size_mb + + +class DatabaseFileInput(msrest.serialization.Model): + """Database file specific information for input. + + :param id: Unique identifier for database file. + :type id: str + :param logical_name: Logical name of the file. + :type logical_name: str + :param physical_full_name: Operating-system full path of the file. + :type physical_full_name: str + :param restore_full_name: Suggested full path of the file for restoring. + :type restore_full_name: str + :param file_type: Database file type. Possible values include: "Rows", "Log", "Filestream", + "NotSupported", "Fulltext". + :type file_type: str or ~azure.mgmt.datamigration.models.DatabaseFileType + """ + + _attribute_map = { + 'id': {'key': 'id', 'type': 'str'}, + 'logical_name': {'key': 'logicalName', 'type': 'str'}, + 'physical_full_name': {'key': 'physicalFullName', 'type': 'str'}, + 'restore_full_name': {'key': 'restoreFullName', 'type': 'str'}, + 'file_type': {'key': 'fileType', 'type': 'str'}, + } + + def __init__( + self, + *, + id: Optional[str] = None, + logical_name: Optional[str] = None, + physical_full_name: Optional[str] = None, + restore_full_name: Optional[str] = None, + file_type: Optional[Union[str, "DatabaseFileType"]] = None, + **kwargs + ): + super(DatabaseFileInput, self).__init__(**kwargs) + self.id = id + self.logical_name = logical_name + self.physical_full_name = physical_full_name + self.restore_full_name = restore_full_name + self.file_type = file_type + + +class DatabaseInfo(msrest.serialization.Model): + """Project Database Details. + + All required parameters must be populated in order to send to Azure. + + :param source_database_name: Required. Name of the database. + :type source_database_name: str + """ + + _validation = { + 'source_database_name': {'required': True}, + } + + _attribute_map = { + 'source_database_name': {'key': 'sourceDatabaseName', 'type': 'str'}, + } + + def __init__( + self, + *, + source_database_name: str, + **kwargs + ): + super(DatabaseInfo, self).__init__(**kwargs) + self.source_database_name = source_database_name + + +class ProxyResource(msrest.serialization.Model): + """ProxyResource. + + Variables are only populated by the server, and will be ignored when sending a request. + + :ivar id: + :vartype id: str + :ivar name: + :vartype name: str + :ivar type: + :vartype type: str + """ + + _validation = { + 'id': {'readonly': True}, + 'name': {'readonly': True}, + 'type': {'readonly': True}, + } + + _attribute_map = { + 'id': {'key': 'id', 'type': 'str'}, + 'name': {'key': 'name', 'type': 'str'}, + 'type': {'key': 'type', 'type': 'str'}, + } + + def __init__( + self, + **kwargs + ): + super(ProxyResource, self).__init__(**kwargs) + self.id = None + self.name = None + self.type = None + + +class DatabaseMigration(ProxyResource): + """Database Migration Resource. + + Variables are only populated by the server, and will be ignored when sending a request. + + :ivar id: + :vartype id: str + :ivar name: + :vartype name: str + :ivar type: + :vartype type: str + :ivar system_data: Metadata pertaining to creation and last modification of the resource. + :vartype system_data: ~azure.mgmt.datamigration.models.SystemData + :param properties: Database Migration Resource properties. + :type properties: ~azure.mgmt.datamigration.models.DatabaseMigrationProperties + """ + + _validation = { + 'id': {'readonly': True}, + 'name': {'readonly': True}, + 'type': {'readonly': True}, + 'system_data': {'readonly': True}, + } + + _attribute_map = { + 'id': {'key': 'id', 'type': 'str'}, + 'name': {'key': 'name', 'type': 'str'}, + 'type': {'key': 'type', 'type': 'str'}, + 'system_data': {'key': 'systemData', 'type': 'SystemData'}, + 'properties': {'key': 'properties', 'type': 'DatabaseMigrationProperties'}, + } + + def __init__( + self, + *, + properties: Optional["DatabaseMigrationProperties"] = None, + **kwargs + ): + super(DatabaseMigration, self).__init__(**kwargs) + self.system_data = None + self.properties = properties + + +class DatabaseMigrationListResult(msrest.serialization.Model): + """A list of Database Migrations. + + Variables are only populated by the server, and will be ignored when sending a request. + + :ivar value: + :vartype value: list[~azure.mgmt.datamigration.models.DatabaseMigration] + :ivar next_link: + :vartype next_link: str + """ + + _validation = { + 'value': {'readonly': True}, + 'next_link': {'readonly': True}, + } + + _attribute_map = { + 'value': {'key': 'value', 'type': '[DatabaseMigration]'}, + 'next_link': {'key': 'nextLink', 'type': 'str'}, + } + + def __init__( + self, + **kwargs + ): + super(DatabaseMigrationListResult, self).__init__(**kwargs) + self.value = None + self.next_link = None + + +class DatabaseMigrationProperties(msrest.serialization.Model): + """Database Migration Resource properties. + + You probably want to use the sub-classes and not this class directly. Known + sub-classes are: DatabaseMigrationPropertiesSqlMi, DatabaseMigrationPropertiesSqlVm. + + Variables are only populated by the server, and will be ignored when sending a request. + + All required parameters must be populated in order to send to Azure. + + :param kind: Required. Constant filled by server. Possible values include: "SqlMi", "SqlVm". + :type kind: str or ~azure.mgmt.datamigration.models.ResourceType + :param scope: Resource Id of the target resource (SQL VM or SQL Managed Instance). + :type scope: str + :ivar provisioning_state: Provisioning State of migration. ProvisioningState as Succeeded + implies that validations have been performed and migration has started. + :vartype provisioning_state: str + :ivar migration_status: Migration status. + :vartype migration_status: str + :ivar started_on: Database migration start time. + :vartype started_on: ~datetime.datetime + :ivar ended_on: Database migration end time. + :vartype ended_on: ~datetime.datetime + :param source_sql_connection: Source SQL Server connection details. + :type source_sql_connection: ~azure.mgmt.datamigration.models.SqlConnectionInformation + :param source_database_name: Name of the source database. + :type source_database_name: str + :param migration_service: Resource Id of the Migration Service. + :type migration_service: str + :param migration_operation_id: ID tracking current migration operation. + :type migration_operation_id: str + :ivar migration_failure_error: Error details in case of migration failure. + :vartype migration_failure_error: ~azure.mgmt.datamigration.models.ErrorInfo + """ + + _validation = { + 'kind': {'required': True}, + 'provisioning_state': {'readonly': True}, + 'migration_status': {'readonly': True}, + 'started_on': {'readonly': True}, + 'ended_on': {'readonly': True}, + 'migration_failure_error': {'readonly': True}, + } + + _attribute_map = { + 'kind': {'key': 'kind', 'type': 'str'}, + 'scope': {'key': 'scope', 'type': 'str'}, + 'provisioning_state': {'key': 'provisioningState', 'type': 'str'}, + 'migration_status': {'key': 'migrationStatus', 'type': 'str'}, + 'started_on': {'key': 'startedOn', 'type': 'iso-8601'}, + 'ended_on': {'key': 'endedOn', 'type': 'iso-8601'}, + 'source_sql_connection': {'key': 'sourceSqlConnection', 'type': 'SqlConnectionInformation'}, + 'source_database_name': {'key': 'sourceDatabaseName', 'type': 'str'}, + 'migration_service': {'key': 'migrationService', 'type': 'str'}, + 'migration_operation_id': {'key': 'migrationOperationId', 'type': 'str'}, + 'migration_failure_error': {'key': 'migrationFailureError', 'type': 'ErrorInfo'}, + } + + _subtype_map = { + 'kind': {'SqlMi': 'DatabaseMigrationPropertiesSqlMi', 'SqlVm': 'DatabaseMigrationPropertiesSqlVm'} + } + + def __init__( + self, + *, + scope: Optional[str] = None, + source_sql_connection: Optional["SqlConnectionInformation"] = None, + source_database_name: Optional[str] = None, + migration_service: Optional[str] = None, + migration_operation_id: Optional[str] = None, + **kwargs + ): + super(DatabaseMigrationProperties, self).__init__(**kwargs) + self.kind = None # type: Optional[str] + self.scope = scope + self.provisioning_state = None + self.migration_status = None + self.started_on = None + self.ended_on = None + self.source_sql_connection = source_sql_connection + self.source_database_name = source_database_name + self.migration_service = migration_service + self.migration_operation_id = migration_operation_id + self.migration_failure_error = None + + +class DatabaseMigrationPropertiesSqlMi(DatabaseMigrationProperties): + """Database Migration Resource properties for SQL Managed Instance. + + Variables are only populated by the server, and will be ignored when sending a request. + + All required parameters must be populated in order to send to Azure. + + :param kind: Required. Constant filled by server. Possible values include: "SqlMi", "SqlVm". + :type kind: str or ~azure.mgmt.datamigration.models.ResourceType + :param scope: Resource Id of the target resource (SQL VM or SQL Managed Instance). + :type scope: str + :ivar provisioning_state: Provisioning State of migration. ProvisioningState as Succeeded + implies that validations have been performed and migration has started. + :vartype provisioning_state: str + :ivar migration_status: Migration status. + :vartype migration_status: str + :ivar started_on: Database migration start time. + :vartype started_on: ~datetime.datetime + :ivar ended_on: Database migration end time. + :vartype ended_on: ~datetime.datetime + :param source_sql_connection: Source SQL Server connection details. + :type source_sql_connection: ~azure.mgmt.datamigration.models.SqlConnectionInformation + :param source_database_name: Name of the source database. + :type source_database_name: str + :param migration_service: Resource Id of the Migration Service. + :type migration_service: str + :param migration_operation_id: ID tracking current migration operation. + :type migration_operation_id: str + :ivar migration_failure_error: Error details in case of migration failure. + :vartype migration_failure_error: ~azure.mgmt.datamigration.models.ErrorInfo + :ivar migration_status_details: Detailed migration status. Not included by default. + :vartype migration_status_details: ~azure.mgmt.datamigration.models.MigrationStatusDetails + :param target_database_collation: Database collation to be used for the target database. + :type target_database_collation: str + :param provisioning_error: Error message for migration provisioning failure, if any. + :type provisioning_error: str + :param backup_configuration: Backup configuration info. + :type backup_configuration: ~azure.mgmt.datamigration.models.BackupConfiguration + :param offline_configuration: Offline configuration. + :type offline_configuration: ~azure.mgmt.datamigration.models.OfflineConfiguration + """ + + _validation = { + 'kind': {'required': True}, + 'provisioning_state': {'readonly': True}, + 'migration_status': {'readonly': True}, + 'started_on': {'readonly': True}, + 'ended_on': {'readonly': True}, + 'migration_failure_error': {'readonly': True}, + 'migration_status_details': {'readonly': True}, + } + + _attribute_map = { + 'kind': {'key': 'kind', 'type': 'str'}, + 'scope': {'key': 'scope', 'type': 'str'}, + 'provisioning_state': {'key': 'provisioningState', 'type': 'str'}, + 'migration_status': {'key': 'migrationStatus', 'type': 'str'}, + 'started_on': {'key': 'startedOn', 'type': 'iso-8601'}, + 'ended_on': {'key': 'endedOn', 'type': 'iso-8601'}, + 'source_sql_connection': {'key': 'sourceSqlConnection', 'type': 'SqlConnectionInformation'}, + 'source_database_name': {'key': 'sourceDatabaseName', 'type': 'str'}, + 'migration_service': {'key': 'migrationService', 'type': 'str'}, + 'migration_operation_id': {'key': 'migrationOperationId', 'type': 'str'}, + 'migration_failure_error': {'key': 'migrationFailureError', 'type': 'ErrorInfo'}, + 'migration_status_details': {'key': 'migrationStatusDetails', 'type': 'MigrationStatusDetails'}, + 'target_database_collation': {'key': 'targetDatabaseCollation', 'type': 'str'}, + 'provisioning_error': {'key': 'provisioningError', 'type': 'str'}, + 'backup_configuration': {'key': 'backupConfiguration', 'type': 'BackupConfiguration'}, + 'offline_configuration': {'key': 'offlineConfiguration', 'type': 'OfflineConfiguration'}, + } + + def __init__( + self, + *, + scope: Optional[str] = None, + source_sql_connection: Optional["SqlConnectionInformation"] = None, + source_database_name: Optional[str] = None, + migration_service: Optional[str] = None, + migration_operation_id: Optional[str] = None, + target_database_collation: Optional[str] = None, + provisioning_error: Optional[str] = None, + backup_configuration: Optional["BackupConfiguration"] = None, + offline_configuration: Optional["OfflineConfiguration"] = None, + **kwargs + ): + super(DatabaseMigrationPropertiesSqlMi, self).__init__(scope=scope, source_sql_connection=source_sql_connection, source_database_name=source_database_name, migration_service=migration_service, migration_operation_id=migration_operation_id, **kwargs) + self.kind = 'SqlMi' # type: str + self.migration_status_details = None + self.target_database_collation = target_database_collation + self.provisioning_error = provisioning_error + self.backup_configuration = backup_configuration + self.offline_configuration = offline_configuration + + +class DatabaseMigrationPropertiesSqlVm(DatabaseMigrationProperties): + """Database Migration Resource properties for SQL Virtual Machine. + + Variables are only populated by the server, and will be ignored when sending a request. + + All required parameters must be populated in order to send to Azure. + + :param kind: Required. Constant filled by server. Possible values include: "SqlMi", "SqlVm". + :type kind: str or ~azure.mgmt.datamigration.models.ResourceType + :param scope: Resource Id of the target resource (SQL VM or SQL Managed Instance). + :type scope: str + :ivar provisioning_state: Provisioning State of migration. ProvisioningState as Succeeded + implies that validations have been performed and migration has started. + :vartype provisioning_state: str + :ivar migration_status: Migration status. + :vartype migration_status: str + :ivar started_on: Database migration start time. + :vartype started_on: ~datetime.datetime + :ivar ended_on: Database migration end time. + :vartype ended_on: ~datetime.datetime + :param source_sql_connection: Source SQL Server connection details. + :type source_sql_connection: ~azure.mgmt.datamigration.models.SqlConnectionInformation + :param source_database_name: Name of the source database. + :type source_database_name: str + :param migration_service: Resource Id of the Migration Service. + :type migration_service: str + :param migration_operation_id: ID tracking current migration operation. + :type migration_operation_id: str + :ivar migration_failure_error: Error details in case of migration failure. + :vartype migration_failure_error: ~azure.mgmt.datamigration.models.ErrorInfo + :ivar migration_status_details: Detailed migration status. Not included by default. + :vartype migration_status_details: ~azure.mgmt.datamigration.models.MigrationStatusDetails + :param target_database_collation: Database collation to be used for the target database. + :type target_database_collation: str + :param provisioning_error: Error message for migration provisioning failure, if any. + :type provisioning_error: str + :param backup_configuration: Backup configuration info. + :type backup_configuration: ~azure.mgmt.datamigration.models.BackupConfiguration + :param offline_configuration: Offline configuration. + :type offline_configuration: ~azure.mgmt.datamigration.models.OfflineConfiguration + """ + + _validation = { + 'kind': {'required': True}, + 'provisioning_state': {'readonly': True}, + 'migration_status': {'readonly': True}, + 'started_on': {'readonly': True}, + 'ended_on': {'readonly': True}, + 'migration_failure_error': {'readonly': True}, + 'migration_status_details': {'readonly': True}, + } + + _attribute_map = { + 'kind': {'key': 'kind', 'type': 'str'}, + 'scope': {'key': 'scope', 'type': 'str'}, + 'provisioning_state': {'key': 'provisioningState', 'type': 'str'}, + 'migration_status': {'key': 'migrationStatus', 'type': 'str'}, + 'started_on': {'key': 'startedOn', 'type': 'iso-8601'}, + 'ended_on': {'key': 'endedOn', 'type': 'iso-8601'}, + 'source_sql_connection': {'key': 'sourceSqlConnection', 'type': 'SqlConnectionInformation'}, + 'source_database_name': {'key': 'sourceDatabaseName', 'type': 'str'}, + 'migration_service': {'key': 'migrationService', 'type': 'str'}, + 'migration_operation_id': {'key': 'migrationOperationId', 'type': 'str'}, + 'migration_failure_error': {'key': 'migrationFailureError', 'type': 'ErrorInfo'}, + 'migration_status_details': {'key': 'migrationStatusDetails', 'type': 'MigrationStatusDetails'}, + 'target_database_collation': {'key': 'targetDatabaseCollation', 'type': 'str'}, + 'provisioning_error': {'key': 'provisioningError', 'type': 'str'}, + 'backup_configuration': {'key': 'backupConfiguration', 'type': 'BackupConfiguration'}, + 'offline_configuration': {'key': 'offlineConfiguration', 'type': 'OfflineConfiguration'}, + } + + def __init__( + self, + *, + scope: Optional[str] = None, + source_sql_connection: Optional["SqlConnectionInformation"] = None, + source_database_name: Optional[str] = None, + migration_service: Optional[str] = None, + migration_operation_id: Optional[str] = None, + target_database_collation: Optional[str] = None, + provisioning_error: Optional[str] = None, + backup_configuration: Optional["BackupConfiguration"] = None, + offline_configuration: Optional["OfflineConfiguration"] = None, + **kwargs + ): + super(DatabaseMigrationPropertiesSqlVm, self).__init__(scope=scope, source_sql_connection=source_sql_connection, source_database_name=source_database_name, migration_service=migration_service, migration_operation_id=migration_operation_id, **kwargs) + self.kind = 'SqlVm' # type: str + self.migration_status_details = None + self.target_database_collation = target_database_collation + self.provisioning_error = provisioning_error + self.backup_configuration = backup_configuration + self.offline_configuration = offline_configuration + + +class DatabaseMigrationSqlMi(ProxyResource): + """Database Migration Resource for SQL Managed Instance. + + Variables are only populated by the server, and will be ignored when sending a request. + + :ivar id: + :vartype id: str + :ivar name: + :vartype name: str + :ivar type: + :vartype type: str + :ivar system_data: Metadata pertaining to creation and last modification of the resource. + :vartype system_data: ~azure.mgmt.datamigration.models.SystemData + :param properties: Database Migration Resource properties for SQL Managed Instance. + :type properties: ~azure.mgmt.datamigration.models.DatabaseMigrationPropertiesSqlMi + """ + + _validation = { + 'id': {'readonly': True}, + 'name': {'readonly': True}, + 'type': {'readonly': True}, + 'system_data': {'readonly': True}, + } + + _attribute_map = { + 'id': {'key': 'id', 'type': 'str'}, + 'name': {'key': 'name', 'type': 'str'}, + 'type': {'key': 'type', 'type': 'str'}, + 'system_data': {'key': 'systemData', 'type': 'SystemData'}, + 'properties': {'key': 'properties', 'type': 'DatabaseMigrationPropertiesSqlMi'}, + } + + def __init__( + self, + *, + properties: Optional["DatabaseMigrationPropertiesSqlMi"] = None, + **kwargs + ): + super(DatabaseMigrationSqlMi, self).__init__(**kwargs) + self.system_data = None + self.properties = properties + + +class DatabaseMigrationSqlVm(ProxyResource): + """Database Migration Resource for SQL Virtual Machine. + + Variables are only populated by the server, and will be ignored when sending a request. + + :ivar id: + :vartype id: str + :ivar name: + :vartype name: str + :ivar type: + :vartype type: str + :ivar system_data: Metadata pertaining to creation and last modification of the resource. + :vartype system_data: ~azure.mgmt.datamigration.models.SystemData + :param properties: Database Migration Resource properties for SQL Virtual Machine. + :type properties: ~azure.mgmt.datamigration.models.DatabaseMigrationPropertiesSqlVm + """ + + _validation = { + 'id': {'readonly': True}, + 'name': {'readonly': True}, + 'type': {'readonly': True}, + 'system_data': {'readonly': True}, + } + + _attribute_map = { + 'id': {'key': 'id', 'type': 'str'}, + 'name': {'key': 'name', 'type': 'str'}, + 'type': {'key': 'type', 'type': 'str'}, + 'system_data': {'key': 'systemData', 'type': 'SystemData'}, + 'properties': {'key': 'properties', 'type': 'DatabaseMigrationPropertiesSqlVm'}, + } + + def __init__( + self, + *, + properties: Optional["DatabaseMigrationPropertiesSqlVm"] = None, + **kwargs + ): + super(DatabaseMigrationSqlVm, self).__init__(**kwargs) + self.system_data = None + self.properties = properties + + +class DatabaseObjectName(msrest.serialization.Model): + """A representation of the name of an object in a database. + + Variables are only populated by the server, and will be ignored when sending a request. + + :ivar database_name: The unescaped name of the database containing the object. + :vartype database_name: str + :ivar object_name: The unescaped name of the object. + :vartype object_name: str + :ivar schema_name: The unescaped name of the schema containing the object. + :vartype schema_name: str + :param object_type: Type of the object in the database. Possible values include: + "StoredProcedures", "Table", "User", "View", "Function". + :type object_type: str or ~azure.mgmt.datamigration.models.ObjectType + """ + + _validation = { + 'database_name': {'readonly': True}, + 'object_name': {'readonly': True}, + 'schema_name': {'readonly': True}, + } + + _attribute_map = { + 'database_name': {'key': 'databaseName', 'type': 'str'}, + 'object_name': {'key': 'objectName', 'type': 'str'}, + 'schema_name': {'key': 'schemaName', 'type': 'str'}, + 'object_type': {'key': 'objectType', 'type': 'str'}, + } + + def __init__( + self, + *, + object_type: Optional[Union[str, "ObjectType"]] = None, + **kwargs + ): + super(DatabaseObjectName, self).__init__(**kwargs) + self.database_name = None + self.object_name = None + self.schema_name = None + self.object_type = object_type + + +class DataItemMigrationSummaryResult(msrest.serialization.Model): + """Basic summary of a data item migration. + + Variables are only populated by the server, and will be ignored when sending a request. + + :ivar name: Name of the item. + :vartype name: str + :ivar started_on: Migration start time. + :vartype started_on: ~datetime.datetime + :ivar ended_on: Migration end time. + :vartype ended_on: ~datetime.datetime + :ivar state: Current state of migration. Possible values include: "None", "InProgress", + "Failed", "Warning", "Completed", "Skipped", "Stopped". + :vartype state: str or ~azure.mgmt.datamigration.models.MigrationState + :ivar status_message: Status message. + :vartype status_message: str + :ivar items_count: Number of items. + :vartype items_count: long + :ivar items_completed_count: Number of successfully completed items. + :vartype items_completed_count: long + :ivar error_prefix: Wildcard string prefix to use for querying all errors of the item. + :vartype error_prefix: str + :ivar result_prefix: Wildcard string prefix to use for querying all sub-tem results of the + item. + :vartype result_prefix: str + """ + + _validation = { + 'name': {'readonly': True}, + 'started_on': {'readonly': True}, + 'ended_on': {'readonly': True}, + 'state': {'readonly': True}, + 'status_message': {'readonly': True}, + 'items_count': {'readonly': True}, + 'items_completed_count': {'readonly': True}, + 'error_prefix': {'readonly': True}, + 'result_prefix': {'readonly': True}, + } + + _attribute_map = { + 'name': {'key': 'name', 'type': 'str'}, + 'started_on': {'key': 'startedOn', 'type': 'iso-8601'}, + 'ended_on': {'key': 'endedOn', 'type': 'iso-8601'}, + 'state': {'key': 'state', 'type': 'str'}, + 'status_message': {'key': 'statusMessage', 'type': 'str'}, + 'items_count': {'key': 'itemsCount', 'type': 'long'}, + 'items_completed_count': {'key': 'itemsCompletedCount', 'type': 'long'}, + 'error_prefix': {'key': 'errorPrefix', 'type': 'str'}, + 'result_prefix': {'key': 'resultPrefix', 'type': 'str'}, + } + + def __init__( + self, + **kwargs + ): + super(DataItemMigrationSummaryResult, self).__init__(**kwargs) + self.name = None + self.started_on = None + self.ended_on = None + self.state = None + self.status_message = None + self.items_count = None + self.items_completed_count = None + self.error_prefix = None + self.result_prefix = None + + +class DatabaseSummaryResult(DataItemMigrationSummaryResult): + """Summary of database results in the migration. + + Variables are only populated by the server, and will be ignored when sending a request. + + :ivar name: Name of the item. + :vartype name: str + :ivar started_on: Migration start time. + :vartype started_on: ~datetime.datetime + :ivar ended_on: Migration end time. + :vartype ended_on: ~datetime.datetime + :ivar state: Current state of migration. Possible values include: "None", "InProgress", + "Failed", "Warning", "Completed", "Skipped", "Stopped". + :vartype state: str or ~azure.mgmt.datamigration.models.MigrationState + :ivar status_message: Status message. + :vartype status_message: str + :ivar items_count: Number of items. + :vartype items_count: long + :ivar items_completed_count: Number of successfully completed items. + :vartype items_completed_count: long + :ivar error_prefix: Wildcard string prefix to use for querying all errors of the item. + :vartype error_prefix: str + :ivar result_prefix: Wildcard string prefix to use for querying all sub-tem results of the + item. + :vartype result_prefix: str + :ivar size_mb: Size of the database in megabytes. + :vartype size_mb: float + """ + + _validation = { + 'name': {'readonly': True}, + 'started_on': {'readonly': True}, + 'ended_on': {'readonly': True}, + 'state': {'readonly': True}, + 'status_message': {'readonly': True}, + 'items_count': {'readonly': True}, + 'items_completed_count': {'readonly': True}, + 'error_prefix': {'readonly': True}, + 'result_prefix': {'readonly': True}, + 'size_mb': {'readonly': True}, + } + + _attribute_map = { + 'name': {'key': 'name', 'type': 'str'}, + 'started_on': {'key': 'startedOn', 'type': 'iso-8601'}, + 'ended_on': {'key': 'endedOn', 'type': 'iso-8601'}, + 'state': {'key': 'state', 'type': 'str'}, + 'status_message': {'key': 'statusMessage', 'type': 'str'}, + 'items_count': {'key': 'itemsCount', 'type': 'long'}, + 'items_completed_count': {'key': 'itemsCompletedCount', 'type': 'long'}, + 'error_prefix': {'key': 'errorPrefix', 'type': 'str'}, + 'result_prefix': {'key': 'resultPrefix', 'type': 'str'}, + 'size_mb': {'key': 'sizeMB', 'type': 'float'}, + } + + def __init__( + self, + **kwargs + ): + super(DatabaseSummaryResult, self).__init__(**kwargs) + self.size_mb = None + + +class DatabaseTable(msrest.serialization.Model): + """Table properties. + + Variables are only populated by the server, and will be ignored when sending a request. + + :ivar has_rows: Indicates whether table is empty or not. + :vartype has_rows: bool + :ivar name: Schema-qualified name of the table. + :vartype name: str + """ + + _validation = { + 'has_rows': {'readonly': True}, + 'name': {'readonly': True}, + } + + _attribute_map = { + 'has_rows': {'key': 'hasRows', 'type': 'bool'}, + 'name': {'key': 'name', 'type': 'str'}, + } + + def __init__( + self, + **kwargs + ): + super(DatabaseTable, self).__init__(**kwargs) + self.has_rows = None + self.name = None + + +class DataIntegrityValidationResult(msrest.serialization.Model): + """Results for checksum based Data Integrity validation results. + + :param failed_objects: List of failed table names of source and target pair. + :type failed_objects: dict[str, str] + :param validation_errors: List of errors that happened while performing data integrity + validation. + :type validation_errors: ~azure.mgmt.datamigration.models.ValidationError + """ + + _attribute_map = { + 'failed_objects': {'key': 'failedObjects', 'type': '{str}'}, + 'validation_errors': {'key': 'validationErrors', 'type': 'ValidationError'}, + } + + def __init__( + self, + *, + failed_objects: Optional[Dict[str, str]] = None, + validation_errors: Optional["ValidationError"] = None, + **kwargs + ): + super(DataIntegrityValidationResult, self).__init__(**kwargs) + self.failed_objects = failed_objects + self.validation_errors = validation_errors + + +class DataMigrationError(msrest.serialization.Model): + """Migration Task errors. + + Variables are only populated by the server, and will be ignored when sending a request. + + :ivar message: Error description. + :vartype message: str + :param type: Error type. Possible values include: "Default", "Warning", "Error". + :type type: str or ~azure.mgmt.datamigration.models.ErrorType + """ + + _validation = { + 'message': {'readonly': True}, + } + + _attribute_map = { + 'message': {'key': 'message', 'type': 'str'}, + 'type': {'key': 'type', 'type': 'str'}, + } + + def __init__( + self, + *, + type: Optional[Union[str, "ErrorType"]] = None, + **kwargs + ): + super(DataMigrationError, self).__init__(**kwargs) + self.message = None + self.type = type + + +class DataMigrationProjectMetadata(msrest.serialization.Model): + """Common metadata for migration projects. + + Variables are only populated by the server, and will be ignored when sending a request. + + :ivar source_server_name: Source server name. + :vartype source_server_name: str + :ivar source_server_port: Source server port number. + :vartype source_server_port: str + :ivar source_username: Source username. + :vartype source_username: str + :ivar target_server_name: Target server name. + :vartype target_server_name: str + :ivar target_username: Target username. + :vartype target_username: str + :ivar target_db_name: Target database name. + :vartype target_db_name: str + :ivar target_using_win_auth: Whether target connection is Windows authentication. + :vartype target_using_win_auth: bool + :ivar selected_migration_tables: List of tables selected for migration. + :vartype selected_migration_tables: + list[~azure.mgmt.datamigration.models.MigrationTableMetadata] + """ + + _validation = { + 'source_server_name': {'readonly': True}, + 'source_server_port': {'readonly': True}, + 'source_username': {'readonly': True}, + 'target_server_name': {'readonly': True}, + 'target_username': {'readonly': True}, + 'target_db_name': {'readonly': True}, + 'target_using_win_auth': {'readonly': True}, + 'selected_migration_tables': {'readonly': True}, + } + + _attribute_map = { + 'source_server_name': {'key': 'sourceServerName', 'type': 'str'}, + 'source_server_port': {'key': 'sourceServerPort', 'type': 'str'}, + 'source_username': {'key': 'sourceUsername', 'type': 'str'}, + 'target_server_name': {'key': 'targetServerName', 'type': 'str'}, + 'target_username': {'key': 'targetUsername', 'type': 'str'}, + 'target_db_name': {'key': 'targetDbName', 'type': 'str'}, + 'target_using_win_auth': {'key': 'targetUsingWinAuth', 'type': 'bool'}, + 'selected_migration_tables': {'key': 'selectedMigrationTables', 'type': '[MigrationTableMetadata]'}, + } + + def __init__( + self, + **kwargs + ): + super(DataMigrationProjectMetadata, self).__init__(**kwargs) + self.source_server_name = None + self.source_server_port = None + self.source_username = None + self.target_server_name = None + self.target_username = None + self.target_db_name = None + self.target_using_win_auth = None + self.selected_migration_tables = None + + +class TrackedResource(msrest.serialization.Model): + """TrackedResource. + + Variables are only populated by the server, and will be ignored when sending a request. + + :param location: + :type location: str + :param tags: A set of tags. Dictionary of :code:``. + :type tags: dict[str, str] + :ivar id: + :vartype id: str + :ivar name: + :vartype name: str + :ivar type: + :vartype type: str + :ivar system_data: + :vartype system_data: ~azure.mgmt.datamigration.models.SystemData + """ + + _validation = { + 'id': {'readonly': True}, + 'name': {'readonly': True}, + 'type': {'readonly': True}, + 'system_data': {'readonly': True}, + } + + _attribute_map = { + 'location': {'key': 'location', 'type': 'str'}, + 'tags': {'key': 'tags', 'type': '{str}'}, + 'id': {'key': 'id', 'type': 'str'}, + 'name': {'key': 'name', 'type': 'str'}, + 'type': {'key': 'type', 'type': 'str'}, + 'system_data': {'key': 'systemData', 'type': 'SystemData'}, + } + + def __init__( + self, + *, + location: Optional[str] = None, + tags: Optional[Dict[str, str]] = None, + **kwargs + ): + super(TrackedResource, self).__init__(**kwargs) + self.location = location + self.tags = tags + self.id = None + self.name = None + self.type = None + self.system_data = None + + +class DataMigrationService(TrackedResource): + """A Database Migration Service resource. + + Variables are only populated by the server, and will be ignored when sending a request. + + :param location: + :type location: str + :param tags: A set of tags. Dictionary of :code:``. + :type tags: dict[str, str] + :ivar id: + :vartype id: str + :ivar name: + :vartype name: str + :ivar type: + :vartype type: str + :ivar system_data: + :vartype system_data: ~azure.mgmt.datamigration.models.SystemData + :param etag: HTTP strong entity tag value. Ignored if submitted. + :type etag: str + :param kind: The resource kind. Only 'vm' (the default) is supported. + :type kind: str + :param sku: Service SKU. + :type sku: ~azure.mgmt.datamigration.models.ServiceSku + :ivar provisioning_state: The resource's provisioning state. Possible values include: + "Accepted", "Deleting", "Deploying", "Stopped", "Stopping", "Starting", "FailedToStart", + "FailedToStop", "Succeeded", "Failed". + :vartype provisioning_state: str or ~azure.mgmt.datamigration.models.ServiceProvisioningState + :param public_key: The public key of the service, used to encrypt secrets sent to the service. + :type public_key: str + :param virtual_subnet_id: The ID of the Microsoft.Network/virtualNetworks/subnets resource to + which the service should be joined. + :type virtual_subnet_id: str + :param virtual_nic_id: The ID of the Microsoft.Network/networkInterfaces resource which the + service have. + :type virtual_nic_id: str + :param auto_stop_delay: The time delay before the service is auto-stopped when idle. + :type auto_stop_delay: str + :param delete_resources_on_stop: Whether service resources should be deleted when stopped. + (Turned on by default). + :type delete_resources_on_stop: bool + """ + + _validation = { + 'id': {'readonly': True}, + 'name': {'readonly': True}, + 'type': {'readonly': True}, + 'system_data': {'readonly': True}, + 'provisioning_state': {'readonly': True}, + } + + _attribute_map = { + 'location': {'key': 'location', 'type': 'str'}, + 'tags': {'key': 'tags', 'type': '{str}'}, + 'id': {'key': 'id', 'type': 'str'}, + 'name': {'key': 'name', 'type': 'str'}, + 'type': {'key': 'type', 'type': 'str'}, + 'system_data': {'key': 'systemData', 'type': 'SystemData'}, + 'etag': {'key': 'etag', 'type': 'str'}, + 'kind': {'key': 'kind', 'type': 'str'}, + 'sku': {'key': 'sku', 'type': 'ServiceSku'}, + 'provisioning_state': {'key': 'properties.provisioningState', 'type': 'str'}, + 'public_key': {'key': 'properties.publicKey', 'type': 'str'}, + 'virtual_subnet_id': {'key': 'properties.virtualSubnetId', 'type': 'str'}, + 'virtual_nic_id': {'key': 'properties.virtualNicId', 'type': 'str'}, + 'auto_stop_delay': {'key': 'properties.autoStopDelay', 'type': 'str'}, + 'delete_resources_on_stop': {'key': 'properties.deleteResourcesOnStop', 'type': 'bool'}, + } + + def __init__( + self, + *, + location: Optional[str] = None, + tags: Optional[Dict[str, str]] = None, + etag: Optional[str] = None, + kind: Optional[str] = None, + sku: Optional["ServiceSku"] = None, + public_key: Optional[str] = None, + virtual_subnet_id: Optional[str] = None, + virtual_nic_id: Optional[str] = None, + auto_stop_delay: Optional[str] = None, + delete_resources_on_stop: Optional[bool] = None, + **kwargs + ): + super(DataMigrationService, self).__init__(location=location, tags=tags, **kwargs) + self.etag = etag + self.kind = kind + self.sku = sku + self.provisioning_state = None + self.public_key = public_key + self.virtual_subnet_id = virtual_subnet_id + self.virtual_nic_id = virtual_nic_id + self.auto_stop_delay = auto_stop_delay + self.delete_resources_on_stop = delete_resources_on_stop + + +class DataMigrationServiceList(msrest.serialization.Model): + """OData page of service objects. + + :param value: List of services. + :type value: list[~azure.mgmt.datamigration.models.DataMigrationService] + :param next_link: URL to load the next page of services. + :type next_link: str + """ + + _attribute_map = { + 'value': {'key': 'value', 'type': '[DataMigrationService]'}, + 'next_link': {'key': 'nextLink', 'type': 'str'}, + } + + def __init__( + self, + *, + value: Optional[List["DataMigrationService"]] = None, + next_link: Optional[str] = None, + **kwargs + ): + super(DataMigrationServiceList, self).__init__(**kwargs) + self.value = value + self.next_link = next_link + + +class DataMigrationServiceStatusResponse(msrest.serialization.Model): + """Service health status. + + :param agent_version: The DMS instance agent version. + :type agent_version: str + :param status: The machine-readable status, such as 'Initializing', 'Offline', 'Online', + 'Deploying', 'Deleting', 'Stopped', 'Stopping', 'Starting', 'FailedToStart', 'FailedToStop' or + 'Failed'. + :type status: str + :param vm_size: The services virtual machine size, such as 'Standard_D2_v2'. + :type vm_size: str + :param supported_task_types: The list of supported task types. + :type supported_task_types: list[str] + """ + + _attribute_map = { + 'agent_version': {'key': 'agentVersion', 'type': 'str'}, + 'status': {'key': 'status', 'type': 'str'}, + 'vm_size': {'key': 'vmSize', 'type': 'str'}, + 'supported_task_types': {'key': 'supportedTaskTypes', 'type': '[str]'}, + } + + def __init__( + self, + *, + agent_version: Optional[str] = None, + status: Optional[str] = None, + vm_size: Optional[str] = None, + supported_task_types: Optional[List[str]] = None, + **kwargs + ): + super(DataMigrationServiceStatusResponse, self).__init__(**kwargs) + self.agent_version = agent_version + self.status = status + self.vm_size = vm_size + self.supported_task_types = supported_task_types + + +class DeleteNode(msrest.serialization.Model): + """Details of node to be deleted. + + :param node_name: The name of node to delete. + :type node_name: str + :param integration_runtime_name: The name of integration runtime. + :type integration_runtime_name: str + """ + + _attribute_map = { + 'node_name': {'key': 'nodeName', 'type': 'str'}, + 'integration_runtime_name': {'key': 'integrationRuntimeName', 'type': 'str'}, + } + + def __init__( + self, + *, + node_name: Optional[str] = None, + integration_runtime_name: Optional[str] = None, + **kwargs + ): + super(DeleteNode, self).__init__(**kwargs) + self.node_name = node_name + self.integration_runtime_name = integration_runtime_name + + +class ErrorInfo(msrest.serialization.Model): + """Error details. + + Variables are only populated by the server, and will be ignored when sending a request. + + :ivar code: Error code. + :vartype code: str + :ivar message: Error message. + :vartype message: str + """ + + _validation = { + 'code': {'readonly': True}, + 'message': {'readonly': True}, + } + + _attribute_map = { + 'code': {'key': 'code', 'type': 'str'}, + 'message': {'key': 'message', 'type': 'str'}, + } + + def __init__( + self, + **kwargs + ): + super(ErrorInfo, self).__init__(**kwargs) + self.code = None + self.message = None + + +class ExecutionStatistics(msrest.serialization.Model): + """Description about the errors happen while performing migration validation. + + :param execution_count: No. of query executions. + :type execution_count: long + :param cpu_time_ms: CPU Time in millisecond(s) for the query execution. + :type cpu_time_ms: float + :param elapsed_time_ms: Time taken in millisecond(s) for executing the query. + :type elapsed_time_ms: float + :param wait_stats: Dictionary of sql query execution wait types and the respective statistics. + :type wait_stats: dict[str, ~azure.mgmt.datamigration.models.WaitStatistics] + :param has_errors: Indicates whether the query resulted in an error. + :type has_errors: bool + :param sql_errors: List of sql Errors. + :type sql_errors: list[str] + """ + + _attribute_map = { + 'execution_count': {'key': 'executionCount', 'type': 'long'}, + 'cpu_time_ms': {'key': 'cpuTimeMs', 'type': 'float'}, + 'elapsed_time_ms': {'key': 'elapsedTimeMs', 'type': 'float'}, + 'wait_stats': {'key': 'waitStats', 'type': '{WaitStatistics}'}, + 'has_errors': {'key': 'hasErrors', 'type': 'bool'}, + 'sql_errors': {'key': 'sqlErrors', 'type': '[str]'}, + } + + def __init__( + self, + *, + execution_count: Optional[int] = None, + cpu_time_ms: Optional[float] = None, + elapsed_time_ms: Optional[float] = None, + wait_stats: Optional[Dict[str, "WaitStatistics"]] = None, + has_errors: Optional[bool] = None, + sql_errors: Optional[List[str]] = None, + **kwargs + ): + super(ExecutionStatistics, self).__init__(**kwargs) + self.execution_count = execution_count + self.cpu_time_ms = cpu_time_ms + self.elapsed_time_ms = elapsed_time_ms + self.wait_stats = wait_stats + self.has_errors = has_errors + self.sql_errors = sql_errors + + +class FileList(msrest.serialization.Model): + """OData page of files. + + :param value: List of files. + :type value: list[~azure.mgmt.datamigration.models.ProjectFile] + :param next_link: URL to load the next page of files. + :type next_link: str + """ + + _attribute_map = { + 'value': {'key': 'value', 'type': '[ProjectFile]'}, + 'next_link': {'key': 'nextLink', 'type': 'str'}, + } + + def __init__( + self, + *, + value: Optional[List["ProjectFile"]] = None, + next_link: Optional[str] = None, + **kwargs + ): + super(FileList, self).__init__(**kwargs) + self.value = value + self.next_link = next_link + + +class FileShare(msrest.serialization.Model): + """File share information with Path, Username, and Password. + + All required parameters must be populated in order to send to Azure. + + :param user_name: User name credential to connect to the share location. + :type user_name: str + :param password: Password credential used to connect to the share location. + :type password: str + :param path: Required. The folder path for this share. + :type path: str + """ + + _validation = { + 'path': {'required': True}, + } + + _attribute_map = { + 'user_name': {'key': 'userName', 'type': 'str'}, + 'password': {'key': 'password', 'type': 'str'}, + 'path': {'key': 'path', 'type': 'str'}, + } + + def __init__( + self, + *, + path: str, + user_name: Optional[str] = None, + password: Optional[str] = None, + **kwargs + ): + super(FileShare, self).__init__(**kwargs) + self.user_name = user_name + self.password = password + self.path = path + + +class FileStorageInfo(msrest.serialization.Model): + """File storage information. + + :param uri: A URI that can be used to access the file content. + :type uri: str + :param headers: Dictionary of :code:``. + :type headers: dict[str, str] + """ + + _attribute_map = { + 'uri': {'key': 'uri', 'type': 'str'}, + 'headers': {'key': 'headers', 'type': '{str}'}, + } + + def __init__( + self, + *, + uri: Optional[str] = None, + headers: Optional[Dict[str, str]] = None, + **kwargs + ): + super(FileStorageInfo, self).__init__(**kwargs) + self.uri = uri + self.headers = headers + + +class GetProjectDetailsNonSqlTaskInput(msrest.serialization.Model): + """Input for the task that reads configuration from project artifacts. + + All required parameters must be populated in order to send to Azure. + + :param project_name: Required. Name of the migration project. + :type project_name: str + :param project_location: Required. A URL that points to the location to access project + artifacts. + :type project_location: str + """ + + _validation = { + 'project_name': {'required': True}, + 'project_location': {'required': True}, + } + + _attribute_map = { + 'project_name': {'key': 'projectName', 'type': 'str'}, + 'project_location': {'key': 'projectLocation', 'type': 'str'}, + } + + def __init__( + self, + *, + project_name: str, + project_location: str, + **kwargs + ): + super(GetProjectDetailsNonSqlTaskInput, self).__init__(**kwargs) + self.project_name = project_name + self.project_location = project_location + + +class GetTdeCertificatesSqlTaskInput(msrest.serialization.Model): + """Input for the task that gets TDE certificates in Base64 encoded format. + + All required parameters must be populated in order to send to Azure. + + :param connection_info: Required. Connection information for SQL Server. + :type connection_info: ~azure.mgmt.datamigration.models.SqlConnectionInfo + :param backup_file_share: Required. Backup file share information for file share to be used for + temporarily storing files. + :type backup_file_share: ~azure.mgmt.datamigration.models.FileShare + :param selected_certificates: Required. List containing certificate names and corresponding + password to use for encrypting the exported certificate. + :type selected_certificates: list[~azure.mgmt.datamigration.models.SelectedCertificateInput] + """ + + _validation = { + 'connection_info': {'required': True}, + 'backup_file_share': {'required': True}, + 'selected_certificates': {'required': True}, + } + + _attribute_map = { + 'connection_info': {'key': 'connectionInfo', 'type': 'SqlConnectionInfo'}, + 'backup_file_share': {'key': 'backupFileShare', 'type': 'FileShare'}, + 'selected_certificates': {'key': 'selectedCertificates', 'type': '[SelectedCertificateInput]'}, + } + + def __init__( + self, + *, + connection_info: "SqlConnectionInfo", + backup_file_share: "FileShare", + selected_certificates: List["SelectedCertificateInput"], + **kwargs + ): + super(GetTdeCertificatesSqlTaskInput, self).__init__(**kwargs) + self.connection_info = connection_info + self.backup_file_share = backup_file_share + self.selected_certificates = selected_certificates + + +class GetTdeCertificatesSqlTaskOutput(msrest.serialization.Model): + """Output of the task that gets TDE certificates in Base64 encoded format. + + Variables are only populated by the server, and will be ignored when sending a request. + + :ivar base64_encoded_certificates: Mapping from certificate name to base 64 encoded format. + :vartype base64_encoded_certificates: str + :ivar validation_errors: Validation errors. + :vartype validation_errors: list[~azure.mgmt.datamigration.models.ReportableException] + """ + + _validation = { + 'base64_encoded_certificates': {'readonly': True}, + 'validation_errors': {'readonly': True}, + } + + _attribute_map = { + 'base64_encoded_certificates': {'key': 'base64EncodedCertificates', 'type': 'str'}, + 'validation_errors': {'key': 'validationErrors', 'type': '[ReportableException]'}, + } + + def __init__( + self, + **kwargs + ): + super(GetTdeCertificatesSqlTaskOutput, self).__init__(**kwargs) + self.base64_encoded_certificates = None + self.validation_errors = None + + +class GetTdeCertificatesSqlTaskProperties(ProjectTaskProperties): + """Properties for the task that gets TDE certificates in Base64 encoded format. + + Variables are only populated by the server, and will be ignored when sending a request. + + All required parameters must be populated in order to send to Azure. + + :param task_type: Required. Task type.Constant filled by server. Possible values include: + "Connect.MongoDb", "ConnectToSource.SqlServer", "ConnectToSource.SqlServer.Sync", + "ConnectToSource.PostgreSql.Sync", "ConnectToSource.MySql", "ConnectToSource.Oracle.Sync", + "ConnectToTarget.SqlDb", "ConnectToTarget.SqlDb.Sync", + "ConnectToTarget.AzureDbForPostgreSql.Sync", + "ConnectToTarget.Oracle.AzureDbForPostgreSql.Sync", "ConnectToTarget.AzureSqlDbMI", + "ConnectToTarget.AzureSqlDbMI.Sync.LRS", "ConnectToTarget.AzureDbForMySql", + "GetUserTables.Sql", "GetUserTables.AzureSqlDb.Sync", "GetUserTablesOracle", + "GetUserTablesPostgreSql", "GetUserTablesMySql", "Migrate.MongoDb", + "Migrate.SqlServer.AzureSqlDbMI", "Migrate.SqlServer.AzureSqlDbMI.Sync.LRS", + "Migrate.SqlServer.SqlDb", "Migrate.SqlServer.AzureSqlDb.Sync", + "Migrate.MySql.AzureDbForMySql.Sync", "Migrate.MySql.AzureDbForMySql", + "Migrate.PostgreSql.AzureDbForPostgreSql.SyncV2", "Migrate.Oracle.AzureDbForPostgreSql.Sync", + "ValidateMigrationInput.SqlServer.SqlDb.Sync", "ValidateMigrationInput.SqlServer.AzureSqlDbMI", + "ValidateMigrationInput.SqlServer.AzureSqlDbMI.Sync.LRS", "Validate.MongoDb", + "Validate.Oracle.AzureDbPostgreSql.Sync", "GetTDECertificates.Sql", "Migrate.Ssis", + "Service.Check.OCI", "Service.Upload.OCI", "Service.Install.OCI", + "MigrateSchemaSqlServerSqlDb". + :type task_type: str or ~azure.mgmt.datamigration.models.TaskType + :ivar errors: Array of errors. This is ignored if submitted. + :vartype errors: list[~azure.mgmt.datamigration.models.ODataError] + :ivar state: The state of the task. This is ignored if submitted. Possible values include: + "Unknown", "Queued", "Running", "Canceled", "Succeeded", "Failed", "FailedInputValidation", + "Faulted". + :vartype state: str or ~azure.mgmt.datamigration.models.TaskState + :ivar commands: Array of command properties. + :vartype commands: list[~azure.mgmt.datamigration.models.CommandProperties] + :param client_data: Key value pairs of client data to attach meta data information to task. + :type client_data: dict[str, str] + :param input: Task input. + :type input: ~azure.mgmt.datamigration.models.GetTdeCertificatesSqlTaskInput + :ivar output: Task output. This is ignored if submitted. + :vartype output: list[~azure.mgmt.datamigration.models.GetTdeCertificatesSqlTaskOutput] + """ + + _validation = { + 'task_type': {'required': True}, + 'errors': {'readonly': True}, + 'state': {'readonly': True}, + 'commands': {'readonly': True}, + 'output': {'readonly': True}, + } + + _attribute_map = { + 'task_type': {'key': 'taskType', 'type': 'str'}, + 'errors': {'key': 'errors', 'type': '[ODataError]'}, + 'state': {'key': 'state', 'type': 'str'}, + 'commands': {'key': 'commands', 'type': '[CommandProperties]'}, + 'client_data': {'key': 'clientData', 'type': '{str}'}, + 'input': {'key': 'input', 'type': 'GetTdeCertificatesSqlTaskInput'}, + 'output': {'key': 'output', 'type': '[GetTdeCertificatesSqlTaskOutput]'}, + } + + def __init__( + self, + *, + client_data: Optional[Dict[str, str]] = None, + input: Optional["GetTdeCertificatesSqlTaskInput"] = None, + **kwargs + ): + super(GetTdeCertificatesSqlTaskProperties, self).__init__(client_data=client_data, **kwargs) + self.task_type = 'GetTDECertificates.Sql' # type: str + self.input = input + self.output = None + + +class GetUserTablesMySqlTaskInput(msrest.serialization.Model): + """Input for the task that collects user tables for the given list of databases. + + All required parameters must be populated in order to send to Azure. + + :param connection_info: Required. Connection information for SQL Server. + :type connection_info: ~azure.mgmt.datamigration.models.MySqlConnectionInfo + :param selected_databases: Required. List of database names to collect tables for. + :type selected_databases: list[str] + """ + + _validation = { + 'connection_info': {'required': True}, + 'selected_databases': {'required': True}, + } + + _attribute_map = { + 'connection_info': {'key': 'connectionInfo', 'type': 'MySqlConnectionInfo'}, + 'selected_databases': {'key': 'selectedDatabases', 'type': '[str]'}, + } + + def __init__( + self, + *, + connection_info: "MySqlConnectionInfo", + selected_databases: List[str], + **kwargs + ): + super(GetUserTablesMySqlTaskInput, self).__init__(**kwargs) + self.connection_info = connection_info + self.selected_databases = selected_databases + + +class GetUserTablesMySqlTaskOutput(msrest.serialization.Model): + """Output of the task that collects user tables for the given list of databases. + + Variables are only populated by the server, and will be ignored when sending a request. + + :ivar id: Result identifier. + :vartype id: str + :ivar databases_to_tables: Mapping from database name to list of tables. + :vartype databases_to_tables: str + :ivar validation_errors: Validation errors. + :vartype validation_errors: list[~azure.mgmt.datamigration.models.ReportableException] + """ + + _validation = { + 'id': {'readonly': True}, + 'databases_to_tables': {'readonly': True}, + 'validation_errors': {'readonly': True}, + } + + _attribute_map = { + 'id': {'key': 'id', 'type': 'str'}, + 'databases_to_tables': {'key': 'databasesToTables', 'type': 'str'}, + 'validation_errors': {'key': 'validationErrors', 'type': '[ReportableException]'}, + } + + def __init__( + self, + **kwargs + ): + super(GetUserTablesMySqlTaskOutput, self).__init__(**kwargs) + self.id = None + self.databases_to_tables = None + self.validation_errors = None + + +class GetUserTablesMySqlTaskProperties(ProjectTaskProperties): + """Properties for the task that collects user tables for the given list of databases. + + Variables are only populated by the server, and will be ignored when sending a request. + + All required parameters must be populated in order to send to Azure. + + :param task_type: Required. Task type.Constant filled by server. Possible values include: + "Connect.MongoDb", "ConnectToSource.SqlServer", "ConnectToSource.SqlServer.Sync", + "ConnectToSource.PostgreSql.Sync", "ConnectToSource.MySql", "ConnectToSource.Oracle.Sync", + "ConnectToTarget.SqlDb", "ConnectToTarget.SqlDb.Sync", + "ConnectToTarget.AzureDbForPostgreSql.Sync", + "ConnectToTarget.Oracle.AzureDbForPostgreSql.Sync", "ConnectToTarget.AzureSqlDbMI", + "ConnectToTarget.AzureSqlDbMI.Sync.LRS", "ConnectToTarget.AzureDbForMySql", + "GetUserTables.Sql", "GetUserTables.AzureSqlDb.Sync", "GetUserTablesOracle", + "GetUserTablesPostgreSql", "GetUserTablesMySql", "Migrate.MongoDb", + "Migrate.SqlServer.AzureSqlDbMI", "Migrate.SqlServer.AzureSqlDbMI.Sync.LRS", + "Migrate.SqlServer.SqlDb", "Migrate.SqlServer.AzureSqlDb.Sync", + "Migrate.MySql.AzureDbForMySql.Sync", "Migrate.MySql.AzureDbForMySql", + "Migrate.PostgreSql.AzureDbForPostgreSql.SyncV2", "Migrate.Oracle.AzureDbForPostgreSql.Sync", + "ValidateMigrationInput.SqlServer.SqlDb.Sync", "ValidateMigrationInput.SqlServer.AzureSqlDbMI", + "ValidateMigrationInput.SqlServer.AzureSqlDbMI.Sync.LRS", "Validate.MongoDb", + "Validate.Oracle.AzureDbPostgreSql.Sync", "GetTDECertificates.Sql", "Migrate.Ssis", + "Service.Check.OCI", "Service.Upload.OCI", "Service.Install.OCI", + "MigrateSchemaSqlServerSqlDb". + :type task_type: str or ~azure.mgmt.datamigration.models.TaskType + :ivar errors: Array of errors. This is ignored if submitted. + :vartype errors: list[~azure.mgmt.datamigration.models.ODataError] + :ivar state: The state of the task. This is ignored if submitted. Possible values include: + "Unknown", "Queued", "Running", "Canceled", "Succeeded", "Failed", "FailedInputValidation", + "Faulted". + :vartype state: str or ~azure.mgmt.datamigration.models.TaskState + :ivar commands: Array of command properties. + :vartype commands: list[~azure.mgmt.datamigration.models.CommandProperties] + :param client_data: Key value pairs of client data to attach meta data information to task. + :type client_data: dict[str, str] + :param input: Task input. + :type input: ~azure.mgmt.datamigration.models.GetUserTablesMySqlTaskInput + :ivar output: Task output. This is ignored if submitted. + :vartype output: list[~azure.mgmt.datamigration.models.GetUserTablesMySqlTaskOutput] + """ + + _validation = { + 'task_type': {'required': True}, + 'errors': {'readonly': True}, + 'state': {'readonly': True}, + 'commands': {'readonly': True}, + 'output': {'readonly': True}, + } + + _attribute_map = { + 'task_type': {'key': 'taskType', 'type': 'str'}, + 'errors': {'key': 'errors', 'type': '[ODataError]'}, + 'state': {'key': 'state', 'type': 'str'}, + 'commands': {'key': 'commands', 'type': '[CommandProperties]'}, + 'client_data': {'key': 'clientData', 'type': '{str}'}, + 'input': {'key': 'input', 'type': 'GetUserTablesMySqlTaskInput'}, + 'output': {'key': 'output', 'type': '[GetUserTablesMySqlTaskOutput]'}, + } + + def __init__( + self, + *, + client_data: Optional[Dict[str, str]] = None, + input: Optional["GetUserTablesMySqlTaskInput"] = None, + **kwargs + ): + super(GetUserTablesMySqlTaskProperties, self).__init__(client_data=client_data, **kwargs) + self.task_type = 'GetUserTablesMySql' # type: str + self.input = input + self.output = None + + +class GetUserTablesOracleTaskInput(msrest.serialization.Model): + """Input for the task that gets the list of tables contained within a provided list of Oracle schemas. + + All required parameters must be populated in order to send to Azure. + + :param connection_info: Required. Information for connecting to Oracle source. + :type connection_info: ~azure.mgmt.datamigration.models.OracleConnectionInfo + :param selected_schemas: Required. List of Oracle schemas for which to collect tables. + :type selected_schemas: list[str] + """ + + _validation = { + 'connection_info': {'required': True}, + 'selected_schemas': {'required': True}, + } + + _attribute_map = { + 'connection_info': {'key': 'connectionInfo', 'type': 'OracleConnectionInfo'}, + 'selected_schemas': {'key': 'selectedSchemas', 'type': '[str]'}, + } + + def __init__( + self, + *, + connection_info: "OracleConnectionInfo", + selected_schemas: List[str], + **kwargs + ): + super(GetUserTablesOracleTaskInput, self).__init__(**kwargs) + self.connection_info = connection_info + self.selected_schemas = selected_schemas + + +class GetUserTablesOracleTaskOutput(msrest.serialization.Model): + """Output for the task that gets the list of tables contained within a provided list of Oracle schemas. + + Variables are only populated by the server, and will be ignored when sending a request. + + :ivar schema_name: The schema this result is for. + :vartype schema_name: str + :ivar tables: List of valid tables found for this schema. + :vartype tables: list[~azure.mgmt.datamigration.models.DatabaseTable] + :ivar validation_errors: Validation errors associated with the task. + :vartype validation_errors: list[~azure.mgmt.datamigration.models.ReportableException] + """ + + _validation = { + 'schema_name': {'readonly': True}, + 'tables': {'readonly': True}, + 'validation_errors': {'readonly': True}, + } + + _attribute_map = { + 'schema_name': {'key': 'schemaName', 'type': 'str'}, + 'tables': {'key': 'tables', 'type': '[DatabaseTable]'}, + 'validation_errors': {'key': 'validationErrors', 'type': '[ReportableException]'}, + } + + def __init__( + self, + **kwargs + ): + super(GetUserTablesOracleTaskOutput, self).__init__(**kwargs) + self.schema_name = None + self.tables = None + self.validation_errors = None + + +class GetUserTablesOracleTaskProperties(ProjectTaskProperties): + """Properties for the task that collects user tables for the given list of Oracle schemas. + + Variables are only populated by the server, and will be ignored when sending a request. + + All required parameters must be populated in order to send to Azure. + + :param task_type: Required. Task type.Constant filled by server. Possible values include: + "Connect.MongoDb", "ConnectToSource.SqlServer", "ConnectToSource.SqlServer.Sync", + "ConnectToSource.PostgreSql.Sync", "ConnectToSource.MySql", "ConnectToSource.Oracle.Sync", + "ConnectToTarget.SqlDb", "ConnectToTarget.SqlDb.Sync", + "ConnectToTarget.AzureDbForPostgreSql.Sync", + "ConnectToTarget.Oracle.AzureDbForPostgreSql.Sync", "ConnectToTarget.AzureSqlDbMI", + "ConnectToTarget.AzureSqlDbMI.Sync.LRS", "ConnectToTarget.AzureDbForMySql", + "GetUserTables.Sql", "GetUserTables.AzureSqlDb.Sync", "GetUserTablesOracle", + "GetUserTablesPostgreSql", "GetUserTablesMySql", "Migrate.MongoDb", + "Migrate.SqlServer.AzureSqlDbMI", "Migrate.SqlServer.AzureSqlDbMI.Sync.LRS", + "Migrate.SqlServer.SqlDb", "Migrate.SqlServer.AzureSqlDb.Sync", + "Migrate.MySql.AzureDbForMySql.Sync", "Migrate.MySql.AzureDbForMySql", + "Migrate.PostgreSql.AzureDbForPostgreSql.SyncV2", "Migrate.Oracle.AzureDbForPostgreSql.Sync", + "ValidateMigrationInput.SqlServer.SqlDb.Sync", "ValidateMigrationInput.SqlServer.AzureSqlDbMI", + "ValidateMigrationInput.SqlServer.AzureSqlDbMI.Sync.LRS", "Validate.MongoDb", + "Validate.Oracle.AzureDbPostgreSql.Sync", "GetTDECertificates.Sql", "Migrate.Ssis", + "Service.Check.OCI", "Service.Upload.OCI", "Service.Install.OCI", + "MigrateSchemaSqlServerSqlDb". + :type task_type: str or ~azure.mgmt.datamigration.models.TaskType + :ivar errors: Array of errors. This is ignored if submitted. + :vartype errors: list[~azure.mgmt.datamigration.models.ODataError] + :ivar state: The state of the task. This is ignored if submitted. Possible values include: + "Unknown", "Queued", "Running", "Canceled", "Succeeded", "Failed", "FailedInputValidation", + "Faulted". + :vartype state: str or ~azure.mgmt.datamigration.models.TaskState + :ivar commands: Array of command properties. + :vartype commands: list[~azure.mgmt.datamigration.models.CommandProperties] + :param client_data: Key value pairs of client data to attach meta data information to task. + :type client_data: dict[str, str] + :param input: Task input. + :type input: ~azure.mgmt.datamigration.models.GetUserTablesOracleTaskInput + :ivar output: Task output. This is ignored if submitted. + :vartype output: list[~azure.mgmt.datamigration.models.GetUserTablesOracleTaskOutput] + """ + + _validation = { + 'task_type': {'required': True}, + 'errors': {'readonly': True}, + 'state': {'readonly': True}, + 'commands': {'readonly': True}, + 'output': {'readonly': True}, + } + + _attribute_map = { + 'task_type': {'key': 'taskType', 'type': 'str'}, + 'errors': {'key': 'errors', 'type': '[ODataError]'}, + 'state': {'key': 'state', 'type': 'str'}, + 'commands': {'key': 'commands', 'type': '[CommandProperties]'}, + 'client_data': {'key': 'clientData', 'type': '{str}'}, + 'input': {'key': 'input', 'type': 'GetUserTablesOracleTaskInput'}, + 'output': {'key': 'output', 'type': '[GetUserTablesOracleTaskOutput]'}, + } + + def __init__( + self, + *, + client_data: Optional[Dict[str, str]] = None, + input: Optional["GetUserTablesOracleTaskInput"] = None, + **kwargs + ): + super(GetUserTablesOracleTaskProperties, self).__init__(client_data=client_data, **kwargs) + self.task_type = 'GetUserTablesOracle' # type: str + self.input = input + self.output = None + + +class GetUserTablesPostgreSqlTaskInput(msrest.serialization.Model): + """Input for the task that gets the list of tables for a provided list of PostgreSQL databases. + + All required parameters must be populated in order to send to Azure. + + :param connection_info: Required. Information for connecting to PostgreSQL source. + :type connection_info: ~azure.mgmt.datamigration.models.PostgreSqlConnectionInfo + :param selected_databases: Required. List of PostgreSQL databases for which to collect tables. + :type selected_databases: list[str] + """ + + _validation = { + 'connection_info': {'required': True}, + 'selected_databases': {'required': True}, + } + + _attribute_map = { + 'connection_info': {'key': 'connectionInfo', 'type': 'PostgreSqlConnectionInfo'}, + 'selected_databases': {'key': 'selectedDatabases', 'type': '[str]'}, + } + + def __init__( + self, + *, + connection_info: "PostgreSqlConnectionInfo", + selected_databases: List[str], + **kwargs + ): + super(GetUserTablesPostgreSqlTaskInput, self).__init__(**kwargs) + self.connection_info = connection_info + self.selected_databases = selected_databases + + +class GetUserTablesPostgreSqlTaskOutput(msrest.serialization.Model): + """Output for the task that gets the list of tables for a provided list of PostgreSQL databases. + + Variables are only populated by the server, and will be ignored when sending a request. + + :ivar database_name: The database this result is for. + :vartype database_name: str + :ivar tables: List of valid tables found for this database. + :vartype tables: list[~azure.mgmt.datamigration.models.DatabaseTable] + :ivar validation_errors: Validation errors associated with the task. + :vartype validation_errors: list[~azure.mgmt.datamigration.models.ReportableException] + """ + + _validation = { + 'database_name': {'readonly': True}, + 'tables': {'readonly': True}, + 'validation_errors': {'readonly': True}, + } + + _attribute_map = { + 'database_name': {'key': 'databaseName', 'type': 'str'}, + 'tables': {'key': 'tables', 'type': '[DatabaseTable]'}, + 'validation_errors': {'key': 'validationErrors', 'type': '[ReportableException]'}, + } + + def __init__( + self, + **kwargs + ): + super(GetUserTablesPostgreSqlTaskOutput, self).__init__(**kwargs) + self.database_name = None + self.tables = None + self.validation_errors = None + + +class GetUserTablesPostgreSqlTaskProperties(ProjectTaskProperties): + """Properties for the task that collects user tables for the given list of databases. + + Variables are only populated by the server, and will be ignored when sending a request. + + All required parameters must be populated in order to send to Azure. + + :param task_type: Required. Task type.Constant filled by server. Possible values include: + "Connect.MongoDb", "ConnectToSource.SqlServer", "ConnectToSource.SqlServer.Sync", + "ConnectToSource.PostgreSql.Sync", "ConnectToSource.MySql", "ConnectToSource.Oracle.Sync", + "ConnectToTarget.SqlDb", "ConnectToTarget.SqlDb.Sync", + "ConnectToTarget.AzureDbForPostgreSql.Sync", + "ConnectToTarget.Oracle.AzureDbForPostgreSql.Sync", "ConnectToTarget.AzureSqlDbMI", + "ConnectToTarget.AzureSqlDbMI.Sync.LRS", "ConnectToTarget.AzureDbForMySql", + "GetUserTables.Sql", "GetUserTables.AzureSqlDb.Sync", "GetUserTablesOracle", + "GetUserTablesPostgreSql", "GetUserTablesMySql", "Migrate.MongoDb", + "Migrate.SqlServer.AzureSqlDbMI", "Migrate.SqlServer.AzureSqlDbMI.Sync.LRS", + "Migrate.SqlServer.SqlDb", "Migrate.SqlServer.AzureSqlDb.Sync", + "Migrate.MySql.AzureDbForMySql.Sync", "Migrate.MySql.AzureDbForMySql", + "Migrate.PostgreSql.AzureDbForPostgreSql.SyncV2", "Migrate.Oracle.AzureDbForPostgreSql.Sync", + "ValidateMigrationInput.SqlServer.SqlDb.Sync", "ValidateMigrationInput.SqlServer.AzureSqlDbMI", + "ValidateMigrationInput.SqlServer.AzureSqlDbMI.Sync.LRS", "Validate.MongoDb", + "Validate.Oracle.AzureDbPostgreSql.Sync", "GetTDECertificates.Sql", "Migrate.Ssis", + "Service.Check.OCI", "Service.Upload.OCI", "Service.Install.OCI", + "MigrateSchemaSqlServerSqlDb". + :type task_type: str or ~azure.mgmt.datamigration.models.TaskType + :ivar errors: Array of errors. This is ignored if submitted. + :vartype errors: list[~azure.mgmt.datamigration.models.ODataError] + :ivar state: The state of the task. This is ignored if submitted. Possible values include: + "Unknown", "Queued", "Running", "Canceled", "Succeeded", "Failed", "FailedInputValidation", + "Faulted". + :vartype state: str or ~azure.mgmt.datamigration.models.TaskState + :ivar commands: Array of command properties. + :vartype commands: list[~azure.mgmt.datamigration.models.CommandProperties] + :param client_data: Key value pairs of client data to attach meta data information to task. + :type client_data: dict[str, str] + :param input: Task input. + :type input: ~azure.mgmt.datamigration.models.GetUserTablesPostgreSqlTaskInput + :ivar output: Task output. This is ignored if submitted. + :vartype output: list[~azure.mgmt.datamigration.models.GetUserTablesPostgreSqlTaskOutput] + """ + + _validation = { + 'task_type': {'required': True}, + 'errors': {'readonly': True}, + 'state': {'readonly': True}, + 'commands': {'readonly': True}, + 'output': {'readonly': True}, + } + + _attribute_map = { + 'task_type': {'key': 'taskType', 'type': 'str'}, + 'errors': {'key': 'errors', 'type': '[ODataError]'}, + 'state': {'key': 'state', 'type': 'str'}, + 'commands': {'key': 'commands', 'type': '[CommandProperties]'}, + 'client_data': {'key': 'clientData', 'type': '{str}'}, + 'input': {'key': 'input', 'type': 'GetUserTablesPostgreSqlTaskInput'}, + 'output': {'key': 'output', 'type': '[GetUserTablesPostgreSqlTaskOutput]'}, + } + + def __init__( + self, + *, + client_data: Optional[Dict[str, str]] = None, + input: Optional["GetUserTablesPostgreSqlTaskInput"] = None, + **kwargs + ): + super(GetUserTablesPostgreSqlTaskProperties, self).__init__(client_data=client_data, **kwargs) + self.task_type = 'GetUserTablesPostgreSql' # type: str + self.input = input + self.output = None + + +class GetUserTablesSqlSyncTaskInput(msrest.serialization.Model): + """Input for the task that collects user tables for the given list of databases. + + All required parameters must be populated in order to send to Azure. + + :param source_connection_info: Required. Connection information for SQL Server. + :type source_connection_info: ~azure.mgmt.datamigration.models.SqlConnectionInfo + :param target_connection_info: Required. Connection information for SQL DB. + :type target_connection_info: ~azure.mgmt.datamigration.models.SqlConnectionInfo + :param selected_source_databases: Required. List of source database names to collect tables + for. + :type selected_source_databases: list[str] + :param selected_target_databases: Required. List of target database names to collect tables + for. + :type selected_target_databases: list[str] + """ + + _validation = { + 'source_connection_info': {'required': True}, + 'target_connection_info': {'required': True}, + 'selected_source_databases': {'required': True}, + 'selected_target_databases': {'required': True}, + } + + _attribute_map = { + 'source_connection_info': {'key': 'sourceConnectionInfo', 'type': 'SqlConnectionInfo'}, + 'target_connection_info': {'key': 'targetConnectionInfo', 'type': 'SqlConnectionInfo'}, + 'selected_source_databases': {'key': 'selectedSourceDatabases', 'type': '[str]'}, + 'selected_target_databases': {'key': 'selectedTargetDatabases', 'type': '[str]'}, + } + + def __init__( + self, + *, + source_connection_info: "SqlConnectionInfo", + target_connection_info: "SqlConnectionInfo", + selected_source_databases: List[str], + selected_target_databases: List[str], + **kwargs + ): + super(GetUserTablesSqlSyncTaskInput, self).__init__(**kwargs) + self.source_connection_info = source_connection_info + self.target_connection_info = target_connection_info + self.selected_source_databases = selected_source_databases + self.selected_target_databases = selected_target_databases + + +class GetUserTablesSqlSyncTaskOutput(msrest.serialization.Model): + """Output of the task that collects user tables for the given list of databases. + + Variables are only populated by the server, and will be ignored when sending a request. + + :ivar databases_to_source_tables: Mapping from database name to list of source tables. + :vartype databases_to_source_tables: str + :ivar databases_to_target_tables: Mapping from database name to list of target tables. + :vartype databases_to_target_tables: str + :ivar table_validation_errors: Mapping from database name to list of validation errors. + :vartype table_validation_errors: str + :ivar validation_errors: Validation errors. + :vartype validation_errors: list[~azure.mgmt.datamigration.models.ReportableException] + """ + + _validation = { + 'databases_to_source_tables': {'readonly': True}, + 'databases_to_target_tables': {'readonly': True}, + 'table_validation_errors': {'readonly': True}, + 'validation_errors': {'readonly': True}, + } + + _attribute_map = { + 'databases_to_source_tables': {'key': 'databasesToSourceTables', 'type': 'str'}, + 'databases_to_target_tables': {'key': 'databasesToTargetTables', 'type': 'str'}, + 'table_validation_errors': {'key': 'tableValidationErrors', 'type': 'str'}, + 'validation_errors': {'key': 'validationErrors', 'type': '[ReportableException]'}, + } + + def __init__( + self, + **kwargs + ): + super(GetUserTablesSqlSyncTaskOutput, self).__init__(**kwargs) + self.databases_to_source_tables = None + self.databases_to_target_tables = None + self.table_validation_errors = None + self.validation_errors = None + + +class GetUserTablesSqlSyncTaskProperties(ProjectTaskProperties): + """Properties for the task that collects user tables for the given list of databases. + + Variables are only populated by the server, and will be ignored when sending a request. + + All required parameters must be populated in order to send to Azure. + + :param task_type: Required. Task type.Constant filled by server. Possible values include: + "Connect.MongoDb", "ConnectToSource.SqlServer", "ConnectToSource.SqlServer.Sync", + "ConnectToSource.PostgreSql.Sync", "ConnectToSource.MySql", "ConnectToSource.Oracle.Sync", + "ConnectToTarget.SqlDb", "ConnectToTarget.SqlDb.Sync", + "ConnectToTarget.AzureDbForPostgreSql.Sync", + "ConnectToTarget.Oracle.AzureDbForPostgreSql.Sync", "ConnectToTarget.AzureSqlDbMI", + "ConnectToTarget.AzureSqlDbMI.Sync.LRS", "ConnectToTarget.AzureDbForMySql", + "GetUserTables.Sql", "GetUserTables.AzureSqlDb.Sync", "GetUserTablesOracle", + "GetUserTablesPostgreSql", "GetUserTablesMySql", "Migrate.MongoDb", + "Migrate.SqlServer.AzureSqlDbMI", "Migrate.SqlServer.AzureSqlDbMI.Sync.LRS", + "Migrate.SqlServer.SqlDb", "Migrate.SqlServer.AzureSqlDb.Sync", + "Migrate.MySql.AzureDbForMySql.Sync", "Migrate.MySql.AzureDbForMySql", + "Migrate.PostgreSql.AzureDbForPostgreSql.SyncV2", "Migrate.Oracle.AzureDbForPostgreSql.Sync", + "ValidateMigrationInput.SqlServer.SqlDb.Sync", "ValidateMigrationInput.SqlServer.AzureSqlDbMI", + "ValidateMigrationInput.SqlServer.AzureSqlDbMI.Sync.LRS", "Validate.MongoDb", + "Validate.Oracle.AzureDbPostgreSql.Sync", "GetTDECertificates.Sql", "Migrate.Ssis", + "Service.Check.OCI", "Service.Upload.OCI", "Service.Install.OCI", + "MigrateSchemaSqlServerSqlDb". + :type task_type: str or ~azure.mgmt.datamigration.models.TaskType + :ivar errors: Array of errors. This is ignored if submitted. + :vartype errors: list[~azure.mgmt.datamigration.models.ODataError] + :ivar state: The state of the task. This is ignored if submitted. Possible values include: + "Unknown", "Queued", "Running", "Canceled", "Succeeded", "Failed", "FailedInputValidation", + "Faulted". + :vartype state: str or ~azure.mgmt.datamigration.models.TaskState + :ivar commands: Array of command properties. + :vartype commands: list[~azure.mgmt.datamigration.models.CommandProperties] + :param client_data: Key value pairs of client data to attach meta data information to task. + :type client_data: dict[str, str] + :param input: Task input. + :type input: ~azure.mgmt.datamigration.models.GetUserTablesSqlSyncTaskInput + :ivar output: Task output. This is ignored if submitted. + :vartype output: list[~azure.mgmt.datamigration.models.GetUserTablesSqlSyncTaskOutput] + """ + + _validation = { + 'task_type': {'required': True}, + 'errors': {'readonly': True}, + 'state': {'readonly': True}, + 'commands': {'readonly': True}, + 'output': {'readonly': True}, + } + + _attribute_map = { + 'task_type': {'key': 'taskType', 'type': 'str'}, + 'errors': {'key': 'errors', 'type': '[ODataError]'}, + 'state': {'key': 'state', 'type': 'str'}, + 'commands': {'key': 'commands', 'type': '[CommandProperties]'}, + 'client_data': {'key': 'clientData', 'type': '{str}'}, + 'input': {'key': 'input', 'type': 'GetUserTablesSqlSyncTaskInput'}, + 'output': {'key': 'output', 'type': '[GetUserTablesSqlSyncTaskOutput]'}, + } + + def __init__( + self, + *, + client_data: Optional[Dict[str, str]] = None, + input: Optional["GetUserTablesSqlSyncTaskInput"] = None, + **kwargs + ): + super(GetUserTablesSqlSyncTaskProperties, self).__init__(client_data=client_data, **kwargs) + self.task_type = 'GetUserTables.AzureSqlDb.Sync' # type: str + self.input = input + self.output = None + + +class GetUserTablesSqlTaskInput(msrest.serialization.Model): + """Input for the task that collects user tables for the given list of databases. + + All required parameters must be populated in order to send to Azure. + + :param connection_info: Required. Connection information for SQL Server. + :type connection_info: ~azure.mgmt.datamigration.models.SqlConnectionInfo + :param selected_databases: Required. List of database names to collect tables for. + :type selected_databases: list[str] + """ + + _validation = { + 'connection_info': {'required': True}, + 'selected_databases': {'required': True}, + } + + _attribute_map = { + 'connection_info': {'key': 'connectionInfo', 'type': 'SqlConnectionInfo'}, + 'selected_databases': {'key': 'selectedDatabases', 'type': '[str]'}, + } + + def __init__( + self, + *, + connection_info: "SqlConnectionInfo", + selected_databases: List[str], + **kwargs + ): + super(GetUserTablesSqlTaskInput, self).__init__(**kwargs) + self.connection_info = connection_info + self.selected_databases = selected_databases + + +class GetUserTablesSqlTaskOutput(msrest.serialization.Model): + """Output of the task that collects user tables for the given list of databases. + + Variables are only populated by the server, and will be ignored when sending a request. + + :ivar id: Result identifier. + :vartype id: str + :ivar databases_to_tables: Mapping from database name to list of tables. + :vartype databases_to_tables: str + :ivar validation_errors: Validation errors. + :vartype validation_errors: list[~azure.mgmt.datamigration.models.ReportableException] + """ + + _validation = { + 'id': {'readonly': True}, + 'databases_to_tables': {'readonly': True}, + 'validation_errors': {'readonly': True}, + } + + _attribute_map = { + 'id': {'key': 'id', 'type': 'str'}, + 'databases_to_tables': {'key': 'databasesToTables', 'type': 'str'}, + 'validation_errors': {'key': 'validationErrors', 'type': '[ReportableException]'}, + } + + def __init__( + self, + **kwargs + ): + super(GetUserTablesSqlTaskOutput, self).__init__(**kwargs) + self.id = None + self.databases_to_tables = None + self.validation_errors = None + + +class GetUserTablesSqlTaskProperties(ProjectTaskProperties): + """Properties for the task that collects user tables for the given list of databases. + + Variables are only populated by the server, and will be ignored when sending a request. + + All required parameters must be populated in order to send to Azure. + + :param task_type: Required. Task type.Constant filled by server. Possible values include: + "Connect.MongoDb", "ConnectToSource.SqlServer", "ConnectToSource.SqlServer.Sync", + "ConnectToSource.PostgreSql.Sync", "ConnectToSource.MySql", "ConnectToSource.Oracle.Sync", + "ConnectToTarget.SqlDb", "ConnectToTarget.SqlDb.Sync", + "ConnectToTarget.AzureDbForPostgreSql.Sync", + "ConnectToTarget.Oracle.AzureDbForPostgreSql.Sync", "ConnectToTarget.AzureSqlDbMI", + "ConnectToTarget.AzureSqlDbMI.Sync.LRS", "ConnectToTarget.AzureDbForMySql", + "GetUserTables.Sql", "GetUserTables.AzureSqlDb.Sync", "GetUserTablesOracle", + "GetUserTablesPostgreSql", "GetUserTablesMySql", "Migrate.MongoDb", + "Migrate.SqlServer.AzureSqlDbMI", "Migrate.SqlServer.AzureSqlDbMI.Sync.LRS", + "Migrate.SqlServer.SqlDb", "Migrate.SqlServer.AzureSqlDb.Sync", + "Migrate.MySql.AzureDbForMySql.Sync", "Migrate.MySql.AzureDbForMySql", + "Migrate.PostgreSql.AzureDbForPostgreSql.SyncV2", "Migrate.Oracle.AzureDbForPostgreSql.Sync", + "ValidateMigrationInput.SqlServer.SqlDb.Sync", "ValidateMigrationInput.SqlServer.AzureSqlDbMI", + "ValidateMigrationInput.SqlServer.AzureSqlDbMI.Sync.LRS", "Validate.MongoDb", + "Validate.Oracle.AzureDbPostgreSql.Sync", "GetTDECertificates.Sql", "Migrate.Ssis", + "Service.Check.OCI", "Service.Upload.OCI", "Service.Install.OCI", + "MigrateSchemaSqlServerSqlDb". + :type task_type: str or ~azure.mgmt.datamigration.models.TaskType + :ivar errors: Array of errors. This is ignored if submitted. + :vartype errors: list[~azure.mgmt.datamigration.models.ODataError] + :ivar state: The state of the task. This is ignored if submitted. Possible values include: + "Unknown", "Queued", "Running", "Canceled", "Succeeded", "Failed", "FailedInputValidation", + "Faulted". + :vartype state: str or ~azure.mgmt.datamigration.models.TaskState + :ivar commands: Array of command properties. + :vartype commands: list[~azure.mgmt.datamigration.models.CommandProperties] + :param client_data: Key value pairs of client data to attach meta data information to task. + :type client_data: dict[str, str] + :param input: Task input. + :type input: ~azure.mgmt.datamigration.models.GetUserTablesSqlTaskInput + :ivar output: Task output. This is ignored if submitted. + :vartype output: list[~azure.mgmt.datamigration.models.GetUserTablesSqlTaskOutput] + """ + + _validation = { + 'task_type': {'required': True}, + 'errors': {'readonly': True}, + 'state': {'readonly': True}, + 'commands': {'readonly': True}, + 'output': {'readonly': True}, + } + + _attribute_map = { + 'task_type': {'key': 'taskType', 'type': 'str'}, + 'errors': {'key': 'errors', 'type': '[ODataError]'}, + 'state': {'key': 'state', 'type': 'str'}, + 'commands': {'key': 'commands', 'type': '[CommandProperties]'}, + 'client_data': {'key': 'clientData', 'type': '{str}'}, + 'input': {'key': 'input', 'type': 'GetUserTablesSqlTaskInput'}, + 'output': {'key': 'output', 'type': '[GetUserTablesSqlTaskOutput]'}, + } + + def __init__( + self, + *, + client_data: Optional[Dict[str, str]] = None, + input: Optional["GetUserTablesSqlTaskInput"] = None, + **kwargs + ): + super(GetUserTablesSqlTaskProperties, self).__init__(client_data=client_data, **kwargs) + self.task_type = 'GetUserTables.Sql' # type: str + self.input = input + self.output = None + + +class InstallOciDriverTaskInput(msrest.serialization.Model): + """Input for the service task to install an OCI driver. + + :param driver_package_name: Name of the uploaded driver package to install. + :type driver_package_name: str + """ + + _attribute_map = { + 'driver_package_name': {'key': 'driverPackageName', 'type': 'str'}, + } + + def __init__( + self, + *, + driver_package_name: Optional[str] = None, + **kwargs + ): + super(InstallOciDriverTaskInput, self).__init__(**kwargs) + self.driver_package_name = driver_package_name + + +class InstallOciDriverTaskOutput(msrest.serialization.Model): + """Output for the service task to install an OCI driver. + + Variables are only populated by the server, and will be ignored when sending a request. + + :ivar validation_errors: Validation errors. + :vartype validation_errors: list[~azure.mgmt.datamigration.models.ReportableException] + """ + + _validation = { + 'validation_errors': {'readonly': True}, + } + + _attribute_map = { + 'validation_errors': {'key': 'validationErrors', 'type': '[ReportableException]'}, + } + + def __init__( + self, + **kwargs + ): + super(InstallOciDriverTaskOutput, self).__init__(**kwargs) + self.validation_errors = None + + +class InstallOciDriverTaskProperties(ProjectTaskProperties): + """Properties for the task that installs an OCI driver. + + Variables are only populated by the server, and will be ignored when sending a request. + + All required parameters must be populated in order to send to Azure. + + :param task_type: Required. Task type.Constant filled by server. Possible values include: + "Connect.MongoDb", "ConnectToSource.SqlServer", "ConnectToSource.SqlServer.Sync", + "ConnectToSource.PostgreSql.Sync", "ConnectToSource.MySql", "ConnectToSource.Oracle.Sync", + "ConnectToTarget.SqlDb", "ConnectToTarget.SqlDb.Sync", + "ConnectToTarget.AzureDbForPostgreSql.Sync", + "ConnectToTarget.Oracle.AzureDbForPostgreSql.Sync", "ConnectToTarget.AzureSqlDbMI", + "ConnectToTarget.AzureSqlDbMI.Sync.LRS", "ConnectToTarget.AzureDbForMySql", + "GetUserTables.Sql", "GetUserTables.AzureSqlDb.Sync", "GetUserTablesOracle", + "GetUserTablesPostgreSql", "GetUserTablesMySql", "Migrate.MongoDb", + "Migrate.SqlServer.AzureSqlDbMI", "Migrate.SqlServer.AzureSqlDbMI.Sync.LRS", + "Migrate.SqlServer.SqlDb", "Migrate.SqlServer.AzureSqlDb.Sync", + "Migrate.MySql.AzureDbForMySql.Sync", "Migrate.MySql.AzureDbForMySql", + "Migrate.PostgreSql.AzureDbForPostgreSql.SyncV2", "Migrate.Oracle.AzureDbForPostgreSql.Sync", + "ValidateMigrationInput.SqlServer.SqlDb.Sync", "ValidateMigrationInput.SqlServer.AzureSqlDbMI", + "ValidateMigrationInput.SqlServer.AzureSqlDbMI.Sync.LRS", "Validate.MongoDb", + "Validate.Oracle.AzureDbPostgreSql.Sync", "GetTDECertificates.Sql", "Migrate.Ssis", + "Service.Check.OCI", "Service.Upload.OCI", "Service.Install.OCI", + "MigrateSchemaSqlServerSqlDb". + :type task_type: str or ~azure.mgmt.datamigration.models.TaskType + :ivar errors: Array of errors. This is ignored if submitted. + :vartype errors: list[~azure.mgmt.datamigration.models.ODataError] + :ivar state: The state of the task. This is ignored if submitted. Possible values include: + "Unknown", "Queued", "Running", "Canceled", "Succeeded", "Failed", "FailedInputValidation", + "Faulted". + :vartype state: str or ~azure.mgmt.datamigration.models.TaskState + :ivar commands: Array of command properties. + :vartype commands: list[~azure.mgmt.datamigration.models.CommandProperties] + :param client_data: Key value pairs of client data to attach meta data information to task. + :type client_data: dict[str, str] + :param input: Input for the service task to install an OCI driver. + :type input: ~azure.mgmt.datamigration.models.InstallOciDriverTaskInput + :ivar output: Task output. This is ignored if submitted. + :vartype output: list[~azure.mgmt.datamigration.models.InstallOciDriverTaskOutput] + """ + + _validation = { + 'task_type': {'required': True}, + 'errors': {'readonly': True}, + 'state': {'readonly': True}, + 'commands': {'readonly': True}, + 'output': {'readonly': True}, + } + + _attribute_map = { + 'task_type': {'key': 'taskType', 'type': 'str'}, + 'errors': {'key': 'errors', 'type': '[ODataError]'}, + 'state': {'key': 'state', 'type': 'str'}, + 'commands': {'key': 'commands', 'type': '[CommandProperties]'}, + 'client_data': {'key': 'clientData', 'type': '{str}'}, + 'input': {'key': 'input', 'type': 'InstallOciDriverTaskInput'}, + 'output': {'key': 'output', 'type': '[InstallOciDriverTaskOutput]'}, + } + + def __init__( + self, + *, + client_data: Optional[Dict[str, str]] = None, + input: Optional["InstallOciDriverTaskInput"] = None, + **kwargs + ): + super(InstallOciDriverTaskProperties, self).__init__(client_data=client_data, **kwargs) + self.task_type = 'Service.Install.OCI' # type: str + self.input = input + self.output = None + + +class IntegrationRuntimeMonitoringData(msrest.serialization.Model): + """Integration Runtime Monitoring Data. + + Variables are only populated by the server, and will be ignored when sending a request. + + :ivar name: The name of Integration Runtime. + :vartype name: str + :ivar nodes: Integration Runtime node monitoring data. + :vartype nodes: list[~azure.mgmt.datamigration.models.NodeMonitoringData] + """ + + _validation = { + 'name': {'readonly': True}, + 'nodes': {'readonly': True}, + } + + _attribute_map = { + 'name': {'key': 'name', 'type': 'str'}, + 'nodes': {'key': 'nodes', 'type': '[NodeMonitoringData]'}, + } + + def __init__( + self, + **kwargs + ): + super(IntegrationRuntimeMonitoringData, self).__init__(**kwargs) + self.name = None + self.nodes = None + + +class MigrateMiSyncCompleteCommandInput(msrest.serialization.Model): + """Input for command that completes online migration for an Azure SQL Database Managed Instance. + + All required parameters must be populated in order to send to Azure. + + :param source_database_name: Required. Name of managed instance database. + :type source_database_name: str + """ + + _validation = { + 'source_database_name': {'required': True}, + } + + _attribute_map = { + 'source_database_name': {'key': 'sourceDatabaseName', 'type': 'str'}, + } + + def __init__( + self, + *, + source_database_name: str, + **kwargs + ): + super(MigrateMiSyncCompleteCommandInput, self).__init__(**kwargs) + self.source_database_name = source_database_name + + +class MigrateMiSyncCompleteCommandOutput(msrest.serialization.Model): + """Output for command that completes online migration for an Azure SQL Database Managed Instance. + + :param errors: List of errors that happened during the command execution. + :type errors: list[~azure.mgmt.datamigration.models.ReportableException] + """ + + _attribute_map = { + 'errors': {'key': 'errors', 'type': '[ReportableException]'}, + } + + def __init__( + self, + *, + errors: Optional[List["ReportableException"]] = None, + **kwargs + ): + super(MigrateMiSyncCompleteCommandOutput, self).__init__(**kwargs) + self.errors = errors + + +class MigrateMiSyncCompleteCommandProperties(CommandProperties): + """Properties for the command that completes online migration for an Azure SQL Database Managed Instance. + + Variables are only populated by the server, and will be ignored when sending a request. + + All required parameters must be populated in order to send to Azure. + + :param command_type: Required. Command type.Constant filled by server. Possible values + include: "Migrate.Sync.Complete.Database", "Migrate.SqlServer.AzureDbSqlMi.Complete", "cancel", + "finish", "restart". + :type command_type: str or ~azure.mgmt.datamigration.models.CommandType + :ivar errors: Array of errors. This is ignored if submitted. + :vartype errors: list[~azure.mgmt.datamigration.models.ODataError] + :ivar state: The state of the command. This is ignored if submitted. Possible values include: + "Unknown", "Accepted", "Running", "Succeeded", "Failed". + :vartype state: str or ~azure.mgmt.datamigration.models.CommandState + :param input: Command input. + :type input: ~azure.mgmt.datamigration.models.MigrateMiSyncCompleteCommandInput + :ivar output: Command output. This is ignored if submitted. + :vartype output: ~azure.mgmt.datamigration.models.MigrateMiSyncCompleteCommandOutput + """ + + _validation = { + 'command_type': {'required': True}, + 'errors': {'readonly': True}, + 'state': {'readonly': True}, + 'output': {'readonly': True}, + } + + _attribute_map = { + 'command_type': {'key': 'commandType', 'type': 'str'}, + 'errors': {'key': 'errors', 'type': '[ODataError]'}, + 'state': {'key': 'state', 'type': 'str'}, + 'input': {'key': 'input', 'type': 'MigrateMiSyncCompleteCommandInput'}, + 'output': {'key': 'output', 'type': 'MigrateMiSyncCompleteCommandOutput'}, + } + + def __init__( + self, + *, + input: Optional["MigrateMiSyncCompleteCommandInput"] = None, + **kwargs + ): + super(MigrateMiSyncCompleteCommandProperties, self).__init__(**kwargs) + self.command_type = 'Migrate.SqlServer.AzureDbSqlMi.Complete' # type: str + self.input = input + self.output = None + + +class MigrateMongoDbTaskProperties(ProjectTaskProperties): + """Properties for the task that migrates data between MongoDB data sources. + + Variables are only populated by the server, and will be ignored when sending a request. + + All required parameters must be populated in order to send to Azure. + + :param task_type: Required. Task type.Constant filled by server. Possible values include: + "Connect.MongoDb", "ConnectToSource.SqlServer", "ConnectToSource.SqlServer.Sync", + "ConnectToSource.PostgreSql.Sync", "ConnectToSource.MySql", "ConnectToSource.Oracle.Sync", + "ConnectToTarget.SqlDb", "ConnectToTarget.SqlDb.Sync", + "ConnectToTarget.AzureDbForPostgreSql.Sync", + "ConnectToTarget.Oracle.AzureDbForPostgreSql.Sync", "ConnectToTarget.AzureSqlDbMI", + "ConnectToTarget.AzureSqlDbMI.Sync.LRS", "ConnectToTarget.AzureDbForMySql", + "GetUserTables.Sql", "GetUserTables.AzureSqlDb.Sync", "GetUserTablesOracle", + "GetUserTablesPostgreSql", "GetUserTablesMySql", "Migrate.MongoDb", + "Migrate.SqlServer.AzureSqlDbMI", "Migrate.SqlServer.AzureSqlDbMI.Sync.LRS", + "Migrate.SqlServer.SqlDb", "Migrate.SqlServer.AzureSqlDb.Sync", + "Migrate.MySql.AzureDbForMySql.Sync", "Migrate.MySql.AzureDbForMySql", + "Migrate.PostgreSql.AzureDbForPostgreSql.SyncV2", "Migrate.Oracle.AzureDbForPostgreSql.Sync", + "ValidateMigrationInput.SqlServer.SqlDb.Sync", "ValidateMigrationInput.SqlServer.AzureSqlDbMI", + "ValidateMigrationInput.SqlServer.AzureSqlDbMI.Sync.LRS", "Validate.MongoDb", + "Validate.Oracle.AzureDbPostgreSql.Sync", "GetTDECertificates.Sql", "Migrate.Ssis", + "Service.Check.OCI", "Service.Upload.OCI", "Service.Install.OCI", + "MigrateSchemaSqlServerSqlDb". + :type task_type: str or ~azure.mgmt.datamigration.models.TaskType + :ivar errors: Array of errors. This is ignored if submitted. + :vartype errors: list[~azure.mgmt.datamigration.models.ODataError] + :ivar state: The state of the task. This is ignored if submitted. Possible values include: + "Unknown", "Queued", "Running", "Canceled", "Succeeded", "Failed", "FailedInputValidation", + "Faulted". + :vartype state: str or ~azure.mgmt.datamigration.models.TaskState + :ivar commands: Array of command properties. + :vartype commands: list[~azure.mgmt.datamigration.models.CommandProperties] + :param client_data: Key value pairs of client data to attach meta data information to task. + :type client_data: dict[str, str] + :param input: Describes how a MongoDB data migration should be performed. + :type input: ~azure.mgmt.datamigration.models.MongoDbMigrationSettings + :ivar output: + :vartype output: list[~azure.mgmt.datamigration.models.MongoDbProgress] + """ + + _validation = { + 'task_type': {'required': True}, + 'errors': {'readonly': True}, + 'state': {'readonly': True}, + 'commands': {'readonly': True}, + 'output': {'readonly': True}, + } + + _attribute_map = { + 'task_type': {'key': 'taskType', 'type': 'str'}, + 'errors': {'key': 'errors', 'type': '[ODataError]'}, + 'state': {'key': 'state', 'type': 'str'}, + 'commands': {'key': 'commands', 'type': '[CommandProperties]'}, + 'client_data': {'key': 'clientData', 'type': '{str}'}, + 'input': {'key': 'input', 'type': 'MongoDbMigrationSettings'}, + 'output': {'key': 'output', 'type': '[MongoDbProgress]'}, + } + + def __init__( + self, + *, + client_data: Optional[Dict[str, str]] = None, + input: Optional["MongoDbMigrationSettings"] = None, + **kwargs + ): + super(MigrateMongoDbTaskProperties, self).__init__(client_data=client_data, **kwargs) + self.task_type = 'Migrate.MongoDb' # type: str + self.input = input + self.output = None + + +class MigrateMySqlAzureDbForMySqlOfflineDatabaseInput(msrest.serialization.Model): + """Database specific information for offline MySQL to Azure Database for MySQL migration task inputs. + + :param name: Name of the database. + :type name: str + :param target_database_name: Name of target database. Note: Target database will be truncated + before starting migration. + :type target_database_name: str + :param table_map: Mapping of source to target tables. + :type table_map: dict[str, str] + """ + + _attribute_map = { + 'name': {'key': 'name', 'type': 'str'}, + 'target_database_name': {'key': 'targetDatabaseName', 'type': 'str'}, + 'table_map': {'key': 'tableMap', 'type': '{str}'}, + } + + def __init__( + self, + *, + name: Optional[str] = None, + target_database_name: Optional[str] = None, + table_map: Optional[Dict[str, str]] = None, + **kwargs + ): + super(MigrateMySqlAzureDbForMySqlOfflineDatabaseInput, self).__init__(**kwargs) + self.name = name + self.target_database_name = target_database_name + self.table_map = table_map + + +class MigrateMySqlAzureDbForMySqlOfflineTaskInput(msrest.serialization.Model): + """Input for the task that migrates MySQL databases to Azure Database for MySQL for offline migrations. + + All required parameters must be populated in order to send to Azure. + + :param source_connection_info: Required. Connection information for source MySQL. + :type source_connection_info: ~azure.mgmt.datamigration.models.MySqlConnectionInfo + :param target_connection_info: Required. Connection information for target Azure Database for + MySQL. + :type target_connection_info: ~azure.mgmt.datamigration.models.MySqlConnectionInfo + :param selected_databases: Required. Databases to migrate. + :type selected_databases: + list[~azure.mgmt.datamigration.models.MigrateMySqlAzureDbForMySqlOfflineDatabaseInput] + :param make_source_server_read_only: Setting to set the source server read only. + :type make_source_server_read_only: bool + :param started_on: Parameter to specify when the migration started. + :type started_on: ~datetime.datetime + :param optional_agent_settings: Optional parameters for fine tuning the data transfer rate + during migration. + :type optional_agent_settings: dict[str, str] + """ + + _validation = { + 'source_connection_info': {'required': True}, + 'target_connection_info': {'required': True}, + 'selected_databases': {'required': True}, + } + + _attribute_map = { + 'source_connection_info': {'key': 'sourceConnectionInfo', 'type': 'MySqlConnectionInfo'}, + 'target_connection_info': {'key': 'targetConnectionInfo', 'type': 'MySqlConnectionInfo'}, + 'selected_databases': {'key': 'selectedDatabases', 'type': '[MigrateMySqlAzureDbForMySqlOfflineDatabaseInput]'}, + 'make_source_server_read_only': {'key': 'makeSourceServerReadOnly', 'type': 'bool'}, + 'started_on': {'key': 'startedOn', 'type': 'iso-8601'}, + 'optional_agent_settings': {'key': 'optionalAgentSettings', 'type': '{str}'}, + } + + def __init__( + self, + *, + source_connection_info: "MySqlConnectionInfo", + target_connection_info: "MySqlConnectionInfo", + selected_databases: List["MigrateMySqlAzureDbForMySqlOfflineDatabaseInput"], + make_source_server_read_only: Optional[bool] = False, + started_on: Optional[datetime.datetime] = None, + optional_agent_settings: Optional[Dict[str, str]] = None, + **kwargs + ): + super(MigrateMySqlAzureDbForMySqlOfflineTaskInput, self).__init__(**kwargs) + self.source_connection_info = source_connection_info + self.target_connection_info = target_connection_info + self.selected_databases = selected_databases + self.make_source_server_read_only = make_source_server_read_only + self.started_on = started_on + self.optional_agent_settings = optional_agent_settings + + +class MigrateMySqlAzureDbForMySqlOfflineTaskOutput(msrest.serialization.Model): + """Output for the task that migrates MySQL databases to Azure Database for MySQL for offline migrations. + + You probably want to use the sub-classes and not this class directly. Known + sub-classes are: MigrateMySqlAzureDbForMySqlOfflineTaskOutputDatabaseLevel, MigrateMySqlAzureDbForMySqlOfflineTaskOutputError, MigrateMySqlAzureDbForMySqlOfflineTaskOutputMigrationLevel, MigrateMySqlAzureDbForMySqlOfflineTaskOutputTableLevel. + + Variables are only populated by the server, and will be ignored when sending a request. + + All required parameters must be populated in order to send to Azure. + + :ivar id: Result identifier. + :vartype id: str + :param result_type: Required. Result type.Constant filled by server. + :type result_type: str + """ + + _validation = { + 'id': {'readonly': True}, + 'result_type': {'required': True}, + } + + _attribute_map = { + 'id': {'key': 'id', 'type': 'str'}, + 'result_type': {'key': 'resultType', 'type': 'str'}, + } + + _subtype_map = { + 'result_type': {'DatabaseLevelOutput': 'MigrateMySqlAzureDbForMySqlOfflineTaskOutputDatabaseLevel', 'ErrorOutput': 'MigrateMySqlAzureDbForMySqlOfflineTaskOutputError', 'MigrationLevelOutput': 'MigrateMySqlAzureDbForMySqlOfflineTaskOutputMigrationLevel', 'TableLevelOutput': 'MigrateMySqlAzureDbForMySqlOfflineTaskOutputTableLevel'} + } + + def __init__( + self, + **kwargs + ): + super(MigrateMySqlAzureDbForMySqlOfflineTaskOutput, self).__init__(**kwargs) + self.id = None + self.result_type = None # type: Optional[str] + + +class MigrateMySqlAzureDbForMySqlOfflineTaskOutputDatabaseLevel(MigrateMySqlAzureDbForMySqlOfflineTaskOutput): + """MigrateMySqlAzureDbForMySqlOfflineTaskOutputDatabaseLevel. + + Variables are only populated by the server, and will be ignored when sending a request. + + All required parameters must be populated in order to send to Azure. + + :ivar id: Result identifier. + :vartype id: str + :param result_type: Required. Result type.Constant filled by server. + :type result_type: str + :ivar database_name: Name of the database. + :vartype database_name: str + :ivar started_on: Migration start time. + :vartype started_on: ~datetime.datetime + :ivar ended_on: Migration end time. + :vartype ended_on: ~datetime.datetime + :ivar state: Current state of migration. Possible values include: "None", "InProgress", + "Failed", "Warning", "Completed", "Skipped", "Stopped". + :vartype state: str or ~azure.mgmt.datamigration.models.MigrationState + :ivar stage: Migration stage that this database is in. Possible values include: "None", + "Initialize", "Backup", "FileCopy", "Restore", "Completed". + :vartype stage: str or ~azure.mgmt.datamigration.models.DatabaseMigrationStage + :ivar status_message: Status message. + :vartype status_message: str + :ivar message: Migration progress message. + :vartype message: str + :ivar number_of_objects: Number of objects. + :vartype number_of_objects: long + :ivar number_of_objects_completed: Number of successfully completed objects. + :vartype number_of_objects_completed: long + :ivar error_count: Number of database/object errors. + :vartype error_count: long + :ivar error_prefix: Wildcard string prefix to use for querying all errors of the item. + :vartype error_prefix: str + :ivar result_prefix: Wildcard string prefix to use for querying all sub-tem results of the + item. + :vartype result_prefix: str + :ivar exceptions_and_warnings: Migration exceptions and warnings. + :vartype exceptions_and_warnings: list[~azure.mgmt.datamigration.models.ReportableException] + :ivar last_storage_update: Last time the storage was updated. + :vartype last_storage_update: ~datetime.datetime + :ivar object_summary: Summary of object results in the migration. + :vartype object_summary: str + """ + + _validation = { + 'id': {'readonly': True}, + 'result_type': {'required': True}, + 'database_name': {'readonly': True}, + 'started_on': {'readonly': True}, + 'ended_on': {'readonly': True}, + 'state': {'readonly': True}, + 'stage': {'readonly': True}, + 'status_message': {'readonly': True}, + 'message': {'readonly': True}, + 'number_of_objects': {'readonly': True}, + 'number_of_objects_completed': {'readonly': True}, + 'error_count': {'readonly': True}, + 'error_prefix': {'readonly': True}, + 'result_prefix': {'readonly': True}, + 'exceptions_and_warnings': {'readonly': True}, + 'last_storage_update': {'readonly': True}, + 'object_summary': {'readonly': True}, + } + + _attribute_map = { + 'id': {'key': 'id', 'type': 'str'}, + 'result_type': {'key': 'resultType', 'type': 'str'}, + 'database_name': {'key': 'databaseName', 'type': 'str'}, + 'started_on': {'key': 'startedOn', 'type': 'iso-8601'}, + 'ended_on': {'key': 'endedOn', 'type': 'iso-8601'}, + 'state': {'key': 'state', 'type': 'str'}, + 'stage': {'key': 'stage', 'type': 'str'}, + 'status_message': {'key': 'statusMessage', 'type': 'str'}, + 'message': {'key': 'message', 'type': 'str'}, + 'number_of_objects': {'key': 'numberOfObjects', 'type': 'long'}, + 'number_of_objects_completed': {'key': 'numberOfObjectsCompleted', 'type': 'long'}, + 'error_count': {'key': 'errorCount', 'type': 'long'}, + 'error_prefix': {'key': 'errorPrefix', 'type': 'str'}, + 'result_prefix': {'key': 'resultPrefix', 'type': 'str'}, + 'exceptions_and_warnings': {'key': 'exceptionsAndWarnings', 'type': '[ReportableException]'}, + 'last_storage_update': {'key': 'lastStorageUpdate', 'type': 'iso-8601'}, + 'object_summary': {'key': 'objectSummary', 'type': 'str'}, + } + + def __init__( + self, + **kwargs + ): + super(MigrateMySqlAzureDbForMySqlOfflineTaskOutputDatabaseLevel, self).__init__(**kwargs) + self.result_type = 'DatabaseLevelOutput' # type: str + self.database_name = None + self.started_on = None + self.ended_on = None + self.state = None + self.stage = None + self.status_message = None + self.message = None + self.number_of_objects = None + self.number_of_objects_completed = None + self.error_count = None + self.error_prefix = None + self.result_prefix = None + self.exceptions_and_warnings = None + self.last_storage_update = None + self.object_summary = None + + +class MigrateMySqlAzureDbForMySqlOfflineTaskOutputError(MigrateMySqlAzureDbForMySqlOfflineTaskOutput): + """MigrateMySqlAzureDbForMySqlOfflineTaskOutputError. + + Variables are only populated by the server, and will be ignored when sending a request. + + All required parameters must be populated in order to send to Azure. + + :ivar id: Result identifier. + :vartype id: str + :param result_type: Required. Result type.Constant filled by server. + :type result_type: str + :ivar error: Migration error. + :vartype error: ~azure.mgmt.datamigration.models.ReportableException + """ + + _validation = { + 'id': {'readonly': True}, + 'result_type': {'required': True}, + 'error': {'readonly': True}, + } + + _attribute_map = { + 'id': {'key': 'id', 'type': 'str'}, + 'result_type': {'key': 'resultType', 'type': 'str'}, + 'error': {'key': 'error', 'type': 'ReportableException'}, + } + + def __init__( + self, + **kwargs + ): + super(MigrateMySqlAzureDbForMySqlOfflineTaskOutputError, self).__init__(**kwargs) + self.result_type = 'ErrorOutput' # type: str + self.error = None + + +class MigrateMySqlAzureDbForMySqlOfflineTaskOutputMigrationLevel(MigrateMySqlAzureDbForMySqlOfflineTaskOutput): + """MigrateMySqlAzureDbForMySqlOfflineTaskOutputMigrationLevel. + + Variables are only populated by the server, and will be ignored when sending a request. + + All required parameters must be populated in order to send to Azure. + + :ivar id: Result identifier. + :vartype id: str + :param result_type: Required. Result type.Constant filled by server. + :type result_type: str + :ivar started_on: Migration start time. + :vartype started_on: ~datetime.datetime + :ivar ended_on: Migration end time. + :vartype ended_on: ~datetime.datetime + :ivar duration_in_seconds: Duration of task execution in seconds. + :vartype duration_in_seconds: long + :ivar status: Current status of migration. Possible values include: "Default", "Connecting", + "SourceAndTargetSelected", "SelectLogins", "Configured", "Running", "Error", "Stopped", + "Completed", "CompletedWithWarnings". + :vartype status: str or ~azure.mgmt.datamigration.models.MigrationStatus + :ivar status_message: Migration status message. + :vartype status_message: str + :ivar message: Migration progress message. + :vartype message: str + :param databases: Selected databases as a map from database name to database id. + :type databases: str + :ivar database_summary: Summary of database results in the migration. + :vartype database_summary: str + :param migration_report_result: Migration Report Result, provides unique url for downloading + your migration report. + :type migration_report_result: ~azure.mgmt.datamigration.models.MigrationReportResult + :ivar source_server_version: Source server version. + :vartype source_server_version: str + :ivar source_server_brand_version: Source server brand version. + :vartype source_server_brand_version: str + :ivar target_server_version: Target server version. + :vartype target_server_version: str + :ivar target_server_brand_version: Target server brand version. + :vartype target_server_brand_version: str + :ivar exceptions_and_warnings: Migration exceptions and warnings. + :vartype exceptions_and_warnings: list[~azure.mgmt.datamigration.models.ReportableException] + :ivar last_storage_update: Last time the storage was updated. + :vartype last_storage_update: ~datetime.datetime + """ + + _validation = { + 'id': {'readonly': True}, + 'result_type': {'required': True}, + 'started_on': {'readonly': True}, + 'ended_on': {'readonly': True}, + 'duration_in_seconds': {'readonly': True}, + 'status': {'readonly': True}, + 'status_message': {'readonly': True}, + 'message': {'readonly': True}, + 'database_summary': {'readonly': True}, + 'source_server_version': {'readonly': True}, + 'source_server_brand_version': {'readonly': True}, + 'target_server_version': {'readonly': True}, + 'target_server_brand_version': {'readonly': True}, + 'exceptions_and_warnings': {'readonly': True}, + 'last_storage_update': {'readonly': True}, + } + + _attribute_map = { + 'id': {'key': 'id', 'type': 'str'}, + 'result_type': {'key': 'resultType', 'type': 'str'}, + 'started_on': {'key': 'startedOn', 'type': 'iso-8601'}, + 'ended_on': {'key': 'endedOn', 'type': 'iso-8601'}, + 'duration_in_seconds': {'key': 'durationInSeconds', 'type': 'long'}, + 'status': {'key': 'status', 'type': 'str'}, + 'status_message': {'key': 'statusMessage', 'type': 'str'}, + 'message': {'key': 'message', 'type': 'str'}, + 'databases': {'key': 'databases', 'type': 'str'}, + 'database_summary': {'key': 'databaseSummary', 'type': 'str'}, + 'migration_report_result': {'key': 'migrationReportResult', 'type': 'MigrationReportResult'}, + 'source_server_version': {'key': 'sourceServerVersion', 'type': 'str'}, + 'source_server_brand_version': {'key': 'sourceServerBrandVersion', 'type': 'str'}, + 'target_server_version': {'key': 'targetServerVersion', 'type': 'str'}, + 'target_server_brand_version': {'key': 'targetServerBrandVersion', 'type': 'str'}, + 'exceptions_and_warnings': {'key': 'exceptionsAndWarnings', 'type': '[ReportableException]'}, + 'last_storage_update': {'key': 'lastStorageUpdate', 'type': 'iso-8601'}, + } + + def __init__( + self, + *, + databases: Optional[str] = None, + migration_report_result: Optional["MigrationReportResult"] = None, + **kwargs + ): + super(MigrateMySqlAzureDbForMySqlOfflineTaskOutputMigrationLevel, self).__init__(**kwargs) + self.result_type = 'MigrationLevelOutput' # type: str + self.started_on = None + self.ended_on = None + self.duration_in_seconds = None + self.status = None + self.status_message = None + self.message = None + self.databases = databases + self.database_summary = None + self.migration_report_result = migration_report_result + self.source_server_version = None + self.source_server_brand_version = None + self.target_server_version = None + self.target_server_brand_version = None + self.exceptions_and_warnings = None + self.last_storage_update = None + + +class MigrateMySqlAzureDbForMySqlOfflineTaskOutputTableLevel(MigrateMySqlAzureDbForMySqlOfflineTaskOutput): + """MigrateMySqlAzureDbForMySqlOfflineTaskOutputTableLevel. + + Variables are only populated by the server, and will be ignored when sending a request. + + All required parameters must be populated in order to send to Azure. + + :ivar id: Result identifier. + :vartype id: str + :param result_type: Required. Result type.Constant filled by server. + :type result_type: str + :ivar object_name: Name of the item. + :vartype object_name: str + :ivar started_on: Migration start time. + :vartype started_on: ~datetime.datetime + :ivar ended_on: Migration end time. + :vartype ended_on: ~datetime.datetime + :ivar state: Current state of migration. Possible values include: "None", "InProgress", + "Failed", "Warning", "Completed", "Skipped", "Stopped". + :vartype state: str or ~azure.mgmt.datamigration.models.MigrationState + :ivar status_message: Status message. + :vartype status_message: str + :ivar items_count: Number of items. + :vartype items_count: long + :ivar items_completed_count: Number of successfully completed items. + :vartype items_completed_count: long + :ivar error_prefix: Wildcard string prefix to use for querying all errors of the item. + :vartype error_prefix: str + :ivar result_prefix: Wildcard string prefix to use for querying all sub-tem results of the + item. + :vartype result_prefix: str + :ivar last_storage_update: Last time the storage was updated. + :vartype last_storage_update: ~datetime.datetime + """ + + _validation = { + 'id': {'readonly': True}, + 'result_type': {'required': True}, + 'object_name': {'readonly': True}, + 'started_on': {'readonly': True}, + 'ended_on': {'readonly': True}, + 'state': {'readonly': True}, + 'status_message': {'readonly': True}, + 'items_count': {'readonly': True}, + 'items_completed_count': {'readonly': True}, + 'error_prefix': {'readonly': True}, + 'result_prefix': {'readonly': True}, + 'last_storage_update': {'readonly': True}, + } + + _attribute_map = { + 'id': {'key': 'id', 'type': 'str'}, + 'result_type': {'key': 'resultType', 'type': 'str'}, + 'object_name': {'key': 'objectName', 'type': 'str'}, + 'started_on': {'key': 'startedOn', 'type': 'iso-8601'}, + 'ended_on': {'key': 'endedOn', 'type': 'iso-8601'}, + 'state': {'key': 'state', 'type': 'str'}, + 'status_message': {'key': 'statusMessage', 'type': 'str'}, + 'items_count': {'key': 'itemsCount', 'type': 'long'}, + 'items_completed_count': {'key': 'itemsCompletedCount', 'type': 'long'}, + 'error_prefix': {'key': 'errorPrefix', 'type': 'str'}, + 'result_prefix': {'key': 'resultPrefix', 'type': 'str'}, + 'last_storage_update': {'key': 'lastStorageUpdate', 'type': 'iso-8601'}, + } + + def __init__( + self, + **kwargs + ): + super(MigrateMySqlAzureDbForMySqlOfflineTaskOutputTableLevel, self).__init__(**kwargs) + self.result_type = 'TableLevelOutput' # type: str + self.object_name = None + self.started_on = None + self.ended_on = None + self.state = None + self.status_message = None + self.items_count = None + self.items_completed_count = None + self.error_prefix = None + self.result_prefix = None + self.last_storage_update = None + + +class MigrateMySqlAzureDbForMySqlOfflineTaskProperties(ProjectTaskProperties): + """Properties for the task that migrates MySQL databases to Azure Database for MySQL for offline migrations. + + Variables are only populated by the server, and will be ignored when sending a request. + + All required parameters must be populated in order to send to Azure. + + :param task_type: Required. Task type.Constant filled by server. Possible values include: + "Connect.MongoDb", "ConnectToSource.SqlServer", "ConnectToSource.SqlServer.Sync", + "ConnectToSource.PostgreSql.Sync", "ConnectToSource.MySql", "ConnectToSource.Oracle.Sync", + "ConnectToTarget.SqlDb", "ConnectToTarget.SqlDb.Sync", + "ConnectToTarget.AzureDbForPostgreSql.Sync", + "ConnectToTarget.Oracle.AzureDbForPostgreSql.Sync", "ConnectToTarget.AzureSqlDbMI", + "ConnectToTarget.AzureSqlDbMI.Sync.LRS", "ConnectToTarget.AzureDbForMySql", + "GetUserTables.Sql", "GetUserTables.AzureSqlDb.Sync", "GetUserTablesOracle", + "GetUserTablesPostgreSql", "GetUserTablesMySql", "Migrate.MongoDb", + "Migrate.SqlServer.AzureSqlDbMI", "Migrate.SqlServer.AzureSqlDbMI.Sync.LRS", + "Migrate.SqlServer.SqlDb", "Migrate.SqlServer.AzureSqlDb.Sync", + "Migrate.MySql.AzureDbForMySql.Sync", "Migrate.MySql.AzureDbForMySql", + "Migrate.PostgreSql.AzureDbForPostgreSql.SyncV2", "Migrate.Oracle.AzureDbForPostgreSql.Sync", + "ValidateMigrationInput.SqlServer.SqlDb.Sync", "ValidateMigrationInput.SqlServer.AzureSqlDbMI", + "ValidateMigrationInput.SqlServer.AzureSqlDbMI.Sync.LRS", "Validate.MongoDb", + "Validate.Oracle.AzureDbPostgreSql.Sync", "GetTDECertificates.Sql", "Migrate.Ssis", + "Service.Check.OCI", "Service.Upload.OCI", "Service.Install.OCI", + "MigrateSchemaSqlServerSqlDb". + :type task_type: str or ~azure.mgmt.datamigration.models.TaskType + :ivar errors: Array of errors. This is ignored if submitted. + :vartype errors: list[~azure.mgmt.datamigration.models.ODataError] + :ivar state: The state of the task. This is ignored if submitted. Possible values include: + "Unknown", "Queued", "Running", "Canceled", "Succeeded", "Failed", "FailedInputValidation", + "Faulted". + :vartype state: str or ~azure.mgmt.datamigration.models.TaskState + :ivar commands: Array of command properties. + :vartype commands: list[~azure.mgmt.datamigration.models.CommandProperties] + :param client_data: Key value pairs of client data to attach meta data information to task. + :type client_data: dict[str, str] + :param input: Task input. + :type input: ~azure.mgmt.datamigration.models.MigrateMySqlAzureDbForMySqlOfflineTaskInput + :ivar output: Task output. This is ignored if submitted. + :vartype output: + list[~azure.mgmt.datamigration.models.MigrateMySqlAzureDbForMySqlOfflineTaskOutput] + """ + + _validation = { + 'task_type': {'required': True}, + 'errors': {'readonly': True}, + 'state': {'readonly': True}, + 'commands': {'readonly': True}, + 'output': {'readonly': True}, + } + + _attribute_map = { + 'task_type': {'key': 'taskType', 'type': 'str'}, + 'errors': {'key': 'errors', 'type': '[ODataError]'}, + 'state': {'key': 'state', 'type': 'str'}, + 'commands': {'key': 'commands', 'type': '[CommandProperties]'}, + 'client_data': {'key': 'clientData', 'type': '{str}'}, + 'input': {'key': 'input', 'type': 'MigrateMySqlAzureDbForMySqlOfflineTaskInput'}, + 'output': {'key': 'output', 'type': '[MigrateMySqlAzureDbForMySqlOfflineTaskOutput]'}, + } + + def __init__( + self, + *, + client_data: Optional[Dict[str, str]] = None, + input: Optional["MigrateMySqlAzureDbForMySqlOfflineTaskInput"] = None, + **kwargs + ): + super(MigrateMySqlAzureDbForMySqlOfflineTaskProperties, self).__init__(client_data=client_data, **kwargs) + self.task_type = 'Migrate.MySql.AzureDbForMySql' # type: str + self.input = input + self.output = None + + +class MigrateMySqlAzureDbForMySqlSyncDatabaseInput(msrest.serialization.Model): + """Database specific information for MySQL to Azure Database for MySQL migration task inputs. + + :param name: Name of the database. + :type name: str + :param target_database_name: Name of target database. Note: Target database will be truncated + before starting migration. + :type target_database_name: str + :param migration_setting: Migration settings which tune the migration behavior. + :type migration_setting: dict[str, str] + :param source_setting: Source settings to tune source endpoint migration behavior. + :type source_setting: dict[str, str] + :param target_setting: Target settings to tune target endpoint migration behavior. + :type target_setting: dict[str, str] + :param table_map: Mapping of source to target tables. + :type table_map: dict[str, str] + """ + + _attribute_map = { + 'name': {'key': 'name', 'type': 'str'}, + 'target_database_name': {'key': 'targetDatabaseName', 'type': 'str'}, + 'migration_setting': {'key': 'migrationSetting', 'type': '{str}'}, + 'source_setting': {'key': 'sourceSetting', 'type': '{str}'}, + 'target_setting': {'key': 'targetSetting', 'type': '{str}'}, + 'table_map': {'key': 'tableMap', 'type': '{str}'}, + } + + def __init__( + self, + *, + name: Optional[str] = None, + target_database_name: Optional[str] = None, + migration_setting: Optional[Dict[str, str]] = None, + source_setting: Optional[Dict[str, str]] = None, + target_setting: Optional[Dict[str, str]] = None, + table_map: Optional[Dict[str, str]] = None, + **kwargs + ): + super(MigrateMySqlAzureDbForMySqlSyncDatabaseInput, self).__init__(**kwargs) + self.name = name + self.target_database_name = target_database_name + self.migration_setting = migration_setting + self.source_setting = source_setting + self.target_setting = target_setting + self.table_map = table_map + + +class MigrateMySqlAzureDbForMySqlSyncTaskInput(msrest.serialization.Model): + """Input for the task that migrates MySQL databases to Azure Database for MySQL for online migrations. + + All required parameters must be populated in order to send to Azure. + + :param source_connection_info: Required. Connection information for source MySQL. + :type source_connection_info: ~azure.mgmt.datamigration.models.MySqlConnectionInfo + :param target_connection_info: Required. Connection information for target Azure Database for + MySQL. + :type target_connection_info: ~azure.mgmt.datamigration.models.MySqlConnectionInfo + :param selected_databases: Required. Databases to migrate. + :type selected_databases: + list[~azure.mgmt.datamigration.models.MigrateMySqlAzureDbForMySqlSyncDatabaseInput] + """ + + _validation = { + 'source_connection_info': {'required': True}, + 'target_connection_info': {'required': True}, + 'selected_databases': {'required': True}, + } + + _attribute_map = { + 'source_connection_info': {'key': 'sourceConnectionInfo', 'type': 'MySqlConnectionInfo'}, + 'target_connection_info': {'key': 'targetConnectionInfo', 'type': 'MySqlConnectionInfo'}, + 'selected_databases': {'key': 'selectedDatabases', 'type': '[MigrateMySqlAzureDbForMySqlSyncDatabaseInput]'}, + } + + def __init__( + self, + *, + source_connection_info: "MySqlConnectionInfo", + target_connection_info: "MySqlConnectionInfo", + selected_databases: List["MigrateMySqlAzureDbForMySqlSyncDatabaseInput"], + **kwargs + ): + super(MigrateMySqlAzureDbForMySqlSyncTaskInput, self).__init__(**kwargs) + self.source_connection_info = source_connection_info + self.target_connection_info = target_connection_info + self.selected_databases = selected_databases + + +class MigrateMySqlAzureDbForMySqlSyncTaskOutput(msrest.serialization.Model): + """Output for the task that migrates MySQL databases to Azure Database for MySQL for online migrations. + + You probably want to use the sub-classes and not this class directly. Known + sub-classes are: MigrateMySqlAzureDbForMySqlSyncTaskOutputDatabaseError, MigrateMySqlAzureDbForMySqlSyncTaskOutputDatabaseLevel, MigrateMySqlAzureDbForMySqlSyncTaskOutputError, MigrateMySqlAzureDbForMySqlSyncTaskOutputMigrationLevel, MigrateMySqlAzureDbForMySqlSyncTaskOutputTableLevel. + + Variables are only populated by the server, and will be ignored when sending a request. + + All required parameters must be populated in order to send to Azure. + + :ivar id: Result identifier. + :vartype id: str + :param result_type: Required. Result type.Constant filled by server. + :type result_type: str + """ + + _validation = { + 'id': {'readonly': True}, + 'result_type': {'required': True}, + } + + _attribute_map = { + 'id': {'key': 'id', 'type': 'str'}, + 'result_type': {'key': 'resultType', 'type': 'str'}, + } + + _subtype_map = { + 'result_type': {'DatabaseLevelErrorOutput': 'MigrateMySqlAzureDbForMySqlSyncTaskOutputDatabaseError', 'DatabaseLevelOutput': 'MigrateMySqlAzureDbForMySqlSyncTaskOutputDatabaseLevel', 'ErrorOutput': 'MigrateMySqlAzureDbForMySqlSyncTaskOutputError', 'MigrationLevelOutput': 'MigrateMySqlAzureDbForMySqlSyncTaskOutputMigrationLevel', 'TableLevelOutput': 'MigrateMySqlAzureDbForMySqlSyncTaskOutputTableLevel'} + } + + def __init__( + self, + **kwargs + ): + super(MigrateMySqlAzureDbForMySqlSyncTaskOutput, self).__init__(**kwargs) + self.id = None + self.result_type = None # type: Optional[str] + + +class MigrateMySqlAzureDbForMySqlSyncTaskOutputDatabaseError(MigrateMySqlAzureDbForMySqlSyncTaskOutput): + """MigrateMySqlAzureDbForMySqlSyncTaskOutputDatabaseError. + + Variables are only populated by the server, and will be ignored when sending a request. + + All required parameters must be populated in order to send to Azure. + + :ivar id: Result identifier. + :vartype id: str + :param result_type: Required. Result type.Constant filled by server. + :type result_type: str + :param error_message: Error message. + :type error_message: str + :param events: List of error events. + :type events: list[~azure.mgmt.datamigration.models.SyncMigrationDatabaseErrorEvent] + """ + + _validation = { + 'id': {'readonly': True}, + 'result_type': {'required': True}, + } + + _attribute_map = { + 'id': {'key': 'id', 'type': 'str'}, + 'result_type': {'key': 'resultType', 'type': 'str'}, + 'error_message': {'key': 'errorMessage', 'type': 'str'}, + 'events': {'key': 'events', 'type': '[SyncMigrationDatabaseErrorEvent]'}, + } + + def __init__( + self, + *, + error_message: Optional[str] = None, + events: Optional[List["SyncMigrationDatabaseErrorEvent"]] = None, + **kwargs + ): + super(MigrateMySqlAzureDbForMySqlSyncTaskOutputDatabaseError, self).__init__(**kwargs) + self.result_type = 'DatabaseLevelErrorOutput' # type: str + self.error_message = error_message + self.events = events + + +class MigrateMySqlAzureDbForMySqlSyncTaskOutputDatabaseLevel(MigrateMySqlAzureDbForMySqlSyncTaskOutput): + """MigrateMySqlAzureDbForMySqlSyncTaskOutputDatabaseLevel. + + Variables are only populated by the server, and will be ignored when sending a request. + + All required parameters must be populated in order to send to Azure. + + :ivar id: Result identifier. + :vartype id: str + :param result_type: Required. Result type.Constant filled by server. + :type result_type: str + :ivar database_name: Name of the database. + :vartype database_name: str + :ivar started_on: Migration start time. + :vartype started_on: ~datetime.datetime + :ivar ended_on: Migration end time. + :vartype ended_on: ~datetime.datetime + :ivar migration_state: Migration state that this database is in. Possible values include: + "UNDEFINED", "CONFIGURING", "INITIALIAZING", "STARTING", "RUNNING", "READY_TO_COMPLETE", + "COMPLETING", "COMPLETE", "CANCELLING", "CANCELLED", "FAILED", "VALIDATING", + "VALIDATION_COMPLETE", "VALIDATION_FAILED", "RESTORE_IN_PROGRESS", "RESTORE_COMPLETED", + "BACKUP_IN_PROGRESS", "BACKUP_COMPLETED". + :vartype migration_state: str or + ~azure.mgmt.datamigration.models.SyncDatabaseMigrationReportingState + :ivar incoming_changes: Number of incoming changes. + :vartype incoming_changes: long + :ivar applied_changes: Number of applied changes. + :vartype applied_changes: long + :ivar cdc_insert_counter: Number of cdc inserts. + :vartype cdc_insert_counter: long + :ivar cdc_delete_counter: Number of cdc deletes. + :vartype cdc_delete_counter: long + :ivar cdc_update_counter: Number of cdc updates. + :vartype cdc_update_counter: long + :ivar full_load_completed_tables: Number of tables completed in full load. + :vartype full_load_completed_tables: long + :ivar full_load_loading_tables: Number of tables loading in full load. + :vartype full_load_loading_tables: long + :ivar full_load_queued_tables: Number of tables queued in full load. + :vartype full_load_queued_tables: long + :ivar full_load_errored_tables: Number of tables errored in full load. + :vartype full_load_errored_tables: long + :ivar initialization_completed: Indicates if initial load (full load) has been completed. + :vartype initialization_completed: bool + :ivar latency: CDC apply latency. + :vartype latency: long + """ + + _validation = { + 'id': {'readonly': True}, + 'result_type': {'required': True}, + 'database_name': {'readonly': True}, + 'started_on': {'readonly': True}, + 'ended_on': {'readonly': True}, + 'migration_state': {'readonly': True}, + 'incoming_changes': {'readonly': True}, + 'applied_changes': {'readonly': True}, + 'cdc_insert_counter': {'readonly': True}, + 'cdc_delete_counter': {'readonly': True}, + 'cdc_update_counter': {'readonly': True}, + 'full_load_completed_tables': {'readonly': True}, + 'full_load_loading_tables': {'readonly': True}, + 'full_load_queued_tables': {'readonly': True}, + 'full_load_errored_tables': {'readonly': True}, + 'initialization_completed': {'readonly': True}, + 'latency': {'readonly': True}, + } + + _attribute_map = { + 'id': {'key': 'id', 'type': 'str'}, + 'result_type': {'key': 'resultType', 'type': 'str'}, + 'database_name': {'key': 'databaseName', 'type': 'str'}, + 'started_on': {'key': 'startedOn', 'type': 'iso-8601'}, + 'ended_on': {'key': 'endedOn', 'type': 'iso-8601'}, + 'migration_state': {'key': 'migrationState', 'type': 'str'}, + 'incoming_changes': {'key': 'incomingChanges', 'type': 'long'}, + 'applied_changes': {'key': 'appliedChanges', 'type': 'long'}, + 'cdc_insert_counter': {'key': 'cdcInsertCounter', 'type': 'long'}, + 'cdc_delete_counter': {'key': 'cdcDeleteCounter', 'type': 'long'}, + 'cdc_update_counter': {'key': 'cdcUpdateCounter', 'type': 'long'}, + 'full_load_completed_tables': {'key': 'fullLoadCompletedTables', 'type': 'long'}, + 'full_load_loading_tables': {'key': 'fullLoadLoadingTables', 'type': 'long'}, + 'full_load_queued_tables': {'key': 'fullLoadQueuedTables', 'type': 'long'}, + 'full_load_errored_tables': {'key': 'fullLoadErroredTables', 'type': 'long'}, + 'initialization_completed': {'key': 'initializationCompleted', 'type': 'bool'}, + 'latency': {'key': 'latency', 'type': 'long'}, + } + + def __init__( + self, + **kwargs + ): + super(MigrateMySqlAzureDbForMySqlSyncTaskOutputDatabaseLevel, self).__init__(**kwargs) + self.result_type = 'DatabaseLevelOutput' # type: str + self.database_name = None + self.started_on = None + self.ended_on = None + self.migration_state = None + self.incoming_changes = None + self.applied_changes = None + self.cdc_insert_counter = None + self.cdc_delete_counter = None + self.cdc_update_counter = None + self.full_load_completed_tables = None + self.full_load_loading_tables = None + self.full_load_queued_tables = None + self.full_load_errored_tables = None + self.initialization_completed = None + self.latency = None + + +class MigrateMySqlAzureDbForMySqlSyncTaskOutputError(MigrateMySqlAzureDbForMySqlSyncTaskOutput): + """MigrateMySqlAzureDbForMySqlSyncTaskOutputError. + + Variables are only populated by the server, and will be ignored when sending a request. + + All required parameters must be populated in order to send to Azure. + + :ivar id: Result identifier. + :vartype id: str + :param result_type: Required. Result type.Constant filled by server. + :type result_type: str + :ivar error: Migration error. + :vartype error: ~azure.mgmt.datamigration.models.ReportableException + """ + + _validation = { + 'id': {'readonly': True}, + 'result_type': {'required': True}, + 'error': {'readonly': True}, + } + + _attribute_map = { + 'id': {'key': 'id', 'type': 'str'}, + 'result_type': {'key': 'resultType', 'type': 'str'}, + 'error': {'key': 'error', 'type': 'ReportableException'}, + } + + def __init__( + self, + **kwargs + ): + super(MigrateMySqlAzureDbForMySqlSyncTaskOutputError, self).__init__(**kwargs) + self.result_type = 'ErrorOutput' # type: str + self.error = None + + +class MigrateMySqlAzureDbForMySqlSyncTaskOutputMigrationLevel(MigrateMySqlAzureDbForMySqlSyncTaskOutput): + """MigrateMySqlAzureDbForMySqlSyncTaskOutputMigrationLevel. + + Variables are only populated by the server, and will be ignored when sending a request. + + All required parameters must be populated in order to send to Azure. + + :ivar id: Result identifier. + :vartype id: str + :param result_type: Required. Result type.Constant filled by server. + :type result_type: str + :ivar started_on: Migration start time. + :vartype started_on: ~datetime.datetime + :ivar ended_on: Migration end time. + :vartype ended_on: ~datetime.datetime + :ivar source_server_version: Source server version. + :vartype source_server_version: str + :ivar source_server: Source server name. + :vartype source_server: str + :ivar target_server_version: Target server version. + :vartype target_server_version: str + :ivar target_server: Target server name. + :vartype target_server: str + """ + + _validation = { + 'id': {'readonly': True}, + 'result_type': {'required': True}, + 'started_on': {'readonly': True}, + 'ended_on': {'readonly': True}, + 'source_server_version': {'readonly': True}, + 'source_server': {'readonly': True}, + 'target_server_version': {'readonly': True}, + 'target_server': {'readonly': True}, + } + + _attribute_map = { + 'id': {'key': 'id', 'type': 'str'}, + 'result_type': {'key': 'resultType', 'type': 'str'}, + 'started_on': {'key': 'startedOn', 'type': 'iso-8601'}, + 'ended_on': {'key': 'endedOn', 'type': 'iso-8601'}, + 'source_server_version': {'key': 'sourceServerVersion', 'type': 'str'}, + 'source_server': {'key': 'sourceServer', 'type': 'str'}, + 'target_server_version': {'key': 'targetServerVersion', 'type': 'str'}, + 'target_server': {'key': 'targetServer', 'type': 'str'}, + } + + def __init__( + self, + **kwargs + ): + super(MigrateMySqlAzureDbForMySqlSyncTaskOutputMigrationLevel, self).__init__(**kwargs) + self.result_type = 'MigrationLevelOutput' # type: str + self.started_on = None + self.ended_on = None + self.source_server_version = None + self.source_server = None + self.target_server_version = None + self.target_server = None + + +class MigrateMySqlAzureDbForMySqlSyncTaskOutputTableLevel(MigrateMySqlAzureDbForMySqlSyncTaskOutput): + """MigrateMySqlAzureDbForMySqlSyncTaskOutputTableLevel. + + Variables are only populated by the server, and will be ignored when sending a request. + + All required parameters must be populated in order to send to Azure. + + :ivar id: Result identifier. + :vartype id: str + :param result_type: Required. Result type.Constant filled by server. + :type result_type: str + :ivar table_name: Name of the table. + :vartype table_name: str + :ivar database_name: Name of the database. + :vartype database_name: str + :ivar cdc_insert_counter: Number of applied inserts. + :vartype cdc_insert_counter: str + :ivar cdc_update_counter: Number of applied updates. + :vartype cdc_update_counter: str + :ivar cdc_delete_counter: Number of applied deletes. + :vartype cdc_delete_counter: str + :ivar full_load_est_finish_time: Estimate to finish full load. + :vartype full_load_est_finish_time: ~datetime.datetime + :ivar full_load_started_on: Full load start time. + :vartype full_load_started_on: ~datetime.datetime + :ivar full_load_ended_on: Full load end time. + :vartype full_load_ended_on: ~datetime.datetime + :ivar full_load_total_rows: Number of rows applied in full load. + :vartype full_load_total_rows: long + :ivar state: Current state of the table migration. Possible values include: "BEFORE_LOAD", + "FULL_LOAD", "COMPLETED", "CANCELED", "ERROR", "FAILED". + :vartype state: str or ~azure.mgmt.datamigration.models.SyncTableMigrationState + :ivar total_changes_applied: Total number of applied changes. + :vartype total_changes_applied: long + :ivar data_errors_counter: Number of data errors occurred. + :vartype data_errors_counter: long + :ivar last_modified_time: Last modified time on target. + :vartype last_modified_time: ~datetime.datetime + """ + + _validation = { + 'id': {'readonly': True}, + 'result_type': {'required': True}, + 'table_name': {'readonly': True}, + 'database_name': {'readonly': True}, + 'cdc_insert_counter': {'readonly': True}, + 'cdc_update_counter': {'readonly': True}, + 'cdc_delete_counter': {'readonly': True}, + 'full_load_est_finish_time': {'readonly': True}, + 'full_load_started_on': {'readonly': True}, + 'full_load_ended_on': {'readonly': True}, + 'full_load_total_rows': {'readonly': True}, + 'state': {'readonly': True}, + 'total_changes_applied': {'readonly': True}, + 'data_errors_counter': {'readonly': True}, + 'last_modified_time': {'readonly': True}, + } + + _attribute_map = { + 'id': {'key': 'id', 'type': 'str'}, + 'result_type': {'key': 'resultType', 'type': 'str'}, + 'table_name': {'key': 'tableName', 'type': 'str'}, + 'database_name': {'key': 'databaseName', 'type': 'str'}, + 'cdc_insert_counter': {'key': 'cdcInsertCounter', 'type': 'str'}, + 'cdc_update_counter': {'key': 'cdcUpdateCounter', 'type': 'str'}, + 'cdc_delete_counter': {'key': 'cdcDeleteCounter', 'type': 'str'}, + 'full_load_est_finish_time': {'key': 'fullLoadEstFinishTime', 'type': 'iso-8601'}, + 'full_load_started_on': {'key': 'fullLoadStartedOn', 'type': 'iso-8601'}, + 'full_load_ended_on': {'key': 'fullLoadEndedOn', 'type': 'iso-8601'}, + 'full_load_total_rows': {'key': 'fullLoadTotalRows', 'type': 'long'}, + 'state': {'key': 'state', 'type': 'str'}, + 'total_changes_applied': {'key': 'totalChangesApplied', 'type': 'long'}, + 'data_errors_counter': {'key': 'dataErrorsCounter', 'type': 'long'}, + 'last_modified_time': {'key': 'lastModifiedTime', 'type': 'iso-8601'}, + } + + def __init__( + self, + **kwargs + ): + super(MigrateMySqlAzureDbForMySqlSyncTaskOutputTableLevel, self).__init__(**kwargs) + self.result_type = 'TableLevelOutput' # type: str + self.table_name = None + self.database_name = None + self.cdc_insert_counter = None + self.cdc_update_counter = None + self.cdc_delete_counter = None + self.full_load_est_finish_time = None + self.full_load_started_on = None + self.full_load_ended_on = None + self.full_load_total_rows = None + self.state = None + self.total_changes_applied = None + self.data_errors_counter = None + self.last_modified_time = None + + +class MigrateMySqlAzureDbForMySqlSyncTaskProperties(ProjectTaskProperties): + """Properties for the task that migrates MySQL databases to Azure Database for MySQL for online migrations. + + Variables are only populated by the server, and will be ignored when sending a request. + + All required parameters must be populated in order to send to Azure. + + :param task_type: Required. Task type.Constant filled by server. Possible values include: + "Connect.MongoDb", "ConnectToSource.SqlServer", "ConnectToSource.SqlServer.Sync", + "ConnectToSource.PostgreSql.Sync", "ConnectToSource.MySql", "ConnectToSource.Oracle.Sync", + "ConnectToTarget.SqlDb", "ConnectToTarget.SqlDb.Sync", + "ConnectToTarget.AzureDbForPostgreSql.Sync", + "ConnectToTarget.Oracle.AzureDbForPostgreSql.Sync", "ConnectToTarget.AzureSqlDbMI", + "ConnectToTarget.AzureSqlDbMI.Sync.LRS", "ConnectToTarget.AzureDbForMySql", + "GetUserTables.Sql", "GetUserTables.AzureSqlDb.Sync", "GetUserTablesOracle", + "GetUserTablesPostgreSql", "GetUserTablesMySql", "Migrate.MongoDb", + "Migrate.SqlServer.AzureSqlDbMI", "Migrate.SqlServer.AzureSqlDbMI.Sync.LRS", + "Migrate.SqlServer.SqlDb", "Migrate.SqlServer.AzureSqlDb.Sync", + "Migrate.MySql.AzureDbForMySql.Sync", "Migrate.MySql.AzureDbForMySql", + "Migrate.PostgreSql.AzureDbForPostgreSql.SyncV2", "Migrate.Oracle.AzureDbForPostgreSql.Sync", + "ValidateMigrationInput.SqlServer.SqlDb.Sync", "ValidateMigrationInput.SqlServer.AzureSqlDbMI", + "ValidateMigrationInput.SqlServer.AzureSqlDbMI.Sync.LRS", "Validate.MongoDb", + "Validate.Oracle.AzureDbPostgreSql.Sync", "GetTDECertificates.Sql", "Migrate.Ssis", + "Service.Check.OCI", "Service.Upload.OCI", "Service.Install.OCI", + "MigrateSchemaSqlServerSqlDb". + :type task_type: str or ~azure.mgmt.datamigration.models.TaskType + :ivar errors: Array of errors. This is ignored if submitted. + :vartype errors: list[~azure.mgmt.datamigration.models.ODataError] + :ivar state: The state of the task. This is ignored if submitted. Possible values include: + "Unknown", "Queued", "Running", "Canceled", "Succeeded", "Failed", "FailedInputValidation", + "Faulted". + :vartype state: str or ~azure.mgmt.datamigration.models.TaskState + :ivar commands: Array of command properties. + :vartype commands: list[~azure.mgmt.datamigration.models.CommandProperties] + :param client_data: Key value pairs of client data to attach meta data information to task. + :type client_data: dict[str, str] + :param input: Task input. + :type input: ~azure.mgmt.datamigration.models.MigrateMySqlAzureDbForMySqlSyncTaskInput + :ivar output: Task output. This is ignored if submitted. + :vartype output: + list[~azure.mgmt.datamigration.models.MigrateMySqlAzureDbForMySqlSyncTaskOutput] + """ + + _validation = { + 'task_type': {'required': True}, + 'errors': {'readonly': True}, + 'state': {'readonly': True}, + 'commands': {'readonly': True}, + 'output': {'readonly': True}, + } + + _attribute_map = { + 'task_type': {'key': 'taskType', 'type': 'str'}, + 'errors': {'key': 'errors', 'type': '[ODataError]'}, + 'state': {'key': 'state', 'type': 'str'}, + 'commands': {'key': 'commands', 'type': '[CommandProperties]'}, + 'client_data': {'key': 'clientData', 'type': '{str}'}, + 'input': {'key': 'input', 'type': 'MigrateMySqlAzureDbForMySqlSyncTaskInput'}, + 'output': {'key': 'output', 'type': '[MigrateMySqlAzureDbForMySqlSyncTaskOutput]'}, + } + + def __init__( + self, + *, + client_data: Optional[Dict[str, str]] = None, + input: Optional["MigrateMySqlAzureDbForMySqlSyncTaskInput"] = None, + **kwargs + ): + super(MigrateMySqlAzureDbForMySqlSyncTaskProperties, self).__init__(client_data=client_data, **kwargs) + self.task_type = 'Migrate.MySql.AzureDbForMySql.Sync' # type: str + self.input = input + self.output = None + + +class MigrateOracleAzureDbForPostgreSqlSyncTaskProperties(ProjectTaskProperties): + """Properties for the task that migrates Oracle to Azure Database for PostgreSQL for online migrations. + + Variables are only populated by the server, and will be ignored when sending a request. + + All required parameters must be populated in order to send to Azure. + + :param task_type: Required. Task type.Constant filled by server. Possible values include: + "Connect.MongoDb", "ConnectToSource.SqlServer", "ConnectToSource.SqlServer.Sync", + "ConnectToSource.PostgreSql.Sync", "ConnectToSource.MySql", "ConnectToSource.Oracle.Sync", + "ConnectToTarget.SqlDb", "ConnectToTarget.SqlDb.Sync", + "ConnectToTarget.AzureDbForPostgreSql.Sync", + "ConnectToTarget.Oracle.AzureDbForPostgreSql.Sync", "ConnectToTarget.AzureSqlDbMI", + "ConnectToTarget.AzureSqlDbMI.Sync.LRS", "ConnectToTarget.AzureDbForMySql", + "GetUserTables.Sql", "GetUserTables.AzureSqlDb.Sync", "GetUserTablesOracle", + "GetUserTablesPostgreSql", "GetUserTablesMySql", "Migrate.MongoDb", + "Migrate.SqlServer.AzureSqlDbMI", "Migrate.SqlServer.AzureSqlDbMI.Sync.LRS", + "Migrate.SqlServer.SqlDb", "Migrate.SqlServer.AzureSqlDb.Sync", + "Migrate.MySql.AzureDbForMySql.Sync", "Migrate.MySql.AzureDbForMySql", + "Migrate.PostgreSql.AzureDbForPostgreSql.SyncV2", "Migrate.Oracle.AzureDbForPostgreSql.Sync", + "ValidateMigrationInput.SqlServer.SqlDb.Sync", "ValidateMigrationInput.SqlServer.AzureSqlDbMI", + "ValidateMigrationInput.SqlServer.AzureSqlDbMI.Sync.LRS", "Validate.MongoDb", + "Validate.Oracle.AzureDbPostgreSql.Sync", "GetTDECertificates.Sql", "Migrate.Ssis", + "Service.Check.OCI", "Service.Upload.OCI", "Service.Install.OCI", + "MigrateSchemaSqlServerSqlDb". + :type task_type: str or ~azure.mgmt.datamigration.models.TaskType + :ivar errors: Array of errors. This is ignored if submitted. + :vartype errors: list[~azure.mgmt.datamigration.models.ODataError] + :ivar state: The state of the task. This is ignored if submitted. Possible values include: + "Unknown", "Queued", "Running", "Canceled", "Succeeded", "Failed", "FailedInputValidation", + "Faulted". + :vartype state: str or ~azure.mgmt.datamigration.models.TaskState + :ivar commands: Array of command properties. + :vartype commands: list[~azure.mgmt.datamigration.models.CommandProperties] + :param client_data: Key value pairs of client data to attach meta data information to task. + :type client_data: dict[str, str] + :param input: Task input. + :type input: ~azure.mgmt.datamigration.models.MigrateOracleAzureDbPostgreSqlSyncTaskInput + :ivar output: Task output. This is ignored if submitted. + :vartype output: + list[~azure.mgmt.datamigration.models.MigrateOracleAzureDbPostgreSqlSyncTaskOutput] + """ + + _validation = { + 'task_type': {'required': True}, + 'errors': {'readonly': True}, + 'state': {'readonly': True}, + 'commands': {'readonly': True}, + 'output': {'readonly': True}, + } + + _attribute_map = { + 'task_type': {'key': 'taskType', 'type': 'str'}, + 'errors': {'key': 'errors', 'type': '[ODataError]'}, + 'state': {'key': 'state', 'type': 'str'}, + 'commands': {'key': 'commands', 'type': '[CommandProperties]'}, + 'client_data': {'key': 'clientData', 'type': '{str}'}, + 'input': {'key': 'input', 'type': 'MigrateOracleAzureDbPostgreSqlSyncTaskInput'}, + 'output': {'key': 'output', 'type': '[MigrateOracleAzureDbPostgreSqlSyncTaskOutput]'}, + } + + def __init__( + self, + *, + client_data: Optional[Dict[str, str]] = None, + input: Optional["MigrateOracleAzureDbPostgreSqlSyncTaskInput"] = None, + **kwargs + ): + super(MigrateOracleAzureDbForPostgreSqlSyncTaskProperties, self).__init__(client_data=client_data, **kwargs) + self.task_type = 'Migrate.Oracle.AzureDbForPostgreSql.Sync' # type: str + self.input = input + self.output = None + + +class MigrateOracleAzureDbPostgreSqlSyncDatabaseInput(msrest.serialization.Model): + """Database specific information for Oracle to Azure Database for PostgreSQL migration task inputs. + + :param case_manipulation: How to handle object name casing: either Preserve or ToLower. + :type case_manipulation: str + :param name: Name of the migration pipeline. + :type name: str + :param schema_name: Name of the source schema. + :type schema_name: str + :param table_map: Mapping of source to target tables. + :type table_map: dict[str, str] + :param target_database_name: Name of target database. Note: Target database will be truncated + before starting migration. + :type target_database_name: str + :param migration_setting: Migration settings which tune the migration behavior. + :type migration_setting: dict[str, str] + :param source_setting: Source settings to tune source endpoint migration behavior. + :type source_setting: dict[str, str] + :param target_setting: Target settings to tune target endpoint migration behavior. + :type target_setting: dict[str, str] + """ + + _attribute_map = { + 'case_manipulation': {'key': 'caseManipulation', 'type': 'str'}, + 'name': {'key': 'name', 'type': 'str'}, + 'schema_name': {'key': 'schemaName', 'type': 'str'}, + 'table_map': {'key': 'tableMap', 'type': '{str}'}, + 'target_database_name': {'key': 'targetDatabaseName', 'type': 'str'}, + 'migration_setting': {'key': 'migrationSetting', 'type': '{str}'}, + 'source_setting': {'key': 'sourceSetting', 'type': '{str}'}, + 'target_setting': {'key': 'targetSetting', 'type': '{str}'}, + } + + def __init__( + self, + *, + case_manipulation: Optional[str] = None, + name: Optional[str] = None, + schema_name: Optional[str] = None, + table_map: Optional[Dict[str, str]] = None, + target_database_name: Optional[str] = None, + migration_setting: Optional[Dict[str, str]] = None, + source_setting: Optional[Dict[str, str]] = None, + target_setting: Optional[Dict[str, str]] = None, + **kwargs + ): + super(MigrateOracleAzureDbPostgreSqlSyncDatabaseInput, self).__init__(**kwargs) + self.case_manipulation = case_manipulation + self.name = name + self.schema_name = schema_name + self.table_map = table_map + self.target_database_name = target_database_name + self.migration_setting = migration_setting + self.source_setting = source_setting + self.target_setting = target_setting + + +class MigrateOracleAzureDbPostgreSqlSyncTaskInput(msrest.serialization.Model): + """Input for the task that migrates Oracle databases to Azure Database for PostgreSQL for online migrations. + + All required parameters must be populated in order to send to Azure. + + :param selected_databases: Required. Databases to migrate. + :type selected_databases: + list[~azure.mgmt.datamigration.models.MigrateOracleAzureDbPostgreSqlSyncDatabaseInput] + :param target_connection_info: Required. Connection information for target Azure Database for + PostgreSQL. + :type target_connection_info: ~azure.mgmt.datamigration.models.PostgreSqlConnectionInfo + :param source_connection_info: Required. Connection information for source Oracle. + :type source_connection_info: ~azure.mgmt.datamigration.models.OracleConnectionInfo + """ + + _validation = { + 'selected_databases': {'required': True}, + 'target_connection_info': {'required': True}, + 'source_connection_info': {'required': True}, + } + + _attribute_map = { + 'selected_databases': {'key': 'selectedDatabases', 'type': '[MigrateOracleAzureDbPostgreSqlSyncDatabaseInput]'}, + 'target_connection_info': {'key': 'targetConnectionInfo', 'type': 'PostgreSqlConnectionInfo'}, + 'source_connection_info': {'key': 'sourceConnectionInfo', 'type': 'OracleConnectionInfo'}, + } + + def __init__( + self, + *, + selected_databases: List["MigrateOracleAzureDbPostgreSqlSyncDatabaseInput"], + target_connection_info: "PostgreSqlConnectionInfo", + source_connection_info: "OracleConnectionInfo", + **kwargs + ): + super(MigrateOracleAzureDbPostgreSqlSyncTaskInput, self).__init__(**kwargs) + self.selected_databases = selected_databases + self.target_connection_info = target_connection_info + self.source_connection_info = source_connection_info + + +class MigrateOracleAzureDbPostgreSqlSyncTaskOutput(msrest.serialization.Model): + """Output for the task that migrates Oracle databases to Azure Database for PostgreSQL for online migrations. + + You probably want to use the sub-classes and not this class directly. Known + sub-classes are: MigrateOracleAzureDbPostgreSqlSyncTaskOutputDatabaseError, MigrateOracleAzureDbPostgreSqlSyncTaskOutputDatabaseLevel, MigrateOracleAzureDbPostgreSqlSyncTaskOutputError, MigrateOracleAzureDbPostgreSqlSyncTaskOutputMigrationLevel, MigrateOracleAzureDbPostgreSqlSyncTaskOutputTableLevel. + + Variables are only populated by the server, and will be ignored when sending a request. + + All required parameters must be populated in order to send to Azure. + + :ivar id: Result identifier. + :vartype id: str + :param result_type: Required. Result type.Constant filled by server. + :type result_type: str + """ + + _validation = { + 'id': {'readonly': True}, + 'result_type': {'required': True}, + } + + _attribute_map = { + 'id': {'key': 'id', 'type': 'str'}, + 'result_type': {'key': 'resultType', 'type': 'str'}, + } + + _subtype_map = { + 'result_type': {'DatabaseLevelErrorOutput': 'MigrateOracleAzureDbPostgreSqlSyncTaskOutputDatabaseError', 'DatabaseLevelOutput': 'MigrateOracleAzureDbPostgreSqlSyncTaskOutputDatabaseLevel', 'ErrorOutput': 'MigrateOracleAzureDbPostgreSqlSyncTaskOutputError', 'MigrationLevelOutput': 'MigrateOracleAzureDbPostgreSqlSyncTaskOutputMigrationLevel', 'TableLevelOutput': 'MigrateOracleAzureDbPostgreSqlSyncTaskOutputTableLevel'} + } + + def __init__( + self, + **kwargs + ): + super(MigrateOracleAzureDbPostgreSqlSyncTaskOutput, self).__init__(**kwargs) + self.id = None + self.result_type = None # type: Optional[str] + + +class MigrateOracleAzureDbPostgreSqlSyncTaskOutputDatabaseError(MigrateOracleAzureDbPostgreSqlSyncTaskOutput): + """MigrateOracleAzureDbPostgreSqlSyncTaskOutputDatabaseError. + + Variables are only populated by the server, and will be ignored when sending a request. + + All required parameters must be populated in order to send to Azure. + + :ivar id: Result identifier. + :vartype id: str + :param result_type: Required. Result type.Constant filled by server. + :type result_type: str + :param error_message: Error message. + :type error_message: str + :param events: List of error events. + :type events: list[~azure.mgmt.datamigration.models.SyncMigrationDatabaseErrorEvent] + """ + + _validation = { + 'id': {'readonly': True}, + 'result_type': {'required': True}, + } + + _attribute_map = { + 'id': {'key': 'id', 'type': 'str'}, + 'result_type': {'key': 'resultType', 'type': 'str'}, + 'error_message': {'key': 'errorMessage', 'type': 'str'}, + 'events': {'key': 'events', 'type': '[SyncMigrationDatabaseErrorEvent]'}, + } + + def __init__( + self, + *, + error_message: Optional[str] = None, + events: Optional[List["SyncMigrationDatabaseErrorEvent"]] = None, + **kwargs + ): + super(MigrateOracleAzureDbPostgreSqlSyncTaskOutputDatabaseError, self).__init__(**kwargs) + self.result_type = 'DatabaseLevelErrorOutput' # type: str + self.error_message = error_message + self.events = events + + +class MigrateOracleAzureDbPostgreSqlSyncTaskOutputDatabaseLevel(MigrateOracleAzureDbPostgreSqlSyncTaskOutput): + """MigrateOracleAzureDbPostgreSqlSyncTaskOutputDatabaseLevel. + + Variables are only populated by the server, and will be ignored when sending a request. + + All required parameters must be populated in order to send to Azure. + + :ivar id: Result identifier. + :vartype id: str + :param result_type: Required. Result type.Constant filled by server. + :type result_type: str + :ivar database_name: Name of the database. + :vartype database_name: str + :ivar started_on: Migration start time. + :vartype started_on: ~datetime.datetime + :ivar ended_on: Migration end time. + :vartype ended_on: ~datetime.datetime + :ivar migration_state: Migration state that this database is in. Possible values include: + "UNDEFINED", "CONFIGURING", "INITIALIAZING", "STARTING", "RUNNING", "READY_TO_COMPLETE", + "COMPLETING", "COMPLETE", "CANCELLING", "CANCELLED", "FAILED", "VALIDATING", + "VALIDATION_COMPLETE", "VALIDATION_FAILED", "RESTORE_IN_PROGRESS", "RESTORE_COMPLETED", + "BACKUP_IN_PROGRESS", "BACKUP_COMPLETED". + :vartype migration_state: str or + ~azure.mgmt.datamigration.models.SyncDatabaseMigrationReportingState + :ivar incoming_changes: Number of incoming changes. + :vartype incoming_changes: long + :ivar applied_changes: Number of applied changes. + :vartype applied_changes: long + :ivar cdc_insert_counter: Number of cdc inserts. + :vartype cdc_insert_counter: long + :ivar cdc_delete_counter: Number of cdc deletes. + :vartype cdc_delete_counter: long + :ivar cdc_update_counter: Number of cdc updates. + :vartype cdc_update_counter: long + :ivar full_load_completed_tables: Number of tables completed in full load. + :vartype full_load_completed_tables: long + :ivar full_load_loading_tables: Number of tables loading in full load. + :vartype full_load_loading_tables: long + :ivar full_load_queued_tables: Number of tables queued in full load. + :vartype full_load_queued_tables: long + :ivar full_load_errored_tables: Number of tables errored in full load. + :vartype full_load_errored_tables: long + :ivar initialization_completed: Indicates if initial load (full load) has been completed. + :vartype initialization_completed: bool + :ivar latency: CDC apply latency. + :vartype latency: long + """ + + _validation = { + 'id': {'readonly': True}, + 'result_type': {'required': True}, + 'database_name': {'readonly': True}, + 'started_on': {'readonly': True}, + 'ended_on': {'readonly': True}, + 'migration_state': {'readonly': True}, + 'incoming_changes': {'readonly': True}, + 'applied_changes': {'readonly': True}, + 'cdc_insert_counter': {'readonly': True}, + 'cdc_delete_counter': {'readonly': True}, + 'cdc_update_counter': {'readonly': True}, + 'full_load_completed_tables': {'readonly': True}, + 'full_load_loading_tables': {'readonly': True}, + 'full_load_queued_tables': {'readonly': True}, + 'full_load_errored_tables': {'readonly': True}, + 'initialization_completed': {'readonly': True}, + 'latency': {'readonly': True}, + } + + _attribute_map = { + 'id': {'key': 'id', 'type': 'str'}, + 'result_type': {'key': 'resultType', 'type': 'str'}, + 'database_name': {'key': 'databaseName', 'type': 'str'}, + 'started_on': {'key': 'startedOn', 'type': 'iso-8601'}, + 'ended_on': {'key': 'endedOn', 'type': 'iso-8601'}, + 'migration_state': {'key': 'migrationState', 'type': 'str'}, + 'incoming_changes': {'key': 'incomingChanges', 'type': 'long'}, + 'applied_changes': {'key': 'appliedChanges', 'type': 'long'}, + 'cdc_insert_counter': {'key': 'cdcInsertCounter', 'type': 'long'}, + 'cdc_delete_counter': {'key': 'cdcDeleteCounter', 'type': 'long'}, + 'cdc_update_counter': {'key': 'cdcUpdateCounter', 'type': 'long'}, + 'full_load_completed_tables': {'key': 'fullLoadCompletedTables', 'type': 'long'}, + 'full_load_loading_tables': {'key': 'fullLoadLoadingTables', 'type': 'long'}, + 'full_load_queued_tables': {'key': 'fullLoadQueuedTables', 'type': 'long'}, + 'full_load_errored_tables': {'key': 'fullLoadErroredTables', 'type': 'long'}, + 'initialization_completed': {'key': 'initializationCompleted', 'type': 'bool'}, + 'latency': {'key': 'latency', 'type': 'long'}, + } + + def __init__( + self, + **kwargs + ): + super(MigrateOracleAzureDbPostgreSqlSyncTaskOutputDatabaseLevel, self).__init__(**kwargs) + self.result_type = 'DatabaseLevelOutput' # type: str + self.database_name = None + self.started_on = None + self.ended_on = None + self.migration_state = None + self.incoming_changes = None + self.applied_changes = None + self.cdc_insert_counter = None + self.cdc_delete_counter = None + self.cdc_update_counter = None + self.full_load_completed_tables = None + self.full_load_loading_tables = None + self.full_load_queued_tables = None + self.full_load_errored_tables = None + self.initialization_completed = None + self.latency = None + + +class MigrateOracleAzureDbPostgreSqlSyncTaskOutputError(MigrateOracleAzureDbPostgreSqlSyncTaskOutput): + """MigrateOracleAzureDbPostgreSqlSyncTaskOutputError. + + Variables are only populated by the server, and will be ignored when sending a request. + + All required parameters must be populated in order to send to Azure. + + :ivar id: Result identifier. + :vartype id: str + :param result_type: Required. Result type.Constant filled by server. + :type result_type: str + :ivar error: Migration error. + :vartype error: ~azure.mgmt.datamigration.models.ReportableException + """ + + _validation = { + 'id': {'readonly': True}, + 'result_type': {'required': True}, + 'error': {'readonly': True}, + } + + _attribute_map = { + 'id': {'key': 'id', 'type': 'str'}, + 'result_type': {'key': 'resultType', 'type': 'str'}, + 'error': {'key': 'error', 'type': 'ReportableException'}, + } + + def __init__( + self, + **kwargs + ): + super(MigrateOracleAzureDbPostgreSqlSyncTaskOutputError, self).__init__(**kwargs) + self.result_type = 'ErrorOutput' # type: str + self.error = None + + +class MigrateOracleAzureDbPostgreSqlSyncTaskOutputMigrationLevel(MigrateOracleAzureDbPostgreSqlSyncTaskOutput): + """MigrateOracleAzureDbPostgreSqlSyncTaskOutputMigrationLevel. + + Variables are only populated by the server, and will be ignored when sending a request. + + All required parameters must be populated in order to send to Azure. + + :ivar id: Result identifier. + :vartype id: str + :param result_type: Required. Result type.Constant filled by server. + :type result_type: str + :ivar started_on: Migration start time. + :vartype started_on: ~datetime.datetime + :ivar ended_on: Migration end time. + :vartype ended_on: ~datetime.datetime + :ivar source_server_version: Source server version. + :vartype source_server_version: str + :ivar source_server: Source server name. + :vartype source_server: str + :ivar target_server_version: Target server version. + :vartype target_server_version: str + :ivar target_server: Target server name. + :vartype target_server: str + """ + + _validation = { + 'id': {'readonly': True}, + 'result_type': {'required': True}, + 'started_on': {'readonly': True}, + 'ended_on': {'readonly': True}, + 'source_server_version': {'readonly': True}, + 'source_server': {'readonly': True}, + 'target_server_version': {'readonly': True}, + 'target_server': {'readonly': True}, + } + + _attribute_map = { + 'id': {'key': 'id', 'type': 'str'}, + 'result_type': {'key': 'resultType', 'type': 'str'}, + 'started_on': {'key': 'startedOn', 'type': 'iso-8601'}, + 'ended_on': {'key': 'endedOn', 'type': 'iso-8601'}, + 'source_server_version': {'key': 'sourceServerVersion', 'type': 'str'}, + 'source_server': {'key': 'sourceServer', 'type': 'str'}, + 'target_server_version': {'key': 'targetServerVersion', 'type': 'str'}, + 'target_server': {'key': 'targetServer', 'type': 'str'}, + } + + def __init__( + self, + **kwargs + ): + super(MigrateOracleAzureDbPostgreSqlSyncTaskOutputMigrationLevel, self).__init__(**kwargs) + self.result_type = 'MigrationLevelOutput' # type: str + self.started_on = None + self.ended_on = None + self.source_server_version = None + self.source_server = None + self.target_server_version = None + self.target_server = None + + +class MigrateOracleAzureDbPostgreSqlSyncTaskOutputTableLevel(MigrateOracleAzureDbPostgreSqlSyncTaskOutput): + """MigrateOracleAzureDbPostgreSqlSyncTaskOutputTableLevel. + + Variables are only populated by the server, and will be ignored when sending a request. + + All required parameters must be populated in order to send to Azure. + + :ivar id: Result identifier. + :vartype id: str + :param result_type: Required. Result type.Constant filled by server. + :type result_type: str + :ivar table_name: Name of the table. + :vartype table_name: str + :ivar database_name: Name of the database. + :vartype database_name: str + :ivar cdc_insert_counter: Number of applied inserts. + :vartype cdc_insert_counter: long + :ivar cdc_update_counter: Number of applied updates. + :vartype cdc_update_counter: long + :ivar cdc_delete_counter: Number of applied deletes. + :vartype cdc_delete_counter: long + :ivar full_load_est_finish_time: Estimate to finish full load. + :vartype full_load_est_finish_time: ~datetime.datetime + :ivar full_load_started_on: Full load start time. + :vartype full_load_started_on: ~datetime.datetime + :ivar full_load_ended_on: Full load end time. + :vartype full_load_ended_on: ~datetime.datetime + :ivar full_load_total_rows: Number of rows applied in full load. + :vartype full_load_total_rows: long + :ivar state: Current state of the table migration. Possible values include: "BEFORE_LOAD", + "FULL_LOAD", "COMPLETED", "CANCELED", "ERROR", "FAILED". + :vartype state: str or ~azure.mgmt.datamigration.models.SyncTableMigrationState + :ivar total_changes_applied: Total number of applied changes. + :vartype total_changes_applied: long + :ivar data_errors_counter: Number of data errors occurred. + :vartype data_errors_counter: long + :ivar last_modified_time: Last modified time on target. + :vartype last_modified_time: ~datetime.datetime + """ + + _validation = { + 'id': {'readonly': True}, + 'result_type': {'required': True}, + 'table_name': {'readonly': True}, + 'database_name': {'readonly': True}, + 'cdc_insert_counter': {'readonly': True}, + 'cdc_update_counter': {'readonly': True}, + 'cdc_delete_counter': {'readonly': True}, + 'full_load_est_finish_time': {'readonly': True}, + 'full_load_started_on': {'readonly': True}, + 'full_load_ended_on': {'readonly': True}, + 'full_load_total_rows': {'readonly': True}, + 'state': {'readonly': True}, + 'total_changes_applied': {'readonly': True}, + 'data_errors_counter': {'readonly': True}, + 'last_modified_time': {'readonly': True}, + } + + _attribute_map = { + 'id': {'key': 'id', 'type': 'str'}, + 'result_type': {'key': 'resultType', 'type': 'str'}, + 'table_name': {'key': 'tableName', 'type': 'str'}, + 'database_name': {'key': 'databaseName', 'type': 'str'}, + 'cdc_insert_counter': {'key': 'cdcInsertCounter', 'type': 'long'}, + 'cdc_update_counter': {'key': 'cdcUpdateCounter', 'type': 'long'}, + 'cdc_delete_counter': {'key': 'cdcDeleteCounter', 'type': 'long'}, + 'full_load_est_finish_time': {'key': 'fullLoadEstFinishTime', 'type': 'iso-8601'}, + 'full_load_started_on': {'key': 'fullLoadStartedOn', 'type': 'iso-8601'}, + 'full_load_ended_on': {'key': 'fullLoadEndedOn', 'type': 'iso-8601'}, + 'full_load_total_rows': {'key': 'fullLoadTotalRows', 'type': 'long'}, + 'state': {'key': 'state', 'type': 'str'}, + 'total_changes_applied': {'key': 'totalChangesApplied', 'type': 'long'}, + 'data_errors_counter': {'key': 'dataErrorsCounter', 'type': 'long'}, + 'last_modified_time': {'key': 'lastModifiedTime', 'type': 'iso-8601'}, + } + + def __init__( + self, + **kwargs + ): + super(MigrateOracleAzureDbPostgreSqlSyncTaskOutputTableLevel, self).__init__(**kwargs) + self.result_type = 'TableLevelOutput' # type: str + self.table_name = None + self.database_name = None + self.cdc_insert_counter = None + self.cdc_update_counter = None + self.cdc_delete_counter = None + self.full_load_est_finish_time = None + self.full_load_started_on = None + self.full_load_ended_on = None + self.full_load_total_rows = None + self.state = None + self.total_changes_applied = None + self.data_errors_counter = None + self.last_modified_time = None + + +class MigratePostgreSqlAzureDbForPostgreSqlSyncDatabaseInput(msrest.serialization.Model): + """Database specific information for PostgreSQL to Azure Database for PostgreSQL migration task inputs. + + :param name: Name of the database. + :type name: str + :param target_database_name: Name of target database. Note: Target database will be truncated + before starting migration. + :type target_database_name: str + :param migration_setting: Migration settings which tune the migration behavior. + :type migration_setting: dict[str, str] + :param source_setting: Source settings to tune source endpoint migration behavior. + :type source_setting: dict[str, str] + :param target_setting: Target settings to tune target endpoint migration behavior. + :type target_setting: dict[str, str] + :param selected_tables: Tables selected for migration. + :type selected_tables: + list[~azure.mgmt.datamigration.models.MigratePostgreSqlAzureDbForPostgreSqlSyncDatabaseTableInput] + """ + + _attribute_map = { + 'name': {'key': 'name', 'type': 'str'}, + 'target_database_name': {'key': 'targetDatabaseName', 'type': 'str'}, + 'migration_setting': {'key': 'migrationSetting', 'type': '{str}'}, + 'source_setting': {'key': 'sourceSetting', 'type': '{str}'}, + 'target_setting': {'key': 'targetSetting', 'type': '{str}'}, + 'selected_tables': {'key': 'selectedTables', 'type': '[MigratePostgreSqlAzureDbForPostgreSqlSyncDatabaseTableInput]'}, + } + + def __init__( + self, + *, + name: Optional[str] = None, + target_database_name: Optional[str] = None, + migration_setting: Optional[Dict[str, str]] = None, + source_setting: Optional[Dict[str, str]] = None, + target_setting: Optional[Dict[str, str]] = None, + selected_tables: Optional[List["MigratePostgreSqlAzureDbForPostgreSqlSyncDatabaseTableInput"]] = None, + **kwargs + ): + super(MigratePostgreSqlAzureDbForPostgreSqlSyncDatabaseInput, self).__init__(**kwargs) + self.name = name + self.target_database_name = target_database_name + self.migration_setting = migration_setting + self.source_setting = source_setting + self.target_setting = target_setting + self.selected_tables = selected_tables + + +class MigratePostgreSqlAzureDbForPostgreSqlSyncDatabaseTableInput(msrest.serialization.Model): + """Selected tables for the migration. + + :param name: Name of the table to migrate. + :type name: str + """ + + _attribute_map = { + 'name': {'key': 'name', 'type': 'str'}, + } + + def __init__( + self, + *, + name: Optional[str] = None, + **kwargs + ): + super(MigratePostgreSqlAzureDbForPostgreSqlSyncDatabaseTableInput, self).__init__(**kwargs) + self.name = name + + +class MigratePostgreSqlAzureDbForPostgreSqlSyncTaskInput(msrest.serialization.Model): + """Input for the task that migrates PostgreSQL databases to Azure Database for PostgreSQL for online migrations. + + All required parameters must be populated in order to send to Azure. + + :param selected_databases: Required. Databases to migrate. + :type selected_databases: + list[~azure.mgmt.datamigration.models.MigratePostgreSqlAzureDbForPostgreSqlSyncDatabaseInput] + :param target_connection_info: Required. Connection information for target Azure Database for + PostgreSQL. + :type target_connection_info: ~azure.mgmt.datamigration.models.PostgreSqlConnectionInfo + :param source_connection_info: Required. Connection information for source PostgreSQL. + :type source_connection_info: ~azure.mgmt.datamigration.models.PostgreSqlConnectionInfo + :param encrypted_key_for_secure_fields: encrypted key for secure fields. + :type encrypted_key_for_secure_fields: str + """ + + _validation = { + 'selected_databases': {'required': True}, + 'target_connection_info': {'required': True}, + 'source_connection_info': {'required': True}, + } + + _attribute_map = { + 'selected_databases': {'key': 'selectedDatabases', 'type': '[MigratePostgreSqlAzureDbForPostgreSqlSyncDatabaseInput]'}, + 'target_connection_info': {'key': 'targetConnectionInfo', 'type': 'PostgreSqlConnectionInfo'}, + 'source_connection_info': {'key': 'sourceConnectionInfo', 'type': 'PostgreSqlConnectionInfo'}, + 'encrypted_key_for_secure_fields': {'key': 'encryptedKeyForSecureFields', 'type': 'str'}, + } + + def __init__( + self, + *, + selected_databases: List["MigratePostgreSqlAzureDbForPostgreSqlSyncDatabaseInput"], + target_connection_info: "PostgreSqlConnectionInfo", + source_connection_info: "PostgreSqlConnectionInfo", + encrypted_key_for_secure_fields: Optional[str] = None, + **kwargs + ): + super(MigratePostgreSqlAzureDbForPostgreSqlSyncTaskInput, self).__init__(**kwargs) + self.selected_databases = selected_databases + self.target_connection_info = target_connection_info + self.source_connection_info = source_connection_info + self.encrypted_key_for_secure_fields = encrypted_key_for_secure_fields + + +class MigratePostgreSqlAzureDbForPostgreSqlSyncTaskOutput(msrest.serialization.Model): + """Output for the task that migrates PostgreSQL databases to Azure Database for PostgreSQL for online migrations. + + You probably want to use the sub-classes and not this class directly. Known + sub-classes are: MigratePostgreSqlAzureDbForPostgreSqlSyncTaskOutputDatabaseError, MigratePostgreSqlAzureDbForPostgreSqlSyncTaskOutputDatabaseLevel, MigratePostgreSqlAzureDbForPostgreSqlSyncTaskOutputError, MigratePostgreSqlAzureDbForPostgreSqlSyncTaskOutputMigrationLevel, MigratePostgreSqlAzureDbForPostgreSqlSyncTaskOutputTableLevel. + + Variables are only populated by the server, and will be ignored when sending a request. + + All required parameters must be populated in order to send to Azure. + + :ivar id: Result identifier. + :vartype id: str + :param result_type: Required. Result type.Constant filled by server. + :type result_type: str + """ + + _validation = { + 'id': {'readonly': True}, + 'result_type': {'required': True}, + } + + _attribute_map = { + 'id': {'key': 'id', 'type': 'str'}, + 'result_type': {'key': 'resultType', 'type': 'str'}, + } + + _subtype_map = { + 'result_type': {'DatabaseLevelErrorOutput': 'MigratePostgreSqlAzureDbForPostgreSqlSyncTaskOutputDatabaseError', 'DatabaseLevelOutput': 'MigratePostgreSqlAzureDbForPostgreSqlSyncTaskOutputDatabaseLevel', 'ErrorOutput': 'MigratePostgreSqlAzureDbForPostgreSqlSyncTaskOutputError', 'MigrationLevelOutput': 'MigratePostgreSqlAzureDbForPostgreSqlSyncTaskOutputMigrationLevel', 'TableLevelOutput': 'MigratePostgreSqlAzureDbForPostgreSqlSyncTaskOutputTableLevel'} + } + + def __init__( + self, + **kwargs + ): + super(MigratePostgreSqlAzureDbForPostgreSqlSyncTaskOutput, self).__init__(**kwargs) + self.id = None + self.result_type = None # type: Optional[str] + + +class MigratePostgreSqlAzureDbForPostgreSqlSyncTaskOutputDatabaseError(MigratePostgreSqlAzureDbForPostgreSqlSyncTaskOutput): + """MigratePostgreSqlAzureDbForPostgreSqlSyncTaskOutputDatabaseError. + + Variables are only populated by the server, and will be ignored when sending a request. + + All required parameters must be populated in order to send to Azure. + + :ivar id: Result identifier. + :vartype id: str + :param result_type: Required. Result type.Constant filled by server. + :type result_type: str + :param error_message: Error message. + :type error_message: str + :param events: List of error events. + :type events: list[~azure.mgmt.datamigration.models.SyncMigrationDatabaseErrorEvent] + """ + + _validation = { + 'id': {'readonly': True}, + 'result_type': {'required': True}, + } + + _attribute_map = { + 'id': {'key': 'id', 'type': 'str'}, + 'result_type': {'key': 'resultType', 'type': 'str'}, + 'error_message': {'key': 'errorMessage', 'type': 'str'}, + 'events': {'key': 'events', 'type': '[SyncMigrationDatabaseErrorEvent]'}, + } + + def __init__( + self, + *, + error_message: Optional[str] = None, + events: Optional[List["SyncMigrationDatabaseErrorEvent"]] = None, + **kwargs + ): + super(MigratePostgreSqlAzureDbForPostgreSqlSyncTaskOutputDatabaseError, self).__init__(**kwargs) + self.result_type = 'DatabaseLevelErrorOutput' # type: str + self.error_message = error_message + self.events = events + + +class MigratePostgreSqlAzureDbForPostgreSqlSyncTaskOutputDatabaseLevel(MigratePostgreSqlAzureDbForPostgreSqlSyncTaskOutput): + """MigratePostgreSqlAzureDbForPostgreSqlSyncTaskOutputDatabaseLevel. + + Variables are only populated by the server, and will be ignored when sending a request. + + All required parameters must be populated in order to send to Azure. + + :ivar id: Result identifier. + :vartype id: str + :param result_type: Required. Result type.Constant filled by server. + :type result_type: str + :ivar database_name: Name of the database. + :vartype database_name: str + :ivar started_on: Migration start time. + :vartype started_on: ~datetime.datetime + :ivar ended_on: Migration end time. + :vartype ended_on: ~datetime.datetime + :ivar migration_state: Migration state that this database is in. Possible values include: + "UNDEFINED", "CONFIGURING", "INITIALIAZING", "STARTING", "RUNNING", "READY_TO_COMPLETE", + "COMPLETING", "COMPLETE", "CANCELLING", "CANCELLED", "FAILED", "VALIDATING", + "VALIDATION_COMPLETE", "VALIDATION_FAILED", "RESTORE_IN_PROGRESS", "RESTORE_COMPLETED", + "BACKUP_IN_PROGRESS", "BACKUP_COMPLETED". + :vartype migration_state: str or + ~azure.mgmt.datamigration.models.SyncDatabaseMigrationReportingState + :ivar incoming_changes: Number of incoming changes. + :vartype incoming_changes: long + :ivar applied_changes: Number of applied changes. + :vartype applied_changes: long + :ivar cdc_insert_counter: Number of cdc inserts. + :vartype cdc_insert_counter: long + :ivar cdc_delete_counter: Number of cdc deletes. + :vartype cdc_delete_counter: long + :ivar cdc_update_counter: Number of cdc updates. + :vartype cdc_update_counter: long + :ivar full_load_completed_tables: Number of tables completed in full load. + :vartype full_load_completed_tables: long + :ivar full_load_loading_tables: Number of tables loading in full load. + :vartype full_load_loading_tables: long + :ivar full_load_queued_tables: Number of tables queued in full load. + :vartype full_load_queued_tables: long + :ivar full_load_errored_tables: Number of tables errored in full load. + :vartype full_load_errored_tables: long + :ivar initialization_completed: Indicates if initial load (full load) has been completed. + :vartype initialization_completed: bool + :ivar latency: CDC apply latency. + :vartype latency: long + """ + + _validation = { + 'id': {'readonly': True}, + 'result_type': {'required': True}, + 'database_name': {'readonly': True}, + 'started_on': {'readonly': True}, + 'ended_on': {'readonly': True}, + 'migration_state': {'readonly': True}, + 'incoming_changes': {'readonly': True}, + 'applied_changes': {'readonly': True}, + 'cdc_insert_counter': {'readonly': True}, + 'cdc_delete_counter': {'readonly': True}, + 'cdc_update_counter': {'readonly': True}, + 'full_load_completed_tables': {'readonly': True}, + 'full_load_loading_tables': {'readonly': True}, + 'full_load_queued_tables': {'readonly': True}, + 'full_load_errored_tables': {'readonly': True}, + 'initialization_completed': {'readonly': True}, + 'latency': {'readonly': True}, + } + + _attribute_map = { + 'id': {'key': 'id', 'type': 'str'}, + 'result_type': {'key': 'resultType', 'type': 'str'}, + 'database_name': {'key': 'databaseName', 'type': 'str'}, + 'started_on': {'key': 'startedOn', 'type': 'iso-8601'}, + 'ended_on': {'key': 'endedOn', 'type': 'iso-8601'}, + 'migration_state': {'key': 'migrationState', 'type': 'str'}, + 'incoming_changes': {'key': 'incomingChanges', 'type': 'long'}, + 'applied_changes': {'key': 'appliedChanges', 'type': 'long'}, + 'cdc_insert_counter': {'key': 'cdcInsertCounter', 'type': 'long'}, + 'cdc_delete_counter': {'key': 'cdcDeleteCounter', 'type': 'long'}, + 'cdc_update_counter': {'key': 'cdcUpdateCounter', 'type': 'long'}, + 'full_load_completed_tables': {'key': 'fullLoadCompletedTables', 'type': 'long'}, + 'full_load_loading_tables': {'key': 'fullLoadLoadingTables', 'type': 'long'}, + 'full_load_queued_tables': {'key': 'fullLoadQueuedTables', 'type': 'long'}, + 'full_load_errored_tables': {'key': 'fullLoadErroredTables', 'type': 'long'}, + 'initialization_completed': {'key': 'initializationCompleted', 'type': 'bool'}, + 'latency': {'key': 'latency', 'type': 'long'}, + } + + def __init__( + self, + **kwargs + ): + super(MigratePostgreSqlAzureDbForPostgreSqlSyncTaskOutputDatabaseLevel, self).__init__(**kwargs) + self.result_type = 'DatabaseLevelOutput' # type: str + self.database_name = None + self.started_on = None + self.ended_on = None + self.migration_state = None + self.incoming_changes = None + self.applied_changes = None + self.cdc_insert_counter = None + self.cdc_delete_counter = None + self.cdc_update_counter = None + self.full_load_completed_tables = None + self.full_load_loading_tables = None + self.full_load_queued_tables = None + self.full_load_errored_tables = None + self.initialization_completed = None + self.latency = None + + +class MigratePostgreSqlAzureDbForPostgreSqlSyncTaskOutputError(MigratePostgreSqlAzureDbForPostgreSqlSyncTaskOutput): + """MigratePostgreSqlAzureDbForPostgreSqlSyncTaskOutputError. + + Variables are only populated by the server, and will be ignored when sending a request. + + All required parameters must be populated in order to send to Azure. + + :ivar id: Result identifier. + :vartype id: str + :param result_type: Required. Result type.Constant filled by server. + :type result_type: str + :ivar error: Migration error. + :vartype error: ~azure.mgmt.datamigration.models.ReportableException + :param events: List of error events. + :type events: list[~azure.mgmt.datamigration.models.SyncMigrationDatabaseErrorEvent] + """ + + _validation = { + 'id': {'readonly': True}, + 'result_type': {'required': True}, + 'error': {'readonly': True}, + } + + _attribute_map = { + 'id': {'key': 'id', 'type': 'str'}, + 'result_type': {'key': 'resultType', 'type': 'str'}, + 'error': {'key': 'error', 'type': 'ReportableException'}, + 'events': {'key': 'events', 'type': '[SyncMigrationDatabaseErrorEvent]'}, + } + + def __init__( + self, + *, + events: Optional[List["SyncMigrationDatabaseErrorEvent"]] = None, + **kwargs + ): + super(MigratePostgreSqlAzureDbForPostgreSqlSyncTaskOutputError, self).__init__(**kwargs) + self.result_type = 'ErrorOutput' # type: str + self.error = None + self.events = events + + +class MigratePostgreSqlAzureDbForPostgreSqlSyncTaskOutputMigrationLevel(MigratePostgreSqlAzureDbForPostgreSqlSyncTaskOutput): + """MigratePostgreSqlAzureDbForPostgreSqlSyncTaskOutputMigrationLevel. + + Variables are only populated by the server, and will be ignored when sending a request. + + All required parameters must be populated in order to send to Azure. + + :ivar id: Result identifier. + :vartype id: str + :param result_type: Required. Result type.Constant filled by server. + :type result_type: str + :ivar started_on: Migration start time. + :vartype started_on: ~datetime.datetime + :ivar ended_on: Migration end time. + :vartype ended_on: ~datetime.datetime + :ivar source_server_version: Source server version. + :vartype source_server_version: str + :ivar source_server: Source server name. + :vartype source_server: str + :ivar target_server_version: Target server version. + :vartype target_server_version: str + :ivar target_server: Target server name. + :vartype target_server: str + :ivar source_server_type: Source server type. Possible values include: "Access", "DB2", + "MySQL", "Oracle", "SQL", "Sybase", "PostgreSQL", "MongoDB", "SQLRDS", "MySQLRDS", + "PostgreSQLRDS". + :vartype source_server_type: str or ~azure.mgmt.datamigration.models.ScenarioSource + :ivar target_server_type: Target server type. Possible values include: "SQLServer", "SQLDB", + "SQLDW", "SQLMI", "AzureDBForMySql", "AzureDBForPostgresSQL", "MongoDB". + :vartype target_server_type: str or ~azure.mgmt.datamigration.models.ScenarioTarget + :ivar state: Migration status. Possible values include: "UNDEFINED", "VALIDATING", "PENDING", + "COMPLETE", "ACTION_REQUIRED", "FAILED". + :vartype state: str or ~azure.mgmt.datamigration.models.ReplicateMigrationState + :param database_count: Number of databases to include. + :type database_count: float + """ + + _validation = { + 'id': {'readonly': True}, + 'result_type': {'required': True}, + 'started_on': {'readonly': True}, + 'ended_on': {'readonly': True}, + 'source_server_version': {'readonly': True}, + 'source_server': {'readonly': True}, + 'target_server_version': {'readonly': True}, + 'target_server': {'readonly': True}, + 'source_server_type': {'readonly': True}, + 'target_server_type': {'readonly': True}, + 'state': {'readonly': True}, + } + + _attribute_map = { + 'id': {'key': 'id', 'type': 'str'}, + 'result_type': {'key': 'resultType', 'type': 'str'}, + 'started_on': {'key': 'startedOn', 'type': 'iso-8601'}, + 'ended_on': {'key': 'endedOn', 'type': 'iso-8601'}, + 'source_server_version': {'key': 'sourceServerVersion', 'type': 'str'}, + 'source_server': {'key': 'sourceServer', 'type': 'str'}, + 'target_server_version': {'key': 'targetServerVersion', 'type': 'str'}, + 'target_server': {'key': 'targetServer', 'type': 'str'}, + 'source_server_type': {'key': 'sourceServerType', 'type': 'str'}, + 'target_server_type': {'key': 'targetServerType', 'type': 'str'}, + 'state': {'key': 'state', 'type': 'str'}, + 'database_count': {'key': 'databaseCount', 'type': 'float'}, + } + + def __init__( + self, + *, + database_count: Optional[float] = None, + **kwargs + ): + super(MigratePostgreSqlAzureDbForPostgreSqlSyncTaskOutputMigrationLevel, self).__init__(**kwargs) + self.result_type = 'MigrationLevelOutput' # type: str + self.started_on = None + self.ended_on = None + self.source_server_version = None + self.source_server = None + self.target_server_version = None + self.target_server = None + self.source_server_type = None + self.target_server_type = None + self.state = None + self.database_count = database_count + + +class MigratePostgreSqlAzureDbForPostgreSqlSyncTaskOutputTableLevel(MigratePostgreSqlAzureDbForPostgreSqlSyncTaskOutput): + """MigratePostgreSqlAzureDbForPostgreSqlSyncTaskOutputTableLevel. + + Variables are only populated by the server, and will be ignored when sending a request. + + All required parameters must be populated in order to send to Azure. + + :ivar id: Result identifier. + :vartype id: str + :param result_type: Required. Result type.Constant filled by server. + :type result_type: str + :ivar table_name: Name of the table. + :vartype table_name: str + :ivar database_name: Name of the database. + :vartype database_name: str + :ivar cdc_insert_counter: Number of applied inserts. + :vartype cdc_insert_counter: long + :ivar cdc_update_counter: Number of applied updates. + :vartype cdc_update_counter: long + :ivar cdc_delete_counter: Number of applied deletes. + :vartype cdc_delete_counter: long + :ivar full_load_est_finish_time: Estimate to finish full load. + :vartype full_load_est_finish_time: ~datetime.datetime + :ivar full_load_started_on: Full load start time. + :vartype full_load_started_on: ~datetime.datetime + :ivar full_load_ended_on: Full load end time. + :vartype full_load_ended_on: ~datetime.datetime + :ivar full_load_total_rows: Number of rows applied in full load. + :vartype full_load_total_rows: long + :ivar state: Current state of the table migration. Possible values include: "BEFORE_LOAD", + "FULL_LOAD", "COMPLETED", "CANCELED", "ERROR", "FAILED". + :vartype state: str or ~azure.mgmt.datamigration.models.SyncTableMigrationState + :ivar total_changes_applied: Total number of applied changes. + :vartype total_changes_applied: long + :ivar data_errors_counter: Number of data errors occurred. + :vartype data_errors_counter: long + :ivar last_modified_time: Last modified time on target. + :vartype last_modified_time: ~datetime.datetime + """ + + _validation = { + 'id': {'readonly': True}, + 'result_type': {'required': True}, + 'table_name': {'readonly': True}, + 'database_name': {'readonly': True}, + 'cdc_insert_counter': {'readonly': True}, + 'cdc_update_counter': {'readonly': True}, + 'cdc_delete_counter': {'readonly': True}, + 'full_load_est_finish_time': {'readonly': True}, + 'full_load_started_on': {'readonly': True}, + 'full_load_ended_on': {'readonly': True}, + 'full_load_total_rows': {'readonly': True}, + 'state': {'readonly': True}, + 'total_changes_applied': {'readonly': True}, + 'data_errors_counter': {'readonly': True}, + 'last_modified_time': {'readonly': True}, + } + + _attribute_map = { + 'id': {'key': 'id', 'type': 'str'}, + 'result_type': {'key': 'resultType', 'type': 'str'}, + 'table_name': {'key': 'tableName', 'type': 'str'}, + 'database_name': {'key': 'databaseName', 'type': 'str'}, + 'cdc_insert_counter': {'key': 'cdcInsertCounter', 'type': 'long'}, + 'cdc_update_counter': {'key': 'cdcUpdateCounter', 'type': 'long'}, + 'cdc_delete_counter': {'key': 'cdcDeleteCounter', 'type': 'long'}, + 'full_load_est_finish_time': {'key': 'fullLoadEstFinishTime', 'type': 'iso-8601'}, + 'full_load_started_on': {'key': 'fullLoadStartedOn', 'type': 'iso-8601'}, + 'full_load_ended_on': {'key': 'fullLoadEndedOn', 'type': 'iso-8601'}, + 'full_load_total_rows': {'key': 'fullLoadTotalRows', 'type': 'long'}, + 'state': {'key': 'state', 'type': 'str'}, + 'total_changes_applied': {'key': 'totalChangesApplied', 'type': 'long'}, + 'data_errors_counter': {'key': 'dataErrorsCounter', 'type': 'long'}, + 'last_modified_time': {'key': 'lastModifiedTime', 'type': 'iso-8601'}, + } + + def __init__( + self, + **kwargs + ): + super(MigratePostgreSqlAzureDbForPostgreSqlSyncTaskOutputTableLevel, self).__init__(**kwargs) + self.result_type = 'TableLevelOutput' # type: str + self.table_name = None + self.database_name = None + self.cdc_insert_counter = None + self.cdc_update_counter = None + self.cdc_delete_counter = None + self.full_load_est_finish_time = None + self.full_load_started_on = None + self.full_load_ended_on = None + self.full_load_total_rows = None + self.state = None + self.total_changes_applied = None + self.data_errors_counter = None + self.last_modified_time = None + + +class MigratePostgreSqlAzureDbForPostgreSqlSyncTaskProperties(ProjectTaskProperties): + """Properties for the task that migrates PostgreSQL databases to Azure Database for PostgreSQL for online migrations. + + Variables are only populated by the server, and will be ignored when sending a request. + + All required parameters must be populated in order to send to Azure. + + :param task_type: Required. Task type.Constant filled by server. Possible values include: + "Connect.MongoDb", "ConnectToSource.SqlServer", "ConnectToSource.SqlServer.Sync", + "ConnectToSource.PostgreSql.Sync", "ConnectToSource.MySql", "ConnectToSource.Oracle.Sync", + "ConnectToTarget.SqlDb", "ConnectToTarget.SqlDb.Sync", + "ConnectToTarget.AzureDbForPostgreSql.Sync", + "ConnectToTarget.Oracle.AzureDbForPostgreSql.Sync", "ConnectToTarget.AzureSqlDbMI", + "ConnectToTarget.AzureSqlDbMI.Sync.LRS", "ConnectToTarget.AzureDbForMySql", + "GetUserTables.Sql", "GetUserTables.AzureSqlDb.Sync", "GetUserTablesOracle", + "GetUserTablesPostgreSql", "GetUserTablesMySql", "Migrate.MongoDb", + "Migrate.SqlServer.AzureSqlDbMI", "Migrate.SqlServer.AzureSqlDbMI.Sync.LRS", + "Migrate.SqlServer.SqlDb", "Migrate.SqlServer.AzureSqlDb.Sync", + "Migrate.MySql.AzureDbForMySql.Sync", "Migrate.MySql.AzureDbForMySql", + "Migrate.PostgreSql.AzureDbForPostgreSql.SyncV2", "Migrate.Oracle.AzureDbForPostgreSql.Sync", + "ValidateMigrationInput.SqlServer.SqlDb.Sync", "ValidateMigrationInput.SqlServer.AzureSqlDbMI", + "ValidateMigrationInput.SqlServer.AzureSqlDbMI.Sync.LRS", "Validate.MongoDb", + "Validate.Oracle.AzureDbPostgreSql.Sync", "GetTDECertificates.Sql", "Migrate.Ssis", + "Service.Check.OCI", "Service.Upload.OCI", "Service.Install.OCI", + "MigrateSchemaSqlServerSqlDb". + :type task_type: str or ~azure.mgmt.datamigration.models.TaskType + :ivar errors: Array of errors. This is ignored if submitted. + :vartype errors: list[~azure.mgmt.datamigration.models.ODataError] + :ivar state: The state of the task. This is ignored if submitted. Possible values include: + "Unknown", "Queued", "Running", "Canceled", "Succeeded", "Failed", "FailedInputValidation", + "Faulted". + :vartype state: str or ~azure.mgmt.datamigration.models.TaskState + :ivar commands: Array of command properties. + :vartype commands: list[~azure.mgmt.datamigration.models.CommandProperties] + :param client_data: Key value pairs of client data to attach meta data information to task. + :type client_data: dict[str, str] + :param input: Task input. + :type input: + ~azure.mgmt.datamigration.models.MigratePostgreSqlAzureDbForPostgreSqlSyncTaskInput + :ivar output: Task output. This is ignored if submitted. + :vartype output: + list[~azure.mgmt.datamigration.models.MigratePostgreSqlAzureDbForPostgreSqlSyncTaskOutput] + :param task_id: task id. + :type task_id: str + :param created_on: DateTime in UTC when the task was created. + :type created_on: str + """ + + _validation = { + 'task_type': {'required': True}, + 'errors': {'readonly': True}, + 'state': {'readonly': True}, + 'commands': {'readonly': True}, + 'output': {'readonly': True}, + } + + _attribute_map = { + 'task_type': {'key': 'taskType', 'type': 'str'}, + 'errors': {'key': 'errors', 'type': '[ODataError]'}, + 'state': {'key': 'state', 'type': 'str'}, + 'commands': {'key': 'commands', 'type': '[CommandProperties]'}, + 'client_data': {'key': 'clientData', 'type': '{str}'}, + 'input': {'key': 'input', 'type': 'MigratePostgreSqlAzureDbForPostgreSqlSyncTaskInput'}, + 'output': {'key': 'output', 'type': '[MigratePostgreSqlAzureDbForPostgreSqlSyncTaskOutput]'}, + 'task_id': {'key': 'taskId', 'type': 'str'}, + 'created_on': {'key': 'createdOn', 'type': 'str'}, + } + + def __init__( + self, + *, + client_data: Optional[Dict[str, str]] = None, + input: Optional["MigratePostgreSqlAzureDbForPostgreSqlSyncTaskInput"] = None, + task_id: Optional[str] = None, + created_on: Optional[str] = None, + **kwargs + ): + super(MigratePostgreSqlAzureDbForPostgreSqlSyncTaskProperties, self).__init__(client_data=client_data, **kwargs) + self.task_type = 'Migrate.PostgreSql.AzureDbForPostgreSql.SyncV2' # type: str + self.input = input + self.output = None + self.task_id = task_id + self.created_on = created_on + + +class MigrateSchemaSqlServerSqlDbDatabaseInput(msrest.serialization.Model): + """Database input for migrate schema Sql Server to Azure SQL Server scenario. + + :param name: Name of source database. + :type name: str + :param id: Id of the source database. + :type id: str + :param target_database_name: Name of target database. + :type target_database_name: str + :param schema_setting: Database schema migration settings. + :type schema_setting: ~azure.mgmt.datamigration.models.SchemaMigrationSetting + """ + + _attribute_map = { + 'name': {'key': 'name', 'type': 'str'}, + 'id': {'key': 'id', 'type': 'str'}, + 'target_database_name': {'key': 'targetDatabaseName', 'type': 'str'}, + 'schema_setting': {'key': 'schemaSetting', 'type': 'SchemaMigrationSetting'}, + } + + def __init__( + self, + *, + name: Optional[str] = None, + id: Optional[str] = None, + target_database_name: Optional[str] = None, + schema_setting: Optional["SchemaMigrationSetting"] = None, + **kwargs + ): + super(MigrateSchemaSqlServerSqlDbDatabaseInput, self).__init__(**kwargs) + self.name = name + self.id = id + self.target_database_name = target_database_name + self.schema_setting = schema_setting + + +class SqlMigrationTaskInput(msrest.serialization.Model): + """Base class for migration task input. + + All required parameters must be populated in order to send to Azure. + + :param source_connection_info: Required. Information for connecting to source. + :type source_connection_info: ~azure.mgmt.datamigration.models.SqlConnectionInfo + :param target_connection_info: Required. Information for connecting to target. + :type target_connection_info: ~azure.mgmt.datamigration.models.SqlConnectionInfo + """ + + _validation = { + 'source_connection_info': {'required': True}, + 'target_connection_info': {'required': True}, + } + + _attribute_map = { + 'source_connection_info': {'key': 'sourceConnectionInfo', 'type': 'SqlConnectionInfo'}, + 'target_connection_info': {'key': 'targetConnectionInfo', 'type': 'SqlConnectionInfo'}, + } + + def __init__( + self, + *, + source_connection_info: "SqlConnectionInfo", + target_connection_info: "SqlConnectionInfo", + **kwargs + ): + super(SqlMigrationTaskInput, self).__init__(**kwargs) + self.source_connection_info = source_connection_info + self.target_connection_info = target_connection_info + + +class MigrateSchemaSqlServerSqlDbTaskInput(SqlMigrationTaskInput): + """Input for task that migrates Schema for SQL Server databases to Azure SQL databases. + + All required parameters must be populated in order to send to Azure. + + :param source_connection_info: Required. Information for connecting to source. + :type source_connection_info: ~azure.mgmt.datamigration.models.SqlConnectionInfo + :param target_connection_info: Required. Information for connecting to target. + :type target_connection_info: ~azure.mgmt.datamigration.models.SqlConnectionInfo + :param selected_databases: Required. Databases to migrate. + :type selected_databases: + list[~azure.mgmt.datamigration.models.MigrateSchemaSqlServerSqlDbDatabaseInput] + :param encrypted_key_for_secure_fields: encrypted key for secure fields. + :type encrypted_key_for_secure_fields: str + :param started_on: Migration start time. + :type started_on: str + """ + + _validation = { + 'source_connection_info': {'required': True}, + 'target_connection_info': {'required': True}, + 'selected_databases': {'required': True}, + } + + _attribute_map = { + 'source_connection_info': {'key': 'sourceConnectionInfo', 'type': 'SqlConnectionInfo'}, + 'target_connection_info': {'key': 'targetConnectionInfo', 'type': 'SqlConnectionInfo'}, + 'selected_databases': {'key': 'selectedDatabases', 'type': '[MigrateSchemaSqlServerSqlDbDatabaseInput]'}, + 'encrypted_key_for_secure_fields': {'key': 'encryptedKeyForSecureFields', 'type': 'str'}, + 'started_on': {'key': 'startedOn', 'type': 'str'}, + } + + def __init__( + self, + *, + source_connection_info: "SqlConnectionInfo", + target_connection_info: "SqlConnectionInfo", + selected_databases: List["MigrateSchemaSqlServerSqlDbDatabaseInput"], + encrypted_key_for_secure_fields: Optional[str] = None, + started_on: Optional[str] = None, + **kwargs + ): + super(MigrateSchemaSqlServerSqlDbTaskInput, self).__init__(source_connection_info=source_connection_info, target_connection_info=target_connection_info, **kwargs) + self.selected_databases = selected_databases + self.encrypted_key_for_secure_fields = encrypted_key_for_secure_fields + self.started_on = started_on + + +class MigrateSchemaSqlServerSqlDbTaskOutput(msrest.serialization.Model): + """Output for the task that migrates Schema for SQL Server databases to Azure SQL databases. + + You probably want to use the sub-classes and not this class directly. Known + sub-classes are: MigrateSchemaSqlServerSqlDbTaskOutputDatabaseLevel, MigrateSchemaSqlTaskOutputError, MigrateSchemaSqlServerSqlDbTaskOutputMigrationLevel, MigrateSchemaSqlServerSqlDbTaskOutputError. + + Variables are only populated by the server, and will be ignored when sending a request. + + All required parameters must be populated in order to send to Azure. + + :ivar id: Result identifier. + :vartype id: str + :param result_type: Required. Result type.Constant filled by server. + :type result_type: str + """ + + _validation = { + 'id': {'readonly': True}, + 'result_type': {'required': True}, + } + + _attribute_map = { + 'id': {'key': 'id', 'type': 'str'}, + 'result_type': {'key': 'resultType', 'type': 'str'}, + } + + _subtype_map = { + 'result_type': {'DatabaseLevelOutput': 'MigrateSchemaSqlServerSqlDbTaskOutputDatabaseLevel', 'ErrorOutput': 'MigrateSchemaSqlTaskOutputError', 'MigrationLevelOutput': 'MigrateSchemaSqlServerSqlDbTaskOutputMigrationLevel', 'SchemaErrorOutput': 'MigrateSchemaSqlServerSqlDbTaskOutputError'} + } + + def __init__( + self, + **kwargs + ): + super(MigrateSchemaSqlServerSqlDbTaskOutput, self).__init__(**kwargs) + self.id = None + self.result_type = None # type: Optional[str] + + +class MigrateSchemaSqlServerSqlDbTaskOutputDatabaseLevel(MigrateSchemaSqlServerSqlDbTaskOutput): + """MigrateSchemaSqlServerSqlDbTaskOutputDatabaseLevel. + + Variables are only populated by the server, and will be ignored when sending a request. + + All required parameters must be populated in order to send to Azure. + + :ivar id: Result identifier. + :vartype id: str + :param result_type: Required. Result type.Constant filled by server. + :type result_type: str + :ivar database_name: The name of the database. + :vartype database_name: str + :ivar state: State of the schema migration for this database. Possible values include: "None", + "InProgress", "Failed", "Warning", "Completed", "Skipped", "Stopped". + :vartype state: str or ~azure.mgmt.datamigration.models.MigrationState + :ivar stage: Schema migration stage for this database. Possible values include: "NotStarted", + "ValidatingInputs", "CollectingObjects", "DownloadingScript", "GeneratingScript", + "UploadingScript", "DeployingSchema", "Completed", "CompletedWithWarnings", "Failed". + :vartype stage: str or ~azure.mgmt.datamigration.models.SchemaMigrationStage + :ivar started_on: Migration start time. + :vartype started_on: ~datetime.datetime + :ivar ended_on: Migration end time. + :vartype ended_on: ~datetime.datetime + :ivar database_error_result_prefix: Prefix string to use for querying errors for this database. + :vartype database_error_result_prefix: str + :ivar schema_error_result_prefix: Prefix string to use for querying schema errors for this + database. + :vartype schema_error_result_prefix: str + :ivar number_of_successful_operations: Number of successful operations for this database. + :vartype number_of_successful_operations: long + :ivar number_of_failed_operations: Number of failed operations for this database. + :vartype number_of_failed_operations: long + :ivar file_id: Identifier for the file resource containing the schema of this database. + :vartype file_id: str + """ + + _validation = { + 'id': {'readonly': True}, + 'result_type': {'required': True}, + 'database_name': {'readonly': True}, + 'state': {'readonly': True}, + 'stage': {'readonly': True}, + 'started_on': {'readonly': True}, + 'ended_on': {'readonly': True}, + 'database_error_result_prefix': {'readonly': True}, + 'schema_error_result_prefix': {'readonly': True}, + 'number_of_successful_operations': {'readonly': True}, + 'number_of_failed_operations': {'readonly': True}, + 'file_id': {'readonly': True}, + } + + _attribute_map = { + 'id': {'key': 'id', 'type': 'str'}, + 'result_type': {'key': 'resultType', 'type': 'str'}, + 'database_name': {'key': 'databaseName', 'type': 'str'}, + 'state': {'key': 'state', 'type': 'str'}, + 'stage': {'key': 'stage', 'type': 'str'}, + 'started_on': {'key': 'startedOn', 'type': 'iso-8601'}, + 'ended_on': {'key': 'endedOn', 'type': 'iso-8601'}, + 'database_error_result_prefix': {'key': 'databaseErrorResultPrefix', 'type': 'str'}, + 'schema_error_result_prefix': {'key': 'schemaErrorResultPrefix', 'type': 'str'}, + 'number_of_successful_operations': {'key': 'numberOfSuccessfulOperations', 'type': 'long'}, + 'number_of_failed_operations': {'key': 'numberOfFailedOperations', 'type': 'long'}, + 'file_id': {'key': 'fileId', 'type': 'str'}, + } + + def __init__( + self, + **kwargs + ): + super(MigrateSchemaSqlServerSqlDbTaskOutputDatabaseLevel, self).__init__(**kwargs) + self.result_type = 'DatabaseLevelOutput' # type: str + self.database_name = None + self.state = None + self.stage = None + self.started_on = None + self.ended_on = None + self.database_error_result_prefix = None + self.schema_error_result_prefix = None + self.number_of_successful_operations = None + self.number_of_failed_operations = None + self.file_id = None + + +class MigrateSchemaSqlServerSqlDbTaskOutputError(MigrateSchemaSqlServerSqlDbTaskOutput): + """MigrateSchemaSqlServerSqlDbTaskOutputError. + + Variables are only populated by the server, and will be ignored when sending a request. + + All required parameters must be populated in order to send to Azure. + + :ivar id: Result identifier. + :vartype id: str + :param result_type: Required. Result type.Constant filled by server. + :type result_type: str + :ivar command_text: Schema command which failed. + :vartype command_text: str + :ivar error_text: Reason of failure. + :vartype error_text: str + """ + + _validation = { + 'id': {'readonly': True}, + 'result_type': {'required': True}, + 'command_text': {'readonly': True}, + 'error_text': {'readonly': True}, + } + + _attribute_map = { + 'id': {'key': 'id', 'type': 'str'}, + 'result_type': {'key': 'resultType', 'type': 'str'}, + 'command_text': {'key': 'commandText', 'type': 'str'}, + 'error_text': {'key': 'errorText', 'type': 'str'}, + } + + def __init__( + self, + **kwargs + ): + super(MigrateSchemaSqlServerSqlDbTaskOutputError, self).__init__(**kwargs) + self.result_type = 'SchemaErrorOutput' # type: str + self.command_text = None + self.error_text = None + + +class MigrateSchemaSqlServerSqlDbTaskOutputMigrationLevel(MigrateSchemaSqlServerSqlDbTaskOutput): + """MigrateSchemaSqlServerSqlDbTaskOutputMigrationLevel. + + Variables are only populated by the server, and will be ignored when sending a request. + + All required parameters must be populated in order to send to Azure. + + :ivar id: Result identifier. + :vartype id: str + :param result_type: Required. Result type.Constant filled by server. + :type result_type: str + :ivar state: Overall state of the schema migration. Possible values include: "None", + "InProgress", "Failed", "Warning", "Completed", "Skipped", "Stopped". + :vartype state: str or ~azure.mgmt.datamigration.models.MigrationState + :ivar started_on: Migration start time. + :vartype started_on: ~datetime.datetime + :ivar ended_on: Migration end time. + :vartype ended_on: ~datetime.datetime + :ivar source_server_version: Source server version. + :vartype source_server_version: str + :ivar source_server_brand_version: Source server brand version. + :vartype source_server_brand_version: str + :ivar target_server_version: Target server version. + :vartype target_server_version: str + :ivar target_server_brand_version: Target server brand version. + :vartype target_server_brand_version: str + """ + + _validation = { + 'id': {'readonly': True}, + 'result_type': {'required': True}, + 'state': {'readonly': True}, + 'started_on': {'readonly': True}, + 'ended_on': {'readonly': True}, + 'source_server_version': {'readonly': True}, + 'source_server_brand_version': {'readonly': True}, + 'target_server_version': {'readonly': True}, + 'target_server_brand_version': {'readonly': True}, + } + + _attribute_map = { + 'id': {'key': 'id', 'type': 'str'}, + 'result_type': {'key': 'resultType', 'type': 'str'}, + 'state': {'key': 'state', 'type': 'str'}, + 'started_on': {'key': 'startedOn', 'type': 'iso-8601'}, + 'ended_on': {'key': 'endedOn', 'type': 'iso-8601'}, + 'source_server_version': {'key': 'sourceServerVersion', 'type': 'str'}, + 'source_server_brand_version': {'key': 'sourceServerBrandVersion', 'type': 'str'}, + 'target_server_version': {'key': 'targetServerVersion', 'type': 'str'}, + 'target_server_brand_version': {'key': 'targetServerBrandVersion', 'type': 'str'}, + } + + def __init__( + self, + **kwargs + ): + super(MigrateSchemaSqlServerSqlDbTaskOutputMigrationLevel, self).__init__(**kwargs) + self.result_type = 'MigrationLevelOutput' # type: str + self.state = None + self.started_on = None + self.ended_on = None + self.source_server_version = None + self.source_server_brand_version = None + self.target_server_version = None + self.target_server_brand_version = None + + +class MigrateSchemaSqlServerSqlDbTaskProperties(ProjectTaskProperties): + """Properties for task that migrates Schema for SQL Server databases to Azure SQL databases. + + Variables are only populated by the server, and will be ignored when sending a request. + + All required parameters must be populated in order to send to Azure. + + :param task_type: Required. Task type.Constant filled by server. Possible values include: + "Connect.MongoDb", "ConnectToSource.SqlServer", "ConnectToSource.SqlServer.Sync", + "ConnectToSource.PostgreSql.Sync", "ConnectToSource.MySql", "ConnectToSource.Oracle.Sync", + "ConnectToTarget.SqlDb", "ConnectToTarget.SqlDb.Sync", + "ConnectToTarget.AzureDbForPostgreSql.Sync", + "ConnectToTarget.Oracle.AzureDbForPostgreSql.Sync", "ConnectToTarget.AzureSqlDbMI", + "ConnectToTarget.AzureSqlDbMI.Sync.LRS", "ConnectToTarget.AzureDbForMySql", + "GetUserTables.Sql", "GetUserTables.AzureSqlDb.Sync", "GetUserTablesOracle", + "GetUserTablesPostgreSql", "GetUserTablesMySql", "Migrate.MongoDb", + "Migrate.SqlServer.AzureSqlDbMI", "Migrate.SqlServer.AzureSqlDbMI.Sync.LRS", + "Migrate.SqlServer.SqlDb", "Migrate.SqlServer.AzureSqlDb.Sync", + "Migrate.MySql.AzureDbForMySql.Sync", "Migrate.MySql.AzureDbForMySql", + "Migrate.PostgreSql.AzureDbForPostgreSql.SyncV2", "Migrate.Oracle.AzureDbForPostgreSql.Sync", + "ValidateMigrationInput.SqlServer.SqlDb.Sync", "ValidateMigrationInput.SqlServer.AzureSqlDbMI", + "ValidateMigrationInput.SqlServer.AzureSqlDbMI.Sync.LRS", "Validate.MongoDb", + "Validate.Oracle.AzureDbPostgreSql.Sync", "GetTDECertificates.Sql", "Migrate.Ssis", + "Service.Check.OCI", "Service.Upload.OCI", "Service.Install.OCI", + "MigrateSchemaSqlServerSqlDb". + :type task_type: str or ~azure.mgmt.datamigration.models.TaskType + :ivar errors: Array of errors. This is ignored if submitted. + :vartype errors: list[~azure.mgmt.datamigration.models.ODataError] + :ivar state: The state of the task. This is ignored if submitted. Possible values include: + "Unknown", "Queued", "Running", "Canceled", "Succeeded", "Failed", "FailedInputValidation", + "Faulted". + :vartype state: str or ~azure.mgmt.datamigration.models.TaskState + :ivar commands: Array of command properties. + :vartype commands: list[~azure.mgmt.datamigration.models.CommandProperties] + :param client_data: Key value pairs of client data to attach meta data information to task. + :type client_data: dict[str, str] + :param input: Task input. + :type input: ~azure.mgmt.datamigration.models.MigrateSchemaSqlServerSqlDbTaskInput + :ivar output: Task output. This is ignored if submitted. + :vartype output: list[~azure.mgmt.datamigration.models.MigrateSchemaSqlServerSqlDbTaskOutput] + :param created_on: DateTime in UTC when the task was created. + :type created_on: str + :param task_id: Task id. + :type task_id: str + """ + + _validation = { + 'task_type': {'required': True}, + 'errors': {'readonly': True}, + 'state': {'readonly': True}, + 'commands': {'readonly': True}, + 'output': {'readonly': True}, + } + + _attribute_map = { + 'task_type': {'key': 'taskType', 'type': 'str'}, + 'errors': {'key': 'errors', 'type': '[ODataError]'}, + 'state': {'key': 'state', 'type': 'str'}, + 'commands': {'key': 'commands', 'type': '[CommandProperties]'}, + 'client_data': {'key': 'clientData', 'type': '{str}'}, + 'input': {'key': 'input', 'type': 'MigrateSchemaSqlServerSqlDbTaskInput'}, + 'output': {'key': 'output', 'type': '[MigrateSchemaSqlServerSqlDbTaskOutput]'}, + 'created_on': {'key': 'createdOn', 'type': 'str'}, + 'task_id': {'key': 'taskId', 'type': 'str'}, + } + + def __init__( + self, + *, + client_data: Optional[Dict[str, str]] = None, + input: Optional["MigrateSchemaSqlServerSqlDbTaskInput"] = None, + created_on: Optional[str] = None, + task_id: Optional[str] = None, + **kwargs + ): + super(MigrateSchemaSqlServerSqlDbTaskProperties, self).__init__(client_data=client_data, **kwargs) + self.task_type = 'MigrateSchemaSqlServerSqlDb' # type: str + self.input = input + self.output = None + self.created_on = created_on + self.task_id = task_id + + +class MigrateSchemaSqlTaskOutputError(MigrateSchemaSqlServerSqlDbTaskOutput): + """MigrateSchemaSqlTaskOutputError. + + Variables are only populated by the server, and will be ignored when sending a request. + + All required parameters must be populated in order to send to Azure. + + :ivar id: Result identifier. + :vartype id: str + :param result_type: Required. Result type.Constant filled by server. + :type result_type: str + :ivar error: Migration error. + :vartype error: ~azure.mgmt.datamigration.models.ReportableException + """ + + _validation = { + 'id': {'readonly': True}, + 'result_type': {'required': True}, + 'error': {'readonly': True}, + } + + _attribute_map = { + 'id': {'key': 'id', 'type': 'str'}, + 'result_type': {'key': 'resultType', 'type': 'str'}, + 'error': {'key': 'error', 'type': 'ReportableException'}, + } + + def __init__( + self, + **kwargs + ): + super(MigrateSchemaSqlTaskOutputError, self).__init__(**kwargs) + self.result_type = 'ErrorOutput' # type: str + self.error = None + + +class MigrateSqlServerDatabaseInput(msrest.serialization.Model): + """Database specific information for SQL to SQL migration task inputs. + + :param name: Name of the database. + :type name: str + :param restore_database_name: Name of the database at destination. + :type restore_database_name: str + :param backup_and_restore_folder: The backup and restore folder. + :type backup_and_restore_folder: str + :param database_files: The list of database files. + :type database_files: list[~azure.mgmt.datamigration.models.DatabaseFileInput] + """ + + _attribute_map = { + 'name': {'key': 'name', 'type': 'str'}, + 'restore_database_name': {'key': 'restoreDatabaseName', 'type': 'str'}, + 'backup_and_restore_folder': {'key': 'backupAndRestoreFolder', 'type': 'str'}, + 'database_files': {'key': 'databaseFiles', 'type': '[DatabaseFileInput]'}, + } + + def __init__( + self, + *, + name: Optional[str] = None, + restore_database_name: Optional[str] = None, + backup_and_restore_folder: Optional[str] = None, + database_files: Optional[List["DatabaseFileInput"]] = None, + **kwargs + ): + super(MigrateSqlServerDatabaseInput, self).__init__(**kwargs) + self.name = name + self.restore_database_name = restore_database_name + self.backup_and_restore_folder = backup_and_restore_folder + self.database_files = database_files + + +class MigrateSqlServerSqlDbDatabaseInput(msrest.serialization.Model): + """Database specific information for SQL to Azure SQL DB migration task inputs. + + :param name: Name of the database. + :type name: str + :param target_database_name: Name of target database. Note: Target database will be truncated + before starting migration. + :type target_database_name: str + :param make_source_db_read_only: Whether to set database read only before migration. + :type make_source_db_read_only: bool + :param table_map: Mapping of source to target tables. + :type table_map: dict[str, str] + :param schema_setting: Settings selected for DB schema migration. + :type schema_setting: object + :param id: id of the database. + :type id: str + """ + + _attribute_map = { + 'name': {'key': 'name', 'type': 'str'}, + 'target_database_name': {'key': 'targetDatabaseName', 'type': 'str'}, + 'make_source_db_read_only': {'key': 'makeSourceDbReadOnly', 'type': 'bool'}, + 'table_map': {'key': 'tableMap', 'type': '{str}'}, + 'schema_setting': {'key': 'schemaSetting', 'type': 'object'}, + 'id': {'key': 'id', 'type': 'str'}, + } + + def __init__( + self, + *, + name: Optional[str] = None, + target_database_name: Optional[str] = None, + make_source_db_read_only: Optional[bool] = None, + table_map: Optional[Dict[str, str]] = None, + schema_setting: Optional[object] = None, + id: Optional[str] = None, + **kwargs + ): + super(MigrateSqlServerSqlDbDatabaseInput, self).__init__(**kwargs) + self.name = name + self.target_database_name = target_database_name + self.make_source_db_read_only = make_source_db_read_only + self.table_map = table_map + self.schema_setting = schema_setting + self.id = id + + +class MigrateSqlServerSqlDbSyncDatabaseInput(msrest.serialization.Model): + """Database specific information for SQL to Azure SQL DB sync migration task inputs. + + :param id: Unique identifier for database. + :type id: str + :param name: Name of database. + :type name: str + :param target_database_name: Target database name. + :type target_database_name: str + :param schema_name: Schema name to be migrated. + :type schema_name: str + :param table_map: Mapping of source to target tables. + :type table_map: dict[str, str] + :param migration_setting: Migration settings which tune the migration behavior. + :type migration_setting: dict[str, str] + :param source_setting: Source settings to tune source endpoint migration behavior. + :type source_setting: dict[str, str] + :param target_setting: Target settings to tune target endpoint migration behavior. + :type target_setting: dict[str, str] + """ + + _attribute_map = { + 'id': {'key': 'id', 'type': 'str'}, + 'name': {'key': 'name', 'type': 'str'}, + 'target_database_name': {'key': 'targetDatabaseName', 'type': 'str'}, + 'schema_name': {'key': 'schemaName', 'type': 'str'}, + 'table_map': {'key': 'tableMap', 'type': '{str}'}, + 'migration_setting': {'key': 'migrationSetting', 'type': '{str}'}, + 'source_setting': {'key': 'sourceSetting', 'type': '{str}'}, + 'target_setting': {'key': 'targetSetting', 'type': '{str}'}, + } + + def __init__( + self, + *, + id: Optional[str] = None, + name: Optional[str] = None, + target_database_name: Optional[str] = None, + schema_name: Optional[str] = None, + table_map: Optional[Dict[str, str]] = None, + migration_setting: Optional[Dict[str, str]] = None, + source_setting: Optional[Dict[str, str]] = None, + target_setting: Optional[Dict[str, str]] = None, + **kwargs + ): + super(MigrateSqlServerSqlDbSyncDatabaseInput, self).__init__(**kwargs) + self.id = id + self.name = name + self.target_database_name = target_database_name + self.schema_name = schema_name + self.table_map = table_map + self.migration_setting = migration_setting + self.source_setting = source_setting + self.target_setting = target_setting + + +class MigrateSqlServerSqlDbSyncTaskInput(SqlMigrationTaskInput): + """Input for the task that migrates on-prem SQL Server databases to Azure SQL Database for online migrations. + + All required parameters must be populated in order to send to Azure. + + :param source_connection_info: Required. Information for connecting to source. + :type source_connection_info: ~azure.mgmt.datamigration.models.SqlConnectionInfo + :param target_connection_info: Required. Information for connecting to target. + :type target_connection_info: ~azure.mgmt.datamigration.models.SqlConnectionInfo + :param selected_databases: Required. Databases to migrate. + :type selected_databases: + list[~azure.mgmt.datamigration.models.MigrateSqlServerSqlDbSyncDatabaseInput] + :param validation_options: Validation options. + :type validation_options: ~azure.mgmt.datamigration.models.MigrationValidationOptions + """ + + _validation = { + 'source_connection_info': {'required': True}, + 'target_connection_info': {'required': True}, + 'selected_databases': {'required': True}, + } + + _attribute_map = { + 'source_connection_info': {'key': 'sourceConnectionInfo', 'type': 'SqlConnectionInfo'}, + 'target_connection_info': {'key': 'targetConnectionInfo', 'type': 'SqlConnectionInfo'}, + 'selected_databases': {'key': 'selectedDatabases', 'type': '[MigrateSqlServerSqlDbSyncDatabaseInput]'}, + 'validation_options': {'key': 'validationOptions', 'type': 'MigrationValidationOptions'}, + } + + def __init__( + self, + *, + source_connection_info: "SqlConnectionInfo", + target_connection_info: "SqlConnectionInfo", + selected_databases: List["MigrateSqlServerSqlDbSyncDatabaseInput"], + validation_options: Optional["MigrationValidationOptions"] = None, + **kwargs + ): + super(MigrateSqlServerSqlDbSyncTaskInput, self).__init__(source_connection_info=source_connection_info, target_connection_info=target_connection_info, **kwargs) + self.selected_databases = selected_databases + self.validation_options = validation_options + + +class MigrateSqlServerSqlDbSyncTaskOutput(msrest.serialization.Model): + """Output for the task that migrates on-prem SQL Server databases to Azure SQL Database for online migrations. + + You probably want to use the sub-classes and not this class directly. Known + sub-classes are: MigrateSqlServerSqlDbSyncTaskOutputDatabaseError, MigrateSqlServerSqlDbSyncTaskOutputDatabaseLevel, MigrateSqlServerSqlDbSyncTaskOutputError, MigrateSqlServerSqlDbSyncTaskOutputMigrationLevel, MigrateSqlServerSqlDbSyncTaskOutputTableLevel. + + Variables are only populated by the server, and will be ignored when sending a request. + + All required parameters must be populated in order to send to Azure. + + :ivar id: Result identifier. + :vartype id: str + :param result_type: Required. Result type.Constant filled by server. + :type result_type: str + """ + + _validation = { + 'id': {'readonly': True}, + 'result_type': {'required': True}, + } + + _attribute_map = { + 'id': {'key': 'id', 'type': 'str'}, + 'result_type': {'key': 'resultType', 'type': 'str'}, + } + + _subtype_map = { + 'result_type': {'DatabaseLevelErrorOutput': 'MigrateSqlServerSqlDbSyncTaskOutputDatabaseError', 'DatabaseLevelOutput': 'MigrateSqlServerSqlDbSyncTaskOutputDatabaseLevel', 'ErrorOutput': 'MigrateSqlServerSqlDbSyncTaskOutputError', 'MigrationLevelOutput': 'MigrateSqlServerSqlDbSyncTaskOutputMigrationLevel', 'TableLevelOutput': 'MigrateSqlServerSqlDbSyncTaskOutputTableLevel'} + } + + def __init__( + self, + **kwargs + ): + super(MigrateSqlServerSqlDbSyncTaskOutput, self).__init__(**kwargs) + self.id = None + self.result_type = None # type: Optional[str] + + +class MigrateSqlServerSqlDbSyncTaskOutputDatabaseError(MigrateSqlServerSqlDbSyncTaskOutput): + """MigrateSqlServerSqlDbSyncTaskOutputDatabaseError. + + Variables are only populated by the server, and will be ignored when sending a request. + + All required parameters must be populated in order to send to Azure. + + :ivar id: Result identifier. + :vartype id: str + :param result_type: Required. Result type.Constant filled by server. + :type result_type: str + :param error_message: Error message. + :type error_message: str + :param events: List of error events. + :type events: list[~azure.mgmt.datamigration.models.SyncMigrationDatabaseErrorEvent] + """ + + _validation = { + 'id': {'readonly': True}, + 'result_type': {'required': True}, + } + + _attribute_map = { + 'id': {'key': 'id', 'type': 'str'}, + 'result_type': {'key': 'resultType', 'type': 'str'}, + 'error_message': {'key': 'errorMessage', 'type': 'str'}, + 'events': {'key': 'events', 'type': '[SyncMigrationDatabaseErrorEvent]'}, + } + + def __init__( + self, + *, + error_message: Optional[str] = None, + events: Optional[List["SyncMigrationDatabaseErrorEvent"]] = None, + **kwargs + ): + super(MigrateSqlServerSqlDbSyncTaskOutputDatabaseError, self).__init__(**kwargs) + self.result_type = 'DatabaseLevelErrorOutput' # type: str + self.error_message = error_message + self.events = events + + +class MigrateSqlServerSqlDbSyncTaskOutputDatabaseLevel(MigrateSqlServerSqlDbSyncTaskOutput): + """MigrateSqlServerSqlDbSyncTaskOutputDatabaseLevel. + + Variables are only populated by the server, and will be ignored when sending a request. + + All required parameters must be populated in order to send to Azure. + + :ivar id: Result identifier. + :vartype id: str + :param result_type: Required. Result type.Constant filled by server. + :type result_type: str + :ivar database_name: Name of the database. + :vartype database_name: str + :ivar started_on: Migration start time. + :vartype started_on: ~datetime.datetime + :ivar ended_on: Migration end time. + :vartype ended_on: ~datetime.datetime + :ivar migration_state: Migration state that this database is in. Possible values include: + "UNDEFINED", "CONFIGURING", "INITIALIAZING", "STARTING", "RUNNING", "READY_TO_COMPLETE", + "COMPLETING", "COMPLETE", "CANCELLING", "CANCELLED", "FAILED", "VALIDATING", + "VALIDATION_COMPLETE", "VALIDATION_FAILED", "RESTORE_IN_PROGRESS", "RESTORE_COMPLETED", + "BACKUP_IN_PROGRESS", "BACKUP_COMPLETED". + :vartype migration_state: str or + ~azure.mgmt.datamigration.models.SyncDatabaseMigrationReportingState + :ivar incoming_changes: Number of incoming changes. + :vartype incoming_changes: long + :ivar applied_changes: Number of applied changes. + :vartype applied_changes: long + :ivar cdc_insert_counter: Number of cdc inserts. + :vartype cdc_insert_counter: long + :ivar cdc_delete_counter: Number of cdc deletes. + :vartype cdc_delete_counter: long + :ivar cdc_update_counter: Number of cdc updates. + :vartype cdc_update_counter: long + :ivar full_load_completed_tables: Number of tables completed in full load. + :vartype full_load_completed_tables: long + :ivar full_load_loading_tables: Number of tables loading in full load. + :vartype full_load_loading_tables: long + :ivar full_load_queued_tables: Number of tables queued in full load. + :vartype full_load_queued_tables: long + :ivar full_load_errored_tables: Number of tables errored in full load. + :vartype full_load_errored_tables: long + :ivar initialization_completed: Indicates if initial load (full load) has been completed. + :vartype initialization_completed: bool + :ivar latency: CDC apply latency. + :vartype latency: long + """ + + _validation = { + 'id': {'readonly': True}, + 'result_type': {'required': True}, + 'database_name': {'readonly': True}, + 'started_on': {'readonly': True}, + 'ended_on': {'readonly': True}, + 'migration_state': {'readonly': True}, + 'incoming_changes': {'readonly': True}, + 'applied_changes': {'readonly': True}, + 'cdc_insert_counter': {'readonly': True}, + 'cdc_delete_counter': {'readonly': True}, + 'cdc_update_counter': {'readonly': True}, + 'full_load_completed_tables': {'readonly': True}, + 'full_load_loading_tables': {'readonly': True}, + 'full_load_queued_tables': {'readonly': True}, + 'full_load_errored_tables': {'readonly': True}, + 'initialization_completed': {'readonly': True}, + 'latency': {'readonly': True}, + } + + _attribute_map = { + 'id': {'key': 'id', 'type': 'str'}, + 'result_type': {'key': 'resultType', 'type': 'str'}, + 'database_name': {'key': 'databaseName', 'type': 'str'}, + 'started_on': {'key': 'startedOn', 'type': 'iso-8601'}, + 'ended_on': {'key': 'endedOn', 'type': 'iso-8601'}, + 'migration_state': {'key': 'migrationState', 'type': 'str'}, + 'incoming_changes': {'key': 'incomingChanges', 'type': 'long'}, + 'applied_changes': {'key': 'appliedChanges', 'type': 'long'}, + 'cdc_insert_counter': {'key': 'cdcInsertCounter', 'type': 'long'}, + 'cdc_delete_counter': {'key': 'cdcDeleteCounter', 'type': 'long'}, + 'cdc_update_counter': {'key': 'cdcUpdateCounter', 'type': 'long'}, + 'full_load_completed_tables': {'key': 'fullLoadCompletedTables', 'type': 'long'}, + 'full_load_loading_tables': {'key': 'fullLoadLoadingTables', 'type': 'long'}, + 'full_load_queued_tables': {'key': 'fullLoadQueuedTables', 'type': 'long'}, + 'full_load_errored_tables': {'key': 'fullLoadErroredTables', 'type': 'long'}, + 'initialization_completed': {'key': 'initializationCompleted', 'type': 'bool'}, + 'latency': {'key': 'latency', 'type': 'long'}, + } + + def __init__( + self, + **kwargs + ): + super(MigrateSqlServerSqlDbSyncTaskOutputDatabaseLevel, self).__init__(**kwargs) + self.result_type = 'DatabaseLevelOutput' # type: str + self.database_name = None + self.started_on = None + self.ended_on = None + self.migration_state = None + self.incoming_changes = None + self.applied_changes = None + self.cdc_insert_counter = None + self.cdc_delete_counter = None + self.cdc_update_counter = None + self.full_load_completed_tables = None + self.full_load_loading_tables = None + self.full_load_queued_tables = None + self.full_load_errored_tables = None + self.initialization_completed = None + self.latency = None + + +class MigrateSqlServerSqlDbSyncTaskOutputError(MigrateSqlServerSqlDbSyncTaskOutput): + """MigrateSqlServerSqlDbSyncTaskOutputError. + + Variables are only populated by the server, and will be ignored when sending a request. + + All required parameters must be populated in order to send to Azure. + + :ivar id: Result identifier. + :vartype id: str + :param result_type: Required. Result type.Constant filled by server. + :type result_type: str + :ivar error: Migration error. + :vartype error: ~azure.mgmt.datamigration.models.ReportableException + """ + + _validation = { + 'id': {'readonly': True}, + 'result_type': {'required': True}, + 'error': {'readonly': True}, + } + + _attribute_map = { + 'id': {'key': 'id', 'type': 'str'}, + 'result_type': {'key': 'resultType', 'type': 'str'}, + 'error': {'key': 'error', 'type': 'ReportableException'}, + } + + def __init__( + self, + **kwargs + ): + super(MigrateSqlServerSqlDbSyncTaskOutputError, self).__init__(**kwargs) + self.result_type = 'ErrorOutput' # type: str + self.error = None + + +class MigrateSqlServerSqlDbSyncTaskOutputMigrationLevel(MigrateSqlServerSqlDbSyncTaskOutput): + """MigrateSqlServerSqlDbSyncTaskOutputMigrationLevel. + + Variables are only populated by the server, and will be ignored when sending a request. + + All required parameters must be populated in order to send to Azure. + + :ivar id: Result identifier. + :vartype id: str + :param result_type: Required. Result type.Constant filled by server. + :type result_type: str + :ivar started_on: Migration start time. + :vartype started_on: ~datetime.datetime + :ivar ended_on: Migration end time. + :vartype ended_on: ~datetime.datetime + :ivar source_server_version: Source server version. + :vartype source_server_version: str + :ivar source_server: Source server name. + :vartype source_server: str + :ivar target_server_version: Target server version. + :vartype target_server_version: str + :ivar target_server: Target server name. + :vartype target_server: str + :ivar database_count: Count of databases. + :vartype database_count: int + """ + + _validation = { + 'id': {'readonly': True}, + 'result_type': {'required': True}, + 'started_on': {'readonly': True}, + 'ended_on': {'readonly': True}, + 'source_server_version': {'readonly': True}, + 'source_server': {'readonly': True}, + 'target_server_version': {'readonly': True}, + 'target_server': {'readonly': True}, + 'database_count': {'readonly': True}, + } + + _attribute_map = { + 'id': {'key': 'id', 'type': 'str'}, + 'result_type': {'key': 'resultType', 'type': 'str'}, + 'started_on': {'key': 'startedOn', 'type': 'iso-8601'}, + 'ended_on': {'key': 'endedOn', 'type': 'iso-8601'}, + 'source_server_version': {'key': 'sourceServerVersion', 'type': 'str'}, + 'source_server': {'key': 'sourceServer', 'type': 'str'}, + 'target_server_version': {'key': 'targetServerVersion', 'type': 'str'}, + 'target_server': {'key': 'targetServer', 'type': 'str'}, + 'database_count': {'key': 'databaseCount', 'type': 'int'}, + } + + def __init__( + self, + **kwargs + ): + super(MigrateSqlServerSqlDbSyncTaskOutputMigrationLevel, self).__init__(**kwargs) + self.result_type = 'MigrationLevelOutput' # type: str + self.started_on = None + self.ended_on = None + self.source_server_version = None + self.source_server = None + self.target_server_version = None + self.target_server = None + self.database_count = None + + +class MigrateSqlServerSqlDbSyncTaskOutputTableLevel(MigrateSqlServerSqlDbSyncTaskOutput): + """MigrateSqlServerSqlDbSyncTaskOutputTableLevel. + + Variables are only populated by the server, and will be ignored when sending a request. + + All required parameters must be populated in order to send to Azure. + + :ivar id: Result identifier. + :vartype id: str + :param result_type: Required. Result type.Constant filled by server. + :type result_type: str + :ivar table_name: Name of the table. + :vartype table_name: str + :ivar database_name: Name of the database. + :vartype database_name: str + :ivar cdc_insert_counter: Number of applied inserts. + :vartype cdc_insert_counter: long + :ivar cdc_update_counter: Number of applied updates. + :vartype cdc_update_counter: long + :ivar cdc_delete_counter: Number of applied deletes. + :vartype cdc_delete_counter: long + :ivar full_load_est_finish_time: Estimate to finish full load. + :vartype full_load_est_finish_time: ~datetime.datetime + :ivar full_load_started_on: Full load start time. + :vartype full_load_started_on: ~datetime.datetime + :ivar full_load_ended_on: Full load end time. + :vartype full_load_ended_on: ~datetime.datetime + :ivar full_load_total_rows: Number of rows applied in full load. + :vartype full_load_total_rows: long + :ivar state: Current state of the table migration. Possible values include: "BEFORE_LOAD", + "FULL_LOAD", "COMPLETED", "CANCELED", "ERROR", "FAILED". + :vartype state: str or ~azure.mgmt.datamigration.models.SyncTableMigrationState + :ivar total_changes_applied: Total number of applied changes. + :vartype total_changes_applied: long + :ivar data_errors_counter: Number of data errors occurred. + :vartype data_errors_counter: long + :ivar last_modified_time: Last modified time on target. + :vartype last_modified_time: ~datetime.datetime + """ + + _validation = { + 'id': {'readonly': True}, + 'result_type': {'required': True}, + 'table_name': {'readonly': True}, + 'database_name': {'readonly': True}, + 'cdc_insert_counter': {'readonly': True}, + 'cdc_update_counter': {'readonly': True}, + 'cdc_delete_counter': {'readonly': True}, + 'full_load_est_finish_time': {'readonly': True}, + 'full_load_started_on': {'readonly': True}, + 'full_load_ended_on': {'readonly': True}, + 'full_load_total_rows': {'readonly': True}, + 'state': {'readonly': True}, + 'total_changes_applied': {'readonly': True}, + 'data_errors_counter': {'readonly': True}, + 'last_modified_time': {'readonly': True}, + } + + _attribute_map = { + 'id': {'key': 'id', 'type': 'str'}, + 'result_type': {'key': 'resultType', 'type': 'str'}, + 'table_name': {'key': 'tableName', 'type': 'str'}, + 'database_name': {'key': 'databaseName', 'type': 'str'}, + 'cdc_insert_counter': {'key': 'cdcInsertCounter', 'type': 'long'}, + 'cdc_update_counter': {'key': 'cdcUpdateCounter', 'type': 'long'}, + 'cdc_delete_counter': {'key': 'cdcDeleteCounter', 'type': 'long'}, + 'full_load_est_finish_time': {'key': 'fullLoadEstFinishTime', 'type': 'iso-8601'}, + 'full_load_started_on': {'key': 'fullLoadStartedOn', 'type': 'iso-8601'}, + 'full_load_ended_on': {'key': 'fullLoadEndedOn', 'type': 'iso-8601'}, + 'full_load_total_rows': {'key': 'fullLoadTotalRows', 'type': 'long'}, + 'state': {'key': 'state', 'type': 'str'}, + 'total_changes_applied': {'key': 'totalChangesApplied', 'type': 'long'}, + 'data_errors_counter': {'key': 'dataErrorsCounter', 'type': 'long'}, + 'last_modified_time': {'key': 'lastModifiedTime', 'type': 'iso-8601'}, + } + + def __init__( + self, + **kwargs + ): + super(MigrateSqlServerSqlDbSyncTaskOutputTableLevel, self).__init__(**kwargs) + self.result_type = 'TableLevelOutput' # type: str + self.table_name = None + self.database_name = None + self.cdc_insert_counter = None + self.cdc_update_counter = None + self.cdc_delete_counter = None + self.full_load_est_finish_time = None + self.full_load_started_on = None + self.full_load_ended_on = None + self.full_load_total_rows = None + self.state = None + self.total_changes_applied = None + self.data_errors_counter = None + self.last_modified_time = None + + +class MigrateSqlServerSqlDbSyncTaskProperties(ProjectTaskProperties): + """Properties for the task that migrates on-prem SQL Server databases to Azure SQL Database for online migrations. + + Variables are only populated by the server, and will be ignored when sending a request. + + All required parameters must be populated in order to send to Azure. + + :param task_type: Required. Task type.Constant filled by server. Possible values include: + "Connect.MongoDb", "ConnectToSource.SqlServer", "ConnectToSource.SqlServer.Sync", + "ConnectToSource.PostgreSql.Sync", "ConnectToSource.MySql", "ConnectToSource.Oracle.Sync", + "ConnectToTarget.SqlDb", "ConnectToTarget.SqlDb.Sync", + "ConnectToTarget.AzureDbForPostgreSql.Sync", + "ConnectToTarget.Oracle.AzureDbForPostgreSql.Sync", "ConnectToTarget.AzureSqlDbMI", + "ConnectToTarget.AzureSqlDbMI.Sync.LRS", "ConnectToTarget.AzureDbForMySql", + "GetUserTables.Sql", "GetUserTables.AzureSqlDb.Sync", "GetUserTablesOracle", + "GetUserTablesPostgreSql", "GetUserTablesMySql", "Migrate.MongoDb", + "Migrate.SqlServer.AzureSqlDbMI", "Migrate.SqlServer.AzureSqlDbMI.Sync.LRS", + "Migrate.SqlServer.SqlDb", "Migrate.SqlServer.AzureSqlDb.Sync", + "Migrate.MySql.AzureDbForMySql.Sync", "Migrate.MySql.AzureDbForMySql", + "Migrate.PostgreSql.AzureDbForPostgreSql.SyncV2", "Migrate.Oracle.AzureDbForPostgreSql.Sync", + "ValidateMigrationInput.SqlServer.SqlDb.Sync", "ValidateMigrationInput.SqlServer.AzureSqlDbMI", + "ValidateMigrationInput.SqlServer.AzureSqlDbMI.Sync.LRS", "Validate.MongoDb", + "Validate.Oracle.AzureDbPostgreSql.Sync", "GetTDECertificates.Sql", "Migrate.Ssis", + "Service.Check.OCI", "Service.Upload.OCI", "Service.Install.OCI", + "MigrateSchemaSqlServerSqlDb". + :type task_type: str or ~azure.mgmt.datamigration.models.TaskType + :ivar errors: Array of errors. This is ignored if submitted. + :vartype errors: list[~azure.mgmt.datamigration.models.ODataError] + :ivar state: The state of the task. This is ignored if submitted. Possible values include: + "Unknown", "Queued", "Running", "Canceled", "Succeeded", "Failed", "FailedInputValidation", + "Faulted". + :vartype state: str or ~azure.mgmt.datamigration.models.TaskState + :ivar commands: Array of command properties. + :vartype commands: list[~azure.mgmt.datamigration.models.CommandProperties] + :param client_data: Key value pairs of client data to attach meta data information to task. + :type client_data: dict[str, str] + :param input: Task input. + :type input: ~azure.mgmt.datamigration.models.MigrateSqlServerSqlDbSyncTaskInput + :ivar output: Task output. This is ignored if submitted. + :vartype output: list[~azure.mgmt.datamigration.models.MigrateSqlServerSqlDbSyncTaskOutput] + """ + + _validation = { + 'task_type': {'required': True}, + 'errors': {'readonly': True}, + 'state': {'readonly': True}, + 'commands': {'readonly': True}, + 'output': {'readonly': True}, + } + + _attribute_map = { + 'task_type': {'key': 'taskType', 'type': 'str'}, + 'errors': {'key': 'errors', 'type': '[ODataError]'}, + 'state': {'key': 'state', 'type': 'str'}, + 'commands': {'key': 'commands', 'type': '[CommandProperties]'}, + 'client_data': {'key': 'clientData', 'type': '{str}'}, + 'input': {'key': 'input', 'type': 'MigrateSqlServerSqlDbSyncTaskInput'}, + 'output': {'key': 'output', 'type': '[MigrateSqlServerSqlDbSyncTaskOutput]'}, + } + + def __init__( + self, + *, + client_data: Optional[Dict[str, str]] = None, + input: Optional["MigrateSqlServerSqlDbSyncTaskInput"] = None, + **kwargs + ): + super(MigrateSqlServerSqlDbSyncTaskProperties, self).__init__(client_data=client_data, **kwargs) + self.task_type = 'Migrate.SqlServer.AzureSqlDb.Sync' # type: str + self.input = input + self.output = None + + +class MigrateSqlServerSqlDbTaskInput(SqlMigrationTaskInput): + """Input for the task that migrates on-prem SQL Server databases to Azure SQL Database. + + All required parameters must be populated in order to send to Azure. + + :param source_connection_info: Required. Information for connecting to source. + :type source_connection_info: ~azure.mgmt.datamigration.models.SqlConnectionInfo + :param target_connection_info: Required. Information for connecting to target. + :type target_connection_info: ~azure.mgmt.datamigration.models.SqlConnectionInfo + :param selected_databases: Required. Databases to migrate. + :type selected_databases: + list[~azure.mgmt.datamigration.models.MigrateSqlServerSqlDbDatabaseInput] + :param validation_options: Options for enabling various post migration validations. Available + options, + 1.) Data Integrity Check: Performs a checksum based comparison on source and target tables + after the migration to ensure the correctness of the data. + 2.) Schema Validation: Performs a thorough schema comparison between the source and target + tables and provides a list of differences between the source and target database, 3.) Query + Analysis: Executes a set of queries picked up automatically either from the Query Plan Cache or + Query Store and execute them and compares the execution time between the source and target + database. + :type validation_options: ~azure.mgmt.datamigration.models.MigrationValidationOptions + :param started_on: Date and time relative to UTC when the migration was started on. + :type started_on: str + :param encrypted_key_for_secure_fields: encrypted key for secure fields. + :type encrypted_key_for_secure_fields: str + """ + + _validation = { + 'source_connection_info': {'required': True}, + 'target_connection_info': {'required': True}, + 'selected_databases': {'required': True}, + } + + _attribute_map = { + 'source_connection_info': {'key': 'sourceConnectionInfo', 'type': 'SqlConnectionInfo'}, + 'target_connection_info': {'key': 'targetConnectionInfo', 'type': 'SqlConnectionInfo'}, + 'selected_databases': {'key': 'selectedDatabases', 'type': '[MigrateSqlServerSqlDbDatabaseInput]'}, + 'validation_options': {'key': 'validationOptions', 'type': 'MigrationValidationOptions'}, + 'started_on': {'key': 'startedOn', 'type': 'str'}, + 'encrypted_key_for_secure_fields': {'key': 'encryptedKeyForSecureFields', 'type': 'str'}, + } + + def __init__( + self, + *, + source_connection_info: "SqlConnectionInfo", + target_connection_info: "SqlConnectionInfo", + selected_databases: List["MigrateSqlServerSqlDbDatabaseInput"], + validation_options: Optional["MigrationValidationOptions"] = None, + started_on: Optional[str] = None, + encrypted_key_for_secure_fields: Optional[str] = None, + **kwargs + ): + super(MigrateSqlServerSqlDbTaskInput, self).__init__(source_connection_info=source_connection_info, target_connection_info=target_connection_info, **kwargs) + self.selected_databases = selected_databases + self.validation_options = validation_options + self.started_on = started_on + self.encrypted_key_for_secure_fields = encrypted_key_for_secure_fields + + +class MigrateSqlServerSqlDbTaskOutput(msrest.serialization.Model): + """Output for the task that migrates on-prem SQL Server databases to Azure SQL Database. + + You probably want to use the sub-classes and not this class directly. Known + sub-classes are: MigrateSqlServerSqlDbTaskOutputDatabaseLevel, MigrateSqlServerSqlDbTaskOutputError, MigrateSqlServerSqlDbTaskOutputDatabaseLevelValidationResult, MigrateSqlServerSqlDbTaskOutputMigrationLevel, MigrateSqlServerSqlDbTaskOutputValidationResult, MigrateSqlServerSqlDbTaskOutputTableLevel. + + Variables are only populated by the server, and will be ignored when sending a request. + + All required parameters must be populated in order to send to Azure. + + :ivar id: Result identifier. + :vartype id: str + :param result_type: Required. Result type.Constant filled by server. + :type result_type: str + """ + + _validation = { + 'id': {'readonly': True}, + 'result_type': {'required': True}, + } + + _attribute_map = { + 'id': {'key': 'id', 'type': 'str'}, + 'result_type': {'key': 'resultType', 'type': 'str'}, + } + + _subtype_map = { + 'result_type': {'DatabaseLevelOutput': 'MigrateSqlServerSqlDbTaskOutputDatabaseLevel', 'ErrorOutput': 'MigrateSqlServerSqlDbTaskOutputError', 'MigrationDatabaseLevelValidationOutput': 'MigrateSqlServerSqlDbTaskOutputDatabaseLevelValidationResult', 'MigrationLevelOutput': 'MigrateSqlServerSqlDbTaskOutputMigrationLevel', 'MigrationValidationOutput': 'MigrateSqlServerSqlDbTaskOutputValidationResult', 'TableLevelOutput': 'MigrateSqlServerSqlDbTaskOutputTableLevel'} + } + + def __init__( + self, + **kwargs + ): + super(MigrateSqlServerSqlDbTaskOutput, self).__init__(**kwargs) + self.id = None + self.result_type = None # type: Optional[str] + + +class MigrateSqlServerSqlDbTaskOutputDatabaseLevel(MigrateSqlServerSqlDbTaskOutput): + """MigrateSqlServerSqlDbTaskOutputDatabaseLevel. + + Variables are only populated by the server, and will be ignored when sending a request. + + All required parameters must be populated in order to send to Azure. + + :ivar id: Result identifier. + :vartype id: str + :param result_type: Required. Result type.Constant filled by server. + :type result_type: str + :ivar database_name: Name of the item. + :vartype database_name: str + :ivar started_on: Migration start time. + :vartype started_on: ~datetime.datetime + :ivar ended_on: Migration end time. + :vartype ended_on: ~datetime.datetime + :ivar state: Current state of migration. Possible values include: "None", "InProgress", + "Failed", "Warning", "Completed", "Skipped", "Stopped". + :vartype state: str or ~azure.mgmt.datamigration.models.MigrationState + :ivar stage: Migration stage that this database is in. Possible values include: "None", + "Initialize", "Backup", "FileCopy", "Restore", "Completed". + :vartype stage: str or ~azure.mgmt.datamigration.models.DatabaseMigrationStage + :ivar status_message: Status message. + :vartype status_message: str + :ivar message: Migration progress message. + :vartype message: str + :ivar number_of_objects: Number of objects. + :vartype number_of_objects: long + :ivar number_of_objects_completed: Number of successfully completed objects. + :vartype number_of_objects_completed: long + :ivar error_count: Number of database/object errors. + :vartype error_count: long + :ivar error_prefix: Wildcard string prefix to use for querying all errors of the item. + :vartype error_prefix: str + :ivar result_prefix: Wildcard string prefix to use for querying all sub-tem results of the + item. + :vartype result_prefix: str + :ivar exceptions_and_warnings: Migration exceptions and warnings. + :vartype exceptions_and_warnings: list[~azure.mgmt.datamigration.models.ReportableException] + :ivar object_summary: Summary of object results in the migration. + :vartype object_summary: str + """ + + _validation = { + 'id': {'readonly': True}, + 'result_type': {'required': True}, + 'database_name': {'readonly': True}, + 'started_on': {'readonly': True}, + 'ended_on': {'readonly': True}, + 'state': {'readonly': True}, + 'stage': {'readonly': True}, + 'status_message': {'readonly': True}, + 'message': {'readonly': True}, + 'number_of_objects': {'readonly': True}, + 'number_of_objects_completed': {'readonly': True}, + 'error_count': {'readonly': True}, + 'error_prefix': {'readonly': True}, + 'result_prefix': {'readonly': True}, + 'exceptions_and_warnings': {'readonly': True}, + 'object_summary': {'readonly': True}, + } + + _attribute_map = { + 'id': {'key': 'id', 'type': 'str'}, + 'result_type': {'key': 'resultType', 'type': 'str'}, + 'database_name': {'key': 'databaseName', 'type': 'str'}, + 'started_on': {'key': 'startedOn', 'type': 'iso-8601'}, + 'ended_on': {'key': 'endedOn', 'type': 'iso-8601'}, + 'state': {'key': 'state', 'type': 'str'}, + 'stage': {'key': 'stage', 'type': 'str'}, + 'status_message': {'key': 'statusMessage', 'type': 'str'}, + 'message': {'key': 'message', 'type': 'str'}, + 'number_of_objects': {'key': 'numberOfObjects', 'type': 'long'}, + 'number_of_objects_completed': {'key': 'numberOfObjectsCompleted', 'type': 'long'}, + 'error_count': {'key': 'errorCount', 'type': 'long'}, + 'error_prefix': {'key': 'errorPrefix', 'type': 'str'}, + 'result_prefix': {'key': 'resultPrefix', 'type': 'str'}, + 'exceptions_and_warnings': {'key': 'exceptionsAndWarnings', 'type': '[ReportableException]'}, + 'object_summary': {'key': 'objectSummary', 'type': 'str'}, + } + + def __init__( + self, + **kwargs + ): + super(MigrateSqlServerSqlDbTaskOutputDatabaseLevel, self).__init__(**kwargs) + self.result_type = 'DatabaseLevelOutput' # type: str + self.database_name = None + self.started_on = None + self.ended_on = None + self.state = None + self.stage = None + self.status_message = None + self.message = None + self.number_of_objects = None + self.number_of_objects_completed = None + self.error_count = None + self.error_prefix = None + self.result_prefix = None + self.exceptions_and_warnings = None + self.object_summary = None + + +class MigrationValidationDatabaseLevelResult(msrest.serialization.Model): + """Database level validation results. + + Variables are only populated by the server, and will be ignored when sending a request. + + :ivar id: Result identifier. + :vartype id: str + :ivar migration_id: Migration Identifier. + :vartype migration_id: str + :ivar source_database_name: Name of the source database. + :vartype source_database_name: str + :ivar target_database_name: Name of the target database. + :vartype target_database_name: str + :ivar started_on: Validation start time. + :vartype started_on: ~datetime.datetime + :ivar ended_on: Validation end time. + :vartype ended_on: ~datetime.datetime + :ivar data_integrity_validation_result: Provides data integrity validation result between the + source and target tables that are migrated. + :vartype data_integrity_validation_result: + ~azure.mgmt.datamigration.models.DataIntegrityValidationResult + :ivar schema_validation_result: Provides schema comparison result between source and target + database. + :vartype schema_validation_result: + ~azure.mgmt.datamigration.models.SchemaComparisonValidationResult + :ivar query_analysis_validation_result: Results of some of the query execution result between + source and target database. + :vartype query_analysis_validation_result: + ~azure.mgmt.datamigration.models.QueryAnalysisValidationResult + :ivar status: Current status of validation at the database level. Possible values include: + "Default", "NotStarted", "Initialized", "InProgress", "Completed", "CompletedWithIssues", + "Stopped", "Failed". + :vartype status: str or ~azure.mgmt.datamigration.models.ValidationStatus + """ + + _validation = { + 'id': {'readonly': True}, + 'migration_id': {'readonly': True}, + 'source_database_name': {'readonly': True}, + 'target_database_name': {'readonly': True}, + 'started_on': {'readonly': True}, + 'ended_on': {'readonly': True}, + 'data_integrity_validation_result': {'readonly': True}, + 'schema_validation_result': {'readonly': True}, + 'query_analysis_validation_result': {'readonly': True}, + 'status': {'readonly': True}, + } + + _attribute_map = { + 'id': {'key': 'id', 'type': 'str'}, + 'migration_id': {'key': 'migrationId', 'type': 'str'}, + 'source_database_name': {'key': 'sourceDatabaseName', 'type': 'str'}, + 'target_database_name': {'key': 'targetDatabaseName', 'type': 'str'}, + 'started_on': {'key': 'startedOn', 'type': 'iso-8601'}, + 'ended_on': {'key': 'endedOn', 'type': 'iso-8601'}, + 'data_integrity_validation_result': {'key': 'dataIntegrityValidationResult', 'type': 'DataIntegrityValidationResult'}, + 'schema_validation_result': {'key': 'schemaValidationResult', 'type': 'SchemaComparisonValidationResult'}, + 'query_analysis_validation_result': {'key': 'queryAnalysisValidationResult', 'type': 'QueryAnalysisValidationResult'}, + 'status': {'key': 'status', 'type': 'str'}, + } + + def __init__( + self, + **kwargs + ): + super(MigrationValidationDatabaseLevelResult, self).__init__(**kwargs) + self.id = None + self.migration_id = None + self.source_database_name = None + self.target_database_name = None + self.started_on = None + self.ended_on = None + self.data_integrity_validation_result = None + self.schema_validation_result = None + self.query_analysis_validation_result = None + self.status = None + + +class MigrateSqlServerSqlDbTaskOutputDatabaseLevelValidationResult(MigrateSqlServerSqlDbTaskOutput, MigrationValidationDatabaseLevelResult): + """MigrateSqlServerSqlDbTaskOutputDatabaseLevelValidationResult. + + Variables are only populated by the server, and will be ignored when sending a request. + + All required parameters must be populated in order to send to Azure. + + :ivar migration_id: Migration Identifier. + :vartype migration_id: str + :ivar source_database_name: Name of the source database. + :vartype source_database_name: str + :ivar target_database_name: Name of the target database. + :vartype target_database_name: str + :ivar started_on: Validation start time. + :vartype started_on: ~datetime.datetime + :ivar ended_on: Validation end time. + :vartype ended_on: ~datetime.datetime + :ivar data_integrity_validation_result: Provides data integrity validation result between the + source and target tables that are migrated. + :vartype data_integrity_validation_result: + ~azure.mgmt.datamigration.models.DataIntegrityValidationResult + :ivar schema_validation_result: Provides schema comparison result between source and target + database. + :vartype schema_validation_result: + ~azure.mgmt.datamigration.models.SchemaComparisonValidationResult + :ivar query_analysis_validation_result: Results of some of the query execution result between + source and target database. + :vartype query_analysis_validation_result: + ~azure.mgmt.datamigration.models.QueryAnalysisValidationResult + :ivar status: Current status of validation at the database level. Possible values include: + "Default", "NotStarted", "Initialized", "InProgress", "Completed", "CompletedWithIssues", + "Stopped", "Failed". + :vartype status: str or ~azure.mgmt.datamigration.models.ValidationStatus + :ivar id: Result identifier. + :vartype id: str + :param result_type: Required. Result type.Constant filled by server. + :type result_type: str + """ + + _validation = { + 'migration_id': {'readonly': True}, + 'source_database_name': {'readonly': True}, + 'target_database_name': {'readonly': True}, + 'started_on': {'readonly': True}, + 'ended_on': {'readonly': True}, + 'data_integrity_validation_result': {'readonly': True}, + 'schema_validation_result': {'readonly': True}, + 'query_analysis_validation_result': {'readonly': True}, + 'status': {'readonly': True}, + 'id': {'readonly': True}, + 'result_type': {'required': True}, + } + + _attribute_map = { + 'migration_id': {'key': 'migrationId', 'type': 'str'}, + 'source_database_name': {'key': 'sourceDatabaseName', 'type': 'str'}, + 'target_database_name': {'key': 'targetDatabaseName', 'type': 'str'}, + 'started_on': {'key': 'startedOn', 'type': 'iso-8601'}, + 'ended_on': {'key': 'endedOn', 'type': 'iso-8601'}, + 'data_integrity_validation_result': {'key': 'dataIntegrityValidationResult', 'type': 'DataIntegrityValidationResult'}, + 'schema_validation_result': {'key': 'schemaValidationResult', 'type': 'SchemaComparisonValidationResult'}, + 'query_analysis_validation_result': {'key': 'queryAnalysisValidationResult', 'type': 'QueryAnalysisValidationResult'}, + 'status': {'key': 'status', 'type': 'str'}, + 'id': {'key': 'id', 'type': 'str'}, + 'result_type': {'key': 'resultType', 'type': 'str'}, + } + + def __init__( + self, + **kwargs + ): + super(MigrateSqlServerSqlDbTaskOutputDatabaseLevelValidationResult, self).__init__(**kwargs) + self.migration_id = None + self.source_database_name = None + self.target_database_name = None + self.started_on = None + self.ended_on = None + self.data_integrity_validation_result = None + self.schema_validation_result = None + self.query_analysis_validation_result = None + self.status = None + self.result_type = 'MigrationDatabaseLevelValidationOutput' # type: str + self.id = None + self.result_type = 'MigrationDatabaseLevelValidationOutput' # type: str + + +class MigrateSqlServerSqlDbTaskOutputError(MigrateSqlServerSqlDbTaskOutput): + """MigrateSqlServerSqlDbTaskOutputError. + + Variables are only populated by the server, and will be ignored when sending a request. + + All required parameters must be populated in order to send to Azure. + + :ivar id: Result identifier. + :vartype id: str + :param result_type: Required. Result type.Constant filled by server. + :type result_type: str + :ivar error: Migration error. + :vartype error: ~azure.mgmt.datamigration.models.ReportableException + """ + + _validation = { + 'id': {'readonly': True}, + 'result_type': {'required': True}, + 'error': {'readonly': True}, + } + + _attribute_map = { + 'id': {'key': 'id', 'type': 'str'}, + 'result_type': {'key': 'resultType', 'type': 'str'}, + 'error': {'key': 'error', 'type': 'ReportableException'}, + } + + def __init__( + self, + **kwargs + ): + super(MigrateSqlServerSqlDbTaskOutputError, self).__init__(**kwargs) + self.result_type = 'ErrorOutput' # type: str + self.error = None + + +class MigrateSqlServerSqlDbTaskOutputMigrationLevel(MigrateSqlServerSqlDbTaskOutput): + """MigrateSqlServerSqlDbTaskOutputMigrationLevel. + + Variables are only populated by the server, and will be ignored when sending a request. + + All required parameters must be populated in order to send to Azure. + + :ivar id: Result identifier. + :vartype id: str + :param result_type: Required. Result type.Constant filled by server. + :type result_type: str + :ivar started_on: Migration start time. + :vartype started_on: ~datetime.datetime + :ivar ended_on: Migration end time. + :vartype ended_on: ~datetime.datetime + :ivar duration_in_seconds: Duration of task execution in seconds. + :vartype duration_in_seconds: long + :ivar status: Current status of migration. Possible values include: "Default", "Connecting", + "SourceAndTargetSelected", "SelectLogins", "Configured", "Running", "Error", "Stopped", + "Completed", "CompletedWithWarnings". + :vartype status: str or ~azure.mgmt.datamigration.models.MigrationStatus + :ivar status_message: Migration status message. + :vartype status_message: str + :ivar message: Migration progress message. + :vartype message: str + :ivar databases: Selected databases as a map from database name to database id. + :vartype databases: str + :ivar database_summary: Summary of database results in the migration. + :vartype database_summary: str + :param migration_validation_result: Migration Validation Results. + :type migration_validation_result: ~azure.mgmt.datamigration.models.MigrationValidationResult + :param migration_report_result: Migration Report Result, provides unique url for downloading + your migration report. + :type migration_report_result: ~azure.mgmt.datamigration.models.MigrationReportResult + :ivar source_server_version: Source server version. + :vartype source_server_version: str + :ivar source_server_brand_version: Source server brand version. + :vartype source_server_brand_version: str + :ivar target_server_version: Target server version. + :vartype target_server_version: str + :ivar target_server_brand_version: Target server brand version. + :vartype target_server_brand_version: str + :ivar exceptions_and_warnings: Migration exceptions and warnings. + :vartype exceptions_and_warnings: list[~azure.mgmt.datamigration.models.ReportableException] + """ + + _validation = { + 'id': {'readonly': True}, + 'result_type': {'required': True}, + 'started_on': {'readonly': True}, + 'ended_on': {'readonly': True}, + 'duration_in_seconds': {'readonly': True}, + 'status': {'readonly': True}, + 'status_message': {'readonly': True}, + 'message': {'readonly': True}, + 'databases': {'readonly': True}, + 'database_summary': {'readonly': True}, + 'source_server_version': {'readonly': True}, + 'source_server_brand_version': {'readonly': True}, + 'target_server_version': {'readonly': True}, + 'target_server_brand_version': {'readonly': True}, + 'exceptions_and_warnings': {'readonly': True}, + } + + _attribute_map = { + 'id': {'key': 'id', 'type': 'str'}, + 'result_type': {'key': 'resultType', 'type': 'str'}, + 'started_on': {'key': 'startedOn', 'type': 'iso-8601'}, + 'ended_on': {'key': 'endedOn', 'type': 'iso-8601'}, + 'duration_in_seconds': {'key': 'durationInSeconds', 'type': 'long'}, + 'status': {'key': 'status', 'type': 'str'}, + 'status_message': {'key': 'statusMessage', 'type': 'str'}, + 'message': {'key': 'message', 'type': 'str'}, + 'databases': {'key': 'databases', 'type': 'str'}, + 'database_summary': {'key': 'databaseSummary', 'type': 'str'}, + 'migration_validation_result': {'key': 'migrationValidationResult', 'type': 'MigrationValidationResult'}, + 'migration_report_result': {'key': 'migrationReportResult', 'type': 'MigrationReportResult'}, + 'source_server_version': {'key': 'sourceServerVersion', 'type': 'str'}, + 'source_server_brand_version': {'key': 'sourceServerBrandVersion', 'type': 'str'}, + 'target_server_version': {'key': 'targetServerVersion', 'type': 'str'}, + 'target_server_brand_version': {'key': 'targetServerBrandVersion', 'type': 'str'}, + 'exceptions_and_warnings': {'key': 'exceptionsAndWarnings', 'type': '[ReportableException]'}, + } + + def __init__( + self, + *, + migration_validation_result: Optional["MigrationValidationResult"] = None, + migration_report_result: Optional["MigrationReportResult"] = None, + **kwargs + ): + super(MigrateSqlServerSqlDbTaskOutputMigrationLevel, self).__init__(**kwargs) + self.result_type = 'MigrationLevelOutput' # type: str + self.started_on = None + self.ended_on = None + self.duration_in_seconds = None + self.status = None + self.status_message = None + self.message = None + self.databases = None + self.database_summary = None + self.migration_validation_result = migration_validation_result + self.migration_report_result = migration_report_result + self.source_server_version = None + self.source_server_brand_version = None + self.target_server_version = None + self.target_server_brand_version = None + self.exceptions_and_warnings = None + + +class MigrateSqlServerSqlDbTaskOutputTableLevel(MigrateSqlServerSqlDbTaskOutput): + """MigrateSqlServerSqlDbTaskOutputTableLevel. + + Variables are only populated by the server, and will be ignored when sending a request. + + All required parameters must be populated in order to send to Azure. + + :ivar id: Result identifier. + :vartype id: str + :param result_type: Required. Result type.Constant filled by server. + :type result_type: str + :ivar object_name: Name of the item. + :vartype object_name: str + :ivar started_on: Migration start time. + :vartype started_on: ~datetime.datetime + :ivar ended_on: Migration end time. + :vartype ended_on: ~datetime.datetime + :ivar state: Current state of migration. Possible values include: "None", "InProgress", + "Failed", "Warning", "Completed", "Skipped", "Stopped". + :vartype state: str or ~azure.mgmt.datamigration.models.MigrationState + :ivar status_message: Status message. + :vartype status_message: str + :ivar items_count: Number of items. + :vartype items_count: long + :ivar items_completed_count: Number of successfully completed items. + :vartype items_completed_count: long + :ivar error_prefix: Wildcard string prefix to use for querying all errors of the item. + :vartype error_prefix: str + :ivar result_prefix: Wildcard string prefix to use for querying all sub-tem results of the + item. + :vartype result_prefix: str + """ + + _validation = { + 'id': {'readonly': True}, + 'result_type': {'required': True}, + 'object_name': {'readonly': True}, + 'started_on': {'readonly': True}, + 'ended_on': {'readonly': True}, + 'state': {'readonly': True}, + 'status_message': {'readonly': True}, + 'items_count': {'readonly': True}, + 'items_completed_count': {'readonly': True}, + 'error_prefix': {'readonly': True}, + 'result_prefix': {'readonly': True}, + } + + _attribute_map = { + 'id': {'key': 'id', 'type': 'str'}, + 'result_type': {'key': 'resultType', 'type': 'str'}, + 'object_name': {'key': 'objectName', 'type': 'str'}, + 'started_on': {'key': 'startedOn', 'type': 'iso-8601'}, + 'ended_on': {'key': 'endedOn', 'type': 'iso-8601'}, + 'state': {'key': 'state', 'type': 'str'}, + 'status_message': {'key': 'statusMessage', 'type': 'str'}, + 'items_count': {'key': 'itemsCount', 'type': 'long'}, + 'items_completed_count': {'key': 'itemsCompletedCount', 'type': 'long'}, + 'error_prefix': {'key': 'errorPrefix', 'type': 'str'}, + 'result_prefix': {'key': 'resultPrefix', 'type': 'str'}, + } + + def __init__( + self, + **kwargs + ): + super(MigrateSqlServerSqlDbTaskOutputTableLevel, self).__init__(**kwargs) + self.result_type = 'TableLevelOutput' # type: str + self.object_name = None + self.started_on = None + self.ended_on = None + self.state = None + self.status_message = None + self.items_count = None + self.items_completed_count = None + self.error_prefix = None + self.result_prefix = None + + +class MigrationValidationResult(msrest.serialization.Model): + """Migration Validation Result. + + Variables are only populated by the server, and will be ignored when sending a request. + + :ivar id: Migration validation result identifier. + :vartype id: str + :ivar migration_id: Migration Identifier. + :vartype migration_id: str + :param summary_results: Validation summary results for each database. + :type summary_results: dict[str, + ~azure.mgmt.datamigration.models.MigrationValidationDatabaseSummaryResult] + :ivar status: Current status of validation at the migration level. Status from the database + validation result status will be aggregated here. Possible values include: "Default", + "NotStarted", "Initialized", "InProgress", "Completed", "CompletedWithIssues", "Stopped", + "Failed". + :vartype status: str or ~azure.mgmt.datamigration.models.ValidationStatus + """ + + _validation = { + 'id': {'readonly': True}, + 'migration_id': {'readonly': True}, + 'status': {'readonly': True}, + } + + _attribute_map = { + 'id': {'key': 'id', 'type': 'str'}, + 'migration_id': {'key': 'migrationId', 'type': 'str'}, + 'summary_results': {'key': 'summaryResults', 'type': '{MigrationValidationDatabaseSummaryResult}'}, + 'status': {'key': 'status', 'type': 'str'}, + } + + def __init__( + self, + *, + summary_results: Optional[Dict[str, "MigrationValidationDatabaseSummaryResult"]] = None, + **kwargs + ): + super(MigrationValidationResult, self).__init__(**kwargs) + self.id = None + self.migration_id = None + self.summary_results = summary_results + self.status = None + + +class MigrateSqlServerSqlDbTaskOutputValidationResult(MigrateSqlServerSqlDbTaskOutput, MigrationValidationResult): + """MigrateSqlServerSqlDbTaskOutputValidationResult. + + Variables are only populated by the server, and will be ignored when sending a request. + + All required parameters must be populated in order to send to Azure. + + :ivar migration_id: Migration Identifier. + :vartype migration_id: str + :param summary_results: Validation summary results for each database. + :type summary_results: dict[str, + ~azure.mgmt.datamigration.models.MigrationValidationDatabaseSummaryResult] + :ivar status: Current status of validation at the migration level. Status from the database + validation result status will be aggregated here. Possible values include: "Default", + "NotStarted", "Initialized", "InProgress", "Completed", "CompletedWithIssues", "Stopped", + "Failed". + :vartype status: str or ~azure.mgmt.datamigration.models.ValidationStatus + :ivar id: Result identifier. + :vartype id: str + :param result_type: Required. Result type.Constant filled by server. + :type result_type: str + """ + + _validation = { + 'migration_id': {'readonly': True}, + 'status': {'readonly': True}, + 'id': {'readonly': True}, + 'result_type': {'required': True}, + } + + _attribute_map = { + 'migration_id': {'key': 'migrationId', 'type': 'str'}, + 'summary_results': {'key': 'summaryResults', 'type': '{MigrationValidationDatabaseSummaryResult}'}, + 'status': {'key': 'status', 'type': 'str'}, + 'id': {'key': 'id', 'type': 'str'}, + 'result_type': {'key': 'resultType', 'type': 'str'}, + } + + def __init__( + self, + *, + summary_results: Optional[Dict[str, "MigrationValidationDatabaseSummaryResult"]] = None, + **kwargs + ): + super(MigrateSqlServerSqlDbTaskOutputValidationResult, self).__init__(summary_results=summary_results, **kwargs) + self.migration_id = None + self.summary_results = summary_results + self.status = None + self.result_type = 'MigrationValidationOutput' # type: str + self.id = None + self.result_type = 'MigrationValidationOutput' # type: str + + +class MigrateSqlServerSqlDbTaskProperties(ProjectTaskProperties): + """Properties for the task that migrates on-prem SQL Server databases to Azure SQL Database. + + Variables are only populated by the server, and will be ignored when sending a request. + + All required parameters must be populated in order to send to Azure. + + :param task_type: Required. Task type.Constant filled by server. Possible values include: + "Connect.MongoDb", "ConnectToSource.SqlServer", "ConnectToSource.SqlServer.Sync", + "ConnectToSource.PostgreSql.Sync", "ConnectToSource.MySql", "ConnectToSource.Oracle.Sync", + "ConnectToTarget.SqlDb", "ConnectToTarget.SqlDb.Sync", + "ConnectToTarget.AzureDbForPostgreSql.Sync", + "ConnectToTarget.Oracle.AzureDbForPostgreSql.Sync", "ConnectToTarget.AzureSqlDbMI", + "ConnectToTarget.AzureSqlDbMI.Sync.LRS", "ConnectToTarget.AzureDbForMySql", + "GetUserTables.Sql", "GetUserTables.AzureSqlDb.Sync", "GetUserTablesOracle", + "GetUserTablesPostgreSql", "GetUserTablesMySql", "Migrate.MongoDb", + "Migrate.SqlServer.AzureSqlDbMI", "Migrate.SqlServer.AzureSqlDbMI.Sync.LRS", + "Migrate.SqlServer.SqlDb", "Migrate.SqlServer.AzureSqlDb.Sync", + "Migrate.MySql.AzureDbForMySql.Sync", "Migrate.MySql.AzureDbForMySql", + "Migrate.PostgreSql.AzureDbForPostgreSql.SyncV2", "Migrate.Oracle.AzureDbForPostgreSql.Sync", + "ValidateMigrationInput.SqlServer.SqlDb.Sync", "ValidateMigrationInput.SqlServer.AzureSqlDbMI", + "ValidateMigrationInput.SqlServer.AzureSqlDbMI.Sync.LRS", "Validate.MongoDb", + "Validate.Oracle.AzureDbPostgreSql.Sync", "GetTDECertificates.Sql", "Migrate.Ssis", + "Service.Check.OCI", "Service.Upload.OCI", "Service.Install.OCI", + "MigrateSchemaSqlServerSqlDb". + :type task_type: str or ~azure.mgmt.datamigration.models.TaskType + :ivar errors: Array of errors. This is ignored if submitted. + :vartype errors: list[~azure.mgmt.datamigration.models.ODataError] + :ivar state: The state of the task. This is ignored if submitted. Possible values include: + "Unknown", "Queued", "Running", "Canceled", "Succeeded", "Failed", "FailedInputValidation", + "Faulted". + :vartype state: str or ~azure.mgmt.datamigration.models.TaskState + :ivar commands: Array of command properties. + :vartype commands: list[~azure.mgmt.datamigration.models.CommandProperties] + :param client_data: Key value pairs of client data to attach meta data information to task. + :type client_data: dict[str, str] + :param input: Task input. + :type input: ~azure.mgmt.datamigration.models.MigrateSqlServerSqlDbTaskInput + :ivar output: Task output. This is ignored if submitted. + :vartype output: list[~azure.mgmt.datamigration.models.MigrateSqlServerSqlDbTaskOutput] + :param task_id: task id. + :type task_id: str + :param is_cloneable: whether the task can be cloned or not. + :type is_cloneable: bool + """ + + _validation = { + 'task_type': {'required': True}, + 'errors': {'readonly': True}, + 'state': {'readonly': True}, + 'commands': {'readonly': True}, + 'output': {'readonly': True}, + } + + _attribute_map = { + 'task_type': {'key': 'taskType', 'type': 'str'}, + 'errors': {'key': 'errors', 'type': '[ODataError]'}, + 'state': {'key': 'state', 'type': 'str'}, + 'commands': {'key': 'commands', 'type': '[CommandProperties]'}, + 'client_data': {'key': 'clientData', 'type': '{str}'}, + 'input': {'key': 'input', 'type': 'MigrateSqlServerSqlDbTaskInput'}, + 'output': {'key': 'output', 'type': '[MigrateSqlServerSqlDbTaskOutput]'}, + 'task_id': {'key': 'taskId', 'type': 'str'}, + 'is_cloneable': {'key': 'isCloneable', 'type': 'bool'}, + } + + def __init__( + self, + *, + client_data: Optional[Dict[str, str]] = None, + input: Optional["MigrateSqlServerSqlDbTaskInput"] = None, + task_id: Optional[str] = None, + is_cloneable: Optional[bool] = None, + **kwargs + ): + super(MigrateSqlServerSqlDbTaskProperties, self).__init__(client_data=client_data, **kwargs) + self.task_type = 'Migrate.SqlServer.SqlDb' # type: str + self.input = input + self.output = None + self.task_id = task_id + self.is_cloneable = is_cloneable + + +class MigrateSqlServerSqlMiDatabaseInput(msrest.serialization.Model): + """Database specific information for SQL to Azure SQL DB Managed Instance migration task inputs. + + All required parameters must be populated in order to send to Azure. + + :param name: Required. Name of the database. + :type name: str + :param restore_database_name: Required. Name of the database at destination. + :type restore_database_name: str + :param backup_file_share: Backup file share information for backing up this database. + :type backup_file_share: ~azure.mgmt.datamigration.models.FileShare + :param backup_file_paths: The list of backup files to be used in case of existing backups. + :type backup_file_paths: list[str] + :param id: id of the database. + :type id: str + """ + + _validation = { + 'name': {'required': True}, + 'restore_database_name': {'required': True}, + } + + _attribute_map = { + 'name': {'key': 'name', 'type': 'str'}, + 'restore_database_name': {'key': 'restoreDatabaseName', 'type': 'str'}, + 'backup_file_share': {'key': 'backupFileShare', 'type': 'FileShare'}, + 'backup_file_paths': {'key': 'backupFilePaths', 'type': '[str]'}, + 'id': {'key': 'id', 'type': 'str'}, + } + + def __init__( + self, + *, + name: str, + restore_database_name: str, + backup_file_share: Optional["FileShare"] = None, + backup_file_paths: Optional[List[str]] = None, + id: Optional[str] = None, + **kwargs + ): + super(MigrateSqlServerSqlMiDatabaseInput, self).__init__(**kwargs) + self.name = name + self.restore_database_name = restore_database_name + self.backup_file_share = backup_file_share + self.backup_file_paths = backup_file_paths + self.id = id + + +class SqlServerSqlMiSyncTaskInput(msrest.serialization.Model): + """Input for task that migrates SQL Server databases to Azure SQL Database Managed Instance online scenario. + + All required parameters must be populated in order to send to Azure. + + :param selected_databases: Required. Databases to migrate. + :type selected_databases: + list[~azure.mgmt.datamigration.models.MigrateSqlServerSqlMiDatabaseInput] + :param backup_file_share: Backup file share information for all selected databases. + :type backup_file_share: ~azure.mgmt.datamigration.models.FileShare + :param storage_resource_id: Required. Fully qualified resourceId of storage. + :type storage_resource_id: str + :param source_connection_info: Required. Connection information for source SQL Server. + :type source_connection_info: ~azure.mgmt.datamigration.models.SqlConnectionInfo + :param target_connection_info: Required. Connection information for Azure SQL Database Managed + Instance. + :type target_connection_info: ~azure.mgmt.datamigration.models.MiSqlConnectionInfo + :param azure_app: Required. Azure Active Directory Application the DMS instance will use to + connect to the target instance of Azure SQL Database Managed Instance and the Azure Storage + Account. + :type azure_app: ~azure.mgmt.datamigration.models.AzureActiveDirectoryApp + """ + + _validation = { + 'selected_databases': {'required': True}, + 'storage_resource_id': {'required': True}, + 'source_connection_info': {'required': True}, + 'target_connection_info': {'required': True}, + 'azure_app': {'required': True}, + } + + _attribute_map = { + 'selected_databases': {'key': 'selectedDatabases', 'type': '[MigrateSqlServerSqlMiDatabaseInput]'}, + 'backup_file_share': {'key': 'backupFileShare', 'type': 'FileShare'}, + 'storage_resource_id': {'key': 'storageResourceId', 'type': 'str'}, + 'source_connection_info': {'key': 'sourceConnectionInfo', 'type': 'SqlConnectionInfo'}, + 'target_connection_info': {'key': 'targetConnectionInfo', 'type': 'MiSqlConnectionInfo'}, + 'azure_app': {'key': 'azureApp', 'type': 'AzureActiveDirectoryApp'}, + } + + def __init__( + self, + *, + selected_databases: List["MigrateSqlServerSqlMiDatabaseInput"], + storage_resource_id: str, + source_connection_info: "SqlConnectionInfo", + target_connection_info: "MiSqlConnectionInfo", + azure_app: "AzureActiveDirectoryApp", + backup_file_share: Optional["FileShare"] = None, + **kwargs + ): + super(SqlServerSqlMiSyncTaskInput, self).__init__(**kwargs) + self.selected_databases = selected_databases + self.backup_file_share = backup_file_share + self.storage_resource_id = storage_resource_id + self.source_connection_info = source_connection_info + self.target_connection_info = target_connection_info + self.azure_app = azure_app + + +class MigrateSqlServerSqlMiSyncTaskInput(SqlServerSqlMiSyncTaskInput): + """Input for task that migrates SQL Server databases to Azure SQL Database Managed Instance online scenario. + + All required parameters must be populated in order to send to Azure. + + :param selected_databases: Required. Databases to migrate. + :type selected_databases: + list[~azure.mgmt.datamigration.models.MigrateSqlServerSqlMiDatabaseInput] + :param backup_file_share: Backup file share information for all selected databases. + :type backup_file_share: ~azure.mgmt.datamigration.models.FileShare + :param storage_resource_id: Required. Fully qualified resourceId of storage. + :type storage_resource_id: str + :param source_connection_info: Required. Connection information for source SQL Server. + :type source_connection_info: ~azure.mgmt.datamigration.models.SqlConnectionInfo + :param target_connection_info: Required. Connection information for Azure SQL Database Managed + Instance. + :type target_connection_info: ~azure.mgmt.datamigration.models.MiSqlConnectionInfo + :param azure_app: Required. Azure Active Directory Application the DMS instance will use to + connect to the target instance of Azure SQL Database Managed Instance and the Azure Storage + Account. + :type azure_app: ~azure.mgmt.datamigration.models.AzureActiveDirectoryApp + """ + + _validation = { + 'selected_databases': {'required': True}, + 'storage_resource_id': {'required': True}, + 'source_connection_info': {'required': True}, + 'target_connection_info': {'required': True}, + 'azure_app': {'required': True}, + } + + _attribute_map = { + 'selected_databases': {'key': 'selectedDatabases', 'type': '[MigrateSqlServerSqlMiDatabaseInput]'}, + 'backup_file_share': {'key': 'backupFileShare', 'type': 'FileShare'}, + 'storage_resource_id': {'key': 'storageResourceId', 'type': 'str'}, + 'source_connection_info': {'key': 'sourceConnectionInfo', 'type': 'SqlConnectionInfo'}, + 'target_connection_info': {'key': 'targetConnectionInfo', 'type': 'MiSqlConnectionInfo'}, + 'azure_app': {'key': 'azureApp', 'type': 'AzureActiveDirectoryApp'}, + } + + def __init__( + self, + *, + selected_databases: List["MigrateSqlServerSqlMiDatabaseInput"], + storage_resource_id: str, + source_connection_info: "SqlConnectionInfo", + target_connection_info: "MiSqlConnectionInfo", + azure_app: "AzureActiveDirectoryApp", + backup_file_share: Optional["FileShare"] = None, + **kwargs + ): + super(MigrateSqlServerSqlMiSyncTaskInput, self).__init__(selected_databases=selected_databases, backup_file_share=backup_file_share, storage_resource_id=storage_resource_id, source_connection_info=source_connection_info, target_connection_info=target_connection_info, azure_app=azure_app, **kwargs) + + +class MigrateSqlServerSqlMiSyncTaskOutput(msrest.serialization.Model): + """Output for task that migrates SQL Server databases to Azure SQL Database Managed Instance using Log Replay Service. + + You probably want to use the sub-classes and not this class directly. Known + sub-classes are: MigrateSqlServerSqlMiSyncTaskOutputDatabaseLevel, MigrateSqlServerSqlMiSyncTaskOutputError, MigrateSqlServerSqlMiSyncTaskOutputMigrationLevel. + + Variables are only populated by the server, and will be ignored when sending a request. + + All required parameters must be populated in order to send to Azure. + + :ivar id: Result identifier. + :vartype id: str + :param result_type: Required. Result type.Constant filled by server. + :type result_type: str + """ + + _validation = { + 'id': {'readonly': True}, + 'result_type': {'required': True}, + } + + _attribute_map = { + 'id': {'key': 'id', 'type': 'str'}, + 'result_type': {'key': 'resultType', 'type': 'str'}, + } + + _subtype_map = { + 'result_type': {'DatabaseLevelOutput': 'MigrateSqlServerSqlMiSyncTaskOutputDatabaseLevel', 'ErrorOutput': 'MigrateSqlServerSqlMiSyncTaskOutputError', 'MigrationLevelOutput': 'MigrateSqlServerSqlMiSyncTaskOutputMigrationLevel'} + } + + def __init__( + self, + **kwargs + ): + super(MigrateSqlServerSqlMiSyncTaskOutput, self).__init__(**kwargs) + self.id = None + self.result_type = None # type: Optional[str] + + +class MigrateSqlServerSqlMiSyncTaskOutputDatabaseLevel(MigrateSqlServerSqlMiSyncTaskOutput): + """MigrateSqlServerSqlMiSyncTaskOutputDatabaseLevel. + + Variables are only populated by the server, and will be ignored when sending a request. + + All required parameters must be populated in order to send to Azure. + + :ivar id: Result identifier. + :vartype id: str + :param result_type: Required. Result type.Constant filled by server. + :type result_type: str + :ivar source_database_name: Name of the database. + :vartype source_database_name: str + :ivar migration_state: Current state of database. Possible values include: "UNDEFINED", + "INITIAL", "FULL_BACKUP_UPLOAD_START", "LOG_SHIPPING_START", "UPLOAD_LOG_FILES_START", + "CUTOVER_START", "POST_CUTOVER_COMPLETE", "COMPLETED", "CANCELLED", "FAILED". + :vartype migration_state: str or ~azure.mgmt.datamigration.models.DatabaseMigrationState + :ivar started_on: Database migration start time. + :vartype started_on: ~datetime.datetime + :ivar ended_on: Database migration end time. + :vartype ended_on: ~datetime.datetime + :ivar full_backup_set_info: Details of full backup set. + :vartype full_backup_set_info: ~azure.mgmt.datamigration.models.BackupSetInfo + :ivar last_restored_backup_set_info: Last applied backup set information. + :vartype last_restored_backup_set_info: ~azure.mgmt.datamigration.models.BackupSetInfo + :ivar active_backup_sets: Backup sets that are currently active (Either being uploaded or + getting restored). + :vartype active_backup_sets: list[~azure.mgmt.datamigration.models.BackupSetInfo] + :ivar container_name: Name of container created in the Azure Storage account where backups are + copied to. + :vartype container_name: str + :ivar error_prefix: prefix string to use for querying errors for this database. + :vartype error_prefix: str + :ivar is_full_backup_restored: Whether full backup has been applied to the target database or + not. + :vartype is_full_backup_restored: bool + :ivar exceptions_and_warnings: Migration exceptions and warnings. + :vartype exceptions_and_warnings: list[~azure.mgmt.datamigration.models.ReportableException] + """ + + _validation = { + 'id': {'readonly': True}, + 'result_type': {'required': True}, + 'source_database_name': {'readonly': True}, + 'migration_state': {'readonly': True}, + 'started_on': {'readonly': True}, + 'ended_on': {'readonly': True}, + 'full_backup_set_info': {'readonly': True}, + 'last_restored_backup_set_info': {'readonly': True}, + 'active_backup_sets': {'readonly': True}, + 'container_name': {'readonly': True}, + 'error_prefix': {'readonly': True}, + 'is_full_backup_restored': {'readonly': True}, + 'exceptions_and_warnings': {'readonly': True}, + } + + _attribute_map = { + 'id': {'key': 'id', 'type': 'str'}, + 'result_type': {'key': 'resultType', 'type': 'str'}, + 'source_database_name': {'key': 'sourceDatabaseName', 'type': 'str'}, + 'migration_state': {'key': 'migrationState', 'type': 'str'}, + 'started_on': {'key': 'startedOn', 'type': 'iso-8601'}, + 'ended_on': {'key': 'endedOn', 'type': 'iso-8601'}, + 'full_backup_set_info': {'key': 'fullBackupSetInfo', 'type': 'BackupSetInfo'}, + 'last_restored_backup_set_info': {'key': 'lastRestoredBackupSetInfo', 'type': 'BackupSetInfo'}, + 'active_backup_sets': {'key': 'activeBackupSets', 'type': '[BackupSetInfo]'}, + 'container_name': {'key': 'containerName', 'type': 'str'}, + 'error_prefix': {'key': 'errorPrefix', 'type': 'str'}, + 'is_full_backup_restored': {'key': 'isFullBackupRestored', 'type': 'bool'}, + 'exceptions_and_warnings': {'key': 'exceptionsAndWarnings', 'type': '[ReportableException]'}, + } + + def __init__( + self, + **kwargs + ): + super(MigrateSqlServerSqlMiSyncTaskOutputDatabaseLevel, self).__init__(**kwargs) + self.result_type = 'DatabaseLevelOutput' # type: str + self.source_database_name = None + self.migration_state = None + self.started_on = None + self.ended_on = None + self.full_backup_set_info = None + self.last_restored_backup_set_info = None + self.active_backup_sets = None + self.container_name = None + self.error_prefix = None + self.is_full_backup_restored = None + self.exceptions_and_warnings = None + + +class MigrateSqlServerSqlMiSyncTaskOutputError(MigrateSqlServerSqlMiSyncTaskOutput): + """MigrateSqlServerSqlMiSyncTaskOutputError. + + Variables are only populated by the server, and will be ignored when sending a request. + + All required parameters must be populated in order to send to Azure. + + :ivar id: Result identifier. + :vartype id: str + :param result_type: Required. Result type.Constant filled by server. + :type result_type: str + :ivar error: Migration error. + :vartype error: ~azure.mgmt.datamigration.models.ReportableException + """ + + _validation = { + 'id': {'readonly': True}, + 'result_type': {'required': True}, + 'error': {'readonly': True}, + } + + _attribute_map = { + 'id': {'key': 'id', 'type': 'str'}, + 'result_type': {'key': 'resultType', 'type': 'str'}, + 'error': {'key': 'error', 'type': 'ReportableException'}, + } + + def __init__( + self, + **kwargs + ): + super(MigrateSqlServerSqlMiSyncTaskOutputError, self).__init__(**kwargs) + self.result_type = 'ErrorOutput' # type: str + self.error = None + + +class MigrateSqlServerSqlMiSyncTaskOutputMigrationLevel(MigrateSqlServerSqlMiSyncTaskOutput): + """MigrateSqlServerSqlMiSyncTaskOutputMigrationLevel. + + Variables are only populated by the server, and will be ignored when sending a request. + + All required parameters must be populated in order to send to Azure. + + :ivar id: Result identifier. + :vartype id: str + :param result_type: Required. Result type.Constant filled by server. + :type result_type: str + :ivar database_count: Count of databases. + :vartype database_count: int + :ivar state: Current state of migration. Possible values include: "None", "InProgress", + "Failed", "Warning", "Completed", "Skipped", "Stopped". + :vartype state: str or ~azure.mgmt.datamigration.models.MigrationState + :ivar started_on: Migration start time. + :vartype started_on: ~datetime.datetime + :ivar ended_on: Migration end time. + :vartype ended_on: ~datetime.datetime + :ivar source_server_name: Source server name. + :vartype source_server_name: str + :ivar source_server_version: Source server version. + :vartype source_server_version: str + :ivar source_server_brand_version: Source server brand version. + :vartype source_server_brand_version: str + :ivar target_server_name: Target server name. + :vartype target_server_name: str + :ivar target_server_version: Target server version. + :vartype target_server_version: str + :ivar target_server_brand_version: Target server brand version. + :vartype target_server_brand_version: str + :ivar database_error_count: Number of database level errors. + :vartype database_error_count: int + """ + + _validation = { + 'id': {'readonly': True}, + 'result_type': {'required': True}, + 'database_count': {'readonly': True}, + 'state': {'readonly': True}, + 'started_on': {'readonly': True}, + 'ended_on': {'readonly': True}, + 'source_server_name': {'readonly': True}, + 'source_server_version': {'readonly': True}, + 'source_server_brand_version': {'readonly': True}, + 'target_server_name': {'readonly': True}, + 'target_server_version': {'readonly': True}, + 'target_server_brand_version': {'readonly': True}, + 'database_error_count': {'readonly': True}, + } + + _attribute_map = { + 'id': {'key': 'id', 'type': 'str'}, + 'result_type': {'key': 'resultType', 'type': 'str'}, + 'database_count': {'key': 'databaseCount', 'type': 'int'}, + 'state': {'key': 'state', 'type': 'str'}, + 'started_on': {'key': 'startedOn', 'type': 'iso-8601'}, + 'ended_on': {'key': 'endedOn', 'type': 'iso-8601'}, + 'source_server_name': {'key': 'sourceServerName', 'type': 'str'}, + 'source_server_version': {'key': 'sourceServerVersion', 'type': 'str'}, + 'source_server_brand_version': {'key': 'sourceServerBrandVersion', 'type': 'str'}, + 'target_server_name': {'key': 'targetServerName', 'type': 'str'}, + 'target_server_version': {'key': 'targetServerVersion', 'type': 'str'}, + 'target_server_brand_version': {'key': 'targetServerBrandVersion', 'type': 'str'}, + 'database_error_count': {'key': 'databaseErrorCount', 'type': 'int'}, + } + + def __init__( + self, + **kwargs + ): + super(MigrateSqlServerSqlMiSyncTaskOutputMigrationLevel, self).__init__(**kwargs) + self.result_type = 'MigrationLevelOutput' # type: str + self.database_count = None + self.state = None + self.started_on = None + self.ended_on = None + self.source_server_name = None + self.source_server_version = None + self.source_server_brand_version = None + self.target_server_name = None + self.target_server_version = None + self.target_server_brand_version = None + self.database_error_count = None + + +class MigrateSqlServerSqlMiSyncTaskProperties(ProjectTaskProperties): + """Properties for task that migrates SQL Server databases to Azure SQL Database Managed Instance sync scenario. + + Variables are only populated by the server, and will be ignored when sending a request. + + All required parameters must be populated in order to send to Azure. + + :param task_type: Required. Task type.Constant filled by server. Possible values include: + "Connect.MongoDb", "ConnectToSource.SqlServer", "ConnectToSource.SqlServer.Sync", + "ConnectToSource.PostgreSql.Sync", "ConnectToSource.MySql", "ConnectToSource.Oracle.Sync", + "ConnectToTarget.SqlDb", "ConnectToTarget.SqlDb.Sync", + "ConnectToTarget.AzureDbForPostgreSql.Sync", + "ConnectToTarget.Oracle.AzureDbForPostgreSql.Sync", "ConnectToTarget.AzureSqlDbMI", + "ConnectToTarget.AzureSqlDbMI.Sync.LRS", "ConnectToTarget.AzureDbForMySql", + "GetUserTables.Sql", "GetUserTables.AzureSqlDb.Sync", "GetUserTablesOracle", + "GetUserTablesPostgreSql", "GetUserTablesMySql", "Migrate.MongoDb", + "Migrate.SqlServer.AzureSqlDbMI", "Migrate.SqlServer.AzureSqlDbMI.Sync.LRS", + "Migrate.SqlServer.SqlDb", "Migrate.SqlServer.AzureSqlDb.Sync", + "Migrate.MySql.AzureDbForMySql.Sync", "Migrate.MySql.AzureDbForMySql", + "Migrate.PostgreSql.AzureDbForPostgreSql.SyncV2", "Migrate.Oracle.AzureDbForPostgreSql.Sync", + "ValidateMigrationInput.SqlServer.SqlDb.Sync", "ValidateMigrationInput.SqlServer.AzureSqlDbMI", + "ValidateMigrationInput.SqlServer.AzureSqlDbMI.Sync.LRS", "Validate.MongoDb", + "Validate.Oracle.AzureDbPostgreSql.Sync", "GetTDECertificates.Sql", "Migrate.Ssis", + "Service.Check.OCI", "Service.Upload.OCI", "Service.Install.OCI", + "MigrateSchemaSqlServerSqlDb". + :type task_type: str or ~azure.mgmt.datamigration.models.TaskType + :ivar errors: Array of errors. This is ignored if submitted. + :vartype errors: list[~azure.mgmt.datamigration.models.ODataError] + :ivar state: The state of the task. This is ignored if submitted. Possible values include: + "Unknown", "Queued", "Running", "Canceled", "Succeeded", "Failed", "FailedInputValidation", + "Faulted". + :vartype state: str or ~azure.mgmt.datamigration.models.TaskState + :ivar commands: Array of command properties. + :vartype commands: list[~azure.mgmt.datamigration.models.CommandProperties] + :param client_data: Key value pairs of client data to attach meta data information to task. + :type client_data: dict[str, str] + :param input: Task input. + :type input: ~azure.mgmt.datamigration.models.SqlServerSqlMiSyncTaskInput + :ivar output: Task output. This is ignored if submitted. + :vartype output: list[~azure.mgmt.datamigration.models.MigrateSqlServerSqlMiSyncTaskOutput] + """ + + _validation = { + 'task_type': {'required': True}, + 'errors': {'readonly': True}, + 'state': {'readonly': True}, + 'commands': {'readonly': True}, + 'output': {'readonly': True}, + } + + _attribute_map = { + 'task_type': {'key': 'taskType', 'type': 'str'}, + 'errors': {'key': 'errors', 'type': '[ODataError]'}, + 'state': {'key': 'state', 'type': 'str'}, + 'commands': {'key': 'commands', 'type': '[CommandProperties]'}, + 'client_data': {'key': 'clientData', 'type': '{str}'}, + 'input': {'key': 'input', 'type': 'SqlServerSqlMiSyncTaskInput'}, + 'output': {'key': 'output', 'type': '[MigrateSqlServerSqlMiSyncTaskOutput]'}, + } + + def __init__( + self, + *, + client_data: Optional[Dict[str, str]] = None, + input: Optional["SqlServerSqlMiSyncTaskInput"] = None, + **kwargs + ): + super(MigrateSqlServerSqlMiSyncTaskProperties, self).__init__(client_data=client_data, **kwargs) + self.task_type = 'Migrate.SqlServer.AzureSqlDbMI.Sync.LRS' # type: str + self.input = input + self.output = None + + +class MigrateSqlServerSqlMiTaskInput(SqlMigrationTaskInput): + """Input for task that migrates SQL Server databases to Azure SQL Database Managed Instance. + + All required parameters must be populated in order to send to Azure. + + :param source_connection_info: Required. Information for connecting to source. + :type source_connection_info: ~azure.mgmt.datamigration.models.SqlConnectionInfo + :param target_connection_info: Required. Information for connecting to target. + :type target_connection_info: ~azure.mgmt.datamigration.models.SqlConnectionInfo + :param selected_databases: Required. Databases to migrate. + :type selected_databases: + list[~azure.mgmt.datamigration.models.MigrateSqlServerSqlMiDatabaseInput] + :param started_on: Date and time relative to UTC when the migration was started on. + :type started_on: str + :param selected_logins: Logins to migrate. + :type selected_logins: list[str] + :param selected_agent_jobs: Agent Jobs to migrate. + :type selected_agent_jobs: list[str] + :param backup_file_share: Backup file share information for all selected databases. + :type backup_file_share: ~azure.mgmt.datamigration.models.FileShare + :param backup_blob_share: Required. SAS URI of Azure Storage Account Container to be used for + storing backup files. + :type backup_blob_share: ~azure.mgmt.datamigration.models.BlobShare + :param backup_mode: Backup Mode to specify whether to use existing backup or create new backup. + If using existing backups, backup file paths are required to be provided in selectedDatabases. + Possible values include: "CreateBackup", "ExistingBackup". + :type backup_mode: str or ~azure.mgmt.datamigration.models.BackupMode + :param aad_domain_name: Azure Active Directory domain name in the format of 'contoso.com' for + federated Azure AD or 'contoso.onmicrosoft.com' for managed domain, required if and only if + Windows logins are selected. + :type aad_domain_name: str + """ + + _validation = { + 'source_connection_info': {'required': True}, + 'target_connection_info': {'required': True}, + 'selected_databases': {'required': True}, + 'backup_blob_share': {'required': True}, + } + + _attribute_map = { + 'source_connection_info': {'key': 'sourceConnectionInfo', 'type': 'SqlConnectionInfo'}, + 'target_connection_info': {'key': 'targetConnectionInfo', 'type': 'SqlConnectionInfo'}, + 'selected_databases': {'key': 'selectedDatabases', 'type': '[MigrateSqlServerSqlMiDatabaseInput]'}, + 'started_on': {'key': 'startedOn', 'type': 'str'}, + 'selected_logins': {'key': 'selectedLogins', 'type': '[str]'}, + 'selected_agent_jobs': {'key': 'selectedAgentJobs', 'type': '[str]'}, + 'backup_file_share': {'key': 'backupFileShare', 'type': 'FileShare'}, + 'backup_blob_share': {'key': 'backupBlobShare', 'type': 'BlobShare'}, + 'backup_mode': {'key': 'backupMode', 'type': 'str'}, + 'aad_domain_name': {'key': 'aadDomainName', 'type': 'str'}, + } + + def __init__( + self, + *, + source_connection_info: "SqlConnectionInfo", + target_connection_info: "SqlConnectionInfo", + selected_databases: List["MigrateSqlServerSqlMiDatabaseInput"], + backup_blob_share: "BlobShare", + started_on: Optional[str] = None, + selected_logins: Optional[List[str]] = None, + selected_agent_jobs: Optional[List[str]] = None, + backup_file_share: Optional["FileShare"] = None, + backup_mode: Optional[Union[str, "BackupMode"]] = None, + aad_domain_name: Optional[str] = None, + **kwargs + ): + super(MigrateSqlServerSqlMiTaskInput, self).__init__(source_connection_info=source_connection_info, target_connection_info=target_connection_info, **kwargs) + self.selected_databases = selected_databases + self.started_on = started_on + self.selected_logins = selected_logins + self.selected_agent_jobs = selected_agent_jobs + self.backup_file_share = backup_file_share + self.backup_blob_share = backup_blob_share + self.backup_mode = backup_mode + self.aad_domain_name = aad_domain_name + + +class MigrateSqlServerSqlMiTaskOutput(msrest.serialization.Model): + """Output for task that migrates SQL Server databases to Azure SQL Database Managed Instance. + + You probably want to use the sub-classes and not this class directly. Known + sub-classes are: MigrateSqlServerSqlMiTaskOutputAgentJobLevel, MigrateSqlServerSqlMiTaskOutputDatabaseLevel, MigrateSqlServerSqlMiTaskOutputError, MigrateSqlServerSqlMiTaskOutputLoginLevel, MigrateSqlServerSqlMiTaskOutputMigrationLevel. + + Variables are only populated by the server, and will be ignored when sending a request. + + All required parameters must be populated in order to send to Azure. + + :ivar id: Result identifier. + :vartype id: str + :param result_type: Required. Result type.Constant filled by server. + :type result_type: str + """ + + _validation = { + 'id': {'readonly': True}, + 'result_type': {'required': True}, + } + + _attribute_map = { + 'id': {'key': 'id', 'type': 'str'}, + 'result_type': {'key': 'resultType', 'type': 'str'}, + } + + _subtype_map = { + 'result_type': {'AgentJobLevelOutput': 'MigrateSqlServerSqlMiTaskOutputAgentJobLevel', 'DatabaseLevelOutput': 'MigrateSqlServerSqlMiTaskOutputDatabaseLevel', 'ErrorOutput': 'MigrateSqlServerSqlMiTaskOutputError', 'LoginLevelOutput': 'MigrateSqlServerSqlMiTaskOutputLoginLevel', 'MigrationLevelOutput': 'MigrateSqlServerSqlMiTaskOutputMigrationLevel'} + } + + def __init__( + self, + **kwargs + ): + super(MigrateSqlServerSqlMiTaskOutput, self).__init__(**kwargs) + self.id = None + self.result_type = None # type: Optional[str] + + +class MigrateSqlServerSqlMiTaskOutputAgentJobLevel(MigrateSqlServerSqlMiTaskOutput): + """MigrateSqlServerSqlMiTaskOutputAgentJobLevel. + + Variables are only populated by the server, and will be ignored when sending a request. + + All required parameters must be populated in order to send to Azure. + + :ivar id: Result identifier. + :vartype id: str + :param result_type: Required. Result type.Constant filled by server. + :type result_type: str + :ivar name: Agent Job name. + :vartype name: str + :ivar is_enabled: The state of the original Agent Job. + :vartype is_enabled: bool + :ivar state: Current state of migration. Possible values include: "None", "InProgress", + "Failed", "Warning", "Completed", "Skipped", "Stopped". + :vartype state: str or ~azure.mgmt.datamigration.models.MigrationState + :ivar started_on: Migration start time. + :vartype started_on: ~datetime.datetime + :ivar ended_on: Migration end time. + :vartype ended_on: ~datetime.datetime + :ivar message: Migration progress message. + :vartype message: str + :ivar exceptions_and_warnings: Migration errors and warnings per job. + :vartype exceptions_and_warnings: list[~azure.mgmt.datamigration.models.ReportableException] + """ + + _validation = { + 'id': {'readonly': True}, + 'result_type': {'required': True}, + 'name': {'readonly': True}, + 'is_enabled': {'readonly': True}, + 'state': {'readonly': True}, + 'started_on': {'readonly': True}, + 'ended_on': {'readonly': True}, + 'message': {'readonly': True}, + 'exceptions_and_warnings': {'readonly': True}, + } + + _attribute_map = { + 'id': {'key': 'id', 'type': 'str'}, + 'result_type': {'key': 'resultType', 'type': 'str'}, + 'name': {'key': 'name', 'type': 'str'}, + 'is_enabled': {'key': 'isEnabled', 'type': 'bool'}, + 'state': {'key': 'state', 'type': 'str'}, + 'started_on': {'key': 'startedOn', 'type': 'iso-8601'}, + 'ended_on': {'key': 'endedOn', 'type': 'iso-8601'}, + 'message': {'key': 'message', 'type': 'str'}, + 'exceptions_and_warnings': {'key': 'exceptionsAndWarnings', 'type': '[ReportableException]'}, + } + + def __init__( + self, + **kwargs + ): + super(MigrateSqlServerSqlMiTaskOutputAgentJobLevel, self).__init__(**kwargs) + self.result_type = 'AgentJobLevelOutput' # type: str + self.name = None + self.is_enabled = None + self.state = None + self.started_on = None + self.ended_on = None + self.message = None + self.exceptions_and_warnings = None + + +class MigrateSqlServerSqlMiTaskOutputDatabaseLevel(MigrateSqlServerSqlMiTaskOutput): + """MigrateSqlServerSqlMiTaskOutputDatabaseLevel. + + Variables are only populated by the server, and will be ignored when sending a request. + + All required parameters must be populated in order to send to Azure. + + :ivar id: Result identifier. + :vartype id: str + :param result_type: Required. Result type.Constant filled by server. + :type result_type: str + :ivar database_name: Name of the database. + :vartype database_name: str + :ivar size_mb: Size of the database in megabytes. + :vartype size_mb: float + :ivar state: Current state of migration. Possible values include: "None", "InProgress", + "Failed", "Warning", "Completed", "Skipped", "Stopped". + :vartype state: str or ~azure.mgmt.datamigration.models.MigrationState + :ivar stage: Current stage of migration. Possible values include: "None", "Initialize", + "Backup", "FileCopy", "Restore", "Completed". + :vartype stage: str or ~azure.mgmt.datamigration.models.DatabaseMigrationStage + :ivar started_on: Migration start time. + :vartype started_on: ~datetime.datetime + :ivar ended_on: Migration end time. + :vartype ended_on: ~datetime.datetime + :ivar message: Migration progress message. + :vartype message: str + :ivar exceptions_and_warnings: Migration exceptions and warnings. + :vartype exceptions_and_warnings: list[~azure.mgmt.datamigration.models.ReportableException] + """ + + _validation = { + 'id': {'readonly': True}, + 'result_type': {'required': True}, + 'database_name': {'readonly': True}, + 'size_mb': {'readonly': True}, + 'state': {'readonly': True}, + 'stage': {'readonly': True}, + 'started_on': {'readonly': True}, + 'ended_on': {'readonly': True}, + 'message': {'readonly': True}, + 'exceptions_and_warnings': {'readonly': True}, + } + + _attribute_map = { + 'id': {'key': 'id', 'type': 'str'}, + 'result_type': {'key': 'resultType', 'type': 'str'}, + 'database_name': {'key': 'databaseName', 'type': 'str'}, + 'size_mb': {'key': 'sizeMB', 'type': 'float'}, + 'state': {'key': 'state', 'type': 'str'}, + 'stage': {'key': 'stage', 'type': 'str'}, + 'started_on': {'key': 'startedOn', 'type': 'iso-8601'}, + 'ended_on': {'key': 'endedOn', 'type': 'iso-8601'}, + 'message': {'key': 'message', 'type': 'str'}, + 'exceptions_and_warnings': {'key': 'exceptionsAndWarnings', 'type': '[ReportableException]'}, + } + + def __init__( + self, + **kwargs + ): + super(MigrateSqlServerSqlMiTaskOutputDatabaseLevel, self).__init__(**kwargs) + self.result_type = 'DatabaseLevelOutput' # type: str + self.database_name = None + self.size_mb = None + self.state = None + self.stage = None + self.started_on = None + self.ended_on = None + self.message = None + self.exceptions_and_warnings = None + + +class MigrateSqlServerSqlMiTaskOutputError(MigrateSqlServerSqlMiTaskOutput): + """MigrateSqlServerSqlMiTaskOutputError. + + Variables are only populated by the server, and will be ignored when sending a request. + + All required parameters must be populated in order to send to Azure. + + :ivar id: Result identifier. + :vartype id: str + :param result_type: Required. Result type.Constant filled by server. + :type result_type: str + :ivar error: Migration error. + :vartype error: ~azure.mgmt.datamigration.models.ReportableException + """ + + _validation = { + 'id': {'readonly': True}, + 'result_type': {'required': True}, + 'error': {'readonly': True}, + } + + _attribute_map = { + 'id': {'key': 'id', 'type': 'str'}, + 'result_type': {'key': 'resultType', 'type': 'str'}, + 'error': {'key': 'error', 'type': 'ReportableException'}, + } + + def __init__( + self, + **kwargs + ): + super(MigrateSqlServerSqlMiTaskOutputError, self).__init__(**kwargs) + self.result_type = 'ErrorOutput' # type: str + self.error = None + + +class MigrateSqlServerSqlMiTaskOutputLoginLevel(MigrateSqlServerSqlMiTaskOutput): + """MigrateSqlServerSqlMiTaskOutputLoginLevel. + + Variables are only populated by the server, and will be ignored when sending a request. + + All required parameters must be populated in order to send to Azure. + + :ivar id: Result identifier. + :vartype id: str + :param result_type: Required. Result type.Constant filled by server. + :type result_type: str + :ivar login_name: Login name. + :vartype login_name: str + :ivar state: Current state of login. Possible values include: "None", "InProgress", "Failed", + "Warning", "Completed", "Skipped", "Stopped". + :vartype state: str or ~azure.mgmt.datamigration.models.MigrationState + :ivar stage: Current stage of login. Possible values include: "None", "Initialize", + "LoginMigration", "EstablishUserMapping", "AssignRoleMembership", "AssignRoleOwnership", + "EstablishServerPermissions", "EstablishObjectPermissions", "Completed". + :vartype stage: str or ~azure.mgmt.datamigration.models.LoginMigrationStage + :ivar started_on: Login migration start time. + :vartype started_on: ~datetime.datetime + :ivar ended_on: Login migration end time. + :vartype ended_on: ~datetime.datetime + :ivar message: Login migration progress message. + :vartype message: str + :ivar exceptions_and_warnings: Login migration errors and warnings per login. + :vartype exceptions_and_warnings: list[~azure.mgmt.datamigration.models.ReportableException] + """ + + _validation = { + 'id': {'readonly': True}, + 'result_type': {'required': True}, + 'login_name': {'readonly': True}, + 'state': {'readonly': True}, + 'stage': {'readonly': True}, + 'started_on': {'readonly': True}, + 'ended_on': {'readonly': True}, + 'message': {'readonly': True}, + 'exceptions_and_warnings': {'readonly': True}, + } + + _attribute_map = { + 'id': {'key': 'id', 'type': 'str'}, + 'result_type': {'key': 'resultType', 'type': 'str'}, + 'login_name': {'key': 'loginName', 'type': 'str'}, + 'state': {'key': 'state', 'type': 'str'}, + 'stage': {'key': 'stage', 'type': 'str'}, + 'started_on': {'key': 'startedOn', 'type': 'iso-8601'}, + 'ended_on': {'key': 'endedOn', 'type': 'iso-8601'}, + 'message': {'key': 'message', 'type': 'str'}, + 'exceptions_and_warnings': {'key': 'exceptionsAndWarnings', 'type': '[ReportableException]'}, + } + + def __init__( + self, + **kwargs + ): + super(MigrateSqlServerSqlMiTaskOutputLoginLevel, self).__init__(**kwargs) + self.result_type = 'LoginLevelOutput' # type: str + self.login_name = None + self.state = None + self.stage = None + self.started_on = None + self.ended_on = None + self.message = None + self.exceptions_and_warnings = None + + +class MigrateSqlServerSqlMiTaskOutputMigrationLevel(MigrateSqlServerSqlMiTaskOutput): + """MigrateSqlServerSqlMiTaskOutputMigrationLevel. + + Variables are only populated by the server, and will be ignored when sending a request. + + All required parameters must be populated in order to send to Azure. + + :ivar id: Result identifier. + :vartype id: str + :param result_type: Required. Result type.Constant filled by server. + :type result_type: str + :ivar started_on: Migration start time. + :vartype started_on: ~datetime.datetime + :ivar ended_on: Migration end time. + :vartype ended_on: ~datetime.datetime + :ivar status: Current status of migration. Possible values include: "Default", "Connecting", + "SourceAndTargetSelected", "SelectLogins", "Configured", "Running", "Error", "Stopped", + "Completed", "CompletedWithWarnings". + :vartype status: str or ~azure.mgmt.datamigration.models.MigrationStatus + :ivar state: Current state of migration. Possible values include: "None", "InProgress", + "Failed", "Warning", "Completed", "Skipped", "Stopped". + :vartype state: str or ~azure.mgmt.datamigration.models.MigrationState + :ivar agent_jobs: Selected agent jobs as a map from name to id. + :vartype agent_jobs: str + :ivar logins: Selected logins as a map from name to id. + :vartype logins: str + :ivar message: Migration progress message. + :vartype message: str + :ivar server_role_results: Map of server role migration results. + :vartype server_role_results: str + :ivar orphaned_users_info: List of orphaned users. + :vartype orphaned_users_info: list[~azure.mgmt.datamigration.models.OrphanedUserInfo] + :ivar databases: Selected databases as a map from database name to database id. + :vartype databases: str + :ivar source_server_version: Source server version. + :vartype source_server_version: str + :ivar source_server_brand_version: Source server brand version. + :vartype source_server_brand_version: str + :ivar target_server_version: Target server version. + :vartype target_server_version: str + :ivar target_server_brand_version: Target server brand version. + :vartype target_server_brand_version: str + :ivar exceptions_and_warnings: Migration exceptions and warnings. + :vartype exceptions_and_warnings: list[~azure.mgmt.datamigration.models.ReportableException] + """ + + _validation = { + 'id': {'readonly': True}, + 'result_type': {'required': True}, + 'started_on': {'readonly': True}, + 'ended_on': {'readonly': True}, + 'status': {'readonly': True}, + 'state': {'readonly': True}, + 'agent_jobs': {'readonly': True}, + 'logins': {'readonly': True}, + 'message': {'readonly': True}, + 'server_role_results': {'readonly': True}, + 'orphaned_users_info': {'readonly': True}, + 'databases': {'readonly': True}, + 'source_server_version': {'readonly': True}, + 'source_server_brand_version': {'readonly': True}, + 'target_server_version': {'readonly': True}, + 'target_server_brand_version': {'readonly': True}, + 'exceptions_and_warnings': {'readonly': True}, + } + + _attribute_map = { + 'id': {'key': 'id', 'type': 'str'}, + 'result_type': {'key': 'resultType', 'type': 'str'}, + 'started_on': {'key': 'startedOn', 'type': 'iso-8601'}, + 'ended_on': {'key': 'endedOn', 'type': 'iso-8601'}, + 'status': {'key': 'status', 'type': 'str'}, + 'state': {'key': 'state', 'type': 'str'}, + 'agent_jobs': {'key': 'agentJobs', 'type': 'str'}, + 'logins': {'key': 'logins', 'type': 'str'}, + 'message': {'key': 'message', 'type': 'str'}, + 'server_role_results': {'key': 'serverRoleResults', 'type': 'str'}, + 'orphaned_users_info': {'key': 'orphanedUsersInfo', 'type': '[OrphanedUserInfo]'}, + 'databases': {'key': 'databases', 'type': 'str'}, + 'source_server_version': {'key': 'sourceServerVersion', 'type': 'str'}, + 'source_server_brand_version': {'key': 'sourceServerBrandVersion', 'type': 'str'}, + 'target_server_version': {'key': 'targetServerVersion', 'type': 'str'}, + 'target_server_brand_version': {'key': 'targetServerBrandVersion', 'type': 'str'}, + 'exceptions_and_warnings': {'key': 'exceptionsAndWarnings', 'type': '[ReportableException]'}, + } + + def __init__( + self, + **kwargs + ): + super(MigrateSqlServerSqlMiTaskOutputMigrationLevel, self).__init__(**kwargs) + self.result_type = 'MigrationLevelOutput' # type: str + self.started_on = None + self.ended_on = None + self.status = None + self.state = None + self.agent_jobs = None + self.logins = None + self.message = None + self.server_role_results = None + self.orphaned_users_info = None + self.databases = None + self.source_server_version = None + self.source_server_brand_version = None + self.target_server_version = None + self.target_server_brand_version = None + self.exceptions_and_warnings = None + + +class MigrateSqlServerSqlMiTaskProperties(ProjectTaskProperties): + """Properties for task that migrates SQL Server databases to Azure SQL Database Managed Instance. + + Variables are only populated by the server, and will be ignored when sending a request. + + All required parameters must be populated in order to send to Azure. + + :param task_type: Required. Task type.Constant filled by server. Possible values include: + "Connect.MongoDb", "ConnectToSource.SqlServer", "ConnectToSource.SqlServer.Sync", + "ConnectToSource.PostgreSql.Sync", "ConnectToSource.MySql", "ConnectToSource.Oracle.Sync", + "ConnectToTarget.SqlDb", "ConnectToTarget.SqlDb.Sync", + "ConnectToTarget.AzureDbForPostgreSql.Sync", + "ConnectToTarget.Oracle.AzureDbForPostgreSql.Sync", "ConnectToTarget.AzureSqlDbMI", + "ConnectToTarget.AzureSqlDbMI.Sync.LRS", "ConnectToTarget.AzureDbForMySql", + "GetUserTables.Sql", "GetUserTables.AzureSqlDb.Sync", "GetUserTablesOracle", + "GetUserTablesPostgreSql", "GetUserTablesMySql", "Migrate.MongoDb", + "Migrate.SqlServer.AzureSqlDbMI", "Migrate.SqlServer.AzureSqlDbMI.Sync.LRS", + "Migrate.SqlServer.SqlDb", "Migrate.SqlServer.AzureSqlDb.Sync", + "Migrate.MySql.AzureDbForMySql.Sync", "Migrate.MySql.AzureDbForMySql", + "Migrate.PostgreSql.AzureDbForPostgreSql.SyncV2", "Migrate.Oracle.AzureDbForPostgreSql.Sync", + "ValidateMigrationInput.SqlServer.SqlDb.Sync", "ValidateMigrationInput.SqlServer.AzureSqlDbMI", + "ValidateMigrationInput.SqlServer.AzureSqlDbMI.Sync.LRS", "Validate.MongoDb", + "Validate.Oracle.AzureDbPostgreSql.Sync", "GetTDECertificates.Sql", "Migrate.Ssis", + "Service.Check.OCI", "Service.Upload.OCI", "Service.Install.OCI", + "MigrateSchemaSqlServerSqlDb". + :type task_type: str or ~azure.mgmt.datamigration.models.TaskType + :ivar errors: Array of errors. This is ignored if submitted. + :vartype errors: list[~azure.mgmt.datamigration.models.ODataError] + :ivar state: The state of the task. This is ignored if submitted. Possible values include: + "Unknown", "Queued", "Running", "Canceled", "Succeeded", "Failed", "FailedInputValidation", + "Faulted". + :vartype state: str or ~azure.mgmt.datamigration.models.TaskState + :ivar commands: Array of command properties. + :vartype commands: list[~azure.mgmt.datamigration.models.CommandProperties] + :param client_data: Key value pairs of client data to attach meta data information to task. + :type client_data: dict[str, str] + :param input: Task input. + :type input: ~azure.mgmt.datamigration.models.MigrateSqlServerSqlMiTaskInput + :ivar output: Task output. This is ignored if submitted. + :vartype output: list[~azure.mgmt.datamigration.models.MigrateSqlServerSqlMiTaskOutput] + :param task_id: task id. + :type task_id: str + """ + + _validation = { + 'task_type': {'required': True}, + 'errors': {'readonly': True}, + 'state': {'readonly': True}, + 'commands': {'readonly': True}, + 'output': {'readonly': True}, + } + + _attribute_map = { + 'task_type': {'key': 'taskType', 'type': 'str'}, + 'errors': {'key': 'errors', 'type': '[ODataError]'}, + 'state': {'key': 'state', 'type': 'str'}, + 'commands': {'key': 'commands', 'type': '[CommandProperties]'}, + 'client_data': {'key': 'clientData', 'type': '{str}'}, + 'input': {'key': 'input', 'type': 'MigrateSqlServerSqlMiTaskInput'}, + 'output': {'key': 'output', 'type': '[MigrateSqlServerSqlMiTaskOutput]'}, + 'task_id': {'key': 'taskId', 'type': 'str'}, + } + + def __init__( + self, + *, + client_data: Optional[Dict[str, str]] = None, + input: Optional["MigrateSqlServerSqlMiTaskInput"] = None, + task_id: Optional[str] = None, + **kwargs + ): + super(MigrateSqlServerSqlMiTaskProperties, self).__init__(client_data=client_data, **kwargs) + self.task_type = 'Migrate.SqlServer.AzureSqlDbMI' # type: str + self.input = input + self.output = None + self.task_id = task_id + + +class MigrateSsisTaskInput(SqlMigrationTaskInput): + """Input for task that migrates SSIS packages from SQL Server to Azure SQL Database Managed Instance. + + All required parameters must be populated in order to send to Azure. + + :param source_connection_info: Required. Information for connecting to source. + :type source_connection_info: ~azure.mgmt.datamigration.models.SqlConnectionInfo + :param target_connection_info: Required. Information for connecting to target. + :type target_connection_info: ~azure.mgmt.datamigration.models.SqlConnectionInfo + :param ssis_migration_info: Required. SSIS package migration information. + :type ssis_migration_info: ~azure.mgmt.datamigration.models.SsisMigrationInfo + """ + + _validation = { + 'source_connection_info': {'required': True}, + 'target_connection_info': {'required': True}, + 'ssis_migration_info': {'required': True}, + } + + _attribute_map = { + 'source_connection_info': {'key': 'sourceConnectionInfo', 'type': 'SqlConnectionInfo'}, + 'target_connection_info': {'key': 'targetConnectionInfo', 'type': 'SqlConnectionInfo'}, + 'ssis_migration_info': {'key': 'ssisMigrationInfo', 'type': 'SsisMigrationInfo'}, + } + + def __init__( + self, + *, + source_connection_info: "SqlConnectionInfo", + target_connection_info: "SqlConnectionInfo", + ssis_migration_info: "SsisMigrationInfo", + **kwargs + ): + super(MigrateSsisTaskInput, self).__init__(source_connection_info=source_connection_info, target_connection_info=target_connection_info, **kwargs) + self.ssis_migration_info = ssis_migration_info + + +class MigrateSsisTaskOutput(msrest.serialization.Model): + """Output for task that migrates SSIS packages from SQL Server to Azure SQL Database Managed Instance. + + You probably want to use the sub-classes and not this class directly. Known + sub-classes are: MigrateSsisTaskOutputMigrationLevel, MigrateSsisTaskOutputProjectLevel. + + Variables are only populated by the server, and will be ignored when sending a request. + + All required parameters must be populated in order to send to Azure. + + :ivar id: Result identifier. + :vartype id: str + :param result_type: Required. Result type.Constant filled by server. + :type result_type: str + """ + + _validation = { + 'id': {'readonly': True}, + 'result_type': {'required': True}, + } + + _attribute_map = { + 'id': {'key': 'id', 'type': 'str'}, + 'result_type': {'key': 'resultType', 'type': 'str'}, + } + + _subtype_map = { + 'result_type': {'MigrationLevelOutput': 'MigrateSsisTaskOutputMigrationLevel', 'SsisProjectLevelOutput': 'MigrateSsisTaskOutputProjectLevel'} + } + + def __init__( + self, + **kwargs + ): + super(MigrateSsisTaskOutput, self).__init__(**kwargs) + self.id = None + self.result_type = None # type: Optional[str] + + +class MigrateSsisTaskOutputMigrationLevel(MigrateSsisTaskOutput): + """MigrateSsisTaskOutputMigrationLevel. + + Variables are only populated by the server, and will be ignored when sending a request. + + All required parameters must be populated in order to send to Azure. + + :ivar id: Result identifier. + :vartype id: str + :param result_type: Required. Result type.Constant filled by server. + :type result_type: str + :ivar started_on: Migration start time. + :vartype started_on: ~datetime.datetime + :ivar ended_on: Migration end time. + :vartype ended_on: ~datetime.datetime + :ivar status: Current status of migration. Possible values include: "Default", "Connecting", + "SourceAndTargetSelected", "SelectLogins", "Configured", "Running", "Error", "Stopped", + "Completed", "CompletedWithWarnings". + :vartype status: str or ~azure.mgmt.datamigration.models.MigrationStatus + :ivar message: Migration progress message. + :vartype message: str + :ivar source_server_version: Source server version. + :vartype source_server_version: str + :ivar source_server_brand_version: Source server brand version. + :vartype source_server_brand_version: str + :ivar target_server_version: Target server version. + :vartype target_server_version: str + :ivar target_server_brand_version: Target server brand version. + :vartype target_server_brand_version: str + :ivar exceptions_and_warnings: Migration exceptions and warnings. + :vartype exceptions_and_warnings: list[~azure.mgmt.datamigration.models.ReportableException] + :ivar stage: Stage of SSIS migration. Possible values include: "None", "Initialize", + "InProgress", "Completed". + :vartype stage: str or ~azure.mgmt.datamigration.models.SsisMigrationStage + """ + + _validation = { + 'id': {'readonly': True}, + 'result_type': {'required': True}, + 'started_on': {'readonly': True}, + 'ended_on': {'readonly': True}, + 'status': {'readonly': True}, + 'message': {'readonly': True}, + 'source_server_version': {'readonly': True}, + 'source_server_brand_version': {'readonly': True}, + 'target_server_version': {'readonly': True}, + 'target_server_brand_version': {'readonly': True}, + 'exceptions_and_warnings': {'readonly': True}, + 'stage': {'readonly': True}, + } + + _attribute_map = { + 'id': {'key': 'id', 'type': 'str'}, + 'result_type': {'key': 'resultType', 'type': 'str'}, + 'started_on': {'key': 'startedOn', 'type': 'iso-8601'}, + 'ended_on': {'key': 'endedOn', 'type': 'iso-8601'}, + 'status': {'key': 'status', 'type': 'str'}, + 'message': {'key': 'message', 'type': 'str'}, + 'source_server_version': {'key': 'sourceServerVersion', 'type': 'str'}, + 'source_server_brand_version': {'key': 'sourceServerBrandVersion', 'type': 'str'}, + 'target_server_version': {'key': 'targetServerVersion', 'type': 'str'}, + 'target_server_brand_version': {'key': 'targetServerBrandVersion', 'type': 'str'}, + 'exceptions_and_warnings': {'key': 'exceptionsAndWarnings', 'type': '[ReportableException]'}, + 'stage': {'key': 'stage', 'type': 'str'}, + } + + def __init__( + self, + **kwargs + ): + super(MigrateSsisTaskOutputMigrationLevel, self).__init__(**kwargs) + self.result_type = 'MigrationLevelOutput' # type: str + self.started_on = None + self.ended_on = None + self.status = None + self.message = None + self.source_server_version = None + self.source_server_brand_version = None + self.target_server_version = None + self.target_server_brand_version = None + self.exceptions_and_warnings = None + self.stage = None + + +class MigrateSsisTaskOutputProjectLevel(MigrateSsisTaskOutput): + """MigrateSsisTaskOutputProjectLevel. + + Variables are only populated by the server, and will be ignored when sending a request. + + All required parameters must be populated in order to send to Azure. + + :ivar id: Result identifier. + :vartype id: str + :param result_type: Required. Result type.Constant filled by server. + :type result_type: str + :ivar folder_name: Name of the folder. + :vartype folder_name: str + :ivar project_name: Name of the project. + :vartype project_name: str + :ivar state: Current state of migration. Possible values include: "None", "InProgress", + "Failed", "Warning", "Completed", "Skipped", "Stopped". + :vartype state: str or ~azure.mgmt.datamigration.models.MigrationState + :ivar stage: Stage of SSIS migration. Possible values include: "None", "Initialize", + "InProgress", "Completed". + :vartype stage: str or ~azure.mgmt.datamigration.models.SsisMigrationStage + :ivar started_on: Migration start time. + :vartype started_on: ~datetime.datetime + :ivar ended_on: Migration end time. + :vartype ended_on: ~datetime.datetime + :ivar message: Migration progress message. + :vartype message: str + :ivar exceptions_and_warnings: Migration exceptions and warnings. + :vartype exceptions_and_warnings: list[~azure.mgmt.datamigration.models.ReportableException] + """ + + _validation = { + 'id': {'readonly': True}, + 'result_type': {'required': True}, + 'folder_name': {'readonly': True}, + 'project_name': {'readonly': True}, + 'state': {'readonly': True}, + 'stage': {'readonly': True}, + 'started_on': {'readonly': True}, + 'ended_on': {'readonly': True}, + 'message': {'readonly': True}, + 'exceptions_and_warnings': {'readonly': True}, + } + + _attribute_map = { + 'id': {'key': 'id', 'type': 'str'}, + 'result_type': {'key': 'resultType', 'type': 'str'}, + 'folder_name': {'key': 'folderName', 'type': 'str'}, + 'project_name': {'key': 'projectName', 'type': 'str'}, + 'state': {'key': 'state', 'type': 'str'}, + 'stage': {'key': 'stage', 'type': 'str'}, + 'started_on': {'key': 'startedOn', 'type': 'iso-8601'}, + 'ended_on': {'key': 'endedOn', 'type': 'iso-8601'}, + 'message': {'key': 'message', 'type': 'str'}, + 'exceptions_and_warnings': {'key': 'exceptionsAndWarnings', 'type': '[ReportableException]'}, + } + + def __init__( + self, + **kwargs + ): + super(MigrateSsisTaskOutputProjectLevel, self).__init__(**kwargs) + self.result_type = 'SsisProjectLevelOutput' # type: str + self.folder_name = None + self.project_name = None + self.state = None + self.stage = None + self.started_on = None + self.ended_on = None + self.message = None + self.exceptions_and_warnings = None + + +class MigrateSsisTaskProperties(ProjectTaskProperties): + """Properties for task that migrates SSIS packages from SQL Server databases to Azure SQL Database Managed Instance. + + Variables are only populated by the server, and will be ignored when sending a request. + + All required parameters must be populated in order to send to Azure. + + :param task_type: Required. Task type.Constant filled by server. Possible values include: + "Connect.MongoDb", "ConnectToSource.SqlServer", "ConnectToSource.SqlServer.Sync", + "ConnectToSource.PostgreSql.Sync", "ConnectToSource.MySql", "ConnectToSource.Oracle.Sync", + "ConnectToTarget.SqlDb", "ConnectToTarget.SqlDb.Sync", + "ConnectToTarget.AzureDbForPostgreSql.Sync", + "ConnectToTarget.Oracle.AzureDbForPostgreSql.Sync", "ConnectToTarget.AzureSqlDbMI", + "ConnectToTarget.AzureSqlDbMI.Sync.LRS", "ConnectToTarget.AzureDbForMySql", + "GetUserTables.Sql", "GetUserTables.AzureSqlDb.Sync", "GetUserTablesOracle", + "GetUserTablesPostgreSql", "GetUserTablesMySql", "Migrate.MongoDb", + "Migrate.SqlServer.AzureSqlDbMI", "Migrate.SqlServer.AzureSqlDbMI.Sync.LRS", + "Migrate.SqlServer.SqlDb", "Migrate.SqlServer.AzureSqlDb.Sync", + "Migrate.MySql.AzureDbForMySql.Sync", "Migrate.MySql.AzureDbForMySql", + "Migrate.PostgreSql.AzureDbForPostgreSql.SyncV2", "Migrate.Oracle.AzureDbForPostgreSql.Sync", + "ValidateMigrationInput.SqlServer.SqlDb.Sync", "ValidateMigrationInput.SqlServer.AzureSqlDbMI", + "ValidateMigrationInput.SqlServer.AzureSqlDbMI.Sync.LRS", "Validate.MongoDb", + "Validate.Oracle.AzureDbPostgreSql.Sync", "GetTDECertificates.Sql", "Migrate.Ssis", + "Service.Check.OCI", "Service.Upload.OCI", "Service.Install.OCI", + "MigrateSchemaSqlServerSqlDb". + :type task_type: str or ~azure.mgmt.datamigration.models.TaskType + :ivar errors: Array of errors. This is ignored if submitted. + :vartype errors: list[~azure.mgmt.datamigration.models.ODataError] + :ivar state: The state of the task. This is ignored if submitted. Possible values include: + "Unknown", "Queued", "Running", "Canceled", "Succeeded", "Failed", "FailedInputValidation", + "Faulted". + :vartype state: str or ~azure.mgmt.datamigration.models.TaskState + :ivar commands: Array of command properties. + :vartype commands: list[~azure.mgmt.datamigration.models.CommandProperties] + :param client_data: Key value pairs of client data to attach meta data information to task. + :type client_data: dict[str, str] + :param input: Task input. + :type input: ~azure.mgmt.datamigration.models.MigrateSsisTaskInput + :ivar output: Task output. This is ignored if submitted. + :vartype output: list[~azure.mgmt.datamigration.models.MigrateSsisTaskOutput] + """ + + _validation = { + 'task_type': {'required': True}, + 'errors': {'readonly': True}, + 'state': {'readonly': True}, + 'commands': {'readonly': True}, + 'output': {'readonly': True}, + } + + _attribute_map = { + 'task_type': {'key': 'taskType', 'type': 'str'}, + 'errors': {'key': 'errors', 'type': '[ODataError]'}, + 'state': {'key': 'state', 'type': 'str'}, + 'commands': {'key': 'commands', 'type': '[CommandProperties]'}, + 'client_data': {'key': 'clientData', 'type': '{str}'}, + 'input': {'key': 'input', 'type': 'MigrateSsisTaskInput'}, + 'output': {'key': 'output', 'type': '[MigrateSsisTaskOutput]'}, + } + + def __init__( + self, + *, + client_data: Optional[Dict[str, str]] = None, + input: Optional["MigrateSsisTaskInput"] = None, + **kwargs + ): + super(MigrateSsisTaskProperties, self).__init__(client_data=client_data, **kwargs) + self.task_type = 'Migrate.Ssis' # type: str + self.input = input + self.output = None + + +class MigrateSyncCompleteCommandInput(msrest.serialization.Model): + """Input for command that completes sync migration for a database. + + All required parameters must be populated in order to send to Azure. + + :param database_name: Required. Name of database. + :type database_name: str + :param commit_time_stamp: Time stamp to complete. + :type commit_time_stamp: ~datetime.datetime + """ + + _validation = { + 'database_name': {'required': True}, + } + + _attribute_map = { + 'database_name': {'key': 'databaseName', 'type': 'str'}, + 'commit_time_stamp': {'key': 'commitTimeStamp', 'type': 'iso-8601'}, + } + + def __init__( + self, + *, + database_name: str, + commit_time_stamp: Optional[datetime.datetime] = None, + **kwargs + ): + super(MigrateSyncCompleteCommandInput, self).__init__(**kwargs) + self.database_name = database_name + self.commit_time_stamp = commit_time_stamp + + +class MigrateSyncCompleteCommandOutput(msrest.serialization.Model): + """Output for command that completes sync migration for a database. + + Variables are only populated by the server, and will be ignored when sending a request. + + :ivar id: Result identifier. + :vartype id: str + :ivar errors: List of errors that happened during the command execution. + :vartype errors: list[~azure.mgmt.datamigration.models.ReportableException] + """ + + _validation = { + 'id': {'readonly': True}, + 'errors': {'readonly': True}, + } + + _attribute_map = { + 'id': {'key': 'id', 'type': 'str'}, + 'errors': {'key': 'errors', 'type': '[ReportableException]'}, + } + + def __init__( + self, + **kwargs + ): + super(MigrateSyncCompleteCommandOutput, self).__init__(**kwargs) + self.id = None + self.errors = None + + +class MigrateSyncCompleteCommandProperties(CommandProperties): + """Properties for the command that completes sync migration for a database. + + Variables are only populated by the server, and will be ignored when sending a request. + + All required parameters must be populated in order to send to Azure. + + :param command_type: Required. Command type.Constant filled by server. Possible values + include: "Migrate.Sync.Complete.Database", "Migrate.SqlServer.AzureDbSqlMi.Complete", "cancel", + "finish", "restart". + :type command_type: str or ~azure.mgmt.datamigration.models.CommandType + :ivar errors: Array of errors. This is ignored if submitted. + :vartype errors: list[~azure.mgmt.datamigration.models.ODataError] + :ivar state: The state of the command. This is ignored if submitted. Possible values include: + "Unknown", "Accepted", "Running", "Succeeded", "Failed". + :vartype state: str or ~azure.mgmt.datamigration.models.CommandState + :param input: Command input. + :type input: ~azure.mgmt.datamigration.models.MigrateSyncCompleteCommandInput + :ivar output: Command output. This is ignored if submitted. + :vartype output: ~azure.mgmt.datamigration.models.MigrateSyncCompleteCommandOutput + """ + + _validation = { + 'command_type': {'required': True}, + 'errors': {'readonly': True}, + 'state': {'readonly': True}, + 'output': {'readonly': True}, + } + + _attribute_map = { + 'command_type': {'key': 'commandType', 'type': 'str'}, + 'errors': {'key': 'errors', 'type': '[ODataError]'}, + 'state': {'key': 'state', 'type': 'str'}, + 'input': {'key': 'input', 'type': 'MigrateSyncCompleteCommandInput'}, + 'output': {'key': 'output', 'type': 'MigrateSyncCompleteCommandOutput'}, + } + + def __init__( + self, + *, + input: Optional["MigrateSyncCompleteCommandInput"] = None, + **kwargs + ): + super(MigrateSyncCompleteCommandProperties, self).__init__(**kwargs) + self.command_type = 'Migrate.Sync.Complete.Database' # type: str + self.input = input + self.output = None + + +class MigrationEligibilityInfo(msrest.serialization.Model): + """Information about migration eligibility of a server object. + + Variables are only populated by the server, and will be ignored when sending a request. + + :ivar is_eligible_for_migration: Whether object is eligible for migration or not. + :vartype is_eligible_for_migration: bool + :ivar validation_messages: Information about eligibility failure for the server object. + :vartype validation_messages: list[str] + """ + + _validation = { + 'is_eligible_for_migration': {'readonly': True}, + 'validation_messages': {'readonly': True}, + } + + _attribute_map = { + 'is_eligible_for_migration': {'key': 'isEligibleForMigration', 'type': 'bool'}, + 'validation_messages': {'key': 'validationMessages', 'type': '[str]'}, + } + + def __init__( + self, + **kwargs + ): + super(MigrationEligibilityInfo, self).__init__(**kwargs) + self.is_eligible_for_migration = None + self.validation_messages = None + + +class MigrationOperationInput(msrest.serialization.Model): + """Migration Operation Input. + + :param migration_operation_id: ID tracking migration operation. + :type migration_operation_id: str + """ + + _attribute_map = { + 'migration_operation_id': {'key': 'migrationOperationId', 'type': 'str'}, + } + + def __init__( + self, + *, + migration_operation_id: Optional[str] = None, + **kwargs + ): + super(MigrationOperationInput, self).__init__(**kwargs) + self.migration_operation_id = migration_operation_id + + +class MigrationReportResult(msrest.serialization.Model): + """Migration validation report result, contains the url for downloading the generated report. + + :param id: Migration validation result identifier. + :type id: str + :param report_url: The url of the report. + :type report_url: str + """ + + _attribute_map = { + 'id': {'key': 'id', 'type': 'str'}, + 'report_url': {'key': 'reportUrl', 'type': 'str'}, + } + + def __init__( + self, + *, + id: Optional[str] = None, + report_url: Optional[str] = None, + **kwargs + ): + super(MigrationReportResult, self).__init__(**kwargs) + self.id = id + self.report_url = report_url + + +class MigrationStatusDetails(msrest.serialization.Model): + """Detailed status of current migration. + + Variables are only populated by the server, and will be ignored when sending a request. + + :ivar migration_state: Current State of Migration. + :vartype migration_state: str + :ivar full_backup_set_info: Details of full backup set. + :vartype full_backup_set_info: ~azure.mgmt.datamigration.models.SqlBackupSetInfo + :ivar last_restored_backup_set_info: Last applied backup set information. + :vartype last_restored_backup_set_info: ~azure.mgmt.datamigration.models.SqlBackupSetInfo + :ivar active_backup_sets: Backup sets that are currently active. + :vartype active_backup_sets: list[~azure.mgmt.datamigration.models.SqlBackupSetInfo] + :ivar invalid_files: Files that are not valid backup files. + :vartype invalid_files: list[str] + :ivar blob_container_name: Name of blob container. + :vartype blob_container_name: str + :ivar is_full_backup_restored: Whether full backup has been applied to the target database or + not. + :vartype is_full_backup_restored: bool + :ivar restore_blocking_reason: Restore blocking reason, if any. + :vartype restore_blocking_reason: str + :ivar complete_restore_error_message: Complete restore error message, if any. + :vartype complete_restore_error_message: str + :ivar file_upload_blocking_errors: File upload blocking errors, if any. + :vartype file_upload_blocking_errors: list[str] + :ivar current_restoring_filename: File name that is currently being restored. + :vartype current_restoring_filename: str + :ivar last_restored_filename: Last restored file name. + :vartype last_restored_filename: str + :ivar pending_log_backups_count: Total pending log backups. + :vartype pending_log_backups_count: int + """ + + _validation = { + 'migration_state': {'readonly': True}, + 'full_backup_set_info': {'readonly': True}, + 'last_restored_backup_set_info': {'readonly': True}, + 'active_backup_sets': {'readonly': True}, + 'invalid_files': {'readonly': True}, + 'blob_container_name': {'readonly': True}, + 'is_full_backup_restored': {'readonly': True}, + 'restore_blocking_reason': {'readonly': True}, + 'complete_restore_error_message': {'readonly': True}, + 'file_upload_blocking_errors': {'readonly': True}, + 'current_restoring_filename': {'readonly': True}, + 'last_restored_filename': {'readonly': True}, + 'pending_log_backups_count': {'readonly': True}, + } + + _attribute_map = { + 'migration_state': {'key': 'migrationState', 'type': 'str'}, + 'full_backup_set_info': {'key': 'fullBackupSetInfo', 'type': 'SqlBackupSetInfo'}, + 'last_restored_backup_set_info': {'key': 'lastRestoredBackupSetInfo', 'type': 'SqlBackupSetInfo'}, + 'active_backup_sets': {'key': 'activeBackupSets', 'type': '[SqlBackupSetInfo]'}, + 'invalid_files': {'key': 'invalidFiles', 'type': '[str]'}, + 'blob_container_name': {'key': 'blobContainerName', 'type': 'str'}, + 'is_full_backup_restored': {'key': 'isFullBackupRestored', 'type': 'bool'}, + 'restore_blocking_reason': {'key': 'restoreBlockingReason', 'type': 'str'}, + 'complete_restore_error_message': {'key': 'completeRestoreErrorMessage', 'type': 'str'}, + 'file_upload_blocking_errors': {'key': 'fileUploadBlockingErrors', 'type': '[str]'}, + 'current_restoring_filename': {'key': 'currentRestoringFilename', 'type': 'str'}, + 'last_restored_filename': {'key': 'lastRestoredFilename', 'type': 'str'}, + 'pending_log_backups_count': {'key': 'pendingLogBackupsCount', 'type': 'int'}, + } + + def __init__( + self, + **kwargs + ): + super(MigrationStatusDetails, self).__init__(**kwargs) + self.migration_state = None + self.full_backup_set_info = None + self.last_restored_backup_set_info = None + self.active_backup_sets = None + self.invalid_files = None + self.blob_container_name = None + self.is_full_backup_restored = None + self.restore_blocking_reason = None + self.complete_restore_error_message = None + self.file_upload_blocking_errors = None + self.current_restoring_filename = None + self.last_restored_filename = None + self.pending_log_backups_count = None + + +class MigrationTableMetadata(msrest.serialization.Model): + """Metadata for tables selected in migration project. + + Variables are only populated by the server, and will be ignored when sending a request. + + :ivar source_table_name: Source table name. + :vartype source_table_name: str + :ivar target_table_name: Target table name. + :vartype target_table_name: str + """ + + _validation = { + 'source_table_name': {'readonly': True}, + 'target_table_name': {'readonly': True}, + } + + _attribute_map = { + 'source_table_name': {'key': 'sourceTableName', 'type': 'str'}, + 'target_table_name': {'key': 'targetTableName', 'type': 'str'}, + } + + def __init__( + self, + **kwargs + ): + super(MigrationTableMetadata, self).__init__(**kwargs) + self.source_table_name = None + self.target_table_name = None + + +class MigrationValidationDatabaseSummaryResult(msrest.serialization.Model): + """Migration Validation Database level summary result. + + Variables are only populated by the server, and will be ignored when sending a request. + + :ivar id: Result identifier. + :vartype id: str + :ivar migration_id: Migration Identifier. + :vartype migration_id: str + :ivar source_database_name: Name of the source database. + :vartype source_database_name: str + :ivar target_database_name: Name of the target database. + :vartype target_database_name: str + :ivar started_on: Validation start time. + :vartype started_on: ~datetime.datetime + :ivar ended_on: Validation end time. + :vartype ended_on: ~datetime.datetime + :ivar status: Current status of validation at the database level. Possible values include: + "Default", "NotStarted", "Initialized", "InProgress", "Completed", "CompletedWithIssues", + "Stopped", "Failed". + :vartype status: str or ~azure.mgmt.datamigration.models.ValidationStatus + """ + + _validation = { + 'id': {'readonly': True}, + 'migration_id': {'readonly': True}, + 'source_database_name': {'readonly': True}, + 'target_database_name': {'readonly': True}, + 'started_on': {'readonly': True}, + 'ended_on': {'readonly': True}, + 'status': {'readonly': True}, + } + + _attribute_map = { + 'id': {'key': 'id', 'type': 'str'}, + 'migration_id': {'key': 'migrationId', 'type': 'str'}, + 'source_database_name': {'key': 'sourceDatabaseName', 'type': 'str'}, + 'target_database_name': {'key': 'targetDatabaseName', 'type': 'str'}, + 'started_on': {'key': 'startedOn', 'type': 'iso-8601'}, + 'ended_on': {'key': 'endedOn', 'type': 'iso-8601'}, + 'status': {'key': 'status', 'type': 'str'}, + } + + def __init__( + self, + **kwargs + ): + super(MigrationValidationDatabaseSummaryResult, self).__init__(**kwargs) + self.id = None + self.migration_id = None + self.source_database_name = None + self.target_database_name = None + self.started_on = None + self.ended_on = None + self.status = None + + +class MigrationValidationOptions(msrest.serialization.Model): + """Types of validations to run after the migration. + + :param enable_schema_validation: Allows to compare the schema information between source and + target. + :type enable_schema_validation: bool + :param enable_data_integrity_validation: Allows to perform a checksum based data integrity + validation between source and target for the selected database / tables . + :type enable_data_integrity_validation: bool + :param enable_query_analysis_validation: Allows to perform a quick and intelligent query + analysis by retrieving queries from the source database and executes them in the target. The + result will have execution statistics for executions in source and target databases for the + extracted queries. + :type enable_query_analysis_validation: bool + """ + + _attribute_map = { + 'enable_schema_validation': {'key': 'enableSchemaValidation', 'type': 'bool'}, + 'enable_data_integrity_validation': {'key': 'enableDataIntegrityValidation', 'type': 'bool'}, + 'enable_query_analysis_validation': {'key': 'enableQueryAnalysisValidation', 'type': 'bool'}, + } + + def __init__( + self, + *, + enable_schema_validation: Optional[bool] = None, + enable_data_integrity_validation: Optional[bool] = None, + enable_query_analysis_validation: Optional[bool] = None, + **kwargs + ): + super(MigrationValidationOptions, self).__init__(**kwargs) + self.enable_schema_validation = enable_schema_validation + self.enable_data_integrity_validation = enable_data_integrity_validation + self.enable_query_analysis_validation = enable_query_analysis_validation + + +class MiSqlConnectionInfo(ConnectionInfo): + """Properties required to create a connection to Azure SQL database Managed instance. + + All required parameters must be populated in order to send to Azure. + + :param type: Required. Type of connection info.Constant filled by server. + :type type: str + :param user_name: User name. + :type user_name: str + :param password: Password credential. + :type password: str + :param managed_instance_resource_id: Required. Resource id for Azure SQL database Managed + instance. + :type managed_instance_resource_id: str + """ + + _validation = { + 'type': {'required': True}, + 'managed_instance_resource_id': {'required': True}, + } + + _attribute_map = { + 'type': {'key': 'type', 'type': 'str'}, + 'user_name': {'key': 'userName', 'type': 'str'}, + 'password': {'key': 'password', 'type': 'str'}, + 'managed_instance_resource_id': {'key': 'managedInstanceResourceId', 'type': 'str'}, + } + + def __init__( + self, + *, + managed_instance_resource_id: str, + user_name: Optional[str] = None, + password: Optional[str] = None, + **kwargs + ): + super(MiSqlConnectionInfo, self).__init__(user_name=user_name, password=password, **kwargs) + self.type = 'MiSqlConnectionInfo' # type: str + self.managed_instance_resource_id = managed_instance_resource_id + + +class MongoDbCancelCommand(CommandProperties): + """Properties for the command that cancels a migration in whole or in part. + + Variables are only populated by the server, and will be ignored when sending a request. + + All required parameters must be populated in order to send to Azure. + + :param command_type: Required. Command type.Constant filled by server. Possible values + include: "Migrate.Sync.Complete.Database", "Migrate.SqlServer.AzureDbSqlMi.Complete", "cancel", + "finish", "restart". + :type command_type: str or ~azure.mgmt.datamigration.models.CommandType + :ivar errors: Array of errors. This is ignored if submitted. + :vartype errors: list[~azure.mgmt.datamigration.models.ODataError] + :ivar state: The state of the command. This is ignored if submitted. Possible values include: + "Unknown", "Accepted", "Running", "Succeeded", "Failed". + :vartype state: str or ~azure.mgmt.datamigration.models.CommandState + :param input: Command input. + :type input: ~azure.mgmt.datamigration.models.MongoDbCommandInput + """ + + _validation = { + 'command_type': {'required': True}, + 'errors': {'readonly': True}, + 'state': {'readonly': True}, + } + + _attribute_map = { + 'command_type': {'key': 'commandType', 'type': 'str'}, + 'errors': {'key': 'errors', 'type': '[ODataError]'}, + 'state': {'key': 'state', 'type': 'str'}, + 'input': {'key': 'input', 'type': 'MongoDbCommandInput'}, + } + + def __init__( + self, + *, + input: Optional["MongoDbCommandInput"] = None, + **kwargs + ): + super(MongoDbCancelCommand, self).__init__(**kwargs) + self.command_type = 'cancel' # type: str + self.input = input + + +class MongoDbClusterInfo(msrest.serialization.Model): + """Describes a MongoDB data source. + + All required parameters must be populated in order to send to Azure. + + :param databases: Required. A list of non-system databases in the cluster. + :type databases: list[~azure.mgmt.datamigration.models.MongoDbDatabaseInfo] + :param supports_sharding: Required. Whether the cluster supports sharded collections. + :type supports_sharding: bool + :param type: Required. The type of data source. Possible values include: "BlobContainer", + "CosmosDb", "MongoDb". + :type type: str or ~azure.mgmt.datamigration.models.MongoDbClusterType + :param version: Required. The version of the data source in the form x.y.z (e.g. 3.6.7). Not + used if Type is BlobContainer. + :type version: str + """ + + _validation = { + 'databases': {'required': True}, + 'supports_sharding': {'required': True}, + 'type': {'required': True}, + 'version': {'required': True}, + } + + _attribute_map = { + 'databases': {'key': 'databases', 'type': '[MongoDbDatabaseInfo]'}, + 'supports_sharding': {'key': 'supportsSharding', 'type': 'bool'}, + 'type': {'key': 'type', 'type': 'str'}, + 'version': {'key': 'version', 'type': 'str'}, + } + + def __init__( + self, + *, + databases: List["MongoDbDatabaseInfo"], + supports_sharding: bool, + type: Union[str, "MongoDbClusterType"], + version: str, + **kwargs + ): + super(MongoDbClusterInfo, self).__init__(**kwargs) + self.databases = databases + self.supports_sharding = supports_sharding + self.type = type + self.version = version + + +class MongoDbObjectInfo(msrest.serialization.Model): + """Describes a database or collection within a MongoDB data source. + + All required parameters must be populated in order to send to Azure. + + :param average_document_size: Required. The average document size, or -1 if the average size is + unknown. + :type average_document_size: long + :param data_size: Required. The estimated total data size, in bytes, or -1 if the size is + unknown. + :type data_size: long + :param document_count: Required. The estimated total number of documents, or -1 if the document + count is unknown. + :type document_count: long + :param name: Required. The unqualified name of the database or collection. + :type name: str + :param qualified_name: Required. The qualified name of the database or collection. For a + collection, this is the database-qualified name. + :type qualified_name: str + """ + + _validation = { + 'average_document_size': {'required': True}, + 'data_size': {'required': True}, + 'document_count': {'required': True}, + 'name': {'required': True}, + 'qualified_name': {'required': True}, + } + + _attribute_map = { + 'average_document_size': {'key': 'averageDocumentSize', 'type': 'long'}, + 'data_size': {'key': 'dataSize', 'type': 'long'}, + 'document_count': {'key': 'documentCount', 'type': 'long'}, + 'name': {'key': 'name', 'type': 'str'}, + 'qualified_name': {'key': 'qualifiedName', 'type': 'str'}, + } + + def __init__( + self, + *, + average_document_size: int, + data_size: int, + document_count: int, + name: str, + qualified_name: str, + **kwargs + ): + super(MongoDbObjectInfo, self).__init__(**kwargs) + self.average_document_size = average_document_size + self.data_size = data_size + self.document_count = document_count + self.name = name + self.qualified_name = qualified_name + + +class MongoDbCollectionInfo(MongoDbObjectInfo): + """Describes a supported collection within a MongoDB database. + + All required parameters must be populated in order to send to Azure. + + :param average_document_size: Required. The average document size, or -1 if the average size is + unknown. + :type average_document_size: long + :param data_size: Required. The estimated total data size, in bytes, or -1 if the size is + unknown. + :type data_size: long + :param document_count: Required. The estimated total number of documents, or -1 if the document + count is unknown. + :type document_count: long + :param name: Required. The unqualified name of the database or collection. + :type name: str + :param qualified_name: Required. The qualified name of the database or collection. For a + collection, this is the database-qualified name. + :type qualified_name: str + :param database_name: Required. The name of the database containing the collection. + :type database_name: str + :param is_capped: Required. Whether the collection is a capped collection (i.e. whether it has + a fixed size and acts like a circular buffer). + :type is_capped: bool + :param is_system_collection: Required. Whether the collection is system collection. + :type is_system_collection: bool + :param is_view: Required. Whether the collection is a view of another collection. + :type is_view: bool + :param shard_key: The shard key on the collection, or null if the collection is not sharded. + :type shard_key: ~azure.mgmt.datamigration.models.MongoDbShardKeyInfo + :param supports_sharding: Required. Whether the database has sharding enabled. Note that the + migration task will enable sharding on the target if necessary. + :type supports_sharding: bool + :param view_of: The name of the collection that this is a view of, if IsView is true. + :type view_of: str + """ + + _validation = { + 'average_document_size': {'required': True}, + 'data_size': {'required': True}, + 'document_count': {'required': True}, + 'name': {'required': True}, + 'qualified_name': {'required': True}, + 'database_name': {'required': True}, + 'is_capped': {'required': True}, + 'is_system_collection': {'required': True}, + 'is_view': {'required': True}, + 'supports_sharding': {'required': True}, + } + + _attribute_map = { + 'average_document_size': {'key': 'averageDocumentSize', 'type': 'long'}, + 'data_size': {'key': 'dataSize', 'type': 'long'}, + 'document_count': {'key': 'documentCount', 'type': 'long'}, + 'name': {'key': 'name', 'type': 'str'}, + 'qualified_name': {'key': 'qualifiedName', 'type': 'str'}, + 'database_name': {'key': 'databaseName', 'type': 'str'}, + 'is_capped': {'key': 'isCapped', 'type': 'bool'}, + 'is_system_collection': {'key': 'isSystemCollection', 'type': 'bool'}, + 'is_view': {'key': 'isView', 'type': 'bool'}, + 'shard_key': {'key': 'shardKey', 'type': 'MongoDbShardKeyInfo'}, + 'supports_sharding': {'key': 'supportsSharding', 'type': 'bool'}, + 'view_of': {'key': 'viewOf', 'type': 'str'}, + } + + def __init__( + self, + *, + average_document_size: int, + data_size: int, + document_count: int, + name: str, + qualified_name: str, + database_name: str, + is_capped: bool, + is_system_collection: bool, + is_view: bool, + supports_sharding: bool, + shard_key: Optional["MongoDbShardKeyInfo"] = None, + view_of: Optional[str] = None, + **kwargs + ): + super(MongoDbCollectionInfo, self).__init__(average_document_size=average_document_size, data_size=data_size, document_count=document_count, name=name, qualified_name=qualified_name, **kwargs) + self.database_name = database_name + self.is_capped = is_capped + self.is_system_collection = is_system_collection + self.is_view = is_view + self.shard_key = shard_key + self.supports_sharding = supports_sharding + self.view_of = view_of + + +class MongoDbProgress(msrest.serialization.Model): + """Base class for MongoDB migration outputs. + + You probably want to use the sub-classes and not this class directly. Known + sub-classes are: MongoDbCollectionProgress, MongoDbDatabaseProgress, MongoDbMigrationProgress. + + All required parameters must be populated in order to send to Azure. + + :param bytes_copied: Required. The number of document bytes copied during the Copying stage. + :type bytes_copied: long + :param documents_copied: Required. The number of documents copied during the Copying stage. + :type documents_copied: long + :param elapsed_time: Required. The elapsed time in the format [ddd.]hh:mm:ss[.fffffff] (i.e. + TimeSpan format). + :type elapsed_time: str + :param errors: Required. The errors and warnings that have occurred for the current object. The + keys are the error codes. + :type errors: dict[str, ~azure.mgmt.datamigration.models.MongoDbError] + :param events_pending: Required. The number of oplog events awaiting replay. + :type events_pending: long + :param events_replayed: Required. The number of oplog events replayed so far. + :type events_replayed: long + :param last_event_time: The timestamp of the last oplog event received, or null if no oplog + event has been received yet. + :type last_event_time: ~datetime.datetime + :param last_replay_time: The timestamp of the last oplog event replayed, or null if no oplog + event has been replayed yet. + :type last_replay_time: ~datetime.datetime + :param name: The name of the progress object. For a collection, this is the unqualified + collection name. For a database, this is the database name. For the overall migration, this is + null. + :type name: str + :param qualified_name: The qualified name of the progress object. For a collection, this is the + database-qualified name. For a database, this is the database name. For the overall migration, + this is null. + :type qualified_name: str + :param result_type: Required. The type of progress object.Constant filled by server. Possible + values include: "Migration", "Database", "Collection". + :type result_type: str or ~azure.mgmt.datamigration.models.MongoDbProgressResultType + :param state: Required. Possible values include: "NotStarted", "ValidatingInput", + "Initializing", "Restarting", "Copying", "InitialReplay", "Replaying", "Finalizing", + "Complete", "Canceled", "Failed". + :type state: str or ~azure.mgmt.datamigration.models.MongoDbMigrationState + :param total_bytes: Required. The total number of document bytes on the source at the beginning + of the Copying stage, or -1 if the total size was unknown. + :type total_bytes: long + :param total_documents: Required. The total number of documents on the source at the beginning + of the Copying stage, or -1 if the total count was unknown. + :type total_documents: long + """ + + _validation = { + 'bytes_copied': {'required': True}, + 'documents_copied': {'required': True}, + 'elapsed_time': {'required': True}, + 'errors': {'required': True}, + 'events_pending': {'required': True}, + 'events_replayed': {'required': True}, + 'result_type': {'required': True}, + 'state': {'required': True}, + 'total_bytes': {'required': True}, + 'total_documents': {'required': True}, + } + + _attribute_map = { + 'bytes_copied': {'key': 'bytesCopied', 'type': 'long'}, + 'documents_copied': {'key': 'documentsCopied', 'type': 'long'}, + 'elapsed_time': {'key': 'elapsedTime', 'type': 'str'}, + 'errors': {'key': 'errors', 'type': '{MongoDbError}'}, + 'events_pending': {'key': 'eventsPending', 'type': 'long'}, + 'events_replayed': {'key': 'eventsReplayed', 'type': 'long'}, + 'last_event_time': {'key': 'lastEventTime', 'type': 'iso-8601'}, + 'last_replay_time': {'key': 'lastReplayTime', 'type': 'iso-8601'}, + 'name': {'key': 'name', 'type': 'str'}, + 'qualified_name': {'key': 'qualifiedName', 'type': 'str'}, + 'result_type': {'key': 'resultType', 'type': 'str'}, + 'state': {'key': 'state', 'type': 'str'}, + 'total_bytes': {'key': 'totalBytes', 'type': 'long'}, + 'total_documents': {'key': 'totalDocuments', 'type': 'long'}, + } + + _subtype_map = { + 'result_type': {'Collection': 'MongoDbCollectionProgress', 'Database': 'MongoDbDatabaseProgress', 'Migration': 'MongoDbMigrationProgress'} + } + + def __init__( + self, + *, + bytes_copied: int, + documents_copied: int, + elapsed_time: str, + errors: Dict[str, "MongoDbError"], + events_pending: int, + events_replayed: int, + state: Union[str, "MongoDbMigrationState"], + total_bytes: int, + total_documents: int, + last_event_time: Optional[datetime.datetime] = None, + last_replay_time: Optional[datetime.datetime] = None, + name: Optional[str] = None, + qualified_name: Optional[str] = None, + **kwargs + ): + super(MongoDbProgress, self).__init__(**kwargs) + self.bytes_copied = bytes_copied + self.documents_copied = documents_copied + self.elapsed_time = elapsed_time + self.errors = errors + self.events_pending = events_pending + self.events_replayed = events_replayed + self.last_event_time = last_event_time + self.last_replay_time = last_replay_time + self.name = name + self.qualified_name = qualified_name + self.result_type = None # type: Optional[str] + self.state = state + self.total_bytes = total_bytes + self.total_documents = total_documents + + +class MongoDbCollectionProgress(MongoDbProgress): + """Describes the progress of a collection. + + All required parameters must be populated in order to send to Azure. + + :param bytes_copied: Required. The number of document bytes copied during the Copying stage. + :type bytes_copied: long + :param documents_copied: Required. The number of documents copied during the Copying stage. + :type documents_copied: long + :param elapsed_time: Required. The elapsed time in the format [ddd.]hh:mm:ss[.fffffff] (i.e. + TimeSpan format). + :type elapsed_time: str + :param errors: Required. The errors and warnings that have occurred for the current object. The + keys are the error codes. + :type errors: dict[str, ~azure.mgmt.datamigration.models.MongoDbError] + :param events_pending: Required. The number of oplog events awaiting replay. + :type events_pending: long + :param events_replayed: Required. The number of oplog events replayed so far. + :type events_replayed: long + :param last_event_time: The timestamp of the last oplog event received, or null if no oplog + event has been received yet. + :type last_event_time: ~datetime.datetime + :param last_replay_time: The timestamp of the last oplog event replayed, or null if no oplog + event has been replayed yet. + :type last_replay_time: ~datetime.datetime + :param name: The name of the progress object. For a collection, this is the unqualified + collection name. For a database, this is the database name. For the overall migration, this is + null. + :type name: str + :param qualified_name: The qualified name of the progress object. For a collection, this is the + database-qualified name. For a database, this is the database name. For the overall migration, + this is null. + :type qualified_name: str + :param result_type: Required. The type of progress object.Constant filled by server. Possible + values include: "Migration", "Database", "Collection". + :type result_type: str or ~azure.mgmt.datamigration.models.MongoDbProgressResultType + :param state: Required. Possible values include: "NotStarted", "ValidatingInput", + "Initializing", "Restarting", "Copying", "InitialReplay", "Replaying", "Finalizing", + "Complete", "Canceled", "Failed". + :type state: str or ~azure.mgmt.datamigration.models.MongoDbMigrationState + :param total_bytes: Required. The total number of document bytes on the source at the beginning + of the Copying stage, or -1 if the total size was unknown. + :type total_bytes: long + :param total_documents: Required. The total number of documents on the source at the beginning + of the Copying stage, or -1 if the total count was unknown. + :type total_documents: long + """ + + _validation = { + 'bytes_copied': {'required': True}, + 'documents_copied': {'required': True}, + 'elapsed_time': {'required': True}, + 'errors': {'required': True}, + 'events_pending': {'required': True}, + 'events_replayed': {'required': True}, + 'result_type': {'required': True}, + 'state': {'required': True}, + 'total_bytes': {'required': True}, + 'total_documents': {'required': True}, + } + + _attribute_map = { + 'bytes_copied': {'key': 'bytesCopied', 'type': 'long'}, + 'documents_copied': {'key': 'documentsCopied', 'type': 'long'}, + 'elapsed_time': {'key': 'elapsedTime', 'type': 'str'}, + 'errors': {'key': 'errors', 'type': '{MongoDbError}'}, + 'events_pending': {'key': 'eventsPending', 'type': 'long'}, + 'events_replayed': {'key': 'eventsReplayed', 'type': 'long'}, + 'last_event_time': {'key': 'lastEventTime', 'type': 'iso-8601'}, + 'last_replay_time': {'key': 'lastReplayTime', 'type': 'iso-8601'}, + 'name': {'key': 'name', 'type': 'str'}, + 'qualified_name': {'key': 'qualifiedName', 'type': 'str'}, + 'result_type': {'key': 'resultType', 'type': 'str'}, + 'state': {'key': 'state', 'type': 'str'}, + 'total_bytes': {'key': 'totalBytes', 'type': 'long'}, + 'total_documents': {'key': 'totalDocuments', 'type': 'long'}, + } + + def __init__( + self, + *, + bytes_copied: int, + documents_copied: int, + elapsed_time: str, + errors: Dict[str, "MongoDbError"], + events_pending: int, + events_replayed: int, + state: Union[str, "MongoDbMigrationState"], + total_bytes: int, + total_documents: int, + last_event_time: Optional[datetime.datetime] = None, + last_replay_time: Optional[datetime.datetime] = None, + name: Optional[str] = None, + qualified_name: Optional[str] = None, + **kwargs + ): + super(MongoDbCollectionProgress, self).__init__(bytes_copied=bytes_copied, documents_copied=documents_copied, elapsed_time=elapsed_time, errors=errors, events_pending=events_pending, events_replayed=events_replayed, last_event_time=last_event_time, last_replay_time=last_replay_time, name=name, qualified_name=qualified_name, state=state, total_bytes=total_bytes, total_documents=total_documents, **kwargs) + self.result_type = 'Collection' # type: str + + +class MongoDbCollectionSettings(msrest.serialization.Model): + """Describes how an individual MongoDB collection should be migrated. + + :param can_delete: Whether the migrator is allowed to drop the target collection in the course + of performing a migration. The default is true. + :type can_delete: bool + :param shard_key: Describes a MongoDB shard key. + :type shard_key: ~azure.mgmt.datamigration.models.MongoDbShardKeySetting + :param target_r_us: The RUs that should be configured on a CosmosDB target, or null to use the + default. This has no effect on non-CosmosDB targets. + :type target_r_us: int + """ + + _attribute_map = { + 'can_delete': {'key': 'canDelete', 'type': 'bool'}, + 'shard_key': {'key': 'shardKey', 'type': 'MongoDbShardKeySetting'}, + 'target_r_us': {'key': 'targetRUs', 'type': 'int'}, + } + + def __init__( + self, + *, + can_delete: Optional[bool] = None, + shard_key: Optional["MongoDbShardKeySetting"] = None, + target_r_us: Optional[int] = None, + **kwargs + ): + super(MongoDbCollectionSettings, self).__init__(**kwargs) + self.can_delete = can_delete + self.shard_key = shard_key + self.target_r_us = target_r_us + + +class MongoDbCommandInput(msrest.serialization.Model): + """Describes the input to the 'cancel' and 'restart' MongoDB migration commands. + + :param object_name: The qualified name of a database or collection to act upon, or null to act + upon the entire migration. + :type object_name: str + """ + + _attribute_map = { + 'object_name': {'key': 'objectName', 'type': 'str'}, + } + + def __init__( + self, + *, + object_name: Optional[str] = None, + **kwargs + ): + super(MongoDbCommandInput, self).__init__(**kwargs) + self.object_name = object_name + + +class MongoDbConnectionInfo(ConnectionInfo): + """Describes a connection to a MongoDB data source. + + All required parameters must be populated in order to send to Azure. + + :param type: Required. Type of connection info.Constant filled by server. + :type type: str + :param user_name: User name. + :type user_name: str + :param password: Password credential. + :type password: str + :param connection_string: Required. A MongoDB connection string or blob container URL. The user + name and password can be specified here or in the userName and password properties. + :type connection_string: str + :param data_source: Data source. + :type data_source: str + :param encrypt_connection: Whether to encrypt the connection. + :type encrypt_connection: bool + :param server_brand_version: server brand version. + :type server_brand_version: str + :param enforce_ssl: + :type enforce_ssl: bool + :param port: port for server. + :type port: int + :param additional_settings: Additional connection settings. + :type additional_settings: str + """ + + _validation = { + 'type': {'required': True}, + 'connection_string': {'required': True}, + } + + _attribute_map = { + 'type': {'key': 'type', 'type': 'str'}, + 'user_name': {'key': 'userName', 'type': 'str'}, + 'password': {'key': 'password', 'type': 'str'}, + 'connection_string': {'key': 'connectionString', 'type': 'str'}, + 'data_source': {'key': 'dataSource', 'type': 'str'}, + 'encrypt_connection': {'key': 'encryptConnection', 'type': 'bool'}, + 'server_brand_version': {'key': 'serverBrandVersion', 'type': 'str'}, + 'enforce_ssl': {'key': 'enforceSSL', 'type': 'bool'}, + 'port': {'key': 'port', 'type': 'int'}, + 'additional_settings': {'key': 'additionalSettings', 'type': 'str'}, + } + + def __init__( + self, + *, + connection_string: str, + user_name: Optional[str] = None, + password: Optional[str] = None, + data_source: Optional[str] = None, + encrypt_connection: Optional[bool] = None, + server_brand_version: Optional[str] = None, + enforce_ssl: Optional[bool] = None, + port: Optional[int] = None, + additional_settings: Optional[str] = None, + **kwargs + ): + super(MongoDbConnectionInfo, self).__init__(user_name=user_name, password=password, **kwargs) + self.type = 'MongoDbConnectionInfo' # type: str + self.connection_string = connection_string + self.data_source = data_source + self.encrypt_connection = encrypt_connection + self.server_brand_version = server_brand_version + self.enforce_ssl = enforce_ssl + self.port = port + self.additional_settings = additional_settings + + +class MongoDbDatabaseInfo(MongoDbObjectInfo): + """Describes a database within a MongoDB data source. + + All required parameters must be populated in order to send to Azure. + + :param average_document_size: Required. The average document size, or -1 if the average size is + unknown. + :type average_document_size: long + :param data_size: Required. The estimated total data size, in bytes, or -1 if the size is + unknown. + :type data_size: long + :param document_count: Required. The estimated total number of documents, or -1 if the document + count is unknown. + :type document_count: long + :param name: Required. The unqualified name of the database or collection. + :type name: str + :param qualified_name: Required. The qualified name of the database or collection. For a + collection, this is the database-qualified name. + :type qualified_name: str + :param collections: Required. A list of supported collections in a MongoDB database. + :type collections: list[~azure.mgmt.datamigration.models.MongoDbCollectionInfo] + :param supports_sharding: Required. Whether the database has sharding enabled. Note that the + migration task will enable sharding on the target if necessary. + :type supports_sharding: bool + """ + + _validation = { + 'average_document_size': {'required': True}, + 'data_size': {'required': True}, + 'document_count': {'required': True}, + 'name': {'required': True}, + 'qualified_name': {'required': True}, + 'collections': {'required': True}, + 'supports_sharding': {'required': True}, + } + + _attribute_map = { + 'average_document_size': {'key': 'averageDocumentSize', 'type': 'long'}, + 'data_size': {'key': 'dataSize', 'type': 'long'}, + 'document_count': {'key': 'documentCount', 'type': 'long'}, + 'name': {'key': 'name', 'type': 'str'}, + 'qualified_name': {'key': 'qualifiedName', 'type': 'str'}, + 'collections': {'key': 'collections', 'type': '[MongoDbCollectionInfo]'}, + 'supports_sharding': {'key': 'supportsSharding', 'type': 'bool'}, + } + + def __init__( + self, + *, + average_document_size: int, + data_size: int, + document_count: int, + name: str, + qualified_name: str, + collections: List["MongoDbCollectionInfo"], + supports_sharding: bool, + **kwargs + ): + super(MongoDbDatabaseInfo, self).__init__(average_document_size=average_document_size, data_size=data_size, document_count=document_count, name=name, qualified_name=qualified_name, **kwargs) + self.collections = collections + self.supports_sharding = supports_sharding + + +class MongoDbDatabaseProgress(MongoDbProgress): + """Describes the progress of a database. + + All required parameters must be populated in order to send to Azure. + + :param bytes_copied: Required. The number of document bytes copied during the Copying stage. + :type bytes_copied: long + :param documents_copied: Required. The number of documents copied during the Copying stage. + :type documents_copied: long + :param elapsed_time: Required. The elapsed time in the format [ddd.]hh:mm:ss[.fffffff] (i.e. + TimeSpan format). + :type elapsed_time: str + :param errors: Required. The errors and warnings that have occurred for the current object. The + keys are the error codes. + :type errors: dict[str, ~azure.mgmt.datamigration.models.MongoDbError] + :param events_pending: Required. The number of oplog events awaiting replay. + :type events_pending: long + :param events_replayed: Required. The number of oplog events replayed so far. + :type events_replayed: long + :param last_event_time: The timestamp of the last oplog event received, or null if no oplog + event has been received yet. + :type last_event_time: ~datetime.datetime + :param last_replay_time: The timestamp of the last oplog event replayed, or null if no oplog + event has been replayed yet. + :type last_replay_time: ~datetime.datetime + :param name: The name of the progress object. For a collection, this is the unqualified + collection name. For a database, this is the database name. For the overall migration, this is + null. + :type name: str + :param qualified_name: The qualified name of the progress object. For a collection, this is the + database-qualified name. For a database, this is the database name. For the overall migration, + this is null. + :type qualified_name: str + :param result_type: Required. The type of progress object.Constant filled by server. Possible + values include: "Migration", "Database", "Collection". + :type result_type: str or ~azure.mgmt.datamigration.models.MongoDbProgressResultType + :param state: Required. Possible values include: "NotStarted", "ValidatingInput", + "Initializing", "Restarting", "Copying", "InitialReplay", "Replaying", "Finalizing", + "Complete", "Canceled", "Failed". + :type state: str or ~azure.mgmt.datamigration.models.MongoDbMigrationState + :param total_bytes: Required. The total number of document bytes on the source at the beginning + of the Copying stage, or -1 if the total size was unknown. + :type total_bytes: long + :param total_documents: Required. The total number of documents on the source at the beginning + of the Copying stage, or -1 if the total count was unknown. + :type total_documents: long + :param collections: The progress of the collections in the database. The keys are the + unqualified names of the collections. + :type collections: dict[str, ~azure.mgmt.datamigration.models.MongoDbProgress] + """ + + _validation = { + 'bytes_copied': {'required': True}, + 'documents_copied': {'required': True}, + 'elapsed_time': {'required': True}, + 'errors': {'required': True}, + 'events_pending': {'required': True}, + 'events_replayed': {'required': True}, + 'result_type': {'required': True}, + 'state': {'required': True}, + 'total_bytes': {'required': True}, + 'total_documents': {'required': True}, + } + + _attribute_map = { + 'bytes_copied': {'key': 'bytesCopied', 'type': 'long'}, + 'documents_copied': {'key': 'documentsCopied', 'type': 'long'}, + 'elapsed_time': {'key': 'elapsedTime', 'type': 'str'}, + 'errors': {'key': 'errors', 'type': '{MongoDbError}'}, + 'events_pending': {'key': 'eventsPending', 'type': 'long'}, + 'events_replayed': {'key': 'eventsReplayed', 'type': 'long'}, + 'last_event_time': {'key': 'lastEventTime', 'type': 'iso-8601'}, + 'last_replay_time': {'key': 'lastReplayTime', 'type': 'iso-8601'}, + 'name': {'key': 'name', 'type': 'str'}, + 'qualified_name': {'key': 'qualifiedName', 'type': 'str'}, + 'result_type': {'key': 'resultType', 'type': 'str'}, + 'state': {'key': 'state', 'type': 'str'}, + 'total_bytes': {'key': 'totalBytes', 'type': 'long'}, + 'total_documents': {'key': 'totalDocuments', 'type': 'long'}, + 'collections': {'key': 'collections', 'type': '{MongoDbProgress}'}, + } + + def __init__( + self, + *, + bytes_copied: int, + documents_copied: int, + elapsed_time: str, + errors: Dict[str, "MongoDbError"], + events_pending: int, + events_replayed: int, + state: Union[str, "MongoDbMigrationState"], + total_bytes: int, + total_documents: int, + last_event_time: Optional[datetime.datetime] = None, + last_replay_time: Optional[datetime.datetime] = None, + name: Optional[str] = None, + qualified_name: Optional[str] = None, + collections: Optional[Dict[str, "MongoDbProgress"]] = None, + **kwargs + ): + super(MongoDbDatabaseProgress, self).__init__(bytes_copied=bytes_copied, documents_copied=documents_copied, elapsed_time=elapsed_time, errors=errors, events_pending=events_pending, events_replayed=events_replayed, last_event_time=last_event_time, last_replay_time=last_replay_time, name=name, qualified_name=qualified_name, state=state, total_bytes=total_bytes, total_documents=total_documents, **kwargs) + self.result_type = 'Database' # type: str + self.collections = collections + + +class MongoDbDatabaseSettings(msrest.serialization.Model): + """Describes how an individual MongoDB database should be migrated. + + All required parameters must be populated in order to send to Azure. + + :param collections: Required. The collections on the source database to migrate to the target. + The keys are the unqualified names of the collections. + :type collections: dict[str, ~azure.mgmt.datamigration.models.MongoDbCollectionSettings] + :param target_r_us: The RUs that should be configured on a CosmosDB target, or null to use the + default, or 0 if throughput should not be provisioned for the database. This has no effect on + non-CosmosDB targets. + :type target_r_us: int + """ + + _validation = { + 'collections': {'required': True}, + } + + _attribute_map = { + 'collections': {'key': 'collections', 'type': '{MongoDbCollectionSettings}'}, + 'target_r_us': {'key': 'targetRUs', 'type': 'int'}, + } + + def __init__( + self, + *, + collections: Dict[str, "MongoDbCollectionSettings"], + target_r_us: Optional[int] = None, + **kwargs + ): + super(MongoDbDatabaseSettings, self).__init__(**kwargs) + self.collections = collections + self.target_r_us = target_r_us + + +class MongoDbError(msrest.serialization.Model): + """Describes an error or warning that occurred during a MongoDB migration. + + :param code: The non-localized, machine-readable code that describes the error or warning. + :type code: str + :param count: The number of times the error or warning has occurred. + :type count: int + :param message: The localized, human-readable message that describes the error or warning. + :type message: str + :param type: The type of error or warning. Possible values include: "Error", "ValidationError", + "Warning". + :type type: str or ~azure.mgmt.datamigration.models.MongoDbErrorType + """ + + _attribute_map = { + 'code': {'key': 'code', 'type': 'str'}, + 'count': {'key': 'count', 'type': 'int'}, + 'message': {'key': 'message', 'type': 'str'}, + 'type': {'key': 'type', 'type': 'str'}, + } + + def __init__( + self, + *, + code: Optional[str] = None, + count: Optional[int] = None, + message: Optional[str] = None, + type: Optional[Union[str, "MongoDbErrorType"]] = None, + **kwargs + ): + super(MongoDbError, self).__init__(**kwargs) + self.code = code + self.count = count + self.message = message + self.type = type + + +class MongoDbFinishCommand(CommandProperties): + """Properties for the command that finishes a migration in whole or in part. + + Variables are only populated by the server, and will be ignored when sending a request. + + All required parameters must be populated in order to send to Azure. + + :param command_type: Required. Command type.Constant filled by server. Possible values + include: "Migrate.Sync.Complete.Database", "Migrate.SqlServer.AzureDbSqlMi.Complete", "cancel", + "finish", "restart". + :type command_type: str or ~azure.mgmt.datamigration.models.CommandType + :ivar errors: Array of errors. This is ignored if submitted. + :vartype errors: list[~azure.mgmt.datamigration.models.ODataError] + :ivar state: The state of the command. This is ignored if submitted. Possible values include: + "Unknown", "Accepted", "Running", "Succeeded", "Failed". + :vartype state: str or ~azure.mgmt.datamigration.models.CommandState + :param input: Command input. + :type input: ~azure.mgmt.datamigration.models.MongoDbFinishCommandInput + """ + + _validation = { + 'command_type': {'required': True}, + 'errors': {'readonly': True}, + 'state': {'readonly': True}, + } + + _attribute_map = { + 'command_type': {'key': 'commandType', 'type': 'str'}, + 'errors': {'key': 'errors', 'type': '[ODataError]'}, + 'state': {'key': 'state', 'type': 'str'}, + 'input': {'key': 'input', 'type': 'MongoDbFinishCommandInput'}, + } + + def __init__( + self, + *, + input: Optional["MongoDbFinishCommandInput"] = None, + **kwargs + ): + super(MongoDbFinishCommand, self).__init__(**kwargs) + self.command_type = 'finish' # type: str + self.input = input + + +class MongoDbFinishCommandInput(MongoDbCommandInput): + """Describes the input to the 'finish' MongoDB migration command. + + All required parameters must be populated in order to send to Azure. + + :param object_name: The qualified name of a database or collection to act upon, or null to act + upon the entire migration. + :type object_name: str + :param immediate: Required. If true, replication for the affected objects will be stopped + immediately. If false, the migrator will finish replaying queued events before finishing the + replication. + :type immediate: bool + """ + + _validation = { + 'immediate': {'required': True}, + } + + _attribute_map = { + 'object_name': {'key': 'objectName', 'type': 'str'}, + 'immediate': {'key': 'immediate', 'type': 'bool'}, + } + + def __init__( + self, + *, + immediate: bool, + object_name: Optional[str] = None, + **kwargs + ): + super(MongoDbFinishCommandInput, self).__init__(object_name=object_name, **kwargs) + self.immediate = immediate + + +class MongoDbMigrationProgress(MongoDbProgress): + """Describes the progress of the overall migration. + + All required parameters must be populated in order to send to Azure. + + :param bytes_copied: Required. The number of document bytes copied during the Copying stage. + :type bytes_copied: long + :param documents_copied: Required. The number of documents copied during the Copying stage. + :type documents_copied: long + :param elapsed_time: Required. The elapsed time in the format [ddd.]hh:mm:ss[.fffffff] (i.e. + TimeSpan format). + :type elapsed_time: str + :param errors: Required. The errors and warnings that have occurred for the current object. The + keys are the error codes. + :type errors: dict[str, ~azure.mgmt.datamigration.models.MongoDbError] + :param events_pending: Required. The number of oplog events awaiting replay. + :type events_pending: long + :param events_replayed: Required. The number of oplog events replayed so far. + :type events_replayed: long + :param last_event_time: The timestamp of the last oplog event received, or null if no oplog + event has been received yet. + :type last_event_time: ~datetime.datetime + :param last_replay_time: The timestamp of the last oplog event replayed, or null if no oplog + event has been replayed yet. + :type last_replay_time: ~datetime.datetime + :param name: The name of the progress object. For a collection, this is the unqualified + collection name. For a database, this is the database name. For the overall migration, this is + null. + :type name: str + :param qualified_name: The qualified name of the progress object. For a collection, this is the + database-qualified name. For a database, this is the database name. For the overall migration, + this is null. + :type qualified_name: str + :param result_type: Required. The type of progress object.Constant filled by server. Possible + values include: "Migration", "Database", "Collection". + :type result_type: str or ~azure.mgmt.datamigration.models.MongoDbProgressResultType + :param state: Required. Possible values include: "NotStarted", "ValidatingInput", + "Initializing", "Restarting", "Copying", "InitialReplay", "Replaying", "Finalizing", + "Complete", "Canceled", "Failed". + :type state: str or ~azure.mgmt.datamigration.models.MongoDbMigrationState + :param total_bytes: Required. The total number of document bytes on the source at the beginning + of the Copying stage, or -1 if the total size was unknown. + :type total_bytes: long + :param total_documents: Required. The total number of documents on the source at the beginning + of the Copying stage, or -1 if the total count was unknown. + :type total_documents: long + :param databases: The progress of the databases in the migration. The keys are the names of the + databases. + :type databases: dict[str, ~azure.mgmt.datamigration.models.MongoDbDatabaseProgress] + """ + + _validation = { + 'bytes_copied': {'required': True}, + 'documents_copied': {'required': True}, + 'elapsed_time': {'required': True}, + 'errors': {'required': True}, + 'events_pending': {'required': True}, + 'events_replayed': {'required': True}, + 'result_type': {'required': True}, + 'state': {'required': True}, + 'total_bytes': {'required': True}, + 'total_documents': {'required': True}, + } + + _attribute_map = { + 'bytes_copied': {'key': 'bytesCopied', 'type': 'long'}, + 'documents_copied': {'key': 'documentsCopied', 'type': 'long'}, + 'elapsed_time': {'key': 'elapsedTime', 'type': 'str'}, + 'errors': {'key': 'errors', 'type': '{MongoDbError}'}, + 'events_pending': {'key': 'eventsPending', 'type': 'long'}, + 'events_replayed': {'key': 'eventsReplayed', 'type': 'long'}, + 'last_event_time': {'key': 'lastEventTime', 'type': 'iso-8601'}, + 'last_replay_time': {'key': 'lastReplayTime', 'type': 'iso-8601'}, + 'name': {'key': 'name', 'type': 'str'}, + 'qualified_name': {'key': 'qualifiedName', 'type': 'str'}, + 'result_type': {'key': 'resultType', 'type': 'str'}, + 'state': {'key': 'state', 'type': 'str'}, + 'total_bytes': {'key': 'totalBytes', 'type': 'long'}, + 'total_documents': {'key': 'totalDocuments', 'type': 'long'}, + 'databases': {'key': 'databases', 'type': '{MongoDbDatabaseProgress}'}, + } + + def __init__( + self, + *, + bytes_copied: int, + documents_copied: int, + elapsed_time: str, + errors: Dict[str, "MongoDbError"], + events_pending: int, + events_replayed: int, + state: Union[str, "MongoDbMigrationState"], + total_bytes: int, + total_documents: int, + last_event_time: Optional[datetime.datetime] = None, + last_replay_time: Optional[datetime.datetime] = None, + name: Optional[str] = None, + qualified_name: Optional[str] = None, + databases: Optional[Dict[str, "MongoDbDatabaseProgress"]] = None, + **kwargs + ): + super(MongoDbMigrationProgress, self).__init__(bytes_copied=bytes_copied, documents_copied=documents_copied, elapsed_time=elapsed_time, errors=errors, events_pending=events_pending, events_replayed=events_replayed, last_event_time=last_event_time, last_replay_time=last_replay_time, name=name, qualified_name=qualified_name, state=state, total_bytes=total_bytes, total_documents=total_documents, **kwargs) + self.result_type = 'Migration' # type: str + self.databases = databases + + +class MongoDbMigrationSettings(msrest.serialization.Model): + """Describes how a MongoDB data migration should be performed. + + All required parameters must be populated in order to send to Azure. + + :param boost_r_us: The RU limit on a CosmosDB target that collections will be temporarily + increased to (if lower) during the initial copy of a migration, from 10,000 to 1,000,000, or 0 + to use the default boost (which is generally the maximum), or null to not boost the RUs. This + setting has no effect on non-CosmosDB targets. + :type boost_r_us: int + :param databases: Required. The databases on the source cluster to migrate to the target. The + keys are the names of the databases. + :type databases: dict[str, ~azure.mgmt.datamigration.models.MongoDbDatabaseSettings] + :param replication: Describes how changes will be replicated from the source to the target. The + default is OneTime. Possible values include: "Disabled", "OneTime", "Continuous". + :type replication: str or ~azure.mgmt.datamigration.models.MongoDbReplication + :param source: Required. Settings used to connect to the source cluster. + :type source: ~azure.mgmt.datamigration.models.MongoDbConnectionInfo + :param target: Required. Settings used to connect to the target cluster. + :type target: ~azure.mgmt.datamigration.models.MongoDbConnectionInfo + :param throttling: Settings used to limit the resource usage of the migration. + :type throttling: ~azure.mgmt.datamigration.models.MongoDbThrottlingSettings + """ + + _validation = { + 'databases': {'required': True}, + 'source': {'required': True}, + 'target': {'required': True}, + } + + _attribute_map = { + 'boost_r_us': {'key': 'boostRUs', 'type': 'int'}, + 'databases': {'key': 'databases', 'type': '{MongoDbDatabaseSettings}'}, + 'replication': {'key': 'replication', 'type': 'str'}, + 'source': {'key': 'source', 'type': 'MongoDbConnectionInfo'}, + 'target': {'key': 'target', 'type': 'MongoDbConnectionInfo'}, + 'throttling': {'key': 'throttling', 'type': 'MongoDbThrottlingSettings'}, + } + + def __init__( + self, + *, + databases: Dict[str, "MongoDbDatabaseSettings"], + source: "MongoDbConnectionInfo", + target: "MongoDbConnectionInfo", + boost_r_us: Optional[int] = None, + replication: Optional[Union[str, "MongoDbReplication"]] = None, + throttling: Optional["MongoDbThrottlingSettings"] = None, + **kwargs + ): + super(MongoDbMigrationSettings, self).__init__(**kwargs) + self.boost_r_us = boost_r_us + self.databases = databases + self.replication = replication + self.source = source + self.target = target + self.throttling = throttling + + +class MongoDbRestartCommand(CommandProperties): + """Properties for the command that restarts a migration in whole or in part. + + Variables are only populated by the server, and will be ignored when sending a request. + + All required parameters must be populated in order to send to Azure. + + :param command_type: Required. Command type.Constant filled by server. Possible values + include: "Migrate.Sync.Complete.Database", "Migrate.SqlServer.AzureDbSqlMi.Complete", "cancel", + "finish", "restart". + :type command_type: str or ~azure.mgmt.datamigration.models.CommandType + :ivar errors: Array of errors. This is ignored if submitted. + :vartype errors: list[~azure.mgmt.datamigration.models.ODataError] + :ivar state: The state of the command. This is ignored if submitted. Possible values include: + "Unknown", "Accepted", "Running", "Succeeded", "Failed". + :vartype state: str or ~azure.mgmt.datamigration.models.CommandState + :param input: Command input. + :type input: ~azure.mgmt.datamigration.models.MongoDbCommandInput + """ + + _validation = { + 'command_type': {'required': True}, + 'errors': {'readonly': True}, + 'state': {'readonly': True}, + } + + _attribute_map = { + 'command_type': {'key': 'commandType', 'type': 'str'}, + 'errors': {'key': 'errors', 'type': '[ODataError]'}, + 'state': {'key': 'state', 'type': 'str'}, + 'input': {'key': 'input', 'type': 'MongoDbCommandInput'}, + } + + def __init__( + self, + *, + input: Optional["MongoDbCommandInput"] = None, + **kwargs + ): + super(MongoDbRestartCommand, self).__init__(**kwargs) + self.command_type = 'restart' # type: str + self.input = input + + +class MongoDbShardKeyField(msrest.serialization.Model): + """Describes a field reference within a MongoDB shard key. + + All required parameters must be populated in order to send to Azure. + + :param name: Required. The name of the field. + :type name: str + :param order: Required. The field ordering. Possible values include: "Forward", "Reverse", + "Hashed". + :type order: str or ~azure.mgmt.datamigration.models.MongoDbShardKeyOrder + """ + + _validation = { + 'name': {'required': True}, + 'order': {'required': True}, + } + + _attribute_map = { + 'name': {'key': 'name', 'type': 'str'}, + 'order': {'key': 'order', 'type': 'str'}, + } + + def __init__( + self, + *, + name: str, + order: Union[str, "MongoDbShardKeyOrder"], + **kwargs + ): + super(MongoDbShardKeyField, self).__init__(**kwargs) + self.name = name + self.order = order + + +class MongoDbShardKeyInfo(msrest.serialization.Model): + """Describes a MongoDB shard key. + + All required parameters must be populated in order to send to Azure. + + :param fields: Required. The fields within the shard key. + :type fields: list[~azure.mgmt.datamigration.models.MongoDbShardKeyField] + :param is_unique: Required. Whether the shard key is unique. + :type is_unique: bool + """ + + _validation = { + 'fields': {'required': True}, + 'is_unique': {'required': True}, + } + + _attribute_map = { + 'fields': {'key': 'fields', 'type': '[MongoDbShardKeyField]'}, + 'is_unique': {'key': 'isUnique', 'type': 'bool'}, + } + + def __init__( + self, + *, + fields: List["MongoDbShardKeyField"], + is_unique: bool, + **kwargs + ): + super(MongoDbShardKeyInfo, self).__init__(**kwargs) + self.fields = fields + self.is_unique = is_unique + + +class MongoDbShardKeySetting(msrest.serialization.Model): + """Describes a MongoDB shard key. + + All required parameters must be populated in order to send to Azure. + + :param fields: Required. The fields within the shard key. + :type fields: list[~azure.mgmt.datamigration.models.MongoDbShardKeyField] + :param is_unique: Required. Whether the shard key is unique. + :type is_unique: bool + """ + + _validation = { + 'fields': {'required': True}, + 'is_unique': {'required': True}, + } + + _attribute_map = { + 'fields': {'key': 'fields', 'type': '[MongoDbShardKeyField]'}, + 'is_unique': {'key': 'isUnique', 'type': 'bool'}, + } + + def __init__( + self, + *, + fields: List["MongoDbShardKeyField"], + is_unique: bool, + **kwargs + ): + super(MongoDbShardKeySetting, self).__init__(**kwargs) + self.fields = fields + self.is_unique = is_unique + + +class MongoDbThrottlingSettings(msrest.serialization.Model): + """Specifies resource limits for the migration. + + :param min_free_cpu: The percentage of CPU time that the migrator will try to avoid using, from + 0 to 100. + :type min_free_cpu: int + :param min_free_memory_mb: The number of megabytes of RAM that the migrator will try to avoid + using. + :type min_free_memory_mb: int + :param max_parallelism: The maximum number of work items (e.g. collection copies) that will be + processed in parallel. + :type max_parallelism: int + """ + + _attribute_map = { + 'min_free_cpu': {'key': 'minFreeCpu', 'type': 'int'}, + 'min_free_memory_mb': {'key': 'minFreeMemoryMb', 'type': 'int'}, + 'max_parallelism': {'key': 'maxParallelism', 'type': 'int'}, + } + + def __init__( + self, + *, + min_free_cpu: Optional[int] = None, + min_free_memory_mb: Optional[int] = None, + max_parallelism: Optional[int] = None, + **kwargs + ): + super(MongoDbThrottlingSettings, self).__init__(**kwargs) + self.min_free_cpu = min_free_cpu + self.min_free_memory_mb = min_free_memory_mb + self.max_parallelism = max_parallelism + + +class MySqlConnectionInfo(ConnectionInfo): + """Information for connecting to MySQL server. + + All required parameters must be populated in order to send to Azure. + + :param type: Required. Type of connection info.Constant filled by server. + :type type: str + :param user_name: User name. + :type user_name: str + :param password: Password credential. + :type password: str + :param server_name: Required. Name of the server. + :type server_name: str + :param data_source: Data source. + :type data_source: str + :param port: Required. Port for Server. + :type port: int + :param encrypt_connection: Whether to encrypt the connection. + :type encrypt_connection: bool + """ + + _validation = { + 'type': {'required': True}, + 'server_name': {'required': True}, + 'port': {'required': True}, + } + + _attribute_map = { + 'type': {'key': 'type', 'type': 'str'}, + 'user_name': {'key': 'userName', 'type': 'str'}, + 'password': {'key': 'password', 'type': 'str'}, + 'server_name': {'key': 'serverName', 'type': 'str'}, + 'data_source': {'key': 'dataSource', 'type': 'str'}, + 'port': {'key': 'port', 'type': 'int'}, + 'encrypt_connection': {'key': 'encryptConnection', 'type': 'bool'}, + } + + def __init__( + self, + *, + server_name: str, + port: int, + user_name: Optional[str] = None, + password: Optional[str] = None, + data_source: Optional[str] = None, + encrypt_connection: Optional[bool] = True, + **kwargs + ): + super(MySqlConnectionInfo, self).__init__(user_name=user_name, password=password, **kwargs) + self.type = 'MySqlConnectionInfo' # type: str + self.server_name = server_name + self.data_source = data_source + self.port = port + self.encrypt_connection = encrypt_connection + + +class NameAvailabilityRequest(msrest.serialization.Model): + """A resource type and proposed name. + + :param name: The proposed resource name. + :type name: str + :param type: The resource type chain (e.g. virtualMachines/extensions). + :type type: str + """ + + _attribute_map = { + 'name': {'key': 'name', 'type': 'str'}, + 'type': {'key': 'type', 'type': 'str'}, + } + + def __init__( + self, + *, + name: Optional[str] = None, + type: Optional[str] = None, + **kwargs + ): + super(NameAvailabilityRequest, self).__init__(**kwargs) + self.name = name + self.type = type + + +class NameAvailabilityResponse(msrest.serialization.Model): + """Indicates whether a proposed resource name is available. + + :param name_available: If true, the name is valid and available. If false, 'reason' describes + why not. + :type name_available: bool + :param reason: The reason why the name is not available, if nameAvailable is false. Possible + values include: "AlreadyExists", "Invalid". + :type reason: str or ~azure.mgmt.datamigration.models.NameCheckFailureReason + :param message: The localized reason why the name is not available, if nameAvailable is false. + :type message: str + """ + + _attribute_map = { + 'name_available': {'key': 'nameAvailable', 'type': 'bool'}, + 'reason': {'key': 'reason', 'type': 'str'}, + 'message': {'key': 'message', 'type': 'str'}, + } + + def __init__( + self, + *, + name_available: Optional[bool] = None, + reason: Optional[Union[str, "NameCheckFailureReason"]] = None, + message: Optional[str] = None, + **kwargs + ): + super(NameAvailabilityResponse, self).__init__(**kwargs) + self.name_available = name_available + self.reason = reason + self.message = message + + +class NodeMonitoringData(msrest.serialization.Model): + """NodeMonitoringData. + + Variables are only populated by the server, and will be ignored when sending a request. + + :ivar additional_properties: Unmatched properties from the message are deserialized in this + collection. + :vartype additional_properties: dict[str, object] + :ivar node_name: Name of the integration runtime node. + :vartype node_name: str + :ivar available_memory_in_mb: Available memory (MB) on the integration runtime node. + :vartype available_memory_in_mb: int + :ivar cpu_utilization: CPU percentage on the integration runtime node. + :vartype cpu_utilization: int + :ivar concurrent_jobs_limit: Maximum concurrent jobs on the integration runtime node. + :vartype concurrent_jobs_limit: int + :ivar concurrent_jobs_running: The number of jobs currently running on the integration runtime + node. + :vartype concurrent_jobs_running: int + :ivar max_concurrent_jobs: The maximum concurrent jobs in this integration runtime. + :vartype max_concurrent_jobs: int + :ivar sent_bytes: Sent bytes on the integration runtime node. + :vartype sent_bytes: float + :ivar received_bytes: Received bytes on the integration runtime node. + :vartype received_bytes: float + """ + + _validation = { + 'additional_properties': {'readonly': True}, + 'node_name': {'readonly': True}, + 'available_memory_in_mb': {'readonly': True}, + 'cpu_utilization': {'readonly': True}, + 'concurrent_jobs_limit': {'readonly': True}, + 'concurrent_jobs_running': {'readonly': True}, + 'max_concurrent_jobs': {'readonly': True}, + 'sent_bytes': {'readonly': True}, + 'received_bytes': {'readonly': True}, + } + + _attribute_map = { + 'additional_properties': {'key': 'additionalProperties', 'type': '{object}'}, + 'node_name': {'key': 'nodeName', 'type': 'str'}, + 'available_memory_in_mb': {'key': 'availableMemoryInMB', 'type': 'int'}, + 'cpu_utilization': {'key': 'cpuUtilization', 'type': 'int'}, + 'concurrent_jobs_limit': {'key': 'concurrentJobsLimit', 'type': 'int'}, + 'concurrent_jobs_running': {'key': 'concurrentJobsRunning', 'type': 'int'}, + 'max_concurrent_jobs': {'key': 'maxConcurrentJobs', 'type': 'int'}, + 'sent_bytes': {'key': 'sentBytes', 'type': 'float'}, + 'received_bytes': {'key': 'receivedBytes', 'type': 'float'}, + } + + def __init__( + self, + **kwargs + ): + super(NodeMonitoringData, self).__init__(**kwargs) + self.additional_properties = None + self.node_name = None + self.available_memory_in_mb = None + self.cpu_utilization = None + self.concurrent_jobs_limit = None + self.concurrent_jobs_running = None + self.max_concurrent_jobs = None + self.sent_bytes = None + self.received_bytes = None + + +class NonSqlDataMigrationTable(msrest.serialization.Model): + """Defines metadata for table to be migrated. + + :param source_name: Source table name. + :type source_name: str + """ + + _attribute_map = { + 'source_name': {'key': 'sourceName', 'type': 'str'}, + } + + def __init__( + self, + *, + source_name: Optional[str] = None, + **kwargs + ): + super(NonSqlDataMigrationTable, self).__init__(**kwargs) + self.source_name = source_name + + +class NonSqlDataMigrationTableResult(msrest.serialization.Model): + """Object used to report the data migration results of a table. + + Variables are only populated by the server, and will be ignored when sending a request. + + :ivar result_code: Result code of the data migration. Possible values include: "Initial", + "Completed", "ObjectNotExistsInSource", "ObjectNotExistsInTarget", + "TargetObjectIsInaccessible", "FatalError". + :vartype result_code: str or ~azure.mgmt.datamigration.models.DataMigrationResultCode + :ivar source_name: Name of the source table. + :vartype source_name: str + :ivar target_name: Name of the target table. + :vartype target_name: str + :ivar source_row_count: Number of rows in the source table. + :vartype source_row_count: long + :ivar target_row_count: Number of rows in the target table. + :vartype target_row_count: long + :ivar elapsed_time_in_miliseconds: Time taken to migrate the data. + :vartype elapsed_time_in_miliseconds: float + :ivar errors: List of errors, if any, during migration. + :vartype errors: list[~azure.mgmt.datamigration.models.DataMigrationError] + """ + + _validation = { + 'result_code': {'readonly': True}, + 'source_name': {'readonly': True}, + 'target_name': {'readonly': True}, + 'source_row_count': {'readonly': True}, + 'target_row_count': {'readonly': True}, + 'elapsed_time_in_miliseconds': {'readonly': True}, + 'errors': {'readonly': True}, + } + + _attribute_map = { + 'result_code': {'key': 'resultCode', 'type': 'str'}, + 'source_name': {'key': 'sourceName', 'type': 'str'}, + 'target_name': {'key': 'targetName', 'type': 'str'}, + 'source_row_count': {'key': 'sourceRowCount', 'type': 'long'}, + 'target_row_count': {'key': 'targetRowCount', 'type': 'long'}, + 'elapsed_time_in_miliseconds': {'key': 'elapsedTimeInMiliseconds', 'type': 'float'}, + 'errors': {'key': 'errors', 'type': '[DataMigrationError]'}, + } + + def __init__( + self, + **kwargs + ): + super(NonSqlDataMigrationTableResult, self).__init__(**kwargs) + self.result_code = None + self.source_name = None + self.target_name = None + self.source_row_count = None + self.target_row_count = None + self.elapsed_time_in_miliseconds = None + self.errors = None + + +class NonSqlMigrationTaskInput(msrest.serialization.Model): + """Base class for non sql migration task input. + + All required parameters must be populated in order to send to Azure. + + :param target_connection_info: Required. Information for connecting to target. + :type target_connection_info: ~azure.mgmt.datamigration.models.SqlConnectionInfo + :param target_database_name: Required. Target database name. + :type target_database_name: str + :param project_name: Required. Name of the migration project. + :type project_name: str + :param project_location: Required. A URL that points to the drop location to access project + artifacts. + :type project_location: str + :param selected_tables: Required. Metadata of the tables selected for migration. + :type selected_tables: list[~azure.mgmt.datamigration.models.NonSqlDataMigrationTable] + """ + + _validation = { + 'target_connection_info': {'required': True}, + 'target_database_name': {'required': True}, + 'project_name': {'required': True}, + 'project_location': {'required': True}, + 'selected_tables': {'required': True}, + } + + _attribute_map = { + 'target_connection_info': {'key': 'targetConnectionInfo', 'type': 'SqlConnectionInfo'}, + 'target_database_name': {'key': 'targetDatabaseName', 'type': 'str'}, + 'project_name': {'key': 'projectName', 'type': 'str'}, + 'project_location': {'key': 'projectLocation', 'type': 'str'}, + 'selected_tables': {'key': 'selectedTables', 'type': '[NonSqlDataMigrationTable]'}, + } + + def __init__( + self, + *, + target_connection_info: "SqlConnectionInfo", + target_database_name: str, + project_name: str, + project_location: str, + selected_tables: List["NonSqlDataMigrationTable"], + **kwargs + ): + super(NonSqlMigrationTaskInput, self).__init__(**kwargs) + self.target_connection_info = target_connection_info + self.target_database_name = target_database_name + self.project_name = project_name + self.project_location = project_location + self.selected_tables = selected_tables + + +class NonSqlMigrationTaskOutput(msrest.serialization.Model): + """Base class for non sql migration task output. + + Variables are only populated by the server, and will be ignored when sending a request. + + :ivar id: Result identifier. + :vartype id: str + :ivar started_on: Migration start time. + :vartype started_on: ~datetime.datetime + :ivar ended_on: Migration end time. + :vartype ended_on: ~datetime.datetime + :ivar status: Current state of migration. Possible values include: "Default", "Connecting", + "SourceAndTargetSelected", "SelectLogins", "Configured", "Running", "Error", "Stopped", + "Completed", "CompletedWithWarnings". + :vartype status: str or ~azure.mgmt.datamigration.models.MigrationStatus + :ivar data_migration_table_results: Results of the migration. The key contains the table name + and the value the table result object. + :vartype data_migration_table_results: str + :ivar progress_message: Message about the progress of the migration. + :vartype progress_message: str + :ivar source_server_name: Name of source server. + :vartype source_server_name: str + :ivar target_server_name: Name of target server. + :vartype target_server_name: str + """ + + _validation = { + 'id': {'readonly': True}, + 'started_on': {'readonly': True}, + 'ended_on': {'readonly': True}, + 'status': {'readonly': True}, + 'data_migration_table_results': {'readonly': True}, + 'progress_message': {'readonly': True}, + 'source_server_name': {'readonly': True}, + 'target_server_name': {'readonly': True}, + } + + _attribute_map = { + 'id': {'key': 'id', 'type': 'str'}, + 'started_on': {'key': 'startedOn', 'type': 'iso-8601'}, + 'ended_on': {'key': 'endedOn', 'type': 'iso-8601'}, + 'status': {'key': 'status', 'type': 'str'}, + 'data_migration_table_results': {'key': 'dataMigrationTableResults', 'type': 'str'}, + 'progress_message': {'key': 'progressMessage', 'type': 'str'}, + 'source_server_name': {'key': 'sourceServerName', 'type': 'str'}, + 'target_server_name': {'key': 'targetServerName', 'type': 'str'}, + } + + def __init__( + self, + **kwargs + ): + super(NonSqlMigrationTaskOutput, self).__init__(**kwargs) + self.id = None + self.started_on = None + self.ended_on = None + self.status = None + self.data_migration_table_results = None + self.progress_message = None + self.source_server_name = None + self.target_server_name = None + + +class ODataError(msrest.serialization.Model): + """Error information in OData format. + + :param code: The machine-readable description of the error, such as 'InvalidRequest' or + 'InternalServerError'. + :type code: str + :param message: The human-readable description of the error. + :type message: str + :param details: Inner errors that caused this error. + :type details: list[~azure.mgmt.datamigration.models.ODataError] + """ + + _attribute_map = { + 'code': {'key': 'code', 'type': 'str'}, + 'message': {'key': 'message', 'type': 'str'}, + 'details': {'key': 'details', 'type': '[ODataError]'}, + } + + def __init__( + self, + *, + code: Optional[str] = None, + message: Optional[str] = None, + details: Optional[List["ODataError"]] = None, + **kwargs + ): + super(ODataError, self).__init__(**kwargs) + self.code = code + self.message = message + self.details = details + + +class OfflineConfiguration(msrest.serialization.Model): + """Offline configuration. + + :param offline: Offline migration. + :type offline: bool + :param last_backup_name: Last backup name for offline migration. This is optional for + migrations from file share. If it is not provided, then the service will determine the last + backup file name based on latest backup files present in file share. + :type last_backup_name: str + """ + + _attribute_map = { + 'offline': {'key': 'offline', 'type': 'bool'}, + 'last_backup_name': {'key': 'lastBackupName', 'type': 'str'}, + } + + def __init__( + self, + *, + offline: Optional[bool] = None, + last_backup_name: Optional[str] = None, + **kwargs + ): + super(OfflineConfiguration, self).__init__(**kwargs) + self.offline = offline + self.last_backup_name = last_backup_name + + +class OperationListResult(msrest.serialization.Model): + """Result of the request to list SQL operations. + + Variables are only populated by the server, and will be ignored when sending a request. + + :ivar value: + :vartype value: list[~azure.mgmt.datamigration.models.OperationsDefinition] + :ivar next_link: + :vartype next_link: str + """ + + _validation = { + 'value': {'readonly': True}, + 'next_link': {'readonly': True}, + } + + _attribute_map = { + 'value': {'key': 'value', 'type': '[OperationsDefinition]'}, + 'next_link': {'key': 'nextLink', 'type': 'str'}, + } + + def __init__( + self, + **kwargs + ): + super(OperationListResult, self).__init__(**kwargs) + self.value = None + self.next_link = None + + +class OperationsDefinition(msrest.serialization.Model): + """OperationsDefinition. + + Variables are only populated by the server, and will be ignored when sending a request. + + :ivar name: + :vartype name: str + :param is_data_action: Indicates whether the operation is a data action. + :type is_data_action: bool + :ivar display: + :vartype display: ~azure.mgmt.datamigration.models.OperationsDisplayDefinition + :ivar origin: Possible values include: "user", "system". + :vartype origin: str or ~azure.mgmt.datamigration.models.OperationOrigin + :ivar properties: Dictionary of :code:``. + :vartype properties: dict[str, object] + """ + + _validation = { + 'name': {'readonly': True}, + 'display': {'readonly': True}, + 'origin': {'readonly': True}, + 'properties': {'readonly': True}, + } + + _attribute_map = { + 'name': {'key': 'name', 'type': 'str'}, + 'is_data_action': {'key': 'isDataAction', 'type': 'bool'}, + 'display': {'key': 'display', 'type': 'OperationsDisplayDefinition'}, + 'origin': {'key': 'origin', 'type': 'str'}, + 'properties': {'key': 'properties', 'type': '{object}'}, + } + + def __init__( + self, + *, + is_data_action: Optional[bool] = None, + **kwargs + ): + super(OperationsDefinition, self).__init__(**kwargs) + self.name = None + self.is_data_action = is_data_action + self.display = None + self.origin = None + self.properties = None + + +class OperationsDisplayDefinition(msrest.serialization.Model): + """OperationsDisplayDefinition. + + Variables are only populated by the server, and will be ignored when sending a request. + + :ivar provider: + :vartype provider: str + :ivar resource: + :vartype resource: str + :ivar operation: + :vartype operation: str + :ivar description: + :vartype description: str + """ + + _validation = { + 'provider': {'readonly': True}, + 'resource': {'readonly': True}, + 'operation': {'readonly': True}, + 'description': {'readonly': True}, + } + + _attribute_map = { + 'provider': {'key': 'provider', 'type': 'str'}, + 'resource': {'key': 'resource', 'type': 'str'}, + 'operation': {'key': 'operation', 'type': 'str'}, + 'description': {'key': 'description', 'type': 'str'}, + } + + def __init__( + self, + **kwargs + ): + super(OperationsDisplayDefinition, self).__init__(**kwargs) + self.provider = None + self.resource = None + self.operation = None + self.description = None + + +class OracleConnectionInfo(ConnectionInfo): + """Information for connecting to Oracle server. + + All required parameters must be populated in order to send to Azure. + + :param type: Required. Type of connection info.Constant filled by server. + :type type: str + :param user_name: User name. + :type user_name: str + :param password: Password credential. + :type password: str + :param data_source: Required. EZConnect or TNSName connection string. + :type data_source: str + """ + + _validation = { + 'type': {'required': True}, + 'data_source': {'required': True}, + } + + _attribute_map = { + 'type': {'key': 'type', 'type': 'str'}, + 'user_name': {'key': 'userName', 'type': 'str'}, + 'password': {'key': 'password', 'type': 'str'}, + 'data_source': {'key': 'dataSource', 'type': 'str'}, + } + + def __init__( + self, + *, + data_source: str, + user_name: Optional[str] = None, + password: Optional[str] = None, + **kwargs + ): + super(OracleConnectionInfo, self).__init__(user_name=user_name, password=password, **kwargs) + self.type = 'OracleConnectionInfo' # type: str + self.data_source = data_source + + +class OracleOciDriverInfo(msrest.serialization.Model): + """Information about an Oracle OCI driver. + + Variables are only populated by the server, and will be ignored when sending a request. + + :ivar driver_name: The name of the driver package. + :vartype driver_name: str + :ivar driver_size: The size in bytes of the driver package. + :vartype driver_size: str + :ivar archive_checksum: The MD5 Base64 encoded checksum for the driver package. + :vartype archive_checksum: str + :ivar oracle_checksum: The checksum for the driver package provided by Oracle. + :vartype oracle_checksum: str + :ivar assembly_version: Version listed in the OCI assembly 'oci.dll'. + :vartype assembly_version: str + :ivar supported_oracle_versions: List of Oracle database versions supported by this driver. + Only major minor of the version is listed. + :vartype supported_oracle_versions: list[str] + """ + + _validation = { + 'driver_name': {'readonly': True}, + 'driver_size': {'readonly': True}, + 'archive_checksum': {'readonly': True}, + 'oracle_checksum': {'readonly': True}, + 'assembly_version': {'readonly': True}, + 'supported_oracle_versions': {'readonly': True}, + } + + _attribute_map = { + 'driver_name': {'key': 'driverName', 'type': 'str'}, + 'driver_size': {'key': 'driverSize', 'type': 'str'}, + 'archive_checksum': {'key': 'archiveChecksum', 'type': 'str'}, + 'oracle_checksum': {'key': 'oracleChecksum', 'type': 'str'}, + 'assembly_version': {'key': 'assemblyVersion', 'type': 'str'}, + 'supported_oracle_versions': {'key': 'supportedOracleVersions', 'type': '[str]'}, + } + + def __init__( + self, + **kwargs + ): + super(OracleOciDriverInfo, self).__init__(**kwargs) + self.driver_name = None + self.driver_size = None + self.archive_checksum = None + self.oracle_checksum = None + self.assembly_version = None + self.supported_oracle_versions = None + + +class OrphanedUserInfo(msrest.serialization.Model): + """Information of orphaned users on the SQL server database. + + :param name: Name of the orphaned user. + :type name: str + :param database_name: Parent database of the user. + :type database_name: str + """ + + _attribute_map = { + 'name': {'key': 'name', 'type': 'str'}, + 'database_name': {'key': 'databaseName', 'type': 'str'}, + } + + def __init__( + self, + *, + name: Optional[str] = None, + database_name: Optional[str] = None, + **kwargs + ): + super(OrphanedUserInfo, self).__init__(**kwargs) + self.name = name + self.database_name = database_name + + +class PostgreSqlConnectionInfo(ConnectionInfo): + """Information for connecting to PostgreSQL server. + + All required parameters must be populated in order to send to Azure. + + :param type: Required. Type of connection info.Constant filled by server. + :type type: str + :param user_name: User name. + :type user_name: str + :param password: Password credential. + :type password: str + :param server_name: Required. Name of the server. + :type server_name: str + :param data_source: Data source. + :type data_source: str + :param server_version: server version. + :type server_version: str + :param database_name: Name of the database. + :type database_name: str + :param port: Required. Port for Server. + :type port: int + :param encrypt_connection: Whether to encrypt the connection. + :type encrypt_connection: bool + :param trust_server_certificate: Whether to trust the server certificate. + :type trust_server_certificate: bool + """ + + _validation = { + 'type': {'required': True}, + 'server_name': {'required': True}, + 'port': {'required': True}, + } + + _attribute_map = { + 'type': {'key': 'type', 'type': 'str'}, + 'user_name': {'key': 'userName', 'type': 'str'}, + 'password': {'key': 'password', 'type': 'str'}, + 'server_name': {'key': 'serverName', 'type': 'str'}, + 'data_source': {'key': 'dataSource', 'type': 'str'}, + 'server_version': {'key': 'serverVersion', 'type': 'str'}, + 'database_name': {'key': 'databaseName', 'type': 'str'}, + 'port': {'key': 'port', 'type': 'int'}, + 'encrypt_connection': {'key': 'encryptConnection', 'type': 'bool'}, + 'trust_server_certificate': {'key': 'trustServerCertificate', 'type': 'bool'}, + } + + def __init__( + self, + *, + server_name: str, + port: int, + user_name: Optional[str] = None, + password: Optional[str] = None, + data_source: Optional[str] = None, + server_version: Optional[str] = None, + database_name: Optional[str] = None, + encrypt_connection: Optional[bool] = True, + trust_server_certificate: Optional[bool] = False, + **kwargs + ): + super(PostgreSqlConnectionInfo, self).__init__(user_name=user_name, password=password, **kwargs) + self.type = 'PostgreSqlConnectionInfo' # type: str + self.server_name = server_name + self.data_source = data_source + self.server_version = server_version + self.database_name = database_name + self.port = port + self.encrypt_connection = encrypt_connection + self.trust_server_certificate = trust_server_certificate + + +class Project(TrackedResource): + """A project resource. + + Variables are only populated by the server, and will be ignored when sending a request. + + :param location: + :type location: str + :param tags: A set of tags. Dictionary of :code:``. + :type tags: dict[str, str] + :ivar id: + :vartype id: str + :ivar name: + :vartype name: str + :ivar type: + :vartype type: str + :ivar system_data: + :vartype system_data: ~azure.mgmt.datamigration.models.SystemData + :param e_tag: HTTP strong entity tag value. This is ignored if submitted. + :type e_tag: str + :param source_platform: Source platform for the project. Possible values include: "SQL", + "MySQL", "PostgreSql", "MongoDb", "Unknown". + :type source_platform: str or ~azure.mgmt.datamigration.models.ProjectSourcePlatform + :param azure_authentication_info: Field that defines the Azure active directory application + info, used to connect to the target Azure resource. + :type azure_authentication_info: str + :param target_platform: Target platform for the project. Possible values include: "SQLDB", + "SQLMI", "AzureDbForMySql", "AzureDbForPostgreSql", "MongoDb", "Unknown". + :type target_platform: str or ~azure.mgmt.datamigration.models.ProjectTargetPlatform + :ivar creation_time: UTC Date and time when project was created. + :vartype creation_time: ~datetime.datetime + :param source_connection_info: Information for connecting to source. + :type source_connection_info: ~azure.mgmt.datamigration.models.ConnectionInfo + :param target_connection_info: Information for connecting to target. + :type target_connection_info: ~azure.mgmt.datamigration.models.ConnectionInfo + :param databases_info: List of DatabaseInfo. + :type databases_info: list[~azure.mgmt.datamigration.models.DatabaseInfo] + :ivar provisioning_state: The project's provisioning state. Possible values include: + "Deleting", "Succeeded". + :vartype provisioning_state: str or ~azure.mgmt.datamigration.models.ProjectProvisioningState + """ + + _validation = { + 'id': {'readonly': True}, + 'name': {'readonly': True}, + 'type': {'readonly': True}, + 'system_data': {'readonly': True}, + 'creation_time': {'readonly': True}, + 'provisioning_state': {'readonly': True}, + } + + _attribute_map = { + 'location': {'key': 'location', 'type': 'str'}, + 'tags': {'key': 'tags', 'type': '{str}'}, + 'id': {'key': 'id', 'type': 'str'}, + 'name': {'key': 'name', 'type': 'str'}, + 'type': {'key': 'type', 'type': 'str'}, + 'system_data': {'key': 'systemData', 'type': 'SystemData'}, + 'e_tag': {'key': 'eTag', 'type': 'str'}, + 'source_platform': {'key': 'properties.sourcePlatform', 'type': 'str'}, + 'azure_authentication_info': {'key': 'properties.azureAuthenticationInfo', 'type': 'str'}, + 'target_platform': {'key': 'properties.targetPlatform', 'type': 'str'}, + 'creation_time': {'key': 'properties.creationTime', 'type': 'iso-8601'}, + 'source_connection_info': {'key': 'properties.sourceConnectionInfo', 'type': 'ConnectionInfo'}, + 'target_connection_info': {'key': 'properties.targetConnectionInfo', 'type': 'ConnectionInfo'}, + 'databases_info': {'key': 'properties.databasesInfo', 'type': '[DatabaseInfo]'}, + 'provisioning_state': {'key': 'properties.provisioningState', 'type': 'str'}, + } + + def __init__( + self, + *, + location: Optional[str] = None, + tags: Optional[Dict[str, str]] = None, + e_tag: Optional[str] = None, + source_platform: Optional[Union[str, "ProjectSourcePlatform"]] = None, + azure_authentication_info: Optional[str] = None, + target_platform: Optional[Union[str, "ProjectTargetPlatform"]] = None, + source_connection_info: Optional["ConnectionInfo"] = None, + target_connection_info: Optional["ConnectionInfo"] = None, + databases_info: Optional[List["DatabaseInfo"]] = None, + **kwargs + ): + super(Project, self).__init__(location=location, tags=tags, **kwargs) + self.e_tag = e_tag + self.source_platform = source_platform + self.azure_authentication_info = azure_authentication_info + self.target_platform = target_platform + self.creation_time = None + self.source_connection_info = source_connection_info + self.target_connection_info = target_connection_info + self.databases_info = databases_info + self.provisioning_state = None + + +class Resource(msrest.serialization.Model): + """ARM resource. + + Variables are only populated by the server, and will be ignored when sending a request. + + :ivar id: Resource ID. + :vartype id: str + :ivar name: Resource name. + :vartype name: str + :ivar type: Resource type. + :vartype type: str + """ + + _validation = { + 'id': {'readonly': True}, + 'name': {'readonly': True}, + 'type': {'readonly': True}, + } + + _attribute_map = { + 'id': {'key': 'id', 'type': 'str'}, + 'name': {'key': 'name', 'type': 'str'}, + 'type': {'key': 'type', 'type': 'str'}, + } + + def __init__( + self, + **kwargs + ): + super(Resource, self).__init__(**kwargs) + self.id = None + self.name = None + self.type = None + + +class ProjectFile(Resource): + """A file resource. + + Variables are only populated by the server, and will be ignored when sending a request. + + :ivar id: Resource ID. + :vartype id: str + :ivar name: Resource name. + :vartype name: str + :ivar type: Resource type. + :vartype type: str + :param etag: HTTP strong entity tag value. This is ignored if submitted. + :type etag: str + :param properties: Custom file properties. + :type properties: ~azure.mgmt.datamigration.models.ProjectFileProperties + :ivar system_data: Metadata pertaining to creation and last modification of the resource. + :vartype system_data: ~azure.mgmt.datamigration.models.SystemData + """ + + _validation = { + 'id': {'readonly': True}, + 'name': {'readonly': True}, + 'type': {'readonly': True}, + 'system_data': {'readonly': True}, + } + + _attribute_map = { + 'id': {'key': 'id', 'type': 'str'}, + 'name': {'key': 'name', 'type': 'str'}, + 'type': {'key': 'type', 'type': 'str'}, + 'etag': {'key': 'etag', 'type': 'str'}, + 'properties': {'key': 'properties', 'type': 'ProjectFileProperties'}, + 'system_data': {'key': 'systemData', 'type': 'SystemData'}, + } + + def __init__( + self, + *, + etag: Optional[str] = None, + properties: Optional["ProjectFileProperties"] = None, + **kwargs + ): + super(ProjectFile, self).__init__(**kwargs) + self.etag = etag + self.properties = properties + self.system_data = None + + +class ProjectFileProperties(msrest.serialization.Model): + """Base class for file properties. + + Variables are only populated by the server, and will be ignored when sending a request. + + :param extension: Optional File extension. If submitted it should not have a leading period and + must match the extension from filePath. + :type extension: str + :param file_path: Relative path of this file resource. This property can be set when creating + or updating the file resource. + :type file_path: str + :ivar last_modified: Modification DateTime. + :vartype last_modified: ~datetime.datetime + :param media_type: File content type. This property can be modified to reflect the file content + type. + :type media_type: str + :ivar size: File size. + :vartype size: long + """ + + _validation = { + 'last_modified': {'readonly': True}, + 'size': {'readonly': True}, + } + + _attribute_map = { + 'extension': {'key': 'extension', 'type': 'str'}, + 'file_path': {'key': 'filePath', 'type': 'str'}, + 'last_modified': {'key': 'lastModified', 'type': 'iso-8601'}, + 'media_type': {'key': 'mediaType', 'type': 'str'}, + 'size': {'key': 'size', 'type': 'long'}, + } + + def __init__( + self, + *, + extension: Optional[str] = None, + file_path: Optional[str] = None, + media_type: Optional[str] = None, + **kwargs + ): + super(ProjectFileProperties, self).__init__(**kwargs) + self.extension = extension + self.file_path = file_path + self.last_modified = None + self.media_type = media_type + self.size = None + + +class ProjectList(msrest.serialization.Model): + """OData page of project resources. + + :param value: List of projects. + :type value: list[~azure.mgmt.datamigration.models.Project] + :param next_link: URL to load the next page of projects. + :type next_link: str + """ + + _attribute_map = { + 'value': {'key': 'value', 'type': '[Project]'}, + 'next_link': {'key': 'nextLink', 'type': 'str'}, + } + + def __init__( + self, + *, + value: Optional[List["Project"]] = None, + next_link: Optional[str] = None, + **kwargs + ): + super(ProjectList, self).__init__(**kwargs) + self.value = value + self.next_link = next_link + + +class ProjectTask(Resource): + """A task resource. + + Variables are only populated by the server, and will be ignored when sending a request. + + :ivar id: Resource ID. + :vartype id: str + :ivar name: Resource name. + :vartype name: str + :ivar type: Resource type. + :vartype type: str + :param etag: HTTP strong entity tag value. This is ignored if submitted. + :type etag: str + :param properties: Custom task properties. + :type properties: ~azure.mgmt.datamigration.models.ProjectTaskProperties + :ivar system_data: Metadata pertaining to creation and last modification of the resource. + :vartype system_data: ~azure.mgmt.datamigration.models.SystemData + """ + + _validation = { + 'id': {'readonly': True}, + 'name': {'readonly': True}, + 'type': {'readonly': True}, + 'system_data': {'readonly': True}, + } + + _attribute_map = { + 'id': {'key': 'id', 'type': 'str'}, + 'name': {'key': 'name', 'type': 'str'}, + 'type': {'key': 'type', 'type': 'str'}, + 'etag': {'key': 'etag', 'type': 'str'}, + 'properties': {'key': 'properties', 'type': 'ProjectTaskProperties'}, + 'system_data': {'key': 'systemData', 'type': 'SystemData'}, + } + + def __init__( + self, + *, + etag: Optional[str] = None, + properties: Optional["ProjectTaskProperties"] = None, + **kwargs + ): + super(ProjectTask, self).__init__(**kwargs) + self.etag = etag + self.properties = properties + self.system_data = None + + +class QueryAnalysisValidationResult(msrest.serialization.Model): + """Results for query analysis comparison between the source and target. + + :param query_results: List of queries executed and it's execution results in source and target. + :type query_results: ~azure.mgmt.datamigration.models.QueryExecutionResult + :param validation_errors: Errors that are part of the execution. + :type validation_errors: ~azure.mgmt.datamigration.models.ValidationError + """ + + _attribute_map = { + 'query_results': {'key': 'queryResults', 'type': 'QueryExecutionResult'}, + 'validation_errors': {'key': 'validationErrors', 'type': 'ValidationError'}, + } + + def __init__( + self, + *, + query_results: Optional["QueryExecutionResult"] = None, + validation_errors: Optional["ValidationError"] = None, + **kwargs + ): + super(QueryAnalysisValidationResult, self).__init__(**kwargs) + self.query_results = query_results + self.validation_errors = validation_errors + + +class QueryExecutionResult(msrest.serialization.Model): + """Describes query analysis results for execution in source and target. + + :param query_text: Query text retrieved from the source server. + :type query_text: str + :param statements_in_batch: Total no. of statements in the batch. + :type statements_in_batch: long + :param source_result: Query analysis result from the source. + :type source_result: ~azure.mgmt.datamigration.models.ExecutionStatistics + :param target_result: Query analysis result from the target. + :type target_result: ~azure.mgmt.datamigration.models.ExecutionStatistics + """ + + _attribute_map = { + 'query_text': {'key': 'queryText', 'type': 'str'}, + 'statements_in_batch': {'key': 'statementsInBatch', 'type': 'long'}, + 'source_result': {'key': 'sourceResult', 'type': 'ExecutionStatistics'}, + 'target_result': {'key': 'targetResult', 'type': 'ExecutionStatistics'}, + } + + def __init__( + self, + *, + query_text: Optional[str] = None, + statements_in_batch: Optional[int] = None, + source_result: Optional["ExecutionStatistics"] = None, + target_result: Optional["ExecutionStatistics"] = None, + **kwargs + ): + super(QueryExecutionResult, self).__init__(**kwargs) + self.query_text = query_text + self.statements_in_batch = statements_in_batch + self.source_result = source_result + self.target_result = target_result + + +class Quota(msrest.serialization.Model): + """Describes a quota for or usage details about a resource. + + :param current_value: The current value of the quota. If null or missing, the current value + cannot be determined in the context of the request. + :type current_value: float + :param id: The resource ID of the quota object. + :type id: str + :param limit: The maximum value of the quota. If null or missing, the quota has no maximum, in + which case it merely tracks usage. + :type limit: float + :param name: The name of the quota. + :type name: ~azure.mgmt.datamigration.models.QuotaName + :param unit: The unit for the quota, such as Count, Bytes, BytesPerSecond, etc. + :type unit: str + """ + + _attribute_map = { + 'current_value': {'key': 'currentValue', 'type': 'float'}, + 'id': {'key': 'id', 'type': 'str'}, + 'limit': {'key': 'limit', 'type': 'float'}, + 'name': {'key': 'name', 'type': 'QuotaName'}, + 'unit': {'key': 'unit', 'type': 'str'}, + } + + def __init__( + self, + *, + current_value: Optional[float] = None, + id: Optional[str] = None, + limit: Optional[float] = None, + name: Optional["QuotaName"] = None, + unit: Optional[str] = None, + **kwargs + ): + super(Quota, self).__init__(**kwargs) + self.current_value = current_value + self.id = id + self.limit = limit + self.name = name + self.unit = unit + + +class QuotaList(msrest.serialization.Model): + """OData page of quota objects. + + :param value: List of quotas. + :type value: list[~azure.mgmt.datamigration.models.Quota] + :param next_link: URL to load the next page of quotas, or null or missing if this is the last + page. + :type next_link: str + """ + + _attribute_map = { + 'value': {'key': 'value', 'type': '[Quota]'}, + 'next_link': {'key': 'nextLink', 'type': 'str'}, + } + + def __init__( + self, + *, + value: Optional[List["Quota"]] = None, + next_link: Optional[str] = None, + **kwargs + ): + super(QuotaList, self).__init__(**kwargs) + self.value = value + self.next_link = next_link + + +class QuotaName(msrest.serialization.Model): + """The name of the quota. + + :param localized_value: The localized name of the quota. + :type localized_value: str + :param value: The unlocalized name (or ID) of the quota. + :type value: str + """ + + _attribute_map = { + 'localized_value': {'key': 'localizedValue', 'type': 'str'}, + 'value': {'key': 'value', 'type': 'str'}, + } + + def __init__( + self, + *, + localized_value: Optional[str] = None, + value: Optional[str] = None, + **kwargs + ): + super(QuotaName, self).__init__(**kwargs) + self.localized_value = localized_value + self.value = value + + +class RegenAuthKeys(msrest.serialization.Model): + """An authentication key to regenerate. + + :param key_name: The name of authentication key to generate. + :type key_name: str + :param auth_key1: The first authentication key. + :type auth_key1: str + :param auth_key2: The second authentication key. + :type auth_key2: str + """ + + _attribute_map = { + 'key_name': {'key': 'keyName', 'type': 'str'}, + 'auth_key1': {'key': 'authKey1', 'type': 'str'}, + 'auth_key2': {'key': 'authKey2', 'type': 'str'}, + } + + def __init__( + self, + *, + key_name: Optional[str] = None, + auth_key1: Optional[str] = None, + auth_key2: Optional[str] = None, + **kwargs + ): + super(RegenAuthKeys, self).__init__(**kwargs) + self.key_name = key_name + self.auth_key1 = auth_key1 + self.auth_key2 = auth_key2 + + +class ReportableException(msrest.serialization.Model): + """Exception object for all custom exceptions. + + :param message: Error message. + :type message: str + :param actionable_message: Actionable steps for this exception. + :type actionable_message: str + :param file_path: The path to the file where exception occurred. + :type file_path: str + :param line_number: The line number where exception occurred. + :type line_number: str + :param h_result: Coded numerical value that is assigned to a specific exception. + :type h_result: int + :param stack_trace: Stack trace. + :type stack_trace: str + """ + + _attribute_map = { + 'message': {'key': 'message', 'type': 'str'}, + 'actionable_message': {'key': 'actionableMessage', 'type': 'str'}, + 'file_path': {'key': 'filePath', 'type': 'str'}, + 'line_number': {'key': 'lineNumber', 'type': 'str'}, + 'h_result': {'key': 'hResult', 'type': 'int'}, + 'stack_trace': {'key': 'stackTrace', 'type': 'str'}, + } + + def __init__( + self, + *, + message: Optional[str] = None, + actionable_message: Optional[str] = None, + file_path: Optional[str] = None, + line_number: Optional[str] = None, + h_result: Optional[int] = None, + stack_trace: Optional[str] = None, + **kwargs + ): + super(ReportableException, self).__init__(**kwargs) + self.message = message + self.actionable_message = actionable_message + self.file_path = file_path + self.line_number = line_number + self.h_result = h_result + self.stack_trace = stack_trace + + +class ResourceSku(msrest.serialization.Model): + """Describes an available DMS SKU. + + Variables are only populated by the server, and will be ignored when sending a request. + + :ivar resource_type: The type of resource the SKU applies to. + :vartype resource_type: str + :ivar name: The name of SKU. + :vartype name: str + :ivar tier: Specifies the tier of DMS in a scale set. + :vartype tier: str + :ivar size: The Size of the SKU. + :vartype size: str + :ivar family: The Family of this particular SKU. + :vartype family: str + :ivar kind: The Kind of resources that are supported in this SKU. + :vartype kind: str + :ivar capacity: Not used. + :vartype capacity: ~azure.mgmt.datamigration.models.ResourceSkuCapacity + :ivar locations: The set of locations that the SKU is available. + :vartype locations: list[str] + :ivar api_versions: The api versions that support this SKU. + :vartype api_versions: list[str] + :ivar costs: Metadata for retrieving price info. + :vartype costs: list[~azure.mgmt.datamigration.models.ResourceSkuCosts] + :ivar capabilities: A name value pair to describe the capability. + :vartype capabilities: list[~azure.mgmt.datamigration.models.ResourceSkuCapabilities] + :ivar restrictions: The restrictions because of which SKU cannot be used. This is empty if + there are no restrictions. + :vartype restrictions: list[~azure.mgmt.datamigration.models.ResourceSkuRestrictions] + """ + + _validation = { + 'resource_type': {'readonly': True}, + 'name': {'readonly': True}, + 'tier': {'readonly': True}, + 'size': {'readonly': True}, + 'family': {'readonly': True}, + 'kind': {'readonly': True}, + 'capacity': {'readonly': True}, + 'locations': {'readonly': True}, + 'api_versions': {'readonly': True}, + 'costs': {'readonly': True}, + 'capabilities': {'readonly': True}, + 'restrictions': {'readonly': True}, + } + + _attribute_map = { + 'resource_type': {'key': 'resourceType', 'type': 'str'}, + 'name': {'key': 'name', 'type': 'str'}, + 'tier': {'key': 'tier', 'type': 'str'}, + 'size': {'key': 'size', 'type': 'str'}, + 'family': {'key': 'family', 'type': 'str'}, + 'kind': {'key': 'kind', 'type': 'str'}, + 'capacity': {'key': 'capacity', 'type': 'ResourceSkuCapacity'}, + 'locations': {'key': 'locations', 'type': '[str]'}, + 'api_versions': {'key': 'apiVersions', 'type': '[str]'}, + 'costs': {'key': 'costs', 'type': '[ResourceSkuCosts]'}, + 'capabilities': {'key': 'capabilities', 'type': '[ResourceSkuCapabilities]'}, + 'restrictions': {'key': 'restrictions', 'type': '[ResourceSkuRestrictions]'}, + } + + def __init__( + self, + **kwargs + ): + super(ResourceSku, self).__init__(**kwargs) + self.resource_type = None + self.name = None + self.tier = None + self.size = None + self.family = None + self.kind = None + self.capacity = None + self.locations = None + self.api_versions = None + self.costs = None + self.capabilities = None + self.restrictions = None + + +class ResourceSkuCapabilities(msrest.serialization.Model): + """Describes The SKU capabilities object. + + Variables are only populated by the server, and will be ignored when sending a request. + + :ivar name: An invariant to describe the feature. + :vartype name: str + :ivar value: An invariant if the feature is measured by quantity. + :vartype value: str + """ + + _validation = { + 'name': {'readonly': True}, + 'value': {'readonly': True}, + } + + _attribute_map = { + 'name': {'key': 'name', 'type': 'str'}, + 'value': {'key': 'value', 'type': 'str'}, + } + + def __init__( + self, + **kwargs + ): + super(ResourceSkuCapabilities, self).__init__(**kwargs) + self.name = None + self.value = None + + +class ResourceSkuCapacity(msrest.serialization.Model): + """Describes scaling information of a SKU. + + Variables are only populated by the server, and will be ignored when sending a request. + + :ivar minimum: The minimum capacity. + :vartype minimum: long + :ivar maximum: The maximum capacity. + :vartype maximum: long + :ivar default: The default capacity. + :vartype default: long + :ivar scale_type: The scale type applicable to the SKU. Possible values include: "Automatic", + "Manual", "None". + :vartype scale_type: str or ~azure.mgmt.datamigration.models.ResourceSkuCapacityScaleType + """ + + _validation = { + 'minimum': {'readonly': True}, + 'maximum': {'readonly': True}, + 'default': {'readonly': True}, + 'scale_type': {'readonly': True}, + } + + _attribute_map = { + 'minimum': {'key': 'minimum', 'type': 'long'}, + 'maximum': {'key': 'maximum', 'type': 'long'}, + 'default': {'key': 'default', 'type': 'long'}, + 'scale_type': {'key': 'scaleType', 'type': 'str'}, + } + + def __init__( + self, + **kwargs + ): + super(ResourceSkuCapacity, self).__init__(**kwargs) + self.minimum = None + self.maximum = None + self.default = None + self.scale_type = None + + +class ResourceSkuCosts(msrest.serialization.Model): + """Describes metadata for retrieving price info. + + Variables are only populated by the server, and will be ignored when sending a request. + + :ivar meter_id: Used for querying price from commerce. + :vartype meter_id: str + :ivar quantity: The multiplier is needed to extend the base metered cost. + :vartype quantity: long + :ivar extended_unit: An invariant to show the extended unit. + :vartype extended_unit: str + """ + + _validation = { + 'meter_id': {'readonly': True}, + 'quantity': {'readonly': True}, + 'extended_unit': {'readonly': True}, + } + + _attribute_map = { + 'meter_id': {'key': 'meterID', 'type': 'str'}, + 'quantity': {'key': 'quantity', 'type': 'long'}, + 'extended_unit': {'key': 'extendedUnit', 'type': 'str'}, + } + + def __init__( + self, + **kwargs + ): + super(ResourceSkuCosts, self).__init__(**kwargs) + self.meter_id = None + self.quantity = None + self.extended_unit = None + + +class ResourceSkuRestrictions(msrest.serialization.Model): + """Describes scaling information of a SKU. + + Variables are only populated by the server, and will be ignored when sending a request. + + :ivar type: The type of restrictions. Possible values include: "location". + :vartype type: str or ~azure.mgmt.datamigration.models.ResourceSkuRestrictionsType + :ivar values: The value of restrictions. If the restriction type is set to location. This would + be different locations where the SKU is restricted. + :vartype values: list[str] + :ivar reason_code: The reason code for restriction. Possible values include: "QuotaId", + "NotAvailableForSubscription". + :vartype reason_code: str or ~azure.mgmt.datamigration.models.ResourceSkuRestrictionsReasonCode + """ + + _validation = { + 'type': {'readonly': True}, + 'values': {'readonly': True}, + 'reason_code': {'readonly': True}, + } + + _attribute_map = { + 'type': {'key': 'type', 'type': 'str'}, + 'values': {'key': 'values', 'type': '[str]'}, + 'reason_code': {'key': 'reasonCode', 'type': 'str'}, + } + + def __init__( + self, + **kwargs + ): + super(ResourceSkuRestrictions, self).__init__(**kwargs) + self.type = None + self.values = None + self.reason_code = None + + +class ResourceSkusResult(msrest.serialization.Model): + """The DMS List SKUs operation response. + + All required parameters must be populated in order to send to Azure. + + :param value: Required. The list of SKUs available for the subscription. + :type value: list[~azure.mgmt.datamigration.models.ResourceSku] + :param next_link: The uri to fetch the next page of DMS SKUs. Call ListNext() with this to + fetch the next page of DMS SKUs. + :type next_link: str + """ + + _validation = { + 'value': {'required': True}, + } + + _attribute_map = { + 'value': {'key': 'value', 'type': '[ResourceSku]'}, + 'next_link': {'key': 'nextLink', 'type': 'str'}, + } + + def __init__( + self, + *, + value: List["ResourceSku"], + next_link: Optional[str] = None, + **kwargs + ): + super(ResourceSkusResult, self).__init__(**kwargs) + self.value = value + self.next_link = next_link + + +class SchemaComparisonValidationResult(msrest.serialization.Model): + """Results for schema comparison between the source and target. + + :param schema_differences: List of schema differences between the source and target databases. + :type schema_differences: ~azure.mgmt.datamigration.models.SchemaComparisonValidationResultType + :param validation_errors: List of errors that happened while performing schema compare + validation. + :type validation_errors: ~azure.mgmt.datamigration.models.ValidationError + :param source_database_object_count: Count of source database objects. + :type source_database_object_count: dict[str, long] + :param target_database_object_count: Count of target database objects. + :type target_database_object_count: dict[str, long] + """ + + _attribute_map = { + 'schema_differences': {'key': 'schemaDifferences', 'type': 'SchemaComparisonValidationResultType'}, + 'validation_errors': {'key': 'validationErrors', 'type': 'ValidationError'}, + 'source_database_object_count': {'key': 'sourceDatabaseObjectCount', 'type': '{long}'}, + 'target_database_object_count': {'key': 'targetDatabaseObjectCount', 'type': '{long}'}, + } + + def __init__( + self, + *, + schema_differences: Optional["SchemaComparisonValidationResultType"] = None, + validation_errors: Optional["ValidationError"] = None, + source_database_object_count: Optional[Dict[str, int]] = None, + target_database_object_count: Optional[Dict[str, int]] = None, + **kwargs + ): + super(SchemaComparisonValidationResult, self).__init__(**kwargs) + self.schema_differences = schema_differences + self.validation_errors = validation_errors + self.source_database_object_count = source_database_object_count + self.target_database_object_count = target_database_object_count + + +class SchemaComparisonValidationResultType(msrest.serialization.Model): + """Description about the errors happen while performing migration validation. + + :param object_name: Name of the object that has the difference. + :type object_name: str + :param object_type: Type of the object that has the difference. e.g + (Table/View/StoredProcedure). Possible values include: "StoredProcedures", "Table", "User", + "View", "Function". + :type object_type: str or ~azure.mgmt.datamigration.models.ObjectType + :param update_action: Update action type with respect to target. Possible values include: + "DeletedOnTarget", "ChangedOnTarget", "AddedOnTarget". + :type update_action: str or ~azure.mgmt.datamigration.models.UpdateActionType + """ + + _attribute_map = { + 'object_name': {'key': 'objectName', 'type': 'str'}, + 'object_type': {'key': 'objectType', 'type': 'str'}, + 'update_action': {'key': 'updateAction', 'type': 'str'}, + } + + def __init__( + self, + *, + object_name: Optional[str] = None, + object_type: Optional[Union[str, "ObjectType"]] = None, + update_action: Optional[Union[str, "UpdateActionType"]] = None, + **kwargs + ): + super(SchemaComparisonValidationResultType, self).__init__(**kwargs) + self.object_name = object_name + self.object_type = object_type + self.update_action = update_action + + +class SchemaMigrationSetting(msrest.serialization.Model): + """Settings for migrating schema from source to target. + + :param schema_option: Option on how to migrate the schema. Possible values include: "None", + "ExtractFromSource", "UseStorageFile". + :type schema_option: str or ~azure.mgmt.datamigration.models.SchemaMigrationOption + :param file_id: Resource Identifier of a file resource containing the uploaded schema file. + :type file_id: str + :param file_name: Name of the file resource containing the uploaded schema file. + :type file_name: str + """ + + _attribute_map = { + 'schema_option': {'key': 'schemaOption', 'type': 'str'}, + 'file_id': {'key': 'fileId', 'type': 'str'}, + 'file_name': {'key': 'fileName', 'type': 'str'}, + } + + def __init__( + self, + *, + schema_option: Optional[Union[str, "SchemaMigrationOption"]] = None, + file_id: Optional[str] = None, + file_name: Optional[str] = None, + **kwargs + ): + super(SchemaMigrationSetting, self).__init__(**kwargs) + self.schema_option = schema_option + self.file_id = file_id + self.file_name = file_name + + +class SelectedCertificateInput(msrest.serialization.Model): + """Info for certificate to be exported for TDE enabled databases. + + All required parameters must be populated in order to send to Azure. + + :param certificate_name: Required. Name of certificate to be exported. + :type certificate_name: str + :param password: Required. Password to use for encrypting the exported certificate. + :type password: str + """ + + _validation = { + 'certificate_name': {'required': True}, + 'password': {'required': True}, + } + + _attribute_map = { + 'certificate_name': {'key': 'certificateName', 'type': 'str'}, + 'password': {'key': 'password', 'type': 'str'}, + } + + def __init__( + self, + *, + certificate_name: str, + password: str, + **kwargs + ): + super(SelectedCertificateInput, self).__init__(**kwargs) + self.certificate_name = certificate_name + self.password = password + + +class ServerProperties(msrest.serialization.Model): + """Server properties for MySQL type source. + + Variables are only populated by the server, and will be ignored when sending a request. + + :ivar server_platform: Name of the server platform. + :vartype server_platform: str + :ivar server_name: Name of the server. + :vartype server_name: str + :ivar server_version: Version of the database server. + :vartype server_version: str + :ivar server_edition: Edition of the database server. + :vartype server_edition: str + :ivar server_operating_system_version: Version of the operating system. + :vartype server_operating_system_version: str + :ivar server_database_count: Number of databases in the server. + :vartype server_database_count: int + """ + + _validation = { + 'server_platform': {'readonly': True}, + 'server_name': {'readonly': True}, + 'server_version': {'readonly': True}, + 'server_edition': {'readonly': True}, + 'server_operating_system_version': {'readonly': True}, + 'server_database_count': {'readonly': True}, + } + + _attribute_map = { + 'server_platform': {'key': 'serverPlatform', 'type': 'str'}, + 'server_name': {'key': 'serverName', 'type': 'str'}, + 'server_version': {'key': 'serverVersion', 'type': 'str'}, + 'server_edition': {'key': 'serverEdition', 'type': 'str'}, + 'server_operating_system_version': {'key': 'serverOperatingSystemVersion', 'type': 'str'}, + 'server_database_count': {'key': 'serverDatabaseCount', 'type': 'int'}, + } + + def __init__( + self, + **kwargs + ): + super(ServerProperties, self).__init__(**kwargs) + self.server_platform = None + self.server_name = None + self.server_version = None + self.server_edition = None + self.server_operating_system_version = None + self.server_database_count = None + + +class ServiceOperation(msrest.serialization.Model): + """Description of an action supported by the Database Migration Service. + + :param name: The fully qualified action name, e.g. Microsoft.DataMigration/services/read. + :type name: str + :param display: Localized display text. + :type display: ~azure.mgmt.datamigration.models.ServiceOperationDisplay + """ + + _attribute_map = { + 'name': {'key': 'name', 'type': 'str'}, + 'display': {'key': 'display', 'type': 'ServiceOperationDisplay'}, + } + + def __init__( + self, + *, + name: Optional[str] = None, + display: Optional["ServiceOperationDisplay"] = None, + **kwargs + ): + super(ServiceOperation, self).__init__(**kwargs) + self.name = name + self.display = display + + +class ServiceOperationDisplay(msrest.serialization.Model): + """Localized display text. + + :param provider: The localized resource provider name. + :type provider: str + :param resource: The localized resource type name. + :type resource: str + :param operation: The localized operation name. + :type operation: str + :param description: The localized operation description. + :type description: str + """ + + _attribute_map = { + 'provider': {'key': 'provider', 'type': 'str'}, + 'resource': {'key': 'resource', 'type': 'str'}, + 'operation': {'key': 'operation', 'type': 'str'}, + 'description': {'key': 'description', 'type': 'str'}, + } + + def __init__( + self, + *, + provider: Optional[str] = None, + resource: Optional[str] = None, + operation: Optional[str] = None, + description: Optional[str] = None, + **kwargs + ): + super(ServiceOperationDisplay, self).__init__(**kwargs) + self.provider = provider + self.resource = resource + self.operation = operation + self.description = description + + +class ServiceOperationList(msrest.serialization.Model): + """OData page of action (operation) objects. + + :param value: List of actions. + :type value: list[~azure.mgmt.datamigration.models.ServiceOperation] + :param next_link: URL to load the next page of actions. + :type next_link: str + """ + + _attribute_map = { + 'value': {'key': 'value', 'type': '[ServiceOperation]'}, + 'next_link': {'key': 'nextLink', 'type': 'str'}, + } + + def __init__( + self, + *, + value: Optional[List["ServiceOperation"]] = None, + next_link: Optional[str] = None, + **kwargs + ): + super(ServiceOperationList, self).__init__(**kwargs) + self.value = value + self.next_link = next_link + + +class ServiceSku(msrest.serialization.Model): + """An Azure SKU instance. + + :param name: The unique name of the SKU, such as 'P3'. + :type name: str + :param tier: The tier of the SKU, such as 'Basic', 'General Purpose', or 'Business Critical'. + :type tier: str + :param family: The SKU family, used when the service has multiple performance classes within a + tier, such as 'A', 'D', etc. for virtual machines. + :type family: str + :param size: The size of the SKU, used when the name alone does not denote a service size or + when a SKU has multiple performance classes within a family, e.g. 'A1' for virtual machines. + :type size: str + :param capacity: The capacity of the SKU, if it supports scaling. + :type capacity: int + """ + + _attribute_map = { + 'name': {'key': 'name', 'type': 'str'}, + 'tier': {'key': 'tier', 'type': 'str'}, + 'family': {'key': 'family', 'type': 'str'}, + 'size': {'key': 'size', 'type': 'str'}, + 'capacity': {'key': 'capacity', 'type': 'int'}, + } + + def __init__( + self, + *, + name: Optional[str] = None, + tier: Optional[str] = None, + family: Optional[str] = None, + size: Optional[str] = None, + capacity: Optional[int] = None, + **kwargs + ): + super(ServiceSku, self).__init__(**kwargs) + self.name = name + self.tier = tier + self.family = family + self.size = size + self.capacity = capacity + + +class ServiceSkuList(msrest.serialization.Model): + """OData page of available SKUs. + + :param value: List of service SKUs. + :type value: list[~azure.mgmt.datamigration.models.AvailableServiceSku] + :param next_link: URL to load the next page of service SKUs. + :type next_link: str + """ + + _attribute_map = { + 'value': {'key': 'value', 'type': '[AvailableServiceSku]'}, + 'next_link': {'key': 'nextLink', 'type': 'str'}, + } + + def __init__( + self, + *, + value: Optional[List["AvailableServiceSku"]] = None, + next_link: Optional[str] = None, + **kwargs + ): + super(ServiceSkuList, self).__init__(**kwargs) + self.value = value + self.next_link = next_link + + +class SourceLocation(msrest.serialization.Model): + """Source Location details of backups. + + :param file_share: Source File share. + :type file_share: ~azure.mgmt.datamigration.models.SqlFileShare + :param azure_blob: Source Azure Blob. + :type azure_blob: ~azure.mgmt.datamigration.models.AzureBlob + """ + + _attribute_map = { + 'file_share': {'key': 'fileShare', 'type': 'SqlFileShare'}, + 'azure_blob': {'key': 'azureBlob', 'type': 'AzureBlob'}, + } + + def __init__( + self, + *, + file_share: Optional["SqlFileShare"] = None, + azure_blob: Optional["AzureBlob"] = None, + **kwargs + ): + super(SourceLocation, self).__init__(**kwargs) + self.file_share = file_share + self.azure_blob = azure_blob + + +class SqlBackupFileInfo(msrest.serialization.Model): + """Information of backup file. + + Variables are only populated by the server, and will be ignored when sending a request. + + :ivar file_name: File name. + :vartype file_name: str + :ivar status: Status of the file. (Initial, Uploading, Uploaded, Restoring, Restored or + Skipped). + :vartype status: str + :ivar total_size: File size in bytes. + :vartype total_size: long + :ivar data_read: Bytes read. + :vartype data_read: long + :ivar data_written: Bytes written. + :vartype data_written: long + :ivar copy_throughput: Copy throughput in KBps. + :vartype copy_throughput: float + :ivar copy_duration: Copy Duration in seconds. + :vartype copy_duration: int + :ivar family_sequence_number: Media family sequence number. + :vartype family_sequence_number: int + """ + + _validation = { + 'file_name': {'readonly': True}, + 'status': {'readonly': True}, + 'total_size': {'readonly': True}, + 'data_read': {'readonly': True}, + 'data_written': {'readonly': True}, + 'copy_throughput': {'readonly': True}, + 'copy_duration': {'readonly': True}, + 'family_sequence_number': {'readonly': True}, + } + + _attribute_map = { + 'file_name': {'key': 'fileName', 'type': 'str'}, + 'status': {'key': 'status', 'type': 'str'}, + 'total_size': {'key': 'totalSize', 'type': 'long'}, + 'data_read': {'key': 'dataRead', 'type': 'long'}, + 'data_written': {'key': 'dataWritten', 'type': 'long'}, + 'copy_throughput': {'key': 'copyThroughput', 'type': 'float'}, + 'copy_duration': {'key': 'copyDuration', 'type': 'int'}, + 'family_sequence_number': {'key': 'familySequenceNumber', 'type': 'int'}, + } + + def __init__( + self, + **kwargs + ): + super(SqlBackupFileInfo, self).__init__(**kwargs) + self.file_name = None + self.status = None + self.total_size = None + self.data_read = None + self.data_written = None + self.copy_throughput = None + self.copy_duration = None + self.family_sequence_number = None + + +class SqlBackupSetInfo(msrest.serialization.Model): + """Information of backup set. + + Variables are only populated by the server, and will be ignored when sending a request. + + :ivar backup_set_id: Backup set id. + :vartype backup_set_id: str + :ivar first_lsn: First LSN of the backup set. + :vartype first_lsn: str + :ivar last_lsn: Last LSN of the backup set. + :vartype last_lsn: str + :ivar backup_type: Backup type. + :vartype backup_type: str + :ivar list_of_backup_files: List of files in the backup set. + :vartype list_of_backup_files: list[~azure.mgmt.datamigration.models.SqlBackupFileInfo] + :ivar backup_start_date: Backup start date. + :vartype backup_start_date: ~datetime.datetime + :ivar backup_finish_date: Backup end time. + :vartype backup_finish_date: ~datetime.datetime + :ivar is_backup_restored: Whether this backup set has been restored or not. + :vartype is_backup_restored: bool + :ivar has_backup_checksums: Has Backup Checksums. + :vartype has_backup_checksums: bool + :ivar family_count: Media family count. + :vartype family_count: int + :ivar ignore_reasons: The reasons why the backup set is ignored. + :vartype ignore_reasons: list[str] + """ + + _validation = { + 'backup_set_id': {'readonly': True}, + 'first_lsn': {'readonly': True}, + 'last_lsn': {'readonly': True}, + 'backup_type': {'readonly': True}, + 'list_of_backup_files': {'readonly': True}, + 'backup_start_date': {'readonly': True}, + 'backup_finish_date': {'readonly': True}, + 'is_backup_restored': {'readonly': True}, + 'has_backup_checksums': {'readonly': True}, + 'family_count': {'readonly': True}, + 'ignore_reasons': {'readonly': True}, + } + + _attribute_map = { + 'backup_set_id': {'key': 'backupSetId', 'type': 'str'}, + 'first_lsn': {'key': 'firstLSN', 'type': 'str'}, + 'last_lsn': {'key': 'lastLSN', 'type': 'str'}, + 'backup_type': {'key': 'backupType', 'type': 'str'}, + 'list_of_backup_files': {'key': 'listOfBackupFiles', 'type': '[SqlBackupFileInfo]'}, + 'backup_start_date': {'key': 'backupStartDate', 'type': 'iso-8601'}, + 'backup_finish_date': {'key': 'backupFinishDate', 'type': 'iso-8601'}, + 'is_backup_restored': {'key': 'isBackupRestored', 'type': 'bool'}, + 'has_backup_checksums': {'key': 'hasBackupChecksums', 'type': 'bool'}, + 'family_count': {'key': 'familyCount', 'type': 'int'}, + 'ignore_reasons': {'key': 'ignoreReasons', 'type': '[str]'}, + } + + def __init__( + self, + **kwargs + ): + super(SqlBackupSetInfo, self).__init__(**kwargs) + self.backup_set_id = None + self.first_lsn = None + self.last_lsn = None + self.backup_type = None + self.list_of_backup_files = None + self.backup_start_date = None + self.backup_finish_date = None + self.is_backup_restored = None + self.has_backup_checksums = None + self.family_count = None + self.ignore_reasons = None + + +class SqlConnectionInfo(ConnectionInfo): + """Information for connecting to SQL database server. + + All required parameters must be populated in order to send to Azure. + + :param type: Required. Type of connection info.Constant filled by server. + :type type: str + :param user_name: User name. + :type user_name: str + :param password: Password credential. + :type password: str + :param data_source: Required. Data source in the format + Protocol:MachineName\SQLServerInstanceName,PortNumber. + :type data_source: str + :param server_name: name of the server. + :type server_name: str + :param port: port for server. + :type port: str + :param resource_id: Represents the ID of an HTTP resource represented by an Azure resource + provider. + :type resource_id: str + :param authentication: Authentication type to use for connection. Possible values include: + "None", "WindowsAuthentication", "SqlAuthentication", "ActiveDirectoryIntegrated", + "ActiveDirectoryPassword". + :type authentication: str or ~azure.mgmt.datamigration.models.AuthenticationType + :param encrypt_connection: Whether to encrypt the connection. + :type encrypt_connection: bool + :param additional_settings: Additional connection settings. + :type additional_settings: str + :param trust_server_certificate: Whether to trust the server certificate. + :type trust_server_certificate: bool + :param platform: Server platform type for connection. Possible values include: "SqlOnPrem". + :type platform: str or ~azure.mgmt.datamigration.models.SqlSourcePlatform + """ + + _validation = { + 'type': {'required': True}, + 'data_source': {'required': True}, + } + + _attribute_map = { + 'type': {'key': 'type', 'type': 'str'}, + 'user_name': {'key': 'userName', 'type': 'str'}, + 'password': {'key': 'password', 'type': 'str'}, + 'data_source': {'key': 'dataSource', 'type': 'str'}, + 'server_name': {'key': 'serverName', 'type': 'str'}, + 'port': {'key': 'port', 'type': 'str'}, + 'resource_id': {'key': 'resourceId', 'type': 'str'}, + 'authentication': {'key': 'authentication', 'type': 'str'}, + 'encrypt_connection': {'key': 'encryptConnection', 'type': 'bool'}, + 'additional_settings': {'key': 'additionalSettings', 'type': 'str'}, + 'trust_server_certificate': {'key': 'trustServerCertificate', 'type': 'bool'}, + 'platform': {'key': 'platform', 'type': 'str'}, + } + + def __init__( + self, + *, + data_source: str, + user_name: Optional[str] = None, + password: Optional[str] = None, + server_name: Optional[str] = None, + port: Optional[str] = None, + resource_id: Optional[str] = None, + authentication: Optional[Union[str, "AuthenticationType"]] = None, + encrypt_connection: Optional[bool] = True, + additional_settings: Optional[str] = None, + trust_server_certificate: Optional[bool] = False, + platform: Optional[Union[str, "SqlSourcePlatform"]] = None, + **kwargs + ): + super(SqlConnectionInfo, self).__init__(user_name=user_name, password=password, **kwargs) + self.type = 'SqlConnectionInfo' # type: str + self.data_source = data_source + self.server_name = server_name + self.port = port + self.resource_id = resource_id + self.authentication = authentication + self.encrypt_connection = encrypt_connection + self.additional_settings = additional_settings + self.trust_server_certificate = trust_server_certificate + self.platform = platform + + +class SqlConnectionInformation(msrest.serialization.Model): + """Source SQL Connection. + + :param data_source: Data source. + :type data_source: str + :param authentication: Authentication type. + :type authentication: str + :param user_name: User name to connect to source SQL. + :type user_name: str + :param password: Password to connect to source SQL. + :type password: str + :param encrypt_connection: Whether to encrypt connection or not. + :type encrypt_connection: bool + :param trust_server_certificate: Whether to trust server certificate or not. + :type trust_server_certificate: bool + """ + + _attribute_map = { + 'data_source': {'key': 'dataSource', 'type': 'str'}, + 'authentication': {'key': 'authentication', 'type': 'str'}, + 'user_name': {'key': 'userName', 'type': 'str'}, + 'password': {'key': 'password', 'type': 'str'}, + 'encrypt_connection': {'key': 'encryptConnection', 'type': 'bool'}, + 'trust_server_certificate': {'key': 'trustServerCertificate', 'type': 'bool'}, + } + + def __init__( + self, + *, + data_source: Optional[str] = None, + authentication: Optional[str] = None, + user_name: Optional[str] = None, + password: Optional[str] = None, + encrypt_connection: Optional[bool] = None, + trust_server_certificate: Optional[bool] = None, + **kwargs + ): + super(SqlConnectionInformation, self).__init__(**kwargs) + self.data_source = data_source + self.authentication = authentication + self.user_name = user_name + self.password = password + self.encrypt_connection = encrypt_connection + self.trust_server_certificate = trust_server_certificate + + +class SqlFileShare(msrest.serialization.Model): + """File share. + + :param path: Location as SMB share or local drive where backups are placed. + :type path: str + :param username: Username to access the file share location for backups. + :type username: str + :param password: Password for username to access file share location. + :type password: str + """ + + _attribute_map = { + 'path': {'key': 'path', 'type': 'str'}, + 'username': {'key': 'username', 'type': 'str'}, + 'password': {'key': 'password', 'type': 'str'}, + } + + def __init__( + self, + *, + path: Optional[str] = None, + username: Optional[str] = None, + password: Optional[str] = None, + **kwargs + ): + super(SqlFileShare, self).__init__(**kwargs) + self.path = path + self.username = username + self.password = password + + +class SqlMigrationListResult(msrest.serialization.Model): + """A list of SQL Migration Service. + + Variables are only populated by the server, and will be ignored when sending a request. + + :ivar value: + :vartype value: list[~azure.mgmt.datamigration.models.SqlMigrationService] + :ivar next_link: + :vartype next_link: str + """ + + _validation = { + 'value': {'readonly': True}, + 'next_link': {'readonly': True}, + } + + _attribute_map = { + 'value': {'key': 'value', 'type': '[SqlMigrationService]'}, + 'next_link': {'key': 'nextLink', 'type': 'str'}, + } + + def __init__( + self, + **kwargs + ): + super(SqlMigrationListResult, self).__init__(**kwargs) + self.value = None + self.next_link = None + + +class SqlMigrationService(TrackedResource): + """A SQL Migration Service. + + Variables are only populated by the server, and will be ignored when sending a request. + + :param location: + :type location: str + :param tags: A set of tags. Dictionary of :code:``. + :type tags: dict[str, str] + :ivar id: + :vartype id: str + :ivar name: + :vartype name: str + :ivar type: + :vartype type: str + :ivar system_data: + :vartype system_data: ~azure.mgmt.datamigration.models.SystemData + :ivar provisioning_state: Provisioning state to track the async operation status. + :vartype provisioning_state: str + :ivar integration_runtime_state: Current state of the Integration runtime. + :vartype integration_runtime_state: str + """ + + _validation = { + 'id': {'readonly': True}, + 'name': {'readonly': True}, + 'type': {'readonly': True}, + 'system_data': {'readonly': True}, + 'provisioning_state': {'readonly': True}, + 'integration_runtime_state': {'readonly': True}, + } + + _attribute_map = { + 'location': {'key': 'location', 'type': 'str'}, + 'tags': {'key': 'tags', 'type': '{str}'}, + 'id': {'key': 'id', 'type': 'str'}, + 'name': {'key': 'name', 'type': 'str'}, + 'type': {'key': 'type', 'type': 'str'}, + 'system_data': {'key': 'systemData', 'type': 'SystemData'}, + 'provisioning_state': {'key': 'properties.provisioningState', 'type': 'str'}, + 'integration_runtime_state': {'key': 'properties.integrationRuntimeState', 'type': 'str'}, + } + + def __init__( + self, + *, + location: Optional[str] = None, + tags: Optional[Dict[str, str]] = None, + **kwargs + ): + super(SqlMigrationService, self).__init__(location=location, tags=tags, **kwargs) + self.provisioning_state = None + self.integration_runtime_state = None + + +class SqlMigrationServiceUpdate(msrest.serialization.Model): + """An update to a SQL Migration Service. + + :param tags: A set of tags. Dictionary of :code:``. + :type tags: dict[str, str] + """ + + _attribute_map = { + 'tags': {'key': 'tags', 'type': '{str}'}, + } + + def __init__( + self, + *, + tags: Optional[Dict[str, str]] = None, + **kwargs + ): + super(SqlMigrationServiceUpdate, self).__init__(**kwargs) + self.tags = tags + + +class SsisMigrationInfo(msrest.serialization.Model): + """SSIS migration info with SSIS store type, overwrite policy. + + :param ssis_store_type: The SSIS store type of source, only SSIS catalog is supported now in + DMS. Possible values include: "SsisCatalog". + :type ssis_store_type: str or ~azure.mgmt.datamigration.models.SsisStoreType + :param project_overwrite_option: The overwrite option for the SSIS project migration. Possible + values include: "Ignore", "Overwrite". + :type project_overwrite_option: str or + ~azure.mgmt.datamigration.models.SsisMigrationOverwriteOption + :param environment_overwrite_option: The overwrite option for the SSIS environment migration. + Possible values include: "Ignore", "Overwrite". + :type environment_overwrite_option: str or + ~azure.mgmt.datamigration.models.SsisMigrationOverwriteOption + """ + + _attribute_map = { + 'ssis_store_type': {'key': 'ssisStoreType', 'type': 'str'}, + 'project_overwrite_option': {'key': 'projectOverwriteOption', 'type': 'str'}, + 'environment_overwrite_option': {'key': 'environmentOverwriteOption', 'type': 'str'}, + } + + def __init__( + self, + *, + ssis_store_type: Optional[Union[str, "SsisStoreType"]] = None, + project_overwrite_option: Optional[Union[str, "SsisMigrationOverwriteOption"]] = None, + environment_overwrite_option: Optional[Union[str, "SsisMigrationOverwriteOption"]] = None, + **kwargs + ): + super(SsisMigrationInfo, self).__init__(**kwargs) + self.ssis_store_type = ssis_store_type + self.project_overwrite_option = project_overwrite_option + self.environment_overwrite_option = environment_overwrite_option + + +class StartMigrationScenarioServerRoleResult(msrest.serialization.Model): + """Server role migration result. + + Variables are only populated by the server, and will be ignored when sending a request. + + :ivar name: Name of server role. + :vartype name: str + :ivar state: Current state of migration. Possible values include: "None", "InProgress", + "Failed", "Warning", "Completed", "Skipped", "Stopped". + :vartype state: str or ~azure.mgmt.datamigration.models.MigrationState + :ivar exceptions_and_warnings: Migration exceptions and warnings. + :vartype exceptions_and_warnings: list[~azure.mgmt.datamigration.models.ReportableException] + """ + + _validation = { + 'name': {'readonly': True}, + 'state': {'readonly': True}, + 'exceptions_and_warnings': {'readonly': True}, + } + + _attribute_map = { + 'name': {'key': 'name', 'type': 'str'}, + 'state': {'key': 'state', 'type': 'str'}, + 'exceptions_and_warnings': {'key': 'exceptionsAndWarnings', 'type': '[ReportableException]'}, + } + + def __init__( + self, + **kwargs + ): + super(StartMigrationScenarioServerRoleResult, self).__init__(**kwargs) + self.name = None + self.state = None + self.exceptions_and_warnings = None + + +class SyncMigrationDatabaseErrorEvent(msrest.serialization.Model): + """Database migration errors for online migration. + + Variables are only populated by the server, and will be ignored when sending a request. + + :ivar timestamp_string: String value of timestamp. + :vartype timestamp_string: str + :ivar event_type_string: Event type. + :vartype event_type_string: str + :ivar event_text: Event text. + :vartype event_text: str + """ + + _validation = { + 'timestamp_string': {'readonly': True}, + 'event_type_string': {'readonly': True}, + 'event_text': {'readonly': True}, + } + + _attribute_map = { + 'timestamp_string': {'key': 'timestampString', 'type': 'str'}, + 'event_type_string': {'key': 'eventTypeString', 'type': 'str'}, + 'event_text': {'key': 'eventText', 'type': 'str'}, + } + + def __init__( + self, + **kwargs + ): + super(SyncMigrationDatabaseErrorEvent, self).__init__(**kwargs) + self.timestamp_string = None + self.event_type_string = None + self.event_text = None + + +class SystemData(msrest.serialization.Model): + """SystemData. + + :param created_by: + :type created_by: str + :param created_by_type: Possible values include: "User", "Application", "ManagedIdentity", + "Key". + :type created_by_type: str or ~azure.mgmt.datamigration.models.CreatedByType + :param created_at: + :type created_at: ~datetime.datetime + :param last_modified_by: + :type last_modified_by: str + :param last_modified_by_type: Possible values include: "User", "Application", + "ManagedIdentity", "Key". + :type last_modified_by_type: str or ~azure.mgmt.datamigration.models.CreatedByType + :param last_modified_at: + :type last_modified_at: ~datetime.datetime + """ + + _attribute_map = { + 'created_by': {'key': 'createdBy', 'type': 'str'}, + 'created_by_type': {'key': 'createdByType', 'type': 'str'}, + 'created_at': {'key': 'createdAt', 'type': 'iso-8601'}, + 'last_modified_by': {'key': 'lastModifiedBy', 'type': 'str'}, + 'last_modified_by_type': {'key': 'lastModifiedByType', 'type': 'str'}, + 'last_modified_at': {'key': 'lastModifiedAt', 'type': 'iso-8601'}, + } + + def __init__( + self, + *, + created_by: Optional[str] = None, + created_by_type: Optional[Union[str, "CreatedByType"]] = None, + created_at: Optional[datetime.datetime] = None, + last_modified_by: Optional[str] = None, + last_modified_by_type: Optional[Union[str, "CreatedByType"]] = None, + last_modified_at: Optional[datetime.datetime] = None, + **kwargs + ): + super(SystemData, self).__init__(**kwargs) + self.created_by = created_by + self.created_by_type = created_by_type + self.created_at = created_at + self.last_modified_by = last_modified_by + self.last_modified_by_type = last_modified_by_type + self.last_modified_at = last_modified_at + + +class TargetLocation(msrest.serialization.Model): + """Target Location details for optional copy of backups. + + :param storage_account_resource_id: Resource Id of the storage account copying backups. + :type storage_account_resource_id: str + :param account_key: Storage Account Key. + :type account_key: str + """ + + _attribute_map = { + 'storage_account_resource_id': {'key': 'storageAccountResourceId', 'type': 'str'}, + 'account_key': {'key': 'accountKey', 'type': 'str'}, + } + + def __init__( + self, + *, + storage_account_resource_id: Optional[str] = None, + account_key: Optional[str] = None, + **kwargs + ): + super(TargetLocation, self).__init__(**kwargs) + self.storage_account_resource_id = storage_account_resource_id + self.account_key = account_key + + +class TaskList(msrest.serialization.Model): + """OData page of tasks. + + :param value: List of tasks. + :type value: list[~azure.mgmt.datamigration.models.ProjectTask] + :param next_link: URL to load the next page of tasks. + :type next_link: str + """ + + _attribute_map = { + 'value': {'key': 'value', 'type': '[ProjectTask]'}, + 'next_link': {'key': 'nextLink', 'type': 'str'}, + } + + def __init__( + self, + *, + value: Optional[List["ProjectTask"]] = None, + next_link: Optional[str] = None, + **kwargs + ): + super(TaskList, self).__init__(**kwargs) + self.value = value + self.next_link = next_link + + +class UploadOciDriverTaskInput(msrest.serialization.Model): + """Input for the service task to upload an OCI driver. + + :param driver_share: File share information for the OCI driver archive. + :type driver_share: ~azure.mgmt.datamigration.models.FileShare + """ + + _attribute_map = { + 'driver_share': {'key': 'driverShare', 'type': 'FileShare'}, + } + + def __init__( + self, + *, + driver_share: Optional["FileShare"] = None, + **kwargs + ): + super(UploadOciDriverTaskInput, self).__init__(**kwargs) + self.driver_share = driver_share + + +class UploadOciDriverTaskOutput(msrest.serialization.Model): + """Output for the service task to upload an OCI driver. + + Variables are only populated by the server, and will be ignored when sending a request. + + :ivar driver_package_name: The name of the driver package that was validated and uploaded. + :vartype driver_package_name: str + :ivar validation_errors: Validation errors. + :vartype validation_errors: list[~azure.mgmt.datamigration.models.ReportableException] + """ + + _validation = { + 'driver_package_name': {'readonly': True}, + 'validation_errors': {'readonly': True}, + } + + _attribute_map = { + 'driver_package_name': {'key': 'driverPackageName', 'type': 'str'}, + 'validation_errors': {'key': 'validationErrors', 'type': '[ReportableException]'}, + } + + def __init__( + self, + **kwargs + ): + super(UploadOciDriverTaskOutput, self).__init__(**kwargs) + self.driver_package_name = None + self.validation_errors = None + + +class UploadOciDriverTaskProperties(ProjectTaskProperties): + """Properties for the task that uploads an OCI driver. + + Variables are only populated by the server, and will be ignored when sending a request. + + All required parameters must be populated in order to send to Azure. + + :param task_type: Required. Task type.Constant filled by server. Possible values include: + "Connect.MongoDb", "ConnectToSource.SqlServer", "ConnectToSource.SqlServer.Sync", + "ConnectToSource.PostgreSql.Sync", "ConnectToSource.MySql", "ConnectToSource.Oracle.Sync", + "ConnectToTarget.SqlDb", "ConnectToTarget.SqlDb.Sync", + "ConnectToTarget.AzureDbForPostgreSql.Sync", + "ConnectToTarget.Oracle.AzureDbForPostgreSql.Sync", "ConnectToTarget.AzureSqlDbMI", + "ConnectToTarget.AzureSqlDbMI.Sync.LRS", "ConnectToTarget.AzureDbForMySql", + "GetUserTables.Sql", "GetUserTables.AzureSqlDb.Sync", "GetUserTablesOracle", + "GetUserTablesPostgreSql", "GetUserTablesMySql", "Migrate.MongoDb", + "Migrate.SqlServer.AzureSqlDbMI", "Migrate.SqlServer.AzureSqlDbMI.Sync.LRS", + "Migrate.SqlServer.SqlDb", "Migrate.SqlServer.AzureSqlDb.Sync", + "Migrate.MySql.AzureDbForMySql.Sync", "Migrate.MySql.AzureDbForMySql", + "Migrate.PostgreSql.AzureDbForPostgreSql.SyncV2", "Migrate.Oracle.AzureDbForPostgreSql.Sync", + "ValidateMigrationInput.SqlServer.SqlDb.Sync", "ValidateMigrationInput.SqlServer.AzureSqlDbMI", + "ValidateMigrationInput.SqlServer.AzureSqlDbMI.Sync.LRS", "Validate.MongoDb", + "Validate.Oracle.AzureDbPostgreSql.Sync", "GetTDECertificates.Sql", "Migrate.Ssis", + "Service.Check.OCI", "Service.Upload.OCI", "Service.Install.OCI", + "MigrateSchemaSqlServerSqlDb". + :type task_type: str or ~azure.mgmt.datamigration.models.TaskType + :ivar errors: Array of errors. This is ignored if submitted. + :vartype errors: list[~azure.mgmt.datamigration.models.ODataError] + :ivar state: The state of the task. This is ignored if submitted. Possible values include: + "Unknown", "Queued", "Running", "Canceled", "Succeeded", "Failed", "FailedInputValidation", + "Faulted". + :vartype state: str or ~azure.mgmt.datamigration.models.TaskState + :ivar commands: Array of command properties. + :vartype commands: list[~azure.mgmt.datamigration.models.CommandProperties] + :param client_data: Key value pairs of client data to attach meta data information to task. + :type client_data: dict[str, str] + :param input: Input for the service task to upload an OCI driver. + :type input: ~azure.mgmt.datamigration.models.UploadOciDriverTaskInput + :ivar output: Task output. This is ignored if submitted. + :vartype output: list[~azure.mgmt.datamigration.models.UploadOciDriverTaskOutput] + """ + + _validation = { + 'task_type': {'required': True}, + 'errors': {'readonly': True}, + 'state': {'readonly': True}, + 'commands': {'readonly': True}, + 'output': {'readonly': True}, + } + + _attribute_map = { + 'task_type': {'key': 'taskType', 'type': 'str'}, + 'errors': {'key': 'errors', 'type': '[ODataError]'}, + 'state': {'key': 'state', 'type': 'str'}, + 'commands': {'key': 'commands', 'type': '[CommandProperties]'}, + 'client_data': {'key': 'clientData', 'type': '{str}'}, + 'input': {'key': 'input', 'type': 'UploadOciDriverTaskInput'}, + 'output': {'key': 'output', 'type': '[UploadOciDriverTaskOutput]'}, + } + + def __init__( + self, + *, + client_data: Optional[Dict[str, str]] = None, + input: Optional["UploadOciDriverTaskInput"] = None, + **kwargs + ): + super(UploadOciDriverTaskProperties, self).__init__(client_data=client_data, **kwargs) + self.task_type = 'Service.Upload.OCI' # type: str + self.input = input + self.output = None + + +class ValidateMigrationInputSqlServerSqlDbSyncTaskProperties(ProjectTaskProperties): + """Properties for task that validates migration input for SQL to Azure SQL DB sync migrations. + + Variables are only populated by the server, and will be ignored when sending a request. + + All required parameters must be populated in order to send to Azure. + + :param task_type: Required. Task type.Constant filled by server. Possible values include: + "Connect.MongoDb", "ConnectToSource.SqlServer", "ConnectToSource.SqlServer.Sync", + "ConnectToSource.PostgreSql.Sync", "ConnectToSource.MySql", "ConnectToSource.Oracle.Sync", + "ConnectToTarget.SqlDb", "ConnectToTarget.SqlDb.Sync", + "ConnectToTarget.AzureDbForPostgreSql.Sync", + "ConnectToTarget.Oracle.AzureDbForPostgreSql.Sync", "ConnectToTarget.AzureSqlDbMI", + "ConnectToTarget.AzureSqlDbMI.Sync.LRS", "ConnectToTarget.AzureDbForMySql", + "GetUserTables.Sql", "GetUserTables.AzureSqlDb.Sync", "GetUserTablesOracle", + "GetUserTablesPostgreSql", "GetUserTablesMySql", "Migrate.MongoDb", + "Migrate.SqlServer.AzureSqlDbMI", "Migrate.SqlServer.AzureSqlDbMI.Sync.LRS", + "Migrate.SqlServer.SqlDb", "Migrate.SqlServer.AzureSqlDb.Sync", + "Migrate.MySql.AzureDbForMySql.Sync", "Migrate.MySql.AzureDbForMySql", + "Migrate.PostgreSql.AzureDbForPostgreSql.SyncV2", "Migrate.Oracle.AzureDbForPostgreSql.Sync", + "ValidateMigrationInput.SqlServer.SqlDb.Sync", "ValidateMigrationInput.SqlServer.AzureSqlDbMI", + "ValidateMigrationInput.SqlServer.AzureSqlDbMI.Sync.LRS", "Validate.MongoDb", + "Validate.Oracle.AzureDbPostgreSql.Sync", "GetTDECertificates.Sql", "Migrate.Ssis", + "Service.Check.OCI", "Service.Upload.OCI", "Service.Install.OCI", + "MigrateSchemaSqlServerSqlDb". + :type task_type: str or ~azure.mgmt.datamigration.models.TaskType + :ivar errors: Array of errors. This is ignored if submitted. + :vartype errors: list[~azure.mgmt.datamigration.models.ODataError] + :ivar state: The state of the task. This is ignored if submitted. Possible values include: + "Unknown", "Queued", "Running", "Canceled", "Succeeded", "Failed", "FailedInputValidation", + "Faulted". + :vartype state: str or ~azure.mgmt.datamigration.models.TaskState + :ivar commands: Array of command properties. + :vartype commands: list[~azure.mgmt.datamigration.models.CommandProperties] + :param client_data: Key value pairs of client data to attach meta data information to task. + :type client_data: dict[str, str] + :param input: Task input. + :type input: ~azure.mgmt.datamigration.models.ValidateSyncMigrationInputSqlServerTaskInput + :ivar output: Task output. This is ignored if submitted. + :vartype output: + list[~azure.mgmt.datamigration.models.ValidateSyncMigrationInputSqlServerTaskOutput] + """ + + _validation = { + 'task_type': {'required': True}, + 'errors': {'readonly': True}, + 'state': {'readonly': True}, + 'commands': {'readonly': True}, + 'output': {'readonly': True}, + } + + _attribute_map = { + 'task_type': {'key': 'taskType', 'type': 'str'}, + 'errors': {'key': 'errors', 'type': '[ODataError]'}, + 'state': {'key': 'state', 'type': 'str'}, + 'commands': {'key': 'commands', 'type': '[CommandProperties]'}, + 'client_data': {'key': 'clientData', 'type': '{str}'}, + 'input': {'key': 'input', 'type': 'ValidateSyncMigrationInputSqlServerTaskInput'}, + 'output': {'key': 'output', 'type': '[ValidateSyncMigrationInputSqlServerTaskOutput]'}, + } + + def __init__( + self, + *, + client_data: Optional[Dict[str, str]] = None, + input: Optional["ValidateSyncMigrationInputSqlServerTaskInput"] = None, + **kwargs + ): + super(ValidateMigrationInputSqlServerSqlDbSyncTaskProperties, self).__init__(client_data=client_data, **kwargs) + self.task_type = 'ValidateMigrationInput.SqlServer.SqlDb.Sync' # type: str + self.input = input + self.output = None + + +class ValidateMigrationInputSqlServerSqlMiSyncTaskInput(SqlServerSqlMiSyncTaskInput): + """Input for task that migrates SQL Server databases to Azure SQL Database Managed Instance online scenario. + + All required parameters must be populated in order to send to Azure. + + :param selected_databases: Required. Databases to migrate. + :type selected_databases: + list[~azure.mgmt.datamigration.models.MigrateSqlServerSqlMiDatabaseInput] + :param backup_file_share: Backup file share information for all selected databases. + :type backup_file_share: ~azure.mgmt.datamigration.models.FileShare + :param storage_resource_id: Required. Fully qualified resourceId of storage. + :type storage_resource_id: str + :param source_connection_info: Required. Connection information for source SQL Server. + :type source_connection_info: ~azure.mgmt.datamigration.models.SqlConnectionInfo + :param target_connection_info: Required. Connection information for Azure SQL Database Managed + Instance. + :type target_connection_info: ~azure.mgmt.datamigration.models.MiSqlConnectionInfo + :param azure_app: Required. Azure Active Directory Application the DMS instance will use to + connect to the target instance of Azure SQL Database Managed Instance and the Azure Storage + Account. + :type azure_app: ~azure.mgmt.datamigration.models.AzureActiveDirectoryApp + """ + + _validation = { + 'selected_databases': {'required': True}, + 'storage_resource_id': {'required': True}, + 'source_connection_info': {'required': True}, + 'target_connection_info': {'required': True}, + 'azure_app': {'required': True}, + } + + _attribute_map = { + 'selected_databases': {'key': 'selectedDatabases', 'type': '[MigrateSqlServerSqlMiDatabaseInput]'}, + 'backup_file_share': {'key': 'backupFileShare', 'type': 'FileShare'}, + 'storage_resource_id': {'key': 'storageResourceId', 'type': 'str'}, + 'source_connection_info': {'key': 'sourceConnectionInfo', 'type': 'SqlConnectionInfo'}, + 'target_connection_info': {'key': 'targetConnectionInfo', 'type': 'MiSqlConnectionInfo'}, + 'azure_app': {'key': 'azureApp', 'type': 'AzureActiveDirectoryApp'}, + } + + def __init__( + self, + *, + selected_databases: List["MigrateSqlServerSqlMiDatabaseInput"], + storage_resource_id: str, + source_connection_info: "SqlConnectionInfo", + target_connection_info: "MiSqlConnectionInfo", + azure_app: "AzureActiveDirectoryApp", + backup_file_share: Optional["FileShare"] = None, + **kwargs + ): + super(ValidateMigrationInputSqlServerSqlMiSyncTaskInput, self).__init__(selected_databases=selected_databases, backup_file_share=backup_file_share, storage_resource_id=storage_resource_id, source_connection_info=source_connection_info, target_connection_info=target_connection_info, azure_app=azure_app, **kwargs) + + +class ValidateMigrationInputSqlServerSqlMiSyncTaskOutput(msrest.serialization.Model): + """Output for task that validates migration input for Azure SQL Database Managed Instance online migration. + + Variables are only populated by the server, and will be ignored when sending a request. + + :ivar id: Database identifier. + :vartype id: str + :ivar name: Name of database. + :vartype name: str + :ivar validation_errors: Errors associated with a selected database object. + :vartype validation_errors: list[~azure.mgmt.datamigration.models.ReportableException] + """ + + _validation = { + 'id': {'readonly': True}, + 'name': {'readonly': True}, + 'validation_errors': {'readonly': True}, + } + + _attribute_map = { + 'id': {'key': 'id', 'type': 'str'}, + 'name': {'key': 'name', 'type': 'str'}, + 'validation_errors': {'key': 'validationErrors', 'type': '[ReportableException]'}, + } + + def __init__( + self, + **kwargs + ): + super(ValidateMigrationInputSqlServerSqlMiSyncTaskOutput, self).__init__(**kwargs) + self.id = None + self.name = None + self.validation_errors = None + + +class ValidateMigrationInputSqlServerSqlMiSyncTaskProperties(ProjectTaskProperties): + """Properties for task that validates migration input for SQL to Azure SQL Database Managed Instance sync scenario. + + Variables are only populated by the server, and will be ignored when sending a request. + + All required parameters must be populated in order to send to Azure. + + :param task_type: Required. Task type.Constant filled by server. Possible values include: + "Connect.MongoDb", "ConnectToSource.SqlServer", "ConnectToSource.SqlServer.Sync", + "ConnectToSource.PostgreSql.Sync", "ConnectToSource.MySql", "ConnectToSource.Oracle.Sync", + "ConnectToTarget.SqlDb", "ConnectToTarget.SqlDb.Sync", + "ConnectToTarget.AzureDbForPostgreSql.Sync", + "ConnectToTarget.Oracle.AzureDbForPostgreSql.Sync", "ConnectToTarget.AzureSqlDbMI", + "ConnectToTarget.AzureSqlDbMI.Sync.LRS", "ConnectToTarget.AzureDbForMySql", + "GetUserTables.Sql", "GetUserTables.AzureSqlDb.Sync", "GetUserTablesOracle", + "GetUserTablesPostgreSql", "GetUserTablesMySql", "Migrate.MongoDb", + "Migrate.SqlServer.AzureSqlDbMI", "Migrate.SqlServer.AzureSqlDbMI.Sync.LRS", + "Migrate.SqlServer.SqlDb", "Migrate.SqlServer.AzureSqlDb.Sync", + "Migrate.MySql.AzureDbForMySql.Sync", "Migrate.MySql.AzureDbForMySql", + "Migrate.PostgreSql.AzureDbForPostgreSql.SyncV2", "Migrate.Oracle.AzureDbForPostgreSql.Sync", + "ValidateMigrationInput.SqlServer.SqlDb.Sync", "ValidateMigrationInput.SqlServer.AzureSqlDbMI", + "ValidateMigrationInput.SqlServer.AzureSqlDbMI.Sync.LRS", "Validate.MongoDb", + "Validate.Oracle.AzureDbPostgreSql.Sync", "GetTDECertificates.Sql", "Migrate.Ssis", + "Service.Check.OCI", "Service.Upload.OCI", "Service.Install.OCI", + "MigrateSchemaSqlServerSqlDb". + :type task_type: str or ~azure.mgmt.datamigration.models.TaskType + :ivar errors: Array of errors. This is ignored if submitted. + :vartype errors: list[~azure.mgmt.datamigration.models.ODataError] + :ivar state: The state of the task. This is ignored if submitted. Possible values include: + "Unknown", "Queued", "Running", "Canceled", "Succeeded", "Failed", "FailedInputValidation", + "Faulted". + :vartype state: str or ~azure.mgmt.datamigration.models.TaskState + :ivar commands: Array of command properties. + :vartype commands: list[~azure.mgmt.datamigration.models.CommandProperties] + :param client_data: Key value pairs of client data to attach meta data information to task. + :type client_data: dict[str, str] + :param input: Task input. + :type input: ~azure.mgmt.datamigration.models.SqlServerSqlMiSyncTaskInput + :ivar output: Task output. This is ignored if submitted. + :vartype output: + list[~azure.mgmt.datamigration.models.ValidateMigrationInputSqlServerSqlMiSyncTaskOutput] + """ + + _validation = { + 'task_type': {'required': True}, + 'errors': {'readonly': True}, + 'state': {'readonly': True}, + 'commands': {'readonly': True}, + 'output': {'readonly': True}, + } + + _attribute_map = { + 'task_type': {'key': 'taskType', 'type': 'str'}, + 'errors': {'key': 'errors', 'type': '[ODataError]'}, + 'state': {'key': 'state', 'type': 'str'}, + 'commands': {'key': 'commands', 'type': '[CommandProperties]'}, + 'client_data': {'key': 'clientData', 'type': '{str}'}, + 'input': {'key': 'input', 'type': 'SqlServerSqlMiSyncTaskInput'}, + 'output': {'key': 'output', 'type': '[ValidateMigrationInputSqlServerSqlMiSyncTaskOutput]'}, + } + + def __init__( + self, + *, + client_data: Optional[Dict[str, str]] = None, + input: Optional["SqlServerSqlMiSyncTaskInput"] = None, + **kwargs + ): + super(ValidateMigrationInputSqlServerSqlMiSyncTaskProperties, self).__init__(client_data=client_data, **kwargs) + self.task_type = 'ValidateMigrationInput.SqlServer.AzureSqlDbMI.Sync.LRS' # type: str + self.input = input + self.output = None + + +class ValidateMigrationInputSqlServerSqlMiTaskInput(msrest.serialization.Model): + """Input for task that validates migration input for SQL to Azure SQL Managed Instance. + + All required parameters must be populated in order to send to Azure. + + :param source_connection_info: Required. Information for connecting to source. + :type source_connection_info: ~azure.mgmt.datamigration.models.SqlConnectionInfo + :param target_connection_info: Required. Information for connecting to target. + :type target_connection_info: ~azure.mgmt.datamigration.models.SqlConnectionInfo + :param selected_databases: Required. Databases to migrate. + :type selected_databases: + list[~azure.mgmt.datamigration.models.MigrateSqlServerSqlMiDatabaseInput] + :param selected_logins: Logins to migrate. + :type selected_logins: list[str] + :param backup_file_share: Backup file share information for all selected databases. + :type backup_file_share: ~azure.mgmt.datamigration.models.FileShare + :param backup_blob_share: Required. SAS URI of Azure Storage Account Container to be used for + storing backup files. + :type backup_blob_share: ~azure.mgmt.datamigration.models.BlobShare + :param backup_mode: Backup Mode to specify whether to use existing backup or create new backup. + Possible values include: "CreateBackup", "ExistingBackup". + :type backup_mode: str or ~azure.mgmt.datamigration.models.BackupMode + """ + + _validation = { + 'source_connection_info': {'required': True}, + 'target_connection_info': {'required': True}, + 'selected_databases': {'required': True}, + 'backup_blob_share': {'required': True}, + } + + _attribute_map = { + 'source_connection_info': {'key': 'sourceConnectionInfo', 'type': 'SqlConnectionInfo'}, + 'target_connection_info': {'key': 'targetConnectionInfo', 'type': 'SqlConnectionInfo'}, + 'selected_databases': {'key': 'selectedDatabases', 'type': '[MigrateSqlServerSqlMiDatabaseInput]'}, + 'selected_logins': {'key': 'selectedLogins', 'type': '[str]'}, + 'backup_file_share': {'key': 'backupFileShare', 'type': 'FileShare'}, + 'backup_blob_share': {'key': 'backupBlobShare', 'type': 'BlobShare'}, + 'backup_mode': {'key': 'backupMode', 'type': 'str'}, + } + + def __init__( + self, + *, + source_connection_info: "SqlConnectionInfo", + target_connection_info: "SqlConnectionInfo", + selected_databases: List["MigrateSqlServerSqlMiDatabaseInput"], + backup_blob_share: "BlobShare", + selected_logins: Optional[List[str]] = None, + backup_file_share: Optional["FileShare"] = None, + backup_mode: Optional[Union[str, "BackupMode"]] = None, + **kwargs + ): + super(ValidateMigrationInputSqlServerSqlMiTaskInput, self).__init__(**kwargs) + self.source_connection_info = source_connection_info + self.target_connection_info = target_connection_info + self.selected_databases = selected_databases + self.selected_logins = selected_logins + self.backup_file_share = backup_file_share + self.backup_blob_share = backup_blob_share + self.backup_mode = backup_mode + + +class ValidateMigrationInputSqlServerSqlMiTaskOutput(msrest.serialization.Model): + """Output for task that validates migration input for SQL to Azure SQL Managed Instance migrations. + + Variables are only populated by the server, and will be ignored when sending a request. + + :ivar id: Result identifier. + :vartype id: str + :ivar name: Name of database. + :vartype name: str + :ivar restore_database_name_errors: Errors associated with the RestoreDatabaseName. + :vartype restore_database_name_errors: + list[~azure.mgmt.datamigration.models.ReportableException] + :ivar backup_folder_errors: Errors associated with the BackupFolder path. + :vartype backup_folder_errors: list[~azure.mgmt.datamigration.models.ReportableException] + :ivar backup_share_credentials_errors: Errors associated with backup share user name and + password credentials. + :vartype backup_share_credentials_errors: + list[~azure.mgmt.datamigration.models.ReportableException] + :ivar backup_storage_account_errors: Errors associated with the storage account provided. + :vartype backup_storage_account_errors: + list[~azure.mgmt.datamigration.models.ReportableException] + :ivar existing_backup_errors: Errors associated with existing backup files. + :vartype existing_backup_errors: list[~azure.mgmt.datamigration.models.ReportableException] + :param database_backup_info: Information about backup files when existing backup mode is used. + :type database_backup_info: ~azure.mgmt.datamigration.models.DatabaseBackupInfo + """ + + _validation = { + 'id': {'readonly': True}, + 'name': {'readonly': True}, + 'restore_database_name_errors': {'readonly': True}, + 'backup_folder_errors': {'readonly': True}, + 'backup_share_credentials_errors': {'readonly': True}, + 'backup_storage_account_errors': {'readonly': True}, + 'existing_backup_errors': {'readonly': True}, + } + + _attribute_map = { + 'id': {'key': 'id', 'type': 'str'}, + 'name': {'key': 'name', 'type': 'str'}, + 'restore_database_name_errors': {'key': 'restoreDatabaseNameErrors', 'type': '[ReportableException]'}, + 'backup_folder_errors': {'key': 'backupFolderErrors', 'type': '[ReportableException]'}, + 'backup_share_credentials_errors': {'key': 'backupShareCredentialsErrors', 'type': '[ReportableException]'}, + 'backup_storage_account_errors': {'key': 'backupStorageAccountErrors', 'type': '[ReportableException]'}, + 'existing_backup_errors': {'key': 'existingBackupErrors', 'type': '[ReportableException]'}, + 'database_backup_info': {'key': 'databaseBackupInfo', 'type': 'DatabaseBackupInfo'}, + } + + def __init__( + self, + *, + database_backup_info: Optional["DatabaseBackupInfo"] = None, + **kwargs + ): + super(ValidateMigrationInputSqlServerSqlMiTaskOutput, self).__init__(**kwargs) + self.id = None + self.name = None + self.restore_database_name_errors = None + self.backup_folder_errors = None + self.backup_share_credentials_errors = None + self.backup_storage_account_errors = None + self.existing_backup_errors = None + self.database_backup_info = database_backup_info + + +class ValidateMigrationInputSqlServerSqlMiTaskProperties(ProjectTaskProperties): + """Properties for task that validates migration input for SQL to Azure SQL Database Managed Instance. + + Variables are only populated by the server, and will be ignored when sending a request. + + All required parameters must be populated in order to send to Azure. + + :param task_type: Required. Task type.Constant filled by server. Possible values include: + "Connect.MongoDb", "ConnectToSource.SqlServer", "ConnectToSource.SqlServer.Sync", + "ConnectToSource.PostgreSql.Sync", "ConnectToSource.MySql", "ConnectToSource.Oracle.Sync", + "ConnectToTarget.SqlDb", "ConnectToTarget.SqlDb.Sync", + "ConnectToTarget.AzureDbForPostgreSql.Sync", + "ConnectToTarget.Oracle.AzureDbForPostgreSql.Sync", "ConnectToTarget.AzureSqlDbMI", + "ConnectToTarget.AzureSqlDbMI.Sync.LRS", "ConnectToTarget.AzureDbForMySql", + "GetUserTables.Sql", "GetUserTables.AzureSqlDb.Sync", "GetUserTablesOracle", + "GetUserTablesPostgreSql", "GetUserTablesMySql", "Migrate.MongoDb", + "Migrate.SqlServer.AzureSqlDbMI", "Migrate.SqlServer.AzureSqlDbMI.Sync.LRS", + "Migrate.SqlServer.SqlDb", "Migrate.SqlServer.AzureSqlDb.Sync", + "Migrate.MySql.AzureDbForMySql.Sync", "Migrate.MySql.AzureDbForMySql", + "Migrate.PostgreSql.AzureDbForPostgreSql.SyncV2", "Migrate.Oracle.AzureDbForPostgreSql.Sync", + "ValidateMigrationInput.SqlServer.SqlDb.Sync", "ValidateMigrationInput.SqlServer.AzureSqlDbMI", + "ValidateMigrationInput.SqlServer.AzureSqlDbMI.Sync.LRS", "Validate.MongoDb", + "Validate.Oracle.AzureDbPostgreSql.Sync", "GetTDECertificates.Sql", "Migrate.Ssis", + "Service.Check.OCI", "Service.Upload.OCI", "Service.Install.OCI", + "MigrateSchemaSqlServerSqlDb". + :type task_type: str or ~azure.mgmt.datamigration.models.TaskType + :ivar errors: Array of errors. This is ignored if submitted. + :vartype errors: list[~azure.mgmt.datamigration.models.ODataError] + :ivar state: The state of the task. This is ignored if submitted. Possible values include: + "Unknown", "Queued", "Running", "Canceled", "Succeeded", "Failed", "FailedInputValidation", + "Faulted". + :vartype state: str or ~azure.mgmt.datamigration.models.TaskState + :ivar commands: Array of command properties. + :vartype commands: list[~azure.mgmt.datamigration.models.CommandProperties] + :param client_data: Key value pairs of client data to attach meta data information to task. + :type client_data: dict[str, str] + :param input: Task input. + :type input: ~azure.mgmt.datamigration.models.ValidateMigrationInputSqlServerSqlMiTaskInput + :ivar output: Task output. This is ignored if submitted. + :vartype output: + list[~azure.mgmt.datamigration.models.ValidateMigrationInputSqlServerSqlMiTaskOutput] + """ + + _validation = { + 'task_type': {'required': True}, + 'errors': {'readonly': True}, + 'state': {'readonly': True}, + 'commands': {'readonly': True}, + 'output': {'readonly': True}, + } + + _attribute_map = { + 'task_type': {'key': 'taskType', 'type': 'str'}, + 'errors': {'key': 'errors', 'type': '[ODataError]'}, + 'state': {'key': 'state', 'type': 'str'}, + 'commands': {'key': 'commands', 'type': '[CommandProperties]'}, + 'client_data': {'key': 'clientData', 'type': '{str}'}, + 'input': {'key': 'input', 'type': 'ValidateMigrationInputSqlServerSqlMiTaskInput'}, + 'output': {'key': 'output', 'type': '[ValidateMigrationInputSqlServerSqlMiTaskOutput]'}, + } + + def __init__( + self, + *, + client_data: Optional[Dict[str, str]] = None, + input: Optional["ValidateMigrationInputSqlServerSqlMiTaskInput"] = None, + **kwargs + ): + super(ValidateMigrationInputSqlServerSqlMiTaskProperties, self).__init__(client_data=client_data, **kwargs) + self.task_type = 'ValidateMigrationInput.SqlServer.AzureSqlDbMI' # type: str + self.input = input + self.output = None + + +class ValidateMongoDbTaskProperties(ProjectTaskProperties): + """Properties for the task that validates a migration between MongoDB data sources. + + Variables are only populated by the server, and will be ignored when sending a request. + + All required parameters must be populated in order to send to Azure. + + :param task_type: Required. Task type.Constant filled by server. Possible values include: + "Connect.MongoDb", "ConnectToSource.SqlServer", "ConnectToSource.SqlServer.Sync", + "ConnectToSource.PostgreSql.Sync", "ConnectToSource.MySql", "ConnectToSource.Oracle.Sync", + "ConnectToTarget.SqlDb", "ConnectToTarget.SqlDb.Sync", + "ConnectToTarget.AzureDbForPostgreSql.Sync", + "ConnectToTarget.Oracle.AzureDbForPostgreSql.Sync", "ConnectToTarget.AzureSqlDbMI", + "ConnectToTarget.AzureSqlDbMI.Sync.LRS", "ConnectToTarget.AzureDbForMySql", + "GetUserTables.Sql", "GetUserTables.AzureSqlDb.Sync", "GetUserTablesOracle", + "GetUserTablesPostgreSql", "GetUserTablesMySql", "Migrate.MongoDb", + "Migrate.SqlServer.AzureSqlDbMI", "Migrate.SqlServer.AzureSqlDbMI.Sync.LRS", + "Migrate.SqlServer.SqlDb", "Migrate.SqlServer.AzureSqlDb.Sync", + "Migrate.MySql.AzureDbForMySql.Sync", "Migrate.MySql.AzureDbForMySql", + "Migrate.PostgreSql.AzureDbForPostgreSql.SyncV2", "Migrate.Oracle.AzureDbForPostgreSql.Sync", + "ValidateMigrationInput.SqlServer.SqlDb.Sync", "ValidateMigrationInput.SqlServer.AzureSqlDbMI", + "ValidateMigrationInput.SqlServer.AzureSqlDbMI.Sync.LRS", "Validate.MongoDb", + "Validate.Oracle.AzureDbPostgreSql.Sync", "GetTDECertificates.Sql", "Migrate.Ssis", + "Service.Check.OCI", "Service.Upload.OCI", "Service.Install.OCI", + "MigrateSchemaSqlServerSqlDb". + :type task_type: str or ~azure.mgmt.datamigration.models.TaskType + :ivar errors: Array of errors. This is ignored if submitted. + :vartype errors: list[~azure.mgmt.datamigration.models.ODataError] + :ivar state: The state of the task. This is ignored if submitted. Possible values include: + "Unknown", "Queued", "Running", "Canceled", "Succeeded", "Failed", "FailedInputValidation", + "Faulted". + :vartype state: str or ~azure.mgmt.datamigration.models.TaskState + :ivar commands: Array of command properties. + :vartype commands: list[~azure.mgmt.datamigration.models.CommandProperties] + :param client_data: Key value pairs of client data to attach meta data information to task. + :type client_data: dict[str, str] + :param input: Describes how a MongoDB data migration should be performed. + :type input: ~azure.mgmt.datamigration.models.MongoDbMigrationSettings + :ivar output: An array containing a single MongoDbMigrationProgress object. + :vartype output: list[~azure.mgmt.datamigration.models.MongoDbMigrationProgress] + """ + + _validation = { + 'task_type': {'required': True}, + 'errors': {'readonly': True}, + 'state': {'readonly': True}, + 'commands': {'readonly': True}, + 'output': {'readonly': True}, + } + + _attribute_map = { + 'task_type': {'key': 'taskType', 'type': 'str'}, + 'errors': {'key': 'errors', 'type': '[ODataError]'}, + 'state': {'key': 'state', 'type': 'str'}, + 'commands': {'key': 'commands', 'type': '[CommandProperties]'}, + 'client_data': {'key': 'clientData', 'type': '{str}'}, + 'input': {'key': 'input', 'type': 'MongoDbMigrationSettings'}, + 'output': {'key': 'output', 'type': '[MongoDbMigrationProgress]'}, + } + + def __init__( + self, + *, + client_data: Optional[Dict[str, str]] = None, + input: Optional["MongoDbMigrationSettings"] = None, + **kwargs + ): + super(ValidateMongoDbTaskProperties, self).__init__(client_data=client_data, **kwargs) + self.task_type = 'Validate.MongoDb' # type: str + self.input = input + self.output = None + + +class ValidateOracleAzureDbForPostgreSqlSyncTaskProperties(ProjectTaskProperties): + """Properties for the task that validates a migration for Oracle to Azure Database for PostgreSQL for online migrations. + + Variables are only populated by the server, and will be ignored when sending a request. + + All required parameters must be populated in order to send to Azure. + + :param task_type: Required. Task type.Constant filled by server. Possible values include: + "Connect.MongoDb", "ConnectToSource.SqlServer", "ConnectToSource.SqlServer.Sync", + "ConnectToSource.PostgreSql.Sync", "ConnectToSource.MySql", "ConnectToSource.Oracle.Sync", + "ConnectToTarget.SqlDb", "ConnectToTarget.SqlDb.Sync", + "ConnectToTarget.AzureDbForPostgreSql.Sync", + "ConnectToTarget.Oracle.AzureDbForPostgreSql.Sync", "ConnectToTarget.AzureSqlDbMI", + "ConnectToTarget.AzureSqlDbMI.Sync.LRS", "ConnectToTarget.AzureDbForMySql", + "GetUserTables.Sql", "GetUserTables.AzureSqlDb.Sync", "GetUserTablesOracle", + "GetUserTablesPostgreSql", "GetUserTablesMySql", "Migrate.MongoDb", + "Migrate.SqlServer.AzureSqlDbMI", "Migrate.SqlServer.AzureSqlDbMI.Sync.LRS", + "Migrate.SqlServer.SqlDb", "Migrate.SqlServer.AzureSqlDb.Sync", + "Migrate.MySql.AzureDbForMySql.Sync", "Migrate.MySql.AzureDbForMySql", + "Migrate.PostgreSql.AzureDbForPostgreSql.SyncV2", "Migrate.Oracle.AzureDbForPostgreSql.Sync", + "ValidateMigrationInput.SqlServer.SqlDb.Sync", "ValidateMigrationInput.SqlServer.AzureSqlDbMI", + "ValidateMigrationInput.SqlServer.AzureSqlDbMI.Sync.LRS", "Validate.MongoDb", + "Validate.Oracle.AzureDbPostgreSql.Sync", "GetTDECertificates.Sql", "Migrate.Ssis", + "Service.Check.OCI", "Service.Upload.OCI", "Service.Install.OCI", + "MigrateSchemaSqlServerSqlDb". + :type task_type: str or ~azure.mgmt.datamigration.models.TaskType + :ivar errors: Array of errors. This is ignored if submitted. + :vartype errors: list[~azure.mgmt.datamigration.models.ODataError] + :ivar state: The state of the task. This is ignored if submitted. Possible values include: + "Unknown", "Queued", "Running", "Canceled", "Succeeded", "Failed", "FailedInputValidation", + "Faulted". + :vartype state: str or ~azure.mgmt.datamigration.models.TaskState + :ivar commands: Array of command properties. + :vartype commands: list[~azure.mgmt.datamigration.models.CommandProperties] + :param client_data: Key value pairs of client data to attach meta data information to task. + :type client_data: dict[str, str] + :param input: Input for the task that migrates Oracle databases to Azure Database for + PostgreSQL for online migrations. + :type input: ~azure.mgmt.datamigration.models.MigrateOracleAzureDbPostgreSqlSyncTaskInput + :ivar output: An array containing a single validation error response object. + :vartype output: + list[~azure.mgmt.datamigration.models.ValidateOracleAzureDbPostgreSqlSyncTaskOutput] + """ + + _validation = { + 'task_type': {'required': True}, + 'errors': {'readonly': True}, + 'state': {'readonly': True}, + 'commands': {'readonly': True}, + 'output': {'readonly': True}, + } + + _attribute_map = { + 'task_type': {'key': 'taskType', 'type': 'str'}, + 'errors': {'key': 'errors', 'type': '[ODataError]'}, + 'state': {'key': 'state', 'type': 'str'}, + 'commands': {'key': 'commands', 'type': '[CommandProperties]'}, + 'client_data': {'key': 'clientData', 'type': '{str}'}, + 'input': {'key': 'input', 'type': 'MigrateOracleAzureDbPostgreSqlSyncTaskInput'}, + 'output': {'key': 'output', 'type': '[ValidateOracleAzureDbPostgreSqlSyncTaskOutput]'}, + } + + def __init__( + self, + *, + client_data: Optional[Dict[str, str]] = None, + input: Optional["MigrateOracleAzureDbPostgreSqlSyncTaskInput"] = None, + **kwargs + ): + super(ValidateOracleAzureDbForPostgreSqlSyncTaskProperties, self).__init__(client_data=client_data, **kwargs) + self.task_type = 'Validate.Oracle.AzureDbPostgreSql.Sync' # type: str + self.input = input + self.output = None + + +class ValidateOracleAzureDbPostgreSqlSyncTaskOutput(msrest.serialization.Model): + """Output for task that validates migration input for Oracle to Azure Database for PostgreSQL for online migrations. + + Variables are only populated by the server, and will be ignored when sending a request. + + :ivar validation_errors: Errors associated with a selected database object. + :vartype validation_errors: list[~azure.mgmt.datamigration.models.ReportableException] + """ + + _validation = { + 'validation_errors': {'readonly': True}, + } + + _attribute_map = { + 'validation_errors': {'key': 'validationErrors', 'type': '[ReportableException]'}, + } + + def __init__( + self, + **kwargs + ): + super(ValidateOracleAzureDbPostgreSqlSyncTaskOutput, self).__init__(**kwargs) + self.validation_errors = None + + +class ValidateSyncMigrationInputSqlServerTaskInput(msrest.serialization.Model): + """Input for task that validates migration input for SQL sync migrations. + + All required parameters must be populated in order to send to Azure. + + :param source_connection_info: Required. Information for connecting to source SQL server. + :type source_connection_info: ~azure.mgmt.datamigration.models.SqlConnectionInfo + :param target_connection_info: Required. Information for connecting to target. + :type target_connection_info: ~azure.mgmt.datamigration.models.SqlConnectionInfo + :param selected_databases: Required. Databases to migrate. + :type selected_databases: + list[~azure.mgmt.datamigration.models.MigrateSqlServerSqlDbSyncDatabaseInput] + """ + + _validation = { + 'source_connection_info': {'required': True}, + 'target_connection_info': {'required': True}, + 'selected_databases': {'required': True}, + } + + _attribute_map = { + 'source_connection_info': {'key': 'sourceConnectionInfo', 'type': 'SqlConnectionInfo'}, + 'target_connection_info': {'key': 'targetConnectionInfo', 'type': 'SqlConnectionInfo'}, + 'selected_databases': {'key': 'selectedDatabases', 'type': '[MigrateSqlServerSqlDbSyncDatabaseInput]'}, + } + + def __init__( + self, + *, + source_connection_info: "SqlConnectionInfo", + target_connection_info: "SqlConnectionInfo", + selected_databases: List["MigrateSqlServerSqlDbSyncDatabaseInput"], + **kwargs + ): + super(ValidateSyncMigrationInputSqlServerTaskInput, self).__init__(**kwargs) + self.source_connection_info = source_connection_info + self.target_connection_info = target_connection_info + self.selected_databases = selected_databases + + +class ValidateSyncMigrationInputSqlServerTaskOutput(msrest.serialization.Model): + """Output for task that validates migration input for SQL sync migrations. + + Variables are only populated by the server, and will be ignored when sending a request. + + :ivar id: Database identifier. + :vartype id: str + :ivar name: Name of database. + :vartype name: str + :ivar validation_errors: Errors associated with a selected database object. + :vartype validation_errors: list[~azure.mgmt.datamigration.models.ReportableException] + """ + + _validation = { + 'id': {'readonly': True}, + 'name': {'readonly': True}, + 'validation_errors': {'readonly': True}, + } + + _attribute_map = { + 'id': {'key': 'id', 'type': 'str'}, + 'name': {'key': 'name', 'type': 'str'}, + 'validation_errors': {'key': 'validationErrors', 'type': '[ReportableException]'}, + } + + def __init__( + self, + **kwargs + ): + super(ValidateSyncMigrationInputSqlServerTaskOutput, self).__init__(**kwargs) + self.id = None + self.name = None + self.validation_errors = None + + +class ValidationError(msrest.serialization.Model): + """Description about the errors happen while performing migration validation. + + :param text: Error Text. + :type text: str + :param severity: Severity of the error. Possible values include: "Message", "Warning", "Error". + :type severity: str or ~azure.mgmt.datamigration.models.Severity + """ + + _attribute_map = { + 'text': {'key': 'text', 'type': 'str'}, + 'severity': {'key': 'severity', 'type': 'str'}, + } + + def __init__( + self, + *, + text: Optional[str] = None, + severity: Optional[Union[str, "Severity"]] = None, + **kwargs + ): + super(ValidationError, self).__init__(**kwargs) + self.text = text + self.severity = severity + + +class WaitStatistics(msrest.serialization.Model): + """Wait statistics gathered during query batch execution. + + :param wait_type: Type of the Wait. + :type wait_type: str + :param wait_time_ms: Total wait time in millisecond(s). + :type wait_time_ms: float + :param wait_count: Total no. of waits. + :type wait_count: long + """ + + _attribute_map = { + 'wait_type': {'key': 'waitType', 'type': 'str'}, + 'wait_time_ms': {'key': 'waitTimeMs', 'type': 'float'}, + 'wait_count': {'key': 'waitCount', 'type': 'long'}, + } + + def __init__( + self, + *, + wait_type: Optional[str] = None, + wait_time_ms: Optional[float] = 0, + wait_count: Optional[int] = None, + **kwargs + ): + super(WaitStatistics, self).__init__(**kwargs) + self.wait_type = wait_type + self.wait_time_ms = wait_time_ms + self.wait_count = wait_count diff --git a/src/datamigration/azext_datamigration/vendored_sdks/datamigration/operations/__init__.py b/src/datamigration/azext_datamigration/vendored_sdks/datamigration/operations/__init__.py new file mode 100644 index 00000000000..6e3db8789ac --- /dev/null +++ b/src/datamigration/azext_datamigration/vendored_sdks/datamigration/operations/__init__.py @@ -0,0 +1,33 @@ +# coding=utf-8 +# -------------------------------------------------------------------------- +# Copyright (c) Microsoft Corporation. All rights reserved. +# Licensed under the MIT License. See License.txt in the project root for license information. +# Code generated by Microsoft (R) AutoRest Code Generator. +# Changes may cause incorrect behavior and will be lost if the code is regenerated. +# -------------------------------------------------------------------------- + +from ._database_migrations_sql_mi_operations import DatabaseMigrationsSqlMiOperations +from ._database_migrations_sql_vm_operations import DatabaseMigrationsSqlVmOperations +from ._operations import Operations +from ._sql_migration_services_operations import SqlMigrationServicesOperations +from ._resource_skus_operations import ResourceSkusOperations +from ._services_operations import ServicesOperations +from ._tasks_operations import TasksOperations +from ._service_tasks_operations import ServiceTasksOperations +from ._projects_operations import ProjectsOperations +from ._usages_operations import UsagesOperations +from ._files_operations import FilesOperations + +__all__ = [ + 'DatabaseMigrationsSqlMiOperations', + 'DatabaseMigrationsSqlVmOperations', + 'Operations', + 'SqlMigrationServicesOperations', + 'ResourceSkusOperations', + 'ServicesOperations', + 'TasksOperations', + 'ServiceTasksOperations', + 'ProjectsOperations', + 'UsagesOperations', + 'FilesOperations', +] diff --git a/src/datamigration/azext_datamigration/vendored_sdks/datamigration/operations/_database_migrations_sql_mi_operations.py b/src/datamigration/azext_datamigration/vendored_sdks/datamigration/operations/_database_migrations_sql_mi_operations.py new file mode 100644 index 00000000000..442a15827c7 --- /dev/null +++ b/src/datamigration/azext_datamigration/vendored_sdks/datamigration/operations/_database_migrations_sql_mi_operations.py @@ -0,0 +1,513 @@ +# coding=utf-8 +# -------------------------------------------------------------------------- +# Copyright (c) Microsoft Corporation. All rights reserved. +# Licensed under the MIT License. See License.txt in the project root for license information. +# Code generated by Microsoft (R) AutoRest Code Generator. +# Changes may cause incorrect behavior and will be lost if the code is regenerated. +# -------------------------------------------------------------------------- +from typing import TYPE_CHECKING +import warnings + +from azure.core.exceptions import ClientAuthenticationError, HttpResponseError, ResourceExistsError, ResourceNotFoundError, map_error +from azure.core.pipeline import PipelineResponse +from azure.core.pipeline.transport import HttpRequest, HttpResponse +from azure.core.polling import LROPoller, NoPolling, PollingMethod +from azure.mgmt.core.exceptions import ARMErrorFormat +from azure.mgmt.core.polling.arm_polling import ARMPolling + +from .. import models + +if TYPE_CHECKING: + # pylint: disable=unused-import,ungrouped-imports + from typing import Any, Callable, Dict, Generic, Optional, TypeVar, Union + + T = TypeVar('T') + ClsType = Optional[Callable[[PipelineResponse[HttpRequest, HttpResponse], T, Dict[str, Any]], Any]] + +class DatabaseMigrationsSqlMiOperations(object): + """DatabaseMigrationsSqlMiOperations operations. + + You should not instantiate this class directly. Instead, you should create a Client instance that + instantiates it for you and attaches it as an attribute. + + :ivar models: Alias to model classes used in this operation group. + :type models: ~azure.mgmt.datamigration.models + :param client: Client for service requests. + :param config: Configuration of service client. + :param serializer: An object model serializer. + :param deserializer: An object model deserializer. + """ + + models = models + + def __init__(self, client, config, serializer, deserializer): + self._client = client + self._serialize = serializer + self._deserialize = deserializer + self._config = config + + def get( + self, + resource_group_name, # type: str + managed_instance_name, # type: str + target_db_name, # type: str + migration_operation_id=None, # type: Optional[str] + expand=None, # type: Optional[str] + **kwargs # type: Any + ): + # type: (...) -> "models.DatabaseMigrationSqlMi" + """Retrieve the Database Migration resource. + + :param resource_group_name: Name of the resource group that contains the resource. You can + obtain this value from the Azure Resource Manager API or the portal. + :type resource_group_name: str + :param managed_instance_name: + :type managed_instance_name: str + :param target_db_name: The name of the target database. + :type target_db_name: str + :param migration_operation_id: 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. + :type migration_operation_id: str + :param expand: The child resources to include in the response. + :type expand: str + :keyword callable cls: A custom type or function that will be passed the direct response + :return: DatabaseMigrationSqlMi, or the result of cls(response) + :rtype: ~azure.mgmt.datamigration.models.DatabaseMigrationSqlMi + :raises: ~azure.core.exceptions.HttpResponseError + """ + cls = kwargs.pop('cls', None) # type: ClsType["models.DatabaseMigrationSqlMi"] + error_map = { + 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError + } + error_map.update(kwargs.pop('error_map', {})) + api_version = "2021-10-30-preview" + accept = "application/json" + + # Construct URL + url = self.get.metadata['url'] # type: ignore + path_format_arguments = { + 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str'), + 'managedInstanceName': self._serialize.url("managed_instance_name", managed_instance_name, 'str'), + 'targetDbName': self._serialize.url("target_db_name", target_db_name, 'str'), + 'subscriptionId': self._serialize.url("self._config.subscription_id", self._config.subscription_id, 'str'), + } + url = self._client.format_url(url, **path_format_arguments) + + # Construct parameters + query_parameters = {} # type: Dict[str, Any] + if migration_operation_id is not None: + query_parameters['migrationOperationId'] = self._serialize.query("migration_operation_id", migration_operation_id, 'str') + if expand is not None: + query_parameters['$expand'] = self._serialize.query("expand", expand, 'str') + query_parameters['api-version'] = self._serialize.query("api_version", api_version, 'str') + + # Construct headers + header_parameters = {} # type: Dict[str, Any] + header_parameters['Accept'] = self._serialize.header("accept", accept, 'str') + + request = self._client.get(url, query_parameters, header_parameters) + pipeline_response = self._client._pipeline.run(request, stream=False, **kwargs) + response = pipeline_response.http_response + + if response.status_code not in [200]: + map_error(status_code=response.status_code, response=response, error_map=error_map) + raise HttpResponseError(response=response, error_format=ARMErrorFormat) + + deserialized = self._deserialize('DatabaseMigrationSqlMi', pipeline_response) + + if cls: + return cls(pipeline_response, deserialized, {}) + + return deserialized + get.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Sql/managedInstances/{managedInstanceName}/providers/Microsoft.DataMigration/databaseMigrations/{targetDbName}'} # type: ignore + + def _create_or_update_initial( + self, + resource_group_name, # type: str + managed_instance_name, # type: str + target_db_name, # type: str + parameters, # type: "models.DatabaseMigrationSqlMi" + **kwargs # type: Any + ): + # type: (...) -> "models.DatabaseMigrationSqlMi" + cls = kwargs.pop('cls', None) # type: ClsType["models.DatabaseMigrationSqlMi"] + error_map = { + 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError + } + error_map.update(kwargs.pop('error_map', {})) + api_version = "2021-10-30-preview" + content_type = kwargs.pop("content_type", "application/json") + accept = "application/json" + + # Construct URL + url = self._create_or_update_initial.metadata['url'] # type: ignore + path_format_arguments = { + 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str'), + 'managedInstanceName': self._serialize.url("managed_instance_name", managed_instance_name, 'str'), + 'targetDbName': self._serialize.url("target_db_name", target_db_name, 'str'), + 'subscriptionId': self._serialize.url("self._config.subscription_id", self._config.subscription_id, 'str'), + } + url = self._client.format_url(url, **path_format_arguments) + + # Construct parameters + query_parameters = {} # type: Dict[str, Any] + query_parameters['api-version'] = self._serialize.query("api_version", api_version, 'str') + + # Construct headers + header_parameters = {} # type: Dict[str, Any] + header_parameters['Content-Type'] = self._serialize.header("content_type", content_type, 'str') + header_parameters['Accept'] = self._serialize.header("accept", accept, 'str') + + body_content_kwargs = {} # type: Dict[str, Any] + body_content = self._serialize.body(parameters, 'DatabaseMigrationSqlMi') + body_content_kwargs['content'] = body_content + request = self._client.put(url, query_parameters, header_parameters, **body_content_kwargs) + pipeline_response = self._client._pipeline.run(request, stream=False, **kwargs) + response = pipeline_response.http_response + + if response.status_code not in [200, 201]: + map_error(status_code=response.status_code, response=response, error_map=error_map) + raise HttpResponseError(response=response, error_format=ARMErrorFormat) + + if response.status_code == 200: + deserialized = self._deserialize('DatabaseMigrationSqlMi', pipeline_response) + + if response.status_code == 201: + deserialized = self._deserialize('DatabaseMigrationSqlMi', pipeline_response) + + if cls: + return cls(pipeline_response, deserialized, {}) + + return deserialized + _create_or_update_initial.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Sql/managedInstances/{managedInstanceName}/providers/Microsoft.DataMigration/databaseMigrations/{targetDbName}'} # type: ignore + + def begin_create_or_update( + self, + resource_group_name, # type: str + managed_instance_name, # type: str + target_db_name, # type: str + parameters, # type: "models.DatabaseMigrationSqlMi" + **kwargs # type: Any + ): + # type: (...) -> LROPoller["models.DatabaseMigrationSqlMi"] + """Create a new database migration to a given SQL Managed Instance. + + :param resource_group_name: Name of the resource group that contains the resource. You can + obtain this value from the Azure Resource Manager API or the portal. + :type resource_group_name: str + :param managed_instance_name: + :type managed_instance_name: str + :param target_db_name: The name of the target database. + :type target_db_name: str + :param parameters: Details of SqlMigrationService resource. + :type parameters: ~azure.mgmt.datamigration.models.DatabaseMigrationSqlMi + :keyword callable cls: A custom type or function that will be passed the direct response + :keyword str continuation_token: A continuation token to restart a poller from a saved state. + :keyword polling: True for ARMPolling, False for no polling, or a + polling object for personal polling strategy + :paramtype polling: bool or ~azure.core.polling.PollingMethod + :keyword int polling_interval: Default waiting time between two polls for LRO operations if no Retry-After header is present. + :return: An instance of LROPoller that returns either DatabaseMigrationSqlMi or the result of cls(response) + :rtype: ~azure.core.polling.LROPoller[~azure.mgmt.datamigration.models.DatabaseMigrationSqlMi] + :raises ~azure.core.exceptions.HttpResponseError: + """ + polling = kwargs.pop('polling', True) # type: Union[bool, PollingMethod] + cls = kwargs.pop('cls', None) # type: ClsType["models.DatabaseMigrationSqlMi"] + lro_delay = kwargs.pop( + 'polling_interval', + self._config.polling_interval + ) + cont_token = kwargs.pop('continuation_token', None) # type: Optional[str] + if cont_token is None: + raw_result = self._create_or_update_initial( + resource_group_name=resource_group_name, + managed_instance_name=managed_instance_name, + target_db_name=target_db_name, + parameters=parameters, + cls=lambda x,y,z: x, + **kwargs + ) + + kwargs.pop('error_map', None) + kwargs.pop('content_type', None) + + def get_long_running_output(pipeline_response): + deserialized = self._deserialize('DatabaseMigrationSqlMi', pipeline_response) + + if cls: + return cls(pipeline_response, deserialized, {}) + return deserialized + + path_format_arguments = { + 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str'), + 'managedInstanceName': self._serialize.url("managed_instance_name", managed_instance_name, 'str'), + 'targetDbName': self._serialize.url("target_db_name", target_db_name, 'str'), + 'subscriptionId': self._serialize.url("self._config.subscription_id", self._config.subscription_id, 'str'), + } + + if polling is True: polling_method = ARMPolling(lro_delay, path_format_arguments=path_format_arguments, **kwargs) + elif polling is False: polling_method = NoPolling() + else: polling_method = polling + if cont_token: + return LROPoller.from_continuation_token( + polling_method=polling_method, + continuation_token=cont_token, + client=self._client, + deserialization_callback=get_long_running_output + ) + else: + return LROPoller(self._client, raw_result, get_long_running_output, polling_method) + begin_create_or_update.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Sql/managedInstances/{managedInstanceName}/providers/Microsoft.DataMigration/databaseMigrations/{targetDbName}'} # type: ignore + + def _cancel_initial( + self, + resource_group_name, # type: str + managed_instance_name, # type: str + target_db_name, # type: str + parameters, # type: "models.MigrationOperationInput" + **kwargs # type: Any + ): + # type: (...) -> None + cls = kwargs.pop('cls', None) # type: ClsType[None] + error_map = { + 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError + } + error_map.update(kwargs.pop('error_map', {})) + api_version = "2021-10-30-preview" + content_type = kwargs.pop("content_type", "application/json") + + # Construct URL + url = self._cancel_initial.metadata['url'] # type: ignore + path_format_arguments = { + 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str'), + 'managedInstanceName': self._serialize.url("managed_instance_name", managed_instance_name, 'str'), + 'targetDbName': self._serialize.url("target_db_name", target_db_name, 'str'), + 'subscriptionId': self._serialize.url("self._config.subscription_id", self._config.subscription_id, 'str'), + } + url = self._client.format_url(url, **path_format_arguments) + + # Construct parameters + query_parameters = {} # type: Dict[str, Any] + query_parameters['api-version'] = self._serialize.query("api_version", api_version, 'str') + + # Construct headers + header_parameters = {} # type: Dict[str, Any] + header_parameters['Content-Type'] = self._serialize.header("content_type", content_type, 'str') + + body_content_kwargs = {} # type: Dict[str, Any] + body_content = self._serialize.body(parameters, 'MigrationOperationInput') + body_content_kwargs['content'] = body_content + request = self._client.post(url, query_parameters, header_parameters, **body_content_kwargs) + pipeline_response = self._client._pipeline.run(request, stream=False, **kwargs) + response = pipeline_response.http_response + + if response.status_code not in [200, 202]: + map_error(status_code=response.status_code, response=response, error_map=error_map) + raise HttpResponseError(response=response, error_format=ARMErrorFormat) + + if cls: + return cls(pipeline_response, None, {}) + + _cancel_initial.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Sql/managedInstances/{managedInstanceName}/providers/Microsoft.DataMigration/databaseMigrations/{targetDbName}/cancel'} # type: ignore + + def begin_cancel( + self, + resource_group_name, # type: str + managed_instance_name, # type: str + target_db_name, # type: str + parameters, # type: "models.MigrationOperationInput" + **kwargs # type: Any + ): + # type: (...) -> LROPoller[None] + """Stop migrations in progress for the database. + + :param resource_group_name: Name of the resource group that contains the resource. You can + obtain this value from the Azure Resource Manager API or the portal. + :type resource_group_name: str + :param managed_instance_name: + :type managed_instance_name: str + :param target_db_name: The name of the target database. + :type target_db_name: str + :param parameters: Required migration operation ID for which cancel will be initiated. + :type parameters: ~azure.mgmt.datamigration.models.MigrationOperationInput + :keyword callable cls: A custom type or function that will be passed the direct response + :keyword str continuation_token: A continuation token to restart a poller from a saved state. + :keyword polling: True for ARMPolling, False for no polling, or a + polling object for personal polling strategy + :paramtype polling: bool or ~azure.core.polling.PollingMethod + :keyword int polling_interval: Default waiting time between two polls for LRO operations if no Retry-After header is present. + :return: An instance of LROPoller that returns either None or the result of cls(response) + :rtype: ~azure.core.polling.LROPoller[None] + :raises ~azure.core.exceptions.HttpResponseError: + """ + polling = kwargs.pop('polling', True) # type: Union[bool, PollingMethod] + cls = kwargs.pop('cls', None) # type: ClsType[None] + lro_delay = kwargs.pop( + 'polling_interval', + self._config.polling_interval + ) + cont_token = kwargs.pop('continuation_token', None) # type: Optional[str] + if cont_token is None: + raw_result = self._cancel_initial( + resource_group_name=resource_group_name, + managed_instance_name=managed_instance_name, + target_db_name=target_db_name, + parameters=parameters, + cls=lambda x,y,z: x, + **kwargs + ) + + kwargs.pop('error_map', None) + kwargs.pop('content_type', None) + + def get_long_running_output(pipeline_response): + if cls: + return cls(pipeline_response, None, {}) + + path_format_arguments = { + 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str'), + 'managedInstanceName': self._serialize.url("managed_instance_name", managed_instance_name, 'str'), + 'targetDbName': self._serialize.url("target_db_name", target_db_name, 'str'), + 'subscriptionId': self._serialize.url("self._config.subscription_id", self._config.subscription_id, 'str'), + } + + if polling is True: polling_method = ARMPolling(lro_delay, path_format_arguments=path_format_arguments, **kwargs) + elif polling is False: polling_method = NoPolling() + else: polling_method = polling + if cont_token: + return LROPoller.from_continuation_token( + polling_method=polling_method, + continuation_token=cont_token, + client=self._client, + deserialization_callback=get_long_running_output + ) + else: + return LROPoller(self._client, raw_result, get_long_running_output, polling_method) + begin_cancel.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Sql/managedInstances/{managedInstanceName}/providers/Microsoft.DataMigration/databaseMigrations/{targetDbName}/cancel'} # type: ignore + + def _cutover_initial( + self, + resource_group_name, # type: str + managed_instance_name, # type: str + target_db_name, # type: str + parameters, # type: "models.MigrationOperationInput" + **kwargs # type: Any + ): + # type: (...) -> None + cls = kwargs.pop('cls', None) # type: ClsType[None] + error_map = { + 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError + } + error_map.update(kwargs.pop('error_map', {})) + api_version = "2021-10-30-preview" + content_type = kwargs.pop("content_type", "application/json") + + # Construct URL + url = self._cutover_initial.metadata['url'] # type: ignore + path_format_arguments = { + 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str'), + 'managedInstanceName': self._serialize.url("managed_instance_name", managed_instance_name, 'str'), + 'targetDbName': self._serialize.url("target_db_name", target_db_name, 'str'), + 'subscriptionId': self._serialize.url("self._config.subscription_id", self._config.subscription_id, 'str'), + } + url = self._client.format_url(url, **path_format_arguments) + + # Construct parameters + query_parameters = {} # type: Dict[str, Any] + query_parameters['api-version'] = self._serialize.query("api_version", api_version, 'str') + + # Construct headers + header_parameters = {} # type: Dict[str, Any] + header_parameters['Content-Type'] = self._serialize.header("content_type", content_type, 'str') + + body_content_kwargs = {} # type: Dict[str, Any] + body_content = self._serialize.body(parameters, 'MigrationOperationInput') + body_content_kwargs['content'] = body_content + request = self._client.post(url, query_parameters, header_parameters, **body_content_kwargs) + pipeline_response = self._client._pipeline.run(request, stream=False, **kwargs) + response = pipeline_response.http_response + + if response.status_code not in [200, 202]: + map_error(status_code=response.status_code, response=response, error_map=error_map) + raise HttpResponseError(response=response, error_format=ARMErrorFormat) + + if cls: + return cls(pipeline_response, None, {}) + + _cutover_initial.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Sql/managedInstances/{managedInstanceName}/providers/Microsoft.DataMigration/databaseMigrations/{targetDbName}/cutover'} # type: ignore + + def begin_cutover( + self, + resource_group_name, # type: str + managed_instance_name, # type: str + target_db_name, # type: str + parameters, # type: "models.MigrationOperationInput" + **kwargs # type: Any + ): + # type: (...) -> LROPoller[None] + """Initiate cutover for online migration in progress for the database. + + :param resource_group_name: Name of the resource group that contains the resource. You can + obtain this value from the Azure Resource Manager API or the portal. + :type resource_group_name: str + :param managed_instance_name: + :type managed_instance_name: str + :param target_db_name: The name of the target database. + :type target_db_name: str + :param parameters: Required migration operation ID for which cutover will be initiated. + :type parameters: ~azure.mgmt.datamigration.models.MigrationOperationInput + :keyword callable cls: A custom type or function that will be passed the direct response + :keyword str continuation_token: A continuation token to restart a poller from a saved state. + :keyword polling: True for ARMPolling, False for no polling, or a + polling object for personal polling strategy + :paramtype polling: bool or ~azure.core.polling.PollingMethod + :keyword int polling_interval: Default waiting time between two polls for LRO operations if no Retry-After header is present. + :return: An instance of LROPoller that returns either None or the result of cls(response) + :rtype: ~azure.core.polling.LROPoller[None] + :raises ~azure.core.exceptions.HttpResponseError: + """ + polling = kwargs.pop('polling', True) # type: Union[bool, PollingMethod] + cls = kwargs.pop('cls', None) # type: ClsType[None] + lro_delay = kwargs.pop( + 'polling_interval', + self._config.polling_interval + ) + cont_token = kwargs.pop('continuation_token', None) # type: Optional[str] + if cont_token is None: + raw_result = self._cutover_initial( + resource_group_name=resource_group_name, + managed_instance_name=managed_instance_name, + target_db_name=target_db_name, + parameters=parameters, + cls=lambda x,y,z: x, + **kwargs + ) + + kwargs.pop('error_map', None) + kwargs.pop('content_type', None) + + def get_long_running_output(pipeline_response): + if cls: + return cls(pipeline_response, None, {}) + + path_format_arguments = { + 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str'), + 'managedInstanceName': self._serialize.url("managed_instance_name", managed_instance_name, 'str'), + 'targetDbName': self._serialize.url("target_db_name", target_db_name, 'str'), + 'subscriptionId': self._serialize.url("self._config.subscription_id", self._config.subscription_id, 'str'), + } + + if polling is True: polling_method = ARMPolling(lro_delay, path_format_arguments=path_format_arguments, **kwargs) + elif polling is False: polling_method = NoPolling() + else: polling_method = polling + if cont_token: + return LROPoller.from_continuation_token( + polling_method=polling_method, + continuation_token=cont_token, + client=self._client, + deserialization_callback=get_long_running_output + ) + else: + return LROPoller(self._client, raw_result, get_long_running_output, polling_method) + begin_cutover.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Sql/managedInstances/{managedInstanceName}/providers/Microsoft.DataMigration/databaseMigrations/{targetDbName}/cutover'} # type: ignore diff --git a/src/datamigration/azext_datamigration/vendored_sdks/datamigration/operations/_database_migrations_sql_vm_operations.py b/src/datamigration/azext_datamigration/vendored_sdks/datamigration/operations/_database_migrations_sql_vm_operations.py new file mode 100644 index 00000000000..3faec7da35c --- /dev/null +++ b/src/datamigration/azext_datamigration/vendored_sdks/datamigration/operations/_database_migrations_sql_vm_operations.py @@ -0,0 +1,513 @@ +# coding=utf-8 +# -------------------------------------------------------------------------- +# Copyright (c) Microsoft Corporation. All rights reserved. +# Licensed under the MIT License. See License.txt in the project root for license information. +# Code generated by Microsoft (R) AutoRest Code Generator. +# Changes may cause incorrect behavior and will be lost if the code is regenerated. +# -------------------------------------------------------------------------- +from typing import TYPE_CHECKING +import warnings + +from azure.core.exceptions import ClientAuthenticationError, HttpResponseError, ResourceExistsError, ResourceNotFoundError, map_error +from azure.core.pipeline import PipelineResponse +from azure.core.pipeline.transport import HttpRequest, HttpResponse +from azure.core.polling import LROPoller, NoPolling, PollingMethod +from azure.mgmt.core.exceptions import ARMErrorFormat +from azure.mgmt.core.polling.arm_polling import ARMPolling + +from .. import models + +if TYPE_CHECKING: + # pylint: disable=unused-import,ungrouped-imports + from typing import Any, Callable, Dict, Generic, Optional, TypeVar, Union + + T = TypeVar('T') + ClsType = Optional[Callable[[PipelineResponse[HttpRequest, HttpResponse], T, Dict[str, Any]], Any]] + +class DatabaseMigrationsSqlVmOperations(object): + """DatabaseMigrationsSqlVmOperations operations. + + You should not instantiate this class directly. Instead, you should create a Client instance that + instantiates it for you and attaches it as an attribute. + + :ivar models: Alias to model classes used in this operation group. + :type models: ~azure.mgmt.datamigration.models + :param client: Client for service requests. + :param config: Configuration of service client. + :param serializer: An object model serializer. + :param deserializer: An object model deserializer. + """ + + models = models + + def __init__(self, client, config, serializer, deserializer): + self._client = client + self._serialize = serializer + self._deserialize = deserializer + self._config = config + + def get( + self, + resource_group_name, # type: str + sql_virtual_machine_name, # type: str + target_db_name, # type: str + migration_operation_id=None, # type: Optional[str] + expand=None, # type: Optional[str] + **kwargs # type: Any + ): + # type: (...) -> "models.DatabaseMigrationSqlVm" + """Retrieve the Database Migration resource. + + :param resource_group_name: Name of the resource group that contains the resource. You can + obtain this value from the Azure Resource Manager API or the portal. + :type resource_group_name: str + :param sql_virtual_machine_name: + :type sql_virtual_machine_name: str + :param target_db_name: The name of the target database. + :type target_db_name: str + :param migration_operation_id: 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. + :type migration_operation_id: str + :param expand: The child resources to include in the response. + :type expand: str + :keyword callable cls: A custom type or function that will be passed the direct response + :return: DatabaseMigrationSqlVm, or the result of cls(response) + :rtype: ~azure.mgmt.datamigration.models.DatabaseMigrationSqlVm + :raises: ~azure.core.exceptions.HttpResponseError + """ + cls = kwargs.pop('cls', None) # type: ClsType["models.DatabaseMigrationSqlVm"] + error_map = { + 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError + } + error_map.update(kwargs.pop('error_map', {})) + api_version = "2021-10-30-preview" + accept = "application/json" + + # Construct URL + url = self.get.metadata['url'] # type: ignore + path_format_arguments = { + 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str'), + 'sqlVirtualMachineName': self._serialize.url("sql_virtual_machine_name", sql_virtual_machine_name, 'str'), + 'targetDbName': self._serialize.url("target_db_name", target_db_name, 'str'), + 'subscriptionId': self._serialize.url("self._config.subscription_id", self._config.subscription_id, 'str'), + } + url = self._client.format_url(url, **path_format_arguments) + + # Construct parameters + query_parameters = {} # type: Dict[str, Any] + if migration_operation_id is not None: + query_parameters['migrationOperationId'] = self._serialize.query("migration_operation_id", migration_operation_id, 'str') + if expand is not None: + query_parameters['$expand'] = self._serialize.query("expand", expand, 'str') + query_parameters['api-version'] = self._serialize.query("api_version", api_version, 'str') + + # Construct headers + header_parameters = {} # type: Dict[str, Any] + header_parameters['Accept'] = self._serialize.header("accept", accept, 'str') + + request = self._client.get(url, query_parameters, header_parameters) + pipeline_response = self._client._pipeline.run(request, stream=False, **kwargs) + response = pipeline_response.http_response + + if response.status_code not in [200]: + map_error(status_code=response.status_code, response=response, error_map=error_map) + raise HttpResponseError(response=response, error_format=ARMErrorFormat) + + deserialized = self._deserialize('DatabaseMigrationSqlVm', pipeline_response) + + if cls: + return cls(pipeline_response, deserialized, {}) + + return deserialized + get.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.SqlVirtualMachine/sqlVirtualMachines/{sqlVirtualMachineName}/providers/Microsoft.DataMigration/databaseMigrations/{targetDbName}'} # type: ignore + + def _create_or_update_initial( + self, + resource_group_name, # type: str + sql_virtual_machine_name, # type: str + target_db_name, # type: str + parameters, # type: "models.DatabaseMigrationSqlVm" + **kwargs # type: Any + ): + # type: (...) -> "models.DatabaseMigrationSqlVm" + cls = kwargs.pop('cls', None) # type: ClsType["models.DatabaseMigrationSqlVm"] + error_map = { + 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError + } + error_map.update(kwargs.pop('error_map', {})) + api_version = "2021-10-30-preview" + content_type = kwargs.pop("content_type", "application/json") + accept = "application/json" + + # Construct URL + url = self._create_or_update_initial.metadata['url'] # type: ignore + path_format_arguments = { + 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str'), + 'sqlVirtualMachineName': self._serialize.url("sql_virtual_machine_name", sql_virtual_machine_name, 'str'), + 'targetDbName': self._serialize.url("target_db_name", target_db_name, 'str'), + 'subscriptionId': self._serialize.url("self._config.subscription_id", self._config.subscription_id, 'str'), + } + url = self._client.format_url(url, **path_format_arguments) + + # Construct parameters + query_parameters = {} # type: Dict[str, Any] + query_parameters['api-version'] = self._serialize.query("api_version", api_version, 'str') + + # Construct headers + header_parameters = {} # type: Dict[str, Any] + header_parameters['Content-Type'] = self._serialize.header("content_type", content_type, 'str') + header_parameters['Accept'] = self._serialize.header("accept", accept, 'str') + + body_content_kwargs = {} # type: Dict[str, Any] + body_content = self._serialize.body(parameters, 'DatabaseMigrationSqlVm') + body_content_kwargs['content'] = body_content + request = self._client.put(url, query_parameters, header_parameters, **body_content_kwargs) + pipeline_response = self._client._pipeline.run(request, stream=False, **kwargs) + response = pipeline_response.http_response + + if response.status_code not in [200, 201]: + map_error(status_code=response.status_code, response=response, error_map=error_map) + raise HttpResponseError(response=response, error_format=ARMErrorFormat) + + if response.status_code == 200: + deserialized = self._deserialize('DatabaseMigrationSqlVm', pipeline_response) + + if response.status_code == 201: + deserialized = self._deserialize('DatabaseMigrationSqlVm', pipeline_response) + + if cls: + return cls(pipeline_response, deserialized, {}) + + return deserialized + _create_or_update_initial.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.SqlVirtualMachine/sqlVirtualMachines/{sqlVirtualMachineName}/providers/Microsoft.DataMigration/databaseMigrations/{targetDbName}'} # type: ignore + + def begin_create_or_update( + self, + resource_group_name, # type: str + sql_virtual_machine_name, # type: str + target_db_name, # type: str + parameters, # type: "models.DatabaseMigrationSqlVm" + **kwargs # type: Any + ): + # type: (...) -> LROPoller["models.DatabaseMigrationSqlVm"] + """Create a new database migration to a given SQL VM. + + :param resource_group_name: Name of the resource group that contains the resource. You can + obtain this value from the Azure Resource Manager API or the portal. + :type resource_group_name: str + :param sql_virtual_machine_name: + :type sql_virtual_machine_name: str + :param target_db_name: The name of the target database. + :type target_db_name: str + :param parameters: Details of SqlMigrationService resource. + :type parameters: ~azure.mgmt.datamigration.models.DatabaseMigrationSqlVm + :keyword callable cls: A custom type or function that will be passed the direct response + :keyword str continuation_token: A continuation token to restart a poller from a saved state. + :keyword polling: True for ARMPolling, False for no polling, or a + polling object for personal polling strategy + :paramtype polling: bool or ~azure.core.polling.PollingMethod + :keyword int polling_interval: Default waiting time between two polls for LRO operations if no Retry-After header is present. + :return: An instance of LROPoller that returns either DatabaseMigrationSqlVm or the result of cls(response) + :rtype: ~azure.core.polling.LROPoller[~azure.mgmt.datamigration.models.DatabaseMigrationSqlVm] + :raises ~azure.core.exceptions.HttpResponseError: + """ + polling = kwargs.pop('polling', True) # type: Union[bool, PollingMethod] + cls = kwargs.pop('cls', None) # type: ClsType["models.DatabaseMigrationSqlVm"] + lro_delay = kwargs.pop( + 'polling_interval', + self._config.polling_interval + ) + cont_token = kwargs.pop('continuation_token', None) # type: Optional[str] + if cont_token is None: + raw_result = self._create_or_update_initial( + resource_group_name=resource_group_name, + sql_virtual_machine_name=sql_virtual_machine_name, + target_db_name=target_db_name, + parameters=parameters, + cls=lambda x,y,z: x, + **kwargs + ) + + kwargs.pop('error_map', None) + kwargs.pop('content_type', None) + + def get_long_running_output(pipeline_response): + deserialized = self._deserialize('DatabaseMigrationSqlVm', pipeline_response) + + if cls: + return cls(pipeline_response, deserialized, {}) + return deserialized + + path_format_arguments = { + 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str'), + 'sqlVirtualMachineName': self._serialize.url("sql_virtual_machine_name", sql_virtual_machine_name, 'str'), + 'targetDbName': self._serialize.url("target_db_name", target_db_name, 'str'), + 'subscriptionId': self._serialize.url("self._config.subscription_id", self._config.subscription_id, 'str'), + } + + if polling is True: polling_method = ARMPolling(lro_delay, path_format_arguments=path_format_arguments, **kwargs) + elif polling is False: polling_method = NoPolling() + else: polling_method = polling + if cont_token: + return LROPoller.from_continuation_token( + polling_method=polling_method, + continuation_token=cont_token, + client=self._client, + deserialization_callback=get_long_running_output + ) + else: + return LROPoller(self._client, raw_result, get_long_running_output, polling_method) + begin_create_or_update.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.SqlVirtualMachine/sqlVirtualMachines/{sqlVirtualMachineName}/providers/Microsoft.DataMigration/databaseMigrations/{targetDbName}'} # type: ignore + + def _cancel_initial( + self, + resource_group_name, # type: str + sql_virtual_machine_name, # type: str + target_db_name, # type: str + parameters, # type: "models.MigrationOperationInput" + **kwargs # type: Any + ): + # type: (...) -> None + cls = kwargs.pop('cls', None) # type: ClsType[None] + error_map = { + 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError + } + error_map.update(kwargs.pop('error_map', {})) + api_version = "2021-10-30-preview" + content_type = kwargs.pop("content_type", "application/json") + + # Construct URL + url = self._cancel_initial.metadata['url'] # type: ignore + path_format_arguments = { + 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str'), + 'sqlVirtualMachineName': self._serialize.url("sql_virtual_machine_name", sql_virtual_machine_name, 'str'), + 'targetDbName': self._serialize.url("target_db_name", target_db_name, 'str'), + 'subscriptionId': self._serialize.url("self._config.subscription_id", self._config.subscription_id, 'str'), + } + url = self._client.format_url(url, **path_format_arguments) + + # Construct parameters + query_parameters = {} # type: Dict[str, Any] + query_parameters['api-version'] = self._serialize.query("api_version", api_version, 'str') + + # Construct headers + header_parameters = {} # type: Dict[str, Any] + header_parameters['Content-Type'] = self._serialize.header("content_type", content_type, 'str') + + body_content_kwargs = {} # type: Dict[str, Any] + body_content = self._serialize.body(parameters, 'MigrationOperationInput') + body_content_kwargs['content'] = body_content + request = self._client.post(url, query_parameters, header_parameters, **body_content_kwargs) + pipeline_response = self._client._pipeline.run(request, stream=False, **kwargs) + response = pipeline_response.http_response + + if response.status_code not in [200, 202]: + map_error(status_code=response.status_code, response=response, error_map=error_map) + raise HttpResponseError(response=response, error_format=ARMErrorFormat) + + if cls: + return cls(pipeline_response, None, {}) + + _cancel_initial.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.SqlVirtualMachine/sqlVirtualMachines/{sqlVirtualMachineName}/providers/Microsoft.DataMigration/databaseMigrations/{targetDbName}/cancel'} # type: ignore + + def begin_cancel( + self, + resource_group_name, # type: str + sql_virtual_machine_name, # type: str + target_db_name, # type: str + parameters, # type: "models.MigrationOperationInput" + **kwargs # type: Any + ): + # type: (...) -> LROPoller[None] + """Stop ongoing migration for the database. + + :param resource_group_name: Name of the resource group that contains the resource. You can + obtain this value from the Azure Resource Manager API or the portal. + :type resource_group_name: str + :param sql_virtual_machine_name: + :type sql_virtual_machine_name: str + :param target_db_name: The name of the target database. + :type target_db_name: str + :param parameters: + :type parameters: ~azure.mgmt.datamigration.models.MigrationOperationInput + :keyword callable cls: A custom type or function that will be passed the direct response + :keyword str continuation_token: A continuation token to restart a poller from a saved state. + :keyword polling: True for ARMPolling, False for no polling, or a + polling object for personal polling strategy + :paramtype polling: bool or ~azure.core.polling.PollingMethod + :keyword int polling_interval: Default waiting time between two polls for LRO operations if no Retry-After header is present. + :return: An instance of LROPoller that returns either None or the result of cls(response) + :rtype: ~azure.core.polling.LROPoller[None] + :raises ~azure.core.exceptions.HttpResponseError: + """ + polling = kwargs.pop('polling', True) # type: Union[bool, PollingMethod] + cls = kwargs.pop('cls', None) # type: ClsType[None] + lro_delay = kwargs.pop( + 'polling_interval', + self._config.polling_interval + ) + cont_token = kwargs.pop('continuation_token', None) # type: Optional[str] + if cont_token is None: + raw_result = self._cancel_initial( + resource_group_name=resource_group_name, + sql_virtual_machine_name=sql_virtual_machine_name, + target_db_name=target_db_name, + parameters=parameters, + cls=lambda x,y,z: x, + **kwargs + ) + + kwargs.pop('error_map', None) + kwargs.pop('content_type', None) + + def get_long_running_output(pipeline_response): + if cls: + return cls(pipeline_response, None, {}) + + path_format_arguments = { + 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str'), + 'sqlVirtualMachineName': self._serialize.url("sql_virtual_machine_name", sql_virtual_machine_name, 'str'), + 'targetDbName': self._serialize.url("target_db_name", target_db_name, 'str'), + 'subscriptionId': self._serialize.url("self._config.subscription_id", self._config.subscription_id, 'str'), + } + + if polling is True: polling_method = ARMPolling(lro_delay, path_format_arguments=path_format_arguments, **kwargs) + elif polling is False: polling_method = NoPolling() + else: polling_method = polling + if cont_token: + return LROPoller.from_continuation_token( + polling_method=polling_method, + continuation_token=cont_token, + client=self._client, + deserialization_callback=get_long_running_output + ) + else: + return LROPoller(self._client, raw_result, get_long_running_output, polling_method) + begin_cancel.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.SqlVirtualMachine/sqlVirtualMachines/{sqlVirtualMachineName}/providers/Microsoft.DataMigration/databaseMigrations/{targetDbName}/cancel'} # type: ignore + + def _cutover_initial( + self, + resource_group_name, # type: str + sql_virtual_machine_name, # type: str + target_db_name, # type: str + parameters, # type: "models.MigrationOperationInput" + **kwargs # type: Any + ): + # type: (...) -> None + cls = kwargs.pop('cls', None) # type: ClsType[None] + error_map = { + 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError + } + error_map.update(kwargs.pop('error_map', {})) + api_version = "2021-10-30-preview" + content_type = kwargs.pop("content_type", "application/json") + + # Construct URL + url = self._cutover_initial.metadata['url'] # type: ignore + path_format_arguments = { + 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str'), + 'sqlVirtualMachineName': self._serialize.url("sql_virtual_machine_name", sql_virtual_machine_name, 'str'), + 'targetDbName': self._serialize.url("target_db_name", target_db_name, 'str'), + 'subscriptionId': self._serialize.url("self._config.subscription_id", self._config.subscription_id, 'str'), + } + url = self._client.format_url(url, **path_format_arguments) + + # Construct parameters + query_parameters = {} # type: Dict[str, Any] + query_parameters['api-version'] = self._serialize.query("api_version", api_version, 'str') + + # Construct headers + header_parameters = {} # type: Dict[str, Any] + header_parameters['Content-Type'] = self._serialize.header("content_type", content_type, 'str') + + body_content_kwargs = {} # type: Dict[str, Any] + body_content = self._serialize.body(parameters, 'MigrationOperationInput') + body_content_kwargs['content'] = body_content + request = self._client.post(url, query_parameters, header_parameters, **body_content_kwargs) + pipeline_response = self._client._pipeline.run(request, stream=False, **kwargs) + response = pipeline_response.http_response + + if response.status_code not in [200, 202]: + map_error(status_code=response.status_code, response=response, error_map=error_map) + raise HttpResponseError(response=response, error_format=ARMErrorFormat) + + if cls: + return cls(pipeline_response, None, {}) + + _cutover_initial.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.SqlVirtualMachine/sqlVirtualMachines/{sqlVirtualMachineName}/providers/Microsoft.DataMigration/databaseMigrations/{targetDbName}/cutover'} # type: ignore + + def begin_cutover( + self, + resource_group_name, # type: str + sql_virtual_machine_name, # type: str + target_db_name, # type: str + parameters, # type: "models.MigrationOperationInput" + **kwargs # type: Any + ): + # type: (...) -> LROPoller[None] + """Cutover online migration operation for the database. + + :param resource_group_name: Name of the resource group that contains the resource. You can + obtain this value from the Azure Resource Manager API or the portal. + :type resource_group_name: str + :param sql_virtual_machine_name: + :type sql_virtual_machine_name: str + :param target_db_name: The name of the target database. + :type target_db_name: str + :param parameters: + :type parameters: ~azure.mgmt.datamigration.models.MigrationOperationInput + :keyword callable cls: A custom type or function that will be passed the direct response + :keyword str continuation_token: A continuation token to restart a poller from a saved state. + :keyword polling: True for ARMPolling, False for no polling, or a + polling object for personal polling strategy + :paramtype polling: bool or ~azure.core.polling.PollingMethod + :keyword int polling_interval: Default waiting time between two polls for LRO operations if no Retry-After header is present. + :return: An instance of LROPoller that returns either None or the result of cls(response) + :rtype: ~azure.core.polling.LROPoller[None] + :raises ~azure.core.exceptions.HttpResponseError: + """ + polling = kwargs.pop('polling', True) # type: Union[bool, PollingMethod] + cls = kwargs.pop('cls', None) # type: ClsType[None] + lro_delay = kwargs.pop( + 'polling_interval', + self._config.polling_interval + ) + cont_token = kwargs.pop('continuation_token', None) # type: Optional[str] + if cont_token is None: + raw_result = self._cutover_initial( + resource_group_name=resource_group_name, + sql_virtual_machine_name=sql_virtual_machine_name, + target_db_name=target_db_name, + parameters=parameters, + cls=lambda x,y,z: x, + **kwargs + ) + + kwargs.pop('error_map', None) + kwargs.pop('content_type', None) + + def get_long_running_output(pipeline_response): + if cls: + return cls(pipeline_response, None, {}) + + path_format_arguments = { + 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str'), + 'sqlVirtualMachineName': self._serialize.url("sql_virtual_machine_name", sql_virtual_machine_name, 'str'), + 'targetDbName': self._serialize.url("target_db_name", target_db_name, 'str'), + 'subscriptionId': self._serialize.url("self._config.subscription_id", self._config.subscription_id, 'str'), + } + + if polling is True: polling_method = ARMPolling(lro_delay, path_format_arguments=path_format_arguments, **kwargs) + elif polling is False: polling_method = NoPolling() + else: polling_method = polling + if cont_token: + return LROPoller.from_continuation_token( + polling_method=polling_method, + continuation_token=cont_token, + client=self._client, + deserialization_callback=get_long_running_output + ) + else: + return LROPoller(self._client, raw_result, get_long_running_output, polling_method) + begin_cutover.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.SqlVirtualMachine/sqlVirtualMachines/{sqlVirtualMachineName}/providers/Microsoft.DataMigration/databaseMigrations/{targetDbName}/cutover'} # type: ignore diff --git a/src/datamigration/azext_datamigration/vendored_sdks/datamigration/operations/_files_operations.py b/src/datamigration/azext_datamigration/vendored_sdks/datamigration/operations/_files_operations.py new file mode 100644 index 00000000000..98c58323bd4 --- /dev/null +++ b/src/datamigration/azext_datamigration/vendored_sdks/datamigration/operations/_files_operations.py @@ -0,0 +1,568 @@ +# coding=utf-8 +# -------------------------------------------------------------------------- +# Copyright (c) Microsoft Corporation. All rights reserved. +# Licensed under the MIT License. See License.txt in the project root for license information. +# Code generated by Microsoft (R) AutoRest Code Generator. +# Changes may cause incorrect behavior and will be lost if the code is regenerated. +# -------------------------------------------------------------------------- +from typing import TYPE_CHECKING +import warnings + +from azure.core.exceptions import ClientAuthenticationError, HttpResponseError, ResourceExistsError, ResourceNotFoundError, map_error +from azure.core.paging import ItemPaged +from azure.core.pipeline import PipelineResponse +from azure.core.pipeline.transport import HttpRequest, HttpResponse +from azure.mgmt.core.exceptions import ARMErrorFormat + +from .. import models + +if TYPE_CHECKING: + # pylint: disable=unused-import,ungrouped-imports + from typing import Any, Callable, Dict, Generic, Iterable, Optional, TypeVar, Union + + T = TypeVar('T') + ClsType = Optional[Callable[[PipelineResponse[HttpRequest, HttpResponse], T, Dict[str, Any]], Any]] + +class FilesOperations(object): + """FilesOperations operations. + + You should not instantiate this class directly. Instead, you should create a Client instance that + instantiates it for you and attaches it as an attribute. + + :ivar models: Alias to model classes used in this operation group. + :type models: ~azure.mgmt.datamigration.models + :param client: Client for service requests. + :param config: Configuration of service client. + :param serializer: An object model serializer. + :param deserializer: An object model deserializer. + """ + + models = models + + def __init__(self, client, config, serializer, deserializer): + self._client = client + self._serialize = serializer + self._deserialize = deserializer + self._config = config + + def list( + self, + group_name, # type: str + service_name, # type: str + project_name, # type: str + **kwargs # type: Any + ): + # type: (...) -> Iterable["models.FileList"] + """Get files in a project. + + The project resource is a nested resource representing a stored migration project. This method + returns a list of files owned by a project resource. + + :param group_name: Name of the resource group. + :type group_name: str + :param service_name: Name of the service. + :type service_name: str + :param project_name: Name of the project. + :type project_name: str + :keyword callable cls: A custom type or function that will be passed the direct response + :return: An iterator like instance of either FileList or the result of cls(response) + :rtype: ~azure.core.paging.ItemPaged[~azure.mgmt.datamigration.models.FileList] + :raises: ~azure.core.exceptions.HttpResponseError + """ + cls = kwargs.pop('cls', None) # type: ClsType["models.FileList"] + error_map = { + 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError + } + error_map.update(kwargs.pop('error_map', {})) + api_version = "2021-10-30-preview" + accept = "application/json" + + def prepare_request(next_link=None): + # Construct headers + header_parameters = {} # type: Dict[str, Any] + header_parameters['Accept'] = self._serialize.header("accept", accept, 'str') + + if not next_link: + # Construct URL + url = self.list.metadata['url'] # type: ignore + path_format_arguments = { + 'subscriptionId': self._serialize.url("self._config.subscription_id", self._config.subscription_id, 'str'), + 'groupName': self._serialize.url("group_name", group_name, 'str'), + 'serviceName': self._serialize.url("service_name", service_name, 'str'), + 'projectName': self._serialize.url("project_name", project_name, 'str'), + } + url = self._client.format_url(url, **path_format_arguments) + # Construct parameters + query_parameters = {} # type: Dict[str, Any] + query_parameters['api-version'] = self._serialize.query("api_version", api_version, 'str') + + request = self._client.get(url, query_parameters, header_parameters) + else: + url = next_link + query_parameters = {} # type: Dict[str, Any] + request = self._client.get(url, query_parameters, header_parameters) + return request + + def extract_data(pipeline_response): + deserialized = self._deserialize('FileList', pipeline_response) + list_of_elem = deserialized.value + if cls: + list_of_elem = cls(list_of_elem) + return deserialized.next_link or None, iter(list_of_elem) + + def get_next(next_link=None): + request = prepare_request(next_link) + + pipeline_response = self._client._pipeline.run(request, stream=False, **kwargs) + response = pipeline_response.http_response + + if response.status_code not in [200]: + error = self._deserialize(models.ApiError, response) + map_error(status_code=response.status_code, response=response, error_map=error_map) + raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) + + return pipeline_response + + return ItemPaged( + get_next, extract_data + ) + list.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{groupName}/providers/Microsoft.DataMigration/services/{serviceName}/projects/{projectName}/files'} # type: ignore + + def get( + self, + group_name, # type: str + service_name, # type: str + project_name, # type: str + file_name, # type: str + **kwargs # type: Any + ): + # type: (...) -> "models.ProjectFile" + """Get file information. + + The files resource is a nested, proxy-only resource representing a file stored under the + project resource. This method retrieves information about a file. + + :param group_name: Name of the resource group. + :type group_name: str + :param service_name: Name of the service. + :type service_name: str + :param project_name: Name of the project. + :type project_name: str + :param file_name: Name of the File. + :type file_name: str + :keyword callable cls: A custom type or function that will be passed the direct response + :return: ProjectFile, or the result of cls(response) + :rtype: ~azure.mgmt.datamigration.models.ProjectFile + :raises: ~azure.core.exceptions.HttpResponseError + """ + cls = kwargs.pop('cls', None) # type: ClsType["models.ProjectFile"] + error_map = { + 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError + } + error_map.update(kwargs.pop('error_map', {})) + api_version = "2021-10-30-preview" + accept = "application/json" + + # Construct URL + url = self.get.metadata['url'] # type: ignore + path_format_arguments = { + 'subscriptionId': self._serialize.url("self._config.subscription_id", self._config.subscription_id, 'str'), + 'groupName': self._serialize.url("group_name", group_name, 'str'), + 'serviceName': self._serialize.url("service_name", service_name, 'str'), + 'projectName': self._serialize.url("project_name", project_name, 'str'), + 'fileName': self._serialize.url("file_name", file_name, 'str'), + } + url = self._client.format_url(url, **path_format_arguments) + + # Construct parameters + query_parameters = {} # type: Dict[str, Any] + query_parameters['api-version'] = self._serialize.query("api_version", api_version, 'str') + + # Construct headers + header_parameters = {} # type: Dict[str, Any] + header_parameters['Accept'] = self._serialize.header("accept", accept, 'str') + + request = self._client.get(url, query_parameters, header_parameters) + pipeline_response = self._client._pipeline.run(request, stream=False, **kwargs) + response = pipeline_response.http_response + + if response.status_code not in [200]: + map_error(status_code=response.status_code, response=response, error_map=error_map) + error = self._deserialize(models.ApiError, response) + raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) + + deserialized = self._deserialize('ProjectFile', pipeline_response) + + if cls: + return cls(pipeline_response, deserialized, {}) + + return deserialized + get.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{groupName}/providers/Microsoft.DataMigration/services/{serviceName}/projects/{projectName}/files/{fileName}'} # type: ignore + + def create_or_update( + self, + group_name, # type: str + service_name, # type: str + project_name, # type: str + file_name, # type: str + parameters, # type: "models.ProjectFile" + **kwargs # type: Any + ): + # type: (...) -> "models.ProjectFile" + """Create a file resource. + + The PUT method creates a new file or updates an existing one. + + :param group_name: Name of the resource group. + :type group_name: str + :param service_name: Name of the service. + :type service_name: str + :param project_name: Name of the project. + :type project_name: str + :param file_name: Name of the File. + :type file_name: str + :param parameters: Information about the file. + :type parameters: ~azure.mgmt.datamigration.models.ProjectFile + :keyword callable cls: A custom type or function that will be passed the direct response + :return: ProjectFile, or the result of cls(response) + :rtype: ~azure.mgmt.datamigration.models.ProjectFile + :raises: ~azure.core.exceptions.HttpResponseError + """ + cls = kwargs.pop('cls', None) # type: ClsType["models.ProjectFile"] + error_map = { + 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError + } + error_map.update(kwargs.pop('error_map', {})) + api_version = "2021-10-30-preview" + content_type = kwargs.pop("content_type", "application/json") + accept = "application/json" + + # Construct URL + url = self.create_or_update.metadata['url'] # type: ignore + path_format_arguments = { + 'subscriptionId': self._serialize.url("self._config.subscription_id", self._config.subscription_id, 'str'), + 'groupName': self._serialize.url("group_name", group_name, 'str'), + 'serviceName': self._serialize.url("service_name", service_name, 'str'), + 'projectName': self._serialize.url("project_name", project_name, 'str'), + 'fileName': self._serialize.url("file_name", file_name, 'str'), + } + url = self._client.format_url(url, **path_format_arguments) + + # Construct parameters + query_parameters = {} # type: Dict[str, Any] + query_parameters['api-version'] = self._serialize.query("api_version", api_version, 'str') + + # Construct headers + header_parameters = {} # type: Dict[str, Any] + header_parameters['Content-Type'] = self._serialize.header("content_type", content_type, 'str') + header_parameters['Accept'] = self._serialize.header("accept", accept, 'str') + + body_content_kwargs = {} # type: Dict[str, Any] + body_content = self._serialize.body(parameters, 'ProjectFile') + body_content_kwargs['content'] = body_content + request = self._client.put(url, query_parameters, header_parameters, **body_content_kwargs) + pipeline_response = self._client._pipeline.run(request, stream=False, **kwargs) + response = pipeline_response.http_response + + if response.status_code not in [200, 201]: + map_error(status_code=response.status_code, response=response, error_map=error_map) + error = self._deserialize(models.ApiError, response) + raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) + + if response.status_code == 200: + deserialized = self._deserialize('ProjectFile', pipeline_response) + + if response.status_code == 201: + deserialized = self._deserialize('ProjectFile', pipeline_response) + + if cls: + return cls(pipeline_response, deserialized, {}) + + return deserialized + create_or_update.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{groupName}/providers/Microsoft.DataMigration/services/{serviceName}/projects/{projectName}/files/{fileName}'} # type: ignore + + def delete( + self, + group_name, # type: str + service_name, # type: str + project_name, # type: str + file_name, # type: str + **kwargs # type: Any + ): + # type: (...) -> None + """Delete file. + + This method deletes a file. + + :param group_name: Name of the resource group. + :type group_name: str + :param service_name: Name of the service. + :type service_name: str + :param project_name: Name of the project. + :type project_name: str + :param file_name: Name of the File. + :type file_name: str + :keyword callable cls: A custom type or function that will be passed the direct response + :return: None, or the result of cls(response) + :rtype: None + :raises: ~azure.core.exceptions.HttpResponseError + """ + cls = kwargs.pop('cls', None) # type: ClsType[None] + error_map = { + 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError + } + error_map.update(kwargs.pop('error_map', {})) + api_version = "2021-10-30-preview" + accept = "application/json" + + # Construct URL + url = self.delete.metadata['url'] # type: ignore + path_format_arguments = { + 'subscriptionId': self._serialize.url("self._config.subscription_id", self._config.subscription_id, 'str'), + 'groupName': self._serialize.url("group_name", group_name, 'str'), + 'serviceName': self._serialize.url("service_name", service_name, 'str'), + 'projectName': self._serialize.url("project_name", project_name, 'str'), + 'fileName': self._serialize.url("file_name", file_name, 'str'), + } + url = self._client.format_url(url, **path_format_arguments) + + # Construct parameters + query_parameters = {} # type: Dict[str, Any] + query_parameters['api-version'] = self._serialize.query("api_version", api_version, 'str') + + # Construct headers + header_parameters = {} # type: Dict[str, Any] + header_parameters['Accept'] = self._serialize.header("accept", accept, 'str') + + request = self._client.delete(url, query_parameters, header_parameters) + pipeline_response = self._client._pipeline.run(request, stream=False, **kwargs) + response = pipeline_response.http_response + + if response.status_code not in [200, 204]: + map_error(status_code=response.status_code, response=response, error_map=error_map) + error = self._deserialize(models.ApiError, response) + raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) + + if cls: + return cls(pipeline_response, None, {}) + + delete.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{groupName}/providers/Microsoft.DataMigration/services/{serviceName}/projects/{projectName}/files/{fileName}'} # type: ignore + + def update( + self, + group_name, # type: str + service_name, # type: str + project_name, # type: str + file_name, # type: str + parameters, # type: "models.ProjectFile" + **kwargs # type: Any + ): + # type: (...) -> "models.ProjectFile" + """Update a file. + + This method updates an existing file. + + :param group_name: Name of the resource group. + :type group_name: str + :param service_name: Name of the service. + :type service_name: str + :param project_name: Name of the project. + :type project_name: str + :param file_name: Name of the File. + :type file_name: str + :param parameters: Information about the file. + :type parameters: ~azure.mgmt.datamigration.models.ProjectFile + :keyword callable cls: A custom type or function that will be passed the direct response + :return: ProjectFile, or the result of cls(response) + :rtype: ~azure.mgmt.datamigration.models.ProjectFile + :raises: ~azure.core.exceptions.HttpResponseError + """ + cls = kwargs.pop('cls', None) # type: ClsType["models.ProjectFile"] + error_map = { + 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError + } + error_map.update(kwargs.pop('error_map', {})) + api_version = "2021-10-30-preview" + content_type = kwargs.pop("content_type", "application/json") + accept = "application/json" + + # Construct URL + url = self.update.metadata['url'] # type: ignore + path_format_arguments = { + 'subscriptionId': self._serialize.url("self._config.subscription_id", self._config.subscription_id, 'str'), + 'groupName': self._serialize.url("group_name", group_name, 'str'), + 'serviceName': self._serialize.url("service_name", service_name, 'str'), + 'projectName': self._serialize.url("project_name", project_name, 'str'), + 'fileName': self._serialize.url("file_name", file_name, 'str'), + } + url = self._client.format_url(url, **path_format_arguments) + + # Construct parameters + query_parameters = {} # type: Dict[str, Any] + query_parameters['api-version'] = self._serialize.query("api_version", api_version, 'str') + + # Construct headers + header_parameters = {} # type: Dict[str, Any] + header_parameters['Content-Type'] = self._serialize.header("content_type", content_type, 'str') + header_parameters['Accept'] = self._serialize.header("accept", accept, 'str') + + body_content_kwargs = {} # type: Dict[str, Any] + body_content = self._serialize.body(parameters, 'ProjectFile') + body_content_kwargs['content'] = body_content + request = self._client.patch(url, query_parameters, header_parameters, **body_content_kwargs) + pipeline_response = self._client._pipeline.run(request, stream=False, **kwargs) + response = pipeline_response.http_response + + if response.status_code not in [200]: + map_error(status_code=response.status_code, response=response, error_map=error_map) + error = self._deserialize(models.ApiError, response) + raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) + + deserialized = self._deserialize('ProjectFile', pipeline_response) + + if cls: + return cls(pipeline_response, deserialized, {}) + + return deserialized + update.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{groupName}/providers/Microsoft.DataMigration/services/{serviceName}/projects/{projectName}/files/{fileName}'} # type: ignore + + def read( + self, + group_name, # type: str + service_name, # type: str + project_name, # type: str + file_name, # type: str + **kwargs # type: Any + ): + # type: (...) -> "models.FileStorageInfo" + """Request storage information for downloading the file content. + + This method is used for requesting storage information using which contents of the file can be + downloaded. + + :param group_name: Name of the resource group. + :type group_name: str + :param service_name: Name of the service. + :type service_name: str + :param project_name: Name of the project. + :type project_name: str + :param file_name: Name of the File. + :type file_name: str + :keyword callable cls: A custom type or function that will be passed the direct response + :return: FileStorageInfo, or the result of cls(response) + :rtype: ~azure.mgmt.datamigration.models.FileStorageInfo + :raises: ~azure.core.exceptions.HttpResponseError + """ + cls = kwargs.pop('cls', None) # type: ClsType["models.FileStorageInfo"] + error_map = { + 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError + } + error_map.update(kwargs.pop('error_map', {})) + api_version = "2021-10-30-preview" + accept = "application/json" + + # Construct URL + url = self.read.metadata['url'] # type: ignore + path_format_arguments = { + 'subscriptionId': self._serialize.url("self._config.subscription_id", self._config.subscription_id, 'str'), + 'groupName': self._serialize.url("group_name", group_name, 'str'), + 'serviceName': self._serialize.url("service_name", service_name, 'str'), + 'projectName': self._serialize.url("project_name", project_name, 'str'), + 'fileName': self._serialize.url("file_name", file_name, 'str'), + } + url = self._client.format_url(url, **path_format_arguments) + + # Construct parameters + query_parameters = {} # type: Dict[str, Any] + query_parameters['api-version'] = self._serialize.query("api_version", api_version, 'str') + + # Construct headers + header_parameters = {} # type: Dict[str, Any] + header_parameters['Accept'] = self._serialize.header("accept", accept, 'str') + + request = self._client.post(url, query_parameters, header_parameters) + pipeline_response = self._client._pipeline.run(request, stream=False, **kwargs) + response = pipeline_response.http_response + + if response.status_code not in [200]: + map_error(status_code=response.status_code, response=response, error_map=error_map) + error = self._deserialize(models.ApiError, response) + raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) + + deserialized = self._deserialize('FileStorageInfo', pipeline_response) + + if cls: + return cls(pipeline_response, deserialized, {}) + + return deserialized + read.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{groupName}/providers/Microsoft.DataMigration/services/{serviceName}/projects/{projectName}/files/{fileName}/read'} # type: ignore + + def read_write( + self, + group_name, # type: str + service_name, # type: str + project_name, # type: str + file_name, # type: str + **kwargs # type: Any + ): + # type: (...) -> "models.FileStorageInfo" + """Request information for reading and writing file content. + + This method is used for requesting information for reading and writing the file content. + + :param group_name: Name of the resource group. + :type group_name: str + :param service_name: Name of the service. + :type service_name: str + :param project_name: Name of the project. + :type project_name: str + :param file_name: Name of the File. + :type file_name: str + :keyword callable cls: A custom type or function that will be passed the direct response + :return: FileStorageInfo, or the result of cls(response) + :rtype: ~azure.mgmt.datamigration.models.FileStorageInfo + :raises: ~azure.core.exceptions.HttpResponseError + """ + cls = kwargs.pop('cls', None) # type: ClsType["models.FileStorageInfo"] + error_map = { + 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError + } + error_map.update(kwargs.pop('error_map', {})) + api_version = "2021-10-30-preview" + accept = "application/json" + + # Construct URL + url = self.read_write.metadata['url'] # type: ignore + path_format_arguments = { + 'subscriptionId': self._serialize.url("self._config.subscription_id", self._config.subscription_id, 'str'), + 'groupName': self._serialize.url("group_name", group_name, 'str'), + 'serviceName': self._serialize.url("service_name", service_name, 'str'), + 'projectName': self._serialize.url("project_name", project_name, 'str'), + 'fileName': self._serialize.url("file_name", file_name, 'str'), + } + url = self._client.format_url(url, **path_format_arguments) + + # Construct parameters + query_parameters = {} # type: Dict[str, Any] + query_parameters['api-version'] = self._serialize.query("api_version", api_version, 'str') + + # Construct headers + header_parameters = {} # type: Dict[str, Any] + header_parameters['Accept'] = self._serialize.header("accept", accept, 'str') + + request = self._client.post(url, query_parameters, header_parameters) + pipeline_response = self._client._pipeline.run(request, stream=False, **kwargs) + response = pipeline_response.http_response + + if response.status_code not in [200]: + map_error(status_code=response.status_code, response=response, error_map=error_map) + error = self._deserialize(models.ApiError, response) + raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) + + deserialized = self._deserialize('FileStorageInfo', pipeline_response) + + if cls: + return cls(pipeline_response, deserialized, {}) + + return deserialized + read_write.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{groupName}/providers/Microsoft.DataMigration/services/{serviceName}/projects/{projectName}/files/{fileName}/readwrite'} # type: ignore diff --git a/src/datamigration/azext_datamigration/vendored_sdks/datamigration/operations/_operations.py b/src/datamigration/azext_datamigration/vendored_sdks/datamigration/operations/_operations.py new file mode 100644 index 00000000000..155c79215e6 --- /dev/null +++ b/src/datamigration/azext_datamigration/vendored_sdks/datamigration/operations/_operations.py @@ -0,0 +1,109 @@ +# coding=utf-8 +# -------------------------------------------------------------------------- +# Copyright (c) Microsoft Corporation. All rights reserved. +# Licensed under the MIT License. See License.txt in the project root for license information. +# Code generated by Microsoft (R) AutoRest Code Generator. +# Changes may cause incorrect behavior and will be lost if the code is regenerated. +# -------------------------------------------------------------------------- +from typing import TYPE_CHECKING +import warnings + +from azure.core.exceptions import ClientAuthenticationError, HttpResponseError, ResourceExistsError, ResourceNotFoundError, map_error +from azure.core.paging import ItemPaged +from azure.core.pipeline import PipelineResponse +from azure.core.pipeline.transport import HttpRequest, HttpResponse +from azure.mgmt.core.exceptions import ARMErrorFormat + +from .. import models + +if TYPE_CHECKING: + # pylint: disable=unused-import,ungrouped-imports + from typing import Any, Callable, Dict, Generic, Iterable, Optional, TypeVar + + T = TypeVar('T') + ClsType = Optional[Callable[[PipelineResponse[HttpRequest, HttpResponse], T, Dict[str, Any]], Any]] + +class Operations(object): + """Operations operations. + + You should not instantiate this class directly. Instead, you should create a Client instance that + instantiates it for you and attaches it as an attribute. + + :ivar models: Alias to model classes used in this operation group. + :type models: ~azure.mgmt.datamigration.models + :param client: Client for service requests. + :param config: Configuration of service client. + :param serializer: An object model serializer. + :param deserializer: An object model deserializer. + """ + + models = models + + def __init__(self, client, config, serializer, deserializer): + self._client = client + self._serialize = serializer + self._deserialize = deserializer + self._config = config + + def list( + self, + **kwargs # type: Any + ): + # type: (...) -> Iterable["models.OperationListResult"] + """Lists all of the available SQL Migration REST API operations. + + :keyword callable cls: A custom type or function that will be passed the direct response + :return: An iterator like instance of either OperationListResult or the result of cls(response) + :rtype: ~azure.core.paging.ItemPaged[~azure.mgmt.datamigration.models.OperationListResult] + :raises: ~azure.core.exceptions.HttpResponseError + """ + cls = kwargs.pop('cls', None) # type: ClsType["models.OperationListResult"] + error_map = { + 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError + } + error_map.update(kwargs.pop('error_map', {})) + api_version = "2021-10-30-preview" + accept = "application/json" + + def prepare_request(next_link=None): + # Construct headers + header_parameters = {} # type: Dict[str, Any] + header_parameters['Accept'] = self._serialize.header("accept", accept, 'str') + + if not next_link: + # Construct URL + url = self.list.metadata['url'] # type: ignore + # Construct parameters + query_parameters = {} # type: Dict[str, Any] + query_parameters['api-version'] = self._serialize.query("api_version", api_version, 'str') + + request = self._client.get(url, query_parameters, header_parameters) + else: + url = next_link + query_parameters = {} # type: Dict[str, Any] + request = self._client.get(url, query_parameters, header_parameters) + return request + + def extract_data(pipeline_response): + deserialized = self._deserialize('OperationListResult', pipeline_response) + list_of_elem = deserialized.value + if cls: + list_of_elem = cls(list_of_elem) + return deserialized.next_link or None, iter(list_of_elem) + + def get_next(next_link=None): + request = prepare_request(next_link) + + pipeline_response = self._client._pipeline.run(request, stream=False, **kwargs) + response = pipeline_response.http_response + + if response.status_code not in [200]: + map_error(status_code=response.status_code, response=response, error_map=error_map) + raise HttpResponseError(response=response, error_format=ARMErrorFormat) + + return pipeline_response + + return ItemPaged( + get_next, extract_data + ) + list.metadata = {'url': '/providers/Microsoft.DataMigration/operations'} # type: ignore diff --git a/src/datamigration/azext_datamigration/vendored_sdks/datamigration/operations/_projects_operations.py b/src/datamigration/azext_datamigration/vendored_sdks/datamigration/operations/_projects_operations.py new file mode 100644 index 00000000000..eb7d883bfd4 --- /dev/null +++ b/src/datamigration/azext_datamigration/vendored_sdks/datamigration/operations/_projects_operations.py @@ -0,0 +1,415 @@ +# coding=utf-8 +# -------------------------------------------------------------------------- +# Copyright (c) Microsoft Corporation. All rights reserved. +# Licensed under the MIT License. See License.txt in the project root for license information. +# Code generated by Microsoft (R) AutoRest Code Generator. +# Changes may cause incorrect behavior and will be lost if the code is regenerated. +# -------------------------------------------------------------------------- +from typing import TYPE_CHECKING +import warnings + +from azure.core.exceptions import ClientAuthenticationError, HttpResponseError, ResourceExistsError, ResourceNotFoundError, map_error +from azure.core.paging import ItemPaged +from azure.core.pipeline import PipelineResponse +from azure.core.pipeline.transport import HttpRequest, HttpResponse +from azure.mgmt.core.exceptions import ARMErrorFormat + +from .. import models + +if TYPE_CHECKING: + # pylint: disable=unused-import,ungrouped-imports + from typing import Any, Callable, Dict, Generic, Iterable, Optional, TypeVar, Union + + T = TypeVar('T') + ClsType = Optional[Callable[[PipelineResponse[HttpRequest, HttpResponse], T, Dict[str, Any]], Any]] + +class ProjectsOperations(object): + """ProjectsOperations operations. + + You should not instantiate this class directly. Instead, you should create a Client instance that + instantiates it for you and attaches it as an attribute. + + :ivar models: Alias to model classes used in this operation group. + :type models: ~azure.mgmt.datamigration.models + :param client: Client for service requests. + :param config: Configuration of service client. + :param serializer: An object model serializer. + :param deserializer: An object model deserializer. + """ + + models = models + + def __init__(self, client, config, serializer, deserializer): + self._client = client + self._serialize = serializer + self._deserialize = deserializer + self._config = config + + def list( + self, + group_name, # type: str + service_name, # type: str + **kwargs # type: Any + ): + # type: (...) -> Iterable["models.ProjectList"] + """Get projects in a service. + + The project resource is a nested resource representing a stored migration project. This method + returns a list of projects owned by a service resource. + + :param group_name: Name of the resource group. + :type group_name: str + :param service_name: Name of the service. + :type service_name: str + :keyword callable cls: A custom type or function that will be passed the direct response + :return: An iterator like instance of either ProjectList or the result of cls(response) + :rtype: ~azure.core.paging.ItemPaged[~azure.mgmt.datamigration.models.ProjectList] + :raises: ~azure.core.exceptions.HttpResponseError + """ + cls = kwargs.pop('cls', None) # type: ClsType["models.ProjectList"] + error_map = { + 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError + } + error_map.update(kwargs.pop('error_map', {})) + api_version = "2021-10-30-preview" + accept = "application/json" + + def prepare_request(next_link=None): + # Construct headers + header_parameters = {} # type: Dict[str, Any] + header_parameters['Accept'] = self._serialize.header("accept", accept, 'str') + + if not next_link: + # Construct URL + url = self.list.metadata['url'] # type: ignore + path_format_arguments = { + 'subscriptionId': self._serialize.url("self._config.subscription_id", self._config.subscription_id, 'str'), + 'groupName': self._serialize.url("group_name", group_name, 'str'), + 'serviceName': self._serialize.url("service_name", service_name, 'str'), + } + url = self._client.format_url(url, **path_format_arguments) + # Construct parameters + query_parameters = {} # type: Dict[str, Any] + query_parameters['api-version'] = self._serialize.query("api_version", api_version, 'str') + + request = self._client.get(url, query_parameters, header_parameters) + else: + url = next_link + query_parameters = {} # type: Dict[str, Any] + request = self._client.get(url, query_parameters, header_parameters) + return request + + def extract_data(pipeline_response): + deserialized = self._deserialize('ProjectList', pipeline_response) + list_of_elem = deserialized.value + if cls: + list_of_elem = cls(list_of_elem) + return deserialized.next_link or None, iter(list_of_elem) + + def get_next(next_link=None): + request = prepare_request(next_link) + + pipeline_response = self._client._pipeline.run(request, stream=False, **kwargs) + response = pipeline_response.http_response + + if response.status_code not in [200]: + error = self._deserialize(models.ApiError, response) + map_error(status_code=response.status_code, response=response, error_map=error_map) + raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) + + return pipeline_response + + return ItemPaged( + get_next, extract_data + ) + list.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{groupName}/providers/Microsoft.DataMigration/services/{serviceName}/projects'} # type: ignore + + def create_or_update( + self, + group_name, # type: str + service_name, # type: str + project_name, # type: str + parameters, # type: "models.Project" + **kwargs # type: Any + ): + # type: (...) -> "models.Project" + """Create or update project. + + The project resource is a nested resource representing a stored migration project. The PUT + method creates a new project or updates an existing one. + + :param group_name: Name of the resource group. + :type group_name: str + :param service_name: Name of the service. + :type service_name: str + :param project_name: Name of the project. + :type project_name: str + :param parameters: Information about the project. + :type parameters: ~azure.mgmt.datamigration.models.Project + :keyword callable cls: A custom type or function that will be passed the direct response + :return: Project, or the result of cls(response) + :rtype: ~azure.mgmt.datamigration.models.Project + :raises: ~azure.core.exceptions.HttpResponseError + """ + cls = kwargs.pop('cls', None) # type: ClsType["models.Project"] + error_map = { + 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError + } + error_map.update(kwargs.pop('error_map', {})) + api_version = "2021-10-30-preview" + content_type = kwargs.pop("content_type", "application/json") + accept = "application/json" + + # Construct URL + url = self.create_or_update.metadata['url'] # type: ignore + path_format_arguments = { + 'subscriptionId': self._serialize.url("self._config.subscription_id", self._config.subscription_id, 'str'), + 'groupName': self._serialize.url("group_name", group_name, 'str'), + 'serviceName': self._serialize.url("service_name", service_name, 'str'), + 'projectName': self._serialize.url("project_name", project_name, 'str'), + } + url = self._client.format_url(url, **path_format_arguments) + + # Construct parameters + query_parameters = {} # type: Dict[str, Any] + query_parameters['api-version'] = self._serialize.query("api_version", api_version, 'str') + + # Construct headers + header_parameters = {} # type: Dict[str, Any] + header_parameters['Content-Type'] = self._serialize.header("content_type", content_type, 'str') + header_parameters['Accept'] = self._serialize.header("accept", accept, 'str') + + body_content_kwargs = {} # type: Dict[str, Any] + body_content = self._serialize.body(parameters, 'Project') + body_content_kwargs['content'] = body_content + request = self._client.put(url, query_parameters, header_parameters, **body_content_kwargs) + pipeline_response = self._client._pipeline.run(request, stream=False, **kwargs) + response = pipeline_response.http_response + + if response.status_code not in [200, 201]: + map_error(status_code=response.status_code, response=response, error_map=error_map) + error = self._deserialize(models.ApiError, response) + raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) + + if response.status_code == 200: + deserialized = self._deserialize('Project', pipeline_response) + + if response.status_code == 201: + deserialized = self._deserialize('Project', pipeline_response) + + if cls: + return cls(pipeline_response, deserialized, {}) + + return deserialized + create_or_update.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{groupName}/providers/Microsoft.DataMigration/services/{serviceName}/projects/{projectName}'} # type: ignore + + def get( + self, + group_name, # type: str + service_name, # type: str + project_name, # type: str + **kwargs # type: Any + ): + # type: (...) -> "models.Project" + """Get project information. + + The project resource is a nested resource representing a stored migration project. The GET + method retrieves information about a project. + + :param group_name: Name of the resource group. + :type group_name: str + :param service_name: Name of the service. + :type service_name: str + :param project_name: Name of the project. + :type project_name: str + :keyword callable cls: A custom type or function that will be passed the direct response + :return: Project, or the result of cls(response) + :rtype: ~azure.mgmt.datamigration.models.Project + :raises: ~azure.core.exceptions.HttpResponseError + """ + cls = kwargs.pop('cls', None) # type: ClsType["models.Project"] + error_map = { + 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError + } + error_map.update(kwargs.pop('error_map', {})) + api_version = "2021-10-30-preview" + accept = "application/json" + + # Construct URL + url = self.get.metadata['url'] # type: ignore + path_format_arguments = { + 'subscriptionId': self._serialize.url("self._config.subscription_id", self._config.subscription_id, 'str'), + 'groupName': self._serialize.url("group_name", group_name, 'str'), + 'serviceName': self._serialize.url("service_name", service_name, 'str'), + 'projectName': self._serialize.url("project_name", project_name, 'str'), + } + url = self._client.format_url(url, **path_format_arguments) + + # Construct parameters + query_parameters = {} # type: Dict[str, Any] + query_parameters['api-version'] = self._serialize.query("api_version", api_version, 'str') + + # Construct headers + header_parameters = {} # type: Dict[str, Any] + header_parameters['Accept'] = self._serialize.header("accept", accept, 'str') + + request = self._client.get(url, query_parameters, header_parameters) + pipeline_response = self._client._pipeline.run(request, stream=False, **kwargs) + response = pipeline_response.http_response + + if response.status_code not in [200]: + map_error(status_code=response.status_code, response=response, error_map=error_map) + error = self._deserialize(models.ApiError, response) + raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) + + deserialized = self._deserialize('Project', pipeline_response) + + if cls: + return cls(pipeline_response, deserialized, {}) + + return deserialized + get.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{groupName}/providers/Microsoft.DataMigration/services/{serviceName}/projects/{projectName}'} # type: ignore + + def delete( + self, + group_name, # type: str + service_name, # type: str + project_name, # type: str + delete_running_tasks=None, # type: Optional[bool] + **kwargs # type: Any + ): + # type: (...) -> None + """Delete project. + + The project resource is a nested resource representing a stored migration project. The DELETE + method deletes a project. + + :param group_name: Name of the resource group. + :type group_name: str + :param service_name: Name of the service. + :type service_name: str + :param project_name: Name of the project. + :type project_name: str + :param delete_running_tasks: Delete the resource even if it contains running tasks. + :type delete_running_tasks: bool + :keyword callable cls: A custom type or function that will be passed the direct response + :return: None, or the result of cls(response) + :rtype: None + :raises: ~azure.core.exceptions.HttpResponseError + """ + cls = kwargs.pop('cls', None) # type: ClsType[None] + error_map = { + 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError + } + error_map.update(kwargs.pop('error_map', {})) + api_version = "2021-10-30-preview" + accept = "application/json" + + # Construct URL + url = self.delete.metadata['url'] # type: ignore + path_format_arguments = { + 'subscriptionId': self._serialize.url("self._config.subscription_id", self._config.subscription_id, 'str'), + 'groupName': self._serialize.url("group_name", group_name, 'str'), + 'serviceName': self._serialize.url("service_name", service_name, 'str'), + 'projectName': self._serialize.url("project_name", project_name, 'str'), + } + url = self._client.format_url(url, **path_format_arguments) + + # Construct parameters + query_parameters = {} # type: Dict[str, Any] + query_parameters['api-version'] = self._serialize.query("api_version", api_version, 'str') + if delete_running_tasks is not None: + query_parameters['deleteRunningTasks'] = self._serialize.query("delete_running_tasks", delete_running_tasks, 'bool') + + # Construct headers + header_parameters = {} # type: Dict[str, Any] + header_parameters['Accept'] = self._serialize.header("accept", accept, 'str') + + request = self._client.delete(url, query_parameters, header_parameters) + pipeline_response = self._client._pipeline.run(request, stream=False, **kwargs) + response = pipeline_response.http_response + + if response.status_code not in [200, 204]: + map_error(status_code=response.status_code, response=response, error_map=error_map) + error = self._deserialize(models.ApiError, response) + raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) + + if cls: + return cls(pipeline_response, None, {}) + + delete.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{groupName}/providers/Microsoft.DataMigration/services/{serviceName}/projects/{projectName}'} # type: ignore + + def update( + self, + group_name, # type: str + service_name, # type: str + project_name, # type: str + parameters, # type: "models.Project" + **kwargs # type: Any + ): + # type: (...) -> "models.Project" + """Update project. + + The project resource is a nested resource representing a stored migration project. The PATCH + method updates an existing project. + + :param group_name: Name of the resource group. + :type group_name: str + :param service_name: Name of the service. + :type service_name: str + :param project_name: Name of the project. + :type project_name: str + :param parameters: Information about the project. + :type parameters: ~azure.mgmt.datamigration.models.Project + :keyword callable cls: A custom type or function that will be passed the direct response + :return: Project, or the result of cls(response) + :rtype: ~azure.mgmt.datamigration.models.Project + :raises: ~azure.core.exceptions.HttpResponseError + """ + cls = kwargs.pop('cls', None) # type: ClsType["models.Project"] + error_map = { + 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError + } + error_map.update(kwargs.pop('error_map', {})) + api_version = "2021-10-30-preview" + content_type = kwargs.pop("content_type", "application/json") + accept = "application/json" + + # Construct URL + url = self.update.metadata['url'] # type: ignore + path_format_arguments = { + 'subscriptionId': self._serialize.url("self._config.subscription_id", self._config.subscription_id, 'str'), + 'groupName': self._serialize.url("group_name", group_name, 'str'), + 'serviceName': self._serialize.url("service_name", service_name, 'str'), + 'projectName': self._serialize.url("project_name", project_name, 'str'), + } + url = self._client.format_url(url, **path_format_arguments) + + # Construct parameters + query_parameters = {} # type: Dict[str, Any] + query_parameters['api-version'] = self._serialize.query("api_version", api_version, 'str') + + # Construct headers + header_parameters = {} # type: Dict[str, Any] + header_parameters['Content-Type'] = self._serialize.header("content_type", content_type, 'str') + header_parameters['Accept'] = self._serialize.header("accept", accept, 'str') + + body_content_kwargs = {} # type: Dict[str, Any] + body_content = self._serialize.body(parameters, 'Project') + body_content_kwargs['content'] = body_content + request = self._client.patch(url, query_parameters, header_parameters, **body_content_kwargs) + pipeline_response = self._client._pipeline.run(request, stream=False, **kwargs) + response = pipeline_response.http_response + + if response.status_code not in [200]: + map_error(status_code=response.status_code, response=response, error_map=error_map) + error = self._deserialize(models.ApiError, response) + raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) + + deserialized = self._deserialize('Project', pipeline_response) + + if cls: + return cls(pipeline_response, deserialized, {}) + + return deserialized + update.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{groupName}/providers/Microsoft.DataMigration/services/{serviceName}/projects/{projectName}'} # type: ignore diff --git a/src/datamigration/azext_datamigration/vendored_sdks/datamigration/operations/_resource_skus_operations.py b/src/datamigration/azext_datamigration/vendored_sdks/datamigration/operations/_resource_skus_operations.py new file mode 100644 index 00000000000..427b275241a --- /dev/null +++ b/src/datamigration/azext_datamigration/vendored_sdks/datamigration/operations/_resource_skus_operations.py @@ -0,0 +1,116 @@ +# coding=utf-8 +# -------------------------------------------------------------------------- +# Copyright (c) Microsoft Corporation. All rights reserved. +# Licensed under the MIT License. See License.txt in the project root for license information. +# Code generated by Microsoft (R) AutoRest Code Generator. +# Changes may cause incorrect behavior and will be lost if the code is regenerated. +# -------------------------------------------------------------------------- +from typing import TYPE_CHECKING +import warnings + +from azure.core.exceptions import ClientAuthenticationError, HttpResponseError, ResourceExistsError, ResourceNotFoundError, map_error +from azure.core.paging import ItemPaged +from azure.core.pipeline import PipelineResponse +from azure.core.pipeline.transport import HttpRequest, HttpResponse +from azure.mgmt.core.exceptions import ARMErrorFormat + +from .. import models + +if TYPE_CHECKING: + # pylint: disable=unused-import,ungrouped-imports + from typing import Any, Callable, Dict, Generic, Iterable, Optional, TypeVar + + T = TypeVar('T') + ClsType = Optional[Callable[[PipelineResponse[HttpRequest, HttpResponse], T, Dict[str, Any]], Any]] + +class ResourceSkusOperations(object): + """ResourceSkusOperations operations. + + You should not instantiate this class directly. Instead, you should create a Client instance that + instantiates it for you and attaches it as an attribute. + + :ivar models: Alias to model classes used in this operation group. + :type models: ~azure.mgmt.datamigration.models + :param client: Client for service requests. + :param config: Configuration of service client. + :param serializer: An object model serializer. + :param deserializer: An object model deserializer. + """ + + models = models + + def __init__(self, client, config, serializer, deserializer): + self._client = client + self._serialize = serializer + self._deserialize = deserializer + self._config = config + + def list_skus( + self, + **kwargs # type: Any + ): + # type: (...) -> Iterable["models.ResourceSkusResult"] + """Get supported SKUs. + + The skus action returns the list of SKUs that DMS supports. + + :keyword callable cls: A custom type or function that will be passed the direct response + :return: An iterator like instance of either ResourceSkusResult or the result of cls(response) + :rtype: ~azure.core.paging.ItemPaged[~azure.mgmt.datamigration.models.ResourceSkusResult] + :raises: ~azure.core.exceptions.HttpResponseError + """ + cls = kwargs.pop('cls', None) # type: ClsType["models.ResourceSkusResult"] + error_map = { + 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError + } + error_map.update(kwargs.pop('error_map', {})) + api_version = "2021-10-30-preview" + accept = "application/json" + + def prepare_request(next_link=None): + # Construct headers + header_parameters = {} # type: Dict[str, Any] + header_parameters['Accept'] = self._serialize.header("accept", accept, 'str') + + if not next_link: + # Construct URL + url = self.list_skus.metadata['url'] # type: ignore + path_format_arguments = { + 'subscriptionId': self._serialize.url("self._config.subscription_id", self._config.subscription_id, 'str'), + } + url = self._client.format_url(url, **path_format_arguments) + # Construct parameters + query_parameters = {} # type: Dict[str, Any] + query_parameters['api-version'] = self._serialize.query("api_version", api_version, 'str') + + request = self._client.get(url, query_parameters, header_parameters) + else: + url = next_link + query_parameters = {} # type: Dict[str, Any] + request = self._client.get(url, query_parameters, header_parameters) + return request + + def extract_data(pipeline_response): + deserialized = self._deserialize('ResourceSkusResult', pipeline_response) + list_of_elem = deserialized.value + if cls: + list_of_elem = cls(list_of_elem) + return deserialized.next_link or None, iter(list_of_elem) + + def get_next(next_link=None): + request = prepare_request(next_link) + + pipeline_response = self._client._pipeline.run(request, stream=False, **kwargs) + response = pipeline_response.http_response + + if response.status_code not in [200]: + error = self._deserialize(models.ApiError, response) + map_error(status_code=response.status_code, response=response, error_map=error_map) + raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) + + return pipeline_response + + return ItemPaged( + get_next, extract_data + ) + list_skus.metadata = {'url': '/subscriptions/{subscriptionId}/providers/Microsoft.DataMigration/skus'} # type: ignore diff --git a/src/datamigration/azext_datamigration/vendored_sdks/datamigration/operations/_service_tasks_operations.py b/src/datamigration/azext_datamigration/vendored_sdks/datamigration/operations/_service_tasks_operations.py new file mode 100644 index 00000000000..3844742d6cd --- /dev/null +++ b/src/datamigration/azext_datamigration/vendored_sdks/datamigration/operations/_service_tasks_operations.py @@ -0,0 +1,497 @@ +# coding=utf-8 +# -------------------------------------------------------------------------- +# Copyright (c) Microsoft Corporation. All rights reserved. +# Licensed under the MIT License. See License.txt in the project root for license information. +# Code generated by Microsoft (R) AutoRest Code Generator. +# Changes may cause incorrect behavior and will be lost if the code is regenerated. +# -------------------------------------------------------------------------- +from typing import TYPE_CHECKING +import warnings + +from azure.core.exceptions import ClientAuthenticationError, HttpResponseError, ResourceExistsError, ResourceNotFoundError, map_error +from azure.core.paging import ItemPaged +from azure.core.pipeline import PipelineResponse +from azure.core.pipeline.transport import HttpRequest, HttpResponse +from azure.mgmt.core.exceptions import ARMErrorFormat + +from .. import models + +if TYPE_CHECKING: + # pylint: disable=unused-import,ungrouped-imports + from typing import Any, Callable, Dict, Generic, Iterable, Optional, TypeVar, Union + + T = TypeVar('T') + ClsType = Optional[Callable[[PipelineResponse[HttpRequest, HttpResponse], T, Dict[str, Any]], Any]] + +class ServiceTasksOperations(object): + """ServiceTasksOperations operations. + + You should not instantiate this class directly. Instead, you should create a Client instance that + instantiates it for you and attaches it as an attribute. + + :ivar models: Alias to model classes used in this operation group. + :type models: ~azure.mgmt.datamigration.models + :param client: Client for service requests. + :param config: Configuration of service client. + :param serializer: An object model serializer. + :param deserializer: An object model deserializer. + """ + + models = models + + def __init__(self, client, config, serializer, deserializer): + self._client = client + self._serialize = serializer + self._deserialize = deserializer + self._config = config + + def list( + self, + group_name, # type: str + service_name, # type: str + task_type=None, # type: Optional[str] + **kwargs # type: Any + ): + # type: (...) -> Iterable["models.TaskList"] + """Get service level tasks for a service. + + The services resource is the top-level resource that represents the Database Migration Service. + This method returns a list of service level tasks owned by a service resource. Some tasks may + have a status of Unknown, which indicates that an error occurred while querying the status of + that task. + + :param group_name: Name of the resource group. + :type group_name: str + :param service_name: Name of the service. + :type service_name: str + :param task_type: Filter tasks by task type. + :type task_type: str + :keyword callable cls: A custom type or function that will be passed the direct response + :return: An iterator like instance of either TaskList or the result of cls(response) + :rtype: ~azure.core.paging.ItemPaged[~azure.mgmt.datamigration.models.TaskList] + :raises: ~azure.core.exceptions.HttpResponseError + """ + cls = kwargs.pop('cls', None) # type: ClsType["models.TaskList"] + error_map = { + 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError + } + error_map.update(kwargs.pop('error_map', {})) + api_version = "2021-10-30-preview" + accept = "application/json" + + def prepare_request(next_link=None): + # Construct headers + header_parameters = {} # type: Dict[str, Any] + header_parameters['Accept'] = self._serialize.header("accept", accept, 'str') + + if not next_link: + # Construct URL + url = self.list.metadata['url'] # type: ignore + path_format_arguments = { + 'subscriptionId': self._serialize.url("self._config.subscription_id", self._config.subscription_id, 'str'), + 'groupName': self._serialize.url("group_name", group_name, 'str'), + 'serviceName': self._serialize.url("service_name", service_name, 'str'), + } + url = self._client.format_url(url, **path_format_arguments) + # Construct parameters + query_parameters = {} # type: Dict[str, Any] + query_parameters['api-version'] = self._serialize.query("api_version", api_version, 'str') + if task_type is not None: + query_parameters['taskType'] = self._serialize.query("task_type", task_type, 'str') + + request = self._client.get(url, query_parameters, header_parameters) + else: + url = next_link + query_parameters = {} # type: Dict[str, Any] + request = self._client.get(url, query_parameters, header_parameters) + return request + + def extract_data(pipeline_response): + deserialized = self._deserialize('TaskList', pipeline_response) + list_of_elem = deserialized.value + if cls: + list_of_elem = cls(list_of_elem) + return deserialized.next_link or None, iter(list_of_elem) + + def get_next(next_link=None): + request = prepare_request(next_link) + + pipeline_response = self._client._pipeline.run(request, stream=False, **kwargs) + response = pipeline_response.http_response + + if response.status_code not in [200]: + error = self._deserialize(models.ApiError, response) + map_error(status_code=response.status_code, response=response, error_map=error_map) + raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) + + return pipeline_response + + return ItemPaged( + get_next, extract_data + ) + list.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{groupName}/providers/Microsoft.DataMigration/services/{serviceName}/serviceTasks'} # type: ignore + + def create_or_update( + self, + group_name, # type: str + service_name, # type: str + task_name, # type: str + parameters, # type: "models.ProjectTask" + **kwargs # type: Any + ): + # type: (...) -> "models.ProjectTask" + """Create or update service task. + + The service tasks resource is a nested, proxy-only resource representing work performed by a + DMS instance. The PUT method creates a new service task or updates an existing one, although + since service tasks have no mutable custom properties, there is little reason to update an + existing one. + + :param group_name: Name of the resource group. + :type group_name: str + :param service_name: Name of the service. + :type service_name: str + :param task_name: Name of the Task. + :type task_name: str + :param parameters: Information about the task. + :type parameters: ~azure.mgmt.datamigration.models.ProjectTask + :keyword callable cls: A custom type or function that will be passed the direct response + :return: ProjectTask, or the result of cls(response) + :rtype: ~azure.mgmt.datamigration.models.ProjectTask + :raises: ~azure.core.exceptions.HttpResponseError + """ + cls = kwargs.pop('cls', None) # type: ClsType["models.ProjectTask"] + error_map = { + 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError + } + error_map.update(kwargs.pop('error_map', {})) + api_version = "2021-10-30-preview" + content_type = kwargs.pop("content_type", "application/json") + accept = "application/json" + + # Construct URL + url = self.create_or_update.metadata['url'] # type: ignore + path_format_arguments = { + 'subscriptionId': self._serialize.url("self._config.subscription_id", self._config.subscription_id, 'str'), + 'groupName': self._serialize.url("group_name", group_name, 'str'), + 'serviceName': self._serialize.url("service_name", service_name, 'str'), + 'taskName': self._serialize.url("task_name", task_name, 'str'), + } + url = self._client.format_url(url, **path_format_arguments) + + # Construct parameters + query_parameters = {} # type: Dict[str, Any] + query_parameters['api-version'] = self._serialize.query("api_version", api_version, 'str') + + # Construct headers + header_parameters = {} # type: Dict[str, Any] + header_parameters['Content-Type'] = self._serialize.header("content_type", content_type, 'str') + header_parameters['Accept'] = self._serialize.header("accept", accept, 'str') + + body_content_kwargs = {} # type: Dict[str, Any] + body_content = self._serialize.body(parameters, 'ProjectTask') + body_content_kwargs['content'] = body_content + request = self._client.put(url, query_parameters, header_parameters, **body_content_kwargs) + pipeline_response = self._client._pipeline.run(request, stream=False, **kwargs) + response = pipeline_response.http_response + + if response.status_code not in [200, 201]: + map_error(status_code=response.status_code, response=response, error_map=error_map) + error = self._deserialize(models.ApiError, response) + raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) + + if response.status_code == 200: + deserialized = self._deserialize('ProjectTask', pipeline_response) + + if response.status_code == 201: + deserialized = self._deserialize('ProjectTask', pipeline_response) + + if cls: + return cls(pipeline_response, deserialized, {}) + + return deserialized + create_or_update.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{groupName}/providers/Microsoft.DataMigration/services/{serviceName}/serviceTasks/{taskName}'} # type: ignore + + def get( + self, + group_name, # type: str + service_name, # type: str + task_name, # type: str + expand=None, # type: Optional[str] + **kwargs # type: Any + ): + # type: (...) -> "models.ProjectTask" + """Get service task information. + + The service tasks resource is a nested, proxy-only resource representing work performed by a + DMS instance. The GET method retrieves information about a service task. + + :param group_name: Name of the resource group. + :type group_name: str + :param service_name: Name of the service. + :type service_name: str + :param task_name: Name of the Task. + :type task_name: str + :param expand: Expand the response. + :type expand: str + :keyword callable cls: A custom type or function that will be passed the direct response + :return: ProjectTask, or the result of cls(response) + :rtype: ~azure.mgmt.datamigration.models.ProjectTask + :raises: ~azure.core.exceptions.HttpResponseError + """ + cls = kwargs.pop('cls', None) # type: ClsType["models.ProjectTask"] + error_map = { + 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError + } + error_map.update(kwargs.pop('error_map', {})) + api_version = "2021-10-30-preview" + accept = "application/json" + + # Construct URL + url = self.get.metadata['url'] # type: ignore + path_format_arguments = { + 'subscriptionId': self._serialize.url("self._config.subscription_id", self._config.subscription_id, 'str'), + 'groupName': self._serialize.url("group_name", group_name, 'str'), + 'serviceName': self._serialize.url("service_name", service_name, 'str'), + 'taskName': self._serialize.url("task_name", task_name, 'str'), + } + url = self._client.format_url(url, **path_format_arguments) + + # Construct parameters + query_parameters = {} # type: Dict[str, Any] + query_parameters['api-version'] = self._serialize.query("api_version", api_version, 'str') + if expand is not None: + query_parameters['$expand'] = self._serialize.query("expand", expand, 'str') + + # Construct headers + header_parameters = {} # type: Dict[str, Any] + header_parameters['Accept'] = self._serialize.header("accept", accept, 'str') + + request = self._client.get(url, query_parameters, header_parameters) + pipeline_response = self._client._pipeline.run(request, stream=False, **kwargs) + response = pipeline_response.http_response + + if response.status_code not in [200]: + map_error(status_code=response.status_code, response=response, error_map=error_map) + error = self._deserialize(models.ApiError, response) + raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) + + deserialized = self._deserialize('ProjectTask', pipeline_response) + + if cls: + return cls(pipeline_response, deserialized, {}) + + return deserialized + get.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{groupName}/providers/Microsoft.DataMigration/services/{serviceName}/serviceTasks/{taskName}'} # type: ignore + + def delete( + self, + group_name, # type: str + service_name, # type: str + task_name, # type: str + delete_running_tasks=None, # type: Optional[bool] + **kwargs # type: Any + ): + # type: (...) -> None + """Delete service task. + + The service tasks resource is a nested, proxy-only resource representing work performed by a + DMS instance. The DELETE method deletes a service task, canceling it first if it's running. + + :param group_name: Name of the resource group. + :type group_name: str + :param service_name: Name of the service. + :type service_name: str + :param task_name: Name of the Task. + :type task_name: str + :param delete_running_tasks: Delete the resource even if it contains running tasks. + :type delete_running_tasks: bool + :keyword callable cls: A custom type or function that will be passed the direct response + :return: None, or the result of cls(response) + :rtype: None + :raises: ~azure.core.exceptions.HttpResponseError + """ + cls = kwargs.pop('cls', None) # type: ClsType[None] + error_map = { + 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError + } + error_map.update(kwargs.pop('error_map', {})) + api_version = "2021-10-30-preview" + accept = "application/json" + + # Construct URL + url = self.delete.metadata['url'] # type: ignore + path_format_arguments = { + 'subscriptionId': self._serialize.url("self._config.subscription_id", self._config.subscription_id, 'str'), + 'groupName': self._serialize.url("group_name", group_name, 'str'), + 'serviceName': self._serialize.url("service_name", service_name, 'str'), + 'taskName': self._serialize.url("task_name", task_name, 'str'), + } + url = self._client.format_url(url, **path_format_arguments) + + # Construct parameters + query_parameters = {} # type: Dict[str, Any] + query_parameters['api-version'] = self._serialize.query("api_version", api_version, 'str') + if delete_running_tasks is not None: + query_parameters['deleteRunningTasks'] = self._serialize.query("delete_running_tasks", delete_running_tasks, 'bool') + + # Construct headers + header_parameters = {} # type: Dict[str, Any] + header_parameters['Accept'] = self._serialize.header("accept", accept, 'str') + + request = self._client.delete(url, query_parameters, header_parameters) + pipeline_response = self._client._pipeline.run(request, stream=False, **kwargs) + response = pipeline_response.http_response + + if response.status_code not in [200, 204]: + map_error(status_code=response.status_code, response=response, error_map=error_map) + error = self._deserialize(models.ApiError, response) + raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) + + if cls: + return cls(pipeline_response, None, {}) + + delete.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{groupName}/providers/Microsoft.DataMigration/services/{serviceName}/serviceTasks/{taskName}'} # type: ignore + + def update( + self, + group_name, # type: str + service_name, # type: str + task_name, # type: str + parameters, # type: "models.ProjectTask" + **kwargs # type: Any + ): + # type: (...) -> "models.ProjectTask" + """Create or update service task. + + The service tasks resource is a nested, proxy-only resource representing work performed by a + DMS instance. The PATCH method updates an existing service task, but since service tasks have + no mutable custom properties, there is little reason to do so. + + :param group_name: Name of the resource group. + :type group_name: str + :param service_name: Name of the service. + :type service_name: str + :param task_name: Name of the Task. + :type task_name: str + :param parameters: Information about the task. + :type parameters: ~azure.mgmt.datamigration.models.ProjectTask + :keyword callable cls: A custom type or function that will be passed the direct response + :return: ProjectTask, or the result of cls(response) + :rtype: ~azure.mgmt.datamigration.models.ProjectTask + :raises: ~azure.core.exceptions.HttpResponseError + """ + cls = kwargs.pop('cls', None) # type: ClsType["models.ProjectTask"] + error_map = { + 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError + } + error_map.update(kwargs.pop('error_map', {})) + api_version = "2021-10-30-preview" + content_type = kwargs.pop("content_type", "application/json") + accept = "application/json" + + # Construct URL + url = self.update.metadata['url'] # type: ignore + path_format_arguments = { + 'subscriptionId': self._serialize.url("self._config.subscription_id", self._config.subscription_id, 'str'), + 'groupName': self._serialize.url("group_name", group_name, 'str'), + 'serviceName': self._serialize.url("service_name", service_name, 'str'), + 'taskName': self._serialize.url("task_name", task_name, 'str'), + } + url = self._client.format_url(url, **path_format_arguments) + + # Construct parameters + query_parameters = {} # type: Dict[str, Any] + query_parameters['api-version'] = self._serialize.query("api_version", api_version, 'str') + + # Construct headers + header_parameters = {} # type: Dict[str, Any] + header_parameters['Content-Type'] = self._serialize.header("content_type", content_type, 'str') + header_parameters['Accept'] = self._serialize.header("accept", accept, 'str') + + body_content_kwargs = {} # type: Dict[str, Any] + body_content = self._serialize.body(parameters, 'ProjectTask') + body_content_kwargs['content'] = body_content + request = self._client.patch(url, query_parameters, header_parameters, **body_content_kwargs) + pipeline_response = self._client._pipeline.run(request, stream=False, **kwargs) + response = pipeline_response.http_response + + if response.status_code not in [200]: + map_error(status_code=response.status_code, response=response, error_map=error_map) + error = self._deserialize(models.ApiError, response) + raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) + + deserialized = self._deserialize('ProjectTask', pipeline_response) + + if cls: + return cls(pipeline_response, deserialized, {}) + + return deserialized + update.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{groupName}/providers/Microsoft.DataMigration/services/{serviceName}/serviceTasks/{taskName}'} # type: ignore + + def cancel( + self, + group_name, # type: str + service_name, # type: str + task_name, # type: str + **kwargs # type: Any + ): + # type: (...) -> "models.ProjectTask" + """Cancel a service task. + + The service tasks resource is a nested, proxy-only resource representing work performed by a + DMS instance. This method cancels a service task if it's currently queued or running. + + :param group_name: Name of the resource group. + :type group_name: str + :param service_name: Name of the service. + :type service_name: str + :param task_name: Name of the Task. + :type task_name: str + :keyword callable cls: A custom type or function that will be passed the direct response + :return: ProjectTask, or the result of cls(response) + :rtype: ~azure.mgmt.datamigration.models.ProjectTask + :raises: ~azure.core.exceptions.HttpResponseError + """ + cls = kwargs.pop('cls', None) # type: ClsType["models.ProjectTask"] + error_map = { + 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError + } + error_map.update(kwargs.pop('error_map', {})) + api_version = "2021-10-30-preview" + accept = "application/json" + + # Construct URL + url = self.cancel.metadata['url'] # type: ignore + path_format_arguments = { + 'subscriptionId': self._serialize.url("self._config.subscription_id", self._config.subscription_id, 'str'), + 'groupName': self._serialize.url("group_name", group_name, 'str'), + 'serviceName': self._serialize.url("service_name", service_name, 'str'), + 'taskName': self._serialize.url("task_name", task_name, 'str'), + } + url = self._client.format_url(url, **path_format_arguments) + + # Construct parameters + query_parameters = {} # type: Dict[str, Any] + query_parameters['api-version'] = self._serialize.query("api_version", api_version, 'str') + + # Construct headers + header_parameters = {} # type: Dict[str, Any] + header_parameters['Accept'] = self._serialize.header("accept", accept, 'str') + + request = self._client.post(url, query_parameters, header_parameters) + pipeline_response = self._client._pipeline.run(request, stream=False, **kwargs) + response = pipeline_response.http_response + + if response.status_code not in [200]: + map_error(status_code=response.status_code, response=response, error_map=error_map) + error = self._deserialize(models.ApiError, response) + raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) + + deserialized = self._deserialize('ProjectTask', pipeline_response) + + if cls: + return cls(pipeline_response, deserialized, {}) + + return deserialized + cancel.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{groupName}/providers/Microsoft.DataMigration/services/{serviceName}/serviceTasks/{taskName}/cancel'} # type: ignore diff --git a/src/datamigration/azext_datamigration/vendored_sdks/datamigration/operations/_services_operations.py b/src/datamigration/azext_datamigration/vendored_sdks/datamigration/operations/_services_operations.py new file mode 100644 index 00000000000..387c2434a44 --- /dev/null +++ b/src/datamigration/azext_datamigration/vendored_sdks/datamigration/operations/_services_operations.py @@ -0,0 +1,1161 @@ +# coding=utf-8 +# -------------------------------------------------------------------------- +# Copyright (c) Microsoft Corporation. All rights reserved. +# Licensed under the MIT License. See License.txt in the project root for license information. +# Code generated by Microsoft (R) AutoRest Code Generator. +# Changes may cause incorrect behavior and will be lost if the code is regenerated. +# -------------------------------------------------------------------------- +from typing import TYPE_CHECKING +import warnings + +from azure.core.exceptions import ClientAuthenticationError, HttpResponseError, ResourceExistsError, ResourceNotFoundError, map_error +from azure.core.paging import ItemPaged +from azure.core.pipeline import PipelineResponse +from azure.core.pipeline.transport import HttpRequest, HttpResponse +from azure.core.polling import LROPoller, NoPolling, PollingMethod +from azure.mgmt.core.exceptions import ARMErrorFormat +from azure.mgmt.core.polling.arm_polling import ARMPolling + +from .. import models + +if TYPE_CHECKING: + # pylint: disable=unused-import,ungrouped-imports + from typing import Any, Callable, Dict, Generic, Iterable, Optional, TypeVar, Union + + T = TypeVar('T') + ClsType = Optional[Callable[[PipelineResponse[HttpRequest, HttpResponse], T, Dict[str, Any]], Any]] + +class ServicesOperations(object): + """ServicesOperations operations. + + You should not instantiate this class directly. Instead, you should create a Client instance that + instantiates it for you and attaches it as an attribute. + + :ivar models: Alias to model classes used in this operation group. + :type models: ~azure.mgmt.datamigration.models + :param client: Client for service requests. + :param config: Configuration of service client. + :param serializer: An object model serializer. + :param deserializer: An object model deserializer. + """ + + models = models + + def __init__(self, client, config, serializer, deserializer): + self._client = client + self._serialize = serializer + self._deserialize = deserializer + self._config = config + + def _create_or_update_initial( + self, + group_name, # type: str + service_name, # type: str + parameters, # type: "models.DataMigrationService" + **kwargs # type: Any + ): + # type: (...) -> Optional["models.DataMigrationService"] + cls = kwargs.pop('cls', None) # type: ClsType[Optional["models.DataMigrationService"]] + error_map = { + 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError + } + error_map.update(kwargs.pop('error_map', {})) + api_version = "2021-10-30-preview" + content_type = kwargs.pop("content_type", "application/json") + accept = "application/json" + + # Construct URL + url = self._create_or_update_initial.metadata['url'] # type: ignore + path_format_arguments = { + 'subscriptionId': self._serialize.url("self._config.subscription_id", self._config.subscription_id, 'str'), + 'groupName': self._serialize.url("group_name", group_name, 'str'), + 'serviceName': self._serialize.url("service_name", service_name, 'str'), + } + url = self._client.format_url(url, **path_format_arguments) + + # Construct parameters + query_parameters = {} # type: Dict[str, Any] + query_parameters['api-version'] = self._serialize.query("api_version", api_version, 'str') + + # Construct headers + header_parameters = {} # type: Dict[str, Any] + header_parameters['Content-Type'] = self._serialize.header("content_type", content_type, 'str') + header_parameters['Accept'] = self._serialize.header("accept", accept, 'str') + + body_content_kwargs = {} # type: Dict[str, Any] + body_content = self._serialize.body(parameters, 'DataMigrationService') + body_content_kwargs['content'] = body_content + request = self._client.put(url, query_parameters, header_parameters, **body_content_kwargs) + pipeline_response = self._client._pipeline.run(request, stream=False, **kwargs) + response = pipeline_response.http_response + + if response.status_code not in [200, 201, 202]: + map_error(status_code=response.status_code, response=response, error_map=error_map) + error = self._deserialize(models.ApiError, response) + raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) + + deserialized = None + if response.status_code == 200: + deserialized = self._deserialize('DataMigrationService', pipeline_response) + + if response.status_code == 201: + deserialized = self._deserialize('DataMigrationService', pipeline_response) + + if cls: + return cls(pipeline_response, deserialized, {}) + + return deserialized + _create_or_update_initial.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{groupName}/providers/Microsoft.DataMigration/services/{serviceName}'} # type: ignore + + def begin_create_or_update( + self, + group_name, # type: str + service_name, # type: str + parameters, # type: "models.DataMigrationService" + **kwargs # type: Any + ): + # type: (...) -> LROPoller["models.DataMigrationService"] + """Create or update DMS Instance. + + The services resource is the top-level resource that represents the Database Migration Service. + The PUT method creates a new service or updates an existing one. When a service is updated, + existing child resources (i.e. tasks) are unaffected. Services currently support a single kind, + "vm", which refers to a VM-based service, although other kinds may be added in the future. This + method can change the kind, SKU, and network of the service, but if tasks are currently running + (i.e. the service is busy), this will fail with 400 Bad Request ("ServiceIsBusy"). The provider + will reply when successful with 200 OK or 201 Created. Long-running operations use the + provisioningState property. + + :param group_name: Name of the resource group. + :type group_name: str + :param service_name: Name of the service. + :type service_name: str + :param parameters: Information about the service. + :type parameters: ~azure.mgmt.datamigration.models.DataMigrationService + :keyword callable cls: A custom type or function that will be passed the direct response + :keyword str continuation_token: A continuation token to restart a poller from a saved state. + :keyword polling: True for ARMPolling, False for no polling, or a + polling object for personal polling strategy + :paramtype polling: bool or ~azure.core.polling.PollingMethod + :keyword int polling_interval: Default waiting time between two polls for LRO operations if no Retry-After header is present. + :return: An instance of LROPoller that returns either DataMigrationService or the result of cls(response) + :rtype: ~azure.core.polling.LROPoller[~azure.mgmt.datamigration.models.DataMigrationService] + :raises ~azure.core.exceptions.HttpResponseError: + """ + polling = kwargs.pop('polling', True) # type: Union[bool, PollingMethod] + cls = kwargs.pop('cls', None) # type: ClsType["models.DataMigrationService"] + lro_delay = kwargs.pop( + 'polling_interval', + self._config.polling_interval + ) + cont_token = kwargs.pop('continuation_token', None) # type: Optional[str] + if cont_token is None: + raw_result = self._create_or_update_initial( + group_name=group_name, + service_name=service_name, + parameters=parameters, + cls=lambda x,y,z: x, + **kwargs + ) + + kwargs.pop('error_map', None) + kwargs.pop('content_type', None) + + def get_long_running_output(pipeline_response): + deserialized = self._deserialize('DataMigrationService', pipeline_response) + + if cls: + return cls(pipeline_response, deserialized, {}) + return deserialized + + path_format_arguments = { + 'subscriptionId': self._serialize.url("self._config.subscription_id", self._config.subscription_id, 'str'), + 'groupName': self._serialize.url("group_name", group_name, 'str'), + 'serviceName': self._serialize.url("service_name", service_name, 'str'), + } + + if polling is True: polling_method = ARMPolling(lro_delay, path_format_arguments=path_format_arguments, **kwargs) + elif polling is False: polling_method = NoPolling() + else: polling_method = polling + if cont_token: + return LROPoller.from_continuation_token( + polling_method=polling_method, + continuation_token=cont_token, + client=self._client, + deserialization_callback=get_long_running_output + ) + else: + return LROPoller(self._client, raw_result, get_long_running_output, polling_method) + begin_create_or_update.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{groupName}/providers/Microsoft.DataMigration/services/{serviceName}'} # type: ignore + + def get( + self, + group_name, # type: str + service_name, # type: str + **kwargs # type: Any + ): + # type: (...) -> "models.DataMigrationService" + """Get DMS Service Instance. + + The services resource is the top-level resource that represents the Database Migration Service. + The GET method retrieves information about a service instance. + + :param group_name: Name of the resource group. + :type group_name: str + :param service_name: Name of the service. + :type service_name: str + :keyword callable cls: A custom type or function that will be passed the direct response + :return: DataMigrationService, or the result of cls(response) + :rtype: ~azure.mgmt.datamigration.models.DataMigrationService + :raises: ~azure.core.exceptions.HttpResponseError + """ + cls = kwargs.pop('cls', None) # type: ClsType["models.DataMigrationService"] + error_map = { + 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError + } + error_map.update(kwargs.pop('error_map', {})) + api_version = "2021-10-30-preview" + accept = "application/json" + + # Construct URL + url = self.get.metadata['url'] # type: ignore + path_format_arguments = { + 'subscriptionId': self._serialize.url("self._config.subscription_id", self._config.subscription_id, 'str'), + 'groupName': self._serialize.url("group_name", group_name, 'str'), + 'serviceName': self._serialize.url("service_name", service_name, 'str'), + } + url = self._client.format_url(url, **path_format_arguments) + + # Construct parameters + query_parameters = {} # type: Dict[str, Any] + query_parameters['api-version'] = self._serialize.query("api_version", api_version, 'str') + + # Construct headers + header_parameters = {} # type: Dict[str, Any] + header_parameters['Accept'] = self._serialize.header("accept", accept, 'str') + + request = self._client.get(url, query_parameters, header_parameters) + pipeline_response = self._client._pipeline.run(request, stream=False, **kwargs) + response = pipeline_response.http_response + + if response.status_code not in [200]: + map_error(status_code=response.status_code, response=response, error_map=error_map) + error = self._deserialize(models.ApiError, response) + raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) + + deserialized = self._deserialize('DataMigrationService', pipeline_response) + + if cls: + return cls(pipeline_response, deserialized, {}) + + return deserialized + get.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{groupName}/providers/Microsoft.DataMigration/services/{serviceName}'} # type: ignore + + def _delete_initial( + self, + group_name, # type: str + service_name, # type: str + delete_running_tasks=None, # type: Optional[bool] + **kwargs # type: Any + ): + # type: (...) -> None + cls = kwargs.pop('cls', None) # type: ClsType[None] + error_map = { + 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError + } + error_map.update(kwargs.pop('error_map', {})) + api_version = "2021-10-30-preview" + accept = "application/json" + + # Construct URL + url = self._delete_initial.metadata['url'] # type: ignore + path_format_arguments = { + 'subscriptionId': self._serialize.url("self._config.subscription_id", self._config.subscription_id, 'str'), + 'groupName': self._serialize.url("group_name", group_name, 'str'), + 'serviceName': self._serialize.url("service_name", service_name, 'str'), + } + url = self._client.format_url(url, **path_format_arguments) + + # Construct parameters + query_parameters = {} # type: Dict[str, Any] + query_parameters['api-version'] = self._serialize.query("api_version", api_version, 'str') + if delete_running_tasks is not None: + query_parameters['deleteRunningTasks'] = self._serialize.query("delete_running_tasks", delete_running_tasks, 'bool') + + # Construct headers + header_parameters = {} # type: Dict[str, Any] + header_parameters['Accept'] = self._serialize.header("accept", accept, 'str') + + request = self._client.delete(url, query_parameters, header_parameters) + pipeline_response = self._client._pipeline.run(request, stream=False, **kwargs) + response = pipeline_response.http_response + + if response.status_code not in [200, 202, 204]: + map_error(status_code=response.status_code, response=response, error_map=error_map) + error = self._deserialize(models.ApiError, response) + raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) + + if cls: + return cls(pipeline_response, None, {}) + + _delete_initial.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{groupName}/providers/Microsoft.DataMigration/services/{serviceName}'} # type: ignore + + def begin_delete( + self, + group_name, # type: str + service_name, # type: str + delete_running_tasks=None, # type: Optional[bool] + **kwargs # type: Any + ): + # type: (...) -> LROPoller[None] + """Delete DMS Service Instance. + + The services resource is the top-level resource that represents the Database Migration Service. + The DELETE method deletes a service. Any running tasks will be canceled. + + :param group_name: Name of the resource group. + :type group_name: str + :param service_name: Name of the service. + :type service_name: str + :param delete_running_tasks: Delete the resource even if it contains running tasks. + :type delete_running_tasks: bool + :keyword callable cls: A custom type or function that will be passed the direct response + :keyword str continuation_token: A continuation token to restart a poller from a saved state. + :keyword polling: True for ARMPolling, False for no polling, or a + polling object for personal polling strategy + :paramtype polling: bool or ~azure.core.polling.PollingMethod + :keyword int polling_interval: Default waiting time between two polls for LRO operations if no Retry-After header is present. + :return: An instance of LROPoller that returns either None or the result of cls(response) + :rtype: ~azure.core.polling.LROPoller[None] + :raises ~azure.core.exceptions.HttpResponseError: + """ + polling = kwargs.pop('polling', True) # type: Union[bool, PollingMethod] + cls = kwargs.pop('cls', None) # type: ClsType[None] + lro_delay = kwargs.pop( + 'polling_interval', + self._config.polling_interval + ) + cont_token = kwargs.pop('continuation_token', None) # type: Optional[str] + if cont_token is None: + raw_result = self._delete_initial( + group_name=group_name, + service_name=service_name, + delete_running_tasks=delete_running_tasks, + cls=lambda x,y,z: x, + **kwargs + ) + + kwargs.pop('error_map', None) + kwargs.pop('content_type', None) + + def get_long_running_output(pipeline_response): + if cls: + return cls(pipeline_response, None, {}) + + path_format_arguments = { + 'subscriptionId': self._serialize.url("self._config.subscription_id", self._config.subscription_id, 'str'), + 'groupName': self._serialize.url("group_name", group_name, 'str'), + 'serviceName': self._serialize.url("service_name", service_name, 'str'), + } + + if polling is True: polling_method = ARMPolling(lro_delay, path_format_arguments=path_format_arguments, **kwargs) + elif polling is False: polling_method = NoPolling() + else: polling_method = polling + if cont_token: + return LROPoller.from_continuation_token( + polling_method=polling_method, + continuation_token=cont_token, + client=self._client, + deserialization_callback=get_long_running_output + ) + else: + return LROPoller(self._client, raw_result, get_long_running_output, polling_method) + begin_delete.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{groupName}/providers/Microsoft.DataMigration/services/{serviceName}'} # type: ignore + + def _update_initial( + self, + group_name, # type: str + service_name, # type: str + parameters, # type: "models.DataMigrationService" + **kwargs # type: Any + ): + # type: (...) -> Optional["models.DataMigrationService"] + cls = kwargs.pop('cls', None) # type: ClsType[Optional["models.DataMigrationService"]] + error_map = { + 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError + } + error_map.update(kwargs.pop('error_map', {})) + api_version = "2021-10-30-preview" + content_type = kwargs.pop("content_type", "application/json") + accept = "application/json" + + # Construct URL + url = self._update_initial.metadata['url'] # type: ignore + path_format_arguments = { + 'subscriptionId': self._serialize.url("self._config.subscription_id", self._config.subscription_id, 'str'), + 'groupName': self._serialize.url("group_name", group_name, 'str'), + 'serviceName': self._serialize.url("service_name", service_name, 'str'), + } + url = self._client.format_url(url, **path_format_arguments) + + # Construct parameters + query_parameters = {} # type: Dict[str, Any] + query_parameters['api-version'] = self._serialize.query("api_version", api_version, 'str') + + # Construct headers + header_parameters = {} # type: Dict[str, Any] + header_parameters['Content-Type'] = self._serialize.header("content_type", content_type, 'str') + header_parameters['Accept'] = self._serialize.header("accept", accept, 'str') + + body_content_kwargs = {} # type: Dict[str, Any] + body_content = self._serialize.body(parameters, 'DataMigrationService') + body_content_kwargs['content'] = body_content + request = self._client.patch(url, query_parameters, header_parameters, **body_content_kwargs) + pipeline_response = self._client._pipeline.run(request, stream=False, **kwargs) + response = pipeline_response.http_response + + if response.status_code not in [200, 202]: + map_error(status_code=response.status_code, response=response, error_map=error_map) + error = self._deserialize(models.ApiError, response) + raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) + + deserialized = None + if response.status_code == 200: + deserialized = self._deserialize('DataMigrationService', pipeline_response) + + if cls: + return cls(pipeline_response, deserialized, {}) + + return deserialized + _update_initial.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{groupName}/providers/Microsoft.DataMigration/services/{serviceName}'} # type: ignore + + def begin_update( + self, + group_name, # type: str + service_name, # type: str + parameters, # type: "models.DataMigrationService" + **kwargs # type: Any + ): + # type: (...) -> LROPoller["models.DataMigrationService"] + """Create or update DMS Service Instance. + + The services resource is the top-level resource that represents the Database Migration Service. + The PATCH method updates an existing service. This method can change the kind, SKU, and network + of the service, but if tasks are currently running (i.e. the service is busy), this will fail + with 400 Bad Request ("ServiceIsBusy"). + + :param group_name: Name of the resource group. + :type group_name: str + :param service_name: Name of the service. + :type service_name: str + :param parameters: Information about the service. + :type parameters: ~azure.mgmt.datamigration.models.DataMigrationService + :keyword callable cls: A custom type or function that will be passed the direct response + :keyword str continuation_token: A continuation token to restart a poller from a saved state. + :keyword polling: True for ARMPolling, False for no polling, or a + polling object for personal polling strategy + :paramtype polling: bool or ~azure.core.polling.PollingMethod + :keyword int polling_interval: Default waiting time between two polls for LRO operations if no Retry-After header is present. + :return: An instance of LROPoller that returns either DataMigrationService or the result of cls(response) + :rtype: ~azure.core.polling.LROPoller[~azure.mgmt.datamigration.models.DataMigrationService] + :raises ~azure.core.exceptions.HttpResponseError: + """ + polling = kwargs.pop('polling', True) # type: Union[bool, PollingMethod] + cls = kwargs.pop('cls', None) # type: ClsType["models.DataMigrationService"] + lro_delay = kwargs.pop( + 'polling_interval', + self._config.polling_interval + ) + cont_token = kwargs.pop('continuation_token', None) # type: Optional[str] + if cont_token is None: + raw_result = self._update_initial( + group_name=group_name, + service_name=service_name, + parameters=parameters, + cls=lambda x,y,z: x, + **kwargs + ) + + kwargs.pop('error_map', None) + kwargs.pop('content_type', None) + + def get_long_running_output(pipeline_response): + deserialized = self._deserialize('DataMigrationService', pipeline_response) + + if cls: + return cls(pipeline_response, deserialized, {}) + return deserialized + + path_format_arguments = { + 'subscriptionId': self._serialize.url("self._config.subscription_id", self._config.subscription_id, 'str'), + 'groupName': self._serialize.url("group_name", group_name, 'str'), + 'serviceName': self._serialize.url("service_name", service_name, 'str'), + } + + if polling is True: polling_method = ARMPolling(lro_delay, path_format_arguments=path_format_arguments, **kwargs) + elif polling is False: polling_method = NoPolling() + else: polling_method = polling + if cont_token: + return LROPoller.from_continuation_token( + polling_method=polling_method, + continuation_token=cont_token, + client=self._client, + deserialization_callback=get_long_running_output + ) + else: + return LROPoller(self._client, raw_result, get_long_running_output, polling_method) + begin_update.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{groupName}/providers/Microsoft.DataMigration/services/{serviceName}'} # type: ignore + + def check_status( + self, + group_name, # type: str + service_name, # type: str + **kwargs # type: Any + ): + # type: (...) -> "models.DataMigrationServiceStatusResponse" + """Check service health status. + + The services resource is the top-level resource that represents the Database Migration Service. + This action performs a health check and returns the status of the service and virtual machine + size. + + :param group_name: Name of the resource group. + :type group_name: str + :param service_name: Name of the service. + :type service_name: str + :keyword callable cls: A custom type or function that will be passed the direct response + :return: DataMigrationServiceStatusResponse, or the result of cls(response) + :rtype: ~azure.mgmt.datamigration.models.DataMigrationServiceStatusResponse + :raises: ~azure.core.exceptions.HttpResponseError + """ + cls = kwargs.pop('cls', None) # type: ClsType["models.DataMigrationServiceStatusResponse"] + error_map = { + 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError + } + error_map.update(kwargs.pop('error_map', {})) + api_version = "2021-10-30-preview" + accept = "application/json" + + # Construct URL + url = self.check_status.metadata['url'] # type: ignore + path_format_arguments = { + 'subscriptionId': self._serialize.url("self._config.subscription_id", self._config.subscription_id, 'str'), + 'groupName': self._serialize.url("group_name", group_name, 'str'), + 'serviceName': self._serialize.url("service_name", service_name, 'str'), + } + url = self._client.format_url(url, **path_format_arguments) + + # Construct parameters + query_parameters = {} # type: Dict[str, Any] + query_parameters['api-version'] = self._serialize.query("api_version", api_version, 'str') + + # Construct headers + header_parameters = {} # type: Dict[str, Any] + header_parameters['Accept'] = self._serialize.header("accept", accept, 'str') + + request = self._client.post(url, query_parameters, header_parameters) + pipeline_response = self._client._pipeline.run(request, stream=False, **kwargs) + response = pipeline_response.http_response + + if response.status_code not in [200]: + map_error(status_code=response.status_code, response=response, error_map=error_map) + error = self._deserialize(models.ApiError, response) + raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) + + deserialized = self._deserialize('DataMigrationServiceStatusResponse', pipeline_response) + + if cls: + return cls(pipeline_response, deserialized, {}) + + return deserialized + check_status.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{groupName}/providers/Microsoft.DataMigration/services/{serviceName}/checkStatus'} # type: ignore + + def _start_initial( + self, + group_name, # type: str + service_name, # type: str + **kwargs # type: Any + ): + # type: (...) -> None + cls = kwargs.pop('cls', None) # type: ClsType[None] + error_map = { + 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError + } + error_map.update(kwargs.pop('error_map', {})) + api_version = "2021-10-30-preview" + accept = "application/json" + + # Construct URL + url = self._start_initial.metadata['url'] # type: ignore + path_format_arguments = { + 'subscriptionId': self._serialize.url("self._config.subscription_id", self._config.subscription_id, 'str'), + 'groupName': self._serialize.url("group_name", group_name, 'str'), + 'serviceName': self._serialize.url("service_name", service_name, 'str'), + } + url = self._client.format_url(url, **path_format_arguments) + + # Construct parameters + query_parameters = {} # type: Dict[str, Any] + query_parameters['api-version'] = self._serialize.query("api_version", api_version, 'str') + + # Construct headers + header_parameters = {} # type: Dict[str, Any] + header_parameters['Accept'] = self._serialize.header("accept", accept, 'str') + + request = self._client.post(url, query_parameters, header_parameters) + pipeline_response = self._client._pipeline.run(request, stream=False, **kwargs) + response = pipeline_response.http_response + + if response.status_code not in [200, 202]: + map_error(status_code=response.status_code, response=response, error_map=error_map) + error = self._deserialize(models.ApiError, response) + raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) + + if cls: + return cls(pipeline_response, None, {}) + + _start_initial.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{groupName}/providers/Microsoft.DataMigration/services/{serviceName}/start'} # type: ignore + + def begin_start( + self, + group_name, # type: str + service_name, # type: str + **kwargs # type: Any + ): + # type: (...) -> LROPoller[None] + """Start service. + + The services resource is the top-level resource that represents the Database Migration Service. + This action starts the service and the service can be used for data migration. + + :param group_name: Name of the resource group. + :type group_name: str + :param service_name: Name of the service. + :type service_name: str + :keyword callable cls: A custom type or function that will be passed the direct response + :keyword str continuation_token: A continuation token to restart a poller from a saved state. + :keyword polling: True for ARMPolling, False for no polling, or a + polling object for personal polling strategy + :paramtype polling: bool or ~azure.core.polling.PollingMethod + :keyword int polling_interval: Default waiting time between two polls for LRO operations if no Retry-After header is present. + :return: An instance of LROPoller that returns either None or the result of cls(response) + :rtype: ~azure.core.polling.LROPoller[None] + :raises ~azure.core.exceptions.HttpResponseError: + """ + polling = kwargs.pop('polling', True) # type: Union[bool, PollingMethod] + cls = kwargs.pop('cls', None) # type: ClsType[None] + lro_delay = kwargs.pop( + 'polling_interval', + self._config.polling_interval + ) + cont_token = kwargs.pop('continuation_token', None) # type: Optional[str] + if cont_token is None: + raw_result = self._start_initial( + group_name=group_name, + service_name=service_name, + cls=lambda x,y,z: x, + **kwargs + ) + + kwargs.pop('error_map', None) + kwargs.pop('content_type', None) + + def get_long_running_output(pipeline_response): + if cls: + return cls(pipeline_response, None, {}) + + path_format_arguments = { + 'subscriptionId': self._serialize.url("self._config.subscription_id", self._config.subscription_id, 'str'), + 'groupName': self._serialize.url("group_name", group_name, 'str'), + 'serviceName': self._serialize.url("service_name", service_name, 'str'), + } + + if polling is True: polling_method = ARMPolling(lro_delay, path_format_arguments=path_format_arguments, **kwargs) + elif polling is False: polling_method = NoPolling() + else: polling_method = polling + if cont_token: + return LROPoller.from_continuation_token( + polling_method=polling_method, + continuation_token=cont_token, + client=self._client, + deserialization_callback=get_long_running_output + ) + else: + return LROPoller(self._client, raw_result, get_long_running_output, polling_method) + begin_start.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{groupName}/providers/Microsoft.DataMigration/services/{serviceName}/start'} # type: ignore + + def _stop_initial( + self, + group_name, # type: str + service_name, # type: str + **kwargs # type: Any + ): + # type: (...) -> None + cls = kwargs.pop('cls', None) # type: ClsType[None] + error_map = { + 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError + } + error_map.update(kwargs.pop('error_map', {})) + api_version = "2021-10-30-preview" + accept = "application/json" + + # Construct URL + url = self._stop_initial.metadata['url'] # type: ignore + path_format_arguments = { + 'subscriptionId': self._serialize.url("self._config.subscription_id", self._config.subscription_id, 'str'), + 'groupName': self._serialize.url("group_name", group_name, 'str'), + 'serviceName': self._serialize.url("service_name", service_name, 'str'), + } + url = self._client.format_url(url, **path_format_arguments) + + # Construct parameters + query_parameters = {} # type: Dict[str, Any] + query_parameters['api-version'] = self._serialize.query("api_version", api_version, 'str') + + # Construct headers + header_parameters = {} # type: Dict[str, Any] + header_parameters['Accept'] = self._serialize.header("accept", accept, 'str') + + request = self._client.post(url, query_parameters, header_parameters) + pipeline_response = self._client._pipeline.run(request, stream=False, **kwargs) + response = pipeline_response.http_response + + if response.status_code not in [200, 202]: + map_error(status_code=response.status_code, response=response, error_map=error_map) + error = self._deserialize(models.ApiError, response) + raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) + + if cls: + return cls(pipeline_response, None, {}) + + _stop_initial.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{groupName}/providers/Microsoft.DataMigration/services/{serviceName}/stop'} # type: ignore + + def begin_stop( + self, + group_name, # type: str + service_name, # type: str + **kwargs # type: Any + ): + # type: (...) -> LROPoller[None] + """Stop service. + + The services resource is the top-level resource that represents the Database Migration Service. + This action stops the service and the service cannot be used for data migration. The service + owner won't be billed when the service is stopped. + + :param group_name: Name of the resource group. + :type group_name: str + :param service_name: Name of the service. + :type service_name: str + :keyword callable cls: A custom type or function that will be passed the direct response + :keyword str continuation_token: A continuation token to restart a poller from a saved state. + :keyword polling: True for ARMPolling, False for no polling, or a + polling object for personal polling strategy + :paramtype polling: bool or ~azure.core.polling.PollingMethod + :keyword int polling_interval: Default waiting time between two polls for LRO operations if no Retry-After header is present. + :return: An instance of LROPoller that returns either None or the result of cls(response) + :rtype: ~azure.core.polling.LROPoller[None] + :raises ~azure.core.exceptions.HttpResponseError: + """ + polling = kwargs.pop('polling', True) # type: Union[bool, PollingMethod] + cls = kwargs.pop('cls', None) # type: ClsType[None] + lro_delay = kwargs.pop( + 'polling_interval', + self._config.polling_interval + ) + cont_token = kwargs.pop('continuation_token', None) # type: Optional[str] + if cont_token is None: + raw_result = self._stop_initial( + group_name=group_name, + service_name=service_name, + cls=lambda x,y,z: x, + **kwargs + ) + + kwargs.pop('error_map', None) + kwargs.pop('content_type', None) + + def get_long_running_output(pipeline_response): + if cls: + return cls(pipeline_response, None, {}) + + path_format_arguments = { + 'subscriptionId': self._serialize.url("self._config.subscription_id", self._config.subscription_id, 'str'), + 'groupName': self._serialize.url("group_name", group_name, 'str'), + 'serviceName': self._serialize.url("service_name", service_name, 'str'), + } + + if polling is True: polling_method = ARMPolling(lro_delay, path_format_arguments=path_format_arguments, **kwargs) + elif polling is False: polling_method = NoPolling() + else: polling_method = polling + if cont_token: + return LROPoller.from_continuation_token( + polling_method=polling_method, + continuation_token=cont_token, + client=self._client, + deserialization_callback=get_long_running_output + ) + else: + return LROPoller(self._client, raw_result, get_long_running_output, polling_method) + begin_stop.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{groupName}/providers/Microsoft.DataMigration/services/{serviceName}/stop'} # type: ignore + + def list_skus( + self, + group_name, # type: str + service_name, # type: str + **kwargs # type: Any + ): + # type: (...) -> Iterable["models.ServiceSkuList"] + """Get compatible SKUs. + + The services resource is the top-level resource that represents the Database Migration Service. + The skus action returns the list of SKUs that a service resource can be updated to. + + :param group_name: Name of the resource group. + :type group_name: str + :param service_name: Name of the service. + :type service_name: str + :keyword callable cls: A custom type or function that will be passed the direct response + :return: An iterator like instance of either ServiceSkuList or the result of cls(response) + :rtype: ~azure.core.paging.ItemPaged[~azure.mgmt.datamigration.models.ServiceSkuList] + :raises: ~azure.core.exceptions.HttpResponseError + """ + cls = kwargs.pop('cls', None) # type: ClsType["models.ServiceSkuList"] + error_map = { + 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError + } + error_map.update(kwargs.pop('error_map', {})) + api_version = "2021-10-30-preview" + accept = "application/json" + + def prepare_request(next_link=None): + # Construct headers + header_parameters = {} # type: Dict[str, Any] + header_parameters['Accept'] = self._serialize.header("accept", accept, 'str') + + if not next_link: + # Construct URL + url = self.list_skus.metadata['url'] # type: ignore + path_format_arguments = { + 'subscriptionId': self._serialize.url("self._config.subscription_id", self._config.subscription_id, 'str'), + 'groupName': self._serialize.url("group_name", group_name, 'str'), + 'serviceName': self._serialize.url("service_name", service_name, 'str'), + } + url = self._client.format_url(url, **path_format_arguments) + # Construct parameters + query_parameters = {} # type: Dict[str, Any] + query_parameters['api-version'] = self._serialize.query("api_version", api_version, 'str') + + request = self._client.get(url, query_parameters, header_parameters) + else: + url = next_link + query_parameters = {} # type: Dict[str, Any] + request = self._client.get(url, query_parameters, header_parameters) + return request + + def extract_data(pipeline_response): + deserialized = self._deserialize('ServiceSkuList', pipeline_response) + list_of_elem = deserialized.value + if cls: + list_of_elem = cls(list_of_elem) + return deserialized.next_link or None, iter(list_of_elem) + + def get_next(next_link=None): + request = prepare_request(next_link) + + pipeline_response = self._client._pipeline.run(request, stream=False, **kwargs) + response = pipeline_response.http_response + + if response.status_code not in [200]: + error = self._deserialize(models.ApiError, response) + map_error(status_code=response.status_code, response=response, error_map=error_map) + raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) + + return pipeline_response + + return ItemPaged( + get_next, extract_data + ) + list_skus.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{groupName}/providers/Microsoft.DataMigration/services/{serviceName}/skus'} # type: ignore + + def check_children_name_availability( + self, + group_name, # type: str + service_name, # type: str + parameters, # type: "models.NameAvailabilityRequest" + **kwargs # type: Any + ): + # type: (...) -> "models.NameAvailabilityResponse" + """Check nested resource name validity and availability. + + This method checks whether a proposed nested resource name is valid and available. + + :param group_name: Name of the resource group. + :type group_name: str + :param service_name: Name of the service. + :type service_name: str + :param parameters: Requested name to validate. + :type parameters: ~azure.mgmt.datamigration.models.NameAvailabilityRequest + :keyword callable cls: A custom type or function that will be passed the direct response + :return: NameAvailabilityResponse, or the result of cls(response) + :rtype: ~azure.mgmt.datamigration.models.NameAvailabilityResponse + :raises: ~azure.core.exceptions.HttpResponseError + """ + cls = kwargs.pop('cls', None) # type: ClsType["models.NameAvailabilityResponse"] + error_map = { + 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError + } + error_map.update(kwargs.pop('error_map', {})) + api_version = "2021-10-30-preview" + content_type = kwargs.pop("content_type", "application/json") + accept = "application/json" + + # Construct URL + url = self.check_children_name_availability.metadata['url'] # type: ignore + path_format_arguments = { + 'subscriptionId': self._serialize.url("self._config.subscription_id", self._config.subscription_id, 'str'), + 'groupName': self._serialize.url("group_name", group_name, 'str'), + 'serviceName': self._serialize.url("service_name", service_name, 'str'), + } + url = self._client.format_url(url, **path_format_arguments) + + # Construct parameters + query_parameters = {} # type: Dict[str, Any] + query_parameters['api-version'] = self._serialize.query("api_version", api_version, 'str') + + # Construct headers + header_parameters = {} # type: Dict[str, Any] + header_parameters['Content-Type'] = self._serialize.header("content_type", content_type, 'str') + header_parameters['Accept'] = self._serialize.header("accept", accept, 'str') + + body_content_kwargs = {} # type: Dict[str, Any] + body_content = self._serialize.body(parameters, 'NameAvailabilityRequest') + body_content_kwargs['content'] = body_content + request = self._client.post(url, query_parameters, header_parameters, **body_content_kwargs) + pipeline_response = self._client._pipeline.run(request, stream=False, **kwargs) + response = pipeline_response.http_response + + if response.status_code not in [200]: + map_error(status_code=response.status_code, response=response, error_map=error_map) + error = self._deserialize(models.ApiError, response) + raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) + + deserialized = self._deserialize('NameAvailabilityResponse', pipeline_response) + + if cls: + return cls(pipeline_response, deserialized, {}) + + return deserialized + check_children_name_availability.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{groupName}/providers/Microsoft.DataMigration/services/{serviceName}/checkNameAvailability'} # type: ignore + + def list_by_resource_group( + self, + group_name, # type: str + **kwargs # type: Any + ): + # type: (...) -> Iterable["models.DataMigrationServiceList"] + """Get services in resource group. + + The Services resource is the top-level resource that represents the Database Migration Service. + This method returns a list of service resources in a resource group. + + :param group_name: Name of the resource group. + :type group_name: str + :keyword callable cls: A custom type or function that will be passed the direct response + :return: An iterator like instance of either DataMigrationServiceList or the result of cls(response) + :rtype: ~azure.core.paging.ItemPaged[~azure.mgmt.datamigration.models.DataMigrationServiceList] + :raises: ~azure.core.exceptions.HttpResponseError + """ + cls = kwargs.pop('cls', None) # type: ClsType["models.DataMigrationServiceList"] + error_map = { + 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError + } + error_map.update(kwargs.pop('error_map', {})) + api_version = "2021-10-30-preview" + accept = "application/json" + + def prepare_request(next_link=None): + # Construct headers + header_parameters = {} # type: Dict[str, Any] + header_parameters['Accept'] = self._serialize.header("accept", accept, 'str') + + if not next_link: + # Construct URL + url = self.list_by_resource_group.metadata['url'] # type: ignore + path_format_arguments = { + 'subscriptionId': self._serialize.url("self._config.subscription_id", self._config.subscription_id, 'str'), + 'groupName': self._serialize.url("group_name", group_name, 'str'), + } + url = self._client.format_url(url, **path_format_arguments) + # Construct parameters + query_parameters = {} # type: Dict[str, Any] + query_parameters['api-version'] = self._serialize.query("api_version", api_version, 'str') + + request = self._client.get(url, query_parameters, header_parameters) + else: + url = next_link + query_parameters = {} # type: Dict[str, Any] + request = self._client.get(url, query_parameters, header_parameters) + return request + + def extract_data(pipeline_response): + deserialized = self._deserialize('DataMigrationServiceList', pipeline_response) + list_of_elem = deserialized.value + if cls: + list_of_elem = cls(list_of_elem) + return deserialized.next_link or None, iter(list_of_elem) + + def get_next(next_link=None): + request = prepare_request(next_link) + + pipeline_response = self._client._pipeline.run(request, stream=False, **kwargs) + response = pipeline_response.http_response + + if response.status_code not in [200]: + error = self._deserialize(models.ApiError, response) + map_error(status_code=response.status_code, response=response, error_map=error_map) + raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) + + return pipeline_response + + return ItemPaged( + get_next, extract_data + ) + list_by_resource_group.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{groupName}/providers/Microsoft.DataMigration/services'} # type: ignore + + def list( + self, + **kwargs # type: Any + ): + # type: (...) -> Iterable["models.DataMigrationServiceList"] + """Get services in subscription. + + The services resource is the top-level resource that represents the Database Migration Service. + This method returns a list of service resources in a subscription. + + :keyword callable cls: A custom type or function that will be passed the direct response + :return: An iterator like instance of either DataMigrationServiceList or the result of cls(response) + :rtype: ~azure.core.paging.ItemPaged[~azure.mgmt.datamigration.models.DataMigrationServiceList] + :raises: ~azure.core.exceptions.HttpResponseError + """ + cls = kwargs.pop('cls', None) # type: ClsType["models.DataMigrationServiceList"] + error_map = { + 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError + } + error_map.update(kwargs.pop('error_map', {})) + api_version = "2021-10-30-preview" + accept = "application/json" + + def prepare_request(next_link=None): + # Construct headers + header_parameters = {} # type: Dict[str, Any] + header_parameters['Accept'] = self._serialize.header("accept", accept, 'str') + + if not next_link: + # Construct URL + url = self.list.metadata['url'] # type: ignore + path_format_arguments = { + 'subscriptionId': self._serialize.url("self._config.subscription_id", self._config.subscription_id, 'str'), + } + url = self._client.format_url(url, **path_format_arguments) + # Construct parameters + query_parameters = {} # type: Dict[str, Any] + query_parameters['api-version'] = self._serialize.query("api_version", api_version, 'str') + + request = self._client.get(url, query_parameters, header_parameters) + else: + url = next_link + query_parameters = {} # type: Dict[str, Any] + request = self._client.get(url, query_parameters, header_parameters) + return request + + def extract_data(pipeline_response): + deserialized = self._deserialize('DataMigrationServiceList', pipeline_response) + list_of_elem = deserialized.value + if cls: + list_of_elem = cls(list_of_elem) + return deserialized.next_link or None, iter(list_of_elem) + + def get_next(next_link=None): + request = prepare_request(next_link) + + pipeline_response = self._client._pipeline.run(request, stream=False, **kwargs) + response = pipeline_response.http_response + + if response.status_code not in [200]: + error = self._deserialize(models.ApiError, response) + map_error(status_code=response.status_code, response=response, error_map=error_map) + raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) + + return pipeline_response + + return ItemPaged( + get_next, extract_data + ) + list.metadata = {'url': '/subscriptions/{subscriptionId}/providers/Microsoft.DataMigration/services'} # type: ignore + + def check_name_availability( + self, + location, # type: str + parameters, # type: "models.NameAvailabilityRequest" + **kwargs # type: Any + ): + # type: (...) -> "models.NameAvailabilityResponse" + """Check name validity and availability. + + This method checks whether a proposed top-level resource name is valid and available. + + :param location: The Azure region of the operation. + :type location: str + :param parameters: Requested name to validate. + :type parameters: ~azure.mgmt.datamigration.models.NameAvailabilityRequest + :keyword callable cls: A custom type or function that will be passed the direct response + :return: NameAvailabilityResponse, or the result of cls(response) + :rtype: ~azure.mgmt.datamigration.models.NameAvailabilityResponse + :raises: ~azure.core.exceptions.HttpResponseError + """ + cls = kwargs.pop('cls', None) # type: ClsType["models.NameAvailabilityResponse"] + error_map = { + 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError + } + error_map.update(kwargs.pop('error_map', {})) + api_version = "2021-10-30-preview" + content_type = kwargs.pop("content_type", "application/json") + accept = "application/json" + + # Construct URL + url = self.check_name_availability.metadata['url'] # type: ignore + path_format_arguments = { + 'subscriptionId': self._serialize.url("self._config.subscription_id", self._config.subscription_id, 'str'), + 'location': self._serialize.url("location", location, 'str'), + } + url = self._client.format_url(url, **path_format_arguments) + + # Construct parameters + query_parameters = {} # type: Dict[str, Any] + query_parameters['api-version'] = self._serialize.query("api_version", api_version, 'str') + + # Construct headers + header_parameters = {} # type: Dict[str, Any] + header_parameters['Content-Type'] = self._serialize.header("content_type", content_type, 'str') + header_parameters['Accept'] = self._serialize.header("accept", accept, 'str') + + body_content_kwargs = {} # type: Dict[str, Any] + body_content = self._serialize.body(parameters, 'NameAvailabilityRequest') + body_content_kwargs['content'] = body_content + request = self._client.post(url, query_parameters, header_parameters, **body_content_kwargs) + pipeline_response = self._client._pipeline.run(request, stream=False, **kwargs) + response = pipeline_response.http_response + + if response.status_code not in [200]: + map_error(status_code=response.status_code, response=response, error_map=error_map) + error = self._deserialize(models.ApiError, response) + raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) + + deserialized = self._deserialize('NameAvailabilityResponse', pipeline_response) + + if cls: + return cls(pipeline_response, deserialized, {}) + + return deserialized + check_name_availability.metadata = {'url': '/subscriptions/{subscriptionId}/providers/Microsoft.DataMigration/locations/{location}/checkNameAvailability'} # type: ignore diff --git a/src/datamigration/azext_datamigration/vendored_sdks/datamigration/operations/_sql_migration_services_operations.py b/src/datamigration/azext_datamigration/vendored_sdks/datamigration/operations/_sql_migration_services_operations.py new file mode 100644 index 00000000000..bb80692b83a --- /dev/null +++ b/src/datamigration/azext_datamigration/vendored_sdks/datamigration/operations/_sql_migration_services_operations.py @@ -0,0 +1,950 @@ +# coding=utf-8 +# -------------------------------------------------------------------------- +# Copyright (c) Microsoft Corporation. All rights reserved. +# Licensed under the MIT License. See License.txt in the project root for license information. +# Code generated by Microsoft (R) AutoRest Code Generator. +# Changes may cause incorrect behavior and will be lost if the code is regenerated. +# -------------------------------------------------------------------------- +from typing import TYPE_CHECKING +import warnings + +from azure.core.exceptions import ClientAuthenticationError, HttpResponseError, ResourceExistsError, ResourceNotFoundError, map_error +from azure.core.paging import ItemPaged +from azure.core.pipeline import PipelineResponse +from azure.core.pipeline.transport import HttpRequest, HttpResponse +from azure.core.polling import LROPoller, NoPolling, PollingMethod +from azure.mgmt.core.exceptions import ARMErrorFormat +from azure.mgmt.core.polling.arm_polling import ARMPolling + +from .. import models + +if TYPE_CHECKING: + # pylint: disable=unused-import,ungrouped-imports + from typing import Any, Callable, Dict, Generic, Iterable, Optional, TypeVar, Union + + T = TypeVar('T') + ClsType = Optional[Callable[[PipelineResponse[HttpRequest, HttpResponse], T, Dict[str, Any]], Any]] + +class SqlMigrationServicesOperations(object): + """SqlMigrationServicesOperations operations. + + You should not instantiate this class directly. Instead, you should create a Client instance that + instantiates it for you and attaches it as an attribute. + + :ivar models: Alias to model classes used in this operation group. + :type models: ~azure.mgmt.datamigration.models + :param client: Client for service requests. + :param config: Configuration of service client. + :param serializer: An object model serializer. + :param deserializer: An object model deserializer. + """ + + models = models + + def __init__(self, client, config, serializer, deserializer): + self._client = client + self._serialize = serializer + self._deserialize = deserializer + self._config = config + + def get( + self, + resource_group_name, # type: str + sql_migration_service_name, # type: str + **kwargs # type: Any + ): + # type: (...) -> "models.SqlMigrationService" + """Retrieve the Migration Service. + + :param resource_group_name: Name of the resource group that contains the resource. You can + obtain this value from the Azure Resource Manager API or the portal. + :type resource_group_name: str + :param sql_migration_service_name: Name of the SQL Migration Service. + :type sql_migration_service_name: str + :keyword callable cls: A custom type or function that will be passed the direct response + :return: SqlMigrationService, or the result of cls(response) + :rtype: ~azure.mgmt.datamigration.models.SqlMigrationService + :raises: ~azure.core.exceptions.HttpResponseError + """ + cls = kwargs.pop('cls', None) # type: ClsType["models.SqlMigrationService"] + error_map = { + 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError + } + error_map.update(kwargs.pop('error_map', {})) + api_version = "2021-10-30-preview" + accept = "application/json" + + # Construct URL + url = self.get.metadata['url'] # type: ignore + path_format_arguments = { + 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str'), + 'sqlMigrationServiceName': self._serialize.url("sql_migration_service_name", sql_migration_service_name, 'str'), + 'subscriptionId': self._serialize.url("self._config.subscription_id", self._config.subscription_id, 'str'), + } + url = self._client.format_url(url, **path_format_arguments) + + # Construct parameters + query_parameters = {} # type: Dict[str, Any] + query_parameters['api-version'] = self._serialize.query("api_version", api_version, 'str') + + # Construct headers + header_parameters = {} # type: Dict[str, Any] + header_parameters['Accept'] = self._serialize.header("accept", accept, 'str') + + request = self._client.get(url, query_parameters, header_parameters) + pipeline_response = self._client._pipeline.run(request, stream=False, **kwargs) + response = pipeline_response.http_response + + if response.status_code not in [200]: + map_error(status_code=response.status_code, response=response, error_map=error_map) + raise HttpResponseError(response=response, error_format=ARMErrorFormat) + + deserialized = self._deserialize('SqlMigrationService', pipeline_response) + + if cls: + return cls(pipeline_response, deserialized, {}) + + return deserialized + get.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.DataMigration/sqlMigrationServices/{sqlMigrationServiceName}'} # type: ignore + + def _create_or_update_initial( + self, + resource_group_name, # type: str + sql_migration_service_name, # type: str + parameters, # type: "models.SqlMigrationService" + **kwargs # type: Any + ): + # type: (...) -> "models.SqlMigrationService" + cls = kwargs.pop('cls', None) # type: ClsType["models.SqlMigrationService"] + error_map = { + 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError + } + error_map.update(kwargs.pop('error_map', {})) + api_version = "2021-10-30-preview" + content_type = kwargs.pop("content_type", "application/json") + accept = "application/json" + + # Construct URL + url = self._create_or_update_initial.metadata['url'] # type: ignore + path_format_arguments = { + 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str'), + 'sqlMigrationServiceName': self._serialize.url("sql_migration_service_name", sql_migration_service_name, 'str'), + 'subscriptionId': self._serialize.url("self._config.subscription_id", self._config.subscription_id, 'str'), + } + url = self._client.format_url(url, **path_format_arguments) + + # Construct parameters + query_parameters = {} # type: Dict[str, Any] + query_parameters['api-version'] = self._serialize.query("api_version", api_version, 'str') + + # Construct headers + header_parameters = {} # type: Dict[str, Any] + header_parameters['Content-Type'] = self._serialize.header("content_type", content_type, 'str') + header_parameters['Accept'] = self._serialize.header("accept", accept, 'str') + + body_content_kwargs = {} # type: Dict[str, Any] + body_content = self._serialize.body(parameters, 'SqlMigrationService') + body_content_kwargs['content'] = body_content + request = self._client.put(url, query_parameters, header_parameters, **body_content_kwargs) + pipeline_response = self._client._pipeline.run(request, stream=False, **kwargs) + response = pipeline_response.http_response + + if response.status_code not in [200, 201]: + map_error(status_code=response.status_code, response=response, error_map=error_map) + raise HttpResponseError(response=response, error_format=ARMErrorFormat) + + if response.status_code == 200: + deserialized = self._deserialize('SqlMigrationService', pipeline_response) + + if response.status_code == 201: + deserialized = self._deserialize('SqlMigrationService', pipeline_response) + + if cls: + return cls(pipeline_response, deserialized, {}) + + return deserialized + _create_or_update_initial.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.DataMigration/sqlMigrationServices/{sqlMigrationServiceName}'} # type: ignore + + def begin_create_or_update( + self, + resource_group_name, # type: str + sql_migration_service_name, # type: str + parameters, # type: "models.SqlMigrationService" + **kwargs # type: Any + ): + # type: (...) -> LROPoller["models.SqlMigrationService"] + """Create or Update Database Migration Service. + + :param resource_group_name: Name of the resource group that contains the resource. You can + obtain this value from the Azure Resource Manager API or the portal. + :type resource_group_name: str + :param sql_migration_service_name: Name of the SQL Migration Service. + :type sql_migration_service_name: str + :param parameters: Details of SqlMigrationService resource. + :type parameters: ~azure.mgmt.datamigration.models.SqlMigrationService + :keyword callable cls: A custom type or function that will be passed the direct response + :keyword str continuation_token: A continuation token to restart a poller from a saved state. + :keyword polling: True for ARMPolling, False for no polling, or a + polling object for personal polling strategy + :paramtype polling: bool or ~azure.core.polling.PollingMethod + :keyword int polling_interval: Default waiting time between two polls for LRO operations if no Retry-After header is present. + :return: An instance of LROPoller that returns either SqlMigrationService or the result of cls(response) + :rtype: ~azure.core.polling.LROPoller[~azure.mgmt.datamigration.models.SqlMigrationService] + :raises ~azure.core.exceptions.HttpResponseError: + """ + polling = kwargs.pop('polling', True) # type: Union[bool, PollingMethod] + cls = kwargs.pop('cls', None) # type: ClsType["models.SqlMigrationService"] + lro_delay = kwargs.pop( + 'polling_interval', + self._config.polling_interval + ) + cont_token = kwargs.pop('continuation_token', None) # type: Optional[str] + if cont_token is None: + raw_result = self._create_or_update_initial( + resource_group_name=resource_group_name, + sql_migration_service_name=sql_migration_service_name, + parameters=parameters, + cls=lambda x,y,z: x, + **kwargs + ) + + kwargs.pop('error_map', None) + kwargs.pop('content_type', None) + + def get_long_running_output(pipeline_response): + deserialized = self._deserialize('SqlMigrationService', pipeline_response) + + if cls: + return cls(pipeline_response, deserialized, {}) + return deserialized + + path_format_arguments = { + 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str'), + 'sqlMigrationServiceName': self._serialize.url("sql_migration_service_name", sql_migration_service_name, 'str'), + 'subscriptionId': self._serialize.url("self._config.subscription_id", self._config.subscription_id, 'str'), + } + + if polling is True: polling_method = ARMPolling(lro_delay, path_format_arguments=path_format_arguments, **kwargs) + elif polling is False: polling_method = NoPolling() + else: polling_method = polling + if cont_token: + return LROPoller.from_continuation_token( + polling_method=polling_method, + continuation_token=cont_token, + client=self._client, + deserialization_callback=get_long_running_output + ) + else: + return LROPoller(self._client, raw_result, get_long_running_output, polling_method) + begin_create_or_update.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.DataMigration/sqlMigrationServices/{sqlMigrationServiceName}'} # type: ignore + + def _delete_initial( + self, + resource_group_name, # type: str + sql_migration_service_name, # type: str + **kwargs # type: Any + ): + # type: (...) -> None + cls = kwargs.pop('cls', None) # type: ClsType[None] + error_map = { + 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError + } + error_map.update(kwargs.pop('error_map', {})) + api_version = "2021-10-30-preview" + + # Construct URL + url = self._delete_initial.metadata['url'] # type: ignore + path_format_arguments = { + 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str'), + 'sqlMigrationServiceName': self._serialize.url("sql_migration_service_name", sql_migration_service_name, 'str'), + 'subscriptionId': self._serialize.url("self._config.subscription_id", self._config.subscription_id, 'str'), + } + url = self._client.format_url(url, **path_format_arguments) + + # Construct parameters + query_parameters = {} # type: Dict[str, Any] + query_parameters['api-version'] = self._serialize.query("api_version", api_version, 'str') + + # Construct headers + header_parameters = {} # type: Dict[str, Any] + + request = self._client.delete(url, query_parameters, header_parameters) + pipeline_response = self._client._pipeline.run(request, stream=False, **kwargs) + response = pipeline_response.http_response + + if response.status_code not in [200, 202, 204]: + map_error(status_code=response.status_code, response=response, error_map=error_map) + raise HttpResponseError(response=response, error_format=ARMErrorFormat) + + if cls: + return cls(pipeline_response, None, {}) + + _delete_initial.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.DataMigration/sqlMigrationServices/{sqlMigrationServiceName}'} # type: ignore + + def begin_delete( + self, + resource_group_name, # type: str + sql_migration_service_name, # type: str + **kwargs # type: Any + ): + # type: (...) -> LROPoller[None] + """Delete SQL Migration Service. + + :param resource_group_name: Name of the resource group that contains the resource. You can + obtain this value from the Azure Resource Manager API or the portal. + :type resource_group_name: str + :param sql_migration_service_name: Name of the SQL Migration Service. + :type sql_migration_service_name: str + :keyword callable cls: A custom type or function that will be passed the direct response + :keyword str continuation_token: A continuation token to restart a poller from a saved state. + :keyword polling: True for ARMPolling, False for no polling, or a + polling object for personal polling strategy + :paramtype polling: bool or ~azure.core.polling.PollingMethod + :keyword int polling_interval: Default waiting time between two polls for LRO operations if no Retry-After header is present. + :return: An instance of LROPoller that returns either None or the result of cls(response) + :rtype: ~azure.core.polling.LROPoller[None] + :raises ~azure.core.exceptions.HttpResponseError: + """ + polling = kwargs.pop('polling', True) # type: Union[bool, PollingMethod] + cls = kwargs.pop('cls', None) # type: ClsType[None] + lro_delay = kwargs.pop( + 'polling_interval', + self._config.polling_interval + ) + cont_token = kwargs.pop('continuation_token', None) # type: Optional[str] + if cont_token is None: + raw_result = self._delete_initial( + resource_group_name=resource_group_name, + sql_migration_service_name=sql_migration_service_name, + cls=lambda x,y,z: x, + **kwargs + ) + + kwargs.pop('error_map', None) + kwargs.pop('content_type', None) + + def get_long_running_output(pipeline_response): + if cls: + return cls(pipeline_response, None, {}) + + path_format_arguments = { + 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str'), + 'sqlMigrationServiceName': self._serialize.url("sql_migration_service_name", sql_migration_service_name, 'str'), + 'subscriptionId': self._serialize.url("self._config.subscription_id", self._config.subscription_id, 'str'), + } + + if polling is True: polling_method = ARMPolling(lro_delay, path_format_arguments=path_format_arguments, **kwargs) + elif polling is False: polling_method = NoPolling() + else: polling_method = polling + if cont_token: + return LROPoller.from_continuation_token( + polling_method=polling_method, + continuation_token=cont_token, + client=self._client, + deserialization_callback=get_long_running_output + ) + else: + return LROPoller(self._client, raw_result, get_long_running_output, polling_method) + begin_delete.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.DataMigration/sqlMigrationServices/{sqlMigrationServiceName}'} # type: ignore + + def _update_initial( + self, + resource_group_name, # type: str + sql_migration_service_name, # type: str + parameters, # type: "models.SqlMigrationServiceUpdate" + **kwargs # type: Any + ): + # type: (...) -> "models.SqlMigrationService" + cls = kwargs.pop('cls', None) # type: ClsType["models.SqlMigrationService"] + error_map = { + 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError + } + error_map.update(kwargs.pop('error_map', {})) + api_version = "2021-10-30-preview" + content_type = kwargs.pop("content_type", "application/json") + accept = "application/json" + + # Construct URL + url = self._update_initial.metadata['url'] # type: ignore + path_format_arguments = { + 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str'), + 'sqlMigrationServiceName': self._serialize.url("sql_migration_service_name", sql_migration_service_name, 'str'), + 'subscriptionId': self._serialize.url("self._config.subscription_id", self._config.subscription_id, 'str'), + } + url = self._client.format_url(url, **path_format_arguments) + + # Construct parameters + query_parameters = {} # type: Dict[str, Any] + query_parameters['api-version'] = self._serialize.query("api_version", api_version, 'str') + + # Construct headers + header_parameters = {} # type: Dict[str, Any] + header_parameters['Content-Type'] = self._serialize.header("content_type", content_type, 'str') + header_parameters['Accept'] = self._serialize.header("accept", accept, 'str') + + body_content_kwargs = {} # type: Dict[str, Any] + body_content = self._serialize.body(parameters, 'SqlMigrationServiceUpdate') + body_content_kwargs['content'] = body_content + request = self._client.patch(url, query_parameters, header_parameters, **body_content_kwargs) + pipeline_response = self._client._pipeline.run(request, stream=False, **kwargs) + response = pipeline_response.http_response + + if response.status_code not in [200, 201]: + map_error(status_code=response.status_code, response=response, error_map=error_map) + raise HttpResponseError(response=response, error_format=ARMErrorFormat) + + if response.status_code == 200: + deserialized = self._deserialize('SqlMigrationService', pipeline_response) + + if response.status_code == 201: + deserialized = self._deserialize('SqlMigrationService', pipeline_response) + + if cls: + return cls(pipeline_response, deserialized, {}) + + return deserialized + _update_initial.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.DataMigration/sqlMigrationServices/{sqlMigrationServiceName}'} # type: ignore + + def begin_update( + self, + resource_group_name, # type: str + sql_migration_service_name, # type: str + parameters, # type: "models.SqlMigrationServiceUpdate" + **kwargs # type: Any + ): + # type: (...) -> LROPoller["models.SqlMigrationService"] + """Update SQL Migration Service. + + :param resource_group_name: Name of the resource group that contains the resource. You can + obtain this value from the Azure Resource Manager API or the portal. + :type resource_group_name: str + :param sql_migration_service_name: Name of the SQL Migration Service. + :type sql_migration_service_name: str + :param parameters: Details of SqlMigrationService resource. + :type parameters: ~azure.mgmt.datamigration.models.SqlMigrationServiceUpdate + :keyword callable cls: A custom type or function that will be passed the direct response + :keyword str continuation_token: A continuation token to restart a poller from a saved state. + :keyword polling: True for ARMPolling, False for no polling, or a + polling object for personal polling strategy + :paramtype polling: bool or ~azure.core.polling.PollingMethod + :keyword int polling_interval: Default waiting time between two polls for LRO operations if no Retry-After header is present. + :return: An instance of LROPoller that returns either SqlMigrationService or the result of cls(response) + :rtype: ~azure.core.polling.LROPoller[~azure.mgmt.datamigration.models.SqlMigrationService] + :raises ~azure.core.exceptions.HttpResponseError: + """ + polling = kwargs.pop('polling', True) # type: Union[bool, PollingMethod] + cls = kwargs.pop('cls', None) # type: ClsType["models.SqlMigrationService"] + lro_delay = kwargs.pop( + 'polling_interval', + self._config.polling_interval + ) + cont_token = kwargs.pop('continuation_token', None) # type: Optional[str] + if cont_token is None: + raw_result = self._update_initial( + resource_group_name=resource_group_name, + sql_migration_service_name=sql_migration_service_name, + parameters=parameters, + cls=lambda x,y,z: x, + **kwargs + ) + + kwargs.pop('error_map', None) + kwargs.pop('content_type', None) + + def get_long_running_output(pipeline_response): + deserialized = self._deserialize('SqlMigrationService', pipeline_response) + + if cls: + return cls(pipeline_response, deserialized, {}) + return deserialized + + path_format_arguments = { + 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str'), + 'sqlMigrationServiceName': self._serialize.url("sql_migration_service_name", sql_migration_service_name, 'str'), + 'subscriptionId': self._serialize.url("self._config.subscription_id", self._config.subscription_id, 'str'), + } + + if polling is True: polling_method = ARMPolling(lro_delay, path_format_arguments=path_format_arguments, **kwargs) + elif polling is False: polling_method = NoPolling() + else: polling_method = polling + if cont_token: + return LROPoller.from_continuation_token( + polling_method=polling_method, + continuation_token=cont_token, + client=self._client, + deserialization_callback=get_long_running_output + ) + else: + return LROPoller(self._client, raw_result, get_long_running_output, polling_method) + begin_update.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.DataMigration/sqlMigrationServices/{sqlMigrationServiceName}'} # type: ignore + + def list_by_resource_group( + self, + resource_group_name, # type: str + **kwargs # type: Any + ): + # type: (...) -> Iterable["models.SqlMigrationListResult"] + """Retrieve all SQL migration services in the resource group. + + :param resource_group_name: Name of the resource group that contains the resource. You can + obtain this value from the Azure Resource Manager API or the portal. + :type resource_group_name: str + :keyword callable cls: A custom type or function that will be passed the direct response + :return: An iterator like instance of either SqlMigrationListResult or the result of cls(response) + :rtype: ~azure.core.paging.ItemPaged[~azure.mgmt.datamigration.models.SqlMigrationListResult] + :raises: ~azure.core.exceptions.HttpResponseError + """ + cls = kwargs.pop('cls', None) # type: ClsType["models.SqlMigrationListResult"] + error_map = { + 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError + } + error_map.update(kwargs.pop('error_map', {})) + api_version = "2021-10-30-preview" + accept = "application/json" + + def prepare_request(next_link=None): + # Construct headers + header_parameters = {} # type: Dict[str, Any] + header_parameters['Accept'] = self._serialize.header("accept", accept, 'str') + + if not next_link: + # Construct URL + url = self.list_by_resource_group.metadata['url'] # type: ignore + path_format_arguments = { + 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str'), + 'subscriptionId': self._serialize.url("self._config.subscription_id", self._config.subscription_id, 'str'), + } + url = self._client.format_url(url, **path_format_arguments) + # Construct parameters + query_parameters = {} # type: Dict[str, Any] + query_parameters['api-version'] = self._serialize.query("api_version", api_version, 'str') + + request = self._client.get(url, query_parameters, header_parameters) + else: + url = next_link + query_parameters = {} # type: Dict[str, Any] + request = self._client.get(url, query_parameters, header_parameters) + return request + + def extract_data(pipeline_response): + deserialized = self._deserialize('SqlMigrationListResult', pipeline_response) + list_of_elem = deserialized.value + if cls: + list_of_elem = cls(list_of_elem) + return deserialized.next_link or None, iter(list_of_elem) + + def get_next(next_link=None): + request = prepare_request(next_link) + + pipeline_response = self._client._pipeline.run(request, stream=False, **kwargs) + response = pipeline_response.http_response + + if response.status_code not in [200]: + map_error(status_code=response.status_code, response=response, error_map=error_map) + raise HttpResponseError(response=response, error_format=ARMErrorFormat) + + return pipeline_response + + return ItemPaged( + get_next, extract_data + ) + list_by_resource_group.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.DataMigration/sqlMigrationServices'} # type: ignore + + def list_auth_keys( + self, + resource_group_name, # type: str + sql_migration_service_name, # type: str + **kwargs # type: Any + ): + # type: (...) -> "models.AuthenticationKeys" + """Retrieve the List of Authentication Keys for Self Hosted Integration Runtime. + + :param resource_group_name: Name of the resource group that contains the resource. You can + obtain this value from the Azure Resource Manager API or the portal. + :type resource_group_name: str + :param sql_migration_service_name: Name of the SQL Migration Service. + :type sql_migration_service_name: str + :keyword callable cls: A custom type or function that will be passed the direct response + :return: AuthenticationKeys, or the result of cls(response) + :rtype: ~azure.mgmt.datamigration.models.AuthenticationKeys + :raises: ~azure.core.exceptions.HttpResponseError + """ + cls = kwargs.pop('cls', None) # type: ClsType["models.AuthenticationKeys"] + error_map = { + 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError + } + error_map.update(kwargs.pop('error_map', {})) + api_version = "2021-10-30-preview" + accept = "application/json" + + # Construct URL + url = self.list_auth_keys.metadata['url'] # type: ignore + path_format_arguments = { + 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str'), + 'sqlMigrationServiceName': self._serialize.url("sql_migration_service_name", sql_migration_service_name, 'str'), + 'subscriptionId': self._serialize.url("self._config.subscription_id", self._config.subscription_id, 'str'), + } + url = self._client.format_url(url, **path_format_arguments) + + # Construct parameters + query_parameters = {} # type: Dict[str, Any] + query_parameters['api-version'] = self._serialize.query("api_version", api_version, 'str') + + # Construct headers + header_parameters = {} # type: Dict[str, Any] + header_parameters['Accept'] = self._serialize.header("accept", accept, 'str') + + request = self._client.post(url, query_parameters, header_parameters) + pipeline_response = self._client._pipeline.run(request, stream=False, **kwargs) + response = pipeline_response.http_response + + if response.status_code not in [200]: + map_error(status_code=response.status_code, response=response, error_map=error_map) + raise HttpResponseError(response=response, error_format=ARMErrorFormat) + + deserialized = self._deserialize('AuthenticationKeys', pipeline_response) + + if cls: + return cls(pipeline_response, deserialized, {}) + + return deserialized + list_auth_keys.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.DataMigration/sqlMigrationServices/{sqlMigrationServiceName}/listAuthKeys'} # type: ignore + + def regenerate_auth_keys( + self, + resource_group_name, # type: str + sql_migration_service_name, # type: str + parameters, # type: "models.RegenAuthKeys" + **kwargs # type: Any + ): + # type: (...) -> "models.RegenAuthKeys" + """Regenerate a new set of Authentication Keys for Self Hosted Integration Runtime. + + :param resource_group_name: Name of the resource group that contains the resource. You can + obtain this value from the Azure Resource Manager API or the portal. + :type resource_group_name: str + :param sql_migration_service_name: Name of the SQL Migration Service. + :type sql_migration_service_name: str + :param parameters: Details of SqlMigrationService resource. + :type parameters: ~azure.mgmt.datamigration.models.RegenAuthKeys + :keyword callable cls: A custom type or function that will be passed the direct response + :return: RegenAuthKeys, or the result of cls(response) + :rtype: ~azure.mgmt.datamigration.models.RegenAuthKeys + :raises: ~azure.core.exceptions.HttpResponseError + """ + cls = kwargs.pop('cls', None) # type: ClsType["models.RegenAuthKeys"] + error_map = { + 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError + } + error_map.update(kwargs.pop('error_map', {})) + api_version = "2021-10-30-preview" + content_type = kwargs.pop("content_type", "application/json") + accept = "application/json" + + # Construct URL + url = self.regenerate_auth_keys.metadata['url'] # type: ignore + path_format_arguments = { + 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str'), + 'sqlMigrationServiceName': self._serialize.url("sql_migration_service_name", sql_migration_service_name, 'str'), + 'subscriptionId': self._serialize.url("self._config.subscription_id", self._config.subscription_id, 'str'), + } + url = self._client.format_url(url, **path_format_arguments) + + # Construct parameters + query_parameters = {} # type: Dict[str, Any] + query_parameters['api-version'] = self._serialize.query("api_version", api_version, 'str') + + # Construct headers + header_parameters = {} # type: Dict[str, Any] + header_parameters['Content-Type'] = self._serialize.header("content_type", content_type, 'str') + header_parameters['Accept'] = self._serialize.header("accept", accept, 'str') + + body_content_kwargs = {} # type: Dict[str, Any] + body_content = self._serialize.body(parameters, 'RegenAuthKeys') + body_content_kwargs['content'] = body_content + request = self._client.post(url, query_parameters, header_parameters, **body_content_kwargs) + pipeline_response = self._client._pipeline.run(request, stream=False, **kwargs) + response = pipeline_response.http_response + + if response.status_code not in [200]: + map_error(status_code=response.status_code, response=response, error_map=error_map) + raise HttpResponseError(response=response, error_format=ARMErrorFormat) + + deserialized = self._deserialize('RegenAuthKeys', pipeline_response) + + if cls: + return cls(pipeline_response, deserialized, {}) + + return deserialized + regenerate_auth_keys.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.DataMigration/sqlMigrationServices/{sqlMigrationServiceName}/regenerateAuthKeys'} # type: ignore + + def delete_node( + self, + resource_group_name, # type: str + sql_migration_service_name, # type: str + parameters, # type: "models.DeleteNode" + **kwargs # type: Any + ): + # type: (...) -> "models.DeleteNode" + """Delete the integration runtime node. + + :param resource_group_name: Name of the resource group that contains the resource. You can + obtain this value from the Azure Resource Manager API or the portal. + :type resource_group_name: str + :param sql_migration_service_name: Name of the SQL Migration Service. + :type sql_migration_service_name: str + :param parameters: Details of SqlMigrationService resource. + :type parameters: ~azure.mgmt.datamigration.models.DeleteNode + :keyword callable cls: A custom type or function that will be passed the direct response + :return: DeleteNode, or the result of cls(response) + :rtype: ~azure.mgmt.datamigration.models.DeleteNode + :raises: ~azure.core.exceptions.HttpResponseError + """ + cls = kwargs.pop('cls', None) # type: ClsType["models.DeleteNode"] + error_map = { + 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError + } + error_map.update(kwargs.pop('error_map', {})) + api_version = "2021-10-30-preview" + content_type = kwargs.pop("content_type", "application/json") + accept = "application/json" + + # Construct URL + url = self.delete_node.metadata['url'] # type: ignore + path_format_arguments = { + 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str'), + 'sqlMigrationServiceName': self._serialize.url("sql_migration_service_name", sql_migration_service_name, 'str'), + 'subscriptionId': self._serialize.url("self._config.subscription_id", self._config.subscription_id, 'str'), + } + url = self._client.format_url(url, **path_format_arguments) + + # Construct parameters + query_parameters = {} # type: Dict[str, Any] + query_parameters['api-version'] = self._serialize.query("api_version", api_version, 'str') + + # Construct headers + header_parameters = {} # type: Dict[str, Any] + header_parameters['Content-Type'] = self._serialize.header("content_type", content_type, 'str') + header_parameters['Accept'] = self._serialize.header("accept", accept, 'str') + + body_content_kwargs = {} # type: Dict[str, Any] + body_content = self._serialize.body(parameters, 'DeleteNode') + body_content_kwargs['content'] = body_content + request = self._client.post(url, query_parameters, header_parameters, **body_content_kwargs) + pipeline_response = self._client._pipeline.run(request, stream=False, **kwargs) + response = pipeline_response.http_response + + if response.status_code not in [200]: + map_error(status_code=response.status_code, response=response, error_map=error_map) + raise HttpResponseError(response=response, error_format=ARMErrorFormat) + + deserialized = self._deserialize('DeleteNode', pipeline_response) + + if cls: + return cls(pipeline_response, deserialized, {}) + + return deserialized + delete_node.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.DataMigration/sqlMigrationServices/{sqlMigrationServiceName}/deleteNode'} # type: ignore + + def list_migrations( + self, + resource_group_name, # type: str + sql_migration_service_name, # type: str + **kwargs # type: Any + ): + # type: (...) -> Iterable["models.DatabaseMigrationListResult"] + """Retrieve the List of database migrations attached to the service. + + :param resource_group_name: Name of the resource group that contains the resource. You can + obtain this value from the Azure Resource Manager API or the portal. + :type resource_group_name: str + :param sql_migration_service_name: Name of the SQL Migration Service. + :type sql_migration_service_name: str + :keyword callable cls: A custom type or function that will be passed the direct response + :return: An iterator like instance of either DatabaseMigrationListResult or the result of cls(response) + :rtype: ~azure.core.paging.ItemPaged[~azure.mgmt.datamigration.models.DatabaseMigrationListResult] + :raises: ~azure.core.exceptions.HttpResponseError + """ + cls = kwargs.pop('cls', None) # type: ClsType["models.DatabaseMigrationListResult"] + error_map = { + 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError + } + error_map.update(kwargs.pop('error_map', {})) + api_version = "2021-10-30-preview" + accept = "application/json" + + def prepare_request(next_link=None): + # Construct headers + header_parameters = {} # type: Dict[str, Any] + header_parameters['Accept'] = self._serialize.header("accept", accept, 'str') + + if not next_link: + # Construct URL + url = self.list_migrations.metadata['url'] # type: ignore + path_format_arguments = { + 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str'), + 'sqlMigrationServiceName': self._serialize.url("sql_migration_service_name", sql_migration_service_name, 'str'), + 'subscriptionId': self._serialize.url("self._config.subscription_id", self._config.subscription_id, 'str'), + } + url = self._client.format_url(url, **path_format_arguments) + # Construct parameters + query_parameters = {} # type: Dict[str, Any] + query_parameters['api-version'] = self._serialize.query("api_version", api_version, 'str') + + request = self._client.get(url, query_parameters, header_parameters) + else: + url = next_link + query_parameters = {} # type: Dict[str, Any] + request = self._client.get(url, query_parameters, header_parameters) + return request + + def extract_data(pipeline_response): + deserialized = self._deserialize('DatabaseMigrationListResult', pipeline_response) + list_of_elem = deserialized.value + if cls: + list_of_elem = cls(list_of_elem) + return deserialized.next_link or None, iter(list_of_elem) + + def get_next(next_link=None): + request = prepare_request(next_link) + + pipeline_response = self._client._pipeline.run(request, stream=False, **kwargs) + response = pipeline_response.http_response + + if response.status_code not in [200]: + map_error(status_code=response.status_code, response=response, error_map=error_map) + raise HttpResponseError(response=response, error_format=ARMErrorFormat) + + return pipeline_response + + return ItemPaged( + get_next, extract_data + ) + list_migrations.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.DataMigration/sqlMigrationServices/{sqlMigrationServiceName}/listMigrations'} # type: ignore + + def list_monitoring_data( + self, + resource_group_name, # type: str + sql_migration_service_name, # type: str + **kwargs # type: Any + ): + # type: (...) -> "models.IntegrationRuntimeMonitoringData" + """Retrieve the Monitoring Data. + + :param resource_group_name: Name of the resource group that contains the resource. You can + obtain this value from the Azure Resource Manager API or the portal. + :type resource_group_name: str + :param sql_migration_service_name: Name of the SQL Migration Service. + :type sql_migration_service_name: str + :keyword callable cls: A custom type or function that will be passed the direct response + :return: IntegrationRuntimeMonitoringData, or the result of cls(response) + :rtype: ~azure.mgmt.datamigration.models.IntegrationRuntimeMonitoringData + :raises: ~azure.core.exceptions.HttpResponseError + """ + cls = kwargs.pop('cls', None) # type: ClsType["models.IntegrationRuntimeMonitoringData"] + error_map = { + 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError + } + error_map.update(kwargs.pop('error_map', {})) + api_version = "2021-10-30-preview" + accept = "application/json" + + # Construct URL + url = self.list_monitoring_data.metadata['url'] # type: ignore + path_format_arguments = { + 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str'), + 'sqlMigrationServiceName': self._serialize.url("sql_migration_service_name", sql_migration_service_name, 'str'), + 'subscriptionId': self._serialize.url("self._config.subscription_id", self._config.subscription_id, 'str'), + } + url = self._client.format_url(url, **path_format_arguments) + + # Construct parameters + query_parameters = {} # type: Dict[str, Any] + query_parameters['api-version'] = self._serialize.query("api_version", api_version, 'str') + + # Construct headers + header_parameters = {} # type: Dict[str, Any] + header_parameters['Accept'] = self._serialize.header("accept", accept, 'str') + + request = self._client.post(url, query_parameters, header_parameters) + pipeline_response = self._client._pipeline.run(request, stream=False, **kwargs) + response = pipeline_response.http_response + + if response.status_code not in [200]: + map_error(status_code=response.status_code, response=response, error_map=error_map) + raise HttpResponseError(response=response, error_format=ARMErrorFormat) + + deserialized = self._deserialize('IntegrationRuntimeMonitoringData', pipeline_response) + + if cls: + return cls(pipeline_response, deserialized, {}) + + return deserialized + list_monitoring_data.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.DataMigration/sqlMigrationServices/{sqlMigrationServiceName}/listMonitoringData'} # type: ignore + + def list_by_subscription( + self, + **kwargs # type: Any + ): + # type: (...) -> Iterable["models.SqlMigrationListResult"] + """Retrieve all SQL migration services in the subscriptions. + + :keyword callable cls: A custom type or function that will be passed the direct response + :return: An iterator like instance of either SqlMigrationListResult or the result of cls(response) + :rtype: ~azure.core.paging.ItemPaged[~azure.mgmt.datamigration.models.SqlMigrationListResult] + :raises: ~azure.core.exceptions.HttpResponseError + """ + cls = kwargs.pop('cls', None) # type: ClsType["models.SqlMigrationListResult"] + error_map = { + 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError + } + error_map.update(kwargs.pop('error_map', {})) + api_version = "2021-10-30-preview" + accept = "application/json" + + def prepare_request(next_link=None): + # Construct headers + header_parameters = {} # type: Dict[str, Any] + header_parameters['Accept'] = self._serialize.header("accept", accept, 'str') + + if not next_link: + # Construct URL + url = self.list_by_subscription.metadata['url'] # type: ignore + path_format_arguments = { + 'subscriptionId': self._serialize.url("self._config.subscription_id", self._config.subscription_id, 'str'), + } + url = self._client.format_url(url, **path_format_arguments) + # Construct parameters + query_parameters = {} # type: Dict[str, Any] + query_parameters['api-version'] = self._serialize.query("api_version", api_version, 'str') + + request = self._client.get(url, query_parameters, header_parameters) + else: + url = next_link + query_parameters = {} # type: Dict[str, Any] + request = self._client.get(url, query_parameters, header_parameters) + return request + + def extract_data(pipeline_response): + deserialized = self._deserialize('SqlMigrationListResult', pipeline_response) + list_of_elem = deserialized.value + if cls: + list_of_elem = cls(list_of_elem) + return deserialized.next_link or None, iter(list_of_elem) + + def get_next(next_link=None): + request = prepare_request(next_link) + + pipeline_response = self._client._pipeline.run(request, stream=False, **kwargs) + response = pipeline_response.http_response + + if response.status_code not in [200]: + map_error(status_code=response.status_code, response=response, error_map=error_map) + raise HttpResponseError(response=response, error_format=ARMErrorFormat) + + return pipeline_response + + return ItemPaged( + get_next, extract_data + ) + list_by_subscription.metadata = {'url': '/subscriptions/{subscriptionId}/providers/Microsoft.DataMigration/sqlMigrationServices'} # type: ignore diff --git a/src/datamigration/azext_datamigration/vendored_sdks/datamigration/operations/_tasks_operations.py b/src/datamigration/azext_datamigration/vendored_sdks/datamigration/operations/_tasks_operations.py new file mode 100644 index 00000000000..9c05e5f389c --- /dev/null +++ b/src/datamigration/azext_datamigration/vendored_sdks/datamigration/operations/_tasks_operations.py @@ -0,0 +1,598 @@ +# coding=utf-8 +# -------------------------------------------------------------------------- +# Copyright (c) Microsoft Corporation. All rights reserved. +# Licensed under the MIT License. See License.txt in the project root for license information. +# Code generated by Microsoft (R) AutoRest Code Generator. +# Changes may cause incorrect behavior and will be lost if the code is regenerated. +# -------------------------------------------------------------------------- +from typing import TYPE_CHECKING +import warnings + +from azure.core.exceptions import ClientAuthenticationError, HttpResponseError, ResourceExistsError, ResourceNotFoundError, map_error +from azure.core.paging import ItemPaged +from azure.core.pipeline import PipelineResponse +from azure.core.pipeline.transport import HttpRequest, HttpResponse +from azure.mgmt.core.exceptions import ARMErrorFormat + +from .. import models + +if TYPE_CHECKING: + # pylint: disable=unused-import,ungrouped-imports + from typing import Any, Callable, Dict, Generic, Iterable, Optional, TypeVar, Union + + T = TypeVar('T') + ClsType = Optional[Callable[[PipelineResponse[HttpRequest, HttpResponse], T, Dict[str, Any]], Any]] + +class TasksOperations(object): + """TasksOperations operations. + + You should not instantiate this class directly. Instead, you should create a Client instance that + instantiates it for you and attaches it as an attribute. + + :ivar models: Alias to model classes used in this operation group. + :type models: ~azure.mgmt.datamigration.models + :param client: Client for service requests. + :param config: Configuration of service client. + :param serializer: An object model serializer. + :param deserializer: An object model deserializer. + """ + + models = models + + def __init__(self, client, config, serializer, deserializer): + self._client = client + self._serialize = serializer + self._deserialize = deserializer + self._config = config + + def list( + self, + group_name, # type: str + service_name, # type: str + project_name, # type: str + task_type=None, # type: Optional[str] + **kwargs # type: Any + ): + # type: (...) -> Iterable["models.TaskList"] + """Get tasks in a service. + + The services resource is the top-level resource that represents the Database Migration Service. + This method returns a list of tasks owned by a service resource. Some tasks may have a status + of Unknown, which indicates that an error occurred while querying the status of that task. + + :param group_name: Name of the resource group. + :type group_name: str + :param service_name: Name of the service. + :type service_name: str + :param project_name: Name of the project. + :type project_name: str + :param task_type: Filter tasks by task type. + :type task_type: str + :keyword callable cls: A custom type or function that will be passed the direct response + :return: An iterator like instance of either TaskList or the result of cls(response) + :rtype: ~azure.core.paging.ItemPaged[~azure.mgmt.datamigration.models.TaskList] + :raises: ~azure.core.exceptions.HttpResponseError + """ + cls = kwargs.pop('cls', None) # type: ClsType["models.TaskList"] + error_map = { + 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError + } + error_map.update(kwargs.pop('error_map', {})) + api_version = "2021-10-30-preview" + accept = "application/json" + + def prepare_request(next_link=None): + # Construct headers + header_parameters = {} # type: Dict[str, Any] + header_parameters['Accept'] = self._serialize.header("accept", accept, 'str') + + if not next_link: + # Construct URL + url = self.list.metadata['url'] # type: ignore + path_format_arguments = { + 'subscriptionId': self._serialize.url("self._config.subscription_id", self._config.subscription_id, 'str'), + 'groupName': self._serialize.url("group_name", group_name, 'str'), + 'serviceName': self._serialize.url("service_name", service_name, 'str'), + 'projectName': self._serialize.url("project_name", project_name, 'str'), + } + url = self._client.format_url(url, **path_format_arguments) + # Construct parameters + query_parameters = {} # type: Dict[str, Any] + query_parameters['api-version'] = self._serialize.query("api_version", api_version, 'str') + if task_type is not None: + query_parameters['taskType'] = self._serialize.query("task_type", task_type, 'str') + + request = self._client.get(url, query_parameters, header_parameters) + else: + url = next_link + query_parameters = {} # type: Dict[str, Any] + request = self._client.get(url, query_parameters, header_parameters) + return request + + def extract_data(pipeline_response): + deserialized = self._deserialize('TaskList', pipeline_response) + list_of_elem = deserialized.value + if cls: + list_of_elem = cls(list_of_elem) + return deserialized.next_link or None, iter(list_of_elem) + + def get_next(next_link=None): + request = prepare_request(next_link) + + pipeline_response = self._client._pipeline.run(request, stream=False, **kwargs) + response = pipeline_response.http_response + + if response.status_code not in [200]: + error = self._deserialize(models.ApiError, response) + map_error(status_code=response.status_code, response=response, error_map=error_map) + raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) + + return pipeline_response + + return ItemPaged( + get_next, extract_data + ) + list.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{groupName}/providers/Microsoft.DataMigration/services/{serviceName}/projects/{projectName}/tasks'} # type: ignore + + def create_or_update( + self, + group_name, # type: str + service_name, # type: str + project_name, # type: str + task_name, # type: str + parameters, # type: "models.ProjectTask" + **kwargs # type: Any + ): + # type: (...) -> "models.ProjectTask" + """Create or update task. + + The tasks resource is a nested, proxy-only resource representing work performed by a DMS + instance. The PUT method creates a new task or updates an existing one, although since tasks + have no mutable custom properties, there is little reason to update an existing one. + + :param group_name: Name of the resource group. + :type group_name: str + :param service_name: Name of the service. + :type service_name: str + :param project_name: Name of the project. + :type project_name: str + :param task_name: Name of the Task. + :type task_name: str + :param parameters: Information about the task. + :type parameters: ~azure.mgmt.datamigration.models.ProjectTask + :keyword callable cls: A custom type or function that will be passed the direct response + :return: ProjectTask, or the result of cls(response) + :rtype: ~azure.mgmt.datamigration.models.ProjectTask + :raises: ~azure.core.exceptions.HttpResponseError + """ + cls = kwargs.pop('cls', None) # type: ClsType["models.ProjectTask"] + error_map = { + 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError + } + error_map.update(kwargs.pop('error_map', {})) + api_version = "2021-10-30-preview" + content_type = kwargs.pop("content_type", "application/json") + accept = "application/json" + + # Construct URL + url = self.create_or_update.metadata['url'] # type: ignore + path_format_arguments = { + 'subscriptionId': self._serialize.url("self._config.subscription_id", self._config.subscription_id, 'str'), + 'groupName': self._serialize.url("group_name", group_name, 'str'), + 'serviceName': self._serialize.url("service_name", service_name, 'str'), + 'projectName': self._serialize.url("project_name", project_name, 'str'), + 'taskName': self._serialize.url("task_name", task_name, 'str'), + } + url = self._client.format_url(url, **path_format_arguments) + + # Construct parameters + query_parameters = {} # type: Dict[str, Any] + query_parameters['api-version'] = self._serialize.query("api_version", api_version, 'str') + + # Construct headers + header_parameters = {} # type: Dict[str, Any] + header_parameters['Content-Type'] = self._serialize.header("content_type", content_type, 'str') + header_parameters['Accept'] = self._serialize.header("accept", accept, 'str') + + body_content_kwargs = {} # type: Dict[str, Any] + body_content = self._serialize.body(parameters, 'ProjectTask') + body_content_kwargs['content'] = body_content + request = self._client.put(url, query_parameters, header_parameters, **body_content_kwargs) + pipeline_response = self._client._pipeline.run(request, stream=False, **kwargs) + response = pipeline_response.http_response + + if response.status_code not in [200, 201]: + map_error(status_code=response.status_code, response=response, error_map=error_map) + error = self._deserialize(models.ApiError, response) + raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) + + if response.status_code == 200: + deserialized = self._deserialize('ProjectTask', pipeline_response) + + if response.status_code == 201: + deserialized = self._deserialize('ProjectTask', pipeline_response) + + if cls: + return cls(pipeline_response, deserialized, {}) + + return deserialized + create_or_update.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{groupName}/providers/Microsoft.DataMigration/services/{serviceName}/projects/{projectName}/tasks/{taskName}'} # type: ignore + + def get( + self, + group_name, # type: str + service_name, # type: str + project_name, # type: str + task_name, # type: str + expand=None, # type: Optional[str] + **kwargs # type: Any + ): + # type: (...) -> "models.ProjectTask" + """Get task information. + + The tasks resource is a nested, proxy-only resource representing work performed by a DMS + instance. The GET method retrieves information about a task. + + :param group_name: Name of the resource group. + :type group_name: str + :param service_name: Name of the service. + :type service_name: str + :param project_name: Name of the project. + :type project_name: str + :param task_name: Name of the Task. + :type task_name: str + :param expand: Expand the response. + :type expand: str + :keyword callable cls: A custom type or function that will be passed the direct response + :return: ProjectTask, or the result of cls(response) + :rtype: ~azure.mgmt.datamigration.models.ProjectTask + :raises: ~azure.core.exceptions.HttpResponseError + """ + cls = kwargs.pop('cls', None) # type: ClsType["models.ProjectTask"] + error_map = { + 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError + } + error_map.update(kwargs.pop('error_map', {})) + api_version = "2021-10-30-preview" + accept = "application/json" + + # Construct URL + url = self.get.metadata['url'] # type: ignore + path_format_arguments = { + 'subscriptionId': self._serialize.url("self._config.subscription_id", self._config.subscription_id, 'str'), + 'groupName': self._serialize.url("group_name", group_name, 'str'), + 'serviceName': self._serialize.url("service_name", service_name, 'str'), + 'projectName': self._serialize.url("project_name", project_name, 'str'), + 'taskName': self._serialize.url("task_name", task_name, 'str'), + } + url = self._client.format_url(url, **path_format_arguments) + + # Construct parameters + query_parameters = {} # type: Dict[str, Any] + query_parameters['api-version'] = self._serialize.query("api_version", api_version, 'str') + if expand is not None: + query_parameters['$expand'] = self._serialize.query("expand", expand, 'str') + + # Construct headers + header_parameters = {} # type: Dict[str, Any] + header_parameters['Accept'] = self._serialize.header("accept", accept, 'str') + + request = self._client.get(url, query_parameters, header_parameters) + pipeline_response = self._client._pipeline.run(request, stream=False, **kwargs) + response = pipeline_response.http_response + + if response.status_code not in [200]: + map_error(status_code=response.status_code, response=response, error_map=error_map) + error = self._deserialize(models.ApiError, response) + raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) + + deserialized = self._deserialize('ProjectTask', pipeline_response) + + if cls: + return cls(pipeline_response, deserialized, {}) + + return deserialized + get.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{groupName}/providers/Microsoft.DataMigration/services/{serviceName}/projects/{projectName}/tasks/{taskName}'} # type: ignore + + def delete( + self, + group_name, # type: str + service_name, # type: str + project_name, # type: str + task_name, # type: str + delete_running_tasks=None, # type: Optional[bool] + **kwargs # type: Any + ): + # type: (...) -> None + """Delete task. + + The tasks resource is a nested, proxy-only resource representing work performed by a DMS + instance. The DELETE method deletes a task, canceling it first if it's running. + + :param group_name: Name of the resource group. + :type group_name: str + :param service_name: Name of the service. + :type service_name: str + :param project_name: Name of the project. + :type project_name: str + :param task_name: Name of the Task. + :type task_name: str + :param delete_running_tasks: Delete the resource even if it contains running tasks. + :type delete_running_tasks: bool + :keyword callable cls: A custom type or function that will be passed the direct response + :return: None, or the result of cls(response) + :rtype: None + :raises: ~azure.core.exceptions.HttpResponseError + """ + cls = kwargs.pop('cls', None) # type: ClsType[None] + error_map = { + 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError + } + error_map.update(kwargs.pop('error_map', {})) + api_version = "2021-10-30-preview" + accept = "application/json" + + # Construct URL + url = self.delete.metadata['url'] # type: ignore + path_format_arguments = { + 'subscriptionId': self._serialize.url("self._config.subscription_id", self._config.subscription_id, 'str'), + 'groupName': self._serialize.url("group_name", group_name, 'str'), + 'serviceName': self._serialize.url("service_name", service_name, 'str'), + 'projectName': self._serialize.url("project_name", project_name, 'str'), + 'taskName': self._serialize.url("task_name", task_name, 'str'), + } + url = self._client.format_url(url, **path_format_arguments) + + # Construct parameters + query_parameters = {} # type: Dict[str, Any] + query_parameters['api-version'] = self._serialize.query("api_version", api_version, 'str') + if delete_running_tasks is not None: + query_parameters['deleteRunningTasks'] = self._serialize.query("delete_running_tasks", delete_running_tasks, 'bool') + + # Construct headers + header_parameters = {} # type: Dict[str, Any] + header_parameters['Accept'] = self._serialize.header("accept", accept, 'str') + + request = self._client.delete(url, query_parameters, header_parameters) + pipeline_response = self._client._pipeline.run(request, stream=False, **kwargs) + response = pipeline_response.http_response + + if response.status_code not in [200, 204]: + map_error(status_code=response.status_code, response=response, error_map=error_map) + error = self._deserialize(models.ApiError, response) + raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) + + if cls: + return cls(pipeline_response, None, {}) + + delete.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{groupName}/providers/Microsoft.DataMigration/services/{serviceName}/projects/{projectName}/tasks/{taskName}'} # type: ignore + + def update( + self, + group_name, # type: str + service_name, # type: str + project_name, # type: str + task_name, # type: str + parameters, # type: "models.ProjectTask" + **kwargs # type: Any + ): + # type: (...) -> "models.ProjectTask" + """Create or update task. + + The tasks resource is a nested, proxy-only resource representing work performed by a DMS + instance. The PATCH method updates an existing task, but since tasks have no mutable custom + properties, there is little reason to do so. + + :param group_name: Name of the resource group. + :type group_name: str + :param service_name: Name of the service. + :type service_name: str + :param project_name: Name of the project. + :type project_name: str + :param task_name: Name of the Task. + :type task_name: str + :param parameters: Information about the task. + :type parameters: ~azure.mgmt.datamigration.models.ProjectTask + :keyword callable cls: A custom type or function that will be passed the direct response + :return: ProjectTask, or the result of cls(response) + :rtype: ~azure.mgmt.datamigration.models.ProjectTask + :raises: ~azure.core.exceptions.HttpResponseError + """ + cls = kwargs.pop('cls', None) # type: ClsType["models.ProjectTask"] + error_map = { + 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError + } + error_map.update(kwargs.pop('error_map', {})) + api_version = "2021-10-30-preview" + content_type = kwargs.pop("content_type", "application/json") + accept = "application/json" + + # Construct URL + url = self.update.metadata['url'] # type: ignore + path_format_arguments = { + 'subscriptionId': self._serialize.url("self._config.subscription_id", self._config.subscription_id, 'str'), + 'groupName': self._serialize.url("group_name", group_name, 'str'), + 'serviceName': self._serialize.url("service_name", service_name, 'str'), + 'projectName': self._serialize.url("project_name", project_name, 'str'), + 'taskName': self._serialize.url("task_name", task_name, 'str'), + } + url = self._client.format_url(url, **path_format_arguments) + + # Construct parameters + query_parameters = {} # type: Dict[str, Any] + query_parameters['api-version'] = self._serialize.query("api_version", api_version, 'str') + + # Construct headers + header_parameters = {} # type: Dict[str, Any] + header_parameters['Content-Type'] = self._serialize.header("content_type", content_type, 'str') + header_parameters['Accept'] = self._serialize.header("accept", accept, 'str') + + body_content_kwargs = {} # type: Dict[str, Any] + body_content = self._serialize.body(parameters, 'ProjectTask') + body_content_kwargs['content'] = body_content + request = self._client.patch(url, query_parameters, header_parameters, **body_content_kwargs) + pipeline_response = self._client._pipeline.run(request, stream=False, **kwargs) + response = pipeline_response.http_response + + if response.status_code not in [200]: + map_error(status_code=response.status_code, response=response, error_map=error_map) + error = self._deserialize(models.ApiError, response) + raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) + + deserialized = self._deserialize('ProjectTask', pipeline_response) + + if cls: + return cls(pipeline_response, deserialized, {}) + + return deserialized + update.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{groupName}/providers/Microsoft.DataMigration/services/{serviceName}/projects/{projectName}/tasks/{taskName}'} # type: ignore + + def cancel( + self, + group_name, # type: str + service_name, # type: str + project_name, # type: str + task_name, # type: str + **kwargs # type: Any + ): + # type: (...) -> "models.ProjectTask" + """Cancel a task. + + The tasks resource is a nested, proxy-only resource representing work performed by a DMS + instance. This method cancels a task if it's currently queued or running. + + :param group_name: Name of the resource group. + :type group_name: str + :param service_name: Name of the service. + :type service_name: str + :param project_name: Name of the project. + :type project_name: str + :param task_name: Name of the Task. + :type task_name: str + :keyword callable cls: A custom type or function that will be passed the direct response + :return: ProjectTask, or the result of cls(response) + :rtype: ~azure.mgmt.datamigration.models.ProjectTask + :raises: ~azure.core.exceptions.HttpResponseError + """ + cls = kwargs.pop('cls', None) # type: ClsType["models.ProjectTask"] + error_map = { + 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError + } + error_map.update(kwargs.pop('error_map', {})) + api_version = "2021-10-30-preview" + accept = "application/json" + + # Construct URL + url = self.cancel.metadata['url'] # type: ignore + path_format_arguments = { + 'subscriptionId': self._serialize.url("self._config.subscription_id", self._config.subscription_id, 'str'), + 'groupName': self._serialize.url("group_name", group_name, 'str'), + 'serviceName': self._serialize.url("service_name", service_name, 'str'), + 'projectName': self._serialize.url("project_name", project_name, 'str'), + 'taskName': self._serialize.url("task_name", task_name, 'str'), + } + url = self._client.format_url(url, **path_format_arguments) + + # Construct parameters + query_parameters = {} # type: Dict[str, Any] + query_parameters['api-version'] = self._serialize.query("api_version", api_version, 'str') + + # Construct headers + header_parameters = {} # type: Dict[str, Any] + header_parameters['Accept'] = self._serialize.header("accept", accept, 'str') + + request = self._client.post(url, query_parameters, header_parameters) + pipeline_response = self._client._pipeline.run(request, stream=False, **kwargs) + response = pipeline_response.http_response + + if response.status_code not in [200]: + map_error(status_code=response.status_code, response=response, error_map=error_map) + error = self._deserialize(models.ApiError, response) + raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) + + deserialized = self._deserialize('ProjectTask', pipeline_response) + + if cls: + return cls(pipeline_response, deserialized, {}) + + return deserialized + cancel.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{groupName}/providers/Microsoft.DataMigration/services/{serviceName}/projects/{projectName}/tasks/{taskName}/cancel'} # type: ignore + + def command( + self, + group_name, # type: str + service_name, # type: str + project_name, # type: str + task_name, # type: str + parameters, # type: "models.CommandProperties" + **kwargs # type: Any + ): + # type: (...) -> "models.CommandProperties" + """Execute a command on a task. + + The tasks resource is a nested, proxy-only resource representing work performed by a DMS + instance. This method executes a command on a running task. + + :param group_name: Name of the resource group. + :type group_name: str + :param service_name: Name of the service. + :type service_name: str + :param project_name: Name of the project. + :type project_name: str + :param task_name: Name of the Task. + :type task_name: str + :param parameters: Command to execute. + :type parameters: ~azure.mgmt.datamigration.models.CommandProperties + :keyword callable cls: A custom type or function that will be passed the direct response + :return: CommandProperties, or the result of cls(response) + :rtype: ~azure.mgmt.datamigration.models.CommandProperties + :raises: ~azure.core.exceptions.HttpResponseError + """ + cls = kwargs.pop('cls', None) # type: ClsType["models.CommandProperties"] + error_map = { + 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError + } + error_map.update(kwargs.pop('error_map', {})) + api_version = "2021-10-30-preview" + content_type = kwargs.pop("content_type", "application/json") + accept = "application/json" + + # Construct URL + url = self.command.metadata['url'] # type: ignore + path_format_arguments = { + 'subscriptionId': self._serialize.url("self._config.subscription_id", self._config.subscription_id, 'str'), + 'groupName': self._serialize.url("group_name", group_name, 'str'), + 'serviceName': self._serialize.url("service_name", service_name, 'str'), + 'projectName': self._serialize.url("project_name", project_name, 'str'), + 'taskName': self._serialize.url("task_name", task_name, 'str'), + } + url = self._client.format_url(url, **path_format_arguments) + + # Construct parameters + query_parameters = {} # type: Dict[str, Any] + query_parameters['api-version'] = self._serialize.query("api_version", api_version, 'str') + + # Construct headers + header_parameters = {} # type: Dict[str, Any] + header_parameters['Content-Type'] = self._serialize.header("content_type", content_type, 'str') + header_parameters['Accept'] = self._serialize.header("accept", accept, 'str') + + body_content_kwargs = {} # type: Dict[str, Any] + body_content = self._serialize.body(parameters, 'CommandProperties') + body_content_kwargs['content'] = body_content + request = self._client.post(url, query_parameters, header_parameters, **body_content_kwargs) + pipeline_response = self._client._pipeline.run(request, stream=False, **kwargs) + response = pipeline_response.http_response + + if response.status_code not in [200]: + map_error(status_code=response.status_code, response=response, error_map=error_map) + error = self._deserialize(models.ApiError, response) + raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) + + deserialized = self._deserialize('CommandProperties', pipeline_response) + + if cls: + return cls(pipeline_response, deserialized, {}) + + return deserialized + command.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{groupName}/providers/Microsoft.DataMigration/services/{serviceName}/projects/{projectName}/tasks/{taskName}/command'} # type: ignore diff --git a/src/datamigration/azext_datamigration/vendored_sdks/datamigration/operations/_usages_operations.py b/src/datamigration/azext_datamigration/vendored_sdks/datamigration/operations/_usages_operations.py new file mode 100644 index 00000000000..bc3dbfb7de5 --- /dev/null +++ b/src/datamigration/azext_datamigration/vendored_sdks/datamigration/operations/_usages_operations.py @@ -0,0 +1,121 @@ +# coding=utf-8 +# -------------------------------------------------------------------------- +# Copyright (c) Microsoft Corporation. All rights reserved. +# Licensed under the MIT License. See License.txt in the project root for license information. +# Code generated by Microsoft (R) AutoRest Code Generator. +# Changes may cause incorrect behavior and will be lost if the code is regenerated. +# -------------------------------------------------------------------------- +from typing import TYPE_CHECKING +import warnings + +from azure.core.exceptions import ClientAuthenticationError, HttpResponseError, ResourceExistsError, ResourceNotFoundError, map_error +from azure.core.paging import ItemPaged +from azure.core.pipeline import PipelineResponse +from azure.core.pipeline.transport import HttpRequest, HttpResponse +from azure.mgmt.core.exceptions import ARMErrorFormat + +from .. import models + +if TYPE_CHECKING: + # pylint: disable=unused-import,ungrouped-imports + from typing import Any, Callable, Dict, Generic, Iterable, Optional, TypeVar + + T = TypeVar('T') + ClsType = Optional[Callable[[PipelineResponse[HttpRequest, HttpResponse], T, Dict[str, Any]], Any]] + +class UsagesOperations(object): + """UsagesOperations operations. + + You should not instantiate this class directly. Instead, you should create a Client instance that + instantiates it for you and attaches it as an attribute. + + :ivar models: Alias to model classes used in this operation group. + :type models: ~azure.mgmt.datamigration.models + :param client: Client for service requests. + :param config: Configuration of service client. + :param serializer: An object model serializer. + :param deserializer: An object model deserializer. + """ + + models = models + + def __init__(self, client, config, serializer, deserializer): + self._client = client + self._serialize = serializer + self._deserialize = deserializer + self._config = config + + def list( + self, + location, # type: str + **kwargs # type: Any + ): + # type: (...) -> Iterable["models.QuotaList"] + """Get resource quotas and usage information. + + This method returns region-specific quotas and resource usage information for the Database + Migration Service. + + :param location: The Azure region of the operation. + :type location: str + :keyword callable cls: A custom type or function that will be passed the direct response + :return: An iterator like instance of either QuotaList or the result of cls(response) + :rtype: ~azure.core.paging.ItemPaged[~azure.mgmt.datamigration.models.QuotaList] + :raises: ~azure.core.exceptions.HttpResponseError + """ + cls = kwargs.pop('cls', None) # type: ClsType["models.QuotaList"] + error_map = { + 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError + } + error_map.update(kwargs.pop('error_map', {})) + api_version = "2021-10-30-preview" + accept = "application/json" + + def prepare_request(next_link=None): + # Construct headers + header_parameters = {} # type: Dict[str, Any] + header_parameters['Accept'] = self._serialize.header("accept", accept, 'str') + + if not next_link: + # Construct URL + url = self.list.metadata['url'] # type: ignore + path_format_arguments = { + 'subscriptionId': self._serialize.url("self._config.subscription_id", self._config.subscription_id, 'str'), + 'location': self._serialize.url("location", location, 'str'), + } + url = self._client.format_url(url, **path_format_arguments) + # Construct parameters + query_parameters = {} # type: Dict[str, Any] + query_parameters['api-version'] = self._serialize.query("api_version", api_version, 'str') + + request = self._client.get(url, query_parameters, header_parameters) + else: + url = next_link + query_parameters = {} # type: Dict[str, Any] + request = self._client.get(url, query_parameters, header_parameters) + return request + + def extract_data(pipeline_response): + deserialized = self._deserialize('QuotaList', pipeline_response) + list_of_elem = deserialized.value + if cls: + list_of_elem = cls(list_of_elem) + return deserialized.next_link or None, iter(list_of_elem) + + def get_next(next_link=None): + request = prepare_request(next_link) + + pipeline_response = self._client._pipeline.run(request, stream=False, **kwargs) + response = pipeline_response.http_response + + if response.status_code not in [200]: + error = self._deserialize(models.ApiError, response) + map_error(status_code=response.status_code, response=response, error_map=error_map) + raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) + + return pipeline_response + + return ItemPaged( + get_next, extract_data + ) + list.metadata = {'url': '/subscriptions/{subscriptionId}/providers/Microsoft.DataMigration/locations/{location}/usages'} # type: ignore diff --git a/src/datamigration/azext_datamigration/vendored_sdks/datamigration/py.typed b/src/datamigration/azext_datamigration/vendored_sdks/datamigration/py.typed new file mode 100644 index 00000000000..e5aff4f83af --- /dev/null +++ b/src/datamigration/azext_datamigration/vendored_sdks/datamigration/py.typed @@ -0,0 +1 @@ +# Marker file for PEP 561. \ No newline at end of file diff --git a/src/datamigration/report.md b/src/datamigration/report.md new file mode 100644 index 00000000000..3d50950b7a7 --- /dev/null +++ b/src/datamigration/report.md @@ -0,0 +1,361 @@ +# Azure CLI Module Creation Report + +## EXTENSION +|CLI Extension|Command Groups| +|---------|------------| +|az datamigration|[groups](#CommandGroups) + +## GROUPS +### Command groups in `az datamigration` extension +|CLI Command Group|Group Swagger name|Commands| +|---------|------------|--------| +|az datamigration sql-managed-instance|DatabaseMigrationsSqlMi|[commands](#CommandsInDatabaseMigrationsSqlMi)| +|az datamigration sql-service|SqlMigrationServices|[commands](#CommandsInSqlMigrationServices)| +|az datamigration sql-vm|DatabaseMigrationsSqlVm|[commands](#CommandsInDatabaseMigrationsSqlVm)| + +## COMMANDS +### Commands in `az datamigration sql-managed-instance` group +|CLI Command|Operation Swagger name|Parameters|Examples| +|---------|------------|--------|-----------| +|[az datamigration sql-managed-instance show](#DatabaseMigrationsSqlMiGet)|Get|[Parameters](#ParametersDatabaseMigrationsSqlMiGet)|[Example](#ExamplesDatabaseMigrationsSqlMiGet)| +|[az datamigration sql-managed-instance create](#DatabaseMigrationsSqlMiCreateOrUpdate#Create)|CreateOrUpdate#Create|[Parameters](#ParametersDatabaseMigrationsSqlMiCreateOrUpdate#Create)|[Example](#ExamplesDatabaseMigrationsSqlMiCreateOrUpdate#Create)| +|[az datamigration sql-managed-instance cancel](#DatabaseMigrationsSqlMicancel)|cancel|[Parameters](#ParametersDatabaseMigrationsSqlMicancel)|[Example](#ExamplesDatabaseMigrationsSqlMicancel)| +|[az datamigration sql-managed-instance cutover](#DatabaseMigrationsSqlMicutover)|cutover|[Parameters](#ParametersDatabaseMigrationsSqlMicutover)|[Example](#ExamplesDatabaseMigrationsSqlMicutover)| + +### Commands in `az datamigration sql-service` group +|CLI Command|Operation Swagger name|Parameters|Examples| +|---------|------------|--------|-----------| +|[az datamigration sql-service list](#SqlMigrationServicesListByResourceGroup)|ListByResourceGroup|[Parameters](#ParametersSqlMigrationServicesListByResourceGroup)|[Example](#ExamplesSqlMigrationServicesListByResourceGroup)| +|[az datamigration sql-service list](#SqlMigrationServicesListBySubscription)|ListBySubscription|[Parameters](#ParametersSqlMigrationServicesListBySubscription)|[Example](#ExamplesSqlMigrationServicesListBySubscription)| +|[az datamigration sql-service show](#SqlMigrationServicesGet)|Get|[Parameters](#ParametersSqlMigrationServicesGet)|[Example](#ExamplesSqlMigrationServicesGet)| +|[az datamigration sql-service create](#SqlMigrationServicesCreateOrUpdate#Create)|CreateOrUpdate#Create|[Parameters](#ParametersSqlMigrationServicesCreateOrUpdate#Create)|[Example](#ExamplesSqlMigrationServicesCreateOrUpdate#Create)| +|[az datamigration sql-service update](#SqlMigrationServicesUpdate)|Update|[Parameters](#ParametersSqlMigrationServicesUpdate)|[Example](#ExamplesSqlMigrationServicesUpdate)| +|[az datamigration sql-service delete](#SqlMigrationServicesDelete)|Delete|[Parameters](#ParametersSqlMigrationServicesDelete)|[Example](#ExamplesSqlMigrationServicesDelete)| +|[az datamigration sql-service delete-node](#SqlMigrationServicesdeleteNode)|deleteNode|[Parameters](#ParametersSqlMigrationServicesdeleteNode)|[Example](#ExamplesSqlMigrationServicesdeleteNode)| +|[az datamigration sql-service list-auth-key](#SqlMigrationServiceslistAuthKeys)|listAuthKeys|[Parameters](#ParametersSqlMigrationServiceslistAuthKeys)|[Example](#ExamplesSqlMigrationServiceslistAuthKeys)| +|[az datamigration sql-service list-integration-runtime-metric](#SqlMigrationServiceslistMonitoringData)|listMonitoringData|[Parameters](#ParametersSqlMigrationServiceslistMonitoringData)|[Example](#ExamplesSqlMigrationServiceslistMonitoringData)| +|[az datamigration sql-service list-migration](#SqlMigrationServiceslistMigrations)|listMigrations|[Parameters](#ParametersSqlMigrationServiceslistMigrations)|[Example](#ExamplesSqlMigrationServiceslistMigrations)| +|[az datamigration sql-service regenerate-auth-key](#SqlMigrationServicesregenerateAuthKeys)|regenerateAuthKeys|[Parameters](#ParametersSqlMigrationServicesregenerateAuthKeys)|[Example](#ExamplesSqlMigrationServicesregenerateAuthKeys)| + +### Commands in `az datamigration sql-vm` group +|CLI Command|Operation Swagger name|Parameters|Examples| +|---------|------------|--------|-----------| +|[az datamigration sql-vm show](#DatabaseMigrationsSqlVmGet)|Get|[Parameters](#ParametersDatabaseMigrationsSqlVmGet)|[Example](#ExamplesDatabaseMigrationsSqlVmGet)| +|[az datamigration sql-vm create](#DatabaseMigrationsSqlVmCreateOrUpdate#Create)|CreateOrUpdate#Create|[Parameters](#ParametersDatabaseMigrationsSqlVmCreateOrUpdate#Create)|[Example](#ExamplesDatabaseMigrationsSqlVmCreateOrUpdate#Create)| +|[az datamigration sql-vm cancel](#DatabaseMigrationsSqlVmcancel)|cancel|[Parameters](#ParametersDatabaseMigrationsSqlVmcancel)|[Example](#ExamplesDatabaseMigrationsSqlVmcancel)| +|[az datamigration sql-vm cutover](#DatabaseMigrationsSqlVmcutover)|cutover|[Parameters](#ParametersDatabaseMigrationsSqlVmcutover)|[Example](#ExamplesDatabaseMigrationsSqlVmcutover)| + + +## COMMAND DETAILS +### group `az datamigration sql-managed-instance` +#### Command `az datamigration sql-managed-instance show` + +##### Example +``` +az datamigration sql-managed-instance show --managed-instance-name "managedInstance1" --resource-group "testrg" \ +--target-db-name "db1" +``` +##### Parameters +|Option|Type|Description|Path (SDK)|Swagger name| +|------|----|-----------|----------|------------| +|**--resource-group-name**|string|Name of the resource group that contains the resource. You can obtain this value from the Azure Resource Manager API or the portal.|resource_group_name|resourceGroupName| +|**--managed-instance-name**|string|Name of the target SQL Managed Instance.|managed_instance_name|managedInstanceName| +|**--target-db-name**|string|The name of the target database.|target_db_name|targetDbName| +|**--migration-operation-id**|uuid|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.|migration_operation_id|migrationOperationId| +|**--expand**|string|The child resources to include in the response.|expand|$expand| + +#### Command `az datamigration sql-managed-instance create` + +##### Example +``` +az datamigration sql-managed-instance create --managed-instance-name "managedInstance1" --source-location \ +"{\\"fileShare\\":{\\"path\\":\\"C:\\\\\\\\aaa\\\\\\\\bbb\\\\\\\\ccc\\",\\"password\\":\\"placeholder\\",\\"username\\"\ +:\\"name\\"}}" --target-location account-key="abcd" storage-account-resource-id="account.database.windows.net" \ +--migration-service "/subscriptions/00000000-1111-2222-3333-444444444444/resourceGroups/testrg/providers/Microsoft.Data\ +Migration/sqlMigrationServices/testagent" --offline-configuration last-backup-name="last_backup_file_name" \ +offline=true --scope "/subscriptions/00000000-1111-2222-3333-444444444444/resourceGroups/testrg/providers/Microsoft.Sql\ +/managedInstances/instance" --source-database-name "aaa" --source-sql-connection authentication="WindowsAuthentication"\ + data-source="aaa" encrypt-connection=true password="placeholder" trust-server-certificate=true user-name="bbb" \ +--resource-group "testrg" --target-db-name "db1" +az datamigration sql-managed-instance create --managed-instance-name "managedInstance1" --source-location \ +"{\\"fileShare\\":{\\"path\\":\\"C:\\\\\\\\aaa\\\\\\\\bbb\\\\\\\\ccc\\",\\"password\\":\\"placeholder\\",\\"username\\"\ +:\\"name\\"}}" --target-location account-key="abcd" storage-account-resource-id="account.database.windows.net" \ +--migration-service "/subscriptions/00000000-1111-2222-3333-444444444444/resourceGroups/testrg/providers/Microsoft.Data\ +Migration/sqlMigrationServices/testagent" --offline-configuration last-backup-name="last_backup_file_name" \ +offline=true --scope "/subscriptions/00000000-1111-2222-3333-444444444444/resourceGroups/testrg/providers/Microsoft.Sql\ +/managedInstances/instance" --source-database-name "aaa" --source-sql-connection authentication="WindowsAuthentication"\ + data-source="aaa" encrypt-connection=true password="placeholder" trust-server-certificate=true user-name="bbb" \ +--resource-group "testrg" --target-db-name "db1" +``` +##### Parameters +|Option|Type|Description|Path (SDK)|Swagger name| +|------|----|-----------|----------|------------| +|**--resource-group-name**|string|Name of the resource group that contains the resource. You can obtain this value from the Azure Resource Manager API or the portal.|resource_group_name|resourceGroupName| +|**--managed-instance-name**|string|Name of the target SQL Managed Instance.|managed_instance_name|managedInstanceName| +|**--target-db-name**|string|The name of the target database.|target_db_name|targetDbName| +|**--scope**|string|Resource Id of the target resource (SQL VM or SQL Managed Instance)|scope|scope| +|**--source-sql-connection**|object|Source SQL Server connection details.|source_sql_connection|sourceSqlConnection| +|**--source-database-name**|string|Name of the source database.|source_database_name|sourceDatabaseName| +|**--migration-service**|string|Resource Id of the Migration Service.|migration_service|migrationService| +|**--migration-operation-id**|string|ID tracking current migration operation.|migration_operation_id|migrationOperationId| +|**--target-db-collation**|string|Database collation to be used for the target database.|target_db_collation|targetDatabaseCollation| +|**--provisioning-error**|string|Error message for migration provisioning failure, if any.|provisioning_error|provisioningError| +|**--offline-configuration**|object|Offline configuration.|offline_configuration|offlineConfiguration| +|**--source-location**|object|Source location of backups.|source_location|sourceLocation| +|**--target-location**|object|Target location for copying backups.|target_location|targetLocation| + +#### Command `az datamigration sql-managed-instance cancel` + +##### Example +``` +az datamigration sql-managed-instance cancel --managed-instance-name "managedInstance1" --migration-operation-id \ +"4124fe90-d1b6-4b50-b4d9-46d02381f59a" --resource-group "testrg" --target-db-name "db1" +``` +##### Parameters +|Option|Type|Description|Path (SDK)|Swagger name| +|------|----|-----------|----------|------------| +|**--resource-group-name**|string|Name of the resource group that contains the resource. You can obtain this value from the Azure Resource Manager API or the portal.|resource_group_name|resourceGroupName| +|**--managed-instance-name**|string|Name of the target SQL Managed Instance.|managed_instance_name|managedInstanceName| +|**--target-db-name**|string|The name of the target database.|target_db_name|targetDbName| +|**--migration-operation-id**|uuid|ID tracking migration operation.|migration_operation_id|migrationOperationId| + +#### Command `az datamigration sql-managed-instance cutover` + +##### Example +``` +az datamigration sql-managed-instance cutover --managed-instance-name "managedInstance1" --migration-operation-id \ +"4124fe90-d1b6-4b50-b4d9-46d02381f59a" --resource-group "testrg" --target-db-name "db1" +``` +##### Parameters +|Option|Type|Description|Path (SDK)|Swagger name| +|------|----|-----------|----------|------------| +|**--resource-group-name**|string|Name of the resource group that contains the resource. You can obtain this value from the Azure Resource Manager API or the portal.|resource_group_name|resourceGroupName| +|**--managed-instance-name**|string|Name of the target SQL Managed Instance.|managed_instance_name|managedInstanceName| +|**--target-db-name**|string|The name of the target database.|target_db_name|targetDbName| +|**--migration-operation-id**|uuid|ID tracking migration operation.|migration_operation_id|migrationOperationId| + +### group `az datamigration sql-service` +#### Command `az datamigration sql-service list` + +##### Example +``` +az datamigration sql-service list --resource-group "testrg" +``` +##### Parameters +|Option|Type|Description|Path (SDK)|Swagger name| +|------|----|-----------|----------|------------| +|**--resource-group-name**|string|Name of the resource group that contains the resource. You can obtain this value from the Azure Resource Manager API or the portal.|resource_group_name|resourceGroupName| + +#### Command `az datamigration sql-service list` + +##### Example +``` +az datamigration sql-service list +``` +##### Parameters +|Option|Type|Description|Path (SDK)|Swagger name| +|------|----|-----------|----------|------------| + +#### Command `az datamigration sql-service show` + +##### Example +``` +az datamigration sql-service show --resource-group "testrg" --name "service1" +``` +##### Parameters +|Option|Type|Description|Path (SDK)|Swagger name| +|------|----|-----------|----------|------------| +|**--resource-group-name**|string|Name of the resource group that contains the resource. You can obtain this value from the Azure Resource Manager API or the portal.|resource_group_name|resourceGroupName| +|**--sql-migration-service-name**|string|Name of the SQL Migration Service.|sql_migration_service_name|sqlMigrationServiceName| + +#### Command `az datamigration sql-service create` + +##### Example +``` +az datamigration sql-service create --location "northeurope" --resource-group "testrg" --name "testagent" +az datamigration sql-service create --location "northeurope" --resource-group "testrg" --name "testagent" +``` +##### Parameters +|Option|Type|Description|Path (SDK)|Swagger name| +|------|----|-----------|----------|------------| +|**--resource-group-name**|string|Name of the resource group that contains the resource. You can obtain this value from the Azure Resource Manager API or the portal.|resource_group_name|resourceGroupName| +|**--sql-migration-service-name**|string|Name of the SQL Migration Service.|sql_migration_service_name|sqlMigrationServiceName| +|**--location**|string||location|location| +|**--tags**|dictionary|Dictionary of |tags|tags| + +#### Command `az datamigration sql-service update` + +##### Example +``` +az datamigration sql-service update --tags mytag="myval" --resource-group "testrg" --name "testagent" +``` +##### Parameters +|Option|Type|Description|Path (SDK)|Swagger name| +|------|----|-----------|----------|------------| +|**--resource-group-name**|string|Name of the resource group that contains the resource. You can obtain this value from the Azure Resource Manager API or the portal.|resource_group_name|resourceGroupName| +|**--sql-migration-service-name**|string|Name of the SQL Migration Service.|sql_migration_service_name|sqlMigrationServiceName| +|**--tags**|dictionary|Dictionary of |tags|tags| + +#### Command `az datamigration sql-service delete` + +##### Example +``` +az datamigration sql-service delete --resource-group "testrg" --name "service1" +``` +##### Parameters +|Option|Type|Description|Path (SDK)|Swagger name| +|------|----|-----------|----------|------------| +|**--resource-group-name**|string|Name of the resource group that contains the resource. You can obtain this value from the Azure Resource Manager API or the portal.|resource_group_name|resourceGroupName| +|**--sql-migration-service-name**|string|Name of the SQL Migration Service.|sql_migration_service_name|sqlMigrationServiceName| + +#### Command `az datamigration sql-service delete-node` + +##### Example +``` +az datamigration sql-service delete-node --ir-name "IRName" --node-name "nodeName" --resource-group "testrg" --name \ +"service1" +``` +##### Parameters +|Option|Type|Description|Path (SDK)|Swagger name| +|------|----|-----------|----------|------------| +|**--resource-group-name**|string|Name of the resource group that contains the resource. You can obtain this value from the Azure Resource Manager API or the portal.|resource_group_name|resourceGroupName| +|**--sql-migration-service-name**|string|Name of the SQL Migration Service.|sql_migration_service_name|sqlMigrationServiceName| +|**--node-name**|string|The name of node to delete.|node_name|nodeName| +|**--integration-runtime-name**|string|The name of integration runtime.|integration_runtime_name|integrationRuntimeName| + +#### Command `az datamigration sql-service list-auth-key` + +##### Example +``` +az datamigration sql-service list-auth-key --resource-group "testrg" --name "service1" +``` +##### Parameters +|Option|Type|Description|Path (SDK)|Swagger name| +|------|----|-----------|----------|------------| +|**--resource-group-name**|string|Name of the resource group that contains the resource. You can obtain this value from the Azure Resource Manager API or the portal.|resource_group_name|resourceGroupName| +|**--sql-migration-service-name**|string|Name of the SQL Migration Service.|sql_migration_service_name|sqlMigrationServiceName| + +#### Command `az datamigration sql-service list-integration-runtime-metric` + +##### Example +``` +az datamigration sql-service list-integration-runtime-metric --resource-group "testrg" --name "service1" +``` +##### Parameters +|Option|Type|Description|Path (SDK)|Swagger name| +|------|----|-----------|----------|------------| +|**--resource-group-name**|string|Name of the resource group that contains the resource. You can obtain this value from the Azure Resource Manager API or the portal.|resource_group_name|resourceGroupName| +|**--sql-migration-service-name**|string|Name of the SQL Migration Service.|sql_migration_service_name|sqlMigrationServiceName| + +#### Command `az datamigration sql-service list-migration` + +##### Example +``` +az datamigration sql-service list-migration --resource-group "testrg" --name "service1" +``` +##### Parameters +|Option|Type|Description|Path (SDK)|Swagger name| +|------|----|-----------|----------|------------| +|**--resource-group-name**|string|Name of the resource group that contains the resource. You can obtain this value from the Azure Resource Manager API or the portal.|resource_group_name|resourceGroupName| +|**--sql-migration-service-name**|string|Name of the SQL Migration Service.|sql_migration_service_name|sqlMigrationServiceName| + +#### Command `az datamigration sql-service regenerate-auth-key` + +##### Example +``` +az datamigration sql-service regenerate-auth-key --key-name "authKey1" --resource-group "testrg" --name "service1" +``` +##### Parameters +|Option|Type|Description|Path (SDK)|Swagger name| +|------|----|-----------|----------|------------| +|**--resource-group-name**|string|Name of the resource group that contains the resource. You can obtain this value from the Azure Resource Manager API or the portal.|resource_group_name|resourceGroupName| +|**--sql-migration-service-name**|string|Name of the SQL Migration Service.|sql_migration_service_name|sqlMigrationServiceName| +|**--key-name**|string|The name of authentication key to generate.|key_name|keyName| +|**--auth-key1**|string|The first authentication key.|auth_key1|authKey1| +|**--auth-key2**|string|The second authentication key.|auth_key2|authKey2| + +### group `az datamigration sql-vm` +#### Command `az datamigration sql-vm show` + +##### Example +``` +az datamigration sql-vm show --resource-group "testrg" --sql-vm-name "testvm" --target-db-name "db1" +``` +##### Parameters +|Option|Type|Description|Path (SDK)|Swagger name| +|------|----|-----------|----------|------------| +|**--resource-group-name**|string|Name of the resource group that contains the resource. You can obtain this value from the Azure Resource Manager API or the portal.|resource_group_name|resourceGroupName| +|**--sql-vm-name**|string|Name of the target SQL Virtual Machine.|sql_vm_name|sqlVirtualMachineName| +|**--target-db-name**|string|The name of the target database.|target_db_name|targetDbName| +|**--migration-operation-id**|uuid|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.|migration_operation_id|migrationOperationId| +|**--expand**|string|The child resources to include in the response.|expand|$expand| + +#### Command `az datamigration sql-vm create` + +##### Example +``` +az datamigration sql-vm create --source-location "{\\"fileShare\\":{\\"path\\":\\"C:\\\\\\\\aaa\\\\\\\\bbb\\\\\\\\ccc\\\ +",\\"password\\":\\"placeholder\\",\\"username\\":\\"name\\"}}" --target-location account-key="abcd" \ +storage-account-resource-id="account.database.windows.net" --migration-service "/subscriptions/00000000-1111-2222-3333-\ +444444444444/resourceGroups/testrg/providers/Microsoft.DataMigration/sqlMigrationServices/testagent" \ +--offline-configuration last-backup-name="last_backup_file_name" offline=true --scope "/subscriptions/00000000-1111-222\ +2-3333-444444444444/resourceGroups/testrg/providers/Microsoft.SqlVirtualMachine/sqlVirtualMachines/testvm" \ +--source-database-name "aaa" --source-sql-connection authentication="WindowsAuthentication" data-source="aaa" \ +encrypt-connection=true password="placeholder" trust-server-certificate=true user-name="bbb" --resource-group "testrg" \ +--sql-vm-name "testvm" --target-db-name "db1" +az datamigration sql-vm create --source-location "{\\"fileShare\\":{\\"path\\":\\"C:\\\\\\\\aaa\\\\\\\\bbb\\\\\\\\ccc\\\ +",\\"password\\":\\"placeholder\\",\\"username\\":\\"name\\"}}" --target-location account-key="abcd" \ +storage-account-resource-id="account.database.windows.net" --migration-service "/subscriptions/00000000-1111-2222-3333-\ +444444444444/resourceGroups/testrg/providers/Microsoft.DataMigration/sqlMigrationServices/testagent" \ +--offline-configuration last-backup-name="last_backup_file_name" offline=true --scope "/subscriptions/00000000-1111-222\ +2-3333-444444444444/resourceGroups/testrg/providers/Microsoft.SqlVirtualMachine/sqlVirtualMachines/testvm" \ +--source-database-name "aaa" --source-sql-connection authentication="WindowsAuthentication" data-source="aaa" \ +encrypt-connection=true password="placeholder" trust-server-certificate=true user-name="bbb" --resource-group "testrg" \ +--sql-vm-name "testvm" --target-db-name "db1" +``` +##### Parameters +|Option|Type|Description|Path (SDK)|Swagger name| +|------|----|-----------|----------|------------| +|**--resource-group-name**|string|Name of the resource group that contains the resource. You can obtain this value from the Azure Resource Manager API or the portal.|resource_group_name|resourceGroupName| +|**--sql-vm-name**|string|Name of the target SQL Virtual Machine.|sql_vm_name|sqlVirtualMachineName| +|**--target-db-name**|string|The name of the target database.|target_db_name|targetDbName| +|**--scope**|string|Resource Id of the target resource (SQL VM or SQL Managed Instance)|scope|scope| +|**--source-sql-connection**|object|Source SQL Server connection details.|source_sql_connection|sourceSqlConnection| +|**--source-database-name**|string|Name of the source database.|source_database_name|sourceDatabaseName| +|**--migration-service**|string|Resource Id of the Migration Service.|migration_service|migrationService| +|**--migration-operation-id**|string|ID tracking current migration operation.|migration_operation_id|migrationOperationId| +|**--target-db-collation**|string|Database collation to be used for the target database.|target_db_collation|targetDatabaseCollation| +|**--provisioning-error**|string|Error message for migration provisioning failure, if any.|provisioning_error|provisioningError| +|**--offline-configuration**|object|Offline configuration.|offline_configuration|offlineConfiguration| +|**--source-location**|object|Source location of backups.|source_location|sourceLocation| +|**--target-location**|object|Target location for copying backups.|target_location|targetLocation| + +#### Command `az datamigration sql-vm cancel` + +##### Example +``` +az datamigration sql-vm cancel --migration-operation-id "4124fe90-d1b6-4b50-b4d9-46d02381f59a" --resource-group \ +"testrg" --sql-vm-name "testvm" --target-db-name "db1" +``` +##### Parameters +|Option|Type|Description|Path (SDK)|Swagger name| +|------|----|-----------|----------|------------| +|**--resource-group-name**|string|Name of the resource group that contains the resource. You can obtain this value from the Azure Resource Manager API or the portal.|resource_group_name|resourceGroupName| +|**--sql-vm-name**|string|Name of the target SQL Virtual Machine.|sql_vm_name|sqlVirtualMachineName| +|**--target-db-name**|string|The name of the target database.|target_db_name|targetDbName| +|**--migration-operation-id**|uuid|ID tracking migration operation.|migration_operation_id|migrationOperationId| + +#### Command `az datamigration sql-vm cutover` + +##### Example +``` +az datamigration sql-vm cutover --migration-operation-id "4124fe90-d1b6-4b50-b4d9-46d02381f59a" --resource-group \ +"testrg" --sql-vm-name "testvm" --target-db-name "db1" +``` +##### Parameters +|Option|Type|Description|Path (SDK)|Swagger name| +|------|----|-----------|----------|------------| +|**--resource-group-name**|string|Name of the resource group that contains the resource. You can obtain this value from the Azure Resource Manager API or the portal.|resource_group_name|resourceGroupName| +|**--sql-vm-name**|string|Name of the target SQL Virtual Machine.|sql_vm_name|sqlVirtualMachineName| +|**--target-db-name**|string|The name of the target database.|target_db_name|targetDbName| +|**--migration-operation-id**|uuid|ID tracking migration operation.|migration_operation_id|migrationOperationId| diff --git a/src/datamigration/setup.cfg b/src/datamigration/setup.cfg new file mode 100644 index 00000000000..2fdd96e5d39 --- /dev/null +++ b/src/datamigration/setup.cfg @@ -0,0 +1 @@ +#setup.cfg \ No newline at end of file diff --git a/src/datamigration/setup.py b/src/datamigration/setup.py new file mode 100644 index 00000000000..04def8e214b --- /dev/null +++ b/src/datamigration/setup.py @@ -0,0 +1,58 @@ +#!/usr/bin/env python + +# -------------------------------------------------------------------------------------------- +# Copyright (c) Microsoft Corporation. All rights reserved. +# Licensed under the MIT License. See License.txt in the project root for license information. +# -------------------------------------------------------------------------------------------- + + +from codecs import open +from setuptools import setup, find_packages + +# HISTORY.rst entry. +VERSION = '0.1.0' +try: + from azext_datamigration.manual.version import VERSION +except ImportError: + pass + +# The full list of classifiers is available at +# https://pypi.python.org/pypi?%3Aaction=list_classifiers +CLASSIFIERS = [ + 'Development Status :: 4 - Beta', + 'Intended Audience :: Developers', + 'Intended Audience :: System Administrators', + 'Programming Language :: Python', + 'Programming Language :: Python :: 3', + 'Programming Language :: Python :: 3.6', + 'Programming Language :: Python :: 3.7', + 'Programming Language :: Python :: 3.8', + 'License :: OSI Approved :: MIT License', +] + +DEPENDENCIES = [] + +try: + from azext_datamigration.manual.dependency import DEPENDENCIES +except ImportError: + pass + +with open('README.md', 'r', encoding='utf-8') as f: + README = f.read() +with open('HISTORY.rst', 'r', encoding='utf-8') as f: + HISTORY = f.read() + +setup( + name='datamigration', + version=VERSION, + description='Microsoft Azure Command-Line Tools DataMigrationManagementClient Extension', + author='Microsoft Corporation', + author_email='azpycli@microsoft.com', + url='https://github.com/Azure/azure-cli-extensions/tree/master/src/datamigration', + long_description=README + '\n\n' + HISTORY, + license='MIT', + classifiers=CLASSIFIERS, + packages=find_packages(), + install_requires=DEPENDENCIES, + package_data={'azext_datamigration': ['azext_metadata.json']}, +) diff --git a/src/service_name.json b/src/service_name.json index 2ff02395ff5..6462dffa5d9 100644 --- a/src/service_name.json +++ b/src/service_name.json @@ -129,6 +129,11 @@ "AzureServiceName": "Azure Data Factory", "URL": "https://docs.microsoft.com/azure/data-factory/" }, + { + "Command": "az datamigration", + "AzureServiceName": "Azure Database Migration Service", + "URL": "https://docs.microsoft.com/en-us/azure/dms/" + }, { "Command": "az datashare", "AzureServiceName": "Azure Data Share",